diff --git a/Directory.Packages.props b/Directory.Packages.props index fd2fb305..7b0fb022 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,25 +4,30 @@ false + + + - + + - - - - - - + + + + + + + @@ -94,10 +99,10 @@ - + - + @@ -127,7 +132,7 @@ - + diff --git a/Elsa.Extensions.sln b/Elsa.Extensions.sln index 11560104..4cc424b5 100644 --- a/Elsa.Extensions.sln +++ b/Elsa.Extensions.sln @@ -123,8 +123,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Alterations.MassTransi EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "caching", "caching", "{9732C4B1-3E94-4705-8CBE-1DC48F55C8EA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Caching", "src\caching\Elsa.Caching\Elsa.Caching.csproj", "{21A93F3B-A799-39DA-EEBB-0D5E9B6F99A1}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Caching.Distributed", "src\caching\Elsa.Caching.Distributed\Elsa.Caching.Distributed.csproj", "{C568B847-15AB-C4DB-5675-0D5F400ED14D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Caching.Distributed.MassTransit", "src\caching\Elsa.Caching.Distributed.MassTransit\Elsa.Caching.Distributed.MassTransit.csproj", "{C4D65789-A62A-DAD5-7246-A0E476F86CDF}" @@ -177,20 +175,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "actors", "actors", "{559A90 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Actors.ProtoActor", "src\actors\Elsa.Actors.ProtoActor\Elsa.Actors.ProtoActor.csproj", "{C2721BCB-2FB1-9227-AABB-ED768EB292FD}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripting", "scripting", "{D836B806-4EE7-4B1E-AA85-919ACC4B060C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Scripting.CSharp", "src\scripting\Elsa.Scripting.CSharp\Elsa.Scripting.CSharp.csproj", "{152CD9A2-099E-679F-9451-910266B37E5D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Scripting.Dsl", "src\scripting\Elsa.Scripting.Dsl\Elsa.Scripting.Dsl.csproj", "{2EFC2C6C-72F0-9839-6453-C3F239C38758}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Scripting.JavaScript", "src\scripting\Elsa.Scripting.JavaScript\Elsa.Scripting.JavaScript.csproj", "{B210E4C3-C0DE-D338-8D4D-717F76C0D2CF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Scripting.JavaScript.Libraries", "src\scripting\Elsa.Scripting.JavaScript.Libraries\Elsa.Scripting.JavaScript.Libraries.csproj", "{6DA083EC-9D83-A244-14FF-B0DADFFE4C81}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Scripting.Liquid", "src\scripting\Elsa.Scripting.Liquid\Elsa.Scripting.Liquid.csproj", "{C6AB11EF-F411-4427-E6A2-6E1ACE2DD1D3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Scripting.Python", "src\scripting\Elsa.Scripting.Python\Elsa.Scripting.Python.csproj", "{65FCD3C0-1E47-CD9F-1B6B-0AA4EDAEE8B5}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "retention", "retention", "{0EB9AB19-0C85-4551-8347-F3D330614B47}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Retention", "src\retention\Elsa.Retention\Elsa.Retention.csproj", "{4C24646E-B017-9C72-5E5E-27EEE2F23D7B}" @@ -205,8 +189,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scheduling", "scheduling", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "http", "http", "{A130EEF5-7DF0-40CB-BD71-744716F0BCE7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Http", "src\http\Elsa.Http\Elsa.Http.csproj", "{9ED51EEA-4277-1C89-BE0F-0F491A0AC637}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Http.Webhooks", "src\http\Elsa.Http.Webhooks\Elsa.Http.Webhooks.csproj", "{ABC40471-5A32-0AC0-594B-FF19B66E2493}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "email", "email", "{E0C43181-76BA-47C7-93CC-6CE0F577F14B}" @@ -263,6 +245,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Studio.Http.Webhooks", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Studio.WorkflowContexts", "src\workflows\Elsa.Studio.WorkflowContexts\Elsa.Studio.WorkflowContexts.csproj", "{E6BD7D7F-3CC5-EE66-577D-19015EFD03D8}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "runtimes", "runtimes", "{7D32914F-1D75-4E01-A0D1-BBF67789A0E5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Workflows.Runtime.Distributed", "src\runtimes\Elsa.Workflows.Runtime.Distributed\Elsa.Workflows.Runtime.Distributed.csproj", "{55488191-7EF9-A480-6C1F-F1301DCC0EC0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Workflows.Runtime.ProtoActor", "src\runtimes\Elsa.Workflows.Runtime.ProtoActor\Elsa.Workflows.Runtime.ProtoActor.csproj", "{159E73C1-60F9-0D39-9CA1-79EC99187FDC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "integration", "integration", "{E3AF86CC-B571-40A2-B44F-F48B17EB9325}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Alterations.IntegrationTests", "test\integrations\Elsa.Alterations.IntegrationTests\Elsa.Alterations.IntegrationTests.csproj", "{1DA73581-F279-95FC-9485-B73D8A9FC727}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.MongoDb.UnitTests", "test\unit\Elsa.MongoDb.UnitTests\Elsa.MongoDb.UnitTests.csproj", "{59C29BC8-ED95-8F0B-323E-A988EADF3D38}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -393,10 +387,6 @@ Global {95C8EFEE-9396-F334-9B76-78322650A0C6}.Debug|Any CPU.Build.0 = Debug|Any CPU {95C8EFEE-9396-F334-9B76-78322650A0C6}.Release|Any CPU.ActiveCfg = Release|Any CPU {95C8EFEE-9396-F334-9B76-78322650A0C6}.Release|Any CPU.Build.0 = Release|Any CPU - {21A93F3B-A799-39DA-EEBB-0D5E9B6F99A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {21A93F3B-A799-39DA-EEBB-0D5E9B6F99A1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {21A93F3B-A799-39DA-EEBB-0D5E9B6F99A1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {21A93F3B-A799-39DA-EEBB-0D5E9B6F99A1}.Release|Any CPU.Build.0 = Release|Any CPU {C568B847-15AB-C4DB-5675-0D5F400ED14D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C568B847-15AB-C4DB-5675-0D5F400ED14D}.Debug|Any CPU.Build.0 = Debug|Any CPU {C568B847-15AB-C4DB-5675-0D5F400ED14D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -489,30 +479,6 @@ Global {C2721BCB-2FB1-9227-AABB-ED768EB292FD}.Debug|Any CPU.Build.0 = Debug|Any CPU {C2721BCB-2FB1-9227-AABB-ED768EB292FD}.Release|Any CPU.ActiveCfg = Release|Any CPU {C2721BCB-2FB1-9227-AABB-ED768EB292FD}.Release|Any CPU.Build.0 = Release|Any CPU - {152CD9A2-099E-679F-9451-910266B37E5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {152CD9A2-099E-679F-9451-910266B37E5D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {152CD9A2-099E-679F-9451-910266B37E5D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {152CD9A2-099E-679F-9451-910266B37E5D}.Release|Any CPU.Build.0 = Release|Any CPU - {2EFC2C6C-72F0-9839-6453-C3F239C38758}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2EFC2C6C-72F0-9839-6453-C3F239C38758}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2EFC2C6C-72F0-9839-6453-C3F239C38758}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2EFC2C6C-72F0-9839-6453-C3F239C38758}.Release|Any CPU.Build.0 = Release|Any CPU - {B210E4C3-C0DE-D338-8D4D-717F76C0D2CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B210E4C3-C0DE-D338-8D4D-717F76C0D2CF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B210E4C3-C0DE-D338-8D4D-717F76C0D2CF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B210E4C3-C0DE-D338-8D4D-717F76C0D2CF}.Release|Any CPU.Build.0 = Release|Any CPU - {6DA083EC-9D83-A244-14FF-B0DADFFE4C81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6DA083EC-9D83-A244-14FF-B0DADFFE4C81}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6DA083EC-9D83-A244-14FF-B0DADFFE4C81}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6DA083EC-9D83-A244-14FF-B0DADFFE4C81}.Release|Any CPU.Build.0 = Release|Any CPU - {C6AB11EF-F411-4427-E6A2-6E1ACE2DD1D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C6AB11EF-F411-4427-E6A2-6E1ACE2DD1D3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C6AB11EF-F411-4427-E6A2-6E1ACE2DD1D3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C6AB11EF-F411-4427-E6A2-6E1ACE2DD1D3}.Release|Any CPU.Build.0 = Release|Any CPU - {65FCD3C0-1E47-CD9F-1B6B-0AA4EDAEE8B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65FCD3C0-1E47-CD9F-1B6B-0AA4EDAEE8B5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {65FCD3C0-1E47-CD9F-1B6B-0AA4EDAEE8B5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65FCD3C0-1E47-CD9F-1B6B-0AA4EDAEE8B5}.Release|Any CPU.Build.0 = Release|Any CPU {4C24646E-B017-9C72-5E5E-27EEE2F23D7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4C24646E-B017-9C72-5E5E-27EEE2F23D7B}.Debug|Any CPU.Build.0 = Debug|Any CPU {4C24646E-B017-9C72-5E5E-27EEE2F23D7B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -525,10 +491,6 @@ Global {0CA52158-CBB6-74FC-B63F-812E059053A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {0CA52158-CBB6-74FC-B63F-812E059053A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {0CA52158-CBB6-74FC-B63F-812E059053A4}.Release|Any CPU.Build.0 = Release|Any CPU - {9ED51EEA-4277-1C89-BE0F-0F491A0AC637}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9ED51EEA-4277-1C89-BE0F-0F491A0AC637}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9ED51EEA-4277-1C89-BE0F-0F491A0AC637}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9ED51EEA-4277-1C89-BE0F-0F491A0AC637}.Release|Any CPU.Build.0 = Release|Any CPU {ABC40471-5A32-0AC0-594B-FF19B66E2493}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABC40471-5A32-0AC0-594B-FF19B66E2493}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABC40471-5A32-0AC0-594B-FF19B66E2493}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -625,6 +587,22 @@ Global {E6BD7D7F-3CC5-EE66-577D-19015EFD03D8}.Debug|Any CPU.Build.0 = Debug|Any CPU {E6BD7D7F-3CC5-EE66-577D-19015EFD03D8}.Release|Any CPU.ActiveCfg = Release|Any CPU {E6BD7D7F-3CC5-EE66-577D-19015EFD03D8}.Release|Any CPU.Build.0 = Release|Any CPU + {55488191-7EF9-A480-6C1F-F1301DCC0EC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55488191-7EF9-A480-6C1F-F1301DCC0EC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55488191-7EF9-A480-6C1F-F1301DCC0EC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55488191-7EF9-A480-6C1F-F1301DCC0EC0}.Release|Any CPU.Build.0 = Release|Any CPU + {159E73C1-60F9-0D39-9CA1-79EC99187FDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {159E73C1-60F9-0D39-9CA1-79EC99187FDC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {159E73C1-60F9-0D39-9CA1-79EC99187FDC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {159E73C1-60F9-0D39-9CA1-79EC99187FDC}.Release|Any CPU.Build.0 = Release|Any CPU + {1DA73581-F279-95FC-9485-B73D8A9FC727}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1DA73581-F279-95FC-9485-B73D8A9FC727}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1DA73581-F279-95FC-9485-B73D8A9FC727}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1DA73581-F279-95FC-9485-B73D8A9FC727}.Release|Any CPU.Build.0 = Release|Any CPU + {59C29BC8-ED95-8F0B-323E-A988EADF3D38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59C29BC8-ED95-8F0B-323E-A988EADF3D38}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59C29BC8-ED95-8F0B-323E-A988EADF3D38}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59C29BC8-ED95-8F0B-323E-A988EADF3D38}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -672,7 +650,6 @@ Global {492E9E6D-403E-E473-F3CC-4CEBA57448FF} = {F670C86F-ACDA-4549-B9E1-E530B1ED5538} {95C8EFEE-9396-F334-9B76-78322650A0C6} = {F670C86F-ACDA-4549-B9E1-E530B1ED5538} {9732C4B1-3E94-4705-8CBE-1DC48F55C8EA} = {527248D6-B851-4C8D-8667-E2FB0A91DABF} - {21A93F3B-A799-39DA-EEBB-0D5E9B6F99A1} = {9732C4B1-3E94-4705-8CBE-1DC48F55C8EA} {C568B847-15AB-C4DB-5675-0D5F400ED14D} = {9732C4B1-3E94-4705-8CBE-1DC48F55C8EA} {C4D65789-A62A-DAD5-7246-A0E476F86CDF} = {9732C4B1-3E94-4705-8CBE-1DC48F55C8EA} {F5B2629A-E0C9-9B73-4941-DD44DD557A9B} = {9732C4B1-3E94-4705-8CBE-1DC48F55C8EA} @@ -699,13 +676,6 @@ Global {FE487F94-5242-C0C7-884A-3EE8FB8FC24E} = {45B793EC-7BFF-45C0-BD0E-2D1601C8D01E} {559A9049-76C1-421C-9295-32ED7438D52E} = {527248D6-B851-4C8D-8667-E2FB0A91DABF} {C2721BCB-2FB1-9227-AABB-ED768EB292FD} = {559A9049-76C1-421C-9295-32ED7438D52E} - {D836B806-4EE7-4B1E-AA85-919ACC4B060C} = {527248D6-B851-4C8D-8667-E2FB0A91DABF} - {152CD9A2-099E-679F-9451-910266B37E5D} = {D836B806-4EE7-4B1E-AA85-919ACC4B060C} - {2EFC2C6C-72F0-9839-6453-C3F239C38758} = {D836B806-4EE7-4B1E-AA85-919ACC4B060C} - {B210E4C3-C0DE-D338-8D4D-717F76C0D2CF} = {D836B806-4EE7-4B1E-AA85-919ACC4B060C} - {6DA083EC-9D83-A244-14FF-B0DADFFE4C81} = {D836B806-4EE7-4B1E-AA85-919ACC4B060C} - {C6AB11EF-F411-4427-E6A2-6E1ACE2DD1D3} = {D836B806-4EE7-4B1E-AA85-919ACC4B060C} - {65FCD3C0-1E47-CD9F-1B6B-0AA4EDAEE8B5} = {D836B806-4EE7-4B1E-AA85-919ACC4B060C} {0EB9AB19-0C85-4551-8347-F3D330614B47} = {527248D6-B851-4C8D-8667-E2FB0A91DABF} {4C24646E-B017-9C72-5E5E-27EEE2F23D7B} = {0EB9AB19-0C85-4551-8347-F3D330614B47} {A0EEAF46-1B46-4C7D-A7E4-863814F87C4B} = {527248D6-B851-4C8D-8667-E2FB0A91DABF} @@ -713,7 +683,6 @@ Global {0CA52158-CBB6-74FC-B63F-812E059053A4} = {A0EEAF46-1B46-4C7D-A7E4-863814F87C4B} {EB873525-AE02-4406-AC78-5996DE781573} = {527248D6-B851-4C8D-8667-E2FB0A91DABF} {A130EEF5-7DF0-40CB-BD71-744716F0BCE7} = {527248D6-B851-4C8D-8667-E2FB0A91DABF} - {9ED51EEA-4277-1C89-BE0F-0F491A0AC637} = {A130EEF5-7DF0-40CB-BD71-744716F0BCE7} {ABC40471-5A32-0AC0-594B-FF19B66E2493} = {A130EEF5-7DF0-40CB-BD71-744716F0BCE7} {E0C43181-76BA-47C7-93CC-6CE0F577F14B} = {527248D6-B851-4C8D-8667-E2FB0A91DABF} {719BCAE9-BF9C-75D9-E551-782D6FD6421C} = {E0C43181-76BA-47C7-93CC-6CE0F577F14B} @@ -742,6 +711,12 @@ Global {C818B0E4-6019-3E0C-EE4C-17248430319E} = {BF696EF4-FEAE-4008-A788-369437420259} {D29C4DFC-A392-7DFA-C85D-01827CD4A360} = {A130EEF5-7DF0-40CB-BD71-744716F0BCE7} {E6BD7D7F-3CC5-EE66-577D-19015EFD03D8} = {04265302-AF6B-4627-807C-DE9E1699D7C9} + {7D32914F-1D75-4E01-A0D1-BBF67789A0E5} = {527248D6-B851-4C8D-8667-E2FB0A91DABF} + {55488191-7EF9-A480-6C1F-F1301DCC0EC0} = {7D32914F-1D75-4E01-A0D1-BBF67789A0E5} + {159E73C1-60F9-0D39-9CA1-79EC99187FDC} = {7D32914F-1D75-4E01-A0D1-BBF67789A0E5} + {E3AF86CC-B571-40A2-B44F-F48B17EB9325} = {A99FA26E-2098-403A-BD04-6BBCFBE3AC7D} + {1DA73581-F279-95FC-9485-B73D8A9FC727} = {E3AF86CC-B571-40A2-B44F-F48B17EB9325} + {59C29BC8-ED95-8F0B-323E-A988EADF3D38} = {AF041BAE-B45A-428B-B7F5-921CCB895558} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {11A771DA-B728-445E-8A88-AE1C84C3B3A6} diff --git a/src/caching/Elsa.Caching.Distributed/Elsa.Caching.Distributed.csproj b/src/caching/Elsa.Caching.Distributed/Elsa.Caching.Distributed.csproj index 0a076dfb..f2ff5db6 100644 --- a/src/caching/Elsa.Caching.Distributed/Elsa.Caching.Distributed.csproj +++ b/src/caching/Elsa.Caching.Distributed/Elsa.Caching.Distributed.csproj @@ -6,9 +6,9 @@ elsa extension module caching distributed - - - - - + + + + + diff --git a/src/caching/Elsa.Caching/Contracts/ICacheManager.cs b/src/caching/Elsa.Caching/Contracts/ICacheManager.cs deleted file mode 100644 index 6e93fe8c..00000000 --- a/src/caching/Elsa.Caching/Contracts/ICacheManager.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Elsa.Caching.Options; -using Microsoft.Extensions.Caching.Memory; -using Microsoft.Extensions.Options; -using Microsoft.Extensions.Primitives; - -namespace Elsa.Caching; - -/// -/// A thin wrapper around , allowing for centralized handling of cache entries. -/// -public interface ICacheManager -{ - /// - /// Provides options for configuring caching. - /// - IOptions CachingOptions { get; } - - /// - /// Gets a change token for the specified key. - /// - IChangeToken GetToken(string key); - - /// - /// Triggers the change token for the specified key. - /// - ValueTask TriggerTokenAsync(string key, CancellationToken cancellationToken = default); - - /// - /// Gets an item from the cache, or creates it if it doesn't exist. - /// - Task GetOrCreateAsync(object key, Func> factory); -} \ No newline at end of file diff --git a/src/caching/Elsa.Caching/Contracts/IChangeTokenSignalInvoker.cs b/src/caching/Elsa.Caching/Contracts/IChangeTokenSignalInvoker.cs deleted file mode 100644 index 700da3d9..00000000 --- a/src/caching/Elsa.Caching/Contracts/IChangeTokenSignalInvoker.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.Extensions.Primitives; - -namespace Elsa.Caching; - -/// -/// Triggers the change token associated with the specified key. -/// -public interface IChangeTokenSignalInvoker -{ - /// - /// Gets a change token for the specified key. - /// - IChangeToken GetToken(string key); - - /// - /// Triggers the change token for the specified key. - /// - ValueTask TriggerTokenAsync(string key, CancellationToken cancellationToken = default); -} \ No newline at end of file diff --git a/src/caching/Elsa.Caching/Contracts/IChangeTokenSignaler.cs b/src/caching/Elsa.Caching/Contracts/IChangeTokenSignaler.cs deleted file mode 100644 index f937e2b6..00000000 --- a/src/caching/Elsa.Caching/Contracts/IChangeTokenSignaler.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.Extensions.Primitives; - -namespace Elsa.Caching; - -/// -/// Provides change tokens for memory caches, allowing code to evict cache entries by triggering a signal. -/// -public interface IChangeTokenSignaler -{ - /// - /// Gets a change token for the specified key. - /// - IChangeToken GetToken(string key); - - /// - /// Triggers the change token for the specified key. - /// - ValueTask TriggerTokenAsync(string key, CancellationToken cancellationToken = default); -} \ No newline at end of file diff --git a/src/caching/Elsa.Caching/Elsa.Caching.csproj b/src/caching/Elsa.Caching/Elsa.Caching.csproj deleted file mode 100644 index 34fc253d..00000000 --- a/src/caching/Elsa.Caching/Elsa.Caching.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Provides caching services and utility functions common to Elsa modules. - - elsa extension module caching - - - - - - - - - diff --git a/src/caching/Elsa.Caching/Elsa.Caching.csproj.DotSettings b/src/caching/Elsa.Caching/Elsa.Caching.csproj.DotSettings deleted file mode 100644 index 127787e8..00000000 --- a/src/caching/Elsa.Caching/Elsa.Caching.csproj.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - True \ No newline at end of file diff --git a/src/caching/Elsa.Caching/Extensions/ModuleExtensions.cs b/src/caching/Elsa.Caching/Extensions/ModuleExtensions.cs deleted file mode 100644 index 879f9c9b..00000000 --- a/src/caching/Elsa.Caching/Extensions/ModuleExtensions.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Elsa.Caching.Features; -using Elsa.Features.Services; - -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -/// -/// Provides methods to install and configure the distributed caching feature. -/// -public static class ModuleExtensions -{ - /// - /// Adds the feature to the system. - /// - public static MemoryCacheFeature UseMemoryCache(this IModule module, Action? configure = default) - { - return module.Configure(configure); - } -} \ No newline at end of file diff --git a/src/caching/Elsa.Caching/Features/MemoryCacheFeature.cs b/src/caching/Elsa.Caching/Features/MemoryCacheFeature.cs deleted file mode 100644 index 1a3ad07c..00000000 --- a/src/caching/Elsa.Caching/Features/MemoryCacheFeature.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Elsa.Caching.Options; -using Elsa.Caching.Services; -using Elsa.Features.Abstractions; -using Elsa.Features.Services; -using Microsoft.Extensions.DependencyInjection; - -namespace Elsa.Caching.Features; - -/// -/// Configures the MemoryCache. -/// -public class MemoryCacheFeature(IModule module) : FeatureBase(module) -{ - /// - /// A delegate to configure the . - /// - public Action CachingOptions { get; set; } = _ => { }; - - /// - public override void Apply() - { - Services.Configure(CachingOptions); - - Services - .AddMemoryCache() - .AddSingleton() - .AddSingleton() - .AddSingleton() - ; - } -} \ No newline at end of file diff --git a/src/caching/Elsa.Caching/Options/CachingOptions.cs b/src/caching/Elsa.Caching/Options/CachingOptions.cs deleted file mode 100644 index 4b9b5dd0..00000000 --- a/src/caching/Elsa.Caching/Options/CachingOptions.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Elsa.Caching.Options; - -/// -/// Provides options for configuring caching. -/// -public class CachingOptions -{ - /// - /// Gets or sets the duration for which cache entries are stored. - /// - public TimeSpan CacheDuration { get; set; } = TimeSpan.FromMinutes(1); -} \ No newline at end of file diff --git a/src/caching/Elsa.Caching/Services/CacheManager.cs b/src/caching/Elsa.Caching/Services/CacheManager.cs deleted file mode 100644 index 6db50132..00000000 --- a/src/caching/Elsa.Caching/Services/CacheManager.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Elsa.Caching.Options; -using Microsoft.Extensions.Caching.Memory; -using Microsoft.Extensions.Options; -using Microsoft.Extensions.Primitives; - -namespace Elsa.Caching.Services; - -/// -public class CacheManager(IMemoryCache memoryCache, IChangeTokenSignaler changeTokenSignaler, IOptions options) : ICacheManager -{ - /// - public IOptions CachingOptions => options; - - /// - public IChangeToken GetToken(string key) - { - return changeTokenSignaler.GetToken(key); - } - - /// - public ValueTask TriggerTokenAsync(string key, CancellationToken cancellationToken = default) - { - return changeTokenSignaler.TriggerTokenAsync(key, cancellationToken); - } - - /// - public async Task GetOrCreateAsync(object key, Func> factory) - { - return await memoryCache.GetOrCreateAsync(key, async entry => await factory(entry)); - } -} \ No newline at end of file diff --git a/src/caching/Elsa.Caching/Services/ChangeTokenSignalInvoker.cs b/src/caching/Elsa.Caching/Services/ChangeTokenSignalInvoker.cs deleted file mode 100644 index 1bffad12..00000000 --- a/src/caching/Elsa.Caching/Services/ChangeTokenSignalInvoker.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Collections.Concurrent; -using Microsoft.Extensions.Primitives; - -namespace Elsa.Caching.Services; - -/// -public class ChangeTokenSignalInvoker : IChangeTokenSignalInvoker -{ - private readonly ConcurrentDictionary _changeTokens = new(); - - /// - public IChangeToken GetToken(string key) - { - return _changeTokens.GetOrAdd( - key, - _ => - { - var cancellationTokenSource = new CancellationTokenSource(); - var changeToken = new CancellationChangeToken(cancellationTokenSource.Token); - return new ChangeTokenInfo(changeToken, cancellationTokenSource); - }).ChangeToken; - } - - /// - public ValueTask TriggerTokenAsync(string key, CancellationToken cancellationToken = default) - { - if (_changeTokens.TryRemove(key, out var changeTokenInfo)) - changeTokenInfo.TokenSource.Cancel(); - - return default; - } - - private readonly struct ChangeTokenInfo(IChangeToken changeToken, CancellationTokenSource tokenSource) - { - public IChangeToken ChangeToken { get; } = changeToken; - public CancellationTokenSource TokenSource { get; } = tokenSource; - } -} \ No newline at end of file diff --git a/src/caching/Elsa.Caching/Services/ChangeTokenSignaler.cs b/src/caching/Elsa.Caching/Services/ChangeTokenSignaler.cs deleted file mode 100644 index 69d9f2fd..00000000 --- a/src/caching/Elsa.Caching/Services/ChangeTokenSignaler.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.Extensions.Primitives; - -namespace Elsa.Caching.Services; - -/// -public class ChangeTokenSignaler(IChangeTokenSignalInvoker invoker) : IChangeTokenSignaler -{ - /// - public IChangeToken GetToken(string key) - { - return invoker.GetToken(key); - } - - /// - public ValueTask TriggerTokenAsync(string key, CancellationToken cancellationToken = default) - { - return invoker.TriggerTokenAsync(key, cancellationToken); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Abstractions/DownloadableContentHandlerBase.cs b/src/http/Elsa.Http/Abstractions/DownloadableContentHandlerBase.cs deleted file mode 100644 index 403f5682..00000000 --- a/src/http/Elsa.Http/Abstractions/DownloadableContentHandlerBase.cs +++ /dev/null @@ -1,45 +0,0 @@ -using Elsa.Http.Contexts; - -namespace Elsa.Http.Abstractions; - -/// -/// Provides a base class for implementations. -/// -public abstract class DownloadableContentHandlerBase : IDownloadableContentHandler -{ - /// - public virtual float Priority => 0; - - /// - public abstract bool GetSupportsContent(object content); - - /// - /// Returns a list of downloadables from the specified content. - /// - protected virtual IEnumerable>> GetDownloadablesAsync(DownloadableContext context) - { - return new[] { GetDownloadableAsync(context) }; - } - - /// - /// Returns a downloadable from the specified content. - /// - protected virtual Func> GetDownloadableAsync(DownloadableContext context) - { - return () => ValueTask.FromResult(GetDownloadable(context)); - } - - /// - /// Returns a downloadable from the specified content. - /// - /// This method is not implemented. The derived class must implement at least one of the GetDownloadable methods. - protected virtual Downloadable GetDownloadable(DownloadableContext context) - { - throw new NotImplementedException(); - } - - IEnumerable>> IDownloadableContentHandler.GetDownloadablesAsync(DownloadableContext context) - { - return GetDownloadablesAsync(context); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Abstractions/HttpCorrelationIdSelectorBase.cs b/src/http/Elsa.Http/Abstractions/HttpCorrelationIdSelectorBase.cs deleted file mode 100644 index 43b4b4dd..00000000 --- a/src/http/Elsa.Http/Abstractions/HttpCorrelationIdSelectorBase.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http.Abstractions; - -/// -/// Provides a base class for implementing . -/// -public abstract class HttpCorrelationIdSelectorBase : IHttpCorrelationIdSelector -{ - /// - public virtual double Priority => 0; - - /// - /// Override this method to return the correlation ID for the specified HTTP context, or null if no correlation ID could be found. - /// - protected virtual ValueTask GetCorrelationIdAsync(HttpContext httpContext, CancellationToken cancellationToken = default) - { - var correlationId = GetCorrelationId(httpContext); - return new(correlationId); - } - - /// - /// Override this method to return the correlation ID for the specified HTTP context, or null if no correlation ID could be found. - /// - protected virtual string? GetCorrelationId(HttpContext httpContext) => null; - - ValueTask IHttpCorrelationIdSelector.GetCorrelationIdAsync(HttpContext httpContext, CancellationToken cancellationToken) => GetCorrelationIdAsync(httpContext, cancellationToken); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Abstractions/HttpWorkflowInstanceIdSelectorBase.cs b/src/http/Elsa.Http/Abstractions/HttpWorkflowInstanceIdSelectorBase.cs deleted file mode 100644 index df489073..00000000 --- a/src/http/Elsa.Http/Abstractions/HttpWorkflowInstanceIdSelectorBase.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http.Abstractions; - -/// -/// Provides a base class for implementing . -/// -public abstract class HttpWorkflowInstanceIdSelectorBase : IHttpWorkflowInstanceIdSelector -{ - /// - public virtual double Priority => 0; - - /// - /// Override this method to return the workflow instance ID for the specified HTTP context, or null if no workflow instance ID could be found. - /// - protected virtual ValueTask GetWorkflowInstanceIdAsync(HttpContext httpContext, CancellationToken cancellationToken = default) - { - var workflowInstanceId = GetWorkflowInstanceId(httpContext); - return new(workflowInstanceId); - } - - /// - /// Override this method to return the workflow instance ID for the specified HTTP context, or null if no workflow instance ID could be found. - /// - protected virtual string? GetWorkflowInstanceId(HttpContext httpContext) => null; - - ValueTask IHttpWorkflowInstanceIdSelector.GetWorkflowInstanceIdAsync(HttpContext httpContext, CancellationToken cancellationToken) => GetWorkflowInstanceIdAsync(httpContext, cancellationToken); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Activities/DownloadHttpFile.cs b/src/http/Elsa.Http/Activities/DownloadHttpFile.cs deleted file mode 100644 index d355cf7c..00000000 --- a/src/http/Elsa.Http/Activities/DownloadHttpFile.cs +++ /dev/null @@ -1,290 +0,0 @@ -using System.Net.Http.Headers; -using System.Reflection; -using System.Runtime.CompilerServices; -using Elsa.Extensions; -using Elsa.Http.ContentWriters; -using Elsa.Http.UIHints; -using Elsa.Workflows; -using Elsa.Workflows.Attributes; -using Elsa.Workflows.UIHints; -using Elsa.Workflows.Models; -using Microsoft.Extensions.Logging; - -namespace Elsa.Http; - -/// -/// An activity that downloads a file from a given URL. -/// -[Activity("Elsa", "HTTP", "Downloads a file from a given URL.", DisplayName = "Download File", Kind = ActivityKind.Task)] -[Output(IsSerializable = false)] -public class DownloadHttpFile : Activity, IActivityPropertyDefaultValueProvider -{ - /// - public DownloadHttpFile([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line) - { - } - - /// - /// The URL to download the file from. - /// - [Input(DisplayName = "URL", Description = "The URL to download the file from.")] - public Input Url { get; set; } = default!; - - /// - /// The HTTP method to use when sending the request. - /// - [Input( - Description = "The HTTP method to use when sending the request.", - Options = new[] - { - "GET", "POST", "PUT" - }, - DefaultValue = "GET", - UIHint = InputUIHints.DropDown - )] - public Input Method { get; set; } = new("GET"); - - /// - /// A list of expected status codes to handle. - /// - [Input( - Description = "A list of expected status codes to handle.", - UIHint = InputUIHints.MultiText, - DefaultValueProvider = typeof(FlowSendHttpRequest) - )] - public Input> ExpectedStatusCodes { get; set; } = default!; - - /// - /// The content to send with the request. Can be a string, an object, a byte array or a stream. - /// - [Input(Name = "Content", Description = "The content to send with the request. Can be a string, an object, a byte array or a stream.")] - public Input RequestContent { get; set; } = default!; - - /// - /// The content type to use when sending the request. - /// - [Input( - DisplayName = "Content Type", - Description = "The content type to use when sending the request.", - UIHandler = typeof(HttpContentTypeOptionsProvider), - UIHint = InputUIHints.DropDown - )] - public Input RequestContentType { get; set; } = default!; - - /// - /// The Authorization header value to send with the request. - /// - /// Bearer {some-access-token} - [Input(Description = "The Authorization header value to send with the request. For example: Bearer {some-access-token}", Category = "Security")] - public Input Authorization { get; set; } = default!; - - /// - /// A value that allows to add the Authorization header without validation. - /// - [Input(Description = "A value that allows to add the Authorization header without validation.", Category = "Security")] - public Input DisableAuthorizationHeaderValidation { get; set; } = default!; - - /// - /// The headers to send along with the request. - /// - [Input( - Description = "The headers to send along with the request.", - UIHint = InputUIHints.JsonEditor, - Category = "Advanced" - )] - public Input RequestHeaders { get; set; } = new(new HttpHeaders()); - - /// - /// The HTTP response. - /// - [Output(IsSerializable = false)] - public Output Response { get; set; } = default!; - - /// - /// The HTTP response status code - /// - [Output(Description = "The HTTP response status code")] - public Output StatusCode { get; set; } = default!; - - /// - /// The downloaded content stream, if any. - /// - [Output(Description = "The downloaded content stream, if any.", IsSerializable = false)] - public Output ResponseContentStream { get; set; } = default!; - - /// - /// The downloaded content bytes, if any. - /// - [Output(Description = "The downloaded content bytes, if any.", IsSerializable = false)] - public Output ResponseContentBytes { get; set; } = default!; - - /// - /// The response headers that were received. - /// - [Output(Description = "The response headers that were received.")] - public Output ResponseHeaders { get; set; } = default!; - - /// - /// The response content headers that were received. - /// - [Output(DisplayName = "Content Headers", Description = "The response content headers that were received.")] - public Output ResponseContentHeaders { get; set; } = default!; - - /// - protected override async ValueTask ExecuteAsync(ActivityExecutionContext context) - { - await TrySendAsync(context); - } - - private async Task TrySendAsync(ActivityExecutionContext context) - { - var request = PrepareRequest(context); - var logger = (ILogger)context.GetRequiredService(typeof(ILogger<>).MakeGenericType(GetType())); - var httpClientFactory = context.GetRequiredService(); - var httpClient = httpClientFactory.CreateClient(nameof(SendHttpRequestBase)); - var cancellationToken = context.CancellationToken; - - try - { - var response = await httpClient.SendAsync(request, cancellationToken); - var file = await GetFileFromResponse(context, response, request); - var statusCode = (int)response.StatusCode; - var responseHeaders = new HttpHeaders(response.Headers); - var responseContentHeaders = new HttpHeaders(response.Content.Headers); - - context.Set(Response, response); - context.Set(ResponseContentStream, file?.Stream); - context.Set(Result, file); - context.Set(StatusCode, statusCode); - context.Set(ResponseHeaders, responseHeaders); - context.Set(ResponseContentHeaders, responseContentHeaders); - if (ResponseContentBytes.HasTarget(context)) context.Set(ResponseContentBytes, file?.GetBytes()); - - await HandleResponseAsync(context, response); - } - catch (HttpRequestException e) - { - logger.LogWarning(e, "An error occurred while sending an HTTP request"); - context.AddExecutionLogEntry("Error", e.Message, payload: new - { - StackTrace = e.StackTrace - }); - context.JournalData.Add("Error", e.Message); - await HandleRequestExceptionAsync(context, e); - } - catch (TaskCanceledException e) - { - logger.LogWarning(e, "An error occurred while sending an HTTP request"); - context.AddExecutionLogEntry("Error", e.Message, payload: new - { - StackTrace = e.StackTrace - }); - context.JournalData.Add("Cancelled", true); - await HandleTaskCanceledExceptionAsync(context, e); - } - } - - /// - /// Handles the response. - /// - private async Task HandleResponseAsync(ActivityExecutionContext context, HttpResponseMessage response) - { - var expectedStatusCodes = ExpectedStatusCodes.GetOrDefault(context) ?? new List(0); - var statusCode = (int)response.StatusCode; - var hasMatchingStatusCode = expectedStatusCodes.Contains(statusCode); - var outcome = expectedStatusCodes.Any() ? hasMatchingStatusCode ? statusCode.ToString() : "Unmatched status code" : default; - var outcomes = new List(); - - if (outcome != null) - outcomes.Add(outcome); - - outcomes.Add("Done"); - await context.CompleteActivityWithOutcomesAsync(outcomes.ToArray()); - } - - /// - /// Handles an exception that occurred while sending the request. - /// - private async Task HandleRequestExceptionAsync(ActivityExecutionContext context, HttpRequestException exception) - { - await context.CompleteActivityWithOutcomesAsync("Failed to connect"); - } - - /// - /// Handles that occurred while sending the request. - /// - private async Task HandleTaskCanceledExceptionAsync(ActivityExecutionContext context, TaskCanceledException exception) - { - await context.CompleteActivityWithOutcomesAsync("Timeout"); - } - - private async Task GetFileFromResponse(ActivityExecutionContext context, HttpResponseMessage httpResponse, HttpRequestMessage httpRequestMessage) - { - var httpContent = httpResponse.Content; - if (!HasContent(httpContent)) - return null; - - var cancellationToken = context.CancellationToken; - var contentStream = await httpContent.ReadAsStreamAsync(cancellationToken); - var responseHeaders = httpResponse.Headers; - var contentHeaders = httpContent.Headers; - var contentType = contentHeaders.ContentType?.MediaType!; - var filename = contentHeaders.ContentDisposition?.FileName ?? httpRequestMessage.RequestUri!.Segments.LastOrDefault() ?? "file.dat"; - var eTag = responseHeaders.ETag?.Tag; - - return new HttpFile(contentStream, filename, contentType, eTag); - } - - private static bool HasContent(HttpContent httpContent) => httpContent.Headers.ContentLength > 0; - - private HttpRequestMessage PrepareRequest(ActivityExecutionContext context) - { - var method = Method.GetOrDefault(context) ?? "GET"; - var url = Url.Get(context); - var request = new HttpRequestMessage(new HttpMethod(method), url); - var headers = context.GetHeaders(RequestHeaders); - var authorization = Authorization.GetOrDefault(context); - var addAuthorizationWithoutValidation = DisableAuthorizationHeaderValidation.GetOrDefault(context); - - if (!string.IsNullOrWhiteSpace(authorization)) - if (addAuthorizationWithoutValidation) - request.Headers.TryAddWithoutValidation("Authorization", authorization); - else - request.Headers.Authorization = AuthenticationHeaderValue.Parse(authorization); - - foreach (var header in headers) - request.Headers.Add(header.Key, header.Value.AsEnumerable()); - - var contentType = RequestContentType.GetOrDefault(context); - var content = RequestContent.GetOrDefault(context); - - if (contentType != null && content != null) - { - var factories = context.GetServices(); - var factory = SelectContentWriter(contentType, factories); - request.Content = factory.CreateHttpContent(content, contentType); - } - - return request; - } - - private IHttpContentFactory SelectContentWriter(string? contentType, IEnumerable factories) - { - if (string.IsNullOrWhiteSpace(contentType)) - return new JsonContentFactory(); - - var parsedContentType = new System.Net.Mime.ContentType(contentType); - return factories.FirstOrDefault(httpContentFactory => httpContentFactory.SupportedContentTypes.Any(c => c == parsedContentType.MediaType)) ?? new JsonContentFactory(); - } - - object IActivityPropertyDefaultValueProvider.GetDefaultValue(PropertyInfo property) - { - if (property.Name == nameof(ExpectedStatusCodes)) - return new List - { - 200 - }; - - return default!; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Activities/FlowSendHttpRequest.cs b/src/http/Elsa.Http/Activities/FlowSendHttpRequest.cs deleted file mode 100644 index 8994ef7c..00000000 --- a/src/http/Elsa.Http/Activities/FlowSendHttpRequest.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using Elsa.Extensions; -using Elsa.Workflows; -using Elsa.Workflows.Attributes; -using Elsa.Workflows.UIHints; -using Elsa.Workflows.Models; - -namespace Elsa.Http; - -/// -/// Send an HTTP request. -/// -[Activity("Elsa", "HTTP", "Send an HTTP request.", DisplayName = "HTTP Request (flow)", Kind = ActivityKind.Task)] -public class FlowSendHttpRequest : SendHttpRequestBase, IActivityPropertyDefaultValueProvider -{ - /// - public FlowSendHttpRequest([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line) - { - } - - /// - /// A list of expected status codes to handle. - /// - [Input( - Description = "A list of expected status codes to handle.", - UIHint = InputUIHints.MultiText, - DefaultValueProvider = typeof(FlowSendHttpRequest), - Order = 5.1f - )] - public Input> ExpectedStatusCodes { get; set; } = default!; - - /// - protected override async ValueTask HandleResponseAsync(ActivityExecutionContext context, HttpResponseMessage response) - { - var expectedStatusCodes = ExpectedStatusCodes.GetOrDefault(context) ?? new List(0); - var statusCode = (int)response.StatusCode; - var hasMatchingStatusCode = expectedStatusCodes.Contains(statusCode); - var outcome = expectedStatusCodes.Any() ? hasMatchingStatusCode ? statusCode.ToString() : "Unmatched status code" : default; - var outcomes = new List(); - - if (outcome != null) - outcomes.Add(outcome); - - outcomes.Add("Done"); - await context.CompleteActivityWithOutcomesAsync(outcomes.ToArray()); - } - - /// - protected override async ValueTask HandleRequestExceptionAsync(ActivityExecutionContext context, HttpRequestException exception) - { - await context.CompleteActivityWithOutcomesAsync("Failed to connect"); - } - - /// - protected override async ValueTask HandleTaskCanceledExceptionAsync(ActivityExecutionContext context, TaskCanceledException exception) - { - await context.CompleteActivityWithOutcomesAsync("Timeout"); - } - - object IActivityPropertyDefaultValueProvider.GetDefaultValue(PropertyInfo property) - { - if (property.Name == nameof(ExpectedStatusCodes)) - { - return new List { 200 }; - } - - return default!; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Activities/HttpEndpoint.cs b/src/http/Elsa.Http/Activities/HttpEndpoint.cs deleted file mode 100644 index b3ac4f6a..00000000 --- a/src/http/Elsa.Http/Activities/HttpEndpoint.cs +++ /dev/null @@ -1,500 +0,0 @@ -using System.Runtime.CompilerServices; -using System.Text.Json; -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Elsa.Http.Bookmarks; -using Elsa.Http.Extensions; -using Elsa.Http.UIHints; -using Elsa.Workflows; -using Elsa.Workflows.Attributes; -using Elsa.Workflows.UIHints; -using Elsa.Workflows.Models; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Routing; -using Microsoft.Extensions.DependencyInjection; - -namespace Elsa.Http; - -/// -/// Wait for an inbound HTTP request that matches the specified path and methods. -/// -[Activity("Elsa", "HTTP", "Wait for an inbound HTTP request that matches the specified path and methods.", DisplayName = "HTTP Endpoint")] -[Output(IsSerializable = false)] -public class HttpEndpoint : Trigger -{ - internal const string HttpContextInputKey = "HttpContext"; - internal const string PathInputKey = "Path"; - - /// - public HttpEndpoint([CallerFilePath] string? source = null, [CallerLineNumber] int? line = null) : base(source, line) - { - } - - /// - /// The path to associate with the workflow. - /// - [Input( - Description = "The path to associate with the workflow.", - UIHint = InputUIHints.SingleLine, - UIHandler = typeof(HttpEndpointPathUIHandler) - )] - public Input Path { get; set; } = null!; - - /// - /// The HTTP methods to accept. - /// - [Input( - Description = "The HTTP methods to accept.", - Options = new[] { "GET", "POST", "PUT", "HEAD", "DELETE" }, - UIHint = InputUIHints.CheckList)] - public Input> SupportedMethods { get; set; } = new(ObjectLiteral.From(new[] { HttpMethods.Get })); - - /// - /// Allow authenticated requests only. - /// - [Input(Description = "Allow authenticated requests only.", Category = "Security")] - public Input Authorize { get; set; } = new(false); - - /// - /// Provide a policy to evaluate. If the policy fails, the request is forbidden. - /// - [Input(Description = "Provide a policy to evaluate. If the policy fails, the request is forbidden.", Category = "Security")] - public Input Policy { get; set; } = new(default(string?)); - - /// - /// The maximum time allowed to process the request. - /// - [Input(Description = "The maximum time allowed to process the request.", Category = "Upload")] - public Input RequestTimeout { get; set; } = null!; - - /// - /// The maximum request size allowed in bytes. - /// - [Input(Description = "The maximum request size allowed in bytes.", Category = "Upload")] - public Input RequestSizeLimit { get; set; } = null!; - - /// - /// The maximum request size allowed in bytes. - /// - [Input(Description = "The maximum file size allowed in bytes for an individual file.", Category = "Upload")] - public Input FileSizeLimit { get; set; } = null!; - - /// - /// The allowed file extensions, - /// - [Input(Description = "Only file extensions in this list are allowed. Leave empty to allow all extensions", Category = "Upload", UIHint = InputUIHints.MultiText)] - public Input> AllowedFileExtensions { get; set; } = null!; - - /// - /// The allowed file extensions, - /// - [Input(Description = "File extensions in this list are forbidden. Leave empty to not block any extension.", Category = "Upload", UIHint = InputUIHints.MultiText)] - public Input> BlockedFileExtensions { get; set; } = null!; - - /// - /// The allowed file extensions, - /// - [Input(Description = "Only MIME types in this list are allowed. Leave empty to allow all types", Category = "Upload", UIHint = InputUIHints.MultiText)] - public Input> AllowedMimeTypes { get; set; } = null!; - - /// - /// A value indicating whether to expose the "Request too large" outcome. - /// - [Input(Description = "A value indicating whether to expose the \"Request too large\" outcome.", Category = "Outcomes")] - public bool ExposeRequestTooLargeOutcome { get; set; } - - /// - /// A value indicating whether to expose the "File too large" outcome. - /// - [Input(Description = "A value indicating whether to expose the \"File too large\" outcome.", Category = "Outcomes")] - public bool ExposeFileTooLargeOutcome { get; set; } - - /// - /// A value indicating whether to expose the "Invalid file extension" outcome. - /// - [Input(Description = "A value indicating whether to expose the \"Invalid file extension\" outcome.", Category = "Outcomes")] - public bool ExposeInvalidFileExtensionOutcome { get; set; } - - /// - /// A value indicating whether to expose the "Invalid file MIME type" outcome. - /// - [Input(Description = "A value indicating whether to expose the \"Invalid file MIME type\" outcome.", Category = "Outcomes")] - public bool ExposeInvalidFileMimeTypeOutcome { get; set; } - - /// - /// The parsed request content, if any. - /// - [Output(Description = "The parsed request content, if any.")] - public Output ParsedContent { get; set; } = null!; - - /// - /// The uploaded files, if any. - /// - [Output(Description = "The uploaded files, if any.", IsSerializable = false)] - public Output Files { get; set; } = null!; - - /// - /// The parsed route data, if any. - /// - [Output(Description = "The parsed route data, if any.")] - public Output> RouteData { get; set; } = null!; - - /// - /// The querystring data, if any. - /// - [Output(Description = "The querystring data, if any.")] - public Output> QueryStringData { get; set; } = null!; - - /// - /// The headers, if any. - /// - [Output(Description = "The headers, if any.")] - public Output> Headers { get; set; } = null!; - - /// - protected override IEnumerable GetTriggerPayloads(TriggerIndexingContext context) - { - context.TriggerName = HttpStimulusNames.HttpEndpoint; - return GetBookmarkPayloads(context.ExpressionExecutionContext); - } - - /// - protected override async ValueTask ExecuteAsync(ActivityExecutionContext context) - { - var path = Path.Get(context); - var methods = SupportedMethods.GetOrDefault(context) ?? new List { HttpMethods.Get }; - context.WaitForHttpRequest(path, methods, OnResumeAsync); - } - - private async ValueTask OnResumeAsync(ActivityExecutionContext context) - { - var httpContextAccessor = context.GetRequiredService(); - var httpContext = httpContextAccessor.HttpContext; - - if (httpContext == null) - { - // We're executing in a non-HTTP context (e.g. in a virtual actor). - // Create a bookmark to allow the invoker to export the state and resume execution from there. - context.CreateCrossBoundaryBookmark(); - return; - } - - await HandleRequestAsync(context); - } - - private async Task HandleRequestAsync(ActivityExecutionContext context) - { - var httpContextAccessor = context.GetRequiredService(); - var httpContext = httpContextAccessor.HttpContext!; - - // Provide the received HTTP request as output. - var request = httpContext.Request; - context.Set(Result, request); - - // Read route data, if any. - var path = context.GetWorkflowInput(PathInputKey); - var routeData = GetRouteData(httpContext, path); - var routeDictionary = routeData.Values.ToDictionary(route => route.Key, route => route.Value!); - var queryStringDictionary = httpContext.Request.Query.ToObjectDictionary(); - var headersDictionary = httpContext.Request.Headers.ToObjectDictionary(); - - context.Set(RouteData, routeDictionary); - context.Set(QueryStringData, queryStringDictionary); - context.Set(Headers, headersDictionary); - - // Validate request size. - if (!ValidateRequestSize(context, httpContext)) - { - await HandleRequestTooLargeAsync(context, httpContext); - return; - } - - // Handle Form Fields - if (request.HasFormContentType) - { - var formFields = request.Form.ToObjectDictionary(); - - ParsedContent.Set(context, formFields); - - // Read files, if any. - var files = ReadFilesAsync(context, request); - - if (files.Any()) - { - if (!ValidateFileSizes(context, httpContext, files)) - { - await HandleFileSizeTooLargeAsync(context, httpContext); - return; - } - - if (!ValidateFileExtensionWhitelist(context, httpContext, files)) - { - await HandleInvalidFileExtensionWhitelistAsync(context, httpContext); - return; - } - - if (!ValidateFileExtensionBlacklist(context, httpContext, files)) - { - await HandleInvalidFileExtensionBlacklistAsync(context, httpContext); - return; - } - - if (!ValidateFileMimeTypes(context, httpContext, files)) - { - await HandleInvalidFileMimeTypesAsync(context, httpContext); - return; - } - - Files.Set(context, files.ToArray()); - } - } - else - { - // Parse Non-Form content. - try - { - var content = await ParseContentAsync(context, request); - ParsedContent.Set(context, content); - } - catch (JsonException e) - { - await HandleInvalidJsonPayloadAsync(context, httpContext, e); - throw; - } - - } - - // Complete. - await context.CompleteActivityAsync(); - } - - private IFormFileCollection ReadFilesAsync(ActivityExecutionContext context, HttpRequest request) - { - return request.HasFormContentType ? request.Form.Files : new FormFileCollection(); - } - - private bool ValidateRequestSize(ActivityExecutionContext context, HttpContext httpContext) - { - var requestSizeLimit = RequestSizeLimit.GetOrDefault(context); - - if (!requestSizeLimit.HasValue) - return true; - - var requestSize = httpContext.Request.ContentLength ?? 0; - return requestSize <= requestSizeLimit; - } - - private async Task HandleRequestTooLargeAsync(ActivityExecutionContext context, HttpContext httpContext) - { - var exposeRequestTooLargeOutcome = ExposeRequestTooLargeOutcome; - - if (exposeRequestTooLargeOutcome) - { - await context.CompleteActivityWithOutcomesAsync("Request too large"); - } - else - { - var response = httpContext.Response; - response.StatusCode = StatusCodes.Status413PayloadTooLarge; - await response.WriteAsJsonAsync(new - { - Message = $"The maximum request size allowed is {RequestSizeLimit.Get(context)} bytes." - }); - await response.Body.FlushAsync(); - } - } - - private bool ValidateFileSizes(ActivityExecutionContext context, HttpContext httpContext, IFormFileCollection files) - { - var fileSizeLimit = FileSizeLimit.GetOrDefault(context); - - if (!fileSizeLimit.HasValue) - return true; - - if (!files.Any(file => file.Length > fileSizeLimit.Value)) - return true; - - return false; - } - - private async Task HandleFileSizeTooLargeAsync(ActivityExecutionContext context, HttpContext httpContext) - { - var exposeFileTooLargeOutcome = ExposeFileTooLargeOutcome; - - if (exposeFileTooLargeOutcome) - { - await context.CompleteActivityWithOutcomesAsync("File too large"); - } - else - { - var response = httpContext.Response; - response.StatusCode = StatusCodes.Status413PayloadTooLarge; - await response.WriteAsJsonAsync(new - { - Message = $"The maximum file size allowed is {FileSizeLimit.Get(context)} bytes." - }); - await response.Body.FlushAsync(); - } - } - - private bool ValidateFileExtensionWhitelist(ActivityExecutionContext context, HttpContext httpContext, IFormFileCollection files) - { - var allowedFileExtensions = AllowedFileExtensions.GetOrDefault(context); - - if (allowedFileExtensions == null || !allowedFileExtensions.Any()) - return true; - - if (files.All(file => allowedFileExtensions.Contains(System.IO.Path.GetExtension(file.FileName), StringComparer.OrdinalIgnoreCase))) - return true; - - return false; - } - - private async Task HandleInvalidFileExtensionWhitelistAsync(ActivityExecutionContext context, HttpContext httpContext) - { - if (ExposeInvalidFileExtensionOutcome) - { - await context.CompleteActivityWithOutcomesAsync("Invalid file extension"); - return; - } - - var response = httpContext.Response; - var allowedFileExtensions = AllowedFileExtensions.GetOrDefault(context)!; - response.StatusCode = StatusCodes.Status415UnsupportedMediaType; - await response.WriteAsJsonAsync(new - { - Message = $"Only the following file extensions are allowed: {string.Join(", ", allowedFileExtensions)}" - }); - await response.Body.FlushAsync(); - } - - private bool ValidateFileExtensionBlacklist(ActivityExecutionContext context, HttpContext httpContext, IFormFileCollection files) - { - var blockedFileExtensions = BlockedFileExtensions.GetOrDefault(context); - - if (blockedFileExtensions == null || !blockedFileExtensions.Any()) - return true; - - if (!files.Any(file => blockedFileExtensions.Contains(System.IO.Path.GetExtension(file.FileName), StringComparer.OrdinalIgnoreCase))) - return true; - - return false; - } - - private async Task HandleInvalidFileExtensionBlacklistAsync(ActivityExecutionContext context, HttpContext httpContext) - { - if (ExposeInvalidFileExtensionOutcome) - { - await context.CompleteActivityWithOutcomesAsync("Invalid file extension"); - return; - } - - var blockedFileExtensions = BlockedFileExtensions.GetOrDefault(context)!; - var response = httpContext.Response; - response.StatusCode = StatusCodes.Status415UnsupportedMediaType; - await response.WriteAsJsonAsync(new - { - Message = $"The following file extensions are not allowed: {string.Join(", ", blockedFileExtensions)}" - }); - await response.Body.FlushAsync(); - } - - private bool ValidateFileMimeTypes(ActivityExecutionContext context, HttpContext httpContext, IFormFileCollection files) - { - var allowedMimeTypes = AllowedMimeTypes.GetOrDefault(context); - - if (allowedMimeTypes == null || !allowedMimeTypes.Any()) - return true; - - if (files.All(file => allowedMimeTypes.Contains(file.ContentType, StringComparer.OrdinalIgnoreCase))) - return true; - - return false; - } - - private async Task HandleInvalidFileMimeTypesAsync(ActivityExecutionContext context, HttpContext httpContext) - { - if (ExposeInvalidFileMimeTypeOutcome) - { - await context.CompleteActivityWithOutcomesAsync("Invalid file MIME type"); - return; - } - - var allowedMimeTypes = AllowedMimeTypes.GetOrDefault(context)!; - var response = httpContext.Response; - response.StatusCode = StatusCodes.Status415UnsupportedMediaType; - await response.WriteAsJsonAsync(new - { - Message = $"Only the following MIME types are allowed: {string.Join(", ", allowedMimeTypes)}" - }); - await response.Body.FlushAsync(); - } - - private async Task HandleInvalidJsonPayloadAsync(ActivityExecutionContext context, HttpContext httpContext, JsonException exception) - { - var response = httpContext.Response; - response.StatusCode = StatusCodes.Status400BadRequest; - await response.WriteAsJsonAsync(new - { - exception.Message, - exception.Path, - exception.LineNumber, - }); - await response.Body.FlushAsync(); - } - - private async Task ParseContentAsync(ActivityExecutionContext context, HttpRequest httpRequest) - { - if (!HasContent(httpRequest)) - return null; - - var cancellationToken = context.CancellationToken; - var targetType = ParsedContent.GetTargetType(context); - var contentStream = httpRequest.Body; - var contentType = httpRequest.ContentType!; - var headers = httpRequest.Headers.ToDictionary(x => x.Key, x => x.Value.ToArray()); - - return await context.ParseContentAsync(contentStream, contentType, targetType, headers, cancellationToken); - } - - private static bool HasContent(HttpRequest httpRequest) => httpRequest.Headers.ContentLength > 0; - - private IEnumerable GetBookmarkPayloads(ExpressionExecutionContext context) - { - // Generate bookmark data for path and selected methods. - var normalizedRoute = context.Get(Path)!.NormalizeRoute(); - var methods = SupportedMethods.GetOrDefault(context) ?? new List { HttpMethods.Get }; - var authorize = Authorize.GetOrDefault(context); - var policy = Policy.GetOrDefault(context); - var requestTimeout = RequestTimeout.GetOrDefault(context); - var requestSizeLimit = RequestSizeLimit.GetOrDefault(context); - - return methods - .Select(x => new HttpEndpointBookmarkPayload(normalizedRoute, x.ToLowerInvariant(), authorize, policy, requestTimeout, requestSizeLimit)) - .Cast() - .ToArray(); - } - - private static RouteData GetRouteData(HttpContext httpContext, string path) - { - var routeData = httpContext.GetRouteData(); - var routeTable = httpContext.RequestServices.GetRequiredService(); - var routeMatcher = httpContext.RequestServices.GetRequiredService(); - - var matchingRouteQuery = - from route in routeTable - let routeValues = routeMatcher.Match(route.Route, path) - where routeValues != null - select new { route, routeValues }; - - var matchingRoute = matchingRouteQuery.FirstOrDefault(); - - if (matchingRoute == null) - return routeData; - - foreach (var (key, value) in matchingRoute.routeValues!) - routeData.Values[key] = value; - - return routeData; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Activities/HttpEndpointBase.cs b/src/http/Elsa.Http/Activities/HttpEndpointBase.cs deleted file mode 100644 index e3e3666f..00000000 --- a/src/http/Elsa.Http/Activities/HttpEndpointBase.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Elsa.Http.Extensions; -using Elsa.Workflows; -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http; - -public abstract class HttpEndpointBase : HttpEndpointBase; - -public abstract class HttpEndpointBase : Trigger -{ - protected abstract HttpEndpointOptions GetOptions(); - - protected virtual ValueTask OnHttpRequestReceivedAsync(ActivityExecutionContext activityExecutionContext, HttpContext httpContext) - { - OnHttpRequestReceived(activityExecutionContext, httpContext); - return default; - } - - protected virtual void OnHttpRequestReceived(ActivityExecutionContext activityExecutionContext, HttpContext httpContext) - { - } - - protected override void Execute(ActivityExecutionContext context) - { - var options = GetOptions(); - context.WaitForHttpRequest(options, HttpRequestReceivedAsync); - } - - protected override IEnumerable GetTriggerPayloads(TriggerIndexingContext context) - { - var options = GetOptions(); - context.TriggerName = HttpStimulusNames.HttpEndpoint; - return context.GetHttpEndpointStimuli(options); - } - - private async ValueTask HttpRequestReceivedAsync(ActivityExecutionContext context) - { - var httpContext = context.GetRequiredService().HttpContext!; - await OnHttpRequestReceivedAsync(context, httpContext); - await context.CompleteActivityAsync(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Activities/SendHttpRequest.cs b/src/http/Elsa.Http/Activities/SendHttpRequest.cs deleted file mode 100644 index 7b27571c..00000000 --- a/src/http/Elsa.Http/Activities/SendHttpRequest.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Runtime.CompilerServices; -using Elsa.Workflows; -using Elsa.Workflows.Attributes; - -namespace Elsa.Http; - -/// -/// Send an HTTP request. -/// -[Activity("Elsa", "HTTP", "Send an HTTP request.", DisplayName = "HTTP Request", Kind = ActivityKind.Task)] -public class SendHttpRequest : SendHttpRequestBase -{ - /// - public SendHttpRequest([CallerFilePath] string? source = null, [CallerLineNumber] int? line = null) : base(source, line) - { - } - - /// - /// A list of expected status codes to handle and the corresponding activity to execute when the status code matches. - /// - [Input( - Description = "A list of expected status codes to handle and the corresponding activity to execute when the status code matches.", - UIHint = "http-status-codes" - )] - public ICollection ExpectedStatusCodes { get; set; } = new List(); - - /// - /// The activity to execute when the HTTP status code does not match any of the expected status codes. - /// - [Port] - public IActivity? UnmatchedStatusCode { get; set; } - - /// - /// The activity to execute when the HTTP request fails to connect. - /// - public IActivity? FailedToConnect { get; set; } - - /// - /// The activity to execute when the HTTP request times out. - /// - public IActivity? Timeout { get; set; } - - /// - protected override async ValueTask HandleResponseAsync(ActivityExecutionContext context, HttpResponseMessage response) - { - var expectedStatusCodes = ExpectedStatusCodes; - var statusCode = (int)response.StatusCode; - var matchingCase = expectedStatusCodes.FirstOrDefault(x => x.StatusCode == statusCode); - var activity = matchingCase != null ? matchingCase.Activity : UnmatchedStatusCode; - - await context.ScheduleActivityAsync(activity, OnChildActivityCompletedAsync); - } - - /// - protected override async ValueTask HandleRequestExceptionAsync(ActivityExecutionContext context, HttpRequestException exception) - { - await context.ScheduleActivityAsync(FailedToConnect, OnChildActivityCompletedAsync); - } - - /// - protected override async ValueTask HandleTaskCanceledExceptionAsync(ActivityExecutionContext context, TaskCanceledException exception) - { - await context.ScheduleActivityAsync(Timeout, OnChildActivityCompletedAsync); - } - - private async ValueTask OnChildActivityCompletedAsync(ActivityCompletedContext context) - { - await context.TargetContext.CompleteActivityAsync(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Activities/SendHttpRequestBase.cs b/src/http/Elsa.Http/Activities/SendHttpRequestBase.cs deleted file mode 100644 index d922d196..00000000 --- a/src/http/Elsa.Http/Activities/SendHttpRequestBase.cs +++ /dev/null @@ -1,315 +0,0 @@ -using System.Net; -using System.Net.Http.Headers; -using Elsa.Extensions; -using Elsa.Http.ContentWriters; -using Elsa.Http.UIHints; -using Elsa.Resilience; -using Elsa.Workflows; -using Elsa.Workflows.Attributes; -using Elsa.Workflows.UIHints; -using Elsa.Workflows.Models; -using Microsoft.Extensions.Logging; -using Polly; - -namespace Elsa.Http; - -/// -/// Base class for activities that send HTTP requests. -/// -[Output(IsSerializable = false)] -[ResilienceCategory("HTTP")] -public abstract class SendHttpRequestBase(string? source = null, int? line = null) : Activity(source, line), IResilientActivity -{ - /// - /// The URL to send the request to. - /// - [Input(Order = 0)] public Input Url { get; set; } = null!; - - /// - /// The HTTP method to use when sending the request. - /// - [Input( - Description = "The HTTP method to use when sending the request.", - Options = new[] - { - "GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD" - }, - DefaultValue = "GET", - UIHint = InputUIHints.DropDown, - Order = 1 - )] - public Input Method { get; set; } = new("GET"); - - /// - /// The content to send with the request. Can be a string, an object, a byte array or a stream. - /// - [Input( - Description = "The content to send with the request. Can be a string, an object, a byte array or a stream.", - Order = 2 - )] - public Input Content { get; set; } = null!; - - /// - /// The content type to use when sending the request. - /// - [Input( - Description = "The content type to use when sending the request.", - UIHandler = typeof(HttpContentTypeOptionsProvider), - UIHint = InputUIHints.DropDown, - Order = 3 - )] - public Input ContentType { get; set; } = null!; - - /// - /// The Authorization header value to send with the request. - /// - /// Bearer {some-access-token} - [Input( - Description = "The Authorization header value to send with the request. For example: Bearer {some-access-token}", - Category = "Security", - CanContainSecrets = true, - Order = 4 - )] - public Input Authorization { get; set; } = null!; - - /// - /// A value that allows to add the Authorization header without validation. - /// - [Input( - Description = "A value that allows to add the Authorization header without validation.", - Category = "Security", - Order = 5 - )] - public Input DisableAuthorizationHeaderValidation { get; set; } = null!; - - /// - /// The headers to send along with the request. - /// - [Input( - Description = "The headers to send along with the request.", - UIHint = InputUIHints.JsonEditor, - Category = "Advanced", - Order = 6 - )] - public Input RequestHeaders { get; set; } = new(new HttpHeaders()); - - /// - /// Indicates whether resiliency mechanisms should be enabled for the HTTP request. - /// - [Obsolete("Use the common Resilience Strategy setting instead.")] - [Input(Description = "Obsolete. Use the common Resilience Strategy setting instead.")] - public Input EnableResiliency { get; set; } = null!; - - /// - /// The HTTP response status code - /// - [Output(Description = "The HTTP response status code")] - public Output StatusCode { get; set; } = null!; - - /// - /// The parsed content, if any. - /// - [Output(Description = "The parsed content, if any.")] - public Output ParsedContent { get; set; } = null!; - - /// - /// The response headers that were received. - /// - [Output(Description = "The response headers that were received.")] - public Output ResponseHeaders { get; set; } = null!; - - /// - protected override async ValueTask ExecuteAsync(ActivityExecutionContext context) - { - await TrySendAsync(context); - } - - /// - /// Handles the response. - /// - protected abstract ValueTask HandleResponseAsync(ActivityExecutionContext context, HttpResponseMessage response); - - /// - /// Handles an exception that occurred while sending the request. - /// - protected abstract ValueTask HandleRequestExceptionAsync(ActivityExecutionContext context, HttpRequestException exception); - - /// - /// Handles that occurred while sending the request. - /// - protected abstract ValueTask HandleTaskCanceledExceptionAsync(ActivityExecutionContext context, TaskCanceledException exception); - - private async Task TrySendAsync(ActivityExecutionContext context) - { - var logger = (ILogger)context.GetRequiredService(typeof(ILogger<>).MakeGenericType(GetType())); - var httpClientFactory = context.GetRequiredService(); - var httpClient = httpClientFactory.CreateClient(nameof(SendHttpRequestBase)); - var cancellationToken = context.CancellationToken; - var resiliencyEnabled = EnableResiliency.GetOrDefault(context, () => false); - - try - { - var response = await SendRequestAsync(context); - var parsedContent = await ParseContentAsync(context, response); - var statusCode = (int)response.StatusCode; - var responseHeaders = new HttpHeaders(response.Headers); - - context.Set(Result, response); - context.Set(ParsedContent, parsedContent); - context.Set(StatusCode, statusCode); - context.Set(ResponseHeaders, responseHeaders); - - await HandleResponseAsync(context, response); - } - catch (HttpRequestException e) - { - logger.LogWarning(e, "An error occurred while sending an HTTP request"); - context.AddExecutionLogEntry("Error", e.Message, payload: new - { - e.StackTrace - }); - context.JournalData.Add("Error", e.Message); - await HandleRequestExceptionAsync(context, e); - } - catch (TaskCanceledException e) - { - logger.LogWarning(e, "An error occurred while sending an HTTP request"); - context.AddExecutionLogEntry("Error", e.Message, payload: new - { - e.StackTrace - }); - context.JournalData.Add("Cancelled", true); - await HandleTaskCanceledExceptionAsync(context, e); - } - - return; - - async Task SendRequestAsync(ActivityExecutionContext activityExecutionContext) - { - // Keep this for backward compatibility. - if (resiliencyEnabled) - { - var pipeline = BuildResiliencyPipeline(context); - return await pipeline.ExecuteAsync(async ct => await SendRequestAsyncCore(ct), cancellationToken); - } - - var resilienceService = activityExecutionContext.GetRequiredService(); - return await resilienceService.InvokeAsync(this, activityExecutionContext, async () => await SendRequestAsyncCore(cancellationToken), cancellationToken); - } - - async Task SendRequestAsyncCore(CancellationToken ct = default) - { - var request = PrepareRequest(context); - return await httpClient.SendAsync(request, ct); - } - } - - private async Task ParseContentAsync(ActivityExecutionContext context, HttpResponseMessage httpResponse) - { - var httpContent = httpResponse.Content; - if (!HasContent(httpContent)) - return null; - - var cancellationToken = context.CancellationToken; - var targetType = ParsedContent.GetTargetType(context); - var contentStream = await httpContent.ReadAsStreamAsync(cancellationToken); - var responseHeaders = httpResponse.Headers; - var contentHeaders = httpContent.Headers; - var contentType = contentHeaders.ContentType?.MediaType ?? "application/octet-stream"; - - targetType ??= contentType switch - { - "application/json" => typeof(object), - _ => typeof(string) - }; - - var contentHeadersDictionary = contentHeaders.ToDictionary(x => x.Key, x => x.Value.Cast().ToArray(), StringComparer.OrdinalIgnoreCase); - var responseHeadersDictionary = responseHeaders.ToDictionary(x => x.Key, x => x.Value.Cast().ToArray(), StringComparer.OrdinalIgnoreCase); - var headersDictionary = contentHeadersDictionary.Concat(responseHeadersDictionary).ToDictionary(x => x.Key, x => x.Value, StringComparer.OrdinalIgnoreCase); - return await context.ParseContentAsync(contentStream, contentType, targetType, headersDictionary, cancellationToken); - } - - private static bool HasContent(HttpContent httpContent) => httpContent.Headers.ContentLength > 0; - - private HttpRequestMessage PrepareRequest(ActivityExecutionContext context) - { - var method = Method.GetOrDefault(context) ?? "GET"; - var url = Url.Get(context); - var request = new HttpRequestMessage(new HttpMethod(method), url); - var headers = context.GetHeaders(RequestHeaders); - var authorization = Authorization.GetOrDefault(context); - var addAuthorizationWithoutValidation = DisableAuthorizationHeaderValidation.GetOrDefault(context); - - if (!string.IsNullOrWhiteSpace(authorization)) - if (addAuthorizationWithoutValidation) - request.Headers.TryAddWithoutValidation("Authorization", authorization); - else - request.Headers.Authorization = AuthenticationHeaderValue.Parse(authorization); - - foreach (var header in headers) - request.Headers.Add(header.Key, header.Value.AsEnumerable()); - - var contentType = ContentType.GetOrDefault(context); - var content = Content.GetOrDefault(context); - - if (contentType != null && content != null) - { - var factories = context.GetServices(); - var factory = SelectContentWriter(contentType, factories); - request.Content = factory.CreateHttpContent(content, contentType); - } - - return request; - } - - private IHttpContentFactory SelectContentWriter(string? contentType, IEnumerable factories) - { - if (string.IsNullOrWhiteSpace(contentType)) - return new JsonContentFactory(); - - var parsedContentType = new System.Net.Mime.ContentType(contentType); - return factories.FirstOrDefault(httpContentFactory => httpContentFactory.SupportedContentTypes.Any(c => c == parsedContentType.MediaType)) ?? new JsonContentFactory(); - } - - private ResiliencePipeline BuildResiliencyPipeline(ActivityExecutionContext context) - { - // Docs: https://www.pollydocs.org/strategies/retry - var pipelineBuilder = new ResiliencePipelineBuilder() - .AddRetry(new() - { - ShouldHandle = new PredicateBuilder() - .Handle() // Specific timeout exception - .Handle() // Any HTTP exception - .HandleResult(response => IsTransientStatusCode(response.StatusCode)), - MaxRetryAttempts = 8, - UseJitter = false, // If enabled, adds a random value between -25% and +25% of the calculated Delay, except if BackoffType is Exponential, where a DecorrelatedJitterBackoffV2 formula is used for jitter calculation. That formula is based on Polly.Contrib.WaitAndRetry. - Delay = TimeSpan.FromSeconds(1), - BackoffType = DelayBackoffType.Exponential // Delay * 2^AttemptNumber, e.g. [ 2s, 4s, 8s, 16s ]. Total secs: 2 + 4 + 8 + 16 = 30 - // If BackoffType is Exponential, then the calculated Delay is multiplied by a random value between -25% and +25% of the calculated Delay, except if BackoffType is Exponential, where a DecorrelatedJitterBackoffV2 formula is used for jitter calculation. That formula is based on Polly.Contrib.WaitAndRetry. - }); - - return pipelineBuilder.Build(); - } - - // Helper method to identify transient status codes. - private static bool IsTransientStatusCode(HttpStatusCode? statusCode) - { - if (statusCode is null) - { - // No status code -> Assume network failure, worth retrying. - return true; - } - - return statusCode.Value switch - { - HttpStatusCode.RequestTimeout => true, // 408 - HttpStatusCode.TooManyRequests => true, // 429 (if no Retry-After header is respected) - HttpStatusCode.InternalServerError => true, // 500 - HttpStatusCode.BadGateway => true, // 502 - HttpStatusCode.ServiceUnavailable => true, // 503 - HttpStatusCode.GatewayTimeout => true, // 504 - HttpStatusCode.Conflict => true, // 409 - Can be transient in concurrency cases - _ => false // Other errors are not transient - }; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Activities/WriteFileHttpResponse.cs b/src/http/Elsa.Http/Activities/WriteFileHttpResponse.cs deleted file mode 100644 index 8f0ec255..00000000 --- a/src/http/Elsa.Http/Activities/WriteFileHttpResponse.cs +++ /dev/null @@ -1,308 +0,0 @@ -using System.Security.Cryptography; -using Elsa.Extensions; -using Elsa.Http.Exceptions; -using Elsa.Http.Options; -using Elsa.Http.Services; -using Elsa.Workflows; -using Elsa.Workflows.Attributes; -using Elsa.Workflows.Exceptions; -using Elsa.Workflows.Models; -using FluentStorage.Blobs; -using FluentStorage.Utils.Extensions; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Routing; -using Microsoft.AspNetCore.StaticFiles; -using Microsoft.Extensions.Logging; -using Microsoft.Net.Http.Headers; -using EntityTagHeaderValue = System.Net.Http.Headers.EntityTagHeaderValue; -using RangeHeaderValue = System.Net.Http.Headers.RangeHeaderValue; - -namespace Elsa.Http; - -/// -/// Sends a file to the HTTP response. -/// -[Activity("Elsa", "HTTP", "Send one ore more files (zipped) to the HTTP response.", DisplayName = "HTTP File Response")] -public class WriteFileHttpResponse : Activity -{ - /// - /// The MIME type of the file to serve. - /// - [Input(Description = "The content type of the file to serve. Leave empty to let the system determine the content type.")] - public Input ContentType { get; set; } = default!; - - /// - /// The name of the file to serve. - /// - [Input(Description = "The name of the file to serve. Leave empty to let the system determine the file name.")] - public Input Filename { get; set; } = default!; - - /// - /// The Entity Tag of the file to serve. - /// - [Input(Description = "The Entity Tag of the file to serve. Leave empty to let the system determine the Entity Tag.")] - public Input EntityTag { get; set; } = default!; - - /// - /// The file content to serve. Supports byte array, streams, string, Uri and an array of the aforementioned types. - /// - [Input(Description = "The file content to serve. Supports various types, such as byte array, stream, string, Uri, Downloadable and a (mixed) array of the aforementioned types.")] - public Input Content { get; set; } = default!; - - /// - /// Whether to enable resumable downloads. When enabled, the client can resume a download if the connection is lost. - /// - [Input(Description = "Whether to enable resumable downloads. When enabled, the client can resume a download if the connection is lost.")] - public Input EnableResumableDownloads { get; set; } = default!; - - /// - /// The correlation ID of the download. Used to resume a download. - /// - [Input(Description = "The correlation ID of the download used to resume a download. If left empty, the x-download-id header will be used.")] - public Input DownloadCorrelationId { get; set; } = default!; - - /// - protected override async ValueTask ExecuteAsync(ActivityExecutionContext context) - { - var httpContextAccessor = context.GetRequiredService(); - var httpContext = httpContextAccessor.HttpContext; - - if (httpContext == null) - { - // We're executing in a non-HTTP context (e.g. in a virtual actor). - // Create a bookmark to allow the invoker to export the state and resume execution from there. - - context.CreateBookmark(OnResumeAsync, BookmarkMetadata.HttpCrossBoundary); - return; - } - - await WriteResponseAsync(context, httpContext); - } - - private async Task WriteResponseAsync(ActivityExecutionContext context, HttpContext httpContext) - { - // Get content and content type. - var content = context.Get(Content); - - // Write content. - var downloadables = GetDownloadables(context, httpContext, content).ToList(); - await SendDownloadablesAsync(context, httpContext, downloadables); - - // Complete activity. - await context.CompleteActivityAsync(); - } - - private async Task SendDownloadablesAsync(ActivityExecutionContext context, HttpContext httpContext, IEnumerable>> downloadables) - { - var downloadableList = downloadables.ToList(); - - switch (downloadableList.Count) - { - case 0: - SendNoContent(context, httpContext); - return; - case 1: - { - var downloadable = downloadableList[0]; - await SendSingleFileAsync(context, httpContext, downloadable); - return; - } - default: - await SendMultipleFilesAsync(context, httpContext, downloadableList); - break; - } - } - - private void SendNoContent(ActivityExecutionContext context, HttpContext httpContext) - { - httpContext.Response.StatusCode = StatusCodes.Status204NoContent; - } - - private async Task SendSingleFileAsync(ActivityExecutionContext context, HttpContext httpContext, Func> downloadableFunc) - { - var contentType = ContentType.GetOrDefault(context); - var filename = Filename.GetOrDefault(context); - var eTag = EntityTag.GetOrDefault(context); - var downloadable = await downloadableFunc(); - filename = !string.IsNullOrWhiteSpace(filename) ? filename : !string.IsNullOrWhiteSpace(downloadable.Filename) ? downloadable.Filename : "file.bin"; - contentType = !string.IsNullOrWhiteSpace(contentType) ? contentType : !string.IsNullOrWhiteSpace(downloadable.ContentType) ? downloadable.ContentType : GetContentType(context, filename); - eTag = !string.IsNullOrWhiteSpace(eTag) ? eTag : !string.IsNullOrWhiteSpace(downloadable.ETag) ? downloadable.ETag : default; - - var eTagHeaderValue = !string.IsNullOrWhiteSpace(eTag) ? new EntityTagHeaderValue(eTag) : default; - var stream = downloadable.Stream; - await SendFileStream(context, httpContext, stream, contentType, filename, eTagHeaderValue); - } - - private async Task SendMultipleFilesAsync(ActivityExecutionContext context, HttpContext httpContext, ICollection>> downloadables) - { - // If resumable downloads are enabled, check to see if we have a cached file. - var (zipBlob, zipStream, cleanupCallback) = await TryLoadCachedFileAsync(context, httpContext) ?? await GenerateZipFileAsync(context, httpContext, downloadables); - - try - { - // Send the temporary file back to the client. - var contentType = zipBlob.Metadata["ContentType"]; - var downloadAsFilename = zipBlob.Metadata["Filename"]; - var hash = ComputeHash(zipStream); - var eTag = $"\"{hash}\""; - var eTagHeaderValue = new EntityTagHeaderValue(eTag); - await SendFileStream(context, httpContext, zipStream, contentType, downloadAsFilename, eTagHeaderValue); - - // TODO: Delete the cached file after the workflow completes. - } - catch (Exception e) - { - var logger = context.GetRequiredService>(); - logger.LogWarning(e, "Failed to send zip file to HTTP response"); - } - finally - { - // Delete any temporary files. - await cleanupCallback(); - } - } - - private string ComputeHash(Stream stream) - { - stream.Seek(0, SeekOrigin.Begin); - var bytes = stream.ToByteArray()!; - using var md5Hash = MD5.Create(); - var hash = md5Hash.ComputeHash(bytes); - stream.Seek(0, SeekOrigin.Begin); - return Convert.ToBase64String(hash); - } - - private async Task<(Blob, Stream, Func)> GenerateZipFileAsync(ActivityExecutionContext context, HttpContext httpContext, ICollection>> downloadables) - { - var cancellationToken = context.CancellationToken; - var downloadCorrelationId = GetDownloadCorrelationId(context, httpContext); - var contentType = ContentType.GetOrDefault(context); - var downloadAsFilename = Filename.GetOrDefault(context); - var zipService = context.GetRequiredService(); - var (zipBlob, zipStream, cleanup) = await zipService.CreateAsync(downloadables, true, downloadCorrelationId, downloadAsFilename, contentType, cancellationToken); - - return (zipBlob, zipStream, Cleanup); - - ValueTask Cleanup() - { - cleanup(); - return default; - } - } - - private async Task<(Blob, Stream, Func)?> TryLoadCachedFileAsync(ActivityExecutionContext context, HttpContext httpContext) - { - var downloadCorrelationId = GetDownloadCorrelationId(context, httpContext); - - if (string.IsNullOrWhiteSpace(downloadCorrelationId)) - return null; - - var cancellationToken = context.CancellationToken; - var zipService = context.GetRequiredService(); - var tuple = await zipService.LoadAsync(downloadCorrelationId, cancellationToken); - - if (tuple == null) - return null; - - return (tuple.Value.Item1, tuple.Value.Item2, Noop); - - ValueTask Noop() => default; - } - - private string GetDownloadCorrelationId(ActivityExecutionContext context, HttpContext httpContext) - { - var downloadCorrelationId = DownloadCorrelationId.GetOrDefault(context); - - if (string.IsNullOrWhiteSpace(downloadCorrelationId)) - downloadCorrelationId = httpContext.Request.Headers["x-download-id"]; - - if (string.IsNullOrWhiteSpace(downloadCorrelationId)) - { - var identity = context.WorkflowExecutionContext.Workflow.Identity; - var definitionId = identity.DefinitionId; - var version = identity.Version.ToString(); - var correlationId = context.WorkflowExecutionContext.CorrelationId; - var sources = new[] { definitionId, version, correlationId }.Where(x => !string.IsNullOrWhiteSpace(x)).ToArray(); - - downloadCorrelationId = string.Join("-", sources); - } - - return downloadCorrelationId; - } - - private async Task SendFileStream(ActivityExecutionContext context, HttpContext httpContext, Stream source, string contentType, string filename, EntityTagHeaderValue? eTag) - { - if(source.CanSeek) - source.Seek(0, SeekOrigin.Begin); - - var enableResumableDownloads = EnableResumableDownloads.GetOrDefault(context, () => false); - - var result = new FileStreamResult(source, contentType) - { - EnableRangeProcessing = enableResumableDownloads, - EntityTag = enableResumableDownloads ? eTag != null ? new Microsoft.Net.Http.Headers.EntityTagHeaderValue(eTag.ToString()) : default : default, - FileDownloadName = filename - }; - - var actionContext = new ActionContext(httpContext, httpContext.GetRouteData(), new ActionDescriptor()); - await result.ExecuteResultAsync(actionContext); - } - - private IEnumerable>> GetDownloadables(ActivityExecutionContext context, HttpContext httpContext, object? content) - { - if (content == null) - return Enumerable.Empty>>(); - - var manager = context.GetRequiredService(); - var headers = httpContext.Request.Headers; - var eTag = GetIfMatchHeaderValue(headers); - var range = GetRangeHeaderHeaderValue(headers); - var options = new DownloadableOptions { ETag = eTag, Range = range }; - return manager.GetDownloadablesAsync(content, options, context.CancellationToken); - } - - private string GetContentType(ActivityExecutionContext context, string filename) - { - var provider = context.GetRequiredService(); - return provider.TryGetContentType(filename, out var contentType) ? contentType : System.Net.Mime.MediaTypeNames.Application.Octet; - } - - private static RangeHeaderValue? GetRangeHeaderHeaderValue(IHeaderDictionary headers) - { - try - { - return headers.TryGetValue(HeaderNames.Range, out var header) ? RangeHeaderValue.Parse(header.ToString()) : default; - - } - catch (Exception e) - { - throw new HttpBadRequestException("Failed to parse Range header value", e); - } - } - - private static EntityTagHeaderValue? GetIfMatchHeaderValue(IHeaderDictionary headers) - { - try - { - return headers.TryGetValue(HeaderNames.IfMatch, out var header) ? new EntityTagHeaderValue(header.ToString()) : default; - - } - catch (Exception e) - { - throw new HttpBadRequestException("Failed to parse If-Match header value", e); - } - } - - private async ValueTask OnResumeAsync(ActivityExecutionContext context) - { - var httpContextAccessor = context.GetRequiredService(); - var httpContext = httpContextAccessor.HttpContext; - - if (httpContext == null) - throw new FaultException(HttpFaultCodes.NoHttpContext, HttpFaultCategories.Http, DefaultFaultTypes.System, "Cannot execute in a non-HTTP context"); - - await WriteResponseAsync(context, httpContext); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Activities/WriteHttpResponse.cs b/src/http/Elsa.Http/Activities/WriteHttpResponse.cs deleted file mode 100644 index 2f583a3d..00000000 --- a/src/http/Elsa.Http/Activities/WriteHttpResponse.cs +++ /dev/null @@ -1,152 +0,0 @@ -using System.Net; -using System.Runtime.CompilerServices; -using Elsa.Extensions; -using Elsa.Http.ContentWriters; -using Elsa.Http.UIHints; -using Elsa.Workflows; -using Elsa.Workflows.Attributes; -using Elsa.Workflows.UIHints; -using Elsa.Workflows.Exceptions; -using Elsa.Workflows.Models; -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Options; -using Elsa.Http.Options; - -namespace Elsa.Http; - -/// -/// Write a response to the current HTTP response object. -/// -[Activity("Elsa", "HTTP", "Write a response to the current HTTP response object.", DisplayName = "HTTP Response")] -public class WriteHttpResponse : Activity -{ - /// - public WriteHttpResponse([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line) - { - } - - /// - /// The status code to return. - /// - [Input( - DefaultValue = HttpStatusCode.OK, - Description = "The status code to return.", - UIHint = InputUIHints.DropDown - )] - public Input StatusCode { get; set; } = new(HttpStatusCode.OK); - - /// - /// The content to write back. - /// - [Input(Description = "The content to write back. String values will be sent as-is, while objects will be serialized to a JSON string. Byte arrays and streams will be sent as files.")] - public Input Content { get; set; } = default!; - - /// - /// The content type to use when returning the response. - /// - [Input( - Description = "The content type to write when sending the response.", - UIHandler = typeof(HttpContentTypeOptionsProvider), - UIHint = InputUIHints.DropDown - )] - public Input ContentType { get; set; } = default!; - - /// - /// The headers to return along with the response. - /// - [Input( - Description = "The headers to send along with the response.", - UIHint = InputUIHints.JsonEditor, - Category = "Advanced" - )] - public Input ResponseHeaders { get; set; } = new(new HttpHeaders()); - - /// - protected override async ValueTask ExecuteAsync(ActivityExecutionContext context) - { - var httpContextAccessor = context.GetRequiredService(); - var httpContext = httpContextAccessor.HttpContext; - - if (httpContext == null) - { - // We're executing in a non-HTTP context (e.g. in a virtual actor). - // Create a bookmark to allow the invoker to export the state and resume execution from there. - context.CreateBookmark(OnResumeAsync, BookmarkMetadata.HttpCrossBoundary); - return; - } - - await WriteResponseAsync(context, httpContext.Response); - } - - private async ValueTask OnResumeAsync(ActivityExecutionContext context) - { - var httpContextAccessor = context.GetRequiredService(); - var httpContext = httpContextAccessor.HttpContext; - - if (httpContext == null) - { - // We're not in an HTTP context, so let's fail. - throw new FaultException(HttpFaultCodes.NoHttpContext, HttpFaultCategories.Http, DefaultFaultTypes.System, "Cannot execute in a non-HTTP context"); - } - - await WriteResponseAsync(context, httpContext.Response); - } - - private async Task WriteResponseAsync(ActivityExecutionContext context, HttpResponse response) - { - // Set status code. - var statusCode = StatusCode.GetOrDefault(context, () => HttpStatusCode.OK); - response.StatusCode = (int)statusCode; - - // Add headers. - var headers = context.GetHeaders(ResponseHeaders); - foreach (var header in headers) - response.Headers.Add(header.Key, header.Value); - - // Get content and content type. - var content = context.Get(Content); - - if (content != null) - { - var contentType = ContentType.GetOrDefault(context); - - if (string.IsNullOrWhiteSpace(contentType)) - contentType = DetermineContentType(content); - - var factories = context.GetServices(); - var factory = factories.FirstOrDefault(httpContentFactory => httpContentFactory.SupportedContentTypes.Any(c => c == contentType)) ?? new TextContentFactory(); - var httpContent = factory.CreateHttpContent(content, contentType); - - // Set content type. - response.ContentType = httpContent.Headers.ContentType?.ToString() ?? contentType; - - // Write content. - if (statusCode != HttpStatusCode.NoContent) - { - try - { - await httpContent.CopyToAsync(response.Body); - } - catch (NotSupportedException) - { - // This can happen the Content property is a type that cannot be serialized or contains a type that cannot be serialized. - await response.WriteAsync("The response includes a type that cannot be serialized."); - } - } - } - - // Check if the configuration is set to flush immediatly the response to the caller. - var options = context.GetRequiredService>(); - if (options.Value.WriteHttpResponseSynchronously) - await response.CompleteAsync(); - - // Complete activity. - await context.CompleteActivityAsync(); - } - - private string DetermineContentType(object? content) => content is byte[] or Stream - ? "application/octet-stream" - : content is string - ? "text/plain" - : "application/json"; -} diff --git a/src/http/Elsa.Http/BookmarkMetadata.cs b/src/http/Elsa.Http/BookmarkMetadata.cs deleted file mode 100644 index 0a6987d6..00000000 --- a/src/http/Elsa.Http/BookmarkMetadata.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Elsa.Http; - -/// -/// Provides metadata for HTTP bookmarks. -/// -public static class BookmarkMetadata -{ - /// - /// The metadata key for cross-HTTP boundary activity execution. - /// - public const string HttpCrossBoundaryMetadataKey = "X-HttpCrossBoundary"; - - /// - /// Provides metadata for cross-HTTP boundary activity execution. - /// - public static readonly IDictionary HttpCrossBoundary = new Dictionary { [HttpCrossBoundaryMetadataKey] = "true" }; -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Bookmarks/HttpEndpointBookmarkPayload.cs b/src/http/Elsa.Http/Bookmarks/HttpEndpointBookmarkPayload.cs deleted file mode 100644 index c03c4e3a..00000000 --- a/src/http/Elsa.Http/Bookmarks/HttpEndpointBookmarkPayload.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.Text.Json.Serialization; -using Elsa.Workflows.Attributes; - -namespace Elsa.Http.Bookmarks; - -/// -/// A bookmark used by the activity. -/// -public record HttpEndpointBookmarkPayload -{ - private readonly string _path = default!; - private readonly string _method = default!; - - /// - /// Initializes a new instance of the class. - /// - [JsonConstructor] - public HttpEndpointBookmarkPayload() - { - } - - /// - /// Initializes a new instance of the class. - /// - public HttpEndpointBookmarkPayload(string path, string method, bool? authorize = default, string? policy = default, TimeSpan? requestTimeout = default, long? requestSizeLimit = default) - { - Path = path; - Method = method; - Authorize = authorize; - Policy = policy; - RequestTimeout = requestTimeout; - RequestSizeLimit = requestSizeLimit; - } - - /// - /// Gets or sets the path of the HTTP endpoint. - /// - public string Path - { - get => _path; - init => _path = value.ToLowerInvariant(); - } - - /// - /// Gets or sets the HTTP method of the endpoint. - /// - public string Method - { - get => _method; - init => _method = value.ToLowerInvariant(); - } - - /// - /// Gets or sets the policy to use for authorization. - /// - [ExcludeFromHash] public string? Policy { get; set; } - - /// - /// Gets or sets a value indicating whether the endpoint requires authorization. - /// - [ExcludeFromHash] public bool? Authorize { get; set; } - - /// - /// Gets or sets the request timeout. - /// - [ExcludeFromHash] public TimeSpan? RequestTimeout { get; set; } - - /// - /// Gets or sets the max request size in bytes. - /// - [ExcludeFromHash] public long? RequestSizeLimit { get; set; } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Constants/HttpFaultCategories.cs b/src/http/Elsa.Http/Constants/HttpFaultCategories.cs deleted file mode 100644 index ff3d0ce0..00000000 --- a/src/http/Elsa.Http/Constants/HttpFaultCategories.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Elsa.Http; - -public static class HttpFaultCategories -{ - public const string Http = "HTTP"; -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Constants/HttpFaultCodes.cs b/src/http/Elsa.Http/Constants/HttpFaultCodes.cs deleted file mode 100644 index b67d1f75..00000000 --- a/src/http/Elsa.Http/Constants/HttpFaultCodes.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Elsa.Http; - -public static class HttpFaultCodes -{ - public const string NoHttpContext = "NoHttpContext"; -} \ No newline at end of file diff --git a/src/http/Elsa.Http/ContentWriters/BinaryContentFactory.cs b/src/http/Elsa.Http/ContentWriters/BinaryContentFactory.cs deleted file mode 100644 index 084810db..00000000 --- a/src/http/Elsa.Http/ContentWriters/BinaryContentFactory.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Net.Mime; - -namespace Elsa.Http.ContentWriters; - -/// -/// Creates a object for application/octet-stream. -/// -public class BinaryContentFactory : IHttpContentFactory -{ - /// - public IEnumerable SupportedContentTypes => [MediaTypeNames.Application.Octet]; - - /// - public HttpContent CreateHttpContent(object content, string contentType) - { - return content switch - { - byte[] bytes => new ByteArrayContent(bytes), - Stream stream => new StreamContent(stream), - _ => throw new NotSupportedException($"Content of type {content.GetType()} is not supported.") - }; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/ContentWriters/FormUrlEncodedHttpContentFactory.cs b/src/http/Elsa.Http/ContentWriters/FormUrlEncodedHttpContentFactory.cs deleted file mode 100644 index 5536181e..00000000 --- a/src/http/Elsa.Http/ContentWriters/FormUrlEncodedHttpContentFactory.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Nodes; - -namespace Elsa.Http.ContentWriters; - -/// -/// A content writer that writes content in the application/x-www-form-urlencoded format. -/// -public class FormUrlEncodedHttpContentFactory : IHttpContentFactory -{ - /// - public IEnumerable SupportedContentTypes => ["application/x-www-form-urlencoded"]; - - /// - public HttpContent CreateHttpContent(object content, string? contentType = null) => new FormUrlEncodedContent(GetContentAsDictionary(content)); - - private static IDictionary GetContentAsDictionary(object content) - { - if (content is IDictionary dictionary) - return dictionary.ToDictionary(x => x.Key, x => x.Value.ToString() ?? string.Empty); - - if (content is string or JsonObject) - return JsonSerializer.Deserialize>(JsonSerializer.Serialize(content)); - - var jsonElement = JsonSerializer.SerializeToElement(content); - return jsonElement.EnumerateObject().ToDictionary(x => x.Name, x => x.Value.ToString()); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/ContentWriters/IHttpContentFactory.cs b/src/http/Elsa.Http/ContentWriters/IHttpContentFactory.cs deleted file mode 100644 index 0fe563f7..00000000 --- a/src/http/Elsa.Http/ContentWriters/IHttpContentFactory.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Elsa.Http.ContentWriters; - -/// -/// Creates a concrete instance based on the specified content type. -/// -public interface IHttpContentFactory -{ - /// - /// Returns a value indicating whether this factory supports the specified content type. - /// - IEnumerable SupportedContentTypes { get; } - - /// - /// Creates a concrete derivative based on the specified content type. - /// - HttpContent CreateHttpContent(object content, string contentType); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/ContentWriters/JsonContentFactory.cs b/src/http/Elsa.Http/ContentWriters/JsonContentFactory.cs deleted file mode 100644 index 2523b553..00000000 --- a/src/http/Elsa.Http/ContentWriters/JsonContentFactory.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Diagnostics.CodeAnalysis; -using System.Net.Mime; -using System.Text; -using System.Text.Json; - -namespace Elsa.Http.ContentWriters; - -/// -/// Creates a object for application/json. -/// -public class JsonContentFactory : IHttpContentFactory -{ - /// - public IEnumerable SupportedContentTypes => new[] { MediaTypeNames.Application.Json, "text/json" }; - - /// - [RequiresUnreferencedCode("The JsonSerializer type is not trim-compatible.")] - public HttpContent CreateHttpContent(object content, string contentType) - { - var text = content as string ?? JsonSerializer.Serialize(content); - - if (string.IsNullOrWhiteSpace(contentType)) - contentType = MediaTypeNames.Application.Json; - - return new StringContent(text, Encoding.UTF8, contentType); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/ContentWriters/TextContentFactory.cs b/src/http/Elsa.Http/ContentWriters/TextContentFactory.cs deleted file mode 100644 index d1c14167..00000000 --- a/src/http/Elsa.Http/ContentWriters/TextContentFactory.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Net.Mime; -using System.Text; - -namespace Elsa.Http.ContentWriters; - -/// -/// Creates a object for text/plain, text/richtext and text/html content types. -/// -public class TextContentFactory : IHttpContentFactory -{ - /// - public IEnumerable SupportedContentTypes => new[] - { - MediaTypeNames.Text.Plain, - MediaTypeNames.Text.RichText, - MediaTypeNames.Text.Html, - }; - - /// - public HttpContent CreateHttpContent(object content, string contentType) - { - var text = content as string ?? content.ToString(); - - if (string.IsNullOrWhiteSpace(contentType)) - contentType = MediaTypeNames.Text.Plain; - - return new StringContent(text!, Encoding.UTF8, contentType); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/ContentWriters/XmlContentFactory.cs b/src/http/Elsa.Http/ContentWriters/XmlContentFactory.cs deleted file mode 100644 index d45ebd61..00000000 --- a/src/http/Elsa.Http/ContentWriters/XmlContentFactory.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Net.Mime; -using System.Text; -using System.Xml.Serialization; - -namespace Elsa.Http.ContentWriters; - -/// -/// Creates a object for XML types. -/// -public class XmlContentFactory : IHttpContentFactory -{ - /// - public IEnumerable SupportedContentTypes => new[] - { - MediaTypeNames.Application.Xml, - MediaTypeNames.Text.Xml, - MediaTypeNames.Application.Soap, - }; - - /// - public HttpContent CreateHttpContent(object content, string contentType) - { - var text = content as string ?? Serialize(content); - return new StringContent(text, Encoding.UTF8, contentType); - } - - private string Serialize(object value) - { - using var writer = new StringWriter(); - new XmlSerializer(value.GetType()).Serialize(writer, value); - return writer.ToString(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contexts/DownloadableContext.cs b/src/http/Elsa.Http/Contexts/DownloadableContext.cs deleted file mode 100644 index cfe7b7c8..00000000 --- a/src/http/Elsa.Http/Contexts/DownloadableContext.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Elsa.Http.Options; - -namespace Elsa.Http.Contexts; - -/// -/// Provides context for downloadable providers. -/// -/// The manager. -/// The content to get downloadables from. -/// An optional ETag. -/// The cancellation token. -public record DownloadableContext( - IDownloadableManager Manager, - object Content, - DownloadableOptions Options, - CancellationToken CancellationToken); \ No newline at end of file diff --git a/src/http/Elsa.Http/Contexts/HttpEndpointRouteProviderContext.cs b/src/http/Elsa.Http/Contexts/HttpEndpointRouteProviderContext.cs deleted file mode 100644 index ffb5666d..00000000 --- a/src/http/Elsa.Http/Contexts/HttpEndpointRouteProviderContext.cs +++ /dev/null @@ -1,7 +0,0 @@ -using Elsa.Http.Bookmarks; -using JetBrains.Annotations; - -namespace Elsa.Http.Contexts; - -[UsedImplicitly] -public record HttpEndpointRouteProviderContext(HttpEndpointBookmarkPayload Payload, string? TenantId, CancellationToken CancellationToken); \ No newline at end of file diff --git a/src/http/Elsa.Http/Contexts/HttpResponseParserContext.cs b/src/http/Elsa.Http/Contexts/HttpResponseParserContext.cs deleted file mode 100644 index bd872f91..00000000 --- a/src/http/Elsa.Http/Contexts/HttpResponseParserContext.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Elsa.Http.Contexts; - -/// -/// Represents the context in which an HTTP response is being parsed. -/// -public record HttpResponseParserContext(Stream Content, string ContentType, Type? ReturnType, IDictionary Headers, CancellationToken CancellationToken); \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IAbsoluteUrlProvider.cs b/src/http/Elsa.Http/Contracts/IAbsoluteUrlProvider.cs deleted file mode 100644 index fdce26a9..00000000 --- a/src/http/Elsa.Http/Contracts/IAbsoluteUrlProvider.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Elsa.Http; - -/// -/// Provides a way to convert a relative URL to an absolute URL. -/// -public interface IAbsoluteUrlProvider -{ - /// - /// Converts a relative URL to an absolute URL. - /// - /// The relative URL. - /// The absolute URL. - Uri ToAbsoluteUrl(string relativePath); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IDownloadableContentHandler.cs b/src/http/Elsa.Http/Contracts/IDownloadableContentHandler.cs deleted file mode 100644 index 7044a3f0..00000000 --- a/src/http/Elsa.Http/Contracts/IDownloadableContentHandler.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Elsa.Http.Contexts; - -namespace Elsa.Http; - -/// -/// Provides downloadables from the specified content, if supported. -/// -public interface IDownloadableContentHandler -{ - /// - /// The priority of this provider. Providers with lower priority are tried first. - /// - float Priority { get; } - - /// - /// Returns true if this provider supports the specified content. - /// - /// The content to check. - bool GetSupportsContent(object content); - - /// - /// Returns a list of downloadables from the specified content. - /// - IEnumerable>> GetDownloadablesAsync(DownloadableContext context); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IDownloadableManager.cs b/src/http/Elsa.Http/Contracts/IDownloadableManager.cs deleted file mode 100644 index 9ff82416..00000000 --- a/src/http/Elsa.Http/Contracts/IDownloadableManager.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Elsa.Http.Options; - -namespace Elsa.Http; - -/// -/// Provides downloadables from the specified content, if supported. -/// -public interface IDownloadableManager -{ - /// - /// Returns a list of downloadables from the specified content. - /// - IEnumerable>> GetDownloadablesAsync(object content, DownloadableOptions? options = default, CancellationToken cancellationToken = default); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IFileCacheStorageProvider.cs b/src/http/Elsa.Http/Contracts/IFileCacheStorageProvider.cs deleted file mode 100644 index 20685203..00000000 --- a/src/http/Elsa.Http/Contracts/IFileCacheStorageProvider.cs +++ /dev/null @@ -1,15 +0,0 @@ -using FluentStorage.Blobs; - -namespace Elsa.Http; - -/// -/// Represents a provider of a file cache storage. -/// -public interface IFileCacheStorageProvider -{ - /// - /// Gets the storage. - /// - /// - IBlobStorage GetStorage(); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IFileDownloader.cs b/src/http/Elsa.Http/Contracts/IFileDownloader.cs deleted file mode 100644 index b6414814..00000000 --- a/src/http/Elsa.Http/Contracts/IFileDownloader.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Elsa.Http.Options; - -namespace Elsa.Http; - -/// -/// A general-purpose downloader of files from a given URL. -/// -public interface IFileDownloader -{ - /// - /// Downloads a file from the specified URL. - /// - Task DownloadAsync(Uri url, FileDownloadOptions? options = default, CancellationToken cancellationToken = default); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IHttpContentParser.cs b/src/http/Elsa.Http/Contracts/IHttpContentParser.cs deleted file mode 100644 index df3b067f..00000000 --- a/src/http/Elsa.Http/Contracts/IHttpContentParser.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Elsa.Http.Contexts; - -namespace Elsa.Http; - -/// -/// A strategy that reads a of a given content type. -/// -public interface IHttpContentParser -{ - /// - /// The priority of the parser as compared to other parsers. - /// The higher the number, the higher priority. - /// - int Priority { get; } - - /// - /// Returns a value indicating whether this reader supports the specified content type. - /// - bool GetSupportsContentType(HttpResponseParserContext context); - - /// - /// Reads the specified stream and returns a parsed object of the specified type. If no type is specified, a string is returned. - /// - Task ReadAsync(HttpResponseParserContext context); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IHttpCorrelationIdSelector.cs b/src/http/Elsa.Http/Contracts/IHttpCorrelationIdSelector.cs deleted file mode 100644 index 9ded5605..00000000 --- a/src/http/Elsa.Http/Contracts/IHttpCorrelationIdSelector.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http; - -/// -/// Provides a way to select the correlation ID for a request. -/// -public interface IHttpCorrelationIdSelector -{ - /// - /// The priority of this selector. The selector with the highest priority will be used. - /// - double Priority { get; } - - /// - /// Returns the correlation ID for the specified HTTP context, or null if no correlation ID could be found. - /// - ValueTask GetCorrelationIdAsync(HttpContext httpContext, CancellationToken cancellationToken = default); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IHttpEndpointAuthorizationHandler.cs b/src/http/Elsa.Http/Contracts/IHttpEndpointAuthorizationHandler.cs deleted file mode 100644 index c1ae2425..00000000 --- a/src/http/Elsa.Http/Contracts/IHttpEndpointAuthorizationHandler.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Elsa.Http; - -/// -/// A handler that is invoked when authorizing an inbound HTTP request. -/// -public interface IHttpEndpointAuthorizationHandler -{ - /// - /// Authorizes an inbound HTTP request. - /// - /// The context. - /// True if the request is authorized, otherwise false. - ValueTask AuthorizeAsync(AuthorizeHttpEndpointContext context); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IHttpEndpointBasePathProvider.cs b/src/http/Elsa.Http/Contracts/IHttpEndpointBasePathProvider.cs deleted file mode 100644 index 229e1fa9..00000000 --- a/src/http/Elsa.Http/Contracts/IHttpEndpointBasePathProvider.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Elsa.Http; - -public interface IHttpEndpointBasePathProvider -{ - string GetBasePath(); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IHttpEndpointFaultHandler.cs b/src/http/Elsa.Http/Contracts/IHttpEndpointFaultHandler.cs deleted file mode 100644 index 1bf3d72c..00000000 --- a/src/http/Elsa.Http/Contracts/IHttpEndpointFaultHandler.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Elsa.Http; - -/// -/// Implement this to control what to return to the client in case an unhandled exception occurs while executing the workflow. -/// -public interface IHttpEndpointFaultHandler -{ - ValueTask HandleAsync(HttpEndpointFaultContext context); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IHttpEndpointRoutesProvider.cs b/src/http/Elsa.Http/Contracts/IHttpEndpointRoutesProvider.cs deleted file mode 100644 index 733f4883..00000000 --- a/src/http/Elsa.Http/Contracts/IHttpEndpointRoutesProvider.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Elsa.Http.Contexts; - -namespace Elsa.Http; - -public interface IHttpEndpointRoutesProvider -{ - Task> GetRoutesAsync(HttpEndpointRouteProviderContext context); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IHttpWorkflowInstanceIdSelector.cs b/src/http/Elsa.Http/Contracts/IHttpWorkflowInstanceIdSelector.cs deleted file mode 100644 index 61bbad79..00000000 --- a/src/http/Elsa.Http/Contracts/IHttpWorkflowInstanceIdSelector.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http; - -/// -/// Provides a way to select the workflow instance ID for a request. -/// -public interface IHttpWorkflowInstanceIdSelector -{ - /// - /// The priority of this selector. The selector with the highest priority will be used. - /// - double Priority { get; } - - /// - /// Returns the workflow instance ID for the specified HTTP context, or null if no workflow instance ID could be found. - /// - ValueTask GetWorkflowInstanceIdAsync(HttpContext httpContext, CancellationToken cancellationToken = default); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IHttpWorkflowLookupService.cs b/src/http/Elsa.Http/Contracts/IHttpWorkflowLookupService.cs deleted file mode 100644 index 3ceec703..00000000 --- a/src/http/Elsa.Http/Contracts/IHttpWorkflowLookupService.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Elsa.Http; - -/// -/// Represents a service that looks up HTTP workflows and triggers. -/// -public interface IHttpWorkflowLookupService -{ - /// - /// Finds a workflow and trigger by bookmark hash. - /// - Task FindWorkflowAsync(string bookmarkHash, CancellationToken cancellationToken = default); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IHttpWorkflowsCacheManager.cs b/src/http/Elsa.Http/Contracts/IHttpWorkflowsCacheManager.cs deleted file mode 100644 index f3d7ea3a..00000000 --- a/src/http/Elsa.Http/Contracts/IHttpWorkflowsCacheManager.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Elsa.Caching; - -namespace Elsa.Http; - -/// -/// Represents a service that caches HTTP workflows and triggers. -/// -public interface IHttpWorkflowsCacheManager -{ - /// - /// Gets the cache manager. - /// - public ICacheManager Cache { get; } - - /// - /// Evicts a cached entry by its definition ID. - /// - Task EvictWorkflowAsync(string workflowDefinitionId, CancellationToken cancellationToken = default); - - /// - /// Evicts a cached entry by its bookmark hash. - /// - Task EvictTriggerAsync(string bookmarkHash, CancellationToken cancellationToken = default); - - /// - /// Gets the key for a workflow change token. - /// - string GetWorkflowChangeTokenKey(string workflowDefinitionId); - - /// - /// Gets the key for a trigger change token. - /// - string GetTriggerChangeTokenKey(string bookmarkHash); - - /// - /// Compute the bookmark hash for a given path and method combination. - /// - string ComputeBookmarkHash(string path, string method); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IRouteMatcher.cs b/src/http/Elsa.Http/Contracts/IRouteMatcher.cs deleted file mode 100644 index aea99300..00000000 --- a/src/http/Elsa.Http/Contracts/IRouteMatcher.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Microsoft.AspNetCore.Routing; - -namespace Elsa.Http; - -/// -/// Matches a given request path against the specified route template. -/// -public interface IRouteMatcher -{ - /// - /// Matches a given request path against the specified route template. - /// - RouteValueDictionary? Match(string routeTemplate, string route); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IRouteTable.cs b/src/http/Elsa.Http/Contracts/IRouteTable.cs deleted file mode 100644 index b82ce1c1..00000000 --- a/src/http/Elsa.Http/Contracts/IRouteTable.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace Elsa.Http; - -/// -/// Stores a list of all routes provided by activities. -/// -public interface IRouteTable : IEnumerable -{ - /// - /// Adds a route to the table. - /// - /// The route to add. - void Add(string route); - - /// - /// Adds a route to the table. - /// - /// The route to add. - void Add(HttpRouteData httpRouteData); - - /// - /// Removes a route from the table. - /// - /// The route to remove. - void Remove(string route); - - /// - /// Adds a range of routes to the table. - /// - /// The routes to add. - void AddRange(IEnumerable routes); - - /// - /// Removes a range of routes from the table. - /// - /// The routes to remove. - void RemoveRange(IEnumerable routes); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Contracts/IRouteTableUpdater.cs b/src/http/Elsa.Http/Contracts/IRouteTableUpdater.cs deleted file mode 100644 index fef7ad39..00000000 --- a/src/http/Elsa.Http/Contracts/IRouteTableUpdater.cs +++ /dev/null @@ -1,51 +0,0 @@ -using Elsa.Workflows; -using Elsa.Workflows.Models; -using Elsa.Workflows.Runtime.Entities; - -namespace Elsa.Http; - -/// -/// Updates the route table based on current workflow triggers and bookmarks. -/// -public interface IRouteTableUpdater -{ - /// - /// Updates the route table based on current workflow triggers and bookmarks. - /// - /// The cancellation token. - Task UpdateAsync(CancellationToken cancellationToken = default); - - /// - /// Adds routes to the route table based on the specified triggers. - /// - /// The triggers to create routes for. - /// The cancellation token. - Task AddRoutesAsync(IEnumerable triggers, CancellationToken cancellationToken = default); - - /// - /// Adds routes to the route table based on the specified bookmarks. - /// - /// The bookmarks to create routes for. - /// The cancellation token. - Task AddRoutesAsync(IEnumerable bookmarks, CancellationToken cancellationToken = default); - - /// - /// Adds routes to the route table based on the specified bookmarks. - /// - /// The bookmarks to create routes for. - /// The workflow execution context. - /// The cancellation token. - Task AddRoutesAsync(IEnumerable bookmarks, WorkflowExecutionContext workflowExecutionContext, CancellationToken cancellationToken = default); - - /// - /// Removes routes from the route table based on the specified triggers. - /// - /// The triggers to remove routes for. - void RemoveRoutes(IEnumerable triggers); - - /// - /// Removes routes from the route table based on the specified bookmarks. - /// - /// The bookmarks to remove routes for. - void RemoveRoutes(IEnumerable bookmarks); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/DownloadableContentHandlers/BinaryDownloadableContentHandler.cs b/src/http/Elsa.Http/DownloadableContentHandlers/BinaryDownloadableContentHandler.cs deleted file mode 100644 index ba9963e6..00000000 --- a/src/http/Elsa.Http/DownloadableContentHandlers/BinaryDownloadableContentHandler.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Elsa.Http.Abstractions; -using Elsa.Http.Contexts; - -namespace Elsa.Http.DownloadableContentHandlers; - -/// -/// Handles content that represents a downloadable binary file. -/// -public class BinaryDownloadableContentHandler : DownloadableContentHandlerBase -{ - /// - public override bool GetSupportsContent(object content) => content is byte[]; - - /// - protected override Downloadable GetDownloadable(DownloadableContext context) - { - var bytes = (byte[]) context.Content; - var stream = new MemoryStream(bytes); - var fileName = "file.bin"; - var contentType = "application/octet-stream"; - return new(stream, fileName, contentType); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/DownloadableContentHandlers/DownloadableDownloadableContentHandler.cs b/src/http/Elsa.Http/DownloadableContentHandlers/DownloadableDownloadableContentHandler.cs deleted file mode 100644 index ef62872a..00000000 --- a/src/http/Elsa.Http/DownloadableContentHandlers/DownloadableDownloadableContentHandler.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Elsa.Http.Abstractions; -using Elsa.Http.Contexts; - -namespace Elsa.Http.DownloadableContentHandlers; - -/// -/// Handles content that represents a downloadable. -/// -public class DownloadableDownloadableContentHandler : DownloadableContentHandlerBase -{ - /// - public override bool GetSupportsContent(object content) => content is Downloadable; - - /// - protected override Downloadable GetDownloadable(DownloadableContext context) - { - return (Downloadable) context.Content; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/DownloadableContentHandlers/FormFileDownloadableContentHandler.cs b/src/http/Elsa.Http/DownloadableContentHandlers/FormFileDownloadableContentHandler.cs deleted file mode 100644 index 04d87452..00000000 --- a/src/http/Elsa.Http/DownloadableContentHandlers/FormFileDownloadableContentHandler.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Elsa.Http.Abstractions; -using Elsa.Http.Contexts; -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http.DownloadableContentHandlers; - -/// -/// Handles content that represents a downloadable stream. -/// -public class FormFileDownloadableContentHandler : DownloadableContentHandlerBase -{ - /// - public override bool GetSupportsContent(object content) => content is IFormFile; - - /// - protected override Downloadable GetDownloadable(DownloadableContext context) - { - var file = (IFormFile)context.Content; - var stream = file.OpenReadStream(); - var fileName = Path.GetFileName(file.FileName); - var contentType = file.ContentType; - return new Downloadable(stream, fileName, contentType); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/DownloadableContentHandlers/HttpFileDownloadableContentHandler.cs b/src/http/Elsa.Http/DownloadableContentHandlers/HttpFileDownloadableContentHandler.cs deleted file mode 100644 index fd365bba..00000000 --- a/src/http/Elsa.Http/DownloadableContentHandlers/HttpFileDownloadableContentHandler.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Elsa.Http.Abstractions; -using Elsa.Http.Contexts; - -namespace Elsa.Http.DownloadableContentHandlers; - -/// -/// Handles content that represents a downloadable stream. -/// -public class HttpFileDownloadableContentHandler : DownloadableContentHandlerBase -{ - /// - public override bool GetSupportsContent(object content) => content is HttpFile; - - /// - protected override Downloadable GetDownloadable(DownloadableContext context) - { - var file = (HttpFile)context.Content; - var stream = file.Stream; - var fileName = file.Filename; - var contentType = file.ContentType; - return new Downloadable(stream, fileName, contentType); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/DownloadableContentHandlers/MultiDownloadableContentHandler.cs b/src/http/Elsa.Http/DownloadableContentHandlers/MultiDownloadableContentHandler.cs deleted file mode 100644 index 5ba23a4f..00000000 --- a/src/http/Elsa.Http/DownloadableContentHandlers/MultiDownloadableContentHandler.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections; -using Elsa.Http.Abstractions; -using Elsa.Http.Contexts; - -namespace Elsa.Http.DownloadableContentHandlers; - -/// -/// Handles content that represents a list of downloadable objects. -/// -public class MultiDownloadableContentHandler : DownloadableContentHandlerBase -{ - /// - public override bool GetSupportsContent(object content) => content is IEnumerable and not string and not byte[]; - - /// - protected override IEnumerable>> GetDownloadablesAsync(DownloadableContext context) - { - var collectedDownloadables = new List>>(); - var content = context.Content; - var enumerable = (IEnumerable) content; - var manager = context.Manager; - - foreach (var item in enumerable) - { - var downloadables = manager.GetDownloadablesAsync(item, context.Options, context.CancellationToken); - collectedDownloadables.AddRange(downloadables); - } - - return collectedDownloadables; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/DownloadableContentHandlers/StreamDownloadableContentHandler.cs b/src/http/Elsa.Http/DownloadableContentHandlers/StreamDownloadableContentHandler.cs deleted file mode 100644 index 14bab3d7..00000000 --- a/src/http/Elsa.Http/DownloadableContentHandlers/StreamDownloadableContentHandler.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Elsa.Http.Abstractions; -using Elsa.Http.Contexts; - -namespace Elsa.Http.DownloadableContentHandlers; - -/// -/// Handles content that represents a downloadable stream. -/// -public class StreamDownloadableContentHandler : DownloadableContentHandlerBase -{ - /// - public override bool GetSupportsContent(object content) => content is Stream; - - /// - protected override Downloadable GetDownloadable(DownloadableContext context) - { - var stream = (Stream) context.Content; - var fileName = "file.bin"; - var contentType = "application/octet-stream"; - return new Downloadable(stream, fileName, contentType); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/DownloadableContentHandlers/StringDownloadableContentHandler.cs b/src/http/Elsa.Http/DownloadableContentHandlers/StringDownloadableContentHandler.cs deleted file mode 100644 index 239988dd..00000000 --- a/src/http/Elsa.Http/DownloadableContentHandlers/StringDownloadableContentHandler.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Text; -using Elsa.Http.Abstractions; -using Elsa.Http.Contexts; - -namespace Elsa.Http.DownloadableContentHandlers; - -/// -/// Handles content that represents a downloadable string file. -/// -public class StringDownloadableContentHandler : DownloadableContentHandlerBase -{ - /// - public override bool GetSupportsContent(object content) => content is string; - - /// - protected override Downloadable GetDownloadable(DownloadableContext context) - { - var stream = new MemoryStream(Encoding.UTF8.GetBytes((string)context.Content)); - return new(stream, "file.txt", "text/plain"); - } -} diff --git a/src/http/Elsa.Http/DownloadableContentHandlers/UrlDownloadableContentHandler.cs b/src/http/Elsa.Http/DownloadableContentHandlers/UrlDownloadableContentHandler.cs deleted file mode 100644 index 1fbbc612..00000000 --- a/src/http/Elsa.Http/DownloadableContentHandlers/UrlDownloadableContentHandler.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Elsa.Http.Abstractions; -using Elsa.Http.Contexts; -using Elsa.Http.Options; -using Microsoft.AspNetCore.StaticFiles; - -namespace Elsa.Http.DownloadableContentHandlers; - -/// -/// Handles content that represents a downloadable URL. -/// -public class UrlDownloadableContentHandler : DownloadableContentHandlerBase -{ - private readonly IFileDownloader _fileDownloader; - private readonly IContentTypeProvider _contentTypeProvider; - - /// - public UrlDownloadableContentHandler(IFileDownloader fileDownloader, IContentTypeProvider contentTypeProvider) - { - _fileDownloader = fileDownloader; - _contentTypeProvider = contentTypeProvider; - } - - /// - public override bool GetSupportsContent(object content) => (content is string url && url.StartsWith("http", StringComparison.OrdinalIgnoreCase)) || content is Uri; - - /// - protected override Func> GetDownloadableAsync(DownloadableContext context) => async () => await DownloadAsync(context); - - private async ValueTask DownloadAsync(DownloadableContext context) - { - var url = context.Content is string s ? new Uri(s) : (Uri)context.Content; - var cancellationToken = context.CancellationToken; - var options = new FileDownloadOptions - { - // TODO: Uncomment the next two lines if we implement file caching for this handler. - // ETag = context.Options.ETag, - // Range = context.Options.Range - }; - var response = await _fileDownloader.DownloadAsync(url, options, cancellationToken); - var eTag = response.Headers.ETag?.Tag; - var filename = GetFilename(response) ?? url.Segments.Last(); - var contentType = response.Content.Headers.ContentType?.MediaType ?? GetContentType(filename); - var stream = await response.Content.ReadAsStreamAsync(cancellationToken); - - return new Downloadable(stream, filename, contentType, eTag); - } - - private static string? GetFilename(HttpResponseMessage response) - { - if (!response.Content.Headers.TryGetValues("Content-Disposition", out var values)) - return null; - - var contentDispositionString = string.Join("", values); - var contentDisposition = new System.Net.Mime.ContentDisposition(contentDispositionString); - return contentDisposition.FileName; - } - - private string GetContentType(string filename) - { - return _contentTypeProvider.TryGetContentType(filename, out var contentType) ? contentType : System.Net.Mime.MediaTypeNames.Application.Octet; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Elsa.Http.csproj b/src/http/Elsa.Http/Elsa.Http.csproj deleted file mode 100644 index 1ebfa1e2..00000000 --- a/src/http/Elsa.Http/Elsa.Http.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - - Provides HTTP activities to listen for and send out HTTP requests. - - elsa extension module http activities - - - - - - - - - - - - - - - - - - - - - diff --git a/src/http/Elsa.Http/Elsa.Http.csproj.DotSettings b/src/http/Elsa.Http/Elsa.Http.csproj.DotSettings deleted file mode 100644 index 96739afb..00000000 --- a/src/http/Elsa.Http/Elsa.Http.csproj.DotSettings +++ /dev/null @@ -1,7 +0,0 @@ - - True - True - True - True - True - True \ No newline at end of file diff --git a/src/http/Elsa.Http/Exceptions/HttpBadRequestException.cs b/src/http/Elsa.Http/Exceptions/HttpBadRequestException.cs deleted file mode 100644 index 1a2e152f..00000000 --- a/src/http/Elsa.Http/Exceptions/HttpBadRequestException.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Elsa.Http.Exceptions; - -/// -/// Exception thrown when a bad request is received. -/// -public class HttpBadRequestException : Exception -{ - /// - public HttpBadRequestException(string message, Exception exception) : base(message, exception) - { - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Extensions/ApplicationBuilderExtensions.cs b/src/http/Elsa.Http/Extensions/ApplicationBuilderExtensions.cs deleted file mode 100644 index 1d74eea7..00000000 --- a/src/http/Elsa.Http/Extensions/ApplicationBuilderExtensions.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Elsa.Http.Middleware; -using Microsoft.AspNetCore.Builder; - -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -/// -/// Adds extension methods to related to workflow middleware components. -/// -public static class ApplicationBuilderExtensions -{ - /// - /// Installs the component. - /// - public static IApplicationBuilder UseWorkflows(this IApplicationBuilder app) => app.UseMiddleware(); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Extensions/ExpressionExecutionContextExtensions.cs b/src/http/Elsa.Http/Extensions/ExpressionExecutionContextExtensions.cs deleted file mode 100644 index a4eac875..00000000 --- a/src/http/Elsa.Http/Extensions/ExpressionExecutionContextExtensions.cs +++ /dev/null @@ -1,73 +0,0 @@ -using Elsa.Expressions.Models; -using Elsa.Http; -using Elsa.Http.Options; -using Elsa.SasTokens.Contracts; -using Microsoft.Extensions.Options; - -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -/// -/// -/// -public static class ExpressionExecutionContextExtensions -{ - /// - /// Generates a URL that can be used to trigger an event. - /// - /// The expression execution context. - /// The name of the event to trigger. - /// The lifetime of the event trigger token. - /// A URL that can be used to trigger an event. - public static string GenerateEventTriggerUrl(this ExpressionExecutionContext context, string eventName, TimeSpan lifetime) - { - var token = context.GenerateEventTriggerTokenInternal(eventName, lifetime); - return context.GenerateEventTriggerUrlInternal(token); - } - - /// - /// Generates a URL that can be used to trigger an event. - /// - /// The expression execution context. - /// The name of the event to trigger. - /// The expiration date of the event trigger token. - /// A URL that can be used to trigger an event. - public static string GenerateEventTriggerUrl(this ExpressionExecutionContext context, string eventName, DateTimeOffset expiresAt) - { - var token = context.GenerateEventTriggerTokenInternal(eventName, expiresAt: expiresAt); - return context.GenerateEventTriggerUrlInternal(token); - } - - /// - /// Generates a URL that can be used to trigger an event. - /// - /// The expression execution context. - /// The name of the event to trigger. - /// A URL that can be used to trigger an event. - public static string GenerateEventTriggerUrl(this ExpressionExecutionContext context, string eventName) - { - var token = context.GenerateEventTriggerTokenInternal(eventName); - return context.GenerateEventTriggerUrlInternal(token); - } - - private static string GenerateEventTriggerUrlInternal(this ExpressionExecutionContext context, string token) - { - var options = context.GetRequiredService>().Value; - var url = $"{options.ApiRoutePrefix}/events/trigger?t={token}"; - var absoluteUrlProvider = context.GetRequiredService(); - return absoluteUrlProvider.ToAbsoluteUrl(url).ToString(); - } - - private static string GenerateEventTriggerTokenInternal(this ExpressionExecutionContext context, string eventName, TimeSpan? lifetime = default, DateTimeOffset? expiresAt = default) - { - var workflowInstanceId = context.GetWorkflowExecutionContext().Id; - var payload = new EventTokenPayload(eventName, workflowInstanceId); - var tokenService = context.GetRequiredService(); - - return lifetime != null - ? tokenService.CreateToken(payload, lifetime.Value) - : expiresAt != null - ? tokenService.CreateToken(payload, expiresAt.Value) - : tokenService.CreateToken(payload); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Extensions/HeadersExtensions.cs b/src/http/Elsa.Http/Extensions/HeadersExtensions.cs deleted file mode 100644 index 5c144c00..00000000 --- a/src/http/Elsa.Http/Extensions/HeadersExtensions.cs +++ /dev/null @@ -1,30 +0,0 @@ -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -/// -/// Provides extension methods for HTTP headers. -/// -public static class HeadersExtensions -{ - /// - /// Gets the filename from the Content-Disposition header. - /// - public static string? GetFilename(this HttpResponseMessage response) - { - var dictionary = response.Headers.ToDictionary(x => x.Key, x => x.Value.ToArray(), StringComparer.OrdinalIgnoreCase); - return dictionary.GetFilename(); - } - - /// - /// Gets the filename from the Content-Disposition header. - /// - public static string? GetFilename(this IDictionary headers) - { - if (!headers.TryGetValue("Content-Disposition", out var values)) - return null; - - var contentDispositionString = string.Join("", values); - var contentDisposition = new System.Net.Mime.ContentDisposition(contentDispositionString); - return contentDisposition.FileName; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Extensions/HttpActivityExecutionContextExtensions.cs b/src/http/Elsa.Http/Extensions/HttpActivityExecutionContextExtensions.cs deleted file mode 100644 index 3538ace1..00000000 --- a/src/http/Elsa.Http/Extensions/HttpActivityExecutionContextExtensions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Elsa.Http; -using Elsa.Http.Contexts; -using Elsa.Workflows; -using Elsa.Workflows.Models; - -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -internal static class HttpActivityExecutionContextExtensions -{ - public static async Task ParseContentAsync(this ActivityExecutionContext context, Stream content, string contentType, Type? returnType, Dictionary headers, CancellationToken cancellationToken) - { - var parsers = context.GetServices().OrderByDescending(x => x.Priority).ToList(); - var httpResponseParserContext = new HttpResponseParserContext(content, contentType, returnType, headers, cancellationToken); - var contentParser = parsers.FirstOrDefault(x => x.GetSupportsContentType(httpResponseParserContext)); - - if (contentParser == null) - return null; - - return await contentParser.ReadAsync(httpResponseParserContext); - } - - public static IEnumerable> GetHeaders(this ActivityExecutionContext context, Input input) - { - var value = context.Get(input.MemoryBlockReference()); - - return value switch - { - IDictionary dictionary1 => dictionary1, - IDictionary dictionary2 => dictionary2.ToDictionary(x => x.Key, x => new[] { x.Value }), - IDictionary dictionary3 => dictionary3.ToDictionary(pair => pair.Key, pair => pair.Value is ICollection collection ? collection.Select(x => x.ToString()!).ToArray() : new[] { pair.Value.ToString()! }), - _ => Array.Empty>() - }; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Extensions/HttpContextTenantExtensions.cs b/src/http/Elsa.Http/Extensions/HttpContextTenantExtensions.cs deleted file mode 100644 index 62c42530..00000000 --- a/src/http/Elsa.Http/Extensions/HttpContextTenantExtensions.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http.Extensions; - -/// -/// Provides extension methods for the class. -/// -public static class HttpContextTenantExtensions -{ - /// - /// Sets the tenant ID for the current HTTP context. - /// - public static void SetTenantId(this HttpContext httpContext, string? tenantId) - { - httpContext.Items["TenantId"] = tenantId; - } - - /// - /// Gets the tenant ID for the current HTTP context. - /// - public static string? GetTenantId(this HttpContext httpContext) - { - return httpContext.Items.TryGetValue("TenantId", out var tenantId) ? tenantId as string : null; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Extensions/HttpEndpointActivityExecutionContextExtensions.cs b/src/http/Elsa.Http/Extensions/HttpEndpointActivityExecutionContextExtensions.cs deleted file mode 100644 index 67bc08d5..00000000 --- a/src/http/Elsa.Http/Extensions/HttpEndpointActivityExecutionContextExtensions.cs +++ /dev/null @@ -1,94 +0,0 @@ -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Elsa.Http.Bookmarks; -using Elsa.Workflows; -using Elsa.Workflows.Models; -using Microsoft.AspNetCore.Routing.Patterns; - -namespace Elsa.Http.Extensions; - -public static class HttpEndpointActivityExecutionContextExtensions -{ - public static void WaitForHttpRequest(this ActivityExecutionContext context, string path, string method, ExecuteActivityDelegate? callback = null) - { - var options = new HttpEndpointOptions - { - Path = path, - Methods = [method] - }; - WaitForHttpRequest(context, options, callback); - } - - public static void WaitForHttpRequest(this ActivityExecutionContext context, string path, IEnumerable methods, ExecuteActivityDelegate? callback = null) - { - var options = new HttpEndpointOptions - { - Path = path, - Methods = methods.ToList() - }; - WaitForHttpRequest(context, options, callback); - } - - public static void WaitForHttpRequest(this ActivityExecutionContext context, HttpEndpointOptions options, ExecuteActivityDelegate? callback = null) - { - var path = options.Path; - if (path.Contains("//")) - throw new RoutePatternException(path, "Path cannot contain double slashes (//)"); - - var expressionExecutionContext = context.ExpressionExecutionContext; - if (!context.IsTriggerOfWorkflow()) - { - context.CreateBookmarks(expressionExecutionContext.GetHttpEndpointStimuli(options), includeActivityInstanceId: false, callback: callback); - return; - } - - callback?.Invoke(context); - } - - public static IEnumerable GetHttpEndpointStimuli(this TriggerIndexingContext context, string path, string method) - { - return context.GetHttpEndpointStimuli(path, [method]); - } - - public static IEnumerable GetHttpEndpointStimuli(this TriggerIndexingContext context, string path, IEnumerable methods) - { - var options = new HttpEndpointOptions - { - Path = path, - Methods = methods.ToList() - }; - - return context.GetHttpEndpointStimuli(options); - } - - public static IEnumerable GetHttpEndpointStimuli(this TriggerIndexingContext context, HttpEndpointOptions options) - { - return context.ExpressionExecutionContext.GetHttpEndpointStimuli(options); - } - - public static IEnumerable GetHttpEndpointStimuli(this ExpressionExecutionContext context, HttpEndpointOptions options) - { - // Generate bookmark data for path and selected methods. - var normalizedRoute = options.Path.NormalizeRoute(); - var authorize = options.Authorize; - var policy = options.Policy; - var requestTimeout = options.RequestTimeout; - var requestSizeLimit = options.RequestSizeLimit; - - return options.Methods - .Select(x => new HttpEndpointBookmarkPayload(normalizedRoute, x.ToLowerInvariant(), authorize, policy, requestTimeout, requestSizeLimit)) - .Cast() - .ToArray(); - } - - internal static void CreateCrossBoundaryBookmark(this ActivityExecutionContext context, ExecuteActivityDelegate? callback = null) - { - var bookmarkOptions = new CreateBookmarkArgs - { - BookmarkName = HttpStimulusNames.HttpEndpoint, - Callback = callback, - Metadata = BookmarkMetadata.HttpCrossBoundary, - }; - context.CreateBookmark(bookmarkOptions); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Extensions/ModuleExtensions.cs b/src/http/Elsa.Http/Extensions/ModuleExtensions.cs deleted file mode 100644 index 7898a489..00000000 --- a/src/http/Elsa.Http/Extensions/ModuleExtensions.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Elsa.Features.Services; -using Elsa.Http.Features; - -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -/// -/// Provides extensions to install the feature. -/// -public static class ModuleExtensions -{ - /// - /// Install the feature. - /// - public static IModule UseHttp(this IModule module, Action? configure = default) - { - module.Configure(configure); - return module; - } - - /// - /// Install the feature to speed up HTTP workflows. Like, a lot. - /// - public static HttpFeature UseCache(this HttpFeature feature, Action? configure = default) - { - feature.Module.Configure(configure); - return feature; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Extensions/RouteExtensions.cs b/src/http/Elsa.Http/Extensions/RouteExtensions.cs deleted file mode 100644 index 79a9d022..00000000 --- a/src/http/Elsa.Http/Extensions/RouteExtensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -// ReSharper disable once CheckNamespace - -namespace Elsa.Extensions; - -/// -/// Provides extension methods for strings that represent a route. -/// -public static class RouteExtensions -{ - /// - /// Normalizes a route by ensuring a leading slash, removing any trailing slash. - /// - public static string NormalizeRoute(this string path) => $"/{path.Trim('/')}"; -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Extensions/ServiceCollectionExtensions.cs b/src/http/Elsa.Http/Extensions/ServiceCollectionExtensions.cs deleted file mode 100644 index 30008053..00000000 --- a/src/http/Elsa.Http/Extensions/ServiceCollectionExtensions.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Elsa.Http; -using JetBrains.Annotations; -using Microsoft.Extensions.DependencyInjection; - -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -/// -/// Contains extension methods for the interface. -/// -[PublicAPI] -public static class ServiceCollectionExtensions -{ - /// - /// Adds a implementation to the service collection. - /// - public static IServiceCollection AddHttpCorrelationIdSelector(this IServiceCollection services) where T : class, IHttpCorrelationIdSelector - { - services.AddScoped(); - return services; - } - - /// - /// Adds a implementation to the service collection. - /// - public static IServiceCollection AddHttpCorrelationIdSelector(this IServiceCollection services, Func factory) - { - services.AddScoped(factory); - return services; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Extensions/StringArrayExtensions.cs b/src/http/Elsa.Http/Extensions/StringArrayExtensions.cs deleted file mode 100644 index fa02c9e4..00000000 --- a/src/http/Elsa.Http/Extensions/StringArrayExtensions.cs +++ /dev/null @@ -1,11 +0,0 @@ -// ReSharper disable once CheckNamespace - -namespace Elsa.Extensions; - -public static class StringArrayExtensions -{ - public static string JoinSegments(this IEnumerable segments, string separator = "/") - { - return string.Join(separator, segments.Where(x => !string.IsNullOrWhiteSpace(x)).Select(x => x!.Trim('/'))); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Extensions/StringValueExtensions.cs b/src/http/Elsa.Http/Extensions/StringValueExtensions.cs deleted file mode 100644 index fce9af49..00000000 --- a/src/http/Elsa.Http/Extensions/StringValueExtensions.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.Extensions.Primitives; - -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -/// -/// Contains extension methods for the Enumerable dictonaries. -/// -public static class StringValueExtensions -{ - /// - /// Convert the collection to the desired dictionary type. - /// - /// - /// - public static Dictionary ToObjectDictionary(this IEnumerable> collection) - { - return collection.ToDictionary, string, object>( - item => item.Key, - item => item.Value.Count <= 1 ? - item.Value[0]! - : item.Value.ToArray()); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Features/HttpCacheFeature.cs b/src/http/Elsa.Http/Features/HttpCacheFeature.cs deleted file mode 100644 index 4dbc59ba..00000000 --- a/src/http/Elsa.Http/Features/HttpCacheFeature.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Elsa.Features.Abstractions; -using Elsa.Features.Attributes; -using Elsa.Features.Services; -using Elsa.Http.Handlers; -using Elsa.Http.Services; -using Elsa.Workflows.Management.Features; -using Microsoft.Extensions.DependencyInjection; - -namespace Elsa.Http.Features; - -/// -/// Installs services related to HTTP caching. -/// -[DependsOn(typeof(HttpFeature))] -[DependsOn(typeof(CachingWorkflowDefinitionsFeature))] -public class HttpCacheFeature : FeatureBase -{ - /// - public HttpCacheFeature(IModule module) : base(module) - { - } - - /// - public override void Apply() - { - Services - .AddSingleton() - .Decorate() - .AddNotificationHandler(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Features/HttpFeature.cs b/src/http/Elsa.Http/Features/HttpFeature.cs deleted file mode 100644 index 80e0e512..00000000 --- a/src/http/Elsa.Http/Features/HttpFeature.cs +++ /dev/null @@ -1,256 +0,0 @@ -using Elsa.Expressions.Options; -using Elsa.Extensions; -using Elsa.Features.Abstractions; -using Elsa.Features.Attributes; -using Elsa.Features.Services; -using Elsa.Http.ContentWriters; -using Elsa.Http.DownloadableContentHandlers; -using Elsa.Http.FileCaches; -using Elsa.Http.Handlers; -using Elsa.Http.Options; -using Elsa.Http.Parsers; -using Elsa.Http.PortResolvers; -using Elsa.Http.Resilience; -using Elsa.Http.Selectors; -using Elsa.Http.Services; -using Elsa.Http.Tasks; -using Elsa.Http.UIHints; -using Elsa.Resilience.Extensions; -using Elsa.Resilience.Features; -using Elsa.Workflows; -using FluentStorage; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.StaticFiles; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.DependencyInjection.Extensions; -using Microsoft.Extensions.Options; - -namespace Elsa.Http.Features; - -/// -/// Installs services related to HTTP services and activities. -/// -[DependsOn(typeof(HttpJavaScriptFeature))] -[DependsOn(typeof(ResilienceFeature))] -public class HttpFeature(IModule module) : FeatureBase(module) -{ - private Func _httpEndpointRouteProvider = sp => sp.GetRequiredService(); - private Func _httpEndpointBasePathProvider = sp => sp.GetRequiredService(); - - /// - /// A delegate to configure . - /// - public Action? ConfigureHttpOptions { get; set; } - - /// - /// A delegate to configure . - /// - public Action? ConfigureHttpFileCacheOptions { get; set; } - - /// - /// A delegate that is invoked when authorizing an inbound HTTP request. - /// - public Func HttpEndpointAuthorizationHandler { get; set; } = sp => sp.GetRequiredService(); - - /// - /// A delegate that is invoked when an HTTP workflow faults. - /// - public Func HttpEndpointWorkflowFaultHandler { get; set; } = sp => sp.GetRequiredService(); - - /// - /// A delegate to configure the . - /// - public Func ContentTypeProvider { get; set; } = _ => new FileExtensionContentTypeProvider(); - - /// - /// A delegate to configure the . - /// - public Func FileCache { get; set; } = sp => - { - var options = sp.GetRequiredService>().Value; - var blobStorage = StorageFactory.Blobs.DirectoryFiles(options.LocalCacheDirectory); - return new BlobFileCacheStorageProvider(blobStorage); - }; - - /// - /// A delegate to configure the used when by the activity. - /// - public Action HttpClient { get; set; } = (_, _) => { }; - - /// - /// A delegate to configure the for . - /// - public Action HttpClientBuilder { get; set; } = _ => { }; - - /// - /// A list of types to register with the service collection. - /// - public ICollection HttpCorrelationIdSelectorTypes { get; } = new List - { - typeof(HeaderHttpCorrelationIdSelector), - typeof(QueryStringHttpCorrelationIdSelector) - }; - - /// - /// A list of types to register with the service collection. - /// - public ICollection HttpWorkflowInstanceIdSelectorTypes { get; } = new List - { - typeof(HeaderHttpWorkflowInstanceIdSelector), - typeof(QueryStringHttpWorkflowInstanceIdSelector) - }; - - public HttpFeature WithHttpEndpointRoutesProvider() where T : IHttpEndpointRoutesProvider - { - return WithHttpEndpointRoutesProvider(sp => sp.GetRequiredService()); - } - - public HttpFeature WithHttpEndpointRoutesProvider(Func httpEndpointRouteProvider) - { - _httpEndpointRouteProvider = httpEndpointRouteProvider; - return this; - } - - public HttpFeature WithHttpEndpointBasePathProvider() where T : class, IHttpEndpointBasePathProvider - { - Services.TryAddScoped(); - return WithHttpEndpointBasePathProvider(sp => sp.GetRequiredService()); - } - - public HttpFeature WithHttpEndpointBasePathProvider(Func httpEndpointBasePathProvider) - { - _httpEndpointBasePathProvider = httpEndpointBasePathProvider; - return this; - } - - /// - public override void Configure() - { - Module.UseWorkflowManagement(management => - { - management.AddVariableTypes([ - typeof(HttpRouteData), - typeof(HttpRequest), - typeof(HttpResponse), - typeof(HttpResponseMessage), - typeof(HttpHeaders), - typeof(IFormFile), - typeof(HttpFile), - typeof(Downloadable) - ], "HTTP"); - - management.AddActivitiesFrom(); - }); - - Module.UseResilience(resilience => resilience.AddResilienceStrategyType()); - } - - /// - public override void Apply() - { - var configureOptions = ConfigureHttpOptions ?? (options => - { - options.BasePath = "/workflows"; - options.BaseUrl = new Uri("http://localhost"); - }); - - var configureFileCacheOptions = ConfigureHttpFileCacheOptions ?? (options => { options.TimeToLive = TimeSpan.FromDays(7); }); - - Services.Configure(configureOptions); - Services.Configure(configureFileCacheOptions); - - var httpClientBuilder = Services.AddHttpClient(HttpClient); - HttpClientBuilder(httpClientBuilder); - - Services - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped(ContentTypeProvider) - .AddHttpContextAccessor() - - // Handlers. - .AddNotificationHandler() - .AddNotificationHandler() - - // Content parsers. - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - - // HTTP content factories. - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped() - - // Activity property options providers. - .AddScoped() - .AddScoped() - .AddScoped(_httpEndpointBasePathProvider) - - // Port resolvers. - .AddScoped() - - // HTTP endpoint handlers. - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped(HttpEndpointWorkflowFaultHandler) - .AddScoped(HttpEndpointAuthorizationHandler) - .AddScoped(_httpEndpointRouteProvider) - - // Startup tasks. - .AddStartupTask() - - // Downloadable content handlers. - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped() - .AddScoped() - - // File caches. - .AddScoped(FileCache) - .AddScoped() - - // AuthenticationBasedHttpEndpointAuthorizationHandler requires Authorization services. - // We could consider creating a separate module for installing authorization services. - .AddAuthorization(); - - // HTTP clients. - Services.AddHttpClient(); - - // Add selectors. - foreach (var httpCorrelationIdSelectorType in HttpCorrelationIdSelectorTypes) - Services.AddScoped(typeof(IHttpCorrelationIdSelector), httpCorrelationIdSelectorType); - - foreach (var httpWorkflowInstanceIdSelectorType in HttpWorkflowInstanceIdSelectorTypes) - Services.AddScoped(typeof(IHttpWorkflowInstanceIdSelector), httpWorkflowInstanceIdSelectorType); - - Services.Configure(options => - { - options.AddTypeAlias("HttpRequest"); - options.AddTypeAlias("HttpResponse"); - options.AddTypeAlias("HttpResponseMessage"); - options.AddTypeAlias("HttpHeaders"); - options.AddTypeAlias("RouteData"); - options.AddTypeAlias("FormFile"); - options.AddTypeAlias("FormFile[]"); - options.AddTypeAlias("HttpFile"); - options.AddTypeAlias("HttpFile[]"); - options.AddTypeAlias("Downloadable"); - options.AddTypeAlias("Downloadable[]"); - }); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Features/HttpJavaScriptFeature.cs b/src/http/Elsa.Http/Features/HttpJavaScriptFeature.cs deleted file mode 100644 index 9bd7bbf5..00000000 --- a/src/http/Elsa.Http/Features/HttpJavaScriptFeature.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Elsa.Features.Abstractions; -using Elsa.Features.Attributes; -using Elsa.Features.Services; -using Elsa.Http.Scripting.JavaScript; -using Elsa.Scripting.JavaScript.Features; -using Microsoft.Extensions.DependencyInjection; - -namespace Elsa.Http.Features; - -/// -/// Enabled when both and are enabled. -/// -[DependencyOf(typeof(HttpFeature))] -[DependencyOf(typeof(JavaScriptFeature))] -public class HttpJavaScriptFeature : FeatureBase -{ - /// - public HttpJavaScriptFeature(IModule module) : base(module) - { - } - - /// - public override void Apply() - { - Services.AddNotificationHandler(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/FileCaches/BlobFileCacheStorageProvider.cs b/src/http/Elsa.Http/FileCaches/BlobFileCacheStorageProvider.cs deleted file mode 100644 index 17c94840..00000000 --- a/src/http/Elsa.Http/FileCaches/BlobFileCacheStorageProvider.cs +++ /dev/null @@ -1,25 +0,0 @@ -using FluentStorage.Blobs; - -namespace Elsa.Http.FileCaches; - -/// -/// A file cache that stores files in blob storage using FluentStorage. -/// -public class BlobFileCacheStorageProvider : IFileCacheStorageProvider -{ - private readonly IBlobStorage _blobStorage; - - /// - /// Initializes a new instance of the class. - /// - public BlobFileCacheStorageProvider(IBlobStorage blobStorage) - { - _blobStorage = blobStorage; - } - - /// - public IBlobStorage GetStorage() - { - return _blobStorage; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Handlers/AllowAnonymousHttpEndpointAuthorizationHandler.cs b/src/http/Elsa.Http/Handlers/AllowAnonymousHttpEndpointAuthorizationHandler.cs deleted file mode 100644 index 05031630..00000000 --- a/src/http/Elsa.Http/Handlers/AllowAnonymousHttpEndpointAuthorizationHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Elsa.Http.Handlers; - -/// -/// A default that allows all requests. -/// -public class AllowAnonymousHttpEndpointAuthorizationHandler : IHttpEndpointAuthorizationHandler -{ - /// - public ValueTask AuthorizeAsync(AuthorizeHttpEndpointContext context) => new(true); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Handlers/AuthenticationBasedHttpEndpointAuthorizationHandler.cs b/src/http/Elsa.Http/Handlers/AuthenticationBasedHttpEndpointAuthorizationHandler.cs deleted file mode 100644 index fa7a540f..00000000 --- a/src/http/Elsa.Http/Handlers/AuthenticationBasedHttpEndpointAuthorizationHandler.cs +++ /dev/null @@ -1,44 +0,0 @@ -using JetBrains.Annotations; -using Microsoft.AspNetCore.Authorization; - -namespace Elsa.Http.Handlers; - -/// -/// An that uses the to authorize an inbound HTTP request. -/// -[PublicAPI] -public class AuthenticationBasedHttpEndpointAuthorizationHandler : IHttpEndpointAuthorizationHandler -{ - private readonly IAuthorizationService _authorizationService; - - /// - /// Initializes a new instance of the class. - /// - public AuthenticationBasedHttpEndpointAuthorizationHandler(IAuthorizationService authorizationService) => _authorizationService = authorizationService; - - /// - public async ValueTask AuthorizeAsync(AuthorizeHttpEndpointContext context) - { - var httpContext = context.HttpContext; - var user = httpContext.User; - var identity = user.Identity; - - if (identity == null) - return false; - - if (identity.IsAuthenticated == false) - return false; - - if (string.IsNullOrWhiteSpace(context.Policy)) - return identity.IsAuthenticated; - - var protectedResource = new - { - context.Workflow - }; - - var authorizationResult = await _authorizationService.AuthorizeAsync(user, protectedResource, context.Policy!); - - return authorizationResult.Succeeded; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Handlers/ConfigureWorkflowStateSerialization.cs b/src/http/Elsa.Http/Handlers/ConfigureWorkflowStateSerialization.cs deleted file mode 100644 index 5ac2b483..00000000 --- a/src/http/Elsa.Http/Handlers/ConfigureWorkflowStateSerialization.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Text.Json; -using Elsa.Http.Serialization; -using Elsa.Workflows; -using Elsa.Workflows.State; - -namespace Elsa.Http.Handlers; - -/// -/// Configures the serialization of objects. -/// -public class ConfigureWorkflowStateSerialization : SerializationOptionsConfiguratorBase -{ - public override void Configure(JsonSerializerOptions options) - { - options.Converters.Add(new HttpStatusCodeCaseForWorkflowInstanceConverter()); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Handlers/DefaultHttpEndpointFaultHandler.cs b/src/http/Elsa.Http/Handlers/DefaultHttpEndpointFaultHandler.cs deleted file mode 100644 index 81a93c34..00000000 --- a/src/http/Elsa.Http/Handlers/DefaultHttpEndpointFaultHandler.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Elsa.Http.Exceptions; - -namespace Elsa.Http.Handlers; - -/// -/// A default fault handler that writes information about the fault to the . -/// -public sealed class DefaultHttpEndpointFaultHandler : IHttpEndpointFaultHandler -{ - /// - public ValueTask HandleAsync(HttpEndpointFaultContext context) - { - var httpContext = context.HttpContext; - var isTimeoutIncident = GetIsTimeoutFault(context); - var isBadRequest = GetIsBadRequestFault(context); - var statusCode = isTimeoutIncident - ? StatusCodes.Status408RequestTimeout - : isBadRequest - ? StatusCodes.Status400BadRequest - : StatusCodes.Status500InternalServerError; - - httpContext.Response.StatusCode = statusCode; - return ValueTask.CompletedTask; - } - - private bool GetIsTimeoutFault(HttpEndpointFaultContext context) - { - return ContainsException(context, typeof(OperationCanceledException), typeof(TaskCanceledException), typeof(TimeoutException)); - } - - private bool GetIsBadRequestFault(HttpEndpointFaultContext context) - { - return ContainsException(context, typeof(HttpBadRequestException)); - } - - private bool ContainsException(HttpEndpointFaultContext context, params Type[] exceptionTypes) - { - var workflowState = context.WorkflowState; - var timeoutIncident = workflowState.Incidents.FirstOrDefault(x => exceptionTypes.Contains(x.Exception?.Type)); - - return timeoutIncident != null; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Handlers/DetailedHttpEndpointFaultHandler.cs b/src/http/Elsa.Http/Handlers/DetailedHttpEndpointFaultHandler.cs deleted file mode 100644 index 82dd9317..00000000 --- a/src/http/Elsa.Http/Handlers/DetailedHttpEndpointFaultHandler.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Net.Mime; -using Elsa.Workflows; -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http.Handlers; - -/// -/// A fault handler that writes detailed information about the fault to the . -/// -public sealed class DetailedHttpEndpointFaultHandler : IHttpEndpointFaultHandler -{ - private readonly IApiSerializer _apiSerializer; - - /// - /// Initializes a new instance of the class. - /// - public DetailedHttpEndpointFaultHandler(IApiSerializer apiSerializer) - { - _apiSerializer = apiSerializer; - } - - /// - public async ValueTask HandleAsync(HttpEndpointFaultContext context) - { - var httpContext = context.HttpContext; - var workflowState = context.WorkflowState; - var isTimeoutIncident = GetIsTimeoutFault(context); - var statusCode = isTimeoutIncident ? StatusCodes.Status408RequestTimeout : StatusCodes.Status500InternalServerError; - - httpContext.Response.ContentType = MediaTypeNames.Application.Json; - httpContext.Response.StatusCode = statusCode; - - var faultedResponse = _apiSerializer.Serialize(workflowState); - await httpContext.Response.WriteAsync(faultedResponse, context.CancellationToken); - } - - private bool GetIsTimeoutFault(HttpEndpointFaultContext context) - { - var workflowState = context.WorkflowState; - var exceptionTypes = new[] { typeof(OperationCanceledException), typeof(TaskCanceledException), typeof(TimeoutException) }; - var timeoutIncident = workflowState.Incidents.FirstOrDefault(x => exceptionTypes.Contains(x.Exception?.Type)); - - return timeoutIncident != null; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Handlers/InvalidateHttpWorkflowsCache.cs b/src/http/Elsa.Http/Handlers/InvalidateHttpWorkflowsCache.cs deleted file mode 100644 index b4089321..00000000 --- a/src/http/Elsa.Http/Handlers/InvalidateHttpWorkflowsCache.cs +++ /dev/null @@ -1,128 +0,0 @@ -using Elsa.Http.Bookmarks; -using Elsa.Mediator.Contracts; -using Elsa.Workflows.Management.Entities; -using Elsa.Workflows.Management.Notifications; -using Elsa.Workflows.Runtime; -using Elsa.Workflows.Runtime.Entities; -using Elsa.Workflows.Runtime.Filters; -using Elsa.Workflows.Runtime.Notifications; -using JetBrains.Annotations; - -namespace Elsa.Http.Handlers; - -/// -/// A handler that invalidates the HTTP workflows cache when a workflow definition is published, retracted, or deleted or when triggers are indexed. -/// -[UsedImplicitly] -public class InvalidateHttpWorkflowsCache( - IHttpWorkflowsCacheManager httpWorkflowsCacheManager, - ITriggerStore triggerStore) : - INotificationHandler, - INotificationHandler, - INotificationHandler, - INotificationHandler, - INotificationHandler, - INotificationHandler, - INotificationHandler, - INotificationHandler, - INotificationHandler -{ - /// - public Task HandleAsync(WorkflowDefinitionPublished notification, CancellationToken cancellationToken) - { - return InvalidateCacheAsync(notification.WorkflowDefinition.DefinitionId); - } - - /// - public Task HandleAsync(WorkflowDefinitionRetracted notification, CancellationToken cancellationToken) - { - return InvalidateCacheAsync(notification.WorkflowDefinition.DefinitionId); - } - - /// - public async Task HandleAsync(WorkflowDefinitionVersionsUpdated notification, CancellationToken cancellationToken) - { - foreach (WorkflowDefinition versionDefinition in notification.WorkflowDefinitions) - { - await InvalidateTriggerCacheForDefinitionVersionAsync(versionDefinition.Id, cancellationToken); - } - } - - /// - public Task HandleAsync(WorkflowDefinitionDeleted notification, CancellationToken cancellationToken) - { - return InvalidateCacheAsync(notification.DefinitionId); - } - - /// - public async Task HandleAsync(WorkflowDefinitionsDeleted notification, CancellationToken cancellationToken) - { - foreach (string definitionId in notification.DefinitionIds) - { - await InvalidateCacheAsync(definitionId); - } - } - - /// - public Task HandleAsync(WorkflowDefinitionVersionDeleted notification, CancellationToken cancellationToken) - { - return InvalidateTriggerCacheForDefinitionVersionAsync(notification.WorkflowDefinition.Id, cancellationToken); - } - - /// - public async Task HandleAsync(WorkflowDefinitionVersionsDeleted notification, CancellationToken cancellationToken) - { - foreach (string id in notification.Ids) - { - await InvalidateTriggerCacheForDefinitionVersionAsync(id, cancellationToken); - } - } - - /// - public async Task HandleAsync(WorkflowTriggersIndexed notification, CancellationToken cancellationToken) - { - var hashes = new List(); - hashes.AddRange(notification.IndexedWorkflowTriggers.RemovedTriggers.Select(x => x.Hash)!); - hashes.AddRange(notification.IndexedWorkflowTriggers.AddedTriggers.Select(x => x.Hash)!); - - foreach (string hash in hashes) - await httpWorkflowsCacheManager.EvictTriggerAsync(hash, cancellationToken); - - await InvalidateCacheAsync(notification.IndexedWorkflowTriggers.Workflow.Identity.DefinitionId); - } - - /// - public async Task HandleAsync(WorkflowDefinitionsReloaded notification, CancellationToken cancellationToken) - { - foreach (var reloadedWorkflowDefinition in notification.ReloadedWorkflowDefinitions) - await InvalidateCacheAsync(reloadedWorkflowDefinition.DefinitionId); - } - - private async Task InvalidateCacheAsync(string workflowDefinitionId) - { - await httpWorkflowsCacheManager.EvictWorkflowAsync(workflowDefinitionId); - } - - private async Task InvalidateTriggerCacheForDefinitionVersionAsync(string workflowDefinitionVersionId, CancellationToken cancellationToken) - { - var filter = new TriggerFilter - { - WorkflowDefinitionVersionId = workflowDefinitionVersionId - }; - var triggers = await triggerStore.FindManyAsync(filter, cancellationToken); - - await InvalidateTriggerCacheAsync(triggers, cancellationToken); - } - - private async Task InvalidateTriggerCacheAsync(IEnumerable triggers, CancellationToken cancellationToken) - { - foreach (var trigger in triggers) - { - if (trigger.Payload is HttpEndpointBookmarkPayload httpPayload) - { - var hash = httpWorkflowsCacheManager.ComputeBookmarkHash(httpPayload.Path, httpPayload.Method); - await httpWorkflowsCacheManager.EvictTriggerAsync(hash, cancellationToken); - } - } - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Handlers/UpdateRouteTable.cs b/src/http/Elsa.Http/Handlers/UpdateRouteTable.cs deleted file mode 100644 index 4d357100..00000000 --- a/src/http/Elsa.Http/Handlers/UpdateRouteTable.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Elsa.Http.Options; -using Elsa.Mediator.Contracts; -using Elsa.Workflows.Runtime.Notifications; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Http.Handlers; - -/// -/// A handler that updates the route table when workflow triggers and bookmarks are indexed. -/// -[UsedImplicitly] -public class UpdateRouteTable(IRouteTableUpdater routeTableUpdater, IOptions options) : - INotificationHandler, - INotificationHandler -{ - /// - public async Task HandleAsync(WorkflowTriggersIndexed notification, CancellationToken cancellationToken) - { - routeTableUpdater.RemoveRoutes(notification.IndexedWorkflowTriggers.RemovedTriggers); - await routeTableUpdater.AddRoutesAsync(notification.IndexedWorkflowTriggers.AddedTriggers, cancellationToken); - await routeTableUpdater.AddRoutesAsync(notification.IndexedWorkflowTriggers.UnchangedTriggers, cancellationToken); - } - - /// - public async Task HandleAsync(WorkflowBookmarksIndexed notification, CancellationToken cancellationToken) - { - routeTableUpdater.RemoveRoutes(notification.IndexedWorkflowBookmarks.RemovedBookmarks); - await routeTableUpdater.AddRoutesAsync(notification.IndexedWorkflowBookmarks.AddedBookmarks, notification.IndexedWorkflowBookmarks.WorkflowExecutionContext, cancellationToken); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Handlers/ValidateWorkflowRequestHandler.cs b/src/http/Elsa.Http/Handlers/ValidateWorkflowRequestHandler.cs deleted file mode 100644 index fb51064e..00000000 --- a/src/http/Elsa.Http/Handlers/ValidateWorkflowRequestHandler.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Elsa.Extensions; -using Elsa.Http.Bookmarks; -using Elsa.Mediator.Contracts; -using Elsa.Workflows.Helpers; -using Elsa.Workflows.Management.Notifications; -using Elsa.Workflows.Runtime; -using Elsa.Workflows.Runtime.Filters; -using JetBrains.Annotations; - -namespace Elsa.Http.Handlers; - -/// -/// A handler that validates a workflow path and return any errors. -/// -[UsedImplicitly] -public class ValidateWorkflowRequestHandler : INotificationHandler -{ - private readonly ITriggerStore _triggerStore; - private readonly ITriggerIndexer _triggerIndexer; - - /// - /// Constructor. - /// - public ValidateWorkflowRequestHandler(ITriggerStore triggerStore, ITriggerIndexer triggerIndexer) - { - _triggerStore = triggerStore; - _triggerIndexer = triggerIndexer; - } - - public async Task HandleAsync(WorkflowDefinitionValidating notification, CancellationToken cancellationToken) - { - var workflow = notification.Workflow; - var httpEndpointTriggers = (await _triggerIndexer.GetTriggersAsync(workflow, cancellationToken)).Where(x => x.Payload is HttpEndpointBookmarkPayload).ToList(); - var filter = new TriggerFilter - { - Name = ActivityTypeNameHelper.GenerateTypeName(typeof(HttpEndpoint)) - }; - var publishedWorkflowsTriggers = (await _triggerStore.FindManyAsync(filter, cancellationToken)).ToList(); - var validationErrors = notification.ValidationErrors; - - foreach (var httpEndpointTrigger in httpEndpointTriggers) - { - var triggerPayload = httpEndpointTrigger.GetPayload(); - - var otherWorkflowsWithSamePath = publishedWorkflowsTriggers - .Where(x => - x.WorkflowDefinitionId != workflow.Identity.DefinitionId && - x.Payload is HttpEndpointBookmarkPayload payload && - payload.Path == triggerPayload.Path && - payload.Method == triggerPayload.Method) - .ToList(); - - if (!otherWorkflowsWithSamePath.Any()) - continue; - - var message = $"The {triggerPayload.Path} path and {triggerPayload.Method} method are already in use by another workflow!"; - validationErrors.Add(new(message, httpEndpointTrigger.ActivityId)); - } - } -} diff --git a/src/http/Elsa.Http/HttpStimulusNames.cs b/src/http/Elsa.Http/HttpStimulusNames.cs deleted file mode 100644 index 1f5d07d4..00000000 --- a/src/http/Elsa.Http/HttpStimulusNames.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Elsa.Http; - -public class HttpStimulusNames -{ - public const string HttpEndpoint = "Elsa.HttpEndpoint"; -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Middleware/HttpWorkflowsMiddleware.cs b/src/http/Elsa.Http/Middleware/HttpWorkflowsMiddleware.cs deleted file mode 100644 index fd621b9b..00000000 --- a/src/http/Elsa.Http/Middleware/HttpWorkflowsMiddleware.cs +++ /dev/null @@ -1,375 +0,0 @@ -using Elsa.Extensions; -using Elsa.Http.Bookmarks; -using Elsa.Http.Options; -using Elsa.Workflows.Runtime.Filters; -using JetBrains.Annotations; -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Options; -using System.Net; -using System.Net.Mime; -using System.Text.Json; -using Elsa.Workflows.Activities; -using Elsa.Workflows.Helpers; -using Elsa.Workflows.Runtime.Entities; -using FastEndpoints; -using System.Diagnostics.CodeAnalysis; -using Elsa.Common.Multitenancy; -using Elsa.Workflows; -using Elsa.Workflows.Management; -using Elsa.Workflows.Management.Entities; -using Elsa.Workflows.Models; -using Elsa.Workflows.Options; -using Elsa.Workflows.Runtime; -using Open.Linq.AsyncExtensions; - -namespace Elsa.Http.Middleware; - -/// -/// An ASP.NET middleware component that tries to match the inbound request path to an associated workflow and then run that workflow. -/// -[PublicAPI] -public class HttpWorkflowsMiddleware(RequestDelegate next, IOptions options) -{ - /// - /// Attempts to match the inbound request path to an associated workflow and then run that workflow. - /// - [RequiresUnreferencedCode("Calls System.Text.Json.JsonSerializer.Serialize(TValue, JsonSerializerOptions)")] - public async Task InvokeAsync(HttpContext httpContext, IServiceProvider serviceProvider) - { - var path = httpContext.Request.Path.Value!.NormalizeRoute(); - var matchingPath = GetMatchingRoute(serviceProvider, path).Route; - var basePath = options.Value.BasePath?.ToString().NormalizeRoute(); - - // If the request path does not match the configured base path to handle workflows, then skip. - if (!string.IsNullOrWhiteSpace(basePath)) - { - if (!path.StartsWith(basePath, StringComparison.OrdinalIgnoreCase)) - { - await next(httpContext); - return; - } - - // Strip the base path. - matchingPath = matchingPath[basePath.Length..]; - } - - matchingPath = matchingPath.NormalizeRoute(); - - var input = new Dictionary - { - [HttpEndpoint.HttpContextInputKey] = true, - [HttpEndpoint.PathInputKey] = path - }; - - var cancellationToken = httpContext.RequestAborted; - var request = httpContext.Request; - var method = request.Method.ToLowerInvariant(); - var httpWorkflowLookupService = serviceProvider.GetRequiredService(); - var workflowInstanceId = await GetWorkflowInstanceIdAsync(serviceProvider, httpContext, cancellationToken); - var correlationId = await GetCorrelationIdAsync(serviceProvider, httpContext, cancellationToken); - var bookmarkHash = ComputeBookmarkHash(serviceProvider, matchingPath, method); - var lookupResult = await httpWorkflowLookupService.FindWorkflowAsync(bookmarkHash, cancellationToken); - - if (lookupResult != null) - { - var triggers = lookupResult.Triggers; - - if (triggers.Count > 1) - { - await HandleMultipleWorkflowsFoundAsync(httpContext, () => triggers.Select(x => new - { - x.WorkflowDefinitionId - }), cancellationToken); - return; - } - - var trigger = triggers.FirstOrDefault(); - if (trigger != null) - { - var workflowGraph = lookupResult.WorkflowGraph!; - await StartWorkflowAsync(httpContext, trigger, workflowGraph, input, workflowInstanceId, correlationId); - return; - } - } - - var bookmarks = await FindBookmarksAsync(serviceProvider, bookmarkHash, workflowInstanceId, correlationId, cancellationToken).ToList(); - - if (bookmarks.Count > 1) - { - await HandleMultipleWorkflowsFoundAsync(httpContext, () => bookmarks.Select(x => new - { - x.WorkflowInstanceId - }), cancellationToken); - return; - } - - var bookmark = bookmarks.SingleOrDefault(); - - if (bookmark != null) - { - await ResumeWorkflowAsync(httpContext, bookmark, input, correlationId); - return; - } - - // If a base path was configured, the requester tried to execute a workflow that doesn't exist. - if (basePath != null) - { - await httpContext.Response.SendNotFoundAsync(cancellation: cancellationToken); - return; - } - - // If no base path was configured, the request should be handled by subsequent middlewares. - await next(httpContext); - } - - private async Task FindWorkflowGraphAsync(IServiceProvider serviceProvider, StoredTrigger trigger, CancellationToken cancellationToken) - { - var workflowDefinitionService = serviceProvider.GetRequiredService(); - var workflowDefinitionId = trigger.WorkflowDefinitionVersionId; - return await workflowDefinitionService.FindWorkflowGraphAsync(workflowDefinitionId, cancellationToken); - } - - private async Task> FindTriggersAsync(IServiceProvider serviceProvider, string bookmarkHash, CancellationToken cancellationToken) - { - var triggerStore = serviceProvider.GetRequiredService(); - var triggerFilter = new TriggerFilter - { - Hash = bookmarkHash - }; - return await triggerStore.FindManyAsync(triggerFilter, cancellationToken); - } - - private async Task> FindBookmarksAsync(IServiceProvider serviceProvider, string bookmarkHash, string? workflowInstanceId, string? correlationId, CancellationToken cancellationToken) - { - var bookmarkStore = serviceProvider.GetRequiredService(); - var bookmarkFilter = new BookmarkFilter - { - Hash = bookmarkHash, - WorkflowInstanceId = workflowInstanceId, - CorrelationId = correlationId, - TenantAgnostic = true - }; - return await bookmarkStore.FindManyAsync(bookmarkFilter, cancellationToken); - } - - private async Task StartWorkflowAsync(HttpContext httpContext, StoredTrigger trigger, WorkflowGraph workflowGraph, IDictionary input, string? workflowInstanceId, string? correlationId) - { - var bookmarkPayload = trigger.GetPayload(); - var workflowOptions = new RunWorkflowOptions - { - Input = input, - CorrelationId = correlationId, - TriggerActivityId = trigger.ActivityId, - WorkflowInstanceId = workflowInstanceId - }; - - await ExecuteWorkflowAsync(httpContext, workflowGraph, workflowOptions, bookmarkPayload, null, input); - } - - private async Task ResumeWorkflowAsync(HttpContext httpContext, StoredBookmark bookmark, IDictionary input, string? correlationId) - { - var serviceProvider = httpContext.RequestServices; - var cancellationToken = httpContext.RequestAborted; - var bookmarkPayload = bookmark.GetPayload(); - var workflowInstanceStore = serviceProvider.GetRequiredService(); - var workflowInstance = await workflowInstanceStore.FindAsync(bookmark.WorkflowInstanceId, cancellationToken); - - if (workflowInstance == null) - { - await httpContext.Response.SendNotFoundAsync(cancellation: cancellationToken); - return; - } - - var workflowDefinitionService = serviceProvider.GetRequiredService(); - var workflowGraph = await workflowDefinitionService.FindWorkflowGraphAsync(workflowInstance.DefinitionVersionId, cancellationToken); - - if (workflowGraph == null) - { - await httpContext.Response.SendNotFoundAsync(cancellation: cancellationToken); - return; - } - - var runWorkflowParams = new RunWorkflowOptions - { - WorkflowInstanceId = workflowInstance.Id, - Input = input, - CorrelationId = correlationId, - ActivityHandle = bookmark.ActivityInstanceId != null ? ActivityHandle.FromActivityInstanceId(bookmark.ActivityInstanceId) : null, - BookmarkId = bookmark.Id - }; - - await ExecuteWorkflowAsync(httpContext, workflowGraph, runWorkflowParams, bookmarkPayload, workflowInstance, input); - } - - private async Task ExecuteWorkflowAsync(HttpContext httpContext, WorkflowGraph workflowGraph, RunWorkflowOptions workflowOptions, HttpEndpointBookmarkPayload bookmarkPayload, WorkflowInstance? workflowInstance, IDictionary input) - { - var serviceProvider = httpContext.RequestServices; - var cancellationToken = httpContext.RequestAborted; - var workflow = workflowGraph.Workflow; - - if (!await AuthorizeAsync(serviceProvider, httpContext, workflow, bookmarkPayload, cancellationToken)) - { - httpContext.Response.StatusCode = (int)HttpStatusCode.Unauthorized; - return; - } - - var workflowRunner = serviceProvider.GetRequiredService(); - var result = await ExecuteWithinTimeoutAsync(async ct => - { - if (workflowInstance == null) - return await workflowRunner.RunAsync(workflowGraph, workflowOptions, ct); - return await workflowRunner.RunAsync(workflow, workflowInstance.WorkflowState, workflowOptions, ct); - }, bookmarkPayload.RequestTimeout, httpContext); - await HandleWorkflowFaultAsync(serviceProvider, httpContext, result, cancellationToken); - } - - private async Task ExecuteWithinTimeoutAsync(Func> action, TimeSpan? requestTimeout, HttpContext httpContext) - { - // If no request timeout is specified, execute the action without any timeout. - if (requestTimeout == null) - return await action(httpContext.RequestAborted); - - // Create a combined cancellation token that cancels when the request is aborted or when the request timeout is reached. - using var requestTimeoutCancellationTokenSource = new CancellationTokenSource(); - requestTimeoutCancellationTokenSource.CancelAfter(requestTimeout.Value); - using var combinedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(httpContext.RequestAborted, requestTimeoutCancellationTokenSource.Token); - var originalCancellationToken = httpContext.RequestAborted; - - // Replace the original cancellation token with the combined one. - httpContext.RequestAborted = combinedTokenSource.Token; - - // Execute the action. - var result = await action(httpContext.RequestAborted); - - // Restore the original cancellation token. - httpContext.RequestAborted = originalCancellationToken; - - return result; - } - - private HttpRouteData GetMatchingRoute(IServiceProvider serviceProvider, string path) - { - var routeMatcher = serviceProvider.GetRequiredService(); - var routeTable = serviceProvider.GetRequiredService(); - - var matchingRouteQuery = - from routeData in routeTable - let routeValues = routeMatcher.Match(routeData.Route, path) - where routeValues != null - select new - { - route = routeData, - routeValues - }; - - var matchingRoute = matchingRouteQuery.FirstOrDefault(); - var routeTemplate = matchingRoute?.route ?? new HttpRouteData(path); - - return routeTemplate; - } - - private async Task GetCorrelationIdAsync(IServiceProvider serviceProvider, HttpContext httpContext, CancellationToken cancellationToken) - { - var correlationIdSelectors = serviceProvider.GetServices(); - - var correlationId = default(string); - - foreach (var selector in correlationIdSelectors.OrderByDescending(x => x.Priority)) - { - correlationId = await selector.GetCorrelationIdAsync(httpContext, cancellationToken); - - if (correlationId != null) - break; - } - - return correlationId; - } - - private async Task GetWorkflowInstanceIdAsync(IServiceProvider serviceProvider, HttpContext httpContext, CancellationToken cancellationToken) - { - var workflowInstanceIdSelectors = serviceProvider.GetServices(); - - var workflowInstanceId = default(string); - - foreach (var selector in workflowInstanceIdSelectors.OrderByDescending(x => x.Priority)) - { - workflowInstanceId = await selector.GetWorkflowInstanceIdAsync(httpContext, cancellationToken); - - if (workflowInstanceId != null) - break; - } - - return workflowInstanceId; - } - - [RequiresUnreferencedCode("Calls System.Text.Json.JsonSerializer.Serialize(TValue, JsonSerializerOptions)")] - private static async Task WriteResponseAsync(HttpContext httpContext, CancellationToken cancellationToken) - { - var response = httpContext.Response; - - if (!response.HasStarted) - { - response.ContentType = MediaTypeNames.Application.Json; - response.StatusCode = StatusCodes.Status200OK; - - var model = new - { - workflowInstanceIds = Array.Empty(), - }; - - var json = JsonSerializer.Serialize(model); - await response.WriteAsync(json, cancellationToken); - } - } - - [RequiresUnreferencedCode("Calls System.Text.Json.JsonSerializer.Serialize(TValue, JsonSerializerOptions)")] - private async Task HandleMultipleWorkflowsFoundAsync(HttpContext httpContext, Func> workflowMatches, CancellationToken cancellationToken) - { - httpContext.Response.ContentType = "application/json"; - httpContext.Response.StatusCode = (int)HttpStatusCode.InternalServerError; - - var responseContent = JsonSerializer.Serialize(new - { - errorMessage = "The call is ambiguous and matches multiple workflows.", - workflows = workflowMatches().ToArray() - }); - - await httpContext.Response.WriteAsync(responseContent, cancellationToken); - return true; - } - - private async Task HandleWorkflowFaultAsync(IServiceProvider serviceProvider, HttpContext httpContext, RunWorkflowResult workflowExecutionResult, CancellationToken cancellationToken) - { - if (!workflowExecutionResult.WorkflowState.Incidents.Any() || httpContext.Response.HasStarted) - return false; - - var httpEndpointFaultHandler = serviceProvider.GetRequiredService(); - var workflowInstanceManager = serviceProvider.GetRequiredService(); - var workflowState = (await workflowInstanceManager.FindByIdAsync(workflowExecutionResult.WorkflowState.Id, cancellationToken))!; - await httpEndpointFaultHandler.HandleAsync(new(httpContext, workflowState.WorkflowState, cancellationToken)); - return true; - } - - private async Task AuthorizeAsync( - IServiceProvider serviceProvider, - HttpContext httpContext, - Workflow workflow, - HttpEndpointBookmarkPayload bookmarkPayload, - CancellationToken cancellationToken) - { - var httpEndpointAuthorizationHandler = serviceProvider.GetRequiredService(); - - if (bookmarkPayload.Authorize == false) - return true; - - return await httpEndpointAuthorizationHandler.AuthorizeAsync(new(httpContext, workflow, bookmarkPayload.Policy)); - } - - private string ComputeBookmarkHash(IServiceProvider serviceProvider, string path, string method) - { - var bookmarkPayload = new HttpEndpointBookmarkPayload(path, method); - var bookmarkHasher = serviceProvider.GetRequiredService(); - return bookmarkHasher.Hash(HttpStimulusNames.HttpEndpoint, bookmarkPayload); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Models/AuthorizeHttpEndpointContext.cs b/src/http/Elsa.Http/Models/AuthorizeHttpEndpointContext.cs deleted file mode 100644 index d5d2c66d..00000000 --- a/src/http/Elsa.Http/Models/AuthorizeHttpEndpointContext.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Elsa.Workflows.Activities; -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http; - -/// -/// Represents the context for authorizing an HTTP endpoint. -/// -public record AuthorizeHttpEndpointContext(HttpContext HttpContext, Workflow Workflow, string? Policy = default); \ No newline at end of file diff --git a/src/http/Elsa.Http/Models/Downloadable.cs b/src/http/Elsa.Http/Models/Downloadable.cs deleted file mode 100644 index 064845fc..00000000 --- a/src/http/Elsa.Http/Models/Downloadable.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Text.Json.Serialization; - -namespace Elsa.Http; - -/// -/// Represents a downloadable object. -/// -public class Downloadable -{ - /// - /// Initializes a new instance of the class. - /// - [JsonConstructor] - public Downloadable() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The stream to download. - /// The filename to use when downloading the stream. - /// The content type to use when downloading the stream. - /// The ETag to use when downloading the stream. - public Downloadable(Stream stream, string? filename = default, string? contentType = default, string? eTag = default) - { - Stream = stream; - Filename = filename; - ContentType = contentType; - ETag = eTag; - } - - /// - /// The stream to download. - /// - public Stream Stream { get; set; } = default!; - - /// - /// The filename to use when downloading the stream. - /// - public string? Filename { get; set; } - - /// - /// The content type to use when downloading the stream. - /// - public string? ContentType { get; set; } - - /// - /// The ETag to use when downloading the stream. - /// - public string? ETag { get; set; } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Models/EventTokenPayload.cs b/src/http/Elsa.Http/Models/EventTokenPayload.cs deleted file mode 100644 index 22d5fd21..00000000 --- a/src/http/Elsa.Http/Models/EventTokenPayload.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Elsa.Http; - -/// -/// Represents the payload of an event, serialized as a secured token. -/// -/// The name of the event. -/// The ID of the workflow instance to trigger with the event. -public record EventTokenPayload(string EventName, string WorkflowInstanceId); \ No newline at end of file diff --git a/src/http/Elsa.Http/Models/HttpEndpointFaultContext.cs b/src/http/Elsa.Http/Models/HttpEndpointFaultContext.cs deleted file mode 100644 index 22d0b06b..00000000 --- a/src/http/Elsa.Http/Models/HttpEndpointFaultContext.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Elsa.Workflows.State; -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http; - -/// -/// Provides context about the faulted workflow. -/// -/// The HTTP context. -/// The faulted workflow state. -/// The cancellation token. -public record HttpEndpointFaultContext(HttpContext HttpContext, WorkflowState WorkflowState, CancellationToken CancellationToken); \ No newline at end of file diff --git a/src/http/Elsa.Http/Models/HttpEndpointOptions.cs b/src/http/Elsa.Http/Models/HttpEndpointOptions.cs deleted file mode 100644 index 59b858bc..00000000 --- a/src/http/Elsa.Http/Models/HttpEndpointOptions.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http; - -public class HttpEndpointOptions -{ - public string Path { get; set; } = null!; - public ICollection Methods { get; set; } = [HttpMethods.Get]; - public bool Authorize { get; set; } - public string? Policy { get; set; } - public TimeSpan? RequestTimeout { get; set; } - public long? RequestSizeLimit { get; set; } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Models/HttpFile.cs b/src/http/Elsa.Http/Models/HttpFile.cs deleted file mode 100644 index 4f3fcf1d..00000000 --- a/src/http/Elsa.Http/Models/HttpFile.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System.Net.Http.Headers; -using System.Text.Json.Serialization; - -namespace Elsa.Http; - -/// -/// Represents a downloadable object. -/// -public class HttpFile -{ - /// - /// Initializes a new instance of the class. - /// - [JsonConstructor] - public HttpFile() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The stream to download. - /// The filename to use when downloading the stream. - /// The content type to use when downloading the stream. - /// The ETag to use when downloading the stream. - public HttpFile(Stream stream, string? filename = default, string? contentType = default, string? eTag = default) - { - Stream = stream; - Filename = filename; - ContentType = contentType; - ETag = eTag; - } - - /// - /// The file stream. - /// - public Stream Stream { get; set; } = default!; - - /// - /// The filename. - /// - public string? Filename { get; set; } - - /// - /// The content type. - /// - public string? ContentType { get; set; } - - /// - /// The ETag. - /// - public string? ETag { get; set; } - - /// - /// Gets the file bytes. - /// - public byte[] GetBytes() - { - using var memoryStream = new MemoryStream(); - if (Stream.CanSeek) Stream.Seek(0, SeekOrigin.Begin); - Stream.CopyTo(memoryStream); - return memoryStream.ToArray(); - } - - public StreamContent GetStreamContent() - { - if (Stream.CanSeek) Stream.Seek(0, SeekOrigin.Begin); - var content = new StreamContent(Stream); - - if (!string.IsNullOrWhiteSpace(Filename)) - { - content.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data") - { - Name = Filename, - FileName = Filename, - FileNameStar = Filename - }; - } - - if (!string.IsNullOrWhiteSpace(ContentType)) content.Headers.ContentType = new MediaTypeHeaderValue(ContentType); - if (!string.IsNullOrWhiteSpace(ETag)) content.Headers.TryAddWithoutValidation("ETag", ETag); - return content; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Models/HttpHeaders.cs b/src/http/Elsa.Http/Models/HttpHeaders.cs deleted file mode 100644 index 9c95098c..00000000 --- a/src/http/Elsa.Http/Models/HttpHeaders.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Net.Http.Headers; -using System.Text.Json.Serialization; -using Elsa.Extensions; -using Elsa.Http.Serialization; - -namespace Elsa.Http; - -/// -/// Represents the headers of an HTTP message. -/// -[JsonConverter(typeof(HttpHeadersConverter))] -public class HttpHeaders : Dictionary -{ - /// - public HttpHeaders() - { - } - - /// - public HttpHeaders(IDictionary source) - { - foreach (var item in source) - Add(item.Key, item.Value); - } - - /// - public HttpHeaders(HttpResponseHeaders source) - { - foreach (var item in source) - Add(item.Key, item.Value.ToArray()); - } - - /// - public HttpHeaders(HttpContentHeaders source) - { - foreach (var item in source) - Add(item.Key, item.Value.ToArray()); - } - - /// - /// Gets the content type. - /// - public string? ContentType => this.GetValue("content-type")?[0]; -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Models/HttpRouteData.cs b/src/http/Elsa.Http/Models/HttpRouteData.cs deleted file mode 100644 index 2379537b..00000000 --- a/src/http/Elsa.Http/Models/HttpRouteData.cs +++ /dev/null @@ -1,31 +0,0 @@ -using JetBrains.Annotations; -using Microsoft.AspNetCore.Routing; - -namespace Elsa.Http; - -[UsedImplicitly] -public class HttpRouteData -{ - public HttpRouteData() - { - } - - public HttpRouteData(string route) : this() - { - Route = route; - } - - public HttpRouteData(string route, RouteValueDictionary dataTokens) : this(route) - { - DataTokens = dataTokens; - } - - public HttpRouteData(string route, RouteValueDictionary dataTokens, RouteValueDictionary routeValues) : this(route, dataTokens) - { - RouteValues = routeValues; - } - - public string Route { get; set; } = default!; - public RouteValueDictionary DataTokens { get; set; } = new(); - public RouteValueDictionary RouteValues { get; set; } = new(); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Models/HttpStatusCodeCase.cs b/src/http/Elsa.Http/Models/HttpStatusCodeCase.cs deleted file mode 100644 index c778f389..00000000 --- a/src/http/Elsa.Http/Models/HttpStatusCodeCase.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Text.Json.Serialization; -using Elsa.Workflows; - -namespace Elsa.Http; - -/// -/// A binding between an HTTP status code and an activity. -/// -public class HttpStatusCodeCase -{ - /// - /// Creates a new instance of the class. - /// - [JsonConstructor] - public HttpStatusCodeCase() - { - } - - /// - /// Creates a new instance of the class. - /// - public HttpStatusCodeCase(int statusCode, IActivity activity) - { - StatusCode = statusCode; - Activity = activity; - } - - /// - /// The HTTP status code to match. - /// - public int StatusCode { get; set; } - - /// - /// The activity to execute when the HTTP status code matches. - /// - public IActivity? Activity { get; set; } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Models/HttpWorkflowLookupResult.cs b/src/http/Elsa.Http/Models/HttpWorkflowLookupResult.cs deleted file mode 100644 index 9c7d601e..00000000 --- a/src/http/Elsa.Http/Models/HttpWorkflowLookupResult.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Elsa.Workflows.Models; -using Elsa.Workflows.Runtime.Entities; - -namespace Elsa.Http; - -/// -/// Represents the result of a workflow lookup. -/// -public record HttpWorkflowLookupResult(WorkflowGraph? WorkflowGraph, ICollection Triggers); \ No newline at end of file diff --git a/src/http/Elsa.Http/Options/DownloadableOptions.cs b/src/http/Elsa.Http/Options/DownloadableOptions.cs deleted file mode 100644 index d66528fc..00000000 --- a/src/http/Elsa.Http/Options/DownloadableOptions.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Net.Http.Headers; - -namespace Elsa.Http.Options; - -/// -/// Options for downloading a file. -/// -public class DownloadableOptions -{ - /// - /// Gets or sets the entity tag. - /// - public EntityTagHeaderValue? ETag { get; set; } - - /// - /// Gets or sets the range. - /// - public RangeHeaderValue? Range { get; set; } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Options/FileDownloadOptions.cs b/src/http/Elsa.Http/Options/FileDownloadOptions.cs deleted file mode 100644 index 2d99499f..00000000 --- a/src/http/Elsa.Http/Options/FileDownloadOptions.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Net.Http.Headers; - -namespace Elsa.Http.Options; - -/// -/// Options for downloading a file. -/// -public class FileDownloadOptions -{ - /// - /// Gets or sets the entity tag. - /// - public EntityTagHeaderValue? ETag { get; set; } - - /// - /// Gets or sets the range. - /// - public RangeHeaderValue? Range { get; set; } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Options/HttpActivityOptions.cs b/src/http/Elsa.Http/Options/HttpActivityOptions.cs deleted file mode 100644 index 2080c006..00000000 --- a/src/http/Elsa.Http/Options/HttpActivityOptions.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http.Options; - -/// -/// Provides various options related to the HTTP activities. -/// -public class HttpActivityOptions -{ - /// - /// The root path at which HTTP activities can be invoked. - /// - public PathString? BasePath { get; set; } = "/workflows"; - - /// - /// The base URL of the server. This should be set to the same value at which the Elsa Server is publicly available. It will be used when generating absolute URLs need to be generated by activities such as SendEmail. - /// - public Uri BaseUrl { get; set; } = default!; - - /// - /// The prefix used for API routes. - /// - [Obsolete("Use ApiEndpointOptions from Elsa.Workflows.Api instead.")] - public string ApiRoutePrefix { get; set; } = "elsa/api"; - - /// - /// A configurable set of available content types available from the activity. - /// - public ISet AvailableContentTypes { get; set; } = new SortedSet - { - "application/json", - "application/xml", - "application/x-www-form-urlencoded", - "application/octet-stream", - "text/plain", - "text/html", - "text/json", - "text/xml", - }; - - /// - /// A boolean to opt-in if you want to call CompleteAsync() in the HttpResponse Activity - /// and not waiting for the end of the HttpMiddleware. - /// - public Boolean WriteHttpResponseSynchronously { get; set; } = false; -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Options/HttpFileCacheOptions.cs b/src/http/Elsa.Http/Options/HttpFileCacheOptions.cs deleted file mode 100644 index d6760ae6..00000000 --- a/src/http/Elsa.Http/Options/HttpFileCacheOptions.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Elsa.Http.Options; - -/// -/// Provides options for the HTTP file cache. -/// -public class HttpFileCacheOptions -{ - /// - /// The time to live for cached files. - /// - public TimeSpan TimeToLive { get; set; } = TimeSpan.FromDays(7); - - /// - /// The local cache directory. Defaults to the system's temp directory. - /// - public string LocalCacheDirectory { get; set; } = Path.GetTempPath(); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Parsers/FileHttpContentParser.cs b/src/http/Elsa.Http/Parsers/FileHttpContentParser.cs deleted file mode 100644 index 3067a59e..00000000 --- a/src/http/Elsa.Http/Parsers/FileHttpContentParser.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Elsa.Extensions; -using Elsa.Http.Contexts; - -namespace Elsa.Http.Parsers; - -/// -/// Reads received file from the HTTP response, if any. -/// -public class FileHttpContentParser : IHttpContentParser -{ - /// - // Lower priority than other parsers, so that they can be tried first. - // If none of them can parse the content, this parser will be tried and interpret the content as a file. - public int Priority => -100; - - /// - public bool GetSupportsContentType(HttpResponseParserContext context) - { - return true; - } - - /// - public Task ReadAsync(HttpResponseParserContext context) - { - var stream = context.Content; - var filename = context.Headers.GetFilename() ?? "file.dat"; - var contentType = context.ContentType; - context.Headers.TryGetValue("ETag", out var eTag); - var file = new HttpFile(stream, filename, contentType, eTag?.FirstOrDefault()); - return Task.FromResult(file); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Parsers/JsonHttpContentParser.cs b/src/http/Elsa.Http/Parsers/JsonHttpContentParser.cs deleted file mode 100644 index b563c818..00000000 --- a/src/http/Elsa.Http/Parsers/JsonHttpContentParser.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.Dynamic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Elsa.Expressions.Helpers; -using Elsa.Http.Contexts; -using Elsa.Workflows.Serialization.Converters; - -namespace Elsa.Http.Parsers; - -/// -/// Reads application/json and text/json content type streams. -/// -public class JsonHttpContentParser : IHttpContentParser -{ - /// - public int Priority => 0; - - /// - public bool GetSupportsContentType(HttpResponseParserContext context) => context.ContentType.Contains("json", StringComparison.InvariantCultureIgnoreCase); - - /// - public async Task ReadAsync(HttpResponseParserContext context) - { - var options = new JsonSerializerOptions - { - PropertyNameCaseInsensitive = true - }; - - options.Converters.Add(new JsonStringEnumConverter()); - - var content = context.Content; - using var reader = new StreamReader(content, leaveOpen: true); - var json = await reader.ReadToEndAsync(); - var returnType = context.ReturnType; - - if(returnType == typeof(string)) - return json; - - if (returnType == null || returnType.IsPrimitive) - return json.ConvertTo(returnType ?? typeof(string))!; - - if (returnType != typeof(ExpandoObject) && returnType != typeof(object)) - return JsonSerializer.Deserialize(json, returnType, options)!; - - options.Converters.Add(new ExpandoObjectConverterFactory()); - return JsonSerializer.Deserialize(json, options)!; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Parsers/PlainTextHttpContentParser.cs b/src/http/Elsa.Http/Parsers/PlainTextHttpContentParser.cs deleted file mode 100644 index f0454447..00000000 --- a/src/http/Elsa.Http/Parsers/PlainTextHttpContentParser.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Elsa.Http.Contexts; - -namespace Elsa.Http.Parsers; - -/// -/// Reads application/xml and text/xml content type streams. -/// -public class PlainTextHttpContentParser : IHttpContentParser -{ - /// - public int Priority => 0; - - /// - public bool GetSupportsContentType(HttpResponseParserContext context) => context.ContentType.Contains("text/plain", StringComparison.InvariantCultureIgnoreCase); - - /// - public async Task ReadAsync(HttpResponseParserContext context) - { - var content = context.Content; - using var reader = new StreamReader(content, leaveOpen: true); - var stringContent = await reader.ReadToEndAsync(); - return stringContent; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Parsers/TextHtmlHttpContentParser.cs b/src/http/Elsa.Http/Parsers/TextHtmlHttpContentParser.cs deleted file mode 100644 index fbf55998..00000000 --- a/src/http/Elsa.Http/Parsers/TextHtmlHttpContentParser.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Elsa.Http.Contexts; - -namespace Elsa.Http.Parsers; - -/// -/// Reads text/html content type streams. -/// -// TODO: found a library to use a Html Content Parser and use a complexe object Type, until this, this class allow to accept request send using text/html content-type -public class TextHtmlHttpContentParser : IHttpContentParser -{ - /// - public int Priority => 0; - - /// - public bool GetSupportsContentType(HttpResponseParserContext context) => context.ContentType.Contains("text/html", StringComparison.InvariantCultureIgnoreCase); - - /// - public async Task ReadAsync(HttpResponseParserContext context) - { - var content = context.Content; - using var reader = new StreamReader(content, leaveOpen: true); - var stringContent = await reader.ReadToEndAsync(); - return stringContent; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Parsers/XmlHttpContentParser.cs b/src/http/Elsa.Http/Parsers/XmlHttpContentParser.cs deleted file mode 100644 index 4827c06a..00000000 --- a/src/http/Elsa.Http/Parsers/XmlHttpContentParser.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Xml.Serialization; -using Elsa.Http.Contexts; - -namespace Elsa.Http.Parsers; - -/// -/// Reads application/xml and text/xml content type streams. -/// -public class XmlHttpContentParser : IHttpContentParser -{ - /// - public int Priority => 0; - - /// - public bool GetSupportsContentType(HttpResponseParserContext context) => context.ContentType.Contains("xml", StringComparison.InvariantCultureIgnoreCase); - - /// - public async Task ReadAsync(HttpResponseParserContext context) - { - var content = context.Content; - using var reader = new StreamReader(content, leaveOpen: true); - var xml = await reader.ReadToEndAsync(); - var returnType = context.ReturnType; - - if (returnType == null || returnType == typeof(string)) - return xml; - - var serializer = new XmlSerializer(returnType); - return serializer.Deserialize(reader)!; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/PortResolvers/SendHttpRequestActivityPortResolver.cs b/src/http/Elsa.Http/PortResolvers/SendHttpRequestActivityPortResolver.cs deleted file mode 100644 index 92dcd991..00000000 --- a/src/http/Elsa.Http/PortResolvers/SendHttpRequestActivityPortResolver.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Elsa.Workflows; -using Elsa.Workflows.Models; - -namespace Elsa.Http.PortResolvers; - -/// -/// Returns a list of outbound activities for a given activity's expected status codes. -/// -public class SendHttpRequestActivityResolver : IActivityResolver -{ - /// - public int Priority => 0; - - /// - public bool GetSupportsActivity(IActivity activity) => activity is SendHttpRequest; - - - /// - public ValueTask> GetActivityPortsAsync(IActivity activity, CancellationToken cancellationToken = default) - { - IEnumerable ports = GetPortsInternal(activity); - return new ValueTask>(ports); - } - - private IEnumerable GetPortsInternal(IActivity activity) - { - var sendHttpRequest = (SendHttpRequest)activity; - var cases = sendHttpRequest.ExpectedStatusCodes.Where(x => x.Activity != null); - - foreach (var @case in cases) - yield return ActivityPort.FromActivity(@case.Activity!, @case.StatusCode.ToString()); - - if (sendHttpRequest.Timeout != null) - yield return ActivityPort.FromActivity(sendHttpRequest.Timeout, nameof(SendHttpRequest.Timeout)); - - if (sendHttpRequest.FailedToConnect != null) - yield return ActivityPort.FromActivity(sendHttpRequest.FailedToConnect, nameof(SendHttpRequest.FailedToConnect)); - - if (sendHttpRequest.UnmatchedStatusCode != null) - yield return ActivityPort.FromActivity(sendHttpRequest.UnmatchedStatusCode, nameof(SendHttpRequest.UnmatchedStatusCode)); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Resilience/HttpResilienceStrategy.cs b/src/http/Elsa.Http/Resilience/HttpResilienceStrategy.cs deleted file mode 100644 index c346a577..00000000 --- a/src/http/Elsa.Http/Resilience/HttpResilienceStrategy.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Elsa.Resilience; -using Polly; -using Polly.Retry; - -namespace Elsa.Http.Resilience; - -[ResilienceCategory("HTTP")] -public class HttpResilienceStrategy : IResilienceStrategy -{ - public string Id { get; set; } = null!; - public string DisplayName { get; set; } = null!; - public int RetryCount { get; set; } = 3; - public double BackoffFactor { get; set; } = 2.0; - - public async Task ExecuteAsync(Func> action) - { - AsyncRetryPolicy policy = Policy - .Handle() - .WaitAndRetryAsync( - RetryCount, - retryAttempt => TimeSpan.FromSeconds(Math.Pow(BackoffFactor, retryAttempt)) - ); - - return await policy.ExecuteAsync(action); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Scripting/JavaScript/HttpJavaScriptHandler.cs b/src/http/Elsa.Http/Scripting/JavaScript/HttpJavaScriptHandler.cs deleted file mode 100644 index 08be48ac..00000000 --- a/src/http/Elsa.Http/Scripting/JavaScript/HttpJavaScriptHandler.cs +++ /dev/null @@ -1,85 +0,0 @@ -using Elsa.Extensions; -using Elsa.Http.Resilience; -using Elsa.Scripting.JavaScript.Notifications; -using Elsa.Scripting.JavaScript.TypeDefinitions.Builders; -using Elsa.Scripting.JavaScript.TypeDefinitions.Contracts; -using Elsa.Scripting.JavaScript.TypeDefinitions.Models; -using Elsa.Mediator.Contracts; -using Elsa.Workflows; -using JetBrains.Annotations; - -namespace Elsa.Http.Scripting.JavaScript; - -/// -/// Configures the JavaScript engine with additional .NET types that can be instantiated. -/// -[PublicAPI] -public class HttpJavaScriptHandler : INotificationHandler, ITypeDefinitionProvider, IFunctionDefinitionProvider -{ - private readonly ITypeDescriber _typeDescriber; - - /// - /// Initializes a new instance of the class. - /// - public HttpJavaScriptHandler(ITypeDescriber typeDescriber) - { - _typeDescriber = typeDescriber; - } - - /// - Task INotificationHandler.HandleAsync(EvaluatingJavaScript notification, CancellationToken cancellationToken) - { - var engine = notification.Engine; - engine.RegisterType(); - engine.RegisterType(); - engine.RegisterType(); - - var activityExecutionContext = notification.Context; - - engine.SetValue("createEventTriggerUrl", (Func)((eventName, lifetimeOrExpiryDate) => - { - return lifetimeOrExpiryDate switch - { - TimeSpan lifetime => activityExecutionContext.GenerateEventTriggerUrl(eventName, lifetime), - DateTimeOffset expiryDate => activityExecutionContext.GenerateEventTriggerUrl(eventName, expiryDate), - _ => activityExecutionContext.GenerateEventTriggerUrl(eventName) - }; - })); - return Task.CompletedTask; - } - - /// - ValueTask> ITypeDefinitionProvider.GetTypeDefinitionsAsync(TypeDefinitionContext context) - { - var definitions = GetTypeDefinitions(context); - return new(definitions); - } - - /// - ValueTask> IFunctionDefinitionProvider.GetFunctionDefinitionsAsync(TypeDefinitionContext context) - { - var definitions = GetFunctionDefinitions(context); - return new(definitions); - } - - private IEnumerable GetTypeDefinitions(TypeDefinitionContext context) - { - yield return _typeDescriber.DescribeType(typeof(HttpHeaders)); - yield return _typeDescriber.DescribeType(typeof(Downloadable)); - yield return _typeDescriber.DescribeType(typeof(HttpResilienceStrategy)); - } - - private IEnumerable GetFunctionDefinitions(TypeDefinitionContext context) - { - yield return CreateFunctionDefinition(function => function.Name("createEventTriggerUrl").ReturnType("string").Parameter("eventName", "string")); - yield return CreateFunctionDefinition(function => function.Name("createEventTriggerUrl").ReturnType("string").Parameter("eventName", "string").Parameter("lifetime", "TimeSpan")); - yield return CreateFunctionDefinition(function => function.Name("createEventTriggerUrl").ReturnType("string").Parameter("eventName", "string").Parameter("expiresAt", "DateTimeOffset")); - } - - private FunctionDefinition CreateFunctionDefinition(Action setup) - { - var builder = new FunctionDefinitionBuilder(); - setup(builder); - return builder.BuildFunctionDefinition(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Selectors/HeaderHttpCorrelationIdSelector.cs b/src/http/Elsa.Http/Selectors/HeaderHttpCorrelationIdSelector.cs deleted file mode 100644 index 0757f9ab..00000000 --- a/src/http/Elsa.Http/Selectors/HeaderHttpCorrelationIdSelector.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Elsa.Http.Abstractions; -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http.Selectors; - -/// -/// Returns the correlation ID from the X-Correlation-ID header, if any. -/// -public class HeaderHttpCorrelationIdSelector : HttpCorrelationIdSelectorBase -{ - /// - protected override string? GetCorrelationId(HttpContext httpContext) - { - return httpContext.Request.Headers["X-Correlation-ID"].FirstOrDefault(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Selectors/HeaderHttpWorkflowInstanceIdSelector.cs b/src/http/Elsa.Http/Selectors/HeaderHttpWorkflowInstanceIdSelector.cs deleted file mode 100644 index 7294d708..00000000 --- a/src/http/Elsa.Http/Selectors/HeaderHttpWorkflowInstanceIdSelector.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Elsa.Http.Abstractions; -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http.Selectors; - -/// -/// Returns the workflow instance ID from the X-Workflow-Instance-ID header, if any. -/// -public class HeaderHttpWorkflowInstanceIdSelector : HttpWorkflowInstanceIdSelectorBase -{ - /// - protected override string? GetWorkflowInstanceId(HttpContext httpContext) - { - return httpContext.Request.Headers["X-Workflow-Instance-ID"].FirstOrDefault(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Selectors/QueryStringHttpCorrelationIdSelector.cs b/src/http/Elsa.Http/Selectors/QueryStringHttpCorrelationIdSelector.cs deleted file mode 100644 index 8c632bbb..00000000 --- a/src/http/Elsa.Http/Selectors/QueryStringHttpCorrelationIdSelector.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Elsa.Http.Abstractions; -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http.Selectors; - -/// -/// Returns the correlation ID from the correlationId query string parameter. -/// -public class QueryStringHttpCorrelationIdSelector : HttpCorrelationIdSelectorBase -{ - /// - protected override string? GetCorrelationId(HttpContext httpContext) - { - return httpContext.Request.Query["correlationId"].FirstOrDefault(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Selectors/QueryStringHttpWorkflowInstanceIdSelector.cs b/src/http/Elsa.Http/Selectors/QueryStringHttpWorkflowInstanceIdSelector.cs deleted file mode 100644 index 32ade85c..00000000 --- a/src/http/Elsa.Http/Selectors/QueryStringHttpWorkflowInstanceIdSelector.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Elsa.Http.Abstractions; -using Microsoft.AspNetCore.Http; - -namespace Elsa.Http.Selectors; - -/// -/// Returns the workflow instance ID from the X-Workflow-Instance-ID header, if any. -/// -public class QueryStringHttpWorkflowInstanceIdSelector : HttpWorkflowInstanceIdSelectorBase -{ - /// - protected override string? GetWorkflowInstanceId(HttpContext httpContext) - { - return httpContext.Request.Query["workflowInstanceId"].FirstOrDefault(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Serialization/HttpHeadersConverter.cs b/src/http/Elsa.Http/Serialization/HttpHeadersConverter.cs deleted file mode 100644 index c884eab8..00000000 --- a/src/http/Elsa.Http/Serialization/HttpHeadersConverter.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elsa.Http.Serialization; - -/// -/// A custom JSON converter for HttpHeaders that supports both single and multiple values. -/// -public class HttpHeadersConverter : JsonConverter -{ - /// - public override HttpHeaders Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Expected StartObject token"); - - var headers = new HttpHeaders(); - - while (reader.Read()) - { - if (reader.TokenType == JsonTokenType.EndObject) - return headers; - - if (reader.TokenType != JsonTokenType.PropertyName) - throw new JsonException("Expected a PropertyName token"); - - var key = reader.GetString()!; - reader.Read(); - - // If the next token is not a StartArray token, then we expect a String token. - switch (reader.TokenType) - { - case JsonTokenType.StartArray: - { - var values = new List(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) values.Add(reader.GetString()!); - headers.Add(key, values.ToArray()); - break; - } - case JsonTokenType.String: - { - var singleValue = reader.GetString()!; - headers.Add(key, new[] { singleValue }); - break; - } - default: - throw new JsonException("Expected a String or StartArray token"); - } - } - - throw new JsonException("Expected an EndObject token"); - } - - /// - public override void Write(Utf8JsonWriter writer, HttpHeaders value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - - foreach (var header in value) - { - writer.WritePropertyName(header.Key); - writer.WriteStartArray(); - foreach (var headerValue in header.Value) writer.WriteStringValue(headerValue); - writer.WriteEndArray(); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Serialization/HttpStatusCodeCaseForWorkflowInstanceConverter.cs b/src/http/Elsa.Http/Serialization/HttpStatusCodeCaseForWorkflowInstanceConverter.cs deleted file mode 100644 index b61b38d0..00000000 --- a/src/http/Elsa.Http/Serialization/HttpStatusCodeCaseForWorkflowInstanceConverter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elsa.Http.Serialization; - -/// -/// A custom JSON converter for objects when serializing workflow states. -/// -public class HttpStatusCodeCaseForWorkflowInstanceConverter : JsonConverter -{ - /// - public override HttpStatusCodeCase Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - throw new NotImplementedException(); - } - - /// - public override void Write(Utf8JsonWriter writer, HttpStatusCodeCase value, JsonSerializerOptions options) - { - var properties = value.GetType().GetProperties(); - - writer.WriteStartObject(); - - foreach (var prop in properties) - { - // Don't serialize the Activity property. - if (prop.Name != nameof(HttpStatusCodeCase.Activity)) - { - var propValue = prop.GetValue(value); - writer.WritePropertyName(prop.Name); - JsonSerializer.Serialize(writer, propValue, prop.PropertyType, options); - } - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/CachingHttpWorkflowLookupService.cs b/src/http/Elsa.Http/Services/CachingHttpWorkflowLookupService.cs deleted file mode 100644 index b4d2e63a..00000000 --- a/src/http/Elsa.Http/Services/CachingHttpWorkflowLookupService.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Elsa.Common.Multitenancy; -using JetBrains.Annotations; -using Microsoft.Extensions.Caching.Memory; - -namespace Elsa.Http.Services; - -/// -/// Represents a caching implementation of the IHttpWorkflowLookupService that retrieves workflows using HTTP workflow lookup service and caches the results. -/// -[UsedImplicitly] -public class CachingHttpWorkflowLookupService( - IHttpWorkflowLookupService decoratedService, - IHttpWorkflowsCacheManager cacheManager, - ITenantAccessor tenantAccessor) : IHttpWorkflowLookupService -{ - /// - public async Task FindWorkflowAsync(string bookmarkHash, CancellationToken cancellationToken = default) - { - var tenant = tenantAccessor.Tenant; - var tenantId = tenant?.Id; - var tenantIdPrefix = !string.IsNullOrEmpty(tenantId) ? $"{tenantId}:" : string.Empty; - var key = $"{tenantIdPrefix}http-workflow:{bookmarkHash}"; - var cache = cacheManager.Cache; - return await cache.GetOrCreateAsync(key, async entry => - { - var cachingOptions = cache.CachingOptions.Value; - entry.SetSlidingExpiration(cachingOptions.CacheDuration); - entry.AddExpirationToken(cache.GetToken(cacheManager.GetTriggerChangeTokenKey(bookmarkHash))); - - var result = await decoratedService.FindWorkflowAsync(bookmarkHash, cancellationToken); - - if (result == null) - return null; - - if(result.WorkflowGraph == null) - return result; - - var workflowGraph = result.WorkflowGraph!; - var changeTokenKey = cacheManager.GetWorkflowChangeTokenKey(workflowGraph.Workflow.Identity.DefinitionId); - var changeToken = cache.GetToken(changeTokenKey); - entry.AddExpirationToken(changeToken); - - return result; - }); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/DefaultAbsoluteUrlProvider.cs b/src/http/Elsa.Http/Services/DefaultAbsoluteUrlProvider.cs deleted file mode 100644 index 356c786f..00000000 --- a/src/http/Elsa.Http/Services/DefaultAbsoluteUrlProvider.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Elsa.Http.Options; -using Microsoft.Extensions.Options; - -namespace Elsa.Http.Services; - -/// -public class DefaultAbsoluteUrlProvider : IAbsoluteUrlProvider -{ - private readonly IOptions _options; - - /// - /// Initializes a new instance of the class. - /// - public DefaultAbsoluteUrlProvider(IOptions options) => _options = options; - - /// - public Uri ToAbsoluteUrl(string relativePath) - { - var baseUrl = _options.Value.BaseUrl; - - if (baseUrl == null) - throw new Exception( - "There was no base URL configured, which means no absolute URL can be generated from outside the context of an HTTP request. Please make sure that `HttpActivityOptions` is configured correctly. The configuration key used in most Elsa samples is usually: \"Elsa:Server:BaseUrl\""); - - // To not lose any base path information, we need to ensure that: - // - Base path ends with a slash. - // - Relative path does NOT start with a slash. - var baseUri = new Uri(baseUrl.ToString().TrimEnd('/') + '/'); - relativePath = relativePath.TrimStart('/'); - - return new Uri(baseUri, relativePath); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/DefaultDownloadableManager.cs b/src/http/Elsa.Http/Services/DefaultDownloadableManager.cs deleted file mode 100644 index ee7b6406..00000000 --- a/src/http/Elsa.Http/Services/DefaultDownloadableManager.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Elsa.Http.Contexts; -using Elsa.Http.Options; - -namespace Elsa.Http.Services; - -/// -public class DefaultDownloadableManager : IDownloadableManager -{ - private readonly IEnumerable _providers; - - /// - /// Initializes a new instance of the class. - /// - public DefaultDownloadableManager(IEnumerable providers) - { - _providers = providers.OrderBy(x => x.Priority).ToList(); - } - - /// - public IEnumerable>> GetDownloadablesAsync(object content, DownloadableOptions? options = default, CancellationToken cancellationToken = default) - { - var provider = _providers.FirstOrDefault(x => x.GetSupportsContent(content)); - - if (provider == null) - return []; - - options ??= new(); - var context = new DownloadableContext(this, content, options, cancellationToken); - var downloadables = provider.GetDownloadablesAsync(context); - - return downloadables; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/DefaultHttpEndpointBasePathProvider.cs b/src/http/Elsa.Http/Services/DefaultHttpEndpointBasePathProvider.cs deleted file mode 100644 index de570dbe..00000000 --- a/src/http/Elsa.Http/Services/DefaultHttpEndpointBasePathProvider.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Elsa.Http.Options; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Http.Services; - -[UsedImplicitly] -public class DefaultHttpEndpointBasePathProvider(IOptions options) : IHttpEndpointBasePathProvider -{ - public string GetBasePath() - { - var baseUrl = new Uri(options.Value.BaseUrl.ToString().TrimEnd('/') + '/'); - var basePath = options.Value.BasePath?.ToString().Trim('/'); - var completeBaseUrl = new Uri(baseUrl, basePath); - - return completeBaseUrl.ToString().TrimEnd('/') + '/'; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/DefaultHttpEndpointRoutesProvider.cs b/src/http/Elsa.Http/Services/DefaultHttpEndpointRoutesProvider.cs deleted file mode 100644 index 8669d089..00000000 --- a/src/http/Elsa.Http/Services/DefaultHttpEndpointRoutesProvider.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Elsa.Extensions; -using Elsa.Http.Contexts; -using Elsa.Http.Options; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Http.Services; - -/// -/// Provides a route for an HTTP endpoint based on the specified context. -/// -[UsedImplicitly] -public class DefaultHttpEndpointRoutesProvider(IOptions options) : IHttpEndpointRoutesProvider -{ - public Task> GetRoutesAsync(HttpEndpointRouteProviderContext context) - { - var routes = GetRoutes(context); - return Task.FromResult(routes); - } - - private IEnumerable GetRoutes(HttpEndpointRouteProviderContext context) - { - var routes = new List(); - var path = context.Payload.Path; - - if (string.IsNullOrWhiteSpace(path)) - return routes; - - var routeData = new HttpRouteData(new[] - { - options.Value.BasePath.ToString(), path - }.JoinSegments()); - routes.Add(routeData); - return routes; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/DefaultRouteTableUpdater.cs b/src/http/Elsa.Http/Services/DefaultRouteTableUpdater.cs deleted file mode 100644 index 715e31b5..00000000 --- a/src/http/Elsa.Http/Services/DefaultRouteTableUpdater.cs +++ /dev/null @@ -1,111 +0,0 @@ -using Elsa.Extensions; -using Elsa.Http.Bookmarks; -using Elsa.Http.Contexts; -using Elsa.Workflows; -using Elsa.Workflows.Helpers; -using Elsa.Workflows.Models; -using Elsa.Workflows.Runtime; -using Elsa.Workflows.Runtime.Entities; -using Elsa.Workflows.Runtime.Filters; - -namespace Elsa.Http.Services; - -/// -public class DefaultRouteTableUpdater( - IRouteTable routeTable, - ITriggerStore triggerStore, - IBookmarkStore bookmarkStore, - IHttpEndpointRoutesProvider httpEndpointRoutesProvider) - : IRouteTableUpdater -{ - /// - public async Task UpdateAsync(CancellationToken cancellationToken = default) - { - var stimulusName = HttpStimulusNames.HttpEndpoint; - var triggerFilter = new TriggerFilter - { - Name = stimulusName - }; - var bookmarkFilter = new BookmarkFilter - { - Name = stimulusName - }; - var triggers = (await triggerStore.FindManyAsync(triggerFilter, cancellationToken)).ToList(); - var bookmarks = (await bookmarkStore.FindManyAsync(bookmarkFilter, cancellationToken)).ToList(); - - await AddRoutesAsync(triggers, cancellationToken); - await AddRoutesAsync(bookmarks, cancellationToken); - } - - public async Task AddRoutesAsync(IEnumerable triggers, CancellationToken cancellationToken = default) - { - var httpEndpointTriggers = Filter(triggers).ToList(); - - foreach (var trigger in httpEndpointTriggers) - { - var payload = trigger.GetPayload(); - await AddRoutesAsync(payload, trigger.TenantId, cancellationToken); - } - } - - public async Task AddRoutesAsync(IEnumerable bookmarks, CancellationToken cancellationToken = default) - { - var httpEndpointBookmarks = Filter(bookmarks).ToList(); - - foreach (var bookmark in httpEndpointBookmarks) - { - var payload = bookmark.GetPayload(); - await AddRoutesAsync(payload, bookmark.TenantId, cancellationToken); - } - } - - public async Task AddRoutesAsync(IEnumerable bookmarks, WorkflowExecutionContext workflowExecutionContext, CancellationToken cancellationToken = default) - { - var httpEndpointBookmarks = Filter(bookmarks).ToList(); - - foreach (var bookmark in httpEndpointBookmarks) - { - var payload = bookmark.GetPayload(); - await AddRoutesAsync(payload, workflowExecutionContext.Workflow.Identity.TenantId, cancellationToken); - } - } - - public void RemoveRoutes(IEnumerable triggers) - { - var paths = Filter(triggers).Select(x => x.GetPayload().Path).ToList(); - routeTable.RemoveRange(paths); - } - - public void RemoveRoutes(IEnumerable bookmarks) - { - var paths = Filter(bookmarks).Select(x => x.GetPayload().Path).ToList(); - routeTable.RemoveRange(paths); - } - - private async Task AddRoutesAsync(HttpEndpointBookmarkPayload payload, string? tenantId, CancellationToken cancellationToken) - { - var context = new HttpEndpointRouteProviderContext(payload, tenantId, cancellationToken); - var routes = await httpEndpointRoutesProvider.GetRoutesAsync(context); - - foreach (var route in routes) - routeTable.Add(route); - } - - private static IEnumerable Filter(IEnumerable triggers) - { - var stimulusName = HttpStimulusNames.HttpEndpoint; - return triggers.Where(x => x.Name == stimulusName && x.Payload != null); - } - - private static IEnumerable Filter(IEnumerable bookmarks) - { - var stimulusName = HttpStimulusNames.HttpEndpoint; - return bookmarks.Where(x => x.Name == stimulusName && x.Payload != null); - } - - private static IEnumerable Filter(IEnumerable bookmarks) - { - var stimulusName = HttpStimulusNames.HttpEndpoint; - return bookmarks.Where(x => x.Name == stimulusName && x.Payload != null); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/HttpClientFileDownloader.cs b/src/http/Elsa.Http/Services/HttpClientFileDownloader.cs deleted file mode 100644 index 1b28a016..00000000 --- a/src/http/Elsa.Http/Services/HttpClientFileDownloader.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Elsa.Http.Options; - -namespace Elsa.Http.Services; - -/// -/// A general-purpose downloader of files from a given URL that uses . -/// -public class HttpClientFileDownloader : IFileDownloader -{ - private readonly HttpClient _httpClient; - - /// - /// Initializes a new instance of the class. - /// - public HttpClientFileDownloader(HttpClient httpClient) - { - _httpClient = httpClient; - } - - /// - public async Task DownloadAsync(Uri url, FileDownloadOptions? options = default, CancellationToken cancellationToken = default) - { - var request = new HttpRequestMessage(HttpMethod.Get, url); - - if (options?.ETag != null) - request.Headers.IfNoneMatch.Add(options.ETag); - - if(options?.Range != null) - request.Headers.Range = options.Range; - - return await _httpClient.SendAsync(request, cancellationToken); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/HttpWorkflowLookupService.cs b/src/http/Elsa.Http/Services/HttpWorkflowLookupService.cs deleted file mode 100644 index 1ef3e72e..00000000 --- a/src/http/Elsa.Http/Services/HttpWorkflowLookupService.cs +++ /dev/null @@ -1,53 +0,0 @@ -using Elsa.Workflows.Management; -using Elsa.Workflows.Management.Filters; -using Elsa.Workflows.Models; -using Elsa.Workflows.Runtime; -using Elsa.Workflows.Runtime.Entities; -using Elsa.Workflows.Runtime.Filters; -using Open.Linq.AsyncExtensions; - -namespace Elsa.Http.Services; - -/// -public class HttpWorkflowLookupService(ITriggerStore triggerStore, IWorkflowDefinitionService workflowDefinitionService) : IHttpWorkflowLookupService -{ - /// - public async Task FindWorkflowAsync(string bookmarkHash, CancellationToken cancellationToken = default) - { - var triggers = await FindTriggersAsync(bookmarkHash, cancellationToken).ToList(); - - if (triggers.Count > 1) - return new(null, triggers); - - var trigger = triggers.SingleOrDefault(); - - if (trigger == null) - return default; - - var workflowGraph = await FindWorkflowGraphAsync(trigger, cancellationToken); - - if (workflowGraph == null) - return default; - - return new(workflowGraph, triggers); - } - - private async Task> FindTriggersAsync(string bookmarkHash, CancellationToken cancellationToken) - { - var triggerFilter = new TriggerFilter - { - Hash = bookmarkHash - }; - return await triggerStore.FindManyAsync(triggerFilter, cancellationToken); - } - - private async Task FindWorkflowGraphAsync(StoredTrigger trigger, CancellationToken cancellationToken) - { - var workflowDefinitionVersionId = trigger.WorkflowDefinitionVersionId; - var filter = new WorkflowDefinitionFilter - { - Id = workflowDefinitionVersionId - }; - return await workflowDefinitionService.FindWorkflowGraphAsync(filter, cancellationToken); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/HttpWorkflowsCacheManager.cs b/src/http/Elsa.Http/Services/HttpWorkflowsCacheManager.cs deleted file mode 100644 index 01732c66..00000000 --- a/src/http/Elsa.Http/Services/HttpWorkflowsCacheManager.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Elsa.Caching; -using Elsa.Http.Bookmarks; -using Elsa.Workflows; - -namespace Elsa.Http.Services; - -/// -public class HttpWorkflowsCacheManager(ICacheManager cache, IHasher bookmarkHasher) : IHttpWorkflowsCacheManager -{ - /// - public ICacheManager Cache => cache; - - /// - public async Task EvictWorkflowAsync(string workflowDefinitionId, CancellationToken cancellationToken = default) - { - var changeTokenKey = GetWorkflowChangeTokenKey(workflowDefinitionId); - await cache.TriggerTokenAsync(changeTokenKey, cancellationToken); - } - - /// - public async Task EvictTriggerAsync(string bookmarkHash, CancellationToken cancellationToken = default) - { - var changeTokenKey = GetTriggerChangeTokenKey(bookmarkHash); - await cache.TriggerTokenAsync(changeTokenKey, cancellationToken); - } - - /// - public string GetWorkflowChangeTokenKey(string workflowDefinitionId) => $"{GetType().FullName}:workflow:{workflowDefinitionId}:changeToken"; - - /// - public string GetTriggerChangeTokenKey(string bookmarkHash) => $"{GetType().FullName}:trigger:{bookmarkHash}:changeToken"; - - /// - public string ComputeBookmarkHash(string path, string method) - { - var bookmarkPayload = new HttpEndpointBookmarkPayload(path, method); - return bookmarkHasher.Hash(HttpStimulusNames.HttpEndpoint, bookmarkPayload); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/RouteMatcher.cs b/src/http/Elsa.Http/Services/RouteMatcher.cs deleted file mode 100644 index 4d9de3ae..00000000 --- a/src/http/Elsa.Http/Services/RouteMatcher.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Taken & adapted from https://github.com/markvincze/Stubbery/blob/main/src/Stubbery/RequestMatching/RouteMatcher.cs - -using Elsa.Extensions; -using Microsoft.AspNetCore.Routing; -using Microsoft.AspNetCore.Routing.Template; - -namespace Elsa.Http.Services; - -/// -public class RouteMatcher : IRouteMatcher -{ - /// - public RouteValueDictionary? Match(string routeTemplate, string route) - { - var template = TemplateParser.Parse(routeTemplate); - var matcher = new TemplateMatcher(template, GetDefaults(template)); - var values = new RouteValueDictionary(); - - return matcher.TryMatch(route, values) ? values : null; - } - - private static RouteValueDictionary GetDefaults(RouteTemplate parsedTemplate) - { - var result = new RouteValueDictionary(); - - foreach (var parameter in parsedTemplate.Parameters) - if (parameter.DefaultValue != null) - result.Add(parameter.Name!, parameter.DefaultValue); - - return result; - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/RouteTable.cs b/src/http/Elsa.Http/Services/RouteTable.cs deleted file mode 100644 index 67260a74..00000000 --- a/src/http/Elsa.Http/Services/RouteTable.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Collections; -using System.Collections.Concurrent; -using Elsa.Extensions; -using Microsoft.Extensions.Caching.Memory; -using Microsoft.Extensions.Logging; - -namespace Elsa.Http.Services; - -/// -public class RouteTable(IMemoryCache cache, ILogger logger) : IRouteTable -{ - private static readonly object Key = new(); - - private ConcurrentDictionary Routes => cache.GetOrCreate(Key, _ => new ConcurrentDictionary())!; - - /// - public void Add(string route) - { - Add(new HttpRouteData(route)); - } - - /// - public void Add(HttpRouteData httpRouteData) - { - var route = httpRouteData.Route; - if (route.Contains("//")) - { - logger.LogWarning("Path cannot contain double slashes. Ignoring path: {Path}", route); - return; - } - - var normalizedRoute = route.NormalizeRoute(); - Routes.TryAdd(normalizedRoute, httpRouteData); - } - - /// - public void Remove(string route) - { - var normalizedRoute = route.NormalizeRoute(); - Routes.TryRemove(normalizedRoute, out _); - } - - /// - public void AddRange(IEnumerable routes) - { - foreach (var route in routes) Add(route); - } - - /// - public void RemoveRange(IEnumerable routes) - { - foreach (var route in routes) Remove(route); - } - - /// - public IEnumerator GetEnumerator() => Routes.Values.GetEnumerator(); - - IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Services/ZipManager.cs b/src/http/Elsa.Http/Services/ZipManager.cs deleted file mode 100644 index d3c9d41b..00000000 --- a/src/http/Elsa.Http/Services/ZipManager.cs +++ /dev/null @@ -1,193 +0,0 @@ -using System.IO.Compression; -using Elsa.Common; -using Elsa.Http.Options; -using FluentStorage.Blobs; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; - -namespace Elsa.Http.Services; - -/// -/// Provides a helper service for zipping downloadable content. -/// -internal class ZipManager -{ - private readonly ISystemClock _clock; - private readonly IFileCacheStorageProvider _fileCacheStorageProvider; - private readonly IOptions _fileCacheOptions; - private readonly ILogger _logger; - - /// - /// Initializes a new instance of the class. - /// - public ZipManager(ISystemClock clock, IFileCacheStorageProvider fileCacheStorageProvider, IOptions fileCacheOptions, ILogger logger) - { - _clock = clock; - _fileCacheStorageProvider = fileCacheStorageProvider; - _fileCacheOptions = fileCacheOptions; - _logger = logger; - } - - public async Task<(Blob, Stream, Action)> CreateAsync( - ICollection>> downloadables, - bool cache, - string? downloadCorrelationId, - string? downloadAsFilename = default, - string? contentType = default, - CancellationToken cancellationToken = default) - { - // Create a temporary file. - var tempFilePath = GetTempFilePath(); - - // Create a zip archive from the downloadables. - await CreateZipArchiveAsync(tempFilePath, downloadables, cancellationToken); - - // Create a blob with metadata for resuming the download. - var zipBlob = CreateBlob(tempFilePath, downloadAsFilename, contentType); - - // If resumable downloads are enabled, cache the file. - if (cache && !string.IsNullOrWhiteSpace(downloadCorrelationId)) - await CreateCachedZipBlobAsync(tempFilePath, downloadCorrelationId, downloadAsFilename, contentType, cancellationToken); - - var zipStream = File.OpenRead(tempFilePath); - return (zipBlob, zipStream, () => Cleanup(tempFilePath)); - } - - /// - /// Loads a cached zip blob for the specified download correlation ID. - /// - /// The download correlation ID. - /// An optional cancellation token. - /// A tuple containing the blob and the stream. - public async Task<(Blob, Stream)?> LoadAsync(string downloadCorrelationId, CancellationToken cancellationToken = default) - { - var fileCacheStorage = _fileCacheStorageProvider.GetStorage(); - var fileCacheFilename = $"{downloadCorrelationId}.tmp"; - var blob = await fileCacheStorage.GetBlobAsync(fileCacheFilename, cancellationToken); - - if (blob == null) - return null; - - // Check if the blob has expired. - var expiresAt = DateTimeOffset.Parse(blob.Metadata["ExpiresAt"]); - - if (_clock.UtcNow > expiresAt) - { - // File expired. Try to delete it. - try - { - await fileCacheStorage.DeleteAsync(blob.FullPath, cancellationToken); - } - catch (Exception e) - { - _logger.LogWarning(e, "Failed to delete expired file {FullPath}", blob.FullPath); - } - - return null; - } - - var stream = await fileCacheStorage.OpenReadAsync(blob.FullPath, cancellationToken); - return (blob, stream); - } - - /// - /// Creates a zip archive from the specified instances. - /// - private async Task CreateZipArchiveAsync(string filePath, IEnumerable>> downloadables, CancellationToken cancellationToken = default) - { - var currentFileIndex = 0; - - // Write the zip archive to the temporary file. - await using var tempFileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.Read, bufferSize: 4096, useAsync: true); - - using var zipArchive = new ZipArchive(tempFileStream, ZipArchiveMode.Create, true); - foreach (var downloadableFunc in downloadables) - { - var downloadable = await downloadableFunc(); - var entryName = !string.IsNullOrWhiteSpace(downloadable.Filename) ? downloadable.Filename : $"file-{currentFileIndex}.bin"; - var entry = zipArchive.CreateEntry(entryName); - var fileStream = downloadable.Stream; - await using var entryStream = entry.Open(); - await fileStream.CopyToAsync(entryStream, cancellationToken); - await entryStream.FlushAsync(cancellationToken); - entryStream.Close(); - currentFileIndex++; - } - } - - /// - /// Creates a cached zip blob for the specified file. - /// - /// The full path of the file to upload. - /// The download correlation ID. - /// The filename to use when downloading the file. - /// The content type of the file. - /// An optional cancellation token. - private async Task CreateCachedZipBlobAsync(string localPath, string downloadCorrelationId, string? downloadAsFilename = default, string? contentType = default, CancellationToken cancellationToken = default) - { - var fileCacheStorage = _fileCacheStorageProvider.GetStorage(); - var fileCacheFilename = $"{downloadCorrelationId}.tmp"; - var expiresAt = _clock.UtcNow.Add(_fileCacheOptions.Value.TimeToLive); - var cachedBlob = CreateBlob(fileCacheFilename, downloadAsFilename, contentType, expiresAt); - await fileCacheStorage.WriteFileAsync(fileCacheFilename, localPath, cancellationToken); - await fileCacheStorage.SetBlobAsync(cachedBlob, cancellationToken: cancellationToken); - } - - /// - /// Creates a blob for the specified file. - /// - /// The full path of the file. - /// The filename to use when downloading the file. - /// The content type of the file. - /// The date and time at which the file expires. - /// The blob. - private Blob CreateBlob(string fullPath, string? downloadAsFilename, string? contentType, DateTimeOffset? expiresAt = default) - { - (downloadAsFilename, contentType) = GetDownloadableMetadata(downloadAsFilename, contentType); - - var now = _clock.UtcNow; - - var blob = new Blob(fullPath) - { - Metadata = - { - ["ContentType"] = contentType, - ["Filename"] = downloadAsFilename - }, - CreatedTime = now, - LastModificationTime = now - }; - - if(expiresAt.HasValue) - blob.Metadata["ExpiresAt"] = expiresAt.Value.ToString("O"); - - return blob; - } - - private (string downloadAsFilename, string contentType) GetDownloadableMetadata(string? contentType, string? downloadAsFilename) - { - contentType = !string.IsNullOrWhiteSpace(contentType) ? contentType : System.Net.Mime.MediaTypeNames.Application.Zip; - downloadAsFilename = !string.IsNullOrWhiteSpace(downloadAsFilename) ? downloadAsFilename : "download.zip"; - - return (downloadAsFilename, contentType); - } - - private string GetTempFilePath() - { - var tempFileName = Path.GetRandomFileName(); - var tempFilePath = Path.Combine(_fileCacheOptions.Value.LocalCacheDirectory, tempFileName); - return tempFilePath; - } - - private void Cleanup(string filePath) - { - try - { - File.Delete(filePath); - } - catch (Exception e) - { - _logger.LogWarning(e, "Failed to delete temporary file {TempFilePath}", filePath); - } - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/Tasks/UpdateRouteTableStartupTask.cs b/src/http/Elsa.Http/Tasks/UpdateRouteTableStartupTask.cs deleted file mode 100644 index 2076b113..00000000 --- a/src/http/Elsa.Http/Tasks/UpdateRouteTableStartupTask.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Elsa.Common; -using JetBrains.Annotations; - -namespace Elsa.Http.Tasks; - -/// -/// Update the route table based on workflow triggers and bookmarks. -/// -[UsedImplicitly] -public class UpdateRouteTableStartupTask(IRouteTableUpdater routeTableUpdater) : IStartupTask -{ - public async Task ExecuteAsync(CancellationToken stoppingToken) - { - await routeTableUpdater.UpdateAsync(stoppingToken); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/UIHints/HttpContentTypeOptionsProvider.cs b/src/http/Elsa.Http/UIHints/HttpContentTypeOptionsProvider.cs deleted file mode 100644 index fee5eb3a..00000000 --- a/src/http/Elsa.Http/UIHints/HttpContentTypeOptionsProvider.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using Elsa.Http.ContentWriters; -using Elsa.Workflows.UIHints.Dropdown; - -namespace Elsa.Http.UIHints; - -/// -/// Provides options for the activity's property. -/// -public class HttpContentTypeOptionsProvider : DropDownOptionsProviderBase -{ - private readonly IEnumerable _httpContentFactories; - - /// - /// Creates a new instance of the class. - /// - public HttpContentTypeOptionsProvider(IEnumerable httpContentFactories) - { - _httpContentFactories = httpContentFactories; - } - - /// - protected override ValueTask> GetItemsAsync(PropertyInfo propertyInfo, object? context, CancellationToken cancellationToken) - { - var contentTypes = _httpContentFactories.SelectMany(x => x.SupportedContentTypes).Distinct().OrderBy(x => x).ToArray(); - var selectListItems = new List { new("", "") }; - - selectListItems.AddRange(contentTypes.Select(x => new SelectListItem(x, x))); - - return new(selectListItems); - } -} \ No newline at end of file diff --git a/src/http/Elsa.Http/UIHints/HttpEndpointPathUIHandler.cs b/src/http/Elsa.Http/UIHints/HttpEndpointPathUIHandler.cs deleted file mode 100644 index dde37b6d..00000000 --- a/src/http/Elsa.Http/UIHints/HttpEndpointPathUIHandler.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Reflection; -using Elsa.Workflows; -using Elsa.Workflows.UIHints; -using Elsa.Workflows.UIHints.SingleLine; - -namespace Elsa.Http.UIHints; - -/// -/// Provides additional options for the Path input field. -/// -public class HttpEndpointPathUIHandler(IHttpEndpointBasePathProvider httpEndpointBasePathProvider) : IPropertyUIHandler -{ - /// - public ValueTask> GetUIPropertiesAsync(PropertyInfo propertyInfo, object? context, CancellationToken cancellationToken = default) - { - var completeBaseUrl = httpEndpointBasePathProvider.GetBasePath(); - - return new(new Dictionary - { - [InputUIHints.SingleLine] = new SingleLineProps - { - AdornmentText = completeBaseUrl, - EnableCopyAdornment = true - }, - ["Refresh"] = true - }); - } -} \ No newline at end of file diff --git a/src/orchardcore/Elsa.OrchardCore/Elsa.OrchardCore.csproj b/src/orchardcore/Elsa.OrchardCore/Elsa.OrchardCore.csproj index e636179f..acf7b577 100644 --- a/src/orchardcore/Elsa.OrchardCore/Elsa.OrchardCore.csproj +++ b/src/orchardcore/Elsa.OrchardCore/Elsa.OrchardCore.csproj @@ -6,10 +6,13 @@ elsa extension module orchardcore - + + + + + - diff --git a/src/persistence/Elsa.Persistence.MongoDb/Elsa.Persistence.MongoDb.csproj b/src/persistence/Elsa.Persistence.MongoDb/Elsa.Persistence.MongoDb.csproj index 659c6e40..fb505742 100644 --- a/src/persistence/Elsa.Persistence.MongoDb/Elsa.Persistence.MongoDb.csproj +++ b/src/persistence/Elsa.Persistence.MongoDb/Elsa.Persistence.MongoDb.csproj @@ -9,7 +9,7 @@ - + @@ -20,7 +20,6 @@ - diff --git a/src/runtimes/Elsa.Workflows.Runtime.Distributed/Elsa.Workflows.Runtime.Distributed.csproj b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Elsa.Workflows.Runtime.Distributed.csproj new file mode 100644 index 00000000..f7e338c9 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Elsa.Workflows.Runtime.Distributed.csproj @@ -0,0 +1,18 @@ + + + + + Provides distributed workflow runtime functionality. + + elsa extensions module workflows distributed runtime + + + + + + + + + + + \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Elsa.Scripting.JavaScript.Libraries.csproj.DotSettings b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Elsa.Workflows.Runtime.Distributed.csproj.DotSettings similarity index 85% rename from src/scripting/Elsa.Scripting.JavaScript.Libraries/Elsa.Scripting.JavaScript.Libraries.csproj.DotSettings rename to src/runtimes/Elsa.Workflows.Runtime.Distributed/Elsa.Workflows.Runtime.Distributed.csproj.DotSettings index 3a36d17e..d3ee2fe4 100644 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Elsa.Scripting.JavaScript.Libraries.csproj.DotSettings +++ b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Elsa.Workflows.Runtime.Distributed.csproj.DotSettings @@ -1,2 +1,2 @@  - True \ No newline at end of file + True \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.Distributed/Extensions/ModuleExtensions.cs b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Extensions/ModuleExtensions.cs new file mode 100644 index 00000000..ee090074 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Extensions/ModuleExtensions.cs @@ -0,0 +1,13 @@ +using Elsa.Workflows.Runtime.Distributed.Features; +using Elsa.Workflows.Runtime.Features; + +namespace Elsa.Workflows.Runtime.Distributed.Extensions; + +public static class ModuleExtensions +{ + public static WorkflowRuntimeFeature UseDistributedRuntime(this WorkflowRuntimeFeature feature, Action? configure = default) + { + feature.Module.Configure(configure); + return feature; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.Distributed/Features/DistributedRuntimeFeature.cs b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Features/DistributedRuntimeFeature.cs new file mode 100644 index 00000000..0e05eca4 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Features/DistributedRuntimeFeature.cs @@ -0,0 +1,39 @@ +using Elsa.Extensions; +using Elsa.Features.Abstractions; +using Elsa.Features.Attributes; +using Elsa.Features.Services; +using Elsa.Workflows.Runtime.Features; +using Elsa.Workflows.Runtime.Handlers; +using Microsoft.Extensions.DependencyInjection; + +namespace Elsa.Workflows.Runtime.Distributed.Features; + +/// +/// Installs and configures workflow runtime features. +/// +[DependsOn(typeof(WorkflowRuntimeFeature))] +public class DistributedRuntimeFeature : FeatureBase +{ + /// + public DistributedRuntimeFeature(IModule module) : base(module) + { + } + + public override void Configure() + { + Module.UseWorkflowRuntime(runtime => + { + runtime.WorkflowRuntime = sp => sp.GetRequiredService(); + runtime.BookmarkQueueWorker = sp => sp.GetRequiredService(); + }); + } + + /// + public override void Apply() + { + Services + .AddScoped() + .AddScoped() + .AddCommandHandler(); + } +} \ No newline at end of file diff --git a/src/caching/Elsa.Caching/FodyWeavers.xml b/src/runtimes/Elsa.Workflows.Runtime.Distributed/FodyWeavers.xml similarity index 100% rename from src/caching/Elsa.Caching/FodyWeavers.xml rename to src/runtimes/Elsa.Workflows.Runtime.Distributed/FodyWeavers.xml diff --git a/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedBookmarkQueueWorker.cs b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedBookmarkQueueWorker.cs new file mode 100644 index 00000000..3021aa4e --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedBookmarkQueueWorker.cs @@ -0,0 +1,25 @@ +using Medallion.Threading; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; + +namespace Elsa.Workflows.Runtime.Distributed; + +public class DistributedBookmarkQueueWorker( + IDistributedLockProvider distributedLockProvider, + IBookmarkQueueSignaler signaler, + IServiceScopeFactory scopeFactory, + ILogger logger) : BookmarkQueueWorker(signaler, scopeFactory, logger) +{ + protected override async Task ProcessAsync(CancellationToken cancellationToken) + { + await using var handle = await distributedLockProvider.TryAcquireLockAsync(nameof(DistributedBookmarkQueueWorker), default, cancellationToken); + + if (handle == null) + { + logger.LogInformation("Could not acquire lock for distributed bookmark queue worker. This is usually an indication that another application instance is already processing."); + return; + } + + await base.ProcessAsync(cancellationToken); + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedWorkflowClient.cs b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedWorkflowClient.cs new file mode 100644 index 00000000..d483819a --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedWorkflowClient.cs @@ -0,0 +1,85 @@ +using Elsa.Common.DistributedHosting; +using Elsa.Workflows.Runtime.Messages; +using Elsa.Workflows.State; +using Medallion.Threading; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; + +namespace Elsa.Workflows.Runtime.Distributed; + +public class DistributedWorkflowClient( + string workflowInstanceId, + IDistributedLockProvider distributedLockProvider, + IOptions distributedLockingOptions, + IServiceProvider serviceProvider) + : IWorkflowClient +{ + private readonly LocalWorkflowClient _localWorkflowClient = ActivatorUtilities.CreateInstance(serviceProvider, workflowInstanceId); + + public string WorkflowInstanceId => workflowInstanceId; + + public async Task CreateInstanceAsync(CreateWorkflowInstanceRequest request, CancellationToken cancellationToken = default) + { + return await _localWorkflowClient.CreateInstanceAsync(request, cancellationToken); + } + + public async Task RunInstanceAsync(RunWorkflowInstanceRequest request, CancellationToken cancellationToken = default) + { + var result = await WithLockAsync(async () => await _localWorkflowClient.RunInstanceAsync(request, cancellationToken)); + return result; + } + + public async Task CreateAndRunInstanceAsync(CreateAndRunWorkflowInstanceRequest request, CancellationToken cancellationToken = default) + { + var createRequest = new CreateWorkflowInstanceRequest + { + Properties = request.Properties, + CorrelationId = request.CorrelationId, + Name = request.Name, + Input = request.Input, + WorkflowDefinitionHandle = request.WorkflowDefinitionHandle, + ParentId = request.ParentId + }; + var workflowInstance = await _localWorkflowClient.CreateInstanceInternalAsync(createRequest, cancellationToken); + + // We need to lock newly created workflow instances too, because it might dispatch child workflows that attempt to resume the parent workflow. + // For example, when using a DispatchWorkflow activity configured to wait for the dispatched workflow to complete. + return await WithLockAsync(async () => await _localWorkflowClient.RunInstanceAsync(workflowInstance, new() + { + Input = request.Input, + Variables = request.Variables, + Properties = request.Properties, + TriggerActivityId = request.TriggerActivityId, + ActivityHandle = request.ActivityHandle + }, cancellationToken)); + } + + public async Task CancelAsync(CancellationToken cancellationToken = default) + { + await _localWorkflowClient.CancelAsync(cancellationToken); + } + + public async Task ExportStateAsync(CancellationToken cancellationToken = default) + { + return await _localWorkflowClient.ExportStateAsync(cancellationToken); + } + + public async Task ImportStateAsync(WorkflowState workflowState, CancellationToken cancellationToken = default) + { + await _localWorkflowClient.ImportStateAsync(workflowState, cancellationToken); + } + + public async Task InstanceExistsAsync(CancellationToken cancellationToken = default) + { + return await _localWorkflowClient.InstanceExistsAsync(cancellationToken); + } + + private async Task WithLockAsync(Func> func) + { + var lockKey = $"workflow-instance:{WorkflowInstanceId}"; + var lockTimeout = distributedLockingOptions.Value.LockAcquisitionTimeout; + await using var @lock = await distributedLockProvider.AcquireLockAsync(lockKey, lockTimeout); + var result = await func(); + return result; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedWorkflowRuntime.Obsolete.cs b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedWorkflowRuntime.Obsolete.cs new file mode 100644 index 00000000..26b73aaa --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedWorkflowRuntime.Obsolete.cs @@ -0,0 +1,32 @@ +using Elsa.Workflows.Runtime.Entities; +using Elsa.Workflows.Runtime.Filters; +using Elsa.Workflows.Runtime.Matches; +using Elsa.Workflows.Runtime.Options; +using Elsa.Workflows.Runtime.Parameters; +using Elsa.Workflows.Runtime.Params; +using Elsa.Workflows.Runtime.Requests; +using Elsa.Workflows.Runtime.Results; +using Elsa.Workflows.State; + +namespace Elsa.Workflows.Runtime.Distributed; + +public partial class DistributedWorkflowRuntime +{ + private readonly Lazy _obsoleteApi; + private ObsoleteWorkflowRuntime ObsoleteApi => _obsoleteApi.Value; + + public Task CanStartWorkflowAsync(string definitionId, StartWorkflowRuntimeParams? options = null) => ObsoleteApi.CanStartWorkflowAsync(definitionId, options); + public Task StartWorkflowAsync(string definitionId, StartWorkflowRuntimeParams? options = null) => ObsoleteApi.StartWorkflowAsync(definitionId, options); + public Task> StartWorkflowsAsync(string activityTypeName, object bookmarkPayload, TriggerWorkflowsOptions? options = null) => ObsoleteApi.StartWorkflowsAsync(activityTypeName, bookmarkPayload, options); + public Task TryStartWorkflowAsync(string definitionId, StartWorkflowRuntimeParams? options = null) => ObsoleteApi.TryStartWorkflowAsync(definitionId, options); + public Task ResumeWorkflowAsync(string workflowInstanceId, ResumeWorkflowRuntimeParams? options = null) => ObsoleteApi.ResumeWorkflowAsync(workflowInstanceId, options); + public Task> ResumeWorkflowsAsync(string activityTypeName, object bookmarkPayload, TriggerWorkflowsOptions? options = null) => ObsoleteApi.ResumeWorkflowsAsync(activityTypeName, bookmarkPayload, options); + public Task TriggerWorkflowsAsync(string activityTypeName, object bookmarkPayload, TriggerWorkflowsOptions? options = null) => ObsoleteApi.TriggerWorkflowsAsync(activityTypeName, bookmarkPayload, options); + public Task ExecuteWorkflowAsync(WorkflowMatch match, ExecuteWorkflowParams? options = default) => ObsoleteApi.ExecuteWorkflowAsync(match, options); + public Task CancelWorkflowAsync(string workflowInstanceId, CancellationToken cancellationToken = default) => ObsoleteApi.CancelWorkflowAsync(workflowInstanceId, cancellationToken); + public Task> FindWorkflowsAsync(WorkflowsFilter filter, CancellationToken cancellationToken = default) => ObsoleteApi.FindWorkflowsAsync(filter, cancellationToken); + public Task ExportWorkflowStateAsync(string workflowInstanceId, CancellationToken cancellationToken = default) => ObsoleteApi.ExportWorkflowStateAsync(workflowInstanceId, cancellationToken); + public Task ImportWorkflowStateAsync(WorkflowState workflowState, CancellationToken cancellationToken = default) => ObsoleteApi.ImportWorkflowStateAsync(workflowState, cancellationToken); + public Task UpdateBookmarkAsync(StoredBookmark bookmark, CancellationToken cancellationToken = default) => ObsoleteApi.UpdateBookmarkAsync(bookmark, cancellationToken); + public Task CountRunningWorkflowsAsync(CountRunningWorkflowsRequest request, CancellationToken cancellationToken = default) => ObsoleteApi.CountRunningWorkflowsAsync(request, cancellationToken); +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedWorkflowRuntime.cs b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedWorkflowRuntime.cs new file mode 100644 index 00000000..6c932fe6 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.Distributed/Services/DistributedWorkflowRuntime.cs @@ -0,0 +1,36 @@ +using Microsoft.Extensions.DependencyInjection; + +namespace Elsa.Workflows.Runtime.Distributed; + +/// +/// Represents a distributed workflow runtime that can create instances connected to a workflow instance. +/// +public partial class DistributedWorkflowRuntime : IWorkflowRuntime +{ + private readonly IServiceProvider _serviceProvider; + private readonly IIdentityGenerator _identityGenerator; + + /// + /// Represents a distributed workflow runtime that can create instances connected to a workflow instance. + /// + public DistributedWorkflowRuntime(IServiceProvider serviceProvider, IIdentityGenerator identityGenerator) + { + _serviceProvider = serviceProvider; + _identityGenerator = identityGenerator; + _obsoleteApi = new(() => ObsoleteWorkflowRuntime.Create(serviceProvider, CreateClientAsync)); + } + + /// + public async ValueTask CreateClientAsync(CancellationToken cancellationToken = default) + { + return await CreateClientAsync(null, cancellationToken); + } + + /// + public ValueTask CreateClientAsync(string? workflowInstanceId, CancellationToken cancellationToken = default) + { + workflowInstanceId ??= _identityGenerator.GenerateId(); + var client = (IWorkflowClient)ActivatorUtilities.CreateInstance(_serviceProvider, typeof(DistributedWorkflowClient), workflowInstanceId); + return new(client); + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Actors/WorkflowInstance.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Actors/WorkflowInstance.cs new file mode 100644 index 00000000..938d376a --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Actors/WorkflowInstance.cs @@ -0,0 +1,300 @@ +using Elsa.Extensions; +using Elsa.Workflows.Management; +using Elsa.Workflows.Management.Options; +using Elsa.Workflows.Models; +using Elsa.Workflows.Options; +using Elsa.Workflows.Runtime.ProtoActor.Extensions; +using Elsa.Workflows.Runtime.ProtoActor.ProtoBuf; +using Elsa.Workflows.State; +using Microsoft.Extensions.DependencyInjection; +using Proto; +using Proto.Cluster; +using WorkflowDefinitionHandle = Elsa.Workflows.Models.WorkflowDefinitionHandle; + +namespace Elsa.Workflows.Runtime.ProtoActor.Actors; + +internal class WorkflowInstance( + IContext context, + IServiceScopeFactory scopeFactory, + Mappers.Mappers mappers) + : WorkflowInstanceBase(context) +{ + private string? _workflowInstanceId; + private WorkflowGraph? _workflowGraph; + private WorkflowState? _workflowState; + private CancellationTokenSource _linkedTokenSource = null!; + private CancellationToken _linkedCancellationToken; + private readonly Queue _queuedRunWorkflowOptions = new(); + private bool _isRunning; + + + private WorkflowGraph WorkflowGraph + { + get => _workflowGraph!; + set => _workflowGraph = value; + } + + private WorkflowState WorkflowState + { + get => _workflowState!; + set => _workflowState = value; + } + + public override Task OnStarted() + { + _linkedTokenSource = new(); + _linkedCancellationToken = CancellationTokenSource.CreateLinkedTokenSource(Context.CancellationToken, _linkedTokenSource.Token).Token; + return Task.CompletedTask; + } + + public override Task OnStopped() + { + _linkedTokenSource.Dispose(); + return Task.CompletedTask; + } + + public override Task Create(CreateWorkflowInstanceRequest request) => throw new NotImplementedException(); + + public override Task Create(CreateWorkflowInstanceRequest request, Action respond, Action onError) + { + Context.ReenterAfter(CreateAsync(request), result => + { + if (result.IsFaulted) + onError(result.Exception.Message); + else + respond(new()); + }); + + return Task.CompletedTask; + } + + public override Task Run(RunWorkflowInstanceRequest request) => throw new NotImplementedException(); + + public override Task Run(RunWorkflowInstanceRequest request, Action respond, Action onError) + { + var mappedRequest = mappers.RunWorkflowParamsMapper.Map(request); + Context.ReenterAfter(RunAsync(mappedRequest), async completedTask => + { + if (completedTask.IsFaulted) + onError(completedTask.Exception.Message); + else + { + var result = await completedTask; + respond(mappers.RunWorkflowInstanceResponseMapper.Map(result)); + } + }); + + return Task.CompletedTask; + } + + public override Task CreateAndRun(CreateAndRunWorkflowInstanceRequest request) => throw new NotImplementedException(); + + public override Task CreateAndRun(CreateAndRunWorkflowInstanceRequest request, Action respond, Action onError) + { + Context.ReenterAfter(CreateAndRunAsync(request), async completedTask => + { + if (completedTask.IsFaulted) + onError(completedTask.Exception.Message); + else + { + var result = await completedTask; + respond(result); + } + }); + return Task.CompletedTask; + } + + private async Task CreateAsync(CreateWorkflowInstanceRequest request) + { + if (_workflowInstanceId != null) + { + // If a workflow instance ID is already set, this is the cluster trying to repeat this call because it was too slow. + // This happens when debugging and the debugger is paused for a long time, for example. + if (_workflowInstanceId == request.WorkflowInstanceId || request.WorkflowInstanceId == null) + return; + + throw new InvalidOperationException($"Attempted to create a new workflow instance with ID {request.WorkflowInstanceId} while an instance with ID {_workflowInstanceId} is already running."); + } + + await CreateNewWorkflowInstanceAsync(request, Context.CancellationToken); + } + + private async Task CreateAndRunAsync(CreateAndRunWorkflowInstanceRequest request) + { + var createRequest = new CreateWorkflowInstanceRequest + { + WorkflowInstanceId = request.WorkflowInstanceId, + CorrelationId = request.CorrelationId, + Input = request.Input, + ParentId = request.ParentId, + Properties = request.Properties, + WorkflowDefinitionHandle = request.WorkflowDefinitionHandle + }; + + await CreateAsync(createRequest); + + var runWorkflowOptions = new RunWorkflowOptions + { + ActivityHandle = mappers.ActivityHandleMapper.Map(request.ActivityHandle), + Properties = request.Properties.DeserializeProperties(), + Input = request.Input.DeserializeInput(), + CorrelationId = request.CorrelationId.NullIfEmpty(), + TriggerActivityId = request.TriggerActivityId.NullIfEmpty() + }; + + var result = await RunAsync(runWorkflowOptions); + + return mappers.RunWorkflowInstanceResponseMapper.Map(result); + } + + public override Task Stop() + { + // ReSharper disable once MethodHasAsyncOverload + // Don't use PoisonAsync from within the same actor to avoid deadlocks. + Context.Poison(Context.Self); + return Task.CompletedTask; + } + + public override async Task Cancel() + { + await EnsureStateAsync(); + _linkedTokenSource.Cancel(); + await using var scope = scopeFactory.CreateAsyncScope(); + var serviceProvider = scope.ServiceProvider; + var workflowCanceler = serviceProvider.GetRequiredService(); + WorkflowState = await workflowCanceler.CancelWorkflowAsync(WorkflowGraph, WorkflowState, Context.CancellationToken); + var workflowInstanceManager = scope.ServiceProvider.GetRequiredService(); + await workflowInstanceManager.SaveAsync(WorkflowState, Context.CancellationToken); + } + + public override async Task ExportState() + { + await EnsureStateAsync(); + var json = mappers.WorkflowStateJsonMapper.Map(WorkflowState); + return new() + { + SerializedWorkflowState = json + }; + } + + public override async Task ImportState(ImportWorkflowStateRequest request) + { + var workflowState = mappers.WorkflowStateJsonMapper.Map(request.SerializedWorkflowState); + await EnsureStateAsync(); + WorkflowState = workflowState; + await using var scope = scopeFactory.CreateAsyncScope(); + var workflowInstanceManager = scope.ServiceProvider.GetRequiredService(); + await workflowInstanceManager.SaveAsync(WorkflowState, Context.CancellationToken); + } + + public override Task InstanceExists() + { + var exists = _workflowInstanceId != null; + return Task.FromResult(new InstanceExistsResponse + { + Exists = exists + }); + } + + private async Task RunAsync(RunWorkflowOptions runWorkflowOptions) + { + if (_isRunning) + { + _queuedRunWorkflowOptions.Enqueue(runWorkflowOptions); + return new(null!, null!, null!, null); + } + + _isRunning = true; + var workflowResult = await RunInternalAsync(runWorkflowOptions); + _isRunning = false; + + if (_queuedRunWorkflowOptions.Count > 0) + { + var nextRunOptions = _queuedRunWorkflowOptions.Dequeue(); + return await RunAsync(nextRunOptions); + } + + return workflowResult; + } + + private async Task RunInternalAsync(RunWorkflowOptions runWorkflowOptions) + { + await EnsureStateAsync(); + runWorkflowOptions.WorkflowInstanceId = _workflowInstanceId; + + await using var scope = scopeFactory.CreateAsyncScope(); + var workflowRunner = scope.ServiceProvider.GetRequiredService(); + var workflowResult = await workflowRunner.RunAsync(WorkflowGraph, WorkflowState, runWorkflowOptions, _linkedCancellationToken); + WorkflowState = workflowResult.WorkflowState; + var workflowInstanceManager = scope.ServiceProvider.GetRequiredService(); + await workflowInstanceManager.SaveAsync(WorkflowState, Context.CancellationToken); + + return workflowResult; + } + + private async Task EnsureStateAsync() + { + if (_workflowState != null) + return; + + if (_workflowInstanceId == null) + { + // Parse the cluster identity to get the workflow instance ID. + var clusterIdentity = Context.ClusterIdentity()!.Identity; + _workflowInstanceId = clusterIdentity.Split('-').Last(); + } + + var workflowInstance = await FindWorkflowInstanceAsync(_workflowInstanceId, Context.CancellationToken); + + if (workflowInstance == null) + throw new InvalidOperationException($"Workflow instance {_workflowInstanceId} not found."); + + var workflowDefinitionHandle = WorkflowDefinitionHandle.ByDefinitionVersionId(workflowInstance.DefinitionVersionId); + var workflowGraph = await FindWorkflowGraphAsync(workflowDefinitionHandle, Context.CancellationToken); + + WorkflowGraph = workflowGraph; + WorkflowState = workflowInstance.WorkflowState; + } + + private async Task CreateNewWorkflowInstanceAsync(CreateWorkflowInstanceRequest request, CancellationToken cancellationToken) + { + var workflowDefinitionHandle = mappers.WorkflowDefinitionHandleMapper.Map(request.WorkflowDefinitionHandle); + var workflowInstanceId = request.WorkflowInstanceId; + var workflowGraph = await FindWorkflowGraphAsync(workflowDefinitionHandle, cancellationToken); + var workflowInstanceOptions = new WorkflowInstanceOptions + { + WorkflowInstanceId = workflowInstanceId.NullIfEmpty(), + CorrelationId = request.CorrelationId.NullIfEmpty(), + Input = request.Input.DeserializeInput(), + Properties = request.Properties.DeserializeProperties(), + ParentWorkflowInstanceId = request.ParentId.NullIfEmpty() + }; + + await using var scope = scopeFactory.CreateAsyncScope(); + var workflowInstanceManager = scope.ServiceProvider.GetRequiredService(); + var workflowInstance = await workflowInstanceManager.CreateAndCommitWorkflowInstanceAsync(workflowGraph.Workflow, workflowInstanceOptions, cancellationToken); + var workflowState = workflowInstance.WorkflowState; + _workflowInstanceId = workflowState.Id; + WorkflowGraph = workflowGraph; + WorkflowState = workflowInstance.WorkflowState; + } + + private async Task FindWorkflowInstanceAsync(string workflowInstanceId, CancellationToken cancellationToken) + { + var scope = scopeFactory.CreateScope(); + var workflowInstanceManager = scope.ServiceProvider.GetRequiredService(); + return await workflowInstanceManager.FindByIdAsync(workflowInstanceId, cancellationToken); + } + + private async Task FindWorkflowGraphAsync(WorkflowDefinitionHandle workflowDefinitionHandle, CancellationToken cancellationToken) + { + var scope = scopeFactory.CreateScope(); + var workflowDefinitionService = scope.ServiceProvider.GetRequiredService(); + var workflow = await workflowDefinitionService.FindWorkflowGraphAsync(workflowDefinitionHandle, cancellationToken); + + if (workflow == null) + throw new InvalidOperationException($"Workflow {workflowDefinitionHandle} not found."); + + return workflow; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Elsa.Workflows.Runtime.ProtoActor.csproj b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Elsa.Workflows.Runtime.ProtoActor.csproj new file mode 100644 index 00000000..8f948914 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Elsa.Workflows.Runtime.ProtoActor.csproj @@ -0,0 +1,27 @@ + + + + + Provides a workflow runtime using ProtoActor and its out-of-the-box memory provider. + + elsa module runtime protoactor actors + + + + + + + + + + + + + + + + + + + + diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ClusterExtensions.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ClusterExtensions.cs new file mode 100644 index 00000000..7dcea572 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ClusterExtensions.cs @@ -0,0 +1,13 @@ +using Elsa.Workflows.Runtime.ProtoActor.ProtoBuf; +using Proto.Cluster; + +// ReSharper disable once CheckNamespace +namespace Elsa.Extensions; + +internal static class ClusterExtensions +{ + public static WorkflowInstanceClient GetNamedWorkflowInstanceClient(this Cluster cluster, string workflowInstanceId) + { + return cluster.GetWorkflowInstance($"{nameof(WorkflowInstanceActor)}-{workflowInstanceId}"); + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ProtoInputExtensions.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ProtoInputExtensions.cs new file mode 100644 index 00000000..dbf3e798 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ProtoInputExtensions.cs @@ -0,0 +1,15 @@ +using Elsa.Workflows.Runtime.ProtoActor.ProtoBuf; + +namespace Elsa.Workflows.Runtime.ProtoActor.Extensions; + +internal static class ProtoInputExtensions +{ + public static IDictionary DeserializeInput(this Input input) => input.Data.Deserialize(); + + public static Input SerializeInput(this IDictionary input) + { + var result = new Input(); + input.Serialize(result.Data); + return result; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ProtoJsonMapExtensions.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ProtoJsonMapExtensions.cs new file mode 100644 index 00000000..45d50d04 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ProtoJsonMapExtensions.cs @@ -0,0 +1,28 @@ +using System.Text.Json; +using Elsa.Workflows.Runtime.ProtoActor.ProtoBuf; +using Elsa.Workflows.Serialization.Converters; +using Google.Protobuf.Collections; + +namespace Elsa.Workflows.Runtime.ProtoActor.Extensions; + +internal static class ProtoJsonMapExtensions +{ + public static IDictionary Deserialize(this MapField input) + { + var jsonSerializerOptions = new JsonSerializerOptions(); + jsonSerializerOptions.Converters.Add(new ExpandoObjectConverterFactory()); + + return input.ToDictionary(x => x.Key, x => JsonSerializer.Deserialize(x.Value.Text, jsonSerializerOptions)!); + } + + public static void Serialize(this IDictionary input, MapField target) + { + foreach (var (key, value) in input) + { + target[key] = new Json + { + Text = JsonSerializer.Serialize(value) + }; + } + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ProtoPropertiesExtensions.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ProtoPropertiesExtensions.cs new file mode 100644 index 00000000..e467a4d9 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/ProtoPropertiesExtensions.cs @@ -0,0 +1,15 @@ +using Elsa.Workflows.Runtime.ProtoActor.ProtoBuf; + +namespace Elsa.Workflows.Runtime.ProtoActor.Extensions; + +public static class ProtoPropertiesExtensions +{ + public static IDictionary DeserializeProperties(this Properties properties) => properties.Data.Deserialize(); + + public static Properties SerializeProperties(this IDictionary properties) + { + var result = new Properties(); + properties.Serialize(result.Data); + return result; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/WorkflowRuntimeFeatureExtensions.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/WorkflowRuntimeFeatureExtensions.cs new file mode 100644 index 00000000..4f0c9df7 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Extensions/WorkflowRuntimeFeatureExtensions.cs @@ -0,0 +1,22 @@ +using Elsa.Workflows.Runtime.ProtoActor.Features; +using Elsa.Workflows.Runtime.Features; +using JetBrains.Annotations; + +// ReSharper disable once CheckNamespace +namespace Elsa.Extensions; + +/// +/// Provides extension methods on . +/// +[PublicAPI] +public static class WorkflowRuntimeFeatureExtensions +{ + /// + /// Enable & configure the . + /// + public static WorkflowRuntimeFeature UseProtoActor(this WorkflowRuntimeFeature feature, Action? configure = default) + { + feature.Module.Configure(configure); + return feature; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Features/ProtoActorWorkflowRuntimeFeature.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Features/ProtoActorWorkflowRuntimeFeature.cs new file mode 100644 index 00000000..42b35caf --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Features/ProtoActorWorkflowRuntimeFeature.cs @@ -0,0 +1,69 @@ +using Elsa.Features.Abstractions; +using Elsa.Features.Attributes; +using Elsa.Features.Services; +using Elsa.Actors.ProtoActor; +using Elsa.Actors.ProtoActor.Features; +using Elsa.Workflows.Runtime.ProtoActor.ProtoBuf; +using Elsa.Workflows.Features; +using Elsa.Workflows.Runtime.Features; +using Elsa.Workflows.Runtime.ProtoActor.Actors; +using Elsa.Workflows.Runtime.ProtoActor.Mappers; +using Elsa.Workflows.Runtime.ProtoActor.Providers; +using Elsa.Workflows.Runtime.ProtoActor.Services; +using Microsoft.Extensions.DependencyInjection; + +namespace Elsa.Workflows.Runtime.ProtoActor.Features; + +/// +/// Installs the Proto Actor feature to host & execute workflow instances. +/// +[DependsOn(typeof(WorkflowsFeature))] +[DependsOn(typeof(WorkflowRuntimeFeature))] +[DependsOn(typeof(ProtoActorFeature))] +public class ProtoActorWorkflowRuntimeFeature : FeatureBase +{ + /// + public ProtoActorWorkflowRuntimeFeature(IModule module) : base(module) + { + } + + /// + public override void Configure() + { + // Configure runtime with ProtoActor workflow runtime. + Module.Configure().WorkflowRuntime = sp => ActivatorUtilities.CreateInstance(sp); + } + + /// + public override void Apply() + { + var services = Services; + + // Mappers. + services + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton(); + + // Actor Providers. + services.AddSingleton(); + + // Actors. + services + .AddTransient(sp => new WorkflowInstanceActor((context, _) => ActivatorUtilities.CreateInstance(sp, context))); + + // Distributed runtime. + services.AddSingleton(); + } +} \ No newline at end of file diff --git a/src/http/Elsa.Http/FodyWeavers.xml b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/FodyWeavers.xml similarity index 100% rename from src/http/Elsa.Http/FodyWeavers.xml rename to src/runtimes/Elsa.Workflows.Runtime.ProtoActor/FodyWeavers.xml diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/ActivityHandleMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/ActivityHandleMapper.cs new file mode 100644 index 00000000..cc0a9c34 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/ActivityHandleMapper.cs @@ -0,0 +1,49 @@ +using Elsa.Extensions; +using Elsa.Workflows.Runtime.ProtoActor.Extensions; +using Elsa.Workflows.Models; +using ProtoActivityHandle = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.ActivityHandle; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +/// +/// Maps to . +/// +public class ActivityHandleMapper +{ + /// + /// Maps to . + /// + public ProtoActivityHandle? Map(ActivityHandle? source) + { + if (source == null) + return null; + + return new() + { + ActivityId = source.ActivityId.EmptyIfNull(), + ActivityHash = source.ActivityHash.EmptyIfNull(), + ActivityInstanceId = source.ActivityInstanceId.EmptyIfNull(), + ActivityNodeId = source.ActivityNodeId.EmptyIfNull(), + }; + } + + /// + /// Maps to . + /// + public ActivityHandle? Map(ProtoActivityHandle source) + { + if (string.IsNullOrEmpty(source.ActivityHash) + && string.IsNullOrEmpty(source.ActivityId) + && string.IsNullOrEmpty(source.ActivityInstanceId) + && string.IsNullOrEmpty(source.ActivityNodeId)) + return null; + + return new ActivityHandle + { + ActivityId = source.ActivityId, + ActivityHash = source.ActivityHash, + ActivityInstanceId = source.ActivityInstanceId, + ActivityNodeId = source.ActivityNodeId, + }; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/ActivityIncidentMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/ActivityIncidentMapper.cs new file mode 100644 index 00000000..964b81c2 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/ActivityIncidentMapper.cs @@ -0,0 +1,58 @@ +using Elsa.Workflows.Models; +using ProtoActivityIncident = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.ActivityIncident; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +/// +/// Maps to . +/// +public class ActivityIncidentMapper(ExceptionMapper exceptionMapper) +{ + /// + /// Maps to . + /// + public IEnumerable Map(IEnumerable source) + { + return source.Select(Map); + } + + /// + /// Maps to . + /// + public IEnumerable Map(IEnumerable source) + { + return source.Select(Map); + } + + /// + /// Maps to . + /// + public ProtoActivityIncident Map(ActivityIncident source) + { + return new() + { + ActivityId = source.ActivityId, + ActivityNodeId = source.ActivityNodeId, + ActivityType = source.ActivityType, + Message = source.Message, + Exception = exceptionMapper.Map(source.Exception), + Timestamp = source.Timestamp.ToString() + }; + } + + /// + /// Maps to . + /// + public ActivityIncident Map(ProtoActivityIncident source) + { + return new() + { + ActivityId = source.ActivityId, + ActivityNodeId = source.ActivityNodeId, + ActivityType = source.ActivityType, + Message = source.Message, + Exception = exceptionMapper.Map(source.Exception), + Timestamp = DateTime.Parse(source.Timestamp) + }; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/CreateAndRunWorkflowInstanceRequestMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/CreateAndRunWorkflowInstanceRequestMapper.cs new file mode 100644 index 00000000..0a09719b --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/CreateAndRunWorkflowInstanceRequestMapper.cs @@ -0,0 +1,54 @@ +using Elsa.Extensions; +using Elsa.Workflows.Runtime.ProtoActor.Extensions; +using Elsa.Workflows.Runtime.Messages; +using ProtoCreateAndRunWorkflowInstanceRequest = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.CreateAndRunWorkflowInstanceRequest; +using ProtoInput = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.Input; +using ProtoProperties = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.Properties; +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +/// +/// Maps to and vice versa. +/// +public class CreateAndRunWorkflowInstanceRequestMapper(WorkflowDefinitionHandleMapper workflowDefinitionHandleMapper, ActivityHandleMapper activityHandleMapper) +{ + /// + /// Maps to . + /// + public ProtoCreateAndRunWorkflowInstanceRequest Map(string workflowInstanceId, CreateAndRunWorkflowInstanceRequest? source) + { + if (source == null) + return new(); + + return new() + { + WorkflowDefinitionHandle = workflowDefinitionHandleMapper.Map(source.WorkflowDefinitionHandle), + WorkflowInstanceId = workflowInstanceId.EmptyIfNull(), + CorrelationId = source.CorrelationId.EmptyIfNull(), + Name = source.Name.EmptyIfNull(), + ParentId = source.ParentId.EmptyIfNull(), + Input = source.Input?.SerializeInput() ?? new ProtoInput(), + Properties = source.Properties?.SerializeProperties() ?? new ProtoProperties(), + TriggerActivityId = source.TriggerActivityId.EmptyIfNull(), + ActivityHandle = activityHandleMapper.Map(source?.ActivityHandle) ?? new(), + }; + } + + /// + /// Maps to . + /// + /// + /// + public CreateAndRunWorkflowInstanceRequest Map(ProtoCreateAndRunWorkflowInstanceRequest source) + { + return new() + { + WorkflowDefinitionHandle = workflowDefinitionHandleMapper.Map(source.WorkflowDefinitionHandle), + CorrelationId = source.CorrelationId.NullIfEmpty(), + Name = source.Name.NullIfEmpty(), + ParentId = source.ParentId.NullIfEmpty(), + Input = source.Input?.DeserializeInput(), + Properties = source.Properties?.DeserializeProperties(), + ActivityHandle = activityHandleMapper.Map(source.ActivityHandle), + }; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/CreateWorkflowInstanceRequestMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/CreateWorkflowInstanceRequestMapper.cs new file mode 100644 index 00000000..52d0efef --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/CreateWorkflowInstanceRequestMapper.cs @@ -0,0 +1,52 @@ +using Elsa.Extensions; +using Elsa.Workflows.Runtime.ProtoActor.Extensions; +using Elsa.Workflows.Runtime.Messages; +using ProtoCreateWorkflowInstanceRequest = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.CreateWorkflowInstanceRequest; +using ProtoInput = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.Input; +using ProtoProperties = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.Properties; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +/// +/// Maps to and vice versa. +/// +public class CreateWorkflowInstanceRequestMapper(WorkflowDefinitionHandleMapper workflowDefinitionHandleMapper) +{ + /// + /// Maps to . + /// + public ProtoCreateWorkflowInstanceRequest Map(string workflowInstanceId, CreateWorkflowInstanceRequest? source) + { + if(source == null) + return new(); + + return new() + { + WorkflowDefinitionHandle = workflowDefinitionHandleMapper.Map(source.WorkflowDefinitionHandle), + WorkflowInstanceId = workflowInstanceId, + CorrelationId = source.CorrelationId.EmptyIfNull(), + Name = source.Name.EmptyIfNull(), + ParentId = source.ParentId.EmptyIfNull(), + Input = source.Input?.SerializeInput() ?? new ProtoInput(), + Properties = source.Properties?.SerializeProperties() ?? new ProtoProperties() + }; + } + + /// + /// Maps to . + /// + /// + /// + public CreateWorkflowInstanceRequest Map(ProtoCreateWorkflowInstanceRequest source) + { + return new() + { + WorkflowDefinitionHandle = workflowDefinitionHandleMapper.Map(source.WorkflowDefinitionHandle), + CorrelationId = source.CorrelationId.NullIfEmpty(), + Name = source.Name.NullIfEmpty(), + ParentId = source.ParentId.NullIfEmpty(), + Input = source.Input?.DeserializeInput(), + Properties = source.Properties?.DeserializeProperties() + }; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/CreateWorkflowInstanceResponseMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/CreateWorkflowInstanceResponseMapper.cs new file mode 100644 index 00000000..f988677f --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/CreateWorkflowInstanceResponseMapper.cs @@ -0,0 +1,30 @@ +using Elsa.Workflows.Runtime.Messages; +using ProtoCreateWorkflowInstanceResponse = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.CreateWorkflowInstanceResponse; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +/// +/// Maps to and vice versa. +/// +public class CreateWorkflowInstanceResponseMapper +{ + /// + /// Maps to . + /// + public ProtoCreateWorkflowInstanceResponse Map(CreateWorkflowInstanceResponse? source) + { + if(source == null) + return new(); + + return new(); + } + + /// + /// Maps to . + /// + /// + public CreateWorkflowInstanceResponse Map(ProtoCreateWorkflowInstanceResponse source) + { + return new(); + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/ExceptionMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/ExceptionMapper.cs new file mode 100644 index 00000000..23e8e0d3 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/ExceptionMapper.cs @@ -0,0 +1,29 @@ +using Elsa.Workflows.State; +using ProtoExceptionState = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.ExceptionState; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +public class ExceptionMapper +{ + public ExceptionState? Map(ProtoExceptionState? exception) + { + if (exception == null) + return null; + + return new ExceptionState(Type.GetType(exception.Type)!, exception.Message, exception.StackTrace, exception.InnerException != null ? Map(exception.InnerException) : null); + } + + public ProtoExceptionState? Map(ExceptionState? exception) + { + if (exception == null) + return null; + + return new ProtoExceptionState + { + Type = exception.Type.AssemblyQualifiedName, + Message = exception.Message, + StackTrace = exception.StackTrace, + InnerException = exception.InnerException != null ? Map(exception.InnerException) : null + }; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/Mappers.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/Mappers.cs new file mode 100644 index 00000000..9117bf06 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/Mappers.cs @@ -0,0 +1,88 @@ +using Elsa.Workflows.Models; +using Elsa.Workflows.State; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +/// +/// Contains all mappers used by the ProtoActor implementation. +/// +public class Mappers( + ActivityHandleMapper activityHandleMapper, + WorkflowDefinitionHandleMapper workflowDefinitionHandleMapper, + ActivityIncidentMapper activityIncidentMapper, + ExceptionMapper exceptionMapper, + WorkflowStatusMapper workflowStatusMapper, + WorkflowSubStatusMapper workflowSubStatusMapper, + CreateWorkflowInstanceRequestMapper createWorkflowInstanceRequestMapper, + CreateWorkflowInstanceResponseMapper createWorkflowInstanceResponseMapper, + RunWorkflowInstanceRequestMapper runWorkflowInstanceRequestMapper, + RunWorkflowInstanceResponseMapper runWorkflowInstanceResponseMapper, + CreateAndRunWorkflowInstanceRequestMapper createAndRunWorkflowInstanceRequestMapper, + RunWorkflowParamsMapper runWorkflowParamsMapper, + WorkflowStateJsonMapper workflowStateJsonMapper) +{ + /// + /// Maps between and . + /// + public ActivityHandleMapper ActivityHandleMapper { get; } = activityHandleMapper; + + /// + /// Maps between and . + /// + public WorkflowDefinitionHandleMapper WorkflowDefinitionHandleMapper { get; } = workflowDefinitionHandleMapper; + + /// + /// Maps between and . + /// + public ActivityIncidentMapper ActivityIncidentMapper { get; } = activityIncidentMapper; + + /// + /// Maps between and . + /// + public ExceptionMapper ExceptionMapper { get; } = exceptionMapper; + + /// + /// Maps between and . + /// + public WorkflowStatusMapper WorkflowStatusMapper { get; } = workflowStatusMapper; + + /// + /// Maps between and . + /// + public WorkflowSubStatusMapper WorkflowSubStatusMapper { get; } = workflowSubStatusMapper; + + /// + /// Maps between and . + /// + public CreateWorkflowInstanceRequestMapper CreateWorkflowInstanceRequestMapper { get; } = createWorkflowInstanceRequestMapper; + + /// + /// Maps between and . + /// + public CreateWorkflowInstanceResponseMapper CreateWorkflowInstanceResponseMapper { get; } = createWorkflowInstanceResponseMapper; + + /// + /// Maps between and . + /// + public RunWorkflowInstanceRequestMapper RunWorkflowInstanceRequestMapper { get; } = runWorkflowInstanceRequestMapper; + + /// + /// Maps between and . + /// + public RunWorkflowInstanceResponseMapper RunWorkflowInstanceResponseMapper { get; } = runWorkflowInstanceResponseMapper; + + /// + /// Maps between and . + /// + public CreateAndRunWorkflowInstanceRequestMapper CreateAndRunWorkflowInstanceRequestMapper { get; } = createAndRunWorkflowInstanceRequestMapper; + + /// + /// Maps between and . + /// + public RunWorkflowParamsMapper RunWorkflowParamsMapper { get; } = runWorkflowParamsMapper; + + /// + /// Maps between and . + /// + public WorkflowStateJsonMapper WorkflowStateJsonMapper { get; } = workflowStateJsonMapper; +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/RunWorkflowInstanceRequestMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/RunWorkflowInstanceRequestMapper.cs new file mode 100644 index 00000000..89296648 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/RunWorkflowInstanceRequestMapper.cs @@ -0,0 +1,42 @@ +using Elsa.Extensions; +using Elsa.Workflows.Runtime.ProtoActor.Extensions; +using Elsa.Workflows.Runtime.Messages; +using ProtoRunWorkflowInstanceRequest = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.RunWorkflowInstanceRequest; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +/// +/// Maps to and vice versa. +/// +public class RunWorkflowInstanceRequestMapper(ActivityHandleMapper activityHandleMapper) +{ + /// + /// Maps to . + /// + public ProtoRunWorkflowInstanceRequest Map(RunWorkflowInstanceRequest? source) + { + return new() + { + ActivityHandle = activityHandleMapper.Map(source?.ActivityHandle) ?? new(), + BookmarkId = source?.BookmarkId.EmptyIfNull(), + TriggerActivityId = source?.TriggerActivityId.EmptyIfNull(), + Input = source?.Input?.SerializeInput(), + Properties = source?.Properties?.SerializeProperties(), + }; + } + + /// + /// Maps to . + /// + public RunWorkflowInstanceRequest Map(ProtoRunWorkflowInstanceRequest source) + { + return new() + { + ActivityHandle = activityHandleMapper.Map(source.ActivityHandle), + BookmarkId = source.BookmarkId, + TriggerActivityId = source.TriggerActivityId, + Input = source.Input?.DeserializeInput(), + Properties = source.Properties?.DeserializeProperties(), + }; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/RunWorkflowInstanceResponseMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/RunWorkflowInstanceResponseMapper.cs new file mode 100644 index 00000000..8ae2c535 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/RunWorkflowInstanceResponseMapper.cs @@ -0,0 +1,50 @@ +using Elsa.Extensions; +using Elsa.Workflows.Models; +using Elsa.Workflows.Runtime.Messages; +using ProtoRunWorkflowInstanceResponse = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.RunWorkflowInstanceResponse; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +/// +/// Maps to and vice versa. +/// +public class RunWorkflowInstanceResponseMapper( + WorkflowStatusMapper workflowStatusMapper, + WorkflowSubStatusMapper workflowSubStatusMapper, + ActivityIncidentMapper activityIncidentMapper) +{ + /// + /// Maps to . + /// + public ProtoRunWorkflowInstanceResponse Map(RunWorkflowResult source) + { + if(source.WorkflowState == null!) + return new(); + + var response = new ProtoRunWorkflowInstanceResponse + { + Status = workflowStatusMapper.Map(source.WorkflowState.Status), + SubStatus = workflowSubStatusMapper.Map(source.WorkflowState.SubStatus) + }; + + response.Incidents.AddRange(activityIncidentMapper.Map(source.WorkflowState.Incidents)); + return response; + } + + /// + /// Maps to . + /// + public RunWorkflowInstanceResponse Map(string workflowInstanceId, ProtoRunWorkflowInstanceResponse source) + { + var response = new RunWorkflowInstanceResponse + { + WorkflowInstanceId = workflowInstanceId, + Status = workflowStatusMapper.Map(source.Status), + SubStatus = workflowSubStatusMapper.Map(source.SubStatus), + }; + + response.Incidents.AddRange(activityIncidentMapper.Map(source.Incidents)); + return response; + + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/RunWorkflowParamsMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/RunWorkflowParamsMapper.cs new file mode 100644 index 00000000..88fad377 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/RunWorkflowParamsMapper.cs @@ -0,0 +1,27 @@ +using Elsa.Extensions; +using Elsa.Workflows.Runtime.ProtoActor.Extensions; +using Elsa.Workflows.Options; +using ProtoRunWorkflowInstanceRequest = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.RunWorkflowInstanceRequest; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +/// +/// Maps to . +/// +public class RunWorkflowParamsMapper(ActivityHandleMapper activityHandleMapper) +{ + /// + /// Maps to . + /// + public RunWorkflowOptions Map(ProtoRunWorkflowInstanceRequest source) + { + return new() + { + ActivityHandle = activityHandleMapper.Map(source.ActivityHandle), + BookmarkId = source.BookmarkId?.NullIfEmpty(), + TriggerActivityId = source.TriggerActivityId?.NullIfEmpty(), + Input = source.Input?.DeserializeInput(), + Properties = source.Properties?.DeserializeProperties() + }; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowDefinitionHandleMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowDefinitionHandleMapper.cs new file mode 100644 index 00000000..cc6799cc --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowDefinitionHandleMapper.cs @@ -0,0 +1,43 @@ +using Elsa.Common.Models; +using Elsa.Extensions; +using Elsa.Workflows.Runtime.ProtoActor.Extensions; +using Elsa.Workflows.Models; +using ProtoWorkflowDefinitionHandle = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.WorkflowDefinitionHandle; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +/// +/// Maps to and vice versa. +/// +public class WorkflowDefinitionHandleMapper +{ + /// + /// Maps to . + /// + public ProtoWorkflowDefinitionHandle Map(WorkflowDefinitionHandle? source) + { + if(source == null) + return new(); + + return new() + { + DefinitionId = source.DefinitionId.EmptyIfNull(), + VersionOptions = source.VersionOptions == null ? "" : source.VersionOptions.ToString(), + DefinitionVersionId = source.DefinitionVersionId.EmptyIfNull() + }; + } + + /// + /// Maps to . + /// + public WorkflowDefinitionHandle Map(ProtoWorkflowDefinitionHandle source) + { + return new() + { + DefinitionId = source.DefinitionId.NullIfEmpty(), + VersionOptions = source.VersionOptions != "" ? VersionOptions.FromString(source.VersionOptions) : null, + DefinitionVersionId = source.DefinitionVersionId.NullIfEmpty() + }; + + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowStateJsonMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowStateJsonMapper.cs new file mode 100644 index 00000000..6181d6ed --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowStateJsonMapper.cs @@ -0,0 +1,32 @@ +using Elsa.Workflows.State; +using ProtoJson = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.Json; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +/// +/// Maps between and . +/// +/// +public class WorkflowStateJsonMapper(IWorkflowStateSerializer workflowStateSerializer) +{ + /// + /// Maps the specified to a . + /// + public WorkflowState Map(ProtoJson source) + { + return workflowStateSerializer.Deserialize(source.Text); + } + + /// + /// Maps the specified to a . + /// + public ProtoJson Map(WorkflowState workflowState) + { + var json = workflowStateSerializer.Serialize(workflowState); + + return new ProtoJson + { + Text = json + }; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowStatusMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowStatusMapper.cs new file mode 100644 index 00000000..fdd0c5dc --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowStatusMapper.cs @@ -0,0 +1,26 @@ +using ProtoWorkflowStatus = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.WorkflowStatus; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +public class WorkflowStatusMapper +{ + public WorkflowStatus Map(ProtoWorkflowStatus status) + { + return status switch + { + ProtoWorkflowStatus.Finished => WorkflowStatus.Finished, + ProtoWorkflowStatus.Running => WorkflowStatus.Running, + _ => throw new ArgumentOutOfRangeException(nameof(status), status, null) + }; + } + + public ProtoWorkflowStatus Map(WorkflowStatus status) + { + return status switch + { + WorkflowStatus.Finished => ProtoWorkflowStatus.Finished, + WorkflowStatus.Running => ProtoWorkflowStatus.Running, + _ => throw new ArgumentOutOfRangeException(nameof(status), status, null) + }; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowSubStatusMapper.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowSubStatusMapper.cs new file mode 100644 index 00000000..2d938ccc --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Mappers/WorkflowSubStatusMapper.cs @@ -0,0 +1,34 @@ +using ProtoWorkflowSubStatus = Elsa.Workflows.Runtime.ProtoActor.ProtoBuf.WorkflowSubStatus; + +namespace Elsa.Workflows.Runtime.ProtoActor.Mappers; + +public class WorkflowSubStatusMapper +{ + public WorkflowSubStatus Map(ProtoWorkflowSubStatus subStatus) + { + return subStatus switch + { + ProtoWorkflowSubStatus.Pending => WorkflowSubStatus.Pending, + ProtoWorkflowSubStatus.Faulted => WorkflowSubStatus.Faulted, + ProtoWorkflowSubStatus.Finished => WorkflowSubStatus.Finished, + ProtoWorkflowSubStatus.Cancelled => WorkflowSubStatus.Cancelled, + ProtoWorkflowSubStatus.Executing => WorkflowSubStatus.Executing, + ProtoWorkflowSubStatus.Suspended => WorkflowSubStatus.Suspended, + _ => throw new ArgumentOutOfRangeException(nameof(subStatus), subStatus, null) + }; + } + + public ProtoWorkflowSubStatus Map(WorkflowSubStatus subStatus) + { + return subStatus switch + { + WorkflowSubStatus.Pending => ProtoWorkflowSubStatus.Pending, + WorkflowSubStatus.Faulted => ProtoWorkflowSubStatus.Faulted, + WorkflowSubStatus.Finished => ProtoWorkflowSubStatus.Finished, + WorkflowSubStatus.Cancelled => ProtoWorkflowSubStatus.Cancelled, + WorkflowSubStatus.Executing => ProtoWorkflowSubStatus.Executing, + WorkflowSubStatus.Suspended => ProtoWorkflowSubStatus.Suspended, + _ => throw new ArgumentOutOfRangeException(nameof(subStatus), subStatus, null) + }; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Proto/Shared.proto b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Proto/Shared.proto new file mode 100644 index 00000000..b0119b81 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Proto/Shared.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +option csharp_namespace = "Elsa.Workflows.Runtime.ProtoActor.ProtoBuf"; +package Elsa.Workflows.Runtime.ProtoActor.ProtoBuf; + +import "google/protobuf/empty.proto"; +import "google/protobuf/wrappers.proto"; + +// Shared. +message Json { + string text = 1; +} + +message Input { + map Data = 1; +} + +message Properties { + map Data = 1; +} + +message ExceptionState { + string Type = 1; + string Message = 2; + optional string StackTrace = 3; + optional ExceptionState InnerException = 4; +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Proto/WorkflowInstance.Messages.proto b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Proto/WorkflowInstance.Messages.proto new file mode 100644 index 00000000..909c8c73 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Proto/WorkflowInstance.Messages.proto @@ -0,0 +1,94 @@ +syntax = "proto3"; +option csharp_namespace = "Elsa.Workflows.Runtime.ProtoActor.ProtoBuf"; +package Elsa.Workflows.Runtime.ProtoActor.ProtoBuf; + +import "google/protobuf/empty.proto"; +import "google/protobuf/wrappers.proto"; +import "Shared.proto"; + +message ActivityIncident { + string ActivityId = 1; + string ActivityType = 2; + string Message = 3; + optional ExceptionState Exception = 4; + string Timestamp = 5; // ISO 8601 + string ActivityNodeId = 6; +} + +enum WorkflowStatus { + WorkflowStatusRunning = 0; + WorkflowStatusFinished = 1; +} + +enum WorkflowSubStatus { + WorkflowSubStatusPending = 0; + WorkflowSubStatusExecuting = 1; + WorkflowSubStatusSuspended = 2; + WorkflowSubStatusFinished = 3; + WorkflowSubStatusCancelled = 4; + WorkflowSubStatusFaulted = 5; +} + +message ActivityHandle { + optional string ActivityId = 1; + optional string ActivityNodeId = 2; + optional string ActivityInstanceId = 3; + optional string ActivityHash = 4; +} + +message WorkflowDefinitionHandle { + optional string DefinitionId = 1; + optional string VersionOptions = 2; + optional string DefinitionVersionId = 3; +} + +message CreateWorkflowInstanceRequest{ + WorkflowDefinitionHandle WorkflowDefinitionHandle = 1; + string WorkflowInstanceId = 2; + optional string CorrelationId = 3; + optional string Name = 4; + optional string ParentId = 5; + optional Input input = 6; + optional Properties properties = 7; +} + +message CreateWorkflowInstanceResponse{ +} + +message RunWorkflowInstanceRequest{ + optional string BookmarkId = 1; + optional ActivityHandle ActivityHandle = 2; + optional Input input = 3; + optional Properties properties = 4; + optional string TriggerActivityId = 5; +} + +message RunWorkflowInstanceResponse { + WorkflowStatus Status = 1; + WorkflowSubStatus SubStatus = 2; + repeated ActivityIncident Incidents = 3; +} + +message CreateAndRunWorkflowInstanceRequest{ + WorkflowDefinitionHandle WorkflowDefinitionHandle = 1; + string WorkflowInstanceId = 2; + optional string CorrelationId = 3; + optional string Name = 4; + optional string ParentId = 5; + optional Input input = 6; + optional Properties properties = 7; + optional ActivityHandle ActivityHandle = 8; + optional string TriggerActivityId = 9; +} + +message ExportWorkflowStateResponse { + Json SerializedWorkflowState = 1; +} + +message ImportWorkflowStateRequest { + Json SerializedWorkflowState = 1; +} + +message InstanceExistsResponse { + bool Exists = 1; +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Proto/WorkflowInstance.proto b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Proto/WorkflowInstance.proto new file mode 100644 index 00000000..ded6d1d6 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Proto/WorkflowInstance.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +option csharp_namespace = "Elsa.Workflows.Runtime.ProtoActor.ProtoBuf"; +package Elsa.Workflows.Runtime.ProtoActor.ProtoBuf; + +import "google/protobuf/empty.proto"; +import "google/protobuf/wrappers.proto"; +import "Shared.proto"; +import "WorkflowInstance.Messages.proto"; + +service WorkflowInstance { + rpc Create (CreateWorkflowInstanceRequest) returns (CreateWorkflowInstanceResponse); + rpc Run (RunWorkflowInstanceRequest) returns (RunWorkflowInstanceResponse); + rpc CreateAndRun (CreateAndRunWorkflowInstanceRequest) returns (RunWorkflowInstanceResponse); + rpc Stop (Empty) returns (Empty); + rpc Cancel (Empty) returns (Empty); + rpc ExportState(Empty) returns (ExportWorkflowStateResponse); + rpc ImportState(ImportWorkflowStateRequest) returns (Empty); + rpc InstanceExists(Empty) returns (InstanceExistsResponse); +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Providers/WorkflowInstanceVirtualActorProvider.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Providers/WorkflowInstanceVirtualActorProvider.cs new file mode 100644 index 00000000..8fa86a3a --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Providers/WorkflowInstanceVirtualActorProvider.cs @@ -0,0 +1,23 @@ +using Elsa.Actors.ProtoActor; +using Elsa.Workflows.Runtime.ProtoActor.ProtoBuf; +using Google.Protobuf.Reflection; +using Proto; +using Proto.Cluster; +using Proto.DependencyInjection; + +namespace Elsa.Workflows.Runtime.ProtoActor.Providers; + +public class WorkflowInstanceVirtualActorProvider : VirtualActorsProviderBase +{ + public override IEnumerable GetClusterKinds(ActorSystem system) + { + var props = system.DI().PropsFor(); + yield return new ClusterKind(WorkflowInstanceActor.Kind, props); + } + + public override IEnumerable GetFileDescriptors() + { + yield return SharedReflection.Descriptor; + yield return WorkflowInstanceMessagesReflection.Descriptor; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Services/ProtoActorWorkflowClient.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Services/ProtoActorWorkflowClient.cs new file mode 100644 index 00000000..96a10f51 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Services/ProtoActorWorkflowClient.cs @@ -0,0 +1,99 @@ +using Elsa.Common.Multitenancy; +using Elsa.Extensions; +using Elsa.Actors.ProtoActor; +using Elsa.Workflows.Runtime.ProtoActor.ProtoBuf; +using Elsa.Workflows.State; +using JetBrains.Annotations; +using Proto.Cluster; +using CreateAndRunWorkflowInstanceRequest = Elsa.Workflows.Runtime.Messages.CreateAndRunWorkflowInstanceRequest; +using CreateWorkflowInstanceRequest = Elsa.Workflows.Runtime.Messages.CreateWorkflowInstanceRequest; +using CreateWorkflowInstanceResponse = Elsa.Workflows.Runtime.Messages.CreateWorkflowInstanceResponse; +using RunWorkflowInstanceRequest = Elsa.Workflows.Runtime.Messages.RunWorkflowInstanceRequest; +using RunWorkflowInstanceResponse = Elsa.Workflows.Runtime.Messages.RunWorkflowInstanceResponse; + +namespace Elsa.Workflows.Runtime.ProtoActor.Services; + +/// +/// A workflow client that uses Proto.Actor to communicate with the workflow running in the cluster. +/// +[UsedImplicitly] +public class ProtoActorWorkflowClient : IWorkflowClient +{ + private readonly Mappers.Mappers _mappers; + private readonly ITenantAccessor _tenantAccessor; + private readonly WorkflowInstanceClient _actorClient; + + /// + /// A workflow client that uses Proto.Actor to communicate with the workflow running in the cluster. + /// + public ProtoActorWorkflowClient(string workflowInstanceId, Cluster cluster, Mappers.Mappers mappers, ITenantAccessor tenantAccessor, IWorkflowActivationStrategyEvaluator workflowActivationStrategyEvaluator) + { + WorkflowInstanceId = workflowInstanceId; + _mappers = mappers; + _tenantAccessor = tenantAccessor; + _actorClient = cluster.GetNamedWorkflowInstanceClient(WorkflowInstanceId); + } + + /// + public string WorkflowInstanceId { get; } + + /// + public async Task CreateInstanceAsync(CreateWorkflowInstanceRequest request, CancellationToken cancellationToken = default) + { + var protoRequest = _mappers.CreateWorkflowInstanceRequestMapper.Map(WorkflowInstanceId, request); + var response = await _actorClient.Create(protoRequest, CreateHeaders(), cancellationToken); + return _mappers.CreateWorkflowInstanceResponseMapper.Map(response!); + } + + /// + public async Task RunInstanceAsync(RunWorkflowInstanceRequest request, CancellationToken cancellationToken = default) + { + var protoRequest = _mappers.RunWorkflowInstanceRequestMapper.Map(request); + var response = await _actorClient.Run(protoRequest, CreateHeaders(), cancellationToken); + return _mappers.RunWorkflowInstanceResponseMapper.Map(WorkflowInstanceId, response!); + } + + /// + public async Task CreateAndRunInstanceAsync(CreateAndRunWorkflowInstanceRequest request, CancellationToken cancellationToken = default) + { + var protoRequest = _mappers.CreateAndRunWorkflowInstanceRequestMapper.Map(WorkflowInstanceId, request); + var response = await _actorClient.CreateAndRun(protoRequest, CreateHeaders(), cancellationToken); + return _mappers.RunWorkflowInstanceResponseMapper.Map(WorkflowInstanceId, response!); + } + + /// + public async Task CancelAsync(CancellationToken cancellationToken = default) + { + await _actorClient.Cancel(CreateHeaders(), cancellationToken); + } + + /// + public async Task ExportStateAsync(CancellationToken cancellationToken = default) + { + var response = await _actorClient.ExportState(CreateHeaders(), cancellationToken); + return _mappers.WorkflowStateJsonMapper.Map(response!.SerializedWorkflowState); + } + + /// + public async Task ImportStateAsync(WorkflowState workflowState, CancellationToken cancellationToken = default) + { + var protoJson = _mappers.WorkflowStateJsonMapper.Map(workflowState); + var request = new ImportWorkflowStateRequest + { + SerializedWorkflowState = protoJson + }; + await _actorClient.ImportState(request, CreateHeaders(), cancellationToken); + } + + public Task InstanceExistsAsync(CancellationToken cancellationToken = default) + { + throw new NotImplementedException(); + } + + private IDictionary CreateHeaders() + { + var headers = new Dictionary(); + if (_tenantAccessor.Tenant != null) headers[HeaderNames.TenantId] = _tenantAccessor.Tenant.Id; + return headers; + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Services/ProtoActorWorkflowRuntime.Obsolete.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Services/ProtoActorWorkflowRuntime.Obsolete.cs new file mode 100644 index 00000000..bf559375 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Services/ProtoActorWorkflowRuntime.Obsolete.cs @@ -0,0 +1,32 @@ +using Elsa.Workflows.Runtime.Entities; +using Elsa.Workflows.Runtime.Filters; +using Elsa.Workflows.Runtime.Matches; +using Elsa.Workflows.Runtime.Options; +using Elsa.Workflows.Runtime.Parameters; +using Elsa.Workflows.Runtime.Params; +using Elsa.Workflows.Runtime.Requests; +using Elsa.Workflows.Runtime.Results; +using Elsa.Workflows.State; + +namespace Elsa.Workflows.Runtime.ProtoActor.Services; + +public partial class ProtoActorWorkflowRuntime +{ + private readonly Lazy _obsoleteApi; + private ObsoleteWorkflowRuntime ObsoleteApi => _obsoleteApi.Value; + + public Task CanStartWorkflowAsync(string definitionId, StartWorkflowRuntimeParams? options = null) => ObsoleteApi.CanStartWorkflowAsync(definitionId, options); + public Task StartWorkflowAsync(string definitionId, StartWorkflowRuntimeParams? options = null) => ObsoleteApi.StartWorkflowAsync(definitionId, options); + public Task> StartWorkflowsAsync(string activityTypeName, object bookmarkPayload, TriggerWorkflowsOptions? options = null) => ObsoleteApi.StartWorkflowsAsync(activityTypeName, bookmarkPayload, options); + public Task TryStartWorkflowAsync(string definitionId, StartWorkflowRuntimeParams? options = null) => ObsoleteApi.TryStartWorkflowAsync(definitionId, options); + public Task ResumeWorkflowAsync(string workflowInstanceId, ResumeWorkflowRuntimeParams? options = null) => ObsoleteApi.ResumeWorkflowAsync(workflowInstanceId, options); + public Task> ResumeWorkflowsAsync(string activityTypeName, object bookmarkPayload, TriggerWorkflowsOptions? options = null) => ObsoleteApi.ResumeWorkflowsAsync(activityTypeName, bookmarkPayload, options); + public Task TriggerWorkflowsAsync(string activityTypeName, object bookmarkPayload, TriggerWorkflowsOptions? options = null) => ObsoleteApi.TriggerWorkflowsAsync(activityTypeName, bookmarkPayload, options); + public Task ExecuteWorkflowAsync(WorkflowMatch match, ExecuteWorkflowParams? options = default) => ObsoleteApi.ExecuteWorkflowAsync(match, options); + public Task CancelWorkflowAsync(string workflowInstanceId, CancellationToken cancellationToken = default) => ObsoleteApi.CancelWorkflowAsync(workflowInstanceId, cancellationToken); + public Task> FindWorkflowsAsync(WorkflowsFilter filter, CancellationToken cancellationToken = default) => ObsoleteApi.FindWorkflowsAsync(filter, cancellationToken); + public Task ExportWorkflowStateAsync(string workflowInstanceId, CancellationToken cancellationToken = default) => ObsoleteApi.ExportWorkflowStateAsync(workflowInstanceId, cancellationToken); + public Task ImportWorkflowStateAsync(WorkflowState workflowState, CancellationToken cancellationToken = default) => ObsoleteApi.ImportWorkflowStateAsync(workflowState, cancellationToken); + public Task UpdateBookmarkAsync(StoredBookmark bookmark, CancellationToken cancellationToken = default) => ObsoleteApi.UpdateBookmarkAsync(bookmark, cancellationToken); + public Task CountRunningWorkflowsAsync(CountRunningWorkflowsRequest request, CancellationToken cancellationToken = default) => ObsoleteApi.CountRunningWorkflowsAsync(request, cancellationToken); +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Services/ProtoActorWorkflowRuntime.cs b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Services/ProtoActorWorkflowRuntime.cs new file mode 100644 index 00000000..e97ca003 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Services/ProtoActorWorkflowRuntime.cs @@ -0,0 +1,37 @@ +using Microsoft.Extensions.DependencyInjection; + +namespace Elsa.Workflows.Runtime.ProtoActor.Services; + +/// +/// Represents a Proto.Actor implementation of the workflows runtime. +/// +public partial class ProtoActorWorkflowRuntime : IWorkflowRuntime +{ + private readonly IServiceProvider _serviceProvider; + private readonly IIdentityGenerator _identityGenerator; + + /// + /// Represents a Proto.Actor implementation of the workflows runtime. + /// + public ProtoActorWorkflowRuntime(IServiceProvider serviceProvider, + IIdentityGenerator identityGenerator) + { + _serviceProvider = serviceProvider; + _identityGenerator = identityGenerator; + _obsoleteApi = new(() => ObsoleteWorkflowRuntime.Create(serviceProvider, CreateClientAsync)); + } + + /// + public async ValueTask CreateClientAsync(CancellationToken cancellationToken = default) + { + return await CreateClientAsync(null, cancellationToken); + } + + /// + public ValueTask CreateClientAsync(string? workflowInstanceId, CancellationToken cancellationToken = default) + { + workflowInstanceId ??= _identityGenerator.GenerateId(); + var client = (IWorkflowClient)ActivatorUtilities.CreateInstance(_serviceProvider, typeof(ProtoActorWorkflowClient), workflowInstanceId); + return new(client); + } +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Templates/Grain.tt b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Templates/Grain.tt new file mode 100644 index 00000000..15302a80 --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Templates/Grain.tt @@ -0,0 +1,236 @@ +#nullable enable +#pragma warning disable 1591 +using System; +using System.Threading; +using System.Threading.Tasks; +using Google.Protobuf; +using Proto; +using Proto.Cluster; +using Microsoft.Extensions.DependencyInjection; + +namespace {{CsNamespace}} +{ + public static partial class GrainExtensions + { + {{#each Services}} + public static {{Name}}Client Get{{Name}}(this global::Proto.Cluster.Cluster cluster, string identity) => new {{Name}}Client(cluster, identity); + + public static {{Name}}Client Get{{Name}}(this global::Proto.IContext context, string identity) => new {{Name}}Client(context.System.Cluster(), identity); + {{/each}} + } + + {{#each Services}} + public abstract class {{Name}}Base + { + protected global::Proto.IContext Context { get; } + protected global::Proto.ActorSystem System => Context.System; + protected global::Proto.Cluster.Cluster Cluster => Context.System.Cluster(); + + protected {{Name}}Base(global::Proto.IContext context) + { + Context = context; + } + + public virtual Task OnStarted() => Task.CompletedTask; + public virtual Task OnStopping() => Task.CompletedTask; + public virtual Task OnStopped() => Task.CompletedTask; + public virtual Task OnReceive() => Task.CompletedTask; + + {{#each Methods}} + public virtual async Task {{Name}}({{LeadingParameterDefinition}}Action{{#if UseReturn}}<{{OutputName}}>{{/if}} respond, Action onError) + { + try + { + {{#if UseReturn}} + var res = await {{Name}}({{Parameter}}); + respond(res); + {{else}} + await {{Name}}({{Parameter}}); + respond(); + {{/if}} + } + catch (Exception x) + { + onError(x.ToString()); + } + } + {{/each}} + + {{#each Methods}} + public abstract Task{{#if UseReturn}}<{{OutputName}}>{{/if}} {{Name}}({{SingleParameterDefinition}}); + {{/each}} + } + + public class {{Name}}Client + { + private readonly string _id; + private readonly global::Proto.Cluster.Cluster _cluster; + + public {{Name}}Client(global::Proto.Cluster.Cluster cluster, string id) + { + _id = id; + _cluster = cluster; + } + + {{#each Methods}} + public async Task<{{OutputName}}?> {{Name}}({{LeadingParameterDefinition}}IDictionary headers, CancellationToken ct) + { + var gr = new global::Proto.Cluster.GrainRequestMessage({{Index}}, {{#if UseParameter}}{{Parameter}}{{else}}null{{/if}}); + var envelope = new MessageEnvelope(gr, _cluster.System.Root.Self, new MessageHeader(headers)); + //request the RPC method to be invoked + var res = await _cluster.RequestAsync(_id, {{../Name}}Actor.Kind, envelope, ct); + + return res switch + { + // normal response + {{OutputName}} message => {{#if UseReturn}}message{{else}}global::Proto.Nothing.Instance{{/if}}, + // enveloped response + global::Proto.Cluster.GrainResponseMessage grainResponse => {{#if UseReturn}}({{OutputName}}?)grainResponse.ResponseMessage{{else}}global::Proto.Nothing.Instance{{/if}}, + // error response + global::Proto.Cluster.GrainErrorResponse grainErrorResponse => throw new Exception(grainErrorResponse.Err), + // timeout (when enabled by ClusterConfig.LegacyRequestTimeoutBehavior), othwerwise TimeoutException is thrown + null => null, + // unsupported response + _ => throw new NotSupportedException($"Unknown response type {res.GetType().FullName}") + }; + } + + public async Task<{{OutputName}}?> {{Name}}({{LeadingParameterDefinition}}CancellationToken ct) + { + var gr = new global::Proto.Cluster.GrainRequestMessage({{Index}}, {{#if UseParameter}}{{Parameter}}{{else}}null{{/if}}); + //request the RPC method to be invoked + var res = await _cluster.RequestAsync(_id, {{../Name}}Actor.Kind, gr, ct); + + return res switch + { + // normal response + {{OutputName}} message => {{#if UseReturn}}message{{else}}global::Proto.Nothing.Instance{{/if}}, + // enveloped response + global::Proto.Cluster.GrainResponseMessage grainResponse => {{#if UseReturn}}({{OutputName}}?)grainResponse.ResponseMessage{{else}}global::Proto.Nothing.Instance{{/if}}, + // error response + global::Proto.Cluster.GrainErrorResponse grainErrorResponse => throw new Exception(grainErrorResponse.Err), + // timeout (when enabled by ClusterConfig.LegacyRequestTimeoutBehavior), othwerwise TimeoutException is thrown + null => null, + // unsupported response + _ => throw new NotSupportedException($"Unknown response type {res.GetType().FullName}") + }; + } + + public async Task<{{OutputName}}?> {{Name}}({{LeadingParameterDefinition}}global::Proto.ISenderContext context, CancellationToken ct) + { + var gr = new global::Proto.Cluster.GrainRequestMessage({{Index}}, {{#if UseParameter}}{{Parameter}}{{else}}null{{/if}}); + //request the RPC method to be invoked + var res = await _cluster.RequestAsync(_id, {{../Name}}Actor.Kind, gr, context, ct); + + return res switch + { + // normal response + {{OutputName}} message => {{#if UseReturn}}message{{else}}global::Proto.Nothing.Instance{{/if}}, + // enveloped response + global::Proto.Cluster.GrainResponseMessage grainResponse => {{#if UseReturn}}({{OutputName}}?)grainResponse.ResponseMessage{{else}}global::Proto.Nothing.Instance{{/if}}, + // error response + global::Proto.Cluster.GrainErrorResponse grainErrorResponse => throw new Exception(grainErrorResponse.Err), + // timeout (when enabled by ClusterConfig.LegacyRequestTimeoutBehavior), othwerwise TimeoutException is thrown + null => null, + // unsupported response + _ => throw new NotSupportedException($"Unknown response type {res.GetType().FullName}") + }; + } + {{/each}} + } + + public class {{Name}}Actor : global::Proto.IActor + { + public const string Kind = "{{Kind}}"; + + private {{Name}}Base? _inner; + private global::Proto.IContext? _context; + private readonly Func _innerFactory; + + public {{Name}}Actor(Func innerFactory) + { + _innerFactory = innerFactory; + } + + public async Task ReceiveAsync(global::Proto.IContext context) + { + switch (context.Message) + { + case Started msg: + { + _context = context; + var id = context.Get()!; // Always populated on startup + _inner = _innerFactory(context, id); + await _inner.OnStarted(); + break; + } + case Stopping _: + { + await _inner!.OnStopping(); + break; + } + case Stopped _: + { + await _inner!.OnStopped(); + break; + } + case GrainRequestMessage(var methodIndex, var r): + { + switch (methodIndex) + { + {{#each Methods}} + case {{Index}}: + { + {{#if UseParameter}} + if (r is {{InputName}} input) + { + await _inner!.{{Name}}(input, Respond, OnError); + } + else + { + OnError($"Invalid client contract. Expected {{InputName}}, received {r?.GetType().FullName}"); + } + {{else}} + await _inner!.{{Name}}(Respond, OnError); + {{/if}} + + break; + } + {{/each}} + default: + OnError($"Invalid client contract. Unexpected Index {methodIndex}"); + break; + } + + break; + } + default: + { + await _inner!.OnReceive(); + break; + } + } + } + + private void Respond(T response) where T : global::Google.Protobuf.IMessage => _context!.Respond(response is not null ? response : new global::Proto.Cluster.GrainResponseMessage(response)); + private void Respond() => _context!.Respond(new global::Proto.Cluster.GrainResponseMessage(null)); + private void OnError(string error) => _context!.Respond(new global::Proto.Cluster.GrainErrorResponse { Err = error }); + + public static global::Proto.Cluster.ClusterKind GetClusterKind(Func innerFactory) + => new global::Proto.Cluster.ClusterKind(Kind, global::Proto.Props.FromProducer(() => new {{Name}}Actor(innerFactory))); + + public static global::Proto.Cluster.ClusterKind GetClusterKind(global::System.IServiceProvider serviceProvider, params object[] parameters) where T : {{Name}}Base + => new global::Proto.Cluster.ClusterKind(Kind, global::Proto.Props.FromProducer(() => new {{Name}}Actor((ctx, id) => + { + var allParameters = new object[parameters.Length + 2]; + allParameters[0] = ctx; + allParameters[1] = id; + if (parameters.Length > 0) + { + parameters.CopyTo(allParameters, 2); + } + return global::Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(serviceProvider, allParameters); + }))); + } + {{/each}} +} \ No newline at end of file diff --git a/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Templates/Readme.md b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Templates/Readme.md new file mode 100644 index 00000000..b57c209e --- /dev/null +++ b/src/runtimes/Elsa.Workflows.Runtime.ProtoActor/Templates/Readme.md @@ -0,0 +1,2 @@ +A custom T4 template is used to add an additional method for grain messages that require additional headers. +Headers are used to pass the current tenant ID. \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Activities/RunCSharp/RunCSharp.cs b/src/scripting/Elsa.Scripting.CSharp/Activities/RunCSharp/RunCSharp.cs deleted file mode 100644 index 345e6a71..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Activities/RunCSharp/RunCSharp.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Runtime.CompilerServices; -using Elsa.Scripting.CSharp.Contracts; -using Elsa.Scripting.CSharp.Extensions; -using Elsa.Scripting.CSharp.Models; -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Elsa.Workflows; -using Elsa.Workflows.Attributes; -using Elsa.Workflows.UIHints; -using Elsa.Workflows.Models; - -// ReSharper disable once CheckNamespace -namespace Elsa.Scripting.CSharp.Activities; - -/// -/// Executes C# code. -/// -[Activity("Elsa", "Scripting", "Executes C# code", DisplayName = "Run C#")] -public class RunCSharp : CodeActivity -{ - /// - public RunCSharp([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line) - { - } - - /// - public RunCSharp(string script, [CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : this(source, line) - { - Script = new Input(script); - } - - /// - /// The script to run. - /// - [Input( - Description = "The script to run.", - DefaultSyntax = "CSharp", - UIHint = InputUIHints.CodeEditor, - UIHandler = typeof(RunCSharpOptionsProvider) - )] - public Input Script { get; set; } = new(""); - - /// - /// A list of possible outcomes. Use "SetOutcome(string)" to set the outcome. Use "SetOutcomes(params string[])" to set multiple outcomes. - /// - [Input(Description = "A list of possible outcomes.", UIHint = InputUIHints.DynamicOutcomes)] - public Input> PossibleOutcomes { get; set; } = default!; - - /// - protected override async ValueTask ExecuteAsync(ActivityExecutionContext context) - { - var script = context.Get(Script); - - // If no script was specified, there's nothing to do. - if (string.IsNullOrWhiteSpace(script)) - return; - - // Get a C# evaluator. - var evaluator = context.GetRequiredService(); - - // Run the script. - var options = new ExpressionEvaluatorOptions(); - var result = await evaluator.EvaluateAsync(script, typeof(object), context.ExpressionExecutionContext, options, context.CancellationToken); - - // Set the result as output, if any. - if (result is not null) - context.Set(Result, result); - - // Get the outcome or outcomes set by the script, if any. If not set, use "Done". - var outcomes = context.ExpressionExecutionContext.TransientProperties.GetValueOrDefault(OutcomeProxy.OutcomePropertiesKey, () => new[] { "Done" })!; - - // Complete the activity with the outcome. - await context.CompleteActivityWithOutcomesAsync(outcomes); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Activities/RunCSharp/RunCSharpOptionsProvider.cs b/src/scripting/Elsa.Scripting.CSharp/Activities/RunCSharp/RunCSharpOptionsProvider.cs deleted file mode 100644 index e939a07e..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Activities/RunCSharp/RunCSharpOptionsProvider.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Reflection; -using Elsa.Workflows.UIHints.CodeEditor; - -// ReSharper disable once CheckNamespace -namespace Elsa.Scripting.CSharp.Activities; - -internal class RunCSharpOptionsProvider : CodeEditorOptionsProviderBase -{ - protected override string GetLanguage(PropertyInfo propertyInfo, object? context) => "csharp"; -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Contexts/ScriptConfigurationContext.cs b/src/scripting/Elsa.Scripting.CSharp/Contexts/ScriptConfigurationContext.cs deleted file mode 100644 index d79161c9..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Contexts/ScriptConfigurationContext.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Elsa.Expressions.Models; -using Microsoft.CodeAnalysis.Scripting; - -namespace Elsa.Scripting.CSharp.Contexts; - -/// -/// Context for configuring the . -/// -/// The script. -/// The expression execution context. -public record ScriptConfigurationContext(Script Script, ExpressionExecutionContext ExpressionExecutionContext); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Contexts/ScriptOptionsConfigurationContext.cs b/src/scripting/Elsa.Scripting.CSharp/Contexts/ScriptOptionsConfigurationContext.cs deleted file mode 100644 index 4b279190..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Contexts/ScriptOptionsConfigurationContext.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Elsa.Expressions.Models; -using Microsoft.CodeAnalysis.Scripting; - -namespace Elsa.Scripting.CSharp.Contexts; - -/// -/// Context for configuring the . -/// -/// The script options. -/// The expression execution context. -public record ScriptOptionsConfigurationContext(ScriptOptions ScriptOptions, ExpressionExecutionContext ExpressionExecutionContext); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Contracts/ICSharpEvaluator.cs b/src/scripting/Elsa.Scripting.CSharp/Contracts/ICSharpEvaluator.cs deleted file mode 100644 index 19813915..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Contracts/ICSharpEvaluator.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Elsa.Expressions.Models; -using JetBrains.Annotations; -using Microsoft.CodeAnalysis.Scripting; - -namespace Elsa.Scripting.CSharp.Contracts; - -/// -/// Evaluates C# expressions. -/// -[PublicAPI] -public interface ICSharpEvaluator -{ - /// - /// Evaluates a C# expression. - /// - /// The expression to evaluate. - /// The type of the return value. - /// The context in which the expression is evaluated. - /// A set of options. - /// An optional callback to configure the script options. - /// An optional callback to configure the script. - /// An optional cancellation token. - /// The result of the evaluation. - Task EvaluateAsync( - string expression, - Type returnType, - ExpressionExecutionContext context, - ExpressionEvaluatorOptions options, - Func? configureScriptOptions = default, - Func, Script>? configureScript = default, - CancellationToken cancellationToken = default); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Elsa.Scripting.CSharp.csproj b/src/scripting/Elsa.Scripting.CSharp/Elsa.Scripting.CSharp.csproj deleted file mode 100644 index f285f975..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Elsa.Scripting.CSharp.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Provides a CSharp expression provider. - - elsa extension module expressions scripting csharp - - - - - - - - - diff --git a/src/scripting/Elsa.Scripting.CSharp/Expressions/CSharpExpressionHandler.cs b/src/scripting/Elsa.Scripting.CSharp/Expressions/CSharpExpressionHandler.cs deleted file mode 100644 index 941d404f..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Expressions/CSharpExpressionHandler.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Elsa.Scripting.CSharp.Contracts; -using Elsa.Expressions.Contracts; -using Elsa.Expressions.Helpers; -using Elsa.Expressions.Models; - -namespace Elsa.Scripting.CSharp.Expressions; - -/// -/// Evaluates C# expressions. -/// -public class CSharpExpressionHandler : IExpressionHandler -{ - private readonly ICSharpEvaluator _cSharpEvaluator; - - /// - /// Initializes a new instance of the class. - /// - public CSharpExpressionHandler(ICSharpEvaluator cSharpEvaluator) - { - _cSharpEvaluator = cSharpEvaluator; - } - - /// - public async ValueTask EvaluateAsync(Expression expression, Type returnType, ExpressionExecutionContext context, ExpressionEvaluatorOptions options) - { - var script = expression.Value.ConvertTo() ?? ""; - return await _cSharpEvaluator.EvaluateAsync(script, returnType, context, options); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Extensions/CSharpEvaluatorExtensions.cs b/src/scripting/Elsa.Scripting.CSharp/Extensions/CSharpEvaluatorExtensions.cs deleted file mode 100644 index 9a1632b1..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Extensions/CSharpEvaluatorExtensions.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Elsa.Scripting.CSharp.Contracts; -using Elsa.Expressions.Models; - -namespace Elsa.Scripting.CSharp.Extensions; - -/// -/// Provides extension methods for . -/// -public static class CSharpEvaluatorExtensions -{ - /// - /// Evaluates a C# expression. - /// - /// The evaluator. - /// The expression to evaluate. - /// The type of the return value. - /// The context in which the expression is evaluated. - /// An set of options. - /// An optional cancellation token. - /// The result of the evaluation. - public static async Task EvaluateAsync(this ICSharpEvaluator evaluator, - string expression, - Type returnType, - ExpressionExecutionContext context, - ExpressionEvaluatorOptions options, - CancellationToken cancellationToken = default) - { - return await evaluator.EvaluateAsync(expression, returnType, context, options, null, null, cancellationToken); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Extensions/ModuleExtensions.cs b/src/scripting/Elsa.Scripting.CSharp/Extensions/ModuleExtensions.cs deleted file mode 100644 index 7e431c05..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Extensions/ModuleExtensions.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Elsa.Scripting.CSharp.Features; -using Elsa.Scripting.CSharp.Options; -using Elsa.Features.Services; - -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -/// -/// Adds extensions to that installs the feature. -/// -public static class ModuleExtensions -{ - /// - /// Setup the feature. - /// - public static IModule UseCSharp(this IModule module, Action? configure = default) - { - module.Configure(configure); - return module; - } - - /// - /// Setup the feature. - /// - public static IModule UseCSharp(this IModule module, Action configureOptions) - { - return module.UseCSharp(csharp => csharp.CSharpOptions += configureOptions); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Extensions/VariableNameExtensions.cs b/src/scripting/Elsa.Scripting.CSharp/Extensions/VariableNameExtensions.cs deleted file mode 100644 index 75f51897..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Extensions/VariableNameExtensions.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace Elsa.Scripting.CSharp.Extensions; - -public static class VariableNameExtensions -{ - public static bool IsValidVariableName(this string name) - { - return !string.IsNullOrWhiteSpace(name) && name.All(char.IsLetterOrDigit); - } - - public static bool IsInvalidVariableName(this string name) - { - return !IsValidVariableName(name); - } - - public static IEnumerable FilterInvalidVariableNames(this IEnumerable names) - { - return names.Where(IsValidVariableName); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Features/CSharpFeature.cs b/src/scripting/Elsa.Scripting.CSharp/Features/CSharpFeature.cs deleted file mode 100644 index 30a38b90..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Features/CSharpFeature.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Elsa.Caching.Features; -using Elsa.Common.Features; -using Elsa.Scripting.CSharp.Activities; -using Elsa.Scripting.CSharp.Contracts; -using Elsa.Scripting.CSharp.Options; -using Elsa.Scripting.CSharp.Providers; -using Elsa.Scripting.CSharp.Services; -using Elsa.Expressions.Features; -using Elsa.Extensions; -using Elsa.Features.Abstractions; -using Elsa.Features.Attributes; -using Elsa.Features.Services; -using Elsa.Workflows; -using Microsoft.Extensions.DependencyInjection; - -namespace Elsa.Scripting.CSharp.Features; - -/// -/// Installs C# integration. -/// -[DependsOn(typeof(MediatorFeature))] -[DependsOn(typeof(ExpressionsFeature))] -[DependsOn(typeof(MemoryCacheFeature))] -public class CSharpFeature : FeatureBase -{ - /// - public CSharpFeature(IModule module) : base(module) - { - } - - /// - /// Configures the . - /// - public Action CSharpOptions { get; set; } = _ => { }; - - /// - public override void Apply() - { - Services.Configure(CSharpOptions); - - // C# services. - Services - .AddExpressionDescriptorProvider() - .AddScoped() - ; - - // Handlers. - Services.AddNotificationHandlersFrom(); - - // Activities. - Module.AddActivitiesFrom(); - - // UI property handlers. - Services.AddScoped(); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/FodyWeavers.xml b/src/scripting/Elsa.Scripting.CSharp/FodyWeavers.xml deleted file mode 100644 index 00e1d9a1..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Handlers/AddAssembliesAndReferencesFromOptions.cs b/src/scripting/Elsa.Scripting.CSharp/Handlers/AddAssembliesAndReferencesFromOptions.cs deleted file mode 100644 index f3deb16e..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Handlers/AddAssembliesAndReferencesFromOptions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Elsa.Scripting.CSharp.Notifications; -using Elsa.Scripting.CSharp.Options; -using Elsa.Mediator.Contracts; -using JetBrains.Annotations; -using Microsoft.CodeAnalysis.Scripting; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.CSharp.Handlers; - -/// -/// This handler adds assemblies and namespaces from the to the . -/// -[UsedImplicitly] -public class AddAssembliesAndReferencesFromOptions : INotificationHandler -{ - private readonly CSharpOptions _options; - - /// - /// Initializes a new instance of the class. - /// - public AddAssembliesAndReferencesFromOptions(IOptions options) - { - _options = options.Value; - } - - /// - public Task HandleAsync(EvaluatingCSharp notification, CancellationToken cancellationToken) - { - notification.ConfigureScriptOptions(scriptOptions => scriptOptions - .AddReferences(_options.Assemblies) - .AddImports(_options.Namespaces)); - - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Handlers/ConfigureScriptsFromOptions.cs b/src/scripting/Elsa.Scripting.CSharp/Handlers/ConfigureScriptsFromOptions.cs deleted file mode 100644 index 4fb8b0de..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Handlers/ConfigureScriptsFromOptions.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Elsa.Scripting.CSharp.Notifications; -using Elsa.Scripting.CSharp.Options; -using Elsa.Mediator.Contracts; -using JetBrains.Annotations; -using Microsoft.CodeAnalysis.Scripting; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.CSharp.Handlers; - -/// -/// This handler configures the and from the . -/// -[UsedImplicitly] -public class ConfigureScriptsFromOptions : INotificationHandler -{ - private readonly CSharpOptions _options; - - /// - /// Initializes a new instance of the class. - /// - public ConfigureScriptsFromOptions(IOptions options) - { - _options = options.Value; - } - - /// - public Task HandleAsync(EvaluatingCSharp notification, CancellationToken cancellationToken) - { - foreach (var scriptOptionsCallback in _options.ConfigureScriptOptionsCallbacks) - notification.ScriptOptions = scriptOptionsCallback(notification.ScriptOptions, notification.Context); - - foreach (var scriptCallback in _options.ConfigureScriptCallbacks) - notification.Script = scriptCallback(notification.Script, notification.Context); - - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Handlers/GenerateArgumentAccessors.cs b/src/scripting/Elsa.Scripting.CSharp/Handlers/GenerateArgumentAccessors.cs deleted file mode 100644 index b9a0322e..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Handlers/GenerateArgumentAccessors.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text; -using Elsa.Scripting.CSharp.Extensions; -using Elsa.Scripting.CSharp.Notifications; -using Elsa.Scripting.CSharp.Options; -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Elsa.Mediator.Contracts; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.CSharp.Handlers; - -/// -/// Configures the C# evaluator with methods to access workflow variables. -/// -[UsedImplicitly] -public class GenerateArgumentAccessors(IOptions options) : INotificationHandler -{ - /// - public Task HandleAsync(EvaluatingCSharp notification, CancellationToken cancellationToken) - { - var arguments = notification.Options.Arguments; - var sb = new StringBuilder(); - sb.AppendLine("public partial class ArgumentsProxy {"); - sb.AppendLine("\tpublic ArgumentsProxy(IDictionary arguments) => Arguments = arguments;"); - sb.AppendLine("\tpublic IDictionary Arguments { get; }"); - sb.AppendLine(); - sb.AppendLine("\tpublic T? Get(string name) => Arguments.TryGetValue(name, out var v) ? (T?)v : default;"); - sb.AppendLine(); - - if (!options.Value.DisableWrappers) - { - foreach (var argument in arguments.Where(x => x.Key.IsValidVariableName())) - { - var argumentName = argument.Key; - var variableType = argument.Value.GetType(); - var friendlyTypeName = variableType.GetFriendlyTypeName(Brackets.Angle); - sb.AppendLine($"\tpublic {friendlyTypeName} {argumentName}"); - sb.AppendLine("\t{"); - sb.AppendLine($"\t\tget => Get<{friendlyTypeName}>(\"{argumentName}\");"); - sb.AppendLine("\t}"); - } - } - - sb.AppendLine("}"); - sb.AppendLine("var Args = new ArgumentsProxy(Arguments);"); - notification.AppendScript(sb.ToString()); - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Handlers/GenerateWorkflowInputAccessors.cs b/src/scripting/Elsa.Scripting.CSharp/Handlers/GenerateWorkflowInputAccessors.cs deleted file mode 100644 index 51e89d09..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Handlers/GenerateWorkflowInputAccessors.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Text; -using Elsa.Scripting.CSharp.Extensions; -using Elsa.Scripting.CSharp.Notifications; -using Elsa.Scripting.CSharp.Options; -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Elsa.Mediator.Contracts; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.CSharp.Handlers; - -/// -/// Configures the C# evaluator with methods to access workflow variables. -/// -[UsedImplicitly] -public class GenerateWorkflowInputAccessors(IOptions options) : INotificationHandler -{ - /// - public Task HandleAsync(EvaluatingCSharp notification, CancellationToken cancellationToken) - { - var expressionExecutionContext = notification.Context; - - if (!expressionExecutionContext.TryGetWorkflowExecutionContext(out var workflowExecutionContext)) - return Task.CompletedTask; - - var workflow = workflowExecutionContext.Workflow; - var inputDefinitions = workflow.Inputs.ToList(); - var sb = new StringBuilder(); - sb.AppendLine("public partial class WorkflowInputsProxy {"); - sb.AppendLine("\tpublic WorkflowInputsProxy(ExecutionContextProxy executionContext) => ExecutionContext = executionContext;"); - sb.AppendLine("\tpublic ExecutionContextProxy ExecutionContext { get; }"); - sb.AppendLine(); - sb.AppendLine("\tpublic T? Get(string name) => ExecutionContext.GetInput(name);"); - sb.AppendLine(); - - if (!options.Value.DisableWrappers) - { - foreach (var inputDefinition in inputDefinitions.Where(x => x.Name.IsValidVariableName())) - { - var inputName = inputDefinition.Name; - var variableType = inputDefinition.Type; - var friendlyTypeName = variableType.GetFriendlyTypeName(Brackets.Angle); - sb.AppendLine($"\tpublic {friendlyTypeName} {inputName}"); - sb.AppendLine("\t{"); - sb.AppendLine($"\t\tget => Get<{friendlyTypeName}>(\"{inputName}\");"); - sb.AppendLine("\t}"); - } - } - - sb.AppendLine("}"); - sb.AppendLine("var Inputs = new WorkflowInputsProxy(ExecutionContext);"); // Obsolete; use Input instead. - sb.AppendLine("var Input = Inputs;"); - notification.AppendScript(sb.ToString()); - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Handlers/GenerateWorkflowVariableAccessors.cs b/src/scripting/Elsa.Scripting.CSharp/Handlers/GenerateWorkflowVariableAccessors.cs deleted file mode 100644 index c4fd1a6f..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Handlers/GenerateWorkflowVariableAccessors.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Text; -using Elsa.Scripting.CSharp.Extensions; -using Elsa.Scripting.CSharp.Notifications; -using Elsa.Scripting.CSharp.Options; -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Elsa.Mediator.Contracts; -using Humanizer; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.CSharp.Handlers; - -/// -/// Configures the C# evaluator with methods to access workflow variables. -/// -[UsedImplicitly] -public class GenerateWorkflowVariableAccessors(IOptions options) : INotificationHandler -{ - /// - public Task HandleAsync(EvaluatingCSharp notification, CancellationToken cancellationToken) - { - var expressionExecutionContext = notification.Context; - var variables = expressionExecutionContext.GetVariablesInScope().ToList(); - var sb = new StringBuilder(); - sb.AppendLine("public partial class WorkflowVariablesProxy {"); - sb.AppendLine("\tpublic WorkflowVariablesProxy(ExecutionContextProxy executionContext) => ExecutionContext = executionContext;"); - sb.AppendLine("\tpublic ExecutionContextProxy ExecutionContext { get; }"); - sb.AppendLine(); - sb.AppendLine("\tpublic T? Get(string name) => ExecutionContext.GetVariable(name);"); - sb.AppendLine("\tpublic object? Get(string name) => ExecutionContext.GetVariable(name);"); - sb.AppendLine("\tpublic void Set(string name, object? value) => ExecutionContext.SetVariable(name, value);"); - sb.AppendLine(); - - if (!options.Value.DisableWrappers) - { - foreach (var variable in variables.Where(x => x.Name.IsValidVariableName())) - { - var variableName = variable.Name.Pascalize(); - var variableType = variable.GetVariableType(); - var friendlyTypeName = variableType.GetFriendlyTypeName(Brackets.Angle); - sb.AppendLine($"\tpublic {friendlyTypeName} {variableName}"); - sb.AppendLine("\t{"); - sb.AppendLine($"\t\tget => Get<{friendlyTypeName}>(\"{variableName}\");"); - sb.AppendLine($"\t\tset => Set(\"{variableName}\", value);"); - sb.AppendLine("\t}"); - } - } - - sb.AppendLine("}"); - sb.AppendLine("var Variables = new WorkflowVariablesProxy(ExecutionContext);"); // Obsolete; use Variable instead. - sb.AppendLine("var Variable = Variables;"); - notification.AppendScript(sb.ToString()); - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Models/ExecutionContextProxy.cs b/src/scripting/Elsa.Scripting.CSharp/Models/ExecutionContextProxy.cs deleted file mode 100644 index d90a5a18..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Models/ExecutionContextProxy.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Elsa.Expressions.Helpers; -using Elsa.Expressions.Models; -using Elsa.Extensions; -using JetBrains.Annotations; - -namespace Elsa.Scripting.CSharp.Models; - -/// -/// Provides access to the current execution context. -/// -[UsedImplicitly] -public partial class ExecutionContextProxy -{ - /// - /// Gets the current execution context. - /// - public ExpressionExecutionContext ExpressionExecutionContext { get; } - - /// - /// Initializes a new instance of the class. - /// - public ExecutionContextProxy(ExpressionExecutionContext expressionExecutionContext) - { - ExpressionExecutionContext = expressionExecutionContext; - } - - /// - /// Gets the value of the specified variable. - /// - public T? GetVariable(string name) => ExpressionExecutionContext.GetVariableInScope(name).ConvertTo(); - - /// - /// Gets the value of the specified variable. - /// - public object? GetVariable(string name) => ExpressionExecutionContext.GetVariableInScope(name); - - /// - /// Sets the value of the specified variable. - /// - public void SetVariable(string name, object? value) => ExpressionExecutionContext.SetVariable(name, value); - - /// - /// Gets the value of the specified variable. - /// - public T? GetInput(string name) => ExpressionExecutionContext.GetInput(name); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Models/Globals.cs b/src/scripting/Elsa.Scripting.CSharp/Models/Globals.cs deleted file mode 100644 index f1c10b24..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Models/Globals.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Elsa.Expressions.Models; -using Elsa.Extensions; -using JetBrains.Annotations; - -namespace Elsa.Scripting.CSharp.Models; - -/// -/// Provides access to global objects, such as the workflow execution context. -/// -[UsedImplicitly] -public partial class Globals -{ - /// - /// Initializes a new instance of the class. - /// - public Globals(ExpressionExecutionContext expressionExecutionContext, IDictionary arguments) - { - ExpressionExecutionContext = expressionExecutionContext; - Arguments = arguments; - ExecutionContext = new(expressionExecutionContext); - Output = new(expressionExecutionContext); - Outcome = new(expressionExecutionContext); - } - - /// - /// Provides access to activity outcomes. - /// - public OutcomeProxy Outcome { get; set; } - - /// - /// Provides access to activity outputs. - /// - public OutputProxy Output { get; set; } - - /// - /// Gets the current execution context. - /// - public ExecutionContextProxy ExecutionContext { get; } - - /// - /// Gets the ID of the current workflow instance. - /// - public string WorkflowInstanceId => ExpressionExecutionContext.GetWorkflowExecutionContext().Id; - - /// - /// Gets or sets the correlation ID of the current workflow instance. - /// - public string? CorrelationId - { - get => ExpressionExecutionContext.GetWorkflowExecutionContext().CorrelationId; - set => ExpressionExecutionContext.GetWorkflowExecutionContext().CorrelationId = value; - } - - /// - /// Gets or sets the name of the current workflow instance. - /// - public string? WorkflowInstanceName - { - get => ExpressionExecutionContext.GetWorkflowExecutionContext().Name; - set => ExpressionExecutionContext.GetWorkflowExecutionContext().Name = value; - } - - /// - /// Gets additional arguments provided by the caller of the evaluator. - /// - public IDictionary Arguments { get; } - - private ExpressionExecutionContext ExpressionExecutionContext { get; } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Models/OutcomeProxy.cs b/src/scripting/Elsa.Scripting.CSharp/Models/OutcomeProxy.cs deleted file mode 100644 index d1c475a2..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Models/OutcomeProxy.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Elsa.Expressions.Models; - -namespace Elsa.Scripting.CSharp.Models; - -/// -/// Provides access to activity outcomes. -/// -public class OutcomeProxy -{ - /// - /// Gets the key of the outcomes property. - /// - public static readonly object OutcomePropertiesKey = new(); - - /// - /// Initializes a new instance of the class. - /// - public OutcomeProxy(ExpressionExecutionContext expressionExecutionContext) - { - ExpressionExecutionContext = expressionExecutionContext; - } - - private ExpressionExecutionContext ExpressionExecutionContext { get; } - - /// - /// Sets the outcome of the current activity. - /// - /// The names of the outcomes. - public void Set(params string[] outcomeNames) - { - ExpressionExecutionContext.TransientProperties[OutcomePropertiesKey] = outcomeNames; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Models/OutputProxy.cs b/src/scripting/Elsa.Scripting.CSharp/Models/OutputProxy.cs deleted file mode 100644 index 7248fd66..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Models/OutputProxy.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Elsa.Expressions.Helpers; -using Elsa.Expressions.Models; -using Elsa.Extensions; - -namespace Elsa.Scripting.CSharp.Models; - -/// -/// Provides access to activity outputs. -/// -public class OutputProxy -{ - private readonly ExpressionExecutionContext _expressionExecutionContext; - - /// - /// Initializes a new instance of the class. - /// - public OutputProxy(ExpressionExecutionContext expressionExecutionContext) - { - _expressionExecutionContext = expressionExecutionContext; - } - - /// - /// Gets the value of the specified output from the specified activity. - /// - /// The ID or name of the activity that produced the output. - /// The name of the output. - /// The value of the output. - public object? From(string activityIdOrName, string? outputName = null) => _expressionExecutionContext.GetOutput(activityIdOrName, outputName); - - /// - /// Gets the value of the specified output from the specified activity. - /// - /// The ID or name of the activity that produced the output. - /// The name of the output. - /// The value of the output. - public T? From(string activityIdOrName, string? outputName = null) => From(activityIdOrName, outputName).ConvertTo(); - - /// - /// Gets the value of the specified output. - /// - /// The ID or name of the activity that produced the output. - /// The name of the output. - /// The value of the output. - [Obsolete("Use From instead.")] - public object? Get(string activityIdOrName, string? outputName = null) => From(activityIdOrName, outputName); - - /// - /// Gets the value of the specified output. - /// - /// The ID or name of the activity that produced the output. - /// The name of the output. - /// The value of the output. - [Obsolete("Use From instead.")] - public T? Get(string activityIdOrName, string? outputName = null) => From(activityIdOrName, outputName); - - /// - /// Gets the result of the last activity that executed. - /// - public object? LastResult => _expressionExecutionContext.GetLastResult(); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Notifications/EvaluatingCSharp.cs b/src/scripting/Elsa.Scripting.CSharp/Notifications/EvaluatingCSharp.cs deleted file mode 100644 index 25d5aaf1..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Notifications/EvaluatingCSharp.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Elsa.Expressions.Models; -using Elsa.Mediator.Contracts; -using Microsoft.CodeAnalysis.Scripting; - -namespace Elsa.Scripting.CSharp.Notifications; - -/// -/// This notification is published every time a C# expression is about to be evaluated. -/// It gives subscribers a chance to configure the with additional functions and variables. -/// -public record EvaluatingCSharp(ExpressionEvaluatorOptions Options, Script Script, ScriptOptions ScriptOptions, ExpressionExecutionContext Context) : INotification -{ - /// - /// Configures the with additional functions and variables. - /// - public EvaluatingCSharp ConfigureScriptOptions(Func scriptOptions) - { - ScriptOptions = scriptOptions(ScriptOptions); - return this; - } - - /// - /// Appends the specified script to the current script. - /// - public EvaluatingCSharp AppendScript(string script) - { - Script = Script.ContinueWith(script, ScriptOptions); - return this; - } - - /// - /// The that will be used to evaluate the expression. - /// - public ScriptOptions ScriptOptions { get; set; } = ScriptOptions; - - /// - /// The that will be used to evaluate the expression. - /// - public Script Script { get; set; } = Script; -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Options/CSharpOptions.cs b/src/scripting/Elsa.Scripting.CSharp/Options/CSharpOptions.cs deleted file mode 100644 index b9a84243..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Options/CSharpOptions.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Nodes; -using System.Text.Json.Serialization; -using Elsa.Scripting.CSharp.Contexts; -using Elsa.Scripting.CSharp.Models; -using Elsa.Expressions.Models; -using Microsoft.CodeAnalysis.Scripting; - -namespace Elsa.Scripting.CSharp.Options; - -/// -/// Options for the C# expression evaluator. -/// -public class CSharpOptions -{ - /// - /// A list of callbacks that is invoked when a C# expression is evaluated. Use this to configure the . - /// - public ICollection> ConfigureScriptOptionsCallbacks { get; } = new List>(); - - /// - /// A list of callbacks that is invoked when a C# expression is evaluated. Use this to configure the . - /// - public ICollection> ConfigureScriptCallbacks { get; } = new List>(); - - /// - /// A list of assemblies that will be referenced when evaluating a C# expression. - /// - public ISet Assemblies { get; } = new HashSet(new[] - { - typeof(Globals).Assembly, // Elsa.Scripting.CSharp - typeof(Enumerable).Assembly, // System.Linq - typeof(Guid).Assembly, // System.Runtime - typeof(JsonSerializer).Assembly, // System.Text.Json - typeof(IDictionary).Assembly, // System.Collections - }); - - /// - /// A list of namespaces that will be imported when evaluating a C# expression. - /// - public ISet Namespaces { get; } = new HashSet(new[] - { - typeof(Globals).Namespace!, // Elsa.Scripting.CSharp - typeof(Enumerable).Namespace!, // System.Linq - typeof(Guid).Namespace!, // System - typeof(JsonSerializer).Namespace!, // System.Text.Json - typeof(JsonConverter).Namespace!, // System.Text.Json.Serialization - typeof(JsonNode).Namespace!, // System.Text.Json.Nodes - typeof(IDictionary).Namespace!, // System.Collections.Generic - }); - - /// - /// The timeout for script caching. - /// - /// - /// The ScriptCacheTimeout property specifies the duration for which the scripts are cached in the C# engine. When a script is executed, it is compiled and cached for future use. This caching improves performance by avoiding repetitive compilation of the same script. - /// If the value of ScriptCacheTimeout is null, the scripts are cached indefinitely. If a time value is specified, the scripts will be purged from the cache after they've been unused for the specified duration and recompiled on next use. - /// - public TimeSpan? ScriptCacheTimeout { get; set; } = TimeSpan.FromDays(1); - - /// - /// Disables the generation of variable wrappers. E.g. Variables.MyVariable will no longer be available for variables. Instead, you can only access variables using Variables.Get("MyVariable") and the typed Variables.Get<T>("MyVariable") function. - /// This is useful if your application requires the use of invalid JavaScript variable names. - /// - public bool DisableWrappers { get; set; } - - /// - /// Configures the . - /// - /// A callback that is invoked before a C# expression is evaluated. Use this to configure the . - public CSharpOptions ConfigureScriptOptions(Action configurator) - { - ConfigureScriptOptionsCallbacks.Add((scriptOptions, context) => - { - configurator(new ScriptOptionsConfigurationContext(scriptOptions, context)); - return scriptOptions; - }); - return this; - } - - /// - /// Appends a C# script to the current script. - /// - public CSharpOptions AppendScript(string script) - { - ConfigureScriptCallbacks.Add((s, _) => s.ContinueWith(script)); - return this; - } - - /// - /// Appends a C# script to the current script. - /// - public CSharpOptions AppendScript(Func script) - { - ConfigureScriptCallbacks.Add((s, c) => s.ContinueWith(script(c))); - return this; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Providers/CSharpExpressionDescriptorProvider.cs b/src/scripting/Elsa.Scripting.CSharp/Providers/CSharpExpressionDescriptorProvider.cs deleted file mode 100644 index cd2c64e7..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Providers/CSharpExpressionDescriptorProvider.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Elsa.Scripting.CSharp.Expressions; -using Elsa.Expressions.Contracts; -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Microsoft.Extensions.DependencyInjection; - -namespace Elsa.Scripting.CSharp.Providers; - -internal class CSharpExpressionDescriptorProvider : IExpressionDescriptorProvider -{ - private const string TypeName = "CSharp"; - - public IEnumerable GetDescriptors() - { - yield return new() - { - Type = TypeName, - DisplayName = "C#", - Properties = new { MonacoLanguage = "csharp" }.ToDictionary(), - HandlerFactory = ActivatorUtilities.GetServiceOrCreateInstance - }; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.CSharp/Services/CSharpEvaluator.cs b/src/scripting/Elsa.Scripting.CSharp/Services/CSharpEvaluator.cs deleted file mode 100644 index e2714ce2..00000000 --- a/src/scripting/Elsa.Scripting.CSharp/Services/CSharpEvaluator.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System.Security.Cryptography; -using System.Text; -using Elsa.Scripting.CSharp.Contracts; -using Elsa.Scripting.CSharp.Models; -using Elsa.Scripting.CSharp.Notifications; -using Elsa.Scripting.CSharp.Options; -using Elsa.Expressions.Models; -using Elsa.Mediator.Contracts; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Scripting; -using Microsoft.CodeAnalysis.Scripting; -using Microsoft.Extensions.Caching.Memory; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.CSharp.Services; - -/// -/// A C# expression evaluator using Roslyn. -/// -/// -/// Initializes a new instance of the class. -/// -public class CSharpEvaluator(INotificationSender notificationSender, IOptions scriptOptions, IMemoryCache memoryCache) : ICSharpEvaluator -{ - private readonly CSharpOptions _csharpOptions = scriptOptions.Value; - - /// - public async Task EvaluateAsync( - string expression, - Type returnType, - ExpressionExecutionContext context, - ExpressionEvaluatorOptions options, - Func? configureScriptOptions = default, - Func, Script>? configureScript = default, - CancellationToken cancellationToken = default) - { - var scriptOptions = ScriptOptions.Default.WithOptimizationLevel(OptimizationLevel.Release); - - if (configureScriptOptions != null) - scriptOptions = configureScriptOptions(scriptOptions); - - var globals = new Globals(context, options.Arguments); - var script = CSharpScript.Create("", scriptOptions, typeof(Globals)); - - if (configureScript != null) - script = configureScript(script); - - var notification = new EvaluatingCSharp(options, script, scriptOptions, context); - await notificationSender.SendAsync(notification, cancellationToken); - scriptOptions = notification.ScriptOptions; - script = notification.Script.ContinueWith(expression, scriptOptions); - var runner = GetCompiledScript(script); - return await runner(globals, cancellationToken: cancellationToken); - } - - private ScriptRunner GetCompiledScript(Script script) - { - var cacheKey = "csharp:script:" + Hash(script); - - return memoryCache.GetOrCreate(cacheKey, entry => - { - if (_csharpOptions.ScriptCacheTimeout.HasValue) - entry.SetSlidingExpiration(_csharpOptions.ScriptCacheTimeout.Value); - - return script.CreateDelegate(); - })!; - } - - private static string Hash(Script script) - { - var ms = new MemoryStream(); - using (var sw = new StreamWriter(ms, Encoding.UTF8)) - { - for (Script current = script; current != null; current = current.Previous) - { - sw.WriteLine(current.Code); - } - } - - if (!ms.TryGetBuffer(out var segment)) - { - segment = ms.ToArray(); - } - - var hash = SHA256.HashData(segment.AsSpan()); - return Convert.ToBase64String(hash); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaLexer.cs b/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaLexer.cs deleted file mode 100644 index 40d8a2af..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaLexer.cs +++ /dev/null @@ -1,223 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// ANTLR Version: 4.10.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// Generated from C:/Projects/Elsa/v3/src/dsl/Elsa.Scripting.Dsl/Dsl\ElsaLexer.g4 by ANTLR 4.10.1 - -// Unreachable code detected -#pragma warning disable 0162 -// The variable '...' is assigned but its value is never used -#pragma warning disable 0219 -// Missing XML comment for publicly visible type or member '...' -#pragma warning disable 1591 -// Ambiguous reference in cref attribute -#pragma warning disable 419 - -using System; -using System.IO; -using System.Text; -using Antlr4.Runtime; -using Antlr4.Runtime.Atn; -using Antlr4.Runtime.Misc; -using DFA = Antlr4.Runtime.Dfa.DFA; - -[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.10.1")] -[System.CLSCompliant(false)] -public partial class ElsaLexer : Lexer { - protected static DFA[] decisionToDFA; - protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); - public const int - EQ=1, GREATER=2, INCREMENT=3, DECREMENT=4, NEW=5, VARIABLE=6, LET=7, IF=8, - THEN=9, ELSE=10, FOR=11, RETURN=12, VOID=13, FLOAT=14, INT=15, STRING=16, - OBJECT=17, EXPRESSION_MARKER=18, SYMBOL=19, COLON=20, SEMICOLON=21, COMMA=22, - PLUS=23, MINUS=24, STAR=25, EQUALS=26, NOT_EQUALS=27, GREATER_EQUALS=28, - LESS=29, LESS_EQUALS=30, LAMBDA=31, PARENTHESES_OPEN=32, PARENTHESES_CLOSE=33, - BRACKET_OPEN=34, BRACKET_CLOSE=35, CURLYBRACE_OPEN=36, CURLYBRACE_CLOSE=37, - EXCLAMATION=38, PIPE=39, PIPE_DBL=40, PERIOD=41, STRING_VAL=42, BACKTICKSTRING_VAL=43, - LINE_COMMENT=44, INTEGER_VAL=45, ID=46, WS=47, ESC=48; - public static string[] channelNames = { - "DEFAULT_TOKEN_CHANNEL", "HIDDEN" - }; - - public static string[] modeNames = { - "DEFAULT_MODE" - }; - - public static readonly string[] ruleNames = { - "EQ", "GREATER", "INCREMENT", "DECREMENT", "NEW", "VARIABLE", "LET", "IF", - "THEN", "ELSE", "FOR", "RETURN", "VOID", "FLOAT", "INT", "STRING", "OBJECT", - "EXPRESSION_MARKER", "SYMBOL", "COLON", "SEMICOLON", "COMMA", "PLUS", - "MINUS", "STAR", "EQUALS", "NOT_EQUALS", "GREATER_EQUALS", "LESS", "LESS_EQUALS", - "LAMBDA", "PARENTHESES_OPEN", "PARENTHESES_CLOSE", "BRACKET_OPEN", "BRACKET_CLOSE", - "CURLYBRACE_OPEN", "CURLYBRACE_CLOSE", "EXCLAMATION", "PIPE", "PIPE_DBL", - "PERIOD", "STRING_VAL", "BACKTICKSTRING_VAL", "LINE_COMMENT", "INTEGER_VAL", - "ID", "WS", "LETTER", "DIGIT", "ESC" - }; - - - public ElsaLexer(ICharStream input) - : this(input, Console.Out, Console.Error) { } - - public ElsaLexer(ICharStream input, TextWriter output, TextWriter errorOutput) - : base(input, output, errorOutput) - { - Interpreter = new LexerATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); - } - - private static readonly string[] _LiteralNames = { - null, "'='", "'>'", "'++'", "'--'", "'new'", "'variable'", "'let'", "'if'", - "'then'", "'else'", "'for'", "'return'", "'void'", "'float'", "'int'", - "'string'", "'object'", "'expression'", null, "':'", "';'", "','", "'+'", - "'-'", "'*'", "'=='", "'!='", "'>='", "'<'", "'<='", "'=>'", "'('", "')'", - "'['", "']'", "'{'", "'}'", "'!'", "'|'", "'||'", "'.'", null, null, null, - null, null, null, "'\\|'" - }; - private static readonly string[] _SymbolicNames = { - null, "EQ", "GREATER", "INCREMENT", "DECREMENT", "NEW", "VARIABLE", "LET", - "IF", "THEN", "ELSE", "FOR", "RETURN", "VOID", "FLOAT", "INT", "STRING", - "OBJECT", "EXPRESSION_MARKER", "SYMBOL", "COLON", "SEMICOLON", "COMMA", - "PLUS", "MINUS", "STAR", "EQUALS", "NOT_EQUALS", "GREATER_EQUALS", "LESS", - "LESS_EQUALS", "LAMBDA", "PARENTHESES_OPEN", "PARENTHESES_CLOSE", "BRACKET_OPEN", - "BRACKET_CLOSE", "CURLYBRACE_OPEN", "CURLYBRACE_CLOSE", "EXCLAMATION", - "PIPE", "PIPE_DBL", "PERIOD", "STRING_VAL", "BACKTICKSTRING_VAL", "LINE_COMMENT", - "INTEGER_VAL", "ID", "WS", "ESC" - }; - public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); - - [NotNull] - public override IVocabulary Vocabulary - { - get - { - return DefaultVocabulary; - } - } - - public override string GrammarFileName { get { return "ElsaLexer.g4"; } } - - public override string[] RuleNames { get { return ruleNames; } } - - public override string[] ChannelNames { get { return channelNames; } } - - public override string[] ModeNames { get { return modeNames; } } - - public override int[] SerializedAtn { get { return _serializedATN; } } - - static ElsaLexer() { - decisionToDFA = new DFA[_ATN.NumberOfDecisions]; - for (int i = 0; i < _ATN.NumberOfDecisions; i++) { - decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); - } - } - private static int[] _serializedATN = { - 4,0,48,306,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, - 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14, - 7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21, - 7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28, - 7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35, - 7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42, - 7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49, - 7,49,1,0,1,0,1,1,1,1,1,2,1,2,1,2,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,5,1,5,1, - 5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,8,1,8,1,8,1,8, - 1,8,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1, - 11,1,11,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1, - 14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1, - 16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1, - 18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1,23,1,23,1,24,1,24,1, - 25,1,25,1,25,1,26,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,29,1,29,1,29,1, - 30,1,30,1,30,1,31,1,31,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,36,1, - 36,1,37,1,37,1,38,1,38,1,39,1,39,1,39,1,40,1,40,1,41,1,41,1,41,1,41,5, - 41,249,8,41,10,41,12,41,252,9,41,1,41,1,41,1,42,1,42,1,42,1,42,5,42,260, - 8,42,10,42,12,42,263,9,42,1,42,1,42,1,43,1,43,1,43,1,43,5,43,271,8,43, - 10,43,12,43,274,9,43,1,43,3,43,277,8,43,1,43,1,43,1,43,1,43,1,44,4,44, - 284,8,44,11,44,12,44,285,1,45,1,45,1,45,5,45,291,8,45,10,45,12,45,294, - 9,45,1,46,1,46,1,46,1,46,1,47,1,47,1,48,1,48,1,49,1,49,1,49,3,250,261, - 272,0,50,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25, - 13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49, - 25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36,73, - 37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,93,47,95,0,97, - 0,99,48,1,0,4,4,0,36,36,43,43,61,62,96,96,3,0,9,10,13,13,32,32,3,0,65, - 90,95,95,97,122,1,0,48,57,312,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7, - 1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0, - 0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29, - 1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0, - 0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51, - 1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0, - 0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73, - 1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0, - 0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,99, - 1,0,0,0,1,101,1,0,0,0,3,103,1,0,0,0,5,105,1,0,0,0,7,108,1,0,0,0,9,111, - 1,0,0,0,11,115,1,0,0,0,13,124,1,0,0,0,15,128,1,0,0,0,17,131,1,0,0,0,19, - 136,1,0,0,0,21,141,1,0,0,0,23,145,1,0,0,0,25,152,1,0,0,0,27,157,1,0,0, - 0,29,163,1,0,0,0,31,167,1,0,0,0,33,174,1,0,0,0,35,181,1,0,0,0,37,192,1, - 0,0,0,39,194,1,0,0,0,41,196,1,0,0,0,43,198,1,0,0,0,45,200,1,0,0,0,47,202, - 1,0,0,0,49,204,1,0,0,0,51,206,1,0,0,0,53,209,1,0,0,0,55,212,1,0,0,0,57, - 215,1,0,0,0,59,217,1,0,0,0,61,220,1,0,0,0,63,223,1,0,0,0,65,225,1,0,0, - 0,67,227,1,0,0,0,69,229,1,0,0,0,71,231,1,0,0,0,73,233,1,0,0,0,75,235,1, - 0,0,0,77,237,1,0,0,0,79,239,1,0,0,0,81,242,1,0,0,0,83,244,1,0,0,0,85,255, - 1,0,0,0,87,266,1,0,0,0,89,283,1,0,0,0,91,287,1,0,0,0,93,295,1,0,0,0,95, - 299,1,0,0,0,97,301,1,0,0,0,99,303,1,0,0,0,101,102,5,61,0,0,102,2,1,0,0, - 0,103,104,5,62,0,0,104,4,1,0,0,0,105,106,5,43,0,0,106,107,5,43,0,0,107, - 6,1,0,0,0,108,109,5,45,0,0,109,110,5,45,0,0,110,8,1,0,0,0,111,112,5,110, - 0,0,112,113,5,101,0,0,113,114,5,119,0,0,114,10,1,0,0,0,115,116,5,118,0, - 0,116,117,5,97,0,0,117,118,5,114,0,0,118,119,5,105,0,0,119,120,5,97,0, - 0,120,121,5,98,0,0,121,122,5,108,0,0,122,123,5,101,0,0,123,12,1,0,0,0, - 124,125,5,108,0,0,125,126,5,101,0,0,126,127,5,116,0,0,127,14,1,0,0,0,128, - 129,5,105,0,0,129,130,5,102,0,0,130,16,1,0,0,0,131,132,5,116,0,0,132,133, - 5,104,0,0,133,134,5,101,0,0,134,135,5,110,0,0,135,18,1,0,0,0,136,137,5, - 101,0,0,137,138,5,108,0,0,138,139,5,115,0,0,139,140,5,101,0,0,140,20,1, - 0,0,0,141,142,5,102,0,0,142,143,5,111,0,0,143,144,5,114,0,0,144,22,1,0, - 0,0,145,146,5,114,0,0,146,147,5,101,0,0,147,148,5,116,0,0,148,149,5,117, - 0,0,149,150,5,114,0,0,150,151,5,110,0,0,151,24,1,0,0,0,152,153,5,118,0, - 0,153,154,5,111,0,0,154,155,5,105,0,0,155,156,5,100,0,0,156,26,1,0,0,0, - 157,158,5,102,0,0,158,159,5,108,0,0,159,160,5,111,0,0,160,161,5,97,0,0, - 161,162,5,116,0,0,162,28,1,0,0,0,163,164,5,105,0,0,164,165,5,110,0,0,165, - 166,5,116,0,0,166,30,1,0,0,0,167,168,5,115,0,0,168,169,5,116,0,0,169,170, - 5,114,0,0,170,171,5,105,0,0,171,172,5,110,0,0,172,173,5,103,0,0,173,32, - 1,0,0,0,174,175,5,111,0,0,175,176,5,98,0,0,176,177,5,106,0,0,177,178,5, - 101,0,0,178,179,5,99,0,0,179,180,5,116,0,0,180,34,1,0,0,0,181,182,5,101, - 0,0,182,183,5,120,0,0,183,184,5,112,0,0,184,185,5,114,0,0,185,186,5,101, - 0,0,186,187,5,115,0,0,187,188,5,115,0,0,188,189,5,105,0,0,189,190,5,111, - 0,0,190,191,5,110,0,0,191,36,1,0,0,0,192,193,7,0,0,0,193,38,1,0,0,0,194, - 195,5,58,0,0,195,40,1,0,0,0,196,197,5,59,0,0,197,42,1,0,0,0,198,199,5, - 44,0,0,199,44,1,0,0,0,200,201,5,43,0,0,201,46,1,0,0,0,202,203,5,45,0,0, - 203,48,1,0,0,0,204,205,5,42,0,0,205,50,1,0,0,0,206,207,5,61,0,0,207,208, - 5,61,0,0,208,52,1,0,0,0,209,210,5,33,0,0,210,211,5,61,0,0,211,54,1,0,0, - 0,212,213,5,62,0,0,213,214,5,61,0,0,214,56,1,0,0,0,215,216,5,60,0,0,216, - 58,1,0,0,0,217,218,5,60,0,0,218,219,5,61,0,0,219,60,1,0,0,0,220,221,5, - 61,0,0,221,222,5,62,0,0,222,62,1,0,0,0,223,224,5,40,0,0,224,64,1,0,0,0, - 225,226,5,41,0,0,226,66,1,0,0,0,227,228,5,91,0,0,228,68,1,0,0,0,229,230, - 5,93,0,0,230,70,1,0,0,0,231,232,5,123,0,0,232,72,1,0,0,0,233,234,5,125, - 0,0,234,74,1,0,0,0,235,236,5,33,0,0,236,76,1,0,0,0,237,238,5,124,0,0,238, - 78,1,0,0,0,239,240,5,124,0,0,240,241,5,124,0,0,241,80,1,0,0,0,242,243, - 5,46,0,0,243,82,1,0,0,0,244,250,5,34,0,0,245,246,5,92,0,0,246,249,5,34, - 0,0,247,249,9,0,0,0,248,245,1,0,0,0,248,247,1,0,0,0,249,252,1,0,0,0,250, - 251,1,0,0,0,250,248,1,0,0,0,251,253,1,0,0,0,252,250,1,0,0,0,253,254,5, - 34,0,0,254,84,1,0,0,0,255,261,5,96,0,0,256,257,5,92,0,0,257,260,5,34,0, - 0,258,260,9,0,0,0,259,256,1,0,0,0,259,258,1,0,0,0,260,263,1,0,0,0,261, - 262,1,0,0,0,261,259,1,0,0,0,262,264,1,0,0,0,263,261,1,0,0,0,264,265,5, - 96,0,0,265,86,1,0,0,0,266,267,5,47,0,0,267,268,5,47,0,0,268,272,1,0,0, - 0,269,271,9,0,0,0,270,269,1,0,0,0,271,274,1,0,0,0,272,273,1,0,0,0,272, - 270,1,0,0,0,273,276,1,0,0,0,274,272,1,0,0,0,275,277,5,13,0,0,276,275,1, - 0,0,0,276,277,1,0,0,0,277,278,1,0,0,0,278,279,5,10,0,0,279,280,1,0,0,0, - 280,281,6,43,0,0,281,88,1,0,0,0,282,284,3,97,48,0,283,282,1,0,0,0,284, - 285,1,0,0,0,285,283,1,0,0,0,285,286,1,0,0,0,286,90,1,0,0,0,287,292,3,95, - 47,0,288,291,3,95,47,0,289,291,3,97,48,0,290,288,1,0,0,0,290,289,1,0,0, - 0,291,294,1,0,0,0,292,290,1,0,0,0,292,293,1,0,0,0,293,92,1,0,0,0,294,292, - 1,0,0,0,295,296,7,1,0,0,296,297,1,0,0,0,297,298,6,46,0,0,298,94,1,0,0, - 0,299,300,7,2,0,0,300,96,1,0,0,0,301,302,7,3,0,0,302,98,1,0,0,0,303,304, - 5,92,0,0,304,305,5,124,0,0,305,100,1,0,0,0,10,0,248,250,259,261,272,276, - 285,290,292,1,6,0,0 - }; - - public static readonly ATN _ATN = - new ATNDeserializer().Deserialize(_serializedATN); - - -} diff --git a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaLexer.interp b/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaLexer.interp deleted file mode 100644 index fbc6e3ed..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaLexer.interp +++ /dev/null @@ -1,163 +0,0 @@ -token literal names: -null -'=' -'>' -'++' -'--' -'new' -'variable' -'let' -'if' -'then' -'else' -'for' -'return' -'void' -'float' -'int' -'string' -'object' -'expression' -null -':' -';' -',' -'+' -'-' -'*' -'==' -'!=' -'>=' -'<' -'<=' -'=>' -'(' -')' -'[' -']' -'{' -'}' -'!' -'|' -'||' -'.' -null -null -null -null -null -null -'\\|' - -token symbolic names: -null -EQ -GREATER -INCREMENT -DECREMENT -NEW -VARIABLE -LET -IF -THEN -ELSE -FOR -RETURN -VOID -FLOAT -INT -STRING -OBJECT -EXPRESSION_MARKER -SYMBOL -COLON -SEMICOLON -COMMA -PLUS -MINUS -STAR -EQUALS -NOT_EQUALS -GREATER_EQUALS -LESS -LESS_EQUALS -LAMBDA -PARENTHESES_OPEN -PARENTHESES_CLOSE -BRACKET_OPEN -BRACKET_CLOSE -CURLYBRACE_OPEN -CURLYBRACE_CLOSE -EXCLAMATION -PIPE -PIPE_DBL -PERIOD -STRING_VAL -BACKTICKSTRING_VAL -LINE_COMMENT -INTEGER_VAL -ID -WS -ESC - -rule names: -EQ -GREATER -INCREMENT -DECREMENT -NEW -VARIABLE -LET -IF -THEN -ELSE -FOR -RETURN -VOID -FLOAT -INT -STRING -OBJECT -EXPRESSION_MARKER -SYMBOL -COLON -SEMICOLON -COMMA -PLUS -MINUS -STAR -EQUALS -NOT_EQUALS -GREATER_EQUALS -LESS -LESS_EQUALS -LAMBDA -PARENTHESES_OPEN -PARENTHESES_CLOSE -BRACKET_OPEN -BRACKET_CLOSE -CURLYBRACE_OPEN -CURLYBRACE_CLOSE -EXCLAMATION -PIPE -PIPE_DBL -PERIOD -STRING_VAL -BACKTICKSTRING_VAL -LINE_COMMENT -INTEGER_VAL -ID -WS -LETTER -DIGIT -ESC - -channel names: -DEFAULT_TOKEN_CHANNEL -HIDDEN - -mode names: -DEFAULT_MODE - -atn: -[4, 0, 48, 306, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 5, 41, 249, 8, 41, 10, 41, 12, 41, 252, 9, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 5, 42, 260, 8, 42, 10, 42, 12, 42, 263, 9, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 271, 8, 43, 10, 43, 12, 43, 274, 9, 43, 1, 43, 3, 43, 277, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 4, 44, 284, 8, 44, 11, 44, 12, 44, 285, 1, 45, 1, 45, 1, 45, 5, 45, 291, 8, 45, 10, 45, 12, 45, 294, 9, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 3, 250, 261, 272, 0, 50, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 0, 97, 0, 99, 48, 1, 0, 4, 4, 0, 36, 36, 43, 43, 61, 62, 96, 96, 3, 0, 9, 10, 13, 13, 32, 32, 3, 0, 65, 90, 95, 95, 97, 122, 1, 0, 48, 57, 312, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 1, 101, 1, 0, 0, 0, 3, 103, 1, 0, 0, 0, 5, 105, 1, 0, 0, 0, 7, 108, 1, 0, 0, 0, 9, 111, 1, 0, 0, 0, 11, 115, 1, 0, 0, 0, 13, 124, 1, 0, 0, 0, 15, 128, 1, 0, 0, 0, 17, 131, 1, 0, 0, 0, 19, 136, 1, 0, 0, 0, 21, 141, 1, 0, 0, 0, 23, 145, 1, 0, 0, 0, 25, 152, 1, 0, 0, 0, 27, 157, 1, 0, 0, 0, 29, 163, 1, 0, 0, 0, 31, 167, 1, 0, 0, 0, 33, 174, 1, 0, 0, 0, 35, 181, 1, 0, 0, 0, 37, 192, 1, 0, 0, 0, 39, 194, 1, 0, 0, 0, 41, 196, 1, 0, 0, 0, 43, 198, 1, 0, 0, 0, 45, 200, 1, 0, 0, 0, 47, 202, 1, 0, 0, 0, 49, 204, 1, 0, 0, 0, 51, 206, 1, 0, 0, 0, 53, 209, 1, 0, 0, 0, 55, 212, 1, 0, 0, 0, 57, 215, 1, 0, 0, 0, 59, 217, 1, 0, 0, 0, 61, 220, 1, 0, 0, 0, 63, 223, 1, 0, 0, 0, 65, 225, 1, 0, 0, 0, 67, 227, 1, 0, 0, 0, 69, 229, 1, 0, 0, 0, 71, 231, 1, 0, 0, 0, 73, 233, 1, 0, 0, 0, 75, 235, 1, 0, 0, 0, 77, 237, 1, 0, 0, 0, 79, 239, 1, 0, 0, 0, 81, 242, 1, 0, 0, 0, 83, 244, 1, 0, 0, 0, 85, 255, 1, 0, 0, 0, 87, 266, 1, 0, 0, 0, 89, 283, 1, 0, 0, 0, 91, 287, 1, 0, 0, 0, 93, 295, 1, 0, 0, 0, 95, 299, 1, 0, 0, 0, 97, 301, 1, 0, 0, 0, 99, 303, 1, 0, 0, 0, 101, 102, 5, 61, 0, 0, 102, 2, 1, 0, 0, 0, 103, 104, 5, 62, 0, 0, 104, 4, 1, 0, 0, 0, 105, 106, 5, 43, 0, 0, 106, 107, 5, 43, 0, 0, 107, 6, 1, 0, 0, 0, 108, 109, 5, 45, 0, 0, 109, 110, 5, 45, 0, 0, 110, 8, 1, 0, 0, 0, 111, 112, 5, 110, 0, 0, 112, 113, 5, 101, 0, 0, 113, 114, 5, 119, 0, 0, 114, 10, 1, 0, 0, 0, 115, 116, 5, 118, 0, 0, 116, 117, 5, 97, 0, 0, 117, 118, 5, 114, 0, 0, 118, 119, 5, 105, 0, 0, 119, 120, 5, 97, 0, 0, 120, 121, 5, 98, 0, 0, 121, 122, 5, 108, 0, 0, 122, 123, 5, 101, 0, 0, 123, 12, 1, 0, 0, 0, 124, 125, 5, 108, 0, 0, 125, 126, 5, 101, 0, 0, 126, 127, 5, 116, 0, 0, 127, 14, 1, 0, 0, 0, 128, 129, 5, 105, 0, 0, 129, 130, 5, 102, 0, 0, 130, 16, 1, 0, 0, 0, 131, 132, 5, 116, 0, 0, 132, 133, 5, 104, 0, 0, 133, 134, 5, 101, 0, 0, 134, 135, 5, 110, 0, 0, 135, 18, 1, 0, 0, 0, 136, 137, 5, 101, 0, 0, 137, 138, 5, 108, 0, 0, 138, 139, 5, 115, 0, 0, 139, 140, 5, 101, 0, 0, 140, 20, 1, 0, 0, 0, 141, 142, 5, 102, 0, 0, 142, 143, 5, 111, 0, 0, 143, 144, 5, 114, 0, 0, 144, 22, 1, 0, 0, 0, 145, 146, 5, 114, 0, 0, 146, 147, 5, 101, 0, 0, 147, 148, 5, 116, 0, 0, 148, 149, 5, 117, 0, 0, 149, 150, 5, 114, 0, 0, 150, 151, 5, 110, 0, 0, 151, 24, 1, 0, 0, 0, 152, 153, 5, 118, 0, 0, 153, 154, 5, 111, 0, 0, 154, 155, 5, 105, 0, 0, 155, 156, 5, 100, 0, 0, 156, 26, 1, 0, 0, 0, 157, 158, 5, 102, 0, 0, 158, 159, 5, 108, 0, 0, 159, 160, 5, 111, 0, 0, 160, 161, 5, 97, 0, 0, 161, 162, 5, 116, 0, 0, 162, 28, 1, 0, 0, 0, 163, 164, 5, 105, 0, 0, 164, 165, 5, 110, 0, 0, 165, 166, 5, 116, 0, 0, 166, 30, 1, 0, 0, 0, 167, 168, 5, 115, 0, 0, 168, 169, 5, 116, 0, 0, 169, 170, 5, 114, 0, 0, 170, 171, 5, 105, 0, 0, 171, 172, 5, 110, 0, 0, 172, 173, 5, 103, 0, 0, 173, 32, 1, 0, 0, 0, 174, 175, 5, 111, 0, 0, 175, 176, 5, 98, 0, 0, 176, 177, 5, 106, 0, 0, 177, 178, 5, 101, 0, 0, 178, 179, 5, 99, 0, 0, 179, 180, 5, 116, 0, 0, 180, 34, 1, 0, 0, 0, 181, 182, 5, 101, 0, 0, 182, 183, 5, 120, 0, 0, 183, 184, 5, 112, 0, 0, 184, 185, 5, 114, 0, 0, 185, 186, 5, 101, 0, 0, 186, 187, 5, 115, 0, 0, 187, 188, 5, 115, 0, 0, 188, 189, 5, 105, 0, 0, 189, 190, 5, 111, 0, 0, 190, 191, 5, 110, 0, 0, 191, 36, 1, 0, 0, 0, 192, 193, 7, 0, 0, 0, 193, 38, 1, 0, 0, 0, 194, 195, 5, 58, 0, 0, 195, 40, 1, 0, 0, 0, 196, 197, 5, 59, 0, 0, 197, 42, 1, 0, 0, 0, 198, 199, 5, 44, 0, 0, 199, 44, 1, 0, 0, 0, 200, 201, 5, 43, 0, 0, 201, 46, 1, 0, 0, 0, 202, 203, 5, 45, 0, 0, 203, 48, 1, 0, 0, 0, 204, 205, 5, 42, 0, 0, 205, 50, 1, 0, 0, 0, 206, 207, 5, 61, 0, 0, 207, 208, 5, 61, 0, 0, 208, 52, 1, 0, 0, 0, 209, 210, 5, 33, 0, 0, 210, 211, 5, 61, 0, 0, 211, 54, 1, 0, 0, 0, 212, 213, 5, 62, 0, 0, 213, 214, 5, 61, 0, 0, 214, 56, 1, 0, 0, 0, 215, 216, 5, 60, 0, 0, 216, 58, 1, 0, 0, 0, 217, 218, 5, 60, 0, 0, 218, 219, 5, 61, 0, 0, 219, 60, 1, 0, 0, 0, 220, 221, 5, 61, 0, 0, 221, 222, 5, 62, 0, 0, 222, 62, 1, 0, 0, 0, 223, 224, 5, 40, 0, 0, 224, 64, 1, 0, 0, 0, 225, 226, 5, 41, 0, 0, 226, 66, 1, 0, 0, 0, 227, 228, 5, 91, 0, 0, 228, 68, 1, 0, 0, 0, 229, 230, 5, 93, 0, 0, 230, 70, 1, 0, 0, 0, 231, 232, 5, 123, 0, 0, 232, 72, 1, 0, 0, 0, 233, 234, 5, 125, 0, 0, 234, 74, 1, 0, 0, 0, 235, 236, 5, 33, 0, 0, 236, 76, 1, 0, 0, 0, 237, 238, 5, 124, 0, 0, 238, 78, 1, 0, 0, 0, 239, 240, 5, 124, 0, 0, 240, 241, 5, 124, 0, 0, 241, 80, 1, 0, 0, 0, 242, 243, 5, 46, 0, 0, 243, 82, 1, 0, 0, 0, 244, 250, 5, 34, 0, 0, 245, 246, 5, 92, 0, 0, 246, 249, 5, 34, 0, 0, 247, 249, 9, 0, 0, 0, 248, 245, 1, 0, 0, 0, 248, 247, 1, 0, 0, 0, 249, 252, 1, 0, 0, 0, 250, 251, 1, 0, 0, 0, 250, 248, 1, 0, 0, 0, 251, 253, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 253, 254, 5, 34, 0, 0, 254, 84, 1, 0, 0, 0, 255, 261, 5, 96, 0, 0, 256, 257, 5, 92, 0, 0, 257, 260, 5, 34, 0, 0, 258, 260, 9, 0, 0, 0, 259, 256, 1, 0, 0, 0, 259, 258, 1, 0, 0, 0, 260, 263, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 261, 259, 1, 0, 0, 0, 262, 264, 1, 0, 0, 0, 263, 261, 1, 0, 0, 0, 264, 265, 5, 96, 0, 0, 265, 86, 1, 0, 0, 0, 266, 267, 5, 47, 0, 0, 267, 268, 5, 47, 0, 0, 268, 272, 1, 0, 0, 0, 269, 271, 9, 0, 0, 0, 270, 269, 1, 0, 0, 0, 271, 274, 1, 0, 0, 0, 272, 273, 1, 0, 0, 0, 272, 270, 1, 0, 0, 0, 273, 276, 1, 0, 0, 0, 274, 272, 1, 0, 0, 0, 275, 277, 5, 13, 0, 0, 276, 275, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 279, 5, 10, 0, 0, 279, 280, 1, 0, 0, 0, 280, 281, 6, 43, 0, 0, 281, 88, 1, 0, 0, 0, 282, 284, 3, 97, 48, 0, 283, 282, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 283, 1, 0, 0, 0, 285, 286, 1, 0, 0, 0, 286, 90, 1, 0, 0, 0, 287, 292, 3, 95, 47, 0, 288, 291, 3, 95, 47, 0, 289, 291, 3, 97, 48, 0, 290, 288, 1, 0, 0, 0, 290, 289, 1, 0, 0, 0, 291, 294, 1, 0, 0, 0, 292, 290, 1, 0, 0, 0, 292, 293, 1, 0, 0, 0, 293, 92, 1, 0, 0, 0, 294, 292, 1, 0, 0, 0, 295, 296, 7, 1, 0, 0, 296, 297, 1, 0, 0, 0, 297, 298, 6, 46, 0, 0, 298, 94, 1, 0, 0, 0, 299, 300, 7, 2, 0, 0, 300, 96, 1, 0, 0, 0, 301, 302, 7, 3, 0, 0, 302, 98, 1, 0, 0, 0, 303, 304, 5, 92, 0, 0, 304, 305, 5, 124, 0, 0, 305, 100, 1, 0, 0, 0, 10, 0, 248, 250, 259, 261, 272, 276, 285, 290, 292, 1, 6, 0, 0] \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaLexer.tokens b/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaLexer.tokens deleted file mode 100644 index 0d4fb8cb..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaLexer.tokens +++ /dev/null @@ -1,89 +0,0 @@ -EQ=1 -GREATER=2 -INCREMENT=3 -DECREMENT=4 -NEW=5 -VARIABLE=6 -LET=7 -IF=8 -THEN=9 -ELSE=10 -FOR=11 -RETURN=12 -VOID=13 -FLOAT=14 -INT=15 -STRING=16 -OBJECT=17 -EXPRESSION_MARKER=18 -SYMBOL=19 -COLON=20 -SEMICOLON=21 -COMMA=22 -PLUS=23 -MINUS=24 -STAR=25 -EQUALS=26 -NOT_EQUALS=27 -GREATER_EQUALS=28 -LESS=29 -LESS_EQUALS=30 -LAMBDA=31 -PARENTHESES_OPEN=32 -PARENTHESES_CLOSE=33 -BRACKET_OPEN=34 -BRACKET_CLOSE=35 -CURLYBRACE_OPEN=36 -CURLYBRACE_CLOSE=37 -EXCLAMATION=38 -PIPE=39 -PIPE_DBL=40 -PERIOD=41 -STRING_VAL=42 -BACKTICKSTRING_VAL=43 -LINE_COMMENT=44 -INTEGER_VAL=45 -ID=46 -WS=47 -ESC=48 -'='=1 -'>'=2 -'++'=3 -'--'=4 -'new'=5 -'variable'=6 -'let'=7 -'if'=8 -'then'=9 -'else'=10 -'for'=11 -'return'=12 -'void'=13 -'float'=14 -'int'=15 -'string'=16 -'object'=17 -'expression'=18 -':'=20 -';'=21 -','=22 -'+'=23 -'-'=24 -'*'=25 -'=='=26 -'!='=27 -'>='=28 -'<'=29 -'<='=30 -'=>'=31 -'('=32 -')'=33 -'['=34 -']'=35 -'{'=36 -'}'=37 -'!'=38 -'|'=39 -'||'=40 -'.'=41 -'\\|'=48 diff --git a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParser.cs b/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParser.cs deleted file mode 100644 index a1845d66..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParser.cs +++ /dev/null @@ -1,2196 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// ANTLR Version: 4.10.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// Generated from C:/Projects/Elsa/v3/src/dsl/Elsa.Scripting.Dsl/Dsl\ElsaParser.g4 by ANTLR 4.10.1 - -// Unreachable code detected -#pragma warning disable 0162 -// The variable '...' is assigned but its value is never used -#pragma warning disable 0219 -// Missing XML comment for publicly visible type or member '...' -#pragma warning disable 1591 -// Ambiguous reference in cref attribute -#pragma warning disable 419 - -using System; -using System.IO; -using System.Text; -using System.Diagnostics; -using System.Collections.Generic; -using Antlr4.Runtime; -using Antlr4.Runtime.Atn; -using Antlr4.Runtime.Misc; -using Antlr4.Runtime.Tree; -using DFA = Antlr4.Runtime.Dfa.DFA; - -[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.10.1")] -[System.CLSCompliant(false)] -public partial class ElsaParser : Parser { - protected static DFA[] decisionToDFA; - protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); - public const int - EQ=1, GREATER=2, INCREMENT=3, DECREMENT=4, NEW=5, VARIABLE=6, LET=7, IF=8, - THEN=9, ELSE=10, FOR=11, RETURN=12, VOID=13, FLOAT=14, INT=15, STRING=16, - OBJECT=17, EXPRESSION_MARKER=18, SYMBOL=19, COLON=20, SEMICOLON=21, COMMA=22, - PLUS=23, MINUS=24, STAR=25, EQUALS=26, NOT_EQUALS=27, GREATER_EQUALS=28, - LESS=29, LESS_EQUALS=30, LAMBDA=31, PARENTHESES_OPEN=32, PARENTHESES_CLOSE=33, - BRACKET_OPEN=34, BRACKET_CLOSE=35, CURLYBRACE_OPEN=36, CURLYBRACE_CLOSE=37, - EXCLAMATION=38, PIPE=39, PIPE_DBL=40, PERIOD=41, STRING_VAL=42, BACKTICKSTRING_VAL=43, - LINE_COMMENT=44, INTEGER_VAL=45, ID=46, WS=47, ESC=48; - public const int - RULE_program = 0, RULE_object = 1, RULE_newObject = 2, RULE_varDecl = 3, - RULE_localVarDecl = 4, RULE_type = 5, RULE_expressionMarker = 6, RULE_expressionContent = 7, - RULE_methodCall = 8, RULE_funcCall = 9, RULE_args = 10, RULE_arg = 11, - RULE_block = 12, RULE_objectInitializer = 13, RULE_propertyList = 14, - RULE_property = 15, RULE_stat = 16, RULE_thenStat = 17, RULE_elseStat = 18, - RULE_expr = 19, RULE_exprList = 20; - public static readonly string[] ruleNames = { - "program", "object", "newObject", "varDecl", "localVarDecl", "type", "expressionMarker", - "expressionContent", "methodCall", "funcCall", "args", "arg", "block", - "objectInitializer", "propertyList", "property", "stat", "thenStat", "elseStat", - "expr", "exprList" - }; - - private static readonly string[] _LiteralNames = { - null, "'='", "'>'", "'++'", "'--'", "'new'", "'variable'", "'let'", "'if'", - "'then'", "'else'", "'for'", "'return'", "'void'", "'float'", "'int'", - "'string'", "'object'", "'expression'", null, "':'", "';'", "','", "'+'", - "'-'", "'*'", "'=='", "'!='", "'>='", "'<'", "'<='", "'=>'", "'('", "')'", - "'['", "']'", "'{'", "'}'", "'!'", "'|'", "'||'", "'.'", null, null, null, - null, null, null, "'\\|'" - }; - private static readonly string[] _SymbolicNames = { - null, "EQ", "GREATER", "INCREMENT", "DECREMENT", "NEW", "VARIABLE", "LET", - "IF", "THEN", "ELSE", "FOR", "RETURN", "VOID", "FLOAT", "INT", "STRING", - "OBJECT", "EXPRESSION_MARKER", "SYMBOL", "COLON", "SEMICOLON", "COMMA", - "PLUS", "MINUS", "STAR", "EQUALS", "NOT_EQUALS", "GREATER_EQUALS", "LESS", - "LESS_EQUALS", "LAMBDA", "PARENTHESES_OPEN", "PARENTHESES_CLOSE", "BRACKET_OPEN", - "BRACKET_CLOSE", "CURLYBRACE_OPEN", "CURLYBRACE_CLOSE", "EXCLAMATION", - "PIPE", "PIPE_DBL", "PERIOD", "STRING_VAL", "BACKTICKSTRING_VAL", "LINE_COMMENT", - "INTEGER_VAL", "ID", "WS", "ESC" - }; - public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); - - [NotNull] - public override IVocabulary Vocabulary - { - get - { - return DefaultVocabulary; - } - } - - public override string GrammarFileName { get { return "ElsaParser.g4"; } } - - public override string[] RuleNames { get { return ruleNames; } } - - public override int[] SerializedAtn { get { return _serializedATN; } } - - static ElsaParser() { - decisionToDFA = new DFA[_ATN.NumberOfDecisions]; - for (int i = 0; i < _ATN.NumberOfDecisions; i++) { - decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); - } - } - - public ElsaParser(ITokenStream input) : this(input, Console.Out, Console.Error) { } - - public ElsaParser(ITokenStream input, TextWriter output, TextWriter errorOutput) - : base(input, output, errorOutput) - { - Interpreter = new ParserATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); - } - - public partial class ProgramContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public StatContext[] stat() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public StatContext stat(int i) { - return GetRuleContext(i); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] LINE_COMMENT() { return GetTokens(ElsaParser.LINE_COMMENT); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LINE_COMMENT(int i) { - return GetToken(ElsaParser.LINE_COMMENT, i); - } - public ProgramContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_program; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitProgram(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ProgramContext program() { - ProgramContext _localctx = new ProgramContext(Context, State); - EnterRule(_localctx, 0, RULE_program); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 46; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NEW) | (1L << VARIABLE) | (1L << LET) | (1L << IF) | (1L << FOR) | (1L << RETURN) | (1L << EXPRESSION_MARKER) | (1L << MINUS) | (1L << PARENTHESES_OPEN) | (1L << BRACKET_OPEN) | (1L << CURLYBRACE_OPEN) | (1L << EXCLAMATION) | (1L << STRING_VAL) | (1L << BACKTICKSTRING_VAL) | (1L << LINE_COMMENT) | (1L << INTEGER_VAL) | (1L << ID))) != 0)) { - { - State = 44; - ErrorHandler.Sync(this); - switch (TokenStream.LA(1)) { - case NEW: - case VARIABLE: - case LET: - case IF: - case FOR: - case RETURN: - case EXPRESSION_MARKER: - case MINUS: - case PARENTHESES_OPEN: - case BRACKET_OPEN: - case CURLYBRACE_OPEN: - case EXCLAMATION: - case STRING_VAL: - case BACKTICKSTRING_VAL: - case INTEGER_VAL: - case ID: - { - State = 42; - stat(); - } - break; - case LINE_COMMENT: - { - State = 43; - Match(LINE_COMMENT); - } - break; - default: - throw new NoViableAltException(this); - } - } - State = 48; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class ObjectContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(ElsaParser.ID, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ObjectInitializerContext objectInitializer() { - return GetRuleContext(0); - } - public ObjectContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_object; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitObject(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ObjectContext @object() { - ObjectContext _localctx = new ObjectContext(Context, State); - EnterRule(_localctx, 2, RULE_object); - try { - EnterOuterAlt(_localctx, 1); - { - State = 49; - Match(ID); - State = 51; - ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,2,Context) ) { - case 1: - { - State = 50; - objectInitializer(); - } - break; - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class NewObjectContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NEW() { return GetToken(ElsaParser.NEW, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(ElsaParser.ID, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARENTHESES_OPEN() { return GetToken(ElsaParser.PARENTHESES_OPEN, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARENTHESES_CLOSE() { return GetToken(ElsaParser.PARENTHESES_CLOSE, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LESS() { return GetToken(ElsaParser.LESS, 0); } - [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GREATER() { return GetToken(ElsaParser.GREATER, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ArgsContext args() { - return GetRuleContext(0); - } - public NewObjectContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_newObject; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitNewObject(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public NewObjectContext newObject() { - NewObjectContext _localctx = new NewObjectContext(Context, State); - EnterRule(_localctx, 4, RULE_newObject); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 53; - Match(NEW); - State = 54; - Match(ID); - State = 59; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if (_la==LESS) { - { - State = 55; - Match(LESS); - State = 56; - type(); - State = 57; - Match(GREATER); - } - } - - State = 61; - Match(PARENTHESES_OPEN); - State = 63; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NEW) | (1L << EXPRESSION_MARKER) | (1L << MINUS) | (1L << PARENTHESES_OPEN) | (1L << BRACKET_OPEN) | (1L << EXCLAMATION) | (1L << STRING_VAL) | (1L << BACKTICKSTRING_VAL) | (1L << INTEGER_VAL) | (1L << ID))) != 0)) { - { - State = 62; - args(); - } - } - - State = 65; - Match(PARENTHESES_CLOSE); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class VarDeclContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VARIABLE() { return GetToken(ElsaParser.VARIABLE, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(ElsaParser.ID, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(ElsaParser.COLON, 0); } - [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ() { return GetToken(ElsaParser.EQ, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr() { - return GetRuleContext(0); - } - public VarDeclContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_varDecl; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitVarDecl(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public VarDeclContext varDecl() { - VarDeclContext _localctx = new VarDeclContext(Context, State); - EnterRule(_localctx, 6, RULE_varDecl); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 67; - Match(VARIABLE); - State = 68; - Match(ID); - State = 71; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if (_la==COLON) { - { - State = 69; - Match(COLON); - State = 70; - type(); - } - } - - State = 75; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if (_la==EQ) { - { - State = 73; - Match(EQ); - State = 74; - expr(0); - } - } - - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class LocalVarDeclContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LET() { return GetToken(ElsaParser.LET, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(ElsaParser.ID, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(ElsaParser.COLON, 0); } - [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ() { return GetToken(ElsaParser.EQ, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr() { - return GetRuleContext(0); - } - public LocalVarDeclContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_localVarDecl; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitLocalVarDecl(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public LocalVarDeclContext localVarDecl() { - LocalVarDeclContext _localctx = new LocalVarDeclContext(Context, State); - EnterRule(_localctx, 8, RULE_localVarDecl); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 77; - Match(LET); - State = 78; - Match(ID); - State = 81; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if (_la==COLON) { - { - State = 79; - Match(COLON); - State = 80; - type(); - } - } - - State = 85; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if (_la==EQ) { - { - State = 83; - Match(EQ); - State = 84; - expr(0); - } - } - - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class TypeContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VOID() { return GetToken(ElsaParser.VOID, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FLOAT() { return GetToken(ElsaParser.FLOAT, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INT() { return GetToken(ElsaParser.INT, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OBJECT() { return GetToken(ElsaParser.OBJECT, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING() { return GetToken(ElsaParser.STRING, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(ElsaParser.ID, 0); } - public TypeContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_type; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitType(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public TypeContext type() { - TypeContext _localctx = new TypeContext(Context, State); - EnterRule(_localctx, 10, RULE_type); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 87; - _la = TokenStream.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << VOID) | (1L << FLOAT) | (1L << INT) | (1L << STRING) | (1L << OBJECT) | (1L << ID))) != 0)) ) { - ErrorHandler.RecoverInline(this); - } - else { - ErrorHandler.ReportMatch(this); - Consume(); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class ExpressionMarkerContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EXPRESSION_MARKER() { return GetToken(ElsaParser.EXPRESSION_MARKER, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARENTHESES_OPEN() { return GetToken(ElsaParser.PARENTHESES_OPEN, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(ElsaParser.ID, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA() { return GetToken(ElsaParser.COMMA, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ExpressionContentContext expressionContent() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARENTHESES_CLOSE() { return GetToken(ElsaParser.PARENTHESES_CLOSE, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LAMBDA() { return GetToken(ElsaParser.LAMBDA, 0); } - public ExpressionMarkerContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_expressionMarker; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitExpressionMarker(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ExpressionMarkerContext expressionMarker() { - ExpressionMarkerContext _localctx = new ExpressionMarkerContext(Context, State); - EnterRule(_localctx, 12, RULE_expressionMarker); - try { - State = 99; - ErrorHandler.Sync(this); - switch (TokenStream.LA(1)) { - case EXPRESSION_MARKER: - EnterOuterAlt(_localctx, 1); - { - State = 89; - Match(EXPRESSION_MARKER); - State = 90; - Match(PARENTHESES_OPEN); - State = 91; - Match(ID); - State = 92; - Match(COMMA); - State = 93; - expressionContent(); - State = 94; - Match(PARENTHESES_CLOSE); - } - break; - case ID: - EnterOuterAlt(_localctx, 2); - { - State = 96; - Match(ID); - State = 97; - Match(LAMBDA); - State = 98; - expressionContent(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class ExpressionContentContext : ParserRuleContext { - public ExpressionContentContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_expressionContent; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitExpressionContent(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ExpressionContentContext expressionContent() { - ExpressionContentContext _localctx = new ExpressionContentContext(Context, State); - EnterRule(_localctx, 14, RULE_expressionContent); - try { - int _alt; - EnterOuterAlt(_localctx, 1); - { - State = 104; - ErrorHandler.Sync(this); - _alt = Interpreter.AdaptivePredict(TokenStream,10,Context); - while ( _alt!=1 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1+1 ) { - { - { - State = 101; - MatchWildcard(); - } - } - } - State = 106; - ErrorHandler.Sync(this); - _alt = Interpreter.AdaptivePredict(TokenStream,10,Context); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class MethodCallContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(ElsaParser.ID, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PERIOD() { return GetToken(ElsaParser.PERIOD, 0); } - [System.Diagnostics.DebuggerNonUserCode] public FuncCallContext funcCall() { - return GetRuleContext(0); - } - public MethodCallContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_methodCall; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitMethodCall(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public MethodCallContext methodCall() { - MethodCallContext _localctx = new MethodCallContext(Context, State); - EnterRule(_localctx, 16, RULE_methodCall); - try { - EnterOuterAlt(_localctx, 1); - { - State = 107; - Match(ID); - State = 108; - Match(PERIOD); - State = 109; - funcCall(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class FuncCallContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(ElsaParser.ID, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARENTHESES_OPEN() { return GetToken(ElsaParser.PARENTHESES_OPEN, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARENTHESES_CLOSE() { return GetToken(ElsaParser.PARENTHESES_CLOSE, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ArgsContext args() { - return GetRuleContext(0); - } - public FuncCallContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_funcCall; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitFuncCall(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public FuncCallContext funcCall() { - FuncCallContext _localctx = new FuncCallContext(Context, State); - EnterRule(_localctx, 18, RULE_funcCall); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 111; - Match(ID); - State = 112; - Match(PARENTHESES_OPEN); - State = 114; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NEW) | (1L << EXPRESSION_MARKER) | (1L << MINUS) | (1L << PARENTHESES_OPEN) | (1L << BRACKET_OPEN) | (1L << EXCLAMATION) | (1L << STRING_VAL) | (1L << BACKTICKSTRING_VAL) | (1L << INTEGER_VAL) | (1L << ID))) != 0)) { - { - State = 113; - args(); - } - } - - State = 116; - Match(PARENTHESES_CLOSE); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class ArgsContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ArgContext[] arg() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public ArgContext arg(int i) { - return GetRuleContext(i); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(ElsaParser.COMMA); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { - return GetToken(ElsaParser.COMMA, i); - } - public ArgsContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_args; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitArgs(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ArgsContext args() { - ArgsContext _localctx = new ArgsContext(Context, State); - EnterRule(_localctx, 20, RULE_args); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 118; - arg(); - State = 123; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - while (_la==COMMA) { - { - { - State = 119; - Match(COMMA); - State = 120; - arg(); - } - } - State = 125; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class ArgContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ExpressionMarkerContext expressionMarker() { - return GetRuleContext(0); - } - public ArgContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_arg; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitArg(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ArgContext arg() { - ArgContext _localctx = new ArgContext(Context, State); - EnterRule(_localctx, 22, RULE_arg); - try { - State = 128; - ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,13,Context) ) { - case 1: - EnterOuterAlt(_localctx, 1); - { - State = 126; - expr(0); - } - break; - case 2: - EnterOuterAlt(_localctx, 2); - { - State = 127; - expressionMarker(); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class BlockContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CURLYBRACE_OPEN() { return GetToken(ElsaParser.CURLYBRACE_OPEN, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CURLYBRACE_CLOSE() { return GetToken(ElsaParser.CURLYBRACE_CLOSE, 0); } - [System.Diagnostics.DebuggerNonUserCode] public StatContext[] stat() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public StatContext stat(int i) { - return GetRuleContext(i); - } - public BlockContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_block; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitBlock(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public BlockContext block() { - BlockContext _localctx = new BlockContext(Context, State); - EnterRule(_localctx, 24, RULE_block); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 130; - Match(CURLYBRACE_OPEN); - State = 134; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NEW) | (1L << VARIABLE) | (1L << LET) | (1L << IF) | (1L << FOR) | (1L << RETURN) | (1L << EXPRESSION_MARKER) | (1L << MINUS) | (1L << PARENTHESES_OPEN) | (1L << BRACKET_OPEN) | (1L << CURLYBRACE_OPEN) | (1L << EXCLAMATION) | (1L << STRING_VAL) | (1L << BACKTICKSTRING_VAL) | (1L << INTEGER_VAL) | (1L << ID))) != 0)) { - { - { - State = 131; - stat(); - } - } - State = 136; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - } - State = 137; - Match(CURLYBRACE_CLOSE); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class ObjectInitializerContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CURLYBRACE_OPEN() { return GetToken(ElsaParser.CURLYBRACE_OPEN, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CURLYBRACE_CLOSE() { return GetToken(ElsaParser.CURLYBRACE_CLOSE, 0); } - [System.Diagnostics.DebuggerNonUserCode] public PropertyListContext propertyList() { - return GetRuleContext(0); - } - public ObjectInitializerContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_objectInitializer; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitObjectInitializer(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ObjectInitializerContext objectInitializer() { - ObjectInitializerContext _localctx = new ObjectInitializerContext(Context, State); - EnterRule(_localctx, 26, RULE_objectInitializer); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 139; - Match(CURLYBRACE_OPEN); - State = 141; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if (_la==ID) { - { - State = 140; - propertyList(); - } - } - - State = 143; - Match(CURLYBRACE_CLOSE); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class PropertyListContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public PropertyContext[] property() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public PropertyContext property(int i) { - return GetRuleContext(i); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(ElsaParser.COMMA); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { - return GetToken(ElsaParser.COMMA, i); - } - public PropertyListContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_propertyList; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitPropertyList(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public PropertyListContext propertyList() { - PropertyListContext _localctx = new PropertyListContext(Context, State); - EnterRule(_localctx, 28, RULE_propertyList); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 145; - property(); - State = 150; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - while (_la==COMMA) { - { - { - State = 146; - Match(COMMA); - State = 147; - property(); - } - } - State = 152; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class PropertyContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(ElsaParser.ID, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(ElsaParser.COLON, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr() { - return GetRuleContext(0); - } - public PropertyContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_property; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitProperty(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public PropertyContext property() { - PropertyContext _localctx = new PropertyContext(Context, State); - EnterRule(_localctx, 30, RULE_property); - try { - EnterOuterAlt(_localctx, 1); - { - State = 153; - Match(ID); - State = 154; - Match(COLON); - State = 155; - expr(0); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class StatContext : ParserRuleContext { - public StatContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_stat; } } - - public StatContext() { } - public virtual void CopyFrom(StatContext context) { - base.CopyFrom(context); - } - } - public partial class IfStatContext : StatContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IF() { return GetToken(ElsaParser.IF, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THEN() { return GetToken(ElsaParser.THEN, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ThenStatContext thenStat() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ELSE() { return GetToken(ElsaParser.ELSE, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ElseStatContext elseStat() { - return GetRuleContext(0); - } - public IfStatContext(StatContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitIfStat(this); - else return visitor.VisitChildren(this); - } - } - public partial class BlockStatContext : StatContext { - [System.Diagnostics.DebuggerNonUserCode] public BlockContext block() { - return GetRuleContext(0); - } - public BlockStatContext(StatContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitBlockStat(this); - else return visitor.VisitChildren(this); - } - } - public partial class ExpressionStatContext : StatContext { - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMICOLON() { return GetToken(ElsaParser.SEMICOLON, 0); } - public ExpressionStatContext(StatContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitExpressionStat(this); - else return visitor.VisitChildren(this); - } - } - public partial class ObjectStatContext : StatContext { - [System.Diagnostics.DebuggerNonUserCode] public ObjectContext @object() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMICOLON() { return GetToken(ElsaParser.SEMICOLON, 0); } - public ObjectStatContext(StatContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitObjectStat(this); - else return visitor.VisitChildren(this); - } - } - public partial class ReturnStatContext : StatContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RETURN() { return GetToken(ElsaParser.RETURN, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMICOLON() { return GetToken(ElsaParser.SEMICOLON, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr() { - return GetRuleContext(0); - } - public ReturnStatContext(StatContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitReturnStat(this); - else return visitor.VisitChildren(this); - } - } - public partial class VariableDeclarationStatContext : StatContext { - [System.Diagnostics.DebuggerNonUserCode] public VarDeclContext varDecl() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMICOLON() { return GetToken(ElsaParser.SEMICOLON, 0); } - public VariableDeclarationStatContext(StatContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitVariableDeclarationStat(this); - else return visitor.VisitChildren(this); - } - } - public partial class AssignmentStatContext : StatContext { - [System.Diagnostics.DebuggerNonUserCode] public ExprContext[] expr() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr(int i) { - return GetRuleContext(i); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ() { return GetToken(ElsaParser.EQ, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMICOLON() { return GetToken(ElsaParser.SEMICOLON, 0); } - public AssignmentStatContext(StatContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitAssignmentStat(this); - else return visitor.VisitChildren(this); - } - } - public partial class LocalVariableDeclarationStatContext : StatContext { - [System.Diagnostics.DebuggerNonUserCode] public LocalVarDeclContext localVarDecl() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMICOLON() { return GetToken(ElsaParser.SEMICOLON, 0); } - public LocalVariableDeclarationStatContext(StatContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitLocalVariableDeclarationStat(this); - else return visitor.VisitChildren(this); - } - } - public partial class ForStatContext : StatContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FOR() { return GetToken(ElsaParser.FOR, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARENTHESES_OPEN() { return GetToken(ElsaParser.PARENTHESES_OPEN, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(ElsaParser.ID, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ() { return GetToken(ElsaParser.EQ, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext[] expr() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr(int i) { - return GetRuleContext(i); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] SEMICOLON() { return GetTokens(ElsaParser.SEMICOLON); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMICOLON(int i) { - return GetToken(ElsaParser.SEMICOLON, i); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARENTHESES_CLOSE() { return GetToken(ElsaParser.PARENTHESES_CLOSE, 0); } - [System.Diagnostics.DebuggerNonUserCode] public StatContext stat() { - return GetRuleContext(0); - } - public ForStatContext(StatContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitForStat(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public StatContext stat() { - StatContext _localctx = new StatContext(Context, State); - EnterRule(_localctx, 32, RULE_stat); - int _la; - try { - State = 200; - ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,19,Context) ) { - case 1: - _localctx = new ObjectStatContext(_localctx); - EnterOuterAlt(_localctx, 1); - { - State = 157; - @object(); - State = 158; - Match(SEMICOLON); - } - break; - case 2: - _localctx = new IfStatContext(_localctx); - EnterOuterAlt(_localctx, 2); - { - State = 160; - Match(IF); - State = 161; - expr(0); - State = 162; - Match(THEN); - State = 163; - thenStat(); - State = 166; - ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,17,Context) ) { - case 1: - { - State = 164; - Match(ELSE); - State = 165; - elseStat(); - } - break; - } - } - break; - case 3: - _localctx = new ForStatContext(_localctx); - EnterOuterAlt(_localctx, 3); - { - State = 168; - Match(FOR); - State = 169; - Match(PARENTHESES_OPEN); - State = 170; - Match(ID); - State = 171; - Match(EQ); - State = 172; - expr(0); - State = 173; - Match(SEMICOLON); - State = 174; - expr(0); - State = 175; - Match(SEMICOLON); - State = 176; - expr(0); - State = 177; - Match(PARENTHESES_CLOSE); - State = 178; - stat(); - } - break; - case 4: - _localctx = new ReturnStatContext(_localctx); - EnterOuterAlt(_localctx, 4); - { - State = 180; - Match(RETURN); - State = 182; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NEW) | (1L << EXPRESSION_MARKER) | (1L << MINUS) | (1L << PARENTHESES_OPEN) | (1L << BRACKET_OPEN) | (1L << EXCLAMATION) | (1L << STRING_VAL) | (1L << BACKTICKSTRING_VAL) | (1L << INTEGER_VAL) | (1L << ID))) != 0)) { - { - State = 181; - expr(0); - } - } - - State = 184; - Match(SEMICOLON); - } - break; - case 5: - _localctx = new BlockStatContext(_localctx); - EnterOuterAlt(_localctx, 5); - { - State = 185; - block(); - } - break; - case 6: - _localctx = new VariableDeclarationStatContext(_localctx); - EnterOuterAlt(_localctx, 6); - { - State = 186; - varDecl(); - State = 187; - Match(SEMICOLON); - } - break; - case 7: - _localctx = new LocalVariableDeclarationStatContext(_localctx); - EnterOuterAlt(_localctx, 7); - { - State = 189; - localVarDecl(); - State = 190; - Match(SEMICOLON); - } - break; - case 8: - _localctx = new AssignmentStatContext(_localctx); - EnterOuterAlt(_localctx, 8); - { - State = 192; - expr(0); - State = 193; - Match(EQ); - State = 194; - expr(0); - State = 195; - Match(SEMICOLON); - } - break; - case 9: - _localctx = new ExpressionStatContext(_localctx); - EnterOuterAlt(_localctx, 9); - { - State = 197; - expr(0); - State = 198; - Match(SEMICOLON); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class ThenStatContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public StatContext stat() { - return GetRuleContext(0); - } - public ThenStatContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_thenStat; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitThenStat(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ThenStatContext thenStat() { - ThenStatContext _localctx = new ThenStatContext(Context, State); - EnterRule(_localctx, 34, RULE_thenStat); - try { - EnterOuterAlt(_localctx, 1); - { - State = 202; - stat(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class ElseStatContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public StatContext stat() { - return GetRuleContext(0); - } - public ElseStatContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_elseStat; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitElseStat(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ElseStatContext elseStat() { - ElseStatContext _localctx = new ElseStatContext(Context, State); - EnterRule(_localctx, 36, RULE_elseStat); - try { - EnterOuterAlt(_localctx, 1); - { - State = 204; - stat(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class ExprContext : ParserRuleContext { - public ExprContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_expr; } } - - public ExprContext() { } - public virtual void CopyFrom(ExprContext context) { - base.CopyFrom(context); - } - } - public partial class NewObjectExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public NewObjectContext newObject() { - return GetRuleContext(0); - } - public NewObjectExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitNewObjectExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class SubtractExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ExprContext[] expr() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr(int i) { - return GetRuleContext(i); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MINUS() { return GetToken(ElsaParser.MINUS, 0); } - public SubtractExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitSubtractExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class IncrementExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INCREMENT() { return GetToken(ElsaParser.INCREMENT, 0); } - public IncrementExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitIncrementExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class ObjectExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ObjectContext @object() { - return GetRuleContext(0); - } - public ObjectExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitObjectExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class StringValueExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING_VAL() { return GetToken(ElsaParser.STRING_VAL, 0); } - public StringValueExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitStringValueExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class MultiplyExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ExprContext[] expr() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr(int i) { - return GetRuleContext(i); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STAR() { return GetToken(ElsaParser.STAR, 0); } - public MultiplyExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitMultiplyExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class ParenthesesExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARENTHESES_OPEN() { return GetToken(ElsaParser.PARENTHESES_OPEN, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARENTHESES_CLOSE() { return GetToken(ElsaParser.PARENTHESES_CLOSE, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ExprListContext exprList() { - return GetRuleContext(0); - } - public ParenthesesExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitParenthesesExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class FunctionExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public FuncCallContext funcCall() { - return GetRuleContext(0); - } - public FunctionExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class DecrementExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DECREMENT() { return GetToken(ElsaParser.DECREMENT, 0); } - public DecrementExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitDecrementExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class NegateExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MINUS() { return GetToken(ElsaParser.MINUS, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr() { - return GetRuleContext(0); - } - public NegateExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitNegateExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class MethodCallExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public MethodCallContext methodCall() { - return GetRuleContext(0); - } - public MethodCallExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitMethodCallExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class VariableExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(ElsaParser.ID, 0); } - public VariableExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitVariableExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class NotExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EXCLAMATION() { return GetToken(ElsaParser.EXCLAMATION, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr() { - return GetRuleContext(0); - } - public NotExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitNotExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class IntegerValueExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INTEGER_VAL() { return GetToken(ElsaParser.INTEGER_VAL, 0); } - public IntegerValueExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitIntegerValueExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class AddExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ExprContext[] expr() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr(int i) { - return GetRuleContext(i); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PLUS() { return GetToken(ElsaParser.PLUS, 0); } - public AddExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitAddExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class ExpressionMarkerExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ExpressionMarkerContext expressionMarker() { - return GetRuleContext(0); - } - public ExpressionMarkerExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitExpressionMarkerExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class BackTickStringValueExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BACKTICKSTRING_VAL() { return GetToken(ElsaParser.BACKTICKSTRING_VAL, 0); } - public BackTickStringValueExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitBackTickStringValueExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class BracketsExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BRACKET_OPEN() { return GetToken(ElsaParser.BRACKET_OPEN, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BRACKET_CLOSE() { return GetToken(ElsaParser.BRACKET_CLOSE, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ExprListContext exprList() { - return GetRuleContext(0); - } - public BracketsExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitBracketsExpr(this); - else return visitor.VisitChildren(this); - } - } - public partial class CompareExprContext : ExprContext { - [System.Diagnostics.DebuggerNonUserCode] public ExprContext[] expr() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr(int i) { - return GetRuleContext(i); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQUALS() { return GetToken(ElsaParser.EQUALS, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GREATER() { return GetToken(ElsaParser.GREATER, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LESS() { return GetToken(ElsaParser.LESS, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NOT_EQUALS() { return GetToken(ElsaParser.NOT_EQUALS, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GREATER_EQUALS() { return GetToken(ElsaParser.GREATER_EQUALS, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LESS_EQUALS() { return GetToken(ElsaParser.LESS_EQUALS, 0); } - public CompareExprContext(ExprContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitCompareExpr(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ExprContext expr() { - return expr(0); - } - - private ExprContext expr(int _p) { - ParserRuleContext _parentctx = Context; - int _parentState = State; - ExprContext _localctx = new ExprContext(Context, _parentState); - ExprContext _prevctx = _localctx; - int _startState = 38; - EnterRecursionRule(_localctx, 38, RULE_expr, _p); - int _la; - try { - int _alt; - EnterOuterAlt(_localctx, 1); - { - State = 230; - ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,22,Context) ) { - case 1: - { - _localctx = new FunctionExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - - State = 207; - funcCall(); - } - break; - case 2: - { - _localctx = new ExpressionMarkerExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 208; - expressionMarker(); - } - break; - case 3: - { - _localctx = new ObjectExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 209; - @object(); - } - break; - case 4: - { - _localctx = new NewObjectExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 210; - newObject(); - } - break; - case 5: - { - _localctx = new NegateExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 211; - Match(MINUS); - State = 212; - expr(13); - } - break; - case 6: - { - _localctx = new NotExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 213; - Match(EXCLAMATION); - State = 214; - expr(12); - } - break; - case 7: - { - _localctx = new IntegerValueExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 215; - Match(INTEGER_VAL); - } - break; - case 8: - { - _localctx = new StringValueExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 216; - Match(STRING_VAL); - } - break; - case 9: - { - _localctx = new BackTickStringValueExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 217; - Match(BACKTICKSTRING_VAL); - } - break; - case 10: - { - _localctx = new ParenthesesExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 218; - Match(PARENTHESES_OPEN); - State = 220; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NEW) | (1L << EXPRESSION_MARKER) | (1L << MINUS) | (1L << PARENTHESES_OPEN) | (1L << BRACKET_OPEN) | (1L << EXCLAMATION) | (1L << STRING_VAL) | (1L << BACKTICKSTRING_VAL) | (1L << INTEGER_VAL) | (1L << ID))) != 0)) { - { - State = 219; - exprList(); - } - } - - State = 222; - Match(PARENTHESES_CLOSE); - } - break; - case 11: - { - _localctx = new BracketsExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 223; - Match(BRACKET_OPEN); - State = 225; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NEW) | (1L << EXPRESSION_MARKER) | (1L << MINUS) | (1L << PARENTHESES_OPEN) | (1L << BRACKET_OPEN) | (1L << EXCLAMATION) | (1L << STRING_VAL) | (1L << BACKTICKSTRING_VAL) | (1L << INTEGER_VAL) | (1L << ID))) != 0)) { - { - State = 224; - exprList(); - } - } - - State = 227; - Match(BRACKET_CLOSE); - } - break; - case 12: - { - _localctx = new MethodCallExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 228; - methodCall(); - } - break; - case 13: - { - _localctx = new VariableExprContext(_localctx); - Context = _localctx; - _prevctx = _localctx; - State = 229; - Match(ID); - } - break; - } - Context.Stop = TokenStream.LT(-1); - State = 250; - ErrorHandler.Sync(this); - _alt = Interpreter.AdaptivePredict(TokenStream,24,Context); - while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - if ( ParseListeners!=null ) - TriggerExitRuleEvent(); - _prevctx = _localctx; - { - State = 248; - ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,23,Context) ) { - case 1: - { - _localctx = new MultiplyExprContext(new ExprContext(_parentctx, _parentState)); - PushNewRecursionContext(_localctx, _startState, RULE_expr); - State = 232; - if (!(Precpred(Context, 11))) throw new FailedPredicateException(this, "Precpred(Context, 11)"); - State = 233; - Match(STAR); - State = 234; - expr(12); - } - break; - case 2: - { - _localctx = new AddExprContext(new ExprContext(_parentctx, _parentState)); - PushNewRecursionContext(_localctx, _startState, RULE_expr); - State = 235; - if (!(Precpred(Context, 10))) throw new FailedPredicateException(this, "Precpred(Context, 10)"); - State = 236; - Match(PLUS); - State = 237; - expr(11); - } - break; - case 3: - { - _localctx = new SubtractExprContext(new ExprContext(_parentctx, _parentState)); - PushNewRecursionContext(_localctx, _startState, RULE_expr); - State = 238; - if (!(Precpred(Context, 9))) throw new FailedPredicateException(this, "Precpred(Context, 9)"); - State = 239; - Match(MINUS); - State = 240; - expr(10); - } - break; - case 4: - { - _localctx = new CompareExprContext(new ExprContext(_parentctx, _parentState)); - PushNewRecursionContext(_localctx, _startState, RULE_expr); - State = 241; - if (!(Precpred(Context, 8))) throw new FailedPredicateException(this, "Precpred(Context, 8)"); - State = 242; - _la = TokenStream.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << GREATER) | (1L << EQUALS) | (1L << NOT_EQUALS) | (1L << GREATER_EQUALS) | (1L << LESS) | (1L << LESS_EQUALS))) != 0)) ) { - ErrorHandler.RecoverInline(this); - } - else { - ErrorHandler.ReportMatch(this); - Consume(); - } - State = 243; - expr(9); - } - break; - case 5: - { - _localctx = new IncrementExprContext(new ExprContext(_parentctx, _parentState)); - PushNewRecursionContext(_localctx, _startState, RULE_expr); - State = 244; - if (!(Precpred(Context, 15))) throw new FailedPredicateException(this, "Precpred(Context, 15)"); - State = 245; - Match(INCREMENT); - } - break; - case 6: - { - _localctx = new DecrementExprContext(new ExprContext(_parentctx, _parentState)); - PushNewRecursionContext(_localctx, _startState, RULE_expr); - State = 246; - if (!(Precpred(Context, 14))) throw new FailedPredicateException(this, "Precpred(Context, 14)"); - State = 247; - Match(DECREMENT); - } - break; - } - } - } - State = 252; - ErrorHandler.Sync(this); - _alt = Interpreter.AdaptivePredict(TokenStream,24,Context); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - UnrollRecursionContexts(_parentctx); - } - return _localctx; - } - - public partial class ExprListContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ExprContext[] expr() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public ExprContext expr(int i) { - return GetRuleContext(i); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(ElsaParser.COMMA); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { - return GetToken(ElsaParser.COMMA, i); - } - public ExprListContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_exprList; } } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - IElsaParserVisitor typedVisitor = visitor as IElsaParserVisitor; - if (typedVisitor != null) return typedVisitor.VisitExprList(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ExprListContext exprList() { - ExprListContext _localctx = new ExprListContext(Context, State); - EnterRule(_localctx, 40, RULE_exprList); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 253; - expr(0); - State = 258; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - while (_la==COMMA) { - { - { - State = 254; - Match(COMMA); - State = 255; - expr(0); - } - } - State = 260; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public override bool Sempred(RuleContext _localctx, int ruleIndex, int predIndex) { - switch (ruleIndex) { - case 19: return expr_sempred((ExprContext)_localctx, predIndex); - } - return true; - } - private bool expr_sempred(ExprContext _localctx, int predIndex) { - switch (predIndex) { - case 0: return Precpred(Context, 11); - case 1: return Precpred(Context, 10); - case 2: return Precpred(Context, 9); - case 3: return Precpred(Context, 8); - case 4: return Precpred(Context, 15); - case 5: return Precpred(Context, 14); - } - return true; - } - - private static int[] _serializedATN = { - 4,1,48,262,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7, - 7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14, - 2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,1,0,1,0,5, - 0,45,8,0,10,0,12,0,48,9,0,1,1,1,1,3,1,52,8,1,1,2,1,2,1,2,1,2,1,2,1,2,3, - 2,60,8,2,1,2,1,2,3,2,64,8,2,1,2,1,2,1,3,1,3,1,3,1,3,3,3,72,8,3,1,3,1,3, - 3,3,76,8,3,1,4,1,4,1,4,1,4,3,4,82,8,4,1,4,1,4,3,4,86,8,4,1,5,1,5,1,6,1, - 6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,3,6,100,8,6,1,7,5,7,103,8,7,10,7,12, - 7,106,9,7,1,8,1,8,1,8,1,8,1,9,1,9,1,9,3,9,115,8,9,1,9,1,9,1,10,1,10,1, - 10,5,10,122,8,10,10,10,12,10,125,9,10,1,11,1,11,3,11,129,8,11,1,12,1,12, - 5,12,133,8,12,10,12,12,12,136,9,12,1,12,1,12,1,13,1,13,3,13,142,8,13,1, - 13,1,13,1,14,1,14,1,14,5,14,149,8,14,10,14,12,14,152,9,14,1,15,1,15,1, - 15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,3,16,167,8,16,1,16, - 1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,3,16, - 183,8,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1, - 16,1,16,1,16,1,16,3,16,201,8,16,1,17,1,17,1,18,1,18,1,19,1,19,1,19,1,19, - 1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,3,19,221,8,19,1,19,1, - 19,1,19,3,19,226,8,19,1,19,1,19,1,19,3,19,231,8,19,1,19,1,19,1,19,1,19, - 1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,5,19,249,8, - 19,10,19,12,19,252,9,19,1,20,1,20,1,20,5,20,257,8,20,10,20,12,20,260,9, - 20,1,20,1,104,1,38,21,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34, - 36,38,40,0,2,2,0,13,17,46,46,2,0,2,2,26,30,288,0,46,1,0,0,0,2,49,1,0,0, - 0,4,53,1,0,0,0,6,67,1,0,0,0,8,77,1,0,0,0,10,87,1,0,0,0,12,99,1,0,0,0,14, - 104,1,0,0,0,16,107,1,0,0,0,18,111,1,0,0,0,20,118,1,0,0,0,22,128,1,0,0, - 0,24,130,1,0,0,0,26,139,1,0,0,0,28,145,1,0,0,0,30,153,1,0,0,0,32,200,1, - 0,0,0,34,202,1,0,0,0,36,204,1,0,0,0,38,230,1,0,0,0,40,253,1,0,0,0,42,45, - 3,32,16,0,43,45,5,44,0,0,44,42,1,0,0,0,44,43,1,0,0,0,45,48,1,0,0,0,46, - 44,1,0,0,0,46,47,1,0,0,0,47,1,1,0,0,0,48,46,1,0,0,0,49,51,5,46,0,0,50, - 52,3,26,13,0,51,50,1,0,0,0,51,52,1,0,0,0,52,3,1,0,0,0,53,54,5,5,0,0,54, - 59,5,46,0,0,55,56,5,29,0,0,56,57,3,10,5,0,57,58,5,2,0,0,58,60,1,0,0,0, - 59,55,1,0,0,0,59,60,1,0,0,0,60,61,1,0,0,0,61,63,5,32,0,0,62,64,3,20,10, - 0,63,62,1,0,0,0,63,64,1,0,0,0,64,65,1,0,0,0,65,66,5,33,0,0,66,5,1,0,0, - 0,67,68,5,6,0,0,68,71,5,46,0,0,69,70,5,20,0,0,70,72,3,10,5,0,71,69,1,0, - 0,0,71,72,1,0,0,0,72,75,1,0,0,0,73,74,5,1,0,0,74,76,3,38,19,0,75,73,1, - 0,0,0,75,76,1,0,0,0,76,7,1,0,0,0,77,78,5,7,0,0,78,81,5,46,0,0,79,80,5, - 20,0,0,80,82,3,10,5,0,81,79,1,0,0,0,81,82,1,0,0,0,82,85,1,0,0,0,83,84, - 5,1,0,0,84,86,3,38,19,0,85,83,1,0,0,0,85,86,1,0,0,0,86,9,1,0,0,0,87,88, - 7,0,0,0,88,11,1,0,0,0,89,90,5,18,0,0,90,91,5,32,0,0,91,92,5,46,0,0,92, - 93,5,22,0,0,93,94,3,14,7,0,94,95,5,33,0,0,95,100,1,0,0,0,96,97,5,46,0, - 0,97,98,5,31,0,0,98,100,3,14,7,0,99,89,1,0,0,0,99,96,1,0,0,0,100,13,1, - 0,0,0,101,103,9,0,0,0,102,101,1,0,0,0,103,106,1,0,0,0,104,105,1,0,0,0, - 104,102,1,0,0,0,105,15,1,0,0,0,106,104,1,0,0,0,107,108,5,46,0,0,108,109, - 5,41,0,0,109,110,3,18,9,0,110,17,1,0,0,0,111,112,5,46,0,0,112,114,5,32, - 0,0,113,115,3,20,10,0,114,113,1,0,0,0,114,115,1,0,0,0,115,116,1,0,0,0, - 116,117,5,33,0,0,117,19,1,0,0,0,118,123,3,22,11,0,119,120,5,22,0,0,120, - 122,3,22,11,0,121,119,1,0,0,0,122,125,1,0,0,0,123,121,1,0,0,0,123,124, - 1,0,0,0,124,21,1,0,0,0,125,123,1,0,0,0,126,129,3,38,19,0,127,129,3,12, - 6,0,128,126,1,0,0,0,128,127,1,0,0,0,129,23,1,0,0,0,130,134,5,36,0,0,131, - 133,3,32,16,0,132,131,1,0,0,0,133,136,1,0,0,0,134,132,1,0,0,0,134,135, - 1,0,0,0,135,137,1,0,0,0,136,134,1,0,0,0,137,138,5,37,0,0,138,25,1,0,0, - 0,139,141,5,36,0,0,140,142,3,28,14,0,141,140,1,0,0,0,141,142,1,0,0,0,142, - 143,1,0,0,0,143,144,5,37,0,0,144,27,1,0,0,0,145,150,3,30,15,0,146,147, - 5,22,0,0,147,149,3,30,15,0,148,146,1,0,0,0,149,152,1,0,0,0,150,148,1,0, - 0,0,150,151,1,0,0,0,151,29,1,0,0,0,152,150,1,0,0,0,153,154,5,46,0,0,154, - 155,5,20,0,0,155,156,3,38,19,0,156,31,1,0,0,0,157,158,3,2,1,0,158,159, - 5,21,0,0,159,201,1,0,0,0,160,161,5,8,0,0,161,162,3,38,19,0,162,163,5,9, - 0,0,163,166,3,34,17,0,164,165,5,10,0,0,165,167,3,36,18,0,166,164,1,0,0, - 0,166,167,1,0,0,0,167,201,1,0,0,0,168,169,5,11,0,0,169,170,5,32,0,0,170, - 171,5,46,0,0,171,172,5,1,0,0,172,173,3,38,19,0,173,174,5,21,0,0,174,175, - 3,38,19,0,175,176,5,21,0,0,176,177,3,38,19,0,177,178,5,33,0,0,178,179, - 3,32,16,0,179,201,1,0,0,0,180,182,5,12,0,0,181,183,3,38,19,0,182,181,1, - 0,0,0,182,183,1,0,0,0,183,184,1,0,0,0,184,201,5,21,0,0,185,201,3,24,12, - 0,186,187,3,6,3,0,187,188,5,21,0,0,188,201,1,0,0,0,189,190,3,8,4,0,190, - 191,5,21,0,0,191,201,1,0,0,0,192,193,3,38,19,0,193,194,5,1,0,0,194,195, - 3,38,19,0,195,196,5,21,0,0,196,201,1,0,0,0,197,198,3,38,19,0,198,199,5, - 21,0,0,199,201,1,0,0,0,200,157,1,0,0,0,200,160,1,0,0,0,200,168,1,0,0,0, - 200,180,1,0,0,0,200,185,1,0,0,0,200,186,1,0,0,0,200,189,1,0,0,0,200,192, - 1,0,0,0,200,197,1,0,0,0,201,33,1,0,0,0,202,203,3,32,16,0,203,35,1,0,0, - 0,204,205,3,32,16,0,205,37,1,0,0,0,206,207,6,19,-1,0,207,231,3,18,9,0, - 208,231,3,12,6,0,209,231,3,2,1,0,210,231,3,4,2,0,211,212,5,24,0,0,212, - 231,3,38,19,13,213,214,5,38,0,0,214,231,3,38,19,12,215,231,5,45,0,0,216, - 231,5,42,0,0,217,231,5,43,0,0,218,220,5,32,0,0,219,221,3,40,20,0,220,219, - 1,0,0,0,220,221,1,0,0,0,221,222,1,0,0,0,222,231,5,33,0,0,223,225,5,34, - 0,0,224,226,3,40,20,0,225,224,1,0,0,0,225,226,1,0,0,0,226,227,1,0,0,0, - 227,231,5,35,0,0,228,231,3,16,8,0,229,231,5,46,0,0,230,206,1,0,0,0,230, - 208,1,0,0,0,230,209,1,0,0,0,230,210,1,0,0,0,230,211,1,0,0,0,230,213,1, - 0,0,0,230,215,1,0,0,0,230,216,1,0,0,0,230,217,1,0,0,0,230,218,1,0,0,0, - 230,223,1,0,0,0,230,228,1,0,0,0,230,229,1,0,0,0,231,250,1,0,0,0,232,233, - 10,11,0,0,233,234,5,25,0,0,234,249,3,38,19,12,235,236,10,10,0,0,236,237, - 5,23,0,0,237,249,3,38,19,11,238,239,10,9,0,0,239,240,5,24,0,0,240,249, - 3,38,19,10,241,242,10,8,0,0,242,243,7,1,0,0,243,249,3,38,19,9,244,245, - 10,15,0,0,245,249,5,3,0,0,246,247,10,14,0,0,247,249,5,4,0,0,248,232,1, - 0,0,0,248,235,1,0,0,0,248,238,1,0,0,0,248,241,1,0,0,0,248,244,1,0,0,0, - 248,246,1,0,0,0,249,252,1,0,0,0,250,248,1,0,0,0,250,251,1,0,0,0,251,39, - 1,0,0,0,252,250,1,0,0,0,253,258,3,38,19,0,254,255,5,22,0,0,255,257,3,38, - 19,0,256,254,1,0,0,0,257,260,1,0,0,0,258,256,1,0,0,0,258,259,1,0,0,0,259, - 41,1,0,0,0,260,258,1,0,0,0,26,44,46,51,59,63,71,75,81,85,99,104,114,123, - 128,134,141,150,166,182,200,220,225,230,248,250,258 - }; - - public static readonly ATN _ATN = - new ATNDeserializer().Deserialize(_serializedATN); - - -} diff --git a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParser.interp b/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParser.interp deleted file mode 100644 index 1c4963da..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParser.interp +++ /dev/null @@ -1,128 +0,0 @@ -token literal names: -null -'=' -'>' -'++' -'--' -'new' -'variable' -'let' -'if' -'then' -'else' -'for' -'return' -'void' -'float' -'int' -'string' -'object' -'expression' -null -':' -';' -',' -'+' -'-' -'*' -'==' -'!=' -'>=' -'<' -'<=' -'=>' -'(' -')' -'[' -']' -'{' -'}' -'!' -'|' -'||' -'.' -null -null -null -null -null -null -'\\|' - -token symbolic names: -null -EQ -GREATER -INCREMENT -DECREMENT -NEW -VARIABLE -LET -IF -THEN -ELSE -FOR -RETURN -VOID -FLOAT -INT -STRING -OBJECT -EXPRESSION_MARKER -SYMBOL -COLON -SEMICOLON -COMMA -PLUS -MINUS -STAR -EQUALS -NOT_EQUALS -GREATER_EQUALS -LESS -LESS_EQUALS -LAMBDA -PARENTHESES_OPEN -PARENTHESES_CLOSE -BRACKET_OPEN -BRACKET_CLOSE -CURLYBRACE_OPEN -CURLYBRACE_CLOSE -EXCLAMATION -PIPE -PIPE_DBL -PERIOD -STRING_VAL -BACKTICKSTRING_VAL -LINE_COMMENT -INTEGER_VAL -ID -WS -ESC - -rule names: -program -object -newObject -varDecl -localVarDecl -type -expressionMarker -expressionContent -methodCall -funcCall -args -arg -block -objectInitializer -propertyList -property -stat -thenStat -elseStat -expr -exprList - - -atn: -[4, 1, 48, 262, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 1, 0, 1, 0, 5, 0, 45, 8, 0, 10, 0, 12, 0, 48, 9, 0, 1, 1, 1, 1, 3, 1, 52, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 60, 8, 2, 1, 2, 1, 2, 3, 2, 64, 8, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 72, 8, 3, 1, 3, 1, 3, 3, 3, 76, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 82, 8, 4, 1, 4, 1, 4, 3, 4, 86, 8, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 100, 8, 6, 1, 7, 5, 7, 103, 8, 7, 10, 7, 12, 7, 106, 9, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 3, 9, 115, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 5, 10, 122, 8, 10, 10, 10, 12, 10, 125, 9, 10, 1, 11, 1, 11, 3, 11, 129, 8, 11, 1, 12, 1, 12, 5, 12, 133, 8, 12, 10, 12, 12, 12, 136, 9, 12, 1, 12, 1, 12, 1, 13, 1, 13, 3, 13, 142, 8, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 5, 14, 149, 8, 14, 10, 14, 12, 14, 152, 9, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 167, 8, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 183, 8, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 201, 8, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 221, 8, 19, 1, 19, 1, 19, 1, 19, 3, 19, 226, 8, 19, 1, 19, 1, 19, 1, 19, 3, 19, 231, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 249, 8, 19, 10, 19, 12, 19, 252, 9, 19, 1, 20, 1, 20, 1, 20, 5, 20, 257, 8, 20, 10, 20, 12, 20, 260, 9, 20, 1, 20, 1, 104, 1, 38, 21, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 0, 2, 2, 0, 13, 17, 46, 46, 2, 0, 2, 2, 26, 30, 288, 0, 46, 1, 0, 0, 0, 2, 49, 1, 0, 0, 0, 4, 53, 1, 0, 0, 0, 6, 67, 1, 0, 0, 0, 8, 77, 1, 0, 0, 0, 10, 87, 1, 0, 0, 0, 12, 99, 1, 0, 0, 0, 14, 104, 1, 0, 0, 0, 16, 107, 1, 0, 0, 0, 18, 111, 1, 0, 0, 0, 20, 118, 1, 0, 0, 0, 22, 128, 1, 0, 0, 0, 24, 130, 1, 0, 0, 0, 26, 139, 1, 0, 0, 0, 28, 145, 1, 0, 0, 0, 30, 153, 1, 0, 0, 0, 32, 200, 1, 0, 0, 0, 34, 202, 1, 0, 0, 0, 36, 204, 1, 0, 0, 0, 38, 230, 1, 0, 0, 0, 40, 253, 1, 0, 0, 0, 42, 45, 3, 32, 16, 0, 43, 45, 5, 44, 0, 0, 44, 42, 1, 0, 0, 0, 44, 43, 1, 0, 0, 0, 45, 48, 1, 0, 0, 0, 46, 44, 1, 0, 0, 0, 46, 47, 1, 0, 0, 0, 47, 1, 1, 0, 0, 0, 48, 46, 1, 0, 0, 0, 49, 51, 5, 46, 0, 0, 50, 52, 3, 26, 13, 0, 51, 50, 1, 0, 0, 0, 51, 52, 1, 0, 0, 0, 52, 3, 1, 0, 0, 0, 53, 54, 5, 5, 0, 0, 54, 59, 5, 46, 0, 0, 55, 56, 5, 29, 0, 0, 56, 57, 3, 10, 5, 0, 57, 58, 5, 2, 0, 0, 58, 60, 1, 0, 0, 0, 59, 55, 1, 0, 0, 0, 59, 60, 1, 0, 0, 0, 60, 61, 1, 0, 0, 0, 61, 63, 5, 32, 0, 0, 62, 64, 3, 20, 10, 0, 63, 62, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 65, 1, 0, 0, 0, 65, 66, 5, 33, 0, 0, 66, 5, 1, 0, 0, 0, 67, 68, 5, 6, 0, 0, 68, 71, 5, 46, 0, 0, 69, 70, 5, 20, 0, 0, 70, 72, 3, 10, 5, 0, 71, 69, 1, 0, 0, 0, 71, 72, 1, 0, 0, 0, 72, 75, 1, 0, 0, 0, 73, 74, 5, 1, 0, 0, 74, 76, 3, 38, 19, 0, 75, 73, 1, 0, 0, 0, 75, 76, 1, 0, 0, 0, 76, 7, 1, 0, 0, 0, 77, 78, 5, 7, 0, 0, 78, 81, 5, 46, 0, 0, 79, 80, 5, 20, 0, 0, 80, 82, 3, 10, 5, 0, 81, 79, 1, 0, 0, 0, 81, 82, 1, 0, 0, 0, 82, 85, 1, 0, 0, 0, 83, 84, 5, 1, 0, 0, 84, 86, 3, 38, 19, 0, 85, 83, 1, 0, 0, 0, 85, 86, 1, 0, 0, 0, 86, 9, 1, 0, 0, 0, 87, 88, 7, 0, 0, 0, 88, 11, 1, 0, 0, 0, 89, 90, 5, 18, 0, 0, 90, 91, 5, 32, 0, 0, 91, 92, 5, 46, 0, 0, 92, 93, 5, 22, 0, 0, 93, 94, 3, 14, 7, 0, 94, 95, 5, 33, 0, 0, 95, 100, 1, 0, 0, 0, 96, 97, 5, 46, 0, 0, 97, 98, 5, 31, 0, 0, 98, 100, 3, 14, 7, 0, 99, 89, 1, 0, 0, 0, 99, 96, 1, 0, 0, 0, 100, 13, 1, 0, 0, 0, 101, 103, 9, 0, 0, 0, 102, 101, 1, 0, 0, 0, 103, 106, 1, 0, 0, 0, 104, 105, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 105, 15, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 107, 108, 5, 46, 0, 0, 108, 109, 5, 41, 0, 0, 109, 110, 3, 18, 9, 0, 110, 17, 1, 0, 0, 0, 111, 112, 5, 46, 0, 0, 112, 114, 5, 32, 0, 0, 113, 115, 3, 20, 10, 0, 114, 113, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 117, 5, 33, 0, 0, 117, 19, 1, 0, 0, 0, 118, 123, 3, 22, 11, 0, 119, 120, 5, 22, 0, 0, 120, 122, 3, 22, 11, 0, 121, 119, 1, 0, 0, 0, 122, 125, 1, 0, 0, 0, 123, 121, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 21, 1, 0, 0, 0, 125, 123, 1, 0, 0, 0, 126, 129, 3, 38, 19, 0, 127, 129, 3, 12, 6, 0, 128, 126, 1, 0, 0, 0, 128, 127, 1, 0, 0, 0, 129, 23, 1, 0, 0, 0, 130, 134, 5, 36, 0, 0, 131, 133, 3, 32, 16, 0, 132, 131, 1, 0, 0, 0, 133, 136, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 134, 135, 1, 0, 0, 0, 135, 137, 1, 0, 0, 0, 136, 134, 1, 0, 0, 0, 137, 138, 5, 37, 0, 0, 138, 25, 1, 0, 0, 0, 139, 141, 5, 36, 0, 0, 140, 142, 3, 28, 14, 0, 141, 140, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 144, 5, 37, 0, 0, 144, 27, 1, 0, 0, 0, 145, 150, 3, 30, 15, 0, 146, 147, 5, 22, 0, 0, 147, 149, 3, 30, 15, 0, 148, 146, 1, 0, 0, 0, 149, 152, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 150, 151, 1, 0, 0, 0, 151, 29, 1, 0, 0, 0, 152, 150, 1, 0, 0, 0, 153, 154, 5, 46, 0, 0, 154, 155, 5, 20, 0, 0, 155, 156, 3, 38, 19, 0, 156, 31, 1, 0, 0, 0, 157, 158, 3, 2, 1, 0, 158, 159, 5, 21, 0, 0, 159, 201, 1, 0, 0, 0, 160, 161, 5, 8, 0, 0, 161, 162, 3, 38, 19, 0, 162, 163, 5, 9, 0, 0, 163, 166, 3, 34, 17, 0, 164, 165, 5, 10, 0, 0, 165, 167, 3, 36, 18, 0, 166, 164, 1, 0, 0, 0, 166, 167, 1, 0, 0, 0, 167, 201, 1, 0, 0, 0, 168, 169, 5, 11, 0, 0, 169, 170, 5, 32, 0, 0, 170, 171, 5, 46, 0, 0, 171, 172, 5, 1, 0, 0, 172, 173, 3, 38, 19, 0, 173, 174, 5, 21, 0, 0, 174, 175, 3, 38, 19, 0, 175, 176, 5, 21, 0, 0, 176, 177, 3, 38, 19, 0, 177, 178, 5, 33, 0, 0, 178, 179, 3, 32, 16, 0, 179, 201, 1, 0, 0, 0, 180, 182, 5, 12, 0, 0, 181, 183, 3, 38, 19, 0, 182, 181, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 201, 5, 21, 0, 0, 185, 201, 3, 24, 12, 0, 186, 187, 3, 6, 3, 0, 187, 188, 5, 21, 0, 0, 188, 201, 1, 0, 0, 0, 189, 190, 3, 8, 4, 0, 190, 191, 5, 21, 0, 0, 191, 201, 1, 0, 0, 0, 192, 193, 3, 38, 19, 0, 193, 194, 5, 1, 0, 0, 194, 195, 3, 38, 19, 0, 195, 196, 5, 21, 0, 0, 196, 201, 1, 0, 0, 0, 197, 198, 3, 38, 19, 0, 198, 199, 5, 21, 0, 0, 199, 201, 1, 0, 0, 0, 200, 157, 1, 0, 0, 0, 200, 160, 1, 0, 0, 0, 200, 168, 1, 0, 0, 0, 200, 180, 1, 0, 0, 0, 200, 185, 1, 0, 0, 0, 200, 186, 1, 0, 0, 0, 200, 189, 1, 0, 0, 0, 200, 192, 1, 0, 0, 0, 200, 197, 1, 0, 0, 0, 201, 33, 1, 0, 0, 0, 202, 203, 3, 32, 16, 0, 203, 35, 1, 0, 0, 0, 204, 205, 3, 32, 16, 0, 205, 37, 1, 0, 0, 0, 206, 207, 6, 19, -1, 0, 207, 231, 3, 18, 9, 0, 208, 231, 3, 12, 6, 0, 209, 231, 3, 2, 1, 0, 210, 231, 3, 4, 2, 0, 211, 212, 5, 24, 0, 0, 212, 231, 3, 38, 19, 13, 213, 214, 5, 38, 0, 0, 214, 231, 3, 38, 19, 12, 215, 231, 5, 45, 0, 0, 216, 231, 5, 42, 0, 0, 217, 231, 5, 43, 0, 0, 218, 220, 5, 32, 0, 0, 219, 221, 3, 40, 20, 0, 220, 219, 1, 0, 0, 0, 220, 221, 1, 0, 0, 0, 221, 222, 1, 0, 0, 0, 222, 231, 5, 33, 0, 0, 223, 225, 5, 34, 0, 0, 224, 226, 3, 40, 20, 0, 225, 224, 1, 0, 0, 0, 225, 226, 1, 0, 0, 0, 226, 227, 1, 0, 0, 0, 227, 231, 5, 35, 0, 0, 228, 231, 3, 16, 8, 0, 229, 231, 5, 46, 0, 0, 230, 206, 1, 0, 0, 0, 230, 208, 1, 0, 0, 0, 230, 209, 1, 0, 0, 0, 230, 210, 1, 0, 0, 0, 230, 211, 1, 0, 0, 0, 230, 213, 1, 0, 0, 0, 230, 215, 1, 0, 0, 0, 230, 216, 1, 0, 0, 0, 230, 217, 1, 0, 0, 0, 230, 218, 1, 0, 0, 0, 230, 223, 1, 0, 0, 0, 230, 228, 1, 0, 0, 0, 230, 229, 1, 0, 0, 0, 231, 250, 1, 0, 0, 0, 232, 233, 10, 11, 0, 0, 233, 234, 5, 25, 0, 0, 234, 249, 3, 38, 19, 12, 235, 236, 10, 10, 0, 0, 236, 237, 5, 23, 0, 0, 237, 249, 3, 38, 19, 11, 238, 239, 10, 9, 0, 0, 239, 240, 5, 24, 0, 0, 240, 249, 3, 38, 19, 10, 241, 242, 10, 8, 0, 0, 242, 243, 7, 1, 0, 0, 243, 249, 3, 38, 19, 9, 244, 245, 10, 15, 0, 0, 245, 249, 5, 3, 0, 0, 246, 247, 10, 14, 0, 0, 247, 249, 5, 4, 0, 0, 248, 232, 1, 0, 0, 0, 248, 235, 1, 0, 0, 0, 248, 238, 1, 0, 0, 0, 248, 241, 1, 0, 0, 0, 248, 244, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 249, 252, 1, 0, 0, 0, 250, 248, 1, 0, 0, 0, 250, 251, 1, 0, 0, 0, 251, 39, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 253, 258, 3, 38, 19, 0, 254, 255, 5, 22, 0, 0, 255, 257, 3, 38, 19, 0, 256, 254, 1, 0, 0, 0, 257, 260, 1, 0, 0, 0, 258, 256, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 41, 1, 0, 0, 0, 260, 258, 1, 0, 0, 0, 26, 44, 46, 51, 59, 63, 71, 75, 81, 85, 99, 104, 114, 123, 128, 134, 141, 150, 166, 182, 200, 220, 225, 230, 248, 250, 258] \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParser.tokens b/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParser.tokens deleted file mode 100644 index 0d4fb8cb..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParser.tokens +++ /dev/null @@ -1,89 +0,0 @@ -EQ=1 -GREATER=2 -INCREMENT=3 -DECREMENT=4 -NEW=5 -VARIABLE=6 -LET=7 -IF=8 -THEN=9 -ELSE=10 -FOR=11 -RETURN=12 -VOID=13 -FLOAT=14 -INT=15 -STRING=16 -OBJECT=17 -EXPRESSION_MARKER=18 -SYMBOL=19 -COLON=20 -SEMICOLON=21 -COMMA=22 -PLUS=23 -MINUS=24 -STAR=25 -EQUALS=26 -NOT_EQUALS=27 -GREATER_EQUALS=28 -LESS=29 -LESS_EQUALS=30 -LAMBDA=31 -PARENTHESES_OPEN=32 -PARENTHESES_CLOSE=33 -BRACKET_OPEN=34 -BRACKET_CLOSE=35 -CURLYBRACE_OPEN=36 -CURLYBRACE_CLOSE=37 -EXCLAMATION=38 -PIPE=39 -PIPE_DBL=40 -PERIOD=41 -STRING_VAL=42 -BACKTICKSTRING_VAL=43 -LINE_COMMENT=44 -INTEGER_VAL=45 -ID=46 -WS=47 -ESC=48 -'='=1 -'>'=2 -'++'=3 -'--'=4 -'new'=5 -'variable'=6 -'let'=7 -'if'=8 -'then'=9 -'else'=10 -'for'=11 -'return'=12 -'void'=13 -'float'=14 -'int'=15 -'string'=16 -'object'=17 -'expression'=18 -':'=20 -';'=21 -','=22 -'+'=23 -'-'=24 -'*'=25 -'=='=26 -'!='=27 -'>='=28 -'<'=29 -'<='=30 -'=>'=31 -'('=32 -')'=33 -'['=34 -']'=35 -'{'=36 -'}'=37 -'!'=38 -'|'=39 -'||'=40 -'.'=41 -'\\|'=48 diff --git a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParserBaseVisitor.cs b/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParserBaseVisitor.cs deleted file mode 100644 index 522c2ad0..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParserBaseVisitor.cs +++ /dev/null @@ -1,535 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// ANTLR Version: 4.10.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// Generated from C:/Projects/Elsa/v3/src/dsl/Elsa.Scripting.Dsl/Dsl\ElsaParser.g4 by ANTLR 4.10.1 - -// Unreachable code detected -#pragma warning disable 0162 -// The variable '...' is assigned but its value is never used -#pragma warning disable 0219 -// Missing XML comment for publicly visible type or member '...' -#pragma warning disable 1591 -// Ambiguous reference in cref attribute -#pragma warning disable 419 - -using Antlr4.Runtime.Misc; -using Antlr4.Runtime.Tree; -using IToken = Antlr4.Runtime.IToken; -using ParserRuleContext = Antlr4.Runtime.ParserRuleContext; - -/// -/// This class provides an empty implementation of , -/// which can be extended to create a visitor which only needs to handle a subset -/// of the available methods. -/// -/// The return type of the visit operation. -[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.10.1")] -[System.Diagnostics.DebuggerNonUserCode] -[System.CLSCompliant(false)] -public partial class ElsaParserBaseVisitor : AbstractParseTreeVisitor, IElsaParserVisitor { - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitProgram([NotNull] ElsaParser.ProgramContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitObject([NotNull] ElsaParser.ObjectContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitNewObject([NotNull] ElsaParser.NewObjectContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitVarDecl([NotNull] ElsaParser.VarDeclContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitLocalVarDecl([NotNull] ElsaParser.LocalVarDeclContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitType([NotNull] ElsaParser.TypeContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitExpressionMarker([NotNull] ElsaParser.ExpressionMarkerContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitExpressionContent([NotNull] ElsaParser.ExpressionContentContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitMethodCall([NotNull] ElsaParser.MethodCallContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitFuncCall([NotNull] ElsaParser.FuncCallContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitArgs([NotNull] ElsaParser.ArgsContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitArg([NotNull] ElsaParser.ArgContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitBlock([NotNull] ElsaParser.BlockContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitObjectInitializer([NotNull] ElsaParser.ObjectInitializerContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitPropertyList([NotNull] ElsaParser.PropertyListContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitProperty([NotNull] ElsaParser.PropertyContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the objectStat - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitObjectStat([NotNull] ElsaParser.ObjectStatContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the ifStat - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitIfStat([NotNull] ElsaParser.IfStatContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the forStat - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitForStat([NotNull] ElsaParser.ForStatContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the returnStat - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitReturnStat([NotNull] ElsaParser.ReturnStatContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the blockStat - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitBlockStat([NotNull] ElsaParser.BlockStatContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the variableDeclarationStat - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitVariableDeclarationStat([NotNull] ElsaParser.VariableDeclarationStatContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the localVariableDeclarationStat - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitLocalVariableDeclarationStat([NotNull] ElsaParser.LocalVariableDeclarationStatContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the assignmentStat - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitAssignmentStat([NotNull] ElsaParser.AssignmentStatContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the expressionStat - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitExpressionStat([NotNull] ElsaParser.ExpressionStatContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitThenStat([NotNull] ElsaParser.ThenStatContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitElseStat([NotNull] ElsaParser.ElseStatContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the newObjectExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitNewObjectExpr([NotNull] ElsaParser.NewObjectExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the subtractExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitSubtractExpr([NotNull] ElsaParser.SubtractExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the incrementExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitIncrementExpr([NotNull] ElsaParser.IncrementExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the objectExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitObjectExpr([NotNull] ElsaParser.ObjectExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the stringValueExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitStringValueExpr([NotNull] ElsaParser.StringValueExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the multiplyExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitMultiplyExpr([NotNull] ElsaParser.MultiplyExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the parenthesesExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitParenthesesExpr([NotNull] ElsaParser.ParenthesesExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the functionExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitFunctionExpr([NotNull] ElsaParser.FunctionExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the decrementExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitDecrementExpr([NotNull] ElsaParser.DecrementExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the negateExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitNegateExpr([NotNull] ElsaParser.NegateExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the methodCallExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitMethodCallExpr([NotNull] ElsaParser.MethodCallExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the variableExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitVariableExpr([NotNull] ElsaParser.VariableExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the notExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitNotExpr([NotNull] ElsaParser.NotExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the integerValueExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitIntegerValueExpr([NotNull] ElsaParser.IntegerValueExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the addExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitAddExpr([NotNull] ElsaParser.AddExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the expressionMarkerExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitExpressionMarkerExpr([NotNull] ElsaParser.ExpressionMarkerExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the backTickStringValueExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitBackTickStringValueExpr([NotNull] ElsaParser.BackTickStringValueExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the bracketsExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitBracketsExpr([NotNull] ElsaParser.BracketsExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by the compareExpr - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitCompareExpr([NotNull] ElsaParser.CompareExprContext context) { return VisitChildren(context); } - /// - /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitExprList([NotNull] ElsaParser.ExprListContext context) { return VisitChildren(context); } -} diff --git a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParserVisitor.cs b/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParserVisitor.cs deleted file mode 100644 index 668e6ce1..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Abstractions/ElsaParserVisitor.cs +++ /dev/null @@ -1,344 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// ANTLR Version: 4.10.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// Generated from C:/Projects/Elsa/v3/src/dsl/Elsa.Scripting.Dsl/Dsl\ElsaParser.g4 by ANTLR 4.10.1 - -// Unreachable code detected -#pragma warning disable 0162 -// The variable '...' is assigned but its value is never used -#pragma warning disable 0219 -// Missing XML comment for publicly visible type or member '...' -#pragma warning disable 1591 -// Ambiguous reference in cref attribute -#pragma warning disable 419 - -using Antlr4.Runtime.Misc; -using Antlr4.Runtime.Tree; -using IToken = Antlr4.Runtime.IToken; - -/// -/// This interface defines a complete generic visitor for a parse tree produced -/// by . -/// -/// The return type of the visit operation. -[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.10.1")] -[System.CLSCompliant(false)] -public interface IElsaParserVisitor : IParseTreeVisitor { - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitProgram([NotNull] ElsaParser.ProgramContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitObject([NotNull] ElsaParser.ObjectContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitNewObject([NotNull] ElsaParser.NewObjectContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitVarDecl([NotNull] ElsaParser.VarDeclContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitLocalVarDecl([NotNull] ElsaParser.LocalVarDeclContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitType([NotNull] ElsaParser.TypeContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitExpressionMarker([NotNull] ElsaParser.ExpressionMarkerContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitExpressionContent([NotNull] ElsaParser.ExpressionContentContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitMethodCall([NotNull] ElsaParser.MethodCallContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitFuncCall([NotNull] ElsaParser.FuncCallContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitArgs([NotNull] ElsaParser.ArgsContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitArg([NotNull] ElsaParser.ArgContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitBlock([NotNull] ElsaParser.BlockContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitObjectInitializer([NotNull] ElsaParser.ObjectInitializerContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitPropertyList([NotNull] ElsaParser.PropertyListContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitProperty([NotNull] ElsaParser.PropertyContext context); - /// - /// Visit a parse tree produced by the objectStat - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitObjectStat([NotNull] ElsaParser.ObjectStatContext context); - /// - /// Visit a parse tree produced by the ifStat - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitIfStat([NotNull] ElsaParser.IfStatContext context); - /// - /// Visit a parse tree produced by the forStat - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitForStat([NotNull] ElsaParser.ForStatContext context); - /// - /// Visit a parse tree produced by the returnStat - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitReturnStat([NotNull] ElsaParser.ReturnStatContext context); - /// - /// Visit a parse tree produced by the blockStat - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitBlockStat([NotNull] ElsaParser.BlockStatContext context); - /// - /// Visit a parse tree produced by the variableDeclarationStat - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitVariableDeclarationStat([NotNull] ElsaParser.VariableDeclarationStatContext context); - /// - /// Visit a parse tree produced by the localVariableDeclarationStat - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitLocalVariableDeclarationStat([NotNull] ElsaParser.LocalVariableDeclarationStatContext context); - /// - /// Visit a parse tree produced by the assignmentStat - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitAssignmentStat([NotNull] ElsaParser.AssignmentStatContext context); - /// - /// Visit a parse tree produced by the expressionStat - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitExpressionStat([NotNull] ElsaParser.ExpressionStatContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitThenStat([NotNull] ElsaParser.ThenStatContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitElseStat([NotNull] ElsaParser.ElseStatContext context); - /// - /// Visit a parse tree produced by the newObjectExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitNewObjectExpr([NotNull] ElsaParser.NewObjectExprContext context); - /// - /// Visit a parse tree produced by the subtractExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitSubtractExpr([NotNull] ElsaParser.SubtractExprContext context); - /// - /// Visit a parse tree produced by the incrementExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitIncrementExpr([NotNull] ElsaParser.IncrementExprContext context); - /// - /// Visit a parse tree produced by the objectExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitObjectExpr([NotNull] ElsaParser.ObjectExprContext context); - /// - /// Visit a parse tree produced by the stringValueExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitStringValueExpr([NotNull] ElsaParser.StringValueExprContext context); - /// - /// Visit a parse tree produced by the multiplyExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitMultiplyExpr([NotNull] ElsaParser.MultiplyExprContext context); - /// - /// Visit a parse tree produced by the parenthesesExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitParenthesesExpr([NotNull] ElsaParser.ParenthesesExprContext context); - /// - /// Visit a parse tree produced by the functionExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitFunctionExpr([NotNull] ElsaParser.FunctionExprContext context); - /// - /// Visit a parse tree produced by the decrementExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitDecrementExpr([NotNull] ElsaParser.DecrementExprContext context); - /// - /// Visit a parse tree produced by the negateExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitNegateExpr([NotNull] ElsaParser.NegateExprContext context); - /// - /// Visit a parse tree produced by the methodCallExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitMethodCallExpr([NotNull] ElsaParser.MethodCallExprContext context); - /// - /// Visit a parse tree produced by the variableExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitVariableExpr([NotNull] ElsaParser.VariableExprContext context); - /// - /// Visit a parse tree produced by the notExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitNotExpr([NotNull] ElsaParser.NotExprContext context); - /// - /// Visit a parse tree produced by the integerValueExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitIntegerValueExpr([NotNull] ElsaParser.IntegerValueExprContext context); - /// - /// Visit a parse tree produced by the addExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitAddExpr([NotNull] ElsaParser.AddExprContext context); - /// - /// Visit a parse tree produced by the expressionMarkerExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitExpressionMarkerExpr([NotNull] ElsaParser.ExpressionMarkerExprContext context); - /// - /// Visit a parse tree produced by the backTickStringValueExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitBackTickStringValueExpr([NotNull] ElsaParser.BackTickStringValueExprContext context); - /// - /// Visit a parse tree produced by the bracketsExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitBracketsExpr([NotNull] ElsaParser.BracketsExprContext context); - /// - /// Visit a parse tree produced by the compareExpr - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitCompareExpr([NotNull] ElsaParser.CompareExprContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitExprList([NotNull] ElsaParser.ExprListContext context); -} diff --git a/src/scripting/Elsa.Scripting.Dsl/AssemblyInfo.cs b/src/scripting/Elsa.Scripting.Dsl/AssemblyInfo.cs deleted file mode 100644 index 4e7f1205..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/AssemblyInfo.cs +++ /dev/null @@ -1 +0,0 @@ -[assembly: CLSCompliant(false)] \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Contracts/IDslEngine.cs b/src/scripting/Elsa.Scripting.Dsl/Contracts/IDslEngine.cs deleted file mode 100644 index 50c9f744..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Contracts/IDslEngine.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Elsa.Workflows.Activities; - -namespace Elsa.Scripting.Dsl.Contracts; - -/// -/// Represents a DSL engine that parse a workflow definition script into a instance. -/// -public interface IDslEngine -{ - /// - /// Parses the specified script into a instance. - /// - Task ParseAsync(string script, CancellationToken cancellationToken = default); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Contracts/IFunctionActivityRegistry.cs b/src/scripting/Elsa.Scripting.Dsl/Contracts/IFunctionActivityRegistry.cs deleted file mode 100644 index b32f6057..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Contracts/IFunctionActivityRegistry.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Elsa.Scripting.Dsl.Models; -using Elsa.Workflows; - -namespace Elsa.Scripting.Dsl.Contracts; - -/// -/// Provides a registry for mapping functions to activities that can be invoked from a DSL script. -/// -public interface IFunctionActivityRegistry -{ - /// - /// Registers a function that is mapped to an activity that can be invoked from a DSL script. - /// - /// The name of the function. - /// The name of the activity type. - /// The names of the properties that are mapped to the function arguments. - /// An optional action that can be used to configure the activity. - void RegisterFunction(string functionName, string activityTypeName, IEnumerable? propertyNames = default, Action? configure = default); - - /// - /// Registers a function that is mapped to an activity that can be invoked from a DSL script. - /// - /// The descriptor that describes the function. - void RegisterFunction(FunctionActivityDescriptor descriptor); - - /// - /// Resolves a function to an activity that can be invoked from a DSL script. - /// - /// The name of the function. - /// The arguments that are passed to the function. - /// An activity that can be invoked from a DSL script. - Task ResolveFunctionAsync(string functionName, IEnumerable? arguments = default); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Contracts/ITypeSystem.cs b/src/scripting/Elsa.Scripting.Dsl/Contracts/ITypeSystem.cs deleted file mode 100644 index 4d61fbc7..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Contracts/ITypeSystem.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Elsa.Workflows.Models; - -namespace Elsa.Scripting.Dsl.Contracts; - -public interface ITypeSystem -{ - void Register(TypeDescriptor descriptor); - TypeDescriptor? ResolveTypeName(string typeName); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Dsl/ElsaLexer.g4 b/src/scripting/Elsa.Scripting.Dsl/Dsl/ElsaLexer.g4 deleted file mode 100644 index 79782945..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Dsl/ElsaLexer.g4 +++ /dev/null @@ -1,54 +0,0 @@ -lexer grammar ElsaLexer; - -EQ : '='; -GREATER : '>'; -INCREMENT : '++'; -DECREMENT : '--'; -NEW : 'new'; -VARIABLE : 'variable'; -LET : 'let'; -IF : 'if'; -THEN : 'then'; -ELSE : 'else'; -FOR : 'for'; -RETURN : 'return'; -VOID : 'void'; -FLOAT : 'float'; -INT : 'int'; -STRING : 'string'; -OBJECT : 'object'; -EXPRESSION_MARKER : 'expression'; -SYMBOL : [=>$+`]; -COLON : ':'; -SEMICOLON : ';'; -COMMA : ','; -PLUS : '+'; -MINUS : '-'; -STAR : '*'; -EQUALS : '=='; -NOT_EQUALS : '!='; -GREATER_EQUALS : '>='; -LESS : '<'; -LESS_EQUALS : '<='; -LAMBDA : '=>'; -PARENTHESES_OPEN : '('; -PARENTHESES_CLOSE : ')'; -BRACKET_OPEN : '['; -BRACKET_CLOSE : ']'; -CURLYBRACE_OPEN : '{'; -CURLYBRACE_CLOSE : '}'; -EXCLAMATION : '!'; -PIPE : '|'; -PIPE_DBL : '||'; -PERIOD : '.'; -STRING_VAL : '"' ('\\"' | .)*? '"'; -BACKTICKSTRING_VAL : '`' ('\\"' | .)*? '`'; -LINE_COMMENT : '//' .*? '\r'? '\n' -> skip; -INTEGER_VAL : DIGIT+; -ID : LETTER (LETTER | DIGIT)*; -WS : [ \t\r\n] -> skip; - -fragment LETTER : [a-zA-Z_]; -fragment DIGIT : [0-9]; - -ESC : '\\|'; \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Dsl/ElsaParser.g4 b/src/scripting/Elsa.Scripting.Dsl/Dsl/ElsaParser.g4 deleted file mode 100644 index 4c5e0c86..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Dsl/ElsaParser.g4 +++ /dev/null @@ -1,121 +0,0 @@ -parser grammar ElsaParser; - -options { tokenVocab = ElsaLexer; } - -program - : (stat | LINE_COMMENT)* - ; - -object - : ID objectInitializer? - ; - -newObject - : NEW ID ('<' type '>')? '(' args? ')' - ; - -varDecl - : VARIABLE ID (':' type)? (EQ expr)? - ; - -localVarDecl - : 'let' ID (':' type)? (EQ expr)? - ; - -type - : VOID - | FLOAT - | INT - | OBJECT - | STRING - | ID - ; - -expressionMarker - : EXPRESSION_MARKER '(' ID ',' expressionContent ')' - | ID '=>' expressionContent - ; - -expressionContent - : .*? - ; - -methodCall - : ID '.' funcCall - ; - -funcCall - : ID '(' args? ')' - ; - -args - : arg (',' arg)* - ; - -arg - : expr - | expressionMarker - ; - -block - : '{' stat* '}' - ; - -objectInitializer - : '{' propertyList? '}' - ; - -propertyList - : property (',' property)* - ; - -property - : ID ':' expr - ; - -stat - : object ';' #objectStat - | 'if' expr 'then' thenStat ('else' elseStat)? #ifStat - | 'for' '(' ID '=' expr ';' expr ';' expr ')' stat #forStat - | 'return' expr? ';' #returnStat - | block #blockStat - | varDecl ';' #variableDeclarationStat - | localVarDecl ';' #localVariableDeclarationStat - | expr '=' expr ';' #assignmentStat - | expr ';' #expressionStat - ; - -thenStat - : stat - ; - -elseStat - : stat - ; - -expr - : funcCall #functionExpr - | expressionMarker #expressionMarkerExpr - | object #objectExpr - | newObject #newObjectExpr - | expr '++' #incrementExpr - | expr '--' #decrementExpr - | '-' expr #negateExpr - | '!' expr #notExpr - | expr '*' expr #multiplyExpr - | expr '+' expr #addExpr - | expr '-' expr #subtractExpr - | expr ('==' | '>' | '<' | '!=' | '>=' | '<=') expr #compareExpr - | INTEGER_VAL #integerValueExpr - | STRING_VAL #stringValueExpr - | BACKTICKSTRING_VAL #backTickStringValueExpr - | '(' exprList? ')' #parenthesesExpr - | '[' exprList? ']' #bracketsExpr - | methodCall #methodCallExpr - | ID #variableExpr - ; - -exprList - : expr (',' expr)* - ; - \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/For.elsa b/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/For.elsa deleted file mode 100644 index c0ece8f4..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/For.elsa +++ /dev/null @@ -1,9 +0,0 @@ -variable start: int = 1; -variable end: int = read(); - -print(js => `Counting numbers from ${start} to ${end}:`); - -for(i = start; i < end; i++) -{ - print(js => `Current value: ${i}`); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/Full.elsa b/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/Full.elsa deleted file mode 100644 index fd9602bb..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/Full.elsa +++ /dev/null @@ -1,40 +0,0 @@ -// Triggers when HTTP request comes in. -trigger HttpTrigger -{ - Path: "/hello-world", - SupportedMethods: ["GET", "POST"] -}; - -// Triggers every 1 minute. -trigger TimerTrigger -{ - Interval: "0:00:01:00" -}; - -{ - // If - print("What's your age?"); - variable age = ReadLine; - - if age > 16 then - { - print("Enjoy your driver's license!"); - delay(5000); - print("But be careful!"); - } - else - print("Enjoy your bicycle!"); - - print("Goodbye."); - - // For - variable start: int = 1; - variable end: int = 3; - - print(context => $"Counting numbers from {start.Get(context)} to {end.Get(context)}"); - - for(i = start; i < end; i++) - { - print(context => "Current value: ${i}"); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/Greeting.elsa b/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/Greeting.elsa deleted file mode 100644 index e17dfc95..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/Greeting.elsa +++ /dev/null @@ -1,7 +0,0 @@ -{ - let name: string; - - print("Hi! What's your name?"); - read(name); - print("Nice to meet you, {name.Get(context)}!"); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/HelloGoodbye.elsa b/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/HelloGoodbye.elsa deleted file mode 100644 index a321f86a..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/HelloGoodbye.elsa +++ /dev/null @@ -1,4 +0,0 @@ -{ - WriteLine "Hello World" - WriteLine "Goodbye cruel World" -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/HelloWorld.elsa b/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/HelloWorld.elsa deleted file mode 100644 index 2f2b4ad8..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/HelloWorld.elsa +++ /dev/null @@ -1 +0,0 @@ -WriteLine "Hello World"; \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/HttpTrigger.elsa b/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/HttpTrigger.elsa deleted file mode 100644 index 8960629d..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/HttpTrigger.elsa +++ /dev/null @@ -1,14 +0,0 @@ -// Triggers when HTTP request comes in. -trigger HttpTrigger -{ - Path: "/hello-world", - SupportedMethods: ["GET", "POST"] -}; - -// Triggers every 1 minute. -trigger TimerTrigger -{ - Interval: "0:00:01:00" -}; - -WriteLine("Hello World!"); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/If.elsa b/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/If.elsa deleted file mode 100644 index 81b12c0b..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/If.elsa +++ /dev/null @@ -1,14 +0,0 @@ -print("What's your age?"); -variable age = ReadLine; - -if age > 16 then -{ - print("Enjoy your driver's license!"); - // delay(5000); - // await signal - print("But be careful!"); -} -else - print("Enjoy your bicycle!"); - -print("Goodbye."); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/Scratchpad.elsa b/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/Scratchpad.elsa deleted file mode 100644 index 7444bbbf..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Dsl/Samples/Scratchpad.elsa +++ /dev/null @@ -1,10 +0,0 @@ -Sequence { - Activities: [ - WriteLine { Text:"writeLine1" }, - Sequence { - Activities: [ - WriteLine { Text:"writeLine2" } - ] - } - ] -}; \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Elsa.Scripting.Dsl.csproj b/src/scripting/Elsa.Scripting.Dsl/Elsa.Scripting.Dsl.csproj deleted file mode 100644 index bbc63b5f..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Elsa.Scripting.Dsl.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Provides a custom DSL to write workflows with in a syntax similar to JavaScript but with native keywords translating to workflow functionality. - For example if/else would translate to the If activity. Very cool, but also very experimental ;) - - elsa extension module scripting dsl antlr4 - - - - - - - - diff --git a/src/scripting/Elsa.Scripting.Dsl/Elsa.Scripting.Dsl.csproj.DotSettings b/src/scripting/Elsa.Scripting.Dsl/Elsa.Scripting.Dsl.csproj.DotSettings deleted file mode 100644 index 06d2f1f5..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Elsa.Scripting.Dsl.csproj.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - True \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Extensions/DependencyInjectionExtensions.cs b/src/scripting/Elsa.Scripting.Dsl/Extensions/DependencyInjectionExtensions.cs deleted file mode 100644 index eb8b5c02..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Extensions/DependencyInjectionExtensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Elsa.Scripting.Dsl.Features; -using Elsa.Features.Services; - -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -public static class ModuleExtensions -{ - public static IModule UseDsl(this IModule configuration, Action? configure = default) - { - configuration.Configure(configure); - return configuration; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Extensions/ListConverter.cs b/src/scripting/Elsa.Scripting.Dsl/Extensions/ListConverter.cs deleted file mode 100644 index ab3ed4ad..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Extensions/ListConverter.cs +++ /dev/null @@ -1,18 +0,0 @@ -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -public static class ListConverter -{ - public static T ConvertTo(this IEnumerable items) where T : IEnumerable => (T)ConvertTo(items, typeof(T)); - - public static object ConvertTo(this IEnumerable items, Type type) - { - var containedType = type.GenericTypeArguments.First(); - var enumerableType = typeof(Enumerable); - var castMethod = enumerableType.GetMethod(nameof(Enumerable.Cast))!.MakeGenericMethod(containedType); - var toListMethod = enumerableType.GetMethod(nameof(Enumerable.ToList))!.MakeGenericMethod(containedType); - var castedItems = castMethod.Invoke(null, new object?[] { items }); - - return toListMethod.Invoke(null!, new[] { castedItems })!; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Extensions/TypeSystemExtensions.cs b/src/scripting/Elsa.Scripting.Dsl/Extensions/TypeSystemExtensions.cs deleted file mode 100644 index 3e5a6e27..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Extensions/TypeSystemExtensions.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Elsa.Scripting.Dsl.Contracts; -using Elsa.Workflows; -using Elsa.Workflows.Models; - -namespace Elsa.Scripting.Dsl.Extensions; - -public static class TypeSystemExtensions -{ - public static TypeDescriptor Register(this ITypeSystem typeSystem, string? typeName = default) => typeSystem.Register(typeName ?? typeof(T).Name, typeof(T)); - - public static TypeDescriptor Register(this ITypeSystem typeSystem, string typeName, Type type) - { - var kind = GetKind(type); - var descriptor = new TypeDescriptor(typeName, type, kind); - typeSystem.Register(descriptor); - return descriptor; - } - - private static TypeKind GetKind(Type type) - { - var kind = TypeKind.Unknown; - var isActivity = typeof(IActivity).IsAssignableFrom(type); - var isTrigger = typeof(IEventGenerator).IsAssignableFrom(type); - var isPrimitive = type.IsPrimitive; - var isObject = type.IsClass || type.IsValueType; - - if (isActivity || isTrigger) - { - if (isActivity) - kind |= TypeKind.Activity; - - if (isTrigger) - kind |= TypeKind.Trigger; - } - else if (isPrimitive) - kind = TypeKind.Primitive; - else if(isObject) - kind = TypeKind.Object; - - return kind; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Features/DslFeature.cs b/src/scripting/Elsa.Scripting.Dsl/Features/DslFeature.cs deleted file mode 100644 index 14f9a65c..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Features/DslFeature.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Elsa.Scripting.Dsl.Contracts; -using Elsa.Scripting.Dsl.Services; -using Elsa.Expressions.Features; -using Elsa.Features.Abstractions; -using Elsa.Features.Attributes; -using Elsa.Features.Services; -using Microsoft.Extensions.DependencyInjection; - -namespace Elsa.Scripting.Dsl.Features; - -/// -[DependsOn(typeof(ExpressionsFeature))] -public class DslFeature(IModule module) : FeatureBase(module) -{ - /// - public override void Configure() - { - Services - .AddScoped() - .AddScoped() - .AddScoped(); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/FodyWeavers.xml b/src/scripting/Elsa.Scripting.Dsl/FodyWeavers.xml deleted file mode 100644 index 00e1d9a1..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitArgs.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitArgs.cs deleted file mode 100644 index df2388bd..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitArgs.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Antlr4.Runtime.Tree; -using Elsa.Workflows; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - public override IWorkflowBuilder VisitArgs(ElsaParser.ArgsContext context) - { - var args = context.arg(); - - var argValues = args.Select(x => - { - Visit(x); - var childContext = x.expr() ?? (IParseTree)x.expressionMarker(); - return _expressionValue.Get(childContext); - }).ToList(); - - _argValues.Put(context, argValues); - - return DefaultResult; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitBlockStatement.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitBlockStatement.cs deleted file mode 100644 index fca5ffae..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitBlockStatement.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Elsa.Workflows; -using Elsa.Workflows.Activities; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - public override IWorkflowBuilder VisitBlockStat(ElsaParser.BlockStatContext context) - { - VisitChildren(context); - - var value = _expressionValue.Get(context.block()); - _expressionValue.Put(context, value); - - return DefaultResult; - } - - public override IWorkflowBuilder VisitBlock(ElsaParser.BlockContext context) - { - var sequence = new Sequence(); - _containerStack.Push(sequence); - - var statements = context.stat(); - - var values = statements.Select(x => - { - Visit(x); - return _expressionValue.Get(x); - }).ToList(); - - var activities = values.OfType().ToList(); - sequence.Activities = activities; - - _containerStack.Pop(); - _expressionValue.Put(context, sequence); - - return DefaultResult; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitBrackets.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitBrackets.cs deleted file mode 100644 index ba3e39b0..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitBrackets.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Elsa.Expressions.Helpers; -using Elsa.Workflows; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - /// - public override IWorkflowBuilder VisitBracketsExpr(ElsaParser.BracketsExprContext context) - { - var propertyType = _expressionType.Get(context.Parent); - var targetElementType = propertyType?.GetGenericArguments().First() ?? typeof(object); - var contents = context.exprList().expr(); - - var items = contents.Select(x => - { - Visit(x); - var stringContext = x.GetChild(0) ?? x; - return _expressionValue.Get(stringContext); - }).ToList(); - - var stronglyTypedListType = targetElementType; - var stronglyTypedList = items.ConvertTo(stronglyTypedListType); - - _expressionValue.Put(context, stronglyTypedList); - return DefaultResult; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitExternalExpression.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitExternalExpression.cs deleted file mode 100644 index 71367125..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitExternalExpression.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Elsa.Expressions.Models; -using Elsa.Workflows; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - public override IWorkflowBuilder VisitExpressionMarker(ElsaParser.ExpressionMarkerContext context) - { - // var language = context.ID(); - // var expressionContent = context.expressionContent().GetText(); - // - // // TODO: Determine actual expression type based on specified language. - // var expression = new JavaScriptExpression(expressionContent); - // var expressionReference = new JavaScriptExpressionBlockReference(expression); - // var externalReference = new ExternalExpressionReference(expression, expressionReference); - // _expressionValue.Put(context, externalReference); - // _expressionValue.Put(context.Parent, externalReference); - - return DefaultResult; - } -} - -public record ExternalExpressionReference(Expression Expression, MemoryBlockReference BlockReference); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitFile.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitFile.cs deleted file mode 100644 index 3f2820d7..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitFile.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Elsa.Workflows; -using Elsa.Workflows.Activities; - -namespace Elsa.Scripting.Dsl.Interpreters; - -/// -public partial class WorkflowDefinitionBuilderInterpreter -{ - /// - public override IWorkflowBuilder VisitProgram(ElsaParser.ProgramContext context) - { - var stats = context.stat(); - var rootSequence = new Sequence(); - - // Push a sequence to allow multiple activities declared in sequence. - _containerStack.Push(rootSequence); - - // Interpret child nodes. - VisitChildren(context); - - // Extract activities from child nodes. - var activities = stats.Select(x => _expressionValue.Get(x) as IActivity).Where(x => x != null).Select(x => x!).ToList(); - - if (activities.Count == 1) - { - // We only have one activity, so we can use it as the root and discard the root sequence. - _workflowBuilder.Root = activities.Single(); - } - else - { - // Assign the collected child activities to the root sequence. - rootSequence.Activities = activities.ToList(); - _workflowBuilder.Root = rootSequence; - } - - return DefaultResult; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitFunction.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitFunction.cs deleted file mode 100644 index e5c2d5e8..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitFunction.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Elsa.Workflows; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - public override IWorkflowBuilder VisitExpressionStat(ElsaParser.ExpressionStatContext context) - { - VisitChildren(context); - var expressionValue = _expressionValue.Get(context.expr()); - _expressionValue.Put(context, expressionValue); - return DefaultResult; - } - - public override IWorkflowBuilder VisitFunctionExpr(ElsaParser.FunctionExprContext context) - { - VisitChildren(context); - var expressionValue = _expressionValue.Get(context.funcCall()); - _expressionValue.Put(context, expressionValue); - return DefaultResult; - } - - public override IWorkflowBuilder VisitFuncCall(ElsaParser.FuncCallContext context) - { - VisitChildren(context); - - var functionName = context.ID().GetText(); - var argsNode = context.args(); - var args = argsNode != null ? _argValues.Get(context.args()) : default; - var activity = _functionActivityRegistry.ResolveFunctionAsync(functionName, args).GetAwaiter().GetResult(); - - _expressionValue.Put(context, activity); - return DefaultResult; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitIfStatement.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitIfStatement.cs deleted file mode 100644 index f162bad8..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitIfStatement.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Elsa.Workflows; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - public override IWorkflowBuilder VisitIfStat(ElsaParser.IfStatContext context) - { - // var ifActivity = new If(); - // var conditionExpr = context.expr().GetText(); - // - // var javaScriptExpression = new JavaScriptExpression(conditionExpr); - // ifActivity.Condition = new Input(javaScriptExpression, new JavaScriptExpressionBlockReference(javaScriptExpression)); - // - // var thenStat = context.thenStat().stat(); - // var elseStat = context.elseStat()?.stat(); - // - // Visit(thenStat); - // - // var thenActivity = _expressionValue.Get(thenStat); - // ifActivity.Then = (IActivity?)thenActivity; - // - // if (elseStat != null) - // { - // Visit(elseStat); - // var elseActivity = _expressionValue.Get(elseStat); - // ifActivity.Else = (IActivity?)elseActivity; - // } - // - // _expressionValue.Put(context, ifActivity); - return DefaultResult; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitLocalVariable.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitLocalVariable.cs deleted file mode 100644 index 4a1b75a3..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitLocalVariable.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Elsa.Scripting.Dsl.Models; -using Elsa.Workflows; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - public override IWorkflowBuilder VisitLocalVarDecl(ElsaParser.LocalVarDeclContext context) - { - var variableName = context.ID().GetText(); - var variableType = context.type()?.ID().GetText(); - - VisitChildren(context); - - var value = _expressionValue.Get(context.expr()); - - var variable = new DefinedVariable - { - Identifier = variableName, - Value = value - }; - - _definedVariables[variableName] = variable; - - return DefaultResult; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitNewObject.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitNewObject.cs deleted file mode 100644 index 62095280..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitNewObject.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Elsa.Workflows; -using Elsa.Workflows.Models; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - public override IWorkflowBuilder VisitNewObjectExpr(ElsaParser.NewObjectExprContext context) - { - VisitChildren(context); - - var value = _expressionValue.Get(context.newObject()); - _expressionValue.Put(context, value); - - return DefaultResult; - } - - public override IWorkflowBuilder VisitNewObject(ElsaParser.NewObjectContext context) - { - var objectTypeName = context.ID().GetText(); - var typeArg = context.type()?.GetText(); - TypeDescriptor? typeArgTypeDescriptor = default; - - if (typeArg != null) - { - objectTypeName = $"{objectTypeName}<>"; - typeArgTypeDescriptor = _typeSystem.ResolveTypeName(typeArg) ?? throw new Exception($"Cannot use type {typeArg} as type argument because it was not found in the type system."); - } - - var typeDescriptor = _typeSystem.ResolveTypeName(objectTypeName); - - if (typeDescriptor == null) - throw new Exception($"Could not instantiate type {objectTypeName} because it was not found in the type system."); - - VisitChildren(context); - - var argValues = _argValues.Get(context.args()).ToArray(); - var objectType = typeDescriptor.Type; - - if (typeArgTypeDescriptor != null) - { - var objectTypeArg = typeArgTypeDescriptor.Type; - objectType = objectType.MakeGenericType(objectTypeArg); - } - - var objectInstance = Activator.CreateInstance(objectType, argValues); - - _expressionValue.Put(context, objectInstance); - - return DefaultResult; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitObject.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitObject.cs deleted file mode 100644 index 0379d031..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitObject.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System.Text.Json; -using Elsa.Workflows; -using Elsa.Workflows.Models; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - /// - public override IWorkflowBuilder VisitObjectExpr(ElsaParser.ObjectExprContext context) - { - VisitChildren(context); - var value = _expressionValue.Get(context.@object()); - _expressionValue.Put(context, value); - - return DefaultResult; - } - - /// - public override IWorkflowBuilder VisitObjectStat(ElsaParser.ObjectStatContext context) - { - VisitChildren(context); - var value = _expressionValue.Get(context.@object()); - _expressionValue.Put(context, value); - - return DefaultResult; - } - - /// - public override IWorkflowBuilder VisitObject(ElsaParser.ObjectContext context) - { - var @object = GetObjectAsync(context).GetAwaiter().GetResult(); - - _object.Put(context, @object); - _expressionValue.Put(context, @object); - VisitChildren(context); - - return DefaultResult; - } - - private async Task GetObjectAsync(ElsaParser.ObjectContext context) - { - var objectTypeName = context.ID().GetText(); - - // First, check if the symbol matches an activity type. - var activityDescriptor = await _activityRegistryLookup.FindAsync(x => x.Name == objectTypeName); - - if (activityDescriptor != null) - { - // TODO: Refactor this to remove the dependency on JsonElement and JsonSerializerOptions. - // This limits the ability to use this class in other contexts, such as constructing activities from the DSL. - var jsonElement = JsonSerializer.Deserialize("{}"); - var ctorArgs = new ActivityConstructorContext(activityDescriptor, jsonElement, new JsonSerializerOptions()); - return activityDescriptor.Constructor(ctorArgs); - } - - var objectTypeDescriptor = _typeSystem.ResolveTypeName(objectTypeName); - - if (objectTypeDescriptor == null) - { - // Perhaps this is a variable reference? - if (_definedVariables.TryGetValue(objectTypeName, out var definedVariable)) - { - _expressionValue.Put(context, definedVariable.Value); - return DefaultResult; - } - - // Or a workflow variable? - var workflowVariableQuery = - from container in _containerStack - from variable in container.Variables - where variable.Name == objectTypeName - select variable; - - var workflowVariable = workflowVariableQuery.FirstOrDefault(); - - if (workflowVariable != null) - { - _expressionValue.Put(context, workflowVariable); - return DefaultResult; - } - - throw new Exception($"Unknown type: {objectTypeName}"); - } - - var objectType = objectTypeDescriptor.Type; - var @object = Activator.CreateInstance(objectType)!; - - return @object; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitProperty.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitProperty.cs deleted file mode 100644 index 10110613..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitProperty.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Reflection; -using Elsa.Expressions.Helpers; -using Elsa.Expressions.Models; -using Elsa.Workflows; -using Elsa.Workflows.Models; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - /// - public override IWorkflowBuilder VisitProperty(ElsaParser.PropertyContext context) - { - var @object = _object.Get(context.Parent.Parent.Parent); - var objectType = @object.GetType(); - var propertyName = context.ID().GetText(); - var propertyInfo = objectType.GetProperty(propertyName); - - if (propertyInfo == null) - throw new Exception($"Type {objectType.Name} does not have a public property named {propertyName}."); - - _expressionType.Put(context, propertyInfo.PropertyType); - VisitChildren(context); - - var propertyValue = _expressionValue.Get(context.expr()); - var propertyType = propertyInfo.PropertyType; - var parsedPropertyValue = typeof(Input).IsAssignableFrom(propertyType) ? propertyValue : propertyValue.ConvertTo(propertyType); - SetPropertyValue(@object, propertyInfo, parsedPropertyValue); - - return DefaultResult; - } - - private void SetPropertyValue(object target, PropertyInfo propertyInfo, object? value) - { - if (typeof(Input).IsAssignableFrom(propertyInfo.PropertyType)) - value = CreateInputValue(propertyInfo, value); - - propertyInfo.SetValue(target, value, null); - } - - private Input CreateInputValue(PropertyInfo propertyInfo, object? propertyValue) - { - var underlyingType = propertyInfo.PropertyType.GetGenericArguments().First(); - var parsedPropertyValue = propertyValue.ConvertTo(underlyingType); - var propertyValueType = parsedPropertyValue?.GetType(); - var inputType = typeof(Input<>).MakeGenericType(underlyingType); - - if (propertyValueType != null) - { - // Create a literal value. - var literalType = typeof(Literal<>).MakeGenericType(underlyingType); - var hasCtorWithSpecifiedType = inputType.GetConstructors().Any(x => x.GetParameters().Any(y => y.ParameterType.IsAssignableFrom(literalType))); - - if (hasCtorWithSpecifiedType) - { - var literalValue = Activator.CreateInstance(literalType, parsedPropertyValue)!; - return (Input)Activator.CreateInstance(inputType, literalValue)!; - } - } - - return parsedPropertyValue is ExternalExpressionReference externalExpressionReference - ? (Input)Activator.CreateInstance(inputType, externalExpressionReference.Expression, externalExpressionReference.BlockReference)! - : (Input)Activator.CreateInstance(inputType, parsedPropertyValue)!; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitStringValue.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitStringValue.cs deleted file mode 100644 index c56229be..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitStringValue.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Elsa.Workflows; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - public override IWorkflowBuilder VisitStringValueExpr(ElsaParser.StringValueExprContext context) - { - var value = context.GetText().Trim('\"'); - _expressionValue.Put(context, value); - return DefaultResult; - } - - public override IWorkflowBuilder VisitBackTickStringValueExpr(ElsaParser.BackTickStringValueExprContext context) - { - var value = context.GetText().Trim('\"'); - _expressionValue.Put(context, value); - return DefaultResult; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitWorkflowVariable.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitWorkflowVariable.cs deleted file mode 100644 index 86bd1420..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/VisitWorkflowVariable.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Elsa.Workflows; -using Elsa.Workflows.Memory; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter -{ - public override IWorkflowBuilder VisitVariableDeclarationStat(ElsaParser.VariableDeclarationStatContext context) - { - VisitChildren(context); - var expressionValue = _expressionValue.Get(context.varDecl()); - _expressionValue.Put(context, expressionValue); - return DefaultResult; - } - - public override IWorkflowBuilder VisitVarDecl(ElsaParser.VarDeclContext context) - { - var workflowVariableName = context.ID().GetText(); - - VisitChildren(context); - - var initExpr = context.expr(); - var workflowVariableValue = initExpr != null ? _expressionValue.Get(initExpr) : default; - - var workflowVariable = new Variable - { - Name = workflowVariableName - }; - - if (workflowVariableValue is IActivity activity) - { - // When an activity is assigned to a workflow variable, what we really are doing is setting the variable to the activity's output. - var activityType = activity.GetType(); - var outputProperty = activityType.GetProperties().FirstOrDefault(x => x.Name == "Result"); - - if (outputProperty == null) - throw new Exception("Cannot assign output of an activity that does not have an Output property."); - - var outputValue = Activator.CreateInstance(outputProperty.PropertyType, workflowVariable, default); - outputProperty.SetValue(activity, outputValue); - - _expressionValue.Put(context, activity); - } - - var currentContainer = _containerStack.Peek(); - currentContainer.Variables.Add(workflowVariable); - - return DefaultResult; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/WorkflowDefinitionBuilderInterpreter.cs b/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/WorkflowDefinitionBuilderInterpreter.cs deleted file mode 100644 index b123c0e6..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Interpreters/WorkflowDefinitionBuilderInterpreter/WorkflowDefinitionBuilderInterpreter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Antlr4.Runtime.Tree; -using Elsa.Scripting.Dsl.Contracts; -using Elsa.Scripting.Dsl.Models; -using Elsa.Workflows; -using Elsa.Workflows.Activities; - -namespace Elsa.Scripting.Dsl.Interpreters; - -public partial class WorkflowDefinitionBuilderInterpreter : ElsaParserBaseVisitor -{ - private readonly ITypeSystem _typeSystem; - private readonly IActivityRegistryLookupService _activityRegistryLookup; - private readonly IFunctionActivityRegistry _functionActivityRegistry; - private readonly IWorkflowBuilder _workflowBuilder; - private readonly ParseTreeProperty _object = new(); - private readonly ParseTreeProperty _expressionValue = new(); - private readonly ParseTreeProperty> _argValues = new(); - private readonly ParseTreeProperty _expressionType = new(); - private readonly IDictionary _definedVariables = new Dictionary(); - private readonly Stack _containerStack = new(); - - /// - public WorkflowDefinitionBuilderInterpreter( - ITypeSystem typeSystem, - IActivityRegistryLookupService activityRegistryLookup, - IFunctionActivityRegistry functionActivityRegistry, - IWorkflowBuilderFactory workflowBuilderFactory) - { - _typeSystem = typeSystem; - _activityRegistryLookup = activityRegistryLookup; - _functionActivityRegistry = functionActivityRegistry; - _workflowBuilder = workflowBuilderFactory.CreateBuilder(); - } - - /// - protected override IWorkflowBuilder DefaultResult => _workflowBuilder; -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Models/DefinedVariable.cs b/src/scripting/Elsa.Scripting.Dsl/Models/DefinedVariable.cs deleted file mode 100644 index 010c5658..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Models/DefinedVariable.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Elsa.Scripting.Dsl.Models; - -public class DefinedVariable -{ - public string Identifier { get; set; } = default!; - public Type Type { get; set; } = default!; - public object? Value { get; set; } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Models/FunctionActivityDescriptor.cs b/src/scripting/Elsa.Scripting.Dsl/Models/FunctionActivityDescriptor.cs deleted file mode 100644 index 442b7f0d..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Models/FunctionActivityDescriptor.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Elsa.Workflows; - -namespace Elsa.Scripting.Dsl.Models; - -/// -/// Describes a function that is mapped to an activity that can be invoked from a DSL script. -/// -/// The name of the function. -/// The name of the activity type. -/// The names of the properties that are mapped to the function arguments. -/// An optional action that can be used to configure the activity. -public record FunctionActivityDescriptor(string FunctionName, string ActivityTypeName, IEnumerable? PropertyNames = default, Action? Configure = default); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Models/WorkflowDefinitionInterpreterSettings.cs b/src/scripting/Elsa.Scripting.Dsl/Models/WorkflowDefinitionInterpreterSettings.cs deleted file mode 100644 index aa88a20f..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Models/WorkflowDefinitionInterpreterSettings.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Elsa.Scripting.Dsl.Models; - -public class WorkflowDefinitionInterpreterSettings -{ -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Services/DslEngine.cs b/src/scripting/Elsa.Scripting.Dsl/Services/DslEngine.cs deleted file mode 100644 index c0ee3391..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Services/DslEngine.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Antlr4.Runtime; -using Elsa.Scripting.Dsl.Contracts; -using Elsa.Scripting.Dsl.Interpreters; -using Elsa.Workflows; -using Elsa.Workflows.Activities; - -namespace Elsa.Scripting.Dsl.Services; - -/// -public class DslEngine : IDslEngine -{ - private readonly ITypeSystem _typeSystem; - private readonly IActivityRegistryLookupService _activityRegistryLookup; - private readonly IFunctionActivityRegistry _functionActivityRegistry; - private readonly IWorkflowBuilderFactory _workflowBuilderFactory; - - /// - /// Initializes a new instance of the class. - /// - public DslEngine( - ITypeSystem typeSystem, - IActivityRegistryLookupService activityRegistryLookup, - IFunctionActivityRegistry functionActivityRegistry, - IWorkflowBuilderFactory workflowBuilderFactory) - { - _typeSystem = typeSystem; - _activityRegistryLookup = activityRegistryLookup; - _functionActivityRegistry = functionActivityRegistry; - _workflowBuilderFactory = workflowBuilderFactory; - } - - /// - public async Task ParseAsync(string script, CancellationToken cancellationToken = default) - { - var stream = CharStreams.fromString(script); - var lexer = new ElsaLexer(stream); - var tokens = new CommonTokenStream(lexer); - var parser = new ElsaParser(tokens); - var tree = parser.program(); - - var interpreter = new WorkflowDefinitionBuilderInterpreter( - _typeSystem, - _activityRegistryLookup, - _functionActivityRegistry, - _workflowBuilderFactory); - - var workflowBuilder = interpreter.Visit(tree); - var workflow = await workflowBuilder.BuildWorkflowAsync(cancellationToken); - - return workflow; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Services/FunctionActivityRegistry.cs b/src/scripting/Elsa.Scripting.Dsl/Services/FunctionActivityRegistry.cs deleted file mode 100644 index 03ba4b2a..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Services/FunctionActivityRegistry.cs +++ /dev/null @@ -1,139 +0,0 @@ -using System.Text.Json; -using Elsa.Scripting.Dsl.Contracts; -using Elsa.Scripting.Dsl.Interpreters; -using Elsa.Scripting.Dsl.Models; -using Elsa.Expressions.Helpers; -using Elsa.Expressions.Models; -using Elsa.Workflows; -using Elsa.Workflows.Models; - -namespace Elsa.Scripting.Dsl.Services; - -/// -public class FunctionActivityRegistry : IFunctionActivityRegistry -{ - private readonly IActivityRegistryLookupService _activityRegistryLookup; - private readonly IDictionary _dictionary = new Dictionary(); - - /// - /// Creates a new instance of the class. - /// - public FunctionActivityRegistry(IActivityRegistryLookupService activityRegistryLookup) - { - _activityRegistryLookup = activityRegistryLookup; - } - - /// - public void RegisterFunction(string functionName, string activityTypeName, IEnumerable? propertyNames = default, Action? configure = default) - { - var descriptor = new FunctionActivityDescriptor(functionName, activityTypeName, propertyNames, configure); - RegisterFunction(descriptor); - } - - /// - public void RegisterFunction(FunctionActivityDescriptor descriptor) - { - _dictionary.Add(descriptor.FunctionName, descriptor); - } - - /// - public async Task ResolveFunctionAsync(string functionName, IEnumerable? arguments = default) - { - if (!_dictionary.TryGetValue(functionName, out var descriptor)) - throw new Exception($"Could not resolve function {functionName}. Did you forget to register it?"); - - var activityDescriptor = await _activityRegistryLookup.FindAsync(x => x.Name == descriptor.ActivityTypeName || x.TypeName == descriptor.ActivityTypeName); - - if (activityDescriptor == null) - throw new Exception($"Could not find activity descriptor for activity type {descriptor.ActivityTypeName}"); - - var propertyNameList = descriptor.PropertyNames?.ToList() ?? new List(); - var propertyDescriptors = activityDescriptor.Inputs.Cast().Concat(activityDescriptor.Outputs).ToList(); - - var properties = propertyNameList - .Select(propertyName => propertyDescriptors.FirstOrDefault(x => x.Name == propertyName)) - .Where(x => x != null) - .Select(x => x!) - .ToList(); - - var dummyJsonElement = JsonDocument.Parse("{}").RootElement; - var constructorContext = new ActivityConstructorContext(activityDescriptor, dummyJsonElement, new JsonSerializerOptions()); - var activity = activityDescriptor.Constructor(constructorContext); - - // Apply each argument in order of the described properties. - var index = 0; - - if (arguments != null) - foreach (var argument in arguments) - { - var property = properties[index++]; - SetPropertyValue(activity, property, argument); - } - - descriptor.Configure?.Invoke(activity); - return activity; - } - - private void SetPropertyValue(IActivity target, PropertyDescriptor propertyDescriptor, object? value) - { - value = propertyDescriptor switch - { - InputDescriptor inputDescriptor => CreateInputValue(inputDescriptor, value), - OutputDescriptor outputDescriptor => CreateOutputValue(outputDescriptor, value), - _ => value - }; - - propertyDescriptor.ValueSetter(target, value); - } - - private Input CreateInputValue(InputDescriptor inputDescriptor, object? propertyValue) - { - if (propertyValue is Input input) - return input; - - var underlyingType = inputDescriptor.Type; - var parsedPropertyValue = propertyValue.ConvertTo(underlyingType); - var propertyValueType = parsedPropertyValue?.GetType(); - var inputType = typeof(Input<>).MakeGenericType(underlyingType); - - if (parsedPropertyValue is ExternalExpressionReference externalExpressionReference) - return (Input)Activator.CreateInstance(inputType, externalExpressionReference.Expression, externalExpressionReference.BlockReference)!; - - if (propertyValueType != null) - { - // Create a literal value. - var literalType = typeof(Literal<>).MakeGenericType(underlyingType); - var hasCtorWithSpecifiedType = inputType.GetConstructors().Any(x => x.GetParameters().Any(y => y.ParameterType.IsAssignableFrom(literalType))); - - if (hasCtorWithSpecifiedType) - { - var literalValue = Activator.CreateInstance(literalType, parsedPropertyValue)!; - return (Input)Activator.CreateInstance(inputType, literalValue)!; - } - } - - return (Input)Activator.CreateInstance(inputType, parsedPropertyValue)!; - } - - private Output CreateOutputValue(OutputDescriptor outputDescriptor, object? propertyValue) - { - if (propertyValue is Output output) - return output; - - var underlyingType = outputDescriptor.Type; - var propertyValueType = propertyValue?.GetType(); - var outputType = typeof(Output<>).MakeGenericType(underlyingType); - - if (propertyValueType != null) - { - var hasCtorWithSpecifiedType = outputType.GetConstructors().Any(x => x.GetParameters().Any(y => y.ParameterType.IsAssignableFrom(propertyValueType))); - - if (hasCtorWithSpecifiedType) - return (Output)Activator.CreateInstance(outputType, propertyValue, null)!; - } - - var convertedValue = propertyValue.ConvertTo(underlyingType); - - return (Output)Activator.CreateInstance(outputType, convertedValue)!; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.Dsl/Services/TypeSystem.cs b/src/scripting/Elsa.Scripting.Dsl/Services/TypeSystem.cs deleted file mode 100644 index 7319b8ee..00000000 --- a/src/scripting/Elsa.Scripting.Dsl/Services/TypeSystem.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Elsa.Scripting.Dsl.Contracts; -using Elsa.Workflows.Models; - -namespace Elsa.Scripting.Dsl.Services; - -public class TypeSystem : ITypeSystem -{ - private readonly IDictionary _typeNameLookup = new Dictionary(); - private readonly IDictionary _typeLookup = new Dictionary(); - - public void Register(TypeDescriptor descriptor) - { - _typeNameLookup[descriptor.Name] = descriptor; - _typeLookup[descriptor.Type] = descriptor; - } - - public TypeDescriptor? ResolveTypeName(string typeName) => _typeNameLookup.TryGetValue(typeName, out var descriptor) ? descriptor : default; - public TypeDescriptor? ResolveType(Type type) => _typeLookup.TryGetValue(type, out var descriptor) ? descriptor : default; -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/dist/lodash.js b/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/dist/lodash.js deleted file mode 100644 index 6cf80406..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/dist/lodash.js +++ /dev/null @@ -1,9 +0,0 @@ -!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.lodash=t():n.lodash=t()}(this,(()=>(()=>{var n={2543:function(n,t,r){var e; -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */n=r.nmd(n),function(){var u,i="Expected a function",o="__lodash_hash_undefined__",f="__lodash_placeholder__",a=16,c=32,l=64,s=128,h=256,p=1/0,v=9007199254740991,_=NaN,g=4294967295,y=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",c],["partialRight",l],["rearg",h]],d="[object Arguments]",b="[object Array]",w="[object Boolean]",m="[object Date]",x="[object Error]",j="[object Function]",A="[object GeneratorFunction]",k="[object Map]",O="[object Number]",I="[object Object]",R="[object Promise]",z="[object RegExp]",E="[object Set]",S="[object String]",W="[object Symbol]",L="[object WeakMap]",C="[object ArrayBuffer]",T="[object DataView]",U="[object Float32Array]",B="[object Float64Array]",$="[object Int8Array]",D="[object Int16Array]",F="[object Int32Array]",M="[object Uint8Array]",N="[object Uint8ClampedArray]",P="[object Uint16Array]",q="[object Uint32Array]",Z=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,un=/[\\^$.*+?()[\]{}|]/g,on=RegExp(un.source),fn=/^\s+/,an=/\s/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ln=/\{\n\/\* \[wrapped with (.+)\] \*/,sn=/,? & /,hn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pn=/[()=,{}\[\]\/\s]/,vn=/\\(\\)?/g,_n=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,dn=/^0b[01]+$/i,bn=/^\[object .+?Constructor\]$/,wn=/^0o[0-7]+$/i,mn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,An=/['\n\r\u2028\u2029\\]/g,kn="\\ud800-\\udfff",On="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",In="\\u2700-\\u27bf",Rn="a-z\\xdf-\\xf6\\xf8-\\xff",zn="A-Z\\xc0-\\xd6\\xd8-\\xde",En="\\ufe0e\\ufe0f",Sn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Wn="['’]",Ln="["+kn+"]",Cn="["+Sn+"]",Tn="["+On+"]",Un="\\d+",Bn="["+In+"]",$n="["+Rn+"]",Dn="[^"+kn+Sn+Un+In+Rn+zn+"]",Fn="\\ud83c[\\udffb-\\udfff]",Mn="[^"+kn+"]",Nn="(?:\\ud83c[\\udde6-\\uddff]){2}",Pn="[\\ud800-\\udbff][\\udc00-\\udfff]",qn="["+zn+"]",Zn="\\u200d",Kn="(?:"+$n+"|"+Dn+")",Vn="(?:"+qn+"|"+Dn+")",Gn="(?:['’](?:d|ll|m|re|s|t|ve))?",Hn="(?:['’](?:D|LL|M|RE|S|T|VE))?",Jn="(?:"+Tn+"|"+Fn+")"+"?",Yn="["+En+"]?",Qn=Yn+Jn+("(?:"+Zn+"(?:"+[Mn,Nn,Pn].join("|")+")"+Yn+Jn+")*"),Xn="(?:"+[Bn,Nn,Pn].join("|")+")"+Qn,nt="(?:"+[Mn+Tn+"?",Tn,Nn,Pn,Ln].join("|")+")",tt=RegExp(Wn,"g"),rt=RegExp(Tn,"g"),et=RegExp(Fn+"(?="+Fn+")|"+nt+Qn,"g"),ut=RegExp([qn+"?"+$n+"+"+Gn+"(?="+[Cn,qn,"$"].join("|")+")",Vn+"+"+Hn+"(?="+[Cn,qn+Kn,"$"].join("|")+")",qn+"?"+Kn+"+"+Gn,qn+"+"+Hn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Un,Xn].join("|"),"g"),it=RegExp("["+Zn+kn+On+En+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ft=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,ct={};ct[U]=ct[B]=ct[$]=ct[D]=ct[F]=ct[M]=ct[N]=ct[P]=ct[q]=!0,ct[d]=ct[b]=ct[C]=ct[w]=ct[T]=ct[m]=ct[x]=ct[j]=ct[k]=ct[O]=ct[I]=ct[z]=ct[E]=ct[S]=ct[L]=!1;var lt={};lt[d]=lt[b]=lt[C]=lt[T]=lt[w]=lt[m]=lt[U]=lt[B]=lt[$]=lt[D]=lt[F]=lt[k]=lt[O]=lt[I]=lt[z]=lt[E]=lt[S]=lt[W]=lt[M]=lt[N]=lt[P]=lt[q]=!0,lt[x]=lt[j]=lt[L]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ht=parseFloat,pt=parseInt,vt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,_t="object"==typeof self&&self&&self.Object===Object&&self,gt=vt||_t||Function("return this")(),yt=t&&!t.nodeType&&t,dt=yt&&n&&!n.nodeType&&n,bt=dt&&dt.exports===yt,wt=bt&&vt.process,mt=function(){try{var n=dt&&dt.require&&dt.require("util").types;return n||wt&&wt.binding&&wt.binding("util")}catch(n){}}(),xt=mt&&mt.isArrayBuffer,jt=mt&&mt.isDate,At=mt&&mt.isMap,kt=mt&&mt.isRegExp,Ot=mt&&mt.isSet,It=mt&&mt.isTypedArray;function Rt(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function zt(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u-1}function Tt(n,t,r){for(var e=-1,u=null==n?0:n.length;++e-1;);return r}function ur(n,t){for(var r=n.length;r--&&qt(t,n[r],0)>-1;);return r}var ir=Ht({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),or=Ht({"&":"&","<":"<",">":">",'"':""","'":"'"});function fr(n){return"\\"+st[n]}function ar(n){return it.test(n)}function cr(n){var t=-1,r=Array(n.size);return n.forEach((function(n,e){r[++t]=[e,n]})),r}function lr(n,t){return function(r){return n(t(r))}}function sr(n,t){for(var r=-1,e=n.length,u=0,i=[];++r",""":'"',"'":"'"});var dr=function n(t){var r,e=(t=null==t?gt:dr.defaults(gt.Object(),t,dr.pick(gt,ft))).Array,an=t.Date,kn=t.Error,On=t.Function,In=t.Math,Rn=t.Object,zn=t.RegExp,En=t.String,Sn=t.TypeError,Wn=e.prototype,Ln=On.prototype,Cn=Rn.prototype,Tn=t["__core-js_shared__"],Un=Ln.toString,Bn=Cn.hasOwnProperty,$n=0,Dn=(r=/[^.]+$/.exec(Tn&&Tn.keys&&Tn.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Fn=Cn.toString,Mn=Un.call(Rn),Nn=gt._,Pn=zn("^"+Un.call(Bn).replace(un,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qn=bt?t.Buffer:u,Zn=t.Symbol,Kn=t.Uint8Array,Vn=qn?qn.allocUnsafe:u,Gn=lr(Rn.getPrototypeOf,Rn),Hn=Rn.create,Jn=Cn.propertyIsEnumerable,Yn=Wn.splice,Qn=Zn?Zn.isConcatSpreadable:u,Xn=Zn?Zn.iterator:u,nt=Zn?Zn.toStringTag:u,et=function(){try{var n=hi(Rn,"defineProperty");return n({},"",{}),n}catch(n){}}(),it=t.clearTimeout!==gt.clearTimeout&&t.clearTimeout,st=an&&an.now!==gt.Date.now&&an.now,vt=t.setTimeout!==gt.setTimeout&&t.setTimeout,_t=In.ceil,yt=In.floor,dt=Rn.getOwnPropertySymbols,wt=qn?qn.isBuffer:u,mt=t.isFinite,Mt=Wn.join,Ht=lr(Rn.keys,Rn),br=In.max,wr=In.min,mr=an.now,xr=t.parseInt,jr=In.random,Ar=Wn.reverse,kr=hi(t,"DataView"),Or=hi(t,"Map"),Ir=hi(t,"Promise"),Rr=hi(t,"Set"),zr=hi(t,"WeakMap"),Er=hi(Rn,"create"),Sr=zr&&new zr,Wr={},Lr=$i(kr),Cr=$i(Or),Tr=$i(Ir),Ur=$i(Rr),Br=$i(zr),$r=Zn?Zn.prototype:u,Dr=$r?$r.valueOf:u,Fr=$r?$r.toString:u;function Mr(n){if(rf(n)&&!Zo(n)&&!(n instanceof Zr)){if(n instanceof qr)return n;if(Bn.call(n,"__wrapped__"))return Di(n)}return new qr(n)}var Nr=function(){function n(){}return function(t){if(!tf(t))return{};if(Hn)return Hn(t);n.prototype=t;var r=new n;return n.prototype=u,r}}();function Pr(){}function qr(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=u}function Zr(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Kr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function ce(n,t,r,e,i,o){var f,a=1&t,c=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==u)return f;if(!tf(n))return n;var s=Zo(n);if(s){if(f=function(n){var t=n.length,r=new n.constructor(t);t&&"string"==typeof n[0]&&Bn.call(n,"index")&&(r.index=n.index,r.input=n.input);return r}(n),!a)return Eu(n,f)}else{var h=_i(n),p=h==j||h==A;if(Ho(n))return Au(n,a);if(h==I||h==d||p&&!i){if(f=c||p?{}:yi(n),!a)return c?function(n,t){return Su(n,vi(n),t)}(n,function(n,t){return n&&Su(t,Cf(t),n)}(f,n)):function(n,t){return Su(n,pi(n),t)}(n,ie(f,n))}else{if(!lt[h])return i?n:{};f=function(n,t,r){var e=n.constructor;switch(t){case C:return ku(n);case w:case m:return new e(+n);case T:return function(n,t){var r=t?ku(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}(n,r);case U:case B:case $:case D:case F:case M:case N:case P:case q:return Ou(n,r);case k:return new e;case O:case S:return new e(n);case z:return function(n){var t=new n.constructor(n.source,gn.exec(n));return t.lastIndex=n.lastIndex,t}(n);case E:return new e;case W:return u=n,Dr?Rn(Dr.call(u)):{}}var u}(n,h,a)}}o||(o=new Jr);var v=o.get(n);if(v)return v;o.set(n,f),af(n)?n.forEach((function(e){f.add(ce(e,t,r,e,n,o))})):ef(n)&&n.forEach((function(e,u){f.set(u,ce(e,t,r,u,n,o))}));var _=s?u:(l?c?ii:ui:c?Cf:Lf)(n);return Et(_||n,(function(e,u){_&&(e=n[u=e]),re(f,u,ce(e,t,r,u,n,o))})),f}function le(n,t,r){var e=r.length;if(null==n)return!e;for(n=Rn(n);e--;){var i=r[e],o=t[i],f=n[i];if(f===u&&!(i in n)||!o(f))return!1}return!0}function se(n,t,r){if("function"!=typeof n)throw new Sn(i);return Si((function(){n.apply(u,r)}),t)}function he(n,t,r,e){var u=-1,i=Ct,o=!0,f=n.length,a=[],c=t.length;if(!f)return a;r&&(t=Ut(t,nr(r))),e?(i=Tt,o=!1):t.length>=200&&(i=rr,o=!1,t=new Hr(t));n:for(;++u-1},Vr.prototype.set=function(n,t){var r=this.__data__,e=ee(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this},Gr.prototype.clear=function(){this.size=0,this.__data__={hash:new Kr,map:new(Or||Vr),string:new Kr}},Gr.prototype.delete=function(n){var t=li(this,n).delete(n);return this.size-=t?1:0,t},Gr.prototype.get=function(n){return li(this,n).get(n)},Gr.prototype.has=function(n){return li(this,n).has(n)},Gr.prototype.set=function(n,t){var r=li(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Hr.prototype.add=Hr.prototype.push=function(n){return this.__data__.set(n,o),this},Hr.prototype.has=function(n){return this.__data__.has(n)},Jr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Jr.prototype.delete=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},Jr.prototype.get=function(n){return this.__data__.get(n)},Jr.prototype.has=function(n){return this.__data__.has(n)},Jr.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Vr){var e=r.__data__;if(!Or||e.length<199)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Gr(e)}return r.set(n,t),this.size=r.size,this};var pe=Cu(me),ve=Cu(xe,!0);function _e(n,t){var r=!0;return pe(n,(function(n,e,u){return r=!!t(n,e,u)})),r}function ge(n,t,r){for(var e=-1,i=n.length;++e0&&r(f)?t>1?de(f,t-1,r,e,u):Bt(u,f):e||(u[u.length]=f)}return u}var be=Tu(),we=Tu(!0);function me(n,t){return n&&be(n,t,Lf)}function xe(n,t){return n&&we(n,t,Lf)}function je(n,t){return Lt(t,(function(t){return Qo(n[t])}))}function Ae(n,t){for(var r=0,e=(t=wu(t,n)).length;null!=n&&rt}function Re(n,t){return null!=n&&Bn.call(n,t)}function ze(n,t){return null!=n&&t in Rn(n)}function Ee(n,t,r){for(var i=r?Tt:Ct,o=n[0].length,f=n.length,a=f,c=e(f),l=1/0,s=[];a--;){var h=n[a];a&&t&&(h=Ut(h,nr(t))),l=wr(h.length,l),c[a]=!r&&(t||o>=120&&h.length>=120)?new Hr(a&&h):u}h=n[0];var p=-1,v=c[0];n:for(;++p=f?a:a*("desc"==r[e]?-1:1)}return n.index-t.index}(n,t,r)}))}function Ke(n,t,r){for(var e=-1,u=t.length,i={};++e-1;)f!==n&&Yn.call(f,a,1),Yn.call(n,a,1);return n}function Ge(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;bi(u)?Yn.call(n,u,1):hu(n,u)}}return n}function He(n,t){return n+yt(jr()*(t-n+1))}function Je(n,t){var r="";if(!n||t<1||t>v)return r;do{t%2&&(r+=n),(t=yt(t/2))&&(n+=n)}while(t);return r}function Ye(n,t){return Wi(Ii(n,t,ia),n+"")}function Qe(n){return Qr(Nf(n))}function Xe(n,t){var r=Nf(n);return Ti(r,ae(t,0,r.length))}function nu(n,t,r,e){if(!tf(n))return n;for(var i=-1,o=(t=wu(t,n)).length,f=o-1,a=n;null!=a&&++ii?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=e(i);++u>>1,o=n[i];null!==o&&!lf(o)&&(r?o<=t:o=200){var c=t?null:Ju(n);if(c)return hr(c);o=!1,u=rr,a=new Hr}else a=t?[]:f;n:for(;++e=e?n:uu(n,t,r)}var ju=it||function(n){return gt.clearTimeout(n)};function Au(n,t){if(t)return n.slice();var r=n.length,e=Vn?Vn(r):new n.constructor(r);return n.copy(e),e}function ku(n){var t=new n.constructor(n.byteLength);return new Kn(t).set(new Kn(n)),t}function Ou(n,t){var r=t?ku(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Iu(n,t){if(n!==t){var r=n!==u,e=null===n,i=n==n,o=lf(n),f=t!==u,a=null===t,c=t==t,l=lf(t);if(!a&&!l&&!o&&n>t||o&&f&&c&&!a&&!l||e&&f&&c||!r&&c||!i)return 1;if(!e&&!o&&!l&&n1?r[i-1]:u,f=i>2?r[2]:u;for(o=n.length>3&&"function"==typeof o?(i--,o):u,f&&wi(r[0],r[1],f)&&(o=i<3?u:o,i=1),t=Rn(t);++e-1?i[o?t[f]:f]:u}}function Fu(n){return ei((function(t){var r=t.length,e=r,o=qr.prototype.thru;for(n&&t.reverse();e--;){var f=t[e];if("function"!=typeof f)throw new Sn(i);if(o&&!a&&"wrapper"==fi(f))var a=new qr([],!0)}for(e=a?e:r;++e1&&w.reverse(),p&&la))return!1;var l=o.get(n),s=o.get(t);if(l&&s)return l==t&&s==n;var h=-1,p=!0,v=2&r?new Hr:u;for(o.set(n,t),o.set(t,n);++h-1&&n%1==0&&n1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(cn,"{\n/* [wrapped with "+t+"] */\n")}(e,function(n,t){return Et(y,(function(r){var e="_."+r[0];t&r[1]&&!Ct(n,e)&&n.push(e)})),n.sort()}(function(n){var t=n.match(ln);return t?t[1].split(sn):[]}(e),r)))}function Ci(n){var t=0,r=0;return function(){var e=mr(),i=16-(e-r);if(r=e,i>0){if(++t>=800)return arguments[0]}else t=0;return n.apply(u,arguments)}}function Ti(n,t){var r=-1,e=n.length,i=e-1;for(t=t===u?e:t;++r1?n[t-1]:u;return r="function"==typeof r?(n.pop(),r):u,io(n,r)}));function ho(n){var t=Mr(n);return t.__chain__=!0,t}function po(n,t){return t(n)}var vo=ei((function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,i=function(t){return fe(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Zr&&bi(r)?((e=e.slice(r,+r+(t?1:0))).__actions__.push({func:po,args:[i],thisArg:u}),new qr(e,this.__chain__).thru((function(n){return t&&!n.length&&n.push(u),n}))):this.thru(i)}));var _o=Wu((function(n,t,r){Bn.call(n,r)?++n[r]:oe(n,r,1)}));var go=Du(Pi),yo=Du(qi);function bo(n,t){return(Zo(n)?Et:pe)(n,ci(t,3))}function wo(n,t){return(Zo(n)?St:ve)(n,ci(t,3))}var mo=Wu((function(n,t,r){Bn.call(n,r)?n[r].push(t):oe(n,r,[t])}));var xo=Ye((function(n,t,r){var u=-1,i="function"==typeof t,o=Vo(n)?e(n.length):[];return pe(n,(function(n){o[++u]=i?Rt(t,n,r):Se(n,t,r)})),o})),jo=Wu((function(n,t,r){oe(n,r,t)}));function Ao(n,t){return(Zo(n)?Ut:Fe)(n,ci(t,3))}var ko=Wu((function(n,t,r){n[r?0:1].push(t)}),(function(){return[[],[]]}));var Oo=Ye((function(n,t){if(null==n)return[];var r=t.length;return r>1&&wi(n,t[0],t[1])?t=[]:r>2&&wi(t[0],t[1],t[2])&&(t=[t[0]]),Ze(n,de(t,1),[])})),Io=st||function(){return gt.Date.now()};function Ro(n,t,r){return t=r?u:t,t=n&&null==t?n.length:t,Qu(n,s,u,u,u,u,t)}function zo(n,t){var r;if("function"!=typeof t)throw new Sn(i);return n=gf(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=u),r}}var Eo=Ye((function(n,t,r){var e=1;if(r.length){var u=sr(r,ai(Eo));e|=c}return Qu(n,e,t,r,u)})),So=Ye((function(n,t,r){var e=3;if(r.length){var u=sr(r,ai(So));e|=c}return Qu(t,e,n,r,u)}));function Wo(n,t,r){var e,o,f,a,c,l,s=0,h=!1,p=!1,v=!0;if("function"!=typeof n)throw new Sn(i);function _(t){var r=e,i=o;return e=o=u,s=t,a=n.apply(i,r)}function g(n){var r=n-l;return l===u||r>=t||r<0||p&&n-s>=f}function y(){var n=Io();if(g(n))return d(n);c=Si(y,function(n){var r=t-(n-l);return p?wr(r,f-(n-s)):r}(n))}function d(n){return c=u,v&&e?_(n):(e=o=u,a)}function b(){var n=Io(),r=g(n);if(e=arguments,o=this,l=n,r){if(c===u)return function(n){return s=n,c=Si(y,t),h?_(n):a}(l);if(p)return ju(c),c=Si(y,t),_(l)}return c===u&&(c=Si(y,t)),a}return t=df(t)||0,tf(r)&&(h=!!r.leading,f=(p="maxWait"in r)?br(df(r.maxWait)||0,t):f,v="trailing"in r?!!r.trailing:v),b.cancel=function(){c!==u&&ju(c),s=0,e=l=o=c=u},b.flush=function(){return c===u?a:d(Io())},b}var Lo=Ye((function(n,t){return se(n,1,t)})),Co=Ye((function(n,t,r){return se(n,df(t)||0,r)}));function To(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new Sn(i);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(To.Cache||Gr),r}function Uo(n){if("function"!=typeof n)throw new Sn(i);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}To.Cache=Gr;var Bo=mu((function(n,t){var r=(t=1==t.length&&Zo(t[0])?Ut(t[0],nr(ci())):Ut(de(t,1),nr(ci()))).length;return Ye((function(e){for(var u=-1,i=wr(e.length,r);++u=t})),qo=We(function(){return arguments}())?We:function(n){return rf(n)&&Bn.call(n,"callee")&&!Jn.call(n,"callee")},Zo=e.isArray,Ko=xt?nr(xt):function(n){return rf(n)&&Oe(n)==C};function Vo(n){return null!=n&&nf(n.length)&&!Qo(n)}function Go(n){return rf(n)&&Vo(n)}var Ho=wt||da,Jo=jt?nr(jt):function(n){return rf(n)&&Oe(n)==m};function Yo(n){if(!rf(n))return!1;var t=Oe(n);return t==x||"[object DOMException]"==t||"string"==typeof n.message&&"string"==typeof n.name&&!of(n)}function Qo(n){if(!tf(n))return!1;var t=Oe(n);return t==j||t==A||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xo(n){return"number"==typeof n&&n==gf(n)}function nf(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=v}function tf(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function rf(n){return null!=n&&"object"==typeof n}var ef=At?nr(At):function(n){return rf(n)&&_i(n)==k};function uf(n){return"number"==typeof n||rf(n)&&Oe(n)==O}function of(n){if(!rf(n)||Oe(n)!=I)return!1;var t=Gn(n);if(null===t)return!0;var r=Bn.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Un.call(r)==Mn}var ff=kt?nr(kt):function(n){return rf(n)&&Oe(n)==z};var af=Ot?nr(Ot):function(n){return rf(n)&&_i(n)==E};function cf(n){return"string"==typeof n||!Zo(n)&&rf(n)&&Oe(n)==S}function lf(n){return"symbol"==typeof n||rf(n)&&Oe(n)==W}var sf=It?nr(It):function(n){return rf(n)&&nf(n.length)&&!!ct[Oe(n)]};var hf=Vu(De),pf=Vu((function(n,t){return n<=t}));function vf(n){if(!n)return[];if(Vo(n))return cf(n)?_r(n):Eu(n);if(Xn&&n[Xn])return function(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}(n[Xn]());var t=_i(n);return(t==k?cr:t==E?hr:Nf)(n)}function _f(n){return n?(n=df(n))===p||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}function gf(n){var t=_f(n),r=t%1;return t==t?r?t-r:t:0}function yf(n){return n?ae(gf(n),0,g):0}function df(n){if("number"==typeof n)return n;if(lf(n))return _;if(tf(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=tf(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=Xt(n);var r=dn.test(n);return r||wn.test(n)?pt(n.slice(2),r?2:8):yn.test(n)?_:+n}function bf(n){return Su(n,Cf(n))}function wf(n){return null==n?"":lu(n)}var mf=Lu((function(n,t){if(Ai(t)||Vo(t))Su(t,Lf(t),n);else for(var r in t)Bn.call(t,r)&&re(n,r,t[r])})),xf=Lu((function(n,t){Su(t,Cf(t),n)})),jf=Lu((function(n,t,r,e){Su(t,Cf(t),n,e)})),Af=Lu((function(n,t,r,e){Su(t,Lf(t),n,e)})),kf=ei(fe);var Of=Ye((function(n,t){n=Rn(n);var r=-1,e=t.length,i=e>2?t[2]:u;for(i&&wi(t[0],t[1],i)&&(e=1);++r1),t})),Su(n,ii(n),r),e&&(r=ce(r,7,ti));for(var u=t.length;u--;)hu(r,t[u]);return r}));var $f=ei((function(n,t){return null==n?{}:function(n,t){return Ke(n,t,(function(t,r){return zf(n,r)}))}(n,t)}));function Df(n,t){if(null==n)return{};var r=Ut(ii(n),(function(n){return[n]}));return t=ci(t),Ke(n,r,(function(n,r){return t(n,r[0])}))}var Ff=Yu(Lf),Mf=Yu(Cf);function Nf(n){return null==n?[]:tr(n,Lf(n))}var Pf=Bu((function(n,t,r){return t=t.toLowerCase(),n+(r?qf(t):t)}));function qf(n){return Qf(wf(n).toLowerCase())}function Zf(n){return(n=wf(n))&&n.replace(xn,ir).replace(rt,"")}var Kf=Bu((function(n,t,r){return n+(r?"-":"")+t.toLowerCase()})),Vf=Bu((function(n,t,r){return n+(r?" ":"")+t.toLowerCase()})),Gf=Uu("toLowerCase");var Hf=Bu((function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}));var Jf=Bu((function(n,t,r){return n+(r?" ":"")+Qf(t)}));var Yf=Bu((function(n,t,r){return n+(r?" ":"")+t.toUpperCase()})),Qf=Uu("toUpperCase");function Xf(n,t,r){return n=wf(n),(t=r?u:t)===u?function(n){return ot.test(n)}(n)?function(n){return n.match(ut)||[]}(n):function(n){return n.match(hn)||[]}(n):n.match(t)||[]}var na=Ye((function(n,t){try{return Rt(n,u,t)}catch(n){return Yo(n)?n:new kn(n)}})),ta=ei((function(n,t){return Et(t,(function(t){t=Bi(t),oe(n,t,Eo(n[t],n))})),n}));function ra(n){return function(){return n}}var ea=Fu(),ua=Fu(!0);function ia(n){return n}function oa(n){return Ue("function"==typeof n?n:ce(n,1))}var fa=Ye((function(n,t){return function(r){return Se(r,n,t)}})),aa=Ye((function(n,t){return function(r){return Se(n,r,t)}}));function ca(n,t,r){var e=Lf(t),u=je(t,e);null!=r||tf(t)&&(u.length||!e.length)||(r=t,t=n,n=this,u=je(t,Lf(t)));var i=!(tf(r)&&"chain"in r&&!r.chain),o=Qo(n);return Et(u,(function(r){var e=t[r];n[r]=e,o&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=Eu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,Bt([this.value()],arguments))})})),n}function la(){}var sa=qu(Ut),ha=qu(Wt),pa=qu(Ft);function va(n){return mi(n)?Gt(Bi(n)):function(n){return function(t){return Ae(t,n)}}(n)}var _a=Ku(),ga=Ku(!0);function ya(){return[]}function da(){return!1}var ba=Pu((function(n,t){return n+t}),0),wa=Hu("ceil"),ma=Pu((function(n,t){return n/t}),1),xa=Hu("floor");var ja,Aa=Pu((function(n,t){return n*t}),1),ka=Hu("round"),Oa=Pu((function(n,t){return n-t}),0);return Mr.after=function(n,t){if("function"!=typeof t)throw new Sn(i);return n=gf(n),function(){if(--n<1)return t.apply(this,arguments)}},Mr.ary=Ro,Mr.assign=mf,Mr.assignIn=xf,Mr.assignInWith=jf,Mr.assignWith=Af,Mr.at=kf,Mr.before=zo,Mr.bind=Eo,Mr.bindAll=ta,Mr.bindKey=So,Mr.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return Zo(n)?n:[n]},Mr.chain=ho,Mr.chunk=function(n,t,r){t=(r?wi(n,t,r):t===u)?1:br(gf(t),0);var i=null==n?0:n.length;if(!i||t<1)return[];for(var o=0,f=0,a=e(_t(i/t));oi?0:i+r),(e=e===u||e>i?i:gf(e))<0&&(e+=i),e=r>e?0:yf(e);r>>0)?(n=wf(n))&&("string"==typeof t||null!=t&&!ff(t))&&!(t=lu(t))&&ar(n)?xu(_r(n),0,r):n.split(t,r):[]},Mr.spread=function(n,t){if("function"!=typeof n)throw new Sn(i);return t=null==t?0:br(gf(t),0),Ye((function(r){var e=r[t],u=xu(r,0,t);return e&&Bt(u,e),Rt(n,this,u)}))},Mr.tail=function(n){var t=null==n?0:n.length;return t?uu(n,1,t):[]},Mr.take=function(n,t,r){return n&&n.length?uu(n,0,(t=r||t===u?1:gf(t))<0?0:t):[]},Mr.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?uu(n,(t=e-(t=r||t===u?1:gf(t)))<0?0:t,e):[]},Mr.takeRightWhile=function(n,t){return n&&n.length?vu(n,ci(t,3),!1,!0):[]},Mr.takeWhile=function(n,t){return n&&n.length?vu(n,ci(t,3)):[]},Mr.tap=function(n,t){return t(n),n},Mr.throttle=function(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new Sn(i);return tf(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Wo(n,t,{leading:e,maxWait:t,trailing:u})},Mr.thru=po,Mr.toArray=vf,Mr.toPairs=Ff,Mr.toPairsIn=Mf,Mr.toPath=function(n){return Zo(n)?Ut(n,Bi):lf(n)?[n]:Eu(Ui(wf(n)))},Mr.toPlainObject=bf,Mr.transform=function(n,t,r){var e=Zo(n),u=e||Ho(n)||sf(n);if(t=ci(t,4),null==r){var i=n&&n.constructor;r=u?e?new i:[]:tf(n)&&Qo(i)?Nr(Gn(n)):{}}return(u?Et:me)(n,(function(n,e,u){return t(r,n,e,u)})),r},Mr.unary=function(n){return Ro(n,1)},Mr.union=to,Mr.unionBy=ro,Mr.unionWith=eo,Mr.uniq=function(n){return n&&n.length?su(n):[]},Mr.uniqBy=function(n,t){return n&&n.length?su(n,ci(t,2)):[]},Mr.uniqWith=function(n,t){return t="function"==typeof t?t:u,n&&n.length?su(n,u,t):[]},Mr.unset=function(n,t){return null==n||hu(n,t)},Mr.unzip=uo,Mr.unzipWith=io,Mr.update=function(n,t,r){return null==n?n:pu(n,t,bu(r))},Mr.updateWith=function(n,t,r,e){return e="function"==typeof e?e:u,null==n?n:pu(n,t,bu(r),e)},Mr.values=Nf,Mr.valuesIn=function(n){return null==n?[]:tr(n,Cf(n))},Mr.without=oo,Mr.words=Xf,Mr.wrap=function(n,t){return $o(bu(t),n)},Mr.xor=fo,Mr.xorBy=ao,Mr.xorWith=co,Mr.zip=lo,Mr.zipObject=function(n,t){return yu(n||[],t||[],re)},Mr.zipObjectDeep=function(n,t){return yu(n||[],t||[],nu)},Mr.zipWith=so,Mr.entries=Ff,Mr.entriesIn=Mf,Mr.extend=xf,Mr.extendWith=jf,ca(Mr,Mr),Mr.add=ba,Mr.attempt=na,Mr.camelCase=Pf,Mr.capitalize=qf,Mr.ceil=wa,Mr.clamp=function(n,t,r){return r===u&&(r=t,t=u),r!==u&&(r=(r=df(r))==r?r:0),t!==u&&(t=(t=df(t))==t?t:0),ae(df(n),t,r)},Mr.clone=function(n){return ce(n,4)},Mr.cloneDeep=function(n){return ce(n,5)},Mr.cloneDeepWith=function(n,t){return ce(n,5,t="function"==typeof t?t:u)},Mr.cloneWith=function(n,t){return ce(n,4,t="function"==typeof t?t:u)},Mr.conformsTo=function(n,t){return null==t||le(n,t,Lf(t))},Mr.deburr=Zf,Mr.defaultTo=function(n,t){return null==n||n!=n?t:n},Mr.divide=ma,Mr.endsWith=function(n,t,r){n=wf(n),t=lu(t);var e=n.length,i=r=r===u?e:ae(gf(r),0,e);return(r-=t.length)>=0&&n.slice(r,i)==t},Mr.eq=Mo,Mr.escape=function(n){return(n=wf(n))&&Y.test(n)?n.replace(H,or):n},Mr.escapeRegExp=function(n){return(n=wf(n))&&on.test(n)?n.replace(un,"\\$&"):n},Mr.every=function(n,t,r){var e=Zo(n)?Wt:_e;return r&&wi(n,t,r)&&(t=u),e(n,ci(t,3))},Mr.find=go,Mr.findIndex=Pi,Mr.findKey=function(n,t){return Nt(n,ci(t,3),me)},Mr.findLast=yo,Mr.findLastIndex=qi,Mr.findLastKey=function(n,t){return Nt(n,ci(t,3),xe)},Mr.floor=xa,Mr.forEach=bo,Mr.forEachRight=wo,Mr.forIn=function(n,t){return null==n?n:be(n,ci(t,3),Cf)},Mr.forInRight=function(n,t){return null==n?n:we(n,ci(t,3),Cf)},Mr.forOwn=function(n,t){return n&&me(n,ci(t,3))},Mr.forOwnRight=function(n,t){return n&&xe(n,ci(t,3))},Mr.get=Rf,Mr.gt=No,Mr.gte=Po,Mr.has=function(n,t){return null!=n&&gi(n,t,Re)},Mr.hasIn=zf,Mr.head=Ki,Mr.identity=ia,Mr.includes=function(n,t,r,e){n=Vo(n)?n:Nf(n),r=r&&!e?gf(r):0;var u=n.length;return r<0&&(r=br(u+r,0)),cf(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&qt(n,t,r)>-1},Mr.indexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:gf(r);return u<0&&(u=br(e+u,0)),qt(n,t,u)},Mr.inRange=function(n,t,r){return t=_f(t),r===u?(r=t,t=0):r=_f(r),function(n,t,r){return n>=wr(t,r)&&n=-9007199254740991&&n<=v},Mr.isSet=af,Mr.isString=cf,Mr.isSymbol=lf,Mr.isTypedArray=sf,Mr.isUndefined=function(n){return n===u},Mr.isWeakMap=function(n){return rf(n)&&_i(n)==L},Mr.isWeakSet=function(n){return rf(n)&&"[object WeakSet]"==Oe(n)},Mr.join=function(n,t){return null==n?"":Mt.call(n,t)},Mr.kebabCase=Kf,Mr.last=Ji,Mr.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var i=e;return r!==u&&(i=(i=gf(r))<0?br(e+i,0):wr(i,e-1)),t==t?function(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}(n,t,i):Pt(n,Kt,i,!0)},Mr.lowerCase=Vf,Mr.lowerFirst=Gf,Mr.lt=hf,Mr.lte=pf,Mr.max=function(n){return n&&n.length?ge(n,ia,Ie):u},Mr.maxBy=function(n,t){return n&&n.length?ge(n,ci(t,2),Ie):u},Mr.mean=function(n){return Vt(n,ia)},Mr.meanBy=function(n,t){return Vt(n,ci(t,2))},Mr.min=function(n){return n&&n.length?ge(n,ia,De):u},Mr.minBy=function(n,t){return n&&n.length?ge(n,ci(t,2),De):u},Mr.stubArray=ya,Mr.stubFalse=da,Mr.stubObject=function(){return{}},Mr.stubString=function(){return""},Mr.stubTrue=function(){return!0},Mr.multiply=Aa,Mr.nth=function(n,t){return n&&n.length?qe(n,gf(t)):u},Mr.noConflict=function(){return gt._===this&&(gt._=Nn),this},Mr.noop=la,Mr.now=Io,Mr.pad=function(n,t,r){n=wf(n);var e=(t=gf(t))?vr(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return Zu(yt(u),r)+n+Zu(_t(u),r)},Mr.padEnd=function(n,t,r){n=wf(n);var e=(t=gf(t))?vr(n):0;return t&&et){var e=n;n=t,t=e}if(r||n%1||t%1){var i=jr();return wr(n+i*(t-n+ht("1e-"+((i+"").length-1))),t)}return He(n,t)},Mr.reduce=function(n,t,r){var e=Zo(n)?$t:Jt,u=arguments.length<3;return e(n,ci(t,4),r,u,pe)},Mr.reduceRight=function(n,t,r){var e=Zo(n)?Dt:Jt,u=arguments.length<3;return e(n,ci(t,4),r,u,ve)},Mr.repeat=function(n,t,r){return t=(r?wi(n,t,r):t===u)?1:gf(t),Je(wf(n),t)},Mr.replace=function(){var n=arguments,t=wf(n[0]);return n.length<3?t:t.replace(n[1],n[2])},Mr.result=function(n,t,r){var e=-1,i=(t=wu(t,n)).length;for(i||(i=1,n=u);++ev)return[];var r=g,e=wr(n,g);t=ci(t),n-=g;for(var u=Qt(e,t);++r=o)return n;var a=r-vr(e);if(a<1)return e;var c=f?xu(f,0,a).join(""):n.slice(0,a);if(i===u)return c+e;if(f&&(a+=c.length-a),ff(i)){if(n.slice(a).search(i)){var l,s=c;for(i.global||(i=zn(i.source,wf(gn.exec(i))+"g")),i.lastIndex=0;l=i.exec(s);)var h=l.index;c=c.slice(0,h===u?a:h)}}else if(n.indexOf(lu(i),a)!=a){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+e},Mr.unescape=function(n){return(n=wf(n))&&J.test(n)?n.replace(G,yr):n},Mr.uniqueId=function(n){var t=++$n;return wf(n)+t},Mr.upperCase=Yf,Mr.upperFirst=Qf,Mr.each=bo,Mr.eachRight=wo,Mr.first=Ki,ca(Mr,(ja={},me(Mr,(function(n,t){Bn.call(Mr.prototype,t)||(ja[t]=n)})),ja),{chain:!1}),Mr.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(n){Mr[n].placeholder=Mr})),Et(["drop","take"],(function(n,t){Zr.prototype[n]=function(r){r=r===u?1:br(gf(r),0);var e=this.__filtered__&&!t?new Zr(this):this.clone();return e.__filtered__?e.__takeCount__=wr(r,e.__takeCount__):e.__views__.push({size:wr(r,g),type:n+(e.__dir__<0?"Right":"")}),e},Zr.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),Et(["filter","map","takeWhile"],(function(n,t){var r=t+1,e=1==r||3==r;Zr.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ci(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}})),Et(["head","last"],(function(n,t){var r="take"+(t?"Right":"");Zr.prototype[n]=function(){return this[r](1).value()[0]}})),Et(["initial","tail"],(function(n,t){var r="drop"+(t?"":"Right");Zr.prototype[n]=function(){return this.__filtered__?new Zr(this):this[r](1)}})),Zr.prototype.compact=function(){return this.filter(ia)},Zr.prototype.find=function(n){return this.filter(n).head()},Zr.prototype.findLast=function(n){return this.reverse().find(n)},Zr.prototype.invokeMap=Ye((function(n,t){return"function"==typeof n?new Zr(this):this.map((function(r){return Se(r,n,t)}))})),Zr.prototype.reject=function(n){return this.filter(Uo(ci(n)))},Zr.prototype.slice=function(n,t){n=gf(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Zr(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==u&&(r=(t=gf(t))<0?r.dropRight(-t):r.take(t-n)),r)},Zr.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Zr.prototype.toArray=function(){return this.take(g)},me(Zr.prototype,(function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),i=Mr[e?"take"+("last"==t?"Right":""):t],o=e||/^find/.test(t);i&&(Mr.prototype[t]=function(){var t=this.__wrapped__,f=e?[1]:arguments,a=t instanceof Zr,c=f[0],l=a||Zo(t),s=function(n){var t=i.apply(Mr,Bt([n],f));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(a=l=!1);var h=this.__chain__,p=!!this.__actions__.length,v=o&&!h,_=a&&!p;if(!o&&l){t=_?t:new Zr(this);var g=n.apply(t,f);return g.__actions__.push({func:po,args:[s],thisArg:u}),new qr(g,h)}return v&&_?n.apply(this,f):(g=this.thru(s),v?e?g.value()[0]:g.value():g)})})),Et(["pop","push","shift","sort","splice","unshift"],(function(n){var t=Wn[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Mr.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Zo(u)?u:[],n)}return this[r]((function(r){return t.apply(Zo(r)?r:[],n)}))}})),me(Zr.prototype,(function(n,t){var r=Mr[t];if(r){var e=r.name+"";Bn.call(Wr,e)||(Wr[e]=[]),Wr[e].push({name:t,func:r})}})),Wr[Mu(u,2).name]=[{name:"wrapper",func:u}],Zr.prototype.clone=function(){var n=new Zr(this.__wrapped__);return n.__actions__=Eu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Eu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Eu(this.__views__),n},Zr.prototype.reverse=function(){if(this.__filtered__){var n=new Zr(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},Zr.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,r=Zo(n),e=t<0,u=r?n.length:0,i=function(n,t,r){var e=-1,u=r.length;for(;++e=this.__values__.length;return{done:n,value:n?u:this.__values__[this.__index__++]}},Mr.prototype.plant=function(n){for(var t,r=this;r instanceof Pr;){var e=Di(r);e.__index__=0,e.__values__=u,t?i.__wrapped__=e:t=e;var i=e;r=r.__wrapped__}return i.__wrapped__=n,t},Mr.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof Zr){var t=n;return this.__actions__.length&&(t=new Zr(this)),(t=t.reverse()).__actions__.push({func:po,args:[no],thisArg:u}),new qr(t,this.__chain__)}return this.thru(no)},Mr.prototype.toJSON=Mr.prototype.valueOf=Mr.prototype.value=function(){return _u(this.__wrapped__,this.__actions__)},Mr.prototype.first=Mr.prototype.head,Xn&&(Mr.prototype[Xn]=function(){return this}),Mr}();gt._=dr,(e=function(){return dr}.call(t,r,t,n))===u||(n.exports=e)}.call(this)},7803:(n,t,r)=>{n.exports=r(2543)}},t={};function r(e){var u=t[e];if(void 0!==u)return u.exports;var i=t[e]={id:e,loaded:!1,exports:{}};return n[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.nmd=n=>(n.paths=[],n.children||(n.children=[]),n),r(7803)})())); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/dist/lodashFp.js b/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/dist/lodashFp.js deleted file mode 100644 index 0fe5ac37..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/dist/lodashFp.js +++ /dev/null @@ -1,9 +0,0 @@ -!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.lodashFp=t():n.lodashFp=t()}(this,(()=>(()=>{var n={4480:(n,t,r)=>{var e=r(9761).runInContext();n.exports=r(3424)(e,e)},3424:(n,t,r)=>{var e=r(6962),u=r(2874),i=Array.prototype.push;function o(n,t){return 2==t?function(t,r){return n(t,r)}:function(t){return n(t)}}function a(n){for(var t=n?n.length:0,r=Array(t);t--;)r[t]=n[t];return r}function f(n,t){return function(){var r=arguments.length;if(r){for(var e=Array(r);r--;)e[r]=arguments[r];var u=e[0]=t.apply(void 0,e);return n.apply(void 0,e),u}}}n.exports=function n(t,r,c,l){var s="function"==typeof r,h=r===Object(r);if(h&&(l=c,c=r,r=void 0),null==c)throw new TypeError;l||(l={});var p=!("cap"in l)||l.cap,v=!("curry"in l)||l.curry,g=!("fixed"in l)||l.fixed,_=!("immutable"in l)||l.immutable,d=!("rearg"in l)||l.rearg,y=s?c:u,m="curry"in l&&l.curry,b="fixed"in l&&l.fixed,w="rearg"in l&&l.rearg,x=s?c.runInContext():void 0,A=s?c:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},I=A.ary,W=A.assign,j=A.clone,R=A.curry,k=A.forEach,O=A.isArray,E=A.isError,S=A.isFunction,z=A.isWeakMap,B=A.keys,L=A.rearg,C=A.toInteger,F=A.toPath,T=B(e.aryMethod),D={castArray:function(n){return function(){var t=arguments[0];return O(t)?n(a(t)):n.apply(void 0,arguments)}},iteratee:function(n){return function(){var t=arguments[1],r=n(arguments[0],t),e=r.length;return p&&"number"==typeof t?(t=t>2?t-2:1,e&&e<=t?r:o(r,t)):r}},mixin:function(n){return function(t){var r=this;if(!S(r))return n(r,Object(t));var e=[];return k(B(t),(function(n){S(t[n])&&e.push([n,r.prototype[n]])})),n(r,Object(t)),k(e,(function(n){var t=n[1];S(t)?r.prototype[n[0]]=t:delete r.prototype[n[0]]})),r}},nthArg:function(n){return function(t){var r=t<0?1:C(t)+1;return R(n(t),r)}},rearg:function(n){return function(t,r){var e=r?r.length:0;return R(n(t,r),e)}},runInContext:function(r){return function(e){return n(t,r(e),l)}}};function M(n,t){if(p){var r=e.iterateeRearg[n];if(r)return function(n,t){return N(n,(function(n){var r=t.length;return function(n,t){return 2==t?function(t,r){return n.apply(void 0,arguments)}:function(t){return n.apply(void 0,arguments)}}(L(o(n,r),t),r)}))}(t,r);var u=!s&&e.iterateeAry[n];if(u)return function(n,t){return N(n,(function(n){return"function"==typeof n?o(n,t):n}))}(t,u)}return t}function U(n,t,r){if(g&&(b||!e.skipFixed[n])){var u=e.methodSpread[n],o=u&&u.start;return void 0===o?I(t,r):function(n,t){return function(){for(var r=arguments.length,e=r-1,u=Array(r);r--;)u[r]=arguments[r];var o=u[t],a=u.slice(0,t);return o&&i.apply(a,o),t!=e&&i.apply(a,u.slice(t+1)),n.apply(this,a)}}(t,o)}return t}function P(n,t,r){return d&&r>1&&(w||!e.skipRearg[n])?L(t,e.methodRearg[n]||e.aryRearg[r]):t}function q(n,t){for(var r=-1,e=(t=F(t)).length,u=e-1,i=j(Object(n)),o=i;null!=o&&++r1?R(t,r):t}(0,u=M(i,u),n),!1}})),!u})),u||(u=o),u==t&&(u=m?R(u,1):function(){return t.apply(this,arguments)}),u.convert=$(i,t),u.placeholder=t.placeholder=r,u}if(!h)return K(r,c,y);var Z=c,V=[];return k(T,(function(n){k(e.aryMethod[n],(function(n){var t=Z[e.remap[n]||n];t&&V.push([n,K(n,t,Z)])}))})),k(B(Z),(function(n){var t=Z[n];if("function"==typeof t){for(var r=V.length;r--;)if(V[r][0]==n)return;t.convert=$(n,t),V.push([n,t])}})),k(V,(function(n){Z[n[0]]=n[1]})),Z.convert=function(n){return Z.runInContext.convert(n)(void 0)},Z.placeholder=Z,k(B(Z),(function(n){k(e.realToAlias[n]||[],(function(t){Z[t]=Z[n]}))})),Z}},6962:(n,t)=>{t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=function(){var n=Object.prototype.hasOwnProperty,r=t.aliasToReal,e={};for(var u in r){var i=r[u];n.call(e,i)?e[i].push(u):e[i]=[u]}return e}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},2874:n=>{n.exports={}},9761:function(n,t,r){var e; -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */n=r.nmd(n),function(){function u(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function i(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u-1}function s(n,t,r){for(var e=-1,u=null==n?0:n.length;++e-1;);return r}function L(n,t){for(var r=n.length;r--&&b(t,n[r],0)>-1;);return r}function C(n){return"\\"+tr[n]}function F(n){return Ht.test(n)}function T(n){return Jt.test(n)}function D(n){var t=-1,r=Array(n.size);return n.forEach((function(n,e){r[++t]=[e,n]})),r}function M(n,t){return function(r){return n(t(r))}}function U(n,t){for(var r=-1,e=n.length,u=0,i=[];++r>>1,fn=[["ary",X],["bind",1],["bindKey",2],["curry",8],["curryRight",J],["flip",512],["partial",Y],["partialRight",Q],["rearg",nn]],cn="[object Arguments]",ln="[object Array]",sn="[object Boolean]",hn="[object Date]",pn="[object Error]",vn="[object Function]",gn="[object GeneratorFunction]",_n="[object Map]",dn="[object Number]",yn="[object Object]",mn="[object Promise]",bn="[object RegExp]",wn="[object Set]",xn="[object String]",An="[object Symbol]",In="[object WeakMap]",Wn="[object ArrayBuffer]",jn="[object DataView]",Rn="[object Float32Array]",kn="[object Float64Array]",On="[object Int8Array]",En="[object Int16Array]",Sn="[object Int32Array]",zn="[object Uint8Array]",Bn="[object Uint8ClampedArray]",Ln="[object Uint16Array]",Cn="[object Uint32Array]",Fn=/\b__p \+= '';/g,Tn=/\b(__p \+=) '' \+/g,Dn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mn=/&(?:amp|lt|gt|quot|#39);/g,Un=/[&<>"']/g,Pn=RegExp(Mn.source),qn=RegExp(Un.source),$n=/<%-([\s\S]+?)%>/g,Nn=/<%([\s\S]+?)%>/g,Kn=/<%=([\s\S]+?)%>/g,Zn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vn=/^\w*$/,Gn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hn=/[\\^$.*+?()[\]{}|]/g,Jn=RegExp(Hn.source),Yn=/^\s+/,Qn=/\s/,Xn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,nt=/\{\n\/\* \[wrapped with (.+)\] \*/,tt=/,? & /,rt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,et=/[()=,{}\[\]\/\s]/,ut=/\\(\\)?/g,it=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ot=/\w*$/,at=/^[-+]0x[0-9a-f]+$/i,ft=/^0b[01]+$/i,ct=/^\[object .+?Constructor\]$/,lt=/^0o[0-7]+$/i,st=/^(?:0|[1-9]\d*)$/,ht=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,pt=/($^)/,vt=/['\n\r\u2028\u2029\\]/g,gt="\\ud800-\\udfff",_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",dt="\\u2700-\\u27bf",yt="a-z\\xdf-\\xf6\\xf8-\\xff",mt="A-Z\\xc0-\\xd6\\xd8-\\xde",bt="\\ufe0e\\ufe0f",wt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xt="['’]",At="["+gt+"]",It="["+wt+"]",Wt="["+_t+"]",jt="\\d+",Rt="["+dt+"]",kt="["+yt+"]",Ot="[^"+gt+wt+jt+dt+yt+mt+"]",Et="\\ud83c[\\udffb-\\udfff]",St="[^"+gt+"]",zt="(?:\\ud83c[\\udde6-\\uddff]){2}",Bt="[\\ud800-\\udbff][\\udc00-\\udfff]",Lt="["+mt+"]",Ct="\\u200d",Ft="(?:"+kt+"|"+Ot+")",Tt="(?:"+Lt+"|"+Ot+")",Dt="(?:['’](?:d|ll|m|re|s|t|ve))?",Mt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Wt+"|"+Et+")"+"?",Pt="["+bt+"]?",qt=Pt+Ut+("(?:"+Ct+"(?:"+[St,zt,Bt].join("|")+")"+Pt+Ut+")*"),$t="(?:"+[Rt,zt,Bt].join("|")+")"+qt,Nt="(?:"+[St+Wt+"?",Wt,zt,Bt,At].join("|")+")",Kt=RegExp(xt,"g"),Zt=RegExp(Wt,"g"),Vt=RegExp(Et+"(?="+Et+")|"+Nt+qt,"g"),Gt=RegExp([Lt+"?"+kt+"+"+Dt+"(?="+[It,Lt,"$"].join("|")+")",Tt+"+"+Mt+"(?="+[It,Lt+Ft,"$"].join("|")+")",Lt+"?"+Ft+"+"+Dt,Lt+"+"+Mt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jt,$t].join("|"),"g"),Ht=RegExp("["+Ct+gt+_t+bt+"]"),Jt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Qt=-1,Xt={};Xt[Rn]=Xt[kn]=Xt[On]=Xt[En]=Xt[Sn]=Xt[zn]=Xt[Bn]=Xt[Ln]=Xt[Cn]=!0,Xt[cn]=Xt[ln]=Xt[Wn]=Xt[sn]=Xt[jn]=Xt[hn]=Xt[pn]=Xt[vn]=Xt[_n]=Xt[dn]=Xt[yn]=Xt[bn]=Xt[wn]=Xt[xn]=Xt[In]=!1;var nr={};nr[cn]=nr[ln]=nr[Wn]=nr[jn]=nr[sn]=nr[hn]=nr[Rn]=nr[kn]=nr[On]=nr[En]=nr[Sn]=nr[_n]=nr[dn]=nr[yn]=nr[bn]=nr[wn]=nr[xn]=nr[An]=nr[zn]=nr[Bn]=nr[Ln]=nr[Cn]=!0,nr[pn]=nr[vn]=nr[In]=!1;var tr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rr=parseFloat,er=parseInt,ur="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ir="object"==typeof self&&self&&self.Object===Object&&self,or=ur||ir||Function("return this")(),ar=t&&!t.nodeType&&t,fr=ar&&n&&!n.nodeType&&n,cr=fr&&fr.exports===ar,lr=cr&&ur.process,sr=function(){try{var n=fr&&fr.require&&fr.require("util").types;return n||lr&&lr.binding&&lr.binding("util")}catch(n){}}(),hr=sr&&sr.isArrayBuffer,pr=sr&&sr.isDate,vr=sr&&sr.isMap,gr=sr&&sr.isRegExp,_r=sr&&sr.isSet,dr=sr&&sr.isTypedArray,yr=I("length"),mr=W({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),br=W({"&":"&","<":"<",">":">",'"':""","'":"'"}),wr=W({"&":"&","<":"<",">":">",""":'"',"'":"'"}),xr=function n(t){function r(n){if(Uu(n)&&!Ea(n)&&!(n instanceof Qn)){if(n instanceof W)return n;if(Oi.call(n,"__wrapped__"))return hu(n)}return new W(n)}function e(){}function W(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=Z}function Qn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=un,this.__views__=[]}function rt(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function St(n,t,r,e,u,i){var a,f=1&t,c=2&t,l=4&t;if(r&&(a=u?r(n,e,u,i):r(n)),a!==Z)return a;if(!Mu(n))return n;var s=Ea(n);if(s){if(a=function(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Oi.call(n,"index")&&(r.index=n.index,r.input=n.input),r}(n),!f)return le(n,a)}else{var h=Uo(n),p=h==vn||h==gn;if(za(n))return ue(n,f);if(h==yn||h==cn||p&&!u){if(a=c||p?{}:Ge(n),!f)return c?function(n,t){return se(n,Mo(n),t)}(n,function(n,t){return n&&se(t,ti(t),n)}(a,n)):function(n,t){return se(n,Do(n),t)}(n,Rt(a,n))}else{if(!nr[h])return u?n:{};a=function(n,t,r){var e=n.constructor;switch(t){case Wn:return ie(n);case sn:case hn:return new e(+n);case jn:return function(n,t){return new n.constructor(t?ie(n.buffer):n.buffer,n.byteOffset,n.byteLength)}(n,r);case Rn:case kn:case On:case En:case Sn:case zn:case Bn:case Ln:case Cn:return oe(n,r);case _n:return new e;case dn:case xn:return new e(n);case bn:return function(n){var t=new n.constructor(n.source,ot.exec(n));return t.lastIndex=n.lastIndex,t}(n);case wn:return new e;case An:return function(n){return Wo?bi(Wo.call(n)):{}}(n)}}(n,h,f)}}i||(i=new yt);var v=i.get(n);if(v)return v;i.set(n,a),Fa(n)?n.forEach((function(e){a.add(St(e,t,r,e,n,i))})):La(n)&&n.forEach((function(e,u){a.set(u,St(e,t,r,u,n,i))}));var g=s?Z:(l?c?Ue:Me:c?ti:ni)(n);return o(g||n,(function(e,u){g&&(e=n[u=e]),It(a,u,St(e,t,r,u,n,i))})),a}function zt(n,t,r){var e=r.length;if(null==n)return!e;for(n=bi(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===Z&&!(u in n)||!i(o))return!1}return!0}function Bt(n,t,r){if("function"!=typeof n)throw new Ai(V);return $o((function(){n.apply(Z,r)}),t)}function Lt(n,t,r,e){var u=-1,i=l,o=!0,a=n.length,f=[],c=t.length;if(!a)return f;r&&(t=h(t,E(r))),e?(i=s,o=!1):t.length>=200&&(i=z,o=!1,t=new dt(t));n:for(;++u0&&r(a)?t>1?Dt(a,t-1,r,e,u):p(u,a):e||(u[u.length]=a)}return u}function Mt(n,t){return n&&Eo(n,t,ni)}function Ut(n,t){return n&&So(n,t,ni)}function Pt(n,t){return c(t,(function(t){return Fu(n[t])}))}function qt(n,t){for(var r=0,e=(t=re(t,n)).length;null!=n&&rt}function Gt(n,t){return null!=n&&Oi.call(n,t)}function Ht(n,t){return null!=n&&t in bi(n)}function Jt(n,t,r){for(var e=r?s:l,u=n[0].length,i=n.length,o=i,a=gi(i),f=1/0,c=[];o--;){var p=n[o];o&&t&&(p=h(p,E(t))),f=io(p.length,f),a[o]=!r&&(t||u>=120&&p.length>=120)?new dt(o&&p):Z}p=n[0];var v=-1,g=a[0];n:for(;++v=a?f:f*("desc"==r[e]?-1:1)}return n.index-t.index}(n,t,r)}))}function Er(n,t,r){for(var e=-1,u=t.length,i={};++e-1;)a!==n&&$i.call(a,f,1),$i.call(n,f,1);return n}function zr(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;Je(u)?$i.call(n,u,1):Gr(n,u)}}return n}function Br(n,t){return n+Qi(fo()*(t-n+1))}function Lr(n,t){var r="";if(!n||t<1||t>rn)return r;do{t%2&&(r+=n),(t=Qi(t/2))&&(n+=n)}while(t);return r}function Cr(n,t){return No(eu(n,t,fi),n+"")}function Fr(n){return bt(ei(n))}function Tr(n,t){var r=ei(n);return fu(r,Et(t,0,r.length))}function Dr(n,t,r,e){if(!Mu(n))return n;for(var u=-1,i=(t=re(t,n)).length,o=i-1,a=n;null!=a&&++uu?0:u+t),(r=r>u?u:r)<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=gi(u);++e>>1,o=n[i];null!==o&&!Nu(o)&&(r?o<=t:o=200){var c=t?null:Fo(n);if(c)return P(c);o=!1,u=z,f=new dt}else f=t?[]:a;n:for(;++e=e?n:Ur(n,t,r)}function ue(n,t){if(t)return n.slice();var r=n.length,e=Mi?Mi(r):new n.constructor(r);return n.copy(e),e}function ie(n){var t=new n.constructor(n.byteLength);return new Di(t).set(new Di(n)),t}function oe(n,t){return new n.constructor(t?ie(n.buffer):n.buffer,n.byteOffset,n.length)}function ae(n,t){if(n!==t){var r=n!==Z,e=null===n,u=n==n,i=Nu(n),o=t!==Z,a=null===t,f=t==t,c=Nu(t);if(!a&&!c&&!i&&n>t||i&&o&&f&&!a&&!c||e&&o&&f||!r&&f||!u)return 1;if(!e&&!i&&!c&&n1?r[u-1]:Z,o=u>2?r[2]:Z;for(i=n.length>3&&"function"==typeof i?(u--,i):Z,o&&Ye(r[0],r[1],o)&&(i=u<3?Z:i,u=1),t=bi(t);++e-1?u[i?t[o]:o]:Z}}function we(n){return De((function(t){var r=t.length,e=r,u=W.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new Ai(V);if(u&&!o&&"wrapper"==Pe(i))var o=new W([],!0)}for(e=o?e:r;++e1&&y.reverse(),l&&fa))return!1;var c=i.get(n),l=i.get(t);if(c&&l)return c==t&&l==n;var s=-1,h=!0,p=2&r?new dt:Z;for(i.set(n,t),i.set(t,n);++s-1&&n%1==0&&n1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Xn,"{\n/* [wrapped with "+t+"] */\n")}(e,su(function(n){var t=n.match(nt);return t?t[1].split(tt):[]}(e),r)))}function au(n){var t=0,r=0;return function(){var e=oo(),u=16-(e-r);if(r=e,u>0){if(++t>=800)return arguments[0]}else t=0;return n.apply(Z,arguments)}}function fu(n,t){var r=-1,e=n.length,u=e-1;for(t=t===Z?e:t;++r0&&(r=t.apply(this,arguments)),n<=1&&(t=Z),r}}function Ou(n,t,r){function e(t){var r=f,e=c;return f=c=Z,v=t,s=n.apply(e,r)}function u(n){var r=n-p;return p===Z||r>=t||r<0||_&&n-v>=l}function i(){var n=ya();return u(n)?o(n):(h=$o(i,function(n){var r=t-(n-p);return _?io(r,l-(n-v)):r}(n)),Z)}function o(n){return h=Z,d&&f?e(n):(f=c=Z,s)}function a(){var n=ya(),r=u(n);if(f=arguments,c=this,p=n,r){if(h===Z)return function(n){return v=n,h=$o(i,t),g?e(n):s}(p);if(_)return Co(h),h=$o(i,t),e(p)}return h===Z&&(h=$o(i,t)),s}var f,c,l,s,h,p,v=0,g=!1,_=!1,d=!0;if("function"!=typeof n)throw new Ai(V);return t=Hu(t)||0,Mu(r)&&(g=!!r.leading,l=(_="maxWait"in r)?uo(Hu(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),a.cancel=function(){h!==Z&&Co(h),v=0,f=p=c=h=Z},a.flush=function(){return h===Z?s:o(ya())},a}function Eu(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new Ai(V);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Eu.Cache||_t),r}function Su(n){if("function"!=typeof n)throw new Ai(V);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function zu(n,t){return n===t||n!=n&&t!=t}function Bu(n){return null!=n&&Du(n.length)&&!Fu(n)}function Lu(n){return Uu(n)&&Bu(n)}function Cu(n){if(!Uu(n))return!1;var t=Nt(n);return t==pn||"[object DOMException]"==t||"string"==typeof n.message&&"string"==typeof n.name&&!qu(n)}function Fu(n){if(!Mu(n))return!1;var t=Nt(n);return t==vn||t==gn||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Tu(n){return"number"==typeof n&&n==Vu(n)}function Du(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=rn}function Mu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function Uu(n){return null!=n&&"object"==typeof n}function Pu(n){return"number"==typeof n||Uu(n)&&Nt(n)==dn}function qu(n){if(!Uu(n)||Nt(n)!=yn)return!1;var t=Ui(n);if(null===t)return!0;var r=Oi.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ki.call(r)==Bi}function $u(n){return"string"==typeof n||!Ea(n)&&Uu(n)&&Nt(n)==xn}function Nu(n){return"symbol"==typeof n||Uu(n)&&Nt(n)==An}function Ku(n){if(!n)return[];if(Bu(n))return $u(n)?$(n):le(n);if(Ki&&n[Ki])return function(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}(n[Ki]());var t=Uo(n);return(t==_n?D:t==wn?P:ei)(n)}function Zu(n){return n?(n=Hu(n))===tn||n===-tn?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}function Vu(n){var t=Zu(n),r=t%1;return t==t?r?t-r:t:0}function Gu(n){return n?Et(Vu(n),0,un):0}function Hu(n){if("number"==typeof n)return n;if(Nu(n))return en;if(Mu(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=Mu(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=O(n);var r=ft.test(n);return r||lt.test(n)?er(n.slice(2),r?2:8):at.test(n)?en:+n}function Ju(n){return se(n,ti(n))}function Yu(n){return null==n?"":Zr(n)}function Qu(n,t,r){var e=null==n?Z:qt(n,t);return e===Z?r:e}function Xu(n,t){return null!=n&&Ve(n,t,Ht)}function ni(n){return Bu(n)?mt(n):sr(n)}function ti(n){return Bu(n)?mt(n,!0):yr(n)}function ri(n,t){if(null==n)return{};var r=h(Ue(n),(function(n){return[n]}));return t=$e(t),Er(n,r,(function(n,r){return t(n,r[0])}))}function ei(n){return null==n?[]:S(n,ni(n))}function ui(n){return lf(Yu(n).toLowerCase())}function ii(n){return(n=Yu(n))&&n.replace(ht,mr).replace(Zt,"")}function oi(n,t,r){return n=Yu(n),(t=r?Z:t)===Z?T(n)?K(n):d(n):n.match(t)||[]}function ai(n){return function(){return n}}function fi(n){return n}function ci(n){return lr("function"==typeof n?n:St(n,1))}function li(n,t,r){var e=ni(t),u=Pt(t,e);null!=r||Mu(t)&&(u.length||!e.length)||(r=t,t=n,n=this,u=Pt(t,ni(t)));var i=!(Mu(r)&&"chain"in r&&!r.chain),a=Fu(n);return o(u,(function(r){var e=t[r];n[r]=e,a&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=le(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,p([this.value()],arguments))})})),n}function si(){}function hi(n){return Qe(n)?I(cu(n)):function(n){return function(t){return qt(t,n)}}(n)}function pi(){return[]}function vi(){return!1}var gi=(t=null==t?or:xr.defaults(or.Object(),t,xr.pick(or,Yt))).Array,_i=t.Date,di=t.Error,yi=t.Function,mi=t.Math,bi=t.Object,wi=t.RegExp,xi=t.String,Ai=t.TypeError,Ii=gi.prototype,Wi=yi.prototype,ji=bi.prototype,Ri=t["__core-js_shared__"],ki=Wi.toString,Oi=ji.hasOwnProperty,Ei=0,Si=function(){var n=/[^.]+$/.exec(Ri&&Ri.keys&&Ri.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),zi=ji.toString,Bi=ki.call(bi),Li=or._,Ci=wi("^"+ki.call(Oi).replace(Hn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fi=cr?t.Buffer:Z,Ti=t.Symbol,Di=t.Uint8Array,Mi=Fi?Fi.allocUnsafe:Z,Ui=M(bi.getPrototypeOf,bi),Pi=bi.create,qi=ji.propertyIsEnumerable,$i=Ii.splice,Ni=Ti?Ti.isConcatSpreadable:Z,Ki=Ti?Ti.iterator:Z,Zi=Ti?Ti.toStringTag:Z,Vi=function(){try{var n=Ze(bi,"defineProperty");return n({},"",{}),n}catch(n){}}(),Gi=t.clearTimeout!==or.clearTimeout&&t.clearTimeout,Hi=_i&&_i.now!==or.Date.now&&_i.now,Ji=t.setTimeout!==or.setTimeout&&t.setTimeout,Yi=mi.ceil,Qi=mi.floor,Xi=bi.getOwnPropertySymbols,no=Fi?Fi.isBuffer:Z,to=t.isFinite,ro=Ii.join,eo=M(bi.keys,bi),uo=mi.max,io=mi.min,oo=_i.now,ao=t.parseInt,fo=mi.random,co=Ii.reverse,lo=Ze(t,"DataView"),so=Ze(t,"Map"),ho=Ze(t,"Promise"),po=Ze(t,"Set"),vo=Ze(t,"WeakMap"),go=Ze(bi,"create"),_o=vo&&new vo,yo={},mo=lu(lo),bo=lu(so),wo=lu(ho),xo=lu(po),Ao=lu(vo),Io=Ti?Ti.prototype:Z,Wo=Io?Io.valueOf:Z,jo=Io?Io.toString:Z,Ro=function(){function n(){}return function(t){if(!Mu(t))return{};if(Pi)return Pi(t);n.prototype=t;var r=new n;return n.prototype=Z,r}}();r.templateSettings={escape:$n,evaluate:Nn,interpolate:Kn,variable:"",imports:{_:r}},r.prototype=e.prototype,r.prototype.constructor=r,W.prototype=Ro(e.prototype),W.prototype.constructor=W,Qn.prototype=Ro(e.prototype),Qn.prototype.constructor=Qn,rt.prototype.clear=function(){this.__data__=go?go(null):{},this.size=0},rt.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},rt.prototype.get=function(n){var t=this.__data__;if(go){var r=t[n];return r===G?Z:r}return Oi.call(t,n)?t[n]:Z},rt.prototype.has=function(n){var t=this.__data__;return go?t[n]!==Z:Oi.call(t,n)},rt.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=go&&t===Z?G:t,this},gt.prototype.clear=function(){this.__data__=[],this.size=0},gt.prototype.delete=function(n){var t=this.__data__,r=Wt(t,n);return!(r<0||(r==t.length-1?t.pop():$i.call(t,r,1),--this.size,0))},gt.prototype.get=function(n){var t=this.__data__,r=Wt(t,n);return r<0?Z:t[r][1]},gt.prototype.has=function(n){return Wt(this.__data__,n)>-1},gt.prototype.set=function(n,t){var r=this.__data__,e=Wt(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this},_t.prototype.clear=function(){this.size=0,this.__data__={hash:new rt,map:new(so||gt),string:new rt}},_t.prototype.delete=function(n){var t=Ne(this,n).delete(n);return this.size-=t?1:0,t},_t.prototype.get=function(n){return Ne(this,n).get(n)},_t.prototype.has=function(n){return Ne(this,n).has(n)},_t.prototype.set=function(n,t){var r=Ne(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},dt.prototype.add=dt.prototype.push=function(n){return this.__data__.set(n,G),this},dt.prototype.has=function(n){return this.__data__.has(n)},yt.prototype.clear=function(){this.__data__=new gt,this.size=0},yt.prototype.delete=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},yt.prototype.get=function(n){return this.__data__.get(n)},yt.prototype.has=function(n){return this.__data__.has(n)},yt.prototype.set=function(n,t){var r=this.__data__;if(r instanceof gt){var e=r.__data__;if(!so||e.length<199)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new _t(e)}return r.set(n,t),this.size=r.size,this};var ko=ve(Mt),Oo=ve(Ut,!0),Eo=ge(),So=ge(!0),zo=_o?function(n,t){return _o.set(n,t),n}:fi,Bo=Vi?function(n,t){return Vi(n,"toString",{configurable:!0,enumerable:!1,value:ai(t),writable:!0})}:fi,Lo=Cr,Co=Gi||function(n){return or.clearTimeout(n)},Fo=po&&1/P(new po([,-0]))[1]==tn?function(n){return new po(n)}:si,To=_o?function(n){return _o.get(n)}:si,Do=Xi?function(n){return null==n?[]:(n=bi(n),c(Xi(n),(function(t){return qi.call(n,t)})))}:pi,Mo=Xi?function(n){for(var t=[];n;)p(t,Do(n)),n=Ui(n);return t}:pi,Uo=Nt;(lo&&Uo(new lo(new ArrayBuffer(1)))!=jn||so&&Uo(new so)!=_n||ho&&Uo(ho.resolve())!=mn||po&&Uo(new po)!=wn||vo&&Uo(new vo)!=In)&&(Uo=function(n){var t=Nt(n),r=t==yn?n.constructor:Z,e=r?lu(r):"";if(e)switch(e){case mo:return jn;case bo:return _n;case wo:return mn;case xo:return wn;case Ao:return In}return t});var Po=Ri?Fu:vi,qo=au(zo),$o=Ji||function(n,t){return or.setTimeout(n,t)},No=au(Bo),Ko=function(n){var t=Eu(n,(function(n){return 500===r.size&&r.clear(),n})),r=t.cache;return t}((function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(Gn,(function(n,r,e,u){t.push(e?u.replace(ut,"$1"):r||n)})),t})),Zo=Cr((function(n,t){return Lu(n)?Lt(n,Dt(t,1,Lu,!0)):[]})),Vo=Cr((function(n,t){var r=du(t);return Lu(r)&&(r=Z),Lu(n)?Lt(n,Dt(t,1,Lu,!0),$e(r,2)):[]})),Go=Cr((function(n,t){var r=du(t);return Lu(r)&&(r=Z),Lu(n)?Lt(n,Dt(t,1,Lu,!0),Z,r):[]})),Ho=Cr((function(n){var t=h(n,ne);return t.length&&t[0]===n[0]?Jt(t):[]})),Jo=Cr((function(n){var t=du(n),r=h(n,ne);return t===du(r)?t=Z:r.pop(),r.length&&r[0]===n[0]?Jt(r,$e(t,2)):[]})),Yo=Cr((function(n){var t=du(n),r=h(n,ne);return(t="function"==typeof t?t:Z)&&r.pop(),r.length&&r[0]===n[0]?Jt(r,Z,t):[]})),Qo=Cr(yu),Xo=De((function(n,t){var r=null==n?0:n.length,e=Ot(n,t);return zr(n,h(t,(function(n){return Je(n,r)?+n:n})).sort(ae)),e})),na=Cr((function(n){return Vr(Dt(n,1,Lu,!0))})),ta=Cr((function(n){var t=du(n);return Lu(t)&&(t=Z),Vr(Dt(n,1,Lu,!0),$e(t,2))})),ra=Cr((function(n){var t=du(n);return t="function"==typeof t?t:Z,Vr(Dt(n,1,Lu,!0),Z,t)})),ea=Cr((function(n,t){return Lu(n)?Lt(n,t):[]})),ua=Cr((function(n){return Qr(c(n,Lu))})),ia=Cr((function(n){var t=du(n);return Lu(t)&&(t=Z),Qr(c(n,Lu),$e(t,2))})),oa=Cr((function(n){var t=du(n);return t="function"==typeof t?t:Z,Qr(c(n,Lu),Z,t)})),aa=Cr(bu),fa=Cr((function(n){var t=n.length,r=t>1?n[t-1]:Z;return r="function"==typeof r?(n.pop(),r):Z,wu(n,r)})),ca=De((function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Ot(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Qn&&Je(r)?((e=e.slice(r,+r+(t?1:0))).__actions__.push({func:Au,args:[u],thisArg:Z}),new W(e,this.__chain__).thru((function(n){return t&&!n.length&&n.push(Z),n}))):this.thru(u)})),la=he((function(n,t,r){Oi.call(n,r)?++n[r]:kt(n,r,1)})),sa=be(pu),ha=be(vu),pa=he((function(n,t,r){Oi.call(n,r)?n[r].push(t):kt(n,r,[t])})),va=Cr((function(n,t,r){var e=-1,i="function"==typeof t,o=Bu(n)?gi(n.length):[];return ko(n,(function(n){o[++e]=i?u(t,n,r):tr(n,t,r)})),o})),ga=he((function(n,t,r){kt(n,r,t)})),_a=he((function(n,t,r){n[r?0:1].push(t)}),(function(){return[[],[]]})),da=Cr((function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ye(n,t[0],t[1])?t=[]:r>2&&Ye(t[0],t[1],t[2])&&(t=[t[0]]),Or(n,Dt(t,1),[])})),ya=Hi||function(){return or.Date.now()},ma=Cr((function(n,t,r){var e=1;if(r.length){var u=U(r,qe(ma));e|=Y}return Be(n,e,t,r,u)})),ba=Cr((function(n,t,r){var e=3;if(r.length){var u=U(r,qe(ba));e|=Y}return Be(t,e,n,r,u)})),wa=Cr((function(n,t){return Bt(n,1,t)})),xa=Cr((function(n,t,r){return Bt(n,Hu(t)||0,r)}));Eu.Cache=_t;var Aa=Lo((function(n,t){var r=(t=1==t.length&&Ea(t[0])?h(t[0],E($e())):h(Dt(t,1),E($e()))).length;return Cr((function(e){for(var i=-1,o=io(e.length,r);++i=t})),Oa=ur(function(){return arguments}())?ur:function(n){return Uu(n)&&Oi.call(n,"callee")&&!qi.call(n,"callee")},Ea=gi.isArray,Sa=hr?E(hr):function(n){return Uu(n)&&Nt(n)==Wn},za=no||vi,Ba=pr?E(pr):function(n){return Uu(n)&&Nt(n)==hn},La=vr?E(vr):function(n){return Uu(n)&&Uo(n)==_n},Ca=gr?E(gr):function(n){return Uu(n)&&Nt(n)==bn},Fa=_r?E(_r):function(n){return Uu(n)&&Uo(n)==wn},Ta=dr?E(dr):function(n){return Uu(n)&&Du(n.length)&&!!Xt[Nt(n)]},Da=Oe(Ar),Ma=Oe((function(n,t){return n<=t})),Ua=pe((function(n,t){if(nu(t)||Bu(t))return se(t,ni(t),n),Z;for(var r in t)Oi.call(t,r)&&It(n,r,t[r])})),Pa=pe((function(n,t){se(t,ti(t),n)})),qa=pe((function(n,t,r,e){se(t,ti(t),n,e)})),$a=pe((function(n,t,r,e){se(t,ni(t),n,e)})),Na=De(Ot),Ka=Cr((function(n,t){n=bi(n);var r=-1,e=t.length,u=e>2?t[2]:Z;for(u&&Ye(t[0],t[1],u)&&(e=1);++r1),t})),se(n,Ue(n),r),e&&(r=St(r,7,Fe));for(var u=t.length;u--;)Gr(r,t[u]);return r})),Xa=De((function(n,t){return null==n?{}:function(n,t){return Er(n,t,(function(t,r){return Xu(n,r)}))}(n,t)})),nf=ze(ni),tf=ze(ti),rf=de((function(n,t,r){return t=t.toLowerCase(),n+(r?ui(t):t)})),ef=de((function(n,t,r){return n+(r?"-":"")+t.toLowerCase()})),uf=de((function(n,t,r){return n+(r?" ":"")+t.toLowerCase()})),of=_e("toLowerCase"),af=de((function(n,t,r){return n+(r?"_":"")+t.toLowerCase()})),ff=de((function(n,t,r){return n+(r?" ":"")+lf(t)})),cf=de((function(n,t,r){return n+(r?" ":"")+t.toUpperCase()})),lf=_e("toUpperCase"),sf=Cr((function(n,t){try{return u(n,Z,t)}catch(n){return Cu(n)?n:new di(n)}})),hf=De((function(n,t){return o(t,(function(t){t=cu(t),kt(n,t,ma(n[t],n))})),n})),pf=we(),vf=we(!0),gf=Cr((function(n,t){return function(r){return tr(r,n,t)}})),_f=Cr((function(n,t){return function(r){return tr(n,r,t)}})),df=We(h),yf=We(f),mf=We(_),bf=ke(),wf=ke(!0),xf=Ie((function(n,t){return n+t}),0),Af=Se("ceil"),If=Ie((function(n,t){return n/t}),1),Wf=Se("floor"),jf=Ie((function(n,t){return n*t}),1),Rf=Se("round"),kf=Ie((function(n,t){return n-t}),0);return r.after=function(n,t){if("function"!=typeof t)throw new Ai(V);return n=Vu(n),function(){if(--n<1)return t.apply(this,arguments)}},r.ary=Ru,r.assign=Ua,r.assignIn=Pa,r.assignInWith=qa,r.assignWith=$a,r.at=Na,r.before=ku,r.bind=ma,r.bindAll=hf,r.bindKey=ba,r.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return Ea(n)?n:[n]},r.chain=xu,r.chunk=function(n,t,r){t=(r?Ye(n,t,r):t===Z)?1:uo(Vu(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=gi(Yi(e/t));uu?0:u+r),(e=e===Z||e>u?u:Vu(e))<0&&(e+=u),e=r>e?0:Gu(e);r>>0)?(n=Yu(n))&&("string"==typeof t||null!=t&&!Ca(t))&&(!(t=Zr(t))&&F(n))?ee($(n),0,r):n.split(t,r):[]},r.spread=function(n,t){if("function"!=typeof n)throw new Ai(V);return t=null==t?0:uo(Vu(t),0),Cr((function(r){var e=r[t],i=ee(r,0,t);return e&&p(i,e),u(n,this,i)}))},r.tail=function(n){var t=null==n?0:n.length;return t?Ur(n,1,t):[]},r.take=function(n,t,r){return n&&n.length?Ur(n,0,(t=r||t===Z?1:Vu(t))<0?0:t):[]},r.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?Ur(n,(t=e-(t=r||t===Z?1:Vu(t)))<0?0:t,e):[]},r.takeRightWhile=function(n,t){return n&&n.length?Jr(n,$e(t,3),!1,!0):[]},r.takeWhile=function(n,t){return n&&n.length?Jr(n,$e(t,3)):[]},r.tap=function(n,t){return t(n),n},r.throttle=function(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new Ai(V);return Mu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Ou(n,t,{leading:e,maxWait:t,trailing:u})},r.thru=Au,r.toArray=Ku,r.toPairs=nf,r.toPairsIn=tf,r.toPath=function(n){return Ea(n)?h(n,cu):Nu(n)?[n]:le(Ko(Yu(n)))},r.toPlainObject=Ju,r.transform=function(n,t,r){var e=Ea(n),u=e||za(n)||Ta(n);if(t=$e(t,4),null==r){var i=n&&n.constructor;r=u?e?new i:[]:Mu(n)&&Fu(i)?Ro(Ui(n)):{}}return(u?o:Mt)(n,(function(n,e,u){return t(r,n,e,u)})),r},r.unary=function(n){return Ru(n,1)},r.union=na,r.unionBy=ta,r.unionWith=ra,r.uniq=function(n){return n&&n.length?Vr(n):[]},r.uniqBy=function(n,t){return n&&n.length?Vr(n,$e(t,2)):[]},r.uniqWith=function(n,t){return t="function"==typeof t?t:Z,n&&n.length?Vr(n,Z,t):[]},r.unset=function(n,t){return null==n||Gr(n,t)},r.unzip=bu,r.unzipWith=wu,r.update=function(n,t,r){return null==n?n:Hr(n,t,te(r))},r.updateWith=function(n,t,r,e){return e="function"==typeof e?e:Z,null==n?n:Hr(n,t,te(r),e)},r.values=ei,r.valuesIn=function(n){return null==n?[]:S(n,ti(n))},r.without=ea,r.words=oi,r.wrap=function(n,t){return Ia(te(t),n)},r.xor=ua,r.xorBy=ia,r.xorWith=oa,r.zip=aa,r.zipObject=function(n,t){return Xr(n||[],t||[],It)},r.zipObjectDeep=function(n,t){return Xr(n||[],t||[],Dr)},r.zipWith=fa,r.entries=nf,r.entriesIn=tf,r.extend=Pa,r.extendWith=qa,li(r,r),r.add=xf,r.attempt=sf,r.camelCase=rf,r.capitalize=ui,r.ceil=Af,r.clamp=function(n,t,r){return r===Z&&(r=t,t=Z),r!==Z&&(r=(r=Hu(r))==r?r:0),t!==Z&&(t=(t=Hu(t))==t?t:0),Et(Hu(n),t,r)},r.clone=function(n){return St(n,4)},r.cloneDeep=function(n){return St(n,5)},r.cloneDeepWith=function(n,t){return St(n,5,t="function"==typeof t?t:Z)},r.cloneWith=function(n,t){return St(n,4,t="function"==typeof t?t:Z)},r.conformsTo=function(n,t){return null==t||zt(n,t,ni(t))},r.deburr=ii,r.defaultTo=function(n,t){return null==n||n!=n?t:n},r.divide=If,r.endsWith=function(n,t,r){n=Yu(n),t=Zr(t);var e=n.length,u=r=r===Z?e:Et(Vu(r),0,e);return(r-=t.length)>=0&&n.slice(r,u)==t},r.eq=zu,r.escape=function(n){return(n=Yu(n))&&qn.test(n)?n.replace(Un,br):n},r.escapeRegExp=function(n){return(n=Yu(n))&&Jn.test(n)?n.replace(Hn,"\\$&"):n},r.every=function(n,t,r){var e=Ea(n)?f:Ct;return r&&Ye(n,t,r)&&(t=Z),e(n,$e(t,3))},r.find=sa,r.findIndex=pu,r.findKey=function(n,t){return y(n,$e(t,3),Mt)},r.findLast=ha,r.findLastIndex=vu,r.findLastKey=function(n,t){return y(n,$e(t,3),Ut)},r.floor=Wf,r.forEach=Iu,r.forEachRight=Wu,r.forIn=function(n,t){return null==n?n:Eo(n,$e(t,3),ti)},r.forInRight=function(n,t){return null==n?n:So(n,$e(t,3),ti)},r.forOwn=function(n,t){return n&&Mt(n,$e(t,3))},r.forOwnRight=function(n,t){return n&&Ut(n,$e(t,3))},r.get=Qu,r.gt=Ra,r.gte=ka,r.has=function(n,t){return null!=n&&Ve(n,t,Gt)},r.hasIn=Xu,r.head=_u,r.identity=fi,r.includes=function(n,t,r,e){n=Bu(n)?n:ei(n),r=r&&!e?Vu(r):0;var u=n.length;return r<0&&(r=uo(u+r,0)),$u(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&b(n,t,r)>-1},r.indexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:Vu(r);return u<0&&(u=uo(e+u,0)),b(n,t,u)},r.inRange=function(n,t,r){return t=Zu(t),r===Z?(r=t,t=0):r=Zu(r),function(n,t,r){return n>=io(t,r)&&n=-rn&&n<=rn},r.isSet=Fa,r.isString=$u,r.isSymbol=Nu,r.isTypedArray=Ta,r.isUndefined=function(n){return n===Z},r.isWeakMap=function(n){return Uu(n)&&Uo(n)==In},r.isWeakSet=function(n){return Uu(n)&&"[object WeakSet]"==Nt(n)},r.join=function(n,t){return null==n?"":ro.call(n,t)},r.kebabCase=ef,r.last=du,r.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==Z&&(u=(u=Vu(r))<0?uo(e+u,0):io(u,e-1)),t==t?function(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}(n,t,u):m(n,x,u,!0)},r.lowerCase=uf,r.lowerFirst=of,r.lt=Da,r.lte=Ma,r.max=function(n){return n&&n.length?Ft(n,fi,Vt):Z},r.maxBy=function(n,t){return n&&n.length?Ft(n,$e(t,2),Vt):Z},r.mean=function(n){return A(n,fi)},r.meanBy=function(n,t){return A(n,$e(t,2))},r.min=function(n){return n&&n.length?Ft(n,fi,Ar):Z},r.minBy=function(n,t){return n&&n.length?Ft(n,$e(t,2),Ar):Z},r.stubArray=pi,r.stubFalse=vi,r.stubObject=function(){return{}},r.stubString=function(){return""},r.stubTrue=function(){return!0},r.multiply=jf,r.nth=function(n,t){return n&&n.length?kr(n,Vu(t)):Z},r.noConflict=function(){return or._===this&&(or._=Li),this},r.noop=si,r.now=ya,r.pad=function(n,t,r){n=Yu(n);var e=(t=Vu(t))?q(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return je(Qi(u),r)+n+je(Yi(u),r)},r.padEnd=function(n,t,r){n=Yu(n);var e=(t=Vu(t))?q(n):0;return t&&et){var e=n;n=t,t=e}if(r||n%1||t%1){var u=fo();return io(n+u*(t-n+rr("1e-"+((u+"").length-1))),t)}return Br(n,t)},r.reduce=function(n,t,r){var e=Ea(n)?v:j,u=arguments.length<3;return e(n,$e(t,4),r,u,ko)},r.reduceRight=function(n,t,r){var e=Ea(n)?g:j,u=arguments.length<3;return e(n,$e(t,4),r,u,Oo)},r.repeat=function(n,t,r){return t=(r?Ye(n,t,r):t===Z)?1:Vu(t),Lr(Yu(n),t)},r.replace=function(){var n=arguments,t=Yu(n[0]);return n.length<3?t:t.replace(n[1],n[2])},r.result=function(n,t,r){var e=-1,u=(t=re(t,n)).length;for(u||(u=1,n=Z);++ern)return[];var r=un,e=io(n,un);t=$e(t),n-=un;for(var u=k(e,t);++r=i)return n;var a=r-q(e);if(a<1)return e;var f=o?ee(o,0,a).join(""):n.slice(0,a);if(u===Z)return f+e;if(o&&(a+=f.length-a),Ca(u)){if(n.slice(a).search(u)){var c,l=f;for(u.global||(u=wi(u.source,Yu(ot.exec(u))+"g")),u.lastIndex=0;c=u.exec(l);)var s=c.index;f=f.slice(0,s===Z?a:s)}}else if(n.indexOf(Zr(u),a)!=a){var h=f.lastIndexOf(u);h>-1&&(f=f.slice(0,h))}return f+e},r.unescape=function(n){return(n=Yu(n))&&Pn.test(n)?n.replace(Mn,wr):n},r.uniqueId=function(n){var t=++Ei;return Yu(n)+t},r.upperCase=cf,r.upperFirst=lf,r.each=Iu,r.eachRight=Wu,r.first=_u,li(r,function(){var n={};return Mt(r,(function(t,e){Oi.call(r.prototype,e)||(n[e]=t)})),n}(),{chain:!1}),r.VERSION="4.17.21",o(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(n){r[n].placeholder=r})),o(["drop","take"],(function(n,t){Qn.prototype[n]=function(r){r=r===Z?1:uo(Vu(r),0);var e=this.__filtered__&&!t?new Qn(this):this.clone();return e.__filtered__?e.__takeCount__=io(r,e.__takeCount__):e.__views__.push({size:io(r,un),type:n+(e.__dir__<0?"Right":"")}),e},Qn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),o(["filter","map","takeWhile"],(function(n,t){var r=t+1,e=1==r||3==r;Qn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:$e(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}})),o(["head","last"],(function(n,t){var r="take"+(t?"Right":"");Qn.prototype[n]=function(){return this[r](1).value()[0]}})),o(["initial","tail"],(function(n,t){var r="drop"+(t?"":"Right");Qn.prototype[n]=function(){return this.__filtered__?new Qn(this):this[r](1)}})),Qn.prototype.compact=function(){return this.filter(fi)},Qn.prototype.find=function(n){return this.filter(n).head()},Qn.prototype.findLast=function(n){return this.reverse().find(n)},Qn.prototype.invokeMap=Cr((function(n,t){return"function"==typeof n?new Qn(this):this.map((function(r){return tr(r,n,t)}))})),Qn.prototype.reject=function(n){return this.filter(Su($e(n)))},Qn.prototype.slice=function(n,t){n=Vu(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Qn(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Z&&(r=(t=Vu(t))<0?r.dropRight(-t):r.take(t-n)),r)},Qn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Qn.prototype.toArray=function(){return this.take(un)},Mt(Qn.prototype,(function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),i=r[u?"take"+("last"==t?"Right":""):t],o=u||/^find/.test(t);i&&(r.prototype[t]=function(){var t=this.__wrapped__,a=u?[1]:arguments,f=t instanceof Qn,c=a[0],l=f||Ea(t),s=function(n){var t=i.apply(r,p([n],a));return u&&h?t[0]:t};l&&e&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,v=!!this.__actions__.length,g=o&&!h,_=f&&!v;if(!o&&l){t=_?t:new Qn(this);var d=n.apply(t,a);return d.__actions__.push({func:Au,args:[s],thisArg:Z}),new W(d,h)}return g&&_?n.apply(this,a):(d=this.thru(s),g?u?d.value()[0]:d.value():d)})})),o(["pop","push","shift","sort","splice","unshift"],(function(n){var t=Ii[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",u=/^(?:pop|shift)$/.test(n);r.prototype[n]=function(){var n=arguments;if(u&&!this.__chain__){var r=this.value();return t.apply(Ea(r)?r:[],n)}return this[e]((function(r){return t.apply(Ea(r)?r:[],n)}))}})),Mt(Qn.prototype,(function(n,t){var e=r[t];if(e){var u=e.name+"";Oi.call(yo,u)||(yo[u]=[]),yo[u].push({name:t,func:e})}})),yo[xe(Z,2).name]=[{name:"wrapper",func:Z}],Qn.prototype.clone=function(){var n=new Qn(this.__wrapped__);return n.__actions__=le(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=le(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=le(this.__views__),n},Qn.prototype.reverse=function(){if(this.__filtered__){var n=new Qn(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},Qn.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,r=Ea(n),e=t<0,u=r?n.length:0,i=function(n,t,r){for(var e=-1,u=r.length;++e=this.__values__.length;return{done:n,value:n?Z:this.__values__[this.__index__++]}},r.prototype.plant=function(n){for(var t,r=this;r instanceof e;){var u=hu(r);u.__index__=0,u.__values__=Z,t?i.__wrapped__=u:t=u;var i=u;r=r.__wrapped__}return i.__wrapped__=n,t},r.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof Qn){var t=n;return this.__actions__.length&&(t=new Qn(this)),(t=t.reverse()).__actions__.push({func:Au,args:[mu],thisArg:Z}),new W(t,this.__chain__)}return this.thru(mu)},r.prototype.toJSON=r.prototype.valueOf=r.prototype.value=function(){return Yr(this.__wrapped__,this.__actions__)},r.prototype.first=r.prototype.head,Ki&&(r.prototype[Ki]=function(){return this}),r}();or._=xr,void 0===(e=function(){return xr}.call(t,r,t,n))||(n.exports=e)}.call(this)},6877:(n,t,r)=>{n.exports=r(4480)}},t={};function r(e){var u=t[e];if(void 0!==u)return u.exports;var i=t[e]={id:e,loaded:!1,exports:{}};return n[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.nmd=n=>(n.paths=[],n.children||(n.children=[]),n),r(6877)})())); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/dist/moment.js b/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/dist/moment.js deleted file mode 100644 index 377cea4d..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/dist/moment.js +++ /dev/null @@ -1,277 +0,0 @@ -!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?exports.moment=a():e.moment=a()}(this,(()=>(()=>{var e={5177:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,a,t){return e<12?t?"vm":"VM":t?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(t(5093))},1488:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},t={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},s=function(e){return function(s,n,r,i){var d=a(s),_=t[e][a(s)];return 2===d&&(_=_[n?0:1]),_.replace(/%d/i,s)}},n=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-dz",{months:n,monthsShort:n,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,a,t){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:s("s"),ss:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}})}(t(5093))},8676:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(t(5093))},2353:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},s={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},n=function(e){return function(a,n,r,i){var d=t(a),_=s[e][t(a)];return 2===d&&(_=_[n?0:1]),_.replace(/%d/i,a)}},r=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:r,monthsShort:r,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,a,t){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:n("s"),ss:n("s"),m:n("m"),mm:n("m"),h:n("h"),hh:n("h"),d:n("d"),dd:n("d"),M:n("M"),MM:n("M"),y:n("y"),yy:n("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(t(5093))},4496:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(t(5093))},6947:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},t={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-ps",{months:"كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل".split("_"),monthsShort:"ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,a,t){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[٣٤٥٦٧٨٩٠]/g,(function(e){return t[e]})).split("").reverse().join("").replace(/[١٢](?![\u062a\u0643])/g,(function(e){return t[e]})).split("").reverse().join("").replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(t(5093))},2682:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},t={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,a,t){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return t[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(t(5093))},9756:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(t(5093))},1509:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},t={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(a,t,r,i){var d=s(a),_=n[e][s(a)];return 2===d&&(_=_[t?0:1]),_.replace(/%d/i,a)}},i=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:i,monthsShort:i,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,a,t){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return t[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(t(5093))},5533:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,a,t){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var t=e%10,s=e%100-t,n=e>=100?100:null;return e+(a[t]||a[s]||a[n])},week:{dow:1,doy:7}})}(t(5093))},8959:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a){var t=e.split("_");return a%10==1&&a%100!=11?t[0]:a%10>=2&&a%10<=4&&(a%100<10||a%100>=20)?t[1]:t[2]}function t(e,t,s){return"m"===s?t?"хвіліна":"хвіліну":"h"===s?t?"гадзіна":"гадзіну":e+" "+a({ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[s],+e)}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,a,t){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(t(5093))},7777:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-ев":0===t?e+"-ен":t>10&&t<20?e+"-ти":1===a?e+"-ви":2===a?e+"-ри":7===a||8===a?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(t(5093))},4903:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(t(5093))},7357:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},t={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,a){return 12===e&&(e=0),"রাত"===a?e<4?e:e+12:"ভোর"===a||"সকাল"===a?e:"দুপুর"===a?e>=3?e:e+12:"বিকাল"===a||"সন্ধ্যা"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}})}(t(5093))},1290:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},t={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,a){return 12===e&&(e=0),"রাত"===a&&e>=4||"দুপুর"===a&&e<5||"বিকাল"===a?e+12:e},meridiem:function(e,a,t){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(t(5093))},1545:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},t={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,a){return 12===e&&(e=0),"མཚན་མོ"===a&&e>=4||"ཉིན་གུང"===a&&e<5||"དགོང་དག"===a?e+12:e},meridiem:function(e,a,t){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(t(5093))},1470:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t){return e+" "+n({mm:"munutenn",MM:"miz",dd:"devezh"}[t],e)}function t(e){switch(s(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function s(e){return e>9?s(e%10):e}function n(e,a){return 2===a?r(e):e}function r(e){var a={m:"v",b:"v",d:"z"};return void 0===a[e.charAt(0)]?e:a[e.charAt(0)]+e.substring(1)}var i=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],d=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,_=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,o=/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,u=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],m=[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],l=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:l,fullWeekdaysParse:u,shortWeekdaysParse:m,minWeekdaysParse:l,monthsRegex:d,monthsShortRegex:d,monthsStrictRegex:_,monthsShortStrictRegex:o,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:a,h:"un eur",hh:"%d eur",d:"un devezh",dd:a,M:"ur miz",MM:a,y:"ur bloaz",yy:t},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,a,t){return e<12?"a.m.":"g.m."}})}(t(5093))},4429:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){if("m"===t)return a?"jedna minuta":s?"jednu minutu":"jedne minute"}function t(e,a,t){var s=e+" ";switch(t){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"mm":return s+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return"jedan sat";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:a,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(t(5093))},7306:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,a){var t=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==a&&"W"!==a||(t="a"),e+t},week:{dow:1,doy:4}})}(t(5093))},6464:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={standalone:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),format:"ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince".split("_"),isFormat:/DD?[o.]?(\[[^\[\]]*\]|\s)+MMMM/},t="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),s=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],n=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function r(e){return e>1&&e<5&&1!=~~(e/10)}function i(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"pár sekund":"pár sekundami";case"ss":return a||s?n+(r(e)?"sekundy":"sekund"):n+"sekundami";case"m":return a?"minuta":s?"minutu":"minutou";case"mm":return a||s?n+(r(e)?"minuty":"minut"):n+"minutami";case"h":return a?"hodina":s?"hodinu":"hodinou";case"hh":return a||s?n+(r(e)?"hodiny":"hodin"):n+"hodinami";case"d":return a||s?"den":"dnem";case"dd":return a||s?n+(r(e)?"dny":"dní"):n+"dny";case"M":return a||s?"měsíc":"měsícem";case"MM":return a||s?n+(r(e)?"měsíce":"měsíců"):n+"měsíci";case"y":return a||s?"rok":"rokem";case"yy":return a||s?n+(r(e)?"roky":"let"):n+"lety"}}e.defineLocale("cs",{months:a,monthsShort:t,monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},3635:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(t(5093))},4226:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var a="";return e>20?a=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(a=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+a},week:{dow:1,doy:4}})}(t(5093))},3601:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},6111:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:a,mm:"%d Minuten",h:a,hh:"%d Stunden",d:a,dd:a,w:a,ww:"%d Wochen",M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},4697:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:a,mm:"%d Minuten",h:a,hh:"%d Stunden",d:a,dd:a,w:a,ww:"%d Wochen",M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},7853:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:a,mm:"%d Minuten",h:a,hh:"%d Stunden",d:a,dd:a,w:a,ww:"%d Wochen",M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},708:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],t=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:a,monthsShort:a,weekdays:t,weekdaysShort:t,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,a,t){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(t(5093))},4691:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,a){return e?"string"==typeof a&&/D/.test(a.substring(0,a.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,a,t){return e>11?t?"μμ":"ΜΜ":t?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){return 6===this.day()?"[το προηγούμενο] dddd [{}] LT":"[την προηγούμενη] dddd [{}] LT"},sameElse:"L"},calendar:function(e,t){var s=this._calendarEl[e],n=t&&t.hours();return a(s)&&(s=s.apply(t)),s.replace("{}",n%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(t(5093))},3872:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:0,doy:4}})}(t(5093))},8298:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")}})}(t(5093))},6195:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}})}(t(5093))},6584:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}})}(t(5093))},5543:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")}})}(t(5093))},9033:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:0,doy:6}})}(t(5093))},9402:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}})}(t(5093))},3004:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}})}(t(5093))},2934:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,a,t){return e>11?t?"p.t.m.":"P.T.M.":t?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(t(5093))},838:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),t="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],n=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?t[e.month()]:a[e.month()]:a},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(t(5093))},7730:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),t="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],n=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?t[e.month()]:a[e.month()]:a},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"})}(t(5093))},6575:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),t="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],n=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?t[e.month()]:a[e.month()]:a},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(t(5093))},7650:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),t="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],n=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?t[e.month()]:a[e.month()]:a},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}(t(5093))},3035:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){var n={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return a?n[t][2]?n[t][2]:n[t][1]:s?n[t][0]:n[t][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:"%d päeva",M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},3508:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(t(5093))},119:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},t={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,a,t){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return t[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(t(5093))},527:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),t=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",a[7],a[8],a[9]];function s(e,a,t,s){var r="";switch(t){case"s":return s?"muutaman sekunnin":"muutama sekunti";case"ss":r=s?"sekunnin":"sekuntia";break;case"m":return s?"minuutin":"minuutti";case"mm":r=s?"minuutin":"minuuttia";break;case"h":return s?"tunnin":"tunti";case"hh":r=s?"tunnin":"tuntia";break;case"d":return s?"päivän":"päivä";case"dd":r=s?"päivän":"päivää";break;case"M":return s?"kuukauden":"kuukausi";case"MM":r=s?"kuukauden":"kuukautta";break;case"y":return s?"vuoden":"vuosi";case"yy":r=s?"vuoden":"vuotta"}return r=n(e,s)+" "+r}function n(e,s){return e<10?s?t[e]:a[e]:e}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},5995:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(t(5093))},2477:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},6435:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,a){switch(a){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(t(5093))},7892:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,a){switch(a){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(t(5093))},5498:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,t=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,s=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i];e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:s,monthsShortRegex:s,monthsStrictRegex:a,monthsShortStrictRegex:t,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,a){switch(a){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(t(5093))},7071:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),t="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?t[e.month()]:a[e.month()]:a},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(t(5093))},1734:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a=["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],t=["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],s=["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],n=["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],r=["Do","Lu","Má","Cé","Dé","A","Sa"];e.defineLocale("ga",{months:a,monthsShort:t,monthsParseExact:!0,weekdays:s,weekdaysShort:n,weekdaysMin:r,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(t(5093))},217:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],t=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],s=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],n=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],r=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"];e.defineLocale("gd",{months:a,monthsShort:t,monthsParseExact:!0,weekdays:s,weekdaysShort:n,weekdaysMin:r,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(t(5093))},7329:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(t(5093))},2124:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){var n={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return s?n[t][0]:n[t][1]}e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,a){return"D"===a?e+"वेर":e},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,a){return 12===e&&(e=0),"राती"===a?e<4?e:e+12:"सकाळीं"===a?e:"दनपारां"===a?e>12?e:e+12:"सांजे"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}})}(t(5093))},3383:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){var n={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return s?n[t][0]:n[t][1]}e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,a){return"D"===a?e+"er":e},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,a){return 12===e&&(e=0),"rati"===a?e<4?e:e+12:"sokallim"===a?e:"donparam"===a?e>12?e:e+12:"sanje"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}})}(t(5093))},5050:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},t={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,a){return 12===e&&(e=0),"રાત"===a?e<4?e:e+12:"સવાર"===a?e:"બપોર"===a?e>=10?e:e+12:"સાંજ"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})}(t(5093))},1713:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,a,t){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?t?'לפנה"צ':"לפני הצהריים":e<18?t?'אחה"צ':"אחרי הצהריים":"בערב"}})}(t(5093))},3861:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},t={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},s=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i],n=[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i];e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:s,longMonthsParse:s,shortMonthsParse:n,monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,a){return 12===e&&(e=0),"रात"===a?e<4?e:e+12:"सुबह"===a?e:"दोपहर"===a?e>=10?e:e+12:"शाम"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})}(t(5093))},6308:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t){var s=e+" ";switch(t){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return a?"jedna minuta":"jedne minute";case"mm":return s+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:a,m:a,mm:a,h:a,hh:a,d:"dan",dd:a,M:"mjesec",MM:a,y:"godinu",yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(t(5093))},609:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function t(e,a,t,s){var n=e;switch(t){case"s":return s||a?"néhány másodperc":"néhány másodperce";case"ss":return n+(s||a)?" másodperc":" másodperce";case"m":return"egy"+(s||a?" perc":" perce");case"mm":return n+(s||a?" perc":" perce");case"h":return"egy"+(s||a?" óra":" órája");case"hh":return n+(s||a?" óra":" órája");case"d":return"egy"+(s||a?" nap":" napja");case"dd":return n+(s||a?" nap":" napja");case"M":return"egy"+(s||a?" hónap":" hónapja");case"MM":return n+(s||a?" hónap":" hónapja");case"y":return"egy"+(s||a?" év":" éve");case"yy":return n+(s||a?" év":" éve")}return""}function s(e){return(e?"":"[múlt] ")+"["+a[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,a,t){return e<12?!0===t?"de":"DE":!0===t?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return s.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return s.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},7160:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,a){switch(a){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(t(5093))},4063:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"siang"===a?e>=11?e:e+12:"sore"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(t(5093))},9374:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e){return e%100==11||e%10!=1}function t(e,t,s,n){var r=e+" ";switch(s){case"s":return t||n?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return a(e)?r+(t||n?"sekúndur":"sekúndum"):r+"sekúnda";case"m":return t?"mínúta":"mínútu";case"mm":return a(e)?r+(t||n?"mínútur":"mínútum"):t?r+"mínúta":r+"mínútu";case"hh":return a(e)?r+(t||n?"klukkustundir":"klukkustundum"):r+"klukkustund";case"d":return t?"dagur":n?"dag":"degi";case"dd":return a(e)?t?r+"dagar":r+(n?"daga":"dögum"):t?r+"dagur":r+(n?"dag":"degi");case"M":return t?"mánuður":n?"mánuð":"mánuði";case"MM":return a(e)?t?r+"mánuðir":r+(n?"mánuði":"mánuðum"):t?r+"mánuður":r+(n?"mánuð":"mánuði");case"y":return t||n?"ár":"ári";case"yy":return a(e)?r+(t||n?"ár":"árum"):r+(t||n?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:t,ss:t,m:t,mm:t,h:"klukkustund",hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},1827:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){return 0===this.day()?"[la scorsa] dddd [alle] LT":"[lo scorso] dddd [alle] LT"},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(t(5093))},8383:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){return 0===this.day()?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT":"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(t(5093))},3827:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,a){return"元"===a[1]?1:parseInt(a[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,a,t){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,a){switch(a){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}(t(5093))},9722:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,a){return 12===e&&(e=0),"enjing"===a?e:"siyang"===a?e>=11?e:e+12:"sonten"===a||"ndalu"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(t(5093))},1794:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,a,t){return"ი"===t?a+"ში":a+t+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(t(5093))},7088:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var t=e%10,s=e>=100?100:null;return e+(a[e]||a[t]||a[s])},week:{dow:1,doy:7}})}(t(5093))},6870:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},t={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,a,t){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},week:{dow:1,doy:4}})}(t(5093))},4451:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},t={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,a){return 12===e&&(e=0),"ರಾತ್ರಿ"===a?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===a?e:"ಮಧ್ಯಾಹ್ನ"===a?e>=10?e:e+12:"ಸಂಜೆ"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(t(5093))},3164:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,a,t){return e<12?"오전":"오후"}})}(t(5093))},6181:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){var n={s:["çend sanîye","çend sanîyeyan"],ss:[e+" sanîye",e+" sanîyeyan"],m:["deqîqeyek","deqîqeyekê"],mm:[e+" deqîqe",e+" deqîqeyan"],h:["saetek","saetekê"],hh:[e+" saet",e+" saetan"],d:["rojek","rojekê"],dd:[e+" roj",e+" rojan"],w:["hefteyek","hefteyekê"],ww:[e+" hefte",e+" hefteyan"],M:["mehek","mehekê"],MM:[e+" meh",e+" mehan"],y:["salek","salekê"],yy:[e+" sal",e+" salan"]};return a?n[t][0]:n[t][1]}function t(e){var a=(e=""+e).substring(e.length-1),t=e.length>1?e.substring(e.length-2):"";return 12==t||13==t||"2"!=a&&"3"!=a&&"50"!=t&&"70"!=a&&"80"!=a?"ê":"yê"}e.defineLocale("ku-kmr",{months:"Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar".split("_"),monthsShort:"Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber".split("_"),monthsParseExact:!0,weekdays:"Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî".split("_"),weekdaysShort:"Yek_Du_Sê_Çar_Pên_În_Şem".split("_"),weekdaysMin:"Ye_Du_Sê_Ça_Pê_În_Şe".split("_"),meridiem:function(e,a,t){return e<12?t?"bn":"BN":t?"pn":"PN"},meridiemParse:/bn|BN|pn|PN/,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM[a] YYYY[an]",LLL:"Do MMMM[a] YYYY[an] HH:mm",LLLL:"dddd, Do MMMM[a] YYYY[an] HH:mm",ll:"Do MMM[.] YYYY[an]",lll:"Do MMM[.] YYYY[an] HH:mm",llll:"ddd[.], Do MMM[.] YYYY[an] HH:mm"},calendar:{sameDay:"[Îro di saet] LT [de]",nextDay:"[Sibê di saet] LT [de]",nextWeek:"dddd [di saet] LT [de]",lastDay:"[Duh di saet] LT [de]",lastWeek:"dddd[a borî di saet] LT [de]",sameElse:"L"},relativeTime:{future:"di %s de",past:"berî %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,w:a,ww:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}(?:yê|ê|\.)/,ordinal:function(e,a){var s=a.toLowerCase();return s.includes("w")||s.includes("m")?e+".":e+t(e)},week:{dow:1,doy:4}})}(t(5093))},8174:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},t={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];e.defineLocale("ku",{months:s,monthsShort:s,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,a,t){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return t[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(t(5093))},8474:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var t=e%10,s=e>=100?100:null;return e+(a[e]||a[t]||a[s])},week:{dow:1,doy:7}})}(t(5093))},9680:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){var n={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return a?n[t][0]:n[t][1]}function t(e){return n(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e}function s(e){return n(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e}function n(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var a=e%10;return n(0===a?e/10:a)}if(e<1e4){for(;e>=10;)e/=10;return n(e)}return n(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:t,past:s,s:"e puer Sekonnen",ss:"%d Sekonnen",m:a,mm:"%d Minutten",h:a,hh:"%d Stonnen",d:a,dd:"%d Deeg",M:a,MM:"%d Méint",y:a,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},5867:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,a,t){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(t(5093))},5766:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function t(e,a,t,s){return a?"kelios sekundės":s?"kelių sekundžių":"kelias sekundes"}function s(e,a,t,s){return a?r(t)[0]:s?r(t)[1]:r(t)[2]}function n(e){return e%10==0||e>10&&e<20}function r(e){return a[e].split("_")}function i(e,a,t,i){var d=e+" ";return 1===e?d+s(e,a,t[0],i):a?d+(n(e)?r(t)[1]:r(t)[0]):i?d+r(t)[1]:d+(n(e)?r(t)[1]:r(t)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:t,ss:i,m:s,mm:i,h:s,hh:i,d:s,dd:i,M:s,MM:i,y:s,yy:i},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(t(5093))},9532:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function t(e,a,t){return t?a%10==1&&a%100!=11?e[2]:e[3]:a%10==1&&a%100!=11?e[0]:e[1]}function s(e,s,n){return e+" "+t(a[n],e,s)}function n(e,s,n){return t(a[n],e,s)}function r(e,a){return a?"dažas sekundes":"dažām sekundēm"}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:r,ss:s,m:n,mm:s,h:n,hh:s,d:n,dd:s,M:n,MM:s,y:n,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},8076:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:e>=2&&e<=4?a[1]:a[2]},translate:function(e,t,s){var n=a.words[s];return 1===s.length?t?n[0]:n[1]:e+" "+a.correctGrammaticalCase(e,n)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:a.translate,m:a.translate,mm:a.translate,h:a.translate,hh:a.translate,d:"dan",dd:a.translate,M:"mjesec",MM:a.translate,y:"godinu",yy:a.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(t(5093))},1848:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(t(5093))},306:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-ев":0===t?e+"-ен":t>10&&t<20?e+"-ти":1===a?e+"-ви":2===a?e+"-ри":7===a||8===a?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(t(5093))},3739:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,a){return 12===e&&(e=0),"രാത്രി"===a&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===a||"വൈകുന്നേരം"===a?e+12:e},meridiem:function(e,a,t){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})}(t(5093))},9053:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){switch(t){case"s":return a?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(a?" секунд":" секундын");case"m":case"mm":return e+(a?" минут":" минутын");case"h":case"hh":return e+(a?" цаг":" цагийн");case"d":case"dd":return e+(a?" өдөр":" өдрийн");case"M":case"MM":return e+(a?" сар":" сарын");case"y":case"yy":return e+(a?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,a,t){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(t(5093))},6169:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},t={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function s(e,a,t,s){var n="";if(a)switch(t){case"s":n="काही सेकंद";break;case"ss":n="%d सेकंद";break;case"m":n="एक मिनिट";break;case"mm":n="%d मिनिटे";break;case"h":n="एक तास";break;case"hh":n="%d तास";break;case"d":n="एक दिवस";break;case"dd":n="%d दिवस";break;case"M":n="एक महिना";break;case"MM":n="%d महिने";break;case"y":n="एक वर्ष";break;case"yy":n="%d वर्षे"}else switch(t){case"s":n="काही सेकंदां";break;case"ss":n="%d सेकंदां";break;case"m":n="एका मिनिटा";break;case"mm":n="%d मिनिटां";break;case"h":n="एका तासा";break;case"hh":n="%d तासां";break;case"d":n="एका दिवसा";break;case"dd":n="%d दिवसां";break;case"M":n="एका महिन्या";break;case"MM":n="%d महिन्यां";break;case"y":n="एका वर्षा";break;case"yy":n="%d वर्षां"}return n.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,a){return 12===e&&(e=0),"पहाटे"===a||"सकाळी"===a?e:"दुपारी"===a||"सायंकाळी"===a||"रात्री"===a?e>=12?e:e+12:void 0},meridiem:function(e,a,t){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(t(5093))},2297:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?e>=11?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(t(5093))},3386:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?e>=11?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(t(5093))},7075:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(t(5093))},2264:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},t={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},week:{dow:1,doy:4}})}(t(5093))},2274:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"én time",hh:"%d timer",d:"én dag",dd:"%d dager",w:"én uke",ww:"%d uker",M:"én måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},8235:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},t={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,a){return 12===e&&(e=0),"राति"===a?e<4?e:e+12:"बिहान"===a?e:"दिउँसो"===a?e>=10?e:e+12:"साँझ"===a?e+12:void 0},meridiem:function(e,a,t){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(t(5093))},3784:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),t="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),s=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],n=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?t[e.month()]:a[e.month()]:a},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(t(5093))},2572:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),t="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),s=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],n=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?t[e.month()]:a[e.month()]:a},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(t(5093))},4566:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},9330:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,a){var t=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==a&&"W"!==a||(t="a"),e+t},week:{dow:1,doy:4}})}(t(5093))},9849:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},t={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,a){return 12===e&&(e=0),"ਰਾਤ"===a?e<4?e:e+12:"ਸਵੇਰ"===a?e:"ਦੁਪਹਿਰ"===a?e>=10?e:e+12:"ਸ਼ਾਮ"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})}(t(5093))},4418:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),t="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),s=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function n(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function r(e,a,t){var s=e+" ";switch(t){case"ss":return s+(n(e)?"sekundy":"sekund");case"m":return a?"minuta":"minutę";case"mm":return s+(n(e)?"minuty":"minut");case"h":return a?"godzina":"godzinę";case"hh":return s+(n(e)?"godziny":"godzin");case"ww":return s+(n(e)?"tygodnie":"tygodni");case"MM":return s+(n(e)?"miesiące":"miesięcy");case"yy":return s+(n(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,s){return e?/D MMMM/.test(s)?t[e.month()]:a[e.month()]:a},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:r,m:r,mm:r,h:r,hh:r,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:r,M:"miesiąc",MM:r,y:"rok",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},8303:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"})}(t(5093))},9834:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(t(5093))},4457:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t){var s=" ";return(e%100>=20||e>=100&&e%100==0)&&(s=" de "),e+s+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"}[t]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:a,m:"un minut",mm:a,h:"o oră",hh:a,d:"o zi",dd:a,w:"o săptămână",ww:a,M:"o lună",MM:a,y:"un an",yy:a},week:{dow:1,doy:7}})}(t(5093))},2271:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a){var t=e.split("_");return a%10==1&&a%100!=11?t[0]:a%10>=2&&a%10<=4&&(a%100<10||a%100>=20)?t[1]:t[2]}function t(e,t,s){return"m"===s?t?"минута":"минуту":e+" "+a({ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[s],+e)}var s=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:s,longMonthsParse:s,shortMonthsParse:s,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,w:"неделя",ww:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,a,t){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(t(5093))},1221:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],t=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:a,monthsShort:a,weekdays:t,weekdaysShort:t,weekdaysMin:t,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,a,t){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(t(5093))},3478:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},7538:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,a,t){return e>11?t?"ප.ව.":"පස් වරු":t?"පෙ.ව.":"පෙර වරු"}})}(t(5093))},5784:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),t="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function s(e){return e>1&&e<5}function n(e,a,t,n){var r=e+" ";switch(t){case"s":return a||n?"pár sekúnd":"pár sekundami";case"ss":return a||n?r+(s(e)?"sekundy":"sekúnd"):r+"sekundami";case"m":return a?"minúta":n?"minútu":"minútou";case"mm":return a||n?r+(s(e)?"minúty":"minút"):r+"minútami";case"h":return a?"hodina":n?"hodinu":"hodinou";case"hh":return a||n?r+(s(e)?"hodiny":"hodín"):r+"hodinami";case"d":return a||n?"deň":"dňom";case"dd":return a||n?r+(s(e)?"dni":"dní"):r+"dňami";case"M":return a||n?"mesiac":"mesiacom";case"MM":return a||n?r+(s(e)?"mesiace":"mesiacov"):r+"mesiacmi";case"y":return a||n?"rok":"rokom";case"yy":return a||n?r+(s(e)?"roky":"rokov"):r+"rokmi"}}e.defineLocale("sk",{months:a,monthsShort:t,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:case 4:case 5:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},6637:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"nekaj sekund":"nekaj sekundami";case"ss":return n+=1===e?a?"sekundo":"sekundi":2===e?a||s?"sekundi":"sekundah":e<5?a||s?"sekunde":"sekundah":"sekund";case"m":return a?"ena minuta":"eno minuto";case"mm":return n+=1===e?a?"minuta":"minuto":2===e?a||s?"minuti":"minutama":e<5?a||s?"minute":"minutami":a||s?"minut":"minutami";case"h":return a?"ena ura":"eno uro";case"hh":return n+=1===e?a?"ura":"uro":2===e?a||s?"uri":"urama":e<5?a||s?"ure":"urami":a||s?"ur":"urami";case"d":return a||s?"en dan":"enim dnem";case"dd":return n+=1===e?a||s?"dan":"dnem":2===e?a||s?"dni":"dnevoma":a||s?"dni":"dnevi";case"M":return a||s?"en mesec":"enim mesecem";case"MM":return n+=1===e?a||s?"mesec":"mesecem":2===e?a||s?"meseca":"mesecema":e<5?a||s?"mesece":"meseci":a||s?"mesecev":"meseci";case"y":return a||s?"eno leto":"enim letom";case"yy":return n+=1===e?a||s?"leto":"letom":2===e?a||s?"leti":"letoma":e<5?a||s?"leta":"leti":a||s?"let":"leti"}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(t(5093))},6794:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,a,t){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},3322:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={words:{ss:["секунда","секунде","секунди"],m:["један минут","једног минута"],mm:["минут","минута","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],d:["један дан","једног дана"],dd:["дан","дана","дана"],M:["један месец","једног месеца"],MM:["месец","месеца","месеци"],y:["једну годину","једне године"],yy:["годину","године","година"]},correctGrammaticalCase:function(e,a){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?a[0]:a[1]:a[2]},translate:function(e,t,s,n){var r,i=a.words[s];return 1===s.length?"y"===s&&t?"једна година":n||t?i[0]:i[1]:(r=a.correctGrammaticalCase(e,i),"yy"===s&&t&&"годину"===r?e+" година":e+" "+r)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:a.translate,m:a.translate,mm:a.translate,h:a.translate,hh:a.translate,d:a.translate,dd:a.translate,M:a.translate,MM:a.translate,y:a.translate,yy:a.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(t(5093))},5719:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(e,a){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?a[0]:a[1]:a[2]},translate:function(e,t,s,n){var r,i=a.words[s];return 1===s.length?"y"===s&&t?"jedna godina":n||t?i[0]:i[1]:(r=a.correctGrammaticalCase(e,i),"yy"===s&&t&&"godinu"===r?e+" godina":e+" "+r)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:a.translate,m:a.translate,mm:a.translate,h:a.translate,hh:a.translate,d:a.translate,dd:a.translate,M:a.translate,MM:a.translate,y:a.translate,yy:a.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(t(5093))},6e3:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,a,t){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,a){return 12===e&&(e=0),"ekuseni"===a?e:"emini"===a?e>=11?e:e+12:"entsambama"===a||"ebusuku"===a?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(t(5093))},1011:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?":e":1===a||2===a?":a":":e")},week:{dow:1,doy:4}})}(t(5093))},748:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(t(5093))},1025:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},t={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return t[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return a[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,a,t){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,a){return 12===e&&(e=0),"யாமம்"===a?e<2?e:e+12:"வைகறை"===a||"காலை"===a||"நண்பகல்"===a&&e>=10?e:e+12},week:{dow:0,doy:6}})}(t(5093))},1885:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,a){return 12===e&&(e=0),"రాత్రి"===a?e<4?e:e+12:"ఉదయం"===a?e:"మధ్యాహ్నం"===a?e>=10?e:e+12:"సాయంత్రం"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(t(5093))},8861:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}})}(t(5093))},6571:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,a){return 12===e&&(e=0),"шаб"===a?e<4?e:e+12:"субҳ"===a?e:"рӯз"===a?e>=11?e:e+12:"бегоҳ"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){var t=e%10,s=e>=100?100:null;return e+(a[e]||a[t]||a[s])},week:{dow:1,doy:7}})}(t(5093))},5802:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,a,t){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(t(5093))},9527:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"};e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,t){switch(t){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var s=e%10,n=e%100-s,r=e>=100?100:null;return e+(a[s]||a[n]||a[r])}},week:{dow:1,doy:7}})}(t(5093))},9231:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(t(5093))},1052:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function t(e){var a=e;return a=-1!==e.indexOf("jaj")?a.slice(0,-3)+"leS":-1!==e.indexOf("jar")?a.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?a.slice(0,-3)+"nem":a+" pIq"}function s(e){var a=e;return a=-1!==e.indexOf("jaj")?a.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?a.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?a.slice(0,-3)+"ben":a+" ret"}function n(e,a,t,s){var n=r(e);switch(t){case"ss":return n+" lup";case"mm":return n+" tup";case"hh":return n+" rep";case"dd":return n+" jaj";case"MM":return n+" jar";case"yy":return n+" DIS"}}function r(e){var t=Math.floor(e%1e3/100),s=Math.floor(e%100/10),n=e%10,r="";return t>0&&(r+=a[t]+"vatlh"),s>0&&(r+=(""!==r?" ":"")+a[s]+"maH"),n>0&&(r+=(""!==r?" ":"")+a[n]),""===r?"pagh":r}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:t,past:s,s:"puS lup",ss:n,m:"wa’ tup",mm:n,h:"wa’ rep",hh:n,d:"wa’ jaj",dd:n,M:"wa’ jar",MM:n,y:"wa’ DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},5096:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_Çar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,a,t){return e<12?t?"öö":"ÖÖ":t?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,t){switch(t){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var s=e%10,n=e%100-s,r=e>=100?100:null;return e+(a[s]||a[n]||a[r])}},week:{dow:1,doy:7}})}(t(5093))},9846:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a,t,s){var n={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return s||a?n[t][0]:n[t][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,a,t){return e>11?t?"d'o":"D'O":t?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(t(5093))},7711:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(t(5093))},1765:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(t(5093))},8414:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,a){return 12===e&&(e=0),"يېرىم كېچە"===a||"سەھەر"===a||"چۈشتىن بۇرۇن"===a?e:"چۈشتىن كېيىن"===a||"كەچ"===a?e+12:e>=11?e:e+12},meridiem:function(e,a,t){var s=100*e+a;return s<600?"يېرىم كېچە":s<900?"سەھەر":s<1130?"چۈشتىن بۇرۇن":s<1230?"چۈش":s<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(t(5093))},6618:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -function a(e,a){var t=e.split("_");return a%10==1&&a%100!=11?t[0]:a%10>=2&&a%10<=4&&(a%100<10||a%100>=20)?t[1]:t[2]}function t(e,t,s){return"m"===s?t?"хвилина":"хвилину":"h"===s?t?"година":"годину":e+" "+a({ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[s],+e)}function s(e,a){var t={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?t.nominative.slice(1,7).concat(t.nominative.slice(0,1)):e?t[/(\[[ВвУу]\]) ?dddd/.test(a)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(a)?"genitive":"nominative"][e.day()]:t.nominative}function n(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:s,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:n("[Сьогодні "),nextDay:n("[Завтра "),lastDay:n("[Вчора "),nextWeek:n("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[Минулої] dddd [").call(this);case 1:case 2:case 4:return n("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,a,t){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(t(5093))},158:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -var a=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],t=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:a,monthsShort:a,weekdays:t,weekdaysShort:t,weekdaysMin:t,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,a,t){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(t(5093))},2475:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(t(5093))},7609:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(t(5093))},1135:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,a,t){return e<12?t?"sa":"SA":t?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(t(5093))},4051:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}})}(t(5093))},2218:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(t(5093))},2648:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,a){return 12===e&&(e=0),"凌晨"===a||"早上"===a||"上午"===a?e:"下午"===a||"晚上"===a?e+12:e>=11?e:e+12},meridiem:function(e,a,t){var s=100*e+a;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(t(5093))},1632:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,a){return 12===e&&(e=0),"凌晨"===a||"早上"===a||"上午"===a?e:"中午"===a?e>=11?e:e+12:"下午"===a||"晚上"===a?e+12:void 0},meridiem:function(e,a,t){var s=100*e+a;return s<600?"凌晨":s<900?"早上":s<1200?"上午":1200===s?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(t(5093))},1541:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,a){return 12===e&&(e=0),"凌晨"===a||"早上"===a||"上午"===a?e:"中午"===a?e>=11?e:e+12:"下午"===a||"晚上"===a?e+12:void 0},meridiem:function(e,a,t){var s=100*e+a;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(t(5093))},304:function(e,a,t){!function(e){"use strict"; -//! moment.js locale configuration -e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,a){return 12===e&&(e=0),"凌晨"===a||"早上"===a||"上午"===a?e:"中午"===a?e>=11?e:e+12:"下午"===a||"晚上"===a?e+12:void 0},meridiem:function(e,a,t){var s=100*e+a;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(t(5093))},5358:(e,a,t)=>{var s={"./af":5177,"./af.js":5177,"./ar":1509,"./ar-dz":1488,"./ar-dz.js":1488,"./ar-kw":8676,"./ar-kw.js":8676,"./ar-ly":2353,"./ar-ly.js":2353,"./ar-ma":4496,"./ar-ma.js":4496,"./ar-ps":6947,"./ar-ps.js":6947,"./ar-sa":2682,"./ar-sa.js":2682,"./ar-tn":9756,"./ar-tn.js":9756,"./ar.js":1509,"./az":5533,"./az.js":5533,"./be":8959,"./be.js":8959,"./bg":7777,"./bg.js":7777,"./bm":4903,"./bm.js":4903,"./bn":1290,"./bn-bd":7357,"./bn-bd.js":7357,"./bn.js":1290,"./bo":1545,"./bo.js":1545,"./br":1470,"./br.js":1470,"./bs":4429,"./bs.js":4429,"./ca":7306,"./ca.js":7306,"./cs":6464,"./cs.js":6464,"./cv":3635,"./cv.js":3635,"./cy":4226,"./cy.js":4226,"./da":3601,"./da.js":3601,"./de":7853,"./de-at":6111,"./de-at.js":6111,"./de-ch":4697,"./de-ch.js":4697,"./de.js":7853,"./dv":708,"./dv.js":708,"./el":4691,"./el.js":4691,"./en-au":3872,"./en-au.js":3872,"./en-ca":8298,"./en-ca.js":8298,"./en-gb":6195,"./en-gb.js":6195,"./en-ie":6584,"./en-ie.js":6584,"./en-il":5543,"./en-il.js":5543,"./en-in":9033,"./en-in.js":9033,"./en-nz":9402,"./en-nz.js":9402,"./en-sg":3004,"./en-sg.js":3004,"./eo":2934,"./eo.js":2934,"./es":7650,"./es-do":838,"./es-do.js":838,"./es-mx":7730,"./es-mx.js":7730,"./es-us":6575,"./es-us.js":6575,"./es.js":7650,"./et":3035,"./et.js":3035,"./eu":3508,"./eu.js":3508,"./fa":119,"./fa.js":119,"./fi":527,"./fi.js":527,"./fil":5995,"./fil.js":5995,"./fo":2477,"./fo.js":2477,"./fr":5498,"./fr-ca":6435,"./fr-ca.js":6435,"./fr-ch":7892,"./fr-ch.js":7892,"./fr.js":5498,"./fy":7071,"./fy.js":7071,"./ga":1734,"./ga.js":1734,"./gd":217,"./gd.js":217,"./gl":7329,"./gl.js":7329,"./gom-deva":2124,"./gom-deva.js":2124,"./gom-latn":3383,"./gom-latn.js":3383,"./gu":5050,"./gu.js":5050,"./he":1713,"./he.js":1713,"./hi":3861,"./hi.js":3861,"./hr":6308,"./hr.js":6308,"./hu":609,"./hu.js":609,"./hy-am":7160,"./hy-am.js":7160,"./id":4063,"./id.js":4063,"./is":9374,"./is.js":9374,"./it":8383,"./it-ch":1827,"./it-ch.js":1827,"./it.js":8383,"./ja":3827,"./ja.js":3827,"./jv":9722,"./jv.js":9722,"./ka":1794,"./ka.js":1794,"./kk":7088,"./kk.js":7088,"./km":6870,"./km.js":6870,"./kn":4451,"./kn.js":4451,"./ko":3164,"./ko.js":3164,"./ku":8174,"./ku-kmr":6181,"./ku-kmr.js":6181,"./ku.js":8174,"./ky":8474,"./ky.js":8474,"./lb":9680,"./lb.js":9680,"./lo":5867,"./lo.js":5867,"./lt":5766,"./lt.js":5766,"./lv":9532,"./lv.js":9532,"./me":8076,"./me.js":8076,"./mi":1848,"./mi.js":1848,"./mk":306,"./mk.js":306,"./ml":3739,"./ml.js":3739,"./mn":9053,"./mn.js":9053,"./mr":6169,"./mr.js":6169,"./ms":3386,"./ms-my":2297,"./ms-my.js":2297,"./ms.js":3386,"./mt":7075,"./mt.js":7075,"./my":2264,"./my.js":2264,"./nb":2274,"./nb.js":2274,"./ne":8235,"./ne.js":8235,"./nl":2572,"./nl-be":3784,"./nl-be.js":3784,"./nl.js":2572,"./nn":4566,"./nn.js":4566,"./oc-lnc":9330,"./oc-lnc.js":9330,"./pa-in":9849,"./pa-in.js":9849,"./pl":4418,"./pl.js":4418,"./pt":9834,"./pt-br":8303,"./pt-br.js":8303,"./pt.js":9834,"./ro":4457,"./ro.js":4457,"./ru":2271,"./ru.js":2271,"./sd":1221,"./sd.js":1221,"./se":3478,"./se.js":3478,"./si":7538,"./si.js":7538,"./sk":5784,"./sk.js":5784,"./sl":6637,"./sl.js":6637,"./sq":6794,"./sq.js":6794,"./sr":5719,"./sr-cyrl":3322,"./sr-cyrl.js":3322,"./sr.js":5719,"./ss":6e3,"./ss.js":6e3,"./sv":1011,"./sv.js":1011,"./sw":748,"./sw.js":748,"./ta":1025,"./ta.js":1025,"./te":1885,"./te.js":1885,"./tet":8861,"./tet.js":8861,"./tg":6571,"./tg.js":6571,"./th":5802,"./th.js":5802,"./tk":9527,"./tk.js":9527,"./tl-ph":9231,"./tl-ph.js":9231,"./tlh":1052,"./tlh.js":1052,"./tr":5096,"./tr.js":5096,"./tzl":9846,"./tzl.js":9846,"./tzm":1765,"./tzm-latn":7711,"./tzm-latn.js":7711,"./tzm.js":1765,"./ug-cn":8414,"./ug-cn.js":8414,"./uk":6618,"./uk.js":6618,"./ur":158,"./ur.js":158,"./uz":7609,"./uz-latn":2475,"./uz-latn.js":2475,"./uz.js":7609,"./vi":1135,"./vi.js":1135,"./x-pseudo":4051,"./x-pseudo.js":4051,"./yo":2218,"./yo.js":2218,"./zh-cn":2648,"./zh-cn.js":2648,"./zh-hk":1632,"./zh-hk.js":1632,"./zh-mo":1541,"./zh-mo.js":1541,"./zh-tw":304,"./zh-tw.js":304};function n(e){var a=r(e);return t(a)}function r(e){if(!t.o(s,e)){var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}return s[e]}n.keys=function(){return Object.keys(s)},n.resolve=r,e.exports=n,n.id=5358},5093:function(e,a,t){(e=t.nmd(e)).exports=function(){"use strict";var a,s;function n(){return a.apply(null,arguments)}function r(e){a=e}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function d(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function _(e,a){return Object.prototype.hasOwnProperty.call(e,a)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var a;for(a in e)if(_(e,a))return!1;return!0}function u(e){return void 0===e}function m(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function M(e,a){var t,s=[],n=e.length;for(t=0;t>>0;for(a=0;a0)for(t=0;t=0?t?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+s}var F=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,N={},J={};function R(e,a,t,s){var n=s;"string"==typeof s&&(n=function(){return this[s]()}),e&&(J[e]=n),a&&(J[a[0]]=function(){return E(n.apply(this,arguments),a[1],a[2])}),t&&(J[t]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function C(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function I(e){var a,t,s=e.match(F);for(a=0,t=s.length;a=0&&z.test(e);)e=e.replace(z,s),z.lastIndex=0,t-=1;return e}var V={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function q(e){var a=this._longDateFormat[e],t=this._longDateFormat[e.toUpperCase()];return a||!t?a:(this._longDateFormat[e]=t.match(F).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var B="Invalid date";function K(){return this._invalidDate}var Z="%d",$=/\d{1,2}/;function Q(e){return this._ordinal.replace("%d",e)}var X={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ee(e,a,t,s){var n=this._relativeTime[t];return j(n)?n(e,a,t,s):n.replace(/%d/i,e)}function ae(e,a){var t=this._relativeTime[e>0?"future":"past"];return j(t)?t(a):t.replace(/%s/i,a)}var te={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function se(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function ne(e){var a,t,s={};for(t in e)_(e,t)&&(a=se(t))&&(s[a]=e[t]);return s}var re={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ie(e){var a,t=[];for(a in e)_(e,a)&&t.push({unit:a,priority:re[a]});return t.sort((function(e,a){return e.priority-a.priority})),t}var de,_e=/\d/,oe=/\d\d/,ue=/\d{3}/,me=/\d{4}/,le=/[+-]?\d{6}/,Me=/\d\d?/,he=/\d\d\d\d?/,ce=/\d\d\d\d\d\d?/,Le=/\d{1,3}/,Ye=/\d{1,4}/,ye=/[+-]?\d{1,6}/,fe=/\d+/,ke=/[+-]?\d+/,pe=/Z|[+-]\d\d:?\d\d/gi,De=/Z|[+-]\d\d(?::?\d\d)?/gi,Te=/[+-]?\d+(\.\d{1,3})?/,ge=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,we=/^[1-9]\d?/,ve=/^([1-9]\d|\d)/;function be(e,a,t){de[e]=j(a)?a:function(e,s){return e&&t?t:a}}function He(e,a){return _(de,e)?de[e](a._strict,a._locale):new RegExp(Se(e))}function Se(e){return je(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,a,t,s,n){return a||t||s||n})))}function je(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function xe(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Pe(e){var a=+e,t=0;return 0!==a&&isFinite(a)&&(t=xe(a)),t}de={};var Oe={};function We(e,a){var t,s,n=a;for("string"==typeof e&&(e=[e]),m(a)&&(n=function(e,t){t[a]=Pe(e)}),s=e.length,t=0;t68?1900:2e3)};var Be,Ke=$e("FullYear",!0);function Ze(){return Fe(this.year())}function $e(e,a){return function(t){return null!=t?(Xe(this,e,t),n.updateOffset(this,a),this):Qe(this,e)}}function Qe(e,a){if(!e.isValid())return NaN;var t=e._d,s=e._isUTC;switch(a){case"Milliseconds":return s?t.getUTCMilliseconds():t.getMilliseconds();case"Seconds":return s?t.getUTCSeconds():t.getSeconds();case"Minutes":return s?t.getUTCMinutes():t.getMinutes();case"Hours":return s?t.getUTCHours():t.getHours();case"Date":return s?t.getUTCDate():t.getDate();case"Day":return s?t.getUTCDay():t.getDay();case"Month":return s?t.getUTCMonth():t.getMonth();case"FullYear":return s?t.getUTCFullYear():t.getFullYear();default:return NaN}}function Xe(e,a,t){var s,n,r,i,d;if(e.isValid()&&!isNaN(t)){switch(s=e._d,n=e._isUTC,a){case"Milliseconds":return void(n?s.setUTCMilliseconds(t):s.setMilliseconds(t));case"Seconds":return void(n?s.setUTCSeconds(t):s.setSeconds(t));case"Minutes":return void(n?s.setUTCMinutes(t):s.setMinutes(t));case"Hours":return void(n?s.setUTCHours(t):s.setHours(t));case"Date":return void(n?s.setUTCDate(t):s.setDate(t));case"FullYear":break;default:return}r=t,i=e.month(),d=29!==(d=e.date())||1!==i||Fe(r)?d:28,n?s.setUTCFullYear(r,i,d):s.setFullYear(r,i,d)}}function ea(e){return j(this[e=se(e)])?this[e]():this}function aa(e,a){if("object"==typeof e){var t,s=ie(e=ne(e)),n=s.length;for(t=0;t=0?(d=new Date(e+400,a,t,s,n,r,i),isFinite(d.getFullYear())&&d.setFullYear(e)):d=new Date(e,a,t,s,n,r,i),d}function ka(e){var a,t;return e<100&&e>=0?((t=Array.prototype.slice.call(arguments))[0]=e+400,a=new Date(Date.UTC.apply(null,t)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(e)):a=new Date(Date.UTC.apply(null,arguments)),a}function pa(e,a,t){var s=7+a-t;return-(7+ka(e,0,s).getUTCDay()-a)%7+s-1}function Da(e,a,t,s,n){var r,i,d=1+7*(a-1)+(7+t-s)%7+pa(e,s,n);return d<=0?i=qe(r=e-1)+d:d>qe(e)?(r=e+1,i=d-qe(e)):(r=e,i=d),{year:r,dayOfYear:i}}function Ta(e,a,t){var s,n,r=pa(e.year(),a,t),i=Math.floor((e.dayOfYear()-r-1)/7)+1;return i<1?s=i+ga(n=e.year()-1,a,t):i>ga(e.year(),a,t)?(s=i-ga(e.year(),a,t),n=e.year()+1):(n=e.year(),s=i),{week:s,year:n}}function ga(e,a,t){var s=pa(e,a,t),n=pa(e+1,a,t);return(qe(e)-s+n)/7}function wa(e){return Ta(e,this._week.dow,this._week.doy).week}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),be("w",Me,we),be("ww",Me,oe),be("W",Me,we),be("WW",Me,oe),Ae(["w","ww","W","WW"],(function(e,a,t,s){a[s.substr(0,1)]=Pe(e)}));var va={dow:0,doy:6};function ba(){return this._week.dow}function Ha(){return this._week.doy}function Sa(e){var a=this.localeData().week(this);return null==e?a:this.add(7*(e-a),"d")}function ja(e){var a=Ta(this,1,4).week;return null==e?a:this.add(7*(e-a),"d")}function xa(e,a){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=a.weekdaysParse(e))?e:null:parseInt(e,10)}function Pa(e,a){return"string"==typeof e?a.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Oa(e,a){return e.slice(a,7).concat(e.slice(0,a))}R("d",0,"do","day"),R("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),R("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),R("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),be("d",Me),be("e",Me),be("E",Me),be("dd",(function(e,a){return a.weekdaysMinRegex(e)})),be("ddd",(function(e,a){return a.weekdaysShortRegex(e)})),be("dddd",(function(e,a){return a.weekdaysRegex(e)})),Ae(["dd","ddd","dddd"],(function(e,a,t,s){var n=t._locale.weekdaysParse(e,s,t._strict);null!=n?a.d=n:Y(t).invalidWeekday=e})),Ae(["d","e","E"],(function(e,a,t,s){a[s]=Pe(e)}));var Wa="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Aa="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ea="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Fa=ge,za=ge,Na=ge;function Ja(e,a){var t=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(a)?"format":"standalone"];return!0===e?Oa(t,this._week.dow):e?t[e.day()]:t}function Ra(e){return!0===e?Oa(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ca(e){return!0===e?Oa(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ia(e,a,t){var s,n,r,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=c([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return t?"dddd"===a?-1!==(n=Be.call(this._weekdaysParse,i))?n:null:"ddd"===a?-1!==(n=Be.call(this._shortWeekdaysParse,i))?n:null:-1!==(n=Be.call(this._minWeekdaysParse,i))?n:null:"dddd"===a?-1!==(n=Be.call(this._weekdaysParse,i))||-1!==(n=Be.call(this._shortWeekdaysParse,i))||-1!==(n=Be.call(this._minWeekdaysParse,i))?n:null:"ddd"===a?-1!==(n=Be.call(this._shortWeekdaysParse,i))||-1!==(n=Be.call(this._weekdaysParse,i))||-1!==(n=Be.call(this._minWeekdaysParse,i))?n:null:-1!==(n=Be.call(this._minWeekdaysParse,i))||-1!==(n=Be.call(this._weekdaysParse,i))||-1!==(n=Be.call(this._shortWeekdaysParse,i))?n:null}function Ua(e,a,t){var s,n,r;if(this._weekdaysParseExact)return Ia.call(this,e,a,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(n=c([2e3,1]).day(s),t&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),t&&"dddd"===a&&this._fullWeekdaysParse[s].test(e))return s;if(t&&"ddd"===a&&this._shortWeekdaysParse[s].test(e))return s;if(t&&"dd"===a&&this._minWeekdaysParse[s].test(e))return s;if(!t&&this._weekdaysParse[s].test(e))return s}}function Ga(e){if(!this.isValid())return null!=e?this:NaN;var a=Qe(this,"Day");return null!=e?(e=xa(e,this.localeData()),this.add(e-a,"d")):a}function Va(e){if(!this.isValid())return null!=e?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return null==e?a:this.add(e-a,"d")}function qa(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var a=Pa(e,this.localeData());return this.day(this.day()%7?a:a-7)}return this.day()||7}function Ba(e){return this._weekdaysParseExact?(_(this,"_weekdaysRegex")||$a.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(_(this,"_weekdaysRegex")||(this._weekdaysRegex=Fa),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ka(e){return this._weekdaysParseExact?(_(this,"_weekdaysRegex")||$a.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(_(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=za),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Za(e){return this._weekdaysParseExact?(_(this,"_weekdaysRegex")||$a.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(_(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Na),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $a(){function e(e,a){return a.length-e.length}var a,t,s,n,r,i=[],d=[],_=[],o=[];for(a=0;a<7;a++)t=c([2e3,1]).day(a),s=je(this.weekdaysMin(t,"")),n=je(this.weekdaysShort(t,"")),r=je(this.weekdays(t,"")),i.push(s),d.push(n),_.push(r),o.push(s),o.push(n),o.push(r);i.sort(e),d.sort(e),_.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Qa(){return this.hours()%12||12}function Xa(){return this.hours()||24}function et(e,a){R(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)}))}function at(e,a){return a._meridiemParse}function tt(e){return"p"===(e+"").toLowerCase().charAt(0)}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,Qa),R("k",["kk",2],0,Xa),R("hmm",0,0,(function(){return""+Qa.apply(this)+E(this.minutes(),2)})),R("hmmss",0,0,(function(){return""+Qa.apply(this)+E(this.minutes(),2)+E(this.seconds(),2)})),R("Hmm",0,0,(function(){return""+this.hours()+E(this.minutes(),2)})),R("Hmmss",0,0,(function(){return""+this.hours()+E(this.minutes(),2)+E(this.seconds(),2)})),et("a",!0),et("A",!1),be("a",at),be("A",at),be("H",Me,ve),be("h",Me,we),be("k",Me,we),be("HH",Me,oe),be("hh",Me,oe),be("kk",Me,oe),be("hmm",he),be("hmmss",ce),be("Hmm",he),be("Hmmss",ce),We(["H","HH"],Re),We(["k","kk"],(function(e,a,t){var s=Pe(e);a[Re]=24===s?0:s})),We(["a","A"],(function(e,a,t){t._isPm=t._locale.isPM(e),t._meridiem=e})),We(["h","hh"],(function(e,a,t){a[Re]=Pe(e),Y(t).bigHour=!0})),We("hmm",(function(e,a,t){var s=e.length-2;a[Re]=Pe(e.substr(0,s)),a[Ce]=Pe(e.substr(s)),Y(t).bigHour=!0})),We("hmmss",(function(e,a,t){var s=e.length-4,n=e.length-2;a[Re]=Pe(e.substr(0,s)),a[Ce]=Pe(e.substr(s,2)),a[Ie]=Pe(e.substr(n)),Y(t).bigHour=!0})),We("Hmm",(function(e,a,t){var s=e.length-2;a[Re]=Pe(e.substr(0,s)),a[Ce]=Pe(e.substr(s))})),We("Hmmss",(function(e,a,t){var s=e.length-4,n=e.length-2;a[Re]=Pe(e.substr(0,s)),a[Ce]=Pe(e.substr(s,2)),a[Ie]=Pe(e.substr(n))}));var st=/[ap]\.?m?\.?/i,nt=$e("Hours",!0);function rt(e,a,t){return e>11?t?"pm":"PM":t?"am":"AM"}var it,dt={calendar:W,longDateFormat:V,invalidDate:B,ordinal:Z,dayOfMonthOrdinalParse:$,relativeTime:X,months:na,monthsShort:ra,week:va,weekdays:Wa,weekdaysMin:Ea,weekdaysShort:Aa,meridiemParse:st},_t={},ot={};function ut(e,a){var t,s=Math.min(e.length,a.length);for(t=0;t0;){if(s=ht(n.slice(0,a).join("-")))return s;if(t&&t.length>=a&&ut(n,t)>=a-1)break;a--}r++}return it}function Mt(e){return!(!e||!e.match("^[^/\\\\]*$"))}function ht(a){var s=null;if(void 0===_t[a]&&e&&e.exports&&Mt(a))try{s=it._abbr,t(5358)("./"+a),ct(s)}catch(e){_t[a]=null}return _t[a]}function ct(e,a){var t;return e&&((t=u(a)?yt(e):Lt(e,a))?it=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),it._abbr}function Lt(e,a){if(null!==a){var t,s=dt;if(a.abbr=e,null!=_t[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=_t[e]._config;else if(null!=a.parentLocale)if(null!=_t[a.parentLocale])s=_t[a.parentLocale]._config;else{if(null==(t=ht(a.parentLocale)))return ot[a.parentLocale]||(ot[a.parentLocale]=[]),ot[a.parentLocale].push({name:e,config:a}),null;s=t._config}return _t[e]=new O(P(s,a)),ot[e]&&ot[e].forEach((function(e){Lt(e.name,e.config)})),ct(e),_t[e]}return delete _t[e],null}function Yt(e,a){if(null!=a){var t,s,n=dt;null!=_t[e]&&null!=_t[e].parentLocale?_t[e].set(P(_t[e]._config,a)):(null!=(s=ht(e))&&(n=s._config),a=P(n,a),null==s&&(a.abbr=e),(t=new O(a)).parentLocale=_t[e],_t[e]=t),ct(e)}else null!=_t[e]&&(null!=_t[e].parentLocale?(_t[e]=_t[e].parentLocale,e===ct()&&ct(e)):null!=_t[e]&&delete _t[e]);return _t[e]}function yt(e){var a;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return it;if(!i(e)){if(a=ht(e))return a;e=[e]}return lt(e)}function ft(){return b(_t)}function kt(e){var a,t=e._a;return t&&-2===Y(e).overflow&&(a=t[Ne]<0||t[Ne]>11?Ne:t[Je]<1||t[Je]>sa(t[ze],t[Ne])?Je:t[Re]<0||t[Re]>24||24===t[Re]&&(0!==t[Ce]||0!==t[Ie]||0!==t[Ue])?Re:t[Ce]<0||t[Ce]>59?Ce:t[Ie]<0||t[Ie]>59?Ie:t[Ue]<0||t[Ue]>999?Ue:-1,Y(e)._overflowDayOfYear&&(aJe)&&(a=Je),Y(e)._overflowWeeks&&-1===a&&(a=Ge),Y(e)._overflowWeekday&&-1===a&&(a=Ve),Y(e).overflow=a),e}var pt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Tt=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],wt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],vt=/^\/?Date\((-?\d+)/i,bt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ht={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function St(e){var a,t,s,n,r,i,d=e._i,_=pt.exec(d)||Dt.exec(d),o=gt.length,u=wt.length;if(_){for(Y(e).iso=!0,a=0,t=o;aqe(r)||0===e._dayOfYear)&&(Y(e)._overflowDayOfYear=!0),t=ka(r,0,e._dayOfYear),e._a[Ne]=t.getUTCMonth(),e._a[Je]=t.getUTCDate()),a=0;a<3&&null==e._a[a];++a)e._a[a]=i[a]=s[a];for(;a<7;a++)e._a[a]=i[a]=null==e._a[a]?2===a?1:0:e._a[a];24===e._a[Re]&&0===e._a[Ce]&&0===e._a[Ie]&&0===e._a[Ue]&&(e._nextDay=!0,e._a[Re]=0),e._d=(e._useUTC?ka:fa).apply(null,i),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Re]=24),e._w&&void 0!==e._w.d&&e._w.d!==n&&(Y(e).weekdayMismatch=!0)}}function Jt(e){var a,t,s,n,r,i,d,_,o;null!=(a=e._w).GG||null!=a.W||null!=a.E?(r=1,i=4,t=Ft(a.GG,e._a[ze],Ta(Kt(),1,4).year),s=Ft(a.W,1),((n=Ft(a.E,1))<1||n>7)&&(_=!0)):(r=e._locale._week.dow,i=e._locale._week.doy,o=Ta(Kt(),r,i),t=Ft(a.gg,e._a[ze],o.year),s=Ft(a.w,o.week),null!=a.d?((n=a.d)<0||n>6)&&(_=!0):null!=a.e?(n=a.e+r,(a.e<0||a.e>6)&&(_=!0)):n=r),s<1||s>ga(t,r,i)?Y(e)._overflowWeeks=!0:null!=_?Y(e)._overflowWeekday=!0:(d=Da(t,s,n,r,i),e._a[ze]=d.year,e._dayOfYear=d.dayOfYear)}function Rt(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],Y(e).empty=!0;var a,t,s,r,i,d,_,o=""+e._i,u=o.length,m=0;for(_=(s=G(e._f,e._locale).match(F)||[]).length,a=0;a<_;a++)r=s[a],(t=(o.match(He(r,e))||[])[0])&&((i=o.substr(0,o.indexOf(t))).length>0&&Y(e).unusedInput.push(i),o=o.slice(o.indexOf(t)+t.length),m+=t.length),J[r]?(t?Y(e).empty=!1:Y(e).unusedTokens.push(r),Ee(r,t,e)):e._strict&&!t&&Y(e).unusedTokens.push(r);Y(e).charsLeftOver=u-m,o.length>0&&Y(e).unusedInput.push(o),e._a[Re]<=12&&!0===Y(e).bigHour&&e._a[Re]>0&&(Y(e).bigHour=void 0),Y(e).parsedDateParts=e._a.slice(0),Y(e).meridiem=e._meridiem,e._a[Re]=Ct(e._locale,e._a[Re],e._meridiem),null!==(d=Y(e).era)&&(e._a[ze]=e._locale.erasConvertYear(d,e._a[ze])),Nt(e),kt(e)}else At(e);else St(e)}function Ct(e,a,t){var s;return null==t?a:null!=e.meridiemHour?e.meridiemHour(a,t):null!=e.isPM?((s=e.isPM(t))&&a<12&&(a+=12),s||12!==a||(a=0),a):a}function It(e){var a,t,s,n,r,i,d=!1,_=e._f.length;if(0===_)return Y(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;n<_;n++)r=0,i=!1,a=D({},e),null!=e._useUTC&&(a._useUTC=e._useUTC),a._f=e._f[n],Rt(a),y(a)&&(i=!0),r+=Y(a).charsLeftOver,r+=10*Y(a).unusedTokens.length,Y(a).score=r,d?rthis?this:e:f()}));function Qt(e,a){var t,s;if(1===a.length&&i(a[0])&&(a=a[0]),!a.length)return Kt();for(t=a[0],s=1;sthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ds(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,a={};return D(a,this),(a=Vt(a))._a?(e=a._isUTC?c(a._a):Kt(a._a),this._isDSTShifted=this.isValid()&&os(a._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ts(){return!!this.isValid()&&!this._isUTC}function gs(){return!!this.isValid()&&this._isUTC}function ws(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var vs=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,bs=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Hs(e,a){var t,s,n,r=e,i=null;return ds(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:m(e)||!isNaN(+e)?(r={},a?r[a]=+e:r.milliseconds=+e):(i=vs.exec(e))?(t="-"===i[1]?-1:1,r={y:0,d:Pe(i[Je])*t,h:Pe(i[Re])*t,m:Pe(i[Ce])*t,s:Pe(i[Ie])*t,ms:Pe(_s(1e3*i[Ue]))*t}):(i=bs.exec(e))?(t="-"===i[1]?-1:1,r={y:Ss(i[2],t),M:Ss(i[3],t),w:Ss(i[4],t),d:Ss(i[5],t),h:Ss(i[6],t),m:Ss(i[7],t),s:Ss(i[8],t)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(n=xs(Kt(r.from),Kt(r.to)),(r={}).ms=n.milliseconds,r.M=n.months),s=new is(r),ds(e)&&_(e,"_locale")&&(s._locale=e._locale),ds(e)&&_(e,"_isValid")&&(s._isValid=e._isValid),s}function Ss(e,a){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*a}function js(e,a){var t={};return t.months=a.month()-e.month()+12*(a.year()-e.year()),e.clone().add(t.months,"M").isAfter(a)&&--t.months,t.milliseconds=+a-+e.clone().add(t.months,"M"),t}function xs(e,a){var t;return e.isValid()&&a.isValid()?(a=Ms(a,e),e.isBefore(a)?t=js(e,a):((t=js(a,e)).milliseconds=-t.milliseconds,t.months=-t.months),t):{milliseconds:0,months:0}}function Ps(e,a){return function(t,s){var n;return null===s||isNaN(+s)||(S(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=t,t=s,s=n),Os(this,Hs(t,s),e),this}}function Os(e,a,t,s){var r=a._milliseconds,i=_s(a._days),d=_s(a._months);e.isValid()&&(s=null==s||s,d&&Ma(e,Qe(e,"Month")+d*t),i&&Xe(e,"Date",Qe(e,"Date")+i*t),r&&e._d.setTime(e._d.valueOf()+r*t),s&&n.updateOffset(e,i||d))}Hs.fn=is.prototype,Hs.invalid=rs;var Ws=Ps(1,"add"),As=Ps(-1,"subtract");function Es(e){return"string"==typeof e||e instanceof String}function Fs(e){return g(e)||l(e)||Es(e)||m(e)||Ns(e)||zs(e)||null==e}function zs(e){var a,t,s=d(e)&&!o(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i=r.length;for(a=0;at.valueOf():t.valueOf()9999?U(t,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):j(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(t,"Z")):U(t,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function en(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,a,t,s,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",t="-MM-DD[T]HH:mm:ss.SSS",s=r+'[")]',this.format(e+a+t+s)}function an(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var a=U(this,e);return this.localeData().postformat(a)}function tn(e,a){return this.isValid()&&(g(e)&&e.isValid()||Kt(e).isValid())?Hs({to:this,from:e}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function sn(e){return this.from(Kt(),e)}function nn(e,a){return this.isValid()&&(g(e)&&e.isValid()||Kt(e).isValid())?Hs({from:this,to:e}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function rn(e){return this.to(Kt(),e)}function dn(e){var a;return void 0===e?this._locale._abbr:(null!=(a=yt(e))&&(this._locale=a),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var _n=v("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function on(){return this._locale}var un=1e3,mn=60*un,ln=60*mn,Mn=3506328*ln;function hn(e,a){return(e%a+a)%a}function cn(e,a,t){return e<100&&e>=0?new Date(e+400,a,t)-Mn:new Date(e,a,t).valueOf()}function Ln(e,a,t){return e<100&&e>=0?Date.UTC(e+400,a,t)-Mn:Date.UTC(e,a,t)}function Yn(e){var a,t;if(void 0===(e=se(e))||"millisecond"===e||!this.isValid())return this;switch(t=this._isUTC?Ln:cn,e){case"year":a=t(this.year(),0,1);break;case"quarter":a=t(this.year(),this.month()-this.month()%3,1);break;case"month":a=t(this.year(),this.month(),1);break;case"week":a=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=t(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=hn(a+(this._isUTC?0:this.utcOffset()*mn),ln);break;case"minute":a=this._d.valueOf(),a-=hn(a,mn);break;case"second":a=this._d.valueOf(),a-=hn(a,un)}return this._d.setTime(a),n.updateOffset(this,!0),this}function yn(e){var a,t;if(void 0===(e=se(e))||"millisecond"===e||!this.isValid())return this;switch(t=this._isUTC?Ln:cn,e){case"year":a=t(this.year()+1,0,1)-1;break;case"quarter":a=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=t(this.year(),this.month()+1,1)-1;break;case"week":a=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=ln-hn(a+(this._isUTC?0:this.utcOffset()*mn),ln)-1;break;case"minute":a=this._d.valueOf(),a+=mn-hn(a,mn)-1;break;case"second":a=this._d.valueOf(),a+=un-hn(a,un)-1}return this._d.setTime(a),n.updateOffset(this,!0),this}function fn(){return this._d.valueOf()-6e4*(this._offset||0)}function kn(){return Math.floor(this.valueOf()/1e3)}function pn(){return new Date(this.valueOf())}function Dn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Tn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function gn(){return this.isValid()?this.toISOString():null}function wn(){return y(this)}function vn(){return h({},Y(this))}function bn(){return Y(this).overflow}function Hn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Sn(e,a){var t,s,r,i=this._eras||yt("en")._eras;for(t=0,s=i.length;t=0)return _[s]}function xn(e,a){var t=e.since<=e.until?1:-1;return void 0===a?n(e.since).year():n(e.since).year()+(a-e.offset)*t}function Pn(){var e,a,t,s=this.localeData().eras();for(e=0,a=s.length;e(r=ga(e,s,n))&&(a=r),Qn.call(this,e,a,t,s,n))}function Qn(e,a,t,s,n){var r=Da(e,a,t,s,n),i=ka(r.year,0,r.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}function Xn(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),be("N",Nn),be("NN",Nn),be("NNN",Nn),be("NNNN",Jn),be("NNNNN",Rn),We(["N","NN","NNN","NNNN","NNNNN"],(function(e,a,t,s){var n=t._locale.erasParse(e,s,t._strict);n?Y(t).era=n:Y(t).invalidEra=e})),be("y",fe),be("yy",fe),be("yyy",fe),be("yyyy",fe),be("yo",Cn),We(["y","yy","yyy","yyyy"],ze),We(["yo"],(function(e,a,t,s){var n;t._locale._eraYearOrdinalRegex&&(n=e.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?a[ze]=t._locale.eraYearOrdinalParse(e,n):a[ze]=parseInt(e,10)})),R(0,["gg",2],0,(function(){return this.weekYear()%100})),R(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Un("gggg","weekYear"),Un("ggggg","weekYear"),Un("GGGG","isoWeekYear"),Un("GGGGG","isoWeekYear"),be("G",ke),be("g",ke),be("GG",Me,oe),be("gg",Me,oe),be("GGGG",Ye,me),be("gggg",Ye,me),be("GGGGG",ye,le),be("ggggg",ye,le),Ae(["gggg","ggggg","GGGG","GGGGG"],(function(e,a,t,s){a[s.substr(0,2)]=Pe(e)})),Ae(["gg","GG"],(function(e,a,t,s){a[s]=n.parseTwoDigitYear(e)})),R("Q",0,"Qo","quarter"),be("Q",_e),We("Q",(function(e,a){a[Ne]=3*(Pe(e)-1)})),R("D",["DD",2],"Do","date"),be("D",Me,we),be("DD",Me,oe),be("Do",(function(e,a){return e?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient})),We(["D","DD"],Je),We("Do",(function(e,a){a[Je]=Pe(e.match(Me)[0])}));var er=$e("Date",!0);function ar(e){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?a:this.add(e-a,"d")}R("DDD",["DDDD",3],"DDDo","dayOfYear"),be("DDD",Le),be("DDDD",ue),We(["DDD","DDDD"],(function(e,a,t){t._dayOfYear=Pe(e)})),R("m",["mm",2],0,"minute"),be("m",Me,ve),be("mm",Me,oe),We(["m","mm"],Ce);var tr=$e("Minutes",!1);R("s",["ss",2],0,"second"),be("s",Me,ve),be("ss",Me,oe),We(["s","ss"],Ie);var sr,nr,rr=$e("Seconds",!1);for(R("S",0,0,(function(){return~~(this.millisecond()/100)})),R(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),R(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),R(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),R(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),R(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),R(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),be("S",Le,_e),be("SS",Le,oe),be("SSS",Le,ue),sr="SSSS";sr.length<=9;sr+="S")be(sr,fe);function ir(e,a){a[Ue]=Pe(1e3*("0."+e))}for(sr="S";sr.length<=9;sr+="S")We(sr,ir);function dr(){return this._isUTC?"UTC":""}function _r(){return this._isUTC?"Coordinated Universal Time":""}nr=$e("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var or=T.prototype;function ur(e){return Kt(1e3*e)}function mr(){return Kt.apply(null,arguments).parseZone()}function lr(e){return e}or.add=Ws,or.calendar=Cs,or.clone=Is,or.diff=Zs,or.endOf=yn,or.format=an,or.from=tn,or.fromNow=sn,or.to=nn,or.toNow=rn,or.get=ea,or.invalidAt=bn,or.isAfter=Us,or.isBefore=Gs,or.isBetween=Vs,or.isSame=qs,or.isSameOrAfter=Bs,or.isSameOrBefore=Ks,or.isValid=wn,or.lang=_n,or.locale=dn,or.localeData=on,or.max=$t,or.min=Zt,or.parsingFlags=vn,or.set=aa,or.startOf=Yn,or.subtract=As,or.toArray=Dn,or.toObject=Tn,or.toDate=pn,or.toISOString=Xs,or.inspect=en,"undefined"!=typeof Symbol&&null!=Symbol.for&&(or[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),or.toJSON=gn,or.toString=Qs,or.unix=kn,or.valueOf=fn,or.creationData=Hn,or.eraName=Pn,or.eraNarrow=On,or.eraAbbr=Wn,or.eraYear=An,or.year=Ke,or.isLeapYear=Ze,or.weekYear=Gn,or.isoWeekYear=Vn,or.quarter=or.quarters=Xn,or.month=ha,or.daysInMonth=ca,or.week=or.weeks=Sa,or.isoWeek=or.isoWeeks=ja,or.weeksInYear=Kn,or.weeksInWeekYear=Zn,or.isoWeeksInYear=qn,or.isoWeeksInISOWeekYear=Bn,or.date=er,or.day=or.days=Ga,or.weekday=Va,or.isoWeekday=qa,or.dayOfYear=ar,or.hour=or.hours=nt,or.minute=or.minutes=tr,or.second=or.seconds=rr,or.millisecond=or.milliseconds=nr,or.utcOffset=cs,or.utc=Ys,or.local=ys,or.parseZone=fs,or.hasAlignedHourOffset=ks,or.isDST=ps,or.isLocal=Ts,or.isUtcOffset=gs,or.isUtc=ws,or.isUTC=ws,or.zoneAbbr=dr,or.zoneName=_r,or.dates=v("dates accessor is deprecated. Use date instead.",er),or.months=v("months accessor is deprecated. Use month instead",ha),or.years=v("years accessor is deprecated. Use year instead",Ke),or.zone=v("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ls),or.isDSTShifted=v("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ds);var Mr=O.prototype;function hr(e,a,t,s){var n=yt(),r=c().set(s,a);return n[t](r,e)}function cr(e,a,t){if(m(e)&&(a=e,e=void 0),e=e||"",null!=a)return hr(e,a,t,"month");var s,n=[];for(s=0;s<12;s++)n[s]=hr(e,s,t,"month");return n}function Lr(e,a,t,s){"boolean"==typeof e?(m(a)&&(t=a,a=void 0),a=a||""):(t=a=e,e=!1,m(a)&&(t=a,a=void 0),a=a||"");var n,r=yt(),i=e?r._week.dow:0,d=[];if(null!=t)return hr(a,(t+i)%7,s,"day");for(n=0;n<7;n++)d[n]=hr(a,(n+i)%7,s,"day");return d}function Yr(e,a){return cr(e,a,"months")}function yr(e,a){return cr(e,a,"monthsShort")}function fr(e,a,t){return Lr(e,a,t,"weekdays")}function kr(e,a,t){return Lr(e,a,t,"weekdaysShort")}function pr(e,a,t){return Lr(e,a,t,"weekdaysMin")}Mr.calendar=A,Mr.longDateFormat=q,Mr.invalidDate=K,Mr.ordinal=Q,Mr.preparse=lr,Mr.postformat=lr,Mr.relativeTime=ee,Mr.pastFuture=ae,Mr.set=x,Mr.eras=Sn,Mr.erasParse=jn,Mr.erasConvertYear=xn,Mr.erasAbbrRegex=Fn,Mr.erasNameRegex=En,Mr.erasNarrowRegex=zn,Mr.months=oa,Mr.monthsShort=ua,Mr.monthsParse=la,Mr.monthsRegex=Ya,Mr.monthsShortRegex=La,Mr.week=wa,Mr.firstDayOfYear=Ha,Mr.firstDayOfWeek=ba,Mr.weekdays=Ja,Mr.weekdaysMin=Ca,Mr.weekdaysShort=Ra,Mr.weekdaysParse=Ua,Mr.weekdaysRegex=Ba,Mr.weekdaysShortRegex=Ka,Mr.weekdaysMinRegex=Za,Mr.isPM=tt,Mr.meridiem=rt,ct("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var a=e%10;return e+(1===Pe(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")}}),n.lang=v("moment.lang is deprecated. Use moment.locale instead.",ct),n.langData=v("moment.langData is deprecated. Use moment.localeData instead.",yt);var Dr=Math.abs;function Tr(){var e=this._data;return this._milliseconds=Dr(this._milliseconds),this._days=Dr(this._days),this._months=Dr(this._months),e.milliseconds=Dr(e.milliseconds),e.seconds=Dr(e.seconds),e.minutes=Dr(e.minutes),e.hours=Dr(e.hours),e.months=Dr(e.months),e.years=Dr(e.years),this}function gr(e,a,t,s){var n=Hs(a,t);return e._milliseconds+=s*n._milliseconds,e._days+=s*n._days,e._months+=s*n._months,e._bubble()}function wr(e,a){return gr(this,e,a,1)}function vr(e,a){return gr(this,e,a,-1)}function br(e){return e<0?Math.floor(e):Math.ceil(e)}function Hr(){var e,a,t,s,n,r=this._milliseconds,i=this._days,d=this._months,_=this._data;return r>=0&&i>=0&&d>=0||r<=0&&i<=0&&d<=0||(r+=864e5*br(jr(d)+i),i=0,d=0),_.milliseconds=r%1e3,e=xe(r/1e3),_.seconds=e%60,a=xe(e/60),_.minutes=a%60,t=xe(a/60),_.hours=t%24,i+=xe(t/24),d+=n=xe(Sr(i)),i-=br(jr(n)),s=xe(d/12),d%=12,_.days=i,_.months=d,_.years=s,this}function Sr(e){return 4800*e/146097}function jr(e){return 146097*e/4800}function xr(e){if(!this.isValid())return NaN;var a,t,s=this._milliseconds;if("month"===(e=se(e))||"quarter"===e||"year"===e)switch(a=this._days+s/864e5,t=this._months+Sr(a),e){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(a=this._days+Math.round(jr(this._months)),e){case"week":return a/7+s/6048e5;case"day":return a+s/864e5;case"hour":return 24*a+s/36e5;case"minute":return 1440*a+s/6e4;case"second":return 86400*a+s/1e3;case"millisecond":return Math.floor(864e5*a)+s;default:throw new Error("Unknown unit "+e)}}function Pr(e){return function(){return this.as(e)}}var Or=Pr("ms"),Wr=Pr("s"),Ar=Pr("m"),Er=Pr("h"),Fr=Pr("d"),zr=Pr("w"),Nr=Pr("M"),Jr=Pr("Q"),Rr=Pr("y"),Cr=Or;function Ir(){return Hs(this)}function Ur(e){return e=se(e),this.isValid()?this[e+"s"]():NaN}function Gr(e){return function(){return this.isValid()?this._data[e]:NaN}}var Vr=Gr("milliseconds"),qr=Gr("seconds"),Br=Gr("minutes"),Kr=Gr("hours"),Zr=Gr("days"),$r=Gr("months"),Qr=Gr("years");function Xr(){return xe(this.days()/7)}var ei=Math.round,ai={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ti(e,a,t,s,n){return n.relativeTime(a||1,!!t,e,s)}function si(e,a,t,s){var n=Hs(e).abs(),r=ei(n.as("s")),i=ei(n.as("m")),d=ei(n.as("h")),_=ei(n.as("d")),o=ei(n.as("M")),u=ei(n.as("w")),m=ei(n.as("y")),l=r<=t.ss&&["s",r]||r0,l[4]=s,ti.apply(null,l)}function ni(e){return void 0===e?ei:"function"==typeof e&&(ei=e,!0)}function ri(e,a){return void 0!==ai[e]&&(void 0===a?ai[e]:(ai[e]=a,"s"===e&&(ai.ss=a-1),!0))}function ii(e,a){if(!this.isValid())return this.localeData().invalidDate();var t,s,n=!1,r=ai;return"object"==typeof e&&(a=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof a&&(r=Object.assign({},ai,a),null!=a.s&&null==a.ss&&(r.ss=a.s-1)),s=si(this,!n,r,t=this.localeData()),n&&(s=t.pastFuture(+this,s)),t.postformat(s)}var di=Math.abs;function _i(e){return(e>0)-(e<0)||+e}function oi(){if(!this.isValid())return this.localeData().invalidDate();var e,a,t,s,n,r,i,d,_=di(this._milliseconds)/1e3,o=di(this._days),u=di(this._months),m=this.asSeconds();return m?(e=xe(_/60),a=xe(e/60),_%=60,e%=60,t=xe(u/12),u%=12,s=_?_.toFixed(3).replace(/\.?0+$/,""):"",n=m<0?"-":"",r=_i(this._months)!==_i(m)?"-":"",i=_i(this._days)!==_i(m)?"-":"",d=_i(this._milliseconds)!==_i(m)?"-":"",n+"P"+(t?r+t+"Y":"")+(u?r+u+"M":"")+(o?i+o+"D":"")+(a||e||_?"T":"")+(a?d+a+"H":"")+(e?d+e+"M":"")+(_?d+s+"S":"")):"P0D"}var ui=is.prototype;return ui.isValid=ns,ui.abs=Tr,ui.add=wr,ui.subtract=vr,ui.as=xr,ui.asMilliseconds=Or,ui.asSeconds=Wr,ui.asMinutes=Ar,ui.asHours=Er,ui.asDays=Fr,ui.asWeeks=zr,ui.asMonths=Nr,ui.asQuarters=Jr,ui.asYears=Rr,ui.valueOf=Cr,ui._bubble=Hr,ui.clone=Ir,ui.get=Ur,ui.milliseconds=Vr,ui.seconds=qr,ui.minutes=Br,ui.hours=Kr,ui.days=Zr,ui.weeks=Xr,ui.months=$r,ui.years=Qr,ui.humanize=ii,ui.toISOString=oi,ui.toString=oi,ui.toJSON=oi,ui.locale=dn,ui.localeData=on,ui.toIsoString=v("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",oi),ui.lang=_n,R("X",0,0,"unix"),R("x",0,0,"valueOf"),be("x",ke),be("X",Te),We("X",(function(e,a,t){t._d=new Date(1e3*parseFloat(e))})),We("x",(function(e,a,t){t._d=new Date(Pe(e))})), -//! moment.js -n.version="2.30.1",r(Kt),n.fn=or,n.min=Xt,n.max=es,n.now=as,n.utc=c,n.unix=ur,n.months=Yr,n.isDate=l,n.locale=ct,n.invalid=f,n.duration=Hs,n.isMoment=g,n.weekdays=fr,n.parseZone=mr,n.localeData=yt,n.isDuration=ds,n.monthsShort=yr,n.weekdaysMin=pr,n.defineLocale=Lt,n.updateLocale=Yt,n.locales=ft,n.weekdaysShort=kr,n.normalizeUnits=se,n.relativeTimeRounding=ni,n.relativeTimeThreshold=ri,n.calendarFormat=Rs,n.prototype=or,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()},5946:(e,a,t)=>{e.exports=t(5093)}},a={};function t(s){var n=a[s];if(void 0!==n)return n.exports;var r=a[s]={id:s,loaded:!1,exports:{}};return e[s].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}return t.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),t(5946)})())); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/package-lock.json b/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/package-lock.json deleted file mode 100644 index 71fe669c..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/package-lock.json +++ /dev/null @@ -1,2335 +0,0 @@ -{ - "name": "javascript", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "javascript", - "version": "1.0.0", - "license": "ISC", - "devDependencies": { - "lodash": "^4.17.21", - "moment": "^2.30.1", - "terser-webpack-plugin": "^5.3.10", - "webpack": "^5.95.0", - "webpack-cli": "^5.1.4" - } - }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "node_modules/@types/node": { - "version": "22.7.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", - "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", - "dev": true, - "dependencies": { - "undici-types": "~6.19.2" - } - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "dev": true, - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webpack-cli/configtest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", - "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", - "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", - "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001667", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", - "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/chrome-trace-event": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", - "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.32", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.32.tgz", - "integrity": "sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==", - "dev": true - }, - "node_modules/enhanced-resolve": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", - "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/envinfo": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", - "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", - "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", - "dev": true - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, - "engines": { - "node": ">= 4.9.1" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/import-local": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", - "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, - "engines": { - "node": ">=6.11.5" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/moment": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", - "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", - "dev": true - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "dev": true, - "dependencies": { - "resolve": "^1.20.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "5.34.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", - "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", - "dev": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", - "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.20", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.26.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true - }, - "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/watchpack": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", - "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "dev": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack": { - "version": "5.95.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", - "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", - "dev": true, - "dependencies": { - "@types/estree": "^1.0.5", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-attributes": "^1.9.5", - "browserslist": "^4.21.10", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.1", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", - "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", - "dev": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.1.1", - "@webpack-cli/info": "^2.0.2", - "@webpack-cli/serve": "^2.0.5", - "colorette": "^2.0.14", - "commander": "^10.0.1", - "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/webpack-merge": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", - "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", - "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "flat": "^5.0.2", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true - } - }, - "dependencies": { - "@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true - }, - "@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true - }, - "@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true - }, - "@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "@types/node": { - "version": "22.7.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", - "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", - "dev": true, - "requires": { - "undici-types": "~6.19.2" - } - }, - "@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "dev": true, - "requires": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "dev": true - }, - "@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, - "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, - "requires": { - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.12.1", - "@xtuc/long": "4.2.2" - } - }, - "@webpack-cli/configtest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", - "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", - "dev": true, - "requires": {} - }, - "@webpack-cli/info": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", - "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", - "dev": true, - "requires": {} - }, - "@webpack-cli/serve": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", - "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", - "dev": true, - "requires": {} - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", - "dev": true - }, - "acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, - "requires": {} - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} - }, - "browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001667", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", - "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", - "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", - "dev": true - }, - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - } - }, - "colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "electron-to-chromium": { - "version": "1.5.32", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.32.tgz", - "integrity": "sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==", - "dev": true - }, - "enhanced-resolve": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", - "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - } - }, - "envinfo": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", - "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", - "dev": true - }, - "es-module-lexer": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", - "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", - "dev": true - }, - "escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true - }, - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "requires": { - "function-bind": "^1.1.2" - } - }, - "import-local": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", - "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", - "dev": true - }, - "is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, - "requires": { - "hasown": "^2.0.2" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true - }, - "jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "requires": { - "mime-db": "1.52.0" - } - }, - "moment": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", - "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", - "dev": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "dev": true, - "requires": { - "resolve": "^1.20.0" - } - }, - "resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "requires": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - }, - "serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true - }, - "terser": { - "version": "5.34.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", - "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", - "dev": true, - "requires": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - } - }, - "terser-webpack-plugin": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", - "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.20", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.26.0" - } - }, - "undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true - }, - "update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, - "requires": { - "escalade": "^3.2.0", - "picocolors": "^1.1.0" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "watchpack": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", - "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "dev": true, - "requires": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - } - }, - "webpack": { - "version": "5.95.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", - "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", - "dev": true, - "requires": { - "@types/estree": "^1.0.5", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-attributes": "^1.9.5", - "browserslist": "^4.21.10", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.1", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" - } - }, - "webpack-cli": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", - "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", - "dev": true, - "requires": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.1.1", - "@webpack-cli/info": "^2.0.2", - "@webpack-cli/serve": "^2.0.5", - "colorette": "^2.0.14", - "commander": "^10.0.1", - "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", - "webpack-merge": "^5.7.3" - }, - "dependencies": { - "commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true - } - } - }, - "webpack-merge": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", - "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", - "dev": true, - "requires": { - "clone-deep": "^4.0.1", - "flat": "^5.0.2", - "wildcard": "^2.0.0" - } - }, - "webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true - } - } -} diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/package.json b/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/package.json deleted file mode 100644 index b8238da7..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "javascript", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "build": "npx webpack" - }, - "keywords": [], - "author": "", - "license": "ISC", - "devDependencies": { - "lodash": "^4.17.21", - "moment": "^2.30.1", - "terser-webpack-plugin": "^5.3.10", - "webpack": "^5.95.0", - "webpack-cli": "^5.1.4" - } -} diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/src/lodash.js b/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/src/lodash.js deleted file mode 100644 index f0ca1b9a..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/src/lodash.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('lodash'); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/src/lodashFp.js b/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/src/lodashFp.js deleted file mode 100644 index d805b471..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/src/lodashFp.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('lodash/fp'); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/src/moment.js b/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/src/moment.js deleted file mode 100644 index 8ff4623f..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/src/moment.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('moment'); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/webpack.config.js b/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/webpack.config.js deleted file mode 100644 index 9c4ac23a..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/ClientLib/webpack.config.js +++ /dev/null @@ -1,24 +0,0 @@ -const path = require('path'); -const TerserPlugin = require('terser-webpack-plugin'); - -module.exports = { - entry: { - lodash: './src/lodash.js', - lodashFp: './src/lodashFp.js', - moment: './src/moment.js' - }, - output: { - filename: '[name].js', - path: path.resolve(__dirname, 'dist'), - library: '[name]', - libraryTarget: 'umd', - globalObject: 'this' - }, - optimization: { - minimize: true, - minimizer: [new TerserPlugin({ - extractComments: false - })], - }, - mode: 'production' -}; \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Elsa.Scripting.JavaScript.Libraries.csproj b/src/scripting/Elsa.Scripting.JavaScript.Libraries/Elsa.Scripting.JavaScript.Libraries.csproj deleted file mode 100644 index 1b7a8a97..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Elsa.Scripting.JavaScript.Libraries.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Provides the following JavaScript libraries for Elsa: - - lodash - - moment - - elsa extension module expressions scripting javascript libraries - - - - - - - - - - - - - - Always - - - - - - - - diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Extensions/JavaScriptFeatureExtensions.cs b/src/scripting/Elsa.Scripting.JavaScript.Libraries/Extensions/JavaScriptFeatureExtensions.cs deleted file mode 100644 index 4c4703e3..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Extensions/JavaScriptFeatureExtensions.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Features; - -namespace Elsa.Scripting.JavaScript.Libraries.Extensions; - -public static class JavaScriptFeatureExtensions -{ - /// - /// Adds the Lodash library to the JavaScript engine. - /// - public static JavaScriptFeature UseLodash(this JavaScriptFeature feature) - { - feature.Module.Use(); - return feature; - } - - /// - /// Adds the Lodash FP library to the JavaScript engine. - /// - public static JavaScriptFeature UseLodashFp(this JavaScriptFeature feature) - { - feature.Module.Use(); - return feature; - } - - /// - /// Adds the Moment library to the JavaScript engine. - /// - public static JavaScriptFeature UseMoment(this JavaScriptFeature feature) - { - feature.Module.Use(); - return feature; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/LodashFeature.cs b/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/LodashFeature.cs deleted file mode 100644 index b242174e..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/LodashFeature.cs +++ /dev/null @@ -1,5 +0,0 @@ -using Elsa.Features.Services; - -namespace Elsa.Scripting.JavaScript.Libraries; - -public class LodashFeature(IModule module) : ScriptModuleFeatureBase("lodash", module); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/LodashFpFeature.cs b/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/LodashFpFeature.cs deleted file mode 100644 index 50f6ecd8..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/LodashFpFeature.cs +++ /dev/null @@ -1,5 +0,0 @@ -using Elsa.Features.Services; - -namespace Elsa.Scripting.JavaScript.Libraries; - -public class LodashFpFeature(IModule module) : ScriptModuleFeatureBase("lodashFp", module); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/MomentFeature.cs b/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/MomentFeature.cs deleted file mode 100644 index ac5b87e8..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/MomentFeature.cs +++ /dev/null @@ -1,5 +0,0 @@ -using Elsa.Features.Services; - -namespace Elsa.Scripting.JavaScript.Libraries; - -public class MomentFeature(IModule module) : ScriptModuleFeatureBase("moment", module); \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/ScriptModuleFeatureBase.cs b/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/ScriptModuleFeatureBase.cs deleted file mode 100644 index 4e1b7141..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/Features/ScriptModuleFeatureBase.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using Elsa.Extensions; -using Elsa.Features.Abstractions; -using Elsa.Features.Attributes; -using Elsa.Features.Services; -using Elsa.Scripting.JavaScript.Features; - -namespace Elsa.Scripting.JavaScript.Libraries; - -[DependsOn(typeof(JavaScriptFeature))] -public abstract class ScriptModuleFeatureBase(string moduleName, IModule module) : FeatureBase(module) -{ - public override void Configure() - { - Module.UseJavaScript(jintOptions => - { - jintOptions.ConfigureEngine((engine, context) => - { - var resourceName = $"Elsa.Scripting.JavaScript.Libraries.ClientLib.dist.{moduleName}.js"; - using var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!; - using var reader = new StreamReader(stream); - var script = reader.ReadToEnd(); - engine.Execute(script); - }); - }); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript.Libraries/FodyWeavers.xml b/src/scripting/Elsa.Scripting.JavaScript.Libraries/FodyWeavers.xml deleted file mode 100644 index 00e1d9a1..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript.Libraries/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Activities/RunJavaScript/RunJavaScript.cs b/src/scripting/Elsa.Scripting.JavaScript/Activities/RunJavaScript/RunJavaScript.cs deleted file mode 100644 index a461968a..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Activities/RunJavaScript/RunJavaScript.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System.Runtime.CompilerServices; -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Contracts; -using Elsa.Workflows; -using Elsa.Workflows.Attributes; -using Elsa.Workflows.Models; -using Elsa.Workflows.UIHints; -using Jint; - -// ReSharper disable once CheckNamespace -namespace Elsa.Scripting.JavaScript.Activities; - -/// -/// Executes JavaScript code. -/// -[Activity("Elsa", "Scripting", "Executes JavaScript code", DisplayName = "Run JavaScript")] -public class RunJavaScript : CodeActivity -{ - /// - public RunJavaScript([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line) - { - } - - /// - public RunJavaScript(string script, [CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : this(source, line) - { - Script = new Input(script); - } - - /// - /// The script to run. - /// - [Input( - Description = "The script to run.", - DefaultSyntax = "JavaScript", - UIHint = InputUIHints.CodeEditor, - UIHandler = typeof(RunJavaScriptOptionsProvider) - )] - public Input Script { get; set; } = new(""); - - /// - /// A list of possible outcomes. Use "setOutcome()" to set the outcome. Use "setOutcomes" to set multiple outcomes. - /// - [Input(Description = "A list of possible outcomes.", UIHint = InputUIHints.DynamicOutcomes)] - public Input> PossibleOutcomes { get; set; } = default!; - - /// - protected override async ValueTask ExecuteAsync(ActivityExecutionContext context) - { - var script = context.Get(Script); - - // If no script was specified, there's nothing to do. - if (string.IsNullOrWhiteSpace(script)) - return; - - // Get a JavaScript evaluator. - var javaScriptEvaluator = context.GetRequiredService(); - - // Run the script. - var result = await javaScriptEvaluator.EvaluateAsync( - script, - typeof(object), - context.ExpressionExecutionContext, - ExpressionEvaluatorOptions.Empty, - engine => ConfigureEngine(engine, context), - context.CancellationToken); - - // Set the result as output, if any. - if (result is not null) - context.Set(Result, result); - - // Get the outcome or outcomes set by the script, if any. If not set, use "Done". - var outcomes = context.TransientProperties.GetValueOrDefault("Outcomes", () => new[] { "Done" })!; - - // Complete the activity with the outcome. - await context.CompleteActivityWithOutcomesAsync(outcomes); - } - - private static void ConfigureEngine(Engine engine, ActivityExecutionContext context) - { - engine.SetValue("setOutcome", (Action)(value => context.TransientProperties["Outcomes"] = new[] { value })); - engine.SetValue("setOutcomes", (Action)(value => context.TransientProperties["Outcomes"] = value)); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Activities/RunJavaScript/RunJavaScriptFunctionsDefinitionProvider.cs b/src/scripting/Elsa.Scripting.JavaScript/Activities/RunJavaScript/RunJavaScriptFunctionsDefinitionProvider.cs deleted file mode 100644 index 2d3326e7..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Activities/RunJavaScript/RunJavaScriptFunctionsDefinitionProvider.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Elsa.Scripting.JavaScript.TypeDefinitions.Abstractions; -using Elsa.Scripting.JavaScript.TypeDefinitions.Models; -using Elsa.Workflows.Helpers; -using JetBrains.Annotations; - -// ReSharper disable once CheckNamespace -namespace Elsa.Scripting.JavaScript.Activities; - -/// -/// Produces s for common functions. -/// -[UsedImplicitly] -internal class RunJavaScriptFunctionsDefinitionProvider : FunctionDefinitionProvider -{ - protected override IEnumerable GetFunctionDefinitions(TypeDefinitionContext context) - { - if (context.ActivityTypeName != ActivityTypeNameHelper.GenerateTypeName()) - yield break; - - if(context.PropertyName != nameof(RunJavaScript.Script)) - yield break; - - yield return CreateFunctionDefinition(builder => builder - .Name("setOutcome") - .Parameter("name", "string") - .ReturnType("void")); - - yield return CreateFunctionDefinition(builder => builder - .Name("setOutcomes") - .Parameter("names", "string[]") - .ReturnType("void")); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Activities/RunJavaScript/RunJavaScriptOptionsProvider.cs b/src/scripting/Elsa.Scripting.JavaScript/Activities/RunJavaScript/RunJavaScriptOptionsProvider.cs deleted file mode 100644 index 42d68660..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Activities/RunJavaScript/RunJavaScriptOptionsProvider.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Reflection; -using Elsa.Workflows.UIHints.CodeEditor; - -// ReSharper disable once CheckNamespace -namespace Elsa.Scripting.JavaScript.Activities; - -internal class RunJavaScriptOptionsProvider : CodeEditorOptionsProviderBase -{ - protected override string GetLanguage(PropertyInfo propertyInfo, object? context) => "javascript"; -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Contracts/IJavaScriptEvaluator.cs b/src/scripting/Elsa.Scripting.JavaScript/Contracts/IJavaScriptEvaluator.cs deleted file mode 100644 index c5c6959d..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Contracts/IJavaScriptEvaluator.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Elsa.Expressions.Models; -using JetBrains.Annotations; -using Jint; - -namespace Elsa.Scripting.JavaScript.Contracts; - -/// -/// Evaluates JavaScript expressions. -/// -[PublicAPI] -public interface IJavaScriptEvaluator -{ - /// - /// Evaluates a JavaScript expression. - /// - /// The expression to evaluate. - /// The type of the return value. - /// The context in which the expression is evaluated. - /// The options to use when evaluating the expression. - /// An optional callback that can be used to configure the JavaScript engine. - /// An optional cancellation token. - /// The result of the evaluation. - Task EvaluateAsync( - string expression, - Type returnType, - ExpressionExecutionContext context, - ExpressionEvaluatorOptions? options = default, - Action? configureEngine = default, - CancellationToken cancellationToken = default); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Contracts/ITypeAliasRegistry.cs b/src/scripting/Elsa.Scripting.JavaScript/Contracts/ITypeAliasRegistry.cs deleted file mode 100644 index e3b03efa..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Contracts/ITypeAliasRegistry.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Elsa.Scripting.JavaScript.Contracts; - -/// -/// A central registry of type aliases. -/// -public interface ITypeAliasRegistry -{ - /// - /// Register a type with an alias. - /// - void RegisterType(Type type, string alias); - - /// - /// Attempts to get an alias for the specified type. - /// - bool TryGetAlias(Type type, out string alias); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Elsa.Scripting.JavaScript.csproj b/src/scripting/Elsa.Scripting.JavaScript/Elsa.Scripting.JavaScript.csproj deleted file mode 100644 index 51284f79..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Elsa.Scripting.JavaScript.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Provides a JavaScript expression provider. - - elsa extension module expressions scripting javascript - - - - - - - - - - - diff --git a/src/scripting/Elsa.Scripting.JavaScript/Endpoints/TypeDefinitions/Endpoint.cs b/src/scripting/Elsa.Scripting.JavaScript/Endpoints/TypeDefinitions/Endpoint.cs deleted file mode 100644 index 2b93b11d..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Endpoints/TypeDefinitions/Endpoint.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Text; -using Elsa.Abstractions; -using Elsa.Common.Models; -using Elsa.Scripting.JavaScript.TypeDefinitions.Contracts; -using Elsa.Scripting.JavaScript.TypeDefinitions.Models; -using Elsa.Workflows.Management; -using Elsa.Workflows.Models; -using JetBrains.Annotations; - -namespace Elsa.Scripting.JavaScript.Endpoints.TypeDefinitions; - -/// -/// Returns a TypeScript definition that is used by the Monaco editor to display intellisense for JavaScript expressions. -/// -[PublicAPI] -internal class Get : ElsaEndpoint -{ - private readonly ITypeDefinitionService _typeDefinitionService; - private readonly IWorkflowDefinitionService _workflowDefinitionService; - - /// - public Get(ITypeDefinitionService typeDefinitionService, IWorkflowDefinitionService workflowDefinitionService) - { - _typeDefinitionService = typeDefinitionService; - _workflowDefinitionService = workflowDefinitionService; - } - - /// - public override void Configure() - { - Post("scripting/javascript/type-definitions/{workflowDefinitionId}"); - ConfigurePermissions("read:*", "read:javascript-type-definitions"); - } - - /// - public override async Task HandleAsync(Request request, CancellationToken cancellationToken) - { - var workflowGraph = await GetWorkflowGraphAsync(request.WorkflowDefinitionId, cancellationToken); - - if (workflowGraph == null) - { - AddError($"Workflow definition {request.WorkflowDefinitionId} not found"); - await SendErrorsAsync(cancellation: cancellationToken); - return; - } - - var typeDefinitionContext = new TypeDefinitionContext(workflowGraph, request.ActivityTypeName, request.PropertyName, cancellationToken); - var typeDefinitions = await _typeDefinitionService.GenerateTypeDefinitionsAsync(typeDefinitionContext); - var fileName = $"elsa.{request.WorkflowDefinitionId}.d.ts"; - var data = Encoding.UTF8.GetBytes(typeDefinitions); - - await SendBytesAsync(data, fileName, "application/x-typescript", cancellation: cancellationToken); - } - - private async Task GetWorkflowGraphAsync(string workflowDefinitionId, CancellationToken cancellationToken) - { - return await _workflowDefinitionService.FindWorkflowGraphAsync(workflowDefinitionId, VersionOptions.Latest, cancellationToken); - } -} - -internal record Request(string WorkflowDefinitionId, string? ActivityTypeName, string? PropertyName) -{ - public Request() : this(default!, default!, default) - { - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Expressions/JavaScriptExpressionHandler.cs b/src/scripting/Elsa.Scripting.JavaScript/Expressions/JavaScriptExpressionHandler.cs deleted file mode 100644 index b914b523..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Expressions/JavaScriptExpressionHandler.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Dynamic; -using Elsa.Expressions.Contracts; -using Elsa.Expressions.Helpers; -using Elsa.Expressions.Models; -using Elsa.Scripting.JavaScript.Contracts; -using Humanizer; -using Jint; - -namespace Elsa.Scripting.JavaScript.Expressions; - -/// -/// Evaluates JavaScript expressions. -/// -public class JavaScriptExpressionHandler : IExpressionHandler -{ - private readonly IJavaScriptEvaluator _javaScriptEvaluator; - - /// - /// Initializes a new instance of the class. - /// - public JavaScriptExpressionHandler(IJavaScriptEvaluator javaScriptEvaluator) - { - _javaScriptEvaluator = javaScriptEvaluator; - } - - /// - public async ValueTask EvaluateAsync(Expression expression, Type returnType, ExpressionExecutionContext context, ExpressionEvaluatorOptions options) - { - var javaScriptExpression = expression.Value.ConvertTo() ?? ""; - return await _javaScriptEvaluator.EvaluateAsync(javaScriptExpression, returnType, context, options, engine => ConfigureEngine(engine, options), context.CancellationToken); - } - - private void ConfigureEngine(Engine engine, ExpressionEvaluatorOptions options) - { - var args = new ExpandoObject() as IDictionary; - - foreach (var (name, value) in options.Arguments) - args[name.Camelize()] = value; - - engine.SetValue("args", args); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Extensions/DependencyInjectionExtensions.cs b/src/scripting/Elsa.Scripting.JavaScript/Extensions/DependencyInjectionExtensions.cs deleted file mode 100644 index c95ff1da..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Extensions/DependencyInjectionExtensions.cs +++ /dev/null @@ -1,57 +0,0 @@ -using Elsa.Scripting.JavaScript.TypeDefinitions.Contracts; -using Microsoft.Extensions.DependencyInjection; - -namespace Elsa.Scripting.JavaScript.Extensions; - -/// -/// Provides extension methods for . -/// -public static class DependencyInjectionExtensions -{ - /// - /// Adds a to the service collection. - /// - /// The service collection. - /// The type of the function definition provider. - /// The service collection. - public static IServiceCollection AddFunctionDefinitionProvider(this IServiceCollection services) where T: class, IFunctionDefinitionProvider => services.AddScoped(); - - /// - /// Adds a to the service collection. - /// - /// The service collection. - /// A callback to create the function definition provider. - /// The type of the function definition provider. - /// The service collection. - public static IServiceCollection AddFunctionDefinitionProvider(this IServiceCollection services, Func factory) where T: class, IFunctionDefinitionProvider => - services.AddScoped(factory); - - /// - /// Adds a to the service collection. - /// - /// The service collection. - /// The type of the type definition provider. - /// The service collection. - public static IServiceCollection AddTypeDefinitionProvider(this IServiceCollection services) where T: class, ITypeDefinitionProvider => services.AddScoped(); - - /// - /// Adds a to the service collection. - /// - /// The service collection. - /// A callback to create the type definition provider. - /// The type of the type definition provider. - /// The service collection. - public static IServiceCollection AddTypeDefinitionProvider(this IServiceCollection services, Func factory) where T: class, ITypeDefinitionProvider => - services.AddScoped(); - - /// - /// Adds a to the service collection. - /// - public static IServiceCollection AddVariableDefinitionProvider(this IServiceCollection services) where T: class, IVariableDefinitionProvider => services.AddScoped(); - - /// - /// Adds a to the service collection. - /// - public static IServiceCollection AddVariableDefinitionProvider(this IServiceCollection services, Func factory) where T: class, IVariableDefinitionProvider => - services.AddScoped(factory); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Extensions/EngineExtensions.cs b/src/scripting/Elsa.Scripting.JavaScript/Extensions/EngineExtensions.cs deleted file mode 100644 index b6c841a9..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Extensions/EngineExtensions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Elsa.Scripting.JavaScript.Helpers; -using Elsa.Scripting.JavaScript.Options; -using Jint; -using Jint.Runtime.Interop; -using Microsoft.Extensions.Options; - -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -/// -/// Extends . -/// -public static class EngineExtensions -{ - /// - /// Register the specified type T with the engine. - /// - public static void RegisterType(this Engine engine) => engine.SetValue(typeof(T).Name, TypeReference.CreateTypeReference(engine, typeof(T))); - - /// - /// Register the specified type T with the engine. - /// - public static void RegisterType(this Engine engine, Type type) => engine.SetValue(type.Name, TypeReference.CreateTypeReference(engine, type)); - - internal static void SyncVariablesContainer(this Engine engine, IOptions options, string name, object? value) - { - if (options.Value.DisableWrappers || options.Value.DisableVariableCopying) - return; - - // To ensure both variable accessor syntaxes work, we need to update the variables container in the engine as well as the context to keep them in sync. - var variablesContainer = (IDictionary)engine.GetValue("variables").ToObject()!; - variablesContainer[name] = ObjectConverterHelper.ProcessVariableValue(engine, value); - engine.SetValue("variables", variablesContainer); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Extensions/ModuleExtensions.cs b/src/scripting/Elsa.Scripting.JavaScript/Extensions/ModuleExtensions.cs deleted file mode 100644 index f74fb3f1..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Extensions/ModuleExtensions.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Elsa.Features.Services; -using Elsa.Scripting.JavaScript.Features; -using Elsa.Scripting.JavaScript.Options; - -// ReSharper disable once CheckNamespace -namespace Elsa.Extensions; - -/// -/// Adds extensions to that installs the feature. -/// -public static class ModuleExtensions -{ - /// - /// Setup the feature. - /// - public static IModule UseJavaScript(this IModule module, Action? configure = default) - { - module.Configure(configure); - return module; - } - - /// - /// Setup the feature. - /// - public static IModule UseJavaScript(this IModule module, Action configureJintOptions) - { - return module.UseJavaScript(javaScript => javaScript.ConfigureJintOptions(configureJintOptions)); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Extensions/TypeAliasRegistryExtensions.cs b/src/scripting/Elsa.Scripting.JavaScript/Extensions/TypeAliasRegistryExtensions.cs deleted file mode 100644 index 6a376434..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Extensions/TypeAliasRegistryExtensions.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Contracts; - -namespace Elsa.Scripting.JavaScript.Extensions; - -/// -/// Extends . -/// -public static class TypeAliasRegistryExtensions -{ - /// - /// Register type with the specified alias. - /// - public static void RegisterType(this ITypeAliasRegistry registry, string alias) => registry.RegisterType(typeof(T), alias); - - /// - /// Returns the alias for the specified type. If no alias was found, the assembly qualified type name is returned instead. - /// - public static string GetAliasOrDefault(this ITypeAliasRegistry registry, Type type, string? defaultName = default) => - registry.TryGetAlias(type, out var alias) ? alias : defaultName ?? type.GetSimpleAssemblyQualifiedName(); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Extensions/VariableNameExtensions.cs b/src/scripting/Elsa.Scripting.JavaScript/Extensions/VariableNameExtensions.cs deleted file mode 100644 index 282c402d..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Extensions/VariableNameExtensions.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Elsa.Scripting.JavaScript.Helpers; - -namespace Elsa.Scripting.JavaScript.Extensions; - -public static class VariableNameExtensions -{ - public static bool IsValidVariableName(this string name) - { - return VariableNameValidator.IsValidVariableName(name); - } - - public static bool IsInvalidVariableName(this string name) - { - return !VariableNameValidator.IsValidVariableName(name); - } - - public static IEnumerable FilterInvalidVariableNames(this IEnumerable names) - { - return names.Where(IsValidVariableName); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Features/JavaScriptFeature.cs b/src/scripting/Elsa.Scripting.JavaScript/Features/JavaScriptFeature.cs deleted file mode 100644 index e7e059db..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Features/JavaScriptFeature.cs +++ /dev/null @@ -1,97 +0,0 @@ -using Elsa.Caching.Features; -using Elsa.Common.Features; -using Elsa.Expressions.Features; -using Elsa.Extensions; -using Elsa.Features.Abstractions; -using Elsa.Features.Attributes; -using Elsa.Features.Services; -using Elsa.Scripting.JavaScript.Activities; -using Elsa.Scripting.JavaScript.Contracts; -using Elsa.Scripting.JavaScript.Extensions; -using Elsa.Scripting.JavaScript.HostedServices; -using Elsa.Scripting.JavaScript.Options; -using Elsa.Scripting.JavaScript.Providers; -using Elsa.Scripting.JavaScript.Services; -using Elsa.Scripting.JavaScript.TypeDefinitions.Contracts; -using Elsa.Scripting.JavaScript.TypeDefinitions.Services; -using Elsa.Workflows; -using Microsoft.Extensions.DependencyInjection; - -namespace Elsa.Scripting.JavaScript.Features; - -/// -/// Installs JavaScript integration. -/// -[DependsOn(typeof(MediatorFeature))] -[DependsOn(typeof(ExpressionsFeature))] -[DependsOn(typeof(MemoryCacheFeature))] -public class JavaScriptFeature : FeatureBase -{ - /// - public JavaScriptFeature(IModule module) : base(module) - { - } - - /// - /// Configures the Jint options. - /// - private Action JintOptions { get; set; } = _ => { }; - - public JavaScriptFeature ConfigureJintOptions(Action configure) - { - JintOptions += configure; - return this; - } - - /// - public override void ConfigureHostedServices() - { - ConfigureHostedService(); - } - - /// - public override void Configure() - { - Module.AddFastEndpointsAssembly(); - } - - /// - public override void Apply() - { - Services.Configure(JintOptions); - - // JavaScript services. - Services - .AddScoped() - .AddScoped() - .AddExpressionDescriptorProvider() - ; - - // Type definition services. - Services - .AddScoped() - .AddScoped() - .AddScoped() - .AddSingleton() - .AddFunctionDefinitionProvider() - .AddFunctionDefinitionProvider() - .AddFunctionDefinitionProvider() - .AddTypeDefinitionProvider() - .AddTypeDefinitionProvider() - .AddTypeDefinitionProvider() - .AddVariableDefinitionProvider() - ; - - // Handlers. - Services.AddNotificationHandlersFrom(); - - // Activities. - Module.UseWorkflowManagement(management => management.AddActivity()); - - // Type Script definitions. - Services.AddFunctionDefinitionProvider(); - - // UI property handlers. - Services.AddScoped(); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/FodyWeavers.xml b/src/scripting/Elsa.Scripting.JavaScript/FodyWeavers.xml deleted file mode 100644 index 00e1d9a1..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithCommonFunctions.cs b/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithCommonFunctions.cs deleted file mode 100644 index 7cf6d2bf..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithCommonFunctions.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System.Text; -using System.Text.Encodings.Web; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Text.RegularExpressions; -using System.Text.Unicode; -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Helpers; -using Elsa.Scripting.JavaScript.Notifications; -using Elsa.Scripting.JavaScript.Options; -using Elsa.Mediator.Contracts; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.JavaScript.Handlers; - -/// -/// A handler that configures the Jint engine with common functions. -/// -[UsedImplicitly] -public class ConfigureEngineWithCommonFunctions(IOptions options) : INotificationHandler -{ - private readonly JsonSerializerOptions _jsonSerializerOptions = CreateJsonSerializerOptions(); - - /// - public Task HandleAsync(EvaluatingJavaScript notification, CancellationToken cancellationToken) - { - var engine = notification.Engine; - var context = notification.Context; - - // Add common functions. - engine.SetValue("getWorkflowDefinitionId", (Func)(() => context.GetWorkflowExecutionContext().Workflow.Identity.DefinitionId)); - engine.SetValue("getWorkflowDefinitionVersionId", (Func)(() => context.GetWorkflowExecutionContext().Workflow.Identity.Id)); - engine.SetValue("getWorkflowDefinitionVersion", (Func)(() => context.GetWorkflowExecutionContext().Workflow.Identity.Version)); - engine.SetValue("getWorkflowInstanceId", (Func)(() => context.GetActivityExecutionContext().WorkflowExecutionContext.Id)); - engine.SetValue("setCorrelationId", (Action)(value => context.GetActivityExecutionContext().WorkflowExecutionContext.CorrelationId = value)); - engine.SetValue("getCorrelationId", (Func)(() => context.GetActivityExecutionContext().WorkflowExecutionContext.CorrelationId)); - engine.SetValue("setWorkflowInstanceName", (Action)(value => context.GetWorkflowExecutionContext().Name = value)); - engine.SetValue("getWorkflowInstanceName", (Func)(() => context.GetWorkflowExecutionContext().Name)); - engine.SetValue("setVariable", (Action)((name, value) => - { - engine.SyncVariablesContainer(options, name, value); - context.SetVariableInScope(name, value); - })); - engine.SetValue("getVariable", (Func)(name => context.GetVariableInScope(name))); - engine.SetValue("getInput", (Func)(name => context.GetInput(name))); - engine.SetValue("getOutputFrom", (Func)((activityIdName, outputName) => context.GetOutput(activityIdName, outputName))); - engine.SetValue("getLastResult", (Func)(() => context.GetLastResult())); - engine.SetValue("isNullOrWhiteSpace", (Func)(value => string.IsNullOrWhiteSpace(value))); - engine.SetValue("isNullOrEmpty", (Func)(value => string.IsNullOrEmpty(value))); - engine.SetValue("toJson", (Func)(value => Serialize(value))); - engine.SetValue("parseGuid", (Func)(value => Guid.Parse(value))); - engine.SetValue("newGuid", (Func)(() => Guid.NewGuid())); - engine.SetValue("newGuidString", (Func)(() => Guid.NewGuid().ToString())); - engine.SetValue("newShortGuid", (Func)(() => Regex.Replace(Convert.ToBase64String(Guid.NewGuid().ToByteArray()), "[/+=]", ""))); - engine.SetValue("bytesToString", (Func)(value => Encoding.UTF8.GetString(value))); - engine.SetValue("bytesFromString", (Func)(value => Encoding.UTF8.GetBytes(value))); - engine.SetValue("bytesToBase64", (Func)(value => Convert.ToBase64String(value))); - engine.SetValue("bytesFromBase64", (Func)(value => Convert.FromBase64String(value))); - engine.SetValue("stringToBase64", (Func)(value => Convert.ToBase64String(Encoding.UTF8.GetBytes(value)))); - engine.SetValue("stringFromBase64", (Func)(value => Encoding.UTF8.GetString(Convert.FromBase64String(value)))); - - // Deprecated, use newGuidString instead. - engine.SetValue("getGuidString", (Func)(() => Guid.NewGuid().ToString())); - - // Deprecated, use newShortGuid instead. - engine.SetValue("getShortGuid", (Func)(() => Regex.Replace(Convert.ToBase64String(Guid.NewGuid().ToByteArray()), "[/+=]", ""))); - return Task.CompletedTask; - } - - private string Serialize(object value) - { - return JsonSerializer.Serialize(value, _jsonSerializerOptions); - } - - private static JsonSerializerOptions CreateJsonSerializerOptions() - { - var options = new JsonSerializerOptions - { - Encoder = JavaScriptEncoder.Create(UnicodeRanges.All) - }; - options.Converters.Add(new JsonStringEnumConverter()); - return options; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithCommonTypes.cs b/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithCommonTypes.cs deleted file mode 100644 index e385644d..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithCommonTypes.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Notifications; -using Elsa.Mediator.Contracts; -using Elsa.Workflows.LogPersistence; -using JetBrains.Annotations; - -namespace Elsa.Scripting.JavaScript.Handlers; - -/// -/// A handler that configures the Jint engine with common types. -/// -[UsedImplicitly] -public class ConfigureEngineWithCommonTypes : INotificationHandler -{ - /// - public Task HandleAsync(EvaluatingJavaScript notification, CancellationToken cancellationToken) - { - var engine = notification.Engine; - - // Add common .NET types. - engine.RegisterType(); - engine.RegisterType(); - engine.RegisterType(); - engine.RegisterType(); - engine.RegisterType(); - engine.RegisterType(); - - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithVariables.cs b/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithVariables.cs deleted file mode 100644 index d540e3bc..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithVariables.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System.Dynamic; -using System.Text.RegularExpressions; -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Extensions; -using Elsa.Scripting.JavaScript.Helpers; -using Elsa.Scripting.JavaScript.Notifications; -using Elsa.Scripting.JavaScript.Options; -using Elsa.Mediator.Contracts; -using Elsa.Workflows.Activities; -using JetBrains.Annotations; -using Jint.Native; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.JavaScript.Handlers; - -/// -/// A handler that configures the Jint engine with workflow variables. -/// -[UsedImplicitly] -public partial class ConfigureEngineWithVariables(IOptions options) : INotificationHandler, INotificationHandler -{ - private bool IsEnabled => options.Value is { DisableWrappers: false, DisableVariableCopying: false }; - - /// - public Task HandleAsync(EvaluatingJavaScript notification, CancellationToken cancellationToken) - { - if (!IsEnabled) - return Task.CompletedTask; - - CopyVariablesIntoEngine(notification); - return Task.CompletedTask; - } - - public Task HandleAsync(EvaluatedJavaScript notification, CancellationToken cancellationToken) - { - if (!IsEnabled) - return Task.CompletedTask; - - CopyVariablesIntoWorkflowExecutionContext(notification); - return Task.CompletedTask; - } - - private void CopyVariablesIntoWorkflowExecutionContext(EvaluatedJavaScript notification) - { - var context = notification.Context; - var engine = notification.Engine; - var variablesContainer = (IDictionary)engine.GetValue("variables").ToObject()!; - var inputNames = GetInputNames(context).FilterInvalidVariableNames().Distinct().ToList(); - - foreach (var (variableName, variableValue) in variablesContainer) - { - if (inputNames.Contains(variableName)) - continue; - - var processedValue = variableValue is JsObject jsValue ? jsValue.ToObject() : variableValue ?? context.GetVariableInScope(variableName); - context.SetVariable(variableName, processedValue); - } - } - - private void CopyVariablesIntoEngine(EvaluatingJavaScript notification) - { - var engine = notification.Engine; - var context = notification.Context; - var expression = notification.Expression; - var variableNames = GetUsedVariableNames(context, expression).ToList(); - var variablesContainer = (IDictionary)new ExpandoObject(); - - foreach (var variableName in variableNames) - { - var variableValue = context.GetVariableInScope(variableName); - variableValue = ObjectConverterHelper.ProcessVariableValue(engine, variableValue); - variablesContainer[variableName] = variableValue; - } - - engine.SetValue("variables", variablesContainer); - } - - private IEnumerable GetUsedVariableNames(ExpressionExecutionContext context, string expression) - { - var variableNames = context.GetVariableNamesInScope().FilterInvalidVariableNames(); - - var variableNamesInScript = ExtractVariableNamesRegex().Matches(expression) - .Select(m => m.Groups[1].Value) - .ToList(); - - return variableNames.Where(x => variableNamesInScript.Contains(x)); - } - - private IEnumerable GetInputNames(ExpressionExecutionContext context) - { - var activityExecutionContext = context.TryGetActivityExecutionContext(out var aec) ? aec : null; - - while (activityExecutionContext != null) - { - if (activityExecutionContext.Activity is Workflow workflow) - { - var inputDefinitions = workflow.Inputs; - - foreach (var inputDefinition in inputDefinitions) - yield return inputDefinition.Name; - } - - foreach (var syntheticProperty in activityExecutionContext.Activity.SyntheticProperties) - { - yield return syntheticProperty.Key; - } - - activityExecutionContext = activityExecutionContext.ParentActivityExecutionContext; - } - } - - [GeneratedRegex(@"variables\.(\w+)(?:\.\w+)*")] - private static partial Regex ExtractVariableNamesRegex(); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithVariablesAndInputOutputAccessors.cs b/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithVariablesAndInputOutputAccessors.cs deleted file mode 100644 index 5e0b9e28..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureEngineWithVariablesAndInputOutputAccessors.cs +++ /dev/null @@ -1,80 +0,0 @@ -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Extensions; -using Elsa.Scripting.JavaScript.Notifications; -using Elsa.Scripting.JavaScript.Options; -using Elsa.Mediator.Contracts; -using Humanizer; -using JetBrains.Annotations; -using Jint; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.JavaScript.Handlers; - -/// -/// A handler that configures the Jint engine with workflow input and output accessors. -/// -[UsedImplicitly] -public class ConfigureEngineWithVariablesAndInputOutputAccessors(IOptions options) : INotificationHandler -{ - /// - public async Task HandleAsync(EvaluatingJavaScript notification, CancellationToken cancellationToken) - { - if (options.Value.DisableWrappers) - return; - - var engine = notification.Engine; - var context = notification.Context; - - // The order of the next 3 lines is important. - CreateVariableAccessors(engine, context); - CreateWorkflowInputAccessors(engine, context); - await CreateActivityOutputAccessorsAsync(engine, context); - } - - private void CreateVariableAccessors(Engine engine, ExpressionExecutionContext context) - { - var variableNames = context.GetVariableNamesInScope().FilterInvalidVariableNames().ToList(); - - foreach (var variableName in variableNames) - { - var pascalName = variableName.Pascalize(); - engine.SetValue($"get{pascalName}", (Func)(() => context.GetVariableInScope(variableName))); - engine.SetValue($"set{pascalName}", (Action)(value => - { - engine.SyncVariablesContainer(options, variableName, value); - context.SetVariableInScope(variableName, value); - })); - } - } - - private void CreateWorkflowInputAccessors(Engine engine, ExpressionExecutionContext context) - { - // Create workflow input accessors - only if the current activity is not part of a composite activity definition. - // Otherwise, the workflow input accessors will hide the composite activity input accessors which rely on variable accessors. - if (context.IsContainedWithinCompositeActivity()) - return; - - var inputs = context.GetWorkflowInputs().Where(x => x.Name.IsValidVariableName()).ToDictionary(x => x.Name, StringComparer.OrdinalIgnoreCase); - - if (!context.TryGetWorkflowExecutionContext(out var workflowExecutionContext)) - return; - - var inputDefinitions = workflowExecutionContext.Workflow.Inputs; - - foreach (var inputDefinition in inputDefinitions) - { - var input = inputs.GetValueOrDefault(inputDefinition.Name); - engine.SetValue($"get{inputDefinition.Name}", (Func)(() => input?.Value)); - } - } - - private static async Task CreateActivityOutputAccessorsAsync(Engine engine, ExpressionExecutionContext context) - { - var activityOutputs = context.GetActivityOutputs(); - - await foreach (var activityOutput in activityOutputs) - foreach (var outputName in activityOutput.OutputNames.FilterInvalidVariableNames()) - engine.SetValue($"get{outputName}From{activityOutput.ActivityName}", (Func)(() => context.GetOutput(activityOutput.ActivityId, outputName))); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Helpers/ObjectArrayHelper.cs b/src/scripting/Elsa.Scripting.JavaScript/Helpers/ObjectArrayHelper.cs deleted file mode 100644 index db99e990..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Helpers/ObjectArrayHelper.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Collections; - -namespace Elsa.Scripting.JavaScript.Helpers; - -/// -/// Contains helper methods for working with object arrays. -/// -public static class ObjectArrayHelper -{ - /// - /// Determines if the specified object is an array-like CLR collection. - /// - public static bool DetermineIfObjectIsArrayLikeClrCollection(Type type) - { - var isDictionary = typeof(IDictionary).IsAssignableFrom(type); - - if (isDictionary) - return false; - - if (typeof(ICollection).IsAssignableFrom(type)) - return true; - - foreach (var interfaceType in type.GetInterfaces()) - { - if (!interfaceType.IsGenericType) - { - continue; - } - - if (interfaceType.GetGenericTypeDefinition() == typeof(IReadOnlyCollection<>) - || interfaceType.GetGenericTypeDefinition() == typeof(ICollection<>)) - { - return true; - } - } - - return false; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Helpers/ObjectConverterHelper.cs b/src/scripting/Elsa.Scripting.JavaScript/Helpers/ObjectConverterHelper.cs deleted file mode 100644 index 7db2e368..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Helpers/ObjectConverterHelper.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Collections; -using System.Dynamic; -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Options; -using Jint; -using Jint.Native; -using Jint.Native.Object; -using Jint.Runtime.Descriptors; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.JavaScript.Helpers; - -internal static class ObjectConverterHelper -{ - - - public static object? ProcessVariableValue(Engine engine, object? variableValue) - { - if (variableValue == null) - return null; - - if (variableValue is not ExpandoObject expandoObject) - return variableValue; - - return ConvertToJsObject(engine, expandoObject); - } - - public static ObjectInstance ConvertToJsObject(Engine engine, IDictionary expando) - { - var jsObject = engine.Intrinsics.Object.Construct([]); - - foreach (var kvp in expando) - { - var value = kvp.Value; - var jsValue = ConvertToJsValue(engine, value); - var propertyDescriptor = new PropertyDescriptor(jsValue, true, true, true); - jsObject.DefineOwnProperty(kvp.Key, propertyDescriptor); - } - - return jsObject; - } - - private static JsValue ConvertToJsValue(Engine engine, object? value) - { - if (value == null) - return JsValue.Null; - - if (value is IDictionary dict) - return ConvertToJsObject(engine, dict); - - var valueType = value.GetType(); - if (valueType.IsCollectionType()) - { - var list = (ICollection)value; - var jsArray = engine.Intrinsics.Array.Construct(list.Count); - var index = 0; - - foreach (var item in list) - jsArray.Set(index++, ConvertToJsValue(engine, item), true); - - return jsArray; - } - - if (value is string str) - return JsValue.FromObject(engine, str); - - if (value is int or double or float or decimal) - return JsValue.FromObject(engine, Convert.ToDouble(value)); - - if (value is bool b) - return JsValue.FromObject(engine, b); - - return JsValue.FromObject(engine, value); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Helpers/VariableNameValidator.cs b/src/scripting/Elsa.Scripting.JavaScript/Helpers/VariableNameValidator.cs deleted file mode 100644 index eab8c21d..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Helpers/VariableNameValidator.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Elsa.Scripting.JavaScript.Helpers; - -public static class VariableNameValidator -{ - public static bool IsValidVariableName(string name) - { - return !string.IsNullOrWhiteSpace(name) && name.All(char.IsLetterOrDigit); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/HostedServices/RegisterVariableTypesWithJavaScriptHostedService.cs b/src/scripting/Elsa.Scripting.JavaScript/HostedServices/RegisterVariableTypesWithJavaScriptHostedService.cs deleted file mode 100644 index afe7d143..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/HostedServices/RegisterVariableTypesWithJavaScriptHostedService.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Elsa.Scripting.JavaScript.Contracts; -using Elsa.Workflows.Management.Options; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.JavaScript.HostedServices; - -/// -/// Registers variable types with the JavaScript type alias registry -/// -public class RegisterVariableTypesWithJavaScriptHostedService : IHostedService -{ - private readonly ITypeAliasRegistry _typeAliasRegistry; - private readonly IOptions _managementOptions; - - /// - /// Initializes a new instance of the class. - /// - public RegisterVariableTypesWithJavaScriptHostedService(ITypeAliasRegistry typeAliasRegistry, IOptions managementOptions) - { - _typeAliasRegistry = typeAliasRegistry; - _managementOptions = managementOptions; - } - - /// - public Task StartAsync(CancellationToken cancellationToken) - { - foreach (var variableDescriptor in _managementOptions.Value.VariableDescriptors) - _typeAliasRegistry.RegisterType(variableDescriptor.Type, variableDescriptor.Type.Name); - - return Task.CompletedTask; - } - - /// - public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Models/Expression.cs b/src/scripting/Elsa.Scripting.JavaScript/Models/Expression.cs deleted file mode 100644 index e169edb8..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Models/Expression.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Elsa.Expressions.Models; - -namespace Elsa.Scripting.JavaScript.Models; - -/// -/// Represents an expression. -/// -public class JavaScriptExpression -{ - /// - /// Initializes a new instance of the representing a JavaScript expression. - /// - public static Expression Create(string value) => new("JavaScript", value); -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Notifications/CreatingJavaScriptEngine.cs b/src/scripting/Elsa.Scripting.JavaScript/Notifications/CreatingJavaScriptEngine.cs deleted file mode 100644 index 5a94058e..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Notifications/CreatingJavaScriptEngine.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Elsa.Expressions.Models; -using Elsa.Mediator.Contracts; - -namespace Elsa.Scripting.JavaScript.Notifications; - -/// -/// This notification is published when a JavaScript engine is being created. -/// -/// The options to use when creating the JavaScript engine. -/// The context in which the JavaScript engine is being created. -public record CreatingJavaScriptEngine(Jint.Options Options, ExpressionExecutionContext Context) : INotification; \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Notifications/EvaluatedJavaScript.cs b/src/scripting/Elsa.Scripting.JavaScript/Notifications/EvaluatedJavaScript.cs deleted file mode 100644 index ce9c4c45..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Notifications/EvaluatedJavaScript.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Elsa.Expressions.Models; -using Elsa.Mediator.Contracts; -using Jint; - -namespace Elsa.Scripting.JavaScript.Notifications; - -/// -/// This notification is published every time a JavaScript expression has been evaluated. -/// -public record EvaluatedJavaScript(Engine Engine, ExpressionExecutionContext Context, string Expression, object? Result) : INotification; \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Notifications/EvaluatingJavaScript.cs b/src/scripting/Elsa.Scripting.JavaScript/Notifications/EvaluatingJavaScript.cs deleted file mode 100644 index 99f61296..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Notifications/EvaluatingJavaScript.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Elsa.Expressions.Models; -using Elsa.Mediator.Contracts; -using Jint; - -namespace Elsa.Scripting.JavaScript.Notifications; - -/// -/// This notification is published every time a JavaScript expression is about to be evaluated. -/// It gives subscribers a chance to configure the with additional functions and variables. -/// -public record EvaluatingJavaScript(Engine Engine, ExpressionExecutionContext Context, string Expression) : INotification; \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/ObjectConverters/ByteArrayConverter.cs b/src/scripting/Elsa.Scripting.JavaScript/ObjectConverters/ByteArrayConverter.cs deleted file mode 100644 index 1e2a213a..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/ObjectConverters/ByteArrayConverter.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Diagnostics.CodeAnalysis; -using Jint; -using Jint.Native; -using Jint.Runtime.Interop; - -namespace Elsa.Scripting.JavaScript.ObjectConverters; - -/// -/// Converts a byte array to a instance representing a Uint8Array. -/// -internal class ByteArrayConverter : IObjectConverter -{ - public bool TryConvert(Engine engine, object value, [NotNullWhen(true)] out JsValue? result) - { - if (value is byte[] bytes) - { - result = engine.Intrinsics.ArrayBuffer.Construct(bytes); - return true; - } - - result = JsValue.Null; - return false; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/ObjectConverters/EnumToStringConverter.cs b/src/scripting/Elsa.Scripting.JavaScript/ObjectConverters/EnumToStringConverter.cs deleted file mode 100644 index 5060a296..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/ObjectConverters/EnumToStringConverter.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Diagnostics.CodeAnalysis; -using Jint; -using Jint.Native; -using Jint.Runtime.Interop; - -namespace Elsa.Scripting.JavaScript.ObjectConverters; - -internal class EnumToStringConverter : IObjectConverter -{ - public bool TryConvert(Engine engine, object value, [NotNullWhen(true)] out JsValue? result) - { - if (value is Enum) - { - result = value.ToString(); - return true; - } - - result = JsValue.Null; - return false; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/ObjectConverters/JsonElementConverter.cs b/src/scripting/Elsa.Scripting.JavaScript/ObjectConverters/JsonElementConverter.cs deleted file mode 100644 index d4a7941c..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/ObjectConverters/JsonElementConverter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Diagnostics.CodeAnalysis; -using System.Text.Json; -using System.Text.Json.Nodes; -using Jint; -using Jint.Native; -using Jint.Runtime.Interop; - -namespace Elsa.Scripting.JavaScript.ObjectConverters; - -internal class JsonElementConverter : IObjectConverter -{ - public bool TryConvert(Engine engine, object value, [NotNullWhen(true)] out JsValue? result) - { - if (value is JsonElement jsonElement) - { - result = ConvertJsonElementToJsValue(engine, jsonElement); - return true; - } - - result = JsValue.Null; - return false; - } - - private static JsValue ConvertJsonElementToJsValue(Engine engine, JsonElement element) => - element.ValueKind switch - { - JsonValueKind.Object => JsValue.FromObject(engine, JsonObject.Create(element)), - JsonValueKind.Array => JsValue.FromObject(engine, JsonArray.Create(element)), - JsonValueKind.String => JsValue.FromObject(engine, element.GetString()), - JsonValueKind.Number => element.TryGetInt32(out var intValue) ? JsNumber.Create(intValue) : JsNumber.Create(element.GetDouble()), - JsonValueKind.True => JsBoolean.True, - JsonValueKind.False => JsBoolean.False, - JsonValueKind.Undefined => JsValue.Undefined, - JsonValueKind.Null => JsValue.Null, - _ => throw new InvalidOperationException($"Unsupported JsonValueKind: {element.ValueKind}") - }; -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Options/JintOptions.cs b/src/scripting/Elsa.Scripting.JavaScript/Options/JintOptions.cs deleted file mode 100644 index 1b8ae6a9..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Options/JintOptions.cs +++ /dev/null @@ -1,110 +0,0 @@ -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Jint; - -namespace Elsa.Scripting.JavaScript.Options; - -/// -/// Options for the Jint JavaScript engine. -/// -public class JintOptions -{ - /// - /// A list of callbacks that are invoked when the Jint engine options is created. Use this to configure the engine options. - /// - internal Action ConfigureEngineOptionsCallback = (_, _) => { }; - - /// - /// A list of callbacks that are invoked when the Jint engine is created. Use this to configure the engine. - /// - internal Action ConfigureEngineCallback = (_, _) => { }; - - /// - /// Enables access to any .NET class. Do not enable if you are executing workflows from untrusted sources (e.g. user defined workflows). - /// - /// See Jint docs for more: https://github.com/sebastienros/jint#accessing-net-assemblies-and-classes - /// - public bool AllowClrAccess { get; set; } - - /// - /// Enables access to .NET configuration via the getConfig function. - /// Do not enable if you are executing workflows from untrusted sources (e.g user defined workflows). - /// - public bool AllowConfigurationAccess { get; set; } - - /// - /// The timeout for script caching. - /// - /// - /// The ScriptCacheTimeout property specifies the duration for which the scripts are cached in the Jint JavaScript engine. When a script is executed, it is compiled and cached for future use. This caching improves performance by avoiding repetitive compilation of the same script. - /// If the value of ScriptCacheTimeout is null, the scripts are cached indefinitely. If a time value is specified, the scripts will be purged from the cache after they've been unused for the specified duration and recompiled on next use. - /// - public TimeSpan? ScriptCacheTimeout { get; set; } = TimeSpan.FromDays(1); - - /// - /// Disables the generation of variable wrappers. E.g. getMyVariable() will no longer be available for variables. Instead, you can only access variables using getVariable("MyVariable") function. - /// This is useful if your application requires the use of invalid JavaScript variable names. - /// - public bool DisableWrappers { get; set; } - - /// - /// Disables copying workflow variables into the Jint engine and copying them back into the workflow execution context. - /// Disabling this option will increase performance but will also prevent you from accessing workflow variables from within JavaScript expressions using the variables.MyVariable syntax. - /// - public bool DisableVariableCopying { get; set; } - - /// - /// Configures the Jint engine options. - /// - /// A callback that is invoked when the Jint engine options are created. Use this to configure the options. - public JintOptions ConfigureEngineOptions(Action configurator) - { - ConfigureEngineOptionsCallback += (options, _) => configurator(options); - return this; - } - - /// - /// Configures the Jint engine options. - /// - /// A callback that is invoked when the Jint engine options are created. Use this to configure the options. - public JintOptions ConfigureEngineOptions(Action configurator) - { - ConfigureEngineOptionsCallback += configurator; - return this; - } - - /// - /// Configures the Jint engine. - /// - /// A callback that is invoked when the Jint engine is created. Use this to configure the engine. - public JintOptions ConfigureEngine(Action configurator) - { - ConfigureEngineCallback += configurator; - return this; - } - - /// - /// Configures the Jint engine. - /// - /// A callback that is invoked when the Jint engine is created. Use this to configure the engine. - public JintOptions ConfigureEngine(Action configurator) - { - return ConfigureEngine((engine, _) => configurator(engine)); - } - - /// - /// Registers the specified type T with the engine. - /// - public JintOptions RegisterType() - { - return ConfigureEngine(engine => engine.RegisterType()); - } - - /// - /// Registers the specified type with the engine. - /// - public JintOptions RegisterType(Type type) - { - return ConfigureEngine(engine => engine.RegisterType(type)); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Providers/ActivityOutputFunctionsDefinitionProvider.cs b/src/scripting/Elsa.Scripting.JavaScript/Providers/ActivityOutputFunctionsDefinitionProvider.cs deleted file mode 100644 index 04a0eeed..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Providers/ActivityOutputFunctionsDefinitionProvider.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Extensions; -using Elsa.Scripting.JavaScript.Options; -using Elsa.Scripting.JavaScript.TypeDefinitions.Abstractions; -using Elsa.Scripting.JavaScript.TypeDefinitions.Models; -using Elsa.Workflows; -using Humanizer; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.JavaScript.Providers; - -/// -/// Produces s for common functions. -/// -[UsedImplicitly] -internal class ActivityOutputFunctionsDefinitionProvider(IActivityRegistryLookupService activityRegistryLookup, IOptions options) : FunctionDefinitionProvider -{ - protected override async ValueTask> GetFunctionDefinitionsAsync(TypeDefinitionContext context) - { - if(options.Value.DisableWrappers) - return []; - - var nodes = context.WorkflowGraph.Nodes; - var activitiesWithOutputs = nodes.GetActivitiesWithOutputs(activityRegistryLookup).Where(x => x.activity.Name != null && x.activity.Name.IsValidVariableName()); - var definitions = new List(); - - await foreach (var (activity, activityDescriptor) in activitiesWithOutputs) - { - definitions.AddRange(from output in activityDescriptor.Outputs.Where(x => x.Name.IsValidVariableName()) - select output.Name.Pascalize() - into outputPascalName - let activityNamePascalName = activity.Name.Pascalize() - select CreateFunctionDefinition(builder => builder.Name($"get{outputPascalName}From{activityNamePascalName}").ReturnType("any"))); - } - - return definitions; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Providers/CommonFunctionsDefinitionProvider.cs b/src/scripting/Elsa.Scripting.JavaScript/Providers/CommonFunctionsDefinitionProvider.cs deleted file mode 100644 index 049c091d..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Providers/CommonFunctionsDefinitionProvider.cs +++ /dev/null @@ -1,157 +0,0 @@ -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Contracts; -using Elsa.Scripting.JavaScript.Extensions; -using Elsa.Scripting.JavaScript.Options; -using Elsa.Scripting.JavaScript.TypeDefinitions.Abstractions; -using Elsa.Scripting.JavaScript.TypeDefinitions.Models; -using Humanizer; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.JavaScript.Providers; - -/// -/// Produces s for common functions. -/// -[UsedImplicitly] -internal class CommonFunctionsDefinitionProvider(ITypeAliasRegistry typeAliasRegistry, IOptions options) : FunctionDefinitionProvider -{ - protected override IEnumerable GetFunctionDefinitions(TypeDefinitionContext context) - { - yield return CreateFunctionDefinition(builder => builder - .Name("getWorkflowDefinitionId") - .ReturnType("string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getWorkflowDefinitionVersionId") - .ReturnType("string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getWorkflowDefinitionVersion") - .ReturnType("number")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getWorkflowInstanceId") - .ReturnType("string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getCorrelationId") - .ReturnType("string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("setCorrelationId") - .Parameter("value", "string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getWorkflowInstanceName") - .ReturnType("string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("setWorkflowInstanceName") - .Parameter("value", "string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("setVariable") - .Parameter("name", "string") - .Parameter("value", "any")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getVariable") - .Parameter("name", "string") - .ReturnType("any")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getInput") - .Parameter("name", "string") - .ReturnType("any")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getOutputFrom") - .Parameter("activityId", "string") - .Parameter("outputName", "string", true) - .ReturnType("any")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getLastResult") - .ReturnType("any")); - - yield return CreateFunctionDefinition(builder => builder - .Name("isNullOrWhiteSpace") - .Parameter("value", "string") - .ReturnType("boolean")); - - yield return CreateFunctionDefinition(builder => builder - .Name("isNullOrEmpty") - .Parameter("value", "string") - .ReturnType("boolean")); - - yield return CreateFunctionDefinition(builder => builder - .Name("parseGuid") - .Parameter("value", "string") - .ReturnType("Guid")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getShortGuid") - .ReturnType("string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getGuid") - .ReturnType("Guid")); - - yield return CreateFunctionDefinition(builder => builder - .Name("getGuidString") - .ReturnType("string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("toJson") - .Parameter("value", "any") - .ReturnType("string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("bytesToString") - .Parameter("value", "Byte[]") - .ReturnType("string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("bytesFromString") - .Parameter("value", "string") - .ReturnType("Byte[]")); - - yield return CreateFunctionDefinition(builder => builder - .Name("bytesToBase64") - .Parameter("value", "Byte[]") - .ReturnType("string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("bytesFromBase64") - .Parameter("value", "string") - .ReturnType("Byte[]")); - - yield return CreateFunctionDefinition(builder => builder - .Name("stringFromBase64") - .Parameter("value", "string") - .ReturnType("string")); - - yield return CreateFunctionDefinition(builder => builder - .Name("stringToBase64") - .Parameter("value", "string") - .ReturnType("string")); - - if (!options.Value.DisableWrappers) - { - // Variable getter and setters. - foreach (var variable in context.WorkflowGraph.Workflow.Variables.Where(x => x.Name.IsValidVariableName())) - { - var pascalName = variable.Name.Pascalize(); - var variableType = variable.GetVariableType(); - var typeAlias = typeAliasRegistry.TryGetAlias(variableType, out var alias) ? alias : "any"; - - // get{Variable}. - yield return CreateFunctionDefinition(builder => builder.Name($"get{pascalName}").ReturnType(typeAlias)); - - // set{Variable}. - yield return CreateFunctionDefinition(builder => builder.Name($"set{pascalName}").Parameter("value", typeAlias)); - } - } - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Providers/CommonTypesDefinitionProvider.cs b/src/scripting/Elsa.Scripting.JavaScript/Providers/CommonTypesDefinitionProvider.cs deleted file mode 100644 index cf68612f..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Providers/CommonTypesDefinitionProvider.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Text.Json.Nodes; -using Elsa.Scripting.JavaScript.TypeDefinitions.Abstractions; -using Elsa.Scripting.JavaScript.TypeDefinitions.Contracts; -using Elsa.Scripting.JavaScript.TypeDefinitions.Models; - -namespace Elsa.Scripting.JavaScript.Providers; - -/// -/// Produces s for common types. -/// -internal class CommonTypeDefinitionProvider(ITypeDescriber typeDescriber) : TypeDefinitionProvider -{ - protected override IEnumerable GetTypeDefinitions(TypeDefinitionContext context) - { - yield return typeDescriber.DescribeType(typeof(Guid)); - yield return typeDescriber.DescribeType(typeof(JsonObject)); - yield return typeDescriber.DescribeType(typeof(Random)); - } -} diff --git a/src/scripting/Elsa.Scripting.JavaScript/Providers/InputFunctionsDefinitionProvider.cs b/src/scripting/Elsa.Scripting.JavaScript/Providers/InputFunctionsDefinitionProvider.cs deleted file mode 100644 index 0940b732..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Providers/InputFunctionsDefinitionProvider.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Elsa.Scripting.JavaScript.Contracts; -using Elsa.Scripting.JavaScript.Helpers; -using Elsa.Scripting.JavaScript.Options; -using Elsa.Scripting.JavaScript.TypeDefinitions.Abstractions; -using Elsa.Scripting.JavaScript.TypeDefinitions.Models; -using Elsa.Workflows.Activities; -using Humanizer; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.JavaScript.Providers; - -/// -/// Produces s for common functions. -/// -[UsedImplicitly] -internal class InputFunctionsDefinitionProvider(ITypeAliasRegistry typeAliasRegistry, IOptions options) : FunctionDefinitionProvider -{ - protected override ValueTask> GetFunctionDefinitionsAsync(TypeDefinitionContext context) - { - if(options.Value.DisableWrappers) - return ValueTask.FromResult>([]); - - var workflow = context.WorkflowGraph.Workflow; - return ValueTask.FromResult(GetFunctionDefinitionsAsync(workflow)); - } - - private IEnumerable GetFunctionDefinitionsAsync(Workflow workflow) - { - // Input argument getters. - foreach (var input in workflow.Inputs.Where(x => VariableNameValidator.IsValidVariableName(x.Name))) - { - var pascalName = input.Name.Pascalize(); - var variableType = input.Type; - var typeAlias = typeAliasRegistry.TryGetAlias(variableType, out var alias) ? alias : "any"; - - // get{Input}. - yield return CreateFunctionDefinition(builder => builder.Name($"get{pascalName}").ReturnType(typeAlias)); - } - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Providers/JavaScriptExpressionSyntaxProvider.cs b/src/scripting/Elsa.Scripting.JavaScript/Providers/JavaScriptExpressionSyntaxProvider.cs deleted file mode 100644 index 86dec3d8..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Providers/JavaScriptExpressionSyntaxProvider.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Elsa.Expressions.Contracts; -using Elsa.Expressions.Models; -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Expressions; -using JetBrains.Annotations; -using Microsoft.Extensions.DependencyInjection; - -namespace Elsa.Scripting.JavaScript.Providers; - -[UsedImplicitly] -internal class JavaScriptExpressionDescriptorProvider : IExpressionDescriptorProvider -{ - private const string TypeName = "JavaScript"; - - public IEnumerable GetDescriptors() - { - yield return new() - { - Type = TypeName, - DisplayName = "JavaScript", - Properties = new { MonacoLanguage = "javascript" }.ToDictionary(), - HandlerFactory = ActivatorUtilities.GetServiceOrCreateInstance - }; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Providers/VariableTypeDefinitionProvider.cs b/src/scripting/Elsa.Scripting.JavaScript/Providers/VariableTypeDefinitionProvider.cs deleted file mode 100644 index c1dc0955..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Providers/VariableTypeDefinitionProvider.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Dynamic; -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.TypeDefinitions.Abstractions; -using Elsa.Scripting.JavaScript.TypeDefinitions.Contracts; -using Elsa.Scripting.JavaScript.TypeDefinitions.Models; - -namespace Elsa.Scripting.JavaScript.Providers; - -/// -/// Produces s for variable types. -/// -internal class VariableTypeDefinitionProvider(ITypeDescriber typeDescriber) : TypeDefinitionProvider -{ - protected override IEnumerable GetTypeDefinitions(TypeDefinitionContext context) - { - var excludedTypes = new Func[] - { - type => type == typeof(ExpandoObject), - type => typeof(IDictionary).IsAssignableFrom(type), - type => type == typeof(object) - }; - - var variables = context.WorkflowGraph.Workflow.Variables; - - var variableTypeQuery = - from variable in variables - let variableType = variable.GetVariableType() - where (variableType.IsClass || variableType.IsInterface || variableType.IsEnum) && !variableType.IsPrimitive && !excludedTypes.Any(x => x(variableType)) - select variableType; - - var variableTypes = variableTypeQuery.Distinct(); - - foreach (var variableType in variableTypes) - { - yield return typeDescriber.DescribeType(variableType); - } - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Providers/WorkflowVariablesTypeDefinitionProvider.cs b/src/scripting/Elsa.Scripting.JavaScript/Providers/WorkflowVariablesTypeDefinitionProvider.cs deleted file mode 100644 index 96524817..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Providers/WorkflowVariablesTypeDefinitionProvider.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Elsa.Extensions; -using Elsa.Scripting.JavaScript.Extensions; -using Elsa.Scripting.JavaScript.Options; -using Elsa.Scripting.JavaScript.TypeDefinitions.Abstractions; -using Elsa.Scripting.JavaScript.TypeDefinitions.Models; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.JavaScript.Providers; - -[UsedImplicitly] -internal class WorkflowVariablesTypeDefinitionProvider(IOptions options) : TypeDefinitionProvider -{ - protected override IEnumerable GetTypeDefinitions(TypeDefinitionContext context) - { - if(options.Value.DisableWrappers) - yield break; - - var variables = context.WorkflowGraph.Workflow.Variables; - - var workflowTypeDefinition = new TypeDefinition - { - Name = "WorkflowVariables", - DeclarationKeyword = "class" - }; - - foreach (var variable in variables.Where(x => x.Name.IsValidVariableName())) - { - var variableType = variable.GetVariableType(); - workflowTypeDefinition.Properties.Add(new PropertyDefinition - { - Name = variable.Name, - Type = variableType.Name - }); - } - - yield return workflowTypeDefinition; - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Providers/WorkflowVariablesVariableProvider.cs b/src/scripting/Elsa.Scripting.JavaScript/Providers/WorkflowVariablesVariableProvider.cs deleted file mode 100644 index 8af56cf3..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Providers/WorkflowVariablesVariableProvider.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Elsa.Scripting.JavaScript.Options; -using Elsa.Scripting.JavaScript.TypeDefinitions.Abstractions; -using Elsa.Scripting.JavaScript.TypeDefinitions.Models; -using JetBrains.Annotations; -using Microsoft.Extensions.Options; - -namespace Elsa.Scripting.JavaScript.Providers; - -[UsedImplicitly] -internal class WorkflowVariablesVariableProvider(IOptions options) : VariableDefinitionProvider -{ - protected override IEnumerable GetVariableDefinitions(TypeDefinitionContext context) - { - if(options.Value.DisableWrappers) - yield break; - - yield return CreateVariableDefinition(x => x.Name("variables").Type("WorkflowVariables")); - } -} \ No newline at end of file diff --git a/src/scripting/Elsa.Scripting.JavaScript/Services/JintJavaScriptEvaluator.cs b/src/scripting/Elsa.Scripting.JavaScript/Services/JintJavaScriptEvaluator.cs deleted file mode 100644 index aa8d74ee..00000000 --- a/src/scripting/Elsa.Scripting.JavaScript/Services/JintJavaScriptEvaluator.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System.Diagnostics.CodeAnalysis; -using System.Security.Cryptography; -using System.Text; -using Acornima.Ast; -using Elsa.Expressions.Helpers; -using Elsa.Expressions.Models; -using Elsa.Scripting.JavaScript.Contracts; -using Elsa.Scripting.JavaScript.Helpers; -using Elsa.Scripting.JavaScript.Notifications; -using Elsa.Scripting.JavaScript.ObjectConverters; -using Elsa.Scripting.JavaScript.Options; -using Elsa.Mediator.Contracts; -using Jint; -using Jint.Runtime.Interop; -using Microsoft.Extensions.Caching.Memory; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Options; - -// ReSharper disable ConvertClosureToMethodGroup -namespace Elsa.Scripting.JavaScript.Services; - -/// -/// Provides a JavaScript evaluator using Jint. -/// -public class JintJavaScriptEvaluator(IConfiguration configuration, INotificationSender mediator, IOptions scriptOptions, IMemoryCache memoryCache) - : IJavaScriptEvaluator -{ - private readonly JintOptions _jintOptions = scriptOptions.Value; - - /// - [RequiresUnreferencedCode("The Jint library uses reflection and can't be statically analyzed.")] - public async Task EvaluateAsync(string expression, - Type returnType, - ExpressionExecutionContext context, - ExpressionEvaluatorOptions? options = null, - Action? configureEngine = null, - CancellationToken cancellationToken = default) - { - var engine = await GetConfiguredEngine(configureEngine, context, options, cancellationToken); - await mediator.SendAsync(new EvaluatingJavaScript(engine, context, expression), cancellationToken); - var result = ExecuteExpressionAndGetResult(engine, expression); - await mediator.SendAsync(new EvaluatedJavaScript(engine, context, expression, result), cancellationToken); - - return result.ConvertTo(returnType); - } - - private async Task GetConfiguredEngine(Action? configureEngine, ExpressionExecutionContext context, ExpressionEvaluatorOptions? options, CancellationToken cancellationToken) - { - options ??= new(); - - var engineOptions = new Jint.Options - { - ExperimentalFeatures = ExperimentalFeature.TaskInterop, - }; - - ConfigureClrAccess(engineOptions); - ConfigureObjectWrapper(engineOptions); - ConfigureObjectConverters(engineOptions); - - await mediator.SendAsync(new CreatingJavaScriptEngine(engineOptions, context), cancellationToken); - _jintOptions.ConfigureEngineOptionsCallback(engineOptions, context); - - var engine = new Engine(engineOptions); - - configureEngine?.Invoke(engine); - ConfigureArgumentGetters(engine, options); - ConfigureConfigurationAccess(engine); - _jintOptions.ConfigureEngineCallback(engine, context); - - return engine; - } - - private void ConfigureClrAccess(Jint.Options options) - { - if (_jintOptions.AllowClrAccess) - options.AllowClr(); - } - - private void ConfigureObjectWrapper(Jint.Options options) - { - options.SetWrapObjectHandler((engine, target, type) => - { - var instance = ObjectWrapper.Create(engine, target); - - if (ObjectArrayHelper.DetermineIfObjectIsArrayLikeClrCollection(target.GetType())) - instance.Prototype = engine.Intrinsics.Array.PrototypeObject; - - return instance; - }); - } - - private void ConfigureObjectConverters(Jint.Options options) - { - options.Interop.ObjectConverters.AddRange([new ByteArrayConverter(), new EnumToStringConverter(), new JsonElementConverter()]); - } - - private void ConfigureArgumentGetters(Engine engine, ExpressionEvaluatorOptions options) - { - foreach (var argument in options.Arguments) - engine.SetValue($"get{argument.Key}", (Func)(() => argument.Value)); - } - - private void ConfigureConfigurationAccess(Engine engine) - { - if (_jintOptions.AllowConfigurationAccess) - engine.SetValue("getConfig", (Func)(name => configuration.GetSection(name).Value)); - } - - private object? ExecuteExpressionAndGetResult(Engine engine, string expression) - { - var preparedScript = GetOrCreatePrepareScript(expression); - var result = engine.Evaluate(preparedScript); - return result.UnwrapIfPromise().ToObject(); - } - - private Prepared