diff --git a/ArkBot.Tests/ArkBot.Tests.csproj b/ArkBot.Tests/ArkBot.Tests.csproj index b2ca838..37c7223 100644 --- a/ArkBot.Tests/ArkBot.Tests.csproj +++ b/ArkBot.Tests/ArkBot.Tests.csproj @@ -25,6 +25,7 @@ DEBUG;TRACE prompt 4 + x64 pdbonly @@ -34,6 +35,24 @@ prompt 4 + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + diff --git a/ArkBot.sln b/ArkBot.sln index 1093962..f8409cc 100644 --- a/ArkBot.sln +++ b/ArkBot.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2003 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArkBot", "ArkBot\ArkBot.csproj", "{BB61C4D0-0060-401B-BF8F-4747CBD86D9D}" EndProject @@ -10,17 +10,28 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {BB61C4D0-0060-401B-BF8F-4747CBD86D9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BB61C4D0-0060-401B-BF8F-4747CBD86D9D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB61C4D0-0060-401B-BF8F-4747CBD86D9D}.Debug|x64.ActiveCfg = Debug|x64 + {BB61C4D0-0060-401B-BF8F-4747CBD86D9D}.Debug|x64.Build.0 = Debug|x64 {BB61C4D0-0060-401B-BF8F-4747CBD86D9D}.Release|Any CPU.ActiveCfg = Release|Any CPU {BB61C4D0-0060-401B-BF8F-4747CBD86D9D}.Release|Any CPU.Build.0 = Release|Any CPU + {BB61C4D0-0060-401B-BF8F-4747CBD86D9D}.Release|x64.ActiveCfg = Release|x64 + {BB61C4D0-0060-401B-BF8F-4747CBD86D9D}.Release|x64.Build.0 = Release|x64 {F302C35B-97B4-4E9A-B628-F17FE7DB8A45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F302C35B-97B4-4E9A-B628-F17FE7DB8A45}.Debug|x64.ActiveCfg = Debug|x64 {F302C35B-97B4-4E9A-B628-F17FE7DB8A45}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F302C35B-97B4-4E9A-B628-F17FE7DB8A45}.Release|x64.ActiveCfg = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CAF3F7A8-BCB0-4EEA-9730-DF724C1C6C2C} + EndGlobalSection EndGlobal diff --git a/ArkBot/App.xaml b/ArkBot/App.xaml index ef26420..7a49456 100644 --- a/ArkBot/App.xaml +++ b/ArkBot/App.xaml @@ -1,9 +1,14 @@  - + + + + + diff --git a/ArkBot/App.xaml.cs b/ArkBot/App.xaml.cs index 47b0b8d..5df8fba 100644 --- a/ArkBot/App.xaml.cs +++ b/ArkBot/App.xaml.cs @@ -6,9 +6,11 @@ using System.Data; using System.IO; using System.Linq; +using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows; +using CefSharp; namespace ArkBot { @@ -23,6 +25,15 @@ public App() Console.SetOut(new WpfConsoleWriter()); Kernel32.RegisterApplicationRestart("/restart", (int)RestartRestrictions.None); + + var settings = new CefSettings() + { + //LogSeverity = LogSeverity.Verbose, + LogFile = "logs\\cefsharp.log", + BrowserSubprocessPath = "lib\\CefSharp.BrowserSubprocess.exe", + }; + + Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null); } private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) diff --git a/ArkBot/Ark/ArkClusterContext.cs b/ArkBot/Ark/ArkClusterContext.cs index 688cca4..62d1520 100644 --- a/ArkBot/Ark/ArkClusterContext.cs +++ b/ArkBot/Ark/ArkClusterContext.cs @@ -1,4 +1,5 @@ -using ArkBot.Services; +using ArkBot.Configuration.Model; +using ArkBot.Services; using ArkSavegameToolkitNet; using ArkSavegameToolkitNet.Domain; using System; diff --git a/ArkBot/Ark/ArkContextManager.cs b/ArkBot/Ark/ArkContextManager.cs index e5c6e79..7d5a73a 100644 --- a/ArkBot/Ark/ArkContextManager.cs +++ b/ArkBot/Ark/ArkContextManager.cs @@ -1,4 +1,5 @@ -using ArkBot.Services; +using ArkBot.Configuration.Model; +using ArkBot.Services; using ArkBot.Services.Data; using ArkBot.Threading; using ArkSavegameToolkitNet; @@ -89,7 +90,7 @@ private void _saveFileWatcher_Changed(ArkServerContext serverContext, ArkSaveFil { QueueServerUpdate(serverContext); - var clusterContext = GetCluster(serverContext.Config.Cluster); + var clusterContext = GetCluster(serverContext.Config.ClusterKey); if (clusterContext == null) return; QueueClusterUpdate(clusterContext); } @@ -225,7 +226,7 @@ public ArkServerContext[] GetServersInCluster(string key) { if (key == null) return null; - return Servers.Where(x => x.Config.Cluster.Equals(key, StringComparison.OrdinalIgnoreCase)).ToArray(); + return Servers.Where(x => x.Config.ClusterKey.Equals(key, StringComparison.OrdinalIgnoreCase)).ToArray(); } public ArkClusterContext GetCluster(string key) diff --git a/ArkBot/Ark/ArkServerContext.cs b/ArkBot/Ark/ArkServerContext.cs index 797a7cb..4174b85 100644 --- a/ArkBot/Ark/ArkServerContext.cs +++ b/ArkBot/Ark/ArkServerContext.cs @@ -1,4 +1,5 @@ -using ArkBot.Database.Model; +using ArkBot.Configuration.Model; +using ArkBot.Database.Model; using ArkBot.Services; using ArkBot.Services.Data; using ArkBot.Steam; @@ -166,15 +167,15 @@ public bool Update(bool manualUpdate, IConfig fullconfig, ISavegameBackupService SavegameBackupResult bresult = null; try { - if (fullconfig.BackupsEnabled) + if (fullconfig.Backups.BackupsEnabled) { - bresult = savegameBackupService.CreateBackup(Config, _contextManager?.GetCluster(Config.Cluster)?.Config); + bresult = savegameBackupService.CreateBackup(Config, _contextManager?.GetCluster(Config.ClusterKey)?.Config); if (bresult != null && bresult.ArchivePaths != null) progress.Report($@"Server ({Config.Key}): Backup successfull ({(string.Join(", ", bresult.ArchivePaths.Select(x => $@"""{x}""")))})!"); else progress.Report($"Server ({Config.Key}): Backup failed..."); } } catch (Exception ex) { Logging.LogException($"Server ({Config.Key}): Backup failed", ex, typeof(ArkServerContext), LogLevel.ERROR, ExceptionLevel.Ignored); } - BackupCompleted?.Invoke(this, fullconfig.BackupsEnabled, bresult); + BackupCompleted?.Invoke(this, fullconfig.Backups.BackupsEnabled, bresult); } diff --git a/ArkBot/Ark/IArkUpdateableContext.cs b/ArkBot/Ark/IArkUpdateableContext.cs index ee5f5b6..3cd7aff 100644 --- a/ArkBot/Ark/IArkUpdateableContext.cs +++ b/ArkBot/Ark/IArkUpdateableContext.cs @@ -1,4 +1,5 @@ -using ArkBot.Services; +using ArkBot.Configuration.Model; +using ArkBot.Services; using System; using System.Collections.Generic; using System.Linq; diff --git a/ArkBot/ArkBot.csproj b/ArkBot/ArkBot.csproj index 4599f18..1237f3f 100644 --- a/ArkBot/ArkBot.csproj +++ b/ArkBot/ArkBot.csproj @@ -1,5 +1,7 @@  + + @@ -46,6 +48,27 @@ basket_empty.ico + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + false + prompt + MinimumRecommendedRules.ruleset + true + ..\packages\Accord.3.5.0\lib\net46\Accord.dll @@ -152,30 +175,6 @@ ..\packages\FSharp.Core.4.1.12\lib\net45\FSharp.Core.dll True - - ..\packages\Google.Apis.1.20.0\lib\net45\Google.Apis.dll - True - - - ..\packages\Google.Apis.Auth.1.20.0\lib\net45\Google.Apis.Auth.dll - True - - - ..\packages\Google.Apis.Auth.1.20.0\lib\net45\Google.Apis.Auth.PlatformServices.dll - True - - - ..\packages\Google.Apis.Core.1.20.0\lib\net45\Google.Apis.Core.dll - True - - - ..\packages\Google.Apis.1.20.0\lib\net45\Google.Apis.PlatformServices.dll - True - - - ..\packages\Google.Apis.Urlshortener.v1.1.20.0.138\lib\net45\Google.Apis.Urlshortener.v1.dll - True - ..\packages\HtmlAgilityPack.1.4.9\lib\Net45\HtmlAgilityPack.dll True @@ -184,6 +183,9 @@ ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll True + + ..\packages\Markdig.0.14.8\lib\net40\Markdig.dll + ..\packages\Microsoft.AspNet.SignalR.Core.2.2.2\lib\net45\Microsoft.AspNet.SignalR.Core.dll True @@ -264,6 +266,9 @@ ..\packages\Nancy.1.4.1\lib\net40\Nancy.dll True + + ..\packages\Nancy.Bootstrappers.Autofac.1.4.1\lib\net40\Nancy.Bootstrappers.Autofac.dll + ..\packages\Nancy.Owin.1.4.1\lib\net40\Nancy.Owin.dll True @@ -466,6 +471,9 @@ ..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll True + + ..\packages\Validar.Fody.1.6.0.0\lib\net452\Validar.dll + ..\packages\VDS.Common.1.6.0\lib\net40-client\VDS.Common.dll True @@ -475,29 +483,23 @@ True - - ..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.dll - True + + ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.dll - - ..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll - True + + ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll - - ..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll - True + + ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll - - ..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll - True + + ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll - - ..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.DataGrid.dll - True + + ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.DataGrid.dll - - ..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.Toolkit.dll - True + + ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.Toolkit.dll ..\packages\Zlib.Portable.Signed.1.11.0\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll @@ -511,6 +513,23 @@ + + + + + + + + + + + + + + + + + @@ -530,9 +549,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + About.xaml + + + Configuration.xaml + @@ -566,12 +630,14 @@ + + @@ -603,7 +669,7 @@ 201703262316086_Voting.cs - + @@ -637,7 +703,7 @@ - + @@ -657,15 +723,15 @@ - - + + @@ -765,6 +831,12 @@ --> + + PreserveNewest + + + PreserveNewest + PreserveNewest @@ -801,6 +873,14 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile Designer @@ -809,9 +889,16 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + + + $(TargetDir)\lib + @@ -827,6 +914,12 @@ + + + + + + @@ -840,6 +933,7 @@ + @@ -851,4 +945,8 @@ + + + + \ No newline at end of file diff --git a/ArkBot/ArkBot.nuspec b/ArkBot/ArkBot.nuspec index e1a805b..acf09dc 100644 --- a/ArkBot/ArkBot.nuspec +++ b/ArkBot/ArkBot.nuspec @@ -1,17 +1,17 @@  - ArkDiscordBot + ArkBot $version$ - ARK Survival Evolved Discord Bot + ARK Bot tsebring https://raw.githubusercontent.com/tsebring/ArkBot/master/LICENSE.txt https://github.com/tsebring/ArkBot/ true - A Discord bot for ARK Survival Evolved utilizing https://github.com/arktools to extract data from savegame-files on your server. - arksurvivalevolved discord-bot + ARK Survival Evolved application that monitors and extracts data from local ARK servers and exposes this data through a Web App, Web API and Discord Bot. + arksurvivalevolved ark game-ark game webapi discord-bot community server-management administration web-app - + \ No newline at end of file diff --git a/ArkBot/Browser/Behaviours/HoverLinkBehaviour.cs b/ArkBot/Browser/Behaviours/HoverLinkBehaviour.cs new file mode 100644 index 0000000..57522e0 --- /dev/null +++ b/ArkBot/Browser/Behaviours/HoverLinkBehaviour.cs @@ -0,0 +1,39 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp.Wpf; +using System.Windows; +using System.Windows.Interactivity; +using System; + +namespace ArkBot.Browser.Behaviours +{ + public class HoverLinkBehaviour : Behavior + { + // Using a DependencyProperty as the backing store for HoverLink. This enables animation, styling, binding, etc... + public static readonly DependencyProperty HoverLinkProperty = DependencyProperty.Register("HoverLink", typeof(string), typeof(HoverLinkBehaviour), new PropertyMetadata(string.Empty)); + + public string HoverLink + { + get { return (string)GetValue(HoverLinkProperty); } + set { SetValue(HoverLinkProperty, value); } + } + + protected override void OnAttached() + { + AssociatedObject.StatusMessage += OnStatusMessageChanged; + } + + protected override void OnDetaching() + { + AssociatedObject.StatusMessage -= OnStatusMessageChanged; + } + + private void OnStatusMessageChanged(object sender, CefSharp.StatusMessageEventArgs e) + { + var chromiumWebBrowser = sender as ChromiumWebBrowser; + chromiumWebBrowser.Dispatcher.BeginInvoke((Action)(() => HoverLink = e.Value)); + } + } +} diff --git a/ArkBot/Browser/EventArgs/BaseRequestEventArgs.cs b/ArkBot/Browser/EventArgs/BaseRequestEventArgs.cs new file mode 100644 index 0000000..833bef4 --- /dev/null +++ b/ArkBot/Browser/EventArgs/BaseRequestEventArgs.cs @@ -0,0 +1,20 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public abstract class BaseRequestEventArgs : System.EventArgs + { + protected BaseRequestEventArgs(IWebBrowser browserControl, IBrowser browser) + { + BrowserControl = browserControl; + Browser = browser; + } + + public IWebBrowser BrowserControl { get; private set; } + public IBrowser Browser { get; private set; } + } +} diff --git a/ArkBot/Browser/EventArgs/GetAuthCredentialsEventArgs.cs b/ArkBot/Browser/EventArgs/GetAuthCredentialsEventArgs.cs new file mode 100644 index 0000000..fee239f --- /dev/null +++ b/ArkBot/Browser/EventArgs/GetAuthCredentialsEventArgs.cs @@ -0,0 +1,43 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class GetAuthCredentialsEventArgs : BaseRequestEventArgs + { + public GetAuthCredentialsEventArgs(IWebBrowser browserControl, IBrowser browser, IFrame frame, bool isProxy, string host, int port, string realm, string scheme, IAuthCallback callback) : base(browserControl, browser) + { + Frame = frame; + IsProxy = isProxy; + Host = host; + Port = port; + Realm = realm; + Scheme = scheme; + Callback = callback; + + ContinueAsync = false; // default + } + + public IFrame Frame { get; private set; } + public bool IsProxy { get; private set; } + public string Host { get; private set; } + public int Port { get; private set; } + public string Realm { get; private set; } + public string Scheme { get; private set; } + + /// + /// Callback interface used for asynchronous continuation of authentication requests. + /// + public IAuthCallback Callback { get; private set; } + + /// + /// Set to true to continue the request and call + /// when the authentication information + /// is available. Set to false to cancel the request. + /// + public bool ContinueAsync { get; set; } + } +} diff --git a/ArkBot/Browser/EventArgs/GetResourceResponseFilterEventArgs.cs b/ArkBot/Browser/EventArgs/GetResourceResponseFilterEventArgs.cs new file mode 100644 index 0000000..717cdad --- /dev/null +++ b/ArkBot/Browser/EventArgs/GetResourceResponseFilterEventArgs.cs @@ -0,0 +1,29 @@ +// Copyright � 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class GetResourceResponseFilterEventArgs : BaseRequestEventArgs + { + public GetResourceResponseFilterEventArgs(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response) : base(browserControl, browser) + { + Frame = frame; + Request = request; + Response = response; + + ResponseFilter = null; // default + } + + public IFrame Frame { get; private set; } + public IRequest Request { get; private set; } + public IResponse Response { get; private set; } + + /// + /// Set a ResponseFilter to intercept this response, leave it null otherwise. + /// + public IResponseFilter ResponseFilter { get; set; } + } +} diff --git a/ArkBot/Browser/EventArgs/OnBeforeBrowseEventArgs.cs b/ArkBot/Browser/EventArgs/OnBeforeBrowseEventArgs.cs new file mode 100644 index 0000000..ce89a77 --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnBeforeBrowseEventArgs.cs @@ -0,0 +1,30 @@ +// Copyright � 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnBeforeBrowseEventArgs : BaseRequestEventArgs + { + public OnBeforeBrowseEventArgs(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, bool isRedirect) + : base(browserControl, browser) + { + Frame = frame; + Request = request; + IsRedirect = isRedirect; + + CancelNavigation = false; // default + } + + public IFrame Frame { get; private set; } + public IRequest Request { get; private set; } + public bool IsRedirect { get; private set; } + + /// + /// Set to true to cancel the navigation or false to allow the navigation to proceed. + /// + public bool CancelNavigation { get; set; } + } +} diff --git a/ArkBot/Browser/EventArgs/OnBeforeResourceLoadEventArgs.cs b/ArkBot/Browser/EventArgs/OnBeforeResourceLoadEventArgs.cs new file mode 100644 index 0000000..1c6b50c --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnBeforeResourceLoadEventArgs.cs @@ -0,0 +1,37 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnBeforeResourceLoadEventArgs : BaseRequestEventArgs + { + public OnBeforeResourceLoadEventArgs(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback) + : base(browserControl, browser) + { + Frame = frame; + Request = request; + Callback = callback; + + ContinuationHandling = CefReturnValue.Continue; // default + } + + public IFrame Frame { get; private set; } + public IRequest Request { get; private set; } + + /// + /// Callback interface used for asynchronous continuation of url requests. + /// + public IRequestCallback Callback { get; private set; } + + /// + /// To cancel loading of the resource return + /// or to allow the resource to load normally. For async + /// return and use + /// to handle continuation. + /// + public CefReturnValue ContinuationHandling { get; set; } + } +} diff --git a/ArkBot/Browser/EventArgs/OnCertificateErrorEventArgs.cs b/ArkBot/Browser/EventArgs/OnCertificateErrorEventArgs.cs new file mode 100644 index 0000000..ef48489 --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnCertificateErrorEventArgs.cs @@ -0,0 +1,38 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnCertificateErrorEventArgs : BaseRequestEventArgs + { + public OnCertificateErrorEventArgs(IWebBrowser browserControl, IBrowser browser, CefErrorCode errorCode, string requestUrl, ISslInfo sslInfo, IRequestCallback callback) + : base(browserControl, browser) + { + ErrorCode = errorCode; + RequestUrl = requestUrl; + SSLInfo = sslInfo; + Callback = callback; + + ContinueAsync = false; // default + } + + public CefErrorCode ErrorCode { get; private set; } + public string RequestUrl { get; private set; } + public ISslInfo SSLInfo { get; private set; } + + /// + /// Callback interface used for asynchronous continuation of url requests. + /// If empty the error cannot be recovered from and the request will be canceled automatically. + /// + public IRequestCallback Callback { get; private set; } + + /// + /// Set to false to cancel the request immediately. Set to true and use to + /// execute in an async fashion. + /// + public bool ContinueAsync { get; set; } + } +} diff --git a/ArkBot/Browser/EventArgs/OnOpenUrlFromTabEventArgs.cs b/ArkBot/Browser/EventArgs/OnOpenUrlFromTabEventArgs.cs new file mode 100644 index 0000000..cac822e --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnOpenUrlFromTabEventArgs.cs @@ -0,0 +1,32 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnOpenUrlFromTabEventArgs : BaseRequestEventArgs + { + public OnOpenUrlFromTabEventArgs(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture) + : base(browserControl, browser) + { + Frame = frame; + TargetUrl = targetUrl; + TargetDisposition = targetDisposition; + UserGesture = userGesture; + + CancelNavigation = false; // default + } + + public IFrame Frame { get; private set; } + public string TargetUrl { get; private set; } + public WindowOpenDisposition TargetDisposition { get; private set; } + public bool UserGesture { get; private set; } + + /// + /// Set to true to cancel the navigation or false to allow the navigation to proceed. + /// + public bool CancelNavigation { get; set; } + } +} diff --git a/ArkBot/Browser/EventArgs/OnPluginCrashedEventArgs.cs b/ArkBot/Browser/EventArgs/OnPluginCrashedEventArgs.cs new file mode 100644 index 0000000..8ee0390 --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnPluginCrashedEventArgs.cs @@ -0,0 +1,18 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnPluginCrashedEventArgs : BaseRequestEventArgs + { + public OnPluginCrashedEventArgs(IWebBrowser browserControl, IBrowser browser, string pluginPath) : base(browserControl, browser) + { + PluginPath = pluginPath; + } + + public string PluginPath { get; private set; } + } +} diff --git a/ArkBot/Browser/EventArgs/OnProtocolExecutionEventArgs.cs b/ArkBot/Browser/EventArgs/OnProtocolExecutionEventArgs.cs new file mode 100644 index 0000000..1493f4b --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnProtocolExecutionEventArgs.cs @@ -0,0 +1,25 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnProtocolExecutionEventArgs : BaseRequestEventArgs + { + public OnProtocolExecutionEventArgs(IWebBrowser browserControl, IBrowser browser, string url) : base(browserControl, browser) + { + Url = url; + + AttemptExecution = false; // default + } + + public string Url { get; private set; } + + /// + /// Set to true to attempt execution via the registered OS protocol handler, if any. Otherwise set to false. + /// + public bool AttemptExecution { get; set; } + } +} diff --git a/ArkBot/Browser/EventArgs/OnQuotaRequestEventArgs.cs b/ArkBot/Browser/EventArgs/OnQuotaRequestEventArgs.cs new file mode 100644 index 0000000..3d12402 --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnQuotaRequestEventArgs.cs @@ -0,0 +1,36 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnQuotaRequestEventArgs : BaseRequestEventArgs + { + public OnQuotaRequestEventArgs(IWebBrowser browserControl, IBrowser browser, string originUrl, long newSize, IRequestCallback callback) + : base(browserControl, browser) + { + OriginUrl = originUrl; + NewSize = newSize; + Callback = callback; + + ContinueAsync = false; // default + } + + public string OriginUrl { get; private set; } + public long NewSize { get; private set; } + + /// + /// Callback interface used for asynchronous continuation of url requests. + /// + public IRequestCallback Callback { get; private set; } + + /// + /// Set to false to cancel the request immediately. Set to true to continue the request + /// and call either in this method or at a later + /// time to grant or deny the request. + /// + public bool ContinueAsync { get; set; } + } +} diff --git a/ArkBot/Browser/EventArgs/OnRenderProcessTerminatedEventArgs.cs b/ArkBot/Browser/EventArgs/OnRenderProcessTerminatedEventArgs.cs new file mode 100644 index 0000000..6156885 --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnRenderProcessTerminatedEventArgs.cs @@ -0,0 +1,19 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnRenderProcessTerminatedEventArgs : BaseRequestEventArgs + { + public OnRenderProcessTerminatedEventArgs(IWebBrowser browserControl, IBrowser browser, CefTerminationStatus status) + : base(browserControl, browser) + { + Status = status; + } + + public CefTerminationStatus Status { get; private set; } + } +} diff --git a/ArkBot/Browser/EventArgs/OnRenderViewReadyEventArgs.cs b/ArkBot/Browser/EventArgs/OnRenderViewReadyEventArgs.cs new file mode 100644 index 0000000..65dd266 --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnRenderViewReadyEventArgs.cs @@ -0,0 +1,15 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnRenderViewReadyEventArgs : BaseRequestEventArgs + { + public OnRenderViewReadyEventArgs(IWebBrowser browserControl, IBrowser browser) : base(browserControl, browser) + { + } + } +} diff --git a/ArkBot/Browser/EventArgs/OnResourceLoadCompleteEventArgs.cs b/ArkBot/Browser/EventArgs/OnResourceLoadCompleteEventArgs.cs new file mode 100644 index 0000000..4d9f552 --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnResourceLoadCompleteEventArgs.cs @@ -0,0 +1,27 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnResourceLoadCompleteEventArgs : BaseRequestEventArgs + { + public OnResourceLoadCompleteEventArgs(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response, UrlRequestStatus status, long receivedContentLength) + : base(browserControl, browser) + { + Frame = frame; + Request = request; + Response = response; + Status = status; + ReceivedContentLength = receivedContentLength; + } + + public IFrame Frame { get; private set; } + public IRequest Request { get; private set; } + public IResponse Response { get; private set; } + public UrlRequestStatus Status { get; private set; } + public long ReceivedContentLength { get; private set; } + } +} diff --git a/ArkBot/Browser/EventArgs/OnResourceRedirectEventArgs.cs b/ArkBot/Browser/EventArgs/OnResourceRedirectEventArgs.cs new file mode 100644 index 0000000..7671a67 --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnResourceRedirectEventArgs.cs @@ -0,0 +1,29 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnResourceRedirectEventArgs : BaseRequestEventArgs + { + public OnResourceRedirectEventArgs(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response, string newUrl) + : base(browserControl, browser) + { + Frame = frame; + Request = request; + Response = response; + NewUrl = newUrl; + } + + public IFrame Frame { get; private set; } + public IRequest Request { get; private set; } + public IResponse Response { get; private set; } + + /// + /// the new URL and can be changed if desired. + /// + public string NewUrl { get; set; } + } +} diff --git a/ArkBot/Browser/EventArgs/OnResourceResponseEventArgs.cs b/ArkBot/Browser/EventArgs/OnResourceResponseEventArgs.cs new file mode 100644 index 0000000..d4f7834 --- /dev/null +++ b/ArkBot/Browser/EventArgs/OnResourceResponseEventArgs.cs @@ -0,0 +1,32 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using CefSharp; + +namespace ArkBot.Browser.EventArgs +{ + public class OnResourceResponseEventArgs : BaseRequestEventArgs + { + public OnResourceResponseEventArgs(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response) + : base(browserControl, browser) + { + Frame = frame; + Request = request; + Response = response; + + RedirectOrRetry = false; // default + } + + public IFrame Frame { get; private set; } + public IRequest Request { get; private set; } + public IResponse Response { get; private set; } + + /// + /// To allow the resource to load normally set to false. + /// To redirect or retry the resource, modify (url, headers or + /// post body) and set to true. + /// + public bool RedirectOrRetry { get; set; } + } +} diff --git a/ArkBot/Browser/RequestEventHandler.cs b/ArkBot/Browser/RequestEventHandler.cs new file mode 100644 index 0000000..1874fca --- /dev/null +++ b/ArkBot/Browser/RequestEventHandler.cs @@ -0,0 +1,178 @@ +// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +using ArkBot.Browser.EventArgs; +using CefSharp; +using System; +using System.Security.Cryptography.X509Certificates; + +namespace ArkBot.Browser +{ + /// + /// To use this class, check for more information about the event parameters. + /// Often you will find MANDATORY information on how to work with the parameters or which thread the call comes from. + /// Simply check out the interface' method the event was named by. + /// (e.g corresponds to + /// ) + /// inspired by: + /// https://github.com/cefsharp/CefSharp/blob/fa41529853b2527eb0468a507ab6c5bd0768eb59/CefSharp.Example/RequestHandler.cs + /// + public class RequestEventHandler : IRequestHandler + { + public event EventHandler OnBeforeBrowseEvent; + public event EventHandler OnOpenUrlFromTabEvent; + public event EventHandler OnCertificateErrorEvent; + public event EventHandler OnPluginCrashedEvent; + public event EventHandler OnBeforeResourceLoadEvent; + public event EventHandler GetAuthCredentialsEvent; + public event EventHandler OnRenderProcessTerminatedEvent; + public event EventHandler OnQuotaRequestEvent; + public event EventHandler OnResourceRedirectEvent; + + /// + /// SECURITY WARNING: YOU SHOULD USE THIS EVENT TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL ANALYSIS + /// BEFORE ALLOWING OS EXECUTION. + /// + public event EventHandler OnProtocolExecutionEvent; + public event EventHandler OnRenderViewReadyEvent; + public event EventHandler OnResourceResponseEvent; + public event EventHandler GetResourceResponseFilterEvent; + public event EventHandler OnResourceLoadCompleteEvent; + + bool IRequestHandler.OnBeforeBrowse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, bool isRedirect) + { + var args = new OnBeforeBrowseEventArgs(browserControl, browser, frame, request, isRedirect); + ExecuteEventHandler(OnBeforeBrowseEvent, args); + return args.CancelNavigation; + } + + bool IRequestHandler.OnOpenUrlFromTab(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture) + { + var args = new OnOpenUrlFromTabEventArgs(browserControl, browser, frame, targetUrl, targetDisposition, userGesture); + ExecuteEventHandler(OnOpenUrlFromTabEvent, args); + return args.CancelNavigation; + } + + bool IRequestHandler.OnCertificateError(IWebBrowser browserControl, IBrowser browser, CefErrorCode errorCode, string requestUrl, ISslInfo sslInfo, IRequestCallback callback) + { + var args = new OnCertificateErrorEventArgs(browserControl, browser, errorCode, requestUrl, sslInfo, callback); + ExecuteEventHandler(OnCertificateErrorEvent, args); + + EnsureCallbackDisposal(callback); + return args.ContinueAsync; + } + + void IRequestHandler.OnPluginCrashed(IWebBrowser browserControl, IBrowser browser, string pluginPath) + { + var args = new OnPluginCrashedEventArgs(browserControl, browser, pluginPath); + ExecuteEventHandler(OnPluginCrashedEvent, args); + } + + CefReturnValue IRequestHandler.OnBeforeResourceLoad(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback) + { + var args = new OnBeforeResourceLoadEventArgs(browserControl, browser, frame, request, callback); + ExecuteEventHandler(OnBeforeResourceLoadEvent, args); + + EnsureCallbackDisposal(callback); + return args.ContinuationHandling; + } + + bool IRequestHandler.GetAuthCredentials(IWebBrowser browserControl, IBrowser browser, IFrame frame, bool isProxy, string host, int port, string realm, string scheme, IAuthCallback callback) + { + var args = new GetAuthCredentialsEventArgs(browserControl, browser, frame, isProxy, host, port, realm, scheme, callback); + ExecuteEventHandler(GetAuthCredentialsEvent, args); + + EnsureCallbackDisposal(callback); + return args.ContinueAsync; + } + + void IRequestHandler.OnRenderProcessTerminated(IWebBrowser browserControl, IBrowser browser, CefTerminationStatus status) + { + var args = new OnRenderProcessTerminatedEventArgs(browserControl, browser, status); + ExecuteEventHandler(OnRenderProcessTerminatedEvent, args); + } + + bool IRequestHandler.OnQuotaRequest(IWebBrowser browserControl, IBrowser browser, string originUrl, long newSize, IRequestCallback callback) + { + var args = new OnQuotaRequestEventArgs(browserControl, browser, originUrl, newSize, callback); + ExecuteEventHandler(OnQuotaRequestEvent, args); + + EnsureCallbackDisposal(callback); + return args.ContinueAsync; + } + + void IRequestHandler.OnResourceRedirect(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response, ref string newUrl) + { + var args = new OnResourceRedirectEventArgs(browserControl, browser, frame, request, response, newUrl); + ExecuteEventHandler(OnResourceRedirectEvent, args); + if (!Equals(newUrl, args.NewUrl)) + { + newUrl = args.NewUrl; + } + } + + bool IRequestHandler.OnProtocolExecution(IWebBrowser browserControl, IBrowser browser, string url) + { + var args = new OnProtocolExecutionEventArgs(browserControl, browser, url); + ExecuteEventHandler(OnProtocolExecutionEvent, args); + return args.AttemptExecution; + } + + void IRequestHandler.OnRenderViewReady(IWebBrowser browserControl, IBrowser browser) + { + var args = new OnRenderViewReadyEventArgs(browserControl, browser); + ExecuteEventHandler(OnRenderViewReadyEvent, args); + } + + bool IRequestHandler.OnResourceResponse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response) + { + var args = new OnResourceResponseEventArgs(browserControl, browser, frame, request, response); + ExecuteEventHandler(OnResourceResponseEvent, args); + return args.RedirectOrRetry; + } + + IResponseFilter IRequestHandler.GetResourceResponseFilter(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response) + { + var args = new GetResourceResponseFilterEventArgs(browserControl, browser, frame, request, response); + ExecuteEventHandler(GetResourceResponseFilterEvent, args); + return args.ResponseFilter; + } + + void IRequestHandler.OnResourceLoadComplete(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response, UrlRequestStatus status, long receivedContentLength) + { + var args = new OnResourceLoadCompleteEventArgs(browserControl, browser, frame, request, response, status, receivedContentLength); + ExecuteEventHandler(OnResourceLoadCompleteEvent, args); + } + + bool IRequestHandler.OnSelectClientCertificate(IWebBrowser browserControl, IBrowser browser, bool isProxy, string host, int port, X509Certificate2Collection certificates, ISelectClientCertificateCallback callback) + { + //TODO: Someone please contribute an implementation of this + throw new NotImplementedException(); + } + + private static void EnsureCallbackDisposal(IRequestCallback callbackToDispose) + { + if (callbackToDispose != null && !callbackToDispose.IsDisposed) + { + callbackToDispose.Dispose(); + } + } + + private static void EnsureCallbackDisposal(IAuthCallback callbackToDispose) + { + if (callbackToDispose != null && !callbackToDispose.IsDisposed) + { + callbackToDispose.Dispose(); + } + } + + private void ExecuteEventHandler(EventHandler handler, T args) + { + if (handler != null) + { + handler(this, args); + } + } + } +} diff --git a/ArkBot/Commands/Admin/AdminCommand.cs b/ArkBot/Commands/Admin/AdminCommand.cs index be4d417..3d8fc79 100644 --- a/ArkBot/Commands/Admin/AdminCommand.cs +++ b/ArkBot/Commands/Admin/AdminCommand.cs @@ -18,6 +18,7 @@ using ArkBot.ScheduledTasks; using Discord.Commands.Builders; using RestSharp; +using ArkBot.Configuration.Model; namespace ArkBot.Commands.Admin { @@ -65,8 +66,8 @@ public AdminCommand( "** BanPlayer **: Ban a player", "** UnbanPlayer **: Unban a player", "** KillPlayer **: Kill a player", - "** SetVotingAllowed true/false**: Set voting allowed/disallowed for a player", - "** EnableVoting true/false**: Enable voting system", + //"** SetVotingAllowed true/false**: Set voting allowed/disallowed for a player", + //"** EnableVoting true/false**: Enable voting system", "** DoExit**: Shutdown server", "** Broadcast **: Broadcast a message to all players on the server", "** ListPlayers**: List all connected players and their SteamIDs", @@ -121,8 +122,8 @@ public async Task Admin([Remainder] string arguments = null) SteamId = 0L, SaveWorld = false, DestroyWildDinos = false, - EnableVoting = false, - SetVotingAllowed = 0L, //steam id + //EnableVoting = false, + //SetVotingAllowed = 0L, //steam id KickPlayer = 0L, //steam id BanPlayer = 0L, //steam id UnbanPlayer = 0L, //steam id @@ -160,7 +161,7 @@ public async Task Admin([Remainder] string arguments = null) .For(y => y.Backups, flag: true) .For(y => y.SaveWorld, flag: true) .For(y => y.DestroyWildDinos, flag: true) - .For(y => y.EnableVoting, flag: true) + //.For(y => y.EnableVoting, flag: true) .For(y => y.DoExit, flag: true) .For(y => y.ListPlayers, flag: true) .For(y => y.Broadcast, untilNextToken: true) @@ -396,54 +397,54 @@ public async Task Admin([Remainder] string arguments = null) if (result == null) sb.AppendLine($"**Failed to kick player with steamid {args.KickPlayer}... :(**"); else sb.AppendLine($"**Kicked player with steamid {args.KickPlayer}!**"); } - else if (args.EnableVoting) - { - if (!(args.True || args.False)) - { - sb.AppendLine($"**This command requires additional arguments!**"); - } - else - { - using (var context = _databaseContextFactory.Create()) - { - _savedstate.VotingDisabled = !args.True; - _savedstate.Save(); - sb.AppendLine($"**Voting system is now {(_savedstate.VotingDisabled ? "disabled" : "enabled")}!**"); - } - } + //else if (args.EnableVoting) + //{ + // if (!(args.True || args.False)) + // { + // sb.AppendLine($"**This command requires additional arguments!**"); + // } + // else + // { + // using (var context = _databaseContextFactory.Create()) + // { + // _savedstate.VotingDisabled = !args.True; + // _savedstate.Save(); + // sb.AppendLine($"**Voting system is now {(_savedstate.VotingDisabled ? "disabled" : "enabled")}!**"); + // } + // } - //var result = await CommandHelper.SendRconCommand(_config, $"kickplayer {args.KickPlayer}"); - //if (result == null) sb.AppendLine($"**Failed to kick player with steamid {args.KickPlayer}... :(**"); - //else sb.AppendLine($"**Kicked player with steamid {args.KickPlayer}!**"); - } - else if (args.SetVotingAllowed > 0) - { - if (!(args.True || args.False)) - { - sb.AppendLine($"**This command requires additional arguments!**"); - } - else - { - using (var context = _databaseContextFactory.Create()) - { - var user = context.Users.FirstOrDefault(x => x != null && x.DiscordId == (long)Context.User.Id); - if (user != null) - { - user.DisallowVoting = !args.True; - context.SaveChanges(); - sb.AppendLine($"**The user is now {(user.DisallowVoting ? "unable" : "allowed")} to vote!**"); - } - else - { - sb.AppendLine($"**The user is not linked!**"); - } - } - } + // //var result = await CommandHelper.SendRconCommand(_config, $"kickplayer {args.KickPlayer}"); + // //if (result == null) sb.AppendLine($"**Failed to kick player with steamid {args.KickPlayer}... :(**"); + // //else sb.AppendLine($"**Kicked player with steamid {args.KickPlayer}!**"); + //} + //else if (args.SetVotingAllowed > 0) + //{ + // if (!(args.True || args.False)) + // { + // sb.AppendLine($"**This command requires additional arguments!**"); + // } + // else + // { + // using (var context = _databaseContextFactory.Create()) + // { + // var user = context.Users.FirstOrDefault(x => x != null && x.DiscordId == (long)Context.User.Id); + // if (user != null) + // { + // user.DisallowVoting = !args.True; + // context.SaveChanges(); + // sb.AppendLine($"**The user is now {(user.DisallowVoting ? "unable" : "allowed")} to vote!**"); + // } + // else + // { + // sb.AppendLine($"**The user is not linked!**"); + // } + // } + // } - //var result = await CommandHelper.SendRconCommand(_config, $"kickplayer {args.KickPlayer}"); - //if (result == null) sb.AppendLine($"**Failed to kick player with steamid {args.KickPlayer}... :(**"); - //else sb.AppendLine($"**Kicked player with steamid {args.KickPlayer}!**"); - } + // //var result = await CommandHelper.SendRconCommand(_config, $"kickplayer {args.KickPlayer}"); + // //if (result == null) sb.AppendLine($"**Failed to kick player with steamid {args.KickPlayer}... :(**"); + // //else sb.AppendLine($"**Kicked player with steamid {args.KickPlayer}!**"); + //} else if (args.BanPlayer > 0) { var result = await serverContext.Steam.SendRconCommand($"ban {args.BanPlayer}"); diff --git a/ArkBot/Commands/Admin/CloudCommand.cs b/ArkBot/Commands/Admin/CloudCommand.cs index dcc2b2a..1771c8b 100644 --- a/ArkBot/Commands/Admin/CloudCommand.cs +++ b/ArkBot/Commands/Admin/CloudCommand.cs @@ -20,6 +20,7 @@ using ArkBot.Discord.Command; using Discord.Commands.Builders; using RestSharp; +using ArkBot.Configuration.Model; namespace ArkBot.Commands.Admin { diff --git a/ArkBot/Commands/Admin/RconCommand.cs b/ArkBot/Commands/Admin/RconCommand.cs index aa43345..0925b11 100644 --- a/ArkBot/Commands/Admin/RconCommand.cs +++ b/ArkBot/Commands/Admin/RconCommand.cs @@ -15,6 +15,7 @@ using ArkBot.ScheduledTasks; using Discord.Commands.Builders; using RestSharp; +using ArkBot.Configuration.Model; namespace ArkBot.Commands.Admin { diff --git a/ArkBot/Commands/CommandListCommand.cs b/ArkBot/Commands/CommandListCommand.cs index 98facbc..5b4d55d 100644 --- a/ArkBot/Commands/CommandListCommand.cs +++ b/ArkBot/Commands/CommandListCommand.cs @@ -11,6 +11,7 @@ using Discord.Commands.Builders; using Discord.WebSocket; using RestSharp; +using ArkBot.Configuration.Model; namespace ArkBot.Commands { diff --git a/ArkBot/Commands/DisabledCommands.cs b/ArkBot/Commands/DisabledCommands.cs index cbc543b..ebc8aa3 100644 --- a/ArkBot/Commands/DisabledCommands.cs +++ b/ArkBot/Commands/DisabledCommands.cs @@ -8,6 +8,7 @@ using Discord.Commands.Builders; using Discord.Net; using RestSharp; +using ArkBot.Configuration.Model; namespace ArkBot.Commands { diff --git a/ArkBot/Commands/Experimental/DebugCommand.cs b/ArkBot/Commands/Experimental/DebugCommand.cs index 3d6920e..afcba71 100644 --- a/ArkBot/Commands/Experimental/DebugCommand.cs +++ b/ArkBot/Commands/Experimental/DebugCommand.cs @@ -15,6 +15,7 @@ using Discord.Commands.Builders; using Discord.Net; using RestSharp; +using ArkBot.Configuration.Model; namespace ArkBot.Commands.Experimental { @@ -104,7 +105,7 @@ public async Task Debug([Remainder] string arguments = null) } else if (args.json) { - if (_config.DisableDeveloperFetchSaveData) + if (_config.Discord.DisableDeveloperFetchSaveData) { await Context.Channel.SendMessageAsync("The administrator have disabled this featurContext."); return; @@ -197,7 +198,7 @@ public async Task Debug([Remainder] string arguments = null) } else if (args.save) { - if (_config.DisableDeveloperFetchSaveData) + if (_config.Discord.DisableDeveloperFetchSaveData) { await Context.Channel.SendMessageAsync("The administrator have disabled this featurContext."); return; @@ -214,7 +215,7 @@ public async Task Debug([Remainder] string arguments = null) return; } saveFilePath = server.SaveFilePath; - var cluster = !string.IsNullOrEmpty(server.Cluster) ? _config.Clusters?.FirstOrDefault(x => x.Key.Equals(server.Cluster, StringComparison.OrdinalIgnoreCase)) : null; + var cluster = !string.IsNullOrEmpty(server.ClusterKey) ? _config.Clusters?.FirstOrDefault(x => x.Key.Equals(server.ClusterKey, StringComparison.OrdinalIgnoreCase)) : null; clusterSavePath = cluster?.SavePath; } else diff --git a/ArkBot/Commands/LinkSteamCommand.cs b/ArkBot/Commands/LinkSteamCommand.cs index 39573c2..133bc0c 100644 --- a/ArkBot/Commands/LinkSteamCommand.cs +++ b/ArkBot/Commands/LinkSteamCommand.cs @@ -16,15 +16,13 @@ public class LinkSteamCommand : ModuleBase { private IConstants _constants; private IBarebonesSteamOpenId _openId; - private IUrlShortenerService _urlShortenerService; private EfDatabaseContextFactory _databaseContextFactory; public LinkSteamCommand(IConstants constants, IBarebonesSteamOpenId openId, - IUrlShortenerService urlShortenerService, EfDatabaseContextFactory databaseContextFactory) + EfDatabaseContextFactory databaseContextFactory) { _constants = constants; _openId = openId; - _urlShortenerService = urlShortenerService; _databaseContextFactory = databaseContextFactory; } @@ -54,12 +52,17 @@ await Context.Channel.SendMessageAsync( return; } - var sb = new StringBuilder(); - sb.AppendLine($"**Proceed to link your Discord user with your Steam account by following this link:**"); - sb.AppendLine($"{(await _urlShortenerService?.ShortenUrl(state.StartUrl)) ?? state.StartUrl}"); + EmbedBuilder builder = new EmbedBuilder() + { + Title = "Steam Account Link", + Description = $"Proceed to link your Discord user with your Steam account by [Logging into Steam]({state.StartUrl})", + Url = state.StartUrl, + Color = Color.Green + + }; var channel = await Context.User.GetOrCreateDMChannelAsync(); - var msg = await channel.SendMessageAsync(sb.ToString().Trim('\r', '\n')); + var msg = await channel.SendMessageAsync("", false, builder.Build()); if (Context.IsPrivate) return; diff --git a/ArkBot/Commands/ServersCommand.cs b/ArkBot/Commands/ServersCommand.cs index 557e008..b56c140 100644 --- a/ArkBot/Commands/ServersCommand.cs +++ b/ArkBot/Commands/ServersCommand.cs @@ -9,6 +9,7 @@ using ArkBot.Discord.Command; using Discord.Commands.Builders; using Discord.Net; +using ArkBot.Configuration.Model; namespace ArkBot.Commands { @@ -36,8 +37,8 @@ public async Task Servers([Remainder] string arguments = null) if (_config.Servers != null) { - var sb = new StringBuilder(); - sb.AppendLine("**Server List**"); + var embed = new EmbedBuilder(); + embed.WithTitle("Server List"); foreach (var server in _config.Servers) { @@ -51,15 +52,14 @@ public async Task Servers([Remainder] string arguments = null) name = m.Success ? m.Groups["name"].Value : info.Name; } - var address = $"{server.Ip}:{server.Port}"; + var address = server.DisplayAddress ?? $"{server.Ip}:{server.QueryPort}"; - var cluster = args.cluster || args.clusters ? $" (cluster **{server.Cluster}**)" : ""; + var cluster = args.cluster || args.clusters ? $" (cluster **`{server.ClusterKey}`**)" : ""; - sb.AppendLine( - $"● **{name ?? address}**{(name != null ? $" ({address})" : "")} (key: **{server.Key}**){cluster}"); + embed.AddInlineField($"{ name ?? address}", $"steam://connect/{address} (key: `{server.Key}`){cluster}"); } - await CommandHelper.SendPartitioned(Context.Channel, sb.ToString()); + await Context.Channel.SendMessageAsync("", false, embed.Build()); } else { diff --git a/ArkBot/Commands/UnlinkSteamCommand.cs b/ArkBot/Commands/UnlinkSteamCommand.cs index 931013b..5d8f542 100644 --- a/ArkBot/Commands/UnlinkSteamCommand.cs +++ b/ArkBot/Commands/UnlinkSteamCommand.cs @@ -5,6 +5,7 @@ using ArkBot.Discord.Command; using Discord; using Discord.Net; +using ArkBot.Configuration.Model; namespace ArkBot.Commands { @@ -46,7 +47,7 @@ public async Task UnlinkSteam() try { var duser = server.GetUser(Context.User.Id); - var role = server.Roles.FirstOrDefault(x => x.Name.Equals(_config.MemberRoleName)); + var role = server.Roles.FirstOrDefault(x => x.Name.Equals(_config.Discord.MemberRoleName)); if (duser != null && role == null) continue; if (duser?.Roles.Any(x => x.Id == role.Id) == true) await duser.RemoveRoleAsync(role); diff --git a/ArkBot/Commands/WebAppCommand.cs b/ArkBot/Commands/WebAppCommand.cs new file mode 100644 index 0000000..2e6bbac --- /dev/null +++ b/ArkBot/Commands/WebAppCommand.cs @@ -0,0 +1,38 @@ +using System; +using System.Text; +using System.Threading.Tasks; +using Discord.Commands; +using ArkBot.Helpers; +using System.Reflection; +using ArkBot.Discord.Command; +using ArkBot.Configuration.Model; + +namespace ArkBot.Commands +{ + public class WebAppCommand : ModuleBase + { + private IConfig _config; + + public WebAppCommand(IConfig config) + { + _config = config; + } + + [Command("webapp")] + [Alias("app", "companionapp")] + [Summary("Get a link to the Companion App (Web App)")] + [RoleRestrictedPrecondition("webapp")] + public async Task WebApp() + { + var sb = new StringBuilder(); + if (string.IsNullOrWhiteSpace(_config.AppUrl)) + sb.AppendLine("**The setting `appUrl` is missing from the configuration...**"); + else + { + sb.AppendLine("**Companion App (Web App)**"); + sb.AppendLine($"{_config.AppUrl}"); + } + await CommandHelper.SendPartitioned(Context.Channel, sb.ToString()); + } + } +} diff --git a/ArkBot/Config.cs b/ArkBot/Config.cs deleted file mode 100644 index 7b42fad..0000000 --- a/ArkBot/Config.cs +++ /dev/null @@ -1,320 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ArkBot -{ - public class Config : IConfig - { - public Config() - { - // Default values - Ssl = new SslConfigSection(); - UserRoles = new Dictionary(); - ArkMultipliers = new ArkMultipliersConfigSection(); - Servers = new ServerConfigSection[] { }; - Clusters = new ClusterConfigSection[] { }; - DiscordBotEnabled = true; - WebAppRedirectListenPrefix = new string[] { }; - AccessControl = new Dictionary>(); - Discord = new DiscordConfigSection(); - } - - [JsonProperty(PropertyName = "botId")] - [Description("Simple non-whitespace or special character ID to identify the bot (A-Za-z0-9)")] - public string BotId { get; set; } - - [JsonProperty(PropertyName = "botName")] - [Description("Short name to identify the bot")] - public string BotName { get; set; } - - [JsonProperty(PropertyName = "botNamespace")] - [Description("Unique namespace url given to the bot (may be same as botUrl)")] - public string BotNamespace { get; set; } - - [JsonProperty(PropertyName = "botUrl")] - [Description("Website url associated with the bot or ARK server (optional).")] - public string BotUrl { get; set; } - - [JsonProperty(PropertyName = "appUrl")] - [Description("External url pointing to the Web App (optional).")] - public string AppUrl { get; set; } - - [JsonProperty(PropertyName = "tempFileOutputDirPath")] - [Description("An existing directory path where temporary binary files can be stored (map-images etc.)")] - public string TempFileOutputDirPath { get; set; } - - [JsonProperty(PropertyName = "botToken")] - [Description("Bot authentication token from https://discordapp.com/developers")] - public string BotToken { get; set; } - - [JsonProperty(PropertyName = "steamOpenIdRelyingServiceListenPrefix")] - [Description("Http listen prefix for Steam OpenID Relying Party webservice (requires a port that is open to external connections)")] - public string SteamOpenIdRelyingServiceListenPrefix { get; set; } - - [JsonProperty(PropertyName = "steamOpenIdRedirectUri")] - [Description("Publicly accessible url for incoming Steam OpenID Relying Party webservice connections (requires a port that is open to external connections)")] - public string SteamOpenIdRedirectUri { get; set; } - - [JsonProperty(PropertyName = "googleApiKey")] - [Description("Google API key used for url-shortening services.")] - public string GoogleApiKey { get; set; } - - [JsonProperty(PropertyName = "steamApiKey")] - [Description("Steam API key used for fetching user information.")] - public string SteamApiKey { get; set; } - - [JsonProperty(PropertyName = "arkMultipliers")] - [Description("Server specific multipliers.")] - public ArkMultipliersConfigSection ArkMultipliers { get; set; } - - [JsonProperty(PropertyName = "disableDeveloperFetchSaveData")] - [Description("Diable users in \"developer\"-role fetching json or save file data.")] - public bool DisableDeveloperFetchSaveData { get; set; } - - [JsonProperty(PropertyName = "memberRoleName")] - [Description("The name of the member role in Discord.")] - public string MemberRoleName { get; set; } - - [JsonProperty(PropertyName = "discord")] - [Description("Discord bot settings.")] - public DiscordConfigSection Discord { get; set; } - - [JsonProperty(PropertyName = "userRoles")] - [Description("Explicit steam user role assignment.")] - public Dictionary UserRoles { get; set; } - - [JsonProperty(PropertyName = "accessControl")] - [Description("Per-feature role based access control configuration.")] - public Dictionary> AccessControl { get; set; } - - [JsonProperty(PropertyName = "enabledChannels")] - [Description("A list of channels where the bot will listen to and answer commands.")] - public string[] EnabledChannels { get; set; } - - [JsonProperty(PropertyName = "infoTopicChannel")] - [Description("Channel where topic is set to display information about last update, next update and how to use bot commands.")] - public string InfoTopicChannel { get; set; } - - [JsonProperty(PropertyName = "announcementChannel")] - [Description("Channel where announcements are made (votes etc.)")] - public string AnnouncementChannel { get; set; } - - [JsonProperty(PropertyName = "backupsEnabled")] - [Description("Option to enable savegame backups.")] - public bool BackupsEnabled { get; set; } - - [JsonProperty(PropertyName = "backupsDirectoryPath")] - [Description("Directory path where savegame backups are stored.")] - public string BackupsDirectoryPath { get; set; } - - [JsonProperty(PropertyName = "discordBotEnabled")] - [Description("Option to enable/disable the discord bot component.")] - public bool DiscordBotEnabled { get; set; } - - [JsonProperty(PropertyName = "webApiListenPrefix")] - [Description("Http listen prefix for WebAPI service (requires a port that is open to external connections) [The prebuilt web-app included in this release is by default configured to call the web api on 127.0.0.1:60001. If you want to use another port for the web api you will need to reflect this change in environment.prod.ts and rebuild the web-app dist manually.]")] - public string WebApiListenPrefix { get; set; } - - [JsonProperty(PropertyName = "webAppListenPrefix")] - [Description("Http listen prefix for Web App (requires a port that is open to external connections)")] - public string WebAppListenPrefix { get; set; } - - [JsonProperty(PropertyName = "webAppRedirectListenPrefix")] - [Description("Http listen prefix(es) that are redirected to BotUrl.")] - public string[] WebAppRedirectListenPrefix { get; set; } - - [JsonProperty(PropertyName = "powershellFilePath")] - [Description("Absolute file path of the powershell executable (only used with Server.UsePowershellOutputRedirect)")] - public string PowershellFilePath { get; set; } - - [JsonProperty(PropertyName = "useCompatibilityChangeWatcher")] - [Description("Use timer based .ark save file watcher rather than the default (based on FileSystemWatcher)")] - public bool UseCompatibilityChangeWatcher { get; set; } - - [JsonProperty(PropertyName = "ssl")] - [Description("Configure Web App and WebAPI to use SSL with a free certificate from Lets Encrypt")] - public SslConfigSection Ssl { get; set; } - - [JsonProperty(PropertyName = "savegameExtractionMaxDegreeOfParallelism")] - [Description("Max degree of parallelism to use for savegame extraction. Change only if experiencing out of memory exceptions.")] - public int? SavegameExtractionMaxDegreeOfParallelism { get; set; } - - [JsonProperty(PropertyName = "anonymizeWebApiData")] - [Description("Anonymize all data in the WebAPI. Used to create data dumps for demoing the web-app.")] - public bool AnonymizeWebApiData { get; set; } - - [JsonProperty(PropertyName = "servers")] - [Description("Server instance configurations.")] - public ServerConfigSection[] Servers { get; set; } - - [JsonProperty(PropertyName = "clusters")] - [Description("Cluster instance configurations.")] - public ClusterConfigSection[] Clusters { get; set; } - } - - public class DiscordConfigSection - { - public DiscordConfigSection() - { - AccessControl = new Dictionary>(); - } - - [JsonProperty(PropertyName = "accessControl")] - [Description("Per-feature role based access control configuration.")] - public Dictionary> AccessControl { get; set; } - } - - public class SslConfigSection - { - public SslConfigSection() - { - Domains = new string[] { }; - } - - [JsonProperty(PropertyName = "enabled")] - [Description("Toggle ssl.")] - public bool Enabled { get; set; } - - [JsonProperty(PropertyName = "challengeListenPrefix")] - [Description("Http listen prefix for ssl challenge request (external port must be 80)")] - public string ChallengeListenPrefix { get; set; } - - [JsonProperty(PropertyName = "name")] - [Description("Friendly name of the certificate.")] - public string Name { get; set; } - - [JsonProperty(PropertyName = "password")] - [Description("Private password.")] - public string Password { get; set; } - - [JsonProperty(PropertyName = "email")] - [Description("Registration contact email.")] - public string Email { get; set; } - - [JsonProperty(PropertyName = "domains")] - [Description("Domain name(s) to issue the certificate for.")] - public string[] Domains { get; set; } - - [JsonProperty(PropertyName = "ports")] - [Description("Ports to bind the ssl certificate to.")] - public int[] Ports { get; set; } - - [JsonProperty(PropertyName = "useCompatibilityNonSNIBindings")] - [Description("Use non SNI SSL bindings for previous Windows OS (before Windows 8/2012)")] - public bool UseCompatibilityNonSNIBindings { get; set; } - } - - public class ArkMultipliersConfigSection - { - public ArkMultipliersConfigSection() - { - EggHatchSpeedMultiplier = 1d; - BabyMatureSpeedMultiplier = 1d; - CuddleIntervalMultiplier = 1d; - } - - [JsonProperty(PropertyName = "eggHatchSpeedMultiplier")] - [Description("Pregnancy/incubation time multiplier.")] - public double EggHatchSpeedMultiplier { get; set; } - - [JsonProperty(PropertyName = "babyMatureSpeedMultiplier")] - [Description("Baby mature time multiplier.")] - public double BabyMatureSpeedMultiplier { get; set; } - - [JsonProperty(PropertyName = "cuddleIntervalMultiplier")] - [Description("Multiplier for duration between cuddles.")] - public double CuddleIntervalMultiplier { get; set; } - } - - public class ServerConfigSection - { - public ServerConfigSection() - { - } - - [JsonProperty(PropertyName = "key")] - [Description("Unique key/name for this server instance.")] - public string Key { get; set; } - - [JsonProperty(PropertyName = "cluster")] - [Description("Optional key for the cluster instance this server is part of.")] - public string Cluster { get; set; } - - [JsonProperty(PropertyName = "saveFilePath")] - [Description("Absolute file path of the .ark save file to monitor/extract data from.")] - public string SaveFilePath { get; set; } - - [JsonProperty(PropertyName = "displayAddress")] - [Description("Public server address visible to players.")] - public string DisplayAddress { get; set; } - - [JsonProperty(PropertyName = "ip")] - [Description("The IP address used to connect to this server instance.")] - public string Ip { get; set; } - - [JsonProperty(PropertyName = "port")] - [Description("The port used to connect to this server instance.")] - public int Port { get; set; } - - [JsonProperty(PropertyName = "rconPort")] - [Description("The port used to connect to this server instance over rcon.")] - public int RconPort { get; set; } - - [JsonProperty(PropertyName = "rconPassword")] - [Description("The password used to connect to this server instance via rcon.")] - public string RconPassword { get; set; } - - //[JsonProperty(PropertyName = "updateBatchFilePath")] - //[Description("Absolute file path of a batch file to run in order to update the server.")] - //public string UpdateBatchFilePath { get; set; } - - //[JsonProperty(PropertyName = "startBatchFilePath")] - //[Description("Absolute file path of a batch file to run in order to start the server.")] - //public string StartBatchFilePath { get; set; } - - [JsonProperty(PropertyName = "serverExecutablePath")] - [Description("Absolute file path of the server instance executable.")] - public string ServerExecutablePath { get; set; } - - [JsonProperty(PropertyName = "serverExecutableArguments")] - [Description("Command line arguments used when starting the server instance.")] - public string ServerExecutableArguments { get; set; } - - [JsonProperty(PropertyName = "steamCmdExecutablePath")] - [Description("Absolute file path of the steamcmd executable.")] - public string SteamCmdExecutablePath { get; set; } - - [JsonProperty(PropertyName = "serverInstallDirPath")] - [Description("The directory path to force steamcmd updates to.")] - public string ServerInstallDirPath { get; set; } - - [JsonProperty(PropertyName = "usePowershellOutputRedirect")] - [Description("Use alternative powershell/file based output redirect for update progress notifications.")] - public bool UsePowershellOutputRedirect { get; set; } - - [JsonProperty(PropertyName = "disableChatNotificationOnGlobalCountdown")] - [Description("Disable chat notifications for this server instance when trigged by admin multiple server countdown (feature is used for compatibility with cross server chat).")] - public bool DisableChatNotificationOnGlobalCountdown { get; set; } - - } - - public class ClusterConfigSection - { - public ClusterConfigSection() - { - } - - [JsonProperty(PropertyName = "key")] - [Description("Unique key/name for this cluster instance.")] - public string Key { get; set; } - - [JsonProperty(PropertyName = "savePath")] - [Description("The directory path where cluster save data is stored.")] - public string SavePath { get; set; } - } -} diff --git a/ArkBot/Configuration/AccessControlConfigSectionConverter.cs b/ArkBot/Configuration/AccessControlConfigSectionConverter.cs new file mode 100644 index 0000000..2fe1d6e --- /dev/null +++ b/ArkBot/Configuration/AccessControlConfigSectionConverter.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace ArkBot.Configuration +{ + public class AccessControlConfigSectionConverter : ExpandableObjectConverter + { + public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) + { + if (!(value is IDictionary)) return base.GetProperties(context, value, attributes); + + var dict = value as IDictionary; + var propDescriptions = new PropertyDescriptorCollection(null); + + var num = 0; + foreach (var kv in dict) propDescriptions.Add(new AccessControlFeatureGroupPropertyDescriptor(dict, kv.Key, num++)); + return propDescriptions; + } + } +} diff --git a/ArkBot/Configuration/AccessControlFeatureGroupConverter.cs b/ArkBot/Configuration/AccessControlFeatureGroupConverter.cs new file mode 100644 index 0000000..8616cff --- /dev/null +++ b/ArkBot/Configuration/AccessControlFeatureGroupConverter.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace ArkBot.Configuration +{ + public class AccessControlFeatureGroupConverter : ExpandableObjectConverter + { + public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) + { + if (!(value is IDictionary)) return base.GetProperties(context, value, attributes); + + var dict = value as IDictionary; + var propDescriptions = new PropertyDescriptorCollection(null); + + var num = 0; + foreach (var kv in dict) propDescriptions.Add(new AccessControlFeaturePropertyDescriptor(dict, kv.Key, num++)); + return propDescriptions; + } + } +} diff --git a/ArkBot/Configuration/AccessControlFeatureGroupPropertyDescriptor.cs b/ArkBot/Configuration/AccessControlFeatureGroupPropertyDescriptor.cs new file mode 100644 index 0000000..bdbc95d --- /dev/null +++ b/ArkBot/Configuration/AccessControlFeatureGroupPropertyDescriptor.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using System.ComponentModel; + +namespace ArkBot.Configuration +{ + public class AccessControlFeatureGroupPropertyDescriptor : PropertyDescriptor + { + private readonly IDictionary _owner; + private readonly T _index; + private readonly int _order; + + public AccessControlFeatureGroupPropertyDescriptor(IDictionary owner, T index, int order) : base("[" + index + "]", null) + { + _owner = owner; + _index = index; + _order = order; + } + + public override AttributeCollection Attributes + { + get + { + var attributes = TypeDescriptor.GetAttributes(GetValue(null), false); + attributes = AddAttribute(new DisplayNameAttribute(_index.ToString()), attributes); + attributes = AddAttribute(new PropertyOrderAttribute(_order), attributes); + + return attributes; + } + } + private AttributeCollection AddAttribute(Attribute newAttribute, AttributeCollection oldAttributes) + { + var newAttributes = new Attribute[oldAttributes.Count + 1]; + oldAttributes.CopyTo(newAttributes, 1); + newAttributes[0] = newAttribute; + + return new AttributeCollection(newAttributes); + } + + public override bool CanResetValue(object component) => false; + public override object GetValue(object component) => Value; + private T2 Value => _owner[_index]; + public override void ResetValue(object component) => throw new NotImplementedException(); + public override void SetValue(object component, object value) => _owner[_index] = (T2)value; + public override bool ShouldSerializeValue(object component) => false; + public override Type ComponentType => _owner.GetType(); + public override bool IsReadOnly => true; + public override Type PropertyType => Value?.GetType(); + + } +} diff --git a/ArkBot/Configuration/AccessControlFeaturePropertyDescriptor.cs b/ArkBot/Configuration/AccessControlFeaturePropertyDescriptor.cs new file mode 100644 index 0000000..da80951 --- /dev/null +++ b/ArkBot/Configuration/AccessControlFeaturePropertyDescriptor.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using System.ComponentModel; + +namespace ArkBot.Configuration +{ + public class AccessControlFeaturePropertyDescriptor : PropertyDescriptor + { + private readonly IDictionary _owner; + private readonly T _index; + private readonly int _order; + + public AccessControlFeaturePropertyDescriptor(IDictionary owner, T index, int order) : base("[" + index + "]", null) + { + _owner = owner; + _index = index; + _order = order; + } + + public override AttributeCollection Attributes + { + get + { + var attributes = TypeDescriptor.GetAttributes(GetValue(null), false); + + attributes = AddAttribute(new DisplayNameAttribute(_index.ToString()), attributes); + attributes = AddAttribute(new PropertyOrderAttribute(_order), attributes); + attributes = AddAttribute(new EditorAttribute(typeof(StringArrayEditorWithPreview), typeof(StringArrayEditorWithPreview)), attributes); + + return attributes; + } + } + private AttributeCollection AddAttribute(Attribute newAttribute, AttributeCollection oldAttributes) + { + var newAttributes = new Attribute[oldAttributes.Count + 1]; + oldAttributes.CopyTo(newAttributes, 1); + newAttributes[0] = newAttribute; + + return new AttributeCollection(newAttributes); + } + + public override bool CanResetValue(object component) => false; + public override object GetValue(object component) => Value; + private T2 Value => _owner[_index]; + public override void ResetValue(object component) => throw new NotImplementedException(); + public override void SetValue(object component, object value) => _owner[_index] = (T2)value; + public override bool ShouldSerializeValue(object component) => false; + public override Type ComponentType => _owner.GetType(); + public override bool IsReadOnly => false; + public override Type PropertyType => Value?.GetType(); + } +} diff --git a/ArkBot/Configuration/ConfigurationHelpAttribute.cs b/ArkBot/Configuration/ConfigurationHelpAttribute.cs new file mode 100644 index 0000000..17b13d9 --- /dev/null +++ b/ArkBot/Configuration/ConfigurationHelpAttribute.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ArkBot.Configuration +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public sealed class ConfigurationHelpAttribute : Attribute + { + public string Remarks { get; set; } + public string Instructions { get; set; } + public string Example { get; set; } + + public ConfigurationHelpAttribute(string[] remarks = null, string[] instructions = null) + { + if (remarks != null) Remarks = string.Join(Environment.NewLine, remarks); + if (instructions != null) Instructions = string.Join(Environment.NewLine, instructions); + } + } +} diff --git a/ArkBot/Configuration/CustomCollectionEditor.cs b/ArkBot/Configuration/CustomCollectionEditor.cs new file mode 100644 index 0000000..62cd7a2 --- /dev/null +++ b/ArkBot/Configuration/CustomCollectionEditor.cs @@ -0,0 +1,210 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using Xceed.Wpf.Toolkit.PropertyGrid; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; +using Xceed.Wpf.Toolkit.Core.Utilities; +using System.Windows.Controls.Primitives; +using System.Reflection; +using System.Windows.Controls; +using Xceed.Wpf.Toolkit; +using ArkBot.Extensions; +using ArkBot.ViewModel; +using System.Windows.Data; +using System.Collections.Concurrent; +using System.Windows.Media; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel; +using System.Windows.Threading; +using Nito.AsyncEx; + +namespace ArkBot.Configuration +{ + public class CustomCollectionEditor : CollectionEditor + { + //public static readonly DependencyProperty ModelProperty = DependencyProperty.Register("Model", typeof(ConfigurationViewModel), typeof(CollectionControlButton), new FrameworkPropertyMetadata()); + + //public ConfigurationViewModel Model + //{ + // get { return Editor.GetValue(ModelProperty) as ConfigurationViewModel; } + // set { Editor.SetValue(ModelProperty, value); } + //} + + protected override void SetControlProperties(PropertyItem propertyItem) + { + RemoveRoutedEventHandlers(Editor, ButtonBase.ClickEvent); + + SetEditorContent(propertyItem); + propertyItem.PropertyChanged += (s, e) => SetEditorContent(propertyItem); + + Editor.Foreground = Brushes.Gray; + Editor.Padding = new Thickness(3); + Editor.Click += new RoutedEventHandler(async (s, e) => + { + var dlg = new CollectionControlDialog + { + Title = "Config Editor", + Width = 1000, + Height = 800, + MinWidth = 800, + MinHeight = 500, + ItemsSource = Editor.ItemsSource, + NewItemTypes = Editor.NewItemTypes, + ItemsSourceType = Editor.ItemsSourceType, + IsReadOnly = Editor.IsReadOnly + }; + + var cc = dlg.CollectionControl; + //var pg = cc.PropertyGrid; + //pg.Loaded += PropertyGrid_Loaded; + + using (var viewModel = await ConfigurationViewModel.CreateAsync(false)) + { + //foo.SelectedObject = cc.SelectedItem; + + //dlg.Loaded += Dlg_Loaded; + + dlg.DataContext = viewModel; + + if (dlg.ShowDialog() == true) + { + // trigger a full revalidation and update the grid + var conf = Editor.FindVisualParents().OfType().FirstOrDefault(); + if (conf != null) + { + AsyncContext.Run(async () => + { + await conf.UpdateValidation(trigger: true); + }); + } + } + } + }); + } + + private void SetEditorContent(PropertyItem propertyItem) + { + var value = propertyItem.Value; + var t = propertyItem.Value.GetType(); + var valueString = value.ToString(); + if (string.IsNullOrEmpty(valueString) || (valueString == t.UnderlyingSystemType.ToString())) + { + valueString = propertyItem.DisplayName; + } + + Editor.Content = valueString; + } + + //private DependencyPropertyListener _foo; + + //private void Dlg_Loaded(object sender, RoutedEventArgs e) + //{ + // var dlg = (sender as CollectionControlDialog); + // var cc = dlg.CollectionControl; + + // _foo = new DependencyPropertyListener(cc, CollectionControl.SelectedItemProperty, _e => + // { + // (dlg.DataContext as ConfigurationViewModel).SelectedObject = _e.NewValue; + // }); + //} + + private void PropertyGrid_Loaded(object sender, RoutedEventArgs e) + { + //modify styles dynamically during runtime because it is too complicated to override the templates/styles in xaml + var expandSites = (sender as PropertyGrid).FindVisualChildrenWithPath("Expander[expander]/Grid/Border[ExpandSite]"); + foreach (var exp in expandSites) + { + exp.Padding = new Thickness(exp.Padding.Left, exp.Padding.Top, 23, exp.Padding.Bottom); //add some padding on the right side to make room for validation adorners + } + } + + //from: https://stackoverflow.com/a/12618521 + public static void RemoveRoutedEventHandlers(UIElement elm, RoutedEvent re) + { + var pi = typeof(UIElement).GetProperty("EventHandlersStore", BindingFlags.Instance | BindingFlags.NonPublic); + var ehs = pi.GetValue(elm, null); + if (ehs == null) return; + + var mi = ehs.GetType().GetMethod("GetRoutedEventHandlers", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + var reh = (RoutedEventHandlerInfo[])mi.Invoke(ehs, new object[] { re }); + + foreach (var ei in reh) elm.RemoveHandler(re, ei.Handler); + } + } + + //public sealed class DependencyPropertyListener : DependencyObject, IDisposable + //{ + // private static readonly ConcurrentDictionary Cache = new ConcurrentDictionary(); + + // private static readonly DependencyProperty ProxyProperty = DependencyProperty.Register( + // "Proxy", + // typeof(object), + // typeof(DependencyPropertyListener), + // new PropertyMetadata(null, OnSourceChanged)); + + // private readonly Action onChanged; + // private bool disposed; + + // public DependencyPropertyListener( + // DependencyObject source, + // DependencyProperty property, + // Action onChanged = null) + // : this(source, Cache.GetOrAdd(property, x => new PropertyPath(x)), onChanged) + // { + // } + + // public DependencyPropertyListener( + // DependencyObject source, + // PropertyPath property, + // Action onChanged) + // { + // this.Binding = new Binding + // { + // Source = source, + // Path = property, + // Mode = BindingMode.OneWay, + // }; + // this.BindingExpression = (BindingExpression)BindingOperations.SetBinding(this, ProxyProperty, this.Binding); + // this.onChanged = onChanged; + // } + + // public event EventHandler Changed; + + // public BindingExpression BindingExpression { get; } + + // public Binding Binding { get; } + + // public DependencyObject Source => (DependencyObject)this.Binding.Source; + + // public void Dispose() + // { + // if (this.disposed) + // { + // return; + // } + + // this.disposed = true; + // BindingOperations.ClearBinding(this, ProxyProperty); + // } + + // private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + // { + // var listener = (DependencyPropertyListener)d; + // if (listener.disposed) + // { + // return; + // } + + // listener.onChanged?.Invoke(e); + // listener.OnChanged(e); + // } + + // private void OnChanged(DependencyPropertyChangedEventArgs e) + // { + // this.Changed?.Invoke(this, e); + // } + //} +} diff --git a/ArkBot/Configuration/DirectoryPathEditor.cs b/ArkBot/Configuration/DirectoryPathEditor.cs new file mode 100644 index 0000000..1be8934 --- /dev/null +++ b/ArkBot/Configuration/DirectoryPathEditor.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Forms; +using Xceed.Wpf.Toolkit.PropertyGrid; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; +using Binding = System.Windows.Data.Binding; +using Button = System.Windows.Controls.Button; +using HorizontalAlignment = System.Windows.HorizontalAlignment; +using TextBox = System.Windows.Controls.TextBox; + +namespace ArkBot.Configuration +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public sealed class DirectoryPathEditorAttribute : Attribute + { + public string Title { get; set; } + } + + public class DirectoryPathEditor : ITypeEditor + { + private DirectoryPathEditorAttribute _attr; + + public FrameworkElement ResolveEditor(PropertyItem propertyItem) + { + _attr = propertyItem.PropertyDescriptor.Attributes.OfType() + .FirstOrDefault(); + + Grid panel = new Grid(); + panel.ColumnDefinitions.Add(new ColumnDefinition()); + panel.ColumnDefinitions.Add(new ColumnDefinition() + { + Width = GridLength.Auto + }); + + TextBox textBox = new TextBox { BorderThickness = new Thickness(0), Padding = new Thickness(3) }; + textBox.HorizontalAlignment = HorizontalAlignment.Stretch; + Binding binding = new Binding("Value"); //bind to the Value property of the PropertyItem + binding.Source = propertyItem; + binding.Mode = BindingMode.TwoWay; + BindingOperations.SetBinding(textBox, TextBox.TextProperty, binding); + + Button button = new Button { MinWidth = 19 }; + button.Content = "..."; + button.Tag = propertyItem; + button.Click += button_Click; + Grid.SetColumn(button, 1); + + panel.Children.Add(textBox); + panel.Children.Add(button); + + return panel; + } + + private void button_Click(object sender, RoutedEventArgs e) + { + PropertyItem item = ((Button)sender).Tag as PropertyItem; + if (null == item) return; + + var path = item.Value as string; + if (path != null) path = Environment.ExpandEnvironmentVariables(path); + + var di = !string.IsNullOrEmpty(path) && Directory.Exists(path) ? new DirectoryInfo(path) : null; + + using (var dialog = new System.Windows.Forms.FolderBrowserDialog + { + SelectedPath = di?.FullName, + ShowNewFolderButton = true, + Description = String.Format(CultureInfo.CurrentCulture, _attr?.Title ?? "Select {0}", item.DisplayName) + }) + { + if (dialog.ShowDialog() == DialogResult.OK) + { + item.Value = dialog.SelectedPath; + } + } + } + } +} diff --git a/ArkBot/Configuration/Model/AccessControlConfigSection.cs b/ArkBot/Configuration/Model/AccessControlConfigSection.cs new file mode 100644 index 0000000..efe27aa --- /dev/null +++ b/ArkBot/Configuration/Model/AccessControlConfigSection.cs @@ -0,0 +1,30 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + [ReadOnly(true)] + [TypeConverter(typeof(AccessControlConfigSectionConverter))] + [ExpandableObject] + public class AccessControlConfigSection : Dictionary + { + public override string ToString() => "Access Control"; + } +} diff --git a/ArkBot/Configuration/Model/AccessControlFeatureGroup.cs b/ArkBot/Configuration/Model/AccessControlFeatureGroup.cs new file mode 100644 index 0000000..9a0328e --- /dev/null +++ b/ArkBot/Configuration/Model/AccessControlFeatureGroup.cs @@ -0,0 +1,29 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + [TypeConverter(typeof(AccessControlFeatureGroupConverter))] + [ExpandableObject] + public class AccessControlFeatureGroup : Dictionary + { + public override string ToString() => "Group"; + } +} diff --git a/ArkBot/Configuration/Model/AccessControlFeatureRoles.cs b/ArkBot/Configuration/Model/AccessControlFeatureRoles.cs new file mode 100644 index 0000000..2e0c0e5 --- /dev/null +++ b/ArkBot/Configuration/Model/AccessControlFeatureRoles.cs @@ -0,0 +1,26 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + public class AccessControlFeatureRoles : List + { + } +} diff --git a/ArkBot/Configuration/Model/ArkMultipliersConfigSection.cs b/ArkBot/Configuration/Model/ArkMultipliersConfigSection.cs new file mode 100644 index 0000000..ff78206 --- /dev/null +++ b/ArkBot/Configuration/Model/ArkMultipliersConfigSection.cs @@ -0,0 +1,46 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + public class ArkMultipliersConfigSection + { + public ArkMultipliersConfigSection() + { + EggHatchSpeedMultiplier = 1d; + BabyMatureSpeedMultiplier = 1d; + CuddleIntervalMultiplier = 1d; + } + + public override string ToString() => "ARK Multipliers"; + + [JsonProperty(PropertyName = "eggHatchSpeedMultiplier")] + [Display(Name = "Egg Hatch Speed Multiplier", Description = "Pregnancy/incubation time multiplier")] + public double EggHatchSpeedMultiplier { get; set; } + + [JsonProperty(PropertyName = "babyMatureSpeedMultiplier")] + [Display(Name = "Baby Mature Speed Multiplier", Description = "Baby mature time multiplier")] + public double BabyMatureSpeedMultiplier { get; set; } + + [JsonProperty(PropertyName = "cuddleIntervalMultiplier")] + [Display(Name = "Cuddle Interval Multiplier", Description = "Multiplier for duration between cuddles")] + public double CuddleIntervalMultiplier { get; set; } + } +} diff --git a/ArkBot/Configuration/Model/BackupsConfigSection.cs b/ArkBot/Configuration/Model/BackupsConfigSection.cs new file mode 100644 index 0000000..e5336c4 --- /dev/null +++ b/ArkBot/Configuration/Model/BackupsConfigSection.cs @@ -0,0 +1,46 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + public class BackupsConfigSection + { + public override string ToString() => $"Backups ({(BackupsEnabled ? "Enabled" : "Disabled")})"; + + [JsonProperty(PropertyName = "backupsEnabled")] + [Display(Name = "Backups Enabled", Description = "Option to enable savegame backups")] + [PropertyOrder(0)] + public bool BackupsEnabled { get; set; } + + [JsonProperty(PropertyName = "backupsDirectoryPath")] + [Display(Name = "Backups Directory Path", Description = "Directory path where savegame backups are stored")] + [PropertyOrder(1)] + [Editor(typeof(DirectoryPathEditor), typeof(DirectoryPathEditor))] + [DirectoryExists(IfMethod = nameof(IsBackupsEnabled), ErrorMessage = "{0} directory path does not exist")] + public string BackupsDirectoryPath { get; set; } + + // Validation methods + + private bool IsBackupsEnabled() + { + return BackupsEnabled; + } + } +} diff --git a/ArkBot/Configuration/Model/ClusterConfigSection.cs b/ArkBot/Configuration/Model/ClusterConfigSection.cs new file mode 100644 index 0000000..ebfedc9 --- /dev/null +++ b/ArkBot/Configuration/Model/ClusterConfigSection.cs @@ -0,0 +1,53 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + [DisplayName("Cluster Instance")] + [CategoryOrder(ConfigurationCategory.Required, 0)] + [CategoryOrder(ConfigurationCategory.Optional, 1)] + [CategoryOrder(ConfigurationCategory.Advanced, 2)] + [CategoryOrder(ConfigurationCategory.Debug, 3)] + public class ClusterConfigSection + { + public ClusterConfigSection() + { + } + + public override string ToString() => Key; + + + [JsonProperty(PropertyName = "key")] + [Display(Name = "Key", Description = "Unique key/name for this cluster instance")] + [Category(ConfigurationCategory.Required)] + [PropertyOrder(0)] + [MinLength(1, ErrorMessage = "{0} is not set")] + [RegularExpression(@"^[a-z0-9_\-]+$", ErrorMessage = "{0} must consist of letters (a-z), numbers (0-9), dashes (-) and underscores (_)")] + public string Key { get; set; } + + [JsonProperty(PropertyName = "savePath")] + [Display(Name = "Save Path", Description = "The directory path where cluster save data is stored")] + [Category(ConfigurationCategory.Required)] + [PropertyOrder(1)] + [Editor(typeof(DirectoryPathEditor), typeof(DirectoryPathEditor))] + [DirectoryExists(ErrorMessage = "{0} directory path does not exist")] + public string SavePath { get; set; } + } +} diff --git a/ArkBot/Configuration/Model/ClustersConfigSection.cs b/ArkBot/Configuration/Model/ClustersConfigSection.cs new file mode 100644 index 0000000..e3cc0c4 --- /dev/null +++ b/ArkBot/Configuration/Model/ClustersConfigSection.cs @@ -0,0 +1,27 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + public class ClustersConfigSection : List + { + public override string ToString() => "Clusters" + (Count > 0 ? $" ({(string.Join(", ", this.Select(x => x.Key)))})" : ""); + } +} diff --git a/ArkBot/Configuration/Model/Config.cs b/ArkBot/Configuration/Model/Config.cs new file mode 100644 index 0000000..167a770 --- /dev/null +++ b/ArkBot/Configuration/Model/Config.cs @@ -0,0 +1,296 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + [CategoryOrder(ConfigurationCategory.Required, 0)] + [CategoryOrder(ConfigurationCategory.Optional, 1)] + [CategoryOrder(ConfigurationCategory.Advanced, 2)] + [CategoryOrder(ConfigurationCategory.Debug, 3)] + public class Config : IConfig + { + public Config() + { + // Default values + Ssl = new SslConfigSection(); + UserRoles = new UserRolesConfigSection(); + ArkMultipliers = new ArkMultipliersConfigSection(); + Servers = new ServersConfigSection(); + Clusters = new ClustersConfigSection(); + WebAppRedirectListenPrefix = new string[] { }; + AccessControl = new AccessControlConfigSection(); + Discord = new DiscordConfigSection(); + Backups = new BackupsConfigSection(); + + //Test = new Test1ConfigSection(); + } + + // Required + + [JsonProperty(PropertyName = "steamApiKey")] + [Display(Name = "Steam API Key", Description = "API Key from Steam used for fetching server and user details from the Steam API")] + [ConfigurationHelp(instructions: new[] { + @"1. Go to [Register Steam Web API Key](https://steamcommunity.com/dev/apikey) and create a new Steam API Key."}, + Example = "`5E3512AD4C7EB822105E9C07910E2A01`")] + [Category(ConfigurationCategory.Required)] + [PropertyOrder(1)] + [MinLength(1, ErrorMessage = "{0} is not set")] + //todo: validate steam api key with steam + public string SteamApiKey { get; set; } + + [JsonProperty(PropertyName = "servers")] + [Display(Name = "Servers", Description = "Server instance configurations for your particular server setup")] + [ConfigurationHelp(remarks: new[] { + "In this section configure servers to match your ARK server environment. Add or remove additional server configurations if necessary.\r\n", + "Servers each have a unique key that is used to identify a particular server instance in Discord commands, Companion App etc.\r\n" + })] + [Category(ConfigurationCategory.Required)] + [PropertyOrder(2)] + [Editor(typeof(CustomCollectionEditor), typeof(CustomCollectionEditor))] + [Required(ErrorMessage = "{0} is not set")] + [ValidateCollection(ErrorMessage = "{0} contains item(s) that are invalid")] + public ServersConfigSection Servers { get; set; } + + [JsonProperty(PropertyName = "clusters")] + [Display(Name = "Clusters", Description = "Cluster instance configurations for your particular server setup")] + [ConfigurationHelp(remarks: new[] { + "In this section configure clusters to match your ARK server environment. Add or remove additional cluster configurations if necessary.\r\n", + "Leave it empty if your server setup does not include a cluster.\r\n", + "Servers are connected to clusters through a unique key. Remember the key you assigned when configuring your servers.\r\n" + })] + [Category(ConfigurationCategory.Required)] + [PropertyOrder(3)] + [Editor(typeof(CustomCollectionEditor), typeof(CustomCollectionEditor))] + [Required(ErrorMessage = "{0} is not set")] + [ValidateCollection(ErrorMessage = "{0} contains item(s) that are invalid")] + public ClustersConfigSection Clusters { get; set; } + + + // Optional + + [JsonProperty(PropertyName = "botName")] + [Display(Name = "Bot Name", Description = "Short name to identify the bot")] + [DefaultValue("ARK Bot")] + [ConfigurationHelp(remarks: new[] { "Is used as the title and application name when communicating with third party web services etc." }, Example = "ARK Bot")] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(0)] + [MinLength(1, ErrorMessage = "{0} is not set")] + public string BotName { get; set; } + + [JsonProperty(PropertyName = "botUrl")] + [Display(Name = "Bot URL", Description = "Website url associated with the bot or ARK server")] + [ConfigurationHelp(remarks: new[] { "Is used to link or redirect to your website." }, Example = "http://www.arkserver.net")] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(1)] + [ValidUrl(Optional = true, ErrorMessage = "{0} is not a valid URL")] + public string BotUrl { get; set; } + + [JsonProperty(PropertyName = "appUrl")] + [Display(Name = "Web App URL", Description = "External url pointing to the Web App")] + [ConfigurationHelp(remarks: new[] { "Is used to link or redirect to the Companion App (Web App)." }, Example = "http://app.arkserver.net")] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(2)] + [ValidUrl(Optional = true, ErrorMessage = "{0} is not a valid URL")] + public string AppUrl { get; set; } + + [JsonProperty(PropertyName = "arkMultipliers")] + [Display(Name = "ARK Multipliers", Description = "Server specific multipliers")] + [ConfigurationHelp(remarks: new[] { "ARK configuration multipliers used on your servers and required for accurate calculations throughout the application." })] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(3)] + [ExpandableObject] + [Required(ErrorMessage = "{0} is not set")] + [ValidateExpandable(ErrorMessage = "{0} contain field(s) that are invalid")] + public ArkMultipliersConfigSection ArkMultipliers { get; set; } + + [JsonProperty(PropertyName = "discord")] + [Display(Name = "Discord", Description = "Discord bot settings")] + [ConfigurationHelp(remarks: new[] { "Settings specific to the Discord bot feature. The Discord bot allows administrators to manage servers using commands in Discord." })] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(4)] + [ExpandableObject] + [Required(ErrorMessage = "{0} is not set")] + [ValidateExpandable(ErrorMessage = "{0} contain field(s) that are invalid")] + public DiscordConfigSection Discord { get; set; } + + [JsonProperty(PropertyName = "userRoles")] + [Display(Name = "User Roles", Description = "Explicit steam user role assignment")] + [ConfigurationHelp(remarks: new[] { "Multiple roles can be configured and each contains a list of steam ids who belong to that role. Roles are used in Companion App (Web App) access control to grant access to specific pages/features." })] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(5)] + [Editor(typeof(CustomCollectionEditor), typeof(CustomCollectionEditor))] + [Required(ErrorMessage = "{0} is not set")] + [ValidateCollection(ErrorMessage = "{0} contains item(s) that are invalid")] + public UserRolesConfigSection UserRoles { get; set; } + + [JsonProperty(PropertyName = "accessControl")] + [Display(Name = "Access Control", Description = "Per-feature role based access control configuration")] + [ConfigurationHelp(remarks: new[] { "Contain a predefined set of pages/features to grant access to. Each page/feature contains a list of roles that have access to that particular resource. Roles are connected to steam users in the User Roles setting." })] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(6)] + [Required(ErrorMessage = "{0} is not set")] + public AccessControlConfigSection AccessControl { get; set; } + + [JsonProperty(PropertyName = "backups")] + [Display(Name = "Backups", Description = "Savegame backups")] + [ConfigurationHelp(remarks: new[] { "Settings specific to the savegame backup feature which optionally can be configured to take backups each time a savegame change is detected." })] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(7)] + [ExpandableObject] + [Required(ErrorMessage = "{0} is not set")] + [ValidateExpandable(ErrorMessage = "{0} contain field(s) that are invalid")] + public BackupsConfigSection Backups { get; set; } + + [JsonProperty(PropertyName = "webAppRedirectListenPrefix")] + [Display(Name = "Web App Redirect Listen Prefix(es)", Description = "Http listen prefix(es) that are redirected to BotUrl")] + [ConfigurationHelp(remarks: new[] { "Used to redirect alternate URLs to the actual Companion App (Web App) URL. Typically used to redirect HTTP requests to a secure HTTPS connection when SSL is enabled." }, Example = "http://+:80/")] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(8)] + //todo: validate this listen prefix + public string[] WebAppRedirectListenPrefix { get; set; } + + [JsonProperty(PropertyName = "powershellFilePath")] + [Display(Name = "Powershell Executable Path", Description = "Absolute file path of the powershell executable")] + [DefaultValue(@"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe")] + [ConfigurationHelp(remarks: new[] { "This is the path to the PowerShell executable on your system. It is used when `Use Powershell Output Redirect` is configured for a server instance to relay SteamCmd status back to ARK Bot." })] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(9)] + [Editor(typeof(OpenFilePathEditor), typeof(OpenFilePathEditor))] + [OpenFilePathEditor(Filter = "Executable files (*.exe)|*.exe|All files (*.*)|*.*")] + [FileExists(ErrorMessage = "{0} is not set or the file path does not exist")] + //todo: only used with Server.ServerManagement.UsePowershellOutputRedirect + public string PowershellFilePath { get; set; } + + [JsonProperty(PropertyName = "ssl")] + [Display(Name = "SSL", Description = "Configure Web App and WebAPI to use SSL with a free certificate from Lets Encrypt")] + [ConfigurationHelp(remarks: new[] + { + "Enabling SSL (HTTPS) is important to protect users against session hijacking. With SSL enabled the bot will attempt to issue a free SSL-certificate using Lets Encrypt. Once the SSL-certificate has been issued, it is valid for 90 days, after which it must be renewed.\r\n", + "For the SSL-certificate to be issued you need to prove that you control the domain name; the domain must be pointed to your public IP and port 80 must be open externally and available for the bot to bind locally.\r\n" + })] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(10)] + [ExpandableObject] + [Required(ErrorMessage = "{0} is not set")] + [ValidateExpandable(ErrorMessage = "{0} contain field(s) that are invalid")] + public SslConfigSection Ssl { get; set; } + + [JsonProperty(PropertyName = "webApiListenPrefix")] + [Display(Name = "Web API Listen Prefix", Description = "Http listen prefix assigned to the Web API")] + [DefaultValue("http://+:60001/")] + [ConfigurationHelp(remarks: new[] { + "Listen prefix is a simple canonical form to express the schema, host, port and relative URI to reserve for a web listener.\r\n", + "Typically the primary thing you might change is the port which is the decimal number after `:`. This is the local port that the listener will attempt to bind to.\r\n", + "With SSL is enabled the schema should be changed from `http` to `https`.\r\n", + "[Learn more about listen prefixes](https://msdn.microsoft.com/en-us/library/windows/desktop/aa364698(v=vs.85).aspx)\r\n" + })] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(11)] + [MinLength(1, ErrorMessage = "{0} is not set")] + //todo: validate this listen prefix + [RegularExpressionCustom(@"^https://.*", IfMethod = nameof(IsSslEnabled), ErrorMessage = "{0} should be `https` when SSL is enabled")] + [RegularExpressionCustom(@"^http://.*", IfMethod = nameof(IsSslDisabled), ErrorMessage = "{0} should be `http` when SSL is disabled")] + + public string WebApiListenPrefix { get; set; } + + [JsonProperty(PropertyName = "webAppListenPrefix")] + [Display(Name = "Web App Listen Prefix", Description = "Http listen prefix assigned to the Companion App (Web App)")] + [DefaultValue("http://+:80/")] + [ConfigurationHelp(remarks: new [] { + "Listen prefix is a simple canonical form to express the schema, host, port and relative URI to reserve for a web listener.\r\n", + "Typically the primary thing you might change is the port which is the decimal number after `:`. This is the local port that the listener will attempt to bind to.\r\n", + "With SSL is enabled the schema should be changed from `http` to `https`.\r\n", + "[Learn more about listen prefixes](https://msdn.microsoft.com/en-us/library/windows/desktop/aa364698(v=vs.85).aspx)\r\n" + })] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(12)] + [MinLength(1, ErrorMessage = "{0} is not set")] + //todo: validate this listen prefix + [RegularExpressionCustom(@"^https://.*", IfMethod = nameof(IsSslEnabled), ErrorMessage = "{0} should be `https` when SSL is enabled")] + [RegularExpressionCustom(@"^http://.*", IfMethod = nameof(IsSslDisabled), ErrorMessage = "{0} should be `http` when SSL is disabled")] + public string WebAppListenPrefix { get; set; } + + [JsonProperty(PropertyName = "tempFileOutputDirPath")] + [Display(Name = "Temporary Files Directory", Description = "An existing directory path where temporary binary files can be stored (zip-files etc.)")] + [DefaultValue("%TEMP%\\ArkBot")] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(13)] + [Editor(typeof(DirectoryPathEditor), typeof(DirectoryPathEditor))] + [DirectoryPathIsValid(ErrorMessage = "{0} is not set or the directory path is not valid")] + public string TempFileOutputDirPath { get; set; } + + + // Optional Advanced + + [JsonProperty(PropertyName = "savegameExtractionMaxDegreeOfParallelism")] + [Display(Name = "Savegame Extraction Max Degree Of Parallelism", Description = "Max degree of parallelism to use for savegame extraction")] + [DefaultValue(null)] + [ConfigurationHelp(remarks: new [] { "No need to change this setting unless you are experiencing out of memory exceptions." })] + [Category(ConfigurationCategory.Advanced)] + [PropertyOrder(0)] + [RangeOptional(1, 32, Optional = true, ErrorMessage = "{0} must be empty or between 1-32")] + public int? SavegameExtractionMaxDegreeOfParallelism { get; set; } + + [JsonProperty(PropertyName = "useCompatibilityChangeWatcher")] + [Display(Name = "Use Compatibility Change Watcher", Description = "Use timer based .ark save file watcher rather than the default (based on FileSystemWatcher)")] + [DefaultValue(true)] + [ConfigurationHelp(remarks: new[] { "An alternative method of watching for file changes that offer better compatibility with a wide range of systems." })] + [Category(ConfigurationCategory.Advanced)] + [PropertyOrder(1)] + public bool UseCompatibilityChangeWatcher { get; set; } + + + // Debugging, Logging etc. + + [JsonProperty(PropertyName = "discordLogLevel")] + [Display(Name = "Discord Log Level", Description = "Log level for Discord.NET")] + [Category(ConfigurationCategory.Debug)] + [PropertyOrder(0)] + public LogSeverity DiscordLogLevel { get; set; } + + [JsonProperty(PropertyName = "anonymizeWebApiData")] + [Display(Name = "Anonymize Web API Data", Description = "Anonymize all data in the WebAPI. Used to create data dumps for demoing the web-app")] + [Category(ConfigurationCategory.Debug)] + [PropertyOrder(1)] + public bool AnonymizeWebApiData { get; set; } + + //[JsonProperty(PropertyName = "test")] + //[Display(Name = "Test", Description = "Test")] + //[Category(ConfigurationCategory.Debug)] + //[PropertyOrder(2)] + //[ExpandableObject] + //[Required(ErrorMessage = "{0} is not set")] + //[ValidateExpandable(ErrorMessage = "{0} contain field(s) that are invalid")] + //public Test1ConfigSection Test { get; set; } + + + // Validation methods + + private bool IsSslEnabled() + { + return Ssl.Enabled; + } + + private bool IsSslDisabled() + { + return !Ssl.Enabled; + } + } +} diff --git a/ArkBot/Configuration/Model/ConfigurationCategories.cs b/ArkBot/Configuration/Model/ConfigurationCategories.cs new file mode 100644 index 0000000..5d2a357 --- /dev/null +++ b/ArkBot/Configuration/Model/ConfigurationCategories.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ArkBot.Configuration.Model +{ + internal static class ConfigurationCategory + { + /// + /// Settings that must be changed (environment specific) + /// + internal const string Required = "Required"; + /// + /// Settings that are either optional or may be left at default + /// + internal const string Optional = "Optional"; + + /// + /// Optional settings for advanced configurations + /// + internal const string Advanced = "Advanced"; + + /// + /// Optional setting for debugging, logging etc. + /// + internal const string Debug = "Debug"; + } +} diff --git a/ArkBot/Configuration/Model/DiscordConfigSection.cs b/ArkBot/Configuration/Model/DiscordConfigSection.cs new file mode 100644 index 0000000..f70ed74 --- /dev/null +++ b/ArkBot/Configuration/Model/DiscordConfigSection.cs @@ -0,0 +1,71 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + public class DiscordConfigSection + { + public DiscordConfigSection() + { + DiscordBotEnabled = true; + AccessControl = new AccessControlConfigSection(); + } + + public override string ToString() => $"Discord ({(DiscordBotEnabled ? "Enabled" : "Disabled")})"; + + [JsonProperty(PropertyName = "discordBotEnabled")] + [Display(Name = "Discord Bot Enabled", Description = "Option to enable/disable the discord bot component")] + public bool DiscordBotEnabled { get; set; } + + [JsonProperty(PropertyName = "botToken")] + [Display(Name = "Bot Token", Description = "Bot authentication token from https://discordapp.com/developers")] + public string BotToken { get; set; } + + [JsonProperty(PropertyName = "enabledChannels")] + [Display(Name = "Enabled Channels", Description = "A list of channels where the bot will listen to and answer commands")] + public string[] EnabledChannels { get; set; } + + [JsonProperty(PropertyName = "infoTopicChannel")] + [Display(Name = "Info Topic Channel", Description = "Channel where topic is set to display information about last update, next update and how to use bot commands")] + public string InfoTopicChannel { get; set; } + + [JsonProperty(PropertyName = "announcementChannel")] + [Display(Name = "Announcement Channel", Description = "Channel where announcements are made (votes etc.)")] + public string AnnouncementChannel { get; set; } + + [JsonProperty(PropertyName = "memberRoleName")] + [Display(Name = "Member Role Name", Description = "The name of the member role in Discord")] + public string MemberRoleName { get; set; } + + [JsonProperty(PropertyName = "disableDeveloperFetchSaveData")] + [Display(Name = "Disable Developer Fetch Save Data", Description = "Diable users in \"developer\"-role fetching json or save file data")] + public bool DisableDeveloperFetchSaveData { get; set; } + + [JsonProperty(PropertyName = "accessControl")] + [Display(Name = "Access Control", Description = "Per-feature role based access control configuration")] + public AccessControlConfigSection AccessControl { get; set; } + + [JsonProperty(PropertyName = "steamOpenIdRelyingServiceListenPrefix")] + [Display(Name = "Steam Open ID Relying Server Listen Prefix", Description = "Http listen prefix for Steam OpenID Relying Party webservice (requires a port that is open to external connections)")] + public string SteamOpenIdRelyingServiceListenPrefix { get; set; } + + [JsonProperty(PropertyName = "steamOpenIdRedirectUri")] + [Display(Name = "Steam Open ID Redirect URL", Description = "Publicly accessible url for incoming Steam OpenID Relying Party webservice connections (requires a port that is open to external connections)")] + public string SteamOpenIdRedirectUri { get; set; } + } +} diff --git a/ArkBot/Configuration/Model/IConfig.cs b/ArkBot/Configuration/Model/IConfig.cs new file mode 100644 index 0000000..04f4999 --- /dev/null +++ b/ArkBot/Configuration/Model/IConfig.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; +using ArkBot.Configuration; +using Discord; + +namespace ArkBot.Configuration.Model +{ + public interface IConfig + { + ArkMultipliersConfigSection ArkMultipliers { get; set; } + string BotName { get; set; } + string BotUrl { get; set; } + string AppUrl { get; set; } + string SteamApiKey { get; set; } + string TempFileOutputDirPath { get; set; } + DiscordConfigSection Discord { get; set; } + UserRolesConfigSection UserRoles { get; set; } + AccessControlConfigSection AccessControl { get; set; } + BackupsConfigSection Backups { get; set; } + string WebApiListenPrefix { get; set; } + string WebAppListenPrefix { get; set; } + string[] WebAppRedirectListenPrefix { get; set; } + string PowershellFilePath { get; set; } + bool UseCompatibilityChangeWatcher { get; set; } + SslConfigSection Ssl { get; set; } + int? SavegameExtractionMaxDegreeOfParallelism { get; set; } + bool AnonymizeWebApiData { get; set; } + LogSeverity DiscordLogLevel { get; set; } + + ServersConfigSection Servers { get; set; } + ClustersConfigSection Clusters { get; set; } + + //Test1ConfigSection Test { get; set; } + } +} \ No newline at end of file diff --git a/ArkBot/Configuration/Model/ServerConfigSection.cs b/ArkBot/Configuration/Model/ServerConfigSection.cs new file mode 100644 index 0000000..807a18f --- /dev/null +++ b/ArkBot/Configuration/Model/ServerConfigSection.cs @@ -0,0 +1,134 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + [DisplayName("Server Instance")] + [CategoryOrder(ConfigurationCategory.Required, 0)] + [CategoryOrder(ConfigurationCategory.Optional, 1)] + [CategoryOrder(ConfigurationCategory.Advanced, 2)] + [CategoryOrder(ConfigurationCategory.Debug, 3)] + public class ServerConfigSection + { + public ServerConfigSection() + { + ServerManagement = new ServerManagementConfigSection(); + } + + public override string ToString() => Key; + + // Required + + [JsonProperty(PropertyName = "key")] + [Display(Name = "Key", Description = "Unique key (tag name) for this server instance")] + [ConfigurationHelp(remarks: new [] { + "Used to identify a particular server instance in Discord commands, Companion App etc." + }, Example = "`server1`, `server2`, `server3`")] + [Category(ConfigurationCategory.Required)] + [PropertyOrder(0)] + [MinLength(1, ErrorMessage = "{0} is not set")] + [RegularExpression(@"^[a-z0-9_\-]+$", ErrorMessage = "{0} must consist of letters (a-z), numbers (0-9), dashes (-) and underscores (_)")] + public string Key { get; set; } + + [JsonProperty(PropertyName = "saveFilePath")] + [Display(Name = "Save File Path", Description = "The savegame (`.ark`) to extract data from and watch for changes")] + [ConfigurationHelp(remarks: new [] { @"Savegames are found in your ARK installation folder under `ShooterGame\Saved\SavedArks\`." }, + Example = @"`C:\ARK Servers\server1\ShooterGame\Saved\SavedArks\TheIsland.ark`")] + [Category(ConfigurationCategory.Required)] + [PropertyOrder(1)] + [Editor(typeof(OpenFilePathEditor), typeof(OpenFilePathEditor))] + [OpenFilePathEditor(Filter = "ARK savegame files (*.ark)|*.ark|All files (*.*)|*.*")] + [FileExists(ErrorMessage = "{0} is not set or the file path does not exist")] + public string SaveFilePath { get; set; } + + [JsonProperty(PropertyName = "ip")] + [Display(Name = "IP Address", Description = "The address used to connect to this server instance")] + [ConfigurationHelp(remarks: new [] { "Use your servers external IP address unless you have other requirements."}, + Example = "`127.0.0.1`")] + [Category(ConfigurationCategory.Required)] + [PropertyOrder(2)] + [MinLength(1, ErrorMessage = "{0} is not set")] + public string Ip { get; set; } + + [JsonProperty(PropertyName = "queryPort")] + [Display(Name = "Query Port", Description = "The port used to query to this server instance")] + [ConfigurationHelp(remarks: new [] { "Use same value as `?QueryPort=` from the command used to start your server." }, Example = "`27015`")] + [Category(ConfigurationCategory.Required)] + [PropertyOrder(3)] + [Range(1, 65535, ErrorMessage = "{0} must be between 1-65635")] + public int QueryPort { get; set; } + + // Optional + + [JsonProperty(PropertyName = "clusterKey")] + [Display(Name = "Cluster Key", Description = "Optional key for the cluster instance this server is part of")] + [ConfigurationHelp(remarks: new[] { "Only used if your server is part of a cluster." }, instructions: new [] { + @"1. Configure a cluster instance in ARK Bot.", + @"2. Connect all servers in the cluster by specifying the unique cluster key in this field." + }, Example = "`cluster1`")] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(0)] + [RegularExpression(@"^[a-z0-9_\-]+$", ErrorMessage = "{0} must be empty or consist of letters (a-z), numbers (0-9), dashes (-) and underscores (_)")] + public string ClusterKey { get; set; } + + [JsonProperty(PropertyName = "displayAddress")] + [Display(Name = "Display Address", Description = "The public address used to connect to the server")] + [ConfigurationHelp(remarks: new [] { "Used for displaying server urls and for steam connection links." }, + Example = "`arkserver.net:27015`")] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(1)] + public string DisplayAddress { get; set; } + + [JsonProperty(PropertyName = "rconPort")] + [Display(Name = "RCON Port", Description = "The port used to connect to this server instance over rcon")] + [ConfigurationHelp(remarks: new[] { "Use same value as `?RCONPort=` from the command used to start your server." }, Example = "`27020`")] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(2)] + [RangeOptional(1, 65535, Optional = true, ErrorMessage = "{0} must be empty or between 1-65635")] + public int? RconPort { get; set; } + + [JsonProperty(PropertyName = "rconPassword")] + [Display(Name = "RCON Password", Description = "The password used to connect to this server instance via rcon")] + [ConfigurationHelp(remarks: new[] { "Use same value as `?ServerAdminPassword=` from the command used to start your server." }, Example = "`password`")] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(3)] + public string RconPassword { get; set; } + + [JsonProperty(PropertyName = "serverManagement")] + [Display(Name = "Server Management", Description = "Configure server management features available through Discord commands")] + [ConfigurationHelp(remarks: new[] { "Includes features like start, restart, stop, update etc." })] + [Category(ConfigurationCategory.Optional)] + [PropertyOrder(4)] + [ExpandableObject] + [Required(ErrorMessage = "{0} is not set")] + public ServerManagementConfigSection ServerManagement { get; set; } + + + // Advanced + + [JsonProperty(PropertyName = "disableChatNotifications")] + [Display(Name = "Disable Chat Notifications", Description = "Option to disable chat notifications for this server instance")] + [ConfigurationHelp(remarks: new[] { "This option is used together with ARK Server API and ARK Cross Server Chat plugin to controll which servers are notified on countdowns.\r\n", + "By default ARK Bot will notify all servers. When using ARK Cross Server Chat only a single server should be notified since all incoming chat messages will be relayed to the rest of the cluster by the plugin." })] + [Category(ConfigurationCategory.Advanced)] + [PropertyOrder(0)] + public bool DisableChatNotifications { get; set; } + } +} diff --git a/ArkBot/Configuration/Model/ServerManagementConfigSection.cs b/ArkBot/Configuration/Model/ServerManagementConfigSection.cs new file mode 100644 index 0000000..9f5bd89 --- /dev/null +++ b/ArkBot/Configuration/Model/ServerManagementConfigSection.cs @@ -0,0 +1,86 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + public class ServerManagementConfigSection + { + public override string ToString() => $"Server Management ({(Enabled ? "Enabled" : "Disabled")})"; + + [JsonProperty(PropertyName = "enabled")] + [Display(Name = "Enabled", Description = "Option to enable server management features for this server instance")] + [DefaultValue(true)] + [PropertyOrder(0)] + public bool Enabled { get; set; } + + [JsonProperty(PropertyName = "serverExecutablePath")] + [Display(Name = "Server Executable Path", Description = "Path of the server executable (`ShooterGameServer.exe`)")] + [ConfigurationHelp(remarks: new[] { @"Normally found in your ARK installation folder under `ShooterGame\Binaries\Win64\`." }, + Example = @"`C:\ARK Servers\server1\ShooterGame\Binaries\Win64\ShooterGameServer.exe`")] + [PropertyOrder(1)] + [Editor(typeof(OpenFilePathEditor), typeof(OpenFilePathEditor))] + [OpenFilePathEditor(Filter = "Executable files (*.exe)|*.exe|All files (*.*)|*.*")] + [FileExists(IfMethod = nameof(IsEnabled), ErrorMessage = "{0} file path does not exist")] + public string ServerExecutablePath { get; set; } + + [JsonProperty(PropertyName = "serverExecutableArguments")] + [Display(Name = "Server Executable Arguments", Description = "Command line arguments used when starting the server instance")] + [ConfigurationHelp(remarks: new[] { "Make sure to include `-serverkey=server1` and to set it to match your own unique server key. It is used by the server management features to know which `ShooterGameServer.exe` process is which when multiple servers are hosted on the same PC." }, + Example = @"`TheIsland?listen?Port=7777?QueryPort=27015?RCONPort=27020?RCONEnabled=True?SessionName=Server1?ServerPassword=?ServerAdminPassword=password?SpectatorPassword=password?MaxPlayers=5 -culture=en -nosteamclient -clusterid=cluster1 -ClusterDirOverride=""C:\ARK Servers\cluster1"" -serverkey=server1`")] + [PropertyOrder(2)] + [MinLengthOptional(1, IfMethod = nameof(IsEnabled), ErrorMessage = "{0} is not set")] + public string ServerExecutableArguments { get; set; } + + [JsonProperty(PropertyName = "steamCmdExecutablePath")] + [Display(Name = "Steam Cmd Executable Path", Description = "Path of the steamcmd executable (`SteamCMD.exe`)")] + [ConfigurationHelp(remarks: new[] { @"The Steam Console Client or SteamCMD is a command-line version of the Steam client. It is used update Steam servers and mods." }, + Example = @"`C:\SteamCMD\SteamCMD.exe`")] + [PropertyOrder(3)] + [Editor(typeof(OpenFilePathEditor), typeof(OpenFilePathEditor))] + [OpenFilePathEditor(Filter = "Executable files (*.exe)|*.exe|All files (*.*)|*.*")] + [FileExists(IfMethod = nameof(IsEnabled), ErrorMessage = "{0} is not set or the file path does not exist")] + public string SteamCmdExecutablePath { get; set; } + + [JsonProperty(PropertyName = "serverInstallDirPath")] + [Display(Name = "Server Install Directory Path", Description = "Path of the server installation directory")] + [ConfigurationHelp(remarks: new[] { @"Used in SteamCMD update operations as the parameter for `force_install_dir`." }, + Example = @"`C:\ARK Servers\server1`")] + [PropertyOrder(4)] + [Editor(typeof(DirectoryPathEditor), typeof(DirectoryPathEditor))] + [DirectoryExists(IfMethod = nameof(IsEnabled), ErrorMessage = "{0} directory path does not exist")] + public string ServerInstallDirPath { get; set; } + + [JsonProperty(PropertyName = "usePowershellOutputRedirect")] + [Display(Name = "Use PowerShell Output Redirect", Description = "Use alternative PowerShell/file based output redirect for update progress notifications")] + [DefaultValue(true)] + [ConfigurationHelp(remarks: new[] { "Compatibility option to pipe SteamCMD outout through PowerShell rather than redirecting the standard output.\r\n", + "Works on most servers - compared to standard output redirect which only works on some."})] + [PropertyOrder(5)] + public bool UsePowershellOutputRedirect { get; set; } + + + // Validation methods + + private bool IsEnabled() + { + return Enabled; + } + } +} diff --git a/ArkBot/Configuration/Model/ServersConfigSection.cs b/ArkBot/Configuration/Model/ServersConfigSection.cs new file mode 100644 index 0000000..cc4d6ed --- /dev/null +++ b/ArkBot/Configuration/Model/ServersConfigSection.cs @@ -0,0 +1,27 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + public class ServersConfigSection : List + { + public override string ToString() => "Servers" + (Count > 0 ? $" ({(string.Join(", ", this.Select(x => x.Key)))})" : ""); + } +} diff --git a/ArkBot/Configuration/Model/SslConfigSection.cs b/ArkBot/Configuration/Model/SslConfigSection.cs new file mode 100644 index 0000000..ae0df1e --- /dev/null +++ b/ArkBot/Configuration/Model/SslConfigSection.cs @@ -0,0 +1,64 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + public class SslConfigSection + { + public SslConfigSection() + { + Domains = new string[] { }; + } + + public override string ToString() => $"SSL ({(Enabled ? "Enabled" : "Disabled")})"; + + [JsonProperty(PropertyName = "enabled")] + [Display(Name = "Enabled", Description = "Toggle ssl.")] + public bool Enabled { get; set; } + + [JsonProperty(PropertyName = "challengeListenPrefix")] + [Display(Name = "Challenge Listen Prefix", Description = "Http listen prefix for ssl challenge request (external port must be 80)")] + public string ChallengeListenPrefix { get; set; } + + [JsonProperty(PropertyName = "name")] + [Display(Name = "Name", Description = "Friendly name of the certificate")] + public string Name { get; set; } + + [JsonProperty(PropertyName = "password")] + [Display(Name = "Password", Description = "Private password")] + public string Password { get; set; } + + [JsonProperty(PropertyName = "email")] + [Display(Name = "Email", Description = "Registration contact email")] + public string Email { get; set; } + + [JsonProperty(PropertyName = "domains")] + [Display(Name = "Domain name(s)", Description = "Domain name(s) to issue the certificate for")] + public string[] Domains { get; set; } + + [JsonProperty(PropertyName = "ports")] + [Display(Name = "Ports", Description = "Ports to bind the ssl certificate to")] + public int[] Ports { get; set; } + + [JsonProperty(PropertyName = "useCompatibilityNonSNIBindings")] + [Display(Name = "Use Compatibility non-SNI Bindings", Description = "Use non SNI SSL bindings for previous Windows OS (before Windows 8/2012)")] + public bool UseCompatibilityNonSNIBindings { get; set; } + } +} diff --git a/ArkBot/Configuration/Model/UserRolesConfigSection.cs b/ArkBot/Configuration/Model/UserRolesConfigSection.cs new file mode 100644 index 0000000..5a3f14e --- /dev/null +++ b/ArkBot/Configuration/Model/UserRolesConfigSection.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + public class UserRolesConfigSection : List + { + public override string ToString() => "User Roles" + (Count > 0 ? $" ({(string.Join(", ", this.Select(x => x.Role)))})" : ""); + } +} diff --git a/ArkBot/Configuration/Model/UsersInRoleConfig.cs b/ArkBot/Configuration/Model/UsersInRoleConfig.cs new file mode 100644 index 0000000..a623343 --- /dev/null +++ b/ArkBot/Configuration/Model/UsersInRoleConfig.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using ArkBot.Configuration.Validation; +using Newtonsoft.Json; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + [DisplayName("User Role")] + [CategoryOrder(ConfigurationCategory.Required, 0)] + [CategoryOrder(ConfigurationCategory.Optional, 1)] + [CategoryOrder(ConfigurationCategory.Advanced, 2)] + [CategoryOrder(ConfigurationCategory.Debug, 3)] + public class UsersInRoleConfig + { + public UsersInRoleConfig() + { + SteamIds = new List(); + } + + public override string ToString() => Role; + + [JsonProperty(PropertyName = "role")] + [Display(Name = "Role", Description = "Name of the role")] + [Category(ConfigurationCategory.Required)] + [PropertyOrder(1)] + [MinLengthOptional(1, ErrorMessage = "{0} is not set")] + public string Role { get; set; } + + [JsonProperty(PropertyName = "steamIds")] + [Display(Name = "Steam IDs", Description = "Steam IDs that are assigned to this role")] + [Category(ConfigurationCategory.Required)] + [PropertyOrder(2)] + [Required(ErrorMessage = "{0} is not set")] + public List SteamIds { get; set; } + } +} diff --git a/ArkBot/Configuration/Model/_temp_test.cs b/ArkBot/Configuration/Model/_temp_test.cs new file mode 100644 index 0000000..d82c646 --- /dev/null +++ b/ArkBot/Configuration/Model/_temp_test.cs @@ -0,0 +1,137 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArkBot.Configuration; +using ArkBot.Configuration.Validation; +using Discord; +using Microsoft.IdentityModel; +using PropertyChanged; +using Validar; +using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration.Model +{ + [AddINotifyPropertyChangedInterface] + [InjectValidation] + public class Test1ConfigSection + { + public override string ToString() => $"Test ({(Enabled ? "Enabled" : "Disabled")})"; + + public Test1ConfigSection() + { + Test = new Test2ConfigSection(); + } + + [JsonProperty(PropertyName = "enabled")] + [Display(Name = "Enabled", Description = "Option to enable")] + [PropertyOrder(0)] + public bool Enabled { get; set; } + + [JsonProperty(PropertyName = "directoryPath")] + [Display(Name = "Directory Path", Description = "Directory path")] + [PropertyOrder(1)] + [Editor(typeof(DirectoryPathEditor), typeof(DirectoryPathEditor))] + [DirectoryExists(IfMethod = nameof(IsEnabled), ErrorMessage = "{0} directory path does not exist")] + public string DirectoryPath { get; set; } + + [JsonProperty(PropertyName = "test")] + [Display(Name = "Test", Description = "Test")] + [PropertyOrder(2)] + [ExpandableObject] + [Required(ErrorMessage = "{0} is not set")] + [ValidateExpandable(ErrorMessage = "{0} contain field(s) that are invalid")] + public Test2ConfigSection Test { get; set; } + + // Validation methods + + private bool IsEnabled() + { + return Enabled; + } + } + + [AddINotifyPropertyChangedInterface] + [InjectValidation] + public class Test2ConfigSection + { + public override string ToString() => $"Test ({(Enabled ? "Enabled" : "Disabled")})"; + + public Test2ConfigSection() + { + Test = new Test3ConfigSection(); + } + + [JsonProperty(PropertyName = "enabled")] + [Display(Name = "Enabled", Description = "Option to enable")] + [PropertyOrder(0)] + public bool Enabled { get; set; } + + [JsonProperty(PropertyName = "directoryPath")] + [Display(Name = "Directory Path", Description = "Directory path")] + [PropertyOrder(1)] + [Editor(typeof(DirectoryPathEditor), typeof(DirectoryPathEditor))] + [DirectoryExists(IfMethod = nameof(IsEnabled), ErrorMessage = "{0} directory path does not exist")] + public string DirectoryPath { get; set; } + + [JsonProperty(PropertyName = "test")] + [Display(Name = "Test", Description = "Test")] + [PropertyOrder(2)] + [ExpandableObject] + [Required(ErrorMessage = "{0} is not set")] + [ValidateExpandable(ErrorMessage = "{0} contain field(s) that are invalid")] + public Test3ConfigSection Test { get; set; } + + // Validation methods + + private bool IsEnabled() + { + return Enabled; + } + } + + [AddINotifyPropertyChangedInterface] + [InjectValidation] + public class Test3ConfigSection + { + public override string ToString() => $"Test ({(Enabled ? "Enabled" : "Disabled")})"; + + public Test3ConfigSection() + { + Servers = new ServersConfigSection(); + } + + [JsonProperty(PropertyName = "enabled")] + [Display(Name = "Enabled", Description = "Option to enable")] + [PropertyOrder(0)] + public bool Enabled { get; set; } + + [JsonProperty(PropertyName = "directoryPath")] + [Display(Name = "Directory Path", Description = "Directory path")] + [PropertyOrder(1)] + [Editor(typeof(DirectoryPathEditor), typeof(DirectoryPathEditor))] + [DirectoryExists(IfMethod = nameof(IsEnabled), ErrorMessage = "{0} directory path does not exist")] + public string DirectoryPath { get; set; } + + [JsonProperty(PropertyName = "servers")] + [Display(Name = "Servers", Description = "Server instance configurations")] + [PropertyOrder(2)] + [Editor(typeof(CustomCollectionEditor), typeof(CustomCollectionEditor))] + [Required(ErrorMessage = "{0} is not set")] + [ValidateCollection(ErrorMessage = "{0} contains item(s) that are invalid")] + public ServersConfigSection Servers { get; set; } + + // Validation methods + + private bool IsEnabled() + { + return Enabled; + } + } +} diff --git a/ArkBot/Configuration/OpenFilePathEditor.cs b/ArkBot/Configuration/OpenFilePathEditor.cs new file mode 100644 index 0000000..c49302d --- /dev/null +++ b/ArkBot/Configuration/OpenFilePathEditor.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Forms; +using Xceed.Wpf.Toolkit.PropertyGrid; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; +using Binding = System.Windows.Data.Binding; +using Button = System.Windows.Controls.Button; +using HorizontalAlignment = System.Windows.HorizontalAlignment; +using TextBox = System.Windows.Controls.TextBox; + +namespace ArkBot.Configuration +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public sealed class OpenFilePathEditorAttribute : Attribute + { + public string Filter { get; set; } + public string Title { get; set; } + } + + public class OpenFilePathEditor : ITypeEditor + { + private OpenFilePathEditorAttribute _attr; + + public FrameworkElement ResolveEditor(PropertyItem propertyItem) + { + _attr = propertyItem.PropertyDescriptor.Attributes.OfType() + .FirstOrDefault(); + + Grid panel = new Grid(); + panel.ColumnDefinitions.Add(new ColumnDefinition()); + panel.ColumnDefinitions.Add(new ColumnDefinition() + { + Width = GridLength.Auto + }); + + TextBox textBox = new TextBox { BorderThickness = new Thickness(0), Padding = new Thickness(3) }; + textBox.HorizontalAlignment = HorizontalAlignment.Stretch; + Binding binding = new Binding("Value"); //bind to the Value property of the PropertyItem + binding.Source = propertyItem; + binding.Mode = BindingMode.TwoWay; + BindingOperations.SetBinding(textBox, TextBox.TextProperty, binding); + + Button button = new Button { MinWidth = 19 }; + button.Content = "..."; + button.Tag = propertyItem; + button.Click += button_Click; + Grid.SetColumn(button, 1); + + panel.Children.Add(textBox); + panel.Children.Add(button); + + return panel; + } + + private void button_Click(object sender, RoutedEventArgs e) + { + PropertyItem item = ((Button)sender).Tag as PropertyItem; + if (null == item) return; + + var path = item.Value as string; + if (path != null) path = Environment.ExpandEnvironmentVariables(path); + + var fi = !string.IsNullOrEmpty(path) && File.Exists(path) ? new FileInfo(path) : null; + + using (var dialog = new System.Windows.Forms.OpenFileDialog + { + FileName = fi?.Name, + InitialDirectory = fi?.DirectoryName, + CheckFileExists = true, + Filter = _attr?.Filter, + Title = String.Format(CultureInfo.CurrentCulture, _attr?.Title ?? "Select {0}", item.DisplayName) + }) + { + if (dialog.ShowDialog() == DialogResult.OK) + { + item.Value = dialog.FileName; + } + } + } + } +} diff --git a/ArkBot/Configuration/PrimitiveTypeCollectionControlWithPreview.cs b/ArkBot/Configuration/PrimitiveTypeCollectionControlWithPreview.cs new file mode 100644 index 0000000..a4ed786 --- /dev/null +++ b/ArkBot/Configuration/PrimitiveTypeCollectionControlWithPreview.cs @@ -0,0 +1,27 @@ +using ArkBot.Extensions; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using Xceed.Wpf.Toolkit; + +namespace ArkBot.Configuration +{ + public class PrimitiveTypeCollectionControlWithPreview : PrimitiveTypeCollectionControl + { + public PrimitiveTypeCollectionControlWithPreview() + { + Loaded += PrimitiveTypeCollectionControlWithPreview_Loaded; + } + + private void PrimitiveTypeCollectionControlWithPreview_Loaded(object sender, System.Windows.RoutedEventArgs e) + { + foreach (var tb in this.FindVisualChildren()) tb.Foreground = Brushes.Gray; + } + + protected override void OnTextChanged(string oldValue, string newValue) + { + base.OnTextChanged(oldValue, newValue); + Content = newValue?.Replace("\r\n", ", "); + } + } +} diff --git a/ArkBot/Configuration/StringArrayEditorWithPreview.cs b/ArkBot/Configuration/StringArrayEditorWithPreview.cs new file mode 100644 index 0000000..b09fcd3 --- /dev/null +++ b/ArkBot/Configuration/StringArrayEditorWithPreview.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; +using System.Windows; +using Xceed.Wpf.Toolkit.PropertyGrid; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Configuration +{ + public class StringArrayEditorWithPreview : TypeEditor + { + public override FrameworkElement ResolveEditor(PropertyItem propertyItem) + { + var editor = base.ResolveEditor(propertyItem); + return editor; + } + + protected override void SetControlProperties(PropertyItem propertyItem) + { + Editor.BorderThickness = new System.Windows.Thickness(0); + Editor.Content = null; + } + + protected override void SetValueDependencyProperty() + { + ValueProperty = PrimitiveTypeCollectionControlWithPreview.ItemsSourceProperty; + } + + protected override void ResolveValueBinding(PropertyItem propertyItem) + { + var type = propertyItem.PropertyType; + Editor.ItemsSourceType = type; + + if (type.BaseType == typeof(System.Array)) + { + Editor.ItemType = type.GetElementType(); + } + else if (type.BaseType.IsGenericType && (type.BaseType.GetGenericTypeDefinition() == typeof(List<>))) + { + var typeArguments = type.BaseType.GetGenericArguments(); + if (typeArguments.Length > 0) + { + Editor.ItemType = typeArguments[0]; + } + } + else + { + var typeArguments = type.GetGenericArguments(); + if (typeArguments.Length > 0) + { + Editor.ItemType = typeArguments[0]; + } + } + + base.ResolveValueBinding(propertyItem); + } + } +} diff --git a/ArkBot/Configuration/TypeToDisplayNameConverter.cs b/ArkBot/Configuration/TypeToDisplayNameConverter.cs new file mode 100644 index 0000000..27940e5 --- /dev/null +++ b/ArkBot/Configuration/TypeToDisplayNameConverter.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace ArkBot.Configuration +{ + public class TypeToDisplayNameConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + Type t = (Type)value; + var attrs = t.GetCustomAttributes(false).Cast().ToArray(); + var displayAttr = attrs.OfType().FirstOrDefault(); + var displayNameAttr = attrs.OfType().FirstOrDefault(); + return displayNameAttr?.DisplayName ?? displayAttr?.Name ?? t.Name; + } + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + return value; + } + } +} diff --git a/ArkBot/Configuration/Validation/DirectoryExistsAttribute.cs b/ArkBot/Configuration/Validation/DirectoryExistsAttribute.cs new file mode 100644 index 0000000..cfd67aa --- /dev/null +++ b/ArkBot/Configuration/Validation/DirectoryExistsAttribute.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace ArkBot.Configuration.Validation +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public sealed class DirectoryExistsAttribute : IfValidationAttribute + { + protected override ValidationResult IsValid(object value, ValidationContext validationContext) + { + var result = IfMethodValid(value, validationContext); + if (result.Item1 != IfValidResult.ContinueValidation) return result.Item2; + return !string.IsNullOrWhiteSpace(value as string) && Directory.Exists(Environment.ExpandEnvironmentVariables((string) value)) + ? ValidationResult.Success + : new ValidationResult(String.Format(CultureInfo.CurrentCulture, ErrorMessageString, + validationContext.DisplayName ?? validationContext.MemberName), new [] { validationContext.MemberName }); + } + } +} diff --git a/ArkBot/Configuration/Validation/DirectoryPathIsValidAttribute.cs b/ArkBot/Configuration/Validation/DirectoryPathIsValidAttribute.cs new file mode 100644 index 0000000..0f17608 --- /dev/null +++ b/ArkBot/Configuration/Validation/DirectoryPathIsValidAttribute.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace ArkBot.Configuration.Validation +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public sealed class DirectoryPathIsValidAttribute : IfValidationAttribute + { + protected override ValidationResult IsValid(object value, ValidationContext validationContext) + { + var result = IfMethodValid(value, validationContext); + if (result.Item1 != IfValidResult.ContinueValidation) return result.Item2; + + var success = !string.IsNullOrEmpty(value as string); + if (success) + { + try + { + Path.GetFullPath(Environment.ExpandEnvironmentVariables((string)value)); + } + catch { success = false; } + } + + return success + ? ValidationResult.Success + : new ValidationResult(String.Format(CultureInfo.CurrentCulture, ErrorMessageString, + validationContext.DisplayName ?? validationContext.MemberName), new [] { validationContext.MemberName }); + } + } +} diff --git a/ArkBot/Configuration/Validation/FileExistsAttribute.cs b/ArkBot/Configuration/Validation/FileExistsAttribute.cs new file mode 100644 index 0000000..e2b9912 --- /dev/null +++ b/ArkBot/Configuration/Validation/FileExistsAttribute.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace ArkBot.Configuration.Validation +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public sealed class FileExistsAttribute : IfValidationAttribute + { + protected override ValidationResult IsValid(object value, ValidationContext validationContext) + { + var result = base.IfMethodValid(value, validationContext); + if (result.Item1 != IfValidResult.ContinueValidation) return result.Item2; + + return !string.IsNullOrWhiteSpace(value as string) && File.Exists(Environment.ExpandEnvironmentVariables((string) value)) + ? ValidationResult.Success + : new ValidationResult(String.Format(CultureInfo.CurrentCulture, ErrorMessageString, + validationContext.DisplayName ?? validationContext.MemberName), new [] { validationContext.MemberName }); + } + } +} diff --git a/ArkBot/Configuration/Validation/IfValidationAttribute.cs b/ArkBot/Configuration/Validation/IfValidationAttribute.cs new file mode 100644 index 0000000..24b0ea4 --- /dev/null +++ b/ArkBot/Configuration/Validation/IfValidationAttribute.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace ArkBot.Configuration.Validation +{ + public enum IfValidResult { NotValid, Valid, ContinueValidation } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public abstract class IfValidationAttribute : ValidationAttribute + { + public string IfMethod { get; set; } + + protected Tuple IfMethodValid(object value, ValidationContext validationContext) + { + if (IfMethod != null) + { + var ifMethodInfo = validationContext.ObjectType.GetMethod(IfMethod, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + if (ifMethodInfo == null) + return Tuple.Create(IfValidResult.NotValid, new ValidationResult( + $"IfMethod '{validationContext.ObjectType.Name}.{IfMethod}' could not be found!", new[] { validationContext.MemberName })); + + if (!(bool) ifMethodInfo.Invoke(validationContext.ObjectInstance, null)) + return Tuple.Create(IfValidResult.Valid, ValidationResult.Success); + } + + return Tuple.Create(IfValidResult.ContinueValidation, ValidationResult.Success); + } + } +} diff --git a/ArkBot/Configuration/Validation/MinLengthOptionalAttribute.cs b/ArkBot/Configuration/Validation/MinLengthOptionalAttribute.cs new file mode 100644 index 0000000..a5ed8a2 --- /dev/null +++ b/ArkBot/Configuration/Validation/MinLengthOptionalAttribute.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using RazorEngine.Compilation.ImpromptuInterface.InvokeExt; + +namespace ArkBot.Configuration.Validation +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public sealed class MinLengthOptionalAttribute : IfValidationAttribute + { + public bool Optional { get; set; } + + private MinLengthAttribute _attr; + + public MinLengthOptionalAttribute(int length) + { + _attr = new MinLengthAttribute(length); + } + + protected override ValidationResult IsValid(object value, ValidationContext validationContext) + { + if (Optional && value == null) return ValidationResult.Success; + + var result = IfMethodValid(value, validationContext); + if (result.Item1 != IfValidResult.ContinueValidation) return result.Item2; + + return _attr.IsValid(value) + ? ValidationResult.Success + : new ValidationResult(String.Format(CultureInfo.CurrentCulture, ErrorMessageString, + validationContext.DisplayName ?? validationContext.MemberName), new[] { validationContext.MemberName }); + } + } +} diff --git a/ArkBot/Configuration/Validation/RangeOptionalAttribute.cs b/ArkBot/Configuration/Validation/RangeOptionalAttribute.cs new file mode 100644 index 0000000..885e32f --- /dev/null +++ b/ArkBot/Configuration/Validation/RangeOptionalAttribute.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using RazorEngine.Compilation.ImpromptuInterface.InvokeExt; + +namespace ArkBot.Configuration.Validation +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public sealed class RangeOptionalAttribute : RangeAttribute + { + public bool Optional { get; set; } + + public RangeOptionalAttribute(int minimum, int maximum) : base(minimum, maximum) + { + } + + public override bool IsValid(object value) + { + if (Optional && value == null) return true; + + return base.IsValid(value); + } + + public override string FormatErrorMessage(string name) + { + return String.Format(CultureInfo.CurrentCulture, ErrorMessageString, name); + } + } +} diff --git a/ArkBot/Configuration/Validation/RegularExpressionCustomAttribute.cs b/ArkBot/Configuration/Validation/RegularExpressionCustomAttribute.cs new file mode 100644 index 0000000..3683764 --- /dev/null +++ b/ArkBot/Configuration/Validation/RegularExpressionCustomAttribute.cs @@ -0,0 +1,36 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.Globalization; +using System.Text.RegularExpressions; + +namespace ArkBot.Configuration.Validation +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)] + public sealed class RegularExpressionCustomAttribute : IfValidationAttribute + { + private object _typeId = new object(); + public override object TypeId => _typeId; + + public bool Optional { get; set; } + + private string _pattern; + + public RegularExpressionCustomAttribute(string pattern) + { + _pattern = pattern; + } + + protected override ValidationResult IsValid(object value, ValidationContext validationContext) + { + if (Optional && value == null) return ValidationResult.Success; + + var result = IfMethodValid(value, validationContext); + if (result.Item1 != IfValidResult.ContinueValidation) return result.Item2; + + return value != null && Regex.IsMatch(value as string, _pattern) + ? ValidationResult.Success + : new ValidationResult(String.Format(CultureInfo.CurrentCulture, ErrorMessageString, + validationContext.DisplayName ?? validationContext.MemberName), new[] { validationContext.MemberName }); + } + } +} diff --git a/ArkBot/Configuration/Validation/ValidUrlAttribute.cs b/ArkBot/Configuration/Validation/ValidUrlAttribute.cs new file mode 100644 index 0000000..ccf09b2 --- /dev/null +++ b/ArkBot/Configuration/Validation/ValidUrlAttribute.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using RazorEngine.Compilation.ImpromptuInterface.InvokeExt; + +namespace ArkBot.Configuration.Validation +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public sealed class ValidUrlAttribute : ValidationAttribute + { + public bool Optional { get; set; } + + public override bool IsValid(object value) + { + if (!(value is string)) return false; + if (Optional && string.IsNullOrEmpty((string) value)) return true; + + return Uri.TryCreate((string) value, UriKind.Absolute, out var uriResult) && + (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps); + } + + public override string FormatErrorMessage(string name) + { + return String.Format(CultureInfo.CurrentCulture, ErrorMessageString, name); + } + } +} diff --git a/ArkBot/Configuration/Validation/ValidateCollectionAttribute.cs b/ArkBot/Configuration/Validation/ValidateCollectionAttribute.cs new file mode 100644 index 0000000..34fe477 --- /dev/null +++ b/ArkBot/Configuration/Validation/ValidateCollectionAttribute.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using RazorEngine.Compilation.ImpromptuInterface.InvokeExt; + +namespace ArkBot.Configuration.Validation +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public sealed class ValidateCollectionAttribute : ValidationAttribute + { + + public ValidateCollectionAttribute() : base() + { + } + + public override bool IsValid(object value) + { + if (value is System.Collections.ICollection) + { + var collection = value as System.Collections.ICollection; + foreach (var item in collection) + { + var ei = item as INotifyDataErrorInfo; + if (ei == null || !ei.HasErrors) continue; + + return false; + } + } + + return true; + } + + public override string FormatErrorMessage(string name) + { + return String.Format(CultureInfo.CurrentCulture, ErrorMessageString, name); + } + } +} diff --git a/ArkBot/Configuration/Validation/ValidateExpandableAttribute.cs b/ArkBot/Configuration/Validation/ValidateExpandableAttribute.cs new file mode 100644 index 0000000..94b39f4 --- /dev/null +++ b/ArkBot/Configuration/Validation/ValidateExpandableAttribute.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using RazorEngine.Compilation.ImpromptuInterface.InvokeExt; + +namespace ArkBot.Configuration.Validation +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public sealed class ValidateExpandableAttribute : ValidationAttribute + { + + public ValidateExpandableAttribute() : base() + { + } + + public override bool IsValid(object value) + { + var ei = value as INotifyDataErrorInfo; + if (ei == null) return true; + + var fi = value.GetType().GetField("validationTemplate", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); + (fi?.GetValue(value) as ArkBot.Configuration.Validation.ValidationTemplate)?.Validate(); + + if (!ei.HasErrors) return true; + + return false; + } + + public override string FormatErrorMessage(string name) + { + return String.Format(CultureInfo.CurrentCulture, ErrorMessageString, name); + } + } +} diff --git a/ArkBot/Configuration/Validation/ValidationTemplate.cs b/ArkBot/Configuration/Validation/ValidationTemplate.cs new file mode 100644 index 0000000..eb3b738 --- /dev/null +++ b/ArkBot/Configuration/Validation/ValidationTemplate.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ArkBot.Configuration.Validation +{ + public class ValidationTemplate : /*IDataErrorInfo,*/ INotifyDataErrorInfo + { + private readonly INotifyPropertyChanged _target; + readonly ValidationContext _validationContext; + readonly List _validationResults; + + public ValidationTemplate(INotifyPropertyChanged target) + { + this._target = target; + _validationContext = new ValidationContext(target, null, null); + _validationResults = new List(); + Validator.TryValidateObject(target, _validationContext, _validationResults, true); + target.PropertyChanged += target_PropertyChanged; + } + + void target_PropertyChanged(object sender, PropertyChangedEventArgs e) + { + Validate(); + } + + public void Validate() + { + _validationResults.Clear(); + Validator.TryValidateObject(_target, _validationContext, _validationResults, true); + + var hashSet = new HashSet(_validationResults.SelectMany(x => x.MemberNames)); + foreach (var error in hashSet) + { + RaiseErrorsChanged(error); + } + } + + public IEnumerable GetErrors(string propertyName) + { + return _validationResults.Where(x => x.MemberNames.Contains(propertyName)) + .Select(x => x.ErrorMessage); + } + + public bool HasErrors => _validationResults.Count > 0; + + public string Error + { + get + { + var strings = _validationResults.Select(x => x.ErrorMessage) + .ToArray(); + return string.Join(Environment.NewLine, strings); + } + } + + public string this[string propertyName] + { + get + { + var strings = _validationResults.Where(x => x.MemberNames.Contains(propertyName)) + .Select(x => x.ErrorMessage) + .ToArray(); + return string.Join(Environment.NewLine, strings); + } + } + + public event EventHandler ErrorsChanged; + + void RaiseErrorsChanged(string propertyName) + { + ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName)); + } + } +} diff --git a/ArkBot/Constants.cs b/ArkBot/Constants.cs index bfa32e6..cef1e44 100644 --- a/ArkBot/Constants.cs +++ b/ArkBot/Constants.cs @@ -25,6 +25,8 @@ public string DatabaseFilePath private string _databaseFilePath => "|DataDirectory|Database\\Database.sdf"; public string DatabaseConnectionString => $"Data Source={_databaseFilePath};Max Database Size=4091"; public string OpenidresponsetemplatePath => @"Resources\openidresponse.html"; + public string ConfigurationHelpTemplatePath => @"Resources\configurationHelp.html"; + public string AboutTemplatePath => @"Resources\about.html"; public string SavedStateFilePath => "savedstate.json"; public string ArkServerProcessName => "ShooterGameServer"; } diff --git a/ArkBot/Controls/About.xaml b/ArkBot/Controls/About.xaml new file mode 100644 index 0000000..a5e07a7 --- /dev/null +++ b/ArkBot/Controls/About.xaml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + diff --git a/ArkBot/Controls/About.xaml.cs b/ArkBot/Controls/About.xaml.cs new file mode 100644 index 0000000..e46f5dd --- /dev/null +++ b/ArkBot/Controls/About.xaml.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using ArkBot.Browser; +using ArkBot.Configuration; +using ArkBot.Helpers; +using ArkBot.ViewModel; +using CefSharp; +using Markdig; +using Nito.AsyncEx; +using RazorEngine.Configuration; +using RazorEngine.Templating; +using Xceed.Wpf.Toolkit.PropertyGrid; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Controls +{ + /// + /// Interaction logic for About.xaml + /// + public partial class About : UserControl + { + public static readonly DependencyProperty ModelProperty = DependencyProperty.Register("Model", typeof(AboutViewModel), typeof(About), new FrameworkPropertyMetadata()); + + public AboutViewModel Model + { + get { return GetValue(ModelProperty) as AboutViewModel; } + set { SetValue(ModelProperty, value); } + } + + public About() + { + InitializeComponent(); + + AboutBrowser.IsBrowserInitializedChanged += AboutBrowser_IsBrowserInitializedChanged; + var reqHandler = new RequestEventHandler(); + reqHandler.OnBeforeBrowseEvent += ReqHandler_OnBeforeBrowseEvent; + AboutBrowser.RequestHandler = reqHandler; + } + + private void ReqHandler_OnBeforeBrowseEvent(object sender, Browser.EventArgs.OnBeforeBrowseEventArgs e) + { + if (e.Request.Url.Equals("http://tmp/", StringComparison.OrdinalIgnoreCase)) return; + else if (e.Request.Url.StartsWith("navigate://", StringComparison.OrdinalIgnoreCase)) + { + var r = new Regex(@"^navigate://(?.+)$"); + var to = r.Match(e.Request.Url)?.Groups["to"].Value; + if(!string.IsNullOrWhiteSpace(to)) + { + switch(to.ToLower()) + { + case "configuration": + Workspace.Instance.Configuration.IsActive = true; + break; + } + } + + e.CancelNavigation = true; + return; + } + + e.CancelNavigation = true; + Process.Start(e.Request.Url); + } + + private async void AboutBrowser_IsBrowserInitializedChanged(object sender, DependencyPropertyChangedEventArgs e) + { + if ((bool) e.NewValue) + { + // Note: For these to work, make sure Address is not set in Browser Control + string html = await Model.RunCompileTemplate(new AboutViewModel.AboutTemplateViewModel { hasConfig = Model.HasValidConfig }); + AboutBrowser.LoadHtml(html, "http://tmp/"); + } + } + } +} diff --git a/ArkBot/Controls/Configuration.xaml b/ArkBot/Controls/Configuration.xaml new file mode 100644 index 0000000..66c59e6 --- /dev/null +++ b/ArkBot/Controls/Configuration.xaml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ArkBot/Controls/Configuration.xaml.cs b/ArkBot/Controls/Configuration.xaml.cs new file mode 100644 index 0000000..062e862 --- /dev/null +++ b/ArkBot/Controls/Configuration.xaml.cs @@ -0,0 +1,458 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Diagnostics; +using System.Linq; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Interactivity; +using ArkBot.Browser; +using ArkBot.Configuration; +using ArkBot.Extensions; +using ArkBot.Helpers; +using ArkBot.ViewModel; +using CefSharp; +using Markdig; +using Nito.AsyncEx; +using RazorEngine.Configuration; +using RazorEngine.Templating; +using Xceed.Wpf.Toolkit; +using Xceed.Wpf.Toolkit.PropertyGrid; +using Xceed.Wpf.Toolkit.PropertyGrid.Editors; + +namespace ArkBot.Controls +{ + /// + /// Interaction logic for Configuration.xaml + /// + public partial class Configuration : UserControl + { + public static readonly DependencyProperty ModelProperty = DependencyProperty.Register("Model", typeof(ConfigurationViewModel), typeof(Configuration), new FrameworkPropertyMetadata()); + + public static readonly DependencyProperty SelectedObjectProperty = DependencyProperty.Register("SelectedObject", typeof(object), typeof(Configuration), new UIPropertyMetadata(null /*, new PropertyChangedCallback(Configuration.OnSelectedObjectChanged)*/)); + + public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register("IsReadOnly", typeof(bool), typeof(Configuration), new UIPropertyMetadata(false)); + + //public static readonly RoutedEvent SelectedObjectChangedEvent = EventManager.RegisterRoutedEvent("SelectedObjectChanged", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(Configuration)); + + public ConfigurationViewModel Model + { + get { return GetValue(ModelProperty) as ConfigurationViewModel; } + set { SetValue(ModelProperty, value); } + } + + public object SelectedObject + { + get { return GetValue(SelectedObjectProperty); } + set { SetValue(SelectedObjectProperty, value); } + } + + public bool IsReadOnly + { + get { return (bool)GetValue(IsReadOnlyProperty); } + set { SetValue(IsReadOnlyProperty, value); } + } + + private bool _propSelected = false; + private PropertyItem _summaryBrowserSelectedProp; + + public Configuration() + { + //todo: must fix collection validation callback (it probably does not work for collection that are inside expandable sections) + //todo: must make expandable sections show validation messages from ValidateExpandableAttribute where they contain fields that are invalid + + InitializeComponent(); + + PART_PropertyGrid.SelectedObjectChanged += ConfigurationPropertyGrid_SelectedObjectChanged; + PART_PropertyGrid.PropertyValueChanged += ConfigurationPropertyGrid_PropertyValueChanged; + PART_PropertyGrid.SelectedPropertyItemChanged += ConfigurationPropertyGrid_SelectedPropertyItemChanged; + PART_PropertyGrid.LayoutUpdated += PART_PropertyGrid_LayoutUpdated; + PART_PropertyGrid.PropertyChanged += PART_PropertyGrid_PropertyChanged; + + SummaryBrowser.IsBrowserInitializedChanged += SummaryBrowser_IsBrowserInitializedChanged; + var reqHandler = new RequestEventHandler(); + reqHandler.OnBeforeBrowseEvent += ReqHandler_OnBeforeBrowseEvent; + SummaryBrowser.RequestHandler = reqHandler; + + //SelectedObject = "{Binding SelectedItem, RelativeSource={RelativeSource TemplatedParent}}" + //IsReadOnly = "{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" + + //var myBinding = new System.Windows.Data.Binding("SelectedItem"); + //myBinding.Source = Model; + //PART_PropertyGrid.SetBinding(PropertyGrid.SelectedObjectProperty, myBinding); + } + + private async void PART_PropertyGrid_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) + { + if (e.PropertyName.Equals("Filter")) + { + await UpdateValidation(); + } + } + + //private int _selectedObjectChangedCounter = 0; + //private int _lastLayoutUpdatedForSelectedObjectChangedCounter = 0; + + private void PART_PropertyGrid_LayoutUpdated(object sender, EventArgs e) + { + //var grids = PART_PropertyGrid.FindVisualChildrenWithPath("PropertyItem/Border/Grid").ToArray(); + //if (grids == null) return; + //foreach(var grid in grids) + //{ + // var binding = new Binding() + // { + // Source = grid.ColumnDefinitions[0], + // Path = new PropertyPath("Width"), + // Mode = BindingMode.OneWay, + // }; + + // grid.ColumnDefinitions[0].SetBinding(MaxWidthProperty, binding); + //} + + //this does not work with sorting options + //if (_selectedObjectChangedCounter > _lastLayoutUpdatedForSelectedObjectChangedCounter) + //{ + //var expandSites = PART_PropertyGrid.FindVisualChildrenWithPath("Expander[expander]/Grid/Border[ExpandSite]"); + //foreach (var exp in expandSites) + //{ + // exp.Padding = new Thickness(exp.Padding.Left, exp.Padding.Top, 23, exp.Padding.Bottom); //add some padding on the right side to make room for validation adorners + //} + + //var expandSites = PART_PropertyGrid.FindVisualChildrenWithPath("PropertyItem/Border"); + //foreach (var exp in expandSites) + //{ + // exp.Padding = new Thickness(exp.Padding.Left, exp.Padding.Top, 23, exp.Padding.Bottom); //add some padding on the right side to make room for validation adorners + //} + + //var expandSites = PART_PropertyGrid.FindVisualChildrenWithPath("PropertyItemsControl[PART_PropertyItemsControl]/Border/ScrollViewer/Grid/ScrollContentPresenter/ItemsPresenter/VirtualizingStackPanel"); + //foreach (var exp in expandSites) + //{ + // exp.Margin = new Thickness(exp.Margin.Left, exp.Margin.Top, 23, exp.Margin.Bottom); //add some margin on the right side to make room for validation adorners + //} + + //_lastLayoutUpdatedForSelectedObjectChangedCounter = _selectedObjectChangedCounter; + //} + } + + //private static void OnSelectedObjectChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) + //{ + // var grid = o as PropertyGrid; + // if (grid != null) + // { + // //protected virtual void OnSelectedObjectChanged(object oldValue, object newValue) + // var mi = typeof(PropertyGrid).GetMethod("OnSelectedObjectChanged", BindingFlags.Instance | BindingFlags.NonPublic); + // if (mi != null) + // { + // mi.Invoke(grid, new[] { e.OldValue, e.NewValue }); + // } + // //grid.OnSelectedObjectChanged(e.OldValue, e.NewValue); + // } + //} + + + private async void ConfigurationPropertyGrid_SelectedObjectChanged(object sender, RoutedPropertyChangedEventArgs e) + { + //_selectedObjectChangedCounter++; + + // without this recursive collection validation errors do not get set + await UpdateValidation(trigger: true); + + _propSelected = SelectFirstProp(); + } + + private bool SelectFirstProp() + { + if (!SummaryBrowser.IsBrowserInitialized) return false; + + var prop = PART_PropertyGrid.Properties?.Cast().FirstOrDefault(); + if (prop == null) return false; + + PART_PropertyGrid.SelectedProperty = prop; + + return true; + } + + private void ReqHandler_OnBeforeBrowseEvent(object sender, Browser.EventArgs.OnBeforeBrowseEventArgs e) + { + if (e.Request.Url.Equals("http://tmp/", StringComparison.OrdinalIgnoreCase)) return; + else if (e.Request.Url.StartsWith("navigate://", StringComparison.OrdinalIgnoreCase)) + { + var r = new Regex(@"^navigate://(?.+)$"); + var to = r.Match(e.Request.Url)?.Groups["to"].Value; + if (!string.IsNullOrWhiteSpace(to)) + { + switch (to.ToLower()) + { + case "restore-default-value": + PART_PropertyGrid.Dispatcher.Invoke(new Action(() => { + var defaultAttr = _summaryBrowserSelectedProp?.PropertyDescriptor.Attributes.OfType().FirstOrDefault(); + if (defaultAttr != null) _summaryBrowserSelectedProp.Value = defaultAttr.Value; + })); + + break; + } + } + + e.CancelNavigation = true; + return; + } + + e.CancelNavigation = true; + Process.Start(e.Request.Url); + } + + private async void ConfigurationPropertyGrid_SelectedPropertyItemChanged(object sender, RoutedPropertyChangedEventArgs e) + { + await UpdateBrowser(); + } + + private async Task UpdateBrowser() + { + var prop = PART_PropertyGrid.SelectedPropertyItem as PropertyItem; + if (SummaryBrowser.IsBrowserInitialized && prop != null) + { + _summaryBrowserSelectedProp = prop; + var attr = prop.PropertyDescriptor.Attributes.OfType().FirstOrDefault(); + var defaultAttr = prop.PropertyDescriptor.Attributes.OfType().FirstOrDefault(); + var remarks = attr?.Remarks != null ? Markdown.ToHtml(attr.Remarks) : null; + var instructions = attr?.Instructions != null ? Markdown.ToHtml(attr.Instructions) : null; + var example = attr?.Example != null ? Markdown.ToHtml(attr.Example) : null; + var defaultValue = defaultAttr?.Value != null ? defaultAttr.Value.ToString() : null; + var desc = prop.GetBindingExpression(PropertyItem.ValueProperty)?.DataItem as DependencyObject; + var html = await Model.RunCompileTemplate(new ConfigurationViewModel.HelpTemplateViewModel + { + displayName = prop.DisplayName, + description = prop.Description, + remarks = remarks, + instructions = instructions, + example = example, + defaultValue = defaultValue, + validationError = desc != null ? Validation.GetHasError(desc) ? Validation.GetErrors(desc)[0]?.ErrorContent.ToString() : null : null + }); + + //if (Validation.GetHasError(descriptor)) + //{ + // var errors = Validation.GetErrors(descriptor); + // Validation.MarkInvalid(be, errors[0]); + //} + + SummaryBrowser.LoadHtml(html, "http://tmp/"); + } + } + + private void SummaryBrowser_IsBrowserInitializedChanged(object sender, DependencyPropertyChangedEventArgs e) + { + if ((bool) e.NewValue) + { + if (!_propSelected) _propSelected = SelectFirstProp(); + + // Note: For these to work, make sure Address is not set in Browser Control + //SummaryBrowser.LoadHtml("Test

Html Encoded in URL 2!

", "http://tmp/"); + + //SummaryBrowser.Load("about:blank"); + //SummaryBrowser.LoadString(@"Test

Html Encoded in URL 2!

", "http://tmp/"); + } + } + + /// + /// PropertyGrid only updates validation for the PropertyItem that was changed by default. This is a way to force it to update all properties in order to support dependencies. PropertyGrid is built for .NET 4 and does not support the ValidatesOnNotifyDataErrors binding property. + /// + private async void ConfigurationPropertyGrid_PropertyValueChanged(object sender, Xceed.Wpf.Toolkit.PropertyGrid.PropertyValueChangedEventArgs e) + { + var modifiedPropertyItem = e.OriginalSource as PropertyItem; + if (modifiedPropertyItem != null) + { + await UpdateValidation(modifiedPropertyItem, true); + } + } + + internal async Task UpdateValidation(PropertyItem modifiedPropertyItem = null, bool trigger = false) + { + // trigger a full revalidation + if (trigger && PART_PropertyGrid?.SelectedObject != null) + { + var fi = PART_PropertyGrid?.SelectedObject.GetType().GetField("validationTemplate", BindingFlags.Instance | BindingFlags.NonPublic); + (fi?.GetValue(PART_PropertyGrid?.SelectedObject) as ArkBot.Configuration.Validation.ValidationTemplate)?.Validate(); + } + + if (PART_PropertyGrid?.Properties == null) return; + + UpdateRecursive(modifiedPropertyItem, PART_PropertyGrid.Properties.Cast()); + + await UpdateBrowser(); + } + + private void UpdateRecursive(PropertyItem modifiedPropertyItem, IEnumerable properties) + { + foreach (var prop in properties) + { + if (prop == modifiedPropertyItem) continue; + + var be = prop.GetBindingExpression(PropertyItem.ValueProperty); + if (be != null) + { + be.UpdateSource(); + SetRedInvalidBorder(be); + } + + if (prop.IsExpandable) + { + UpdateRecursive(modifiedPropertyItem, prop.Properties.Cast()); + } + //if (prop.Editor is CollectionControlButton && prop.Value is System.Collections.ICollection) + //{ + // var collection = prop.Value as System.Collections.ICollection; + // foreach (var item in collection) + // { + // var validationContext = new ValidationContext(item, null, null); + // var validationResults = new List(); + // Validator.TryValidateObject(item, validationContext, validationResults, true); + // var r = validationResults.FirstOrDefault(); + // if (r != null) + // { + // Validation.MarkInvalid(be, new ValidationError(new DataErrorValidationRule(), be, r.ErrorMessage, null)); + // break; + // } + // } + //} + } + } + + internal void SetRedInvalidBorder(BindingExpression be) + { + if ((be != null) && IsBaseTypeName("DescriptorPropertyDefinitionBase", be.DataItem.GetType().BaseType)) + { + var descriptor = be.DataItem as DependencyObject; + if (Validation.GetHasError(descriptor)) + { + var errors = Validation.GetErrors(descriptor); + Validation.MarkInvalid(be, errors[0]); + } + } + } + + //internal List ValidationGetErrors(DependencyObject descriptor) + //{ + // var result = new List(); + + // if (Validation.GetHasError(descriptor)) + // { + // result.AddRange(Validation.GetErrors(descriptor)); + // } + + // if(descriptor.) + + // return null; + //} + + internal bool IsBaseTypeName(string name, Type t) + { + if (t == null) return false; + if (t.Name.Equals(name)) return true; + + return IsBaseTypeName(name, t.BaseType); + } + } + + // Fix ScrollViewer stealing mouse wheel events preventing the PropertyGrid from scrolling in ExpandableProperties + public static class BubbleScrollBehavior + { + public static readonly DependencyProperty BubbleScrollProperty = + DependencyProperty.RegisterAttached("BubbleScroll", typeof(bool), typeof(BubbleScrollBehavior), new PropertyMetadata(false, BubbleScrollPropertyChanged)); + + + public static void BubbleScrollPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) + { + var e = obj as UIElement; + if (e != null && (bool)args.NewValue) + { + e.PreviewMouseWheel += AssociatedObject_PreviewMouseWheel; + } + else + { + e.PreviewMouseWheel -= AssociatedObject_PreviewMouseWheel; + } + } + + private static void AssociatedObject_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e) + { + if (sender is ScrollViewer && !e.Handled) + { + e.Handled = true; + var eventArg = new System.Windows.Input.MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta); + eventArg.RoutedEvent = UIElement.MouseWheelEvent; + eventArg.Source = sender; + var parent = ((Control)sender).Parent as UIElement; + parent.RaiseEvent(eventArg); + } + } + + public static bool GetBubbleScroll(DependencyObject obj) + { + return (bool)obj.GetValue(BubbleScrollProperty); + } + + public static void SetBubbleScroll(DependencyObject obj, bool value) + { + obj.SetValue(BubbleScrollProperty, value); + } + } + + class IsPropertyGridConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + var control = value as DependencyObject; + if (value == null) return false; + var result = control.FindVisualParents().Take(2).Any(x => x is PropertyItemBase); + + return result; + } + + public object ConvertBack(object value, Type targetType, object parameter + , System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + } + + public static class SetGridColumnBehavior + { + public static readonly DependencyProperty SetGridColumnProperty = + DependencyProperty.RegisterAttached("SetGridColumn", typeof(bool), typeof(SetGridColumnBehavior), new PropertyMetadata(false, SetGridColumnPropertyChanged)); + + + public static void SetGridColumnPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) + { + var e = obj as Grid; + if (e != null && (bool)args.NewValue) + { + var b = new Binding(); + b.RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, + typeof(PropertyGrid), 1); + b.Path = new PropertyPath("NameColumnWidth"); + + BindingOperations.SetBinding(e.ColumnDefinitions[0], ColumnDefinition.MaxWidthProperty, b); + //e.ColumnDefinitions[0].MinWidth = 200; //not working - grip bugged and unusable after resizing + } + } + + public static bool GetSetGridColumn(DependencyObject obj) + { + return (bool)obj.GetValue(SetGridColumnProperty); + } + + public static void SetSetGridColumn(DependencyObject obj, bool value) + { + obj.SetValue(SetGridColumnProperty, value); + } + } +} diff --git a/ArkBot/Data/ArkSpeciesStats.cs b/ArkBot/Data/ArkSpeciesStats.cs index c471ddf..90e9149 100644 --- a/ArkBot/Data/ArkSpeciesStats.cs +++ b/ArkBot/Data/ArkSpeciesStats.cs @@ -1,4 +1,5 @@ -using ArkBot.Helpers; +using ArkBot.Configuration.Model; +using ArkBot.Helpers; using Newtonsoft.Json; using System; using System.Collections.Generic; diff --git a/ArkBot/Discord/ArkDiscordBot.cs b/ArkBot/Discord/ArkDiscordBot.cs index 2971d8e..df91315 100644 --- a/ArkBot/Discord/ArkDiscordBot.cs +++ b/ArkBot/Discord/ArkDiscordBot.cs @@ -6,7 +6,6 @@ using Discord; using Discord.WebSocket; using Discord.Commands; -using Google.Apis.Urlshortener.v1; using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -26,9 +25,9 @@ using ArkBot.Ark; using ArkBot.Discord.Command; using ArkBot.Voting; -using Discord.WebSocket; using RazorEngine.Compilation.ImpromptuInterface; using VDS.Common.Collections.Enumerations; +using ArkBot.Configuration.Model; namespace ArkBot.Discord { @@ -86,12 +85,12 @@ public ArkDiscordBot( private async Task DiscordOnGuildAvailable(SocketGuild socketGuild) { - if (_wasRestarted && socketGuild != null && !string.IsNullOrWhiteSpace(_config.AnnouncementChannel) && !_wasRestartedServersNotified.Contains(socketGuild.Id)) + if (_wasRestarted && socketGuild != null && !string.IsNullOrWhiteSpace(_config.Discord.AnnouncementChannel) && !_wasRestartedServersNotified.Contains(socketGuild.Id)) { try { _wasRestartedServersNotified.Add(socketGuild.Id); - var channel = socketGuild.TextChannels.FirstOrDefault(y => _config.AnnouncementChannel.Equals(y.Name, StringComparison.OrdinalIgnoreCase)); + var channel = socketGuild.TextChannels.FirstOrDefault(y => _config.Discord.AnnouncementChannel.Equals(y.Name, StringComparison.OrdinalIgnoreCase)); if (channel != null) await channel.SendMessageAsync("**I have automatically restarted due to previous unexpected shutdown!**"); } catch (Exception ex) { /*ignore exceptions */ } @@ -132,8 +131,8 @@ private async Task HandleCommandAsync(SocketMessage messageParam) //check if command is allowed in this channel if(!(context.Channel is ISocketPrivateChannel) - && _config.EnabledChannels?.Length > 0 - && !_config.EnabledChannels.Contains(context.Channel.Name, StringComparer.OrdinalIgnoreCase)) + && _config.Discord.EnabledChannels?.Length > 0 + && !_config.Discord.EnabledChannels.Contains(context.Channel.Name, StringComparer.OrdinalIgnoreCase)) { return; } @@ -141,6 +140,8 @@ private async Task HandleCommandAsync(SocketMessage messageParam) var preconditions = await cm.CheckPreconditionsAsync(context, _serviceProvider); if (!preconditions.IsSuccess) { + if (preconditions.ErrorReason?.Equals(RoleRestrictedPreconditionAttribute.CommandDisabledErrorString) == true) return; + Logging.Log( $"Command precondition(s) failed [command name: {iCommand.Name}, preconditions error: {preconditions.ErrorReason}]", GetType(), LogLevel.DEBUG); @@ -395,7 +396,7 @@ public async Task Initialize(CancellationToken token, bool skipExtract = false) public async Task Start(ArkSpeciesAliases aliases = null) { - await _discord.LoginAsync(TokenType.Bot, _config.BotToken); + await _discord.LoginAsync(TokenType.Bot, _config.Discord.BotToken); await _discord.StartAsync(); //await _discord.Connect(_config.BotToken, TokenType.Bot); diff --git a/ArkBot/Discord/Command/RoleRestrictedPreconditionAttribute.cs b/ArkBot/Discord/Command/RoleRestrictedPreconditionAttribute.cs index 8eea0f2..c894956 100644 --- a/ArkBot/Discord/Command/RoleRestrictedPreconditionAttribute.cs +++ b/ArkBot/Discord/Command/RoleRestrictedPreconditionAttribute.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using ArkBot.Configuration.Model; using Discord.Commands; using Discord.WebSocket; @@ -10,6 +11,8 @@ namespace ArkBot.Discord.Command { public class RoleRestrictedPreconditionAttribute : PreconditionAttribute { + internal const string CommandDisabledErrorString = "Command disabled"; + public string AccessControlName { get; set; } public RoleRestrictedPreconditionAttribute(string accessControlName) @@ -42,12 +45,12 @@ public override async Task CheckPermissions(ICommandContext roles = roles.Distinct().ToList(); - var hasFeatureAccess = - HasFeatureAccess(config, "commands", AccessControlName, roles.ToArray()); - if (!hasFeatureAccess) + var froles = GetFeatureRoles(config, "commands", AccessControlName); + if (!(froles?.Length > 0)) return PreconditionResult.FromError(CommandDisabledErrorString); + if (!HasFeatureAccess(froles, roles.ToArray())) return PreconditionResult.FromError("The user does not have access to this command!"); - var croles = GetFeatureRoles(config, "commands", AccessControlName)?.Intersect(roles).ToArray() ?? + var croles = froles?.Intersect(roles).ToArray() ?? new string[] { }; var proles = GetFeatureRoles(config, "channels", @@ -65,10 +68,9 @@ public override async Task CheckPermissions(ICommandContext } } - private bool HasFeatureAccess(IConfig config, string featureGroup, string featureName, string[] roles) + private bool HasFeatureAccess(string[] featureRoles, string[] userRoles) { - var rf = GetFeatureRoles(config, featureGroup, featureName); - return rf != null && rf.Intersect(roles, StringComparer.OrdinalIgnoreCase).Any(); + return featureRoles != null && featureRoles.Intersect(userRoles, StringComparer.OrdinalIgnoreCase).Any(); } private string[] GetFeatureRoles(IConfig config, string featureGroup, string featureName) @@ -80,7 +82,7 @@ private string[] GetFeatureRoles(IConfig config, string featureGroup, string fea if (accessControl == null) return null; if (!accessControl.TryGetValue(featureGroup, out var fg)) return null; - return !fg.TryGetValue(featureName, out var rf) ? null : rf; + return !fg.TryGetValue(featureName, out var rf) ? null : rf.ToArray(); } } } diff --git a/ArkBot/Discord/DiscordManager.cs b/ArkBot/Discord/DiscordManager.cs index b225f5c..27c5ccb 100644 --- a/ArkBot/Discord/DiscordManager.cs +++ b/ArkBot/Discord/DiscordManager.cs @@ -8,6 +8,7 @@ using System.Text; using System.Threading.Tasks; using Discord.WebSocket; +using ArkBot.Configuration.Model; namespace ArkBot.Discord { @@ -36,7 +37,7 @@ public async Task SendTextMessageToChannelNameOnAllServers(string channelName, s public async Task EditChannelByNameOnAllServers(string infoTopicChannel, string name = null, string topic = null, int? position = null) { - var channels = _discord.Guilds.Select(x => x.TextChannels.FirstOrDefault(y => _config.InfoTopicChannel.Equals(y.Name, StringComparison.OrdinalIgnoreCase))).Where(x => x != null); + var channels = _discord.Guilds.Select(x => x.TextChannels.FirstOrDefault(y => _config.Discord.InfoTopicChannel.Equals(y.Name, StringComparison.OrdinalIgnoreCase))).Where(x => x != null); foreach (var channel in channels) { await channel.ModifyAsync(g => diff --git a/ArkBot/Extensions/DependencyObjectExtensions.cs b/ArkBot/Extensions/DependencyObjectExtensions.cs new file mode 100644 index 0000000..2f12269 --- /dev/null +++ b/ArkBot/Extensions/DependencyObjectExtensions.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Windows; + +namespace ArkBot.Extensions +{ + public static class DependencyObjectExtensions + { + public static IEnumerable FindVisualChildrenWithPath(this DependencyObject depObj, string path) where T : DependencyObject + { + if (path == null || depObj == null) yield break; + + var r = new Regex(@"^(?.+?)(?:\[(?.+?)\])?$", RegexOptions.Singleline | RegexOptions.IgnoreCase); + var segments = path.Split('/').Select(x => + { + var m = r.Match(x); + return Tuple.Create(m?.Groups["type"].Value, m?.Groups["name"].Value); + }).ToArray(); + + foreach (var item in FindVisualChildrenWithPathInternal(depObj, segments)) + { + yield return item; + } + } + + private static IEnumerable FindVisualChildrenWithPathInternal(this DependencyObject depObj, Tuple[] path, int currentIndex = 0) where T : DependencyObject + { + if (depObj == null || !(path?.Length > 0)) yield break; + + for (int i = 0; i < System.Windows.Media.VisualTreeHelper.GetChildrenCount(depObj); i++) + { + DependencyObject child = System.Windows.Media.VisualTreeHelper.GetChild(depObj, i); + if (child?.GetType().Name.Equals(path[currentIndex].Item1) == true + && (path[currentIndex].Item2 == null || (child as FrameworkElement)?.Name.Equals(path[currentIndex].Item2) == true)) + { + if (currentIndex == path.Length - 1) yield return child as T; + else + { + foreach (T childOfChild in FindVisualChildrenWithPathInternal(child, path, currentIndex + 1)) + { + yield return childOfChild; + } + } + } + else + { + foreach (T childOfChild in FindVisualChildrenWithPathInternal(child, path, 0)) + { + yield return childOfChild; + } + } + } + } + + public static IEnumerable FindVisualChildren(this DependencyObject depObj) where T : DependencyObject + { + if (depObj != null) + { + for (int i = 0; i < System.Windows.Media.VisualTreeHelper.GetChildrenCount(depObj); i++) + { + DependencyObject child = System.Windows.Media.VisualTreeHelper.GetChild(depObj, i); + if (child != null && child is T) + { + yield return (T)child; + } + + foreach (T childOfChild in FindVisualChildren(child)) + { + yield return childOfChild; + } + } + } + } + + public static IEnumerable FindVisualParents(this DependencyObject depObj) + { + if (depObj != null) + { + + DependencyObject parent = System.Windows.Media.VisualTreeHelper.GetParent(depObj); + if (parent != null) + { + yield return parent; + } + + foreach (var parentOfParent in FindVisualParents(parent)) + { + yield return parentOfParent; + } + } + } + } +} diff --git a/ArkBot/FodyWeavers.xml b/ArkBot/FodyWeavers.xml index 0227a5d..f33a4e2 100644 --- a/ArkBot/FodyWeavers.xml +++ b/ArkBot/FodyWeavers.xml @@ -1,4 +1,5 @@ - + + \ No newline at end of file diff --git a/ArkBot/Helpers/ArkDataHelper.cs b/ArkBot/Helpers/ArkDataHelper.cs index e2c0207..e15c3e9 100644 --- a/ArkBot/Helpers/ArkDataHelper.cs +++ b/ArkBot/Helpers/ArkDataHelper.cs @@ -1,4 +1,5 @@ -using ArkBot.Data; +using ArkBot.Configuration.Model; +using ArkBot.Data; using System; using System.Collections.Generic; using System.Linq; diff --git a/ArkBot/Helpers/WebApiHelper.cs b/ArkBot/Helpers/WebApiHelper.cs index e7b7b87..27f1e28 100644 --- a/ArkBot/Helpers/WebApiHelper.cs +++ b/ArkBot/Helpers/WebApiHelper.cs @@ -1,4 +1,5 @@ -using ArkBot.WebApi.Model; +using ArkBot.Configuration.Model; +using ArkBot.WebApi.Model; using System; using System.Collections.Generic; using System.Linq; @@ -23,7 +24,11 @@ public static UserViewModel GetUser(ClaimsPrincipal authuser, IConfig config) { var name = authuser?.FindFirst("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name")?.Value; var steamId = authuser?.FindFirst("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier")?.Value; - if (steamId != null) steamId = steamId.Replace("http://steamcommunity.com/openid/id/", ""); + if (steamId != null) + { + steamId = steamId.Replace("http://steamcommunity.com/openid/id/", ""); + steamId = steamId.Replace("https://steamcommunity.com/openid/id/", ""); + } if (authuser != null) { @@ -47,7 +52,7 @@ public static UserViewModel GetUser(ClaimsPrincipal authuser, IConfig config) public static string[] GetRolesForUser(IConfig config, string steamId) { - var roles = (!string.IsNullOrEmpty(steamId) ? config.UserRoles?.Where(x => x.Value?.Contains(steamId) == true).Select(x => x.Key).ToList() : null) ?? new List(); + var roles = (!string.IsNullOrEmpty(steamId) ? config.UserRoles?.Where(x => x.SteamIds?.Contains(steamId) == true).Select(x => x.Role).ToList() : null) ?? new List(); //default roles roles.Add("guest"); diff --git a/ArkBot/IConfig.cs b/ArkBot/IConfig.cs deleted file mode 100644 index b1374b9..0000000 --- a/ArkBot/IConfig.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Collections.Generic; - -namespace ArkBot -{ - public interface IConfig - { - ArkMultipliersConfigSection ArkMultipliers { get; set; } - string BotId { get; set; } - string BotName { get; set; } - string BotNamespace { get; set; } - string BotToken { get; set; } - string BotUrl { get; set; } - string AppUrl { get; set; } - string GoogleApiKey { get; set; } - string SteamApiKey { get; set; } - string SteamOpenIdRedirectUri { get; set; } - string SteamOpenIdRelyingServiceListenPrefix { get; set; } - string TempFileOutputDirPath { get; set; } - bool DisableDeveloperFetchSaveData { get; set; } - string MemberRoleName { get; set; } - DiscordConfigSection Discord { get; set; } - Dictionary UserRoles { get; set; } - Dictionary> AccessControl { get; set; } - string[] EnabledChannels { get; set; } - string InfoTopicChannel { get; set; } - string AnnouncementChannel { get; set; } - bool BackupsEnabled { get; set; } - string BackupsDirectoryPath { get; set; } - bool DiscordBotEnabled { get; set; } - string WebApiListenPrefix { get; set; } - string WebAppListenPrefix { get; set; } - string[] WebAppRedirectListenPrefix { get; set; } - string PowershellFilePath { get; set; } - bool UseCompatibilityChangeWatcher { get; set; } - SslConfigSection Ssl { get; set; } - int? SavegameExtractionMaxDegreeOfParallelism { get; set; } - bool AnonymizeWebApiData { get; set; } - - ServerConfigSection[] Servers { get; set; } - ClusterConfigSection[] Clusters { get; set; } - } -} \ No newline at end of file diff --git a/ArkBot/IConstants.cs b/ArkBot/IConstants.cs index dc4827b..511222d 100644 --- a/ArkBot/IConstants.cs +++ b/ArkBot/IConstants.cs @@ -4,6 +4,8 @@ public interface IConstants { string DatabaseConnectionString { get; } string OpenidresponsetemplatePath { get; } + string ConfigurationHelpTemplatePath { get; } + string AboutTemplatePath { get; } string DatabaseFilePath { get; } string SavedStateFilePath { get; } string ArkServerProcessName { get; } diff --git a/ArkBot/Layout/PaneStyleSelector.cs b/ArkBot/Layout/PaneStyleSelector.cs index 8605572..ff3b047 100644 --- a/ArkBot/Layout/PaneStyleSelector.cs +++ b/ArkBot/Layout/PaneStyleSelector.cs @@ -12,11 +12,17 @@ namespace ArkBot.Layout public class PaneStyleSelector : StyleSelector { public Style ConsoleStyle { get; set; } + public Style ConfigurationStyle { get; set; } + public Style AboutStyle { get; set; } public override Style SelectStyle(object item, DependencyObject container) { if (item is ConsoleViewModel) return ConsoleStyle; + if (item is ConfigurationViewModel) + return ConfigurationStyle; + if (item is AboutViewModel) + return AboutStyle; return base.SelectStyle(item, container); } diff --git a/ArkBot/Layout/PaneTemplateSelector.cs b/ArkBot/Layout/PaneTemplateSelector.cs index 4854d61..9382707 100644 --- a/ArkBot/Layout/PaneTemplateSelector.cs +++ b/ArkBot/Layout/PaneTemplateSelector.cs @@ -13,6 +13,8 @@ namespace ArkBot.Layout public class PaneTemplateSelector : DataTemplateSelector { public DataTemplate ConsoleTemplate { get; set; } + public DataTemplate ConfigurationTemplate { get; set; } + public DataTemplate AboutTemplate { get; set; } public override DataTemplate SelectTemplate(object item, DependencyObject container) { @@ -20,6 +22,10 @@ public override DataTemplate SelectTemplate(object item, DependencyObject contai if (item is ConsoleViewModel) return ConsoleTemplate; + if (item is ConfigurationViewModel) + return ConfigurationTemplate; + if (item is AboutViewModel) + return AboutTemplate; return base.SelectTemplate(item, container); } diff --git a/ArkBot/MainWindow.xaml b/ArkBot/MainWindow.xaml index 841ad74..8830c04 100644 --- a/ArkBot/MainWindow.xaml +++ b/ArkBot/MainWindow.xaml @@ -8,6 +8,8 @@ xmlns:controls="clr-namespace:ArkBot.Controls" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" + xmlns:xcpt="http://schemas.xceed.com/wpf/xaml/themes" + xmlns:xctt="http://schemas.xceed.com/wpf/xaml/toolkit/themes" xmlns:localThemes="http://schemas.xceed.com/wpf/xaml/avalondock/themes" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sw="clr-namespace:System.Windows;assembly=mscorlib" @@ -15,7 +17,7 @@ xmlns:prism="http://prismlibrary.com/" mc:Ignorable="d" x:Name="mainWindow" - Title="ARK Bot" MinWidth="800" MinHeight="600" Width="800" Height="600" WindowStartupLocation="CenterScreen" Icon="basket_empty.ico"> + Title="ARK Bot" MinWidth="600" MinHeight="500" Width="800" Height="800" WindowStartupLocation="CenterScreen" Icon="basket_empty.ico"> @@ -61,6 +63,8 @@ + + @@ -83,6 +87,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ArkBot/ViewModel/AboutViewModel.cs b/ArkBot/ViewModel/AboutViewModel.cs new file mode 100644 index 0000000..afe5afc --- /dev/null +++ b/ArkBot/ViewModel/AboutViewModel.cs @@ -0,0 +1,97 @@ +using ArkBot.Commands; +using ArkBot.Helpers; +using Newtonsoft.Json; +using Nito.AsyncEx; +using Prism.Commands; +using PropertyChanged; +using RazorEngine.Configuration; +using RazorEngine.Templating; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; + +namespace ArkBot.ViewModel +{ + public sealed class AboutViewModel : TabViewModel, IDisposable + { + public class AboutTemplateViewModel + { + public bool hasConfig { get; set; } + } + + public bool HasValidConfig { get; set; } + + private Lazy _razorEngineService = new Lazy(() => + { + var razorConfig = new TemplateServiceConfiguration + { + DisableTempFileLocking = true, + CachingProvider = new DefaultCachingProvider(t => { }) + }; + + return RazorEngine.Templating.RazorEngineService.Create(razorConfig); + }); + public Lazy RazorEngineService => _razorEngineService; + + private AsyncLazy _template = new AsyncLazy(async () => await FileHelper.ReadAllTextTaskAsync(new Constants().AboutTemplatePath)); + + + private AboutViewModel() : base("About", "About") + { + } + + private async Task InitializeAsync() + { + await RunCompileTemplate(new AboutTemplateViewModel { hasConfig = true }); + return this; + } + + public static Task CreateAsync(bool isVisible = false) + { + var ret = new AboutViewModel { IsVisible = isVisible }; + return ret.InitializeAsync(); + } + + public async Task RunCompileTemplate(AboutTemplateViewModel model) + { + var template = await _template; + var html = RazorEngineService.Value.RunCompile(template, template, typeof(AboutTemplateViewModel), model); + return html; + } + + #region IDisposable Support + private bool disposedValue = false; + + private void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + if (_razorEngineService != null && _razorEngineService.IsValueCreated) + { + _razorEngineService.Value.Dispose(); + _razorEngineService = null; + } + } + + disposedValue = true; + } + } + + public void Dispose() + { + Dispose(true); + } + #endregion + } +} diff --git a/ArkBot/ViewModel/ConfigurationViewModel.cs b/ArkBot/ViewModel/ConfigurationViewModel.cs new file mode 100644 index 0000000..817215b --- /dev/null +++ b/ArkBot/ViewModel/ConfigurationViewModel.cs @@ -0,0 +1,129 @@ +using ArkBot.Commands; +using ArkBot.Helpers; +using ArkBot.WpfCommands; +using Newtonsoft.Json; +using Nito.AsyncEx; +using Prism.Commands; +using PropertyChanged; +using RazorEngine.Configuration; +using RazorEngine.Templating; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; + +namespace ArkBot.ViewModel +{ + public sealed class ConfigurationViewModel : TabViewModel, IDisposable + { + public class HelpTemplateViewModel + { + public string displayName { get; set; } + public string description { get; set; } + public string remarks { get; set; } + public string instructions { get; set; } + public string example { get; set; } + public string defaultValue { get; set; } + public string validationError { get; set; } + } + + public object Config { get; set; } + + private Lazy _razorEngineService = new Lazy(() => + { + var razorConfig = new TemplateServiceConfiguration + { + DisableTempFileLocking = true, + CachingProvider = new DefaultCachingProvider(t => { }) + }; + + return RazorEngine.Templating.RazorEngineService.Create(razorConfig); + }); + public Lazy RazorEngineService => _razorEngineService; + + private AsyncLazy _template = new AsyncLazy(async () => await FileHelper.ReadAllTextTaskAsync(new Constants().ConfigurationHelpTemplatePath)); + + private ConfigurationViewModel() : base("Configuration", "Configuration") + { + } + + private async Task InitializeAsync() + { + await RunCompileTemplate(new HelpTemplateViewModel { displayName = "", description = "", instructions = "", example = "", defaultValue = null }); + return this; + } + + public static Task CreateAsync(bool isVisible = false) + { + var ret = new ConfigurationViewModel { IsVisible = isVisible }; + return ret.InitializeAsync(); + } + + public async Task RunCompileTemplate(HelpTemplateViewModel model) + { + var template = await _template; + var html = RazorEngineService.Value.RunCompile(template, template, typeof(HelpTemplateViewModel), model); + return html; + } + + public ICommand SaveConfig => _saveConfig ?? (_saveConfig = new RelayCommand(parameter => OnSaveConfig(parameter), parameter => CanSaveConfig(parameter))); + private RelayCommand _saveConfig; + + private bool CanSaveConfig(object parameter) + { + return true; + } + + private void OnSaveConfig(object parameter) + { + //if (!File.Exists(Constants.ConfigFilePath)) return; + + var result = MessageBox.Show("Are you sure you want to save this configuration?", "Save current configuration", MessageBoxButton.YesNo, MessageBoxImage.Question); + + if (result != MessageBoxResult.Yes) return; + + try + { + var json = JsonConvert.SerializeObject(Config, Formatting.Indented); + File.WriteAllText(Workspace.Constants.ConfigFilePath, json); + } + catch + { + } + } + + #region IDisposable Support + private bool disposedValue = false; + + private void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + if (_razorEngineService != null && _razorEngineService.IsValueCreated) + { + _razorEngineService.Value.Dispose(); + _razorEngineService = null; + } + } + + disposedValue = true; + } + } + + public void Dispose() + { + Dispose(true); + } + #endregion + } +} diff --git a/ArkBot/ViewModel/ConsoleViewModel.cs b/ArkBot/ViewModel/ConsoleViewModel.cs index d29d6b3..9c2cfc1 100644 --- a/ArkBot/ViewModel/ConsoleViewModel.cs +++ b/ArkBot/ViewModel/ConsoleViewModel.cs @@ -2,6 +2,7 @@ using ArkBot.Helpers; using Newtonsoft.Json; using Prism.Commands; +using PropertyChanged; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -17,17 +18,30 @@ namespace ArkBot.ViewModel { - public class ConsoleViewModel : TabViewModel + public sealed class ConsoleViewModel : TabViewModel { public ObservableCollection ConsoleOutput { get; set; } - public ConsoleViewModel() : base("Console", "Console") + private ConsoleViewModel() : base("Console", "Console") { ConsoleOutput = new ObservableCollection(); } + private async Task InitializeAsync() + { + return this; + } + + public static Task CreateAsync(bool isVisible = false) + { + var ret = new ConsoleViewModel { IsVisible = isVisible }; + return ret.InitializeAsync(); + } + public void AddLog(string message) { + if (message == null) return; + Application.Current.Dispatcher.Invoke(delegate { ConsoleOutput.Add(message.TrimEnd('\n', '\r')); diff --git a/ArkBot/ViewModel/PaneViewModel.cs b/ArkBot/ViewModel/PaneViewModel.cs index be728ec..ef756b2 100644 --- a/ArkBot/ViewModel/PaneViewModel.cs +++ b/ArkBot/ViewModel/PaneViewModel.cs @@ -1,4 +1,5 @@ -using System; +using PropertyChanged; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -17,55 +18,12 @@ public PaneViewModel(string contentId, string title) //public ImageSource IconSource { get; protected set; } - public string Title - { - get { return _title; } - set - { - if (_title == value) return; - - _title = value; - RaisePropertyChanged(nameof(Title)); - } - } - private string _title; + public string Title { get; set; } - public string ContentId - { - get { return _contentId; } - set - { - if (_contentId == value) return; - _contentId = value; - RaisePropertyChanged(nameof(ContentId)); - } - } - private string _contentId; + public string ContentId { get; set; } - public bool IsSelected - { - get { return _isSelected; } - set - { - if (_isSelected == value) return; + public bool IsSelected { get; set; } - _isSelected = value; - RaisePropertyChanged(nameof(IsSelected)); - } - } - private bool _isSelected; - - public bool IsActive - { - get { return _isActive; } - set - { - if (_isActive == value) return; - - _isActive = value; - RaisePropertyChanged(nameof(IsActive)); - } - } - private bool _isActive; + public bool IsActive { get; set; } } } diff --git a/ArkBot/ViewModel/ToolViewModel.cs b/ArkBot/ViewModel/ToolViewModel.cs index 8b69ab1..c3cdaa5 100644 --- a/ArkBot/ViewModel/ToolViewModel.cs +++ b/ArkBot/ViewModel/ToolViewModel.cs @@ -1,4 +1,5 @@ -using System; +using PropertyChanged; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -15,17 +16,6 @@ public ToolViewModel(string contentId, string name) : base(contentId, name) public string Name { get; private set; } - public bool IsVisible - { - get { return _isVisible; } - set - { - if (_isVisible == value) return; - - _isVisible = value; - RaisePropertyChanged(nameof(IsVisible)); - } - } - private bool _isVisible = true; + public bool IsVisible { get; set; } } } diff --git a/ArkBot/ViewModel/ViewModelBase.cs b/ArkBot/ViewModel/ViewModelBase.cs index 7f35cfb..3a2554b 100644 --- a/ArkBot/ViewModel/ViewModelBase.cs +++ b/ArkBot/ViewModel/ViewModelBase.cs @@ -1,4 +1,5 @@ -using System; +using PropertyChanged; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; @@ -11,6 +12,9 @@ public abstract class ViewModelBase : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; - protected virtual void RaisePropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + public virtual void OnPropertyChanged(string propertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } } } diff --git a/ArkBot/ViewModel/Workspace.cs b/ArkBot/ViewModel/Workspace.cs index 7fc5b28..a5d78b1 100644 --- a/ArkBot/ViewModel/Workspace.cs +++ b/ArkBot/ViewModel/Workspace.cs @@ -49,25 +49,38 @@ using ArkSavegameToolkitNet.Domain; using Discord.Net.Providers.WS4Net; using AppFunc = System.Func, System.Threading.Tasks.Task>; +using Nito.AsyncEx; +using Markdig; +using PropertyChanged; +using ArkBot.Configuration.Model; namespace ArkBot.ViewModel { - public class Workspace : ViewModelBase, IDisposable + public sealed class Workspace : ViewModelBase, IDisposable { public struct Constants { public const string ConfigFilePath = @"config.json"; + public const string DefaultConfigFilePath = @"defaultconfig.json"; public const string LayoutFilePath = @".\Layout.config"; } - public static Workspace Instance => _instance ?? (_instance = new Workspace()); + public static Workspace Instance => _instance; private static Workspace _instance; - public IEnumerable Panes => _panes ?? (_panes = new PaneViewModel[] { Console }); - private PaneViewModel[] _panes; + public static AsyncLazy AsyncInstance = new AsyncLazy(async () => + { + return _instance ?? await CreateAsync(); + }); + + public ObservableCollection Panes { get; private set; } + + public ConsoleViewModel Console { get; private set; } + + public ConfigurationViewModel Configuration { get; private set; } + + public AboutViewModel About { get; private set; } - public ConsoleViewModel Console => _console ?? (_console = new ConsoleViewModel()); - private ConsoleViewModel _console; public DelegateCommand ClosingCommand { get; private set; } @@ -82,22 +95,7 @@ public struct Constants internal static IContainer Container { get; set; } - public bool SkipExtractNextRestart - { - get - { - return _skipExtractNextRestart; - } - - set - { - if (value == _skipExtractNextRestart) return; - - _skipExtractNextRestart = value; - RaisePropertyChanged(nameof(SkipExtractNextRestart)); - } - } - private bool _skipExtractNextRestart; + public bool SkipExtractNextRestart { get; set; } private SavedState _savedstate = null; private IDisposable _webapi; @@ -107,15 +105,38 @@ public bool SkipExtractNextRestart private ArkContextManager _contextManager; internal IConfig _config; - public Workspace() + private Workspace() { //do not create viewmodels or load data here, or avalondock layout deserialization will fail + Panes = new ObservableCollection(); ManuallyUpdateServers = new ObservableCollection(); ManuallyUpdateClusters = new ObservableCollection(); ClosingCommand = new DelegateCommand(OnClosing); + PropertyChanged += Workspace_PropertyChanged; _webappRedirects = new List(); + + //if markdig is not used it will not be loaded before being used by razor template (hack) + var tmp = Markdown.ToHtml(@"**hack**"); + } + + private async Task InitializeAsync() + { + Console = await ConsoleViewModel.CreateAsync(true); + Configuration = await ConfigurationViewModel.CreateAsync(true); + About = await AboutViewModel.CreateAsync(true); + Panes.AddRange(new PaneViewModel[] { About, Console, Configuration }); + + await Init(); + + return this; + } + + private static Task CreateAsync() + { + _instance = new Workspace(); + return _instance.InitializeAsync(); } private void Workspace_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) @@ -146,7 +167,7 @@ private void OnClosing(System.ComponentModel.CancelEventArgs e) if (_runDiscordBotTask != null) { _runDiscordBotCts?.Cancel(); - Task.WaitAny(_runDiscordBotTask); + if (_runDiscordBotTask.Status == TaskStatus.Running) Task.WaitAny(_runDiscordBotTask); } } @@ -204,13 +225,6 @@ internal async Task Init() log4net.Config.XmlConfigurator.Configure(); - //load config and check for errors - if (!File.Exists(Constants.ConfigFilePath)) - { - WriteAndWaitForKey($@"The required file config.json is missing from application directory. Please copy defaultconfig.json, set the correct values for your environment and restart the application."); - return; - } - if (!new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator)) { WriteAndWaitForKey($@"This application must be run as administrator in order to function properly."); @@ -219,225 +233,56 @@ internal async Task Init() _config = null; string exceptionMessage = null; - try - { - _config = JsonConvert.DeserializeObject(File.ReadAllText(Constants.ConfigFilePath)); - } - catch (Exception ex) - { - exceptionMessage = ex.Message; - } - if (_config == null) - { - WriteAndWaitForKey( - $@"The required file config.json is empty or contains errors. Please copy defaultconfig.json, set the correct values for your environment and restart the application.", - exceptionMessage); - return; - } - - var sb = new StringBuilder(); - if (string.IsNullOrWhiteSpace(_config.BotId) || !new Regex(@"^[a-z0-9]+$", RegexOptions.IgnoreCase | RegexOptions.Singleline).IsMatch(_config.BotId)) - { - sb.AppendLine($@"Error: {nameof(_config.BotId)} is not a valid id."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.BotId))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(_config.BotName)) - { - sb.AppendLine($@"Error: {nameof(_config.BotName)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.BotName))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(_config.BotNamespace) || !Uri.IsWellFormedUriString(_config.BotNamespace, UriKind.Absolute)) + if (File.Exists(Constants.ConfigFilePath)) { - sb.AppendLine($@"Error: {nameof(_config.BotNamespace)} is not set or not a valid url."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.BotNamespace))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(_config.TempFileOutputDirPath) || !Directory.Exists(_config.TempFileOutputDirPath)) - { - sb.AppendLine($@"Error: {nameof(_config.TempFileOutputDirPath)} is not a valid directory path."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.TempFileOutputDirPath))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(_config.BotToken)) - { - sb.AppendLine($@"Error: {nameof(_config.BotToken)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.BotToken))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(_config.SteamOpenIdRedirectUri)) - { - sb.AppendLine($@"Error: {nameof(_config.SteamOpenIdRedirectUri)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.SteamOpenIdRedirectUri))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(_config.SteamOpenIdRelyingServiceListenPrefix)) - { - sb.AppendLine($@"Error: {nameof(_config.SteamOpenIdRelyingServiceListenPrefix)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.SteamOpenIdRelyingServiceListenPrefix))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(_config.GoogleApiKey)) - { - sb.AppendLine($@"Error: {nameof(_config.GoogleApiKey)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.GoogleApiKey))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(_config.SteamApiKey)) - { - sb.AppendLine($@"Error: {nameof(_config.SteamApiKey)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.SteamApiKey))}"); - sb.AppendLine(); - } - if (_config.BackupsEnabled && (string.IsNullOrWhiteSpace(_config.BackupsDirectoryPath) || !FileHelper.IsValidDirectoryPath(_config.BackupsDirectoryPath))) - { - sb.AppendLine($@"Error: {nameof(_config.BackupsDirectoryPath)} is not a valid directory path."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.BackupsDirectoryPath))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(_config.WebApiListenPrefix)) - { - sb.AppendLine($@"Error: {nameof(_config.WebApiListenPrefix)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.WebApiListenPrefix))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(_config.WebAppListenPrefix)) - { - sb.AppendLine($@"Error: {nameof(_config.WebAppListenPrefix)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.WebAppListenPrefix))}"); - sb.AppendLine(); - } - if (_config.Ssl?.Enabled == true) - { - if (string.IsNullOrWhiteSpace(_config.Ssl.Name)) + try { - sb.AppendLine($@"Error: {nameof(_config.Ssl)}.{nameof(_config.Ssl.Name)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config.Ssl, nameof(_config.Ssl.Name))}"); - sb.AppendLine(); + _config = JsonConvert.DeserializeObject(File.ReadAllText(Constants.ConfigFilePath)); + if (_config.Discord == null) _config.Discord = new DiscordConfigSection(); } - if (string.IsNullOrWhiteSpace(_config.Ssl.Password)) + catch (Exception ex) { - sb.AppendLine($@"Error: {nameof(_config.Ssl)}.{nameof(_config.Ssl.Password)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config.Ssl, nameof(_config.Ssl.Password))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(_config.Ssl.Email)) - { - sb.AppendLine($@"Error: {nameof(_config.Ssl)}.{nameof(_config.Ssl.Email)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config.Ssl, nameof(_config.Ssl.Email))}"); - sb.AppendLine(); - } - if (!(_config.Ssl.Domains?.Length >= 1) || _config.Ssl.Domains.Any(x => string.IsNullOrWhiteSpace(x))) - { - sb.AppendLine($@"Error: {nameof(_config.Ssl)}.{nameof(_config.Ssl.Domains)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config.Ssl, nameof(_config.Ssl.Domains))}"); - sb.AppendLine(); + exceptionMessage = ex.Message; } - if (string.IsNullOrWhiteSpace(_config.Ssl.ChallengeListenPrefix)) + } + var hasValidConfig = _config != null; + if (_config == null) + { + //load defaultconfig + if (!File.Exists(Constants.DefaultConfigFilePath)) { - sb.AppendLine($@"Error: {nameof(_config.Ssl)}.{nameof(_config.Ssl.ChallengeListenPrefix)} is not set."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config.Ssl, nameof(_config.Ssl.ChallengeListenPrefix))}"); - sb.AppendLine(); + WriteAndWaitForKey($@"The required file defaultconfig.json is missing from application directory. Please redownload the application."); + return; } - } - var clusterkeys = _config.Clusters?.Select(x => x.Key).ToArray(); - var serverkeys = _config.Servers?.Select(x => x.Key).ToArray(); - if (serverkeys?.Length > 0 && serverkeys.Length != serverkeys.Distinct(StringComparer.OrdinalIgnoreCase).Count()) - { - sb.AppendLine($@"Error: {nameof(_config.Servers)} contain non-unique keys."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.Servers))}"); - sb.AppendLine(); - } - if (clusterkeys?.Length > 0 && clusterkeys.Length != clusterkeys.Distinct(StringComparer.OrdinalIgnoreCase).Count()) - { - sb.AppendLine($@"Error: {nameof(_config.Clusters)} contain non-unique keys."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.Clusters))}"); - sb.AppendLine(); - } - if (_config.Servers?.Length > 0) - { - foreach (var server in _config.Servers) + try { - if (server.Cluster != null && !clusterkeys.Contains(server.Cluster)) - { - sb.AppendLine($@"Error: {nameof(_config.Servers)}.{nameof(server.Cluster)} reference missing cluster key ""{server.Cluster}""."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(server, nameof(server.Cluster))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(server.SaveFilePath) || !File.Exists(server.SaveFilePath)) - { - sb.AppendLine($@"Error: {nameof(_config.Servers)}.{nameof(server.SaveFilePath)} is not a valid file path for server instance ""{server.Key}""."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(server, nameof(server.SaveFilePath))}"); - sb.AppendLine(); - } - if (string.IsNullOrWhiteSpace(server.Ip)) - { - sb.AppendLine($@"Error: {nameof(_config.Servers)}.{nameof(server.Ip)} is not set for server instance ""{server.Key}""."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(server, nameof(server.Ip))}"); - sb.AppendLine(); - } - if (server.Port <= 0) - { - sb.AppendLine($@"Error: {nameof(_config.Servers)}.{nameof(server.Port)} is not valid for server instance ""{server.Key}""."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(server, nameof(server.Port))}"); - sb.AppendLine(); - } - //if (server.RconPort <= 0) - //{ - // sb.AppendLine($@"Error: {nameof(config.Servers)}.{nameof(server.RconPort)} is not valid for server instance ""{server.Key}""."); - // sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(server, nameof(server.RconPort))}"); - // sb.AppendLine(); - //} + _config = JsonConvert.DeserializeObject(File.ReadAllText(Constants.DefaultConfigFilePath)); } - } - if (_config.Clusters?.Length > 0) - { - foreach (var cluster in _config.Clusters) + catch (Exception ex) { - if (string.IsNullOrWhiteSpace(cluster.SavePath) || !Directory.Exists(cluster.SavePath)) - { - sb.AppendLine($@"Error: {nameof(_config.Servers)}.{nameof(cluster.SavePath)} is not a valid directory path for cluster instance ""{cluster.Key}""."); - sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(cluster, nameof(cluster.SavePath))}"); - sb.AppendLine(); - } } + + WriteAndWaitForKey( + $@"The file config.json is empty or contains errors. Skipping automatic startup...", + exceptionMessage); } - //todo: for now this section is not really needed unless !imprintcheck is used - //if (config.ArkMultipliers == null) - //{ - // sb.AppendLine($@"Error: {nameof(config.ArkMultipliers)} section is missing from config file."); - // sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(config, nameof(config.ArkMultipliers))}"); - // sb.AppendLine(); - //} + Configuration.Config = _config as Config; + About.HasValidConfig = hasValidConfig; - if (_config.AnonymizeWebApiData) + if (!hasValidConfig) { - System.Console.WriteLine("Anonymizing all data in the WebAPI (anonymizeWebApiData=true)" + Environment.NewLine); + About.IsActive = true; + return; } - - if (string.IsNullOrWhiteSpace(_config.MemberRoleName)) _config.MemberRoleName = "ark"; - - //load aliases and check integrity - var aliases = ArkSpeciesAliases.Instance; - if (aliases == null || !aliases.CheckIntegrity) + else { - sb.AppendLine($@"Error: ""{ArkSpeciesAliases._filepath}"" is missing, contains invalid json or duplicate aliases."); - if (aliases != null) - { - foreach (var duplicateAlias in aliases.Aliases?.SelectMany(x => x).GroupBy(x => x) - .Where(g => g.Count() > 1) - .Select(g => g.Key)) - { - sb.AppendLine($@"Duplicate alias: ""{duplicateAlias}"""); - } - } - sb.AppendLine(); + About.IsVisible = false; + Console.IsActive = true; } - var errors = sb.ToString(); + string errors = ValidateConfig(); if (errors.Length > 0) { WriteAndWaitForKey(errors); @@ -477,31 +322,36 @@ internal async Task Init() //var playedTimeWatcher = new PlayedTimeWatcher(_config); - var options = new SteamOpenIdOptions + BarebonesSteamOpenId openId = null; + if (_config.Discord.DiscordBotEnabled) { - ListenPrefixes = new[] { _config.SteamOpenIdRelyingServiceListenPrefix }, - RedirectUri = _config.SteamOpenIdRedirectUri, - }; - var openId = new BarebonesSteamOpenId(options, - new Func>(async (success, steamId, discordId) => + var options = new SteamOpenIdOptions { - var razorConfig = new TemplateServiceConfiguration + ListenPrefixes = new[] { _config.Discord.SteamOpenIdRelyingServiceListenPrefix }, + RedirectUri = _config.Discord.SteamOpenIdRedirectUri, + }; + openId = new BarebonesSteamOpenId(options, + new Func>(async (success, steamId, discordId) => { - DisableTempFileLocking = true, - CachingProvider = new DefaultCachingProvider(t => { }) - }; + var razorConfig = new TemplateServiceConfiguration + { + DisableTempFileLocking = true, + CachingProvider = new DefaultCachingProvider(t => { }) + }; - using (var service = RazorEngineService.Create(razorConfig)) - { - var html = await FileHelper.ReadAllTextTaskAsync(constants.OpenidresponsetemplatePath); - return service.RunCompile(html, constants.OpenidresponsetemplatePath, null, new { Success = success, botName = _config.BotName, botUrl = _config.BotUrl }); - } - })); + using (var service = RazorEngineService.Create(razorConfig)) + { + var html = await FileHelper.ReadAllTextTaskAsync(constants.OpenidresponsetemplatePath); + return service.RunCompile(html, constants.OpenidresponsetemplatePath, null, + new { Success = success, botName = _config.BotName, botUrl = _config.BotUrl }); + } + })); + } var discord = new DiscordSocketClient(new DiscordSocketConfig { WebSocketProvider = WS4NetProvider.Instance, //required for Win 7 - LogLevel = LogSeverity.Warning + LogLevel = _config.DiscordLogLevel }); discord.Log += msg => { @@ -527,12 +377,12 @@ internal async Task Init() builder.RegisterInstance(discordCommands).AsSelf(); builder.RegisterType().As().SingleInstance(); builder.RegisterType(); - builder.RegisterType().As().SingleInstance(); + builder.RegisterType().AsSelf(); builder.RegisterInstance(constants).As(); builder.RegisterInstance(_savedstate).As(); builder.RegisterInstance(_config as Config).As(); //builder.RegisterInstance(playedTimeWatcher).As(); - builder.RegisterInstance(openId).As(); + if (openId != null) builder.RegisterInstance(openId).As(); builder.RegisterType().AsSelf().As() .WithParameter(new TypedParameter(typeof(string), constants.DatabaseConnectionString)); builder.RegisterType(); @@ -591,7 +441,7 @@ internal async Task Init() _contextManager = Container.Resolve(); //server/cluster contexts - if (_config.Clusters?.Length > 0) + if (_config.Clusters?.Count > 0) { foreach (var cluster in _config.Clusters) { @@ -600,15 +450,15 @@ internal async Task Init() } } - if (_config.Servers?.Length > 0) + if (_config.Servers?.Count > 0) { var playerLastActiveService = Container.Resolve(); var backupService = Container.Resolve(); foreach (var server in _config.Servers) { - var clusterContext = _contextManager.GetCluster(server.Cluster); + var clusterContext = _contextManager.GetCluster(server.ClusterKey); var context = Container.Resolve( - new TypedParameter(typeof(ServerConfigSection), server), + new TypedParameter(typeof(ServerConfigSection), server), new TypedParameter(typeof(ArkClusterContext), clusterContext)); var initTask = context.Initialize(); //fire and forget _contextManager.AddServer(context); @@ -645,7 +495,7 @@ internal async Task Init() } //run the discord bot - if (_config.DiscordBotEnabled) + if (_config.Discord.DiscordBotEnabled) { _runDiscordBotCts = new CancellationTokenSource(); _runDiscordBotTask = await Task.Factory.StartNew(async () => await RunDiscordBot(), _runDiscordBotCts.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default); @@ -811,7 +661,7 @@ await Task.Run(() => { proc.WaitForExit(); exitCode = proc.ExitCode; //only add (last cmd) is interesting - } + } }); } @@ -857,6 +707,209 @@ await Task.Run(() => } } + private string ValidateConfig() + { + var sb = new StringBuilder(); + if (string.IsNullOrWhiteSpace(_config.BotName)) + { + sb.AppendLine($@"Error: {nameof(_config.BotName)} is not set."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.BotName))}"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(_config.TempFileOutputDirPath) || !Directory.Exists(_config.TempFileOutputDirPath)) + { + sb.AppendLine($@"Error: {nameof(_config.TempFileOutputDirPath)} is not a valid directory path."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.TempFileOutputDirPath))}"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(_config.SteamApiKey)) + { + sb.AppendLine($@"Error: {nameof(_config.SteamApiKey)} is not set."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.SteamApiKey))}"); + sb.AppendLine(); + } + if (_config.Backups.BackupsEnabled && (string.IsNullOrWhiteSpace(_config.Backups.BackupsDirectoryPath) || !FileHelper.IsValidDirectoryPath(_config.Backups.BackupsDirectoryPath))) + { + sb.AppendLine($@"Error: {nameof(_config.Backups.BackupsDirectoryPath)} is not a valid directory path."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.Backups.BackupsDirectoryPath))}"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(_config.WebApiListenPrefix)) + { + sb.AppendLine($@"Error: {nameof(_config.WebApiListenPrefix)} is not set."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.WebApiListenPrefix))}"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(_config.WebAppListenPrefix)) + { + sb.AppendLine($@"Error: {nameof(_config.WebAppListenPrefix)} is not set."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.WebAppListenPrefix))}"); + sb.AppendLine(); + } + if (_config.Ssl?.Enabled == true) + { + if (string.IsNullOrWhiteSpace(_config.Ssl.Name)) + { + sb.AppendLine($@"Error: {nameof(_config.Ssl)}.{nameof(_config.Ssl.Name)} is not set."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config.Ssl, nameof(_config.Ssl.Name))}"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(_config.Ssl.Password)) + { + sb.AppendLine($@"Error: {nameof(_config.Ssl)}.{nameof(_config.Ssl.Password)} is not set."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config.Ssl, nameof(_config.Ssl.Password))}"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(_config.Ssl.Email)) + { + sb.AppendLine($@"Error: {nameof(_config.Ssl)}.{nameof(_config.Ssl.Email)} is not set."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config.Ssl, nameof(_config.Ssl.Email))}"); + sb.AppendLine(); + } + if (!(_config.Ssl.Domains?.Length >= 1) || _config.Ssl.Domains.Any(x => string.IsNullOrWhiteSpace(x))) + { + sb.AppendLine($@"Error: {nameof(_config.Ssl)}.{nameof(_config.Ssl.Domains)} is not set."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config.Ssl, nameof(_config.Ssl.Domains))}"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(_config.Ssl.ChallengeListenPrefix)) + { + sb.AppendLine($@"Error: {nameof(_config.Ssl)}.{nameof(_config.Ssl.ChallengeListenPrefix)} is not set."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config.Ssl, nameof(_config.Ssl.ChallengeListenPrefix))}"); + sb.AppendLine(); + } + } + if (_config.Discord.DiscordBotEnabled) + { + if (string.IsNullOrWhiteSpace(_config.Discord.BotToken)) + { + sb.AppendLine($@"Error: {nameof(_config.Discord)}.{nameof(_config.Discord.BotToken)} is not set."); + sb.AppendLine($@"Expected value: { + ValidationHelper.GetDescriptionForMember(_config.Discord, nameof(_config.Discord.BotToken)) + }"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(_config.Discord.SteamOpenIdRedirectUri)) + { + sb.AppendLine($@"Error: {nameof(_config.Discord)}.{nameof(_config.Discord.SteamOpenIdRedirectUri)} is not set."); + sb.AppendLine($@"Expected value: { + ValidationHelper.GetDescriptionForMember(_config.Discord, + nameof(_config.Discord.SteamOpenIdRedirectUri)) + }"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(_config.Discord.SteamOpenIdRelyingServiceListenPrefix)) + { + sb.AppendLine( + $@"Error: {nameof(_config.Discord)}.{nameof(_config.Discord.SteamOpenIdRelyingServiceListenPrefix)} is not set."); + sb.AppendLine($@"Expected value: { + ValidationHelper.GetDescriptionForMember(_config.Discord, + nameof(_config.Discord.SteamOpenIdRelyingServiceListenPrefix)) + }"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(_config.Discord.MemberRoleName)) _config.Discord.MemberRoleName = "ark"; + } + + var clusterkeys = _config.Clusters?.Select(x => x.Key).ToArray(); + var serverkeys = _config.Servers?.Select(x => x.Key).ToArray(); + if (serverkeys?.Length > 0 && serverkeys.Length != serverkeys.Distinct(StringComparer.OrdinalIgnoreCase).Count()) + { + sb.AppendLine($@"Error: {nameof(_config.Servers)} contain non-unique keys."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.Servers))}"); + sb.AppendLine(); + } + if (clusterkeys?.Length > 0 && clusterkeys.Length != clusterkeys.Distinct(StringComparer.OrdinalIgnoreCase).Count()) + { + sb.AppendLine($@"Error: {nameof(_config.Clusters)} contain non-unique keys."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(_config, nameof(_config.Clusters))}"); + sb.AppendLine(); + } + if (_config.Servers?.Count > 0) + { + foreach (var server in _config.Servers) + { + if (server.ClusterKey != null && !clusterkeys.Contains(server.ClusterKey)) + { + sb.AppendLine($@"Error: {nameof(_config.Servers)}.{nameof(server.ClusterKey)} reference missing cluster key ""{server.ClusterKey}""."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(server, nameof(server.ClusterKey))}"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(server.SaveFilePath) || !File.Exists(server.SaveFilePath)) + { + sb.AppendLine($@"Error: {nameof(_config.Servers)}.{nameof(server.SaveFilePath)} is not a valid file path for server instance ""{server.Key}""."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(server, nameof(server.SaveFilePath))}"); + sb.AppendLine(); + } + if (string.IsNullOrWhiteSpace(server.Ip)) + { + sb.AppendLine($@"Error: {nameof(_config.Servers)}.{nameof(server.Ip)} is not set for server instance ""{server.Key}""."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(server, nameof(server.Ip))}"); + sb.AppendLine(); + } + if (server.QueryPort <= 0) + { + sb.AppendLine($@"Error: {nameof(_config.Servers)}.{nameof(server.QueryPort)} is not valid for server instance ""{server.Key}""."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(server, nameof(server.QueryPort))}"); + sb.AppendLine(); + } + //if (server.RconPort <= 0) + //{ + // sb.AppendLine($@"Error: {nameof(config.Servers)}.{nameof(server.RconPort)} is not valid for server instance ""{server.Key}""."); + // sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(server, nameof(server.RconPort))}"); + // sb.AppendLine(); + //} + } + } + if (_config.Clusters?.Count > 0) + { + foreach (var cluster in _config.Clusters) + { + if (string.IsNullOrWhiteSpace(cluster.SavePath) || !Directory.Exists(cluster.SavePath)) + { + sb.AppendLine($@"Error: {nameof(_config.Servers)}.{nameof(cluster.SavePath)} is not a valid directory path for cluster instance ""{cluster.Key}""."); + sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(cluster, nameof(cluster.SavePath))}"); + sb.AppendLine(); + } + } + } + + //return; + + //todo: for now this section is not really needed unless !imprintcheck is used + //if (config.ArkMultipliers == null) + //{ + // sb.AppendLine($@"Error: {nameof(config.ArkMultipliers)} section is missing from config file."); + // sb.AppendLine($@"Expected value: {ValidationHelper.GetDescriptionForMember(config, nameof(config.ArkMultipliers))}"); + // sb.AppendLine(); + //} + + if (_config.AnonymizeWebApiData) + { + System.Console.WriteLine("Anonymizing all data in the WebAPI (anonymizeWebApiData=true)" + Environment.NewLine); + } + + //load aliases and check integrity + var aliases = ArkSpeciesAliases.Instance; + if (aliases == null || !aliases.CheckIntegrity) + { + sb.AppendLine($@"Error: ""{ArkSpeciesAliases._filepath}"" is missing, contains invalid json or duplicate aliases."); + if (aliases != null) + { + foreach (var duplicateAlias in aliases.Aliases?.SelectMany(x => x).GroupBy(x => x) + .Where(g => g.Count() > 1) + .Select(g => g.Key)) + { + sb.AppendLine($@"Duplicate alias: ""{duplicateAlias}"""); + } + } + sb.AppendLine(); + } + + var errors = sb.ToString(); + return errors; + } + private Task _runDiscordBotTask; private CancellationTokenSource _runDiscordBotCts; @@ -911,23 +964,50 @@ public async Task RunDiscordBot() #region IDisposable Support private bool disposedValue = false; - protected virtual void Dispose(bool disposing) + private void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { + try + { + Configuration?.Dispose(); + } + catch (Exception ex) + { + Logging.LogException(@"Exception in Workspace::Dispose (Configuration) when closing application", ex, GetType(), LogLevel.DEBUG, ExceptionLevel.Ignored); + } + Configuration = null; + + try + { + About?.Dispose(); + } + catch (Exception ex) + { + Logging.LogException(@"Exception in Workspace::Dispose (About) when closing application", ex, GetType(), LogLevel.DEBUG, ExceptionLevel.Ignored); + } + About = null; + try { _webapi?.Dispose(); - } catch (ObjectDisposedException) { } + } + catch (Exception ex) + { + Logging.LogException(@"Exception in Workspace::Dispose (WebApi) when closing application", ex, GetType(), LogLevel.DEBUG, ExceptionLevel.Ignored); + } _webapi = null; try { _webapp?.Dispose(); } - catch (ObjectDisposedException) { } + catch (Exception ex) + { + Logging.LogException(@"Exception in Workspace::Dispose (WebApp) when closing application", ex, GetType(), LogLevel.DEBUG, ExceptionLevel.Ignored); + } _webapp = null; foreach (var redir in _webappRedirects.ToArray()) @@ -936,7 +1016,10 @@ protected virtual void Dispose(bool disposing) { redir?.Dispose(); } - catch (ObjectDisposedException) { } + catch (Exception ex) + { + Logging.LogException(@"Exception in Workspace::Dispose (WebAppRedirects) when closing application", ex, GetType(), LogLevel.DEBUG, ExceptionLevel.Ignored); + } _webappRedirects.Remove(redir); } } diff --git a/ArkBot/Voting/Handlers/BanVoteHandler.cs b/ArkBot/Voting/Handlers/BanVoteHandler.cs index 1d6d06b..4930c50 100644 --- a/ArkBot/Voting/Handlers/BanVoteHandler.cs +++ b/ArkBot/Voting/Handlers/BanVoteHandler.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Database.Model; using ArkBot.Extensions; diff --git a/ArkBot/Voting/Handlers/DestroyWildDinosVoteHandler.cs b/ArkBot/Voting/Handlers/DestroyWildDinosVoteHandler.cs index 4470e24..9563636 100644 --- a/ArkBot/Voting/Handlers/DestroyWildDinosVoteHandler.cs +++ b/ArkBot/Voting/Handlers/DestroyWildDinosVoteHandler.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Database.Model; using ArkBot.Extensions; diff --git a/ArkBot/Voting/Handlers/IVoteHandler.cs b/ArkBot/Voting/Handlers/IVoteHandler.cs index 36fe1d0..9e5cc90 100644 --- a/ArkBot/Voting/Handlers/IVoteHandler.cs +++ b/ArkBot/Voting/Handlers/IVoteHandler.cs @@ -4,6 +4,7 @@ using ArkBot.Database.Model; using Discord; using ArkBot.Ark; +using ArkBot.Configuration.Model; namespace ArkBot.Voting.Handlers { diff --git a/ArkBot/Voting/Handlers/RestartServerVoteHandler.cs b/ArkBot/Voting/Handlers/RestartServerVoteHandler.cs index 8453486..8fd1a3b 100644 --- a/ArkBot/Voting/Handlers/RestartServerVoteHandler.cs +++ b/ArkBot/Voting/Handlers/RestartServerVoteHandler.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Database.Model; using ArkBot.Extensions; diff --git a/ArkBot/Voting/Handlers/SetTimeOfDayVoteHandler.cs b/ArkBot/Voting/Handlers/SetTimeOfDayVoteHandler.cs index 4665a3a..7b73486 100644 --- a/ArkBot/Voting/Handlers/SetTimeOfDayVoteHandler.cs +++ b/ArkBot/Voting/Handlers/SetTimeOfDayVoteHandler.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Database.Model; using ArkBot.Extensions; diff --git a/ArkBot/Voting/Handlers/UnbanVoteHandler.cs b/ArkBot/Voting/Handlers/UnbanVoteHandler.cs index ca87d1e..e1040ef 100644 --- a/ArkBot/Voting/Handlers/UnbanVoteHandler.cs +++ b/ArkBot/Voting/Handlers/UnbanVoteHandler.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Database.Model; using ArkBot.Extensions; diff --git a/ArkBot/Voting/Handlers/UpdateServerVoteHandler.cs b/ArkBot/Voting/Handlers/UpdateServerVoteHandler.cs index 885840a..246b632 100644 --- a/ArkBot/Voting/Handlers/UpdateServerVoteHandler.cs +++ b/ArkBot/Voting/Handlers/UpdateServerVoteHandler.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Database.Model; using ArkBot.Extensions; diff --git a/ArkBot/Voting/VotingManager.cs b/ArkBot/Voting/VotingManager.cs index b090282..67c2b38 100644 --- a/ArkBot/Voting/VotingManager.cs +++ b/ArkBot/Voting/VotingManager.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Database.Model; using ArkBot.Discord; @@ -157,9 +158,9 @@ private void _contextManager_VoteInitiated(ArkServerContext serverContext, VoteI if (result == null) return; if (result.MessageRcon != null) await serverContext.Steam.SendRconCommand($"serverchat {result.MessageRcon.ReplaceRconSpecialChars()}"); - if (result.MessageAnnouncement != null && !string.IsNullOrWhiteSpace(_config.AnnouncementChannel)) + if (result.MessageAnnouncement != null && !string.IsNullOrWhiteSpace(_config.Discord.AnnouncementChannel)) { - await _discordManager.SendTextMessageToChannelNameOnAllServers(_config.AnnouncementChannel, result.MessageAnnouncement); + await _discordManager.SendTextMessageToChannelNameOnAllServers(_config.Discord.AnnouncementChannel, result.MessageAnnouncement); } }) }); @@ -204,9 +205,9 @@ private async Task VoteFinished(ArkServerContext serverContext, IEfDatabaseConte if (!noAnnouncement && result != null) { if (result.MessageRcon != null) await serverContext.Steam.SendRconCommand($"serverchat {result.MessageRcon.ReplaceRconSpecialChars()}"); - if (result.MessageAnnouncement != null && !string.IsNullOrWhiteSpace(_config.AnnouncementChannel)) + if (result.MessageAnnouncement != null && !string.IsNullOrWhiteSpace(_config.Discord.AnnouncementChannel)) { - await _discordManager.SendTextMessageToChannelNameOnAllServers(_config.AnnouncementChannel, result.MessageAnnouncement); + await _discordManager.SendTextMessageToChannelNameOnAllServers(_config.Discord.AnnouncementChannel, result.MessageAnnouncement); } } } diff --git a/ArkBot/WebApi/AccessControlAuthorizationFilter.cs b/ArkBot/WebApi/AccessControlAuthorizationFilter.cs index a470a7e..dff63c4 100644 --- a/ArkBot/WebApi/AccessControlAuthorizationFilter.cs +++ b/ArkBot/WebApi/AccessControlAuthorizationFilter.cs @@ -1,4 +1,5 @@ -using ArkBot.Helpers; +using ArkBot.Configuration.Model; +using ArkBot.Helpers; using ArkBot.WebApi.Controllers; using Autofac.Integration.WebApi; using System; diff --git a/ArkBot/WebApi/Controllers/AdminServerController.cs b/ArkBot/WebApi/Controllers/AdminServerController.cs index 10d9ffd..1715370 100644 --- a/ArkBot/WebApi/Controllers/AdminServerController.cs +++ b/ArkBot/WebApi/Controllers/AdminServerController.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Extensions; using ArkBot.Helpers; diff --git a/ArkBot/WebApi/Controllers/AdministerController.cs b/ArkBot/WebApi/Controllers/AdministerController.cs index 594ac00..d06bcfb 100644 --- a/ArkBot/WebApi/Controllers/AdministerController.cs +++ b/ArkBot/WebApi/Controllers/AdministerController.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Extensions; using ArkBot.Helpers; diff --git a/ArkBot/WebApi/Controllers/AuthenticationController.cs b/ArkBot/WebApi/Controllers/AuthenticationController.cs index db49aec..cee0eca 100644 --- a/ArkBot/WebApi/Controllers/AuthenticationController.cs +++ b/ArkBot/WebApi/Controllers/AuthenticationController.cs @@ -1,4 +1,5 @@ -using ArkBot.Helpers; +using ArkBot.Configuration.Model; +using ArkBot.Helpers; using Microsoft.Owin.Security; using System; using System.Collections.Generic; @@ -57,7 +58,11 @@ public async Task LoginCallback(string returnUrl) claims.Add(new Claim(ClaimTypes.AuthenticationMethod, "Steam")); var steamId = claims?.FirstOrDefault(x => x.Type.Equals("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", StringComparison.OrdinalIgnoreCase))?.Value; - if (steamId != null) steamId = steamId.Replace("http://steamcommunity.com/openid/id/", ""); + if (steamId != null) + { + steamId = steamId.Replace("http://steamcommunity.com/openid/id/", ""); + steamId = steamId.Replace("https://steamcommunity.com/openid/id/", ""); + } if (!string.IsNullOrEmpty(steamId)) { var roles = WebApiHelper.GetRolesForUser(_config, steamId); diff --git a/ArkBot/WebApi/Controllers/BaseApiController.cs b/ArkBot/WebApi/Controllers/BaseApiController.cs index 6bd9288..e992771 100644 --- a/ArkBot/WebApi/Controllers/BaseApiController.cs +++ b/ArkBot/WebApi/Controllers/BaseApiController.cs @@ -5,6 +5,8 @@ using System.Text; using System.Threading.Tasks; using System.Web.Http; +using ArkBot.Configuration; +using ArkBot.Configuration.Model; namespace ArkBot.WebApi.Controllers { @@ -40,9 +42,9 @@ public bool HasFeatureAccess(string featureGroup, string featureName, string for var accessControl = _config.AccessControl; if (accessControl == null) return false; - var fg = (Dictionary)null; + var fg = (AccessControlFeatureGroup)null; if (!accessControl.TryGetValue(featureGroup, out fg)) return false; - var rf = (string[])null; + var rf = (AccessControlFeatureRoles)null; if (!fg.TryGetValue(featureName, out rf)) return false; var user = WebApiHelper.GetUser(Request, _config); diff --git a/ArkBot/WebApi/Controllers/MapController.cs b/ArkBot/WebApi/Controllers/MapController.cs index c1255a4..98c07e8 100644 --- a/ArkBot/WebApi/Controllers/MapController.cs +++ b/ArkBot/WebApi/Controllers/MapController.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Data; using ArkBot.ViewModel; using ArkBot.WebApi.Model; diff --git a/ArkBot/WebApi/Controllers/PlayerController.cs b/ArkBot/WebApi/Controllers/PlayerController.cs index e7e2180..5bdbb04 100644 --- a/ArkBot/WebApi/Controllers/PlayerController.cs +++ b/ArkBot/WebApi/Controllers/PlayerController.cs @@ -12,6 +12,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Web.Http; +using ArkBot.Configuration.Model; namespace ArkBot.WebApi.Controllers { @@ -130,6 +131,7 @@ internal static PlayerServerViewModel BuildViewModelForTransferedPlayer( //there will be no player profile so most data cannot be set //a tribe where the player is a member may exist tho + //note: potentially there could be multiple tribes with the same player, which player.Tribe protects us against. here we just select the first one which is not optimal var tribe = context.Tribes?.FirstOrDefault(x => playerIds.Any(y => x.MemberIds.Contains((int)y))); if (tribe == null) return null; var playerId = playerIds.First(x => tribe.MemberIds.Contains((int)x)); @@ -169,7 +171,7 @@ internal static PlayerServerViewModel BuildViewModelForPlayer( bool incKibblesEggs, bool incTribeLog) { - var tribe = player.TribeId.HasValue ? context.Tribes.FirstOrDefault(x => x.Id == player.TribeId.Value) : null; + var tribe = player.Tribe; var vm = new PlayerServerViewModel { ClusterKey = context.Config.Key, @@ -210,8 +212,9 @@ internal static List BuildCreatureViewModelsForPlayerId( var result = new List(); if (context.TamedCreatures != null) { + var player = context.Players?.FirstOrDefault(x => x.Id == playerId); var playercreatures = context.NoRafts.Where(x => x.TargetingTeam == playerId || (x.OwningPlayerId.HasValue && x.OwningPlayerId == playerId)).ToArray(); - var tribe = context.Tribes?.FirstOrDefault(x => x.MemberIds.Contains((int)playerId)); + var tribe = player != null ? player.Tribe : context.Tribes?.FirstOrDefault(x => x.MemberIds.Contains((int)playerId)); var tribecreatures = tribe != null ? context.NoRafts.Where(x => x.TargetingTeam == tribe.Id && !playercreatures.Any(y => y.Id == x.Id)).ToArray() : new ArkTamedCreature[] { }; foreach (var item in playercreatures.Select(x => new { c = x, o = "player" }).Concat(tribecreatures.Select(x => new { c = x, o = "tribe" }))) { @@ -324,7 +327,7 @@ internal static PlayerClusterViewModel BuildClusterViewModelForPlayer(ArkCluster internal static List BuildKibblesAndEggsViewModelsForPlayerId(ArkServerContext context, int playerId) { var player = context.Players?.FirstOrDefault(x => x.Id == playerId); - var tribe = context.Tribes?.FirstOrDefault(x => x.MemberIds.Contains(playerId)); + var tribe = player != null ? player.Tribe : context.Tribes?.FirstOrDefault(x => x.MemberIds.Contains(playerId)); //PrimalItemConsumable_Egg_Kaprosuchus_C, PrimalItemConsumable_Egg_Kaprosuchus_Fertilized_C, PrimalItemConsumable_Egg_Wyvern_Fertilized_Lightning_C var _rEgg = new Regex(@"^PrimalItemConsumable_Egg_(?.+?)_C$", RegexOptions.Singleline); @@ -374,7 +377,7 @@ internal static List BuildKibblesAndEggsViewModelsForPlay internal static List BuildCropPlotViewModelsForPlayerId(ArkServerContext context, int playerId) { var player = context.Players?.FirstOrDefault(x => x.Id == playerId); - var tribe = context.Tribes?.FirstOrDefault(x => x.MemberIds.Contains(playerId)); + var tribe = player != null ? player.Tribe : context.Tribes?.FirstOrDefault(x => x.MemberIds.Contains(playerId)); var cropPlots = new[] { player?.Structures, tribe?.Structures }.Where(x => x != null).SelectMany(x => x).OfType().Where(x => x.PlantedCropClassName != null).ToArray(); @@ -422,7 +425,7 @@ internal static double GetFertilizerQuantityFromItems(ArkItem[] cropPlotInventor internal static List BuildElectricalGeneratorViewModelsForPlayerId(ArkServerContext context, int playerId) { var player = context.Players?.FirstOrDefault(x => x.Id == playerId); - var tribe = context.Tribes?.FirstOrDefault(x => x.MemberIds.Contains(playerId)); + var tribe = player != null ? player.Tribe : context.Tribes?.FirstOrDefault(x => x.MemberIds.Contains(playerId)); var electricalGenerators = new[] { player?.Structures, tribe?.Structures }.Where(x => x != null).SelectMany(x => x).OfType().ToArray(); @@ -431,7 +434,7 @@ internal static List BuildElectricalGeneratorViewM return new ElectricalGeneratorViewModel(x.Location) { Activated = x.Activated, - //FuelTime = x.FuelTime, + //FuelTime = x.FuelTime, PrimalItemResource_Gasoline_C , PrimalItemResource_Gasoline_JStacks_C GasolineQuantity = (int)(x.Inventory?.Where(y => y.ClassName.Equals("PrimalItemResource_Gasoline_C", StringComparison.Ordinal)).Sum(y => y.Quantity) ?? 0) }; }).OrderBy(x => x.Latitude).ThenBy(x => x.Longitude).ToList(); @@ -442,7 +445,7 @@ internal static List BuildElectricalGeneratorViewM internal static List BuildTribeLogViewModelsForPlayerId(ArkServerContext context, int playerId, int? limit = null) { var player = context.Players?.FirstOrDefault(x => x.Id == playerId); - var tribe = context.Tribes?.FirstOrDefault(x => x.MemberIds.Contains(playerId)); + var tribe = player != null ? player.Tribe : context.Tribes?.FirstOrDefault(x => x.MemberIds.Contains(playerId)); var tribelogs = tribe?.Logs?.Reverse().Take(limit ?? tribe.Logs.Length).Select(x => Data.TribeLog.FromLog(x)).ToArray() ?? new TribeLog[] { }; var results = tribelogs.Select(x => diff --git a/ArkBot/WebApi/Controllers/ServerController.cs b/ArkBot/WebApi/Controllers/ServerController.cs index 4ab1d0e..6099468 100644 --- a/ArkBot/WebApi/Controllers/ServerController.cs +++ b/ArkBot/WebApi/Controllers/ServerController.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Extensions; using ArkBot.Helpers; diff --git a/ArkBot/WebApi/Controllers/ServersController.cs b/ArkBot/WebApi/Controllers/ServersController.cs index 7d3855d..38a9fb1 100644 --- a/ArkBot/WebApi/Controllers/ServersController.cs +++ b/ArkBot/WebApi/Controllers/ServersController.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Extensions; using ArkBot.Helpers; @@ -77,20 +78,20 @@ public async Task Get() { var serverContext = _contextManager.GetServer(context.Config.Key); var status = serverContext.Steam.GetServerStatusCached(); - if (status == null || status.Item1 == null || status.Item2 == null) - { - //Server status is currently unavailable - } - else - { - var info = status.Item1; - var rules = status.Item2; - var playerinfos = status.Item3; - - var m = new Regex(@"^(?.+?)\s+-\s+\(v(?\d+\.\d+)\)?$", RegexOptions.IgnoreCase | RegexOptions.Singleline).Match(info.Name); - var name = m.Success ? m.Groups["name"].Value : info.Name; - var version = m.Success ? m.Groups["version"] : null; - var currentTime = rules.FirstOrDefault(x => x.Name == "DayTime_s")?.Value; + //if (status == null || status.Item1 == null || status.Item2 == null) + //{ + // //Server status is currently unavailable + //} + //else + //{ + var info = status?.Item1; + var rules = status?.Item2; + var playerinfos = status?.Item3; + + var m = info != null ? new Regex(@"^(?.+?)\s+-\s+\(v(?\d+\.\d+)\)?$", RegexOptions.IgnoreCase | RegexOptions.Singleline).Match(info.Name) : null; + var name = m?.Success == true ? m.Groups["name"].Value : (info?.Name ?? context.Config.Key); + var version = m?.Success == true ? m.Groups["version"] : null; + var currentTime = rules?.FirstOrDefault(x => x.Name == "DayTime_s")?.Value; var tamedDinosCount = context.TamedCreatures?.Count(); var uploadedDinosCount = context.CloudCreatures?.Count(); var wildDinosCount = context.WildCreatures?.Count(); @@ -111,11 +112,11 @@ public async Task Get() { Key = anonymizedServer?.Key ?? context.Config.Key, Name = anonymizedServer?.Name ?? name, - Address = anonymizedServer?.Address ?? context.Config.DisplayAddress ?? info.Address, + Address = anonymizedServer?.Address ?? context.Config.DisplayAddress ?? info?.Address, Version = version?.ToString(), - OnlinePlayerCount = info.Players, - OnlinePlayerMax = info.MaxPlayers, - MapName = info.Map, + OnlinePlayerCount = info?.Players ?? 0, + OnlinePlayerMax = info?.MaxPlayers ?? 0, + MapName = info?.Map, InGameTime = currentTime, TamedCreatureCount = tamedDinosCount ?? 0, CloudCreatureCount = uploadedDinosCount ?? 0, @@ -195,7 +196,7 @@ public async Task Get() } result.Servers.Add(sr); - } + //} } foreach (var context in _contextManager.Clusters) @@ -204,7 +205,7 @@ public async Task Get() { Key = context.Config.Key, ServerKeys = _contextManager.Servers - .Where(x => x.Config.Cluster.Equals(context.Config.Key, StringComparison.OrdinalIgnoreCase)) + .Where(x => x.Config.ClusterKey.Equals(context.Config.Key, StringComparison.OrdinalIgnoreCase)) .Select(x => x.Config.Key).ToArray() }; result.Clusters.Add(cc); @@ -220,7 +221,7 @@ private static AccessControlViewModel BuildViewModelForAccessControl(IConfig con { foreach (var fg in config.AccessControl) { - var acfg = new Dictionary(); + var acfg = new Dictionary>(); ac[fg.Key] = acfg; if (fg.Value == null) continue; diff --git a/ArkBot/WebApi/Controllers/StructuresController.cs b/ArkBot/WebApi/Controllers/StructuresController.cs index 5b0da21..6735f25 100644 --- a/ArkBot/WebApi/Controllers/StructuresController.cs +++ b/ArkBot/WebApi/Controllers/StructuresController.cs @@ -1,5 +1,6 @@ using Accord.Collections; using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Database; using ArkBot.Extensions; using ArkBot.Helpers; diff --git a/ArkBot/WebApi/Controllers/WildCreaturesController.cs b/ArkBot/WebApi/Controllers/WildCreaturesController.cs index 3c139ed..bc3e079 100644 --- a/ArkBot/WebApi/Controllers/WildCreaturesController.cs +++ b/ArkBot/WebApi/Controllers/WildCreaturesController.cs @@ -1,4 +1,5 @@ using ArkBot.Ark; +using ArkBot.Configuration.Model; using ArkBot.Data; using ArkBot.Database; using ArkBot.Extensions; diff --git a/ArkBot/WebApi/Model/AccessControlViewModel.cs b/ArkBot/WebApi/Model/AccessControlViewModel.cs index 7060929..c2779bf 100644 --- a/ArkBot/WebApi/Model/AccessControlViewModel.cs +++ b/ArkBot/WebApi/Model/AccessControlViewModel.cs @@ -6,7 +6,7 @@ namespace ArkBot.WebApi.Model { - public class AccessControlViewModel : Dictionary> + public class AccessControlViewModel : Dictionary>> { public AccessControlViewModel() { diff --git a/ArkBot/WebApi/Model/CropPlotViewModel.cs b/ArkBot/WebApi/Model/CropPlotViewModel.cs index fef94aa..81a50b5 100644 --- a/ArkBot/WebApi/Model/CropPlotViewModel.cs +++ b/ArkBot/WebApi/Model/CropPlotViewModel.cs @@ -21,14 +21,32 @@ public class CropPlotViewModel : StructureBase { "PrimalItemConsumable_Seed_Tintoberry_C", "Tintoberry" }, { "PrimalItemConsumable_Seed_Mejoberry_C", "Mejoberry" }, { "PrimalItemConsumable_Seed_Stimberry_C", "Stimberry" }, - { "PrimalItemConsumable_Seed_Narcoberry_C", "Narcoberry" } + { "PrimalItemConsumable_Seed_Narcoberry_C", "Narcoberry" }, + { "PrimalItemConsumable_Seed_PlantSpeciesZ_C", "Plant Species Z" }, + { "PrimalItemConsumable_Seed_Amarberry_JStacks_C", "Amarberry" }, + { "PrimalItemConsumable_Seed_Azulberry_JStacks_C", "Azulberry" }, + { "PrimalItemConsumable_Seed_Citronal_JStacks_C", "Citronal" }, + { "PrimalItemConsumable_Seed_DefensePlant_JStacks_C", "Plant Species X" }, + { "PrimalItemConsumable_Seed_Longrass_JStacks_C", "Longrass" }, + { "PrimalItemConsumable_Seed_Mejoberry_JStacks_C", "Mejoberry" }, + { "PrimalItemConsumable_Seed_Narcoberry_JStacks_C", "Narcoberry" }, + { "PrimalItemConsumable_Seed_Rockarrot_JStacks_C", "Rockarrot" }, + { "PrimalItemConsumable_Seed_Savoroot_JStacks_C", "Savoroot" }, + { "PrimalItemConsumable_Seed_Stimberry_JStacks_C", "Stimberry" }, + { "PrimalItemConsumable_Seed_Tintoberry_JStacks_C", "Tintoberry" }, + { "PrimalItemConsumable_Seed_PlantSpeciesY_JStacks_C", "Plant Species Y" }, + { "PrimalItemConsumable_Seed_PlantSpeciesZ_JStacks_C", "Plant Species Z" } + }; static readonly private Dictionary _sizes = new Dictionary { { "CropPlotSmall_SM_C", "Small" }, { "CropPlotMedium_SM_C", "Medium" }, - { "CropPlotLarge_SM_C", "Large" } + { "CropPlotLarge_SM_C", "Large" }, + { "BP_CropPlot_Small_C", "Small" }, + { "BP_CropPlot_Medium_C", "Medium" }, + { "BP_CropPlot_Large_C", "Large" } }; public CropPlotViewModel(ArkSavegameToolkitNet.Domain.ArkLocation location) : base(location) @@ -38,7 +56,7 @@ public CropPlotViewModel(ArkSavegameToolkitNet.Domain.ArkLocation location) : ba public string ClassName { get; set; } //public float FertilizerAmount { get; set; } public int FertilizerQuantity { get; set; } - public int FertilizerMax => 54000 * 10; + public int FertilizerMax => 54000 * 30; public float WaterAmount { get; set; } public string PlantedCropClassName { get; set; } public string PlantedCropName diff --git a/ArkBot/WebApi/WebApiStartup.cs b/ArkBot/WebApi/WebApiStartup.cs index f6c28a2..7c293b4 100644 --- a/ArkBot/WebApi/WebApiStartup.cs +++ b/ArkBot/WebApi/WebApiStartup.cs @@ -25,6 +25,8 @@ using System.Security.Claims; using Microsoft.Owin.Security.Jwt; using Microsoft.Owin.Security.Cookies; +using ArkBot.Configuration.Model; +using ArkBot.OpenID; namespace ArkBot.WebApi { @@ -77,7 +79,7 @@ public void Configuration(IAppBuilder appBuilder, IConfig _config, IContainer co AuthenticationMode = Microsoft.Owin.Security.AuthenticationMode.Passive, }); - appBuilder.UseSteamAuthentication(applicationKey: _config.SteamApiKey); + appBuilder.UseSteamAuthenticationNew(applicationKey: _config.SteamApiKey); appBuilder.UseWebApi(config); appBuilder.MapSignalR(hubConfig); diff --git a/ArkBot/WebApp/WebAppStartup.cs b/ArkBot/WebApp/WebAppStartup.cs index 4202442..a0c6df8 100644 --- a/ArkBot/WebApp/WebAppStartup.cs +++ b/ArkBot/WebApp/WebAppStartup.cs @@ -1,4 +1,4 @@ -using ArkBot.ViewModel; +using ArkBot.ViewModel; using Autofac; using Autofac.Core; using Autofac.Integration.SignalR; @@ -20,6 +20,10 @@ using System.Web.Http; using Nancy.Conventions; using System.IO; +using Nancy.Bootstrappers.Autofac; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using ArkBot.Configuration.Model; namespace ArkBot.WebApp { @@ -35,7 +39,7 @@ public void Configuration(IAppBuilder appBuilder, IConfig _config, IContainer co appBuilder.UseCors(CorsOptions.AllowAll); appBuilder.UseNancy(new Nancy.Owin.NancyOptions { - Bootstrapper = new CustomBootstrapper() + Bootstrapper = new CustomBootstrapper(container) }); //appBuilder.UseFileServer(new FileServerOptions //{ @@ -45,8 +49,20 @@ public void Configuration(IAppBuilder appBuilder, IConfig _config, IContainer co } } - public class CustomBootstrapper : DefaultNancyBootstrapper, IRootPathProvider + public class CustomBootstrapper : AutofacNancyBootstrapper, IRootPathProvider { + private IContainer _container; + + public CustomBootstrapper(IContainer container) + { + _container = container; + } + + protected override ILifetimeScope GetApplicationContainer() + { + return _container; + } + protected override void ConfigureConventions(NancyConventions nancyConventions) { base.ConfigureConventions(nancyConventions); @@ -69,14 +85,25 @@ public string GetRootPath() public class SinglePageApplicationModule : NancyModule { - public SinglePageApplicationModule() + private IConfig _config; + + public SinglePageApplicationModule(IConfig config) { + _config = config; + Get[""] = _ => { return Response.AsFile(@"index.html"); }; Get[@"^(?.*)$"] = parameters => { + if (parameters["path"].Value.Equals("config.js")) + { + var portStr = new Regex(@":(?\d+)(?:/|$)").Match(_config.WebApiListenPrefix)?.Groups["port"].Value; + var success = int.TryParse(portStr, out var port); + var js = $"var config = {JsonConvert.SerializeObject(new { webapi = new { port = success ? port : (int?)null } }, Formatting.None)};"; + return Response.AsText(js, "application/javascript"); + } if (File.Exists(Path.Combine(Response.RootPath, parameters["path"].Value))) return Response.AsFile((string)parameters["path"].Value); return Response.AsFile(@"index.html"); }; diff --git a/ArkBot/WebApp/dist/index.html b/ArkBot/WebApp/dist/index.html index 2d2fb66..2b3b6af 100644 --- a/ArkBot/WebApp/dist/index.html +++ b/ArkBot/WebApp/dist/index.html @@ -9,6 +9,7 @@ + @@ -18,5 +19,5 @@

Loading...

- + diff --git a/ArkBot/WebApp/dist/inline.8d8c7910f2f1b97eeb2d.bundle.js b/ArkBot/WebApp/dist/inline.8d8c7910f2f1b97eeb2d.bundle.js new file mode 100644 index 0000000..3660f8b --- /dev/null +++ b/ArkBot/WebApp/dist/inline.8d8c7910f2f1b97eeb2d.bundle.js @@ -0,0 +1 @@ +!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,c,a){for(var u,i,f,l=0,s=[];l/gi,window.location.protocol).replace(/\/gi,window.location.hostname)},l.ctorParameters=function(){return[{type:t.e}]},l}()},"+SUW":function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},"+T68":function(l,n,u){"use strict";function t(l){return ll._24(0,[(l()(),ll._25(0,null,null,7,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,4,"div",[["class","w3-panel theme-l2"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"h3",[["class","theme-text-l1-light"]],null,null,null,null,null)),(l()(),ll._26(null,["Loading..."])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,[" \n"]))],null,null)}function e(l){return ll._24(0,[(l()(),ll._25(0,null,null,10,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,7,"div",[["class","w3-panel w3-red"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),ll._26(null,["Error!"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),ll._26(null,["No data could be loaded for the given server key."])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,[" \n"]))],null,null)}function r(l){return ll._24(0,[(l()(),ll._26(null,["\n Character Name\n "]))],null,null)}function i(l){return ll._24(0,[(l()(),ll._25(0,null,null,2,"a",[],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==ll._29(l,1).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),ll._27(335872,null,0,nl.D,[nl.g,nl.v,ul.f],{routerLink:[0,"routerLink"]},null),(l()(),ll._26(null,["",""]))],function(l,n){l(n,1,0,"/player/"+n.parent.context.$implicit.SteamId)},function(l,n){l(n,0,0,ll._29(n,1).target,ll._29(n,1).href),l(n,2,0,n.parent.context.$implicit.CharacterName)})}function a(l){return ll._24(0,[(l()(),ll._26(null,["",""]))],null,function(l,n){l(n,0,0,n.parent.context.$implicit.CharacterName)})}function o(l){return ll._24(0,[(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,2,null,i)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),ll._34(65536,ul.q,[ll.O]),(l()(),ll._28(0,[["player_no_link",2]],null,0,null,a)),(l()(),ll._26(null,["\n "]))],function(l,n){var u=n.component;l(n,2,0,ll._33(n,2,0,ll._29(n,3).transform(u.dataService.hasFeatureAccessObservable("pages","player",n.context.$implicit.SteamId))),ll._29(n,4))},null)}function s(l){return ll._24(0,[(l()(),ll._26(null,["\n Tribe Name\n "]))],null,null)}function c(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "]))],null,function(l,n){l(n,0,0,n.context.$implicit.TribeName)})}function _(l){return ll._24(0,[(l()(),ll._26(null,["\n Last Active\n "]))],null,null)}function p(l){return ll._24(0,[(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"relative-time",[],null,null,null,tl.a,tl.b)),ll._27(122880,null,0,el.a,[ll.O],{time:[0,"time"]},null),(l()(),ll._26(null,["\n "]))],function(l,n){l(n,2,0,n.context.$implicit.LastActiveTime)},null)}function d(l){return ll._24(0,[(l()(),ll._25(0,null,null,49,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["Players"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,43,"ark-data-table",[["orderByColumn","last_active"],["trackByProp","Id"]],null,null,null,rl.a,rl.b)),ll._27(57344,null,2,il.a,[ll.O],{rows:[0,"rows"],trackByProp:[1,"trackByProp"],sortFunctions:[2,"sortFunctions"],orderByColumn:[3,"orderByColumn"]},null),ll._35(301989888,1,{modeTemplates:1}),ll._35(301989888,2,{columnTemplates:1}),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"ark-dt-mode",[["columnKeys","character_name,tribe_name,last_active"],["key","default"],["name","Default"]],null,null,null,null,null)),ll._27(8192,[[1,4]],0,al.a,[],{key:[0,"key"],name:[1,"name"],columnKeys:[2,"columnKeys"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","character_name"],["thenSort","last_active"],["title","Sort by Character Name"]],null,null,null,null,null)),ll._27(8192,[[2,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,3,{cellTemplate:0}),ll._35(167772160,4,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[4,2]],null,1,null,r)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[3,2]],null,1,null,o)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","tribe_name"],["thenSort","character_name"],["title","Sort by Tribe Name"]],null,null,null,null,null)),ll._27(8192,[[2,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,5,{cellTemplate:0}),ll._35(167772160,6,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[6,2]],null,1,null,s)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[5,2]],null,1,null,c)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","last_active"],["thenSort","character_name"],["title","Sort by Last Active"]],null,null,null,null,null)),ll._27(8192,[[2,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,7,{cellTemplate:0}),ll._35(167772160,8,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[8,2]],null,1,null,_)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[7,2]],null,1,null,p)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n"]))],function(l,n){var u=n.component;l(n,6,0,u.filteredPlayers,"Id",u.playerSortFunctions,"last_active"),l(n,11,0,"default","Default","character_name,tribe_name,last_active"),l(n,14,0,"character_name","last_active","Sort by Character Name",!0),l(n,26,0,"tribe_name","character_name","Sort by Tribe Name",!0),l(n,38,0,"last_active","character_name","Sort by Last Active",!0)},null)}function f(l){return ll._24(0,[(l()(),ll._26(null,["\n Tribe Name\n "]))],null,null)}function m(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "]))],null,function(l,n){l(n,0,0,n.context.$implicit.Name)})}function h(l){return ll._24(0,[(l()(),ll._26(null,["\n Members\n "]))],null,null)}function v(l){return ll._24(0,[(l()(),ll._25(0,null,null,2,"a",[],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==ll._29(l,1).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),ll._27(335872,null,0,nl.D,[nl.g,nl.v,ul.f],{routerLink:[0,"routerLink"]},null),(l()(),ll._26(null,["",""]))],function(l,n){l(n,1,0,"/player/"+n.parent.context.$implicit)},function(l,n){var u=n.component;l(n,0,0,ll._29(n,1).target,ll._29(n,1).href);var t=null;l(n,2,0,(null==(t=u.getTribeMember(n.parent.context.$implicit))?null:t.CharacterName)||n.parent.context.$implicit)})}function g(l){return ll._24(0,[(l()(),ll._26(null,["",""]))],null,function(l,n){var u=n.component,t=null;l(n,0,0,(null==(t=u.getTribeMember(n.parent.context.$implicit))?null:t.CharacterName)||n.parent.context.$implicit)})}function y(l){return ll._24(0,[(l()(),ll._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),ll._26(null,[", "]))],null,null)}function S(l){return ll._24(0,[(l()(),ll._25(0,null,null,5,"span",[],null,null,null,null,null)),(l()(),ll._28(8388608,null,null,1,null,v)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),(l()(),ll._28(0,[["tribe_member_no_link",2]],null,0,null,g)),(l()(),ll._28(8388608,null,null,1,null,y)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null)],function(l,n){l(n,2,0,n.component.dataService.hasFeatureAccess("pages","player",n.context.$implicit),ll._29(n,3)),l(n,5,0,!n.context.last)},null)}function b(l){return ll._24(0,[(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,S)),ll._27(401408,null,0,ul.n,[ll.S,ll._5,ll.v],{ngForOf:[0,"ngForOf"]},null),(l()(),ll._26(null,["\n "]))],function(l,n){l(n,2,0,n.context.$implicit.MemberSteamIds)},null)}function w(l){return ll._24(0,[(l()(),ll._26(null,["\n Last Active\n "]))],null,null)}function k(l){return ll._24(0,[(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"relative-time",[],null,null,null,tl.a,tl.b)),ll._27(122880,null,0,el.a,[ll.O],{time:[0,"time"]},null),(l()(),ll._26(null,["\n "]))],function(l,n){l(n,2,0,n.context.$implicit.LastActiveTime)},null)}function C(l){return ll._24(0,[(l()(),ll._25(0,null,null,49,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["Tribes"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,43,"ark-data-table",[["orderByColumn","last_active"],["trackByProp","Id"]],null,null,null,rl.a,rl.b)),ll._27(57344,null,2,il.a,[ll.O],{rows:[0,"rows"],trackByProp:[1,"trackByProp"],sortFunctions:[2,"sortFunctions"],orderByColumn:[3,"orderByColumn"]},null),ll._35(301989888,9,{modeTemplates:1}),ll._35(301989888,10,{columnTemplates:1}),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"ark-dt-mode",[["columnKeys","tribe_name,members,last_active"],["key","default"],["name","Default"]],null,null,null,null,null)),ll._27(8192,[[9,4]],0,al.a,[],{key:[0,"key"],name:[1,"name"],columnKeys:[2,"columnKeys"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","tribe_name"],["thenSort","last_active"],["title","Sort by Tribe Name"]],null,null,null,null,null)),ll._27(8192,[[10,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,11,{cellTemplate:0}),ll._35(167772160,12,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[12,2]],null,1,null,f)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[11,2]],null,1,null,m)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","members"]],null,null,null,null,null)),ll._27(8192,[[10,4]],2,ol.a,[],{key:[0,"key"]},null),ll._35(167772160,13,{cellTemplate:0}),ll._35(167772160,14,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[14,2]],null,1,null,h)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[13,2]],null,1,null,b)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","last_active"],["thenSort","tribe_name"],["title","Sort by Last Active"]],null,null,null,null,null)),ll._27(8192,[[10,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,15,{cellTemplate:0}),ll._35(167772160,16,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[16,2]],null,1,null,w)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[15,2]],null,1,null,k)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n"]))],function(l,n){var u=n.component;l(n,6,0,u.filteredTribes,"Id",u.tribeSortFunctions,"last_active"),l(n,11,0,"default","Default","tribe_name,members,last_active"),l(n,14,0,"tribe_name","last_active","Sort by Tribe Name",!0),l(n,26,0,"members"),l(n,38,0,"last_active","tribe_name","Sort by Last Active",!0)},null)}function I(l){return ll._24(0,[(l()(),ll._26(null,["\n Species\n "]))],null,null)}function x(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "]))],null,function(l,n){l(n,0,0,n.context.$implicit.Name)})}function O(l){return ll._24(0,[(l()(),ll._26(null,["\n Class Name\n "]))],null,null)}function A(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "]))],null,function(l,n){l(n,0,0,n.context.$implicit.ClassName)})}function T(l){return ll._24(0,[(l()(),ll._26(null,["\n Aliases\n "]))],null,null)}function F(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "]))],null,function(l,n){l(n,0,0,n.context.$implicit.Aliases.length>0?n.context.$implicit.Aliases.join(", "):"")})}function M(l){return ll._24(0,[(l()(),ll._26(null,["\n Count\n "]))],null,null)}function L(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "])),ll._32(1)],null,function(l,n){l(n,0,0,ll._33(n,0,0,l(n,1,0,ll._29(n.parent.parent,0),n.context.$implicit.Count)))})}function P(l){return ll._24(0,[(l()(),ll._26(null,["\n Fraction\n "]))],null,null)}function N(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "])),ll._32(2)],null,function(l,n){l(n,0,0,ll._33(n,0,0,l(n,1,0,ll._29(n.parent.parent,1),n.context.$implicit.Fraction,"1.0-4")))})}function B(l){return ll._24(0,[(l()(),ll._25(0,null,null,76,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,4,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["Wild Statistics "])),(l()(),ll._25(0,null,null,2,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["",""])),ll._32(1),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,67,"ark-data-table",[["orderByColumn","species"],["trackByProp","ClassName"]],null,null,null,rl.a,rl.b)),ll._27(57344,null,2,il.a,[ll.O],{rows:[0,"rows"],trackByProp:[1,"trackByProp"],sortFunctions:[2,"sortFunctions"],orderByColumn:[3,"orderByColumn"]},null),ll._35(301989888,17,{modeTemplates:1}),ll._35(301989888,18,{columnTemplates:1}),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"ark-dt-mode",[["columnKeys","species,class_name,aliases,count,fraction"],["key","default"],["name","Default"]],null,null,null,null,null)),ll._27(8192,[[17,4]],0,al.a,[],{key:[0,"key"],name:[1,"name"],columnKeys:[2,"columnKeys"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","species"],["thenSort","count"],["title","Sort by Species"]],null,null,null,null,null)),ll._27(8192,[[18,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,19,{cellTemplate:0}),ll._35(167772160,20,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[20,2]],null,1,null,I)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[19,2]],null,1,null,x)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","class_name"],["thenSort","count"],["title","Sort by Class Name"]],null,null,null,null,null)),ll._27(8192,[[18,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,21,{cellTemplate:0}),ll._35(167772160,22,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[22,2]],null,1,null,O)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[21,2]],null,1,null,A)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","aliases"]],null,null,null,null,null)),ll._27(8192,[[18,4]],2,ol.a,[],{key:[0,"key"]},null),ll._35(167772160,23,{cellTemplate:0}),ll._35(167772160,24,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[24,2]],null,1,null,T)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[23,2]],null,1,null,F)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","count"],["thenSort","species"],["title","Sort by Count"]],null,null,null,null,null)),ll._27(8192,[[18,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,25,{cellTemplate:0}),ll._35(167772160,26,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[26,2]],null,1,null,M)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[25,2]],null,1,null,L)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","fraction"],["thenSort","species"],["title","Sort by Fraction"]],null,null,null,null,null)),ll._27(8192,[[18,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,27,{cellTemplate:0}),ll._35(167772160,28,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[28,2]],null,1,null,P)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[27,2]],null,1,null,N)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n"]))],function(l,n){var u=n.component;l(n,9,0,u.wild.Statistics.Species,"ClassName",u.wildStatisticsSortFunctions,"species"),l(n,14,0,"default","Default","species,class_name,aliases,count,fraction"),l(n,17,0,"species","count","Sort by Species",!0),l(n,29,0,"class_name","count","Sort by Class Name",!0),l(n,41,0,"aliases"),l(n,53,0,"count","species","Sort by Count",!0),l(n,65,0,"fraction","species","Sort by Fraction",!0)},function(l,n){var u=n.component;l(n,5,0,ll._33(n,5,0,l(n,6,0,ll._29(n.parent,0),(null==u.wild.Statistics.Species?null:u.wild.Statistics.Species.length)||0)))})}function K(l){return ll._24(0,[(l()(),ll._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),ll._26(null,["There are no creatures..."]))],null,null)}function j(l){return ll._24(0,[(l()(),ll._25(0,null,null,3,"option",[],null,null,null,null,null)),ll._27(73728,null,0,sl.k,[ll.K,ll.J,[2,sl.l]],{value:[0,"value"]},null),ll._27(73728,null,0,sl.m,[ll.K,ll.J,[8,null]],{value:[0,"value"]},null),(l()(),ll._26(null,["",""]))],function(l,n){l(n,1,0,n.context.$implicit),l(n,2,0,n.context.$implicit)},function(l,n){l(n,3,0,n.component.wild.Species[n.context.$implicit].Name||n.context.$implicit)})}function $(l){return ll._24(0,[(l()(),ll._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("stats")&&t}return t},null,null)),ll._27(139264,null,0,ul.m,[ll.v,ll.w,ll.K,ll.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),ll._31(["theme-d1"]),(l()(),ll._26(null,["Base Stats"]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.activeCreaturesMode("stats")))},function(l,n){l(n,0,0,100/n.component.numCreatureTabs())})}function R(l){return ll._24(0,[(l()(),ll._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("ids")&&t}return t},null,null)),ll._27(139264,null,0,ul.m,[ll.v,ll.w,ll.K,ll.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),ll._31(["theme-d1"]),(l()(),ll._26(null,["IDs"]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.activeCreaturesMode("ids")))},function(l,n){l(n,0,0,100/n.component.numCreatureTabs())})}function D(l){return ll._24(0,[(l()(),ll._25(0,null,null,12,"div",[["class","w3-bar theme-l2 w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("status")&&t}return t},null,null)),ll._27(139264,null,0,ul.m,[ll.v,ll.w,ll.K,ll.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),ll._31(["theme-d1"]),(l()(),ll._26(null,["Overview"])),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,$)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,R)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,"w3-bar-item w3-button w3-mobile",l(n,4,0,u.activeCreaturesMode("status"))),l(n,8,0,u.dataService.hasFeatureAccess("server","wildcreatures-basestats")),l(n,11,0,u.dataService.hasFeatureAccess("server","wildcreatures-ids"))},function(l,n){l(n,2,0,100/n.component.numCreatureTabs())})}function E(l){return ll._24(0,[(l()(),ll._25(0,null,null,16,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by X"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("x")&&t}return t},null,null)),(l()(),ll._26(null,["X"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Y"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("y")&&t}return t},null,null)),(l()(),ll._26(null,["Y"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Z"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("z")&&t}return t},null,null)),(l()(),ll._26(null,["Z"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Latitude"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("latitude")&&t}return t},null,null)),(l()(),ll._26(null,["Lat"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Longitude"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("longitude")&&t}return t},null,null)),(l()(),ll._26(null,["Lng"])),(l()(),ll._26(null,["\n "]))],null,null)}function U(l){return ll._24(0,[(l()(),ll._25(0,null,null,23,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Health"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_health")&&t}return t},null,null)),(l()(),ll._26(null,["HP"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Stamina"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_stamina")&&t}return t},null,null)),(l()(),ll._26(null,["ST"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Oxygen"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_oxygen")&&t}return t},null,null)),(l()(),ll._26(null,["OX"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Food"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_food")&&t}return t},null,null)),(l()(),ll._26(null,["FO"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Weight"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_weight")&&t}return t},null,null)),(l()(),ll._26(null,["WE"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Melee"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_melee")&&t}return t},null,null)),(l()(),ll._26(null,["ME"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Speed"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_speed")&&t}return t},null,null)),(l()(),ll._26(null,["SP"])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "]))],null,null)}function z(l){return ll._24(0,[(l()(),ll._25(0,null,null,7,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by ID1"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("id1")&&t}return t},null,null)),(l()(),ll._26(null,["ID1"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by ID2"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("id2")&&t}return t},null,null)),(l()(),ll._26(null,["ID2"])),(l()(),ll._26(null,["\n "]))],null,null)}function J(l){return ll._24(0,[(l()(),ll._25(0,null,null,2,"tr",[],null,null,null,null,null)),(l()(),ll._25(0,null,null,1,"td",[],[[8,"colSpan",0]],null,null,null,null)),(l()(),ll._26(null,["No matching creatures..."]))],null,function(l,n){var u=n.component;l(n,1,0,u.activeCreaturesMode("status")?8:u.activeCreaturesMode("stats")?10:5)})}function G(l){return ll._24(0,[(l()(),ll._25(0,null,null,18,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),ll._32(2),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),ll._32(2),(l()(),ll._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.parent.context.$implicit.X),l(n,6,0,n.parent.context.$implicit.Y),l(n,9,0,n.parent.context.$implicit.Z),l(n,12,0,ll._33(n,12,0,l(n,13,0,ll._29(n.parent.parent.parent.parent,0),n.parent.context.$implicit.Latitude,"1.1-1"))),l(n,16,0,ll._33(n,16,0,l(n,17,0,ll._29(n.parent.parent.parent.parent,0),n.parent.context.$implicit.Longitude,"1.1-1")))})}function H(l){return ll._24(0,[(l()(),ll._25(0,null,null,23,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "]))],null,function(l,n){l(n,3,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Health),l(n,6,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Stamina),l(n,9,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Oxygen),l(n,12,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Food),l(n,15,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Weight),l(n,18,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Melee),l(n,21,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.MovementSpeed)})}function X(l){return ll._24(0,[(l()(),ll._25(0,null,null,7,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.parent.context.$implicit.Id1),l(n,6,0,n.parent.context.$implicit.Id2)})}function W(l){return ll._24(0,[(l()(),ll._25(0,null,null,19,"tr",[],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,G)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,H)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,X)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "]))],function(l,n){var u=n.component;l(n,12,0,u.activeCreaturesMode("status")),l(n,15,0,u.activeCreaturesMode("stats")),l(n,18,0,u.activeCreaturesMode("ids"))},function(l,n){var u=n.component;l(n,3,0,n.context.$implicit.Gender),l(n,6,0,n.context.$implicit.BaseLevel),l(n,9,0,u.wild.Species[u.selectedSpecies].IsTameable&&1==n.context.$implicit.IsTameable?"Yes":"No")})}function V(l){return ll._24(0,[(l()(),ll._25(0,null,null,55,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,9,"select",[["class","w3-select w3-border w3-round-xlarge w3-large w3-margin-bottom border-theme theme-l1"],["style","padding: 8px;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(l,n,u){var t=!0,e=l.component;if("change"===n){t=!1!==ll._29(l,3).onChange(u.target.value)&&t}if("blur"===n){t=!1!==ll._29(l,3).onTouched()&&t}if("ngModelChange"===n){e.selectedSpecies=u;t=!1!==e.filterAndSortWild()&&t}return t},null,null)),ll._27(8192,null,0,sl.l,[ll.J,ll.K],null,null),ll._37(512,null,sl.g,function(l){return[l]},[sl.l]),ll._27(335872,null,0,sl.h,[[8,null],[8,null],[8,null],[2,sl.g]],{model:[0,"model"]},{update:"ngModelChange"}),ll._37(1024,null,sl.i,null,[sl.h]),ll._27(8192,null,0,sl.j,[sl.i],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,j)),ll._27(401408,null,0,ul.n,[ll.S,ll._5,ll.v],{ngForOf:[0,"ngForOf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,D)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,37,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,34,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,22,"thead",[],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,19,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Gender"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("gender")&&t}return t},null,null)),(l()(),ll._26(null,["Gender"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Base Level"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("base_level")&&t}return t},null,null)),(l()(),ll._26(null,["Base Level"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Tameable"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("tameable")&&t}return t},null,null)),(l()(),ll._26(null,["Tameable"])),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,E)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,U)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,z)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,7,"tbody",[],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,J)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,W)),ll._27(401408,null,0,ul.n,[ll.S,ll._5,ll.v],{ngForOf:[0,"ngForOf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "]))],function(l,n){var u=n.component;l(n,5,0,u.selectedSpecies),l(n,10,0,u.species),l(n,15,0,u.numCreatureTabs()>1),l(n,35,0,u.activeCreaturesMode("status")),l(n,38,0,u.activeCreaturesMode("stats")),l(n,41,0,u.activeCreaturesMode("ids")),l(n,48,0,!((null==u.filteredCreatures?null:u.filteredCreatures.length)>0)),l(n,51,0,u.filteredCreatures)},function(l,n){l(n,2,0,ll._29(n,7).ngClassUntouched,ll._29(n,7).ngClassTouched,ll._29(n,7).ngClassPristine,ll._29(n,7).ngClassDirty,ll._29(n,7).ngClassValid,ll._29(n,7).ngClassInvalid,ll._29(n,7).ngClassPending)})}function Y(l){return ll._24(0,[(l()(),ll._25(0,null,null,26,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,17,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),ll._25(0,null,null,0,"a",[["id","creatures"]],null,null,null,null,null)),(l()(),ll._25(0,null,null,8,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),ll._26(null,["Wild Creatures "])),(l()(),ll._25(0,null,null,2,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["",""])),ll._32(1),(l()(),ll._26(null,[" / "])),(l()(),ll._25(0,null,null,2,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["",""])),ll._32(1),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,2,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),ll._25(0,null,null,1,"button",[["class","w3-button theme-d1 w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.openMap(u)&&t}return t},null,null)),(l()(),ll._26(null,["Show Map"])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,K)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,V)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"]))],function(l,n){var u=n.component;l(n,22,0,!((null==u.species?null:u.species.length)>0)),l(n,25,0,(null==u.species?null:u.species.length)>0)},function(l,n){var u=n.component;l(n,9,0,ll._33(n,9,0,l(n,10,0,ll._29(n.parent,0),(null==u.filteredCreatures?null:u.filteredCreatures.length)||0))),l(n,13,0,ll._33(n,13,0,l(n,14,0,ll._29(n.parent,0),(null==u.wild?null:null==u.wild.Statistics?null:u.wild.Statistics.CreatureCount)||0)))})}function q(l){return ll._24(0,[ll._34(0,ul.p,[ll.t]),ll._34(0,ul.r,[ll.t]),(l()(),ll._28(8388608,null,null,1,null,t)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._28(8388608,null,null,1,null,e)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._28(8388608,null,null,1,null,d)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._28(8388608,null,null,1,null,C)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._28(8388608,null,null,1,null,B)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._28(8388608,null,null,1,null,Y)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._25(0,null,null,17,"div",[["class","w3-modal"],["id","modal_map"]],[[4,"display",null]],null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,14,"div",[["class","w3-modal-content w3-card-4 w3-animate-zoom"],["style","font-size: 0;"]],null,[[null,"clickOutside"],["document","click"]],function(l,n,u){var t=!0,e=l.component;if("document:click"===n){t=!1!==ll._29(l,23).onClick(u,u.target)&&t}if("clickOutside"===n){t=!1!==e.closeMap(u)&&t}return t},null,null)),ll._27(8192,null,0,_l.a,[ll.K],null,{clickOutside:"clickOutside"}),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),ll._26(null,[" \n "])),(l()(),ll._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!=(e.showMap=!1)&&t}return t},null,null)),(l()(),ll._26(null,["×"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),ll._26(null,["Map"])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"arkmap",[],null,null,null,pl.a,pl.b)),ll._27(286720,null,0,dl.a,[],{mapName:[0,"mapName"],points:[1,"points"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,0==u.loaded||(u.isMenuActive("wildcreatures")||u.isMenuActive("wildcreatures-statistics"))&&0==u.creaturesLoaded),l(n,6,0,1==u.loaded&&null==u.server),l(n,9,0,u.isMenuActive("players")&&u.server&&u.dataService.hasFeatureAccess("server","players")),l(n,12,0,u.isMenuActive("tribes")&&u.server&&u.dataService.hasFeatureAccess("server","tribes")),l(n,15,0,u.isMenuActive("wildcreatures-statistics")&&u.creaturesLoaded&&u.dataService.hasFeatureAccess("server","wildcreatures-statistics")),l(n,18,0,u.isMenuActive("wildcreatures")&&u.creaturesLoaded&&u.dataService.hasFeatureAccess("server","wildcreatures")),l(n,35,0,null==u.server?null:u.server.MapName,u.points)},function(l,n){l(n,20,0,n.component.showMap?"block":"none")})}function Q(l){return ll._24(0,[(l()(),ll._25(0,null,null,1,"app-server",[],null,null,null,q,yl)),ll._27(122880,null,0,cl.a,[nl.v,nl.g,fl.a,ml.a,hl.a,vl.a,ll.O],null,null)],function(l,n){l(n,1,0)},null)}var Z=u("ZfYc"),ll=u("3j3K"),nl=u("5oXY"),ul=u("2Je8"),tl=u("6Nb/"),el=u("0onv"),rl=u("fYAd"),il=u("0jRk"),al=u("joX7"),ol=u("jWPz"),sl=u("NVOs"),cl=u("qn86"),_l=u("8zLQ"),pl=u("I9JA"),dl=u("5305"),fl=u("lHWG"),ml=u("ATz5"),hl=u("+Lwu"),vl=u("XLrO");u.d(n,"a",function(){return Sl});var gl=[Z.a],yl=ll._23({encapsulation:0,styles:gl,data:{}}),Sl=ll._30("app-server",cl.a,Q,{},{},[])},"+qYp":function(l,n,u){"use strict";var t=u("ATz5"),e=u("3MNG"),r=u("+Lwu");u.d(n,"a",function(){return i});var i=function(){function l(l,n,u){this.dataService=l,this.messageService=n,this.notificationsService=u,this.menuOption=void 0}return l.prototype.ngOnInit=function(){var l=this;this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){return l.showServerUpdateNotification(n)}),this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n})},l.prototype.ngOnDestroy=function(){this.serverUpdatedSubscription.unsubscribe(),this.menuOptionSubscription.unsubscribe()},l.prototype.showServerUpdateNotification=function(l){this.notificationsService.success("Server Update",l+" was updated; Reloading data...",{showProgressBar:!0,pauseOnHover:!0,clickToClose:!0})},l.prototype.isMenuActive=function(l){return this.menuOption==l},l.ctorParameters=function(){return[{type:t.a},{type:r.a},{type:e.a}]},l}()},"+rAa":function(l,n,u){"use strict";function t(l,n,u,t){var e=i(l,n,u);if(void 0!=e)return e;var r=Math.pow(10,t),a=void 0!=t?Math.round(l*r)/r:l,o=void 0!=t?Math.round(n*r)/r:n;return a>o?u?1:-1:an?u?1:-1:l0&&(this._currentMode=this._modes[0].key)}}},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnTemplates",{set:function(l){if(l){var n=l.toArray();if(n.length){for(var u=[],t=0,e=n;t=this._rows.length&&(n=this._rows.length-1),this._fromRow=parseInt(""+n),this.ref.markForCheck()},l.prototype.setViewOffsetRelative=function(l){this.setViewOffset(this._fromRow+l)},l.prototype.setFirstPage=function(){this.isFirstPage()||this.setViewOffset(0)},l.prototype.setPrevPage=function(){this.isFirstPage()||this.setViewOffsetRelative(-this._numRows)},l.prototype.setNextPage=function(){this.isLastPage()||this.setViewOffsetRelative(this._numRows)},l.prototype.setLastPage=function(){this.isLastPage()||this.setViewOffset(this._rows.length-this._numRows)},l.prototype.isFirstPage=function(){return this._fromRow<=0},l.prototype.isLastPage=function(){return this._fromRow>=this._rows.length-this._numRows},l.prototype.setViewLimit=function(l){this._numRows=parseInt(""+(l>0?l:1e6)),this.ref.markForCheck()},l.prototype.getLastRowOffset=function(){var l=this._fromRow+this._numRows;return l>this._rows.length?this._rows.length:l},l.ctorParameters=function(){return[{type:t.O}]},l}()},"0onv":function(l,n,u){"use strict";var t=u("3j3K"),e=u("Gvdl"),r=(u.n(e),u("PJh5"));u.n(r);u.d(n,"a",function(){return i});var i=function(){function l(l){this.ref=l,this._time=new e.BehaviorSubject(void 0)}return Object.defineProperty(l.prototype,"time",{get:function(){return this._time.getValue()},set:function(l){this._time.next(l)},enumerable:!0,configurable:!0}),l.prototype.ngOnInit=function(){var l=this;this._timeSubscription=this._time.subscribe(function(n){l.update()}),this._counter=e.Observable.interval(1e3).map(function(l){return l}),this._counterSubscription=this._counter.subscribe(function(n){return l.update()})},l.prototype.ngOnDestroy=function(){this._timeSubscription.unsubscribe(),this._counterSubscription.unsubscribe()},l.prototype.update=function(){var l=this.toRelativeDate(this.time);l!=this._str&&(this._str=l,this.ref.markForCheck())},l.prototype.toRelativeDate=function(l){return r(new Date(l)).fromNow()},l.ctorParameters=function(){return[{type:t.O}]},l}()},"1A80":function(l,n,u){"use strict";function t(l){return o._24(0,[(l()(),o._25(0,null,null,4,"span",[],null,null,null,null,null)),(l()(),o._26(null,["Logged in as "," | "])),(l()(),o._25(0,null,null,1,"a",[],[[8,"href",4]],null,null,null,null)),(l()(),o._26(null,["Logout"])),(l()(),o._26(null,[" | "]))],null,function(l,n){var u=n.component;l(n,1,0,u.dataService.Servers.User.Name),l(n,2,0,u.getLogoutUrl())})}function e(l){return o._24(0,[(l()(),o._25(0,null,null,3,"span",[],null,null,null,null,null)),(l()(),o._25(0,null,null,1,"a",[["href","#"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.openLogin(u)&&t}return t},null,null)),(l()(),o._26(null,["Login"])),(l()(),o._26(null,[" | "]))],null,null)}function r(l){return o._24(0,[(l()(),o._25(0,null,null,1,"simple-notifications",[],null,null,null,s.a,s.b)),o._27(122880,null,0,c.a,[_.a],{options:[0,"options"]},null),(l()(),o._26(null,["\n"])),(l()(),o._26(null,["\n\n"])),(l()(),o._25(8388608,null,null,1,"router-outlet",[["name","menu"]],null,null,null,null,null)),o._27(73728,null,0,p.z,[p.l,o.S,o.T,[8,"menu"]],null,null),(l()(),o._26(null,["\n"])),(l()(),o._25(0,null,null,22,"div",[["id","page"]],null,null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,16,"div",[["class","w3-bar"]],null,null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,1,"breadcrumb",[["class","breadcrumb w3-bar-item"],["prefix","Home"]],null,null,null,d.a,d.b)),o._27(385024,null,0,f.a,[p.g,m.a],{useBootstrap:[0,"useBootstrap"],prefix:[1,"prefix"]},null),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,10,"div",[["class","w3-bar-item w3-right w3-tiny theme-l1"]],null,null,null,null,null)),(l()(),o._28(8388608,null,null,1,null,t)),o._27(8192,null,0,h.l,[o.S,o._5],{ngIf:[0,"ngIf"]},null),(l()(),o._28(8388608,null,null,1,null,e)),o._27(8192,null,0,h.l,[o.S,o._5],{ngIf:[0,"ngIf"]},null),(l()(),o._26(null,["Theme: "])),(l()(),o._25(0,null,null,1,"a",[["href","#"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setTheme("light")&&t}return t},null,null)),(l()(),o._26(null,["Light"])),(l()(),o._26(null,[" | "])),(l()(),o._25(0,null,null,1,"a",[["href","#"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setTheme("dark")&&t}return t},null,null)),(l()(),o._26(null,["Dark"])),(l()(),o._26(null,["\n "])),(l()(),o._26(null,["\n "])),(l()(),o._25(8388608,null,null,1,"router-outlet",[],null,null,null,null,null)),o._27(73728,null,0,p.z,[p.l,o.S,o.T,[8,null]],null,null),(l()(),o._26(null,["\n"])),(l()(),o._26(null,["\n"])),(l()(),o._25(0,null,null,31,"div",[["class","w3-modal"],["id","modal_login"]],[[4,"display",null]],null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,28,"div",[["class","w3-modal-content w3-card-4 w3-animate-zoom"],["style","font-size: 0;"]],null,[[null,"clickOutside"],["document","click"]],function(l,n,u){var t=!0,e=l.component;if("document:click"===n){t=!1!==o._29(l,34).onClick(u,u.target)&&t}if("clickOutside"===n){t=!1!==e.closeLogin(u)&&t}return t},null,null)),o._27(8192,null,0,g.a,[o.K],null,{clickOutside:"clickOutside"}),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),o._26(null,[" \n "])),(l()(),o._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!=(e.showLogin=!1)&&t}return t},null,null)),(l()(),o._26(null,["×"])),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),o._26(null,["Log In"])),(l()(),o._26(null,["\n "])),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,15,"form",[["class","w3-container theme-l2 w3-medium"],["method","post"],["ngNoForm",""]],[[8,"action",4]],null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,12,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),o._26(null,["To give you access to personal information, first, we must verify your identity."])),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),o._26(null,["Please authenticate with our app through Steam by clicking on the button below."])),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,0,"input",[["name","returnUrl"],["type","hidden"]],[[8,"value",0]],null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,1,"button",[["class","w3-button w3-block theme-d1 w3-section w3-padding"],["name","provider"],["title","Log in using your Steam account"],["type","submit"]],null,null,null,null,null)),(l()(),o._26(null,["Go to Steam"])),(l()(),o._26(null,["\n "])),(l()(),o._26(null,["\n "])),(l()(),o._26(null,["\n "])),(l()(),o._26(null,["\n"]))],function(l,n){var u=n.component;l(n,1,0,u.notificationOptions),l(n,12,0,!1,"Home"),l(n,16,0,null==u.dataService.Servers?null:null==u.dataService.Servers.User?null:u.dataService.Servers.User.SteamId),l(n,18,0,!(null==u.dataService.Servers?null:null==u.dataService.Servers.User?null:u.dataService.Servers.User.SteamId))},function(l,n){var u=n.component;l(n,31,0,u.showLogin?"block":"none"),l(n,45,0,u.getLoginUrl()),l(n,55,0,u.currentUrl)})}function i(l){return o._24(0,[(l()(),o._25(0,null,null,1,"body",[],[[8,"className",0]],null,null,r,w)),o._27(122880,null,0,v.a,[y.a,S.a,m.a,_.a,p.g],null,null)],function(l,n){l(n,1,0)},function(l,n){l(n,0,0,o._29(n,1).getTheme())})}var a=u("Ni5f"),o=u("3j3K"),s=u("XhEa"),c=u("B8cY"),_=u("XLrO"),p=u("5oXY"),d=u("if6N"),f=u("v8ur"),m=u("aT6V"),h=u("2Je8"),v=u("YWx4"),g=u("8zLQ"),y=u("ATz5"),S=u("lHWG");u.d(n,"a",function(){return k});var b=[a.a],w=o._23({encapsulation:0,styles:b,data:{}}),k=o._30("body",v.a,i,{},{},[])},"1AkI":function(l,n,u){"use strict";function t(l){return c._24(0,[(l()(),c._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==c._29(l.parent,2).activate("players")&&t}return t},null,null)),c._27(139264,null,0,_.m,[c.v,c.w,c.K,c.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),c._31(["theme-d1"]),(l()(),c._26(null,["Players"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,c._29(n.parent,2).active("players")))},null)}function e(l){return c._24(0,[(l()(),c._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==c._29(l.parent,2).activate("tribes")&&t}return t},null,null)),c._27(139264,null,0,_.m,[c.v,c.w,c.K,c.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),c._31(["theme-d1"]),(l()(),c._26(null,["Tribes"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,c._29(n.parent,2).active("tribes")))},null)}function r(l){return c._24(0,[(l()(),c._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==c._29(l.parent,2).activate("wildcreatures-statistics")&&t}return t},null,null)),c._27(139264,null,0,_.m,[c.v,c.w,c.K,c.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),c._31(["theme-d1"]),(l()(),c._26(null,["Wild Statistics"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,c._29(n.parent,2).active("wildcreatures-statistics")))},null)}function i(l){return c._24(0,[(l()(),c._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==c._29(l.parent,2).activate("wildcreatures")&&t}return t},null,null)),c._27(139264,null,0,_.m,[c.v,c.w,c.K,c.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),c._31(["theme-d1"]),(l()(),c._26(null,["Wild Creatures"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,c._29(n.parent,2).active("wildcreatures")))},null)}function a(l){return c._24(0,[c._35(201326592,1,{menu:0}),(l()(),c._25(0,null,null,20,"app-menu",[],null,null,null,p.a,p.b)),c._27(122880,[[1,4],["menu",4]],0,d.a,[f.a],null,null),(l()(),c._26(0,["\n "])),(l()(),c._25(0,null,0,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),c._26(null,["Server"])),(l()(),c._26(0,["\n "])),(l()(),c._25(0,null,0,13,"div",[["class","w3-cell-row theme-l2"]],null,null,null,null,null)),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,t)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,e)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,r)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,i)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._26(0,["\n"]))],function(l,n){var u=n.component;l(n,2,0),l(n,10,0,u.dataService.hasFeatureAccess("server","players")),l(n,13,0,u.dataService.hasFeatureAccess("server","tribes")),l(n,16,0,u.dataService.hasFeatureAccess("server","wildcreatures-statistics")),l(n,19,0,u.dataService.hasFeatureAccess("server","wildcreatures"))},null)}function o(l){return c._24(0,[(l()(),c._25(0,null,null,1,"app-server-menu",[],[[8,"className",0]],null,null,a,v)),c._27(57344,null,0,m.a,[f.a],null,null)],function(l,n){l(n,1,0)},function(l,n){l(n,0,0,c._29(n,1).menu.className)})}var s=u("nJHW"),c=u("3j3K"),_=u("2Je8"),p=u("coiB"),d=u("8kYA"),f=u("ATz5"),m=u("7xIs");u.d(n,"a",function(){return g});var h=[s.a],v=c._23({encapsulation:0,styles:h,data:{}}),g=c._30("app-server-menu",m.a,o,{},{},[])},"2dXI":function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},5305:function(l,n,u){"use strict";var t=u("kZql"),e=u("f4AQ");u.n(e);u.d(n,"a",function(){return r});var r=function(){function l(){this.width=1024,this.height=1024,this.zoom=e.zoom().scaleExtent([1,10])}return l.prototype.imageLoaded=function(l){var n=this;this.img=l,this.width=l.naturalWidth,this.height=l.naturalHeight,window.setTimeout(function(){n.resize(),n.redraw()},100)},l.prototype.resize=function(){},l.prototype.zoomed=function(){var l=e.zoomTransform(this.canvasRef.nativeElement),n=this.canvasRef.nativeElement.getContext("2d");n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,this.width,this.height),n.translate(l.x,l.y),n.scale(l.k,l.k),this.redraw()},l.prototype.redraw=function(){var l=this.canvasRef.nativeElement.getContext("2d");if(l.drawImage(this.img,0,0),null!=this.points)for(var n=0,u=this.points;n/gi,window.location.protocol).replace(/\/gi,window.location.hostname)},l.ctorParameters=function(){return[]},l}()},"6Nb/":function(l,n,u){"use strict";function t(l){return i._24(2,[(l()(),i._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),i._26(null,["",""]))],null,function(l,n){l(n,1,0,n.component._str)})}function e(l){return i._24(0,[(l()(),i._25(0,null,null,1,"relative-time",[],null,null,null,t,s)),i._27(122880,null,0,a.a,[i.O],null,null)],function(l,n){l(n,1,0)},null)}var r=u("/tjS"),i=u("3j3K"),a=u("0onv");u.d(n,"b",function(){return s}),n.a=t;var o=[r.a],s=i._23({encapsulation:0,styles:o,data:{}});i._30("relative-time",a.a,e,{time:"time"},{},[])},"7MbP":function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},"7T2B":function(l,n,u){"use strict";var t=u("3j3K");u.d(n,"a",function(){return e});var e=function(){function l(){this.callback=new t.Q,this.confirming=!1}return l.prototype.ngOnInit=function(){},l.prototype.onClick=function(l){var n=this;this.confirming?l.detail>=3&&(window.clearTimeout(this.resetTimeout),this.confirming=!1,this.callback.emit()):(this.confirming=!0,this.resetTimeout=window.setTimeout(function(){n.confirming=!1},5e3))},l.ctorParameters=function(){return[]},l}()},"7xIs":function(l,n,u){"use strict";var t=u("ATz5");u.d(n,"a",function(){return e});var e=function(){function l(l){this.dataService=l}return l.prototype.ngOnInit=function(){this.dataService.hasFeatureAccess("server","players")?this.menu.activate("players"):this.dataService.hasFeatureAccess("server","tribes")?this.menu.activate("tribes"):this.dataService.hasFeatureAccess("server","wildcreatures-statistics")?this.menu.activate("wildcreatures-statistics"):this.dataService.hasFeatureAccess("server","wildcreatures")&&this.menu.activate("wildcreatures")},l.ctorParameters=function(){return[{type:t.a}]},l}()},"8kYA":function(l,n,u){"use strict";var t=u("ATz5");u.d(n,"a",function(){return e});var e=function(){function l(l){this.dataService=l,this.menuOption=void 0,this.menuVisible=!1,this.className="menucontainer"}return l.prototype.ngOnInit=function(){var l=this;this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n})},l.prototype.ngOnDestroy=function(){this.menuOptionSubscription.unsubscribe()},l.prototype.activate=function(l){this.dataService.SetMenuOption(l)},l.prototype.active=function(l){return this.menuOption==l},l.prototype.toggleMenu=function(){this.menuVisible=!this.menuVisible},l.ctorParameters=function(){return[{type:t.a}]},l}()},"8zLQ":function(l,n,u){"use strict";var t=u("3j3K");u.d(n,"a",function(){return e});var e=function(){function l(l){this._elementRef=l,this.clickOutside=new t.Q}return l.prototype.onClick=function(l,n){if(n){this._elementRef.nativeElement.contains(n)||this.clickOutside.emit(l)}},l.ctorParameters=function(){return[{type:t.K}]},l}()},ATz5:function(l,n,u){"use strict";var t=u("3j3K"),e=u("Gvdl"),r=(u.n(e),u("lHWG")),i=u("+Lwu"),a=u("kZql"),o=u("PJh5");u.n(o);u.d(n,"a",function(){return s});var s=function(){function l(l,n){var u=this;this.httpService=l,this.messageService=n,this._servers=new e.BehaviorSubject(void 0),this.menuOption=new e.BehaviorSubject(void 0),this.ServersUpdated$=new t.Q,n.serverUpdated$.subscribe(function(l){return u.updateServer(l)})}return Object.defineProperty(l.prototype,"MenuOption",{get:function(){return this.menuOption.asObservable()},enumerable:!0,configurable:!0}),l.prototype.SetMenuOption=function(l){this.menuOption.next(l)},l.prototype.getServers=function(){var l=this;return this.httpService.getServers().then(function(n){l.Servers=n;var u=n?n.User:void 0;return l.UserSteamId=u&&u.SteamId?u.SteamId:void 0,l._servers.next(n),l.ServersUpdated$.emit(n),!0}).catch(function(n){return l.Servers=null,l.UserSteamId=void 0,l._servers.next(null),l.ServersUpdated$.emit(null),!1})},l.prototype.updateServer=function(l){this.getServers()},l.prototype.hasFeatureAccess=function(l,n,u){var t=this.Servers?this.Servers.AccessControl:void 0;if(!t)return!1;var e=t[l];if(!e)return!1;var r=e[n];if(!r)return!1;var i=this.Servers?this.Servers.User:void 0,a=i&&i.Roles?i.Roles.slice(0):[];i&&i.SteamId&&i.SteamId==u&&a.push("self");for(var o=function(l){if(r.find(function(n){return l.toLowerCase()===n.toLowerCase()}))return{value:!0}},s=0,c=a;s0&&e.push(t+"d"),(t>0||u>0)&&e.push(u+"h"),(t>0||u>0||n>0)&&e.push(n+"m"),e.push(l+"s"),this._str=e.join(" "),this._ready=!1,this.state._completed=!1},l.prototype.ngOnInit=function(){var l=this;this._timeSubscription=this._time.subscribe(function(n){l.updateDiff(n),l.update()}),this._notificationSubscription=this._notification.subscribe(function(l){}),this._counter=t.Observable.interval(1e3).map(function(n){return l.updateDiff(void 0),n}),this._counterSubscription=this._counter.subscribe(function(n){return l.update()})},l.prototype.ngOnDestroy=function(){this._timeSubscription.unsubscribe(),this._notificationSubscription.unsubscribe(),this._counterSubscription.unsubscribe()},l.ctorParameters=function(){return[]},l}()},DGJX:function(l,n,u){"use strict";function t(l){return v._24(0,[(l()(),v._25(0,null,null,2,null,null,null,null,null,null,null)),(l()(),v._26(null,["Last Active: ",""])),(l()(),v._25(0,null,null,0,"br",[],null,null,null,null,null))],null,function(l,n){var u=n.component;l(n,1,0,u.dataService.toRelativeDate(u.currentOwner.LastActiveTime))})}function e(l){return v._24(0,[(l()(),v._25(0,null,null,3,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._25(0,null,null,2,"confirm-button",[],null,[[null,"callback"]],function(l,n,u){var t=!0,e=l.component;if("callback"===n){t=!1!==e.destroyCurrentArea(u)&&t}return t},g.a,g.b)),v._27(57344,null,0,y.a,[],{width:[0,"width"]},{callback:"callback"}),(l()(),v._26(0,["Destroy this area"]))],function(l,n){l(n,2,0,100)},null)}function r(l){return v._24(0,[(l()(),v._25(0,null,null,31,null,null,null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),v._26(null,[" \n "])),(l()(),v._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.hideContextMenu()&&t}return t},null,null)),(l()(),v._26(null,["×"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,19,"div",[["class","w3-container w3-medium theme-l2"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,9,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._26(null,["\n Coords: ",", ",""])),v._32(2),v._32(2),(l()(),v._25(0,null,null,0,"br",[],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,t)),v._27(8192,null,0,S.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "," structures\n "])),v._32(1),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._25(0,null,null,1,"button",[["class","w3-button theme-d1"],["style","width: 100%;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setSelectedOwner(e.currentOwner)&&t}return t},null,null)),(l()(),v._26(null,["Show only areas for this team"])),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,e)),v._27(8192,null,0,S.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "]))],function(l,n){var u=n.component;l(n,20,0,u.currentOwner.LastActiveTime),l(n,29,0,u.dataService.hasFeatureAccess("admin-server","structures-rcon"))},function(l,n){var u=n.component;l(n,8,0,u.currentOwner.Name),l(n,14,0,v._33(n,14,0,l(n,15,0,v._29(n.parent,0),u.currentArea.Latitude,"1.0-1")),v._33(n,14,1,l(n,16,0,v._29(n.parent,0),u.currentArea.Longitude,"1.0-1"))),l(n,21,0,v._33(n,21,0,l(n,22,0,v._29(n.parent,0),u.currentArea.StructureCount)))})}function i(l){return v._24(0,[(l()(),v._25(0,null,null,2,null,null,null,null,null,null,null)),(l()(),v._26(null,["Last Active: ",""])),(l()(),v._25(0,null,null,0,"br",[],null,null,null,null,null))],null,function(l,n){var u=n.component;l(n,1,0,u.dataService.toRelativeDate(u.currentOwner.LastActiveTime))})}function a(l){return v._24(0,[(l()(),v._25(0,null,null,3,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._25(0,null,null,2,"confirm-button",[],null,[[null,"callback"]],function(l,n,u){var t=!0,e=l.component;if("callback"===n){t=!1!==e.destroyAllStructuresForTeam(u)&&t}return t},g.a,g.b)),v._27(57344,null,0,y.a,[],{width:[0,"width"]},{callback:"callback"}),(l()(),v._26(0,["Destroy all structures"]))],function(l,n){l(n,2,0,100)},null)}function o(l){return v._24(0,[(l()(),v._25(0,null,null,3,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._25(0,null,null,2,"confirm-button",[],null,[[null,"callback"]],function(l,n,u){var t=!0,e=l.component;if("callback"===n){t=!1!==e.destroyDinosForTeam(u)&&t}return t},g.a,g.b)),v._27(57344,null,0,y.a,[],{width:[0,"width"]},{callback:"callback"}),(l()(),v._26(0,["Destroy all creatures"]))],function(l,n){l(n,2,0,100)},null)}function s(l){return v._24(0,[(l()(),v._25(0,null,null,36,null,null,null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),v._26(null,[" \n "])),(l()(),v._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.hideContextMenu()&&t}return t},null,null)),(l()(),v._26(null,["×"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,24,"div",[["class","w3-container w3-medium theme-l2"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,11,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,i)),v._27(8192,null,0,S.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "," areas"])),v._32(1),(l()(),v._25(0,null,null,0,"br",[],null,null,null,null,null)),(l()(),v._26(null,["\n "," structures"])),v._32(1),(l()(),v._25(0,null,null,0,"br",[],null,null,null,null,null)),(l()(),v._26(null,["\n "," creatures\n "])),v._32(1),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._25(0,null,null,1,"button",[["class","w3-button theme-d1"],["style","width: 100%;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setSelectedOwner(e.currentOwner)&&t}return t},null,null)),(l()(),v._26(null,["Show only areas for this team"])),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,a)),v._27(8192,null,0,S.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,o)),v._27(8192,null,0,S.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "]))],function(l,n){var u=n.component;l(n,16,0,u.currentOwner.LastActiveTime),l(n,31,0,u.dataService.hasFeatureAccess("admin-server","structures-rcon")),l(n,34,0,u.dataService.hasFeatureAccess("admin-server","structures-rcon"))},function(l,n){var u=n.component;l(n,8,0,u.currentOwner.Name),l(n,17,0,v._33(n,17,0,l(n,18,0,v._29(n.parent,0),u.currentOwner.AreaCount))),l(n,20,0,v._33(n,20,0,l(n,21,0,v._29(n.parent,0),u.currentOwner.StructureCount))),l(n,23,0,v._33(n,23,0,l(n,24,0,v._29(n.parent,0),u.currentOwner.CreatureCount)))})}function c(l){return v._24(0,[(l()(),v._25(0,null,null,16,null,null,null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),v._26(null,[" \n "])),(l()(),v._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.hideContextMenu()&&t}return t},null,null)),(l()(),v._26(null,["×"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,4,"div",[["class","w3-container w3-medium theme-l2"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._26(null,["\n ","\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "]))],null,function(l,n){var u=n.component;l(n,8,0,u.modalInfo.Header),l(n,14,0,u.modalInfo.Message)})}function _(l){return v._24(0,[(l()(),v._25(0,null,null,3,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),v._25(0,null,null,2,"confirm-button",[["class","w3-right"]],null,[[null,"callback"]],function(l,n,u){var t=!0,e=l.component;if("callback"===n){t=!1!==e.saveWorld(u)&&t}return t},g.a,g.b)),v._27(57344,null,0,y.a,[],{width:[0,"width"]},{callback:"callback"}),(l()(),v._26(0,["Save World"]))],function(l,n){l(n,2,0,void 0)},null)}function p(l){return v._24(0,[(l()(),v._25(0,null,null,30,"tr",[],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,8,"td",[],null,null,null,null,null)),(l()(),v._25(0,null,null,6,"input",[["type","radio"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(l,n,u){var t=!0,e=l.component;if("input"===n){t=!1!==v._29(l,4)._handleInput(u.target.value)&&t}if("blur"===n){t=!1!==v._29(l,4).onTouched()&&t}if("compositionstart"===n){t=!1!==v._29(l,4)._compositionStart()&&t}if("compositionend"===n){t=!1!==v._29(l,4)._compositionEnd(u.target.value)&&t}if("change"===n){t=!1!==v._29(l,5).onChange()&&t}if("blur"===n){t=!1!==v._29(l,5).onTouched()&&t}if("ngModelChange"===n){t=!1!==(e.selectedOwner=u)&&t}if("change"===n){t=!1!==e.updateSelection()&&t}return t},null,null)),v._27(8192,null,0,b.d,[v.J,v.K,[2,b.e]],null,null),v._27(106496,null,0,b.f,[v.J,v.K,b.a,v.W],{value:[0,"value"]},null),v._37(512,null,b.g,function(l,n){return[l,n]},[b.d,b.f]),v._27(335872,null,0,b.h,[[8,null],[8,null],[8,null],[2,b.g]],{model:[0,"model"]},{update:"ngModelChange"}),v._37(1024,null,b.i,null,[b.h]),v._27(8192,null,0,b.j,[b.i],null,null),(l()(),v._26(null,[" ",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),v._25(0,null,null,1,"button",[["class","w3-button theme-d1 w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.showOwnerModal(u,l.context.$implicit)&&t}return t},null,null)),(l()(),v._26(null,["Options"])),(l()(),v._26(null,["\n "]))],function(l,n){var u=n.component;l(n,5,0,n.context.$implicit),l(n,7,0,u.selectedOwner)},function(l,n){var u=n.component;l(n,3,0,v._29(n,9).ngClassUntouched,v._29(n,9).ngClassTouched,v._29(n,9).ngClassPristine,v._29(n,9).ngClassDirty,v._29(n,9).ngClassValid,v._29(n,9).ngClassInvalid,v._29(n,9).ngClassPending),l(n,10,0,n.context.$implicit.Name),l(n,13,0,n.context.$implicit.Type),l(n,16,0,n.context.$implicit.AreaCount),l(n,19,0,n.context.$implicit.StructureCount),l(n,22,0,n.context.$implicit.CreatureCount),l(n,25,0,u.dataService.toRelativeDate(n.context.$implicit.LastActiveTime))})}function d(l){return v._24(0,[(l()(),v._25(0,null,null,56,null,null,null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,15,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),v._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),v._26(null,["Player/Tribe Locations"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,8,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,5,"div",[["class","w3-clear"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"button",[["class","w3-button theme-d1 w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.reset(u)&&t}return t},null,null)),(l()(),v._26(null,["Reset"])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,36,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,33,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,24,"thead",[],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,21,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),v._26(null,["Name"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),v._26(null,["Type"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Location Count"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setOwnerSort("locations")&&t}return t},null,null)),(l()(),v._26(null,["A#"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Structure Count"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setOwnerSort("structures")&&t}return t},null,null)),(l()(),v._26(null,["S#"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[["title","Creature Count"]],null,null,null,null,null)),(l()(),v._26(null,["C#"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Last Active Time"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setOwnerSort("lastactive")&&t}return t},null,null)),(l()(),v._26(null,["Last Active"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,0,"th",[],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,p)),v._27(401408,null,0,S.n,[v.S,v._5,v.v],{ngForOf:[0,"ngForOf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n"]))],function(l,n){l(n,52,0,n.component.ownersSorted)},null)}function f(l){return v._24(0,[v._34(0,S.p,[v.t]),v._35(201326592,1,{mapContainer:0}),v._35(201326592,2,{contextMenu:0}),(l()(),v._26(null,["\n"])),(l()(),v._25(0,[[2,0],["contextMenu",1]],null,14,"div",[["class","contextMenu w3-modal"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,11,"div",[["class","w3-modal-content w3-card-4 w3-animate-zoom"],["style","font-size: 0;"]],null,[[null,"clickOutside"],["document","click"]],function(l,n,u){var t=!0,e=l.component;if("document:click"===n){t=!1!==v._29(l,7).onClick(u,u.target)&&t}if("clickOutside"===n){t=!1!==e.hideContextMenu()&&t}return t},null,null)),v._27(8192,null,0,k.a,[v.K],null,{clickOutside:"clickOutside"}),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,r)),v._27(8192,null,0,S.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,s)),v._27(8192,null,0,S.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,c)),v._27(8192,null,0,S.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n"])),(l()(),v._26(null,["\n\n"])),(l()(),v._25(0,null,null,9,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,3,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),v._25(0,null,null,0,"a",[["id","structures"]],null,null,null,null,null)),(l()(),v._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),v._26(null,["Structures"])),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,_)),v._27(8192,null,0,S.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n"])),(l()(),v._26(null,["\n\n"])),(l()(),v._25(0,null,null,14,"div",[["class","wrapper"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,9,"div",[["class","buttons"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"button",[["class","w3-button theme-d1"],["style","padding: 3px 6px;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.zoomIn()&&t}return t},null,null)),(l()(),v._25(0,null,null,1,"i",[["class","material-icons w3-xxlarge"]],null,null,null,null,null)),(l()(),v._26(null,["add"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"button",[["class","w3-button theme-d1"],["style","padding: 3px 6px;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.zoomOut()&&t}return t},null,null)),(l()(),v._25(0,null,null,1,"i",[["class","material-icons w3-xxlarge"]],null,null,null,null,null)),(l()(),v._26(null,["remove"])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,[[1,0],["map",1]],null,0,"div",[["class","map"]],null,null,null,null,null)),(l()(),v._26(null,["\n"])),(l()(),v._26(null,["\n\n"])),(l()(),v._28(8388608,null,null,1,null,d)),v._27(8192,null,0,S.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null)],function(l,n){var u=n.component;l(n,10,0,u.currentArea&&u.currentOwner),l(n,13,0,u.currentOwner&&!u.currentArea),l(n,16,0,u.modalInfo),l(n,28,0,u.dataService.hasFeatureAccess("admin-server","structures-rcon")),l(n,48,0,u.ownersSorted)},null)}function m(l){return v._24(0,[(l()(),v._25(0,null,null,1,"arkmap-structures",[],null,null,null,f,O)),v._27(385024,null,0,w.a,[C.a,I.a,v.e],null,null)],function(l,n){l(n,1,0)},null)}var h=u("Dn8Y"),v=u("3j3K"),g=u("r8sF"),y=u("7T2B"),S=u("2Je8"),b=u("NVOs"),w=u("lCrv"),k=u("8zLQ"),C=u("ATz5"),I=u("lHWG");u.d(n,"b",function(){return O}),n.a=f;var x=[h.a],O=v._23({encapsulation:2,styles:x,data:{}});v._30("arkmap-structures",w.a,m,{structures:"structures",serverKey:"serverKey",mapName:"mapName"},{},[])},Dn8Y:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=['.map canvas,.map svg{position:absolute;top:0;left:0;width:100%}rect.overlay{fill:transparent}.wrapper{position:relative}.wrapper:after{padding-top:100%;display:block;content:""}.wrapper .buttons{position:absolute;left:5px;top:5px;opacity:.75;z-index:2}']},Fnlp:function(l,n,u){"use strict";var t=u("ATz5"),e=u("3MNG"),r=u("+Lwu");u.d(n,"a",function(){return i});var i=function(){function l(l,n,u){this.dataService=l,this.messageService=n,this.notificationsService=u,this.menuOption=void 0,this.demoMode=!1}return l.prototype.ngOnInit=function(){var l=this;this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){return l.showServerUpdateNotification(n)}),this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n}),this.demoMode="true"==localStorage.getItem("demoMode")},l.prototype.ngOnDestroy=function(){this.serverUpdatedSubscription.unsubscribe(),this.menuOptionSubscription.unsubscribe()},l.prototype.showServerUpdateNotification=function(l){this.notificationsService.success("Server Update",l+" was updated; Reloading data...",{showProgressBar:!0,pauseOnHover:!0,clickToClose:!0})},l.prototype.isMenuActive=function(l){return this.menuOption==l},l.prototype.toggleDemoMode=function(){var l="true"!=localStorage.getItem("demoMode");this.demoMode=l,localStorage.setItem("demoMode",l+"")},l.ctorParameters=function(){return[{type:t.a},{type:r.a},{type:e.a}]},l}()},FxpQ:function(l,n,u){"use strict";var t=u("ATz5"),e=u("3MNG"),r=u("+Lwu");u.d(n,"a",function(){return i});var i=function(){function l(l,n,u){this.dataService=l,this.messageService=n,this.notificationsService=u,this.menuOption=void 0}return l.prototype.ngOnInit=function(){var l=this;this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){return l.showServerUpdateNotification(n)}),this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n})},l.prototype.ngOnDestroy=function(){this.serverUpdatedSubscription.unsubscribe(),this.menuOptionSubscription.unsubscribe()},l.prototype.showServerUpdateNotification=function(l){this.notificationsService.success("Server Update",l+" was updated; Reloading data...",{showProgressBar:!0,pauseOnHover:!0,clickToClose:!0})},l.prototype.isMenuActive=function(l){return this.menuOption==l},l.ctorParameters=function(){return[{type:t.a},{type:r.a},{type:e.a}]},l}()},I9JA:function(l,n,u){"use strict";function t(l){return r._24(0,[r._35(201326592,1,{canvasRef:0}),(l()(),r._25(0,[[1,0],["myCanvas",1]],null,0,"canvas",[["style","width: 100%;"]],[[8,"width",0],[8,"height",0]],null,null,null,null))],null,function(l,n){var u=n.component;l(n,1,0,u.width,u.height)})}function e(l){return r._24(0,[(l()(),r._25(0,null,null,1,"arkmap",[],null,null,null,t,o)),r._27(286720,null,0,i.a,[],null,null)],null,null)}var r=u("3j3K"),i=u("5305");u.d(n,"b",function(){return o}),n.a=t;var a=[],o=r._23({encapsulation:2,styles:a,data:{}});r._30("arkmap",i.a,e,{mapName:"mapName",points:"points"},{},[])},Iksp:function(l,n,u){"use strict";var t=u("KZxv"),e=u("RiXa"),r=u("qn86"),i=u("JLFQ"),a=u("e/mT"),o=u("+w0e"),s=u("JKTH"),c=u("7xIs"),_=u("08Wm"),p=u("+qYp"),d=u("FxpQ"),f=u("Fnlp");u.d(n,"a",function(){return m});var m=(o.a,t.a,e.a,o.a,r.a,c.a,o.a,a.a,_.a,o.a,i.a,s.a,f.a,p.a,d.a,function(){function l(){}return l}())},J8nT:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=function(){function l(){}return l}()},JKTH:function(l,n,u){"use strict";var t=u("ATz5");u.d(n,"a",function(){return e});var e=function(){function l(l){this.dataService=l}return l.prototype.ngOnInit=function(){this.menu.activate("overview")},l.ctorParameters=function(){return[{type:t.a}]},l}()},JLFQ:function(l,n,u){"use strict";var t=u("ATz5"),e=u("3MNG"),r=u("+Lwu");u.d(n,"a",function(){return i});var i=function(){function l(l,n,u){this.dataService=l,this.messageService=n,this.notificationsService=u,this.menuOption=void 0,this.serverCount=0,this.onlinePlayerCount=0}return l.prototype.ngOnInit=function(){var l=this;this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){return l.showServerUpdateNotification(n)}),this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n}),this.serversUpdatedSubscription=this.dataService.ServersUpdated$.subscribe(function(n){l.updateData(n)}),this.serverUpdateInterval=window.setInterval(function(){l.dataService.updateServer(null)},6e4),this.updateData(this.dataService.Servers)},l.prototype.ngOnDestroy=function(){this.serverUpdatedSubscription.unsubscribe(),this.menuOptionSubscription.unsubscribe(),this.serversUpdatedSubscription.unsubscribe(),window.clearInterval(this.serverUpdateInterval)},l.prototype.updateData=function(l){var n=0,u=0;if(l&&l.Servers){n=l.Servers.length;for(var t=0,e=l.Servers;t0?u[0]:null);var t=Object.keys(n.Clusters);l.clusterKey&&void 0!=t.find(function(n){return n==l.clusterKey})||(l.clusterKey=t.length>0?t[0]:null),l.player=n,l.filterAndSort(),l.sortCluster(),l.filterCluster(),l.loaded=!0,l.ref.detectChanges()}).catch(function(n){l.player=null,l.filteredCreatures=null,l.imprintCreatures=null,l.filteredClusterCreatures=null,l.loaded=!0})},l.prototype.ngOnInit=function(){var l=this;this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n}),this.steamId=this.route.snapshot.params.playerid,this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){return l.updateServer(n)}),this.getPlayer()},l.prototype.ngOnDestroy=function(){this.menuOptionSubscription.unsubscribe(),this.serverUpdatedSubscription.unsubscribe()},l.prototype.haveMatingCooldown=function(l){return null!=l.NextMating&&new Date(l.NextMating)>new Date},l.prototype.active=function(l){return this.serverKey==l},l.prototype.activate=function(l){this.serverKey=l,this.filterAndSort()},l.prototype.serverWidth=function(){return 100/Object.keys(this.player.Servers).length},l.prototype.activeCluster=function(l){return this.clusterKey==l},l.prototype.activateCluster=function(l){this.clusterKey=l,this.sortCluster(),this.filterCluster()},l.prototype.clusterWidth=function(){return 100/Object.keys(this.player.Clusters).length},l.prototype.sort=function(){var l=this,n="-"!=this.creaturesSortField[0],u=this.creaturesSortFunctions[this.creaturesSortField.replace(/^\-/,"")],t=this.creaturesAltSortFields.split(",").map(function(n){var u={};return u.asc="-"!=n[0],u.sortFunc=l.creaturesSortFunctions[n.replace(/^\-/,"")],u});this.filteredCreatures.sort(function(l,e){var r=u(l,e,n);if(0==r)for(var i=0,a=t;i=0||null!=n.Name&&n.Name.toLowerCase().indexOf(l)>=0})}var n=this.player.Servers[this.serverKey].Creatures.filter(function(l){return null!=l.BabyAge});n.sort(function(l,n){return new Date(l.BabyNextCuddle)new Date(n.BabyNextCuddle)?1:0}),this.imprintCreatures=n;for(var u=[],t=0,e=this.filteredCreatures;tn.Level?-1:l.Level=0||null!=n.Name&&n.Name.toLowerCase().indexOf(l)>=0})}},l.prototype.run=function(){if(null==this.steamId||""==this.steamId)return this.player=null,this.filteredCreatures=null,void(this.imprintCreatures=null);this.getPlayer()},l.prototype.openMap=function(l){this.showMap=!0,l.stopPropagation()},l.prototype.closeMap=function(l){this.showMap=!1},l.prototype.updateServer=function(l){this.getPlayer(),this.showServerUpdateNotification(l)},l.prototype.haveCluster=function(){return null!=this.player&&Object.keys(this.player.Clusters).length>0},l.prototype.sumKibbleAndEggs=function(){return void 0!=this.player.Servers[this.serverKey].KibblesAndEggs?this.player.Servers[this.serverKey].KibblesAndEggs.reduce(function(l,n){return l+n.KibbleCount+n.EggCount},0):0},l.prototype.showServerUpdateNotification=function(l){this.notificationsService.success("Server Update",l+" was updated; Reloading data...",{showProgressBar:!0,pauseOnHover:!0,clickToClose:!0})},l.prototype.isMenuActive=function(l){return this.menuOption==l},l.prototype.getStateForCreature=function(l){if(l){var n=this.creatureStates[l.Id1+"_"+l.Id2];return n||(n={imprintNotifications:!0},this.creatureStates[l.Id1+"_"+l.Id2]=n),n}},l.prototype.toggleImprintNotificationForCreature=function(l){var n=this.getStateForCreature(l);n.imprintNotifications=!n.imprintNotifications},l.prototype.activeCreaturesMode=function(l){return l==this.creaturesMode},l.prototype.activateCreaturesMode=function(l){this.creaturesMode=l},l.prototype.setCreaturesSort=function(l){var n=this.creaturesSortField==l;this.creaturesSortField=n?"-"+l:l,this.creaturesAltSortFields="latitude"==l?n?"-longitude,name":"longitude,name":"longitude"==l?n?"-latitude,name":"latitude,name":"name",this.sort()},l.prototype.copyCreature=function(l){},l.prototype.getCurrentServer=function(){var l=this;if(this.dataService&&this.dataService.Servers&&this.dataService.Servers.Servers){return this.dataService.Servers.Servers.find(function(n){return n.Key==l.serverKey})}},l.prototype.numCreatureTabs=function(){var l=1;return this.dataService.hasFeatureAccess("player","creatures-basestats",this.steamId)&&(l+=1),this.dataService.hasFeatureAccess("player","creatures-ids",this.steamId)&&(l+=1),l},l.ctorParameters=function(){return[{type:e.v},{type:e.g},{type:o.a},{type:i.a},{type:a.a},{type:r.a},{type:t.O}]},l}()},Layn:function(l,n,u){"use strict";function t(l){return s._24(0,[(l()(),s._25(0,null,null,0,"div",[["class","icon"]],[[8,"innerHTML",1]],null,null,null,null))],null,function(l,n){l(n,0,0,n.component.safeSvg)})}function e(l){return s._24(0,[(l()(),s._25(0,null,null,11,"div",[],null,null,null,null,null)),(l()(),s._26(null,["\n "])),(l()(),s._25(0,null,null,1,"div",[["class","sn-title"]],null,null,null,null,null)),(l()(),s._26(null,["",""])),(l()(),s._26(null,["\n "])),(l()(),s._25(0,null,null,2,"div",[["class","sn-content"]],null,null,null,null,null)),(l()(),s._26(null,["",""])),s._32(2),(l()(),s._26(null,["\n\n "])),(l()(),s._28(8388608,null,null,1,null,t)),s._27(8192,null,0,c.l,[s.S,s._5],{ngIf:[0,"ngIf"]},null),(l()(),s._26(null,["\n "]))],function(l,n){l(n,10,0,"bare"!==n.component.item.icon)},function(l,n){var u=n.component;l(n,3,0,u.item.title),l(n,6,0,s._33(n,6,0,l(n,7,0,s._29(n.parent,0),u.item.content,u.maxLength)))})}function r(l){return s._24(0,[(l()(),s._25(0,null,null,0,"div",[],[[8,"innerHTML",1]],null,null,null,null))],null,function(l,n){l(n,0,0,n.component.item.html)})}function i(l){return s._24(0,[(l()(),s._25(0,null,null,5,"div",[["class","sn-progress-loader"]],null,null,null,null,null)),(l()(),s._26(null,["\n "])),(l()(),s._25(0,null,null,2,"span",[],null,null,null,null,null)),s._27(139264,null,0,c.o,[s.w,s.K,s.J],{ngStyle:[0,"ngStyle"]},null),s._31(["width"]),(l()(),s._26(null,["\n "]))],function(l,n){l(n,3,0,l(n,4,0,n.component.progressWidth+"%"))},null)}function a(l){return s._24(0,[s._34(0,_.a,[]),(l()(),s._26(null,["\n "])),(l()(),s._25(0,null,null,12,"div",[["class","simple-notification"]],[[24,"@enterLeave",0]],[[null,"click"],[null,"mouseenter"],[null,"mouseleave"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.onClick(u)&&t}if("mouseenter"===n){t=!1!==e.onEnter()&&t}if("mouseleave"===n){t=!1!==e.onLeave()&&t}return t},null,null)),s._27(139264,null,0,c.m,[s.v,s.w,s.K,s.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),s._31(["alert","error","warn","success","info","bare","rtl-mode"]),(l()(),s._26(null,["\n\n "])),(l()(),s._28(8388608,null,null,1,null,e)),s._27(8192,null,0,c.l,[s.S,s._5],{ngIf:[0,"ngIf"]},null),(l()(),s._26(null,["\n "])),(l()(),s._28(8388608,null,null,1,null,r)),s._27(8192,null,0,c.l,[s.S,s._5],{ngIf:[0,"ngIf"]},null),(l()(),s._26(null,["\n\n "])),(l()(),s._28(8388608,null,null,1,null,i)),s._27(8192,null,0,c.l,[s.S,s._5],{ngIf:[0,"ngIf"]},null),(l()(),s._26(null,["\n\n "])),(l()(),s._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,u.theClass,l(n,4,0,"alert"===u.item.type,"error"===u.item.type,"warn"===u.item.type,"success"===u.item.type,"info"===u.item.type,"bare"===u.item.type,u.rtl)),l(n,7,0,!u.item.html),l(n,10,0,u.item.html),l(n,13,0,u.showProgressBar)},function(l,n){l(n,2,0,n.component.item.state)})}function o(l){return s._24(0,[(l()(),s._25(0,null,null,1,"simple-notification",[],null,null,null,a,h)),s._27(122880,null,0,p.a,[d.a,f.q,s.e],null,null)],function(l,n){l(n,1,0)},null)}var s=u("3j3K"),c=u("2Je8"),_=u("g/xi"),p=u("Ev1B"),d=u("XLrO"),f=u("Qbdm");u.d(n,"b",function(){return h}),n.a=a;var m=["\n .simple-notification {\n width: 100%;\n padding: 10px 20px;\n box-sizing: border-box;\n position: relative;\n float: left;\n margin-bottom: 10px;\n color: #fff;\n cursor: pointer;\n transition: all 0.5s;\n }\n\n .simple-notification .sn-title {\n margin: 0;\n padding: 0 50px 0 0;\n line-height: 30px;\n font-size: 20px;\n }\n\n .simple-notification .sn-content {\n margin: 0;\n font-size: 16px;\n padding: 0 50px 0 0;\n line-height: 20px;\n }\n\n .simple-notification .icon {\n position: absolute;\n box-sizing: border-box;\n top: 0;\n right: 0;\n width: 70px;\n height: 70px;\n padding: 10px;\n }\n\n .simple-notification .icon svg {\n fill: #fff;\n width: 100%;\n height: 100%;\n }\n\n .simple-notification .icon svg g {\n fill: #fff;\n }\n\n .simple-notification.rtl-mode {\n direction: rtl;\n }\n\n .simple-notification.rtl-mode .sn-content {\n padding: 0 0 0 50px;\n }\n\n .simple-notification.rtl-mode svg {\n left: 0;\n right: auto;\n }\n\n .simple-notification.error { background: #F44336; }\n .simple-notification.success { background: #8BC34A; }\n .simple-notification.alert { background: #ffdb5b; }\n .simple-notification.info { background: #03A9F4; }\n .simple-notification.warn { background: #ffdb5b; }\n\n .simple-notification .sn-progress-loader {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 5px;\n }\n\n .simple-notification .sn-progress-loader span {\n float: left;\n height: 100%;\n }\n\n .simple-notification.success .sn-progress-loader span { background: #689F38; }\n .simple-notification.error .sn-progress-loader span { background: #D32F2F; }\n .simple-notification.alert .sn-progress-loader span { background: #edc242; }\n .simple-notification.info .sn-progress-loader span { background: #0288D1; }\n .simple-notification.warn .sn-progress-loader span { background: #edc242; }\n .simple-notification.bare .sn-progress-loader span { background: #ccc; }\n\n .simple-notification.warn div .sn-title { color: #444; }\n .simple-notification.warn div .sn-content { color: #444; }\n "],h=s._23({encapsulation:2,styles:m,data:{animation:[{name:"enterLeave",definitions:[{type:0,name:"fromRight",styles:{type:6,styles:{opacity:1,transform:"translateX(0)"}}},{type:1,expr:"* => fromRight",animation:[{type:6,styles:{opacity:0,transform:"translateX(5%)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]},{type:0,name:"fromRightOut",styles:{type:6,styles:{opacity:0,transform:"translateX(-5%)"}}},{type:1,expr:"fromRight => fromRightOut",animation:[{type:6,styles:{opacity:1,transform:"translateX(0)"}},{type:4,styles:null,timings:"300ms ease-in-out"}]},{type:0,name:"fromLeft",styles:{type:6,styles:{opacity:1,transform:"translateX(0)"}}},{type:1,expr:"* => fromLeft",animation:[{type:6,styles:{opacity:0,transform:"translateX(-5%)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]},{type:0,name:"fromLeftOut",styles:{type:6,styles:{opacity:0,transform:"translateX(5%)"}}},{type:1,expr:"fromLeft => fromLeftOut",animation:[{type:6,styles:{opacity:1,transform:"translateX(0)"}},{type:4,styles:null,timings:"300ms ease-in-out"}]},{type:0,name:"scale",styles:{type:6,styles:{opacity:1,transform:"scale(1)"}}},{type:1,expr:"* => scale",animation:[{type:6,styles:{opacity:0,transform:"scale(0)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]},{type:0,name:"scaleOut",styles:{type:6,styles:{opacity:0,transform:"scale(0)"}}},{type:1,expr:"scale => scaleOut",animation:[{type:6,styles:{opacity:1,transform:"scale(1)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]},{type:0,name:"rotate",styles:{type:6,styles:{opacity:1,transform:"rotate(0deg)"}}},{type:1,expr:"* => rotate",animation:[{type:6,styles:{opacity:0,transform:"rotate(5deg)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]},{type:0,name:"rotateOut",styles:{type:6,styles:{opacity:0,transform:"rotate(-5deg)"}}},{type:1,expr:"rotate => rotateOut",animation:[{type:6,styles:{opacity:1,transform:"rotate(0deg)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]}]}]}});s._30("simple-notification",p.a,o,{timeOut:"timeOut",showProgressBar:"showProgressBar",pauseOnHover:"pauseOnHover",clickToClose:"clickToClose",maxLength:"maxLength",theClass:"theClass",rtl:"rtl",animate:"animate",position:"position",item:"item"},{},[])},Ni5f:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},OO5M:function(l,n,u){"use strict";function t(l){return i._24(0,[(l()(),i._25(0,null,null,10,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),i._26(null,["\n "])),(l()(),i._25(0,null,null,7,"div",[["class","w3-panel w3-red"]],null,null,null,null,null)),(l()(),i._26(null,["\n "])),(l()(),i._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),i._26(null,["Connection error"])),(l()(),i._26(null,["\n "])),(l()(),i._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),i._26(null,["The application was unable to connect to the Web API. This could be due to a configuration error..."])),(l()(),i._26(null,["\n "])),(l()(),i._26(null,[" \n "]))],null,null)}function e(l){return i._24(0,[(l()(),i._25(0,null,null,1,"app-connection-error",[],null,null,null,t,p)),i._27(122880,null,0,a.a,[o.a,s.a,c.a],null,null)],function(l,n){l(n,1,0)},null)}var r=u("UYln"),i=u("3j3K"),a=u("FxpQ"),o=u("ATz5"),s=u("+Lwu"),c=u("XLrO");u.d(n,"a",function(){return d});var _=[r.a],p=i._23({encapsulation:0,styles:_,data:{}}),d=i._30("app-connection-error",a.a,e,{},{},[])},RWZN:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},RdYi:function(l,n,u){"use strict";function t(l){return o._24(0,[(l()(),o._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),o._26(null,["",""]))],null,function(l,n){l(n,1,0,n.component._str)})}function e(l){return o._24(0,[(l()(),o._25(0,null,null,3,"button",[["class","w3-button w3-small"],["style","padding: 4px 8px;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!=(e.state._completed=!e.state._completed)&&t}return t},null,null)),o._27(139264,null,0,s.m,[o.v,o.w,o.K,o.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),o._31(["theme-d1","theme-l2","theme-hover"]),(l()(),o._26(null,["",""]))],function(l,n){var u=n.component;l(n,1,0,"w3-button w3-small",l(n,2,0,u.state._completed,!u.state._completed&&u._ready,!u.state._completed&&u._ready))},function(l,n){l(n,3,0,n.component.state._completed?"Completed":"Ready")})}function r(l){return o._24(0,[(l()(),o._28(8388608,null,null,1,null,t)),o._27(8192,null,0,s.l,[o.S,o._5],{ngIf:[0,"ngIf"]},null),(l()(),o._28(8388608,null,null,1,null,e)),o._27(8192,null,0,s.l,[o.S,o._5],{ngIf:[0,"ngIf"]},null)],function(l,n){var u=n.component;l(n,1,0,!u._ready),l(n,3,0,u._ready)},null)}function i(l){return o._24(0,[(l()(),o._25(0,null,null,1,"timer",[],null,null,null,r,p)),o._27(122880,null,0,c.a,[],null,null)],function(l,n){l(n,1,0)},null)}var a=u("SWNH"),o=u("3j3K"),s=u("2Je8"),c=u("CzL3");u.d(n,"b",function(){return p}),n.a=r;var _=[a.a],p=o._23({encapsulation:0,styles:_,data:{}});o._30("timer",c.a,i,{state:"state",time:"time",notification:"notification"},{},[])},RiXa:function(l,n,u){"use strict";var t=u("5oXY"),e=u("ATz5");u.d(n,"a",function(){return r});var r=function(){function l(l,n){this.route=l,this.dataService=n}return l.prototype.ngOnInit=function(){this.steamId=this.route.snapshot.params.playerid,this.dataService.hasFeatureAccess("player","profile",this.steamId)?this.menu.activate("profile"):this.dataService.hasFeatureAccess("player","creatures",this.steamId)?this.menu.activate("creatures"):this.dataService.hasFeatureAccess("player","creatures-cloud",this.steamId)?this.menu.activate("creatures_cloud"):this.dataService.hasFeatureAccess("player","breeding",this.steamId)?this.menu.activate("breeding"):this.dataService.hasFeatureAccess("player","crops",this.steamId)?this.menu.activate("crop_plots"):this.dataService.hasFeatureAccess("player","generators",this.steamId)?this.menu.activate("electrical_generators"):this.dataService.hasFeatureAccess("player","kibbles-eggs",this.steamId)?this.menu.activate("kibbles_and_eggs"):this.dataService.hasFeatureAccess("player","tribelog",this.steamId)&&this.menu.activate("tribelog")},l.ctorParameters=function(){return[{type:t.v},{type:e.a}]},l}()},SQlA:function(l,n,u){"use strict";function t(l){return a._24(0,[(l()(),a._25(0,null,null,1,"i",[["class","material-icons"],["style","margin: -5px 5px -5px -5px; vertical-align: middle;"]],null,null,null,null,null)),(l()(),a._26(null,["check"]))],null,null)}function e(l){return a._24(0,[(l()(),a._25(0,null,null,8,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),a._26(null,["\n "])),(l()(),a._25(0,null,null,5,"button",[["class","w3-button"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.toggleDemoMode()&&t}return t},null,null)),a._27(139264,null,0,s.m,[a.v,a.w,a.K,a.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),a._31(["theme-d1","theme-l2","theme-hover"]),(l()(),a._28(8388608,null,null,1,null,t)),a._27(8192,null,0,s.l,[a.S,a._5],{ngIf:[0,"ngIf"]},null),(l()(),a._26(null,["",""])),(l()(),a._26(null,["\n"]))],function(l,n){var u=n.component;l(n,3,0,"w3-button",l(n,4,0,u.demoMode,!u.demoMode,!u.demoMode)),l(n,6,0,u.demoMode)},function(l,n){l(n,7,0,n.component.demoMode?"Demo Mode Enabled":"Enable Demo Mode")})}function r(l){return a._24(0,[(l()(),a._25(0,null,null,1,"app-developer",[],null,null,null,e,f)),a._27(122880,null,0,o.a,[c.a,_.a,p.a],null,null)],function(l,n){l(n,1,0)},null)}var i=u("7MbP"),a=u("3j3K"),o=u("Fnlp"),s=u("2Je8"),c=u("ATz5"),_=u("+Lwu"),p=u("XLrO");u.d(n,"a",function(){return m});var d=[i.a],f=a._23({encapsulation:0,styles:d,data:{}}),m=a._30("app-developer",o.a,r,{},{},[])},SWNH:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},SWoV:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},UYln:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},XhEa:function(l,n,u){"use strict";function t(l){return i._24(0,[(l()(),i._25(0,null,null,2,"simple-notification",[],null,null,null,a.a,a.b)),i._27(122880,null,0,o.a,[s.a,c.q,i.e],{timeOut:[0,"timeOut"],showProgressBar:[1,"showProgressBar"],pauseOnHover:[2,"pauseOnHover"],clickToClose:[3,"clickToClose"],maxLength:[4,"maxLength"],theClass:[5,"theClass"],rtl:[6,"rtl"],animate:[7,"animate"],position:[8,"position"],item:[9,"item"]},null),(l()(),i._26(null,["\n "]))],function(l,n){var u=n.component;l(n,1,0,u.timeOut,u.showProgressBar,u.pauseOnHover,u.clickToClose,u.maxLength,u.theClass,u.rtl,u.animate,n.context.index,n.context.$implicit)},null)}function e(l){return i._24(0,[(l()(),i._26(null,["\n "])),(l()(),i._25(0,null,null,5,"div",[["class","simple-notification-wrapper"]],null,null,null,null,null)),i._27(139264,null,0,_.m,[i.v,i.w,i.K,i.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(l()(),i._26(null,["\n "])),(l()(),i._28(8388608,null,null,1,null,t)),i._27(401408,null,0,_.n,[i.S,i._5,i.v],{ngForOf:[0,"ngForOf"]},null),(l()(),i._26(null,["\n "])),(l()(),i._26(null,["\n "]))],function(l,n){var u=n.component;l(n,2,0,"simple-notification-wrapper",u.position),l(n,5,0,u.notifications)},null)}function r(l){return i._24(0,[(l()(),i._25(0,null,null,1,"simple-notifications",[],null,null,null,e,f)),i._27(122880,null,0,p.a,[s.a],null,null)],function(l,n){l(n,1,0)},null)}var i=u("3j3K"),a=u("Layn"),o=u("Ev1B"),s=u("XLrO"),c=u("Qbdm"),_=u("2Je8"),p=u("B8cY");u.d(n,"b",function(){return f}),n.a=e;var d=["\n .simple-notification-wrapper {\n position: fixed;\n width: 300px;\n z-index: 1000;\n }\n \n .simple-notification-wrapper.left { left: 20px; }\n .simple-notification-wrapper.top { top: 20px; }\n .simple-notification-wrapper.right { right: 20px; }\n .simple-notification-wrapper.bottom { bottom: 20px; }\n \n @media (max-width: 340px) {\n .simple-notification-wrapper {\n width: auto;\n left: 20px;\n right: 20px;\n }\n }\n "],f=i._23({encapsulation:2,styles:d,data:{}});i._30("simple-notifications",p.a,r,{options:"options"},{onCreate:"onCreate",onDestroy:"onDestroy"},[])},YWx4:function(l,n,u){"use strict";var t=u("5oXY"),e=u("3MNG"),r=u("hHgl"),i=u("ATz5"),a=u("lHWG"),o=u("kZql");u.d(n,"a",function(){return s});var s=function(){function l(l,n,u,t,e){this.dataService=l,this.httpService=n,this.breadcrumbService=u,this.notificationsService=t,this.router=e,this.notificationOptions={position:["top","right"],timeOut:1e3,lastOnBottom:!1},this.showLogin=!1,this.currentUrl="/",this.serversUpdatedBefore=!1,this.loading=!0,u.addFriendlyNameForRoute("/accessdenied","Access Denied"),u.addFriendlyNameForRoute("/connectionerror","Connection error"),u.hideRoute("/player"),u.hideRoute("/servers"),u.hideRoute("/server"),u.hideRoute("/admin"),u.addCallbackForRouteRegex("^/player/.+$",this.getNameForPlayer)}return l.prototype.ngOnInit=function(){var l=this;this.routerEventsSubscription=this.router.events.subscribe(function(n){l.navigationInterceptor(n)}),this.currentUrl=window.location.href||"/",this.serversUpdatedSubscription=this.dataService.ServersUpdated$.subscribe(function(n){l.serversUpdatedBefore||!n||n.User&&n.User.SteamId||(l.showLogin=!0),l.serversUpdatedBefore=!0})},l.prototype.ngOnDestroy=function(){this.routerEventsSubscription.unsubscribe(),this.serversUpdatedSubscription.unsubscribe()},l.prototype.navigationInterceptor=function(l){l instanceof t.A?this.loading=!0:l instanceof t.y?this.loading=!1:l instanceof t.B?this.loading=!1:l instanceof t.C&&(this.loading=!1)},l.prototype.getNameForPlayer=function(l){return"Player"},l.prototype.getTheme=function(){return localStorage.getItem("theme")||"light"},l.prototype.setTheme=function(l){return localStorage.setItem("theme",l),!1},l.prototype.openLogin=function(l){this.showLogin=!0,l.stopPropagation(),l.preventDefault()},l.prototype.closeLogin=function(l){this.showLogin=!1},l.prototype.getLoginUrl=function(){return this.httpService.getApiBaseUrl()+"/authentication/login"},l.prototype.getLogoutUrl=function(){return o.a.demo?"":this.httpService.getApiBaseUrl()+"/authentication/logout?returnUrl="+this.currentUrl},l.ctorParameters=function(){return[{type:i.a},{type:a.a},{type:r.a},{type:e.a},{type:t.g}]},l}()},ZfYc:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},beiT:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=["tr th.orderBy{cursor:pointer}a.w3-button.disabled{color:#a9a9a9}a.w3-button.disabled:hover{color:#a9a9a9!important;background-color:transparent!important;opacity:1!important;cursor:default}"]},coiB:function(l,n,u){"use strict";function t(l){return i._24(0,[(l()(),i._25(0,null,null,11,"div",[["class","w3-sidebar theme-l2"],["id","menu"],["style","min-height: 52px;"]],null,null,null,null,null)),(l()(),i._26(null,[" \n "])),(l()(),i._25(0,null,null,1,"button",[["class","w3-button w3-xlarge w3-display-topright"],["id","menubtn"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.toggleMenu()&&t}return t},null,null)),(l()(),i._26(null,["☰"])),(l()(),i._26(null,["\n "])),(l()(),i._25(0,null,null,5,"section",[["class","w3-container"],["id","menucontent"]],null,null,null,null,null)),i._27(139264,null,0,o.m,[i.v,i.w,i.K,i.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),i._31(["hide"]),(l()(),i._26(null,["\n "])),i._36(null,0),(l()(),i._26(null,["\n "])),(l()(),i._26(null,["\n"]))],function(l,n){l(n,6,0,"w3-container",l(n,7,0,!n.component.menuVisible))},null)}function e(l){return i._24(0,[(l()(),i._25(0,null,null,1,"app-menu",[],null,null,null,t,_)),i._27(122880,null,0,a.a,[s.a],null,null)],function(l,n){l(n,1,0)},null)}var r=u("+SUW"),i=u("3j3K"),a=u("8kYA"),o=u("2Je8"),s=u("ATz5");u.d(n,"b",function(){return _}),n.a=t;var c=[r.a],_=i._23({encapsulation:0,styles:c,data:{}});i._30("app-menu",a.a,e,{},{},["*"])},"e/mT":function(l,n,u){"use strict";var t=u("5oXY"),e=u("3MNG"),r=u("ATz5"),i=u("+Lwu"),a=u("lHWG");u.d(n,"a",function(){return o});var o=function(){function l(l,n,u,t,e,r){this.route=l,this.router=n,this.httpService=u,this.dataService=t,this.messageService=e,this.notificationsService=r,this.menuOption=void 0,this.loaded=!1,this.loadedStructures=!1}return l.prototype.getServer=function(){var l=this;this.httpService.getAdminServer(this.serverKey).then(function(n){l.server=n,l.loaded=!0}).catch(function(n){l.server=null,l.loaded=!0})},l.prototype.getStructures=function(){var l=this;this.httpService.getStructures(this.serverKey).then(function(n){l.structures=n,l.loadedStructures=!0}).catch(function(n){l.structures=void 0,l.loadedStructures=!0})},l.prototype.ngOnInit=function(){var l=this;this.serverKey=this.route.snapshot.params.id,this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){l.menuOption=n,"structures"==l.menuOption&&l.getStructures()}),this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){l.serverKey==n&&(l.updateServer(),l.showServerUpdateNotification(n))}),this.getServer()},l.prototype.ngOnDestroy=function(){this.menuOptionSubscription.unsubscribe(),this.serverUpdatedSubscription.unsubscribe()},l.prototype.getTribeMember=function(l){return this.server.Players.find(function(n){return n.SteamId==l})},l.prototype.updateServer=function(){this.getServer()},l.prototype.showServerUpdateNotification=function(l){this.notificationsService.success("Server Update",l+" was updated; Reloading data...",{showProgressBar:!0,pauseOnHover:!0,clickToClose:!0})},l.prototype.isMenuActive=function(l){return this.menuOption==l},l.ctorParameters=function(){return[{type:t.v},{type:t.g},{type:a.a},{type:r.a},{type:i.a},{type:e.a}]},l}()},fYAd:function(l,n,u){"use strict";function t(l){return y._24(0,[(l()(),y._25(0,null,null,4,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCurrentMode(l.parent.context.$implicit.key)&&t}return t},null,null)),y._27(139264,null,0,S.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["theme-d1"]),y._34(65536,S.q,[y.O]),(l()(),y._26(null,["",""]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.isCurrentMode(n.parent.context.$implicit.key)))},function(l,n){var u=n.component;l(n,0,0,100/y._33(n,0,0,y._29(n,3).transform(u.numEnabledModes))),l(n,4,0,n.parent.context.$implicit.name)})}function e(l){return y._24(0,[(l()(),y._25(0,null,null,5,null,null,null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,2,null,t)),y._27(8192,null,0,S.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),y._34(65536,S.q,[y.O]),(l()(),y._26(null,["\n "]))],function(l,n){l(n,3,0,y._33(n,3,0,y._29(n,4).transform(n.context.$implicit.enabled)))},null)}function r(l){return y._24(0,[(l()(),y._25(0,null,null,4,"div",[["class","w3-bar theme-l2 w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,e)),y._27(401408,null,0,S.n,[y.S,y._5,y.v],{ngForOf:[0,"ngForOf"],ngForTrackBy:[1,"ngForTrackBy"]},null),(l()(),y._26(null,["\n"]))],function(l,n){var u=n.component;l(n,3,0,u._modes,u.trackByKey)},null)}function i(l){return y._24(0,[(l()(),y._26(null,["\n "]))],null,null)}function a(l){return y._24(0,[(l()(),y._28(8388608,null,null,1,null,i)),y._27(270336,null,0,S.s,[y.S],{ngTemplateOutlet:[0,"ngTemplateOutlet"]},null),(l()(),y._28(0,null,null,0))],function(l,n){l(n,1,0,n.parent.parent.context.$implicit.headerTemplate)},null)}function o(l){return y._24(0,[(l()(),y._25(0,null,null,6,"th",[],[[8,"title",0]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.orderBy(l.parent.context.$implicit.key,u)&&t}return t},null,null)),y._27(139264,null,0,S.m,[y.v,y.w,y.K,y.J],{ngClass:[0,"ngClass"]},null),y._31(["orderBy"]),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,a)),y._27(8192,null,0,S.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),(l()(),y._26(null,["\n "]))],function(l,n){l(n,1,0,l(n,2,0,n.parent.context.$implicit.orderBy)),l(n,5,0,n.parent.context.$implicit.headerTemplate)},function(l,n){l(n,0,0,y._38(1,"",n.parent.context.$implicit.title,""))})}function s(l){return y._24(0,[(l()(),y._25(0,null,null,4,null,null,null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,o)),y._27(8192,null,0,S.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),(l()(),y._26(null,["\n "]))],function(l,n){l(n,3,0,n.component.showColumn(n.context.$implicit.key))},null)}function c(l){return y._24(0,[(l()(),y._26(null,["\n "]))],null,null)}function _(l){return y._24(0,[(l()(),y._28(8388608,null,null,2,null,c)),y._27(270336,null,0,S.s,[y.S],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),y._31(["$implicit"]),(l()(),y._28(0,null,null,0))],function(l,n){l(n,1,0,l(n,2,0,n.parent.parent.parent.context.$implicit),n.parent.parent.context.$implicit.cellTemplate)},null)}function p(l){return y._24(0,[(l()(),y._25(0,null,null,4,"td",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,_)),y._27(8192,null,0,S.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),(l()(),y._26(null,["\n "]))],function(l,n){l(n,3,0,n.parent.context.$implicit.cellTemplate)},null)}function d(l){return y._24(0,[(l()(),y._25(0,null,null,4,null,null,null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,p)),y._27(8192,null,0,S.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),(l()(),y._26(null,["\n "]))],function(l,n){l(n,3,0,n.component.showColumn(n.context.$implicit.key))},null)}function f(l){return y._24(0,[(l()(),y._25(0,null,null,4,"tr",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,d)),y._27(401408,null,0,S.n,[y.S,y._5,y.v],{ngForOf:[0,"ngForOf"],ngForTrackBy:[1,"ngForTrackBy"]},null),(l()(),y._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,u._columnTemplates,u.trackByKey)},null)}function m(l){return y._24(0,[(l()(),y._25(0,null,null,3,"option",[],null,null,null,null,null)),y._27(73728,null,0,b.k,[y.K,y.J,[2,b.l]],{value:[0,"value"]},null),y._27(73728,null,0,b.m,[y.K,y.J,[8,null]],{value:[0,"value"]},null),(l()(),y._26(null,["",""]))],function(l,n){l(n,1,0,n.context.$implicit.value),l(n,2,0,n.context.$implicit.value)},function(l,n){l(n,3,0,n.context.$implicit.text)})}function h(l){return y._24(2,[(l()(),y._28(8388608,null,null,2,null,r)),y._27(8192,null,0,S.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),y._34(65536,S.q,[y.O]),(l()(),y._26(null,["\n"])),(l()(),y._25(0,null,null,21,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,18,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,7,"thead",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,4,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,s)),y._27(401408,null,0,S.n,[y.S,y._5,y.v],{ngForOf:[0,"ngForOf"],ngForTrackBy:[1,"ngForTrackBy"]},null),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,6,"tbody",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,3,null,f)),y._27(401408,null,0,S.n,[y.S,y._5,y.v],{ngForOf:[0,"ngForOf"],ngForTrackBy:[1,"ngForTrackBy"]},null),y._34(65536,S.q,[y.O]),y._34(0,S.t,[]),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n"])),(l()(),y._26(null,["\n"])),(l()(),y._25(0,null,null,59,"div",[["class","w3-cell-row w3-margin-top"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,56,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,53,"table",[["class","w3-responsive w3-right w3-small"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,51,"tbody",[],null,null,null,null,null)),(l()(),y._25(0,null,null,49,"tr",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,32,"td",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,29,"div",[["class","w3-bar w3-border border-theme"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,3,"a",[["class","w3-button w3-border-right border-theme"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setFirstPage()&&t}return t},null,null)),y._27(139264,null,0,S.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["disabled"]),(l()(),y._26(null,["«"])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,3,"a",[["class","w3-button device-tiny-show"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setPrevPage()&&t}return t},null,null)),y._27(139264,null,0,S.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["disabled"]),(l()(),y._26(null,["❮"])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,3,"a",[["class","w3-button w3-border-right border-theme device-tiny-hide"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setPrevPage()&&t}return t},null,null)),y._27(139264,null,0,S.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["disabled"]),(l()(),y._26(null,["❮"])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,1,"span",[["class","device-tiny-hide"]],null,null,null,null,null)),(l()(),y._26(null,[" "," - "," of "," "])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,3,"a",[["class","w3-button w3-border-left border-theme w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setLastPage()&&t}return t},null,null)),y._27(139264,null,0,S.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["disabled"]),(l()(),y._26(null,["»"])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,3,"a",[["class","w3-button w3-border-left border-theme w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setNextPage()&&t}return t},null,null)),y._27(139264,null,0,S.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["disabled"]),(l()(),y._26(null,["❯"])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,12,"td",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,9,"select",[["class","w3-select w3-border border-theme theme-l1"],["style","max-width: 200px; padding: 12px 5px;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(l,n,u){var t=!0,e=l.component;if("change"===n){t=!1!==y._29(l,73).onChange(u.target.value)&&t}if("blur"===n){t=!1!==y._29(l,73).onTouched()&&t}if("ngModelChange"===n){t=!1!==e.setViewLimit(u)&&t}return t},null,null)),y._27(8192,null,0,b.l,[y.J,y.K],null,null),y._37(512,null,b.g,function(l){return[l]},[b.l]),y._27(335872,null,0,b.h,[[8,null],[8,null],[8,null],[2,b.g]],{model:[0,"model"]},{update:"ngModelChange"}),y._37(1024,null,b.i,null,[b.h]),y._27(8192,null,0,b.j,[b.i],null,null),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,m)),y._27(401408,null,0,S.n,[y.S,y._5,y.v],{ngForOf:[0,"ngForOf"]},null),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n"]))],function(l,n){var u=n.component;l(n,1,0,y._33(n,1,0,y._29(n,2).transform(u.numEnabledModes))>1),l(n,13,0,u._columnTemplates,u.trackByKey),l(n,20,0,y._33(n,20,0,y._29(n,22).transform(y._33(n,20,0,y._29(n,21).transform(u._rows$)),u._fromRow,u._fromRow+u._numRows)),u.trackByRow),l(n,41,0,"w3-button w3-border-right border-theme",l(n,42,0,u.isFirstPage())),l(n,46,0,"w3-button device-tiny-show",l(n,47,0,u.isFirstPage())),l(n,51,0,"w3-button w3-border-right border-theme device-tiny-hide",l(n,52,0,u.isFirstPage())),l(n,59,0,"w3-button w3-border-left border-theme w3-right",l(n,60,0,u.isLastPage())),l(n,64,0,"w3-button w3-border-left border-theme w3-right",l(n,65,0,u.isLastPage())),l(n,75,0,u._numRows),l(n,80,0,u._viewOptions)},function(l,n){var u=n.component;l(n,56,0,u._fromRow,u.getLastRowOffset(),u._rows.length),l(n,72,0,y._29(n,77).ngClassUntouched,y._29(n,77).ngClassTouched,y._29(n,77).ngClassPristine,y._29(n,77).ngClassDirty,y._29(n,77).ngClassValid,y._29(n,77).ngClassInvalid,y._29(n,77).ngClassPending)})}function v(l){return y._24(0,[(l()(),y._25(0,null,null,3,"ark-data-table",[],null,null,null,h,C)),y._27(57344,null,2,w.a,[y.O],null,null),y._35(301989888,1,{modeTemplates:1}),y._35(301989888,2,{columnTemplates:1})],function(l,n){l(n,1,0)},null)}var g=u("beiT"),y=u("3j3K"),S=u("2Je8"),b=u("NVOs"),w=u("0jRk");u.d(n,"b",function(){return C}),n.a=h;var k=[g.a],C=y._23({encapsulation:2,styles:k,data:{}});y._30("ark-data-table",w.a,v,{rows:"rows",trackByProp:"trackByProp",sortFunctions:"sortFunctions",orderByColumn:"orderByColumn"},{},[])},h5ac:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},if6N:function(l,n,u){"use strict";function t(l){return c._24(0,[(l()(),c._25(0,null,null,1,"a",[["role","button"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.navigateTo("/")&&t}return t},null,null)),(l()(),c._26(null,["",""]))],null,function(l,n){l(n,1,0,n.parent.context.$implicit)})}function e(l){return c._24(0,[(l()(),c._25(0,null,null,1,"a",[["role","button"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.navigateTo(l.parent.context.$implicit)&&t}return t},null,null)),(l()(),c._26(null,["",""]))],null,function(l,n){l(n,1,0,n.component.friendlyName(n.parent.context.$implicit))})}function r(l){return c._24(0,[(l()(),c._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),c._26(null,["",""]))],null,function(l,n){l(n,1,0,n.component.friendlyName(n.parent.context.$implicit))})}function i(l){return c._24(0,[(l()(),c._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),c._26(null,["",""]))],null,function(l,n){l(n,1,0,n.component.friendlyName("/"))})}function a(l){return c._24(0,[(l()(),c._25(0,null,null,16,"li",[],null,null,null,null,null)),c._27(139264,null,0,_.m,[c.v,c.w,c.K,c.J],{ngClass:[0,"ngClass"]},null),c._31(["breadcrumb-item","active"]),(l()(),c._26(null,[" "])),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,t)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,e)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,r)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,i)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "]))],function(l,n){var u=n.component;l(n,1,0,l(n,2,0,u.useBootstrap,n.context.last)),l(n,6,0,!n.context.last&&n.context.$implicit==u.prefix),l(n,9,0,!n.context.last&&n.context.$implicit!=u.prefix),l(n,12,0,n.context.last),l(n,15,0,n.context.last&&n.context.$implicit==u.prefix)},null)}function o(l){return c._24(0,[(l()(),c._26(null,["\n "])),(l()(),c._25(0,null,null,4,"ul",[],[[2,"breadcrumb",null]],null,null,null,null)),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,a)),c._27(401408,null,0,_.n,[c.S,c._5,c.v],{ngForOf:[0,"ngForOf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._26(null,["\n "]))],function(l,n){l(n,4,0,n.component._urls)},function(l,n){l(n,1,0,n.component.useBootstrap)})}function s(l){return c._24(0,[(l()(),c._25(0,null,null,1,"breadcrumb",[],null,null,null,o,h)),c._27(385024,null,0,p.a,[d.g,f.a],null,null)],function(l,n){l(n,1,0)},null)}var c=u("3j3K"),_=u("2Je8"),p=u("v8ur"),d=u("5oXY"),f=u("aT6V");u.d(n,"b",function(){return h}),n.a=o;var m=[],h=c._23({encapsulation:2,styles:m,data:{}});c._30("breadcrumb",p.a,s,{useBootstrap:"useBootstrap",prefix:"prefix"},{},[])},jWPz:function(l,n,u){"use strict";var t=u("3j3K");u.d(n,"c",function(){return e}),u.d(n,"b",function(){return r}),u.d(n,"a",function(){return i});var e=function(){function l(l){this.template=l}return l.ctorParameters=function(){return[{type:t._5}]},l}(),r=function(){function l(l){this.template=l}return l.ctorParameters=function(){return[{type:t._5}]},l}(),i=function(){function l(){}return l}()},joX7:function(l,n,u){"use strict";var t=u("Gvdl");u.n(t);u.d(n,"a",function(){return e});var e=function(){function l(){this.enabled=t.Observable.of(!0)}return Object.defineProperty(l.prototype,"columnKeys",{set:function(l){this._columnKeys=l,this.ColumnKeys=this._columnKeys.split(",")},enumerable:!0,configurable:!0}),l}()},jxRA:function(l,n,u){"use strict";function t(l){return o._24(0,[(l()(),o._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==o._29(l.parent.parent,2).activate(l.context.$implicit.Key)&&t}return t},null,null)),o._27(139264,null,0,s.m,[o.v,o.w,o.K,o.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),o._31(["theme-d1"]),(l()(),o._26(null,["",""]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,o._29(n.parent.parent,2).active(n.context.$implicit.Key)))},function(l,n){l(n,3,0,n.context.$implicit.Key)})}function e(l){return o._24(0,[(l()(),o._25(0,null,null,4,null,null,null,null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._28(8388608,null,null,1,null,t)),o._27(401408,null,0,s.n,[o.S,o._5,o.v],{ngForOf:[0,"ngForOf"]},null),(l()(),o._26(null,["\n "]))],function(l,n){l(n,3,0,n.component.dataService.Servers.Servers)},null)}function r(l){return o._24(0,[o._35(201326592,1,{menu:0}),(l()(),o._25(0,null,null,16,"app-menu",[],null,null,null,c.a,c.b)),o._27(122880,[[1,4],["menu",4]],0,_.a,[p.a],null,null),(l()(),o._26(0,["\n "])),(l()(),o._25(0,null,0,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),o._26(null,["Servers"])),(l()(),o._26(0,["\n "])),(l()(),o._25(0,null,0,9,"div",[["class","w3-cell-row theme-l2"]],null,null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==o._29(l,2).activate("overview")&&t}return t},null,null)),o._27(139264,null,0,s.m,[o.v,o.w,o.K,o.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),o._31(["theme-d1"]),(l()(),o._26(null,["Overview"])),(l()(),o._26(null,["\n "])),(l()(),o._28(8388608,null,null,1,null,e)),o._27(8192,null,0,s.l,[o.S,o._5],{ngIf:[0,"ngIf"]},null),(l()(),o._26(null,["\n "])),(l()(),o._26(0,["\n"]))],function(l,n){var u=n.component;l(n,2,0),l(n,10,0,"w3-button w3-cell w3-mobile",l(n,11,0,o._29(n,2).active("overview"))),l(n,15,0,void 0!=u.dataService.Servers&&u.dataService.hasFeatureAccess("home","serverdetails"))},null)}function i(l){return o._24(0,[(l()(),o._25(0,null,null,1,"app-server-list-menu",[],[[8,"className",0]],null,null,r,m)),o._27(57344,null,0,d.a,[p.a],null,null)],function(l,n){l(n,1,0)},function(l,n){l(n,0,0,o._29(n,1).menu.className)})}var a=u("mjI6"),o=u("3j3K"),s=u("2Je8"),c=u("coiB"),_=u("8kYA"),p=u("ATz5"),d=u("JKTH");u.d(n,"a",function(){return h});var f=[a.a],m=o._23({encapsulation:0,styles:f,data:{}}),h=o._30("app-server-list-menu",d.a,i,{},{},[])},kZql:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t={production:!0,demo:!1,demoDate:null,apiBaseUrl:"//:60001/api",signalrBaseUrl:"//:60001/signalr"}},kke6:function(l,n,u){"use strict";var t=u("3j3K"),e=u("Iksp"),r=u("5oXY"),i=u("2Je8"),a=u("ktkS"),o=u("Qbdm"),s=u("NVOs"),c=u("Fzro"),_=u("KN8t"),p=u("zsCj"),d=u("J8nT"),f=u("aT6V"),m=u("XLrO"),h=u("lHWG"),v=u("+Lwu"),g=u("ATz5"),y=u("AcJ7"),S=u("+w0e"),b=u("nuuw"),w=u("ofcV"),k=u("+T68"),C=u("1AkI"),I=u("+KJ1"),x=u("0VGx"),O=u("nMh6"),A=u("jxRA"),T=u("SQlA"),F=u("0ME9"),M=u("OO5M"),L=u("1A80"),P=u("KZxv"),N=u("RiXa"),B=u("qn86"),K=u("7xIs"),j=u("e/mT"),$=u("08Wm"),R=u("JLFQ"),D=u("JKTH"),E=u("Fnlp"),U=u("+qYp"),z=u("FxpQ"),J=u("1GJ2");u.d(n,"a",function(){return X});var G=this&&this.__extends||function(){var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var u in n)n.hasOwnProperty(u)&&(l[u]=n[u])};return function(n,u){function t(){this.constructor=n}l(n,u),n.prototype=null===u?Object.create(u):(t.prototype=u.prototype,new t)}}(),H=function(l){function n(n){return l.call(this,n,[b.a,w.a,k.a,C.a,I.a,x.a,O.a,A.a,T.a,F.a,M.a,L.a],[L.a])||this}return G(n,l),Object.defineProperty(n.prototype,"_LOCALE_ID_29",{get:function(){return null==this.__LOCALE_ID_29&&(this.__LOCALE_ID_29="en-US"),this.__LOCALE_ID_29},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_NgLocalization_30",{get:function(){return null==this.__NgLocalization_30&&(this.__NgLocalization_30=new i.a(this._LOCALE_ID_29)),this.__NgLocalization_30},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_APP_ID_31",{get:function(){return null==this.__APP_ID_31&&(this.__APP_ID_31=t.b()),this.__APP_ID_31},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_IterableDiffers_32",{get:function(){return null==this.__IterableDiffers_32&&(this.__IterableDiffers_32=t.c()),this.__IterableDiffers_32},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_KeyValueDiffers_33",{get:function(){return null==this.__KeyValueDiffers_33&&(this.__KeyValueDiffers_33=t.d()),this.__KeyValueDiffers_33},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_DomSanitizer_34",{get:function(){return null==this.__DomSanitizer_34&&(this.__DomSanitizer_34=new o.b(this.parent.get(o.c))),this.__DomSanitizer_34},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Sanitizer_35",{get:function(){return null==this.__Sanitizer_35&&(this.__Sanitizer_35=this._DomSanitizer_34),this.__Sanitizer_35},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_HAMMER_GESTURE_CONFIG_36",{get:function(){return null==this.__HAMMER_GESTURE_CONFIG_36&&(this.__HAMMER_GESTURE_CONFIG_36=new o.d),this.__HAMMER_GESTURE_CONFIG_36},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_EVENT_MANAGER_PLUGINS_37",{get:function(){return null==this.__EVENT_MANAGER_PLUGINS_37&&(this.__EVENT_MANAGER_PLUGINS_37=[new o.e(this.parent.get(o.c)),new o.f(this.parent.get(o.c)),new o.g(this.parent.get(o.c),this._HAMMER_GESTURE_CONFIG_36)]),this.__EVENT_MANAGER_PLUGINS_37},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_EventManager_38",{get:function(){return null==this.__EventManager_38&&(this.__EventManager_38=new o.h(this._EVENT_MANAGER_PLUGINS_37,this.parent.get(t.e))),this.__EventManager_38},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵDomSharedStylesHost_39",{get:function(){return null==this.__ɵDomSharedStylesHost_39&&(this.__ɵDomSharedStylesHost_39=new o.i(this.parent.get(o.c))),this.__ɵDomSharedStylesHost_39},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵDomRendererFactory2_40",{get:function(){return null==this.__ɵDomRendererFactory2_40&&(this.__ɵDomRendererFactory2_40=new o.j(this._EventManager_38,this._ɵDomSharedStylesHost_39)),this.__ɵDomRendererFactory2_40},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_AnimationDriver_41",{get:function(){return null==this.__AnimationDriver_41&&(this.__AnimationDriver_41=_.a()),this.__AnimationDriver_41},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵAnimationStyleNormalizer_42",{get:function(){return null==this.__ɵAnimationStyleNormalizer_42&&(this.__ɵAnimationStyleNormalizer_42=_.b()),this.__ɵAnimationStyleNormalizer_42},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵAnimationEngine_43",{get:function(){return null==this.__ɵAnimationEngine_43&&(this.__ɵAnimationEngine_43=new _.c(this._AnimationDriver_41,this._ɵAnimationStyleNormalizer_42)),this.__ɵAnimationEngine_43},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_RendererFactory2_44",{get:function(){return null==this.__RendererFactory2_44&&(this.__RendererFactory2_44=_.d(this._ɵDomRendererFactory2_40,this._ɵAnimationEngine_43,this.parent.get(t.e))),this.__RendererFactory2_44},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵSharedStylesHost_45",{get:function(){return null==this.__ɵSharedStylesHost_45&&(this.__ɵSharedStylesHost_45=this._ɵDomSharedStylesHost_39),this.__ɵSharedStylesHost_45},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Testability_46",{get:function(){return null==this.__Testability_46&&(this.__Testability_46=new t.f(this.parent.get(t.e))),this.__Testability_46},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Meta_47",{get:function(){return null==this.__Meta_47&&(this.__Meta_47=new o.k(this.parent.get(o.c))),this.__Meta_47},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Title_48",{get:function(){return null==this.__Title_48&&(this.__Title_48=new o.l(this.parent.get(o.c))),this.__Title_48},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵi_49",{get:function(){return null==this.__ɵi_49&&(this.__ɵi_49=new s.a),this.__ɵi_49},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_BrowserXhr_50",{get:function(){return null==this.__BrowserXhr_50&&(this.__BrowserXhr_50=new c.a),this.__BrowserXhr_50},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ResponseOptions_51",{get:function(){return null==this.__ResponseOptions_51&&(this.__ResponseOptions_51=new c.b),this.__ResponseOptions_51},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_XSRFStrategy_52",{get:function(){return null==this.__XSRFStrategy_52&&(this.__XSRFStrategy_52=c.c()),this.__XSRFStrategy_52},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_XHRBackend_53",{get:function(){return null==this.__XHRBackend_53&&(this.__XHRBackend_53=new c.d(this._BrowserXhr_50,this._ResponseOptions_51,this._XSRFStrategy_52)),this.__XHRBackend_53},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_RequestOptions_54",{get:function(){return null==this.__RequestOptions_54&&(this.__RequestOptions_54=new c.e),this.__RequestOptions_54},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Http_55",{get:function(){return null==this.__Http_55&&(this.__Http_55=c.f(this._XHRBackend_53,this._RequestOptions_54)),this.__Http_55},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ActivatedRoute_56",{get:function(){return null==this.__ActivatedRoute_56&&(this.__ActivatedRoute_56=r.a(this._Router_16)),this.__ActivatedRoute_56},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_NoPreloading_57",{get:function(){return null==this.__NoPreloading_57&&(this.__NoPreloading_57=new r.b),this.__NoPreloading_57},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_PreloadingStrategy_58",{get:function(){return null==this.__PreloadingStrategy_58&&(this.__PreloadingStrategy_58=this._NoPreloading_57),this.__PreloadingStrategy_58},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_RouterPreloader_59",{get:function(){return null==this.__RouterPreloader_59&&(this.__RouterPreloader_59=new r.c(this._Router_16,this._NgModuleFactoryLoader_14,this._Compiler_13,this,this._PreloadingStrategy_58)),this.__RouterPreloader_59},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_PreloadAllModules_60",{get:function(){return null==this.__PreloadAllModules_60&&(this.__PreloadAllModules_60=new r.d),this.__PreloadAllModules_60},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ROUTER_INITIALIZER_61",{get:function(){return null==this.__ROUTER_INITIALIZER_61&&(this.__ROUTER_INITIALIZER_61=r.e(this._ɵg_3)),this.__ROUTER_INITIALIZER_61},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_APP_BOOTSTRAP_LISTENER_62",{get:function(){return null==this.__APP_BOOTSTRAP_LISTENER_62&&(this.__APP_BOOTSTRAP_LISTENER_62=[this._ROUTER_INITIALIZER_61]),this.__APP_BOOTSTRAP_LISTENER_62},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_BreadcrumbService_63",{get:function(){return null==this.__BreadcrumbService_63&&(this.__BreadcrumbService_63=new f.a),this.__BreadcrumbService_63},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_NotificationsService_64",{get:function(){return null==this.__NotificationsService_64&&(this.__NotificationsService_64=new m.a),this.__NotificationsService_64},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_HttpService_65",{get:function(){return null==this.__HttpService_65&&(this.__HttpService_65=new h.a(this._Http_55)),this.__HttpService_65},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_MessageService_66",{get:function(){return null==this.__MessageService_66&&(this.__MessageService_66=new v.a(this.parent.get(t.e))),this.__MessageService_66},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_DataService_67",{get:function(){return null==this.__DataService_67&&(this.__DataService_67=new g.a(this._HttpService_65,this._MessageService_66)),this.__DataService_67},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_DataServiceResolver_68",{get:function(){return null==this.__DataServiceResolver_68&&(this.__DataServiceResolver_68=new y.a(this._DataService_67,this._Router_16)),this.__DataServiceResolver_68},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_AccessControlRouteGuardService_69",{get:function(){return null==this.__AccessControlRouteGuardService_69&&(this.__AccessControlRouteGuardService_69=new S.a(this._DataService_67,this._Router_16)),this.__AccessControlRouteGuardService_69},enumerable:!0,configurable:!0}),n.prototype.createInternal=function(){return this._ɵa_0=r.f(this.parent.get(r.g,null)),this._ErrorHandler_1=o.m(),this._NgProbeToken_2=[r.h()],this._ɵg_3=new r.i(this),this._APP_INITIALIZER_4=[t.g,o.n(this.parent.get(o.o,null),this._NgProbeToken_2),r.j(this._ɵg_3)],this._ApplicationInitStatus_5=new t.h(this._APP_INITIALIZER_4),this._ɵf_6=new t.i(this.parent.get(t.e),this.parent.get(t.j),this,this._ErrorHandler_1,this.componentFactoryResolver,this._ApplicationInitStatus_5),this._ApplicationRef_7=this._ɵf_6,this._UrlSerializer_8=new r.k,this._RouterOutletMap_9=new r.l,this._ROUTER_CONFIGURATION_10={},this._LocationStrategy_11=r.m(this.parent.get(i.b),this.parent.get(i.c,null),this._ROUTER_CONFIGURATION_10),this._Location_12=new i.d(this._LocationStrategy_11),this._Compiler_13=new t.k,this._NgModuleFactoryLoader_14=new t.l(this._Compiler_13,this.parent.get(t.m,null)),this._ROUTES_15=[[{path:"player/:playerid",canActivate:[S.a],data:{name:"player"},children:[{path:"",component:P.a},{path:"",component:N.a,outlet:"menu"}]},{path:"server/:id",canActivate:[S.a],data:{name:"server"},children:[{path:"",component:B.a},{path:"",component:K.a,outlet:"menu"}]},{path:"admin/:id",canActivate:[S.a],data:{name:"admin-server"},children:[{path:"",component:j.a},{path:"",component:$.a,outlet:"menu"}]},{path:"servers",canActivate:[S.a],data:{name:"home"},children:[{path:"",component:R.a},{path:"",component:D.a,outlet:"menu"}]},{path:"developer",component:E.a},{path:"accessdenied",component:U.a},{path:"connectionerror",component:z.a},{path:"",redirectTo:"/servers",pathMatch:"full"}]],this._Router_16=r.n(this._ApplicationRef_7,this._UrlSerializer_8,this._RouterOutletMap_9,this._Location_12,this,this._NgModuleFactoryLoader_14,this._Compiler_13,this._ROUTES_15,this._ROUTER_CONFIGURATION_10,this.parent.get(r.o,null),this.parent.get(r.p,null)),this._RouterModule_17=new r.q(this._ɵa_0,this._Router_16),this._CommonModule_18=new i.e,this._Ng2BreadcrumbModule_19=new a.a,this._ApplicationModule_20=new t.n(this._ApplicationRef_7),this._BrowserModule_21=new o.p(this.parent.get(o.p,null)),this._ɵba_22=new s.b,this._FormsModule_23=new s.c,this._HttpModule_24=new c.g,this._BrowserAnimationsModule_25=new _.e,this._SimpleNotificationsModule_26=new p.SimpleNotificationsModule,this._DataTableModule_27=new d.a,this._AppModule_28=new e.a,this._AppModule_28},n.prototype.getInternal=function(l,n){return l===r.r?this._ɵa_0:l===t.o?this._ErrorHandler_1:l===t.p?this._NgProbeToken_2:l===r.i?this._ɵg_3:l===t.q?this._APP_INITIALIZER_4:l===t.h?this._ApplicationInitStatus_5:l===t.i?this._ɵf_6:l===t.r?this._ApplicationRef_7:l===r.s?this._UrlSerializer_8:l===r.l?this._RouterOutletMap_9:l===r.t?this._ROUTER_CONFIGURATION_10:l===i.f?this._LocationStrategy_11:l===i.d?this._Location_12:l===t.k?this._Compiler_13:l===t.s?this._NgModuleFactoryLoader_14:l===r.u?this._ROUTES_15:l===r.g?this._Router_16:l===r.q?this._RouterModule_17:l===i.e?this._CommonModule_18:l===a.a?this._Ng2BreadcrumbModule_19:l===t.n?this._ApplicationModule_20:l===o.p?this._BrowserModule_21:l===s.b?this._ɵba_22:l===s.c?this._FormsModule_23:l===c.g?this._HttpModule_24:l===_.e?this._BrowserAnimationsModule_25:l===p.SimpleNotificationsModule?this._SimpleNotificationsModule_26:l===d.a?this._DataTableModule_27:l===e.a?this._AppModule_28:l===t.t?this._LOCALE_ID_29:l===i.g?this._NgLocalization_30:l===t.u?this._APP_ID_31:l===t.v?this._IterableDiffers_32:l===t.w?this._KeyValueDiffers_33:l===o.q?this._DomSanitizer_34:l===t.x?this._Sanitizer_35:l===o.r?this._HAMMER_GESTURE_CONFIG_36:l===o.s?this._EVENT_MANAGER_PLUGINS_37:l===o.h?this._EventManager_38:l===o.i?this._ɵDomSharedStylesHost_39:l===o.j?this._ɵDomRendererFactory2_40:l===J.a?this._AnimationDriver_41:l===J.b?this._ɵAnimationStyleNormalizer_42:l===J.c?this._ɵAnimationEngine_43:l===t.y?this._RendererFactory2_44:l===o.t?this._ɵSharedStylesHost_45:l===t.f?this._Testability_46:l===o.k?this._Meta_47:l===o.l?this._Title_48:l===s.a?this._ɵi_49:l===c.a?this._BrowserXhr_50:l===c.h?this._ResponseOptions_51:l===c.i?this._XSRFStrategy_52:l===c.d?this._XHRBackend_53:l===c.j?this._RequestOptions_54:l===c.k?this._Http_55:l===r.v?this._ActivatedRoute_56:l===r.b?this._NoPreloading_57:l===r.w?this._PreloadingStrategy_58:l===r.c?this._RouterPreloader_59:l===r.d?this._PreloadAllModules_60:l===r.x?this._ROUTER_INITIALIZER_61:l===t.z?this._APP_BOOTSTRAP_LISTENER_62:l===f.a?this._BreadcrumbService_63:l===m.a?this._NotificationsService_64:l===h.a?this._HttpService_65:l===v.a?this._MessageService_66:l===g.a?this._DataService_67:l===y.a?this._DataServiceResolver_68:l===S.a?this._AccessControlRouteGuardService_69:n},n.prototype.destroyInternal=function(){this._ɵf_6.ngOnDestroy(),this.__ɵDomSharedStylesHost_39&&this._ɵDomSharedStylesHost_39.ngOnDestroy(),this.__RouterPreloader_59&&this._RouterPreloader_59.ngOnDestroy()},n}(t.A),X=new t.B(H,e.a)},l3s9:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},lCrv:function(l,n,u){"use strict";var t=u("3j3K"),e=u("Gvdl"),r=(u.n(e),u("ATz5")),i=u("lHWG"),a=u("kZql"),o=u("f4AQ"),s=(u.n(o),u("PJh5"));u.n(s);u.d(n,"a",function(){return c});var c=function(){function l(l,n,u){this.dataService=l,this.httpService=n,this.zone=u,this._structures=new e.BehaviorSubject(void 0),this.keysGetter=Object.keys,this.ownerSortField="locations",this.ownerSortFunctions={locations:function(l,n){return l.AreaCount>n.AreaCount?-1:l.AreaCountn.StructureCount?-1:l.StructureCountn.StructureCount?-1:l.StructureCountn.LastActiveTime||void 0==n.LastActiveTime?1:0}},this.width=1024,this.height=1024,this.zoom=o.zoom().scaleExtent([1,8])}return Object.defineProperty(l.prototype,"structures",{get:function(){return this._structures.getValue()},set:function(l){this._structures.next(l)},enumerable:!0,configurable:!0}),l.prototype.ngOnInit=function(){var l=this;this._structuresSubscription=this._structures.subscribe(function(n){return l.update(n)});var n=this.mapContainer.nativeElement;this.map={},this.map.canvas=o.select(n).append("canvas").attr("width",1024).attr("height",1024).node().getContext("2d"),this.map.svg=o.select(n).append("svg").attr("viewBox","0 0 1024 1024").attr("preserveAspectRatio","xMidYMid").append("g").on("contextmenu",function(l,n){o.event.preventDefault()}),this.map.svg.append("rect").attr("class","overlay").attr("width",1024).attr("height",1024),this.map.x=o.scaleLinear().domain([0,1024]).range([0,1024]),this.map.y=o.scaleLinear().domain([0,1024]).range([0,1024]),o.select(n).call(this.zoom.on("zoom",function(){l.hideContextMenu(),l.redraw()})).on("wheel.zoom",null),this.structures&&this.updateMap()},l.prototype.ngOnDestroy=function(){this._structuresSubscription.unsubscribe()},l.prototype.zoomIn=function(){this.zoom.scaleBy(o.select(this.mapContainer.nativeElement),1.2)},l.prototype.zoomOut=function(){this.zoom.scaleBy(o.select(this.mapContainer.nativeElement),.8)},l.prototype.updateSelection=function(){var l=this;this.map.svg.circle.attr("display",function(n){var u=l.structures.Owners[n.OwnerId];return n.Removed||u.Removed||l.selectedOwner&&(!l.selectedOwner||l.selectedOwner.Id!=n.OwnerId)?"none":"block"}),this.redraw()},l.prototype.update=function(l){this.sortOwners(l),this.map&&this.updateMap()},l.prototype.sortOwners=function(l){var n=this.ownerSortFunctions[this.ownerSortField];if(l){var u=l.Owners.slice();u.sort(n),this.ownersSorted=u}else this.ownersSorted=void 0},l.prototype.updateMap=function(){var l=this;this.map.svg.nodes=this.structures.Areas,this.map.svg.draw=function(){l.map.svg.circle=l.map.svg.selectAll("circle").data(l.map.svg.nodes).enter().append("circle").attr("r",function(l){return l.RadiusPx<2?2:l.RadiusPx}).attr("fill","transparent").attr("stroke",function(n){var u=l.structures.Owners[n.OwnerId];return!!u.LastActiveTime&&s(new Date(u.LastActiveTime)).isSameOrAfter(s().subtract(28,"day"))&&(n.StructureCount>=100||n.TrashQuota<.5&&n.StructureCount>=10)?"magenta":"red"}).attr("stroke-width",function(n){var u=l.structures.Owners[n.OwnerId];return!!u.LastActiveTime&&s(new Date(u.LastActiveTime)).isSameOrAfter(s().subtract(28,"day"))&&(n.StructureCount>=100||n.TrashQuota<.5&&n.StructureCount>=10)?3:2}).attr("transform",l.map.svg.transform),l.map.svg.circle.on("click",function(n){o.event.preventDefault();var u={};u.x=o.event.pageX,u.y=o.event.pageY,l.showAreaModal(n,u)}),l.map.svg.circle.append("svg:title").text(function(n){var u=l.structures.Owners[n.OwnerId],t=u.LastActiveTime?s(new Date(u.LastActiveTime)).fromNow():null;return u.Name+": "+n.StructureCount+" structures\nCoords: "+n.Latitude+", "+n.Longitude+"\n"+(t?"Last active: "+t+"\n":"")+"---\n"+n.Structures.map(function(n){var u=l.structures.Types[n.t];return n.c+": "+(u?u.Name:n.t)}).join("\n")})},this.map.svg.draw(),this.map.svg.transform=function(n){return"translate("+l.map.x(n.TopoMapX)+","+l.map.y(n.TopoMapY)+")"},this.map.svg.circle.attr("transform",this.map.svg.transform)},l.prototype.imageLoaded=function(l){var n=this;this.img=l,this.width=l?l.naturalWidth:1024,this.height=l?l.naturalHeight:1024,window.setTimeout(function(){n.resize(),n.redraw()},100)},l.prototype.resize=function(){},l.prototype.redraw=function(){var l=this,n=o.zoomTransform(this.mapContainer.nativeElement);this.map.svg.attr("transform","translate("+n.x+","+n.y+") scale("+n.k+")"),n.k!=this.prevTransformK&&this.map.svg.circle.attr("stroke-width",function(u){var t=l.structures.Owners[u.OwnerId];return(!!t.LastActiveTime&&s(new Date(t.LastActiveTime)).isSameOrAfter(s().subtract(28,"day"))&&(u.StructureCount>=100||u.TrashQuota<.5&&u.StructureCount>=10)?3:2)/n.k});var u=this.map.canvas;u.setTransform(1,0,0,1,0,0),u.clearRect(0,0,1024,1024),u.translate(n.x,n.y),u.scale(n.k,n.k),this.img&&u.drawImage(this.img,0,0),this.prevTransformK=n.k},l.prototype.ngOnChanges=function(l){var n=this;if(null!=this.mapName){var u=new Image;u.onload=function(){return n.imageLoaded(u)},u.onerror=function(){return n.imageLoaded(void 0)},u.src=a.a.demo?"assets/demo/Ragnarok.jpg":this.getApiBaseUrl()+"/map/"+this.mapName,u.complete&&(u.onload=null,u.onerror=null,this.imageLoaded(u))}},l.prototype.getApiBaseUrl=function(){return a.a.apiBaseUrl.replace(/\/gi,window.location.protocol).replace(/\/gi,window.location.hostname)},l.prototype.reset=function(){this.selectedOwner=void 0,this.updateSelection()},l.prototype.setSelectedOwner=function(l){this.selectedOwner=l,this.updateSelection()},l.prototype.setOwnerSort=function(l){this.ownerSortField=l,this.sortOwners(this.structures)},l.prototype.showAreaModal=function(l,n){this.currentArea=l,this.currentOwner=this.structures.Owners[l.OwnerId],o.select(this.contextMenu.nativeElement).style("display","block"),o.event&&o.event.stopPropagation()},l.prototype.showOwnerModal=function(l,n){this.currentOwner=n,o.select(this.contextMenu.nativeElement).style("display","block"),l.stopPropagation()},l.prototype.showInfoModal=function(l,n){var u={};u.Header=l,u.Message=n,this.modalInfo=u,o.select(this.contextMenu.nativeElement).style("display","block"),o.event&&o.event.stopPropagation()},l.prototype.hideContextMenu=function(){o.select(this.contextMenu.nativeElement).style("display","none"),this.currentArea=void 0,this.currentOwner=void 0,this.modalInfo=void 0},l.prototype.destroyCurrentArea=function(l){var n=this;this.httpService.adminDestroyStructuresForTeamIdAtPosition(this.serverKey,this.currentOwner.OwnerId,this.currentArea.X,this.currentArea.Y,+this.currentArea.RadiusUu+1e3,1).then(function(l){n.currentArea.Removed=!0,n.currentOwner.AreaCount-=1,n.currentOwner.StructureCount-=n.currentArea.StructureCount,n.hideContextMenu(),n.showInfoModal("Action Successfull!",l.Message),n.updateSelection()}).catch(function(l){n.hideContextMenu();var u=l&&l._body?JSON.parse(l._body):void 0;n.showInfoModal("Action Failed...",u?u.Message:l.statusText)})},l.prototype.destroyAllStructuresForTeam=function(l){var n=this;this.httpService.adminDestroyAllStructuresForTeamId(this.serverKey,this.currentOwner.OwnerId).then(function(l){n.currentOwner.Removed=!0,n.currentOwner.AreaCount=0,n.currentOwner.StructureCount=0,n.hideContextMenu(),n.showInfoModal("Action Successfull!",l.Message),n.updateSelection()}).catch(function(l){n.hideContextMenu();var u=l&&l._body?JSON.parse(l._body):void 0;n.showInfoModal("Action Failed...",u?u.Message:l.statusText)})},l.prototype.destroyDinosForTeam=function(l){var n=this;this.httpService.adminDestroyDinosForTeamId(this.serverKey,this.currentOwner.OwnerId).then(function(l){n.currentOwner.CreatureCount=0,n.hideContextMenu(),n.showInfoModal("Action Successfull!",l.Message),n.updateSelection()}).catch(function(l){n.hideContextMenu();var u=l&&l._body?JSON.parse(l._body):void 0;n.showInfoModal("Action Failed...",u?u.Message:l.statusText)})},l.prototype.saveWorld=function(l){var n=this;this.httpService.adminSaveWorld(this.serverKey).then(function(l){n.hideContextMenu(),n.showInfoModal("Action Successfull!",l.Message)}).catch(function(l){n.hideContextMenu();var u=l&&l._body?JSON.parse(l._body):void 0;n.showInfoModal("Action Failed...",u?u.Message:l.statusText)})},l.ctorParameters=function(){return[{type:r.a},{type:i.a},{type:t.e}]},l}()},lHWG:function(l,n,u){"use strict";var t=u("Fzro"),e=u("eErF"),r=(u.n(e),u("kZql"));u.d(n,"a",function(){return i});var i=function(){function l(l){this.http=l,this.headers=new t.l({"Content-Type":"application/json"}),this.serversUrl="/servers",this.serverUrl="/server",this.wildCreaturesUrl="/wildcreatures",this.structuresUrl="/structures",this.adminServerUrl="/adminserver",this.administerUrl="/administer",this.playerUrl="/player"}return l.prototype.getOptions=function(){var l="true"==localStorage.getItem("demoMode"),n=new t.j({withCredentials:!0});return l&&(n.headers||(n.headers=new t.l),n.headers.append("demoMode","true")),n},l.prototype.getServers=function(){return this.http.get(""+this.getApiBaseUrl()+this.serversUrl+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getServer=function(l){return this.http.get(""+this.getApiBaseUrl()+this.serverUrl+"/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getWildCreatures=function(l){return this.http.get(""+this.getApiBaseUrl()+this.wildCreaturesUrl+"/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getStructures=function(l){return this.http.get(""+this.getApiBaseUrl()+this.structuresUrl+"/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getPlayer=function(l){return this.http.get(""+this.getApiBaseUrl()+this.playerUrl+"/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getAdminServer=function(l){return this.http.get(""+this.getApiBaseUrl()+this.adminServerUrl+"/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.adminDestroyAllStructuresForTeamId=function(l,n){return this.http.get(""+this.getApiBaseUrl()+this.administerUrl+"/DestroyAllStructuresForTeamId/"+l+"?teamId="+n+"&t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.adminDestroyStructuresForTeamIdAtPosition=function(l,n,u,t,e,r){return this.http.get(""+this.getApiBaseUrl()+this.administerUrl+"/DestroyStructuresForTeamIdAtPosition/"+l+"?teamId="+n+"&x="+u+"&y="+t+"&radius="+e+"&rafts="+r+"&t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.adminDestroyDinosForTeamId=function(l,n){return this.http.get(""+this.getApiBaseUrl()+this.administerUrl+"/DestroyDinosForTeamId/"+l+"?teamId="+n+"&t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.adminSaveWorld=function(l){return this.http.get(""+this.getApiBaseUrl()+this.administerUrl+"/SaveWorld/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getApiBaseUrl=function(){return r.a.apiBaseUrl.replace(/\/gi,window.location.protocol).replace(/\/gi,window.location.hostname)},l.prototype.handleError=function(l){return Promise.reject(l.message||l)},l.ctorParameters=function(){return[{type:t.k}]},l}()},mjI6:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},nJHW:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},nMh6:function(l,n,u){"use strict";function t(l){return A._24(0,[(l()(),A._25(0,null,null,24,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"h3",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["My Profile"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,18,"div",[["class","w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,4,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),A._26(null,["Hello, ",""])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,9,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),A._26(null,["\n Find your tames, view base stats and keep track of their food status. Get notified of pending imprints, the amount of fertilizer and gasoline remaining in your crops and generators. This and much more is available in your profile.\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,3,"p",[],null,null,null,null,null)),(l()(),A._25(0,null,null,2,"a",[["class",""],["style","text-decoration: none;"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==A._29(l,20).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),A._27(335872,null,0,T.D,[T.g,T.v,F.f],{routerLink:[0,"routerLink"]},null),(l()(),A._26(null,["View my profile ❯"])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n"]))],function(l,n){l(n,20,0,"/player/"+n.component.dataService.UserSteamId)},function(l,n){l(n,10,0,n.component.dataService.Servers.User.Name),l(n,19,0,A._29(n,20).target,A._29(n,20).href)})}function e(l){return A._24(0,[(l()(),A._25(0,null,null,2,"a",[["style","text-decoration: none;"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==A._29(l,1).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),A._27(335872,null,0,T.D,[T.g,T.v,F.f],{routerLink:[0,"routerLink"]},null),(l()(),A._26(null,[""," - ",""]))],function(l,n){l(n,1,0,"/server/"+n.parent.context.$implicit.Key)},function(l,n){l(n,0,0,A._29(n,1).target,A._29(n,1).href),l(n,2,0,n.parent.context.$implicit.MapName,n.parent.context.$implicit.Key)})}function r(l){return A._24(0,[(l()(),A._26(null,[""," - ",""]))],null,function(l,n){l(n,0,0,n.parent.context.$implicit.MapName,n.parent.context.$implicit.Key)})}function i(l){return A._24(0,[(l()(),A._25(0,null,null,3,"p",[],null,null,null,null,null)),(l()(),A._25(0,null,null,2,"a",[["class",""],["style","text-decoration: none;"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==A._29(l,2).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),A._27(335872,null,0,T.D,[T.g,T.v,F.f],{routerLink:[0,"routerLink"]},null),(l()(),A._26(null,["View server ❯"]))],function(l,n){l(n,2,0,"/server/"+n.parent.context.$implicit.Key)},function(l,n){l(n,1,0,A._29(n,2).target,A._29(n,2).href)})}function a(l){return A._24(0,[(l()(),A._25(0,null,null,3,"p",[],null,null,null,null,null)),(l()(),A._25(0,null,null,2,"a",[["class",""],["style","text-decoration: none;"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==A._29(l,2).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),A._27(335872,null,0,T.D,[T.g,T.v,F.f],{routerLink:[0,"routerLink"]},null),(l()(),A._26(null,["Admin ❯"]))],function(l,n){l(n,2,0,"/admin/"+n.parent.context.$implicit.Key)},function(l,n){l(n,1,0,A._29(n,2).target,A._29(n,2).href)})}function o(l){return A._24(0,[(l()(),A._25(0,null,null,21,"div",[["class","w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,6,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,3,"h3",[],null,null,null,null,null)),(l()(),A._28(8388608,null,null,1,null,e)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),(l()(),A._28(0,[["server_no_link",2]],null,0,null,r)),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,10,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"p",[["class","w3-small"]],null,null,null,null,null)),(l()(),A._26(null,["\n Last Update ",", Next Update ","\n "])),(l()(),A._26(null,["\n "])),(l()(),A._28(8388608,null,null,1,null,i)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"]},null),(l()(),A._26(null,["\n "])),(l()(),A._28(8388608,null,null,1,null,a)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"]},null),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "]))],function(l,n){var u=n.component;l(n,6,0,u.dataService.hasFeatureAccess("pages","server"),A._29(n,7)),l(n,16,0,u.dataService.hasFeatureAccess("pages","server")),l(n,19,0,u.dataService.hasFeatureAccess("pages","admin-server"))},function(l,n){l(n,13,0,n.context.$implicit.LastUpdate,n.context.$implicit.NextUpdate||"-")})}function s(l){return A._24(0,[(l()(),A._25(0,null,null,7,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"h3",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Servers"])),(l()(),A._26(null,["\n "])),(l()(),A._28(8388608,null,null,1,null,o)),A._27(401408,null,0,F.n,[A.S,A._5,A.v],{ngForOf:[0,"ngForOf"]},null),(l()(),A._26(null,["\n"]))],function(l,n){l(n,6,0,n.component.dataService.Servers.Servers)},null)}function c(l){return A._24(0,[(l()(),A._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),A._26(null,["There are no players online..."]))],null,null)}function _(l){return A._24(0,[(l()(),A._25(0,null,null,19,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.SteamName),l(n,6,0,n.context.$implicit.CharacterName),l(n,9,0,n.context.$implicit.TribeName),l(n,12,0,n.context.$implicit.DiscordName),l(n,15,0,n.parent.context.$implicit.Key),l(n,18,0,n.context.$implicit.TimeOnline)})}function p(l){return A._24(0,[(l()(),A._25(0,null,null,4,null,null,null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._28(8388608,null,null,1,null,_)),A._27(401408,null,0,F.n,[A.S,A._5,A.v],{ngForOf:[0,"ngForOf"]},null),(l()(),A._26(null,["\n "]))],function(l,n){l(n,3,0,n.context.$implicit.OnlinePlayers)},null)}function d(l){return A._24(0,[(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,29,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,26,"table",[["class","w3-table w3-striped w3-bordered border-theme"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,24,"tbody",[],null,null,null,null,null)),(l()(),A._25(0,null,null,19,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),A._26(null,["Steam Name"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),A._26(null,["Character Name"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),A._26(null,["Tribe Name"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),A._26(null,["Discord Tag"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),A._26(null,["Server"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),A._26(null,["Time Online"])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._28(8388608,null,null,1,null,p)),A._27(401408,null,0,F.n,[A.S,A._5,A.v],{ngForOf:[0,"ngForOf"]},null),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "]))],function(l,n){l(n,28,0,n.component.dataService.Servers.Servers)},null)}function f(l){return A._24(0,[(l()(),A._25(0,null,null,11,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,3,"h3",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Online "])),(l()(),A._25(0,null,null,1,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._28(8388608,null,null,1,null,c)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),(l()(),A._26(null,["\n "])),(l()(),A._28(0,[["online_players_list",2]],null,0,null,d)),(l()(),A._26(null,["\n"]))],function(l,n){l(n,8,0,0==n.component.onlinePlayerCount,A._29(n,10))},function(l,n){l(n,5,0,n.component.onlinePlayerCount)})}function m(l){return A._24(0,[(l()(),A._25(0,null,null,2,"a",[["style","text-decoration: none;"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==A._29(l,1).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),A._27(335872,null,0,T.D,[T.g,T.v,F.f],{routerLink:[0,"routerLink"]},null),(l()(),A._26(null,["",""]))],function(l,n){l(n,1,0,"/server/"+n.parent.parent.context.$implicit.Key)},function(l,n){l(n,0,0,A._29(n,1).target,A._29(n,1).href),l(n,2,0,n.parent.parent.context.$implicit.Name)})}function h(l){return A._24(0,[(l()(),A._26(null,["",""]))],null,function(l,n){l(n,0,0,n.parent.parent.context.$implicit.Name)})}function v(l){return A._24(0,[(l()(),A._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),A._26(null,["There are no players online..."]))],null,null)}function g(l){return A._24(0,[(l()(),A._25(0,null,null,16,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.SteamName),l(n,6,0,n.context.$implicit.CharacterName),l(n,9,0,n.context.$implicit.TribeName),l(n,12,0,n.context.$implicit.DiscordName),l(n,15,0,n.context.$implicit.TimeOnline)})}function y(l){return A._24(0,[(l()(),A._25(0,null,null,23,"table",[["class","w3-table w3-striped w3-bordered border-theme"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,21,"tbody",[],null,null,null,null,null)),(l()(),A._25(0,null,null,16,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),A._26(null,["Steam Name"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),A._26(null,["Character Name"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),A._26(null,["Tribe Name"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),A._26(null,["Discord Tag"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),A._26(null,["Time Online"])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._28(8388608,null,null,1,null,g)),A._27(401408,null,0,F.n,[A.S,A._5,A.v],{ngForOf:[0,"ngForOf"]},null),(l()(),A._26(null,["\n "]))],function(l,n){l(n,22,0,n.parent.parent.parent.parent.context.$implicit.OnlinePlayers)},null)}function S(l){return A._24(0,[(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,4,"div",[["class","w3-card-4 w3-responsive w3-margin-bottom"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._28(8388608,null,null,1,null,y)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"]},null),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "]))],function(l,n){l(n,4,0,n.component.isMenuActive(n.parent.parent.parent.context.$implicit.Key))},null)}function b(l){return A._24(0,[(l()(),A._25(0,null,null,11,null,null,null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,3,"h3",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Online "])),(l()(),A._25(0,null,null,1,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._28(8388608,null,null,1,null,v)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),(l()(),A._26(null,["\n "])),(l()(),A._28(0,[["server_online_players_list",2]],null,0,null,S)),(l()(),A._26(null,["\n "]))],function(l,n){l(n,8,0,0==n.parent.parent.context.$implicit.OnlinePlayerCount,A._29(n,10))},function(l,n){l(n,5,0,n.parent.parent.context.$implicit.OnlinePlayerCount)})}function w(l){return A._24(0,[(l()(),A._25(0,null,null,155,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,148,"div",[["class","w3-card-4 w3-responsive w3-margin-bottom"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,6,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,3,"h3",[],null,null,null,null,null)),(l()(),A._28(8388608,null,null,1,null,m)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),(l()(),A._28(0,[["serverdetails_no_link",2]],null,0,null,h)),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,137,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,134,"table",[["class","w3-table w3-bordered w3-small border-theme serverdetails"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,132,"tbody",[],null,null,null,null,null)),(l()(),A._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Address"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[["style","width: max-content;"]],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Version"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Player Slots"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Map"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["In-Game Day"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Tamed Creatures"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),A._32(1),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Cloud Creatures"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),A._32(1),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Wild Creatures"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),A._32(1),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Structures"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),A._32(1),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Players"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),A._32(1),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Tribes"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),A._32(1),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Last Update"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Next Update"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,7,"tr",[["style","border-bottom: none;"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["Uptime"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),A._26(null,["",""])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n\n "])),(l()(),A._26(null,["\n "])),(l()(),A._28(8388608,null,null,1,null,b)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"]},null),(l()(),A._26(null,["\n "]))],function(l,n){var u=n.component;l(n,8,0,u.dataService.hasFeatureAccess("pages","server"),A._29(n,9)),l(n,154,0,u.dataService.hasFeatureAccess("home","online"))},function(l,n){var u=n.component;l(n,23,0,n.parent.context.$implicit.Address),l(n,32,0,n.parent.context.$implicit.Version),l(n,41,0,n.parent.context.$implicit.OnlinePlayerMax),l(n,50,0,n.parent.context.$implicit.MapName),l(n,59,0,n.parent.context.$implicit.InGameTime),l(n,68,0,A._33(n,68,0,l(n,69,0,A._29(n.parent.parent,0),n.parent.context.$implicit.TamedCreatureCount))),l(n,78,0,A._33(n,78,0,l(n,79,0,A._29(n.parent.parent,0),n.parent.context.$implicit.CloudCreatureCount))),l(n,88,0,A._33(n,88,0,l(n,89,0,A._29(n.parent.parent,0),n.parent.context.$implicit.WildCreatureCount))),l(n,98,0,A._33(n,98,0,l(n,99,0,A._29(n.parent.parent,0),n.parent.context.$implicit.StructureCount))),l(n,108,0,A._33(n,108,0,l(n,109,0,A._29(n.parent.parent,0),n.parent.context.$implicit.PlayerCount))),l(n,118,0,A._33(n,118,0,l(n,119,0,A._29(n.parent.parent,0),n.parent.context.$implicit.TribeCount))),l(n,128,0,n.parent.context.$implicit.LastUpdate),l(n,137,0,n.parent.context.$implicit.NextUpdate),l(n,146,0,n.parent.context.$implicit.ServerStarted?u.dataService.toRelativeDate(n.parent.context.$implicit.ServerStarted):"-")})}function k(l){return A._24(0,[(l()(),A._25(0,null,null,4,null,null,null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._28(8388608,null,null,1,null,w)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"]},null),(l()(),A._26(null,["\n"]))],function(l,n){var u=n.component;l(n,3,0,u.isMenuActive(n.context.$implicit.Key)&&void 0!=u.dataService.Servers&&u.dataService.hasFeatureAccess("home","serverdetails"))},null)}function C(l){return A._24(0,[(l()(),A._25(0,null,null,59,"section",[["class","w3-container margin-top"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"h3",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),A._26(null,["External Resources"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,14,"div",[["class","w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,4,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),A._26(null,["Wiki"])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,5,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,2,"p",[],null,null,null,null,null)),(l()(),A._25(0,null,null,1,"a",[["href","http://ark.gamepedia.com/"],["style","text-decoration: none;"]],null,null,null,null,null)),(l()(),A._26(null,["Official ARK Survival Evolved Wiki ❯"])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,21,"div",[["class","w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,4,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),A._26(null,["Taming Calculators"])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,12,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,9,"ul",[["class","w3-ul"],["style","margin: 7px 0px;"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,2,"li",[["style","padding-left: 0px;"]],null,null,null,null,null)),(l()(),A._25(0,null,null,1,"a",[["href","http://www.survive-ark.com/taming-calculator/"],["style","text-decoration: none;"]],null,null,null,null,null)),(l()(),A._26(null,["Survive ARK: Taming Calculator ❯"])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,2,"li",[["style","padding-left: 0px;"]],null,null,null,null,null)),(l()(),A._25(0,null,null,1,"a",[["href","http://www.dododex.com/"],["style","text-decoration: none;"]],null,null,null,null,null)),(l()(),A._26(null,["Dododex: Taming Calculator ❯"])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,14,"div",[["class","w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,4,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),A._26(null,["Creature Library and Breeding Suggestions"])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,5,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),A._26(null,["\n "])),(l()(),A._25(0,null,null,2,"p",[],null,null,null,null,null)),(l()(),A._25(0,null,null,1,"a",[["href","https://github.com/cadon/ARKStatsExtractor"],["style","text-decoration: none;"]],null,null,null,null,null)),(l()(),A._26(null,["ARK Smart Breeding ❯"])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n "])),(l()(),A._26(null,["\n"]))],null,null)}function I(l){return A._24(0,[A._34(0,F.p,[A.t]),(l()(),A._28(8388608,null,null,1,null,t)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"]},null),(l()(),A._26(null,["\n"])),(l()(),A._28(8388608,null,null,1,null,s)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"]},null),(l()(),A._26(null,["\n"])),(l()(),A._28(8388608,null,null,1,null,f)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"]},null),(l()(),A._26(null,["\n"])),(l()(),A._28(8388608,null,null,1,null,k)),A._27(401408,null,0,F.n,[A.S,A._5,A.v],{ngForOf:[0,"ngForOf"]},null),(l()(),A._26(null,["\n"])),(l()(),A._28(8388608,null,null,1,null,C)),A._27(8192,null,0,F.l,[A.S,A._5],{ngIf:[0,"ngIf"]},null)],function(l,n){var u=n.component;l(n,2,0,u.isMenuActive("overview")&&void 0!=u.dataService.UserSteamId&&u.dataService.hasFeatureAccess("home","myprofile")&&u.dataService.hasFeatureAccess("pages","player",u.dataService.UserSteamId)),l(n,5,0,u.isMenuActive("overview")&&void 0!=u.dataService.Servers&&u.serverCount>0&&u.dataService.hasFeatureAccess("home","serverlist")),l(n,8,0,u.isMenuActive("overview")&&void 0!=u.dataService.Servers&&u.dataService.hasFeatureAccess("home","online")),l(n,11,0,null==u.dataService.Servers?null:u.dataService.Servers.Servers),l(n,14,0,u.isMenuActive("overview")&&u.dataService.hasFeatureAccess("home","externalresources"))},null)}function x(l){return A._24(0,[(l()(),A._25(0,null,null,1,"app-server-list",[],null,null,null,I,K)),A._27(122880,null,0,M.a,[L.a,P.a,N.a],null,null)],function(l,n){l(n,1,0)},null)}var O=u("BYL0"),A=u("3j3K"),T=u("5oXY"),F=u("2Je8"),M=u("JLFQ"),L=u("ATz5"),P=u("+Lwu"),N=u("XLrO");u.d(n,"a",function(){return j});var B=[O.a],K=A._23({encapsulation:0,styles:B,data:{}}),j=A._30("app-server-list",M.a,x,{},{},[])},nuuw:function(l,n,u){"use strict";function t(l){return wl._24(0,[(l()(),wl._25(0,null,null,7,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"div",[["class","w3-panel theme-l2"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"h3",[["class","theme-text-l1-light"]],null,null,null,null,null)),(l()(),wl._26(null,["Loading..."])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,[" \n"]))],null,null)}function e(l){return wl._24(0,[(l()(),wl._25(0,null,null,10,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"div",[["class","w3-panel w3-red"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),wl._26(null,["Error!"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),wl._26(null,["No data could be loaded for the given steam id."])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,[" \n"]))],null,null)}function r(l){return wl._24(0,[(l()(),wl._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activate(l.context.$implicit)&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1"]),(l()(),wl._26(null,["",""]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.active(n.context.$implicit)))},function(l,n){l(n,0,0,n.component.serverWidth()),l(n,3,0,n.context.$implicit)})}function i(l){return wl._24(0,[(l()(),wl._25(0,null,null,4,"div",[["class","w3-bar theme-l2 w3-card-4"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,r)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,u.keysGetter(null==u.player?null:u.player.Servers))},null)}function a(l){return wl._24(0,[(l()(),wl._25(0,null,null,7,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["Servers"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,i)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,6,0,null==u.player?null:u.player.Servers)},null)}function o(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Gender"]))],null,null)}function s(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Level"]))],null,null)}function c(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Engram Points"]))],null,null)}function _(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lat"]))],null,null)}function p(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lng"]))],null,null)}function d(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""]))],null,function(l,n){var u=n.component;l(n,1,0,null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].Gender)})}function f(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""]))],null,function(l,n){var u=n.component;l(n,1,0,null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].Level)})}function m(l){return wl._24(0,[(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(1)],null,function(l,n){var u=n.component;l(n,1,0,wl._33(n,1,0,l(n,2,0,wl._29(n.parent.parent,0),null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].EngramPoints)))})}function h(l){return wl._24(0,[(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2)],null,function(l,n){var u=n.component;l(n,1,0,wl._33(n,1,0,l(n,2,0,wl._29(n.parent.parent,0),null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].Latitude,"1.1-1")))})}function v(l){return wl._24(0,[(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2)],null,function(l,n){var u=n.component;l(n,1,0,wl._33(n,1,0,l(n,2,0,wl._29(n.parent.parent,0),null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].Longitude,"1.1-1")))})}function g(l){return wl._24(0,[(l()(),wl._25(0,null,null,83,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,0,"a",[["id","player"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["Player"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,76,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,73,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,34,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,31,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Character Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,o)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Tribe Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Steam Id"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Tribe Id"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,s)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,c)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,_)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,p)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Saved At"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,34,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,31,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,d)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,f)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,m)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,h)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,v)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,18,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,30,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,33,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,36,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,39,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,54,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,66,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,69,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,72,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,75,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId))},function(l,n){var u=n.component;l(n,51,0,null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].CharacterName),l(n,57,0,null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].TribeName),l(n,60,0,(null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].FakeSteamId)||(null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].SteamId)),l(n,63,0,null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].TribeId),l(n,78,0,u.dataService.toDate(null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].SavedAt))})}function y(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no creatures..."]))],null,null)}function S(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"i",[["class","material-icons"],["style","cursor: pointer;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){e.creaturesFilter="";t=!1!==e.filterAndSort()&&t}return t},null,null)),(l()(),wl._26(null,["close"]))],null,null)}function b(l){return wl._24(0,[(l()(),wl._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("stats")&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1"]),(l()(),wl._26(null,["Base Stats"]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.activeCreaturesMode("stats")))},function(l,n){l(n,0,0,100/n.component.numCreatureTabs())})}function w(l){return wl._24(0,[(l()(),wl._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("ids")&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1"]),(l()(),wl._26(null,["IDs"]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.activeCreaturesMode("ids")))},function(l,n){l(n,0,0,100/n.component.numCreatureTabs())})}function k(l){return wl._24(0,[(l()(),wl._25(0,null,null,12,"div",[["class","w3-bar theme-l2 w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("status")&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1"]),(l()(),wl._26(null,["Overview / Status"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,b)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,w)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,"w3-bar-item w3-button w3-mobile",l(n,4,0,u.activeCreaturesMode("status"))),l(n,8,0,u.dataService.hasFeatureAccess("player","creatures-basestats",u.steamId)),l(n,11,0,u.dataService.hasFeatureAccess("player","creatures-ids",u.steamId))},function(l,n){l(n,2,0,100/n.component.numCreatureTabs())})}function C(l){return wl._24(0,[(l()(),wl._25(0,null,null,22,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Level"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("level")&&t}return t},null,null)),(l()(),wl._26(null,["Level"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Imprint"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("imprint")&&t}return t},null,null)),(l()(),wl._26(null,["Imprint"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Food"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("food")&&t}return t},null,null)),(l()(),wl._26(null,["Food"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Latitude"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("latitude")&&t}return t},null,null)),(l()(),wl._26(null,["Lat"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Longitude"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("longitude")&&t}return t},null,null)),(l()(),wl._26(null,["Lng"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Status"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Owner"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("owner")&&t}return t},null,null)),(l()(),wl._26(null,["Owner"])),(l()(),wl._26(null,["\n "]))],null,null)}function I(l){return wl._24(0,[(l()(),wl._25(0,null,null,23,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Health"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_health")&&t}return t},null,null)),(l()(),wl._26(null,["HP"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Stamina"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_stamina")&&t}return t},null,null)),(l()(),wl._26(null,["ST"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Oxygen"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_oxygen")&&t}return t},null,null)),(l()(),wl._26(null,["OX"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Food"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_food")&&t}return t},null,null)),(l()(),wl._26(null,["FO"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Weight"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_weight")&&t}return t},null,null)),(l()(),wl._26(null,["WE"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Melee"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_melee")&&t}return t},null,null)),(l()(),wl._26(null,["ME"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Speed"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_speed")&&t}return t},null,null)),(l()(),wl._26(null,["SP"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],null,null)}function x(l){return wl._24(0,[(l()(),wl._25(0,null,null,7,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by ID1"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("id1")&&t}return t},null,null)),(l()(),wl._26(null,["ID1"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by ID2"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("id2")&&t}return t},null,null)),(l()(),wl._26(null,["ID2"])),(l()(),wl._26(null,["\n "]))],null,null)}function O(l){return wl._24(0,[(l()(),wl._25(0,null,null,2,"tr",[],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"td",[],[[8,"colSpan",0]],null,null,null,null)),(l()(),wl._26(null,["No matching creatures..."]))],null,function(l,n){l(n,1,0,n.component.activeCreaturesMode("ids")?6:11)})}function A(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),wl._26(null,["",""]))],null,function(l,n){l(n,1,0,n.parent.parent.context.$implicit.Level)})}function T(l){return wl._24(0,[(l()(),wl._25(0,null,null,8,"div",[["class","app-green-light w3-round"],["style","width: 6em; position: relative;"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["style","position: absolute; left: 50%; transform: translate(-50%, 0%); color: white;"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","theme-c1 w3-round"]],[[4,"width","%"]],null,null,null,null)),(l()(),wl._26(null,[" "])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,wl._33(n,3,0,l(n,4,0,wl._29(n.parent.parent.parent.parent.parent,1),n.parent.parent.context.$implicit.FoodStatus,"1.0-0"))),l(n,6,0,100*n.parent.parent.context.$implicit.FoodStatus)})}function F(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),wl._26(null,["Next mating ",""]))],null,function(l,n){l(n,1,0,n.component.dataService.toRelativeDate(n.parent.parent.context.$implicit.NextMating))})}function M(l){return wl._24(0,[(l()(),wl._25(0,null,null,23,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,20,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),wl._26(null,["Baby"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,11,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,8,"div",[["class","app-green-light w3-round"],["style","width: 4em; position: relative; margin: 0em 0.5em;"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["style","position: absolute; left: 50%; transform: translate(-50%, 0%); color: white;"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","theme-c1 w3-round"]],[[4,"width","%"]],null,null,null,null)),(l()(),wl._26(null,[" "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._26(null,["cuddle ",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],null,function(l,n){var u=n.component;l(n,12,0,wl._33(n,12,0,l(n,13,0,wl._29(n.parent.parent.parent.parent.parent,1),n.parent.parent.context.$implicit.BabyAge,"1.0-0"))),l(n,15,0,100*n.parent.parent.context.$implicit.BabyAge),l(n,21,0,u.dataService.toRelativeDate(n.parent.parent.context.$implicit.BabyNextCuddle))})}function L(l){return wl._24(0,[(l()(),wl._25(0,null,null,35,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._28(8388608,null,null,1,null,A)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,T)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,F)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,M)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,4,0,n.parent.context.$implicit.BaseLevel!=n.parent.context.$implicit.Level),l(n,13,0,null!=n.parent.context.$implicit.FoodStatus),l(n,27,0,u.haveMatingCooldown(n.parent.context.$implicit)),l(n,30,0,null!=n.parent.context.$implicit.BabyAge)},function(l,n){l(n,7,0,wl._33(n,7,0,l(n,8,0,wl._29(n.parent.parent.parent.parent,1),n.parent.context.$implicit.Imprint,"1.0-0"))),l(n,17,0,wl._33(n,17,0,l(n,18,0,wl._29(n.parent.parent.parent.parent,0),n.parent.context.$implicit.Latitude,"1.1-1"))),l(n,21,0,wl._33(n,21,0,l(n,22,0,wl._29(n.parent.parent.parent.parent,0),n.parent.context.$implicit.Longitude,"1.1-1"))),l(n,34,0,n.parent.context.$implicit.OwnerType)})}function P(l){return wl._24(0,[(l()(),wl._25(0,null,null,23,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Health),l(n,6,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Stamina),l(n,9,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Oxygen),l(n,12,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Food),l(n,15,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Weight),l(n,18,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Melee),l(n,21,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.MovementSpeed)})}function N(l){return wl._24(0,[(l()(),wl._25(0,null,null,7,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.parent.context.$implicit.Id1),l(n,6,0,n.parent.context.$implicit.Id2)})}function B(l){return wl._24(0,[(l()(),wl._25(0,null,null,24,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,L)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,P)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,N)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,17,0,u.activeCreaturesMode("status")),l(n,20,0,u.activeCreaturesMode("stats")),l(n,23,0,u.activeCreaturesMode("ids"))},function(l,n){l(n,3,0,n.context.$implicit.Name),l(n,7,0,n.context.$implicit.Species),l(n,11,0,n.context.$implicit.Gender),l(n,14,0,n.context.$implicit.BaseLevel)})}function K(l){return wl._24(0,[(l()(),wl._25(0,null,null,61,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,11,"div",[["class","inner-addon right-addon"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,S)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,5,"input",[["class","w3-input w3-border w3-round-xlarge w3-large w3-margin-bottom border-theme theme-l1"],["placeholder","Filter"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(l,n,u){var t=!0,e=l.component;if("input"===n){t=!1!==wl._29(l,8)._handleInput(u.target.value)&&t}if("blur"===n){t=!1!==wl._29(l,8).onTouched()&&t}if("compositionstart"===n){t=!1!==wl._29(l,8)._compositionStart()&&t}if("compositionend"===n){t=!1!==wl._29(l,8)._compositionEnd(u.target.value)&&t}if("ngModelChange"===n){e.creaturesFilter=u;t=!1!==e.filterAndSort()&&t}return t},null,null)),wl._27(8192,null,0,Cl.d,[wl.J,wl.K,[2,Cl.e]],null,null),wl._37(512,null,Cl.g,function(l){return[l]},[Cl.d]),wl._27(335872,null,0,Cl.h,[[8,null],[8,null],[8,null],[2,Cl.g]],{model:[0,"model"]},{update:"ngModelChange"}),wl._37(1024,null,Cl.i,null,[Cl.h]),wl._27(8192,null,0,Cl.j,[Cl.i],null,null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,k)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,42,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,39,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,27,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,24,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Name"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("name")&&t}return t},null,null)),(l()(),wl._26(null,["Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Species"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("species")&&t}return t},null,null)),(l()(),wl._26(null,["Species"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Gender"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("gender")&&t}return t},null,null)),(l()(),wl._26(null,["Gender"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Base Level"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("base_level")&&t}return t},null,null)),(l()(),wl._26(null,["Base Level"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,C)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,I)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,x)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,O)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,B)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,5,0,null!=u.creaturesFilter&&""!=u.creaturesFilter),l(n,10,0,u.creaturesFilter),l(n,16,0,u.numCreatureTabs()>1),l(n,41,0,u.activeCreaturesMode("status")),l(n,44,0,u.activeCreaturesMode("stats")),l(n,47,0,u.activeCreaturesMode("ids")),l(n,54,0,!((null==u.filteredCreatures?null:u.filteredCreatures.length)>0)),l(n,57,0,u.filteredCreatures)},function(l,n){l(n,7,0,wl._29(n,12).ngClassUntouched,wl._29(n,12).ngClassTouched,wl._29(n,12).ngClassPristine,wl._29(n,12).ngClassDirty,wl._29(n,12).ngClassValid,wl._29(n,12).ngClassInvalid,wl._29(n,12).ngClassPending)})}function j(l){return wl._24(0,[(l()(),wl._25(0,null,null,21,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,12,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,5,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","creatures"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,3,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Creatures "])),(l()(),wl._25(0,null,null,1,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"button",[["class","w3-button theme-d1 w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.openMap(u)&&t}return t},null,null)),(l()(),wl._26(null,["Show Map"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,y)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,K)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,17,0,!((null==u.player.Servers[u.serverKey]?null:null==u.player.Servers[u.serverKey].Creatures?null:u.player.Servers[u.serverKey].Creatures.length)>0)),l(n,20,0,(null==u.player.Servers[u.serverKey]?null:null==u.player.Servers[u.serverKey].Creatures?null:u.player.Servers[u.serverKey].Creatures.length)>0)},function(l,n){l(n,9,0,n.component.filteredCreatures.length)})}function $(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"i",[["class","material-icons"],["style","margin: -5px 5px -5px -5px; vertical-align: middle;"]],null,null,null,null,null)),(l()(),wl._26(null,["check"]))],null,null)}function R(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no baby creatures..."]))],null,null)}function D(l){return wl._24(0,[(l()(),wl._25(0,null,null,0,"th",[],null,null,null,null,null))],null,null)}function E(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"input",[["class","w3-check w3-right"],["style","top: 0;"],["type","checkbox"]],[[8,"checked",0]],[[null,"change"]],function(l,n,u){var t=!0,e=l.component;if("change"===n){t=!1!==e.toggleImprintNotificationForCreature(l.parent.context.$implicit)&&t}return t},null,null))],null,function(l,n){l(n,1,0,n.component.getStateForCreature(n.parent.context.$implicit).imprintNotifications)})}function U(l){return wl._24(0,[(l()(),wl._25(0,null,null,42,"tr",[],null,null,null,null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{ngClass:[0,"ngClass"]},null),wl._31(["odd"]),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,11,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,8,"div",[["class","app-green-light w3-round"],["style","width: 6em; position: relative;"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["style","position: absolute; left: 50%; transform: translate(-50%, 0%); color: white;"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","theme-c1 w3-round"]],[[4,"width","%"]],null,null,null,null)),(l()(),wl._26(null,[" "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"timer",[],null,null,null,Il.a,Il.b)),wl._27(122880,null,0,xl.a,[],{state:[0,"state"],time:[1,"time"],notification:[2,"notification"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,E)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,1,0,l(n,2,0,n.context.index%2==1)),l(n,38,0,u.getStateForCreature(n.context.$implicit),n.context.$implicit.BabyNextCuddle,u.imprintNotifications),l(n,41,0,u.imprintNotifications)},function(l,n){var u=n.component;l(n,5,0,n.context.$implicit.Name),l(n,8,0,n.context.$implicit.Species),l(n,11,0,n.context.$implicit.Gender),l(n,14,0,n.context.$implicit.BaseLevel),l(n,17,0,wl._33(n,17,0,l(n,18,0,wl._29(n.parent.parent.parent,1),n.context.$implicit.Imprint,"1.0-0"))),l(n,25,0,wl._33(n,25,0,l(n,26,0,wl._29(n.parent.parent.parent,1),n.context.$implicit.BabyAge,"1.0-0"))),l(n,28,0,100*n.context.$implicit.BabyAge),l(n,34,0,u.dataService.toDate(n.context.$implicit.BabyFullyGrown))})}function z(l){return wl._24(0,[(l()(),wl._25(0,null,null,43,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,40,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,31,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,28,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Species"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Gender"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Base Level"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Imprint"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Progress"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Fully Grown At"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Next Imprint"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,D)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,U)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,33,0,u.imprintNotifications),l(n,40,0,u.imprintCreatures)},null)}function J(l){return wl._24(0,[(l()(),wl._25(0,null,null,26,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,16,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,5,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","imprint_timers"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,3,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Breeding "])),(l()(),wl._25(0,null,null,1,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,6,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,5,"button",[["class","w3-button w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!=(e.imprintNotifications=!e.imprintNotifications)&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1","theme-l2","theme-hover"]),(l()(),wl._28(8388608,null,null,1,null,$)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,R)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,z)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,13,0,"w3-button w3-right",l(n,14,0,u.imprintNotifications,!u.imprintNotifications,!u.imprintNotifications)),l(n,16,0,u.imprintNotifications),l(n,21,0,!((null==u.imprintCreatures?null:u.imprintCreatures.length)>0)),l(n,24,0,(null==u.imprintCreatures?null:u.imprintCreatures.length)>0)},function(l,n){var u=n.component;l(n,9,0,u.imprintCreatures.length),l(n,17,0,u.imprintNotifications?"Notifications Enabled":"Enable Notifications")})}function G(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no kibbles or eggs..."]))],null,null)}function H(l){return wl._24(0,[(l()(),wl._25(0,null,null,13,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.Name),l(n,6,0,n.context.$implicit.KibbleCount),l(n,9,0,n.context.$implicit.EggCount),l(n,12,0,n.context.$implicit.KibbleCount+n.context.$implicit.EggCount)})}function X(l){return wl._24(0,[(l()(),wl._25(0,null,null,28,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,25,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,16,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,13,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Kibbles"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Eggs"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Total"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,H)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,25,0,u.player.Servers[u.serverKey].KibblesAndEggs)},null)}function W(l){return wl._24(0,[(l()(),wl._25(0,null,null,18,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,9,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,6,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","kibblesandeggs"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,4,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Kibbles and Eggs "])),(l()(),wl._25(0,null,null,2,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,G)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,X)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,14,0,!((null==u.player.Servers[u.serverKey].KibblesAndEggs?null:u.player.Servers[u.serverKey].KibblesAndEggs.length)>0)),l(n,17,0,(null==u.player.Servers[u.serverKey].KibblesAndEggs?null:u.player.Servers[u.serverKey].KibblesAndEggs.length)>0)},function(l,n){var u=n.component;l(n,9,0,wl._33(n,9,0,l(n,10,0,wl._29(n.parent,0),u.sumKibbleAndEggs(),0)))})}function V(l){return wl._24(0,[(l()(),wl._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCluster(l.context.$implicit)&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1"]),(l()(),wl._26(null,["",""]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.activeCluster(n.context.$implicit)))},function(l,n){l(n,0,0,n.component.clusterWidth()),l(n,3,0,n.context.$implicit)})}function Y(l){return wl._24(0,[(l()(),wl._25(0,null,null,4,"div",[["class","w3-bar theme-l2 w3-card-4"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,V)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,u.keysGetter(null==u.player?null:u.player.Clusters))},null)}function q(l){return wl._24(0,[(l()(),wl._25(0,null,null,7,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["Clusters"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,Y)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,6,0,null==u.player?null:u.player.Clusters)},null)}function Q(l){return wl._24(0,[(l()(),wl._25(0,null,null,11,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,5,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Creatures"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no creatures in the cloud..."])),(l()(),wl._26(null,["\n"]))],null,null)}function Z(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no creatures in the cloud..."]))],null,null)}function ll(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"i",[["class","material-icons"],["style","cursor: pointer;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){e.creaturesClusterFilter="";t=!1!==e.filterCluster()&&t}return t},null,null)),(l()(),wl._26(null,["close"]))],null,null)}function nl(l){return wl._24(0,[(l()(),wl._25(0,null,null,11,"div",[["class","inner-addon right-addon"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,ll)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,5,"input",[["class","w3-input w3-border w3-round-xlarge w3-large w3-margin-bottom border-theme theme-l1"],["placeholder","Filter"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(l,n,u){var t=!0,e=l.component;if("input"===n){t=!1!==wl._29(l,6)._handleInput(u.target.value)&&t}if("blur"===n){t=!1!==wl._29(l,6).onTouched()&&t}if("compositionstart"===n){t=!1!==wl._29(l,6)._compositionStart()&&t}if("compositionend"===n){t=!1!==wl._29(l,6)._compositionEnd(u.target.value)&&t}if("ngModelChange"===n){e.creaturesClusterFilter=u;t=!1!==e.filterCluster()&&t}return t},null,null)),wl._27(8192,null,0,Cl.d,[wl.J,wl.K,[2,Cl.e]],null,null),wl._37(512,null,Cl.g,function(l){return[l]},[Cl.d]),wl._27(335872,null,0,Cl.h,[[8,null],[8,null],[8,null],[2,Cl.g]],{model:[0,"model"]},{update:"ngModelChange"}),wl._37(1024,null,Cl.i,null,[Cl.h]),wl._27(8192,null,0,Cl.j,[Cl.i],null,null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,null!=u.creaturesClusterFilter&&""!=u.creaturesClusterFilter),l(n,8,0,u.creaturesClusterFilter)},function(l,n){l(n,5,0,wl._29(n,10).ngClassUntouched,wl._29(n,10).ngClassTouched,wl._29(n,10).ngClassPristine,wl._29(n,10).ngClassDirty,wl._29(n,10).ngClassValid,wl._29(n,10).ngClassInvalid,wl._29(n,10).ngClassPending)})}function ul(l){return wl._24(0,[(l()(),wl._25(0,null,null,2,"tr",[],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"td",[["colspan","3"]],null,null,null,null,null)),(l()(),wl._26(null,["No matching creatures..."]))],null,null)}function tl(l){return wl._24(0,[(l()(),wl._25(0,null,null,10,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.Name),l(n,6,0,n.context.$implicit.Species),l(n,9,0,n.context.$implicit.Level)})}function el(l){return wl._24(0,[(l()(),wl._25(0,null,null,28,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,25,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,13,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,10,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Species"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Level"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,ul)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,tl)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,22,0,!((null==u.filteredClusterCreatures?null:u.filteredClusterCreatures.length)>0)),l(n,25,0,u.filteredClusterCreatures)},null)}function rl(l){return wl._24(0,[(l()(),wl._25(0,null,null,19,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,3,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Creatures "])),(l()(),wl._25(0,null,null,1,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,Z)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,nl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,el)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,12,0,!((null==u.player.Clusters[u.clusterKey]?null:null==u.player.Clusters[u.clusterKey].Creatures?null:u.player.Clusters[u.clusterKey].Creatures.length)>0)),l(n,15,0,(null==u.player.Clusters[u.clusterKey]?null:null==u.player.Clusters[u.clusterKey].Creatures?null:u.player.Clusters[u.clusterKey].Creatures.length)>0),l(n,18,0,(null==u.player.Clusters[u.clusterKey]?null:null==u.player.Clusters[u.clusterKey].Creatures?null:u.player.Clusters[u.clusterKey].Creatures.length)>0)},function(l,n){l(n,8,0,n.component.filteredClusterCreatures.length)})}function il(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no crops..."]))],null,null)}function al(l){return wl._24(0,[(l()(),wl._25(0,null,null,36,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,11,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,8,"div",[["class","app-green-light w3-round"],["style","width: 6em; position: relative;"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["style","position: absolute; left: 50%; transform: translate(-50%, 0%); color: white;"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","theme-c1 w3-round"]],[[4,"width","%"]],null,null,null,null)),(l()(),wl._26(null,[" "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(1),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.PlantedCropName||n.context.$implicit.PlantedCropClassName),l(n,6,0,n.context.$implicit.Size),l(n,13,0,wl._33(n,13,0,l(n,14,0,wl._29(n.parent.parent.parent,1),n.context.$implicit.FertilizerQuantity/n.context.$implicit.FertilizerMax,"1.0-0"))),l(n,16,0,n.context.$implicit.FertilizerQuantity/n.context.$implicit.FertilizerMax*100),l(n,22,0,wl._33(n,22,0,l(n,23,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.FertilizerQuantity))),l(n,26,0,wl._33(n,26,0,l(n,27,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.WaterAmount,"1.0-0"))),l(n,30,0,wl._33(n,30,0,l(n,31,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.Latitude,"1.1-1"))),l(n,34,0,wl._33(n,34,0,l(n,35,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.Longitude,"1.1-1")))})}function ol(l){return wl._24(0,[(l()(),wl._25(0,null,null,37,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,34,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,25,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,22,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Crop"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Size"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Fertilizer %"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Fertilizer Units"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Water"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lat"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lng"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,al)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,34,0,u.player.Servers[u.serverKey].CropPlots)},null)}function sl(l){return wl._24(0,[(l()(),wl._25(0,null,null,15,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,6,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,3,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","cropplots"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Crops"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,il)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,ol)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,11,0,!((null==u.player.Servers[u.serverKey].CropPlots?null:u.player.Servers[u.serverKey].CropPlots.length)>0)),l(n,14,0,(null==u.player.Servers[u.serverKey].CropPlots?null:u.player.Servers[u.serverKey].CropPlots.length)>0)},null)}function cl(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no electrical generators..."]))],null,null)}function _l(l){return wl._24(0,[(l()(),wl._25(0,null,null,8,"div",[["class","app-green-light w3-round"],["style","width: 6em; position: relative;"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["style","position: absolute; left: 50%; transform: translate(-50%, 0%); color: white;"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","theme-c1 w3-round"]],[[4,"width","%"]],null,null,null,null)),(l()(),wl._26(null,[" "])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,wl._33(n,3,0,l(n,4,0,wl._29(n.parent.parent.parent.parent,1),n.parent.context.$implicit.GasolineQuantity/800,"1.0-0"))),l(n,6,0,n.parent.context.$implicit.GasolineQuantity/800*100)})}function pl(l){return wl._24(0,[(l()(),wl._25(0,null,null,22,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,_l)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(1),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "]))],function(l,n){l(n,5,0,1==n.context.$implicit.Activated)},function(l,n){l(n,9,0,wl._33(n,9,0,l(n,10,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.GasolineQuantity))),l(n,13,0,1==n.context.$implicit.Activated?"Yes":"No"),l(n,16,0,wl._33(n,16,0,l(n,17,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.Latitude,"1.1-1"))),l(n,20,0,wl._33(n,20,0,l(n,21,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.Longitude,"1.1-1")))})}function dl(l){return wl._24(0,[(l()(),wl._25(0,null,null,31,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,28,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,19,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,16,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Gasoline %"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Gasoline Quantity"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Activated"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lat"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lng"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,pl)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,28,0,u.player.Servers[u.serverKey].ElectricalGenerators)},null)}function fl(l){return wl._24(0,[(l()(),wl._25(0,null,null,15,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,6,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,3,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","electricalgenerators"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Electrical Generators"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,cl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,dl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,11,0,!((null==u.player.Servers[u.serverKey].ElectricalGenerators?null:u.player.Servers[u.serverKey].ElectricalGenerators.length)>0)),l(n,14,0,(null==u.player.Servers[u.serverKey].ElectricalGenerators?null:u.player.Servers[u.serverKey].ElectricalGenerators.length)>0)},null)}function ml(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no tribe logs..."]))],null,null)}function hl(l){return wl._24(0,[(l()(),wl._25(0,null,null,10,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.Day),l(n,6,0,n.context.$implicit.Time),l(n,9,0,n.context.$implicit.Message)})}function vl(l){return wl._24(0,[(l()(),wl._25(0,null,null,25,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,22,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,13,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,10,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Day"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Time"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Message"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,hl)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,22,0,u.player.Servers[u.serverKey].TribeLog)},null)}function gl(l){return wl._24(0,[(l()(),wl._25(0,null,null,15,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,6,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,3,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","tribelog"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Tribe Log"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,ml)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,vl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,11,0,!((null==u.player.Servers[u.serverKey].TribeLog?null:u.player.Servers[u.serverKey].TribeLog.length)>0)),l(n,14,0,(null==u.player.Servers[u.serverKey].TribeLog?null:u.player.Servers[u.serverKey].TribeLog.length)>0)},null)}function yl(l){return wl._24(0,[wl._34(0,kl.p,[wl.t]),wl._34(0,kl.r,[wl.t]),(l()(),wl._28(8388608,null,null,1,null,t)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,e)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,a)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,g)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,j)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,J)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,W)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,q)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,Q)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,rl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,sl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,fl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,gl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._25(0,null,null,17,"div",[["class","w3-modal"],["id","modal_map"]],[[4,"display",null]],null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,14,"div",[["class","w3-modal-content w3-card-4 w3-animate-zoom"],["style","font-size: 0;"]],null,[[null,"clickOutside"],["document","click"]],function(l,n,u){var t=!0,e=l.component;if("document:click"===n){t=!1!==wl._29(l,44).onClick(u,u.target)&&t}if("clickOutside"===n){t=!1!==e.closeMap(u)&&t}return t},null,null)),wl._27(8192,null,0,Al.a,[wl.K],null,{clickOutside:"clickOutside"}),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,[" \n "])),(l()(),wl._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!=(e.showMap=!1)&&t}return t},null,null)),(l()(),wl._26(null,["×"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),wl._26(null,["Map"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"arkmap",[],null,null,null,Tl.a,Tl.b)),wl._27(286720,null,0,Fl.a,[],{mapName:[0,"mapName"],points:[1,"points"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,3,0,0==u.loaded),l(n,6,0,1==u.loaded&&null==u.player),l(n,9,0,!u.isMenuActive("creatures_cloud")&&void 0!=u.player),l(n,12,0,u.isMenuActive("profile")&&void 0!=u.player&&u.dataService.hasFeatureAccess("player","profile",u.steamId)),l(n,15,0,u.isMenuActive("creatures")&&void 0!=u.player&&u.dataService.hasFeatureAccess("player","creatures",u.steamId)),l(n,18,0,u.isMenuActive("breeding")&&void 0!=u.player&&u.dataService.hasFeatureAccess("player","breeding",u.steamId)),l(n,21,0,u.isMenuActive("kibbles_and_eggs")&&(null==u.player?null:u.player.Servers[u.serverKey])&&u.dataService.hasFeatureAccess("player","kibbles-eggs",u.steamId)),l(n,24,0,u.isMenuActive("creatures_cloud")&&u.haveCluster()),l(n,27,0,u.isMenuActive("creatures_cloud")&&!u.haveCluster()&&u.dataService.hasFeatureAccess("player","creatures-cloud",u.steamId)),l(n,30,0,u.isMenuActive("creatures_cloud")&&u.haveCluster()&&u.dataService.hasFeatureAccess("player","creatures-cloud",u.steamId)),l(n,33,0,u.isMenuActive("crop_plots")&&(null==u.player?null:u.player.Servers[u.serverKey])&&u.dataService.hasFeatureAccess("player","crops",u.steamId)),l(n,36,0,u.isMenuActive("electrical_generators")&&(null==u.player?null:u.player.Servers[u.serverKey])&&u.dataService.hasFeatureAccess("player","generators",u.steamId)),l(n,39,0,u.isMenuActive("tribelog")&&(null==u.player?null:u.player.Servers[u.serverKey])&&u.dataService.hasFeatureAccess("player","tribelog",u.steamId)),l(n,56,0,null==u.player?null:u.player.MapNames[u.serverKey],u.points)},function(l,n){l(n,41,0,n.component.showMap?"block":"none")})}function Sl(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"app-player",[],null,null,null,yl,jl)),wl._27(122880,null,0,Ol.a,[Ml.v,Ml.g,Ll.a,Pl.a,Nl.a,Bl.a,wl.O],null,null)],function(l,n){l(n,1,0)},null)}var bl=u("SWoV"),wl=u("3j3K"),kl=u("2Je8"),Cl=u("NVOs"),Il=u("RdYi"),xl=u("CzL3"),Ol=u("KZxv"),Al=u("8zLQ"),Tl=u("I9JA"),Fl=u("5305"),Ml=u("5oXY"),Ll=u("lHWG"),Pl=u("ATz5"),Nl=u("+Lwu"),Bl=u("XLrO");u.d(n,"a",function(){return $l});var Kl=[bl.a],jl=wl._23({encapsulation:0,styles:Kl,data:{}}),$l=wl._30("app-player",Ol.a,Sl,{},{},[])},ofcV:function(l,n,u){"use strict";function t(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("profile")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Profile"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("profile")))},null)}function e(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("creatures")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Creatures"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("creatures")))},null)}function r(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("creatures_cloud")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Creatures (Cloud)"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("creatures_cloud")))},null)}function i(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("breeding")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Breeding"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("breeding")))},null)}function a(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("crop_plots")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Crops"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("crop_plots")))},null)}function o(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("electrical_generators")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Electrical Generators"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("electrical_generators")))},null)}function s(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("kibbles_and_eggs")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Kibbles and Eggs"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("kibbles_and_eggs")))},null)}function c(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("tribelog")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Tribe Log"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("tribelog")))},null)}function _(l){return f._24(0,[f._35(201326592,1,{menu:0}),(l()(),f._25(0,null,null,32,"app-menu",[],null,null,null,h.a,h.b)),f._27(122880,[[1,4],["menu",4]],0,v.a,[g.a],null,null),(l()(),f._26(0,["\n "])),(l()(),f._25(0,null,0,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),f._26(null,["Player"])),(l()(),f._26(0,["\n "])),(l()(),f._25(0,null,0,25,"div",[["class","w3-cell-row theme-l2"]],null,null,null,null,null)),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,t)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,e)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,r)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,i)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,a)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,o)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,s)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,c)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._26(0,["\n"]))],function(l,n){var u=n.component;l(n,2,0),l(n,10,0,u.dataService.hasFeatureAccess("player","profile",u.steamId)),l(n,13,0,u.dataService.hasFeatureAccess("player","creatures",u.steamId)),l(n,16,0,u.dataService.hasFeatureAccess("player","creatures-cloud",u.steamId)),l(n,19,0,u.dataService.hasFeatureAccess("player","breeding",u.steamId)),l(n,22,0,u.dataService.hasFeatureAccess("player","crops",u.steamId)),l(n,25,0,u.dataService.hasFeatureAccess("player","generators",u.steamId)),l(n,28,0,u.dataService.hasFeatureAccess("player","kibbles-eggs",u.steamId)),l(n,31,0,u.dataService.hasFeatureAccess("player","tribelog",u.steamId))},null)}function p(l){return f._24(0,[(l()(),f._25(0,null,null,1,"app-player-menu",[],[[8,"className",0]],null,null,_,w)),f._27(57344,null,0,y.a,[S.v,g.a],null,null)],function(l,n){l(n,1,0)},function(l,n){l(n,0,0,f._29(n,1).menu.className)})}var d=u("l3s9"),f=u("3j3K"),m=u("2Je8"),h=u("coiB"),v=u("8kYA"),g=u("ATz5"),y=u("RiXa"),S=u("5oXY");u.d(n,"a",function(){return k});var b=[d.a],w=f._23({encapsulation:0,styles:b,data:{}}),k=f._30("app-player-menu",y.a,p,{},{},[])},qn86:function(l,n,u){"use strict";var t=u("3j3K"),e=u("5oXY"),r=u("3MNG"),i=u("PJh5"),a=(u.n(i),u("ATz5")),o=u("+Lwu"),s=u("lHWG"),c=u("+rAa");u.d(n,"a",function(){return _});var _=function(){function l(l,n,t,e,r,i,a){this.route=l,this.router=n,this.httpService=t,this.dataService=e,this.messageService=r,this.notificationsService=i,this.ref=a,this.menuOption=void 0,this.loaded=!1,this.creaturesLoaded=!1,this.keysGetter=Object.keys,this.showMap=!1,this.creaturesMode="status",this.creaturesSortField="base_level",this.creaturesAltSortFields="base_level,gender",this.creaturesSortFunctions={gender:function(l,n,t){return u.i(c.a)(l.Gender,n.Gender,t)},base_level:function(l,n,t){return u.i(c.b)(l.BaseLevel,n.BaseLevel,!t)},tameable:function(l,n,t){return u.i(c.b)(l.IsTameable,n.IsTameable,!t)},latitude:function(l,n,t){return u.i(c.c)(l.Latitude,n.Latitude,t,1)},longitude:function(l,n,t){return u.i(c.c)(l.Longitude,n.Longitude,t,1)},x:function(l,n,t){return u.i(c.c)(l.X,n.X,t,0)},y:function(l,n,t){return u.i(c.c)(l.Y,n.Y,t,0)},z:function(l,n,t){return u.i(c.c)(l.Z,n.Z,t,0)},stat_health:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Health:null,void 0!=n.BaseStats?n.BaseStats.Health:null,!t)},stat_stamina:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Stamina:null,void 0!=n.BaseStats?n.BaseStats.Stamina:null,!t)},stat_oxygen:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Oxygen:null,void 0!=n.BaseStats?n.BaseStats.Oxygen:null,!t)},stat_food:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Food:null,void 0!=n.BaseStats?n.BaseStats.Food:null,!t)},stat_weight:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Weight:null,void 0!=n.BaseStats?n.BaseStats.Weight:null,!t)},stat_melee:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Melee:null,void 0!=n.BaseStats?n.BaseStats.Melee:null,!t)},stat_speed:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.MovementSpeed:null,void 0!=n.BaseStats?n.BaseStats.MovementSpeed:null,!t)},id1:function(l,n,t){return u.i(c.b)(l.Id1,n.Id1,t)},id2:function(l,n,t){return u.i(c.b)(l.Id1,n.Id1,t)}},this.playerSortFunctions={character_name:function(l,n,t){return u.i(c.a)(l.CharacterName,n.CharacterName,t)},tribe_name:function(l,n,t){return u.i(c.a)(l.TribeName,n.TribeName,t)},last_active:function(l,n,t){return u.i(c.b)(l.LastActiveTime,n.LastActiveTime,!t)}},this.tribeSortFunctions={tribe_name:function(l,n,t){return u.i(c.a)(l.Name,n.Name,t)},last_active:function(l,n,t){return u.i(c.b)(l.LastActiveTime,n.LastActiveTime,!t)}},this.wildStatisticsSortFunctions={species:function(l,n,t){return u.i(c.a)(l.Name,n.Name,t)},class_name:function(l,n,t){return u.i(c.a)(l.ClassName,n.ClassName,t)},count:function(l,n,t){return u.i(c.b)(l.Count,n.Count,!t)},fraction:function(l,n,t){return u.i(c.c)(l.Fraction,n.Fraction,!t,4)}}}return l.prototype.getServer=function(){var l=this;this.httpService.getServer(this.serverKey).then(function(n){l.server=n,l.filter(),l.loaded=!0}).catch(function(n){l.server=null,l.filteredPlayers=null,l.filteredTribes=null,l.loaded=!0})},l.prototype.getWildCreatures=function(){var l=this;this.httpService.getWildCreatures(this.serverKey).then(function(n){l.wild=n,l.species=Object.keys(l.wild.Species).sort(function(n,t){return u.i(c.a)(l.wild.Species[n].Name||n,l.wild.Species[t].Name||t,!0)}),l.selectedSpecies&&void 0!=l.species.find(function(n){return n==l.selectedSpecies})||(l.selectedSpecies=l.species.length>0?l.species[0]:null),l.filterAndSortWild(),l.creaturesLoaded=!0,l.ref.detectChanges()}).catch(function(n){l.wild=null,l.species=null,l.filteredCreatures=null,l.creaturesLoaded=!0})},l.prototype.ngOnInit=function(){var l=this;this.accessControl_pages_player=this.dataService.hasFeatureAccessObservable("pages","player"),this.serverKey=this.route.snapshot.params.id,this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){l.menuOption=n,0!=l.creaturesLoaded||"wildcreatures"!=l.menuOption&&"wildcreatures-statistics"!=l.menuOption||l.getWildCreatures()}),this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){l.serverKey==n&&(l.updateServer(),l.showServerUpdateNotification(n))}),this.getServer()},l.prototype.ngOnDestroy=function(){this.menuOptionSubscription.unsubscribe(),this.serverUpdatedSubscription.unsubscribe()},l.prototype.filter=function(){this.filteredPlayers=this.server.Players.filter(function(l){return i(new Date(l.LastActiveTime)).isSameOrAfter(i().subtract(90,"day"))}),this.filteredTribes=this.server.Tribes.filter(function(l){return i(new Date(l.LastActiveTime)).isSameOrAfter(i().subtract(90,"day"))})},l.prototype.sortWild=function(){var l=this,n="-"!=this.creaturesSortField[0],u=this.creaturesSortFunctions[this.creaturesSortField.replace(/^\-/,"")],t=this.creaturesAltSortFields.split(",").map(function(n){var u={};return u.asc="-"!=n[0],u.sortFunc=l.creaturesSortFunctions[n.replace(/^\-/,"")],u});void 0!=this.filteredCreatures&&this.filteredCreatures.sort(function(l,e){var r=u(l,e,n);if(0==r)for(var i=0,a=t;i/gi,window.location.protocol).replace(/\/gi,window.location.hostname).replace(/\/gi,void 0!=config?config.webapi.port:"")},l.ctorParameters=function(){return[{type:t.e}]},l}()},"+SUW":function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},"+T68":function(l,n,u){"use strict";function t(l){return ll._24(0,[(l()(),ll._25(0,null,null,7,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,4,"div",[["class","w3-panel theme-l2"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"h3",[["class","theme-text-l1-light"]],null,null,null,null,null)),(l()(),ll._26(null,["Loading..."])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,[" \n"]))],null,null)}function e(l){return ll._24(0,[(l()(),ll._25(0,null,null,10,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,7,"div",[["class","w3-panel w3-red"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),ll._26(null,["Error!"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),ll._26(null,["No data could be loaded for the given server key."])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,[" \n"]))],null,null)}function r(l){return ll._24(0,[(l()(),ll._26(null,["\n Character Name\n "]))],null,null)}function i(l){return ll._24(0,[(l()(),ll._25(0,null,null,2,"a",[],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==ll._29(l,1).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),ll._27(335872,null,0,nl.D,[nl.g,nl.v,ul.f],{routerLink:[0,"routerLink"]},null),(l()(),ll._26(null,["",""]))],function(l,n){l(n,1,0,"/player/"+n.parent.context.$implicit.SteamId)},function(l,n){l(n,0,0,ll._29(n,1).target,ll._29(n,1).href),l(n,2,0,n.parent.context.$implicit.CharacterName)})}function a(l){return ll._24(0,[(l()(),ll._26(null,["",""]))],null,function(l,n){l(n,0,0,n.parent.context.$implicit.CharacterName)})}function o(l){return ll._24(0,[(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,2,null,i)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),ll._34(65536,ul.q,[ll.O]),(l()(),ll._28(0,[["player_no_link",2]],null,0,null,a)),(l()(),ll._26(null,["\n "]))],function(l,n){var u=n.component;l(n,2,0,ll._33(n,2,0,ll._29(n,3).transform(u.dataService.hasFeatureAccessObservable("pages","player",n.context.$implicit.SteamId))),ll._29(n,4))},null)}function s(l){return ll._24(0,[(l()(),ll._26(null,["\n Tribe Name\n "]))],null,null)}function c(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "]))],null,function(l,n){l(n,0,0,n.context.$implicit.TribeName)})}function _(l){return ll._24(0,[(l()(),ll._26(null,["\n Last Active\n "]))],null,null)}function p(l){return ll._24(0,[(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"relative-time",[],null,null,null,tl.a,tl.b)),ll._27(122880,null,0,el.a,[ll.O],{time:[0,"time"]},null),(l()(),ll._26(null,["\n "]))],function(l,n){l(n,2,0,n.context.$implicit.LastActiveTime)},null)}function d(l){return ll._24(0,[(l()(),ll._25(0,null,null,49,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["Players"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,43,"ark-data-table",[["orderByColumn","last_active"],["trackByProp","Id"]],null,null,null,rl.a,rl.b)),ll._27(57344,null,2,il.a,[ll.O],{rows:[0,"rows"],trackByProp:[1,"trackByProp"],sortFunctions:[2,"sortFunctions"],orderByColumn:[3,"orderByColumn"]},null),ll._35(301989888,1,{modeTemplates:1}),ll._35(301989888,2,{columnTemplates:1}),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"ark-dt-mode",[["columnKeys","character_name,tribe_name,last_active"],["key","default"],["name","Default"]],null,null,null,null,null)),ll._27(8192,[[1,4]],0,al.a,[],{key:[0,"key"],name:[1,"name"],columnKeys:[2,"columnKeys"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","character_name"],["thenSort","last_active"],["title","Sort by Character Name"]],null,null,null,null,null)),ll._27(8192,[[2,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,3,{cellTemplate:0}),ll._35(167772160,4,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[4,2]],null,1,null,r)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[3,2]],null,1,null,o)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","tribe_name"],["thenSort","character_name"],["title","Sort by Tribe Name"]],null,null,null,null,null)),ll._27(8192,[[2,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,5,{cellTemplate:0}),ll._35(167772160,6,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[6,2]],null,1,null,s)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[5,2]],null,1,null,c)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","last_active"],["thenSort","character_name"],["title","Sort by Last Active"]],null,null,null,null,null)),ll._27(8192,[[2,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,7,{cellTemplate:0}),ll._35(167772160,8,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[8,2]],null,1,null,_)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[7,2]],null,1,null,p)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n"]))],function(l,n){var u=n.component;l(n,6,0,u.filteredPlayers,"Id",u.playerSortFunctions,"last_active"),l(n,11,0,"default","Default","character_name,tribe_name,last_active"),l(n,14,0,"character_name","last_active","Sort by Character Name",!0),l(n,26,0,"tribe_name","character_name","Sort by Tribe Name",!0),l(n,38,0,"last_active","character_name","Sort by Last Active",!0)},null)}function f(l){return ll._24(0,[(l()(),ll._26(null,["\n Tribe Name\n "]))],null,null)}function m(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "]))],null,function(l,n){l(n,0,0,n.context.$implicit.Name)})}function h(l){return ll._24(0,[(l()(),ll._26(null,["\n Members\n "]))],null,null)}function v(l){return ll._24(0,[(l()(),ll._25(0,null,null,2,"a",[],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==ll._29(l,1).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),ll._27(335872,null,0,nl.D,[nl.g,nl.v,ul.f],{routerLink:[0,"routerLink"]},null),(l()(),ll._26(null,["",""]))],function(l,n){l(n,1,0,"/player/"+n.parent.context.$implicit)},function(l,n){var u=n.component;l(n,0,0,ll._29(n,1).target,ll._29(n,1).href);var t=null;l(n,2,0,(null==(t=u.getTribeMember(n.parent.context.$implicit))?null:t.CharacterName)||n.parent.context.$implicit)})}function g(l){return ll._24(0,[(l()(),ll._26(null,["",""]))],null,function(l,n){var u=n.component,t=null;l(n,0,0,(null==(t=u.getTribeMember(n.parent.context.$implicit))?null:t.CharacterName)||n.parent.context.$implicit)})}function y(l){return ll._24(0,[(l()(),ll._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),ll._26(null,[", "]))],null,null)}function b(l){return ll._24(0,[(l()(),ll._25(0,null,null,5,"span",[],null,null,null,null,null)),(l()(),ll._28(8388608,null,null,1,null,v)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),(l()(),ll._28(0,[["tribe_member_no_link",2]],null,0,null,g)),(l()(),ll._28(8388608,null,null,1,null,y)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null)],function(l,n){l(n,2,0,n.component.dataService.hasFeatureAccess("pages","player",n.context.$implicit),ll._29(n,3)),l(n,5,0,!n.context.last)},null)}function S(l){return ll._24(0,[(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,b)),ll._27(401408,null,0,ul.n,[ll.S,ll._5,ll.v],{ngForOf:[0,"ngForOf"]},null),(l()(),ll._26(null,["\n "]))],function(l,n){l(n,2,0,n.context.$implicit.MemberSteamIds)},null)}function w(l){return ll._24(0,[(l()(),ll._26(null,["\n Last Active\n "]))],null,null)}function k(l){return ll._24(0,[(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"relative-time",[],null,null,null,tl.a,tl.b)),ll._27(122880,null,0,el.a,[ll.O],{time:[0,"time"]},null),(l()(),ll._26(null,["\n "]))],function(l,n){l(n,2,0,n.context.$implicit.LastActiveTime)},null)}function C(l){return ll._24(0,[(l()(),ll._25(0,null,null,49,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["Tribes"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,43,"ark-data-table",[["orderByColumn","last_active"],["trackByProp","Id"]],null,null,null,rl.a,rl.b)),ll._27(57344,null,2,il.a,[ll.O],{rows:[0,"rows"],trackByProp:[1,"trackByProp"],sortFunctions:[2,"sortFunctions"],orderByColumn:[3,"orderByColumn"]},null),ll._35(301989888,9,{modeTemplates:1}),ll._35(301989888,10,{columnTemplates:1}),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"ark-dt-mode",[["columnKeys","tribe_name,members,last_active"],["key","default"],["name","Default"]],null,null,null,null,null)),ll._27(8192,[[9,4]],0,al.a,[],{key:[0,"key"],name:[1,"name"],columnKeys:[2,"columnKeys"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","tribe_name"],["thenSort","last_active"],["title","Sort by Tribe Name"]],null,null,null,null,null)),ll._27(8192,[[10,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,11,{cellTemplate:0}),ll._35(167772160,12,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[12,2]],null,1,null,f)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[11,2]],null,1,null,m)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","members"]],null,null,null,null,null)),ll._27(8192,[[10,4]],2,ol.a,[],{key:[0,"key"]},null),ll._35(167772160,13,{cellTemplate:0}),ll._35(167772160,14,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[14,2]],null,1,null,h)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[13,2]],null,1,null,S)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","last_active"],["thenSort","tribe_name"],["title","Sort by Last Active"]],null,null,null,null,null)),ll._27(8192,[[10,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,15,{cellTemplate:0}),ll._35(167772160,16,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[16,2]],null,1,null,w)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[15,2]],null,1,null,k)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n"]))],function(l,n){var u=n.component;l(n,6,0,u.filteredTribes,"Id",u.tribeSortFunctions,"last_active"),l(n,11,0,"default","Default","tribe_name,members,last_active"),l(n,14,0,"tribe_name","last_active","Sort by Tribe Name",!0),l(n,26,0,"members"),l(n,38,0,"last_active","tribe_name","Sort by Last Active",!0)},null)}function I(l){return ll._24(0,[(l()(),ll._26(null,["\n Species\n "]))],null,null)}function x(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "]))],null,function(l,n){l(n,0,0,n.context.$implicit.Name)})}function O(l){return ll._24(0,[(l()(),ll._26(null,["\n Class Name\n "]))],null,null)}function A(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "]))],null,function(l,n){l(n,0,0,n.context.$implicit.ClassName)})}function T(l){return ll._24(0,[(l()(),ll._26(null,["\n Aliases\n "]))],null,null)}function F(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "]))],null,function(l,n){l(n,0,0,n.context.$implicit.Aliases.length>0?n.context.$implicit.Aliases.join(", "):"")})}function M(l){return ll._24(0,[(l()(),ll._26(null,["\n Count\n "]))],null,null)}function L(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "])),ll._32(1)],null,function(l,n){l(n,0,0,ll._33(n,0,0,l(n,1,0,ll._29(n.parent.parent,0),n.context.$implicit.Count)))})}function P(l){return ll._24(0,[(l()(),ll._26(null,["\n Fraction\n "]))],null,null)}function N(l){return ll._24(0,[(l()(),ll._26(null,["\n ","\n "])),ll._32(2)],null,function(l,n){l(n,0,0,ll._33(n,0,0,l(n,1,0,ll._29(n.parent.parent,1),n.context.$implicit.Fraction,"1.0-4")))})}function B(l){return ll._24(0,[(l()(),ll._25(0,null,null,76,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,4,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["Wild Statistics "])),(l()(),ll._25(0,null,null,2,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["",""])),ll._32(1),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,67,"ark-data-table",[["orderByColumn","species"],["trackByProp","ClassName"]],null,null,null,rl.a,rl.b)),ll._27(57344,null,2,il.a,[ll.O],{rows:[0,"rows"],trackByProp:[1,"trackByProp"],sortFunctions:[2,"sortFunctions"],orderByColumn:[3,"orderByColumn"]},null),ll._35(301989888,17,{modeTemplates:1}),ll._35(301989888,18,{columnTemplates:1}),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"ark-dt-mode",[["columnKeys","species,class_name,aliases,count,fraction"],["key","default"],["name","Default"]],null,null,null,null,null)),ll._27(8192,[[17,4]],0,al.a,[],{key:[0,"key"],name:[1,"name"],columnKeys:[2,"columnKeys"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","species"],["thenSort","count"],["title","Sort by Species"]],null,null,null,null,null)),ll._27(8192,[[18,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,19,{cellTemplate:0}),ll._35(167772160,20,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[20,2]],null,1,null,I)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[19,2]],null,1,null,x)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","class_name"],["thenSort","count"],["title","Sort by Class Name"]],null,null,null,null,null)),ll._27(8192,[[18,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,21,{cellTemplate:0}),ll._35(167772160,22,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[22,2]],null,1,null,O)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[21,2]],null,1,null,A)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","aliases"]],null,null,null,null,null)),ll._27(8192,[[18,4]],2,ol.a,[],{key:[0,"key"]},null),ll._35(167772160,23,{cellTemplate:0}),ll._35(167772160,24,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[24,2]],null,1,null,T)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[23,2]],null,1,null,F)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","count"],["thenSort","species"],["title","Sort by Count"]],null,null,null,null,null)),ll._27(8192,[[18,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,25,{cellTemplate:0}),ll._35(167772160,26,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[26,2]],null,1,null,M)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[25,2]],null,1,null,L)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"ark-dt-column",[["key","fraction"],["thenSort","species"],["title","Sort by Fraction"]],null,null,null,null,null)),ll._27(8192,[[18,4]],2,ol.a,[],{key:[0,"key"],thenSort:[1,"thenSort"],title:[2,"title"],orderBy:[3,"orderBy"]},null),ll._35(167772160,27,{cellTemplate:0}),ll._35(167772160,28,{headerTemplate:0}),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[28,2]],null,1,null,P)),ll._27(8192,null,0,ol.b,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(0,[[27,2]],null,1,null,N)),ll._27(8192,null,0,ol.c,[ll._5],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n"]))],function(l,n){var u=n.component;l(n,9,0,u.wild.Statistics.Species,"ClassName",u.wildStatisticsSortFunctions,"species"),l(n,14,0,"default","Default","species,class_name,aliases,count,fraction"),l(n,17,0,"species","count","Sort by Species",!0),l(n,29,0,"class_name","count","Sort by Class Name",!0),l(n,41,0,"aliases"),l(n,53,0,"count","species","Sort by Count",!0),l(n,65,0,"fraction","species","Sort by Fraction",!0)},function(l,n){var u=n.component;l(n,5,0,ll._33(n,5,0,l(n,6,0,ll._29(n.parent,0),(null==u.wild.Statistics.Species?null:u.wild.Statistics.Species.length)||0)))})}function K(l){return ll._24(0,[(l()(),ll._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),ll._26(null,["There are no creatures..."]))],null,null)}function j(l){return ll._24(0,[(l()(),ll._25(0,null,null,3,"option",[],null,null,null,null,null)),ll._27(73728,null,0,sl.k,[ll.K,ll.J,[2,sl.l]],{value:[0,"value"]},null),ll._27(73728,null,0,sl.m,[ll.K,ll.J,[8,null]],{value:[0,"value"]},null),(l()(),ll._26(null,["",""]))],function(l,n){l(n,1,0,n.context.$implicit),l(n,2,0,n.context.$implicit)},function(l,n){l(n,3,0,n.component.wild.Species[n.context.$implicit].Name||n.context.$implicit)})}function $(l){return ll._24(0,[(l()(),ll._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("stats")&&t}return t},null,null)),ll._27(139264,null,0,ul.m,[ll.v,ll.w,ll.K,ll.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),ll._31(["theme-d1"]),(l()(),ll._26(null,["Base Stats"]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.activeCreaturesMode("stats")))},function(l,n){l(n,0,0,100/n.component.numCreatureTabs())})}function R(l){return ll._24(0,[(l()(),ll._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("ids")&&t}return t},null,null)),ll._27(139264,null,0,ul.m,[ll.v,ll.w,ll.K,ll.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),ll._31(["theme-d1"]),(l()(),ll._26(null,["IDs"]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.activeCreaturesMode("ids")))},function(l,n){l(n,0,0,100/n.component.numCreatureTabs())})}function D(l){return ll._24(0,[(l()(),ll._25(0,null,null,12,"div",[["class","w3-bar theme-l2 w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("status")&&t}return t},null,null)),ll._27(139264,null,0,ul.m,[ll.v,ll.w,ll.K,ll.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),ll._31(["theme-d1"]),(l()(),ll._26(null,["Overview"])),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,$)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,R)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,"w3-bar-item w3-button w3-mobile",l(n,4,0,u.activeCreaturesMode("status"))),l(n,8,0,u.dataService.hasFeatureAccess("server","wildcreatures-basestats")),l(n,11,0,u.dataService.hasFeatureAccess("server","wildcreatures-ids"))},function(l,n){l(n,2,0,100/n.component.numCreatureTabs())})}function E(l){return ll._24(0,[(l()(),ll._25(0,null,null,16,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by X"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("x")&&t}return t},null,null)),(l()(),ll._26(null,["X"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Y"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("y")&&t}return t},null,null)),(l()(),ll._26(null,["Y"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Z"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("z")&&t}return t},null,null)),(l()(),ll._26(null,["Z"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Latitude"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("latitude")&&t}return t},null,null)),(l()(),ll._26(null,["Lat"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Longitude"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("longitude")&&t}return t},null,null)),(l()(),ll._26(null,["Lng"])),(l()(),ll._26(null,["\n "]))],null,null)}function U(l){return ll._24(0,[(l()(),ll._25(0,null,null,23,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Health"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_health")&&t}return t},null,null)),(l()(),ll._26(null,["HP"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Stamina"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_stamina")&&t}return t},null,null)),(l()(),ll._26(null,["ST"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Oxygen"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_oxygen")&&t}return t},null,null)),(l()(),ll._26(null,["OX"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Food"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_food")&&t}return t},null,null)),(l()(),ll._26(null,["FO"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Weight"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_weight")&&t}return t},null,null)),(l()(),ll._26(null,["WE"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Melee"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_melee")&&t}return t},null,null)),(l()(),ll._26(null,["ME"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Speed"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_speed")&&t}return t},null,null)),(l()(),ll._26(null,["SP"])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "]))],null,null)}function z(l){return ll._24(0,[(l()(),ll._25(0,null,null,7,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by ID1"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("id1")&&t}return t},null,null)),(l()(),ll._26(null,["ID1"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by ID2"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("id2")&&t}return t},null,null)),(l()(),ll._26(null,["ID2"])),(l()(),ll._26(null,["\n "]))],null,null)}function J(l){return ll._24(0,[(l()(),ll._25(0,null,null,2,"tr",[],null,null,null,null,null)),(l()(),ll._25(0,null,null,1,"td",[],[[8,"colSpan",0]],null,null,null,null)),(l()(),ll._26(null,["No matching creatures..."]))],null,function(l,n){var u=n.component;l(n,1,0,u.activeCreaturesMode("status")?8:u.activeCreaturesMode("stats")?10:5)})}function G(l){return ll._24(0,[(l()(),ll._25(0,null,null,18,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),ll._32(2),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),ll._32(2),(l()(),ll._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.parent.context.$implicit.X),l(n,6,0,n.parent.context.$implicit.Y),l(n,9,0,n.parent.context.$implicit.Z),l(n,12,0,ll._33(n,12,0,l(n,13,0,ll._29(n.parent.parent.parent.parent,0),n.parent.context.$implicit.Latitude,"1.1-1"))),l(n,16,0,ll._33(n,16,0,l(n,17,0,ll._29(n.parent.parent.parent.parent,0),n.parent.context.$implicit.Longitude,"1.1-1")))})}function H(l){return ll._24(0,[(l()(),ll._25(0,null,null,23,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "]))],null,function(l,n){l(n,3,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Health),l(n,6,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Stamina),l(n,9,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Oxygen),l(n,12,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Food),l(n,15,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Weight),l(n,18,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Melee),l(n,21,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.MovementSpeed)})}function X(l){return ll._24(0,[(l()(),ll._25(0,null,null,7,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.parent.context.$implicit.Id1),l(n,6,0,n.parent.context.$implicit.Id2)})}function W(l){return ll._24(0,[(l()(),ll._25(0,null,null,19,"tr",[],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),ll._26(null,["",""])),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,G)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,H)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,X)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "]))],function(l,n){var u=n.component;l(n,12,0,u.activeCreaturesMode("status")),l(n,15,0,u.activeCreaturesMode("stats")),l(n,18,0,u.activeCreaturesMode("ids"))},function(l,n){var u=n.component;l(n,3,0,n.context.$implicit.Gender),l(n,6,0,n.context.$implicit.BaseLevel),l(n,9,0,u.wild.Species[u.selectedSpecies].IsTameable&&1==n.context.$implicit.IsTameable?"Yes":"No")})}function V(l){return ll._24(0,[(l()(),ll._25(0,null,null,55,null,null,null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,9,"select",[["class","w3-select w3-border w3-round-xlarge w3-large w3-margin-bottom border-theme theme-l1"],["style","padding: 8px;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(l,n,u){var t=!0,e=l.component;if("change"===n){t=!1!==ll._29(l,3).onChange(u.target.value)&&t}if("blur"===n){t=!1!==ll._29(l,3).onTouched()&&t}if("ngModelChange"===n){e.selectedSpecies=u;t=!1!==e.filterAndSortWild()&&t}return t},null,null)),ll._27(8192,null,0,sl.l,[ll.J,ll.K],null,null),ll._37(512,null,sl.g,function(l){return[l]},[sl.l]),ll._27(335872,null,0,sl.h,[[8,null],[8,null],[8,null],[2,sl.g]],{model:[0,"model"]},{update:"ngModelChange"}),ll._37(1024,null,sl.i,null,[sl.h]),ll._27(8192,null,0,sl.j,[sl.i],null,null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,j)),ll._27(401408,null,0,ul.n,[ll.S,ll._5,ll.v],{ngForOf:[0,"ngForOf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,D)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,37,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,34,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,22,"thead",[],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,19,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Gender"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("gender")&&t}return t},null,null)),(l()(),ll._26(null,["Gender"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Base Level"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("base_level")&&t}return t},null,null)),(l()(),ll._26(null,["Base Level"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Tameable"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("tameable")&&t}return t},null,null)),(l()(),ll._26(null,["Tameable"])),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,E)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,U)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,z)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,7,"tbody",[],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,J)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,W)),ll._27(401408,null,0,ul.n,[ll.S,ll._5,ll.v],{ngForOf:[0,"ngForOf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "]))],function(l,n){var u=n.component;l(n,5,0,u.selectedSpecies),l(n,10,0,u.species),l(n,15,0,u.numCreatureTabs()>1),l(n,35,0,u.activeCreaturesMode("status")),l(n,38,0,u.activeCreaturesMode("stats")),l(n,41,0,u.activeCreaturesMode("ids")),l(n,48,0,!((null==u.filteredCreatures?null:u.filteredCreatures.length)>0)),l(n,51,0,u.filteredCreatures)},function(l,n){l(n,2,0,ll._29(n,7).ngClassUntouched,ll._29(n,7).ngClassTouched,ll._29(n,7).ngClassPristine,ll._29(n,7).ngClassDirty,ll._29(n,7).ngClassValid,ll._29(n,7).ngClassInvalid,ll._29(n,7).ngClassPending)})}function Y(l){return ll._24(0,[(l()(),ll._25(0,null,null,26,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,17,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,10,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),ll._25(0,null,null,0,"a",[["id","creatures"]],null,null,null,null,null)),(l()(),ll._25(0,null,null,8,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),ll._26(null,["Wild Creatures "])),(l()(),ll._25(0,null,null,2,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["",""])),ll._32(1),(l()(),ll._26(null,[" / "])),(l()(),ll._25(0,null,null,2,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),ll._26(null,["",""])),ll._32(1),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,2,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),ll._25(0,null,null,1,"button",[["class","w3-button theme-d1 w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.openMap(u)&&t}return t},null,null)),(l()(),ll._26(null,["Show Map"])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,K)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._28(8388608,null,null,1,null,V)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"]))],function(l,n){var u=n.component;l(n,22,0,!((null==u.species?null:u.species.length)>0)),l(n,25,0,(null==u.species?null:u.species.length)>0)},function(l,n){var u=n.component;l(n,9,0,ll._33(n,9,0,l(n,10,0,ll._29(n.parent,0),(null==u.filteredCreatures?null:u.filteredCreatures.length)||0))),l(n,13,0,ll._33(n,13,0,l(n,14,0,ll._29(n.parent,0),(null==u.wild?null:null==u.wild.Statistics?null:u.wild.Statistics.CreatureCount)||0)))})}function q(l){return ll._24(0,[ll._34(0,ul.p,[ll.t]),ll._34(0,ul.r,[ll.t]),(l()(),ll._28(8388608,null,null,1,null,t)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._28(8388608,null,null,1,null,e)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._28(8388608,null,null,1,null,d)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._28(8388608,null,null,1,null,C)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._28(8388608,null,null,1,null,B)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._28(8388608,null,null,1,null,Y)),ll._27(8192,null,0,ul.l,[ll.S,ll._5],{ngIf:[0,"ngIf"]},null),(l()(),ll._26(null,["\n"])),(l()(),ll._25(0,null,null,17,"div",[["class","w3-modal"],["id","modal_map"]],[[4,"display",null]],null,null,null,null)),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,14,"div",[["class","w3-modal-content w3-card-4 w3-animate-zoom"],["style","font-size: 0;"]],null,[[null,"clickOutside"],["document","click"]],function(l,n,u){var t=!0,e=l.component;if("document:click"===n){t=!1!==ll._29(l,23).onClick(u,u.target)&&t}if("clickOutside"===n){t=!1!==e.closeMap(u)&&t}return t},null,null)),ll._27(8192,null,0,_l.a,[ll.K],null,{clickOutside:"clickOutside"}),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),ll._26(null,[" \n "])),(l()(),ll._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!=(e.showMap=!1)&&t}return t},null,null)),(l()(),ll._26(null,["×"])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),ll._26(null,["Map"])),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "])),(l()(),ll._25(0,null,null,1,"arkmap",[],null,null,null,pl.a,pl.b)),ll._27(286720,null,0,dl.a,[],{mapName:[0,"mapName"],points:[1,"points"]},null),(l()(),ll._26(null,["\n "])),(l()(),ll._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,0==u.loaded||(u.isMenuActive("wildcreatures")||u.isMenuActive("wildcreatures-statistics"))&&0==u.creaturesLoaded),l(n,6,0,1==u.loaded&&null==u.server),l(n,9,0,u.isMenuActive("players")&&u.server&&u.dataService.hasFeatureAccess("server","players")),l(n,12,0,u.isMenuActive("tribes")&&u.server&&u.dataService.hasFeatureAccess("server","tribes")),l(n,15,0,u.isMenuActive("wildcreatures-statistics")&&u.creaturesLoaded&&u.dataService.hasFeatureAccess("server","wildcreatures-statistics")),l(n,18,0,u.isMenuActive("wildcreatures")&&u.creaturesLoaded&&u.dataService.hasFeatureAccess("server","wildcreatures")),l(n,35,0,null==u.server?null:u.server.MapName,u.points)},function(l,n){l(n,20,0,n.component.showMap?"block":"none")})}function Q(l){return ll._24(0,[(l()(),ll._25(0,null,null,1,"app-server",[],null,null,null,q,yl)),ll._27(122880,null,0,cl.a,[nl.v,nl.g,fl.a,ml.a,hl.a,vl.a,ll.O],null,null)],function(l,n){l(n,1,0)},null)}var Z=u("ZfYc"),ll=u("3j3K"),nl=u("5oXY"),ul=u("2Je8"),tl=u("6Nb/"),el=u("0onv"),rl=u("fYAd"),il=u("0jRk"),al=u("joX7"),ol=u("jWPz"),sl=u("NVOs"),cl=u("qn86"),_l=u("8zLQ"),pl=u("I9JA"),dl=u("5305"),fl=u("lHWG"),ml=u("ATz5"),hl=u("+Lwu"),vl=u("XLrO");u.d(n,"a",function(){return bl});var gl=[Z.a],yl=ll._23({encapsulation:0,styles:gl,data:{}}),bl=ll._30("app-server",cl.a,Q,{},{},[])},"+qYp":function(l,n,u){"use strict";var t=u("ATz5"),e=u("3MNG"),r=u("+Lwu");u.d(n,"a",function(){return i});var i=function(){function l(l,n,u){this.dataService=l,this.messageService=n,this.notificationsService=u,this.menuOption=void 0}return l.prototype.ngOnInit=function(){var l=this;this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){return l.showServerUpdateNotification(n)}),this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n})},l.prototype.ngOnDestroy=function(){this.serverUpdatedSubscription.unsubscribe(),this.menuOptionSubscription.unsubscribe()},l.prototype.showServerUpdateNotification=function(l){this.notificationsService.success("Server Update",l+" was updated; Reloading data...",{showProgressBar:!0,pauseOnHover:!0,clickToClose:!0})},l.prototype.isMenuActive=function(l){return this.menuOption==l},l.ctorParameters=function(){return[{type:t.a},{type:r.a},{type:e.a}]},l}()},"+rAa":function(l,n,u){"use strict";function t(l,n,u,t){var e=i(l,n,u);if(void 0!=e)return e;var r=Math.pow(10,t),a=void 0!=t?Math.round(l*r)/r:l,o=void 0!=t?Math.round(n*r)/r:n;return a>o?u?1:-1:an?u?1:-1:l0&&(this._currentMode=this._modes[0].key)}}},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnTemplates",{set:function(l){if(l){var n=l.toArray();if(n.length){for(var u=[],t=0,e=n;t=this._rows.length&&(n=this._rows.length-1),this._fromRow=parseInt(""+n),this.ref.markForCheck()},l.prototype.setViewOffsetRelative=function(l){this.setViewOffset(this._fromRow+l)},l.prototype.setFirstPage=function(){this.isFirstPage()||this.setViewOffset(0)},l.prototype.setPrevPage=function(){this.isFirstPage()||this.setViewOffsetRelative(-this._numRows)},l.prototype.setNextPage=function(){this.isLastPage()||this.setViewOffsetRelative(this._numRows)},l.prototype.setLastPage=function(){this.isLastPage()||this.setViewOffset(this._rows.length-this._numRows)},l.prototype.isFirstPage=function(){return this._fromRow<=0},l.prototype.isLastPage=function(){return this._fromRow>=this._rows.length-this._numRows},l.prototype.setViewLimit=function(l){this._numRows=parseInt(""+(l>0?l:1e6)),this.ref.markForCheck()},l.prototype.getLastRowOffset=function(){var l=this._fromRow+this._numRows;return l>this._rows.length?this._rows.length:l},l.ctorParameters=function(){return[{type:t.O}]},l}()},"0onv":function(l,n,u){"use strict";var t=u("3j3K"),e=u("Gvdl"),r=(u.n(e),u("PJh5"));u.n(r);u.d(n,"a",function(){return i});var i=function(){function l(l){this.ref=l,this._time=new e.BehaviorSubject(void 0)}return Object.defineProperty(l.prototype,"time",{get:function(){return this._time.getValue()},set:function(l){this._time.next(l)},enumerable:!0,configurable:!0}),l.prototype.ngOnInit=function(){var l=this;this._timeSubscription=this._time.subscribe(function(n){l.update()}),this._counter=e.Observable.interval(1e3).map(function(l){return l}),this._counterSubscription=this._counter.subscribe(function(n){return l.update()})},l.prototype.ngOnDestroy=function(){this._timeSubscription.unsubscribe(),this._counterSubscription.unsubscribe()},l.prototype.update=function(){var l=this.toRelativeDate(this.time);l!=this._str&&(this._str=l,this.ref.markForCheck())},l.prototype.toRelativeDate=function(l){return r(new Date(l)).fromNow()},l.ctorParameters=function(){return[{type:t.O}]},l}()},"1A80":function(l,n,u){"use strict";function t(l){return o._24(0,[(l()(),o._25(0,null,null,4,"span",[],null,null,null,null,null)),(l()(),o._26(null,["Logged in as "," | "])),(l()(),o._25(0,null,null,1,"a",[],[[8,"href",4]],null,null,null,null)),(l()(),o._26(null,["Logout"])),(l()(),o._26(null,[" | "]))],null,function(l,n){var u=n.component;l(n,1,0,u.dataService.Servers.User.Name),l(n,2,0,u.getLogoutUrl())})}function e(l){return o._24(0,[(l()(),o._25(0,null,null,3,"span",[],null,null,null,null,null)),(l()(),o._25(0,null,null,1,"a",[["href","#"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.openLogin(u)&&t}return t},null,null)),(l()(),o._26(null,["Login"])),(l()(),o._26(null,[" | "]))],null,null)}function r(l){return o._24(0,[(l()(),o._25(0,null,null,1,"simple-notifications",[],null,null,null,s.a,s.b)),o._27(122880,null,0,c.a,[_.a],{options:[0,"options"]},null),(l()(),o._26(null,["\n"])),(l()(),o._26(null,["\n\n"])),(l()(),o._25(8388608,null,null,1,"router-outlet",[["name","menu"]],null,null,null,null,null)),o._27(73728,null,0,p.z,[p.l,o.S,o.T,[8,"menu"]],null,null),(l()(),o._26(null,["\n"])),(l()(),o._25(0,null,null,22,"div",[["id","page"]],null,null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,16,"div",[["class","w3-bar"]],null,null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,1,"breadcrumb",[["class","breadcrumb w3-bar-item"],["prefix","Home"]],null,null,null,d.a,d.b)),o._27(385024,null,0,f.a,[p.g,m.a],{useBootstrap:[0,"useBootstrap"],prefix:[1,"prefix"]},null),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,10,"div",[["class","w3-bar-item w3-right w3-tiny theme-l1"]],null,null,null,null,null)),(l()(),o._28(8388608,null,null,1,null,t)),o._27(8192,null,0,h.l,[o.S,o._5],{ngIf:[0,"ngIf"]},null),(l()(),o._28(8388608,null,null,1,null,e)),o._27(8192,null,0,h.l,[o.S,o._5],{ngIf:[0,"ngIf"]},null),(l()(),o._26(null,["Theme: "])),(l()(),o._25(0,null,null,1,"a",[["href","#"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setTheme("light")&&t}return t},null,null)),(l()(),o._26(null,["Light"])),(l()(),o._26(null,[" | "])),(l()(),o._25(0,null,null,1,"a",[["href","#"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setTheme("dark")&&t}return t},null,null)),(l()(),o._26(null,["Dark"])),(l()(),o._26(null,["\n "])),(l()(),o._26(null,["\n "])),(l()(),o._25(8388608,null,null,1,"router-outlet",[],null,null,null,null,null)),o._27(73728,null,0,p.z,[p.l,o.S,o.T,[8,null]],null,null),(l()(),o._26(null,["\n"])),(l()(),o._26(null,["\n"])),(l()(),o._25(0,null,null,31,"div",[["class","w3-modal"],["id","modal_login"]],[[4,"display",null]],null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,28,"div",[["class","w3-modal-content w3-card-4 w3-animate-zoom"],["style","font-size: 0;"]],null,[[null,"clickOutside"],["document","click"]],function(l,n,u){var t=!0,e=l.component;if("document:click"===n){t=!1!==o._29(l,34).onClick(u,u.target)&&t}if("clickOutside"===n){t=!1!==e.closeLogin(u)&&t}return t},null,null)),o._27(8192,null,0,g.a,[o.K],null,{clickOutside:"clickOutside"}),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),o._26(null,[" \n "])),(l()(),o._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!=(e.showLogin=!1)&&t}return t},null,null)),(l()(),o._26(null,["×"])),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),o._26(null,["Log In"])),(l()(),o._26(null,["\n "])),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,15,"form",[["class","w3-container theme-l2 w3-medium"],["method","post"],["ngNoForm",""]],[[8,"action",4]],null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,12,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),o._26(null,["To give you access to personal information, first, we must verify your identity."])),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),o._26(null,["Please authenticate with our app through Steam by clicking on the button below."])),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,0,"input",[["name","returnUrl"],["type","hidden"]],[[8,"value",0]],null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,1,"button",[["class","w3-button w3-block theme-d1 w3-section w3-padding"],["name","provider"],["title","Log in using your Steam account"],["type","submit"]],null,null,null,null,null)),(l()(),o._26(null,["Go to Steam"])),(l()(),o._26(null,["\n "])),(l()(),o._26(null,["\n "])),(l()(),o._26(null,["\n "])),(l()(),o._26(null,["\n"]))],function(l,n){var u=n.component;l(n,1,0,u.notificationOptions),l(n,12,0,!1,"Home"),l(n,16,0,null==u.dataService.Servers?null:null==u.dataService.Servers.User?null:u.dataService.Servers.User.SteamId),l(n,18,0,!(null==u.dataService.Servers?null:null==u.dataService.Servers.User?null:u.dataService.Servers.User.SteamId))},function(l,n){var u=n.component;l(n,31,0,u.showLogin?"block":"none"),l(n,45,0,u.getLoginUrl()),l(n,55,0,u.currentUrl)})}function i(l){return o._24(0,[(l()(),o._25(0,null,null,1,"body",[],[[8,"className",0]],null,null,r,w)),o._27(122880,null,0,v.a,[y.a,b.a,m.a,_.a,p.g],null,null)],function(l,n){l(n,1,0)},function(l,n){l(n,0,0,o._29(n,1).getTheme())})}var a=u("Ni5f"),o=u("3j3K"),s=u("XhEa"),c=u("B8cY"),_=u("XLrO"),p=u("5oXY"),d=u("if6N"),f=u("v8ur"),m=u("aT6V"),h=u("2Je8"),v=u("YWx4"),g=u("8zLQ"),y=u("ATz5"),b=u("lHWG");u.d(n,"a",function(){return k});var S=[a.a],w=o._23({encapsulation:0,styles:S,data:{}}),k=o._30("body",v.a,i,{},{},[])},"1AkI":function(l,n,u){"use strict";function t(l){return c._24(0,[(l()(),c._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==c._29(l.parent,2).activate("players")&&t}return t},null,null)),c._27(139264,null,0,_.m,[c.v,c.w,c.K,c.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),c._31(["theme-d1"]),(l()(),c._26(null,["Players"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,c._29(n.parent,2).active("players")))},null)}function e(l){return c._24(0,[(l()(),c._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==c._29(l.parent,2).activate("tribes")&&t}return t},null,null)),c._27(139264,null,0,_.m,[c.v,c.w,c.K,c.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),c._31(["theme-d1"]),(l()(),c._26(null,["Tribes"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,c._29(n.parent,2).active("tribes")))},null)}function r(l){return c._24(0,[(l()(),c._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==c._29(l.parent,2).activate("wildcreatures-statistics")&&t}return t},null,null)),c._27(139264,null,0,_.m,[c.v,c.w,c.K,c.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),c._31(["theme-d1"]),(l()(),c._26(null,["Wild Statistics"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,c._29(n.parent,2).active("wildcreatures-statistics")))},null)}function i(l){return c._24(0,[(l()(),c._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==c._29(l.parent,2).activate("wildcreatures")&&t}return t},null,null)),c._27(139264,null,0,_.m,[c.v,c.w,c.K,c.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),c._31(["theme-d1"]),(l()(),c._26(null,["Wild Creatures"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,c._29(n.parent,2).active("wildcreatures")))},null)}function a(l){return c._24(0,[c._35(201326592,1,{menu:0}),(l()(),c._25(0,null,null,20,"app-menu",[],null,null,null,p.a,p.b)),c._27(122880,[[1,4],["menu",4]],0,d.a,[f.a],null,null),(l()(),c._26(0,["\n "])),(l()(),c._25(0,null,0,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),c._26(null,["Server"])),(l()(),c._26(0,["\n "])),(l()(),c._25(0,null,0,13,"div",[["class","w3-cell-row theme-l2"]],null,null,null,null,null)),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,t)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,e)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,r)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,i)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._26(0,["\n"]))],function(l,n){var u=n.component;l(n,2,0),l(n,10,0,u.dataService.hasFeatureAccess("server","players")),l(n,13,0,u.dataService.hasFeatureAccess("server","tribes")),l(n,16,0,u.dataService.hasFeatureAccess("server","wildcreatures-statistics")),l(n,19,0,u.dataService.hasFeatureAccess("server","wildcreatures"))},null)}function o(l){return c._24(0,[(l()(),c._25(0,null,null,1,"app-server-menu",[],[[8,"className",0]],null,null,a,v)),c._27(57344,null,0,m.a,[f.a],null,null)],function(l,n){l(n,1,0)},function(l,n){l(n,0,0,c._29(n,1).menu.className)})}var s=u("nJHW"),c=u("3j3K"),_=u("2Je8"),p=u("coiB"),d=u("8kYA"),f=u("ATz5"),m=u("7xIs");u.d(n,"a",function(){return g});var h=[s.a],v=c._23({encapsulation:0,styles:h,data:{}}),g=c._30("app-server-menu",m.a,o,{},{},[])},"2dXI":function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},5305:function(l,n,u){"use strict";var t=u("kZql"),e=u("f4AQ");u.n(e);u.d(n,"a",function(){return r});var r=function(){function l(){this.width=1024,this.height=1024,this.zoom=e.zoom().scaleExtent([1,10])}return l.prototype.imageLoaded=function(l){var n=this;this.img=l,this.width=l.naturalWidth,this.height=l.naturalHeight,window.setTimeout(function(){n.resize(),n.redraw()},100)},l.prototype.resize=function(){},l.prototype.zoomed=function(){var l=e.zoomTransform(this.canvasRef.nativeElement),n=this.canvasRef.nativeElement.getContext("2d");n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,this.width,this.height),n.translate(l.x,l.y),n.scale(l.k,l.k),this.redraw()},l.prototype.redraw=function(){var l=this.canvasRef.nativeElement.getContext("2d");if(l.drawImage(this.img,0,0),null!=this.points)for(var n=0,u=this.points;n/gi,window.location.protocol).replace(/\/gi,window.location.hostname).replace(/\/gi,void 0!=config?config.webapi.port:"")},l.ctorParameters=function(){return[]},l}()},"6Nb/":function(l,n,u){"use strict";function t(l){return i._24(2,[(l()(),i._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),i._26(null,["",""]))],null,function(l,n){l(n,1,0,n.component._str)})}function e(l){return i._24(0,[(l()(),i._25(0,null,null,1,"relative-time",[],null,null,null,t,s)),i._27(122880,null,0,a.a,[i.O],null,null)],function(l,n){l(n,1,0)},null)}var r=u("/tjS"),i=u("3j3K"),a=u("0onv");u.d(n,"b",function(){return s}),n.a=t;var o=[r.a],s=i._23({encapsulation:0,styles:o,data:{}});i._30("relative-time",a.a,e,{time:"time"},{},[])},"7MbP":function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},"7T2B":function(l,n,u){"use strict";var t=u("3j3K");u.d(n,"a",function(){return e});var e=function(){function l(){this.callback=new t.Q,this.confirming=!1}return l.prototype.ngOnInit=function(){},l.prototype.onClick=function(l){var n=this;this.confirming?l.detail>=3&&(window.clearTimeout(this.resetTimeout),this.confirming=!1,this.callback.emit()):(this.confirming=!0,this.resetTimeout=window.setTimeout(function(){n.confirming=!1},5e3))},l.ctorParameters=function(){return[]},l}()},"7xIs":function(l,n,u){"use strict";var t=u("ATz5");u.d(n,"a",function(){return e});var e=function(){function l(l){this.dataService=l}return l.prototype.ngOnInit=function(){this.dataService.hasFeatureAccess("server","players")?this.menu.activate("players"):this.dataService.hasFeatureAccess("server","tribes")?this.menu.activate("tribes"):this.dataService.hasFeatureAccess("server","wildcreatures-statistics")?this.menu.activate("wildcreatures-statistics"):this.dataService.hasFeatureAccess("server","wildcreatures")&&this.menu.activate("wildcreatures")},l.ctorParameters=function(){return[{type:t.a}]},l}()},"8kYA":function(l,n,u){"use strict";var t=u("ATz5");u.d(n,"a",function(){return e});var e=function(){function l(l){this.dataService=l,this.menuOption=void 0,this.menuVisible=!1,this.className="menucontainer"}return l.prototype.ngOnInit=function(){var l=this;this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n})},l.prototype.ngOnDestroy=function(){this.menuOptionSubscription.unsubscribe()},l.prototype.activate=function(l){this.dataService.SetMenuOption(l)},l.prototype.active=function(l){return this.menuOption==l},l.prototype.toggleMenu=function(){this.menuVisible=!this.menuVisible},l.ctorParameters=function(){return[{type:t.a}]},l}()},"8zLQ":function(l,n,u){"use strict";var t=u("3j3K");u.d(n,"a",function(){return e});var e=function(){function l(l){this._elementRef=l,this.clickOutside=new t.Q}return l.prototype.onClick=function(l,n){if(n){this._elementRef.nativeElement.contains(n)||this.clickOutside.emit(l)}},l.ctorParameters=function(){return[{type:t.K}]},l}()},ATz5:function(l,n,u){"use strict";var t=u("3j3K"),e=u("Gvdl"),r=(u.n(e),u("lHWG")),i=u("+Lwu"),a=u("kZql"),o=u("PJh5");u.n(o);u.d(n,"a",function(){return s});var s=function(){function l(l,n){var u=this;this.httpService=l,this.messageService=n,this._servers=new e.BehaviorSubject(void 0),this.menuOption=new e.BehaviorSubject(void 0),this.ServersUpdated$=new t.Q,n.serverUpdated$.subscribe(function(l){return u.updateServer(l)})}return Object.defineProperty(l.prototype,"MenuOption",{get:function(){return this.menuOption.asObservable()},enumerable:!0,configurable:!0}),l.prototype.SetMenuOption=function(l){this.menuOption.next(l)},l.prototype.getServers=function(){var l=this;return this.httpService.getServers().then(function(n){l.Servers=n;var u=n?n.User:void 0;return l.UserSteamId=u&&u.SteamId?u.SteamId:void 0,l._servers.next(n),l.ServersUpdated$.emit(n),!0}).catch(function(n){return l.Servers=null,l.UserSteamId=void 0,l._servers.next(null),l.ServersUpdated$.emit(null),!1})},l.prototype.updateServer=function(l){this.getServers()},l.prototype.hasFeatureAccess=function(l,n,u){var t=this.Servers?this.Servers.AccessControl:void 0;if(!t)return!1;var e=t[l];if(!e)return!1;var r=e[n];if(!r)return!1;var i=this.Servers?this.Servers.User:void 0,a=i&&i.Roles?i.Roles.slice(0):[];i&&i.SteamId&&i.SteamId==u&&a.push("self");for(var o=function(l){if(r.find(function(n){return l.toLowerCase()===n.toLowerCase()}))return{value:!0}},s=0,c=a;s0&&e.push(t+"d"),(t>0||u>0)&&e.push(u+"h"),(t>0||u>0||n>0)&&e.push(n+"m"),e.push(l+"s"),this._str=e.join(" "),this._ready=!1,this.state._completed=!1},l.prototype.ngOnInit=function(){var l=this;this._timeSubscription=this._time.subscribe(function(n){l.updateDiff(n),l.update()}),this._notificationSubscription=this._notification.subscribe(function(l){}),this._counter=t.Observable.interval(1e3).map(function(n){return l.updateDiff(void 0),n}),this._counterSubscription=this._counter.subscribe(function(n){return l.update()})},l.prototype.ngOnDestroy=function(){this._timeSubscription.unsubscribe(),this._notificationSubscription.unsubscribe(),this._counterSubscription.unsubscribe()},l.ctorParameters=function(){return[]},l}()},DGJX:function(l,n,u){"use strict";function t(l){return v._24(0,[(l()(),v._25(0,null,null,2,null,null,null,null,null,null,null)),(l()(),v._26(null,["Last Active: ",""])),(l()(),v._25(0,null,null,0,"br",[],null,null,null,null,null))],null,function(l,n){var u=n.component;l(n,1,0,u.dataService.toRelativeDate(u.currentOwner.LastActiveTime))})}function e(l){return v._24(0,[(l()(),v._25(0,null,null,3,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._25(0,null,null,2,"confirm-button",[],null,[[null,"callback"]],function(l,n,u){var t=!0,e=l.component;if("callback"===n){t=!1!==e.destroyCurrentArea(u)&&t}return t},g.a,g.b)),v._27(57344,null,0,y.a,[],{width:[0,"width"]},{callback:"callback"}),(l()(),v._26(0,["Destroy this area"]))],function(l,n){l(n,2,0,100)},null)}function r(l){return v._24(0,[(l()(),v._25(0,null,null,31,null,null,null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),v._26(null,[" \n "])),(l()(),v._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.hideContextMenu()&&t}return t},null,null)),(l()(),v._26(null,["×"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,19,"div",[["class","w3-container w3-medium theme-l2"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,9,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._26(null,["\n Coords: ",", ",""])),v._32(2),v._32(2),(l()(),v._25(0,null,null,0,"br",[],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,t)),v._27(8192,null,0,b.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "," structures\n "])),v._32(1),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._25(0,null,null,1,"button",[["class","w3-button theme-d1"],["style","width: 100%;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setSelectedOwner(e.currentOwner)&&t}return t},null,null)),(l()(),v._26(null,["Show only areas for this team"])),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,e)),v._27(8192,null,0,b.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "]))],function(l,n){var u=n.component;l(n,20,0,u.currentOwner.LastActiveTime),l(n,29,0,u.dataService.hasFeatureAccess("admin-server","structures-rcon"))},function(l,n){var u=n.component;l(n,8,0,u.currentOwner.Name),l(n,14,0,v._33(n,14,0,l(n,15,0,v._29(n.parent,0),u.currentArea.Latitude,"1.0-1")),v._33(n,14,1,l(n,16,0,v._29(n.parent,0),u.currentArea.Longitude,"1.0-1"))),l(n,21,0,v._33(n,21,0,l(n,22,0,v._29(n.parent,0),u.currentArea.StructureCount)))})}function i(l){return v._24(0,[(l()(),v._25(0,null,null,2,null,null,null,null,null,null,null)),(l()(),v._26(null,["Last Active: ",""])),(l()(),v._25(0,null,null,0,"br",[],null,null,null,null,null))],null,function(l,n){var u=n.component;l(n,1,0,u.dataService.toRelativeDate(u.currentOwner.LastActiveTime))})}function a(l){return v._24(0,[(l()(),v._25(0,null,null,3,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._25(0,null,null,2,"confirm-button",[],null,[[null,"callback"]],function(l,n,u){var t=!0,e=l.component;if("callback"===n){t=!1!==e.destroyAllStructuresForTeam(u)&&t}return t},g.a,g.b)),v._27(57344,null,0,y.a,[],{width:[0,"width"]},{callback:"callback"}),(l()(),v._26(0,["Destroy all structures"]))],function(l,n){l(n,2,0,100)},null)}function o(l){return v._24(0,[(l()(),v._25(0,null,null,3,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._25(0,null,null,2,"confirm-button",[],null,[[null,"callback"]],function(l,n,u){var t=!0,e=l.component;if("callback"===n){t=!1!==e.destroyDinosForTeam(u)&&t}return t},g.a,g.b)),v._27(57344,null,0,y.a,[],{width:[0,"width"]},{callback:"callback"}),(l()(),v._26(0,["Destroy all creatures"]))],function(l,n){l(n,2,0,100)},null)}function s(l){return v._24(0,[(l()(),v._25(0,null,null,36,null,null,null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),v._26(null,[" \n "])),(l()(),v._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.hideContextMenu()&&t}return t},null,null)),(l()(),v._26(null,["×"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,24,"div",[["class","w3-container w3-medium theme-l2"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,11,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,i)),v._27(8192,null,0,b.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "," areas"])),v._32(1),(l()(),v._25(0,null,null,0,"br",[],null,null,null,null,null)),(l()(),v._26(null,["\n "," structures"])),v._32(1),(l()(),v._25(0,null,null,0,"br",[],null,null,null,null,null)),(l()(),v._26(null,["\n "," creatures\n "])),v._32(1),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._25(0,null,null,1,"button",[["class","w3-button theme-d1"],["style","width: 100%;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setSelectedOwner(e.currentOwner)&&t}return t},null,null)),(l()(),v._26(null,["Show only areas for this team"])),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,a)),v._27(8192,null,0,b.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,o)),v._27(8192,null,0,b.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "]))],function(l,n){var u=n.component;l(n,16,0,u.currentOwner.LastActiveTime),l(n,31,0,u.dataService.hasFeatureAccess("admin-server","structures-rcon")),l(n,34,0,u.dataService.hasFeatureAccess("admin-server","structures-rcon"))},function(l,n){var u=n.component;l(n,8,0,u.currentOwner.Name),l(n,17,0,v._33(n,17,0,l(n,18,0,v._29(n.parent,0),u.currentOwner.AreaCount))),l(n,20,0,v._33(n,20,0,l(n,21,0,v._29(n.parent,0),u.currentOwner.StructureCount))),l(n,23,0,v._33(n,23,0,l(n,24,0,v._29(n.parent,0),u.currentOwner.CreatureCount)))})}function c(l){return v._24(0,[(l()(),v._25(0,null,null,16,null,null,null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),v._26(null,[" \n "])),(l()(),v._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.hideContextMenu()&&t}return t},null,null)),(l()(),v._26(null,["×"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,4,"div",[["class","w3-container w3-medium theme-l2"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"div",[["class","w3-section"]],null,null,null,null,null)),(l()(),v._26(null,["\n ","\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "]))],null,function(l,n){var u=n.component;l(n,8,0,u.modalInfo.Header),l(n,14,0,u.modalInfo.Message)})}function _(l){return v._24(0,[(l()(),v._25(0,null,null,3,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),v._25(0,null,null,2,"confirm-button",[["class","w3-right"]],null,[[null,"callback"]],function(l,n,u){var t=!0,e=l.component;if("callback"===n){t=!1!==e.saveWorld(u)&&t}return t},g.a,g.b)),v._27(57344,null,0,y.a,[],{width:[0,"width"]},{callback:"callback"}),(l()(),v._26(0,["Save World"]))],function(l,n){l(n,2,0,void 0)},null)}function p(l){return v._24(0,[(l()(),v._25(0,null,null,30,"tr",[],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,8,"td",[],null,null,null,null,null)),(l()(),v._25(0,null,null,6,"input",[["type","radio"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(l,n,u){var t=!0,e=l.component;if("input"===n){t=!1!==v._29(l,4)._handleInput(u.target.value)&&t}if("blur"===n){t=!1!==v._29(l,4).onTouched()&&t}if("compositionstart"===n){t=!1!==v._29(l,4)._compositionStart()&&t}if("compositionend"===n){t=!1!==v._29(l,4)._compositionEnd(u.target.value)&&t}if("change"===n){t=!1!==v._29(l,5).onChange()&&t}if("blur"===n){t=!1!==v._29(l,5).onTouched()&&t}if("ngModelChange"===n){t=!1!==(e.selectedOwner=u)&&t}if("change"===n){t=!1!==e.updateSelection()&&t}return t},null,null)),v._27(8192,null,0,S.d,[v.J,v.K,[2,S.e]],null,null),v._27(106496,null,0,S.f,[v.J,v.K,S.a,v.W],{value:[0,"value"]},null),v._37(512,null,S.g,function(l,n){return[l,n]},[S.d,S.f]),v._27(335872,null,0,S.h,[[8,null],[8,null],[8,null],[2,S.g]],{model:[0,"model"]},{update:"ngModelChange"}),v._37(1024,null,S.i,null,[S.h]),v._27(8192,null,0,S.j,[S.i],null,null),(l()(),v._26(null,[" ",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),v._26(null,["",""])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),v._25(0,null,null,1,"button",[["class","w3-button theme-d1 w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.showOwnerModal(u,l.context.$implicit)&&t}return t},null,null)),(l()(),v._26(null,["Options"])),(l()(),v._26(null,["\n "]))],function(l,n){var u=n.component;l(n,5,0,n.context.$implicit),l(n,7,0,u.selectedOwner)},function(l,n){var u=n.component;l(n,3,0,v._29(n,9).ngClassUntouched,v._29(n,9).ngClassTouched,v._29(n,9).ngClassPristine,v._29(n,9).ngClassDirty,v._29(n,9).ngClassValid,v._29(n,9).ngClassInvalid,v._29(n,9).ngClassPending),l(n,10,0,n.context.$implicit.Name),l(n,13,0,n.context.$implicit.Type),l(n,16,0,n.context.$implicit.AreaCount),l(n,19,0,n.context.$implicit.StructureCount),l(n,22,0,n.context.$implicit.CreatureCount),l(n,25,0,u.dataService.toRelativeDate(n.context.$implicit.LastActiveTime))})}function d(l){return v._24(0,[(l()(),v._25(0,null,null,56,null,null,null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,15,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),v._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),v._26(null,["Player/Tribe Locations"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,8,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,5,"div",[["class","w3-clear"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"button",[["class","w3-button theme-d1 w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.reset(u)&&t}return t},null,null)),(l()(),v._26(null,["Reset"])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,36,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,33,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,24,"thead",[],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,21,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),v._26(null,["Name"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),v._26(null,["Type"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Location Count"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setOwnerSort("locations")&&t}return t},null,null)),(l()(),v._26(null,["A#"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Structure Count"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setOwnerSort("structures")&&t}return t},null,null)),(l()(),v._26(null,["S#"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[["title","Creature Count"]],null,null,null,null,null)),(l()(),v._26(null,["C#"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Last Active Time"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setOwnerSort("lastactive")&&t}return t},null,null)),(l()(),v._26(null,["Last Active"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,0,"th",[],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,p)),v._27(401408,null,0,b.n,[v.S,v._5,v.v],{ngForOf:[0,"ngForOf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n"]))],function(l,n){l(n,52,0,n.component.ownersSorted)},null)}function f(l){return v._24(0,[v._34(0,b.p,[v.t]),v._35(201326592,1,{mapContainer:0}),v._35(201326592,2,{contextMenu:0}),(l()(),v._26(null,["\n"])),(l()(),v._25(0,[[2,0],["contextMenu",1]],null,14,"div",[["class","contextMenu w3-modal"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,11,"div",[["class","w3-modal-content w3-card-4 w3-animate-zoom"],["style","font-size: 0;"]],null,[[null,"clickOutside"],["document","click"]],function(l,n,u){var t=!0,e=l.component;if("document:click"===n){t=!1!==v._29(l,7).onClick(u,u.target)&&t}if("clickOutside"===n){t=!1!==e.hideContextMenu()&&t}return t},null,null)),v._27(8192,null,0,k.a,[v.K],null,{clickOutside:"clickOutside"}),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,r)),v._27(8192,null,0,b.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,s)),v._27(8192,null,0,b.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,c)),v._27(8192,null,0,b.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n"])),(l()(),v._26(null,["\n\n"])),(l()(),v._25(0,null,null,9,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,3,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),v._25(0,null,null,0,"a",[["id","structures"]],null,null,null,null,null)),(l()(),v._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),v._26(null,["Structures"])),(l()(),v._26(null,["\n "])),(l()(),v._28(8388608,null,null,1,null,_)),v._27(8192,null,0,b.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null),(l()(),v._26(null,["\n"])),(l()(),v._26(null,["\n\n"])),(l()(),v._25(0,null,null,14,"div",[["class","wrapper"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,9,"div",[["class","buttons"]],null,null,null,null,null)),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"button",[["class","w3-button theme-d1"],["style","padding: 3px 6px;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.zoomIn()&&t}return t},null,null)),(l()(),v._25(0,null,null,1,"i",[["class","material-icons w3-xxlarge"]],null,null,null,null,null)),(l()(),v._26(null,["add"])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,null,null,2,"button",[["class","w3-button theme-d1"],["style","padding: 3px 6px;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.zoomOut()&&t}return t},null,null)),(l()(),v._25(0,null,null,1,"i",[["class","material-icons w3-xxlarge"]],null,null,null,null,null)),(l()(),v._26(null,["remove"])),(l()(),v._26(null,["\n "])),(l()(),v._26(null,["\n "])),(l()(),v._25(0,[[1,0],["map",1]],null,0,"div",[["class","map"]],null,null,null,null,null)),(l()(),v._26(null,["\n"])),(l()(),v._26(null,["\n\n"])),(l()(),v._28(8388608,null,null,1,null,d)),v._27(8192,null,0,b.l,[v.S,v._5],{ngIf:[0,"ngIf"]},null)],function(l,n){var u=n.component;l(n,10,0,u.currentArea&&u.currentOwner),l(n,13,0,u.currentOwner&&!u.currentArea),l(n,16,0,u.modalInfo),l(n,28,0,u.dataService.hasFeatureAccess("admin-server","structures-rcon")),l(n,48,0,u.ownersSorted)},null)}function m(l){return v._24(0,[(l()(),v._25(0,null,null,1,"arkmap-structures",[],null,null,null,f,O)),v._27(385024,null,0,w.a,[C.a,I.a,v.e],null,null)],function(l,n){l(n,1,0)},null)}var h=u("Dn8Y"),v=u("3j3K"),g=u("r8sF"),y=u("7T2B"),b=u("2Je8"),S=u("NVOs"),w=u("lCrv"),k=u("8zLQ"),C=u("ATz5"),I=u("lHWG");u.d(n,"b",function(){return O}),n.a=f;var x=[h.a],O=v._23({encapsulation:2,styles:x,data:{}});v._30("arkmap-structures",w.a,m,{structures:"structures",serverKey:"serverKey",mapName:"mapName"},{},[])},Dn8Y:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=['.map canvas,.map svg{position:absolute;top:0;left:0;width:100%}rect.overlay{fill:transparent}.wrapper{position:relative}.wrapper:after{padding-top:100%;display:block;content:""}.wrapper .buttons{position:absolute;left:5px;top:5px;opacity:.75;z-index:2}']},Fnlp:function(l,n,u){"use strict";var t=u("ATz5"),e=u("3MNG"),r=u("+Lwu");u.d(n,"a",function(){return i});var i=function(){function l(l,n,u){this.dataService=l,this.messageService=n,this.notificationsService=u,this.menuOption=void 0,this.demoMode=!1}return l.prototype.ngOnInit=function(){var l=this;this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){return l.showServerUpdateNotification(n)}),this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n}),this.demoMode="true"==localStorage.getItem("demoMode")},l.prototype.ngOnDestroy=function(){this.serverUpdatedSubscription.unsubscribe(),this.menuOptionSubscription.unsubscribe()},l.prototype.showServerUpdateNotification=function(l){this.notificationsService.success("Server Update",l+" was updated; Reloading data...",{showProgressBar:!0,pauseOnHover:!0,clickToClose:!0})},l.prototype.isMenuActive=function(l){return this.menuOption==l},l.prototype.toggleDemoMode=function(){var l="true"!=localStorage.getItem("demoMode");this.demoMode=l,localStorage.setItem("demoMode",l+"")},l.ctorParameters=function(){return[{type:t.a},{type:r.a},{type:e.a}]},l}()},FxpQ:function(l,n,u){"use strict";var t=u("ATz5"),e=u("3MNG"),r=u("+Lwu");u.d(n,"a",function(){return i});var i=function(){function l(l,n,u){this.dataService=l,this.messageService=n,this.notificationsService=u,this.menuOption=void 0}return l.prototype.ngOnInit=function(){var l=this;this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){return l.showServerUpdateNotification(n)}),this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n})},l.prototype.ngOnDestroy=function(){this.serverUpdatedSubscription.unsubscribe(),this.menuOptionSubscription.unsubscribe()},l.prototype.showServerUpdateNotification=function(l){this.notificationsService.success("Server Update",l+" was updated; Reloading data...",{showProgressBar:!0,pauseOnHover:!0,clickToClose:!0})},l.prototype.isMenuActive=function(l){return this.menuOption==l},l.ctorParameters=function(){return[{type:t.a},{type:r.a},{type:e.a}]},l}()},I9JA:function(l,n,u){"use strict";function t(l){return r._24(0,[r._35(201326592,1,{canvasRef:0}),(l()(),r._25(0,[[1,0],["myCanvas",1]],null,0,"canvas",[["style","width: 100%;"]],[[8,"width",0],[8,"height",0]],null,null,null,null))],null,function(l,n){var u=n.component;l(n,1,0,u.width,u.height)})}function e(l){return r._24(0,[(l()(),r._25(0,null,null,1,"arkmap",[],null,null,null,t,o)),r._27(286720,null,0,i.a,[],null,null)],null,null)}var r=u("3j3K"),i=u("5305");u.d(n,"b",function(){return o}),n.a=t;var a=[],o=r._23({encapsulation:2,styles:a,data:{}});r._30("arkmap",i.a,e,{mapName:"mapName",points:"points"},{},[])},Iksp:function(l,n,u){"use strict";var t=u("KZxv"),e=u("RiXa"),r=u("qn86"),i=u("JLFQ"),a=u("e/mT"),o=u("+w0e"),s=u("JKTH"),c=u("7xIs"),_=u("08Wm"),p=u("+qYp"),d=u("FxpQ"),f=u("Fnlp");u.d(n,"a",function(){return m});var m=(o.a,t.a,e.a,o.a,r.a,c.a,o.a,a.a,_.a,o.a,i.a,s.a,f.a,p.a,d.a,function(){function l(){}return l}())},J8nT:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=function(){function l(){}return l}()},JKTH:function(l,n,u){"use strict";var t=u("ATz5");u.d(n,"a",function(){return e});var e=function(){function l(l){this.dataService=l}return l.prototype.ngOnInit=function(){this.menu.activate("overview")},l.ctorParameters=function(){return[{type:t.a}]},l}()},JLFQ:function(l,n,u){"use strict";var t=u("ATz5"),e=u("3MNG"),r=u("+Lwu");u.d(n,"a",function(){return i});var i=function(){function l(l,n,u){this.dataService=l,this.messageService=n,this.notificationsService=u,this.menuOption=void 0,this.serverCount=0,this.onlinePlayerCount=0}return l.prototype.ngOnInit=function(){var l=this;this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){return l.showServerUpdateNotification(n)}),this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n}),this.serversUpdatedSubscription=this.dataService.ServersUpdated$.subscribe(function(n){l.updateData(n)}),this.serverUpdateInterval=window.setInterval(function(){l.dataService.updateServer(null)},6e4),this.updateData(this.dataService.Servers)},l.prototype.ngOnDestroy=function(){this.serverUpdatedSubscription.unsubscribe(),this.menuOptionSubscription.unsubscribe(),this.serversUpdatedSubscription.unsubscribe(),window.clearInterval(this.serverUpdateInterval)},l.prototype.updateData=function(l){var n=0,u=0;if(l&&l.Servers){n=l.Servers.length;for(var t=0,e=l.Servers;t0?u[0]:null);var t=Object.keys(n.Clusters);l.clusterKey&&void 0!=t.find(function(n){return n==l.clusterKey})||(l.clusterKey=t.length>0?t[0]:null),l.player=n,l.filterAndSort(),l.sortCluster(),l.filterCluster(),l.loaded=!0,l.ref.detectChanges()}).catch(function(n){l.player=null,l.filteredCreatures=null,l.imprintCreatures=null,l.filteredClusterCreatures=null,l.loaded=!0})},l.prototype.ngOnInit=function(){var l=this;this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){return l.menuOption=n}),this.steamId=this.route.snapshot.params.playerid,this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){return l.updateServer(n)}),this.getPlayer()},l.prototype.ngOnDestroy=function(){this.menuOptionSubscription.unsubscribe(),this.serverUpdatedSubscription.unsubscribe()},l.prototype.haveMatingCooldown=function(l){return null!=l.NextMating&&new Date(l.NextMating)>new Date},l.prototype.active=function(l){return this.serverKey==l},l.prototype.activate=function(l){this.serverKey=l,this.filterAndSort()},l.prototype.serverWidth=function(){return 100/Object.keys(this.player.Servers).length},l.prototype.activeCluster=function(l){return this.clusterKey==l},l.prototype.activateCluster=function(l){this.clusterKey=l,this.sortCluster(),this.filterCluster()},l.prototype.clusterWidth=function(){return 100/Object.keys(this.player.Clusters).length},l.prototype.sort=function(){var l=this,n="-"!=this.creaturesSortField[0],u=this.creaturesSortFunctions[this.creaturesSortField.replace(/^\-/,"")],t=this.creaturesAltSortFields.split(",").map(function(n){var u={};return u.asc="-"!=n[0],u.sortFunc=l.creaturesSortFunctions[n.replace(/^\-/,"")],u});this.filteredCreatures.sort(function(l,e){var r=u(l,e,n);if(0==r)for(var i=0,a=t;i=0||null!=n.Name&&n.Name.toLowerCase().indexOf(l)>=0})}var n=this.player.Servers[this.serverKey].Creatures.filter(function(l){return null!=l.BabyAge});n.sort(function(l,n){return new Date(l.BabyNextCuddle)new Date(n.BabyNextCuddle)?1:0}),this.imprintCreatures=n;for(var u=[],t=0,e=this.filteredCreatures;tn.Level?-1:l.Level=0||null!=n.Name&&n.Name.toLowerCase().indexOf(l)>=0})}},l.prototype.run=function(){if(null==this.steamId||""==this.steamId)return this.player=null,this.filteredCreatures=null,void(this.imprintCreatures=null);this.getPlayer()},l.prototype.openMap=function(l){this.showMap=!0,l.stopPropagation()},l.prototype.closeMap=function(l){this.showMap=!1},l.prototype.updateServer=function(l){this.getPlayer(),this.showServerUpdateNotification(l)},l.prototype.haveCluster=function(){return null!=this.player&&Object.keys(this.player.Clusters).length>0},l.prototype.sumKibbleAndEggs=function(){return void 0!=this.player.Servers[this.serverKey].KibblesAndEggs?this.player.Servers[this.serverKey].KibblesAndEggs.reduce(function(l,n){return l+n.KibbleCount+n.EggCount},0):0},l.prototype.showServerUpdateNotification=function(l){this.notificationsService.success("Server Update",l+" was updated; Reloading data...",{showProgressBar:!0,pauseOnHover:!0,clickToClose:!0})},l.prototype.isMenuActive=function(l){return this.menuOption==l},l.prototype.getStateForCreature=function(l){if(l){var n=this.creatureStates[l.Id1+"_"+l.Id2];return n||(n={imprintNotifications:!0},this.creatureStates[l.Id1+"_"+l.Id2]=n),n}},l.prototype.toggleImprintNotificationForCreature=function(l){var n=this.getStateForCreature(l);n.imprintNotifications=!n.imprintNotifications},l.prototype.activeCreaturesMode=function(l){return l==this.creaturesMode},l.prototype.activateCreaturesMode=function(l){this.creaturesMode=l},l.prototype.setCreaturesSort=function(l){var n=this.creaturesSortField==l;this.creaturesSortField=n?"-"+l:l,this.creaturesAltSortFields="latitude"==l?n?"-longitude,name":"longitude,name":"longitude"==l?n?"-latitude,name":"latitude,name":"name",this.sort()},l.prototype.copyCreature=function(l){},l.prototype.getCurrentServer=function(){var l=this;if(this.dataService&&this.dataService.Servers&&this.dataService.Servers.Servers){return this.dataService.Servers.Servers.find(function(n){return n.Key==l.serverKey})}},l.prototype.numCreatureTabs=function(){var l=1;return this.dataService.hasFeatureAccess("player","creatures-basestats",this.steamId)&&(l+=1),this.dataService.hasFeatureAccess("player","creatures-ids",this.steamId)&&(l+=1),l},l.ctorParameters=function(){return[{type:e.v},{type:e.g},{type:o.a},{type:i.a},{type:a.a},{type:r.a},{type:t.O}]},l}()},Layn:function(l,n,u){"use strict";function t(l){return s._24(0,[(l()(),s._25(0,null,null,0,"div",[["class","icon"]],[[8,"innerHTML",1]],null,null,null,null))],null,function(l,n){l(n,0,0,n.component.safeSvg)})}function e(l){return s._24(0,[(l()(),s._25(0,null,null,11,"div",[],null,null,null,null,null)),(l()(),s._26(null,["\n "])),(l()(),s._25(0,null,null,1,"div",[["class","sn-title"]],null,null,null,null,null)),(l()(),s._26(null,["",""])),(l()(),s._26(null,["\n "])),(l()(),s._25(0,null,null,2,"div",[["class","sn-content"]],null,null,null,null,null)),(l()(),s._26(null,["",""])),s._32(2),(l()(),s._26(null,["\n\n "])),(l()(),s._28(8388608,null,null,1,null,t)),s._27(8192,null,0,c.l,[s.S,s._5],{ngIf:[0,"ngIf"]},null),(l()(),s._26(null,["\n "]))],function(l,n){l(n,10,0,"bare"!==n.component.item.icon)},function(l,n){var u=n.component;l(n,3,0,u.item.title),l(n,6,0,s._33(n,6,0,l(n,7,0,s._29(n.parent,0),u.item.content,u.maxLength)))})}function r(l){return s._24(0,[(l()(),s._25(0,null,null,0,"div",[],[[8,"innerHTML",1]],null,null,null,null))],null,function(l,n){l(n,0,0,n.component.item.html)})}function i(l){return s._24(0,[(l()(),s._25(0,null,null,5,"div",[["class","sn-progress-loader"]],null,null,null,null,null)),(l()(),s._26(null,["\n "])),(l()(),s._25(0,null,null,2,"span",[],null,null,null,null,null)),s._27(139264,null,0,c.o,[s.w,s.K,s.J],{ngStyle:[0,"ngStyle"]},null),s._31(["width"]),(l()(),s._26(null,["\n "]))],function(l,n){l(n,3,0,l(n,4,0,n.component.progressWidth+"%"))},null)}function a(l){return s._24(0,[s._34(0,_.a,[]),(l()(),s._26(null,["\n "])),(l()(),s._25(0,null,null,12,"div",[["class","simple-notification"]],[[24,"@enterLeave",0]],[[null,"click"],[null,"mouseenter"],[null,"mouseleave"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.onClick(u)&&t}if("mouseenter"===n){t=!1!==e.onEnter()&&t}if("mouseleave"===n){t=!1!==e.onLeave()&&t}return t},null,null)),s._27(139264,null,0,c.m,[s.v,s.w,s.K,s.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),s._31(["alert","error","warn","success","info","bare","rtl-mode"]),(l()(),s._26(null,["\n\n "])),(l()(),s._28(8388608,null,null,1,null,e)),s._27(8192,null,0,c.l,[s.S,s._5],{ngIf:[0,"ngIf"]},null),(l()(),s._26(null,["\n "])),(l()(),s._28(8388608,null,null,1,null,r)),s._27(8192,null,0,c.l,[s.S,s._5],{ngIf:[0,"ngIf"]},null),(l()(),s._26(null,["\n\n "])),(l()(),s._28(8388608,null,null,1,null,i)),s._27(8192,null,0,c.l,[s.S,s._5],{ngIf:[0,"ngIf"]},null),(l()(),s._26(null,["\n\n "])),(l()(),s._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,u.theClass,l(n,4,0,"alert"===u.item.type,"error"===u.item.type,"warn"===u.item.type,"success"===u.item.type,"info"===u.item.type,"bare"===u.item.type,u.rtl)),l(n,7,0,!u.item.html),l(n,10,0,u.item.html),l(n,13,0,u.showProgressBar)},function(l,n){l(n,2,0,n.component.item.state)})}function o(l){return s._24(0,[(l()(),s._25(0,null,null,1,"simple-notification",[],null,null,null,a,h)),s._27(122880,null,0,p.a,[d.a,f.q,s.e],null,null)],function(l,n){l(n,1,0)},null)}var s=u("3j3K"),c=u("2Je8"),_=u("g/xi"),p=u("Ev1B"),d=u("XLrO"),f=u("Qbdm");u.d(n,"b",function(){return h}),n.a=a;var m=["\n .simple-notification {\n width: 100%;\n padding: 10px 20px;\n box-sizing: border-box;\n position: relative;\n float: left;\n margin-bottom: 10px;\n color: #fff;\n cursor: pointer;\n transition: all 0.5s;\n }\n\n .simple-notification .sn-title {\n margin: 0;\n padding: 0 50px 0 0;\n line-height: 30px;\n font-size: 20px;\n }\n\n .simple-notification .sn-content {\n margin: 0;\n font-size: 16px;\n padding: 0 50px 0 0;\n line-height: 20px;\n }\n\n .simple-notification .icon {\n position: absolute;\n box-sizing: border-box;\n top: 0;\n right: 0;\n width: 70px;\n height: 70px;\n padding: 10px;\n }\n\n .simple-notification .icon svg {\n fill: #fff;\n width: 100%;\n height: 100%;\n }\n\n .simple-notification .icon svg g {\n fill: #fff;\n }\n\n .simple-notification.rtl-mode {\n direction: rtl;\n }\n\n .simple-notification.rtl-mode .sn-content {\n padding: 0 0 0 50px;\n }\n\n .simple-notification.rtl-mode svg {\n left: 0;\n right: auto;\n }\n\n .simple-notification.error { background: #F44336; }\n .simple-notification.success { background: #8BC34A; }\n .simple-notification.alert { background: #ffdb5b; }\n .simple-notification.info { background: #03A9F4; }\n .simple-notification.warn { background: #ffdb5b; }\n\n .simple-notification .sn-progress-loader {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 5px;\n }\n\n .simple-notification .sn-progress-loader span {\n float: left;\n height: 100%;\n }\n\n .simple-notification.success .sn-progress-loader span { background: #689F38; }\n .simple-notification.error .sn-progress-loader span { background: #D32F2F; }\n .simple-notification.alert .sn-progress-loader span { background: #edc242; }\n .simple-notification.info .sn-progress-loader span { background: #0288D1; }\n .simple-notification.warn .sn-progress-loader span { background: #edc242; }\n .simple-notification.bare .sn-progress-loader span { background: #ccc; }\n\n .simple-notification.warn div .sn-title { color: #444; }\n .simple-notification.warn div .sn-content { color: #444; }\n "],h=s._23({encapsulation:2,styles:m,data:{animation:[{name:"enterLeave",definitions:[{type:0,name:"fromRight",styles:{type:6,styles:{opacity:1,transform:"translateX(0)"}}},{type:1,expr:"* => fromRight",animation:[{type:6,styles:{opacity:0,transform:"translateX(5%)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]},{type:0,name:"fromRightOut",styles:{type:6,styles:{opacity:0,transform:"translateX(-5%)"}}},{type:1,expr:"fromRight => fromRightOut",animation:[{type:6,styles:{opacity:1,transform:"translateX(0)"}},{type:4,styles:null,timings:"300ms ease-in-out"}]},{type:0,name:"fromLeft",styles:{type:6,styles:{opacity:1,transform:"translateX(0)"}}},{type:1,expr:"* => fromLeft",animation:[{type:6,styles:{opacity:0,transform:"translateX(-5%)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]},{type:0,name:"fromLeftOut",styles:{type:6,styles:{opacity:0,transform:"translateX(5%)"}}},{type:1,expr:"fromLeft => fromLeftOut",animation:[{type:6,styles:{opacity:1,transform:"translateX(0)"}},{type:4,styles:null,timings:"300ms ease-in-out"}]},{type:0,name:"scale",styles:{type:6,styles:{opacity:1,transform:"scale(1)"}}},{type:1,expr:"* => scale",animation:[{type:6,styles:{opacity:0,transform:"scale(0)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]},{type:0,name:"scaleOut",styles:{type:6,styles:{opacity:0,transform:"scale(0)"}}},{type:1,expr:"scale => scaleOut",animation:[{type:6,styles:{opacity:1,transform:"scale(1)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]},{type:0,name:"rotate",styles:{type:6,styles:{opacity:1,transform:"rotate(0deg)"}}},{type:1,expr:"* => rotate",animation:[{type:6,styles:{opacity:0,transform:"rotate(5deg)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]},{type:0,name:"rotateOut",styles:{type:6,styles:{opacity:0,transform:"rotate(-5deg)"}}},{type:1,expr:"rotate => rotateOut",animation:[{type:6,styles:{opacity:1,transform:"rotate(0deg)"}},{type:4,styles:null,timings:"400ms ease-in-out"}]}]}]}});s._30("simple-notification",p.a,o,{timeOut:"timeOut",showProgressBar:"showProgressBar",pauseOnHover:"pauseOnHover",clickToClose:"clickToClose",maxLength:"maxLength",theClass:"theClass",rtl:"rtl",animate:"animate",position:"position",item:"item"},{},[])},Ni5f:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},OO5M:function(l,n,u){"use strict";function t(l){return i._24(0,[(l()(),i._25(0,null,null,10,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),i._26(null,["\n "])),(l()(),i._25(0,null,null,7,"div",[["class","w3-panel w3-red"]],null,null,null,null,null)),(l()(),i._26(null,["\n "])),(l()(),i._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),i._26(null,["Connection error"])),(l()(),i._26(null,["\n "])),(l()(),i._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),i._26(null,["The application was unable to connect to the Web API. This could be due to a configuration error..."])),(l()(),i._26(null,["\n "])),(l()(),i._26(null,[" \n "]))],null,null)}function e(l){return i._24(0,[(l()(),i._25(0,null,null,1,"app-connection-error",[],null,null,null,t,p)),i._27(122880,null,0,a.a,[o.a,s.a,c.a],null,null)],function(l,n){l(n,1,0)},null)}var r=u("UYln"),i=u("3j3K"),a=u("FxpQ"),o=u("ATz5"),s=u("+Lwu"),c=u("XLrO");u.d(n,"a",function(){return d});var _=[r.a],p=i._23({encapsulation:0,styles:_,data:{}}),d=i._30("app-connection-error",a.a,e,{},{},[])},RWZN:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},RdYi:function(l,n,u){"use strict";function t(l){return o._24(0,[(l()(),o._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),o._26(null,["",""]))],null,function(l,n){l(n,1,0,n.component._str)})}function e(l){return o._24(0,[(l()(),o._25(0,null,null,3,"button",[["class","w3-button w3-small"],["style","padding: 4px 8px;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!=(e.state._completed=!e.state._completed)&&t}return t},null,null)),o._27(139264,null,0,s.m,[o.v,o.w,o.K,o.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),o._31(["theme-d1","theme-l2","theme-hover"]),(l()(),o._26(null,["",""]))],function(l,n){var u=n.component;l(n,1,0,"w3-button w3-small",l(n,2,0,u.state._completed,!u.state._completed&&u._ready,!u.state._completed&&u._ready))},function(l,n){l(n,3,0,n.component.state._completed?"Completed":"Ready")})}function r(l){return o._24(0,[(l()(),o._28(8388608,null,null,1,null,t)),o._27(8192,null,0,s.l,[o.S,o._5],{ngIf:[0,"ngIf"]},null),(l()(),o._28(8388608,null,null,1,null,e)),o._27(8192,null,0,s.l,[o.S,o._5],{ngIf:[0,"ngIf"]},null)],function(l,n){var u=n.component;l(n,1,0,!u._ready),l(n,3,0,u._ready)},null)}function i(l){return o._24(0,[(l()(),o._25(0,null,null,1,"timer",[],null,null,null,r,p)),o._27(122880,null,0,c.a,[],null,null)],function(l,n){l(n,1,0)},null)}var a=u("SWNH"),o=u("3j3K"),s=u("2Je8"),c=u("CzL3");u.d(n,"b",function(){return p}),n.a=r;var _=[a.a],p=o._23({encapsulation:0,styles:_,data:{}});o._30("timer",c.a,i,{state:"state",time:"time",notification:"notification"},{},[])},RiXa:function(l,n,u){"use strict";var t=u("5oXY"),e=u("ATz5");u.d(n,"a",function(){return r});var r=function(){function l(l,n){this.route=l,this.dataService=n}return l.prototype.ngOnInit=function(){this.steamId=this.route.snapshot.params.playerid,this.dataService.hasFeatureAccess("player","profile",this.steamId)?this.menu.activate("profile"):this.dataService.hasFeatureAccess("player","creatures",this.steamId)?this.menu.activate("creatures"):this.dataService.hasFeatureAccess("player","creatures-cloud",this.steamId)?this.menu.activate("creatures_cloud"):this.dataService.hasFeatureAccess("player","breeding",this.steamId)?this.menu.activate("breeding"):this.dataService.hasFeatureAccess("player","crops",this.steamId)?this.menu.activate("crop_plots"):this.dataService.hasFeatureAccess("player","generators",this.steamId)?this.menu.activate("electrical_generators"):this.dataService.hasFeatureAccess("player","kibbles-eggs",this.steamId)?this.menu.activate("kibbles_and_eggs"):this.dataService.hasFeatureAccess("player","tribelog",this.steamId)&&this.menu.activate("tribelog")},l.ctorParameters=function(){return[{type:t.v},{type:e.a}]},l}()},SQlA:function(l,n,u){"use strict";function t(l){return a._24(0,[(l()(),a._25(0,null,null,1,"i",[["class","material-icons"],["style","margin: -5px 5px -5px -5px; vertical-align: middle;"]],null,null,null,null,null)),(l()(),a._26(null,["check"]))],null,null)}function e(l){return a._24(0,[(l()(),a._25(0,null,null,8,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),a._26(null,["\n "])),(l()(),a._25(0,null,null,5,"button",[["class","w3-button"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.toggleDemoMode()&&t}return t},null,null)),a._27(139264,null,0,s.m,[a.v,a.w,a.K,a.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),a._31(["theme-d1","theme-l2","theme-hover"]),(l()(),a._28(8388608,null,null,1,null,t)),a._27(8192,null,0,s.l,[a.S,a._5],{ngIf:[0,"ngIf"]},null),(l()(),a._26(null,["",""])),(l()(),a._26(null,["\n"]))],function(l,n){var u=n.component;l(n,3,0,"w3-button",l(n,4,0,u.demoMode,!u.demoMode,!u.demoMode)),l(n,6,0,u.demoMode)},function(l,n){l(n,7,0,n.component.demoMode?"Demo Mode Enabled":"Enable Demo Mode")})}function r(l){return a._24(0,[(l()(),a._25(0,null,null,1,"app-developer",[],null,null,null,e,f)),a._27(122880,null,0,o.a,[c.a,_.a,p.a],null,null)],function(l,n){l(n,1,0)},null)}var i=u("7MbP"),a=u("3j3K"),o=u("Fnlp"),s=u("2Je8"),c=u("ATz5"),_=u("+Lwu"),p=u("XLrO");u.d(n,"a",function(){return m});var d=[i.a],f=a._23({encapsulation:0,styles:d,data:{}}),m=a._30("app-developer",o.a,r,{},{},[])},SWNH:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},SWoV:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},UYln:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},XhEa:function(l,n,u){"use strict";function t(l){return i._24(0,[(l()(),i._25(0,null,null,2,"simple-notification",[],null,null,null,a.a,a.b)),i._27(122880,null,0,o.a,[s.a,c.q,i.e],{timeOut:[0,"timeOut"],showProgressBar:[1,"showProgressBar"],pauseOnHover:[2,"pauseOnHover"],clickToClose:[3,"clickToClose"],maxLength:[4,"maxLength"],theClass:[5,"theClass"],rtl:[6,"rtl"],animate:[7,"animate"],position:[8,"position"],item:[9,"item"]},null),(l()(),i._26(null,["\n "]))],function(l,n){var u=n.component;l(n,1,0,u.timeOut,u.showProgressBar,u.pauseOnHover,u.clickToClose,u.maxLength,u.theClass,u.rtl,u.animate,n.context.index,n.context.$implicit)},null)}function e(l){return i._24(0,[(l()(),i._26(null,["\n "])),(l()(),i._25(0,null,null,5,"div",[["class","simple-notification-wrapper"]],null,null,null,null,null)),i._27(139264,null,0,_.m,[i.v,i.w,i.K,i.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(l()(),i._26(null,["\n "])),(l()(),i._28(8388608,null,null,1,null,t)),i._27(401408,null,0,_.n,[i.S,i._5,i.v],{ngForOf:[0,"ngForOf"]},null),(l()(),i._26(null,["\n "])),(l()(),i._26(null,["\n "]))],function(l,n){var u=n.component;l(n,2,0,"simple-notification-wrapper",u.position),l(n,5,0,u.notifications)},null)}function r(l){return i._24(0,[(l()(),i._25(0,null,null,1,"simple-notifications",[],null,null,null,e,f)),i._27(122880,null,0,p.a,[s.a],null,null)],function(l,n){l(n,1,0)},null)}var i=u("3j3K"),a=u("Layn"),o=u("Ev1B"),s=u("XLrO"),c=u("Qbdm"),_=u("2Je8"),p=u("B8cY");u.d(n,"b",function(){return f}),n.a=e;var d=["\n .simple-notification-wrapper {\n position: fixed;\n width: 300px;\n z-index: 1000;\n }\n \n .simple-notification-wrapper.left { left: 20px; }\n .simple-notification-wrapper.top { top: 20px; }\n .simple-notification-wrapper.right { right: 20px; }\n .simple-notification-wrapper.bottom { bottom: 20px; }\n \n @media (max-width: 340px) {\n .simple-notification-wrapper {\n width: auto;\n left: 20px;\n right: 20px;\n }\n }\n "],f=i._23({encapsulation:2,styles:d,data:{}});i._30("simple-notifications",p.a,r,{options:"options"},{onCreate:"onCreate",onDestroy:"onDestroy"},[])},YWx4:function(l,n,u){"use strict";var t=u("5oXY"),e=u("3MNG"),r=u("hHgl"),i=u("ATz5"),a=u("lHWG"),o=u("kZql");u.d(n,"a",function(){return s});var s=function(){function l(l,n,u,t,e){this.dataService=l,this.httpService=n,this.breadcrumbService=u,this.notificationsService=t,this.router=e,this.notificationOptions={position:["top","right"],timeOut:1e3,lastOnBottom:!1},this.showLogin=!1,this.currentUrl="/",this.serversUpdatedBefore=!1,this.loading=!0,u.addFriendlyNameForRoute("/accessdenied","Access Denied"),u.addFriendlyNameForRoute("/connectionerror","Connection error"),u.hideRoute("/player"),u.hideRoute("/servers"),u.hideRoute("/server"),u.hideRoute("/admin"),u.addCallbackForRouteRegex("^/player/.+$",this.getNameForPlayer)}return l.prototype.ngOnInit=function(){var l=this;this.routerEventsSubscription=this.router.events.subscribe(function(n){l.navigationInterceptor(n)}),this.currentUrl=window.location.href||"/",this.serversUpdatedSubscription=this.dataService.ServersUpdated$.subscribe(function(n){l.serversUpdatedBefore||!n||n.User&&n.User.SteamId||(l.showLogin=!0),l.serversUpdatedBefore=!0})},l.prototype.ngOnDestroy=function(){this.routerEventsSubscription.unsubscribe(),this.serversUpdatedSubscription.unsubscribe()},l.prototype.navigationInterceptor=function(l){l instanceof t.A?this.loading=!0:l instanceof t.y?this.loading=!1:l instanceof t.B?this.loading=!1:l instanceof t.C&&(this.loading=!1)},l.prototype.getNameForPlayer=function(l){return"Player"},l.prototype.getTheme=function(){return localStorage.getItem("theme")||"light"},l.prototype.setTheme=function(l){return localStorage.setItem("theme",l),!1},l.prototype.openLogin=function(l){this.showLogin=!0,l.stopPropagation(),l.preventDefault()},l.prototype.closeLogin=function(l){this.showLogin=!1},l.prototype.getLoginUrl=function(){return this.httpService.getApiBaseUrl()+"/authentication/login"},l.prototype.getLogoutUrl=function(){return o.a.demo?"":this.httpService.getApiBaseUrl()+"/authentication/logout?returnUrl="+this.currentUrl},l.ctorParameters=function(){return[{type:i.a},{type:a.a},{type:r.a},{type:e.a},{type:t.g}]},l}()},ZfYc:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},beiT:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=["tr th.orderBy{cursor:pointer}a.w3-button.disabled{color:#a9a9a9}a.w3-button.disabled:hover{color:#a9a9a9!important;background-color:transparent!important;opacity:1!important;cursor:default}"]},coiB:function(l,n,u){"use strict";function t(l){return i._24(0,[(l()(),i._25(0,null,null,11,"div",[["class","w3-sidebar theme-l2"],["id","menu"],["style","min-height: 52px;"]],null,null,null,null,null)),(l()(),i._26(null,[" \n "])),(l()(),i._25(0,null,null,1,"button",[["class","w3-button w3-xlarge w3-display-topright"],["id","menubtn"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.toggleMenu()&&t}return t},null,null)),(l()(),i._26(null,["☰"])),(l()(),i._26(null,["\n "])),(l()(),i._25(0,null,null,5,"section",[["class","w3-container"],["id","menucontent"]],null,null,null,null,null)),i._27(139264,null,0,o.m,[i.v,i.w,i.K,i.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),i._31(["hide"]),(l()(),i._26(null,["\n "])),i._36(null,0),(l()(),i._26(null,["\n "])),(l()(),i._26(null,["\n"]))],function(l,n){l(n,6,0,"w3-container",l(n,7,0,!n.component.menuVisible))},null)}function e(l){return i._24(0,[(l()(),i._25(0,null,null,1,"app-menu",[],null,null,null,t,_)),i._27(122880,null,0,a.a,[s.a],null,null)],function(l,n){l(n,1,0)},null)}var r=u("+SUW"),i=u("3j3K"),a=u("8kYA"),o=u("2Je8"),s=u("ATz5");u.d(n,"b",function(){return _}),n.a=t;var c=[r.a],_=i._23({encapsulation:0,styles:c,data:{}});i._30("app-menu",a.a,e,{},{},["*"])},"e/mT":function(l,n,u){"use strict";var t=u("5oXY"),e=u("3MNG"),r=u("ATz5"),i=u("+Lwu"),a=u("lHWG");u.d(n,"a",function(){return o});var o=function(){function l(l,n,u,t,e,r){this.route=l,this.router=n,this.httpService=u,this.dataService=t,this.messageService=e,this.notificationsService=r,this.menuOption=void 0,this.loaded=!1,this.loadedStructures=!1}return l.prototype.getServer=function(){var l=this;this.httpService.getAdminServer(this.serverKey).then(function(n){l.server=n,l.loaded=!0}).catch(function(n){l.server=null,l.loaded=!0})},l.prototype.getStructures=function(){var l=this;this.httpService.getStructures(this.serverKey).then(function(n){l.structures=n,l.loadedStructures=!0}).catch(function(n){l.structures=void 0,l.loadedStructures=!0})},l.prototype.ngOnInit=function(){var l=this;this.serverKey=this.route.snapshot.params.id,this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){l.menuOption=n,"structures"==l.menuOption&&l.getStructures()}),this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){l.serverKey==n&&(l.updateServer(),l.showServerUpdateNotification(n))}),this.getServer()},l.prototype.ngOnDestroy=function(){this.menuOptionSubscription.unsubscribe(),this.serverUpdatedSubscription.unsubscribe()},l.prototype.getTribeMember=function(l){return this.server.Players.find(function(n){return n.SteamId==l})},l.prototype.updateServer=function(){this.getServer()},l.prototype.showServerUpdateNotification=function(l){this.notificationsService.success("Server Update",l+" was updated; Reloading data...",{showProgressBar:!0,pauseOnHover:!0,clickToClose:!0})},l.prototype.isMenuActive=function(l){return this.menuOption==l},l.ctorParameters=function(){return[{type:t.v},{type:t.g},{type:a.a},{type:r.a},{type:i.a},{type:e.a}]},l}()},fYAd:function(l,n,u){"use strict";function t(l){return y._24(0,[(l()(),y._25(0,null,null,4,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCurrentMode(l.parent.context.$implicit.key)&&t}return t},null,null)),y._27(139264,null,0,b.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["theme-d1"]),y._34(65536,b.q,[y.O]),(l()(),y._26(null,["",""]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.isCurrentMode(n.parent.context.$implicit.key)))},function(l,n){var u=n.component;l(n,0,0,100/y._33(n,0,0,y._29(n,3).transform(u.numEnabledModes))),l(n,4,0,n.parent.context.$implicit.name)})}function e(l){return y._24(0,[(l()(),y._25(0,null,null,5,null,null,null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,2,null,t)),y._27(8192,null,0,b.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),y._34(65536,b.q,[y.O]),(l()(),y._26(null,["\n "]))],function(l,n){l(n,3,0,y._33(n,3,0,y._29(n,4).transform(n.context.$implicit.enabled)))},null)}function r(l){return y._24(0,[(l()(),y._25(0,null,null,4,"div",[["class","w3-bar theme-l2 w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,e)),y._27(401408,null,0,b.n,[y.S,y._5,y.v],{ngForOf:[0,"ngForOf"],ngForTrackBy:[1,"ngForTrackBy"]},null),(l()(),y._26(null,["\n"]))],function(l,n){var u=n.component;l(n,3,0,u._modes,u.trackByKey)},null)}function i(l){return y._24(0,[(l()(),y._26(null,["\n "]))],null,null)}function a(l){return y._24(0,[(l()(),y._28(8388608,null,null,1,null,i)),y._27(270336,null,0,b.s,[y.S],{ngTemplateOutlet:[0,"ngTemplateOutlet"]},null),(l()(),y._28(0,null,null,0))],function(l,n){l(n,1,0,n.parent.parent.context.$implicit.headerTemplate)},null)}function o(l){return y._24(0,[(l()(),y._25(0,null,null,6,"th",[],[[8,"title",0]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.orderBy(l.parent.context.$implicit.key,u)&&t}return t},null,null)),y._27(139264,null,0,b.m,[y.v,y.w,y.K,y.J],{ngClass:[0,"ngClass"]},null),y._31(["orderBy"]),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,a)),y._27(8192,null,0,b.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),(l()(),y._26(null,["\n "]))],function(l,n){l(n,1,0,l(n,2,0,n.parent.context.$implicit.orderBy)),l(n,5,0,n.parent.context.$implicit.headerTemplate)},function(l,n){l(n,0,0,y._38(1,"",n.parent.context.$implicit.title,""))})}function s(l){return y._24(0,[(l()(),y._25(0,null,null,4,null,null,null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,o)),y._27(8192,null,0,b.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),(l()(),y._26(null,["\n "]))],function(l,n){l(n,3,0,n.component.showColumn(n.context.$implicit.key))},null)}function c(l){return y._24(0,[(l()(),y._26(null,["\n "]))],null,null)}function _(l){return y._24(0,[(l()(),y._28(8388608,null,null,2,null,c)),y._27(270336,null,0,b.s,[y.S],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),y._31(["$implicit"]),(l()(),y._28(0,null,null,0))],function(l,n){l(n,1,0,l(n,2,0,n.parent.parent.parent.context.$implicit),n.parent.parent.context.$implicit.cellTemplate)},null)}function p(l){return y._24(0,[(l()(),y._25(0,null,null,4,"td",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,_)),y._27(8192,null,0,b.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),(l()(),y._26(null,["\n "]))],function(l,n){l(n,3,0,n.parent.context.$implicit.cellTemplate)},null)}function d(l){return y._24(0,[(l()(),y._25(0,null,null,4,null,null,null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,p)),y._27(8192,null,0,b.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),(l()(),y._26(null,["\n "]))],function(l,n){l(n,3,0,n.component.showColumn(n.context.$implicit.key))},null)}function f(l){return y._24(0,[(l()(),y._25(0,null,null,4,"tr",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,d)),y._27(401408,null,0,b.n,[y.S,y._5,y.v],{ngForOf:[0,"ngForOf"],ngForTrackBy:[1,"ngForTrackBy"]},null),(l()(),y._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,u._columnTemplates,u.trackByKey)},null)}function m(l){return y._24(0,[(l()(),y._25(0,null,null,3,"option",[],null,null,null,null,null)),y._27(73728,null,0,S.k,[y.K,y.J,[2,S.l]],{value:[0,"value"]},null),y._27(73728,null,0,S.m,[y.K,y.J,[8,null]],{value:[0,"value"]},null),(l()(),y._26(null,["",""]))],function(l,n){l(n,1,0,n.context.$implicit.value),l(n,2,0,n.context.$implicit.value)},function(l,n){l(n,3,0,n.context.$implicit.text)})}function h(l){return y._24(2,[(l()(),y._28(8388608,null,null,2,null,r)),y._27(8192,null,0,b.l,[y.S,y._5],{ngIf:[0,"ngIf"]},null),y._34(65536,b.q,[y.O]),(l()(),y._26(null,["\n"])),(l()(),y._25(0,null,null,21,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,18,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,7,"thead",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,4,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,s)),y._27(401408,null,0,b.n,[y.S,y._5,y.v],{ngForOf:[0,"ngForOf"],ngForTrackBy:[1,"ngForTrackBy"]},null),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,6,"tbody",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,3,null,f)),y._27(401408,null,0,b.n,[y.S,y._5,y.v],{ngForOf:[0,"ngForOf"],ngForTrackBy:[1,"ngForTrackBy"]},null),y._34(65536,b.q,[y.O]),y._34(0,b.t,[]),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n"])),(l()(),y._26(null,["\n"])),(l()(),y._25(0,null,null,59,"div",[["class","w3-cell-row w3-margin-top"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,56,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,53,"table",[["class","w3-responsive w3-right w3-small"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,51,"tbody",[],null,null,null,null,null)),(l()(),y._25(0,null,null,49,"tr",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,32,"td",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,29,"div",[["class","w3-bar w3-border border-theme"]],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,3,"a",[["class","w3-button w3-border-right border-theme"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setFirstPage()&&t}return t},null,null)),y._27(139264,null,0,b.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["disabled"]),(l()(),y._26(null,["«"])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,3,"a",[["class","w3-button device-tiny-show"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setPrevPage()&&t}return t},null,null)),y._27(139264,null,0,b.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["disabled"]),(l()(),y._26(null,["❮"])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,3,"a",[["class","w3-button w3-border-right border-theme device-tiny-hide"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setPrevPage()&&t}return t},null,null)),y._27(139264,null,0,b.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["disabled"]),(l()(),y._26(null,["❮"])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,1,"span",[["class","device-tiny-hide"]],null,null,null,null,null)),(l()(),y._26(null,[" "," - "," of "," "])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,3,"a",[["class","w3-button w3-border-left border-theme w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setLastPage()&&t}return t},null,null)),y._27(139264,null,0,b.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["disabled"]),(l()(),y._26(null,["»"])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,3,"a",[["class","w3-button w3-border-left border-theme w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setNextPage()&&t}return t},null,null)),y._27(139264,null,0,b.m,[y.v,y.w,y.K,y.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),y._31(["disabled"]),(l()(),y._26(null,["❯"])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,12,"td",[],null,null,null,null,null)),(l()(),y._26(null,["\n "])),(l()(),y._25(0,null,null,9,"select",[["class","w3-select w3-border border-theme theme-l1"],["style","max-width: 200px; padding: 12px 5px;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(l,n,u){var t=!0,e=l.component;if("change"===n){t=!1!==y._29(l,73).onChange(u.target.value)&&t}if("blur"===n){t=!1!==y._29(l,73).onTouched()&&t}if("ngModelChange"===n){t=!1!==e.setViewLimit(u)&&t}return t},null,null)),y._27(8192,null,0,S.l,[y.J,y.K],null,null),y._37(512,null,S.g,function(l){return[l]},[S.l]),y._27(335872,null,0,S.h,[[8,null],[8,null],[8,null],[2,S.g]],{model:[0,"model"]},{update:"ngModelChange"}),y._37(1024,null,S.i,null,[S.h]),y._27(8192,null,0,S.j,[S.i],null,null),(l()(),y._26(null,["\n "])),(l()(),y._28(8388608,null,null,1,null,m)),y._27(401408,null,0,b.n,[y.S,y._5,y.v],{ngForOf:[0,"ngForOf"]},null),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n "])),(l()(),y._26(null,["\n"]))],function(l,n){var u=n.component;l(n,1,0,y._33(n,1,0,y._29(n,2).transform(u.numEnabledModes))>1),l(n,13,0,u._columnTemplates,u.trackByKey),l(n,20,0,y._33(n,20,0,y._29(n,22).transform(y._33(n,20,0,y._29(n,21).transform(u._rows$)),u._fromRow,u._fromRow+u._numRows)),u.trackByRow),l(n,41,0,"w3-button w3-border-right border-theme",l(n,42,0,u.isFirstPage())),l(n,46,0,"w3-button device-tiny-show",l(n,47,0,u.isFirstPage())),l(n,51,0,"w3-button w3-border-right border-theme device-tiny-hide",l(n,52,0,u.isFirstPage())),l(n,59,0,"w3-button w3-border-left border-theme w3-right",l(n,60,0,u.isLastPage())),l(n,64,0,"w3-button w3-border-left border-theme w3-right",l(n,65,0,u.isLastPage())),l(n,75,0,u._numRows),l(n,80,0,u._viewOptions)},function(l,n){var u=n.component;l(n,56,0,u._fromRow,u.getLastRowOffset(),u._rows.length),l(n,72,0,y._29(n,77).ngClassUntouched,y._29(n,77).ngClassTouched,y._29(n,77).ngClassPristine,y._29(n,77).ngClassDirty,y._29(n,77).ngClassValid,y._29(n,77).ngClassInvalid,y._29(n,77).ngClassPending)})}function v(l){return y._24(0,[(l()(),y._25(0,null,null,3,"ark-data-table",[],null,null,null,h,C)),y._27(57344,null,2,w.a,[y.O],null,null),y._35(301989888,1,{modeTemplates:1}),y._35(301989888,2,{columnTemplates:1})],function(l,n){l(n,1,0)},null)}var g=u("beiT"),y=u("3j3K"),b=u("2Je8"),S=u("NVOs"),w=u("0jRk");u.d(n,"b",function(){return C}),n.a=h;var k=[g.a],C=y._23({encapsulation:2,styles:k,data:{}});y._30("ark-data-table",w.a,v,{rows:"rows",trackByProp:"trackByProp",sortFunctions:"sortFunctions",orderByColumn:"orderByColumn"},{},[])},h5ac:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},if6N:function(l,n,u){"use strict";function t(l){return c._24(0,[(l()(),c._25(0,null,null,1,"a",[["role","button"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.navigateTo("/")&&t}return t},null,null)),(l()(),c._26(null,["",""]))],null,function(l,n){l(n,1,0,n.parent.context.$implicit)})}function e(l){return c._24(0,[(l()(),c._25(0,null,null,1,"a",[["role","button"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.navigateTo(l.parent.context.$implicit)&&t}return t},null,null)),(l()(),c._26(null,["",""]))],null,function(l,n){l(n,1,0,n.component.friendlyName(n.parent.context.$implicit))})}function r(l){return c._24(0,[(l()(),c._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),c._26(null,["",""]))],null,function(l,n){l(n,1,0,n.component.friendlyName(n.parent.context.$implicit))})}function i(l){return c._24(0,[(l()(),c._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),c._26(null,["",""]))],null,function(l,n){l(n,1,0,n.component.friendlyName("/"))})}function a(l){return c._24(0,[(l()(),c._25(0,null,null,16,"li",[],null,null,null,null,null)),c._27(139264,null,0,_.m,[c.v,c.w,c.K,c.J],{ngClass:[0,"ngClass"]},null),c._31(["breadcrumb-item","active"]),(l()(),c._26(null,[" "])),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,t)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,e)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,r)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,i)),c._27(8192,null,0,_.l,[c.S,c._5],{ngIf:[0,"ngIf"]},null),(l()(),c._26(null,["\n "]))],function(l,n){var u=n.component;l(n,1,0,l(n,2,0,u.useBootstrap,n.context.last)),l(n,6,0,!n.context.last&&n.context.$implicit==u.prefix),l(n,9,0,!n.context.last&&n.context.$implicit!=u.prefix),l(n,12,0,n.context.last),l(n,15,0,n.context.last&&n.context.$implicit==u.prefix)},null)}function o(l){return c._24(0,[(l()(),c._26(null,["\n "])),(l()(),c._25(0,null,null,4,"ul",[],[[2,"breadcrumb",null]],null,null,null,null)),(l()(),c._26(null,["\n "])),(l()(),c._28(8388608,null,null,1,null,a)),c._27(401408,null,0,_.n,[c.S,c._5,c.v],{ngForOf:[0,"ngForOf"]},null),(l()(),c._26(null,["\n "])),(l()(),c._26(null,["\n "]))],function(l,n){l(n,4,0,n.component._urls)},function(l,n){l(n,1,0,n.component.useBootstrap)})}function s(l){return c._24(0,[(l()(),c._25(0,null,null,1,"breadcrumb",[],null,null,null,o,h)),c._27(385024,null,0,p.a,[d.g,f.a],null,null)],function(l,n){l(n,1,0)},null)}var c=u("3j3K"),_=u("2Je8"),p=u("v8ur"),d=u("5oXY"),f=u("aT6V");u.d(n,"b",function(){return h}),n.a=o;var m=[],h=c._23({encapsulation:2,styles:m,data:{}});c._30("breadcrumb",p.a,s,{useBootstrap:"useBootstrap",prefix:"prefix"},{},[])},jWPz:function(l,n,u){"use strict";var t=u("3j3K");u.d(n,"c",function(){return e}),u.d(n,"b",function(){return r}),u.d(n,"a",function(){return i});var e=function(){function l(l){this.template=l}return l.ctorParameters=function(){return[{type:t._5}]},l}(),r=function(){function l(l){this.template=l}return l.ctorParameters=function(){return[{type:t._5}]},l}(),i=function(){function l(){}return l}()},joX7:function(l,n,u){"use strict";var t=u("Gvdl");u.n(t);u.d(n,"a",function(){return e});var e=function(){function l(){this.enabled=t.Observable.of(!0)}return Object.defineProperty(l.prototype,"columnKeys",{set:function(l){this._columnKeys=l,this.ColumnKeys=this._columnKeys.split(",")},enumerable:!0,configurable:!0}),l}()},jxRA:function(l,n,u){"use strict";function t(l){return o._24(0,[(l()(),o._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==o._29(l.parent.parent,2).activate(l.context.$implicit.Key)&&t}return t},null,null)),o._27(139264,null,0,s.m,[o.v,o.w,o.K,o.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),o._31(["theme-d1"]),(l()(),o._26(null,["",""]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,o._29(n.parent.parent,2).active(n.context.$implicit.Key)))},function(l,n){l(n,3,0,n.context.$implicit.Key)})}function e(l){return o._24(0,[(l()(),o._25(0,null,null,4,null,null,null,null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._28(8388608,null,null,1,null,t)),o._27(401408,null,0,s.n,[o.S,o._5,o.v],{ngForOf:[0,"ngForOf"]},null),(l()(),o._26(null,["\n "]))],function(l,n){l(n,3,0,n.component.dataService.Servers.Servers)},null)}function r(l){return o._24(0,[o._35(201326592,1,{menu:0}),(l()(),o._25(0,null,null,16,"app-menu",[],null,null,null,c.a,c.b)),o._27(122880,[[1,4],["menu",4]],0,_.a,[p.a],null,null),(l()(),o._26(0,["\n "])),(l()(),o._25(0,null,0,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),o._26(null,["Servers"])),(l()(),o._26(0,["\n "])),(l()(),o._25(0,null,0,9,"div",[["class","w3-cell-row theme-l2"]],null,null,null,null,null)),(l()(),o._26(null,["\n "])),(l()(),o._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==o._29(l,2).activate("overview")&&t}return t},null,null)),o._27(139264,null,0,s.m,[o.v,o.w,o.K,o.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),o._31(["theme-d1"]),(l()(),o._26(null,["Overview"])),(l()(),o._26(null,["\n "])),(l()(),o._28(8388608,null,null,1,null,e)),o._27(8192,null,0,s.l,[o.S,o._5],{ngIf:[0,"ngIf"]},null),(l()(),o._26(null,["\n "])),(l()(),o._26(0,["\n"]))],function(l,n){var u=n.component;l(n,2,0),l(n,10,0,"w3-button w3-cell w3-mobile",l(n,11,0,o._29(n,2).active("overview"))),l(n,15,0,void 0!=u.dataService.Servers&&u.dataService.hasFeatureAccess("home","serverdetails"))},null)}function i(l){return o._24(0,[(l()(),o._25(0,null,null,1,"app-server-list-menu",[],[[8,"className",0]],null,null,r,m)),o._27(57344,null,0,d.a,[p.a],null,null)],function(l,n){l(n,1,0)},function(l,n){l(n,0,0,o._29(n,1).menu.className)})}var a=u("mjI6"),o=u("3j3K"),s=u("2Je8"),c=u("coiB"),_=u("8kYA"),p=u("ATz5"),d=u("JKTH");u.d(n,"a",function(){return h});var f=[a.a],m=o._23({encapsulation:0,styles:f,data:{}}),h=o._30("app-server-list-menu",d.a,i,{},{},[])},kZql:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t={production:!0,demo:!1,demoDate:null,apiBaseUrl:"//:/api",signalrBaseUrl:"//:/signalr"}},kke6:function(l,n,u){"use strict";var t=u("3j3K"),e=u("Iksp"),r=u("5oXY"),i=u("2Je8"),a=u("ktkS"),o=u("Qbdm"),s=u("NVOs"),c=u("Fzro"),_=u("KN8t"),p=u("zsCj"),d=u("J8nT"),f=u("aT6V"),m=u("XLrO"),h=u("lHWG"),v=u("+Lwu"),g=u("ATz5"),y=u("AcJ7"),b=u("+w0e"),S=u("nuuw"),w=u("ofcV"),k=u("+T68"),C=u("1AkI"),I=u("+KJ1"),x=u("0VGx"),O=u("nMh6"),A=u("jxRA"),T=u("SQlA"),F=u("0ME9"),M=u("OO5M"),L=u("1A80"),P=u("KZxv"),N=u("RiXa"),B=u("qn86"),K=u("7xIs"),j=u("e/mT"),$=u("08Wm"),R=u("JLFQ"),D=u("JKTH"),E=u("Fnlp"),U=u("+qYp"),z=u("FxpQ"),J=u("1GJ2");u.d(n,"a",function(){return X});var G=this&&this.__extends||function(){var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var u in n)n.hasOwnProperty(u)&&(l[u]=n[u])};return function(n,u){function t(){this.constructor=n}l(n,u),n.prototype=null===u?Object.create(u):(t.prototype=u.prototype,new t)}}(),H=function(l){function n(n){return l.call(this,n,[S.a,w.a,k.a,C.a,I.a,x.a,O.a,A.a,T.a,F.a,M.a,L.a],[L.a])||this}return G(n,l),Object.defineProperty(n.prototype,"_LOCALE_ID_29",{get:function(){return null==this.__LOCALE_ID_29&&(this.__LOCALE_ID_29="en-US"),this.__LOCALE_ID_29},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_NgLocalization_30",{get:function(){return null==this.__NgLocalization_30&&(this.__NgLocalization_30=new i.a(this._LOCALE_ID_29)),this.__NgLocalization_30},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_APP_ID_31",{get:function(){return null==this.__APP_ID_31&&(this.__APP_ID_31=t.b()),this.__APP_ID_31},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_IterableDiffers_32",{get:function(){return null==this.__IterableDiffers_32&&(this.__IterableDiffers_32=t.c()),this.__IterableDiffers_32},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_KeyValueDiffers_33",{get:function(){return null==this.__KeyValueDiffers_33&&(this.__KeyValueDiffers_33=t.d()),this.__KeyValueDiffers_33},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_DomSanitizer_34",{get:function(){return null==this.__DomSanitizer_34&&(this.__DomSanitizer_34=new o.b(this.parent.get(o.c))),this.__DomSanitizer_34},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Sanitizer_35",{get:function(){return null==this.__Sanitizer_35&&(this.__Sanitizer_35=this._DomSanitizer_34),this.__Sanitizer_35},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_HAMMER_GESTURE_CONFIG_36",{get:function(){return null==this.__HAMMER_GESTURE_CONFIG_36&&(this.__HAMMER_GESTURE_CONFIG_36=new o.d),this.__HAMMER_GESTURE_CONFIG_36},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_EVENT_MANAGER_PLUGINS_37",{get:function(){return null==this.__EVENT_MANAGER_PLUGINS_37&&(this.__EVENT_MANAGER_PLUGINS_37=[new o.e(this.parent.get(o.c)),new o.f(this.parent.get(o.c)),new o.g(this.parent.get(o.c),this._HAMMER_GESTURE_CONFIG_36)]),this.__EVENT_MANAGER_PLUGINS_37},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_EventManager_38",{get:function(){return null==this.__EventManager_38&&(this.__EventManager_38=new o.h(this._EVENT_MANAGER_PLUGINS_37,this.parent.get(t.e))),this.__EventManager_38},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵDomSharedStylesHost_39",{get:function(){return null==this.__ɵDomSharedStylesHost_39&&(this.__ɵDomSharedStylesHost_39=new o.i(this.parent.get(o.c))),this.__ɵDomSharedStylesHost_39},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵDomRendererFactory2_40",{get:function(){return null==this.__ɵDomRendererFactory2_40&&(this.__ɵDomRendererFactory2_40=new o.j(this._EventManager_38,this._ɵDomSharedStylesHost_39)),this.__ɵDomRendererFactory2_40},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_AnimationDriver_41",{get:function(){return null==this.__AnimationDriver_41&&(this.__AnimationDriver_41=_.a()),this.__AnimationDriver_41},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵAnimationStyleNormalizer_42",{get:function(){return null==this.__ɵAnimationStyleNormalizer_42&&(this.__ɵAnimationStyleNormalizer_42=_.b()),this.__ɵAnimationStyleNormalizer_42},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵAnimationEngine_43",{get:function(){return null==this.__ɵAnimationEngine_43&&(this.__ɵAnimationEngine_43=new _.c(this._AnimationDriver_41,this._ɵAnimationStyleNormalizer_42)),this.__ɵAnimationEngine_43},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_RendererFactory2_44",{get:function(){return null==this.__RendererFactory2_44&&(this.__RendererFactory2_44=_.d(this._ɵDomRendererFactory2_40,this._ɵAnimationEngine_43,this.parent.get(t.e))),this.__RendererFactory2_44},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵSharedStylesHost_45",{get:function(){return null==this.__ɵSharedStylesHost_45&&(this.__ɵSharedStylesHost_45=this._ɵDomSharedStylesHost_39),this.__ɵSharedStylesHost_45},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Testability_46",{get:function(){return null==this.__Testability_46&&(this.__Testability_46=new t.f(this.parent.get(t.e))),this.__Testability_46},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Meta_47",{get:function(){return null==this.__Meta_47&&(this.__Meta_47=new o.k(this.parent.get(o.c))),this.__Meta_47},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Title_48",{get:function(){return null==this.__Title_48&&(this.__Title_48=new o.l(this.parent.get(o.c))),this.__Title_48},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ɵi_49",{get:function(){return null==this.__ɵi_49&&(this.__ɵi_49=new s.a),this.__ɵi_49},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_BrowserXhr_50",{get:function(){return null==this.__BrowserXhr_50&&(this.__BrowserXhr_50=new c.a),this.__BrowserXhr_50},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ResponseOptions_51",{get:function(){return null==this.__ResponseOptions_51&&(this.__ResponseOptions_51=new c.b),this.__ResponseOptions_51},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_XSRFStrategy_52",{get:function(){return null==this.__XSRFStrategy_52&&(this.__XSRFStrategy_52=c.c()),this.__XSRFStrategy_52},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_XHRBackend_53",{get:function(){return null==this.__XHRBackend_53&&(this.__XHRBackend_53=new c.d(this._BrowserXhr_50,this._ResponseOptions_51,this._XSRFStrategy_52)),this.__XHRBackend_53},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_RequestOptions_54",{get:function(){return null==this.__RequestOptions_54&&(this.__RequestOptions_54=new c.e),this.__RequestOptions_54},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Http_55",{get:function(){return null==this.__Http_55&&(this.__Http_55=c.f(this._XHRBackend_53,this._RequestOptions_54)),this.__Http_55},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ActivatedRoute_56",{get:function(){return null==this.__ActivatedRoute_56&&(this.__ActivatedRoute_56=r.a(this._Router_16)),this.__ActivatedRoute_56},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_NoPreloading_57",{get:function(){return null==this.__NoPreloading_57&&(this.__NoPreloading_57=new r.b),this.__NoPreloading_57},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_PreloadingStrategy_58",{get:function(){return null==this.__PreloadingStrategy_58&&(this.__PreloadingStrategy_58=this._NoPreloading_57),this.__PreloadingStrategy_58},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_RouterPreloader_59",{get:function(){return null==this.__RouterPreloader_59&&(this.__RouterPreloader_59=new r.c(this._Router_16,this._NgModuleFactoryLoader_14,this._Compiler_13,this,this._PreloadingStrategy_58)),this.__RouterPreloader_59},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_PreloadAllModules_60",{get:function(){return null==this.__PreloadAllModules_60&&(this.__PreloadAllModules_60=new r.d),this.__PreloadAllModules_60},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ROUTER_INITIALIZER_61",{get:function(){return null==this.__ROUTER_INITIALIZER_61&&(this.__ROUTER_INITIALIZER_61=r.e(this._ɵg_3)),this.__ROUTER_INITIALIZER_61},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_APP_BOOTSTRAP_LISTENER_62",{get:function(){return null==this.__APP_BOOTSTRAP_LISTENER_62&&(this.__APP_BOOTSTRAP_LISTENER_62=[this._ROUTER_INITIALIZER_61]),this.__APP_BOOTSTRAP_LISTENER_62},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_BreadcrumbService_63",{get:function(){return null==this.__BreadcrumbService_63&&(this.__BreadcrumbService_63=new f.a),this.__BreadcrumbService_63},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_NotificationsService_64",{get:function(){return null==this.__NotificationsService_64&&(this.__NotificationsService_64=new m.a),this.__NotificationsService_64},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_HttpService_65",{get:function(){return null==this.__HttpService_65&&(this.__HttpService_65=new h.a(this._Http_55)),this.__HttpService_65},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_MessageService_66",{get:function(){return null==this.__MessageService_66&&(this.__MessageService_66=new v.a(this.parent.get(t.e))),this.__MessageService_66},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_DataService_67",{get:function(){return null==this.__DataService_67&&(this.__DataService_67=new g.a(this._HttpService_65,this._MessageService_66)),this.__DataService_67},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_DataServiceResolver_68",{get:function(){return null==this.__DataServiceResolver_68&&(this.__DataServiceResolver_68=new y.a(this._DataService_67,this._Router_16)),this.__DataServiceResolver_68},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_AccessControlRouteGuardService_69",{get:function(){return null==this.__AccessControlRouteGuardService_69&&(this.__AccessControlRouteGuardService_69=new b.a(this._DataService_67,this._Router_16)),this.__AccessControlRouteGuardService_69},enumerable:!0,configurable:!0}),n.prototype.createInternal=function(){return this._ɵa_0=r.f(this.parent.get(r.g,null)),this._ErrorHandler_1=o.m(),this._NgProbeToken_2=[r.h()],this._ɵg_3=new r.i(this),this._APP_INITIALIZER_4=[t.g,o.n(this.parent.get(o.o,null),this._NgProbeToken_2),r.j(this._ɵg_3)],this._ApplicationInitStatus_5=new t.h(this._APP_INITIALIZER_4),this._ɵf_6=new t.i(this.parent.get(t.e),this.parent.get(t.j),this,this._ErrorHandler_1,this.componentFactoryResolver,this._ApplicationInitStatus_5),this._ApplicationRef_7=this._ɵf_6,this._UrlSerializer_8=new r.k,this._RouterOutletMap_9=new r.l,this._ROUTER_CONFIGURATION_10={},this._LocationStrategy_11=r.m(this.parent.get(i.b),this.parent.get(i.c,null),this._ROUTER_CONFIGURATION_10),this._Location_12=new i.d(this._LocationStrategy_11),this._Compiler_13=new t.k,this._NgModuleFactoryLoader_14=new t.l(this._Compiler_13,this.parent.get(t.m,null)),this._ROUTES_15=[[{path:"player/:playerid",canActivate:[b.a],data:{name:"player"},children:[{path:"",component:P.a},{path:"",component:N.a,outlet:"menu"}]},{path:"server/:id",canActivate:[b.a],data:{name:"server"},children:[{path:"",component:B.a},{path:"",component:K.a,outlet:"menu"}]},{path:"admin/:id",canActivate:[b.a],data:{name:"admin-server"},children:[{path:"",component:j.a},{path:"",component:$.a,outlet:"menu"}]},{path:"servers",canActivate:[b.a],data:{name:"home"},children:[{path:"",component:R.a},{path:"",component:D.a,outlet:"menu"}]},{path:"developer",component:E.a},{path:"accessdenied",component:U.a},{path:"connectionerror",component:z.a},{path:"",redirectTo:"/servers",pathMatch:"full"}]],this._Router_16=r.n(this._ApplicationRef_7,this._UrlSerializer_8,this._RouterOutletMap_9,this._Location_12,this,this._NgModuleFactoryLoader_14,this._Compiler_13,this._ROUTES_15,this._ROUTER_CONFIGURATION_10,this.parent.get(r.o,null),this.parent.get(r.p,null)),this._RouterModule_17=new r.q(this._ɵa_0,this._Router_16),this._CommonModule_18=new i.e,this._Ng2BreadcrumbModule_19=new a.a,this._ApplicationModule_20=new t.n(this._ApplicationRef_7),this._BrowserModule_21=new o.p(this.parent.get(o.p,null)),this._ɵba_22=new s.b,this._FormsModule_23=new s.c,this._HttpModule_24=new c.g,this._BrowserAnimationsModule_25=new _.e,this._SimpleNotificationsModule_26=new p.SimpleNotificationsModule,this._DataTableModule_27=new d.a,this._AppModule_28=new e.a,this._AppModule_28},n.prototype.getInternal=function(l,n){return l===r.r?this._ɵa_0:l===t.o?this._ErrorHandler_1:l===t.p?this._NgProbeToken_2:l===r.i?this._ɵg_3:l===t.q?this._APP_INITIALIZER_4:l===t.h?this._ApplicationInitStatus_5:l===t.i?this._ɵf_6:l===t.r?this._ApplicationRef_7:l===r.s?this._UrlSerializer_8:l===r.l?this._RouterOutletMap_9:l===r.t?this._ROUTER_CONFIGURATION_10:l===i.f?this._LocationStrategy_11:l===i.d?this._Location_12:l===t.k?this._Compiler_13:l===t.s?this._NgModuleFactoryLoader_14:l===r.u?this._ROUTES_15:l===r.g?this._Router_16:l===r.q?this._RouterModule_17:l===i.e?this._CommonModule_18:l===a.a?this._Ng2BreadcrumbModule_19:l===t.n?this._ApplicationModule_20:l===o.p?this._BrowserModule_21:l===s.b?this._ɵba_22:l===s.c?this._FormsModule_23:l===c.g?this._HttpModule_24:l===_.e?this._BrowserAnimationsModule_25:l===p.SimpleNotificationsModule?this._SimpleNotificationsModule_26:l===d.a?this._DataTableModule_27:l===e.a?this._AppModule_28:l===t.t?this._LOCALE_ID_29:l===i.g?this._NgLocalization_30:l===t.u?this._APP_ID_31:l===t.v?this._IterableDiffers_32:l===t.w?this._KeyValueDiffers_33:l===o.q?this._DomSanitizer_34:l===t.x?this._Sanitizer_35:l===o.r?this._HAMMER_GESTURE_CONFIG_36:l===o.s?this._EVENT_MANAGER_PLUGINS_37:l===o.h?this._EventManager_38:l===o.i?this._ɵDomSharedStylesHost_39:l===o.j?this._ɵDomRendererFactory2_40:l===J.a?this._AnimationDriver_41:l===J.b?this._ɵAnimationStyleNormalizer_42:l===J.c?this._ɵAnimationEngine_43:l===t.y?this._RendererFactory2_44:l===o.t?this._ɵSharedStylesHost_45:l===t.f?this._Testability_46:l===o.k?this._Meta_47:l===o.l?this._Title_48:l===s.a?this._ɵi_49:l===c.a?this._BrowserXhr_50:l===c.h?this._ResponseOptions_51:l===c.i?this._XSRFStrategy_52:l===c.d?this._XHRBackend_53:l===c.j?this._RequestOptions_54:l===c.k?this._Http_55:l===r.v?this._ActivatedRoute_56:l===r.b?this._NoPreloading_57:l===r.w?this._PreloadingStrategy_58:l===r.c?this._RouterPreloader_59:l===r.d?this._PreloadAllModules_60:l===r.x?this._ROUTER_INITIALIZER_61:l===t.z?this._APP_BOOTSTRAP_LISTENER_62:l===f.a?this._BreadcrumbService_63:l===m.a?this._NotificationsService_64:l===h.a?this._HttpService_65:l===v.a?this._MessageService_66:l===g.a?this._DataService_67:l===y.a?this._DataServiceResolver_68:l===b.a?this._AccessControlRouteGuardService_69:n},n.prototype.destroyInternal=function(){this._ɵf_6.ngOnDestroy(),this.__ɵDomSharedStylesHost_39&&this._ɵDomSharedStylesHost_39.ngOnDestroy(),this.__RouterPreloader_59&&this._RouterPreloader_59.ngOnDestroy()},n}(t.A),X=new t.B(H,e.a)},l3s9:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},lCrv:function(l,n,u){"use strict";var t=u("3j3K"),e=u("Gvdl"),r=(u.n(e),u("ATz5")),i=u("lHWG"),a=u("kZql"),o=u("f4AQ"),s=(u.n(o),u("PJh5"));u.n(s);u.d(n,"a",function(){return c});var c=function(){function l(l,n,u){this.dataService=l,this.httpService=n,this.zone=u,this._structures=new e.BehaviorSubject(void 0),this.keysGetter=Object.keys,this.ownerSortField="locations",this.ownerSortFunctions={locations:function(l,n){return l.AreaCount>n.AreaCount?-1:l.AreaCountn.StructureCount?-1:l.StructureCountn.StructureCount?-1:l.StructureCountn.LastActiveTime||void 0==n.LastActiveTime?1:0}},this.width=1024,this.height=1024,this.zoom=o.zoom().scaleExtent([1,8])}return Object.defineProperty(l.prototype,"structures",{get:function(){return this._structures.getValue()},set:function(l){this._structures.next(l)},enumerable:!0,configurable:!0}),l.prototype.ngOnInit=function(){var l=this;this._structuresSubscription=this._structures.subscribe(function(n){return l.update(n)});var n=this.mapContainer.nativeElement;this.map={},this.map.canvas=o.select(n).append("canvas").attr("width",1024).attr("height",1024).node().getContext("2d"),this.map.svg=o.select(n).append("svg").attr("viewBox","0 0 1024 1024").attr("preserveAspectRatio","xMidYMid").append("g").on("contextmenu",function(l,n){o.event.preventDefault()}),this.map.svg.append("rect").attr("class","overlay").attr("width",1024).attr("height",1024),this.map.x=o.scaleLinear().domain([0,1024]).range([0,1024]),this.map.y=o.scaleLinear().domain([0,1024]).range([0,1024]),o.select(n).call(this.zoom.on("zoom",function(){l.hideContextMenu(),l.redraw()})).on("wheel.zoom",null),this.structures&&this.updateMap()},l.prototype.ngOnDestroy=function(){this._structuresSubscription.unsubscribe()},l.prototype.zoomIn=function(){this.zoom.scaleBy(o.select(this.mapContainer.nativeElement),1.2)},l.prototype.zoomOut=function(){this.zoom.scaleBy(o.select(this.mapContainer.nativeElement),.8)},l.prototype.updateSelection=function(){var l=this;this.map.svg.circle.attr("display",function(n){var u=l.structures.Owners[n.OwnerId];return n.Removed||u.Removed||l.selectedOwner&&(!l.selectedOwner||l.selectedOwner.Id!=n.OwnerId)?"none":"block"}),this.redraw()},l.prototype.update=function(l){this.sortOwners(l),this.map&&this.updateMap()},l.prototype.sortOwners=function(l){var n=this.ownerSortFunctions[this.ownerSortField];if(l){var u=l.Owners.slice();u.sort(n),this.ownersSorted=u}else this.ownersSorted=void 0},l.prototype.updateMap=function(){var l=this;this.map.svg.nodes=this.structures.Areas,this.map.svg.draw=function(){l.map.svg.circle=l.map.svg.selectAll("circle").data(l.map.svg.nodes).enter().append("circle").attr("r",function(l){return l.RadiusPx<2?2:l.RadiusPx}).attr("fill","transparent").attr("stroke",function(n){var u=l.structures.Owners[n.OwnerId];return!!u.LastActiveTime&&s(new Date(u.LastActiveTime)).isSameOrAfter(s().subtract(28,"day"))&&(n.StructureCount>=100||n.TrashQuota<.5&&n.StructureCount>=10)?"magenta":"red"}).attr("stroke-width",function(n){var u=l.structures.Owners[n.OwnerId];return!!u.LastActiveTime&&s(new Date(u.LastActiveTime)).isSameOrAfter(s().subtract(28,"day"))&&(n.StructureCount>=100||n.TrashQuota<.5&&n.StructureCount>=10)?3:2}).attr("transform",l.map.svg.transform),l.map.svg.circle.on("click",function(n){o.event.preventDefault();var u={};u.x=o.event.pageX,u.y=o.event.pageY,l.showAreaModal(n,u)}),l.map.svg.circle.append("svg:title").text(function(n){var u=l.structures.Owners[n.OwnerId],t=u.LastActiveTime?s(new Date(u.LastActiveTime)).fromNow():null;return u.Name+": "+n.StructureCount+" structures\nCoords: "+n.Latitude+", "+n.Longitude+"\n"+(t?"Last active: "+t+"\n":"")+"---\n"+n.Structures.map(function(n){var u=l.structures.Types[n.t];return n.c+": "+(u?u.Name:n.t)}).join("\n")})},this.map.svg.draw(),this.map.svg.transform=function(n){return"translate("+l.map.x(n.TopoMapX)+","+l.map.y(n.TopoMapY)+")"},this.map.svg.circle.attr("transform",this.map.svg.transform)},l.prototype.imageLoaded=function(l){var n=this;this.img=l,this.width=l?l.naturalWidth:1024,this.height=l?l.naturalHeight:1024,window.setTimeout(function(){n.resize(),n.redraw()},100)},l.prototype.resize=function(){},l.prototype.redraw=function(){var l=this,n=o.zoomTransform(this.mapContainer.nativeElement);this.map.svg.attr("transform","translate("+n.x+","+n.y+") scale("+n.k+")"),n.k!=this.prevTransformK&&this.map.svg.circle.attr("stroke-width",function(u){var t=l.structures.Owners[u.OwnerId];return(!!t.LastActiveTime&&s(new Date(t.LastActiveTime)).isSameOrAfter(s().subtract(28,"day"))&&(u.StructureCount>=100||u.TrashQuota<.5&&u.StructureCount>=10)?3:2)/n.k});var u=this.map.canvas;u.setTransform(1,0,0,1,0,0),u.clearRect(0,0,1024,1024),u.translate(n.x,n.y),u.scale(n.k,n.k),this.img&&u.drawImage(this.img,0,0),this.prevTransformK=n.k},l.prototype.ngOnChanges=function(l){var n=this;if(null!=this.mapName){var u=new Image;u.onload=function(){return n.imageLoaded(u)},u.onerror=function(){return n.imageLoaded(void 0)},u.src=a.a.demo?"assets/demo/Ragnarok.jpg":this.getApiBaseUrl()+"/map/"+this.mapName,u.complete&&(u.onload=null,u.onerror=null,this.imageLoaded(u))}},l.prototype.getApiBaseUrl=function(){return a.a.apiBaseUrl.replace(/\/gi,window.location.protocol).replace(/\/gi,window.location.hostname).replace(/\/gi,void 0!=config?config.webapi.port:"")},l.prototype.reset=function(){this.selectedOwner=void 0,this.updateSelection()},l.prototype.setSelectedOwner=function(l){this.selectedOwner=l,this.updateSelection()},l.prototype.setOwnerSort=function(l){this.ownerSortField=l,this.sortOwners(this.structures)},l.prototype.showAreaModal=function(l,n){this.currentArea=l,this.currentOwner=this.structures.Owners[l.OwnerId],o.select(this.contextMenu.nativeElement).style("display","block"),o.event&&o.event.stopPropagation()},l.prototype.showOwnerModal=function(l,n){this.currentOwner=n,o.select(this.contextMenu.nativeElement).style("display","block"),l.stopPropagation()},l.prototype.showInfoModal=function(l,n){var u={};u.Header=l,u.Message=n,this.modalInfo=u,o.select(this.contextMenu.nativeElement).style("display","block"),o.event&&o.event.stopPropagation()},l.prototype.hideContextMenu=function(){o.select(this.contextMenu.nativeElement).style("display","none"),this.currentArea=void 0,this.currentOwner=void 0,this.modalInfo=void 0},l.prototype.destroyCurrentArea=function(l){var n=this;this.httpService.adminDestroyStructuresForTeamIdAtPosition(this.serverKey,this.currentOwner.OwnerId,this.currentArea.X,this.currentArea.Y,+this.currentArea.RadiusUu+1e3,1).then(function(l){n.currentArea.Removed=!0,n.currentOwner.AreaCount-=1,n.currentOwner.StructureCount-=n.currentArea.StructureCount,n.hideContextMenu(),n.showInfoModal("Action Successfull!",l.Message),n.updateSelection()}).catch(function(l){n.hideContextMenu();var u=l&&l._body?JSON.parse(l._body):void 0;n.showInfoModal("Action Failed...",u?u.Message:l.statusText)})},l.prototype.destroyAllStructuresForTeam=function(l){var n=this;this.httpService.adminDestroyAllStructuresForTeamId(this.serverKey,this.currentOwner.OwnerId).then(function(l){n.currentOwner.Removed=!0,n.currentOwner.AreaCount=0,n.currentOwner.StructureCount=0,n.hideContextMenu(),n.showInfoModal("Action Successfull!",l.Message),n.updateSelection()}).catch(function(l){n.hideContextMenu();var u=l&&l._body?JSON.parse(l._body):void 0;n.showInfoModal("Action Failed...",u?u.Message:l.statusText)})},l.prototype.destroyDinosForTeam=function(l){var n=this;this.httpService.adminDestroyDinosForTeamId(this.serverKey,this.currentOwner.OwnerId).then(function(l){n.currentOwner.CreatureCount=0,n.hideContextMenu(),n.showInfoModal("Action Successfull!",l.Message),n.updateSelection()}).catch(function(l){n.hideContextMenu();var u=l&&l._body?JSON.parse(l._body):void 0;n.showInfoModal("Action Failed...",u?u.Message:l.statusText)})},l.prototype.saveWorld=function(l){var n=this;this.httpService.adminSaveWorld(this.serverKey).then(function(l){n.hideContextMenu(),n.showInfoModal("Action Successfull!",l.Message)}).catch(function(l){n.hideContextMenu();var u=l&&l._body?JSON.parse(l._body):void 0;n.showInfoModal("Action Failed...",u?u.Message:l.statusText)})},l.ctorParameters=function(){return[{type:r.a},{type:i.a},{type:t.e}]},l}()},lHWG:function(l,n,u){"use strict";var t=u("Fzro"),e=u("eErF"),r=(u.n(e),u("kZql"));u.d(n,"a",function(){return i});var i=function(){function l(l){this.http=l,this.headers=new t.l({"Content-Type":"application/json"}),this.serversUrl="/servers",this.serverUrl="/server",this.wildCreaturesUrl="/wildcreatures",this.structuresUrl="/structures",this.adminServerUrl="/adminserver",this.administerUrl="/administer",this.playerUrl="/player"}return l.prototype.getOptions=function(){var l="true"==localStorage.getItem("demoMode"),n=new t.j({withCredentials:!0});return l&&(n.headers||(n.headers=new t.l),n.headers.append("demoMode","true")),n},l.prototype.getServers=function(){return this.http.get(""+this.getApiBaseUrl()+this.serversUrl+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getServer=function(l){return this.http.get(""+this.getApiBaseUrl()+this.serverUrl+"/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getWildCreatures=function(l){return this.http.get(""+this.getApiBaseUrl()+this.wildCreaturesUrl+"/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getStructures=function(l){return this.http.get(""+this.getApiBaseUrl()+this.structuresUrl+"/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getPlayer=function(l){return this.http.get(""+this.getApiBaseUrl()+this.playerUrl+"/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getAdminServer=function(l){return this.http.get(""+this.getApiBaseUrl()+this.adminServerUrl+"/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.adminDestroyAllStructuresForTeamId=function(l,n){return this.http.get(""+this.getApiBaseUrl()+this.administerUrl+"/DestroyAllStructuresForTeamId/"+l+"?teamId="+n+"&t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.adminDestroyStructuresForTeamIdAtPosition=function(l,n,u,t,e,r){return this.http.get(""+this.getApiBaseUrl()+this.administerUrl+"/DestroyStructuresForTeamIdAtPosition/"+l+"?teamId="+n+"&x="+u+"&y="+t+"&radius="+e+"&rafts="+r+"&t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.adminDestroyDinosForTeamId=function(l,n){return this.http.get(""+this.getApiBaseUrl()+this.administerUrl+"/DestroyDinosForTeamId/"+l+"?teamId="+n+"&t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.adminSaveWorld=function(l){return this.http.get(""+this.getApiBaseUrl()+this.administerUrl+"/SaveWorld/"+l+"?t="+ +new Date,this.getOptions()).toPromise().then(function(l){return l.json()}).catch(this.handleError)},l.prototype.getApiBaseUrl=function(){return r.a.apiBaseUrl.replace(/\/gi,window.location.protocol).replace(/\/gi,window.location.hostname).replace(/\/gi,void 0!=config?config.webapi.port:"")},l.prototype.handleError=function(l){return Promise.reject(l.message||l)},l.ctorParameters=function(){return[{type:t.k}]},l}()},mjI6:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},nJHW:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=[""]},nMh6:function(l,n,u){"use strict";function t(l){return F._24(0,[(l()(),F._25(0,null,null,24,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"h3",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["My Profile"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,18,"div",[["class","w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,4,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),F._26(null,["Hello, ",""])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,9,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),F._26(null,["\n Find your tames, view base stats and keep track of their food status. Get notified of pending imprints, the amount of fertilizer and gasoline remaining in your crops and generators. This and much more is available in your profile.\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,3,"p",[],null,null,null,null,null)),(l()(),F._25(0,null,null,2,"a",[["class",""],["style","text-decoration: none;"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==F._29(l,20).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),F._27(335872,null,0,M.D,[M.g,M.v,L.f],{routerLink:[0,"routerLink"]},null),(l()(),F._26(null,["View my profile ❯"])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n"]))],function(l,n){l(n,20,0,"/player/"+n.component.dataService.UserSteamId)},function(l,n){l(n,10,0,n.component.dataService.Servers.User.Name),l(n,19,0,F._29(n,20).target,F._29(n,20).href)})}function e(l){return F._24(0,[(l()(),F._25(0,null,null,1,null,null,null,null,null,null,null)),(l()(),F._26(null,[""," - "]))],null,function(l,n){l(n,1,0,n.parent.parent.context.$implicit.MapName)})}function r(l){return F._24(0,[(l()(),F._25(0,null,null,4,"a",[["style","text-decoration: none;"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==F._29(l,1).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),F._27(335872,null,0,M.D,[M.g,M.v,L.f],{routerLink:[0,"routerLink"]},null),(l()(),F._28(8388608,null,null,1,null,e)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"]},null),(l()(),F._26(null,["",""]))],function(l,n){l(n,1,0,"/server/"+n.parent.context.$implicit.Key),l(n,3,0,n.parent.context.$implicit.MapName)},function(l,n){l(n,0,0,F._29(n,1).target,F._29(n,1).href),l(n,4,0,n.parent.context.$implicit.Key)})}function i(l){return F._24(0,[(l()(),F._25(0,null,null,1,null,null,null,null,null,null,null)),(l()(),F._26(null,[""," - "]))],null,function(l,n){l(n,1,0,n.parent.parent.context.$implicit.MapName)})}function a(l){return F._24(0,[(l()(),F._28(8388608,null,null,1,null,i)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"]},null),(l()(),F._26(null,["",""]))],function(l,n){l(n,1,0,n.parent.context.$implicit.MapName)},function(l,n){l(n,2,0,n.parent.context.$implicit.Key)})}function o(l){return F._24(0,[(l()(),F._25(0,null,null,3,"p",[],null,null,null,null,null)),(l()(),F._25(0,null,null,2,"a",[["class",""],["style","text-decoration: none;"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==F._29(l,2).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),F._27(335872,null,0,M.D,[M.g,M.v,L.f],{routerLink:[0,"routerLink"]},null),(l()(),F._26(null,["View server ❯"]))],function(l,n){l(n,2,0,"/server/"+n.parent.context.$implicit.Key)},function(l,n){l(n,1,0,F._29(n,2).target,F._29(n,2).href)})}function s(l){return F._24(0,[(l()(),F._25(0,null,null,3,"p",[],null,null,null,null,null)),(l()(),F._25(0,null,null,2,"a",[["class",""],["style","text-decoration: none;"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==F._29(l,2).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),F._27(335872,null,0,M.D,[M.g,M.v,L.f],{routerLink:[0,"routerLink"]},null),(l()(),F._26(null,["Admin ❯"]))],function(l,n){l(n,2,0,"/admin/"+n.parent.context.$implicit.Key)},function(l,n){l(n,1,0,F._29(n,2).target,F._29(n,2).href)})}function c(l){return F._24(0,[(l()(),F._25(0,null,null,21,"div",[["class","w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,6,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,3,"h3",[],null,null,null,null,null)),(l()(),F._28(8388608,null,null,1,null,r)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),(l()(),F._28(0,[["server_no_link",2]],null,0,null,a)),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,10,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"p",[["class","w3-small"]],null,null,null,null,null)),(l()(),F._26(null,["\n Last Update ",", Next Update ","\n "])),(l()(),F._26(null,["\n "])),(l()(),F._28(8388608,null,null,1,null,o)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"]},null),(l()(),F._26(null,["\n "])),(l()(),F._28(8388608,null,null,1,null,s)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"]},null),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "]))],function(l,n){var u=n.component;l(n,6,0,u.dataService.hasFeatureAccess("pages","server"),F._29(n,7)),l(n,16,0,u.dataService.hasFeatureAccess("pages","server")),l(n,19,0,u.dataService.hasFeatureAccess("pages","admin-server"))},function(l,n){l(n,13,0,n.context.$implicit.LastUpdate,n.context.$implicit.NextUpdate||"-")})}function _(l){return F._24(0,[(l()(),F._25(0,null,null,7,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"h3",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Servers"])),(l()(),F._26(null,["\n "])),(l()(),F._28(8388608,null,null,1,null,c)),F._27(401408,null,0,L.n,[F.S,F._5,F.v],{ngForOf:[0,"ngForOf"]},null),(l()(),F._26(null,["\n"]))],function(l,n){l(n,6,0,n.component.dataService.Servers.Servers)},null)}function p(l){return F._24(0,[(l()(),F._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),F._26(null,["There are no players online..."]))],null,null)}function d(l){return F._24(0,[(l()(),F._25(0,null,null,19,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.SteamName),l(n,6,0,n.context.$implicit.CharacterName),l(n,9,0,n.context.$implicit.TribeName),l(n,12,0,n.context.$implicit.DiscordName),l(n,15,0,n.parent.context.$implicit.Key),l(n,18,0,n.context.$implicit.TimeOnline)})}function f(l){return F._24(0,[(l()(),F._25(0,null,null,4,null,null,null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._28(8388608,null,null,1,null,d)),F._27(401408,null,0,L.n,[F.S,F._5,F.v],{ngForOf:[0,"ngForOf"]},null),(l()(),F._26(null,["\n "]))],function(l,n){l(n,3,0,n.context.$implicit.OnlinePlayers)},null)}function m(l){return F._24(0,[(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,29,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,26,"table",[["class","w3-table w3-striped w3-bordered border-theme"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,24,"tbody",[],null,null,null,null,null)),(l()(),F._25(0,null,null,19,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),F._26(null,["Steam Name"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),F._26(null,["Character Name"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),F._26(null,["Tribe Name"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),F._26(null,["Discord Tag"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),F._26(null,["Server"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),F._26(null,["Time Online"])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._28(8388608,null,null,1,null,f)),F._27(401408,null,0,L.n,[F.S,F._5,F.v],{ngForOf:[0,"ngForOf"]},null),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "]))],function(l,n){l(n,28,0,n.component.dataService.Servers.Servers)},null)}function h(l){return F._24(0,[(l()(),F._25(0,null,null,11,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,3,"h3",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Online "])),(l()(),F._25(0,null,null,1,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._28(8388608,null,null,1,null,p)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),(l()(),F._26(null,["\n "])),(l()(),F._28(0,[["online_players_list",2]],null,0,null,m)),(l()(),F._26(null,["\n"]))],function(l,n){l(n,8,0,0==n.component.onlinePlayerCount,F._29(n,10))},function(l,n){l(n,5,0,n.component.onlinePlayerCount)})}function v(l){return F._24(0,[(l()(),F._25(0,null,null,2,"a",[["style","text-decoration: none;"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==F._29(l,1).onClick(u.button,u.ctrlKey,u.metaKey)&&t}return t},null,null)),F._27(335872,null,0,M.D,[M.g,M.v,L.f],{routerLink:[0,"routerLink"]},null),(l()(),F._26(null,["",""]))],function(l,n){l(n,1,0,"/server/"+n.parent.parent.context.$implicit.Key)},function(l,n){l(n,0,0,F._29(n,1).target,F._29(n,1).href),l(n,2,0,n.parent.parent.context.$implicit.Name)})}function g(l){return F._24(0,[(l()(),F._26(null,["",""]))],null,function(l,n){l(n,0,0,n.parent.parent.context.$implicit.Name)})}function y(l){return F._24(0,[(l()(),F._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),F._26(null,["There are no players online..."]))],null,null)}function b(l){return F._24(0,[(l()(),F._25(0,null,null,16,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.SteamName),l(n,6,0,n.context.$implicit.CharacterName),l(n,9,0,n.context.$implicit.TribeName),l(n,12,0,n.context.$implicit.DiscordName),l(n,15,0,n.context.$implicit.TimeOnline)})}function S(l){return F._24(0,[(l()(),F._25(0,null,null,23,"table",[["class","w3-table w3-striped w3-bordered border-theme"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,21,"tbody",[],null,null,null,null,null)),(l()(),F._25(0,null,null,16,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),F._26(null,["Steam Name"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),F._26(null,["Character Name"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),F._26(null,["Tribe Name"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),F._26(null,["Discord Tag"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),F._26(null,["Time Online"])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._28(8388608,null,null,1,null,b)),F._27(401408,null,0,L.n,[F.S,F._5,F.v],{ngForOf:[0,"ngForOf"]},null),(l()(),F._26(null,["\n "]))],function(l,n){l(n,22,0,n.parent.parent.parent.parent.context.$implicit.OnlinePlayers)},null)}function w(l){return F._24(0,[(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,4,"div",[["class","w3-card-4 w3-responsive w3-margin-bottom"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._28(8388608,null,null,1,null,S)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"]},null),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "]))],function(l,n){l(n,4,0,n.component.isMenuActive(n.parent.parent.parent.context.$implicit.Key))},null)}function k(l){return F._24(0,[(l()(),F._25(0,null,null,11,null,null,null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,3,"h3",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Online "])),(l()(),F._25(0,null,null,1,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._28(8388608,null,null,1,null,y)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),(l()(),F._26(null,["\n "])),(l()(),F._28(0,[["server_online_players_list",2]],null,0,null,w)),(l()(),F._26(null,["\n "]))],function(l,n){l(n,8,0,0==n.parent.parent.context.$implicit.OnlinePlayerCount,F._29(n,10))},function(l,n){l(n,5,0,n.parent.parent.context.$implicit.OnlinePlayerCount)})}function C(l){return F._24(0,[(l()(),F._25(0,null,null,155,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,148,"div",[["class","w3-card-4 w3-responsive w3-margin-bottom"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,6,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,3,"h3",[],null,null,null,null,null)),(l()(),F._28(8388608,null,null,1,null,v)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),(l()(),F._28(0,[["serverdetails_no_link",2]],null,0,null,g)),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,137,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,134,"table",[["class","w3-table w3-bordered w3-small border-theme serverdetails"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,132,"tbody",[],null,null,null,null,null)),(l()(),F._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Address"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[["style","width: max-content;"]],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Version"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Player Slots"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Map"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["In-Game Day"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Tamed Creatures"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),F._32(1),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Cloud Creatures"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),F._32(1),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Wild Creatures"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),F._32(1),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Structures"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),F._32(1),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Players"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),F._32(1),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,8,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Tribes"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),F._32(1),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Last Update"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Next Update"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,7,"tr",[["style","border-bottom: none;"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"th",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["Uptime"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),F._26(null,["",""])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n\n "])),(l()(),F._26(null,["\n "])),(l()(),F._28(8388608,null,null,1,null,k)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"]},null),(l()(),F._26(null,["\n "]))],function(l,n){var u=n.component;l(n,8,0,u.dataService.hasFeatureAccess("pages","server"),F._29(n,9)),l(n,154,0,u.dataService.hasFeatureAccess("home","online"))},function(l,n){var u=n.component;l(n,23,0,n.parent.context.$implicit.Address),l(n,32,0,n.parent.context.$implicit.Version),l(n,41,0,n.parent.context.$implicit.OnlinePlayerMax),l(n,50,0,n.parent.context.$implicit.MapName),l(n,59,0,n.parent.context.$implicit.InGameTime),l(n,68,0,F._33(n,68,0,l(n,69,0,F._29(n.parent.parent,0),n.parent.context.$implicit.TamedCreatureCount))),l(n,78,0,F._33(n,78,0,l(n,79,0,F._29(n.parent.parent,0),n.parent.context.$implicit.CloudCreatureCount))),l(n,88,0,F._33(n,88,0,l(n,89,0,F._29(n.parent.parent,0),n.parent.context.$implicit.WildCreatureCount))),l(n,98,0,F._33(n,98,0,l(n,99,0,F._29(n.parent.parent,0),n.parent.context.$implicit.StructureCount))),l(n,108,0,F._33(n,108,0,l(n,109,0,F._29(n.parent.parent,0),n.parent.context.$implicit.PlayerCount))),l(n,118,0,F._33(n,118,0,l(n,119,0,F._29(n.parent.parent,0),n.parent.context.$implicit.TribeCount))),l(n,128,0,n.parent.context.$implicit.LastUpdate),l(n,137,0,n.parent.context.$implicit.NextUpdate),l(n,146,0,n.parent.context.$implicit.ServerStarted?u.dataService.toRelativeDate(n.parent.context.$implicit.ServerStarted):"-")})}function I(l){return F._24(0,[(l()(),F._25(0,null,null,4,null,null,null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._28(8388608,null,null,1,null,C)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"]},null),(l()(),F._26(null,["\n"]))],function(l,n){var u=n.component;l(n,3,0,u.isMenuActive(n.context.$implicit.Key)&&void 0!=u.dataService.Servers&&u.dataService.hasFeatureAccess("home","serverdetails"))},null)}function x(l){return F._24(0,[(l()(),F._25(0,null,null,59,"section",[["class","w3-container margin-top"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"h3",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),F._26(null,["External Resources"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,14,"div",[["class","w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,4,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),F._26(null,["Wiki"])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,5,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,2,"p",[],null,null,null,null,null)),(l()(),F._25(0,null,null,1,"a",[["href","http://ark.gamepedia.com/"],["style","text-decoration: none;"]],null,null,null,null,null)),(l()(),F._26(null,["Official ARK Survival Evolved Wiki ❯"])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,21,"div",[["class","w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,4,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),F._26(null,["Taming Calculators"])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,12,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,9,"ul",[["class","w3-ul"],["style","margin: 7px 0px;"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,2,"li",[["style","padding-left: 0px;"]],null,null,null,null,null)),(l()(),F._25(0,null,null,1,"a",[["href","http://www.survive-ark.com/taming-calculator/"],["style","text-decoration: none;"]],null,null,null,null,null)),(l()(),F._26(null,["Survive ARK: Taming Calculator ❯"])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,2,"li",[["style","padding-left: 0px;"]],null,null,null,null,null)),(l()(),F._25(0,null,null,1,"a",[["href","http://www.dododex.com/"],["style","text-decoration: none;"]],null,null,null,null,null)),(l()(),F._26(null,["Dododex: Taming Calculator ❯"])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,14,"div",[["class","w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,4,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),F._26(null,["Creature Library and Breeding Suggestions"])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,5,"div",[["class","w3-container theme-l1"]],null,null,null,null,null)),(l()(),F._26(null,["\n "])),(l()(),F._25(0,null,null,2,"p",[],null,null,null,null,null)),(l()(),F._25(0,null,null,1,"a",[["href","https://github.com/cadon/ARKStatsExtractor"],["style","text-decoration: none;"]],null,null,null,null,null)),(l()(),F._26(null,["ARK Smart Breeding ❯"])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n "])),(l()(),F._26(null,["\n"]))],null,null)}function O(l){return F._24(0,[F._34(0,L.p,[F.t]),(l()(),F._28(8388608,null,null,1,null,t)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"]},null),(l()(),F._26(null,["\n"])),(l()(),F._28(8388608,null,null,1,null,_)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"]},null),(l()(),F._26(null,["\n"])),(l()(),F._28(8388608,null,null,1,null,h)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"]},null),(l()(),F._26(null,["\n"])),(l()(),F._28(8388608,null,null,1,null,I)),F._27(401408,null,0,L.n,[F.S,F._5,F.v],{ngForOf:[0,"ngForOf"]},null),(l()(),F._26(null,["\n"])),(l()(),F._28(8388608,null,null,1,null,x)),F._27(8192,null,0,L.l,[F.S,F._5],{ngIf:[0,"ngIf"]},null)],function(l,n){var u=n.component;l(n,2,0,u.isMenuActive("overview")&&void 0!=u.dataService.UserSteamId&&u.dataService.hasFeatureAccess("home","myprofile")&&u.dataService.hasFeatureAccess("pages","player",u.dataService.UserSteamId)),l(n,5,0,u.isMenuActive("overview")&&void 0!=u.dataService.Servers&&u.serverCount>0&&u.dataService.hasFeatureAccess("home","serverlist")),l(n,8,0,u.isMenuActive("overview")&&void 0!=u.dataService.Servers&&u.dataService.hasFeatureAccess("home","online")),l(n,11,0,null==u.dataService.Servers?null:u.dataService.Servers.Servers),l(n,14,0,u.isMenuActive("overview")&&u.dataService.hasFeatureAccess("home","externalresources"))},null)}function A(l){return F._24(0,[(l()(),F._25(0,null,null,1,"app-server-list",[],null,null,null,O,$)),F._27(122880,null,0,P.a,[N.a,B.a,K.a],null,null)],function(l,n){l(n,1,0)},null)}var T=u("BYL0"),F=u("3j3K"),M=u("5oXY"),L=u("2Je8"),P=u("JLFQ"),N=u("ATz5"),B=u("+Lwu"),K=u("XLrO");u.d(n,"a",function(){return R});var j=[T.a],$=F._23({encapsulation:0,styles:j,data:{}}),R=F._30("app-server-list",P.a,A,{},{},[])},nuuw:function(l,n,u){"use strict";function t(l){return wl._24(0,[(l()(),wl._25(0,null,null,7,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"div",[["class","w3-panel theme-l2"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"h3",[["class","theme-text-l1-light"]],null,null,null,null,null)),(l()(),wl._26(null,["Loading..."])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,[" \n"]))],null,null)}function e(l){return wl._24(0,[(l()(),wl._25(0,null,null,10,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"div",[["class","w3-panel w3-red"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"h3",[],null,null,null,null,null)),(l()(),wl._26(null,["Error!"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"p",[],null,null,null,null,null)),(l()(),wl._26(null,["No data could be loaded for the given steam id."])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,[" \n"]))],null,null)}function r(l){return wl._24(0,[(l()(),wl._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activate(l.context.$implicit)&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1"]),(l()(),wl._26(null,["",""]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.active(n.context.$implicit)))},function(l,n){l(n,0,0,n.component.serverWidth()),l(n,3,0,n.context.$implicit)})}function i(l){return wl._24(0,[(l()(),wl._25(0,null,null,4,"div",[["class","w3-bar theme-l2 w3-card-4"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,r)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,u.keysGetter(null==u.player?null:u.player.Servers))},null)}function a(l){return wl._24(0,[(l()(),wl._25(0,null,null,7,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["Servers"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,i)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,6,0,null==u.player?null:u.player.Servers)},null)}function o(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Gender"]))],null,null)}function s(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Level"]))],null,null)}function c(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Engram Points"]))],null,null)}function _(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lat"]))],null,null)}function p(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lng"]))],null,null)}function d(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""]))],null,function(l,n){var u=n.component;l(n,1,0,null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].Gender)})}function f(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""]))],null,function(l,n){var u=n.component;l(n,1,0,null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].Level)})}function m(l){return wl._24(0,[(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(1)],null,function(l,n){var u=n.component;l(n,1,0,wl._33(n,1,0,l(n,2,0,wl._29(n.parent.parent,0),null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].EngramPoints)))})}function h(l){return wl._24(0,[(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2)],null,function(l,n){var u=n.component;l(n,1,0,wl._33(n,1,0,l(n,2,0,wl._29(n.parent.parent,0),null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].Latitude,"1.1-1")))})}function v(l){return wl._24(0,[(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2)],null,function(l,n){var u=n.component;l(n,1,0,wl._33(n,1,0,l(n,2,0,wl._29(n.parent.parent,0),null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].Longitude,"1.1-1")))})}function g(l){return wl._24(0,[(l()(),wl._25(0,null,null,83,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,0,"a",[["id","player"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["Player"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,76,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,73,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,34,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,31,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Character Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,o)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Tribe Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Steam Id"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Tribe Id"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,s)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,c)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,_)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,p)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Saved At"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,34,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,31,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,d)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,f)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,m)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,h)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,v)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,18,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,30,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,33,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,36,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,39,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,54,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,66,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,69,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,72,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId)),l(n,75,0,u.dataService.hasFeatureAccess("player","profile-detailed",u.steamId))},function(l,n){var u=n.component;l(n,51,0,null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].CharacterName),l(n,57,0,null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].TribeName),l(n,60,0,(null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].FakeSteamId)||(null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].SteamId)),l(n,63,0,null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].TribeId),l(n,78,0,u.dataService.toDate(null==u.player?null:null==u.player.Servers[u.serverKey]?null:u.player.Servers[u.serverKey].SavedAt))})}function y(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no creatures..."]))],null,null)}function b(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"i",[["class","material-icons"],["style","cursor: pointer;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){e.creaturesFilter="";t=!1!==e.filterAndSort()&&t}return t},null,null)),(l()(),wl._26(null,["close"]))],null,null)}function S(l){return wl._24(0,[(l()(),wl._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("stats")&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1"]),(l()(),wl._26(null,["Base Stats"]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.activeCreaturesMode("stats")))},function(l,n){l(n,0,0,100/n.component.numCreatureTabs())})}function w(l){return wl._24(0,[(l()(),wl._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("ids")&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1"]),(l()(),wl._26(null,["IDs"]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.activeCreaturesMode("ids")))},function(l,n){l(n,0,0,100/n.component.numCreatureTabs())})}function k(l){return wl._24(0,[(l()(),wl._25(0,null,null,12,"div",[["class","w3-bar theme-l2 w3-card-4 w3-margin-bottom"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCreaturesMode("status")&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1"]),(l()(),wl._26(null,["Overview / Status"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,S)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,w)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,"w3-bar-item w3-button w3-mobile",l(n,4,0,u.activeCreaturesMode("status"))),l(n,8,0,u.dataService.hasFeatureAccess("player","creatures-basestats",u.steamId)),l(n,11,0,u.dataService.hasFeatureAccess("player","creatures-ids",u.steamId))},function(l,n){l(n,2,0,100/n.component.numCreatureTabs())})}function C(l){return wl._24(0,[(l()(),wl._25(0,null,null,22,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Level"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("level")&&t}return t},null,null)),(l()(),wl._26(null,["Level"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Imprint"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("imprint")&&t}return t},null,null)),(l()(),wl._26(null,["Imprint"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Food"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("food")&&t}return t},null,null)),(l()(),wl._26(null,["Food"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Latitude"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("latitude")&&t}return t},null,null)),(l()(),wl._26(null,["Lat"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Longitude"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("longitude")&&t}return t},null,null)),(l()(),wl._26(null,["Lng"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Status"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Owner"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("owner")&&t}return t},null,null)),(l()(),wl._26(null,["Owner"])),(l()(),wl._26(null,["\n "]))],null,null)}function I(l){return wl._24(0,[(l()(),wl._25(0,null,null,23,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Health"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_health")&&t}return t},null,null)),(l()(),wl._26(null,["HP"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Stamina"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_stamina")&&t}return t},null,null)),(l()(),wl._26(null,["ST"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Oxygen"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_oxygen")&&t}return t},null,null)),(l()(),wl._26(null,["OX"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Food"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_food")&&t}return t},null,null)),(l()(),wl._26(null,["FO"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Weight"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_weight")&&t}return t},null,null)),(l()(),wl._26(null,["WE"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Melee"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_melee")&&t}return t},null,null)),(l()(),wl._26(null,["ME"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Speed"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("stat_speed")&&t}return t},null,null)),(l()(),wl._26(null,["SP"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],null,null)}function x(l){return wl._24(0,[(l()(),wl._25(0,null,null,7,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by ID1"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("id1")&&t}return t},null,null)),(l()(),wl._26(null,["ID1"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by ID2"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("id2")&&t}return t},null,null)),(l()(),wl._26(null,["ID2"])),(l()(),wl._26(null,["\n "]))],null,null)}function O(l){return wl._24(0,[(l()(),wl._25(0,null,null,2,"tr",[],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"td",[],[[8,"colSpan",0]],null,null,null,null)),(l()(),wl._26(null,["No matching creatures..."]))],null,function(l,n){l(n,1,0,n.component.activeCreaturesMode("ids")?6:11)})}function A(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),wl._26(null,["",""]))],null,function(l,n){l(n,1,0,n.parent.parent.context.$implicit.Level)})}function T(l){return wl._24(0,[(l()(),wl._25(0,null,null,8,"div",[["class","app-green-light w3-round"],["style","width: 6em; position: relative;"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["style","position: absolute; left: 50%; transform: translate(-50%, 0%); color: white;"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","theme-c1 w3-round"]],[[4,"width","%"]],null,null,null,null)),(l()(),wl._26(null,[" "])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,wl._33(n,3,0,l(n,4,0,wl._29(n.parent.parent.parent.parent.parent,1),n.parent.parent.context.$implicit.FoodStatus,"1.0-0"))),l(n,6,0,100*n.parent.parent.context.$implicit.FoodStatus)})}function F(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"span",[],null,null,null,null,null)),(l()(),wl._26(null,["Next mating ",""]))],null,function(l,n){l(n,1,0,n.component.dataService.toRelativeDate(n.parent.parent.context.$implicit.NextMating))})}function M(l){return wl._24(0,[(l()(),wl._25(0,null,null,23,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,20,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),wl._26(null,["Baby"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,11,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,8,"div",[["class","app-green-light w3-round"],["style","width: 4em; position: relative; margin: 0em 0.5em;"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["style","position: absolute; left: 50%; transform: translate(-50%, 0%); color: white;"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","theme-c1 w3-round"]],[[4,"width","%"]],null,null,null,null)),(l()(),wl._26(null,[" "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._26(null,["cuddle ",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],null,function(l,n){var u=n.component;l(n,12,0,wl._33(n,12,0,l(n,13,0,wl._29(n.parent.parent.parent.parent.parent,1),n.parent.parent.context.$implicit.BabyAge,"1.0-0"))),l(n,15,0,100*n.parent.parent.context.$implicit.BabyAge),l(n,21,0,u.dataService.toRelativeDate(n.parent.parent.context.$implicit.BabyNextCuddle))})}function L(l){return wl._24(0,[(l()(),wl._25(0,null,null,35,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._28(8388608,null,null,1,null,A)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,T)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,F)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,M)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,4,0,n.parent.context.$implicit.BaseLevel!=n.parent.context.$implicit.Level),l(n,13,0,null!=n.parent.context.$implicit.FoodStatus),l(n,27,0,u.haveMatingCooldown(n.parent.context.$implicit)),l(n,30,0,null!=n.parent.context.$implicit.BabyAge)},function(l,n){l(n,7,0,wl._33(n,7,0,l(n,8,0,wl._29(n.parent.parent.parent.parent,1),n.parent.context.$implicit.Imprint,"1.0-0"))),l(n,17,0,wl._33(n,17,0,l(n,18,0,wl._29(n.parent.parent.parent.parent,0),n.parent.context.$implicit.Latitude,"1.1-1"))),l(n,21,0,wl._33(n,21,0,l(n,22,0,wl._29(n.parent.parent.parent.parent,0),n.parent.context.$implicit.Longitude,"1.1-1"))),l(n,34,0,n.parent.context.$implicit.OwnerType)})}function P(l){return wl._24(0,[(l()(),wl._25(0,null,null,23,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Health),l(n,6,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Stamina),l(n,9,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Oxygen),l(n,12,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Food),l(n,15,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Weight),l(n,18,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.Melee),l(n,21,0,null==n.parent.context.$implicit.BaseStats?null:n.parent.context.$implicit.BaseStats.MovementSpeed)})}function N(l){return wl._24(0,[(l()(),wl._25(0,null,null,7,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.parent.context.$implicit.Id1),l(n,6,0,n.parent.context.$implicit.Id2)})}function B(l){return wl._24(0,[(l()(),wl._25(0,null,null,24,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,L)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,P)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,N)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,17,0,u.activeCreaturesMode("status")),l(n,20,0,u.activeCreaturesMode("stats")),l(n,23,0,u.activeCreaturesMode("ids"))},function(l,n){l(n,3,0,n.context.$implicit.Name),l(n,7,0,n.context.$implicit.Species),l(n,11,0,n.context.$implicit.Gender),l(n,14,0,n.context.$implicit.BaseLevel)})}function K(l){return wl._24(0,[(l()(),wl._25(0,null,null,61,null,null,null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,11,"div",[["class","inner-addon right-addon"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,b)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,5,"input",[["class","w3-input w3-border w3-round-xlarge w3-large w3-margin-bottom border-theme theme-l1"],["placeholder","Filter"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(l,n,u){var t=!0,e=l.component;if("input"===n){t=!1!==wl._29(l,8)._handleInput(u.target.value)&&t}if("blur"===n){t=!1!==wl._29(l,8).onTouched()&&t}if("compositionstart"===n){t=!1!==wl._29(l,8)._compositionStart()&&t}if("compositionend"===n){t=!1!==wl._29(l,8)._compositionEnd(u.target.value)&&t}if("ngModelChange"===n){e.creaturesFilter=u;t=!1!==e.filterAndSort()&&t}return t},null,null)),wl._27(8192,null,0,Cl.d,[wl.J,wl.K,[2,Cl.e]],null,null),wl._37(512,null,Cl.g,function(l){return[l]},[Cl.d]),wl._27(335872,null,0,Cl.h,[[8,null],[8,null],[8,null],[2,Cl.g]],{model:[0,"model"]},{update:"ngModelChange"}),wl._37(1024,null,Cl.i,null,[Cl.h]),wl._27(8192,null,0,Cl.j,[Cl.i],null,null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,k)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,42,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,39,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,27,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,24,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Name"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("name")&&t}return t},null,null)),(l()(),wl._26(null,["Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Species"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("species")&&t}return t},null,null)),(l()(),wl._26(null,["Species"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Gender"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("gender")&&t}return t},null,null)),(l()(),wl._26(null,["Gender"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[["style","cursor: pointer;"],["title","Sort by Base Level"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.setCreaturesSort("base_level")&&t}return t},null,null)),(l()(),wl._26(null,["Base Level"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,C)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,I)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,x)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,O)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,B)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,5,0,null!=u.creaturesFilter&&""!=u.creaturesFilter),l(n,10,0,u.creaturesFilter),l(n,16,0,u.numCreatureTabs()>1),l(n,41,0,u.activeCreaturesMode("status")),l(n,44,0,u.activeCreaturesMode("stats")),l(n,47,0,u.activeCreaturesMode("ids")),l(n,54,0,!((null==u.filteredCreatures?null:u.filteredCreatures.length)>0)),l(n,57,0,u.filteredCreatures)},function(l,n){l(n,7,0,wl._29(n,12).ngClassUntouched,wl._29(n,12).ngClassTouched,wl._29(n,12).ngClassPristine,wl._29(n,12).ngClassDirty,wl._29(n,12).ngClassValid,wl._29(n,12).ngClassInvalid,wl._29(n,12).ngClassPending)})}function j(l){return wl._24(0,[(l()(),wl._25(0,null,null,21,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,12,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,5,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","creatures"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,3,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Creatures "])),(l()(),wl._25(0,null,null,1,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"button",[["class","w3-button theme-d1 w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.openMap(u)&&t}return t},null,null)),(l()(),wl._26(null,["Show Map"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,y)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,K)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,17,0,!((null==u.player.Servers[u.serverKey]?null:null==u.player.Servers[u.serverKey].Creatures?null:u.player.Servers[u.serverKey].Creatures.length)>0)),l(n,20,0,(null==u.player.Servers[u.serverKey]?null:null==u.player.Servers[u.serverKey].Creatures?null:u.player.Servers[u.serverKey].Creatures.length)>0)},function(l,n){l(n,9,0,n.component.filteredCreatures.length)})}function $(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"i",[["class","material-icons"],["style","margin: -5px 5px -5px -5px; vertical-align: middle;"]],null,null,null,null,null)),(l()(),wl._26(null,["check"]))],null,null)}function R(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no baby creatures..."]))],null,null)}function D(l){return wl._24(0,[(l()(),wl._25(0,null,null,0,"th",[],null,null,null,null,null))],null,null)}function E(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"input",[["class","w3-check w3-right"],["style","top: 0;"],["type","checkbox"]],[[8,"checked",0]],[[null,"change"]],function(l,n,u){var t=!0,e=l.component;if("change"===n){t=!1!==e.toggleImprintNotificationForCreature(l.parent.context.$implicit)&&t}return t},null,null))],null,function(l,n){l(n,1,0,n.component.getStateForCreature(n.parent.context.$implicit).imprintNotifications)})}function U(l){return wl._24(0,[(l()(),wl._25(0,null,null,42,"tr",[],null,null,null,null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{ngClass:[0,"ngClass"]},null),wl._31(["odd"]),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,11,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,8,"div",[["class","app-green-light w3-round"],["style","width: 6em; position: relative;"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["style","position: absolute; left: 50%; transform: translate(-50%, 0%); color: white;"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","theme-c1 w3-round"]],[[4,"width","%"]],null,null,null,null)),(l()(),wl._26(null,[" "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"timer",[],null,null,null,Il.a,Il.b)),wl._27(122880,null,0,xl.a,[],{state:[0,"state"],time:[1,"time"],notification:[2,"notification"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,E)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,1,0,l(n,2,0,n.context.index%2==1)),l(n,38,0,u.getStateForCreature(n.context.$implicit),n.context.$implicit.BabyNextCuddle,u.imprintNotifications),l(n,41,0,u.imprintNotifications)},function(l,n){var u=n.component;l(n,5,0,n.context.$implicit.Name),l(n,8,0,n.context.$implicit.Species),l(n,11,0,n.context.$implicit.Gender),l(n,14,0,n.context.$implicit.BaseLevel),l(n,17,0,wl._33(n,17,0,l(n,18,0,wl._29(n.parent.parent.parent,1),n.context.$implicit.Imprint,"1.0-0"))),l(n,25,0,wl._33(n,25,0,l(n,26,0,wl._29(n.parent.parent.parent,1),n.context.$implicit.BabyAge,"1.0-0"))),l(n,28,0,100*n.context.$implicit.BabyAge),l(n,34,0,u.dataService.toDate(n.context.$implicit.BabyFullyGrown))})}function z(l){return wl._24(0,[(l()(),wl._25(0,null,null,43,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,40,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,31,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,28,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Species"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Gender"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Base Level"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Imprint"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Progress"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Fully Grown At"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Next Imprint"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,D)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,U)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,33,0,u.imprintNotifications),l(n,40,0,u.imprintCreatures)},null)}function J(l){return wl._24(0,[(l()(),wl._25(0,null,null,26,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,16,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,5,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","imprint_timers"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,3,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Breeding "])),(l()(),wl._25(0,null,null,1,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,6,"div",[["class","w3-cell w3-cell-middle"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,5,"button",[["class","w3-button w3-right"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!=(e.imprintNotifications=!e.imprintNotifications)&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1","theme-l2","theme-hover"]),(l()(),wl._28(8388608,null,null,1,null,$)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,R)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,z)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,13,0,"w3-button w3-right",l(n,14,0,u.imprintNotifications,!u.imprintNotifications,!u.imprintNotifications)),l(n,16,0,u.imprintNotifications),l(n,21,0,!((null==u.imprintCreatures?null:u.imprintCreatures.length)>0)),l(n,24,0,(null==u.imprintCreatures?null:u.imprintCreatures.length)>0)},function(l,n){var u=n.component;l(n,9,0,u.imprintCreatures.length),l(n,17,0,u.imprintNotifications?"Notifications Enabled":"Enable Notifications")})}function G(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no kibbles or eggs..."]))],null,null)}function H(l){return wl._24(0,[(l()(),wl._25(0,null,null,13,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.Name),l(n,6,0,n.context.$implicit.KibbleCount),l(n,9,0,n.context.$implicit.EggCount),l(n,12,0,n.context.$implicit.KibbleCount+n.context.$implicit.EggCount)})}function X(l){return wl._24(0,[(l()(),wl._25(0,null,null,28,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,25,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,16,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,13,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Kibbles"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Eggs"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Total"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,H)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,25,0,u.player.Servers[u.serverKey].KibblesAndEggs)},null)}function W(l){return wl._24(0,[(l()(),wl._25(0,null,null,18,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,9,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,6,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","kibblesandeggs"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,4,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Kibbles and Eggs "])),(l()(),wl._25(0,null,null,2,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,G)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,X)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,14,0,!((null==u.player.Servers[u.serverKey].KibblesAndEggs?null:u.player.Servers[u.serverKey].KibblesAndEggs.length)>0)),l(n,17,0,(null==u.player.Servers[u.serverKey].KibblesAndEggs?null:u.player.Servers[u.serverKey].KibblesAndEggs.length)>0)},function(l,n){var u=n.component;l(n,9,0,wl._33(n,9,0,l(n,10,0,wl._29(n.parent,0),u.sumKibbleAndEggs(),0)))})}function V(l){return wl._24(0,[(l()(),wl._25(0,null,null,3,"button",[["class","w3-bar-item w3-button w3-mobile"],["href","#"]],[[4,"width","%"]],[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!==e.activateCluster(l.context.$implicit)&&t}return t},null,null)),wl._27(139264,null,0,kl.m,[wl.v,wl.w,wl.K,wl.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wl._31(["theme-d1"]),(l()(),wl._26(null,["",""]))],function(l,n){l(n,1,0,"w3-bar-item w3-button w3-mobile",l(n,2,0,n.component.activeCluster(n.context.$implicit)))},function(l,n){l(n,0,0,n.component.clusterWidth()),l(n,3,0,n.context.$implicit)})}function Y(l){return wl._24(0,[(l()(),wl._25(0,null,null,4,"div",[["class","w3-bar theme-l2 w3-card-4"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,V)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,u.keysGetter(null==u.player?null:u.player.Clusters))},null)}function q(l){return wl._24(0,[(l()(),wl._25(0,null,null,7,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["Clusters"])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,Y)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,6,0,null==u.player?null:u.player.Clusters)},null)}function Q(l){return wl._24(0,[(l()(),wl._25(0,null,null,11,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,5,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Creatures"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no creatures in the cloud..."])),(l()(),wl._26(null,["\n"]))],null,null)}function Z(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no creatures in the cloud..."]))],null,null)}function ll(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"i",[["class","material-icons"],["style","cursor: pointer;"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){e.creaturesClusterFilter="";t=!1!==e.filterCluster()&&t}return t},null,null)),(l()(),wl._26(null,["close"]))],null,null)}function nl(l){return wl._24(0,[(l()(),wl._25(0,null,null,11,"div",[["class","inner-addon right-addon"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,ll)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,5,"input",[["class","w3-input w3-border w3-round-xlarge w3-large w3-margin-bottom border-theme theme-l1"],["placeholder","Filter"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(l,n,u){var t=!0,e=l.component;if("input"===n){t=!1!==wl._29(l,6)._handleInput(u.target.value)&&t}if("blur"===n){t=!1!==wl._29(l,6).onTouched()&&t}if("compositionstart"===n){t=!1!==wl._29(l,6)._compositionStart()&&t}if("compositionend"===n){t=!1!==wl._29(l,6)._compositionEnd(u.target.value)&&t}if("ngModelChange"===n){e.creaturesClusterFilter=u;t=!1!==e.filterCluster()&&t}return t},null,null)),wl._27(8192,null,0,Cl.d,[wl.J,wl.K,[2,Cl.e]],null,null),wl._37(512,null,Cl.g,function(l){return[l]},[Cl.d]),wl._27(335872,null,0,Cl.h,[[8,null],[8,null],[8,null],[2,Cl.g]],{model:[0,"model"]},{update:"ngModelChange"}),wl._37(1024,null,Cl.i,null,[Cl.h]),wl._27(8192,null,0,Cl.j,[Cl.i],null,null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,null!=u.creaturesClusterFilter&&""!=u.creaturesClusterFilter),l(n,8,0,u.creaturesClusterFilter)},function(l,n){l(n,5,0,wl._29(n,10).ngClassUntouched,wl._29(n,10).ngClassTouched,wl._29(n,10).ngClassPristine,wl._29(n,10).ngClassDirty,wl._29(n,10).ngClassValid,wl._29(n,10).ngClassInvalid,wl._29(n,10).ngClassPending)})}function ul(l){return wl._24(0,[(l()(),wl._25(0,null,null,2,"tr",[],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"td",[["colspan","3"]],null,null,null,null,null)),(l()(),wl._26(null,["No matching creatures..."]))],null,null)}function tl(l){return wl._24(0,[(l()(),wl._25(0,null,null,10,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.Name),l(n,6,0,n.context.$implicit.Species),l(n,9,0,n.context.$implicit.Level)})}function el(l){return wl._24(0,[(l()(),wl._25(0,null,null,28,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,25,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,13,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,10,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Name"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Species"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Level"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,ul)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,tl)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,22,0,!((null==u.filteredClusterCreatures?null:u.filteredClusterCreatures.length)>0)),l(n,25,0,u.filteredClusterCreatures)},null)}function rl(l){return wl._24(0,[(l()(),wl._25(0,null,null,19,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,3,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Creatures "])),(l()(),wl._25(0,null,null,1,"span",[["class","w3-tag w3-large theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,Z)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,nl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,el)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,12,0,!((null==u.player.Clusters[u.clusterKey]?null:null==u.player.Clusters[u.clusterKey].Creatures?null:u.player.Clusters[u.clusterKey].Creatures.length)>0)),l(n,15,0,(null==u.player.Clusters[u.clusterKey]?null:null==u.player.Clusters[u.clusterKey].Creatures?null:u.player.Clusters[u.clusterKey].Creatures.length)>0),l(n,18,0,(null==u.player.Clusters[u.clusterKey]?null:null==u.player.Clusters[u.clusterKey].Creatures?null:u.player.Clusters[u.clusterKey].Creatures.length)>0)},function(l,n){l(n,8,0,n.component.filteredClusterCreatures.length)})}function il(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no crops..."]))],null,null)}function al(l){return wl._24(0,[(l()(),wl._25(0,null,null,36,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,11,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,8,"div",[["class","app-green-light w3-round"],["style","width: 6em; position: relative;"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["style","position: absolute; left: 50%; transform: translate(-50%, 0%); color: white;"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","theme-c1 w3-round"]],[[4,"width","%"]],null,null,null,null)),(l()(),wl._26(null,[" "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(1),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.PlantedCropName||n.context.$implicit.PlantedCropClassName),l(n,6,0,n.context.$implicit.Size),l(n,13,0,wl._33(n,13,0,l(n,14,0,wl._29(n.parent.parent.parent,1),n.context.$implicit.FertilizerQuantity/n.context.$implicit.FertilizerMax,"1.0-0"))),l(n,16,0,n.context.$implicit.FertilizerQuantity/n.context.$implicit.FertilizerMax*100),l(n,22,0,wl._33(n,22,0,l(n,23,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.FertilizerQuantity))),l(n,26,0,wl._33(n,26,0,l(n,27,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.WaterAmount,"1.0-0"))),l(n,30,0,wl._33(n,30,0,l(n,31,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.Latitude,"1.1-1"))),l(n,34,0,wl._33(n,34,0,l(n,35,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.Longitude,"1.1-1")))})}function ol(l){return wl._24(0,[(l()(),wl._25(0,null,null,37,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,34,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,25,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,22,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Crop"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Size"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Fertilizer %"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Fertilizer Units"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Water"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lat"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lng"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,al)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,34,0,u.player.Servers[u.serverKey].CropPlots)},null)}function sl(l){return wl._24(0,[(l()(),wl._25(0,null,null,15,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,6,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,3,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","cropplots"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Crops"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,il)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,ol)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,11,0,!((null==u.player.Servers[u.serverKey].CropPlots?null:u.player.Servers[u.serverKey].CropPlots.length)>0)),l(n,14,0,(null==u.player.Servers[u.serverKey].CropPlots?null:u.player.Servers[u.serverKey].CropPlots.length)>0)},null)}function cl(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no electrical generators..."]))],null,null)}function _l(l){return wl._24(0,[(l()(),wl._25(0,null,null,8,"div",[["class","app-green-light w3-round"],["style","width: 6em; position: relative;"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"div",[["style","position: absolute; left: 50%; transform: translate(-50%, 0%); color: white;"]],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"div",[["class","theme-c1 w3-round"]],[[4,"width","%"]],null,null,null,null)),(l()(),wl._26(null,[" "])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,wl._33(n,3,0,l(n,4,0,wl._29(n.parent.parent.parent.parent,1),n.parent.context.$implicit.GasolineQuantity/800,"1.0-0"))),l(n,6,0,n.parent.context.$implicit.GasolineQuantity/800*100)})}function pl(l){return wl._24(0,[(l()(),wl._25(0,null,null,22,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,_l)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(1),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,2,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),wl._32(2),(l()(),wl._26(null,["\n "]))],function(l,n){l(n,5,0,1==n.context.$implicit.Activated)},function(l,n){l(n,9,0,wl._33(n,9,0,l(n,10,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.GasolineQuantity))),l(n,13,0,1==n.context.$implicit.Activated?"Yes":"No"),l(n,16,0,wl._33(n,16,0,l(n,17,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.Latitude,"1.1-1"))),l(n,20,0,wl._33(n,20,0,l(n,21,0,wl._29(n.parent.parent.parent,0),n.context.$implicit.Longitude,"1.1-1")))})}function dl(l){return wl._24(0,[(l()(),wl._25(0,null,null,31,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,28,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,19,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,16,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Gasoline %"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Gasoline Quantity"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Activated"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lat"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Lng"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,pl)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,28,0,u.player.Servers[u.serverKey].ElectricalGenerators)},null)}function fl(l){return wl._24(0,[(l()(),wl._25(0,null,null,15,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,6,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,3,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","electricalgenerators"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Electrical Generators"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,cl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,dl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,11,0,!((null==u.player.Servers[u.serverKey].ElectricalGenerators?null:u.player.Servers[u.serverKey].ElectricalGenerators.length)>0)),l(n,14,0,(null==u.player.Servers[u.serverKey].ElectricalGenerators?null:u.player.Servers[u.serverKey].ElectricalGenerators.length)>0)},null)}function ml(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"div",[],null,null,null,null,null)),(l()(),wl._26(null,["There are no tribe logs..."]))],null,null)}function hl(l){return wl._24(0,[(l()(),wl._25(0,null,null,10,"tr",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"td",[],null,null,null,null,null)),(l()(),wl._26(null,["",""])),(l()(),wl._26(null,["\n "]))],null,function(l,n){l(n,3,0,n.context.$implicit.Day),l(n,6,0,n.context.$implicit.Time),l(n,9,0,n.context.$implicit.Message)})}function vl(l){return wl._24(0,[(l()(),wl._25(0,null,null,25,"div",[["class","w3-card-4 w3-responsive"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,22,"table",[["class","w3-table-all border-theme"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,13,"thead",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,10,"tr",[["class","theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Day"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Time"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"th",[],null,null,null,null,null)),(l()(),wl._26(null,["Message"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,4,"tbody",[],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,hl)),wl._27(401408,null,0,kl.n,[wl.S,wl._5,wl.v],{ngForOf:[0,"ngForOf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,22,0,u.player.Servers[u.serverKey].TribeLog)},null)}function gl(l){return wl._24(0,[(l()(),wl._25(0,null,null,15,"section",[["class","w3-container"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,6,"div",[["class","w3-cell-row"]],null,null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,3,"div",[["class","w3-cell"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,0,"a",[["id","tribelog"]],null,null,null,null,null)),(l()(),wl._25(0,null,null,1,"h2",[["class","theme-text-d1 w3-left"]],null,null,null,null,null)),(l()(),wl._26(null,["Tribe Log"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,ml)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._28(8388608,null,null,1,null,vl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n "]))],function(l,n){var u=n.component;l(n,11,0,!((null==u.player.Servers[u.serverKey].TribeLog?null:u.player.Servers[u.serverKey].TribeLog.length)>0)),l(n,14,0,(null==u.player.Servers[u.serverKey].TribeLog?null:u.player.Servers[u.serverKey].TribeLog.length)>0)},null)}function yl(l){return wl._24(0,[wl._34(0,kl.p,[wl.t]),wl._34(0,kl.r,[wl.t]),(l()(),wl._28(8388608,null,null,1,null,t)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,e)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,a)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,g)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,j)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,J)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,W)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,q)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,Q)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,rl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,sl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,fl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._28(8388608,null,null,1,null,gl)),wl._27(8192,null,0,kl.l,[wl.S,wl._5],{ngIf:[0,"ngIf"]},null),(l()(),wl._26(null,["\n"])),(l()(),wl._25(0,null,null,17,"div",[["class","w3-modal"],["id","modal_map"]],[[4,"display",null]],null,null,null,null)),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,14,"div",[["class","w3-modal-content w3-card-4 w3-animate-zoom"],["style","font-size: 0;"]],null,[[null,"clickOutside"],["document","click"]],function(l,n,u){var t=!0,e=l.component;if("document:click"===n){t=!1!==wl._29(l,44).onClick(u,u.target)&&t}if("clickOutside"===n){t=!1!==e.closeMap(u)&&t}return t},null,null)),wl._27(8192,null,0,Al.a,[wl.K],null,{clickOutside:"clickOutside"}),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,7,"header",[["class","w3-container theme-d1"]],null,null,null,null,null)),(l()(),wl._26(null,[" \n "])),(l()(),wl._25(0,null,null,1,"span",[["class","w3-button theme-d1 w3-xlarge w3-display-topright"]],null,[[null,"click"]],function(l,n,u){var t=!0,e=l.component;if("click"===n){t=!1!=(e.showMap=!1)&&t}return t},null,null)),(l()(),wl._26(null,["×"])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"h2",[],null,null,null,null,null)),(l()(),wl._26(null,["Map"])),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n "])),(l()(),wl._25(0,null,null,1,"arkmap",[],null,null,null,Tl.a,Tl.b)),wl._27(286720,null,0,Fl.a,[],{mapName:[0,"mapName"],points:[1,"points"]},null),(l()(),wl._26(null,["\n "])),(l()(),wl._26(null,["\n"]))],function(l,n){var u=n.component;l(n,3,0,0==u.loaded),l(n,6,0,1==u.loaded&&null==u.player),l(n,9,0,!u.isMenuActive("creatures_cloud")&&void 0!=u.player),l(n,12,0,u.isMenuActive("profile")&&void 0!=u.player&&u.dataService.hasFeatureAccess("player","profile",u.steamId)),l(n,15,0,u.isMenuActive("creatures")&&void 0!=u.player&&u.dataService.hasFeatureAccess("player","creatures",u.steamId)),l(n,18,0,u.isMenuActive("breeding")&&void 0!=u.player&&u.dataService.hasFeatureAccess("player","breeding",u.steamId)),l(n,21,0,u.isMenuActive("kibbles_and_eggs")&&(null==u.player?null:u.player.Servers[u.serverKey])&&u.dataService.hasFeatureAccess("player","kibbles-eggs",u.steamId)),l(n,24,0,u.isMenuActive("creatures_cloud")&&u.haveCluster()),l(n,27,0,u.isMenuActive("creatures_cloud")&&!u.haveCluster()&&u.dataService.hasFeatureAccess("player","creatures-cloud",u.steamId)),l(n,30,0,u.isMenuActive("creatures_cloud")&&u.haveCluster()&&u.dataService.hasFeatureAccess("player","creatures-cloud",u.steamId)),l(n,33,0,u.isMenuActive("crop_plots")&&(null==u.player?null:u.player.Servers[u.serverKey])&&u.dataService.hasFeatureAccess("player","crops",u.steamId)),l(n,36,0,u.isMenuActive("electrical_generators")&&(null==u.player?null:u.player.Servers[u.serverKey])&&u.dataService.hasFeatureAccess("player","generators",u.steamId)),l(n,39,0,u.isMenuActive("tribelog")&&(null==u.player?null:u.player.Servers[u.serverKey])&&u.dataService.hasFeatureAccess("player","tribelog",u.steamId)),l(n,56,0,null==u.player?null:u.player.MapNames[u.serverKey],u.points)},function(l,n){l(n,41,0,n.component.showMap?"block":"none")})}function bl(l){return wl._24(0,[(l()(),wl._25(0,null,null,1,"app-player",[],null,null,null,yl,jl)),wl._27(122880,null,0,Ol.a,[Ml.v,Ml.g,Ll.a,Pl.a,Nl.a,Bl.a,wl.O],null,null)],function(l,n){l(n,1,0)},null)}var Sl=u("SWoV"),wl=u("3j3K"),kl=u("2Je8"),Cl=u("NVOs"),Il=u("RdYi"),xl=u("CzL3"),Ol=u("KZxv"),Al=u("8zLQ"),Tl=u("I9JA"),Fl=u("5305"),Ml=u("5oXY"),Ll=u("lHWG"),Pl=u("ATz5"),Nl=u("+Lwu"),Bl=u("XLrO");u.d(n,"a",function(){return $l});var Kl=[Sl.a],jl=wl._23({encapsulation:0,styles:Kl,data:{}}),$l=wl._30("app-player",Ol.a,bl,{},{},[])},ofcV:function(l,n,u){"use strict";function t(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("profile")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Profile"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("profile")))},null)}function e(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("creatures")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Creatures"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("creatures")))},null)}function r(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("creatures_cloud")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Creatures (Cloud)"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("creatures_cloud")))},null)}function i(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("breeding")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Breeding"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("breeding")))},null)}function a(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("crop_plots")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Crops"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("crop_plots")))},null)}function o(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("electrical_generators")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Electrical Generators"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("electrical_generators")))},null)}function s(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("kibbles_and_eggs")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Kibbles and Eggs"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("kibbles_and_eggs")))},null)}function c(l){return f._24(0,[(l()(),f._25(0,null,null,3,"div",[["class","w3-button w3-cell w3-mobile"]],null,[[null,"click"]],function(l,n,u){var t=!0;if("click"===n){t=!1!==f._29(l.parent,2).activate("tribelog")&&t}return t},null,null)),f._27(139264,null,0,m.m,[f.v,f.w,f.K,f.J],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),f._31(["theme-d1"]),(l()(),f._26(null,["Tribe Log"]))],function(l,n){l(n,1,0,"w3-button w3-cell w3-mobile",l(n,2,0,f._29(n.parent,2).active("tribelog")))},null)}function _(l){return f._24(0,[f._35(201326592,1,{menu:0}),(l()(),f._25(0,null,null,32,"app-menu",[],null,null,null,h.a,h.b)),f._27(122880,[[1,4],["menu",4]],0,v.a,[g.a],null,null),(l()(),f._26(0,["\n "])),(l()(),f._25(0,null,0,1,"h2",[["class","theme-text-d1"]],null,null,null,null,null)),(l()(),f._26(null,["Player"])),(l()(),f._26(0,["\n "])),(l()(),f._25(0,null,0,25,"div",[["class","w3-cell-row theme-l2"]],null,null,null,null,null)),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,t)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,e)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,r)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,i)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,a)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,o)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,s)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._28(8388608,null,null,1,null,c)),f._27(8192,null,0,m.l,[f.S,f._5],{ngIf:[0,"ngIf"]},null),(l()(),f._26(null,["\n "])),(l()(),f._26(0,["\n"]))],function(l,n){var u=n.component;l(n,2,0),l(n,10,0,u.dataService.hasFeatureAccess("player","profile",u.steamId)),l(n,13,0,u.dataService.hasFeatureAccess("player","creatures",u.steamId)),l(n,16,0,u.dataService.hasFeatureAccess("player","creatures-cloud",u.steamId)),l(n,19,0,u.dataService.hasFeatureAccess("player","breeding",u.steamId)),l(n,22,0,u.dataService.hasFeatureAccess("player","crops",u.steamId)),l(n,25,0,u.dataService.hasFeatureAccess("player","generators",u.steamId)),l(n,28,0,u.dataService.hasFeatureAccess("player","kibbles-eggs",u.steamId)),l(n,31,0,u.dataService.hasFeatureAccess("player","tribelog",u.steamId))},null)}function p(l){return f._24(0,[(l()(),f._25(0,null,null,1,"app-player-menu",[],[[8,"className",0]],null,null,_,w)),f._27(57344,null,0,y.a,[b.v,g.a],null,null)],function(l,n){l(n,1,0)},function(l,n){l(n,0,0,f._29(n,1).menu.className)})}var d=u("l3s9"),f=u("3j3K"),m=u("2Je8"),h=u("coiB"),v=u("8kYA"),g=u("ATz5"),y=u("RiXa"),b=u("5oXY");u.d(n,"a",function(){return k});var S=[d.a],w=f._23({encapsulation:0,styles:S,data:{}}),k=f._30("app-player-menu",y.a,p,{},{},[])},qn86:function(l,n,u){"use strict";var t=u("3j3K"),e=u("5oXY"),r=u("3MNG"),i=u("PJh5"),a=(u.n(i),u("ATz5")),o=u("+Lwu"),s=u("lHWG"),c=u("+rAa");u.d(n,"a",function(){return _});var _=function(){function l(l,n,t,e,r,i,a){this.route=l,this.router=n,this.httpService=t,this.dataService=e,this.messageService=r,this.notificationsService=i,this.ref=a,this.menuOption=void 0,this.loaded=!1,this.creaturesLoaded=!1,this.keysGetter=Object.keys,this.showMap=!1,this.creaturesMode="status",this.creaturesSortField="base_level",this.creaturesAltSortFields="base_level,gender",this.creaturesSortFunctions={gender:function(l,n,t){return u.i(c.a)(l.Gender,n.Gender,t)},base_level:function(l,n,t){return u.i(c.b)(l.BaseLevel,n.BaseLevel,!t)},tameable:function(l,n,t){return u.i(c.b)(l.IsTameable,n.IsTameable,!t)},latitude:function(l,n,t){return u.i(c.c)(l.Latitude,n.Latitude,t,1)},longitude:function(l,n,t){return u.i(c.c)(l.Longitude,n.Longitude,t,1)},x:function(l,n,t){return u.i(c.c)(l.X,n.X,t,0)},y:function(l,n,t){return u.i(c.c)(l.Y,n.Y,t,0)},z:function(l,n,t){return u.i(c.c)(l.Z,n.Z,t,0)},stat_health:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Health:null,void 0!=n.BaseStats?n.BaseStats.Health:null,!t)},stat_stamina:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Stamina:null,void 0!=n.BaseStats?n.BaseStats.Stamina:null,!t)},stat_oxygen:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Oxygen:null,void 0!=n.BaseStats?n.BaseStats.Oxygen:null,!t)},stat_food:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Food:null,void 0!=n.BaseStats?n.BaseStats.Food:null,!t)},stat_weight:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Weight:null,void 0!=n.BaseStats?n.BaseStats.Weight:null,!t)},stat_melee:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.Melee:null,void 0!=n.BaseStats?n.BaseStats.Melee:null,!t)},stat_speed:function(l,n,t){return u.i(c.b)(void 0!=l.BaseStats?l.BaseStats.MovementSpeed:null,void 0!=n.BaseStats?n.BaseStats.MovementSpeed:null,!t)},id1:function(l,n,t){return u.i(c.b)(l.Id1,n.Id1,t)},id2:function(l,n,t){return u.i(c.b)(l.Id1,n.Id1,t)}},this.playerSortFunctions={character_name:function(l,n,t){return u.i(c.a)(l.CharacterName,n.CharacterName,t)},tribe_name:function(l,n,t){return u.i(c.a)(l.TribeName,n.TribeName,t)},last_active:function(l,n,t){return u.i(c.b)(l.LastActiveTime,n.LastActiveTime,!t)}},this.tribeSortFunctions={tribe_name:function(l,n,t){return u.i(c.a)(l.Name,n.Name,t)},last_active:function(l,n,t){return u.i(c.b)(l.LastActiveTime,n.LastActiveTime,!t)}},this.wildStatisticsSortFunctions={species:function(l,n,t){return u.i(c.a)(l.Name,n.Name,t)},class_name:function(l,n,t){return u.i(c.a)(l.ClassName,n.ClassName,t)},count:function(l,n,t){return u.i(c.b)(l.Count,n.Count,!t)},fraction:function(l,n,t){return u.i(c.c)(l.Fraction,n.Fraction,!t,4)}}}return l.prototype.getServer=function(){var l=this;this.httpService.getServer(this.serverKey).then(function(n){l.server=n,l.filter(),l.loaded=!0}).catch(function(n){l.server=null,l.filteredPlayers=null,l.filteredTribes=null,l.loaded=!0})},l.prototype.getWildCreatures=function(){var l=this;this.httpService.getWildCreatures(this.serverKey).then(function(n){l.wild=n,l.species=Object.keys(l.wild.Species).sort(function(n,t){return u.i(c.a)(l.wild.Species[n].Name||n,l.wild.Species[t].Name||t,!0)}),l.selectedSpecies&&void 0!=l.species.find(function(n){return n==l.selectedSpecies})||(l.selectedSpecies=l.species.length>0?l.species[0]:null),l.filterAndSortWild(),l.creaturesLoaded=!0,l.ref.detectChanges()}).catch(function(n){l.wild=null,l.species=null,l.filteredCreatures=null,l.creaturesLoaded=!0})},l.prototype.ngOnInit=function(){var l=this;this.accessControl_pages_player=this.dataService.hasFeatureAccessObservable("pages","player"),this.serverKey=this.route.snapshot.params.id,this.menuOptionSubscription=this.dataService.MenuOption.subscribe(function(n){l.menuOption=n,0!=l.creaturesLoaded||"wildcreatures"!=l.menuOption&&"wildcreatures-statistics"!=l.menuOption||l.getWildCreatures()}),this.serverUpdatedSubscription=this.messageService.serverUpdated$.subscribe(function(n){l.serverKey==n&&(l.updateServer(),l.showServerUpdateNotification(n))}),this.getServer()},l.prototype.ngOnDestroy=function(){this.menuOptionSubscription.unsubscribe(),this.serverUpdatedSubscription.unsubscribe()},l.prototype.filter=function(){this.filteredPlayers=this.server.Players.filter(function(l){return i(new Date(l.LastActiveTime)).isSameOrAfter(i().subtract(90,"day"))}),this.filteredTribes=this.server.Tribes.filter(function(l){return i(new Date(l.LastActiveTime)).isSameOrAfter(i().subtract(90,"day"))})},l.prototype.sortWild=function(){var l=this,n="-"!=this.creaturesSortField[0],u=this.creaturesSortFunctions[this.creaturesSortField.replace(/^\-/,"")],t=this.creaturesAltSortFields.split(",").map(function(n){var u={};return u.asc="-"!=n[0],u.sortFunc=l.creaturesSortFunctions[n.replace(/^\-/,"")],u});void 0!=this.filteredCreatures&&this.filteredCreatures.sort(function(l,e){var r=u(l,e,n);if(0==r)for(var i=0,a=t;i/gi, window.location.protocol).replace(/\/gi, window.location.hostname); + return environment.apiBaseUrl + .replace(/\/gi, window.location.protocol) + .replace(/\/gi, window.location.hostname) + .replace(/\/gi, config != undefined ? config.webapi.port : ""); } reset() { diff --git a/ArkBot/WebApp/src/app/arkmap.component.ts b/ArkBot/WebApp/src/app/arkmap.component.ts index 9201fdb..8db4857 100644 --- a/ArkBot/WebApp/src/app/arkmap.component.ts +++ b/ArkBot/WebApp/src/app/arkmap.component.ts @@ -3,6 +3,8 @@ import { Component, Input, ViewChild, OnChanges, SimpleChanges, ElementRef, Host import { environment } from '../environments/environment'; import * as d3 from "d3"; +declare var config: any; + @Component({ selector: 'arkmap', template: `` @@ -82,6 +84,9 @@ export class ArkMapComponent implements OnChanges { } getApiBaseUrl(): string { - return environment.apiBaseUrl.replace(/\/gi, window.location.protocol).replace(/\/gi, window.location.hostname); + return environment.apiBaseUrl + .replace(/\/gi, window.location.protocol) + .replace(/\/gi, window.location.hostname) + .replace(/\/gi, config != undefined ? config.webapi.port : ""); } } \ No newline at end of file diff --git a/ArkBot/WebApp/src/app/http.service.ts b/ArkBot/WebApp/src/app/http.service.ts index 0af3b51..80eda63 100644 --- a/ArkBot/WebApp/src/app/http.service.ts +++ b/ArkBot/WebApp/src/app/http.service.ts @@ -7,6 +7,8 @@ import { environment } from '../environments/environment'; import { Servers } from './servers'; import { Player } from './player'; +declare var config: any; + @Injectable() export class HttpService { @@ -104,7 +106,10 @@ export class HttpService { } getApiBaseUrl(): string { - return environment.apiBaseUrl.replace(/\/gi, window.location.protocol).replace(/\/gi, window.location.hostname); + return environment.apiBaseUrl + .replace(/\/gi, window.location.protocol) + .replace(/\/gi, window.location.hostname) + .replace(/\/gi, config != undefined ? config.webapi.port : ""); } protected handleError(error: any): Promise { diff --git a/ArkBot/WebApp/src/app/message.service.ts b/ArkBot/WebApp/src/app/message.service.ts index 06acd20..bb63da5 100644 --- a/ArkBot/WebApp/src/app/message.service.ts +++ b/ArkBot/WebApp/src/app/message.service.ts @@ -4,6 +4,7 @@ import { environment } from '../environments/environment'; //import 'ms-signalr-client'; //problem: does not appear to work with typescript //import {SignalR} from 'signalr'; //problem: 'signalr' is not a module declare var $: any; +declare var config: any; @Injectable() export class MessageService { @@ -32,6 +33,9 @@ export class MessageService { } getSignalRBaseUrl(): string { - return environment.signalrBaseUrl.replace(/\/gi, window.location.protocol).replace(/\/gi, window.location.hostname); + return environment.signalrBaseUrl + .replace(/\/gi, window.location.protocol) + .replace(/\/gi, window.location.hostname) + .replace(/\/gi, config != undefined ? config.webapi.port : ""); } } \ No newline at end of file diff --git a/ArkBot/WebApp/src/app/server-list/server-list.component.html b/ArkBot/WebApp/src/app/server-list/server-list.component.html index d6ee569..df7f1f0 100644 --- a/ArkBot/WebApp/src/app/server-list/server-list.component.html +++ b/ArkBot/WebApp/src/app/server-list/server-list.component.html @@ -16,7 +16,7 @@

Hello, {{dataService.Servers.User.Name}}

Servers

-

{{server.MapName}} - {{server.Key}}{{server.MapName}} - {{server.Key}}

+

{{server.MapName}} - {{server.Key}}{{server.MapName}} - {{server.Key}}

diff --git a/ArkBot/WebApp/src/assets/Alarm01.mp3 b/ArkBot/WebApp/src/assets/Alarm01.mp3 index f4ab5f6..d96764b 100644 Binary files a/ArkBot/WebApp/src/assets/Alarm01.mp3 and b/ArkBot/WebApp/src/assets/Alarm01.mp3 differ diff --git a/ArkBot/WebApp/src/environments/environment.prod.ts b/ArkBot/WebApp/src/environments/environment.prod.ts index 3c68ef7..c367599 100644 --- a/ArkBot/WebApp/src/environments/environment.prod.ts +++ b/ArkBot/WebApp/src/environments/environment.prod.ts @@ -2,6 +2,6 @@ export const environment = { production: true, demo: false, demoDate: null, - apiBaseUrl: "//:60001/api", - signalrBaseUrl: "//:60001/signalr" + apiBaseUrl: "//:/api", + signalrBaseUrl: "//:/signalr" }; diff --git a/ArkBot/WebApp/src/index.html b/ArkBot/WebApp/src/index.html index 6262b3b..c7c8bc3 100644 --- a/ArkBot/WebApp/src/index.html +++ b/ArkBot/WebApp/src/index.html @@ -9,6 +9,7 @@ + diff --git a/ArkBot/aliases.json b/ArkBot/aliases.json index 5ff05a5..c7e23e1 100644 --- a/ArkBot/aliases.json +++ b/ArkBot/aliases.json @@ -1,262 +1,987 @@ { "Aliases": [ [ - "Achatina", - "Achatina_Character_BP_C", - "Snail", - "Acha" + "Alpha Basilisk", + "MegaBasilisk_Character_BP_C" + ], + [ + "Alpha Karkinos", + "MegaCrab_Character_BP_C", + "Alpha Crab" + ], + [ + "Alpha Reaper King (Surface)", + "MegaXenomorph_Character_BP_Male_Surface_C" + ], + [ + "Aberrant Dodo", + "Dodo_Character_BP_Aberrant_C" + ], + [ + "Featherlight", + "LanternBird_Character_BP_C" + ], + [ + "Edmund Rockwell (Base)", + "Rockwell_Character_BP_C", + "Rockwell (Base)" + ], + [ + "Edmund Rockwell (Alpha)", + "Rockwell_Character_BP_Hard_C", + "Rockwell (Alpha)" + ], + [ + "Edmund Rockwell (Beta)", + "Rockwell_Character_BP_Medium_C", + "Rockwell (Beta)" + ], + [ + "Edmund Rockwell (Gamma)", + "Rockwell_Character_BP_Easy_C", + "Rockwell (Gamma)" + ], + [ + "Rockwell Tentacle (Base)", + "RockwellTentacle_Character_BP_C", + "Tentacle (Base)" + ], + [ + "Rockwell Tentacle (Alpha)", + "RockwellTentacle_Character_BP_Alpha_C", + "Tentacle (Alpha)" + ], + [ + "Rockwell Tentacle (Beta)", + "RockwellTentacle_Character_BP_Beta_C", + "Tentacle (Beta)" + ], + [ + "Rockwell Tentacle (Gamma)", + "RockwellTentacle_Character_BP_Gamma_C", + "Tentacle (Gamma)" + ], + [ + "Aberrant Ankylosaurus", + "Ankylo_Character_BP_Aberrant_C", + "Aberrant Ankylo" + ], + [ + "Aberrant Baryonyx", + "Baryonyx_Character_BP_Aberrant_C" + ], + [ + "Aberrant Carno", + "Carno_Character_BP_Aberrant_C" + ], + [ + "Aberrant Dimorphodon", + "Dimorph_Character_BP_Aberrant_C" + ], + [ + "Aberrant Diplodocus", + "Diplodocus_Character_BP_Aberrant_C", + "Aberrant Diplo" + ], + [ + "Aberrant Iguanodon", + "Iguanodon_Character_BP_Aberrant_C" + ], + [ + "Aberrant Megalosaurus", + "Megalosaurus_Character_BP_Aberrant_C" + ], + [ + "Aberrant Parasaurolophus", + "Para_Character_BP_Aberrant_C", + "Aberrant Parasaur" + ], + [ + "Aberrant Raptor", + "Raptor_Character_BP_Aberrant_C" + ], + [ + "Aberrant Spinosaurus", + "Spino_Character_BP_Aberrant_C", + "Aberrant Spino" + ], + [ + "Aberrant Stegosaurus", + "Stego_Character_BP_Aberrant_C", + "Aberrant Stego" + ], + [ + "Aberrant Triceratops", + "Trike_Character_BP_Aberrant_C", + "Aberrant Trike" + ], + [ + "Elemental Reaper King", + "Xenomorph_Character_BP_Male_Minion_C" + ], + [ + "Nameless", + "ChupaCabra_Character_BP_C" + ], + [ + "Nameless (Minion)", + "ChupaCabra_Character_BP_Minion_C" + ], + [ + "Nameless (Surface)", + "ChupaCabra_Character_BP_Surface_C" + ], + [ + "Reaper King", + "Xenomorph_Character_BP_Male_Tamed_C" + ], + [ + "Reaper Queen", + "Xenomorph_Character_BP_Female_C" + ], + [ + "Subterranian Reaper King", + "Xenomorph_Character_BP_Male_Chupa_C" + ], + [ + "Surface Reaper King", + "Xenomorph_Character_BP_Male_Surface_C" + ], + [ + "Aberrant Angler", + "Angler_Character_BP_Aberrant_C" + ], + [ + "Aberrant Coelacanth", + "Coel_Character_BP_Aberrant_C", + "Aberrant Coel" + ], + [ + "Aberrant Electrophorus", + "Eel_Character_BP_Aberrant_C", + "Aberrant Eel" + ], + [ + "Lamprey", + "Lamprey_Character_C" + ], + [ + "Aberrant Manta", + "Manta_Character_BP_Aberrant_C" + ], + [ + "Aberrant Piranha", + "Piranha_Character_BP_Aberrant_C" + ], + [ + "Aberrant Sabertooth Salmon", + "Salmon_Character_Aberrant_C", + "Aberrant Salmon" + ], + [ + "Aberrant Achatina", + "Achatina_Character_BP_Aberrant_C", + "Aberrant Snail" + ], + [ + "Aberrant Araneo", + "SpiderS_Character_BP_Aberrant_C", + "Aberrant Spider" + ], + [ + "Aberrant Arthropluera", + "Arthro_Character_BP_Aberrant_C" + ], + [ + "Aberrant Cnidaria", + "Cnidaria_Character_BP_Aberrant_C", + "Aberrant Jellyfish" + ], + [ + "Aberrant Dung Beetle", + "DungBeetle_Character_BP_Aberrant_C" + ], + [ + "Glowbug", + "Lightbug_Character_BaseBP_C" + ], + [ + "Karkinos", + "Crab_Character_BP_C", + "Crab" + ], + [ + "Aberrant Meganeura", + "Dragonfly_Character_BP_Aberrant_C", + "Aberrant Dragonfly" + ], + [ + "Aberrant Pulminoscorpius", + "Scorpion_Character_BP_Aberrant_C", + "Aberrant Scorpion" + ], + [ + "Aberrant Trillobyte", + "Trilobite_Character_Aberrant_C" + ], + [ + "Bulbdog", + "LanternPug_Character_BP_C" + ], + [ + "Aberrant Direbear", + "Direbear_Character_BP_Aberrant_C" + ], + [ + "Aberrant Doedicurus", + "Doed_Character_BP_Aberrant_C" + ], + [ + "Aberrant Equus", + "Equus_Character_BP_Aberrant_C", + "Aberrant Horse" + ], + [ + "Aberrant Gigantopithecus", + "Bigfoot_Character_BP_Aberrant_C", + "Aberrant Bigfoot" + ], + [ + "Aberrant Otter", + "Otter_Character_BP_Aberrant_C" + ], + [ + "Aberrant Ovis", + "Sheep_Character_BP_Aberrant_C", + "Aberrant Sheep" + ], + [ + "Aberrant Paracer", + "Paracer_Character_BP_Aberrant_C" + ], + [ + "Aberrant Purlovia", + "Purlovia_Character_BP_Aberrant_C" + ], + [ + "Ravager", + "CaveWolf_Character_BP_C" + ], + [ + "Roll Rat", + "MoleRat_Character_BP_C", + "Mole" + ], + [ + "Shinehorn", + "LanternGoat_Character_BP_C" + ], + [ + "Basilisk", + "Basilisk_Character_BP_C" + ], + [ + "Aberrant Beelzebufo", + "Toad_Character_BP_Aberrant_C", + "Aberrant Frog" + ], + [ + "Aberrant Carbonemys", + "Turtle_Character_BP_Aberrant_C", + "Aberrant Turtle" + ], + [ + "Aberrant Dimetrodon", + "Dimetro_Character_BP_Aberrant_C" + ], + [ + "Aberrant Diplocaulus", + "Diplocaulus_Character_BP_Aberrant_C" + ], + [ + "Glowtail", + "LanternLizard_Character_BP_C" + ], + [ + "Aberrant Lystrosaurus", + "Lystro_Character_BP_Aberrant_C", + "Aberrant Lystro" + ], + [ + "Aberrant Megalania", + "Megalania_Character_BP_Aberrant_C" + ], + [ + "Aberrant Moschops", + "Moschops_Character_BP_Aberrant_C" + ], + [ + "Rock Drake", + "RockDrake_Character_BP_C" + ], + [ + "Aberrant Sarcosuchus", + "Sarco_Character_BP_Aberrant_C", + "Aberrant Sarco" + ], + [ + "Seeker", + "Pteroteuthis_Char_BP_C" + ], + [ + "Seeker (Surface)", + "Pteroteuthis_Char_BP_Surface_C" + ], + [ + "Aberrant Titanoboa", + "BoaFrill_Character_BP_Aberrant_C" + ], + [ + "Albino Leedsichthys", + "Alpha_Leedsichthys_Character_BP_C" + ], + [ + "Alpha Carnotaurus", + "MegaCarno_Character_BP_C", + "Alpha Carno" + ], + [ + "Alpha Megalodon", + "MegaMegalodon_Character_BP_C" + ], + [ + "Alpha Mosasaur", + "Mosa_Character_BP_Mega_C", + "Alpha Mosa" + ], + [ + "Alpha Mosasaur (Cave)", + "Mosa_Character_BP_Mega_Cave_C", + "Alpha Mosa (Cave)" + ], + [ + "Alpha Raptor", + "MegaRaptor_Character_BP_C" + ], + [ + "Alpha Rex", + "MegaRex_Character_BP_C" + ], + [ + "Alpha Tusoteuthis", + "Mega_Tusoteuthis_Character_BP_C", + "Alpha Squid" + ], + [ + "Giganotosaurus (Base)", + "Gigant_Character_BP_Base_C", + "Giga (Base)" + ], + [ + "Tusoteuthis (Cave Base)", + "Tusoteuthis_Character_BP_CaveBase_C", + "Squid (Cave Base)" + ], + [ + "Archaeopterix", + "Archa_Character_BP_C" + ], + [ + "Argentavis", + "Argent_Character_BP_C" + ], + [ + "Dodo", + "Dodo_Character_BP_C" + ], + [ + "Hesperornis", + "Hesperornis_Character_BP_C" + ], + [ + "Ichthyornis", + "Ichthyornis_Character_BP_C", + "Seagull" + ], + [ + "Kairuku", + "Kairuku_Character_BP_C", + "Penguin" + ], + [ + "Pelagornis", + "Pela_Character_BP_C" + ], + [ + "Terror Bird", + "TerrorBird_Character_BP_C" + ], + [ + "Araneo (Boss Minion) (Alpha)", + "SpiderS_Character_BP_Aggressive_Hard_C", + "Spider (Boss Minion) (Alpha)" + ], + [ + "Araneo (Boss Minion) (Beta)", + "SpiderS_Character_BP_Aggressive_Med_C", + "Spider (Boss Minion) (Beta)" + ], + [ + "Araneo (Boss Minion) (Gamma)", + "SpiderS_Character_BP_Aggressive_C", + "Spider (Boss Minion) (Gamma)" + ], + [ + "Broodmother (Alpha)", + "SpiderL_Character_BP_Hard_C" + ], + [ + "Broodmother (Alpha) (The Center)", + "SpiderL_Character_BP_TheCenterHard_C" + ], + [ + "Broodmother (Beta)", + "SpiderL_Character_BP_Medium_C" + ], + [ + "Broodmother (Beta) (The Center)", + "SpiderL_Character_BP_TheCenterMedium_C" + ], + [ + "Broodmother (Gamma)", + "SpiderL_Character_BP_Easy_C" + ], + [ + "Broodmother (Gamma) (The Center)", + "SpiderL_Character_BP_TheCenter_C" + ], + [ + "Broodmother (Base)", + "SpiderL_Character_BP_C" + ], + [ + "Dimorphodon (Boss Minion) (Alpha)", + "Dimorph_Character_BP_Aggressive_DragonBoss_Hard_C" + ], + [ + "Dimorphodon (Boss Minion) (Bets)", + "Dimorph_Character_BP_Aggressive_DragonBoss_Med_C" + ], + [ + "Dimorphodon (Boss Minion) (Gamma)", + "Dimorph_Character_BP_Aggressive_DragonBoss_C" + ], + [ + "Dimorphodon (Boss Minion) (Base)", + "Dimorph_Character_BP_Aggressive_C" + ], + [ + "Dragon (Alpha)", + "Dragon_Character_BP_Boss_Hard_C" + ], + [ + "Dragon (Beta)", + "Dragon_Character_BP_Boss_Medium_C" + ], + [ + "Dragon (Gamma)", + "Dragon_Character_BP_Boss_Easy_C" + ], + [ + "Dragon (Base)", + "Dragon_Character_BP_Boss_C" + ], + [ + "Dragon (Old)", + "Dragon_Character_BP_C" + ], + [ + "End Boss Drone (Alpha)", + "EndDrone_Character_BP_Hard_C" + ], + [ + "End Boss Drone (Beta)", + "EndDrone_Character_BP_Med_C" + ], + [ + "End Boss Drone (Gamma)", + "EndDrone_Character_BP_C" + ], + [ + "End Boss Tank (Alpha)", + "EndTank_Character_BP_Hard_C" + ], + [ + "End Boss Tank (Beta)", + "EndTank_Character_BP_Med_C" + ], + [ + "End Boss Tank (Gamma)", + "EndTank_Character_BP_C" + ], + [ + "Gigantopithecus (Boss Minion) (Alpha)", + "Bigfoot_Character_BP_Aggressive_Hard_C", + "Bigfoot (Boss Minion) (Alpha)" + ], + [ + "Gigantopithecus (Boss Minion) (Beta)", + "Bigfoot_Character_BP_Aggressive_Med_C", + "Bigfoot (Boss Minion) (Beta)" + ], + [ + "Gigantopithecus (Boss Minion) (Gamma)", + "Bigfoot_Character_BP_Aggressive_C", + "Bigfoot (Boss Minion) (Gamma)" + ], + [ + "Megapithecus (Alpha)", + "Gorilla_Character_BP_Hard_C" + ], + [ + "Megapithecus (Alpha) (The Center)", + "Gorilla_Character_BP_TheCenter_Hard_C" + ], + [ + "Megapithecus (Beta)", + "Gorilla_Character_BP_Medium_C" + ], + [ + "Megapithecus (Beta) (The Center)", + "Gorilla_Character_BP_TheCenter_Medium_C" + ], + [ + "Megapithecus (Gamma)", + "Gorilla_Character_BP_Easy_C" + ], + [ + "Megapithecus (Gamma) (The Center)", + "Gorilla_Character_BP_TheCenter_C" + ], + [ + "Megapithecus (Base)", + "Gorila_Character_BP_C" + ], + [ + "Mesopithecus (Boss Minion) (Alpha)", + "Monkey_Character_BP_Aggressive_Hard_C", + "Monkey (Boss Minion) (Alpha)" + ], + [ + "Mesopithecus (Boss Minion) (Beta)", + "Monkey_Character_BP_Aggressive_Med_C", + "Monkey (Boss Minion) (Beta)" + ], + [ + "Mesopithecus (Boss Minion) (Gamma)", + "Monkey_Character_BP_Aggressive_C", + "Monkey (Boss Minion) (Gamma)" + ], + [ + "Overseer (Base)", + "EndBoss_Character_C" + ], + [ + "Overseer (Alpha)", + "EndBoss_Character_Hard_C" + ], + [ + "Overseer (Beta)", + "EndBoss_Character_Medium_C" + ], + [ + "Overseer (Gamma)", + "EndBoss_Character_Easy_C" + ], + [ + "Overseer (Gorilla Form) (Base)", + "EndBossGorilla_Character_BP_C" + ], + [ + "Overseer (Gorilla Form) (Alpha)", + "EndBossGorilla_Character_BP_Hard_C" + ], + [ + "Overseer (Gorilla Form) (Beta)", + "EndBossGorilla_Character_BP_Medium_C" + ], + [ + "Overseer (Gorilla Form) (Gamma)", + "EndBossGorilla_Character_BP_Easy_C" + ], + [ + "Overseer (Dragon Form) (Base)", + "EndBossDragon_Character_BP_C" + ], + [ + "Overseer (Dragon Form) (Alpha)", + "EndBossDragon_Character_BP_Hard_C" + ], + [ + "Overseer (Dragon Form) (Beta)", + "EndBossDragon_Character_BP_Medium_C" + ], + [ + "Overseer (Dragon Form) (Gamma)", + "EndBossDragon_Character_BP_Easy_C" + ], + [ + "Overseer (Spider Form) (Base)", + "EndBossSpiderL_Character_BP_C" + ], + [ + "Overseer (Spider Form) (Alpha)", + "EndBossSpiderL_Character_BP_Hard_C" + ], + [ + "Overseer (Spider Form) (Beta)", + "EndBossSpiderL_Character_BP_Medium_C" + ], + [ + "Overseer (Spider Form) (Gamma)", + "EndBossSpiderL_Character_BP_Easy_C" + ], + [ + "Pteranodon (Boss Minion) (Alpha)", + "Ptero_Minion_Character_Hard_C" + ], + [ + "Pteranodon (Boss Minion) (Beta)", + "Ptero_Minion_Character_Med_C" + ], + [ + "Pteranodon (Boss Minion) (Gamma)", + "Ptero_Minion_Character_BP_C" + ], + [ + "Allosaurus", + "Allo_Character_BP_C", + "Allo" + ], + [ + "Ankylosaurus", + "Ankylo_Character_BP_C", + "Ankylo" + ], + [ + "Baryonyx", + "Baryonyx_Character_BP_C" + ], + [ + "Brontosaurus", + "Sauropod_Character_BP_C", + "Bronto" + ], + [ + "Carnotaurus", + "Carno_Character_BP_C", + "Carno" + ], + [ + "Compsognathus", + "Compy_Character_BP_C", + "Compy" + ], + [ + "Dilophosaurus", + "Dilo_Character_BP_C", + "Dilo" + ], + [ + "Dimorphodon", + "Dimorph_Character_BP_C" + ], + [ + "Diplodocus", + "Diplodocus_Character_BP_C", + "Diplo" + ], + [ + "Gallimimus", + "Galli_Character_BP_C" + ], + [ + "Megalania", + "Megalania_Character_BP_C" + ], + [ + "Giganotosaurus", + "Gigant_Character_BP_C", + "Giga" + ], + [ + "Giganotosaurus (Tek Cave)", + "Gigant_Character_BP_TekCave_C", + "Giga (Tek Cave)" + ], + [ + "Iguanodon", + "Iguanodon_Character_BP_C" + ], + [ + "Kentrosaurus", + "Kentro_Character_BP_C", + "Kentro" + ], + [ + "Megalosaurus", + "Megalosaurus_Character_BP_C" + ], + [ + "Megalosaurus (Tek Cave)", + "Megalosaurus_Character_BP_TekCave_C" + ], + [ + "Microraptor", + "Microraptor_Character_BP_C" + ], + [ + "Oviraptor", + "OviRaptor_Character_BP_C" ], [ - "Allosaurus", - "Allo_Character_BP_C", - "Allo" + "Pachycephalosaurus", + "Pachy_Character_BP_C", + "Pachy" ], [ - "Alpha Carno", - "MegaCarno_Character_BP_C" + "Pachyrhinosaurus", + "Pachyrhino_Character_BP_C", + "Pachy Rhino" ], [ - "Alpha Deathworm", - "MegaDeathworm_Character_BP_C" + "Motorboat", + "MotorRaft_BP_C" ], [ - "Alpha Fire Wyvern", - "MegaWyvern_Character_BP_Fire_C" + "Parasaurolophus", + "Para_Character_BP_C", + "Parasaur" ], [ - "Alpha Leedsichthys", - "Alpha_Leedsichthys_Character_BP_C", - "Alpha Leeds" + "Raptor", + "Raptor_Character_BP_C" ], [ - "Alpha Megalodon", - "MegaMegalodon_Character_BP_C" + "Rex", + "Rex_Character_BP_C" ], [ - "Alpha Mosasaurus", - "Mosa_Character_BP_Mega_C" + "Spinosaurus", + "Spino_Character_BP_C", + "Spino" ], [ - "Alpha Raptor", - "MegaRaptor_Character_BP_C" + "Stegosaurus", + "Stego_Character_BP_C", + "Stego" ], [ - "Alpha Rex", - "MegaRex_Character_BP_C" + "Therizinosaurus", + "Therizino_Character_BP_C", + "Therizino" ], [ - "Alpha Tusoteuthis", - "Mega_Tusoteuthis_Character_BP_C" + "Titanosaur", + "Titanosaur_Character_BP_C", + "Titan" ], [ - "Ammonite", - "Ammonite_Character_C" + "Triceratops", + "Trike_Character_BP_C", + "Trike" ], [ - "Angler", - "Angler_Character_BP_C", - "Anglerfish" + "Troodon", + "Troodon_Character_BP_C" ], [ - "Ankylosaurus", - "Ankylo_Character_BP_C", - "Ankylo", - "Anky" + "Yutyrannus", + "Yutyrannus_Character_BP_C", + "Yuty" ], [ - "Araneo", - "SpiderS_Character_BP_C", - "Spider" + "Tek Rex", + "BionicRex_Character_BP_C" ], [ - "Archaeopteryx", - "Archa_Character_BP_C", - "Archa" + "Zombie Dodo", + "ZombieDodo_Character_BP_C" ], [ - "Argentavis", - "Argent_Character_BP_C", - "Argent", - "Argi" + "Unicorn", + "Equus_Character_BP_Unicorn_C" ], [ - "Arthropluera", - "Arthro_Character_BP_C", - "Arthro", - "Centipede" + "Yeti", + "Yeti_Character_BP_C" ], [ - "Baryonyx", - "Baryonyx_Character_BP_C", - "Bary" + "Angler", + "Angler_Character_BP_C" ], [ - "Basilosaurus", - "Basilosaurus_Character_BP_C", - "Basilo" + "Coelacanth", + "Coel_Character_BP_C", + "Coel" ], [ - "Beelzebufo", - "Toad_Character_BP_C", - "Toad" + "Coelacanth (Deep Sea)", + "Coel_Character_BP_Ocean_C", + "Coel (Deep Sea)" ], [ - "Bone Fire Wyvern", - "Bone_MegaWyvern_Character_BP_Fire_C" + "Dunkleosteus", + "Dunkle_Character_BP_C", + "Dunkleo" ], [ - "Brontosaurus", - "Sauropod_Character_BP_C", - "Bronto" + "Electrophorus", + "Eel_Character_BP_C", + "Eel" ], [ - "Broodmother Lysrix", - "SpiderL_Character_BP_C" + "Leedsichthys", + "Leedsichthys_Character_BP_C" ], [ - "BunnyDodo", - "Dodo_Character_BP_Bunny", - "Bunny Dodo" + "Manta", + "Manta_Character_BP_C" ], [ - "BunnyOviraptor", - "BunnyOviRaptor_Character_BP", - "Bunny Oviraptor" + "Raft", + "Raft_BP_C" ], [ - "Carbonemys", - "Turtle_Character_BP_C", - "Turtle" + "Megalodon", + "Megalodon_Character_BP_C" ], [ - "Carnotaurus", - "Carno_Character_BP_C", - "Carno" + "Piranha", + "Piranha_Character_BP_C" ], [ - "Castoroides", - "Beaver_Character_BP_C", - "Beaver" + "Sabertooth Salmon", + "Salmon_Character_BP_C" ], [ - "Chalicotherium", - "Chalico_Character_BP_C", - "Chalico", - "Cow" + "Achatina", + "Achatina_Character_BP_C", + "Snail" ], [ - "Cnidaria", - "Cnidaria_Character_BP_C" + "Ammonite", + "Ammonite_Character_C" ], [ - "Coelacanth", - "Coel_Character_BP_C", - "Coel" + "Araneo", + "SpiderS_Character_BP_C", + "Spider" ], [ - "Ocean Coelacanth", - "Coel_Character_BP_Ocean_C", - "Ocean Coel" + "Arthropluera", + "Arthro_Character_BP_C" ], [ - "Compsognathus", - "Compy_Character_BP_C", - "Compy" + "Cnidaria", + "Cnidaria_Character_BP_C", + "Jellyfish" ], [ - "Daeodon", - "Daeodon_Character_BP_C", - "Hell Pig" + "Diseased Leech", + "Leech_Character_Diseased_C" ], [ - "Deathworm", - "Deathworm_Character_BP_C" + "Dung Beetle", + "DungBeetle_Character_BP_C" ], [ - "Dilophosaur", - "Dilo_Character_BP_C", - "Dilo" + "Eurypterid", + "Euryp_Character_C", + "Sea Scorpion" ], [ - "Dimetrodon", - "Dimetro_Character_BP_C", - "Dimetro" + "Giant Bee Drone", + "Bee_Character_BP_C" ], [ - "Dimorphodon", - "Dimorph_Character_BP_C", - "Dimorph", - "Dimo" + "Giant Bee Queen", + "Bee_Queen_Character_BP_C" ], [ - "Diplocaulus", - "Diplocaulus_Character_BP_C", - "Newt" + "Leech", + "Leech_Character_C" ], [ - "Diplodocus", - "Diplodocus_Character_BP_C" + "Skeletal Rex", + "Bone_MegaRex_Character_BP_C", + "Skele Rex" ], [ - "Direbear", - "Direbear_Character_BP_C", - "Dire Bear", - "Bear" + "Meganeura", + "Dragonfly_Character_BP_C", + "Dragonfly" ], [ - "Dire Polar Bear", - "Direbear_Character_Polar_C", - "Direbear Polar", - "Dire Bear Polar" + "Pulminoscorpius", + "Scorpion_Character_BP_C", + "Scorpion" ], [ - "Direwolf", - "Direwolf_Character_BP_C", - "Dire Wolf", - "Wolf" + "Titanomyrma", + "Ant_Character_BP_C", + "Ant" ], [ - "Dodo", - "Dodo_Character_BP_C", - "Chicken" + "Titanomyrma (Flying)", + "FlyingAnt_Character_BP_C", + "Flying Ant" ], [ - "Dodo Wyvern", - "DodoWyvern_Character_BP_C" + "Trilobyte", + "Trilobite_Character_C" ], [ - "DodoRex", - "DodoRex_Character_BP_C", - "Dodo Rex" + "Tusoteuthis", + "Tusoteuthis_Character_BP_C", + "Squid" ], [ - "Doedicurus", - "Doed_Character_BP_C", - "Doed" + "Tusoteuthis (Cave)", + "Tusoteuthis_Character_BP_Caves_C", + "Squid (Cave)" ], [ - "Dragon", - "Dragon_Character_BP_Boss_C" + "Basilosaurus", + "Basilosaurus_Character_BP_C", + "Basilo" + ], + [ + "Castroides", + "Beaver_Character_BP_C", + "Giant Beaver" ], [ - "Dragonfly", - "Dragonfly_Character_BP_C" + "Chalicotherium", + "Chalico_Character_BP_C", + "Chalico" ], [ - "Dung Beetle", - "DungBeetle_Character_BP_C", - "Beetle" + "Daeodon", + "Daeodon_Character_BP_C" ], [ - "Dunkleosteus", - "Dunkle_Character_BP_C", - "Dunkle" + "Direbear", + "Direbear_Character_BP_C" ], [ - "Electrophorus", - "Eel_Character_BP_C", - "Eel", - "Electro" + "Direwolf", + "Direwolf_Character_BP_C" + ], + [ + "Doedicurus", + "Doed_Character_BP_C", + "Doedic" ], [ "Equus", @@ -264,127 +989,115 @@ "Horse" ], [ - "Unicorn", - "Equus_Character_BP_Unicorn_C" + "Gigantopithecus", + "BigFoot_Character_BP_C", + "Bigfoot" ], [ - "Eurypterid", - "Euryp_Character_C", - "Euryp" + "Hyaenodon", + "Hyaenodon_Character_BP_C" ], [ - "Gallimimus", - "Galli_Character_BP_C", - "Galli" + "Mammoth", + "Mammoth_Character_BP_C" ], [ - "Giant Bee", - "Bee_Queen_Character_BP_C", - "Bee Queen", - "Bee" + "Megaloceros", + "Stag_Character_BP_C", + "Deer" ], [ - "Giganotosaurus", - "Gigant_Character_BP_C", - "Giga" + "Megatherium", + "Megatherium_Character_BP_C", + "Sloth" ], [ - "Gigantopithecus", - "Bigfoot_Character_BP_C" + "Mesopithecus", + "Monkey_Character_BP_C", + "Monkey" ], [ - "Griffin", - "Griffin_Character_BP_C", - "Gryphon" + "Onychonycteris", + "Bat_Character_BP_C", + "Onyc", + "Bat" ], [ - "Hesperornis", - "Hesperornis_Character_BP_C", - "Duck" + "Otter", + "Otter_Character_BP_C" ], [ - "Human" + "Ovis", + "Sheep_Character_BP_C", + "Sheep" ], [ - "Hyaenodon", - "Hyaenodon_Character_BP_C", - "Hyena" + "Paracer", + "Paracer_Character_BP_C" ], [ - "Ice Worm Queen", - "Iceworm_Queen_Character_BP_C" + "Phiomia", + "Phiomia_Character_BP_C" ], [ - "Ice Worm", - "Iceworm_Character_Minion_BP_Smaller_C" + "Polar Bear (Island)", + "Direbear_Character_Polar_C" ], [ - "Ichthy", - "Dolphin_Character_BP_C", - "Ichthyosaurus", - "Dolphin" + "Procoptodon", + "Procoptodon_Character_BP_C", + "Kangaroo" ], [ - "Ichthyornis", - "Ichthyornis_Character_BP_C", - "Seagull" + "Purlovia", + "Purlovia_Character_BP_C" ], [ - "Iguanodon", - "Iguanodon_Character_BP_C", - "Iguan" + "Purlovia (Polar)", + "Purlovia_Character_BP_Polar_C" ], [ - "Jerboa", - "Jerboa_Character_BP_C" + "Sabertooth", + "Saber_Character_BP_C" ], [ - "Jug Bug", - "Jugbug_Character_BaseBP_C", - "Jugbug_Oil_Character_BP_C", - "Jugbug_Water_Character_BP_C" + "Thylacoleo", + "Thylacoleo_Character_BP_C", + "Thyla" ], [ - "Kairuku", - "Kairuku_Character_BP_C", - "Penguin" + "Wooly Rhino", + "Rhino_Character_BP_C" ], [ - "Kaprosuchus", - "Kaprosuchus_Character_BP_C", - "Kapro", - "Gator", - "Jumping Crocodile" + "Beelzebufo", + "Toad_Character_BP_C", + "Frog" ], [ - "Kentrosaurus", - "Kentro_Character_BP_C", - "Kentro" + "Carbonemys", + "Turtle_Character_BP_C", + "Turtle" ], [ - "Leech", - "Leech_Character_C" + "Dimetrodon", + "Dimetro_Character_BP_C" ], [ - "Leech Diseased", - "Leech_Character_Diseased_C", - "Diseased Leech" + "Diplocaulus", + "Diplocaulus_Character_BP_C" ], [ - "Leedsichthys", - "Leedsichthys_Character_BP_C", - "Leeds" + "Ichthyosaurus", + "Dolphin_Character_BP_C" ], [ - "Liopleurodon", - "Liopleurodon_Character_BP_C", - "Lio" + "Kaprosuchus", + "Kaprosuchus_Character_BP_C" ], [ - "Lymantria", - "Moth_Character_BP_C", - "Moth", - "Desert Moth" + "Liopleurodon", + "Liopleurodon_Character_BP_C" ], [ "Lystrosaurus", @@ -392,735 +1105,640 @@ "Lystro" ], [ - "Mammoth", - "Mammoth_Character_BP_C" - ], - [ - "Manta", - "Manta_Character_BP_C" + "Mosasaurus (Cave)", + "Mosa_Character_BP_Cave_C", + "Mosa (Cave)" ], [ - "Manticore", - "Manticore_Character_BP_C" + "Mosasaurus", + "Mosa_Character_BP_C", + "Mosa" ], [ - "Mantis", - "Mantis_Character_BP_C" + "Moschops", + "Moschops_Character_BP_C" ], [ - "Megalania", - "Megalania_Character_BP_C" + "Pegomastax", + "Pegomastax_Character_BP_C", + "Pego" ], [ - "Megaloceros", - "Stag_Character_BP_C", - "Megaloc", - "Stag", - "Deer" + "Plesiosaur", + "Plesiosaur_Character_BP_C", + "Plesio" ], [ - "Megalodon", - "Megalodon_Character_BP_C", - "Shark" + "Pteranodon", + "Ptero_Character_BP_C", + "Ptera" ], [ - "Megalosaurus", - "Megalosaurus_Character_BP_C", - "Megalos", - "Sleeping Raptor" + "Quetzalcoatlus", + "Quetz_Character_BP_C", + "Quetz" ], [ - "Megapithecus", - "Gorilla_Character_BP_C" + "Sarcosuchus", + "Sarco_Character_BP_C", + "Sarco" ], [ - "Megatherium", - "Megatherium_Character_BP_C" + "Tapejara", + "Tapejara_Character_BP_C" ], [ - "Mesopithecus", - "Monkey_Character_BP_C", - "Monkey" + "Titanoboa", + "BoaFrill_Character_BP_C" ], [ - "Microraptor", - "Microraptor_Character_BP_C" + "Tek ATV", + "VH_Buggy_C" ], [ - "Morellatops", - "camelsaurus_Character_BP_C", - "Camelsaurus" + "Dragon (Alpha) (Ragnarok)", + "Dragon_Character_BP_Boss_Hard_Ragnarok_C" ], [ - "Mosasaurus", - "Mosa_Character_BP_C", - "Mosa" + "Dragon (Beta) (Ragnarok)", + "Dragon_Character_BP_Boss_Medium_Ragnarok_C" ], [ - "Moschops", - "Moschops_Character_BP_C" + "Dragon (Gamma) (Ragnarok)", + "Dragon_Character_BP_Boss_Easy_Ragnarok_C" ], [ - "Motorboat", - "MotorRaft_BP_C" + "Griffin (Boss Minion)", + "Griffin_Character_Minion_BP_C" ], [ - "Onyc", - "Bat_Character_BP_C", - "Bat" + "Ice Worm Queen", + "Iceworm_Queen_Character_BP_C" ], [ - "Otter", - "Otter_Character_BP_C" + "Lava Elemental", + "LavaGolem_Character_BP_C" ], [ - "Oviraptor", - "Oviraptor_Character_BP_C" + "Manticore (Alpha) (Ragnarok)", + "Manticore_Character_BP_Hard_Ragnarok_C" ], [ - "Ovis", - "Sheep_Character_BP_C", - "Sheep" + "Manticore (Beta) (Ragnarok)", + "Manticore_Character_BP_Medium_Ragnarok_C" ], [ - "Pachycephalosaurus", - "Pachy_Character_BP_C", - "Pachy" + "Manticore (Gamma) (Ragnarok)", + "Manticore_Character_BP_Easy_Ragnarok_C" ], [ - "Pachyrhinosaurus", - "Pachyrhino_Character_BP_C", - "Pachyrhino" + "Direbear (Lifes Labyrinth)", + "Direbear_LL_Character_BP_C" ], [ - "Paracer", - "Paracer_Character_BP_C", - "Paraceratherium" + "Direwolf (Lifes Labyrinth)", + "Direwolf_LL_Character_BP_C" ], [ - "Parasaur", - "Para_Character_BP_C", - "Para" + "Griffin", + "Griffin_Character_BP_C" ], [ - "Pegomastax", - "Pegomastax_Character_BP_C", - "Pego", - "Thief" + "Iceworm Male", + "Iceworm_Character_Minion_BP_smaller_C" ], [ - "Pelagornis", - "Pela_Character_BP_C", - "Pela", - "Stork", - "Pelican" + "Megaloceros (Lifes Labyrinth)", + "Stag_LL_Character_BP_C", + "Deer (Lifes Labyrinth)" ], [ - "Phiomia", - "Phiomia_Character_BP_C", - "Pig" + "Fire Wyvern (Ragnarok)", + "Ragnarok_Wyvern_Override_C" ], [ - "Phoenix", - "Phoenix_Character_BP_C", - "Firebird" + "Ice Wyvern", + "Ragnarok_Wyvern_Override_Ice_C" ], [ - "Polar Bear", + "Dire Polar Bear (Ragnarok)", "Polar_Bear_C" ], [ - "Piranha", - "Piranha_Character_BP_C", - "Megapiranha" - ], - [ - "Plesiosaur", - "Plesiosaur_Character_BP_C", - "Plesi" + "Alpha Deathworm", + "MegaDeathworm_Character_BP_C" ], [ - "Procoptodon", - "Procoptodon_Character_BP_C" + "Alpha Wyvern", + "MegaWyvern_Character_BP_Fire_C" ], [ - "Pteranodon", - "Ptero_Character_BP_C", - "Ptero", - "Ptera" + "Wyvern (Base)", + "Wyvern_Character_BP_Base_C" ], [ - "Pulmonoscorpius", - "Scorpion_Character_BP_C", - "Scorpion", - "Scorpius", - "Pulmono", - "Scorp", - "Pulminoscorpius" + "Zombie Wyvern (Base)", + "Wyvern_Character_BP_ZombieBase" ], [ - "Purlovia", - "Purlovia_Character_BP_C" + "Vulture", + "Vulture_Character_BP_C" ], [ - "Purlovia Polar", - "Purlovia_Character_BP_Polar_C" + "Deathworm (Boss Minion)", + "Deathworm_Character_Minion_BP_C" ], [ - "Quetzalcoatl", - "Quetz_Character_BP_C", - "Quetzal", - "Quetz" + "Manticore (Alpha)", + "Manticore_Character_BP_Hard_C" ], [ - "Raft", - "Raft_BP_C" + "Manticore (Beta)", + "Manticore_Character_BP_Medium_C" ], [ - "Raptor", - "Raptor_Character_BP_C" + "Manticore (Gamma)", + "Manticore_Character_BP_Easy_C" ], [ - "Tyrannosaurus", - "Rex_Character_BP_C", - "Rex" + "Manticore (Base)", + "Manticore_Character_BP_C" ], [ - "Rock Elemental", - "RockGolem_Character_BP_C", - "Rock Golem", - "Golem" + "Rock Golem (Boss Minion)", + "RockGolem_Character_Minion_BP_C" ], [ - "Rubble Golem", - "RubbleGolem_Character_BP_C" + "Morellatops", + "Camelsaurus_Character_BP_C" ], [ - "Lava Elemental", - "LavaGolem_Character_BP_C", - "Lava Golem" + "Zombie Wyvern (Fire)", + "Wyvern_Character_BP_ZombieFire_c" + ], [ - "Sabertooth", - "Saber_Character_BP_C", - "Saber" + "Zombie Wyvern (Lightning)", + "Wyvern_Character_BP_ZombieLightning_c" ], [ - "Sabertooth Salmon", - "Salmon_Character_BP_C", - "Salmon" + "Zombie Wyvern (Poison)", + "Wyvern_Character_BP_ZombiePoison_C" ], [ - "Sarcosuchus", - "Sarco_Character_BP_C", - "Sarco", - "Crocodile" + "Deathworm", + "Deathworm_Character_BP_C" ], [ - "Skeletal Bronto", - "Bone_Sauropod_Character_BP_C", - "Skele Bronto" + "Phoenix", + "Phoenix_Character_BP_C" ], [ - "Skeletal Carnotaurus", - "Bone_MegaCarno_Character_BP_C", - "Skele Carno" + "Rock Golem", + "RockGolem_Character_BP_C" ], [ - "Skeletal Giganotosaurus", - "Bone_Gigant_Character_BP_C", - "Skele Giga" + "Rubble Golem", + "RubbleGolem_Character_BP_C" ], [ - "Skeletal Jerboa", - "Bone_Jerboa_Character_BP_C", - "Skele Jerboa" + "Fire Wyvern", + "Wyvern_Character_BP_Fire_C" ], [ - "Skeletal Quetzal", - "Bone_Quetz_Character_BP_C", - "Skeletal Quetz", - "Skele Quetzal", - "Skele Quetz" + "Lightning Wyvern", + "Wyvern_Character_BP_Lightning_C" ], [ - "Skeletal Raptor", - "Bone_MegaRaptor_Character_BP_C", - "Skele Raptor" + "Poison Wyvern", + "Wyvern_Character_BP_Poison_C" ], [ - "Skeletal Rex", - "Bone_MegaRex_Character_BP_C", - "Skele Rex" + "Jugbug", + "JugBug_Character_BaseBP_C" ], [ - "Skeletal Stego", - "Bone_Stego_Character_BP_C", - "Skele Stego" + "Jugbug (Oil)", + "Jugbug_Oil_Character_BP_C" ], [ - "Skeletal Trike", - "Bone_Trike_Character_BP_C", - "Skele Trike" + "Jugbug (Water)", + "Jugbug_Water_Character_BP_C" ], [ - "Spinosaur", - "Spino_Character_BP_C", - "Spinosaurus", - "Spino" + "Lymantria", + "Moth_Character_BP_C", + "Moth" ], [ - "Stegosaurus", - "Stego_Character_BP_C", - "Stego" + "Mantis", + "Mantis_Character_BP_C" ], [ - "Tapejara", - "Tapejara_Character_BP_C" + "Jerboa", + "Jerboa_Character_BP_C" ], [ - "Terror Bird", - "TerrorBird_Character_BP_C", - "Terrorbird" + "Thorny Dragon", + "SpineyLizard_Character_BP_C" ], [ - "Therizinosaur", - "Therizino_Character_BP_C", - "Therizinosaurus", - "Therizino", - "Theriz" + "Tek Stegosaurus", + "BionicStego_Character_BP_C", + "Tek Stego" ], [ - "Thorny Dragon", - "SpineyLizard_Character_BP_C", - "Spiney Lizard" + "Tek Raptor", + "BionicRaptor_Character_BP_C" ], [ - "Thylacoleo", - "Thylacoleo_Character_BP_C", - "Thyla" + "Giant Worker Bee", + "HoneyBee_Character_BP_C" ], [ - "Titanoboa", - "BoaFrill_Character_BP_C", - "Boa", - "Snake" + "Zombie Wyvern (Base) (Crystal Isles)", + "ZombieWyvern_Character_BP_Base_C" ], [ - "Flying Titanomyrma", - "FlyingAnt_Character_BP_C", - "Flying Giant Ant", - "Flying Ant" + "Zombie Wyvern (Base Zombie) (Crystal Isles)", + "ZombieWyvern_Character_BP_BaseZombie_C" ], [ - "Titanomyrma", - "Ant_Character_BP_C", - "Giant Ant", - "Ant" + "Zombie Wyvern (Fire) (Crystal Isles)", + "ZombieWyvern_Character_BP_Fire_C" ], [ - "Titanosaur", - "Titanosaur_Character_BP", - "Titan" + "Zombie Wyvern (Lightning) (Crystal Isles)", + "ZombieWyvern_Character_BP_Lightning_C" ], [ - "Triceratops", - "Trike_Character_BP_C", - "Trike" + "Zombie Wyvern (Poison) (Crystal Isles)", + "ZombieWyvern_Character_BP_Poison_C" ], [ - "Trilobite", - "Trilobite_Character_C" + "Tusoteuthis (Tiny)", + "TinyTuso_Character_BP_C", + "Tuso (Tiny)" ], [ - "Troodon", - "Troodon_Character_BP_C" + "Liquefied Brontosaurus", + "LiquefiedBronto_Sauropod_Character_BP_C", + "Liquefied Bronto" ], [ - "Turkey", - "Turkey_Character_BP_C" + "Liquefied Giganotosaurus", + "Liquefied_Gigant_Character_BP_C", + "Liquefied Giga" ], [ - "Tusoteuthis", - "Tusoteuthis_Character_BP_C", - "Giant Squid", - "Squid" + "Liquefied Jerboa", + "LiquefiedJerboa_Character_BP_C" ], [ - "Vulture", - "Vulture_Character_BP_C" + "Liquefied Quetzalcoatlus", + "LiquefiedQuetz_Character_BP_C", + "Liquefied Quetz" ], [ - "Woolly Rhino", - "Rhino_Character_BP_C", - "Woolly Rhinoceros", - "Rhino" + "Liquefied Raptor", + "LiquefiedRaptor_Character_BP_C" ], [ - "Fire Wyvern", - "Wyvern_Character_BP_Fire_C" + "Liquefied Rex", + "LiquefiedRex_Character_BP_C" ], [ - "Lightning Wyvern", - "Wyvern_Character_BP_Lightning_C" + "Liquefied Stegosaurus", + "LiquefiedStego_Character_BP_C", + "Liquefied Stego" ], [ - "Poison Wyvern", - "Wyvern_Character_BP_Poison_C" + "Liquefied Triceratops", + "LiquefiedTrike_Character_BP_C", + "Liquefied Trike" ], [ - "Ice Wyvern", - "Ragnarok_Wyvern_Override_Ice_C" + "Liquefied Wyvern", + "LiquefiedWyvern_Character_BP_C" ], [ - "Yeti", - "Yeti_Character_BP_C" + "Alpha Liquefied Wyvern", + "LiquefiedMegaWyvern_Character_BP_C" ], [ - "Yutyrannus", - "Yutyrannus_Character_BP_C" + "Grand Embertross", + "GrandEmbertross_Character_BP_C" ], [ - "Zombie Fire Wyvern", - "Wyvern_Character_BP_ZombieFire_C" + "Crystal Griffin", + "CrystalGriffin_Character_BP_C" ], [ - "Zombie Lightning Wyvern", - "Wyvern_Character_BP_ZombieLightning_C" + "Blood Crystal Wyvern", + "CrystalWyvern_Character_BP_Blood_C" ], [ - "Zombie Poison Wyvern", - "Wyvern_Character_BP_ZombiePoison_C" + "Ember Crystal Wyvern", + "CrystalWyvern_Character_BP_Ember_C" ], [ - "Zomdodo", - "ZombieDodo_Character_BP_C", - "Zombie Dodo", - "Zombiedodo" + "Tropical Crystal Wyvern", + "CrystalWyvern_Character_BP_WS_C" ], [ - "Aberrant Achatina", - "Achatina_Character_BP_Aberrant_C", - "Aberrant Snail", - "Aberrant Acha" + "Alpha Fire Wyvern (Crystal Isles)", + "MegaCrystalWyvern_Character_BP_C" ], [ - "Aberrant Angler", - "Angler_Character_BP_Aberrant_C", - "Aberrant Anglerfish" + "Crystal Wyvern (Base)", + "CrystalWyvern_Character_BP_Base_C" ], [ - "Aberrant Ankylosaurus", - "Ankylo_Character_BP_Aberrant_C", - "Aberrant Ankylo", - "Aberrant Anky" + "Female Argentavis", + "Female_Argent_Character_BP_C" ], [ - "Aberrant Arthropluera", - "Arthro_Character_BP_Aberrant_C", - "Aberrant Arthro", - "Aberrant Centipede" + "Baby Ankylosaurus", + "Ankylo_Character_BP_Child_C", + "Baby Anky" ], [ - "Aberrant Baryonyx", - "Baryonyx_Character_BP_Aberrant_C", - "Aberrant Bary" + "Alpha Ovis", + "AlphaSheep_Character_BP_C", + "Alpha Sheep" ], [ - "Basilisk", - "Basilisk_Character_BP_C" + "Baby Allosaurus", + "Allo_Character_BP_Child_C", + "Baby Allo" ], [ - "Aberrant Titanoboa", - "BoaFrill_Character_BP_Aberrant_C", - "Aberrant Boa", - "Aberrant Snake" + "Baby Carbonemys", + "Turtle_Character_BP_Child_C", + "Baby Turtle" ], [ - "Aberrant Carnotaurus", - "Carno_Character_BP_Aberrant_C", - "Aberrant Carno" + "Baby Triceratops", + "Trike_Character_BP_Child_C", + "Baby Trike" ], [ - "Ravager", - "CaveWolf_Character_BP_C", - "Cave Wolf" + "Baby Thylacoleo", + "Thylacoleo_Character_BP_Child_C" ], [ - "Nameless", - "ChupaCabra_Character_BP_C", - "Chupa Cabra" + "Baby Therizinosaurus", + "Therizino_Character_BP_Child_C", + "Baby Therizino" ], [ - "Nameless Surface", - "ChupaCabra_Character_BP_Surface_C", - "Chupa Cabra Surface" + "Baby Terror Bird", + "TerrorBird_Character_BP_Child_C" ], [ - "Aberrant Cnidaria", - "Cnidaria_Character_BP_Aberrant_C" + "Baby Tapejara", + "Tapejara_Character_BP_Child_C" ], [ - "Aberrant Coelacanth", - "Coel_Character_BP_Aberrant_C", - "Aberrant Coel" + "Baby Stegosaurus", + "Stego_Character_BP_Child_C", + "Baby Stego" ], [ - "Karkinos", - "Crab_Character_BP_C", - "Crab" + "Baby Megaloceros", + "Stag_Character_BP_Child_C", + "Baby Deer" ], [ - "Aberrant Dimetrodon", - "Dimetro_Character_BP_Aberrant_C", - "Aberrant Dimetro" + "Baby Thorny Dragon", + "SpineyLizard_Character_BP_Child_C" ], [ - "Aberrant Diplocaulus", - "Diplocaulus_Character_BP_Aberrant_C", - "Aberrant Newt" + "Snow Rock Golem", + "SnowRockGolem_Character_BP_C" ], [ - "Aberrant Diplodocus", - "Diplodocus_Character_BP_Aberrant_C" + "Baby Brontosaurus", + "Sauropod_Character_BP_Child_C", + "Baby Bronto" ], [ - "Aberrant Dodo", - "Dodo_Character_BP_Aberrant_C", - "Aberrant Chicken" + "Baby Sarcosuchus", + "Sarco_Character_BP_Child_C", + "Baby Sarco" ], [ - "Aberrant Doedicurus", - "Doed_Character_BP_Aberrant_C", - "Aberrant Doed" + "Baby Sabertooth", + "Saber_Character_BP_Child_C" ], [ - "Aberrant Dragonfly", - "Dragonfly_Character_BP_Aberrant_C" + "Baby Wooly Rhino", + "Rhino_Character_BP_Child_C" ], [ - "Aberrant Dung Beetle", - "DungBeetle_Character_BP_Aberrant_C", - "Aberrant Beetle" + "Baby Rex", + "Rex_Character_BP_Child_C" ], [ - "Aberrant Electrophorus", - "Eel_Character_BP_Aberrant_C", - "Aberrant Eel", - "Aberrant Electro" + "Redwood Rock Golem", + "RedwoodRockGolem_Character_BP_C" ], [ - "Aberrant Equus", - "Equus_Character_BP_Aberrant_C", - "Aberrant Horse" + "Baby Raptor", + "Raptor_Character_BP_Child_C" ], [ - "Aberrant Iguanodon", - "Iguanodon_Character_BP_Aberrant_C", - "Aberrant Iguan" + "Baby Purlovia", + "Purlovia_Character_BP_Child_C" ], [ - "Lamprey", - "Lamprey_Character_C" + "Baby Pteranodon", + "Ptero_Character_BP_Child_C" ], [ - "Featherlight", - "LanternBird_Character_BP_C", - "Lantern Bird" + "Baby Procoptodon", + "Procoptodon_Character_BP_Child_C", + "Baby Kangaroo" ], [ - "Shinehorn", - "LanternGoat_Character_BP_C", - "Lantern Goat" + "Baby Plesiosaur", + "Plesiosaur_Character_BP_Child_C", + "Baby Plesio" ], [ - "Glowtail", - "LanternLizard_Character_BP_C", - "Lantern Lizard" + "Baby Phiomia", + "Phiomia_Character_BP_Child_C" ], [ - "Bulbdog", - "LanternPug_Character_BP_C", - "Lantern Pug" + "Baby Pegomastax", + "Pegomastax_Character_BP_Child_C", + "Baby Pego" ], [ - "Glowbug", - "Lightbug_Character_BaseBP_C", - "Lightbug" + "Baby Parasaurolophus", + "Para_Character_BP_Child_C", + "Baby Parasaur" ], [ - "Aberrant Lystrosaurus", - "Lystro_Character_BP_Aberrant_C", - "Aberrant Lystro" + "Baby Paracer", + "Paracer_Character_BP_Child_C" ], [ - "Aberrant Manta", - "Manta_Character_BP_Aberrant_C" + "Baby Pachycephalosaurus", + "Pachy_Character_BP_Child_C", + "Baby Pachy" ], [ - "Alpha Basilisk", - "MegaBasilisk_Character_BP_C" + "Baby Pachyrhinosaurus", + "Pachyrhino_Character_BP_Child_C", + "Baby Pachyrhino" ], [ - "Alpha Karkinos", - "MegaCrab_Character_BP_C", - "Mega Crab" + "Baby Oviraptor", + "Oviraptor_Character_BP_Child_C" ], [ - "Aberrant Megalosaurus", - "Megalosaurus_Character_BP_Aberrant_C", - "Aberrant Megalos", - "Aberrant Sleeping Raptor" + "Baby Moschops", + "Moschops_Character_BP_Child_C" ], [ - "Alpha Surface Reaper King", - "MegaXenomorph_Character_BP_Male_Surface_C", - "Mega Xenomorph Male" + "Baby Mosasaurus", + "Mosa_Character_BP_Child_C", + "Baby Mosa" ], [ - "Roll Rat", - "MoleRat_Character_BP_C", - "Mole Rat" + "Baby Mesopithecus", + "Monkey_Character_BP_Child_C", + "Baby Monkey" ], [ - "Aberrant Moschops", - "Moschops_Character_BP_Aberrant_C" + "Baby Megalodon", + "Megalodon_Character_BP_Child_C" ], [ - "Aberrant Otter", - "Otter_Character_BP_Aberrant_C" + "Baby Manta", + "Manta_Character_BP_Child_C" ], [ - "Aberrant Parasaur", - "Para_Character_BP_Aberrant_C", - "Aberrant Para" + "Baby Mammoth", + "Mammoth_Character_BP_Child_C" ], [ - "Aberrant Paracer", - "Paracer_Character_BP_Aberrant_C", - "Aberrant Paraceratherium" + "Baby Lystrosaurus", + "Lystro_Character_BP_Child_C", + "Baby Lystro" ], [ - "Aberrant Piranha", - "Piranha_Character_BP_Aberrant_C", - "Aberrant Megapiranha" + "Lava Rock Golem", + "LavaRockGolem_Character_BP_C" ], [ - "Seeker", - "Pteroteuthis_Char_BP_C", - "Pteroteuthis" + "Baby Kentrosaurus", + "Kentro_Character_BP_Child_C", + "Baby Kentro" ], [ - "Seeker Surface", - "Pteroteuthis_Char_BP_Surface_C", - "Pteroteuthis Surface" + "Baby Kaprosuchus", + "Kaprosuchus_Character_BP_Child_C", + "Baby Kapro" ], [ - "Aberrant Purlovia", - "Purlovia_Character_BP_Aberrant_C" + "Jungle Rock Golem", + "JungleRockGolem_Character_BP_C" ], [ - "Aberrant Raptor", - "Raptor_Character_BP_Aberrant_C" + "Baby Iguanodon", + "Iguanodon_Character_BP_Child_C" ], [ - "Rock Drake", - "RockDrake_Character_BP_C" + "Baby Ichthyornis", + "Ichthyornis_Character_BP_Child_C", + "Baby Seagull" ], [ - "Aberrant Sabertooth Salmon", - "Salmon_Character_Aberrant_C", - "Aberrant Salmon" + "Ice Wyvern (The Volcano)", + "Wyvern_Character_BP_Ice_C" ], [ - "Aberrant Sarcosuchus", - "Sarco_Character_BP_Aberrant_C", - "Aberrant Sarco", - "Aberrant Crocodile" + "Baby Gallimimus", + "Galli_Character_BP_Child_C", + "Baby Galli" ], [ - "Aberrant Pulmonoscorpius", - "Scorpion_Character_BP_Aberrant_C", - "Aberrant Scorpion", - "Aberrant Scorpius", - "Aberrant Pulmono", - "Aberrant Scorp", - "Aberrant Pulminoscorpius" + "Baby Equus", + "Equus_Character_BP_Child_C", + "Baby Horse" ], [ - "Aberrant Ovis", - "Sheep_Character_BP_Aberrant_C", - "Aberrant Sheep" + "Baby Ichthyosaurus", + "Dolphin_Character_BP_Child_C", + "Baby Dolphin" ], [ - "Aberrant Spinosaur", - "Spino_Character_BP_Aberrant_C", - "Aberrant Spinosaurus", - "Aberrant Spino" + "Baby Doedicurus", + "Doed_Character_BP_Child_C", + "Baby Doed" ], [ - "Aberrant Stegosaurus", - "Stego_Character_BP_Aberrant_C", - "Aberrant Stego" + "Baby Dodo", + "Dodo_Character_BP_Child_C" ], [ - "Aberrant Beelzebufo", - "Toad_Character_BP_Aberrant_C", - "Aberrant Toad" + "Baby Direwolf", + "Direwolf_Character_BP_Child_C" ], [ - "Aberrant Triceratops", - "Trike_Character_BP_Aberrant_C", - "Aberrant Trike" + "Baby Direbear", + "Direbear_Character_BP_Child_C" ], [ - "Aberrant Trilobite", - "Trilobite_Character_Aberrant_C" + "Baby Diplodocus", + "Diplodocus_Character_BP_Child_C", + "Baby Diplo" ], [ - "Aberrant Carbonemys", - "Turtle_Character_BP_Aberrant_C", - "Aberrant Turtle" + "Baby Dilophosaurus", + "Dilo_Character_BP_Child_C", + "Baby Dilo" ], [ - "Reaper Queen", - "Xenomorph_Character_BP_Female_C", - "Xenomorph Female" + "Desert Rock Golem", + "DesertRockGolem_Character_BP_C" ], [ - "Surface Reaper King", - "Xenomorph_Character_BP_Male_Surface_C", - "Xenomorph Male Surface" + "Baby Daeodon", + "Daeodon_Character_BP_Child_C" ], [ - "Elemental Reaper King", - "Xenomorph_Character_BP_Male_Minion_C" + "Baby Compsognathus", + "Compy_Character_BP_Child_C", + "Baby Compy" ], [ - "Subterranean Reaper King", - "Xenomorph_Character_BP_Male_Chupa_C" + "Baby Chalicotherium", + "Chalico_Character_BP_Child_C", + "Baby Chalico" ], [ - "Reaper", - "Xenomorph_Character_BP_C" + "Baby Carnotaurus", + "Carno_Character_BP_Child_C", + "Baby Carno" ], [ - "Reaper King", - "Xenomorph_Character_BP_Male_Tamed_C" + "Baby Morallatops", + "camelsaurus_Character_BP_Child_C" ], [ - "Rockwell", - "Rockwell_Character_BP_C" + "Baby Basilosaurus", + "Basilosaurus_Character_BP_Child_C" ], [ - "Aberrant Gigantopithecus", - "Bigfoot_Character_BP_Aberrant_C" + "Baby Baryonyx", + "Baryonyx_Character_BP_Child_C" ], [ - "Aberrant Direbear", - "Direbear_Character_BP_Aberrant_C", - "Aberrant Dire Bear", - "Aberrant Bear" + "Baby Argentavis", + "Argent_Character_BP_Child_C" ] ] } diff --git a/ArkBot/defaultconfig.json b/ArkBot/defaultconfig.json index 5fc2686..60e045d 100644 --- a/ArkBot/defaultconfig.json +++ b/ArkBot/defaultconfig.json @@ -1,20 +1,17 @@ { - "botId": "arkbot", "botName": "ARK Bot", - "botNamespace": "http://www.arkbot.com/", "botUrl": "", "appUrl": "", - "enabledChannels": [ "bot-commands" ], - "infoTopicChannel": "bot-commands", - "announcementChannel": "bot-notifications", - "tempFileOutputDirPath": "C:\\ArkBot\\temp", - "botToken": "", - "steamOpenIdRelyingServiceListenPrefix": "http://+:60002/openid/", - "steamOpenIdRedirectUri": "http://:60002/openid/", - "googleApiKey": "", - "steamApiKey": "", - "memberRoleName": "ark", + "tempFileOutputDirPath": "", + "steamApiKey": "", "discord": { + "discordBotEnabled": true, + "botToken": "", + "enabledChannels": [ "bot-commands" ], + "infoTopicChannel": "bot-commands", + "announcementChannel": "bot-notifications", + "memberRoleName": "ark", + "disableDeveloperFetchSaveData": false, "accessControl": { "channels": { "public": [ "@everyone", "admin", "developer" ], @@ -33,11 +30,17 @@ "whoami": [ "@everyone" ], "disabled": [ "@everyone" ] } - } - }, - "userRoles": { - "admin": [ ] + }, + "steamOpenIdRelyingServiceListenPrefix": "http://+:60002/openid/", + "steamOpenIdRedirectUri": "" }, + "userRoles": [ + { + "role": "admin", + "steamIds": [ + ] + } + ], "accessControl": { "pages": { "home": [ "guest" ], @@ -80,10 +83,10 @@ "structures-rcon": [ "disabled" ] } }, - "disableDeveloperFetchSaveData" : false, - "backupsEnabled": false, - "backupsDirectoryPath": "C:\\ARK Servers\\Backups", - "discordBotEnabled": true, + "backups": { + "backupsEnabled": false, + "backupsDirectoryPath": "" + }, "webApiListenPrefix": "http://+:60001/", "webAppListenPrefix": "http://+:80/", "webAppRedirectListenPrefix": [ @@ -91,16 +94,15 @@ "powershellFilePath": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "useCompatibilityChangeWatcher": true, "ssl": { - "enabled": false, + "enabled": false, "challengeListenPrefix": "http://+:80/", "name": "ark-bot-ssl", - "password": "secret123", - "email": "youremail@yourdomain.com", + "password": "", + "email": "", "domains": [ - "app.yourdomain.com" ], "ports": [ 443, 60001 ], - "useCompatibilityNonSNIBindings": true + "useCompatibilityNonSNIBindings": true }, "arkMultipliers": { "eggHatchSpeedMultiplier": 1.0, @@ -108,45 +110,52 @@ "cuddleIntervalMultiplier": 1.0 }, "savegameExtractionMaxDegreeOfParallelism": null, - "anonymizeWebApiData": false, + "anonymizeWebApiData": false, + "discordLogLevel": "Warning", "servers": [ { "key": "server1", - "cluster": "cluster1", - "saveFilePath": "C:\\ARK Servers\\server1\\ShooterGame\\Saved\\SavedArks\\TheIsland.ark", - "displayAddress": "myarkserver.domain.com:27015", + "clusterKey": "cluster1", + "saveFilePath": "", + "displayAddress": "", "ip": "127.0.0.1", - "port": 27015, + "queryPort": 27015, "rconPort": 27020, - "rconPassword": "password", - "serverExecutablePath": "C:\\ARK Servers\\server1\\ShooterGame\\Binaries\\Win64\\ShooterGameServer.exe", - "serverExecutableArguments": "TheIsland?listen?Port=7777?QueryPort=27015?RCONPort=27020?RCONEnabled=True?SessionName=Server1?ServerPassword=?ServerAdminPassword=password?SpectatorPassword=password?MaxPlayers=5 -culture=en -nosteamclient -clusterid=cluster1 -ClusterDirOverride=\"C:\\ARK Servers\\cluster1\" -serverkey=server1", - "steamCmdExecutablePath": "C:\\SteamCmd\\steamcmd.exe", - "serverInstallDirPath": "C:\\ARK Servers\\server1", - "usePowershellOutputRedirect": false, - "disableChatNotificationOnGlobalCountdown": false + "rconPassword": "", + "serverManagement": { + "enabled": true, + "serverExecutablePath": "", + "serverExecutableArguments": "", + "steamCmdExecutablePath": "", + "serverInstallDirPath": "", + "usePowershellOutputRedirect": false + }, + "disableChatNotifications": false }, { "key": "server2", - "cluster" : "cluster1", - "saveFilePath": "C:\\ARK Servers\\server2\\ShooterGame\\Saved\\SavedArks\\TheIsland.ark", - "displayAddress": "myarkserver.domain.com:27016", + "clusterKey": "cluster1", + "saveFilePath": "", + "displayAddress": "", "ip": "127.0.0.1", - "port": 27016, + "queryPort": 27016, "rconPort": 27021, - "rconPassword": "password", - "serverExecutablePath": "C:\\ARK Servers\\server2\\ShooterGame\\Binaries\\Win64\\ShooterGameServer.exe", - "serverExecutableArguments": "TheIsland?listen?Port=7779?QueryPort=27016?RCONPort=27021?RCONEnabled=True?SessionName=Server2?ServerPassword=?ServerAdminPassword=password?SpectatorPassword=password?MaxPlayers=5 -culture=en -nosteamclient -clusterid=cluster1 -ClusterDirOverride=\"C:\\ARK Servers\\cluster1\" -serverkey=server2", - "steamCmdExecutablePath": "C:\\SteamCmd\\steamcmd.exe", - "serverInstallDirPath": "C:\\ARK Servers\\server2", - "usePowershellOutputRedirect": false, - "disableChatNotificationOnGlobalCountdown": false + "rconPassword": "", + "serverManagement": { + "enabled": true, + "serverExecutablePath": "", + "serverExecutableArguments": "", + "steamCmdExecutablePath": "", + "serverInstallDirPath": "", + "usePowershellOutputRedirect": false + }, + "disableChatNotifications": false } ], "clusters": [ { "key": "cluster1", - "savePath": "C:\\ARK Servers\\cluster1" + "savePath": "" } ] } \ No newline at end of file diff --git a/ArkBot/packages.config b/ArkBot/packages.config index 300c792..8078528 100644 --- a/ArkBot/packages.config +++ b/ArkBot/packages.config @@ -10,6 +10,10 @@ + + + + @@ -23,15 +27,12 @@ - + - - - - + @@ -61,6 +62,7 @@ + @@ -126,6 +128,7 @@ + diff --git a/README.md b/README.md index 3528e8f..e949194 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Project status #### Development -This project is not currently being actively developed. It is still minimally maintained by me as the primary developer of the project. There are currently no other developers contributing code to the project. +This project is not currently being actively developed. It is still minimally maintained by me as the primary developer of the project. Jefferson-1 has taken over maintenance of the project with Tsebring's permission. Contributors are welcome. The active development branch is currently [beta](https://github.com/tsebring/ArkBot/tree/beta). diff --git a/Version.txt b/Version.txt new file mode 100644 index 0000000..1cfb741 --- /dev/null +++ b/Version.txt @@ -0,0 +1 @@ +This is Version 1.83