Decompiled source of BepisModSettings v1.6.6

plugins/BepisModSettings/BepisModSettings.dll

Decompiled 3 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Threading.Tasks.Sources;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.NET.Common;
using BepInExResoniteShim;
using BepisLocaleLoader;
using BepisModSettings.ConfigAttributes;
using BepisModSettings.DataFeeds;
using BepisResoniteWrapper;
using Elements.Assets;
using Elements.Core;
using FrooxEngine;
using FrooxEngine.UIX;
using HarmonyLib;
using ProtoFlux.Runtimes.Execution.Nodes.FrooxEngine.Variables;
using Renderite.Shared;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v10.0", FrameworkDisplayName = ".NET 10.0")]
[assembly: AssemblyCompany("ResoniteModding")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyCopyright("Copyright (c) ResoniteModding 2026")]
[assembly: AssemblyDescription("A Resonite mod that lets you edit your mod settings in the settings tab of the dashboard.")]
[assembly: AssemblyFileVersion("1.6.6.0")]
[assembly: AssemblyInformationalVersion("1.6.6+fe7b9a3096257bfe4e7ee2a09d3bf8a07f043cdc")]
[assembly: AssemblyProduct("Bepis Mod Settings")]
[assembly: AssemblyTitle("BepisModSettings")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/ResoniteModding/BepisModSettings")]
[assembly: AssemblyVersion("1.6.6.0")]
[module: RefSafetyRules(11)]
[CompilerGenerated]
internal sealed class <>z__ReadOnlySingleElementList<T> : global::System.Collections.IEnumerable, global::System.Collections.ICollection, global::System.Collections.IList, global::System.Collections.Generic.IEnumerable<T>, global::System.Collections.Generic.IReadOnlyCollection<T>, global::System.Collections.Generic.IReadOnlyList<T>, global::System.Collections.Generic.ICollection<T>, global::System.Collections.Generic.IList<T>
{
	private sealed class Enumerator : global::System.IDisposable, global::System.Collections.IEnumerator, global::System.Collections.Generic.IEnumerator<T>
	{
		object global::System.Collections.IEnumerator.Current => _item;

		T global::System.Collections.Generic.IEnumerator<T>.Current => _item;

		public Enumerator(T item)
		{
			_item = item;
		}

		bool global::System.Collections.IEnumerator.MoveNext()
		{
			if (!_moveNextCalled)
			{
				return _moveNextCalled = true;
			}
			return false;
		}

		void global::System.Collections.IEnumerator.Reset()
		{
			_moveNextCalled = false;
		}

		void global::System.IDisposable.Dispose()
		{
		}
	}

	int global::System.Collections.ICollection.Count => 1;

	bool global::System.Collections.ICollection.IsSynchronized => false;

	object global::System.Collections.ICollection.SyncRoot => this;

	object? global::System.Collections.IList.this[int index]
	{
		get
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			if (index != 0)
			{
				throw new IndexOutOfRangeException();
			}
			return _item;
		}
		set
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			throw new NotSupportedException();
		}
	}

	bool global::System.Collections.IList.IsFixedSize => true;

	bool global::System.Collections.IList.IsReadOnly => true;

	int global::System.Collections.Generic.IReadOnlyCollection<T>.Count => 1;

	T global::System.Collections.Generic.IReadOnlyList<T>.this[int index]
	{
		get
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			if (index != 0)
			{
				throw new IndexOutOfRangeException();
			}
			return _item;
		}
	}

	int global::System.Collections.Generic.ICollection<T>.Count => 1;

	bool global::System.Collections.Generic.ICollection<T>.IsReadOnly => true;

	T global::System.Collections.Generic.IList<T>.this[int index]
	{
		get
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			if (index != 0)
			{
				throw new IndexOutOfRangeException();
			}
			return _item;
		}
		set
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			throw new NotSupportedException();
		}
	}

	public <>z__ReadOnlySingleElementList(T item)
	{
		_item = item;
	}

	global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
	{
		return new Enumerator(_item);
	}

	void global::System.Collections.ICollection.CopyTo(global::System.Array array, int index)
	{
		array.SetValue((object)_item, index);
	}

	int global::System.Collections.IList.Add(object? value)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		throw new NotSupportedException();
	}

	void global::System.Collections.IList.Clear()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		throw new NotSupportedException();
	}

	bool global::System.Collections.IList.Contains(object? value)
	{
		return EqualityComparer<T>.Default.Equals(_item, (T)value);
	}

	int global::System.Collections.IList.IndexOf(object? value)
	{
		if (!EqualityComparer<T>.Default.Equals(_item, (T)value))
		{
			return -1;
		}
		return 0;
	}

	void global::System.Collections.IList.Insert(int index, object? value)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		throw new NotSupportedException();
	}

	void global::System.Collections.IList.Remove(object? value)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		throw new NotSupportedException();
	}

	void global::System.Collections.IList.RemoveAt(int index)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		throw new NotSupportedException();
	}

	global::System.Collections.Generic.IEnumerator<T> global::System.Collections.Generic.IEnumerable<T>.GetEnumerator()
	{
		return new Enumerator(_item);
	}

	void global::System.Collections.Generic.ICollection<T>.Add(T item)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		throw new NotSupportedException();
	}

	void global::System.Collections.Generic.ICollection<T>.Clear()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		throw new NotSupportedException();
	}

	bool global::System.Collections.Generic.ICollection<T>.Contains(T item)
	{
		return EqualityComparer<T>.Default.Equals(_item, item);
	}

	void global::System.Collections.Generic.ICollection<T>.CopyTo(T[] array, int arrayIndex)
	{
		array[arrayIndex] = _item;
	}

	bool global::System.Collections.Generic.ICollection<T>.Remove(T item)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		throw new NotSupportedException();
	}

	int global::System.Collections.Generic.IList<T>.IndexOf(T item)
	{
		if (!EqualityComparer<T>.Default.Equals(_item, item))
		{
			return -1;
		}
		return 0;
	}

	void global::System.Collections.Generic.IList<T>.Insert(int index, T item)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		throw new NotSupportedException();
	}

	void global::System.Collections.Generic.IList<T>.RemoveAt(int index)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		throw new NotSupportedException();
	}
}
namespace BepisModSettings
{
	[ResonitePlugin("ResoniteModding.BepisModSettings", "Bepis Mod Settings", "1.6.6", "ResoniteModding", "https://github.com/ResoniteModding/BepisModSettings")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BasePlugin
	{
		[HarmonyPatch(typeof(Engine), "RequestShutdown")]
		public static class RequestShutdownPatch
		{
			public static void Prefix()
			{
				Log.LogInfo((object)"Running shutdown, saving configs...");
				Log.LogDebug((object)"Saving Config for BepInEx.Core");
				ConfigFile coreConfig = ConfigFile.CoreConfig;
				if (coreConfig != null)
				{
					coreConfig.Save();
				}
				if (((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Count <= 0)
				{
					return;
				}
				CollectionExtensions.Do<PluginInfo>((global::System.Collections.Generic.IEnumerable<PluginInfo>)((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Values, (Action<PluginInfo>)delegate(PluginInfo x)
				{
					//IL_001a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0020: Expected O, but got Unknown
					object instance = x.Instance;
					BasePlugin val = (BasePlugin)((instance is BasePlugin) ? instance : null);
					if (val != null)
					{
						ManualLogSource log = Log;
						bool flag = default(bool);
						BepInExDebugLogInterpolatedStringHandler val2 = new BepInExDebugLogInterpolatedStringHandler(18, 1, ref flag);
						if (flag)
						{
							((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("Saving Config for ");
							((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>(x.Metadata.GUID);
						}
						log.LogDebug(val2);
						ConfigFile config = val.Config;
						if (config != null)
						{
							config.Save();
						}
					}
				});
				Log.LogInfo((object)"Configs Saved!");
			}
		}

		[HarmonyPatch(typeof(SettingsDataFeed), "Enumerate", new global::System.Type[]
		{
			typeof(global::System.Collections.Generic.IReadOnlyList<string>),
			typeof(global::System.Collections.Generic.IReadOnlyList<string>),
			typeof(string),
			typeof(object)
		})]
		private static class EnumeratorPostfix
		{
			private static global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> Postfix(global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> __result, SettingsDataFeed __instance, global::System.Collections.Generic.IReadOnlyList<string> path)
			{
				//IL_0045: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Expected O, but got Unknown
				try
				{
					if (!Enumerable.Contains<string>((global::System.Collections.Generic.IEnumerable<string>)path, "BepInEx"))
					{
						return __result;
					}
					if (!WorldExtensions.IsUserspace(((Worker)__instance).World))
					{
						return DataFeedInjector.NotUserspaceEnumerable(path);
					}
					DataFeedHelpers.SettingsDataFeed = __instance;
					return DataFeedInjector.ReplaceEnumerable(__result, path);
				}
				catch (global::System.Exception ex)
				{
					ManualLogSource log = Log;
					bool flag = default(bool);
					BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(61, 2, ref flag);
					if (flag)
					{
						((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Failed to generate replacement for ");
						((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("SettingsDataFeed");
						((BepInExLogInterpolatedStringHandler)val).AppendLiteral(".");
						((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("Enumerate");
						((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" - using original result.");
					}
					log.LogError(val);
					Log.LogError((object)ex.Message);
					return __result;
				}
			}
		}

		[HarmonyPatch(typeof(SettingsDataFeed), "PathSegmentName")]
		private static class PathSegmentNamePatch
		{
			private static bool Prefix(string pathSegment, int depth, ref LocaleString __result)
			{
				//IL_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				LocaleString val = ((depth != 1) ? LocaleHelper.AsLocaleKey("Settings." + pathSegment + ".Breadcrumb", (string)null, true, (Dictionary<string, object>)null) : LocaleHelper.AsLocaleKey("Settings.Category." + pathSegment, (string)null, true, (Dictionary<string, object>)null));
				__result = val;
				return false;
			}
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Action <>9__0_0;

			public static Action<IField<string>> <>9__1_0;

			public static Action<IField<string>> <>9__1_1;

			public static Action<IField<string>> <>9__1_2;

			public static Action<IField<string>> <>9__1_3;

			public static EventHandler<SettingChangedEventArgs> <>9__9_0;

			public static Func<Slot> <>9__9_1;

			internal void <ExampleConfigs>b__0_0()
			{
				Log.LogError((object)"OneOfThem");
			}

			internal void <CustomDataFeedEnumerate>b__1_0(IField<string> field)
			{
				((IValue<string>)(object)field).Value = "Test1";
			}

			internal void <CustomDataFeedEnumerate>b__1_1(IField<string> field)
			{
				((IValue<string>)(object)field).Value = "Test2";
			}

			internal void <CustomDataFeedEnumerate>b__1_2(IField<string> field)
			{
				((IValue<string>)(object)field).Value = "Test3";
			}

			internal void <CustomDataFeedEnumerate>b__1_3(IField<string> field)
			{
				((IValue<string>)(object)field).Value = "Test4";
			}

			internal void <Load>b__9_0(object? sender, SettingChangedEventArgs args)
			{
				if ((object)args.ChangedSetting == AllowCollapsingConfigs || (object)args.ChangedSetting == DefaultCollapsed)
				{
					DataFeedHelpers.RefreshSettingsScreen();
				}
			}

			internal Slot <Load>b__9_1()
			{
				SettingsDataFeed settingsDataFeed = DataFeedHelpers.SettingsDataFeed;
				if (settingsDataFeed == null)
				{
					return null;
				}
				Slot slot = ((Component)settingsDataFeed).Slot;
				if (slot == null)
				{
					return null;
				}
				return InspectorHelper.OpenInspectorForTarget((IWorldElement)(object)slot, (Slot)null, false);
			}
		}

		[CompilerGenerated]
		private sealed class <CustomDataFeedEnumerate>d__1 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine
		{
			public int <>1__state;

			public AsyncIteratorMethodBuilder <>t__builder;

			public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd;

			private DataFeedItem <>2__current;

			private bool <>w__disposeMode;

			private int <>l__initialThreadId;

			private global::System.Collections.Generic.IReadOnlyList<string> path;

			public global::System.Collections.Generic.IReadOnlyList<string> <>3__path;

			private global::System.Collections.Generic.IReadOnlyList<string> groupingKeys;

			public global::System.Collections.Generic.IReadOnlyList<string> <>3__groupingKeys;

			private string[] <groupingKeysArray>5__2;

			private TaskAwaiter <>u__1;

			DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <CustomDataFeedEnumerate>d__1(int <>1__state)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				<>t__builder = AsyncIteratorMethodBuilder.Create();
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			private void MoveNext()
			{
				//IL_008f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0094: Unknown result type (might be due to invalid IL or missing references)
				//IL_009c: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
				//IL_0240: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
				//IL_0142: Unknown result type (might be due to invalid IL or missing references)
				//IL_0056: Unknown result type (might be due to invalid IL or missing references)
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0072: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				try
				{
					TaskAwaiter val2;
					DataFeedGroup val3;
					switch (num)
					{
					default:
						if (<>w__disposeMode)
						{
							break;
						}
						num = (<>1__state = -1);
						<>2__current = null;
						val2 = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter();
						if (!((TaskAwaiter)(ref val2)).IsCompleted)
						{
							num = (<>1__state = 0);
							<>u__1 = val2;
							<CustomDataFeedEnumerate>d__1 <CustomDataFeedEnumerate>d__ = this;
							((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <CustomDataFeedEnumerate>d__1>(ref val2, ref <CustomDataFeedEnumerate>d__);
							return;
						}
						goto IL_00ab;
					case 0:
						val2 = <>u__1;
						<>u__1 = default(TaskAwaiter);
						num = (<>1__state = -1);
						goto IL_00ab;
					case -4:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						<groupingKeysArray>5__2 = Enumerable.ToArray<string>(Enumerable.Concat<string>((global::System.Collections.Generic.IEnumerable<string>)groupingKeys, (global::System.Collections.Generic.IEnumerable<string>)new <>z__ReadOnlySingleElementList<string>("TestCustomDataFeed")));
						DataFeedIndicator<string> val6 = new DataFeedIndicator<string>();
						((DataFeedItem)val6).InitBase("Test1", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test1"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val6.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = "Test1";
						}, (string)null);
						<>2__current = (DataFeedItem)(object)val6;
						num = (<>1__state = -5);
						goto IL_037e;
					}
					case -5:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						DataFeedIndicator<string> val4 = new DataFeedIndicator<string>();
						((DataFeedItem)val4).InitBase("Test2", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test2"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val4.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = "Test2";
						}, (string)null);
						<>2__current = (DataFeedItem)(object)val4;
						num = (<>1__state = -6);
						goto IL_037e;
					}
					case -6:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						DataFeedIndicator<string> val5 = new DataFeedIndicator<string>();
						((DataFeedItem)val5).InitBase("Test3", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test3"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val5.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = "Test3";
						}, (string)null);
						<>2__current = (DataFeedItem)(object)val5;
						num = (<>1__state = -7);
						goto IL_037e;
					}
					case -7:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						DataFeedIndicator<string> val = new DataFeedIndicator<string>();
						((DataFeedItem)val).InitBase("Test4", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test4"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = "Test4";
						}, (string)null);
						<>2__current = (DataFeedItem)(object)val;
						num = (<>1__state = -8);
						goto IL_037e;
					}
					case -8:
						{
							num = (<>1__state = -1);
							_ = <>w__disposeMode;
							break;
						}
						IL_00ab:
						((TaskAwaiter)(ref val2)).GetResult();
						val3 = DataFeedHelpers.DataFeedCollapseGroup("TestCustomDataFeed", path, groupingKeys, LocaleString.op_Implicit("TestCustomDataFeed"));
						<>2__current = (DataFeedItem)(object)val3;
						num = (<>1__state = -4);
						goto IL_037e;
					}
				}
				catch (global::System.Exception exception)
				{
					<>1__state = -2;
					<groupingKeysArray>5__2 = null;
					<>2__current = null;
					((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete();
					<>v__promiseOfValueOrEnd.SetException(exception);
					return;
				}
				<>1__state = -2;
				<groupingKeysArray>5__2 = null;
				<>2__current = null;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete();
				<>v__promiseOfValueOrEnd.SetResult(false);
				return;
				IL_037e:
				<>v__promiseOfValueOrEnd.SetResult(true);
			}

			[DebuggerHidden]
			private void SetStateMachine(IAsyncStateMachine stateMachine)
			{
			}

			[DebuggerHidden]
			global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>.GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken))
			{
				//IL_0020: Unknown result type (might be due to invalid IL or missing references)
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				<CustomDataFeedEnumerate>d__1 <CustomDataFeedEnumerate>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = -3;
					<>t__builder = AsyncIteratorMethodBuilder.Create();
					<>w__disposeMode = false;
					<CustomDataFeedEnumerate>d__ = this;
				}
				else
				{
					<CustomDataFeedEnumerate>d__ = new <CustomDataFeedEnumerate>d__1(-3);
				}
				<CustomDataFeedEnumerate>d__.path = <>3__path;
				<CustomDataFeedEnumerate>d__.groupingKeys = <>3__groupingKeys;
				return <CustomDataFeedEnumerate>d__;
			}

			[DebuggerHidden]
			global::System.Threading.Tasks.ValueTask<bool> global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.MoveNextAsync()
			{
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0047: Invalid comparison between Unknown and I4
				if (<>1__state == -2)
				{
					return default(global::System.Threading.Tasks.ValueTask<bool>);
				}
				<>v__promiseOfValueOrEnd.Reset();
				<CustomDataFeedEnumerate>d__1 <CustomDataFeedEnumerate>d__ = this;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<CustomDataFeedEnumerate>d__1>(ref <CustomDataFeedEnumerate>d__);
				short version = <>v__promiseOfValueOrEnd.Version;
				if ((int)<>v__promiseOfValueOrEnd.GetStatus(version) == 1)
				{
					return new global::System.Threading.Tasks.ValueTask<bool>(<>v__promiseOfValueOrEnd.GetResult(version));
				}
				return new global::System.Threading.Tasks.ValueTask<bool>((IValueTaskSource<bool>)this, version);
			}

			[DebuggerHidden]
			bool IValueTaskSource<bool>.GetResult(short token)
			{
				return <>v__promiseOfValueOrEnd.GetResult(token);
			}

			[DebuggerHidden]
			ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				return <>v__promiseOfValueOrEnd.GetStatus(token);
			}

			[DebuggerHidden]
			void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				<>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags);
			}

			[DebuggerHidden]
			void IValueTaskSource.GetResult(short token)
			{
				<>v__promiseOfValueOrEnd.GetResult(token);
			}

			[DebuggerHidden]
			ValueTaskSourceStatus IValueTaskSource.GetStatus(short token)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				return <>v__promiseOfValueOrEnd.GetStatus(token);
			}

			[DebuggerHidden]
			void IValueTaskSource.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				<>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags);
			}

			[DebuggerHidden]
			global::System.Threading.Tasks.ValueTask global::System.IAsyncDisposable.DisposeAsync()
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				if (<>1__state >= -1)
				{
					throw new NotSupportedException();
				}
				if (<>1__state == -2)
				{
					return default(global::System.Threading.Tasks.ValueTask);
				}
				<>w__disposeMode = true;
				<>v__promiseOfValueOrEnd.Reset();
				<CustomDataFeedEnumerate>d__1 <CustomDataFeedEnumerate>d__ = this;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<CustomDataFeedEnumerate>d__1>(ref <CustomDataFeedEnumerate>d__);
				return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version);
			}
		}

		internal static ManualLogSource Log;

		public static ConfigEntry<bool> ShowHidden;

		public static ConfigEntry<bool> ShowProtected;

		public static ConfigEntry<bool> ShowEmptyPages;

		public static ConfigEntry<bool> SortEmptyPages;

		public static ConfigEntry<bool> AllowCollapsingConfigs;

		public static ConfigEntry<bool> DefaultCollapsed;

		public void ExampleConfigs()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Expected O, but got Unknown
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Expected O, but got Unknown
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Expected O, but got Unknown
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Expected O, but got Unknown
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Expected O, but got Unknown
			ConfigFile config = ((BasePlugin)this).Config;
			object[] array = new object[1];
			object obj = <>c.<>9__0_0;
			if (obj == null)
			{
				Action val = delegate
				{
					Log.LogError((object)"OneOfThem");
				};
				<>c.<>9__0_0 = val;
				obj = (object)val;
			}
			array[0] = new ActionConfig((global::System.Delegate)obj);
			config.Bind<dummy>("Tests", "TestAction", default(dummy), new ConfigDescription("TestAction", (AcceptableValueBase)null, array));
			((BasePlugin)this).Config.Bind<string>("Tests", "TestProtected", "AWAWAWAWA THIS IS A TEST MESSAGE", new ConfigDescription("TestProtected", (AcceptableValueBase)null, new object[1]
			{
				new ProtectedConfig()
			}));
			((BasePlugin)this).Config.Bind<string>("Tests", "TestHidden", "AWAWAWAWA THIS IS A TEST MESSAGE", new ConfigDescription("TestHidden", (AcceptableValueBase)null, new object[1]
			{
				new HiddenConfig()
			}));
			((BasePlugin)this).Config.Bind<dummy>("Tests", "TestCustomDataFeed", default(dummy), new ConfigDescription("TestCustomDataFeed", (AcceptableValueBase)null, new object[1]
			{
				new CustomDataFeed(CustomDataFeedEnumerate)
			}));
			((BasePlugin)this).Config.Bind<float>("Tests", "TestRangeFloat", 0.5f, new ConfigDescription("TestRangeFloat", (AcceptableValueBase)null, new object[1] { (object)new RangeAttribute(0f, 1f, "0.00") }));
		}

		[AsyncIteratorStateMachine(typeof(<CustomDataFeedEnumerate>d__1))]
		private static global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> CustomDataFeedEnumerate(global::System.Collections.Generic.IReadOnlyList<string> path, global::System.Collections.Generic.IReadOnlyList<string> groupingKeys)
		{
			return new <CustomDataFeedEnumerate>d__1(-2)
			{
				<>3__path = path,
				<>3__groupingKeys = groupingKeys
			};
		}

		public override void Load()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Expected O, but got Unknown
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Expected O, but got Unknown
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Expected O, but got Unknown
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Expected O, but got Unknown
			Log = ((BasePlugin)this).Log;
			ShowHidden = ((BasePlugin)this).Config.Bind<bool>("General", "ShowHidden", false, new ConfigDescription("Whether to show hidden Configs", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.ResoniteModding.BepisModSettings.Configs.ShowHidden", "Settings.ResoniteModding.BepisModSettings.Configs.ShowHidden.Description") }));
			ShowProtected = ((BasePlugin)this).Config.Bind<bool>("General", "ShowProtected", false, "Whether to show protected Configs");
			ShowEmptyPages = ((BasePlugin)this).Config.Bind<bool>("General", "ShowEmptyPages", true, "Whether to show category buttons for pages which would have no content");
			SortEmptyPages = ((BasePlugin)this).Config.Bind<bool>("General", "SortEmptyPages", true, "Whether to sort empty pages to the bottom of the list");
			AllowCollapsingConfigs = ((BasePlugin)this).Config.Bind<bool>("General", "Allow Collapsing", false, "Whether to allow collapsing Config Sections or not");
			DefaultCollapsed = ((BasePlugin)this).Config.Bind<bool>("General", "Default Collapsed", false, "Whether to have Config Sections collapsed by default or not");
			((BasePlugin)this).Config.SettingChanged += delegate(object? sender, SettingChangedEventArgs args)
			{
				if ((object)args.ChangedSetting == AllowCollapsingConfigs || (object)args.ChangedSetting == DefaultCollapsed)
				{
					DataFeedHelpers.RefreshSettingsScreen();
				}
			};
			ExampleConfigs();
			((BasePlugin)this).Config.Bind<dummy>("Debug", "OpenSettingsInspector", default(dummy), new ConfigDescription("OpenSettingsInspector", (AcceptableValueBase)null, new object[2]
			{
				new HiddenConfig(),
				new ActionConfig((global::System.Delegate)(object)(Func<Slot>)delegate
				{
					SettingsDataFeed settingsDataFeed = DataFeedHelpers.SettingsDataFeed;
					if (settingsDataFeed == null)
					{
						return (Slot)null;
					}
					Slot slot = ((Component)settingsDataFeed).Slot;
					return (slot == null) ? null : InspectorHelper.OpenInspectorForTarget((IWorldElement)(object)slot, (Slot)null, false);
				})
			}));
			((BasePlugin)this).HarmonyInstance.PatchAll();
			if (Engine.Current != null && Engine.Current.IsReady)
			{
				OnReady();
			}
			else
			{
				ResoniteHooks.OnEngineReady += new Action(OnReady);
			}
			ManualLogSource log = Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(18, 1, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("ResoniteModding.BepisModSettings");
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" is loaded!");
			}
			log.LogInfo(val);
			[CompilerGenerated]
			static void OnReady()
			{
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Expected O, but got Unknown
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003d: Expected O, but got Unknown
				FieldInfo obj = AccessTools.Field(typeof(Settings), "_categoryInfos");
				if (((obj != null) ? obj.GetValue((object)null) : null) is Dictionary<string, SettingCategoryInfo> val2)
				{
					SettingCategoryInfo val3 = new SettingCategoryInfo(new Uri("https://avatars.githubusercontent.com/u/39589027?s=200&v=4.png"), 99L);
					val3.InitKey("BepInEx");
					val2.Add(val3.Key, val3);
				}
				else
				{
					Log.LogError((object)"Failed to find _categoryInfos field in Settings.");
				}
			}
		}

		public override bool Unload()
		{
			((BasePlugin)this).HarmonyInstance.UnpatchSelf();
			FieldInfo obj = AccessTools.Field(typeof(Settings), "_categoryInfos");
			if (((obj != null) ? obj.GetValue((object)null) : null) is Dictionary<string, SettingCategoryInfo> val)
			{
				val.Remove("BepInEx");
			}
			else
			{
				Log.LogError((object)"Failed to find _categoryInfos field in Settings.");
			}
			return true;
		}
	}
	public static class PluginMetadata
	{
		public const string GUID = "ResoniteModding.BepisModSettings";

		public const string NAME = "Bepis Mod Settings";

		public const string VERSION = "1.6.6";

		public const string AUTHORS = "ResoniteModding";

		public const string REPOSITORY_URL = "https://github.com/ResoniteModding/BepisModSettings";
	}
}
namespace BepisModSettings.DataFeeds
{
	public static class BepisConfigsPage
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass10_0
		{
			public IButton btn;

			public ValueMultiDriver<bool> vmd;

			public Action <>9__1;

			internal void <ResetConfigs>b__1()
			{
				LocaleHelper.SetLocalized(btn.LabelTextField, "Settings.BepInEx.Plugins.ResetConfig", (string)null, (Dictionary<string, object>)null);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass10_1
		{
			[StructLayout((LayoutKind)3)]
			private struct <<ResetConfigs>b__0>d : IAsyncStateMachine
			{
				public int <>1__state;

				public AsyncTaskMethodBuilder <>t__builder;

				public <>c__DisplayClass10_1 <>4__this;

				private TaskAwaiter <>u__1;

				private void MoveNext()
				{
					//IL_0054: Unknown result type (might be due to invalid IL or missing references)
					//IL_0059: Unknown result type (might be due to invalid IL or missing references)
					//IL_0060: Unknown result type (might be due to invalid IL or missing references)
					//IL_0017: Unknown result type (might be due to invalid IL or missing references)
					//IL_0021: Unknown result type (might be due to invalid IL or missing references)
					//IL_0026: Unknown result type (might be due to invalid IL or missing references)
					//IL_003a: Unknown result type (might be due to invalid IL or missing references)
					//IL_003b: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b5: Expected O, but got Unknown
					//IL_00ba: Expected O, but got Unknown
					int num = <>1__state;
					<>c__DisplayClass10_1 <>c__DisplayClass10_ = <>4__this;
					try
					{
						TaskAwaiter val;
						if (num != 0)
						{
							val = global::System.Threading.Tasks.Task.Delay(2000, <>c__DisplayClass10_.token).GetAwaiter();
							if (!((TaskAwaiter)(ref val)).IsCompleted)
							{
								num = (<>1__state = 0);
								<>u__1 = val;
								((AsyncTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <<ResetConfigs>b__0>d>(ref val, ref this);
								return;
							}
						}
						else
						{
							val = <>u__1;
							<>u__1 = default(TaskAwaiter);
							num = (<>1__state = -1);
						}
						((TaskAwaiter)(ref val)).GetResult();
						if (_resetPressed)
						{
							IButton obj = <>c__DisplayClass10_.CS$<>8__locals1.btn;
							Action obj2 = <>c__DisplayClass10_.CS$<>8__locals1.<>9__1;
							if (obj2 == null)
							{
								<>c__DisplayClass10_0 <>c__DisplayClass10_2 = <>c__DisplayClass10_.CS$<>8__locals1;
								Action val2 = delegate
								{
									LocaleHelper.SetLocalized(<>c__DisplayClass10_.CS$<>8__locals1.btn.LabelTextField, "Settings.BepInEx.Plugins.ResetConfig", (string)null, (Dictionary<string, object>)null);
								};
								Action val3 = val2;
								<>c__DisplayClass10_2.<>9__1 = val2;
								obj2 = val3;
							}
							((IComponentBase)obj).RunSynchronously(obj2, false);
							_resetPressed = false;
							ValueMultiDriver<bool> obj3 = <>c__DisplayClass10_.CS$<>8__locals1.vmd;
							if (obj3 != null)
							{
								((SyncField<bool>)(object)obj3.Value).Value = _resetPressed;
							}
						}
					}
					catch (global::System.Exception exception)
					{
						<>1__state = -2;
						((AsyncTaskMethodBuilder)(ref <>t__builder)).SetException(exception);
						return;
					}
					<>1__state = -2;
					((AsyncTaskMethodBuilder)(ref <>t__builder)).SetResult();
				}

				[DebuggerHidden]
				private void SetStateMachine(IAsyncStateMachine stateMachine)
				{
					((AsyncTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine);
				}
			}

			public CancellationToken token;

			public <>c__DisplayClass10_0 CS$<>8__locals1;

			[AsyncStateMachine(typeof(<<ResetConfigs>b__0>d))]
			internal global::System.Threading.Tasks.Task? <ResetConfigs>b__0()
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				<<ResetConfigs>b__0>d <<ResetConfigs>b__0>d = default(<<ResetConfigs>b__0>d);
				<<ResetConfigs>b__0>d.<>t__builder = AsyncTaskMethodBuilder.Create();
				<<ResetConfigs>b__0>d.<>4__this = this;
				<<ResetConfigs>b__0>d.<>1__state = -1;
				((AsyncTaskMethodBuilder)(ref <<ResetConfigs>b__0>d.<>t__builder)).Start<<<ResetConfigs>b__0>d>(ref <<ResetConfigs>b__0>d);
				return ((AsyncTaskMethodBuilder)(ref <<ResetConfigs>b__0>d.<>t__builder)).Task;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass4_0
		{
			public ModMeta metadata;

			public Uri uri;

			internal void <Enumerate>b__0(IField<string> field)
			{
				((IValue<string>)(object)field).Value = metadata.ID;
			}

			internal void <Enumerate>b__2(IField<string> field)
			{
				((IValue<string>)(object)field).Value = metadata.Author;
			}

			internal void <Enumerate>b__1(IField<string> field)
			{
				((IValue<string>)(object)field).Value = metadata.Version;
			}

			internal void <Enumerate>b__3(SyncDelegate<Action> syncDelegate)
			{
				Slot val = ((syncDelegate != null) ? ((SyncElement)syncDelegate).Slot : null);
				if (val != null)
				{
					((SyncField<Uri>)(object)((ContainerWorker<Component>)(object)val).AttachComponent<Hyperlink>(true, (Action<Hyperlink>)null).URL).Value = uri;
				}
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_0
		{
			public ModMeta metaData;

			public Func<PluginInfo, bool> <>9__8;

			public ButtonEventHandler <>9__22;

			public ButtonEventHandler <>9__23;

			internal bool <EnumerateConfigs>b__8(PluginInfo x)
			{
				return x.Metadata.GUID == metaData.ID;
			}

			internal void <EnumerateConfigs>b__2(SyncDelegate<Action> syncDelegate)
			{
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Expected O, but got Unknown
				//IL_0031: Expected O, but got Unknown
				Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false);
				if (component == null)
				{
					return;
				}
				ButtonEventHandler obj = <>9__22;
				if (obj == null)
				{
					ButtonEventHandler val = delegate
					{
						LoadConfigs(metaData.ID);
					};
					ButtonEventHandler val2 = val;
					<>9__22 = val;
					obj = val2;
				}
				component.LocalPressed += obj;
			}

			internal void <EnumerateConfigs>b__22(IButton _, ButtonEventData _)
			{
				LoadConfigs(metaData.ID);
			}

			internal void <EnumerateConfigs>b__3(SyncDelegate<Action> syncDelegate)
			{
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Expected O, but got Unknown
				//IL_0031: Expected O, but got Unknown
				Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false);
				if (component == null)
				{
					return;
				}
				ButtonEventHandler obj = <>9__23;
				if (obj == null)
				{
					ButtonEventHandler val = delegate
					{
						SaveConfigs(metaData.ID);
					};
					ButtonEventHandler val2 = val;
					<>9__23 = val;
					obj = val2;
				}
				component.LocalPressed += obj;
			}

			internal void <EnumerateConfigs>b__23(IButton _, ButtonEventData _)
			{
				SaveConfigs(metaData.ID);
			}

			internal void <EnumerateConfigs>b__4(SyncDelegate<Action> syncDelegate)
			{
				//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dd: Expected O, but got Unknown
				//IL_007a: Unknown result type (might be due to invalid IL or missing references)
				//IL_009b: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
				<>c__DisplayClass5_7 CS$<>8__locals13 = new <>c__DisplayClass5_7
				{
					CS$<>8__locals2 = this,
					btn = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot)?.GetComponent<Button>((Predicate<Button>)null, false)
				};
				if (CS$<>8__locals13.btn != null)
				{
					CS$<>8__locals13.valueDriver = ((ContainerWorker<Component>)(object)((Component)CS$<>8__locals13.btn).Slot).GetComponent<ValueMultiDriver<bool>>((Predicate<ValueMultiDriver<bool>>)null, false);
					if (CS$<>8__locals13.valueDriver != null && ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals13.valueDriver.Drives).Count > 0)
					{
						SetColor(0, new colorX(0.36f, 0.2f, 0.23f, 1f, (ColorProfile)1));
						SetColor(1, new colorX(1f, 0.46f, 0.46f, 1f, (ColorProfile)1));
						SetColor(3, new colorX(0.88f, 0.88f, 0.88f, 1f, (ColorProfile)1));
					}
					CS$<>8__locals13.btn.LocalPressed += (ButtonEventHandler)delegate(IButton b, ButtonEventData _)
					{
						ResetConfigs(b, CS$<>8__locals13.CS$<>8__locals2.metaData.ID, CS$<>8__locals13.valueDriver);
					};
				}
				void SetColor(int index, colorX color)
				{
					//IL_0058: Unknown result type (might be due to invalid IL or missing references)
					<>c__DisplayClass5_8 CS$<>8__locals14 = new <>c__DisplayClass5_8();
					if (index < ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals13.valueDriver.Drives).Count)
					{
						CS$<>8__locals14.drive = ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals13.valueDriver.Drives)[index];
						BooleanValueDriver<colorX> component = ((ContainerWorker<Component>)(object)((Component)CS$<>8__locals13.btn).Slot).GetComponent<BooleanValueDriver<colorX>>((Predicate<BooleanValueDriver<colorX>>)((BooleanValueDriver<colorX> x) => (object)x.State == ((SyncRef<IField<bool>>)(object)CS$<>8__locals14.drive).Target), false);
						if (component != null)
						{
							((SyncField<colorX>)(object)component.TrueValue).Value = color;
						}
					}
				}
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_1
		{
			public Action<SyncDelegate<Action>> oldAction;

			public string section;

			public <>c__DisplayClass5_0 CS$<>8__locals1;

			public ButtonEventHandler <>9__6;

			internal void <EnumerateConfigs>b__5(SyncDelegate<Action> a)
			{
				//IL_0038: Unknown result type (might be due to invalid IL or missing references)
				//IL_003d: Unknown result type (might be due to invalid IL or missing references)
				//IL_003f: Expected O, but got Unknown
				//IL_0044: Expected O, but got Unknown
				oldAction?.Invoke(a);
				Button componentInChildren = ((SyncElement)a).Slot.GetComponentInChildren<Button>((Predicate<Button>)null, false, false);
				if (componentInChildren == null)
				{
					return;
				}
				ButtonEventHandler obj = <>9__6;
				if (obj == null)
				{
					ButtonEventHandler val = delegate(IButton b, ButtonEventData _)
					{
						Store<bool> componentInChildren2 = ((IComponent)b).Slot.FindParent((Predicate<Slot>)((Slot x) => x.Name == "Reset Button"), -1).GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false);
						if (componentInChildren2 != null && ((SyncField<bool>)(object)componentInChildren2.Value).Value)
						{
							ResetConfigSection(CS$<>8__locals1.metaData.ID, section);
						}
					};
					ButtonEventHandler val2 = val;
					<>9__6 = val;
					obj = val2;
				}
				componentInChildren.LocalPressed += obj;
			}

			internal void <EnumerateConfigs>b__6(IButton b, ButtonEventData _)
			{
				Store<bool> componentInChildren = ((IComponent)b).Slot.FindParent((Predicate<Slot>)((Slot x) => x.Name == "Reset Button"), -1).GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false);
				if (componentInChildren != null && ((SyncField<bool>)(object)componentInChildren.Value).Value)
				{
					ResetConfigSection(CS$<>8__locals1.metaData.ID, section);
				}
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_2
		{
			public ConfigEntryBase config;

			public LocaleString descKey2;

			public global::System.Type valueType;

			internal void <EnumerateConfigs>b__16(IField<string> x)
			{
				((IValue<string>)(object)x).Value = LocaleLoader.GetFormattedLocaleString(descKey2.content);
			}

			internal global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> <EnumerateConfigs>b__18(global::System.Collections.Generic.IReadOnlyList<string> path2)
			{
				return (global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>)((MethodBase)DataFeedHelpers.HandleFlagsEnumCategory.MakeGenericMethod(new global::System.Type[1] { valueType })).Invoke((object)null, new object[2] { path2, config });
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_3
		{
			public object firstAction;

			internal void <EnumerateConfigs>b__12(SyncDelegate<Action> syncDelegate)
			{
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				//IL_0043: Expected O, but got Unknown
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0075: Expected O, but got Unknown
				<>c__DisplayClass5_4 CS$<>8__locals5 = new <>c__DisplayClass5_4();
				Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false);
				if (component == null)
				{
					return;
				}
				CS$<>8__locals5.actionConfig = firstAction as ActionConfig;
				if (CS$<>8__locals5.actionConfig != null)
				{
					component.LocalPressed += (ButtonEventHandler)delegate
					{
						CS$<>8__locals5.actionConfig.Invoke();
					};
					return;
				}
				<>c__DisplayClass5_5 CS$<>8__locals6 = new <>c__DisplayClass5_5
				{
					action = (Action)/*isinst with value type is only supported in some contexts*/
				};
				if (CS$<>8__locals6.action != null)
				{
					component.LocalPressed += (ButtonEventHandler)delegate
					{
						CS$<>8__locals6.action.Invoke();
					};
				}
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_4
		{
			public ActionConfig actionConfig;

			internal void <EnumerateConfigs>b__13(IButton _, ButtonEventData _)
			{
				actionConfig.Invoke();
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_5
		{
			public Action action;

			internal void <EnumerateConfigs>b__14(IButton _, ButtonEventData _)
			{
				action.Invoke();
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_6
		{
			public Action<IField<bool>> oldSetup;

			internal void <EnumerateConfigs>b__15(IField<bool> x)
			{
				oldSetup?.Invoke(x);
				((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_7
		{
			public ValueMultiDriver<bool> valueDriver;

			public Button btn;

			public <>c__DisplayClass5_0 CS$<>8__locals2;

			internal void <EnumerateConfigs>b__24(IButton b, ButtonEventData _)
			{
				ResetConfigs(b, CS$<>8__locals2.metaData.ID, valueDriver);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_8
		{
			public FieldDrive<bool> drive;

			internal bool <EnumerateConfigs>b__26(BooleanValueDriver<colorX> x)
			{
				return (object)x.State == ((SyncRef<IField<bool>>)(object)drive).Target;
			}
		}

		[CompilerGenerated]
		private sealed class <Enumerate>d__4 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine
		{
			public int <>1__state;

			public AsyncIteratorMethodBuilder <>t__builder;

			public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd;

			private DataFeedItem <>2__current;

			private bool <>w__disposeMode;

			private int <>l__initialThreadId;

			private global::System.Collections.Generic.IReadOnlyList<string> path;

			public global::System.Collections.Generic.IReadOnlyList<string> <>3__path;

			private <>c__DisplayClass4_0 <>8__1;

			private string[] <metadataGroup>5__2;

			private TaskAwaiter <>u__1;

			private global::System.Delegate[] <>7__wrap2;

			private int <>7__wrap3;

			private global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> <>7__wrap4;

			private object <>7__wrap5;

			private int <>7__wrap6;

			private ValueTaskAwaiter<bool> <>u__2;

			private ValueTaskAwaiter <>u__3;

			DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Enumerate>d__4(int <>1__state)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				<>t__builder = AsyncIteratorMethodBuilder.Create();
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			private void MoveNext()
			{
				//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
				//IL_028e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0293: Unknown result type (might be due to invalid IL or missing references)
				//IL_029b: Unknown result type (might be due to invalid IL or missing references)
				//IL_05a4: Unknown result type (might be due to invalid IL or missing references)
				//IL_05a9: Unknown result type (might be due to invalid IL or missing references)
				//IL_05b1: Unknown result type (might be due to invalid IL or missing references)
				//IL_0255: Unknown result type (might be due to invalid IL or missing references)
				//IL_025a: Unknown result type (might be due to invalid IL or missing references)
				//IL_056b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0570: Unknown result type (might be due to invalid IL or missing references)
				//IL_07b1: Unknown result type (might be due to invalid IL or missing references)
				//IL_069e: Unknown result type (might be due to invalid IL or missing references)
				//IL_060c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0612: Expected O, but got Unknown
				//IL_0627: Unknown result type (might be due to invalid IL or missing references)
				//IL_007d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0082: Unknown result type (might be due to invalid IL or missing references)
				//IL_026f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0271: Unknown result type (might be due to invalid IL or missing references)
				//IL_0585: Unknown result type (might be due to invalid IL or missing references)
				//IL_0587: Unknown result type (might be due to invalid IL or missing references)
				//IL_0733: Unknown result type (might be due to invalid IL or missing references)
				//IL_0097: Unknown result type (might be due to invalid IL or missing references)
				//IL_0099: Unknown result type (might be due to invalid IL or missing references)
				//IL_084d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0854: Expected O, but got Unknown
				//IL_086f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0884: Unknown result type (might be due to invalid IL or missing references)
				//IL_04de: Unknown result type (might be due to invalid IL or missing references)
				//IL_04e3: Unknown result type (might be due to invalid IL or missing references)
				//IL_0517: Unknown result type (might be due to invalid IL or missing references)
				//IL_051c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0524: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
				//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
				//IL_0201: Unknown result type (might be due to invalid IL or missing references)
				//IL_0206: Unknown result type (might be due to invalid IL or missing references)
				//IL_020e: Unknown result type (might be due to invalid IL or missing references)
				//IL_04f8: Unknown result type (might be due to invalid IL or missing references)
				//IL_04fa: Unknown result type (might be due to invalid IL or missing references)
				//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
				//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_0142: Unknown result type (might be due to invalid IL or missing references)
				//IL_0148: Unknown result type (might be due to invalid IL or missing references)
				//IL_0458: Unknown result type (might be due to invalid IL or missing references)
				//IL_045e: Unknown result type (might be due to invalid IL or missing references)
				//IL_03d7: Unknown result type (might be due to invalid IL or missing references)
				//IL_03de: Expected O, but got Unknown
				//IL_03f4: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				try
				{
					TaskAwaiter val9;
					ValueTaskAwaiter val6;
					DataFeedGroup val3;
					DataFeedIndicator<string> val7;
					object obj2;
					string pluginId;
					ConfigFile config;
					global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable;
					switch (num)
					{
					default:
						if (<>w__disposeMode)
						{
							break;
						}
						num = (<>1__state = -1);
						<>8__1 = new <>c__DisplayClass4_0();
						<>2__current = null;
						val9 = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter();
						if (!((TaskAwaiter)(ref val9)).IsCompleted)
						{
							num = (<>1__state = 0);
							<>u__1 = val9;
							<Enumerate>d__4 <Enumerate>d__ = this;
							((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <Enumerate>d__4>(ref val9, ref <Enumerate>d__);
							return;
						}
						goto IL_00d2;
					case 0:
						val9 = <>u__1;
						<>u__1 = default(TaskAwaiter);
						num = (<>1__state = -1);
						goto IL_00d2;
					case -4:
					case 1:
						try
						{
							ValueTaskAwaiter<bool> val5;
							if (num != -4)
							{
								if (num != 1)
								{
									goto IL_01b2;
								}
								val5 = <>u__2;
								<>u__2 = default(ValueTaskAwaiter<bool>);
								num = (<>1__state = -1);
								goto IL_021d;
							}
							num = (<>1__state = -1);
							if (!<>w__disposeMode)
							{
								goto IL_01b2;
							}
							goto end_IL_0163;
							IL_01b2:
							<>2__current = null;
							val5 = <>7__wrap4.MoveNextAsync().GetAwaiter();
							if (!val5.IsCompleted)
							{
								num = (<>1__state = 1);
								<>u__2 = val5;
								<Enumerate>d__4 <Enumerate>d__ = this;
								((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <Enumerate>d__4>(ref val5, ref <Enumerate>d__);
								return;
							}
							goto IL_021d;
							IL_021d:
							if (val5.GetResult())
							{
								DataFeedItem current = <>7__wrap4.Current;
								current.InitSlotName();
								<>2__current = current;
								num = (<>1__state = -4);
								goto IL_0973;
							}
							end_IL_0163:;
						}
						catch (object obj)
						{
							<>7__wrap5 = obj;
						}
						if (<>7__wrap4 != null)
						{
							<>2__current = null;
							val6 = ((global::System.IAsyncDisposable)<>7__wrap4).DisposeAsync().GetAwaiter();
							if (!((ValueTaskAwaiter)(ref val6)).IsCompleted)
							{
								num = (<>1__state = 2);
								<>u__3 = val6;
								<Enumerate>d__4 <Enumerate>d__ = this;
								((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <Enumerate>d__4>(ref val6, ref <Enumerate>d__);
								return;
							}
							goto IL_02aa;
						}
						goto IL_02b1;
					case 2:
						val6 = <>u__3;
						<>u__3 = default(ValueTaskAwaiter);
						num = (<>1__state = -1);
						goto IL_02aa;
					case -5:
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						goto IL_060c;
					case -6:
					case 3:
						try
						{
							ValueTaskAwaiter<bool> val5;
							if (num != -6)
							{
								if (num != 3)
								{
									goto IL_04c8;
								}
								val5 = <>u__2;
								<>u__2 = default(ValueTaskAwaiter<bool>);
								num = (<>1__state = -1);
								goto IL_0533;
							}
							num = (<>1__state = -1);
							if (!<>w__disposeMode)
							{
								goto IL_04c8;
							}
							goto end_IL_0479;
							IL_04c8:
							<>2__current = null;
							val5 = <>7__wrap4.MoveNextAsync().GetAwaiter();
							if (!val5.IsCompleted)
							{
								num = (<>1__state = 3);
								<>u__2 = val5;
								<Enumerate>d__4 <Enumerate>d__ = this;
								((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <Enumerate>d__4>(ref val5, ref <Enumerate>d__);
								return;
							}
							goto IL_0533;
							IL_0533:
							if (val5.GetResult())
							{
								DataFeedItem current2 = <>7__wrap4.Current;
								current2.InitSlotName();
								<>2__current = current2;
								num = (<>1__state = -6);
								goto IL_0973;
							}
							end_IL_0479:;
						}
						catch (object obj)
						{
							<>7__wrap5 = obj;
						}
						if (<>7__wrap4 != null)
						{
							<>2__current = null;
							val6 = ((global::System.IAsyncDisposable)<>7__wrap4).DisposeAsync().GetAwaiter();
							if (!((ValueTaskAwaiter)(ref val6)).IsCompleted)
							{
								num = (<>1__state = 4);
								<>u__3 = val6;
								<Enumerate>d__4 <Enumerate>d__ = this;
								((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <Enumerate>d__4>(ref val6, ref <Enumerate>d__);
								return;
							}
							goto IL_05c0;
						}
						goto IL_05c7;
					case 4:
						val6 = <>u__3;
						<>u__3 = default(ValueTaskAwaiter);
						num = (<>1__state = -1);
						goto IL_05c0;
					case -7:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						<metadataGroup>5__2 = new string[1] { "Metadata" };
						DataFeedIndicator<string> val8 = new DataFeedIndicator<string>();
						((DataFeedItem)val8).InitBase("Id", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Guid", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val8.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = <>8__1.metadata.ID;
						}, (string)null);
						((DataFeedItem)(object)val8).InitSlotName();
						<>2__current = (DataFeedItem)(object)val8;
						num = (<>1__state = -8);
						goto IL_0973;
					}
					case -8:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						if (string.IsNullOrWhiteSpace(<>8__1.metadata.Author))
						{
							goto IL_078f;
						}
						DataFeedIndicator<string> val4 = new DataFeedIndicator<string>();
						((DataFeedItem)val4).InitBase("Author", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Author", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val4.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = <>8__1.metadata.Author;
						}, (string)null);
						((DataFeedItem)(object)val4).InitSlotName();
						<>2__current = (DataFeedItem)(object)val4;
						num = (<>1__state = -9);
						goto IL_0973;
					}
					case -9:
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						goto IL_078f;
					case -10:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode || string.IsNullOrWhiteSpace(<>8__1.metadata.Link) || !Uri.TryCreate(<>8__1.metadata.Link, (UriKind)1, ref <>8__1.uri))
						{
							break;
						}
						DataFeedAction val = new DataFeedAction();
						((DataFeedItem)val).InitBase("Link", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.ModPage", (string)null, true, (Dictionary<string, object>)null), LocaleString.op_Implicit(<>8__1.metadata.Link), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val.InitAction((Action<SyncDelegate<Action>>)delegate(SyncDelegate<Action> syncDelegate)
						{
							Slot val11 = ((syncDelegate != null) ? ((SyncElement)syncDelegate).Slot : null);
							if (val11 != null)
							{
								((SyncField<Uri>)(object)((ContainerWorker<Component>)(object)val11).AttachComponent<Hyperlink>(true, (Action<Hyperlink>)null).URL).Value = <>8__1.uri;
							}
						});
						((DataFeedItem)(object)val).InitSlotName();
						<>2__current = (DataFeedItem)(object)val;
						num = (<>1__state = -11);
						goto IL_0973;
					}
					case -11:
						{
							num = (<>1__state = -1);
							_ = <>w__disposeMode;
							break;
						}
						IL_0304:
						if (<>7__wrap3 < <>7__wrap2.Length)
						{
							if (<>7__wrap2[<>7__wrap3] is Func<global::System.Collections.Generic.IReadOnlyList<string>, global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>> val2)
							{
								<>7__wrap4 = val2.Invoke(path).GetAsyncEnumerator(default(CancellationToken));
								<>7__wrap5 = null;
								<>7__wrap6 = 0;
								goto case -4;
							}
							goto IL_02f6;
						}
						<>7__wrap2 = null;
						goto IL_031e;
						IL_060c:
						val3 = new DataFeedGroup();
						((DataFeedItem)val3).InitBase("Metadata", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Metadata", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						((DataFeedItem)(object)val3).InitSlotName();
						<>2__current = (DataFeedItem)(object)val3;
						num = (<>1__state = -7);
						goto IL_0973;
						IL_031e:
						<>w__disposeMode = true;
						break;
						IL_02f6:
						<>7__wrap3++;
						goto IL_0304;
						IL_078f:
						val7 = new DataFeedIndicator<string>();
						((DataFeedItem)val7).InitBase("Version", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Version", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val7.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = <>8__1.metadata.Version;
						}, (string)null);
						((DataFeedItem)(object)val7).InitSlotName();
						<>2__current = (DataFeedItem)(object)val7;
						num = (<>1__state = -10);
						goto IL_0973;
						IL_05c0:
						((ValueTaskAwaiter)(ref val6)).GetResult();
						goto IL_05c7;
						IL_02b1:
						obj2 = <>7__wrap5;
						if (obj2 != null)
						{
							ExceptionDispatchInfo.Capture((obj2 as global::System.Exception) ?? throw obj2).Throw();
						}
						_ = <>7__wrap6;
						if (<>w__disposeMode)
						{
							break;
						}
						<>7__wrap5 = null;
						<>7__wrap4 = null;
						goto IL_02f6;
						IL_05c7:
						obj2 = <>7__wrap5;
						if (obj2 != null)
						{
							ExceptionDispatchInfo.Capture((obj2 as global::System.Exception) ?? throw obj2).Throw();
						}
						_ = <>7__wrap3;
						if (<>w__disposeMode)
						{
							break;
						}
						<>7__wrap5 = null;
						<>7__wrap4 = null;
						goto IL_060c;
						IL_00d2:
						((TaskAwaiter)(ref val9)).GetResult();
						pluginId = path[1];
						if (!DataFeedHelpers.DoesPluginExist(pluginId))
						{
							if (BepisConfigsPage.CustomPluginConfigsPages != null)
							{
								<>7__wrap2 = ((global::System.Delegate)(object)BepisConfigsPage.CustomPluginConfigsPages).GetInvocationList();
								<>7__wrap3 = 0;
								goto IL_0304;
							}
							goto IL_031e;
						}
						if (!DataFeedHelpers.TryGetPluginData(pluginId, out config, out <>8__1.metadata))
						{
							<>w__disposeMode = true;
							break;
						}
						if (string.IsNullOrWhiteSpace(<>8__1.metadata.Name))
						{
							<>8__1.metadata.Name = "<i>Unknown</i>";
						}
						if (string.IsNullOrWhiteSpace(<>8__1.metadata.Version))
						{
							<>8__1.metadata.Version = "<i>Unknown</i>";
						}
						if (string.IsNullOrWhiteSpace(<>8__1.metadata.ID))
						{
							<>8__1.metadata.ID = "<i>Unknown</i>";
						}
						if (DataFeedHelpers.IsEmpty(config))
						{
							DataFeedLabel val10 = new DataFeedLabel();
							((DataFeedItem)val10).InitBase("NoConfigs", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.NoConfigs", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
							((DataFeedItem)(object)val10).InitSlotName();
							<>2__current = (DataFeedItem)(object)val10;
							num = (<>1__state = -5);
							goto IL_0973;
						}
						asyncEnumerable = EnumerateConfigs(config, <>8__1.metadata, path);
						<>7__wrap4 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken));
						<>7__wrap5 = null;
						<>7__wrap3 = 0;
						goto case -6;
						IL_02aa:
						((ValueTaskAwaiter)(ref val6)).GetResult();
						goto IL_02b1;
					}
				}
				catch (global::System.Exception exception)
				{
					<>1__state = -2;
					<>8__1 = null;
					<metadataGroup>5__2 = null;
					<>7__wrap2 = null;
					<>7__wrap4 = null;
					<>7__wrap5 = null;
					<>2__current = null;
					((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete();
					<>v__promiseOfValueOrEnd.SetException(exception);
					return;
				}
				<>1__state = -2;
				<>8__1 = null;
				<metadataGroup>5__2 = null;
				<>7__wrap2 = null;
				<>7__wrap4 = null;
				<>7__wrap5 = null;
				<>2__current = null;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete();
				<>v__promiseOfValueOrEnd.SetResult(false);
				return;
				IL_0973:
				<>v__promiseOfValueOrEnd.SetResult(true);
			}

			[DebuggerHidden]
			private void SetStateMachine(IAsyncStateMachine stateMachine)
			{
			}

			[DebuggerHidden]
			global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>.GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken))
			{
				//IL_0020: Unknown result type (might be due to invalid IL or missing references)
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				<Enumerate>d__4 <Enumerate>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = -3;
					<>t__builder = AsyncIteratorMethodBuilder.Create();
					<>w__disposeMode = false;
					<Enumerate>d__ = this;
				}
				else
				{
					<Enumerate>d__ = new <Enumerate>d__4(-3);
				}
				<Enumerate>d__.path = <>3__path;
				return <Enumerate>d__;
			}

			[DebuggerHidden]
			global::System.Threading.Tasks.ValueTask<bool> global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.MoveNextAsync()
			{
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0047: Invalid comparison between Unknown and I4
				if (<>1__state == -2)
				{
					return default(global::System.Threading.Tasks.ValueTask<bool>);
				}
				<>v__promiseOfValueOrEnd.Reset();
				<Enumerate>d__4 <Enumerate>d__ = this;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<Enumerate>d__4>(ref <Enumerate>d__);
				short version = <>v__promiseOfValueOrEnd.Version;
				if ((int)<>v__promiseOfValueOrEnd.GetStatus(version) == 1)
				{
					return new global::System.Threading.Tasks.ValueTask<bool>(<>v__promiseOfValueOrEnd.GetResult(version));
				}
				return new global::System.Threading.Tasks.ValueTask<bool>((IValueTaskSource<bool>)this, version);
			}

			[DebuggerHidden]
			bool IValueTaskSource<bool>.GetResult(short token)
			{
				return <>v__promiseOfValueOrEnd.GetResult(token);
			}

			[DebuggerHidden]
			ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				return <>v__promiseOfValueOrEnd.GetStatus(token);
			}

			[DebuggerHidden]
			void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				<>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags);
			}

			[DebuggerHidden]
			void IValueTaskSource.GetResult(short token)
			{
				<>v__promiseOfValueOrEnd.GetResult(token);
			}

			[DebuggerHidden]
			ValueTaskSourceStatus IValueTaskSource.GetStatus(short token)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				return <>v__promiseOfValueOrEnd.GetStatus(token);
			}

			[DebuggerHidden]
			void IValueTaskSource.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				<>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags);
			}

			[DebuggerHidden]
			global::System.Threading.Tasks.ValueTask global::System.IAsyncDisposable.DisposeAsync()
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				if (<>1__state >= -1)
				{
					throw new NotSupportedException();
				}
				if (<>1__state == -2)
				{
					return default(global::System.Threading.Tasks.ValueTask);
				}
				<>w__disposeMode = true;
				<>v__promiseOfValueOrEnd.Reset();
				<Enumerate>d__4 <Enumerate>d__ = this;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<Enumerate>d__4>(ref <Enumerate>d__);
				return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version);
			}
		}

		[CompilerGenerated]
		private sealed class <EnumerateConfigs>d__5 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine
		{
			public int <>1__state;

			public AsyncIteratorMethodBuilder <>t__builder;

			public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd;

			private DataFeedItem <>2__current;

			private bool <>w__disposeMode;

			private int <>l__initialThreadId;

			private ModMeta metaData;

			public ModMeta <>3__metaData;

			private ConfigFile configFile;

			public ConfigFile <>3__configFile;

			private <>c__DisplayClass5_0 <>8__1;

			private global::System.Collections.Generic.IReadOnlyList<string> path;

			public global::System.Collections.Generic.IReadOnlyList<string> <>3__path;

			private <>c__DisplayClass5_1 <>8__2;

			private <>c__DisplayClass5_2 <>8__3;

			private string[] <groupKeys>5__2;

			private Enumerator<IGrouping<string, ConfigEntryBase>> <>7__wrap2;

			private IGrouping<string, ConfigEntryBase> <sectionGroup>5__4;

			private string[] <groupingKeys>5__5;

			private List<string> <added>5__6;

			private global::System.Collections.Generic.IEnumerator<ConfigEntryBase> <>7__wrap6;

			private string <key>5__8;

			private LocaleString <nameKey>5__9;

			private DataFeedItem <dummyField>5__10;

			private bool <customUi>5__11;

			private global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> <>7__wrap11;

			private object <>7__wrap12;

			private int <>7__wrap13;

			private ValueTaskAwaiter<bool> <>u__1;

			private ValueTaskAwaiter <>u__2;

			DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <EnumerateConfigs>d__5(int <>1__state)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				<>t__builder = AsyncIteratorMethodBuilder.Create();
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			private void MoveNext()
			{
				//IL_0c15: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c17: Unknown result type (might be due to invalid IL or missing references)
				//IL_0d2e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0d30: Unknown result type (might be due to invalid IL or missing references)
				//IL_1003: Unknown result type (might be due to invalid IL or missing references)
				//IL_1005: Unknown result type (might be due to invalid IL or missing references)
				//IL_132f: Unknown result type (might be due to invalid IL or missing references)
				//IL_135e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0d4a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0d50: Unknown result type (might be due to invalid IL or missing references)
				//IL_08e7: Unknown result type (might be due to invalid IL or missing references)
				//IL_08ec: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e7c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e81: Unknown result type (might be due to invalid IL or missing references)
				//IL_13c7: Unknown result type (might be due to invalid IL or missing references)
				//IL_13f6: Unknown result type (might be due to invalid IL or missing references)
				//IL_1281: Unknown result type (might be due to invalid IL or missing references)
				//IL_1288: Expected O, but got Unknown
				//IL_12a3: Unknown result type (might be due to invalid IL or missing references)
				//IL_12b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_11fe: Unknown result type (might be due to invalid IL or missing references)
				//IL_1205: Expected O, but got Unknown
				//IL_1220: Unknown result type (might be due to invalid IL or missing references)
				//IL_122d: Unknown result type (might be due to invalid IL or missing references)
				//IL_117f: Unknown result type (might be due to invalid IL or missing references)
				//IL_1185: Expected O, but got Unknown
				//IL_119f: Unknown result type (might be due to invalid IL or missing references)
				//IL_11ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_0901: Unknown result type (might be due to invalid IL or missing references)
				//IL_0903: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e96: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e98: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
				//IL_0def: Unknown result type (might be due to invalid IL or missing references)
				//IL_0df4: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e28: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e2d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e35: Unknown result type (might be due to invalid IL or missing references)
				//IL_1070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0920: Unknown result type (might be due to invalid IL or missing references)
				//IL_0925: Unknown result type (might be due to invalid IL or missing references)
				//IL_092d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0eb5: Unknown result type (might be due to invalid IL or missing references)
				//IL_0eba: Unknown result type (might be due to invalid IL or missing references)
				//IL_0ec2: Unknown result type (might be due to invalid IL or missing references)
				//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e09: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e0b: Unknown result type (might be due to invalid IL or missing references)
				//IL_110f: Unknown result type (might be due to invalid IL or missing references)
				//IL_1115: Unknown result type (might be due to invalid IL or missing references)
				//IL_111b: Expected O, but got Unknown
				//IL_1130: Unknown result type (might be due to invalid IL or missing references)
				//IL_09b4: Unknown result type (might be due to invalid IL or missing references)
				//IL_09bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_085a: Unknown result type (might be due to invalid IL or missing references)
				//IL_085f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0893: Unknown result type (might be due to invalid IL or missing references)
				//IL_0898: Unknown result type (might be due to invalid IL or missing references)
				//IL_08a0: Unknown result type (might be due to invalid IL or missing references)
				//IL_0874: Unknown result type (might be due to invalid IL or missing references)
				//IL_0876: Unknown result type (might be due to invalid IL or missing references)
				//IL_042c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0431: Unknown result type (might be due to invalid IL or missing references)
				//IL_0457: Unknown result type (might be due to invalid IL or missing references)
				//IL_045c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0482: Unknown result type (might be due to invalid IL or missing references)
				//IL_0487: Unknown result type (might be due to invalid IL or missing references)
				//IL_04ca: Unknown result type (might be due to invalid IL or missing references)
				//IL_04cf: Unknown result type (might be due to invalid IL or missing references)
				//IL_0520: Unknown result type (might be due to invalid IL or missing references)
				//IL_0525: Unknown result type (might be due to invalid IL or missing references)
				//IL_069d: Unknown result type (might be due to invalid IL or missing references)
				//IL_06a2: Unknown result type (might be due to invalid IL or missing references)
				//IL_06a5: Unknown result type (might be due to invalid IL or missing references)
				//IL_06aa: Unknown result type (might be due to invalid IL or missing references)
				//IL_0685: Unknown result type (might be due to invalid IL or missing references)
				//IL_068a: Unknown result type (might be due to invalid IL or missing references)
				//IL_05be: Unknown result type (might be due to invalid IL or missing references)
				//IL_05c3: Unknown result type (might be due to invalid IL or missing references)
				//IL_05c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_05c8: Unknown result type (might be due to invalid IL or missing references)
				//IL_05cd: Unknown result type (might be due to invalid IL or missing references)
				//IL_05d2: Unknown result type (might be due to invalid IL or missing references)
				//IL_05d4: Unknown result type (might be due to invalid IL or missing references)
				//IL_05d9: Unknown result type (might be due to invalid IL or missing references)
				//IL_05e1: Unknown result type (might be due to invalid IL or missing references)
				//IL_05e3: Unknown result type (might be due to invalid IL or missing references)
				//IL_05e8: Unknown result type (might be due to invalid IL or missing references)
				//IL_05ed: Unknown result type (might be due to invalid IL or missing references)
				//IL_05ef: Unknown result type (might be due to invalid IL or missing references)
				//IL_062b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0630: Unknown result type (might be due to invalid IL or missing references)
				//IL_066e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0673: Unknown result type (might be due to invalid IL or missing references)
				//IL_0729: Unknown result type (might be due to invalid IL or missing references)
				//IL_0730: Expected O, but got Unknown
				//IL_0745: Unknown result type (might be due to invalid IL or missing references)
				//IL_074a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0be3: Unknown result type (might be due to invalid IL or missing references)
				//IL_0bea: Expected O, but got Unknown
				//IL_0b60: Unknown result type (might be due to invalid IL or missing references)
				//IL_0b67: Expected O, but got Unknown
				//IL_0b7b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0b7d: Unknown result type (might be due to invalid IL or missing references)
				//IL_07b3: Unknown result type (might be due to invalid IL or missing references)
				//IL_07b9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0fd1: Unknown result type (might be due to invalid IL or missing references)
				//IL_0fd8: Expected O, but got Unknown
				int num = <>1__state;
				try
				{
					switch (num)
					{
					default:
					{
						if (<>w__disposeMode)
						{
							break;
						}
						num = (<>1__state = -1);
						<>8__1 = new <>c__DisplayClass5_0();
						<>8__1.metaData = metaData;
						CategoryHandlers.Clear();
						List<IGrouping<string, ConfigEntryBase>> val16 = Enumerable.ToList<IGrouping<string, ConfigEntryBase>>(Enumerable.GroupBy<ConfigEntryBase, string>(Enumerable.Where<ConfigEntryBase>((global::System.Collections.Generic.IEnumerable<ConfigEntryBase>)configFile.Values, (Func<ConfigEntryBase, bool>)((ConfigEntryBase config) => Plugin.ShowHidden.Value || !HiddenConfig.IsHidden(config))), (Func<ConfigEntryBase, string>)((ConfigEntryBase config) => config.Definition.Section)));
						<>7__wrap2 = val16.GetEnumerator();
						goto case -10;
					}
					case -10:
					case -9:
					case -8:
					case -7:
					case -6:
					case -5:
					case -4:
					case 0:
					case 1:
					case 2:
					case 3:
					{
						try
						{
							switch (num)
							{
							case -4:
								num = (<>1__state = -1);
								if (!<>w__disposeMode)
								{
									<groupingKeys>5__5 = new string[1] { <>8__2.section };
									<added>5__6 = new List<string>();
									<>7__wrap6 = ((global::System.Collections.Generic.IEnumerable<ConfigEntryBase>)<sectionGroup>5__4).GetEnumerator();
									goto case -10;
								}
								goto end_IL_00fa;
							case -10:
							case -9:
							case -8:
							case -7:
							case -6:
							case -5:
							case 0:
							case 1:
							case 2:
							case 3:
								try
								{
									ValueTaskAwaiter val2;
									object obj2;
									switch (num)
									{
									case -5:
									case 0:
										try
										{
											ValueTaskAwaiter<bool> val3;
											if (num != -5)
											{
												if (num != 0)
												{
													goto IL_0844;
												}
												val3 = <>u__1;
												<>u__1 = default(ValueTaskAwaiter<bool>);
												num = (<>1__state = -1);
												goto IL_08af;
											}
											num = (<>1__state = -1);
											if (!<>w__disposeMode)
											{
												goto IL_0844;
											}
											goto end_IL_07d4;
											IL_0844:
											<>2__current = null;
											val3 = <>7__wrap11.MoveNextAsync().GetAwaiter();
											if (!val3.IsCompleted)
											{
												num = (<>1__state = 0);
												<>u__1 = val3;
												<EnumerateConfigs>d__5 <EnumerateConfigs>d__ = this;
												((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <EnumerateConfigs>d__5>(ref val3, ref <EnumerateConfigs>d__);
												return;
											}
											goto IL_08af;
											IL_08af:
											if (val3.GetResult())
											{
												DataFeedItem current = <>7__wrap11.Current;
												current.InitVisible((Action<IField<bool>>)new <>c__DisplayClass5_6
												{
													oldSetup = current.SetupVisible
												}.<EnumerateConfigs>b__15);
												<>2__current = current;
												num = (<>1__state = -5);
												goto IL_1430;
											}
											end_IL_07d4:;
										}
										catch (object obj)
										{
											<>7__wrap12 = obj;
										}
										if (<>7__wrap11 != null)
										{
											<>2__current = null;
											val2 = ((global::System.IAsyncDisposable)<>7__wrap11).DisposeAsync().GetAwaiter();
											if (!((ValueTaskAwaiter)(ref val2)).IsCompleted)
											{
												num = (<>1__state = 1);
												<>u__2 = val2;
												<EnumerateConfigs>d__5 <EnumerateConfigs>d__ = this;
												((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <EnumerateConfigs>d__5>(ref val2, ref <EnumerateConfigs>d__);
												return;
											}
											goto IL_093c;
										}
										goto IL_0943;
									case 1:
										val2 = <>u__2;
										<>u__2 = default(ValueTaskAwaiter);
										num = (<>1__state = -1);
										goto IL_093c;
									case -6:
										num = (<>1__state = -1);
										if (<>w__disposeMode)
										{
											break;
										}
										goto IL_0a52;
									case -7:
										num = (<>1__state = -1);
										if (<>w__disposeMode)
										{
											break;
										}
										goto IL_1063;
									case -8:
										num = (<>1__state = -1);
										if (<>w__disposeMode)
										{
											break;
										}
										goto IL_1063;
									case -9:
									case 2:
										try
										{
											ValueTaskAwaiter<bool> val3;
											if (num != -9)
											{
												if (num != 2)
												{
													goto IL_0dd9;
												}
												val3 = <>u__1;
												<>u__1 = default(ValueTaskAwaiter<bool>);
												num = (<>1__state = -1);
												goto IL_0e44;
											}
											num = (<>1__state = -1);
											if (!<>w__disposeMode)
											{
												goto IL_0dd9;
											}
											goto end_IL_0d6b;
											IL_0dd9:
											<>2__current = null;
											val3 = <>7__wrap11.MoveNextAsync().GetAwaiter();
											if (!val3.IsCompleted)
											{
												num = (<>1__state = 2);
												<>u__1 = val3;
												<EnumerateConfigs>d__5 <EnumerateConfigs>d__ = this;
												((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <EnumerateConfigs>d__5>(ref val3, ref <EnumerateConfigs>d__);
												return;
											}
											goto IL_0e44;
											IL_0e44:
											if (val3.GetResult())
											{
												DataFeedItem current2 = <>7__wrap11.Current;
												current2.InitVisible((Action<IField<bool>>)delegate(IField<bool> x)
												{
													((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value;
												});
												<>2__current = current2;
												num = (<>1__state = -9);
												goto IL_1430;
											}
											end_IL_0d6b:;
										}
										catch (object obj)
										{
											<>7__wrap12 = obj;
										}
										if (<>7__wrap11 != null)
										{
											<>2__current = null;
											val2 = ((global::System.IAsyncDisposable)<>7__wrap11).DisposeAsync().GetAwaiter();
											if (!((ValueTaskAwaiter)(ref val2)).IsCompleted)
											{
												num = (<>1__state = 3);
												<>u__2 = val2;
												<EnumerateConfigs>d__5 <EnumerateConfigs>d__ = this;
												((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <EnumerateConfigs>d__5>(ref val2, ref <EnumerateConfigs>d__);
												return;
											}
											goto IL_0ed1;
										}
										goto IL_0ed8;
									case 3:
										val2 = <>u__2;
										<>u__2 = default(ValueTaskAwaiter);
										num = (<>1__state = -1);
										goto IL_0ed1;
									case -10:
										num = (<>1__state = -1);
										if (<>w__disposeMode)
										{
											break;
										}
										goto IL_1063;
									default:
										{
											if (!((global::System.Collections.IEnumerator)<>7__wrap6).MoveNext())
											{
												break;
											}
											<>8__3 = new <>c__DisplayClass5_2();
											<>8__3.config = <>7__wrap6.Current;
											string text = <>8__2.section + "." + <>8__3.config.Definition.Key;
											<key>5__8 = (<added>5__6.Contains(text) ? (text + <added>5__6.Count) : text);
											<added>5__6.Add(<key>5__8);
											bool flag = HiddenConfig.IsHidden(<>8__3.config);
											<>8__3.valueType = <>8__3.config.SettingType;
											string text2;
											if (<>8__3.config.DefaultValue == null)
											{
												text2 = "<i>Null</i>";
											}
											else
											{
												string text3 = <>8__3.config.DefaultValue.ToString();
												text2 = (string.IsNullOrEmpty(text3) ? "<i>Empty String</i>" : ((!(<>8__3.valueType == typeof(string)) && !(<>8__3.valueType == typeof(Uri))) ? text3 : ("\"" + text3 + "\"")));
											}
											<nameKey>5__9 = LocaleString.op_Implicit(flag ? ("<color=hero.yellow>" + <>8__3.config.Definition.Key + "</color>") : <>8__3.config.Definition.Key);
											LocaleString val5 = LocaleString.op_Implicit(<>8__3.config.Description.Description + "\n\nDefault: " + text2);
											<>8__3.descKey2 = LocaleString.op_Implicit(<>8__3.config.Description.Description ?? "");
											LocaleString val6 = LocaleString.op_Implicit(<>8__3.config.Definition.Key + " : " + ReflectionExtensions.GetNiceName(<>8__3.valueType, "<", ">", "+"));
											LocaleString val7 = LocaleString.op_Implicit($"{<>8__3.config.Definition.Key} : {<>8__3.config.BoxedValue}");
											if (Enumerable.Any<PluginInfo>((global::System.Collections.Generic.IEnumerable<PluginInfo>)LocaleLoader.PluginsWithLocales, (Func<PluginInfo, bool>)((PluginInfo x) => x.Metadata.GUID == <>8__2.CS$<>8__locals1.metaData.ID)) && Enumerable.FirstOrDefault<object>((global::System.Collections.Generic.IEnumerable<object>)<>8__3.config.Description.Tags, (Func<object, bool>)((object x) => x is ConfigLocale)) is ConfigLocale val8)
											{
												<nameKey>5__9 = val8.Name;
												val5 = val8.Description;
												<>8__3.descKey2 = val8.Description;
												string formattedLocaleString = LocaleLoader.GetFormattedLocaleString(val8.Name.content);
												val6 = LocaleString.op_Implicit(formattedLocaleString + " : " + ReflectionExtensions.GetNiceName(<>8__3.valueType, "<", ">", "+"));
												val7 = LocaleString.op_Implicit($"{formattedLocaleString} : {<>8__3.config.BoxedValue}");
											}
											if (flag)
											{
												<nameKey>5__9 = ((LocaleString)(ref <nameKey>5__9)).SetFormat("<color=hero.yellow>{0}</color>");
											}
											val5 = ((LocaleString)(ref val5)).SetFormat("{0}\n\nDefault: " + text2);
											InternalLocale internalLocale = new InternalLocale(<nameKey>5__9, val5);
											if (<>8__3.valueType == typeof(dummy))
											{
												<>c__DisplayClass5_3 CS$<>8__locals15 = new <>c__DisplayClass5_3();
												<dummyField>5__10 = null;
												CS$<>8__locals15.firstAction = Enumerable.FirstOrDefault<object>((global::System.Collections.Generic.IEnumerable<object>)<>8__3.config.Description.Tags, (Func<object, bool>)((object x) => (x is ActionConfig || x is Action) ? true : false));
												if (CS$<>8__locals15.firstAction != null)
												{
													DataFeedAction val9 = new DataFeedAction();
													((DataFeedItem)val9).InitBase(<key>5__8, path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeys>5__5, <nameKey>5__9, val5, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
													val9.InitAction((Action<SyncDelegate<Action>>)delegate(SyncDelegate<Action> syncDelegate)
													{
														//IL_0039: Unknown result type (might be due to invalid IL or missing references)
														//IL_0043: Expected O, but got Unknown
														//IL_006b: Unknown result type (might be due to invalid IL or missing references)
														//IL_0075: Expected O, but got Unknown
														<>c__DisplayClass5_4 CS$<>8__locals24 = new <>c__DisplayClass5_4();
														Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false);
														if (component != null)
														{
															CS$<>8__locals24.actionConfig = CS$<>8__locals15.firstAction as ActionConfig;
															if (CS$<>8__locals24.actionConfig != null)
															{
																component.LocalPressed += (ButtonEventHandler)delegate
																{
																	CS$<>8__locals24.actionConfig.Invoke();
																};
															}
															else
															{
																<>c__DisplayClass5_5 CS$<>8__locals25 = new <>c__DisplayClass5_5
																{
																	action = (Action)/*isinst with value type is only supported in some contexts*/
																};
																if (CS$<>8__locals25.action != null)
																{
																	component.LocalPressed += (ButtonEventHandler)delegate
																	{
																		CS$<>8__locals25.action.Invoke();
																	};
																}
															}
														}
													});
													<dummyField>5__10 = (DataFeedItem)(object)val9;
												}
												<customUi>5__11 = false;
												DataFeedMethod customFeedMethod = CustomDataFeed.GetCustomFeedMethod(<>8__3.config);
												if (customFeedMethod != null)
												{
													<customUi>5__11 = true;
													global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable = customFeedMethod(path, <groupingKeys>5__5);
													<>7__wrap11 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken));
													<>7__wrap12 = null;
													<>7__wrap13 = 0;
													goto case -5;
												}
												goto IL_0988;
											}
											if (<>8__3.valueType == typeof(bool))
											{
												DataFeedToggle val10 = DataFeedHelpers.GenerateToggle(<key>5__8, path, <groupingKeys>5__5, internalLocale, <>8__3.config);
												((DataFeedItem)val10).InitVisible((Action<IField<bool>>)delegate(IField<bool> x)
												{
													((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value;
												});
												<>2__current = (DataFeedItem)(object)val10;
												num = (<>1__state = -7);
											}
											else if (<>8__3.valueType.IsEnum)
											{
												DataFeedItem val11;
												try
												{
													if (CustomAttributeExtensions.GetCustomAttribute<FlagsAttribute>((MemberInfo)(object)<>8__3.valueType) != null)
													{
														LocaleLoader.AddLocaleString("Settings." + <key>5__8 + ".Breadcrumb", text, false, "ResoniteModding");
														CategoryHandlers.Add(<key>5__8, (Func<global::System.Collections.Generic.IReadOnlyList<string>, global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>>)((global::System.Collections.Generic.IReadOnlyList<string> path2) => (global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>)((MethodBase)DataFeedHelpers.HandleFlagsEnumCategory.MakeGenericMethod(new global::System.Type[1] { <>8__3.valueType })).Invoke((object)null, new object[2] { path2, <>8__3.config })));
														val11 = (DataFeedItem)new DataFeedCategory();
														val11.InitBase(<key>5__8, path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeys>5__5, val7, val5, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
													}
													else
													{
														val11 = (DataFeedItem)((MethodBase)DataFeedHelpers.GenerateEnumItemsAsync.MakeGenericMethod(new global::System.Type[1] { <>8__3.valueType })).Invoke((object)null, new object[5] { <key>5__8, path, <groupingKeys>5__5, internalLocale, <>8__3.config });
													}
												}
												catch (global::System.Exception ex)
												{
													Plugin.Log.LogError((object)ex);
													val11 = (DataFeedItem)(object)new DataFeedValueField<dummy>();
													val11.InitBase(<key>5__8, path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeys>5__5, val6, val5, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
												}
												val11.InitVisible((Action<IField<bool>>)delegate(IField<bool> x)
												{
													((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value;
												});
												<>2__current = val11;
												num = (<>1__state = -8);
											}
											else
											{
												if (ReflectionExtensions.IsNullable(<>8__3.valueType))
												{
													global::System.Type type = <>8__3.valueType.GetGenericArguments()[0];
													if (type.IsEnum)
													{
														global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable2;
														try
														{
															asyncEnumerable2 = (global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>)((MethodBase)DataFeedHelpers.GenerateNullableEnumItemsAsync.MakeGenericMethod(new global::System.Type[1] { type })).Invoke((object)null, new object[5] { <key>5__8, path, <groupingKeys>5__5, internalLocale, <>8__3.config });
														}
														catch (global::System.Exce