/**
 * @name BetterAnimations
 * @description 🌊 Discord Animations Client Mod & Framework
 * @author arg0NNY
 * @authorLink https://github.com/okdevme/DiscordPlugins
 * @invite M8DBtcZjXD
 * @donate https://boosty.to/arg0nny/donate
 * @website https://docs.betteranimations.net
 * @source https://github.com/okdevme/BetterAnimations
 * @runAt idle
 * @version 2.1.15
 */

/* ### CONFIG START ### */
const config = {
  "info": {
    "name": "BetterAnimations",
    "version": "2.1.15",
    "description": "🌊 Discord Animations Client Mod & Framework"
  },
  "changelog": [
    {
      "type": "fixed",
      "title": "Fixes",
      "items": [
        "Updated to work in the latest release of Discord."
      ]
    }
  ]
};
/* ### CONFIG END ### */

var BetterAnimations = (function(react, events, clsx, fs, path, electron, react_dom) {
	//#region \0rolldown/runtime.js
	var __create = Object.create;
	var __defProp = Object.defineProperty;
	var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
	var __getOwnPropNames = Object.getOwnPropertyNames;
	var __getProtoOf = Object.getPrototypeOf;
	var __hasOwnProp = Object.prototype.hasOwnProperty;
	var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
	var __exportAll = (all, no_symbols) => {
		let target = {};
		for (var name in all) __defProp(target, name, {
			get: all[name],
			enumerable: true
		});
		if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
		return target;
	};
	var __copyProps = (to, from, except, desc) => {
		if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
			key = keys[i];
			if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
				get: ((k) => from[k]).bind(null, key),
				enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
			});
		}
		return to;
	};
	var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
		value: mod,
		enumerable: true
	}) : target, mod));
	//#endregion
	react = __toESM(react, 1);
	events = __toESM(events, 1);
	clsx = __toESM(clsx, 1);
	fs = __toESM(fs, 1);
	path = __toESM(path, 1);
	electron = __toESM(electron, 1);
	var config_default = {
		name: "BetterAnimations",
		description: "🌊 Discord Animations Client Mod & Framework",
		author: "arg0NNY",
		authorLink: "https://github.com/okdevme/DiscordPlugins",
		invite: "M8DBtcZjXD",
		donate: "https://boosty.to/arg0nny/donate",
		website: "https://docs.betteranimations.net",
		source: "https://github.com/okdevme/BetterAnimations",
		runAt: "idle"
	};
	var { Patcher: BDPatcher, Webpack, Utils, ReactUtils, DOM, Data: BDData, Plugins, Hooks, UI, Net, ContextMenu: ContextMenu$1, Themes, version: bdVersion } = new BdApi(config_default.name);
	//#endregion
	//#region shared/logger/index.js
	var LogTypes = {
		err: "error",
		error: "error",
		dbg: "debug",
		debug: "debug",
		log: "log",
		warn: "warn",
		info: "info",
		group: "group",
		groupCollapsed: "groupCollapsed"
	};
	var Logger = class Logger {
		static stacktrace(module, message, error) {
			console.error(`%c[${config_default.name}] %c[${module}]%c ${message}\n\n%c`, "color: #3E82E5; font-weight: 700;", "color: #3a71c1; font-weight: 700;", "color: red; font-weight: 700;", "color: red;", error);
		}
		static err(module, ...message) {
			Logger._log(module, message, "error");
		}
		static error(module, ...message) {
			Logger._log(module, message, "error");
		}
		static warn(module, ...message) {
			Logger._log(module, message, "warn");
		}
		static info(module, ...message) {
			Logger._log(module, message, "info");
		}
		static debug(module, ...message) {
			Logger._log(module, message, "debug");
		}
		static log(module, ...message) {
			Logger._log(module, message);
		}
		static group(module, ...message) {
			Logger._log(module, message, "group");
		}
		static groupCollapsed(module, ...message) {
			Logger._log(module, message, "groupCollapsed");
		}
		static groupEnd() {
			console.groupEnd();
		}
		static stylized(module, type, message, ...entries) {
			Logger._log(module, entries, type, message);
		}
		static _log(module, message, type = "log", after = "") {
			type = Logger.parseType(type);
			if (!Array.isArray(message)) message = [message];
			console[type](`%c[${config_default.name}]%c [${module}]%c` + (after ? ` ${after}` : ""), "color: #3E82E5; font-weight: 700;", "color: #3a71c1;", "", ...message);
		}
		static parseType(type) {
			return LogTypes[type] || "log";
		}
	};
	//#endregion
	//#region shared/error/manager.js
	var ErrorManager = class {
		get name() {
			return "ErrorManager";
		}
		constructor() {
			this.registerInternalError = (error) => this.registerError(error);
			this.registerAddonError = (error) => this.registerError(error);
			this.registerAnimationError = (error) => this.registerError(error);
		}
		registerError(error) {
			Logger.error(this.name, error);
		}
	};
	new ErrorManager();
	//#endregion
	//#region src/utils/webpack.js
	function keyed(module = {}, filter = () => false) {
		const key = Object.keys(module).find((key) => filter(module[key]));
		return [key && module, key];
	}
	async function lazyKeyed(modulePromise, filter) {
		return keyed(await modulePromise, filter);
	}
	function unkeyed(keyed) {
		return keyed?.[0]?.[keyed?.[1]];
	}
	function unkeyedFn(keyedComponent) {
		return (...args) => unkeyed(keyedComponent)(...args);
	}
	//#endregion
	//#region src/discord/modules.js
	var modules_exports = /* @__PURE__ */ __exportAll({
		Alert: () => Alert,
		AlertTypes: () => AlertTypes,
		Anchor: () => Anchor,
		App: () => App,
		AppContext: () => AppContext,
		AppLayer: () => AppLayer,
		AppPanels: () => AppPanels,
		AppViewKeyed: () => AppViewKeyed,
		AppViewRawModule: () => AppViewRawModule,
		Badge: () => Badge,
		BasePopout: () => BasePopout,
		BasePopoverKeyed: () => BasePopoverKeyed,
		BasePopoverModule: () => BasePopoverModule,
		Breadcrumbs: () => Breadcrumbs,
		Button: () => Button$1,
		ButtonGroup: () => ButtonGroup$1,
		CSSTransition: () => CSSTransition,
		CallChatSidebarKeyed: () => CallChatSidebarKeyed,
		CallChatSidebarModule: () => CallChatSidebarModule,
		ChannelItemKeyed: () => ChannelItemKeyed,
		ChannelItemRawModule: () => ChannelItemRawModule,
		ChannelMessageList: () => ChannelMessageList,
		ChannelSectionStore: () => ChannelSectionStore,
		ChannelStore: () => ChannelStore,
		ChannelTextArea: () => ChannelTextArea,
		ChannelTextAreaButtons: () => ChannelTextAreaButtons,
		ChannelThreadList: () => ChannelThreadList,
		ChannelView: () => ChannelView,
		ChatSidebarKeyed: () => ChatSidebarKeyed,
		ChatSidebarModule: () => ChatSidebarModule,
		Checkbox: () => Checkbox,
		CheckboxTypes: () => CheckboxTypes,
		Clickable: () => Clickable,
		ContextMenuKeyed: () => ContextMenuKeyed,
		ContextMenuModule: () => ContextMenuModule,
		CopiableField: () => CopiableField,
		Dispatcher: () => Dispatcher,
		EmojiKeyed: () => EmojiKeyed,
		EmojiModule: () => EmojiModule,
		ExpressionPicker: () => ExpressionPicker,
		ExpressionPickerStoreModule: () => ExpressionPickerStoreModule,
		FieldSet: () => FieldSet,
		Floating: () => Floating$1,
		Flux: () => Flux,
		FocusLock: () => FocusLock,
		FocusLockRawModule: () => FocusLockRawModule,
		GatewaySocket: () => GatewaySocket,
		GuildActionRow: () => GuildActionRow,
		GuildChannelListKeyed: () => GuildChannelListKeyed,
		GuildChannelListModule: () => GuildChannelListModule,
		GuildChannelRouteParams: () => GuildChannelRouteParams,
		GuildIcon: () => GuildIcon,
		GuildStore: () => GuildStore,
		Heading: () => Heading,
		ImpressionNames: () => ImpressionNames,
		InviteActions: () => InviteActions,
		InviteEmbed: () => InviteEmbed,
		InviteStates: () => InviteStates,
		InviteStore: () => InviteStore,
		LayerActions: () => LayerActions,
		LayerModalKeyed: () => LayerModalKeyed,
		LayerModalRawModule: () => LayerModalRawModule,
		LayerStore: () => LayerStore$1,
		LayersKeyed: () => LayersKeyed,
		LayersRawModule: () => LayersRawModule,
		ListNavigatorContainer: () => ListNavigatorContainer,
		ListNavigatorProvider: () => ListNavigatorProvider,
		Mana: () => Mana,
		ManaModalRootModule: () => ManaModalRootModule,
		ManaTooltipLayer: () => ManaTooltipLayer,
		ManaUseTooltipTransitionModule: () => ManaUseTooltipTransitionModule,
		MembersModViewSidebarKeyed: () => MembersModViewSidebarKeyed,
		MembersModViewSidebarRawModule: () => MembersModViewSidebarRawModule,
		MenuItemKeyed: () => MenuItemKeyed,
		MenuItemRawModule: () => MenuItemRawModule,
		MenuSubmenuItemKeyed: () => MenuSubmenuItemKeyed,
		MenuSubmenuItemRawModule: () => MenuSubmenuItemRawModule,
		MenuSubmenuListItemKeyed: () => MenuSubmenuListItemKeyed,
		MenuSubmenuListItemRawModule: () => MenuSubmenuListItemRawModule,
		Message: () => Message$1,
		MessageDivider: () => MessageDivider,
		ModalActions: () => ModalActions,
		ModalContent: () => ModalContent,
		ModalFooter: () => ModalFooter,
		ModalHeader: () => ModalHeader,
		ModalRoot: () => ModalRoot,
		ModalScrimKeyed: () => ModalScrimKeyed,
		ModalScrimModule: () => ModalScrimModule,
		ModalSize: () => ModalSize,
		ModalsKeyed: () => ModalsKeyed,
		ModalsModule: () => ModalsModule,
		Parser: () => Parser,
		Popout: () => Popout,
		PopoutCSSAnimatorKeyed: () => PopoutCSSAnimatorKeyed,
		PopoutCSSAnimatorRawModule: () => PopoutCSSAnimatorRawModule,
		PrivateChannelSortStore: () => PrivateChannelSortStore,
		ProfileEffectsKeyed: () => ProfileEffectsKeyed,
		ProfileEffectsModule: () => ProfileEffectsModule,
		RadioGroup: () => RadioGroup,
		ReferencePositionLayer: () => ReferencePositionLayer,
		RootElementContextModule: () => RootElementContextModule,
		Router: () => Router,
		Routes: () => Routes,
		SearchBar: () => SearchBar,
		SelectedChannelStore: () => SelectedChannelStore,
		SelectedGuildStore: () => SelectedGuildStore,
		SettingsContent: () => SettingsContent,
		SettingsContentRawModule: () => SettingsContentRawModule,
		SettingsNodeType: () => SettingsNodeType,
		SettingsNotice: () => SettingsNotice,
		SidebarActions: () => SidebarActions,
		SidebarType: () => SidebarType,
		SingleSelect: () => SingleSelect,
		Slider: () => Slider$1,
		SortedGuildStore: () => SortedGuildStore,
		Spinner: () => Spinner,
		SpringTransitionPhases: () => SpringTransitionPhases,
		Stack: () => Stack$1,
		StageVoiceChannelItemKeyed: () => StageVoiceChannelItemKeyed,
		StageVoiceChannelItemRawModule: () => StageVoiceChannelItemRawModule,
		StandardSidebarViewKeyed: () => StandardSidebarViewKeyed,
		StandardSidebarViewModule: () => StandardSidebarViewModule,
		StandardSidebarViewWrapper: () => StandardSidebarViewWrapper,
		StaticChannelRoute: () => StaticChannelRoute,
		Switch: () => Switch$1,
		SwitchIndicator: () => SwitchIndicator,
		Text: () => Text$1,
		TextButton: () => TextButton,
		TextInput: () => TextInput,
		ThemeStore: () => ThemeStore,
		Timeout: () => Timeout,
		Timestamp: () => Timestamp,
		Toast: () => Toast$1,
		ToastStoreModule: () => ToastStoreModule,
		Tooltip: () => Tooltip$1,
		Transition: () => Transition,
		TransitionGroup: () => TransitionGroup,
		TransitionGroupContext: () => TransitionGroupContext,
		UseIsVisibleModule: () => UseIsVisibleModule,
		UserSettings: () => UserSettings,
		VoiceChannelItemKeyed: () => VoiceChannelItemKeyed,
		VoiceChannelItemRawModule: () => VoiceChannelItemRawModule,
		VoiceChannelViewKeyed: () => VoiceChannelViewKeyed,
		VoiceChannelViewModule: () => VoiceChannelViewModule,
		appLayerContext: () => appLayerContext,
		colors: () => colors,
		createToast: () => createToast,
		getThemeClass: () => getThemeClass,
		handleClick: () => handleClick,
		humanize: () => humanize,
		matchSorter: () => matchSorter,
		popToast: () => popToast,
		popToastKeyed: () => popToastKeyed,
		showToast: () => showToast,
		useExpressionPickerStoreKeyed: () => useExpressionPickerStoreKeyed,
		useFocusLock: () => useFocusLock,
		useFocusLockKeyed: () => useFocusLockKeyed,
		useIsModalAtTop: () => useIsModalAtTop,
		useIsVisible: () => useIsVisible,
		useIsVisibleKeyed: () => useIsVisibleKeyed,
		useListContainerProps: () => useListContainerProps,
		useListItem: () => useListItem,
		useListNavigator: () => useListNavigator,
		useModalsStore: () => useModalsStore,
		useRootElementContextKeyed: () => useRootElementContextKeyed,
		useStateFromStores: () => useStateFromStores,
		useToastStore: () => useToastStore
	});
	var { Filters } = Webpack;
	var [Text$1, Heading, ModalScrimModule, Clickable, Switch$1, SwitchIndicator, { Checkbox, CheckboxTypes }, FieldSet, Breadcrumbs, { RadioGroup }, Slider$1, ReferencePositionLayer, { Badge }, SearchBar, Spinner, Popout, Routes, StaticChannelRoute, BasePopout, SpringTransitionPhases, Button$1, TextButton, ButtonGroup$1, InviteStates, TextInput, AppPanels, GuildActionRow, Message$1, ChannelTextArea, ExpressionPicker, ChannelTextAreaButtons, GuildIcon, Timestamp, getThemeClass, { Transition } = {}, { CSSTransition } = {}, { TransitionGroup } = {}, ChannelMessageList, ChannelView, MessageDivider, GuildChannelRouteParams, handleClick, Timeout, GatewaySocket, { Anchor } = {}, Dispatcher, Flux, App, Stack$1, { defaultRules: Parser } = {}, InviteEmbed, InviteActions, { ImpressionNames } = {}, { colors } = {}, humanize, useListNavigator, ThemeStore, ChannelStore, SortedGuildStore, PrivateChannelSortStore, LayerStore$1, InviteStore, SelectedGuildStore, SelectedChannelStore, GuildStore, { useModalsStore, useIsModalAtTop, ...ModalActions }, { Tooltip: Tooltip$1 }, ToastStoreModule, { showToast, useToastStore }, { Toast: Toast$1, createToast }, Router, AppViewRawModule, ContextMenuModule, MenuSubmenuItemRawModule, MenuSubmenuListItemRawModule, PopoutCSSAnimatorRawModule, { AppLayer, appLayerContext }, ModalsModule, LayersRawModule, GuildChannelListModule, ChannelSectionStore, ChatSidebarModule, { SingleSelect } = {}, LayerActions, { Alert, AlertTypes }, UserSettings, { ModalRoot, ModalSize, ModalHeader, ModalFooter, ModalContent }, MenuItemRawModule, ChannelItemRawModule, VoiceChannelItemRawModule, StageVoiceChannelItemRawModule, { AppContext }, ExpressionPickerStoreModule, ProfileEffectsModule, EmojiModule, UseIsVisibleModule, RootElementContextModule, { useListItem, useListContainerProps, ListNavigatorProvider }, FocusLockRawModule, { useFocusLock, FocusLock }, ManaModalRootModule, BasePopoverModule, ChannelThreadList, matchSorter, CopiableField, SidebarActions, SidebarType, ManaTooltipLayer, ManaUseTooltipTransitionModule, { Floating: Floating$1 } = {}] = Webpack.getBulk({
		filter: (m) => Filters.byStrings("WebkitLineClamp", "data-text-variant")(m?.render),
		searchExports: true
	}, {
		filter: (m) => Filters.byStrings("variant", "data-excessive-heading-level")(m?.render),
		searchExports: true
	}, { filter: Filters.bySource("scrim", "\"lightbox\"") }, {
		filter: Filters.byPrototypeKeys("renderInner", "renderNonInteractive"),
		searchExports: true
	}, { filter: Filters.byStrings("checked", ".controlId") }, {
		filter: Filters.bySource("checked", "SWITCH_BACKGROUND_DEFAULT"),
		declarationFilter: Filters.byStrings("checked", "SWITCH_BACKGROUND_DEFAULT")
	}, {
		filter: Filters.bySource("Checkbox:", "is not a valid hex color"),
		map: {
			Checkbox: Filters.byStrings("innerClassName"),
			CheckboxTypes: Filters.byKeys("INVERTED")
		}
	}, {
		filter: Filters.byStrings("\"fieldset\"", "\"legend\""),
		searchExports: true
	}, {
		filter: (m) => Filters.byStrings("renderBreadcrumb")(m?.prototype?.render),
		searchExports: true
	}, {
		filter: Filters.bySource("\"radiogroup\"", "getFocusableElements"),
		map: { RadioGroup: Filters.byStrings("label", "description") }
	}, {
		filter: (m) => Filters.byKeys("stickToMarkers", "initialValue")(m?.defaultProps),
		searchExports: true
	}, {
		filter: Filters.byPrototypeKeys("getHorizontalAlignmentStyle", "nudgeLeftAlignment"),
		searchExports: true
	}, {
		filter: Filters.bySource("\"eyebrow\"", "EARLY_ACCESS"),
		map: { Badge: Filters.byStrings("\"eyebrow\"") }
	}, {
		filter: Filters.byStrings("query", "\"aria-label\":", "clearable:null"),
		searchExports: true
	}, {
		filter: (m) => Filters.byKeys("WANDERING_CUBES")(m?.Type),
		searchExports: true
	}, {
		filter: (m) => Filters.byKeys("Animation")(m) && Filters.byStrings("renderPopout")(m?.prototype?.render),
		searchExports: true
	}, {
		filter: Filters.byKeys("CHANNEL_THREAD_VIEW", "GUILD_DISCOVERY"),
		searchExports: true
	}, {
		filter: Filters.byKeys("ROLE_SUBSCRIPTIONS", "CHANNEL_BROWSER"),
		searchExports: true
	}, {
		filter: (m) => m?.defaultProps?.loadingComponent,
		searchExports: true
	}, {
		filter: Filters.byKeys("ENTER", "LEAVE"),
		searchExports: true
	}, {
		filter: Filters.byStrings("button", "hasText", "expressiveWrapper"),
		searchExports: true
	}, {
		filter: Filters.byStrings("textButton", "textVariant"),
		searchExports: true
	}, {
		filter: Filters.byStrings("fullWidth", "wrap", "\"horizontal\""),
		searchExports: true
	}, {
		filter: Filters.byKeys("APP_NOT_OPENED", "RESOLVING"),
		searchExports: true
	}, {
		filter: Filters.byStrings("\"input\"", "prefixElement"),
		searchExports: true
	}, {
		filter: Filters.bySource("panels", "ACCOUNT_PANEL"),
		declarationFilter: (m) => Filters.byStrings("panels", "ACCOUNT_PANEL")(m?.type)
	}, {
		filter: Filters.byKeys("GUILD_ROLE_SUBSCRIPTIONS", "CHANNELS_AND_ROLES"),
		searchExports: true
	}, {
		filter: Filters.bySource("must not be a thread starter message"),
		declarationFilter: (m) => Filters.byStrings("must not be a thread starter message")(m?.type)
	}, { filter: (m) => Filters.byStrings("CHANNEL_TEXT_AREA", "markdown")(m?.type?.render) }, {
		filter: (m) => Filters.byStrings("EXPRESSION_PICKER", "positionContainer")(m?.type),
		searchExports: true
	}, {
		filter: (m) => Filters.byStrings("appLauncher", "sticker", "gif")(m?.type),
		searchExports: true
	}, {
		filter: (m) => Filters.byKeys("badgeStrokeColor", "animate")(m?.defaultProps),
		searchExports: true
	}, {
		filter: (m) => Filters.byStrings("timestampFormat", "\"LLLL\"")(m?.type),
		searchExports: true
	}, {
		filter: Filters.byStrings("theme-", "images-"),
		searchExports: true
	}, {
		filter: Filters.bySource("performEnter", "setNextCallback"),
		map: { Transition: Filters.byKeys("ENTERING", "EXITING") },
		mapDeclarations: true
	}, {
		filter: Filters.bySource("\"appear\"", "\"classNames\""),
		map: { CSSTransition: Filters.byPrototypeKeys("addClass") },
		mapDeclarations: true
	}, {
		filter: Filters.bySource("childFactory", "handleExited"),
		map: { TransitionGroup: Filters.byPrototypeKeys("handleExited") },
		mapDeclarations: true
	}, { filter: (m) => Filters.byStrings("channel", "messageDisplayCompact")(m?.type) }, { filter: (m) => Filters.byStrings("providedChannel")(m?.type) }, { filter: (m) => Filters.byStrings("\"span\"", "isUnread")(m?.render) }, {
		filter: (m) => Filters.byStrings("|\\\\d+")(m?.guildId),
		searchExports: true
	}, {
		filter: Filters.byStrings("sanitizeUrl", "shouldConfirm"),
		searchExports: true
	}, {
		filter: (m) => Filters.byPrototypeKeys("isStarted", "start", "stop")(m) && Filters.byStrings("setTimeout")(m),
		searchExports: true
	}, {
		filter: Filters.bySource("\"ConnectionStore\""),
		declarationFilter: (m) => m?.dispatcher?.scheduler
	}, { filter: Filters.byKeys("Anchor") }, {
		filter: Filters.byKeys("dispatch", "subscribe"),
		searchExports: true
	}, { filter: Filters.byKeys("Store", "connectStores") }, { filter: Filters.byKeys("setEnableHardwareAcceleration", "releaseChannel") }, {
		filter: (m) => Filters.byStrings("data-direction", "data-justify")(m?.render),
		searchExports: true
	}, { filter: Filters.byKeys("defaultRules", "parse") }, {
		filter: Filters.bySource("Invite Button Embed", "getInvite"),
		declarationFilter: Filters.byStrings("Invite Button Embed", "getInvite")
	}, { filter: Filters.byKeys("resolveInvite", "createInvite") }, { filter: Filters.byKeys("ImpressionNames") }, { filter: Filters.byKeys("colors", "modules") }, { filter: Filters.byKeys("humanize", "filesize") }, { filter: Filters.byStrings("focusLastVisibleItem", "\"focus\"") }, { filter: Filters.byStoreName("ThemeStore") }, { filter: Filters.byStoreName("ChannelStore") }, { filter: Filters.byStoreName("SortedGuildStore") }, {
		filter: Filters.byStoreName("PrivateChannelSortStore"),
		searchExports: true
	}, { filter: Filters.byStoreName("LayerStore") }, { filter: Filters.byStoreName("InviteStore") }, { filter: Filters.byStoreName("SelectedGuildStore") }, { filter: Filters.byStoreName("SelectedChannelStore") }, { filter: Filters.byStoreName("GuildStore") }, {
		filter: Filters.bySource(".modalKey?"),
		map: {
			openModal: Filters.byStrings("onCloseRequest", "onCloseCallback", "stackingBehavior"),
			closeModal: Filters.byStrings("onCloseCallback()", "filter"),
			closeAllModals: Filters.byStrings(".getState();for"),
			useModalsStore: Filters.byKeys("setState"),
			useIsModalAtTop: Filters.byStrings("popout:", ".at(-1)")
		}
	}, {
		filter: Filters.bySource("renderTooltip", "tooltipPointer"),
		map: { Tooltip: Filters.byPrototypeKeys("renderTooltip") }
	}, { filter: Filters.bySource("currentToast", "queuedToasts") }, {
		filter: Filters.bySource("currentToast", "queuedToasts"),
		map: {
			showToast: Filters.byStrings("currentToastMap.has"),
			useToastStore: Filters.byKeys("setState")
		}
	}, {
		filter: Filters.bySource("message", "\"data-type\"", "STATUS_POSITIVE", "CLIP"),
		map: {
			Toast: Filters.byKeys("type"),
			createToast: Filters.byStrings("type", "position")
		}
	}, {
		filter: Filters.bySource("props.computedMatch", "isExact"),
		map: {
			Router: (m) => m?.computeRootMatch,
			Route: (m) => Filters.byStrings("props.computedMatch", "props.path")(m?.prototype?.render),
			Switch: (m) => Filters.byStrings("props.location", "cloneElement")(m?.prototype?.render),
			matchPath: Filters.byStrings("strict", "isExact"),
			useLocation: Filters.byStrings(").location"),
			useParams: Filters.byStrings(".match", ".params")
		}
	}, {
		filter: Filters.bySource("CHANNEL_THREAD_VIEW", "GUILD_DISCOVERY", "data-fullscreen"),
		raw: true
	}, { filter: Filters.bySource("getContextMenu", "renderWindow") }, {
		filter: Filters.bySource("subMenuClassName", "submenuPaddingContainer"),
		raw: true
	}, {
		filter: Filters.bySource("menuSubmenuProps", "listClassName", "submenuPaddingContainer"),
		raw: true
	}, {
		filter: Filters.bySource("data-popout-animating", "TRANSLATE"),
		raw: true
	}, {
		filter: Filters.bySource("layerContext", "\"App\""),
		map: {
			AppLayer: Filters.byDisplayName("AppLayer"),
			appLayerContext: (m) => m?.Provider
		}
	}, { filter: Filters.bySource("modalKey", "\"instant\"") }, {
		filter: Filters.bySource("getLayers", "hasFullScreenLayer"),
		raw: true
	}, { filter: Filters.bySource("GUILD_CHANNEL_LIST", "selectedChannel") }, { filter: Filters.byStoreName("ChannelSectionStore") }, { filter: Filters.bySource("sidebarType", "postSidebarWidth") }, {
		filter: Filters.bySource("select", "newValues"),
		map: { SingleSelect: Filters.byStrings("\"single\"", "clear:()=>") }
	}, {
		filter: Filters.bySource("\"LAYER_PUSH\"", "\"LAYER_POP_ALL\""),
		map: {
			pushLayer: Filters.byStrings("\"LAYER_PUSH\""),
			popLayer: Filters.byStrings("\"LAYER_POP\""),
			popAllLayers: Filters.byStrings("\"LAYER_POP_ALL\"")
		}
	}, {
		filter: Filters.bySource("messageType", "\"warn\""),
		map: {
			Alert: Filters.byStrings("messageType"),
			AlertTypes: Filters.byKeys("WARNING", "ERROR")
		}
	}, { filter: Filters.byKeys("openUserSettings") }, {
		filter: Filters.bySource("MODAL_ROOT_LEGACY", "headerId"),
		map: {
			ModalRoot: Filters.byStrings("MODAL_ROOT_LEGACY"),
			ModalSize: Filters.byKeys("MEDIUM", "LARGE"),
			ModalHeader: Filters.byStrings("headerIdIsManaged", "HORIZONTAL"),
			ModalFooter: Filters.byStrings("separator", "HORIZONTAL_REVERSE"),
			ModalContent: Filters.byStrings("scrollbarType")
		}
	}, {
		filter: Filters.bySource("dontCloseOnActionIfHoldingShiftKey", "data-menu-item"),
		raw: true
	}, {
		filter: Filters.bySource("shouldIndicateNewChannel", "MANAGE_CHANNELS"),
		raw: true
	}, {
		filter: Filters.bySource("isFavoriteSuggestion", "PLAYING", "MANAGE_CHANNELS"),
		raw: true
	}, {
		filter: Filters.bySource("getStageInstanceByChannel", "isFavoriteSuggestion", "MANAGE_CHANNELS"),
		raw: true
	}, {
		filter: Filters.bySource("renderWindow", "ownerDocument.defaultView"),
		map: { AppContext: (m) => m?.Provider }
	}, { filter: Filters.bySource("expression-picker-last-active-view") }, { filter: Filters.bySource("profileEffect", "animationType", "useReducedMotion") }, { filter: Filters.bySource("\"Unknown Src for Emoji\"") }, { filter: Filters.bySource("isIntersecting", "new Map([[1,{threshold:1}]])") }, { filter: Filters.bySource("useRootElementContext", "createContext") }, {
		filter: Filters.bySource("NO_LIST", "listitem"),
		map: {
			useListItem: Filters.byStrings("\"listitem\""),
			useListContainerProps: Filters.byStrings("\"list\"", "useContext"),
			ListNavigatorProvider: Filters.byStrings("containerProps", ".Provider")
		}
	}, {
		filter: Filters.bySource("disableReturnRef", "containerRef"),
		raw: true
	}, {
		filter: Filters.bySource("disableReturnRef", "containerRef"),
		map: {
			useFocusLock: Filters.byStrings("disableReturnRef"),
			FocusLock: Filters.byStrings("children", "containerRef")
		}
	}, { filter: Filters.bySource("transitionState", "padding-size-") }, { filter: Filters.bySource("popoverGradientWrapper", "spacing") }, {
		filter: Filters.bySource("sortedThreadIds", "\"group\""),
		declarationFilter: (m) => Filters.byStrings("sortedThreadIds", "\"group\"")(m?.type)
	}, {
		filter: (m) => Filters.byKeys("MATCHES", "STARTS_WITH")(m?.rankings),
		searchExports: true
	}, {
		filter: Filters.byStrings("copyValue", "TEXT_COPIED"),
		searchExports: true
	}, { filter: Filters.byKeys("setSelectedSearchContext") }, {
		filter: Filters.byKeys("VIEW_THREAD", "VIEW_MOD_REPORT"),
		searchExports: true
	}, {
		filter: Filters.byStrings("\"tooltip\"", "isRichTooltip"),
		searchExports: true
	}, { filter: Filters.bySource("onExitComplete", "\"tooltip\"") }, {
		filter: Filters.bySource("data-popover-layer"),
		map: { Floating: Filters.byStrings("children") }
	});
	var ModalScrimKeyed = keyed(ModalScrimModule, Filters.byStrings("scrim", "isVisible"));
	var popToastKeyed = keyed(ToastStoreModule, Filters.byStrings(".delete"));
	var popToast = unkeyedFn(popToastKeyed);
	var AppViewKeyed = keyed(AppViewRawModule?.declarations, Filters.byStrings("CHANNEL_THREAD_VIEW", "GUILD_DISCOVERY"));
	var TransitionGroupContext = Transition?.contextType;
	var ContextMenuKeyed = keyed(ContextMenuModule, Filters.byStrings("getContextMenu", "isOpen"));
	var MenuSubmenuItemKeyed = keyed(MenuSubmenuItemRawModule?.declarations, Filters.byStrings("subMenuClassName", "submenuPaddingContainer"));
	var MenuSubmenuListItemKeyed = keyed(MenuSubmenuListItemRawModule?.declarations, Filters.byStrings("menuSubmenuProps", "listClassName", "submenuPaddingContainer"));
	var PopoutCSSAnimatorKeyed = keyed(PopoutCSSAnimatorRawModule?.declarations, (m) => Filters.byKeys("TRANSLATE", "SCALE")(m?.Types));
	var ModalsKeyed = keyed(ModalsModule, Filters.byStrings("modalKey", "\"instant\""));
	var LayersKeyed = keyed(LayersRawModule?.declarations, Filters.byStrings("getLayers", "hasFullScreenLayer"));
	var GuildChannelListKeyed = keyed(GuildChannelListModule, Filters.byStrings("getGuild", "guildId"));
	var ChatSidebarKeyed = keyed(ChatSidebarModule, Filters.byStrings("postSidebarWidth"));
	var MenuItemKeyed = keyed(MenuItemRawModule?.declarations, Filters.byStrings("dontCloseOnActionIfHoldingShiftKey", "data-menu-item"));
	var ChannelItemKeyed = keyed(ChannelItemRawModule?.declarations, Filters.byStrings("shouldIndicateNewChannel", "MANAGE_CHANNELS"));
	var VoiceChannelItemKeyed = keyed(VoiceChannelItemRawModule?.declarations, Filters.byStrings("PLAYING", "MANAGE_CHANNELS"));
	var StageVoiceChannelItemKeyed = keyed(StageVoiceChannelItemRawModule?.declarations, Filters.byStrings("getStageInstanceByChannel", "MANAGE_CHANNELS"));
	var useExpressionPickerStoreKeyed = keyed(ExpressionPickerStoreModule, Filters.byKeys("getState", "setState"));
	var ProfileEffectsKeyed = keyed(ProfileEffectsModule, Filters.byStrings("profileEffect", "animationType", "useReducedMotion"));
	var EmojiKeyed = keyed(EmojiModule, Filters.byStrings("emojiId", "emojiName", "animated", "shouldAnimate"));
	var useIsVisibleKeyed = keyed(UseIsVisibleModule, Filters.byStrings("isIntersecting", "arguments.length"));
	var useIsVisible = unkeyedFn(useIsVisibleKeyed);
	var useRootElementContextKeyed = keyed(RootElementContextModule, Filters.byStrings("useRootElementContext"));
	var ListNavigatorContainer = ({ children }) => children(useListContainerProps());
	var Mana = {
		ModalRootKeyed: keyed(ManaModalRootModule, Filters.byStrings("transitionState", "padding-size-")),
		get ModalRoot() {
			return unkeyed(this.ModalRootKeyed);
		},
		TooltipLayer: ManaTooltipLayer,
		useTooltipTransitionKeyed: keyed(ManaUseTooltipTransitionModule, Filters.byStrings("onExitComplete", "\"tooltip\""))
	};
	var BasePopoverKeyed = keyed(BasePopoverModule, Filters.byStrings("popoverGradientWrapper", "spacing"));
	var useStateFromStores = Webpack.getModule(Webpack.Filters.byStrings("useStateFromStores"), { searchExports: true });
	var useFocusLockKeyed = keyed(FocusLockRawModule?.declarations, Filters.byStrings("disableReturnRef"));
	var StandardSidebarViewWrapper = Webpack.waitForModule(Filters.byPrototypeKeys("getPredicateSections", "renderSidebar"));
	var StandardSidebarViewModule = Webpack.waitForModule(Filters.bySource("standardSidebarView", "section"));
	var StandardSidebarViewKeyed = lazyKeyed(StandardSidebarViewModule, Filters.byStrings("standardSidebarView", "section"));
	var SettingsNotice = Webpack.waitForModule(Filters.byStrings("onSaveText", "EMPHASIZE_NOTICE"));
	var MembersModViewSidebarRawModule = Webpack.waitForModule(Filters.bySource("MEMBER_SAFETY_PAGE", "closeGuildSidebar"), { raw: true });
	var MembersModViewSidebarKeyed = lazyKeyed(MembersModViewSidebarRawModule.then((m) => m?.declarations), Filters.byStrings("MEMBER_SAFETY_PAGE", "closeGuildSidebar"));
	var SettingsContentRawModule = Webpack.waitForModule(Filters.bySource("onClose", "\"showNavigationMobile\""), { raw: true });
	var SettingsContent = SettingsContentRawModule.then((m) => Object.values(m?.declarations ?? {}).find((m) => Filters.byStrings("onClose", "\"showNavigationMobile\"")(m?.type)));
	var SettingsNodeType = {
		ROOT: 0,
		SECTION: 1,
		SIDEBAR_ITEM: 2,
		PANEL: 3,
		PANE: 4
	};
	var LayerModalRawModule = Webpack.waitForModule(Filters.bySource("MODAL", "headingId", "theme", "\"dialog\""), { raw: true });
	var LayerModalKeyed = lazyKeyed(LayerModalRawModule.then((m) => m?.declarations), Filters.byStrings("MODAL", "headingId", "theme", "\"dialog\""));
	var CallChatSidebarModule = Webpack.waitForModule(Filters.bySource("CallChatSidebar", "chatInputType"));
	var CallChatSidebarKeyed = lazyKeyed(CallChatSidebarModule, Filters.byStrings("CallChatSidebar", "chatInputType"));
	var VoiceChannelViewModule = Webpack.waitForModule(Filters.bySource("CHANNEL_CALL_POPOUT", "renderExternalHeader"));
	var VoiceChannelViewKeyed = lazyKeyed(VoiceChannelViewModule, Filters.byStrings("CHANNEL_CALL"));
	//#endregion
	//#region src/hooks/useIconSize.js
	var sizes = {
		xxs: 12,
		xs: 16,
		sm: 20,
		md: 24,
		lg: 32,
		xl: 48,
		custom: void 0,
		refresh_sm: 20
	};
	function useIconSize(size = "md", { width = 24, height = 24 } = {}) {
		return {
			width: sizes[size] ?? width,
			height: sizes[size] ?? height
		};
	}
	//#endregion
	//#region src/components/icons/IconBrand.jsx
	var IconBrandTypes = {
		DEFAULT: 0,
		INFO: 1,
		SUCCESS: 2,
		WARNING: 3,
		ERROR: 4
	};
	function IconBrand({ type = IconBrandTypes.DEFAULT, size, width, height, color = "var(--brand-500)", ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...props,
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			viewBox: "0 0 740 740"
		}, type === IconBrandTypes.DEFAULT ? /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M43.48,153.61c0,.51,0,1,0,1.55a13.16,13.16,0,0,1-.15,1.54,15.3,15.3,0,0,1-.75,3,12,12,0,0,1-.6,1.43,15.12,15.12,0,0,1-.74,1.37c-2.67,4.32-6.48,6.14-11.2,7.35-3.57,0-6.64-.38-9.76-2.24-.43-.26-.84-.53-1.24-.82s-.78-.61-1.14-.94a13,13,0,0,1-1.05-1.05c-.33-.36-.64-.75-.94-1.14s-.57-.81-.82-1.23a13.75,13.75,0,0,1-.7-1.31,15.77,15.77,0,0,1-1-2.79c-.13-.5-.23-1-.31-1.52s-.12-1-.14-1.55a13.36,13.36,0,0,1,0-1.55c0-.52.08-1,.16-1.55s.19-1,.32-1.52a15,15,0,0,1,.47-1.48c.18-.49.39-1,.61-1.43a13.89,13.89,0,0,1,.76-1.36c2.73-4.32,6.61-6.1,11.37-7.22a17.55,17.55,0,0,1,9,1.94,14.46,14.46,0,0,1,1.32.8c.42.29.83.61,1.22.94a14,14,0,0,1,1.13,1c.35.37.69.76,1,1.16a13.79,13.79,0,0,1,.89,1.27c.27.43.52.88.75,1.34a13.73,13.73,0,0,1,.6,1.42,14.74,14.74,0,0,1,.46,1.47,15.17,15.17,0,0,1,.32,1.52C43.39,152.58,43.45,153.09,43.48,153.61ZM149.61,266.66a13.24,13.24,0,0,0,.48,1.51,13.79,13.79,0,0,0,.61,1.42,13.41,13.41,0,0,0,.74,1.34,14.24,14.24,0,0,0,.89,1.26,13.87,13.87,0,0,0,1,1.16,14.16,14.16,0,0,0,1.13,1.06c.39.33.8.64,1.22.93a13.48,13.48,0,0,0,1.31.8,12.58,12.58,0,0,0,1.39.66,16.84,16.84,0,0,0,9.18.9c4.61-1.5,8.28-3.72,10.53-8.2a14.8,14.8,0,0,0,.61-1.42c.18-.49.34-1,.47-1.48a15.17,15.17,0,0,0,.32-1.52c.08-.51.13-1,.16-1.54s0-1,0-1.55-.08-1-.15-1.54-.18-1-.31-1.52a12.63,12.63,0,0,0-.45-1.48c-.17-.48-.37-.95-.59-1.42s-.47-.91-.74-1.34-.56-.86-.87-1.27-.63-.79-1-1.17a12.26,12.26,0,0,0-1.1-1.06,13.51,13.51,0,0,0-1.2-.95c-.42-.3-.85-.57-1.3-.83a13.43,13.43,0,0,0-1.37-.68c-3.15-1.39-6-1.39-9.37-1.16-4.6,1.52-8.28,3.71-10.53,8.21q-.34.72-.63,1.47a15.73,15.73,0,0,0-.47,1.52,13.47,13.47,0,0,0-.32,1.56c-.08.53-.13,1.05-.16,1.59a14.06,14.06,0,0,0,0,1.59c0,.53.09,1.06.17,1.59A14.45,14.45,0,0,0,149.61,266.66ZM139,214c.19-.43.35-.86.5-1.3s.26-.89.36-1.35a12.63,12.63,0,0,0,.23-1.37,13,13,0,0,0,.08-1.39,12.82,12.82,0,0,0,0-1.39c-.05-.47-.11-.93-.2-1.38a12.11,12.11,0,0,0-.34-1.35,11.3,11.3,0,0,0-.47-1.31,12.89,12.89,0,0,0-7.81-7.14c-5.5-1.89-36.88-1.26-44.37-.74-4.16,1.48-7.23,3.46-9.19,7.59-.2.41-.37.83-.53,1.26s-.29.88-.4,1.32-.2.89-.27,1.35-.11.91-.13,1.37,0,.91,0,1.37a12.72,12.72,0,0,0,.14,1.37,10.75,10.75,0,0,0,.27,1.35,12.33,12.33,0,0,0,.4,1.31,12.58,12.58,0,0,0,6.73,7.15,16.52,16.52,0,0,0,5.48,1.35c5.55.48,11.31,0,16.88,0,7.77,0,15.57.28,23.32-.1C133.91,220.35,137.07,218.29,139,214ZM563.65,356.72c16.78-20.29,29.88-50.55,35.31-76.23,6.57-31.05,4.69-64.76-13.18-91.9-15.27-23.2-41-38.35-68-43.69-24.91-4.92-52.95-3.17-78.45-3.24l-115-.19-173.55-.42H95c-8,0-16.15-.47-24.12-.08A16.54,16.54,0,0,0,62,143.7a12.72,12.72,0,0,0-5.18,8.35c-.07.46-.13.92-.16,1.38a12.71,12.71,0,0,0,0,1.38,12.85,12.85,0,0,0,.12,1.38,12.51,12.51,0,0,0,.25,1.36,15.27,15.27,0,0,0,.92,2.62c.2.41.41.82.65,1.22s.5.78.77,1.15a14.22,14.22,0,0,0,7.93,5.3c5.3,1.09,25.27.2,31.65.2H216.36c5.11,0,10.61-.53,15.67.33,3.8.65,7,2.26,9.15,5.58a14.42,14.42,0,0,1,2.08,10.58,12.76,12.76,0,0,1-8.55,9.41c-5.61,2-12.67,1.23-18.58,1.21L180,195c-6,0-12.57-.61-18.46.26a16.73,16.73,0,0,0-6.87,2.48,11.76,11.76,0,0,0-5.34,8c-.61,3.64,0,8,2.32,10.92a13.13,13.13,0,0,0,7.28,4.85c6.46,1.62,14.69.68,21.37.63H225c6.67,0,14.08-.76,20.66.08,3.9.5,7.37,1.88,9.8,5.08A13.56,13.56,0,0,1,258.15,238a12.9,12.9,0,0,1-8.06,9.95c-11.9,4.67-45.6-3.16-55.29,4.25a12.9,12.9,0,0,0-4.7,9,13.34,13.34,0,0,0,3,10.4,13.59,13.59,0,0,0,9.09,4.59c5.95.7,12.57.14,18.59.14H259.7l133.11,0h41.63c8.22,0,16.67-.38,24.87.3,4.67,1.68,8.62,3.88,10.93,8.54,2.12,4.27,1.83,8.63,1,13.15a31.48,31.48,0,0,1-15.81,19.08,27.83,27.83,0,0,1-8.06,2.78c-8,.59-16.21.28-24.27.28-16.27,0-32.58-.27-48.84,0-8.59,34.28-18.2,68.38-26.38,102.75l48.68,0c8.09,0,16.86-.72,24.85.32,4.41,1.41,8.4,3.74,10.7,7.92,2.52,4.6,2.36,10.29.78,15.16a31.67,31.67,0,0,1-16.36,18.2,26.42,26.42,0,0,1-9.23,2.4c-5.45.47-11.08.12-16.55.09H365.42c-24.21,0-48.52.48-72.72,0,.6-5.14,2.44-10.51,3.75-15.55l7.94-30.55,26-100.7-134.54-.06C183,369.2,171.12,418.36,157.91,467.14c-7.7,32.21-16.48,64.25-24.75,96.32l-6.87,26.72c-.67,2.69-1.77,5.32-2.32,8a6.12,6.12,0,0,0,0,3.26,3.9,3.9,0,0,0,2.58.35c17.41.72,35.11.09,52.54.09l100.92,0h74.11c26.67,0,53.31.31,79.73-3.91,24.91-4,49.55-11.66,70.65-25.8,39.71-26.61,56.91-68.87,65.69-113.91,6.18-31.69,7-66.64-11.74-94.45l0-.22C560.3,361.35,562,359.06,563.65,356.72Z",
			fill: typeof color === "string" ? color : color?.css
		}) : /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M43.31,152.07c3.1,19.82-27.18,24.62-30.21,4.75C10.21,137.17,40.17,132.39,43.31,152.07ZM179.2,258.93c-5-19.44-34.75-11.8-29.59,7.73C154.63,285.85,184.07,278.1,179.2,258.93ZM139,214c3.22-6.85-.36-15.74-7.7-18-5.5-1.89-36.88-1.26-44.37-.74-4.16,1.48-7.23,3.46-9.19,7.59-7.19,19.7,15,20.55,28.57,19.18C117.26,221,133.2,226.53,139,214Zm378.79-69.07c-48.37-7.35-143.33-1.56-193.47-3.44-40.76,0-191.42-.58-229.28-.43-14.25-.07-45-4.59-37.09,19.13,6,13.42,29,6.67,41,7.87H216.36c8.35.15,19.39-2.15,24.82,5.91,4.85,7,1.86,17.43-6.47,20-12.21,2.88-41.89.43-54.75,1.08-10.58.07-27.67-3-30.67,10.7-2.87,18.25,18.51,17.41,31,16.4H225c12.53-.53,35.47-3.1,33.17,15.85-5.8,23.24-50.14,3.38-63.35,14.19-9.11,7.13-4.39,23.43,7.42,23.94,60.92.54,171-.11,232.22.12,12.09.86,28.84-4.21,35.8,8.84,5.45,12.49-3.57,26.5-14.79,32.23-9.88,5.14-21.61,2.52-32.33,3.06-16.27,0-32.58-.27-48.84,0-7.06,28.18-14.8,56.23-21.87,84.41,52.36-73.63,148.44-111.33,236.94-93.06C619.67,244.72,597.55,158.81,517.78,144.91ZM195.83,320.31C172.48,414,146.4,507.87,124,601.46c52.8,1.61,137.31-.22,190.54.41a237.65,237.65,0,0,1,5.37-134.46c-9.08,0-18.16-.05-27.22-.24,7.23-31.13,29.69-114.61,37.67-146.8Z",
			fill: typeof color === "string" ? color : color?.css
		}), type === IconBrandTypes.SUCCESS && /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M516.18,634,654.59,495.57l-27.48-27.49L516.18,579l-56-56-27.48,27.49Zm27.49,106a191.11,191.11,0,0,1-76.57-15.46,196.08,196.08,0,0,1-104.31-104.3,197.35,197.35,0,0,1,0-153.14A196.05,196.05,0,0,1,467.1,362.79a197.35,197.35,0,0,1,153.14,0A196.08,196.08,0,0,1,724.54,467.1a197.35,197.35,0,0,1,0,153.14,196.1,196.1,0,0,1-104.3,104.3A191.14,191.14,0,0,1,543.67,740Z",
			fill: "#239452"
		}), type === IconBrandTypes.ERROR && /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M543.67,347.33A196.34,196.34,0,1,0,740,543.67,196.16,196.16,0,0,0,543.67,347.33Zm98.16,266.82-27.68,27.68-70.48-70.48-70.49,70.48L445.5,614.15,516,543.67,445.5,473.18l27.68-27.68L543.67,516l70.48-70.48,27.68,27.68-70.48,70.49Z",
			fill: "#f23f42"
		}), type === IconBrandTypes.WARNING && /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M543.67,641.83a19.28,19.28,0,1,0-14-5.64A19,19,0,0,0,543.67,641.83ZM524,563.3H563.3V445.5H524ZM543.67,740a191.11,191.11,0,0,1-76.57-15.46,196.08,196.08,0,0,1-104.31-104.3,197.35,197.35,0,0,1,0-153.14A196.05,196.05,0,0,1,467.1,362.79a197.35,197.35,0,0,1,153.14,0A196.08,196.08,0,0,1,724.54,467.1a197.35,197.35,0,0,1,0,153.14,196.1,196.1,0,0,1-104.3,104.3A191.14,191.14,0,0,1,543.67,740Z",
			fill: "#f0b132"
		}), type === IconBrandTypes.INFO && /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M524.06,641.84h39.26V524.06H524.06Zm19.63-157a19.27,19.27,0,1,0-14-5.64A19,19,0,0,0,543.69,484.79Zm0,255.21a191.06,191.06,0,0,1-76.56-15.46,196,196,0,0,1-104.3-104.29,197.42,197.42,0,0,1,0-153.12,196.1,196.1,0,0,1,104.3-104.3,197.42,197.42,0,0,1,153.12,0,196,196,0,0,1,104.29,104.3,197.3,197.3,0,0,1,0,153.12A196,196,0,0,1,620.25,724.54,191.13,191.13,0,0,1,543.69,740Z",
			fill: "#4a90e2"
		}));
	}
	IconBrand.Types = IconBrandTypes;
	//#endregion
	//#region shared/style.js
	var Style = class {
		get name() {
			return "Style";
		}
		get styleId() {
			return `${config_default.name}-style`;
		}
		constructor() {
			this.initialized = false;
			this.styles = [];
			this._raf = null;
		}
		initialize() {
			this.injectStyle();
			this.initialized = true;
			Logger.info(this.name, "Initialized.");
		}
		shutdown() {
			this.removeStyle();
			this.initialized = false;
			Logger.info(this.name, "Shutdown.");
		}
		buildStyle() {
			return this.styles.reduce((str, { description, style }) => str + `/* ====== ${description} ====== */\n${style}\n\n`, "");
		}
		buildStyleElement() {
			const style = document.createElement("style");
			style.id = this.styleId;
			style.appendChild(document.createTextNode(this.buildStyle()));
			return style;
		}
		updateStyle() {
			if (!this.initialized) return;
			this.removeStyle();
			this.injectStyle();
			Logger.log(this.name, "Styles updated.");
		}
		scheduleUpdate() {
			if (this._raf) return;
			this._raf = requestAnimationFrame(() => {
				this._raf = null;
				this.updateStyle();
			});
		}
		registerStyle(description, style) {
			const index = this.styles.findIndex((s) => s.description === description);
			if (index !== -1) {
				this.styles.splice(index, 1, {
					description,
					style
				});
				Logger.warn(this.name, `Style "${description}" has been overridden.`);
			} else this.styles.push({
				description,
				style
			});
			this.scheduleUpdate();
		}
		injectStyle() {
			document.body.appendChild(this.buildStyleElement());
		}
		removeStyle() {
			document.getElementById(this.styleId)?.remove();
		}
	};
	var createCSS = (style) => (strings, ...values) => (description, ...descriptionValues) => style.registerStyle(String.raw(description, ...descriptionValues), String.raw(strings, ...values));
	createCSS(new Style());
	//#endregion
	//#region src/modules/Style.js
	var style = new class extends Style {
		injectStyle() {
			Logger.log(this.name, `Injecting ${this.styles.length} registered styles...`);
			DOM.addStyle(this.styleId, this.buildStyle());
		}
		removeStyle() {
			Logger.log(this.name, "Removing styles...");
			DOM.removeStyle(this.styleId);
		}
	}();
	var css = createCSS(style);
	//#endregion
	//#region src/meta.js
	var meta = {};
	function saveMeta(m) {
		meta = m;
	}
	var meta_default = new Proxy({}, { get: (obj, prop) => meta[prop] ?? void 0 });
	//#endregion
	//#region shared/hooks/useUpdate.js
	var updateReducer = (num) => (num + 1) % 1e6;
	function useUpdate() {
		const [, update] = (0, react.useReducer)(updateReducer, 0);
		return update;
	}
	//#endregion
	//#region src/modules/Emitter.js
	var Emitter_default = new class Emitter extends events.default {
		dispatch(eventName, ...args) {
			this.emit(eventName, ...args);
		}
	}();
	//#endregion
	//#region src/hooks/useEmitterEffect.js
	function useEmitterEffect(events, callback) {
		const update = useUpdate();
		const callbackRef = (0, react.useRef)(callback);
		(0, react.useEffect)(() => {
			callbackRef.current = callback;
		}, [callback]);
		(0, react.useEffect)(() => {
			const _events = [].concat(events);
			const _callback = (...args) => (callbackRef.current ?? update)(...args);
			_events.forEach((e) => Emitter_default.on(e, _callback));
			return () => _events.forEach((e) => Emitter_default.off(e, _callback));
		}, [events]);
		return (0, react.useCallback)(Emitter_default.emit.bind(Emitter_default), []);
	}
	//#endregion
	//#region shared/enum.js
	function enumirize(values) {
		if (!Array.isArray(values)) return values;
		return values.reduce((obj, name, i) => ({
			...obj,
			[name]: i
		}), {});
	}
	function Enum(values) {
		const raw = enumirize(values);
		return Object.freeze(Object.assign({ raw }, raw, {
			keys: () => Object.keys(raw),
			values: () => Object.values(raw)
		}));
	}
	//#endregion
	//#region shared/enums/Events.js
	var Events_default = Enum({
		PluginDisabled: "plugin-disabled",
		PackLoaded: "pack-loaded",
		PackUnloaded: "pack-unloaded",
		PackEnabled: "pack-enabled",
		PackDisabled: "pack-disabled",
		PackUpdated: "pack-updated",
		ModuleToggled: "module-toggled",
		ModuleSettingsChanged: "module-settings-changed",
		SettingsChanged: "settings-changed",
		SettingsLoaded: "settings-loaded",
		SettingsSaved: "settings-saved",
		PackRegistryUpdated: "pack-registry-updated",
		SettingsModeChanged: "settings-mode-changed",
		DismissibleUpdated: "dismissible-updated",
		ErrorOccurred: "error-occurred",
		MigratorUpdated: "migrator-updated"
	});
	//#endregion
	//#region src/components/Modal.jsx
	function Modal$2({ title, children, footerLeading, footer, onClose, confirmText = "Close", confirmButtonVariant = "secondary", cancelText, onConfirm, onCancel, loading = false, disabled = loading, ...props }) {
		useEmitterEffect(Events_default.PluginDisabled, onClose);
		const onCallback = (callback) => () => {
			let shouldClose = true;
			const preventClose = () => shouldClose = false;
			callback?.(preventClose);
			if (shouldClose) onClose?.();
		};
		return /* @__PURE__ */ BdApi.React.createElement(ModalRoot, {
			className: "BA__modal",
			...props
		}, /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, null, /* @__PURE__ */ BdApi.React.createElement(ModalHeader, { separator: false }, /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, {
			text: meta_default.name,
			shouldShow: !!title,
			position: "bottom",
			align: "left"
		}, (props) => /* @__PURE__ */ BdApi.React.createElement(IconBrand, {
			...props,
			className: "BA__modalIcon",
			size: "custom",
			width: 36,
			height: 36
		})), /* @__PURE__ */ BdApi.React.createElement(Heading, { variant: "heading-lg/semibold" }, title ?? meta_default.name)), /* @__PURE__ */ BdApi.React.createElement(ModalContent, { className: "BA__modalContent" }, children), footer !== false && /* @__PURE__ */ BdApi.React.createElement(ModalFooter, null, footer ?? /* @__PURE__ */ BdApi.React.createElement(ButtonGroup$1, {
			className: "BA__modalButtonGroup",
			direction: "horizontal-reverse"
		}, /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			type: "submit",
			variant: confirmButtonVariant,
			text: confirmText,
			loading,
			disabled,
			onClick: onCallback(onConfirm)
		}), cancelText ? /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			type: "button",
			variant: "secondary",
			text: cancelText,
			disabled: loading,
			onClick: onCallback(onCancel)
		}) : null), footerLeading)));
	}
	css`.BA__modal {
    min-height: unset;
}

.BA__modalIcon {
    margin-right: 4px;
}

.BA__modalContent {
    padding-bottom: 20px;
}

.BA__modalButtonGroup {
    width: auto;
}``Modal`;
	//#endregion
	//#region src/components/Divider.jsx
	function Divider$2({ className, gap, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", {
			className: (0, clsx.default)("BA__divider", className),
			style: {
				marginTop: gap,
				marginBottom: gap
			},
			...props
		});
	}
	css`.BA__divider {
    border-top: thin solid var(--border-subtle);
    height: 1px;
    width: 100%;
}``Divider`;
	//#endregion
	//#region shared/utils/text.js
	function buildIndent(level) {
		return " ".repeat(level * 2);
	}
	function indent(text, level = 1) {
		const indent = buildIndent(level);
		return (text.slice(0, 2) !== "\n" ? indent : "") + text.replaceAll("\n", `\n${indent}`);
	}
	function capitalize(text) {
		return text.charAt(0).toUpperCase() + text.slice(1);
	}
	function sanitize$1(text) {
		return text.replace(/([\uE000-\uF8FF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF])/g, "").replace(/\s+/g, " ").trim();
	}
	//#endregion
	//#region package.json
	var version$1 = "2.1.15";
	//#endregion
	//#region shared/error/structs/BaseError.js
	var BaseError = class extends Error {
		constructor(message, options = {}, additionalMeta = []) {
			const { module, pack, silent = false } = options;
			const meta = [
				`${config_default.name} ${version$1}`,
				module && `Module: ${module.name}`,
				pack && "Pack: " + [
					pack.name,
					pack.version && `v${pack.version}`,
					pack.author && `by ${pack.author}`
				].filter(Boolean).join(" "),
				...additionalMeta
			];
			super(message + "\n\n" + indent(meta.filter(Boolean).join("\n"), 2) + "\n");
			this.module = module;
			this.pack = pack;
			this.silent = silent;
		}
	};
	//#endregion
	//#region src/discord/classes.js
	var _Classes = {
		ChatSidebar: Webpack.getByKeys("chatLayerWrapper", "chatTarget"),
		StandardSidebarView: () => Webpack.getByKeys("standardSidebarView", "contentRegion"),
		SettingsSidebar: () => Webpack.getByKeys("sidebar", "section", "nav"),
		Modal: Webpack.getByKeys("root", "rootWithShadow"),
		Layers: Webpack.getByKeys("layer", "baseLayer"),
		AppMount: Webpack.getByKeys("appMount"),
		AppView: Webpack.getByKeys("base", "content"),
		ChannelView: Webpack.getByKeys("chat", "chatContent"),
		ChannelItem: Webpack.getByKeys("containerDefault", "channelInfo"),
		MessageList: Webpack.getByKeys("message", "groupStart"),
		Layer: Webpack.getByKeys("layer", "layerContainer"),
		Toast: Webpack.getByKeys("toast", "icon", "content"),
		Scroller: Webpack.getByKeys("thin", "disableScrollAnchor"),
		Select: Webpack.getByKeys("select", "measurement"),
		ManaModal: Webpack.getByKeys("actionBar", "headerTrailing"),
		Modals: Webpack.getByKeys("layer", "inactive")
	};
	var DiscordClasses = new Proxy(_Classes, { get(obj, prop) {
		const value = obj[prop];
		if (typeof value !== "function") return value;
		const resolved = value();
		if (!resolved) return void 0;
		return obj[prop] = resolved;
	} });
	//#endregion
	//#region src/discord/validator.js
	var Validator = class {
		get name() {
			return "Validator";
		}
		constructor() {
			this.issues = /* @__PURE__ */ new Map();
		}
		shouldSkip(module) {
			return module instanceof Flux.Store || module === (GatewaySocket ?? {});
		}
		collectIssues(modules) {
			const issues = [];
			for (const [key, module] of Object.entries(modules)) if (module === void 0 || Array.isArray(module) && module.includes(void 0)) issues.push([key, "Unresolved module."]);
			else if (typeof module === "object" && module !== null && !this.shouldSkip(module)) {
				const keys = Object.keys(module).filter((k) => module[k] === void 0);
				if (keys.length) issues.push([key, `Unresolved module keys: ${keys.join(", ")}.`]);
			}
			return issues;
		}
		buildMessage(name, issues = this.issues.get(name) ?? []) {
			return `Found ${issues.length} issue${issues.length > 1 ? "s" : ""} in ${name}:\n` + issues.map(([key, value]) => `  • ${key}: ${value}`).join("\n");
		}
		validateModules(name, modules) {
			Logger.info(this.name, `Validating ${name}...`);
			const issues = this.collectIssues(modules);
			if (!issues.length) {
				Logger.info(this.name, `No issues found in ${name}.`);
				return true;
			}
			this.issues.set(name, issues);
			const message = this.buildMessage(name, issues);
			Logger.warn(this.name, message);
			return false;
		}
		onStartup() {
			this.validateModules("DiscordModules", modules_exports);
			this.validateModules("DiscordClasses", _Classes);
		}
	};
	var validator_default = new Validator();
	//#endregion
	//#region shared/error/structs/InternalError.js
	var InternalError = class InternalError extends BaseError {
		static Category = {
			GENERAL: 0,
			MODULE: 1,
			PRIORITIZE_ANIMATION_SMOOTHNESS: 2
		};
		constructor(message, { category, ...options } = {}) {
			const meta = [];
			if (validator_default.issues.has("DiscordModules")) meta.push(`${validator_default.name}: ${validator_default.buildMessage("DiscordModules")}`);
			super(message, options, meta);
			this.category = category ?? InternalError.Category.GENERAL;
		}
		get name() {
			return "InternalError";
		}
	};
	//#endregion
	//#region shared/error/structs/AddonError.js
	var AddonError = class extends BaseError {
		constructor(type, addon, message, options = {}) {
			super(message, {
				[type]: addon,
				...options
			});
			this.type = type;
			this.addon = addon;
		}
		get name() {
			return `${capitalize(this.type)}Error`;
		}
	};
	//#endregion
	//#region __vite-browser-external
	var require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((exports, module) => {
		module.exports = {};
	}));
	//#endregion
	//#region shared/utils/object.js
	var import_object_inspect = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
		var hasMap = typeof Map === "function" && Map.prototype;
		var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
		var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
		var mapForEach = hasMap && Map.prototype.forEach;
		var hasSet = typeof Set === "function" && Set.prototype;
		var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
		var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
		var setForEach = hasSet && Set.prototype.forEach;
		var weakMapHas = typeof WeakMap === "function" && WeakMap.prototype ? WeakMap.prototype.has : null;
		var weakSetHas = typeof WeakSet === "function" && WeakSet.prototype ? WeakSet.prototype.has : null;
		var weakRefDeref = typeof WeakRef === "function" && WeakRef.prototype ? WeakRef.prototype.deref : null;
		var booleanValueOf = Boolean.prototype.valueOf;
		var objectToString = Object.prototype.toString;
		var functionToString = Function.prototype.toString;
		var $match = String.prototype.match;
		var $slice = String.prototype.slice;
		var $replace = String.prototype.replace;
		var $toUpperCase = String.prototype.toUpperCase;
		var $toLowerCase = String.prototype.toLowerCase;
		var $test = RegExp.prototype.test;
		var $concat = Array.prototype.concat;
		var $join = Array.prototype.join;
		var $arrSlice = Array.prototype.slice;
		var $floor = Math.floor;
		var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
		var gOPS = Object.getOwnPropertySymbols;
		var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
		var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
		var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
		var isEnumerable = Object.prototype.propertyIsEnumerable;
		var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
			return O.__proto__;
		} : null);
		function addNumericSeparator(num, str) {
			if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) return str;
			var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
			if (typeof num === "number") {
				var int = num < 0 ? -$floor(-num) : $floor(num);
				if (int !== num) {
					var intStr = String(int);
					var dec = $slice.call(str, intStr.length + 1);
					return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
				}
			}
			return $replace.call(str, sepRegex, "$&_");
		}
		var utilInspect = require___vite_browser_external();
		var inspectCustom = utilInspect.custom;
		var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
		var quotes = {
			__proto__: null,
			"double": "\"",
			single: "'"
		};
		var quoteREs = {
			__proto__: null,
			"double": /(["\\])/g,
			single: /(['\\])/g
		};
		module.exports = function inspect_(obj, options, depth, seen) {
			var opts = options || {};
			if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) throw new TypeError("option \"quoteStyle\" must be \"single\" or \"double\"");
			if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) throw new TypeError("option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`");
			var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
			if (typeof customInspect !== "boolean" && customInspect !== "symbol") throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
			if (has(opts, "indent") && opts.indent !== null && opts.indent !== "	" && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) throw new TypeError("option \"indent\" must be \"\\t\", an integer > 0, or `null`");
			if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") throw new TypeError("option \"numericSeparator\", if provided, must be `true` or `false`");
			var numericSeparator = opts.numericSeparator;
			if (typeof obj === "undefined") return "undefined";
			if (obj === null) return "null";
			if (typeof obj === "boolean") return obj ? "true" : "false";
			if (typeof obj === "string") return inspectString(obj, opts);
			if (typeof obj === "number") {
				if (obj === 0) return Infinity / obj > 0 ? "0" : "-0";
				var str = String(obj);
				return numericSeparator ? addNumericSeparator(obj, str) : str;
			}
			if (typeof obj === "bigint") {
				var bigIntStr = String(obj) + "n";
				return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
			}
			var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
			if (typeof depth === "undefined") depth = 0;
			if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") return isArray(obj) ? "[Array]" : "[Object]";
			var indent = getIndent(opts, depth);
			if (typeof seen === "undefined") seen = [];
			else if (indexOf(seen, obj) >= 0) return "[Circular]";
			function inspect(value, from, noIndent) {
				if (from) {
					seen = $arrSlice.call(seen);
					seen.push(from);
				}
				if (noIndent) {
					var newOpts = { depth: opts.depth };
					if (has(opts, "quoteStyle")) newOpts.quoteStyle = opts.quoteStyle;
					return inspect_(value, newOpts, depth + 1, seen);
				}
				return inspect_(value, opts, depth + 1, seen);
			}
			if (typeof obj === "function" && !isRegExp(obj)) {
				var name = nameOf(obj);
				var keys = arrObjKeys(obj, inspect);
				return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
			}
			if (isSymbol(obj)) {
				var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
				return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
			}
			if (isElement(obj)) {
				var s = "<" + $toLowerCase.call(String(obj.nodeName));
				var attrs = obj.attributes || [];
				for (var i = 0; i < attrs.length; i++) s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
				s += ">";
				if (obj.childNodes && obj.childNodes.length) s += "...";
				s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
				return s;
			}
			if (isArray(obj)) {
				if (obj.length === 0) return "[]";
				var xs = arrObjKeys(obj, inspect);
				if (indent && !singleLineValues(xs)) return "[" + indentedJoin(xs, indent) + "]";
				return "[ " + $join.call(xs, ", ") + " ]";
			}
			if (isError(obj)) {
				var parts = arrObjKeys(obj, inspect);
				if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
				if (parts.length === 0) return "[" + String(obj) + "]";
				return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
			}
			if (typeof obj === "object" && customInspect) {
				if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) return utilInspect(obj, { depth: maxDepth - depth });
				else if (customInspect !== "symbol" && typeof obj.inspect === "function") return obj.inspect();
			}
			if (isMap(obj)) {
				var mapParts = [];
				if (mapForEach) mapForEach.call(obj, function(value, key) {
					mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
				});
				return collectionOf("Map", mapSize.call(obj), mapParts, indent);
			}
			if (isSet(obj)) {
				var setParts = [];
				if (setForEach) setForEach.call(obj, function(value) {
					setParts.push(inspect(value, obj));
				});
				return collectionOf("Set", setSize.call(obj), setParts, indent);
			}
			if (isWeakMap(obj)) return weakCollectionOf("WeakMap");
			if (isWeakSet(obj)) return weakCollectionOf("WeakSet");
			if (isWeakRef(obj)) return weakCollectionOf("WeakRef");
			if (isNumber(obj)) return markBoxed(inspect(Number(obj)));
			if (isBigInt(obj)) return markBoxed(inspect(bigIntValueOf.call(obj)));
			if (isBoolean(obj)) return markBoxed(booleanValueOf.call(obj));
			if (isString(obj)) return markBoxed(inspect(String(obj)));
			if (typeof window !== "undefined" && obj === window) return "{ [object Window] }";
			if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) return "{ [object globalThis] }";
			if (!isDate(obj) && !isRegExp(obj)) {
				var ys = arrObjKeys(obj, inspect);
				var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
				var protoTag = obj instanceof Object ? "" : "null prototype";
				var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
				var tag = (isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "") + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
				if (ys.length === 0) return tag + "{}";
				if (indent) return tag + "{" + indentedJoin(ys, indent) + "}";
				return tag + "{ " + $join.call(ys, ", ") + " }";
			}
			return String(obj);
		};
		function wrapQuotes(s, defaultStyle, opts) {
			var quoteChar = quotes[opts.quoteStyle || defaultStyle];
			return quoteChar + s + quoteChar;
		}
		function quote(s) {
			return $replace.call(String(s), /"/g, "&quot;");
		}
		function canTrustToString(obj) {
			return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
		}
		function isArray(obj) {
			return toStr(obj) === "[object Array]" && canTrustToString(obj);
		}
		function isDate(obj) {
			return toStr(obj) === "[object Date]" && canTrustToString(obj);
		}
		function isRegExp(obj) {
			return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
		}
		function isError(obj) {
			return toStr(obj) === "[object Error]" && canTrustToString(obj);
		}
		function isString(obj) {
			return toStr(obj) === "[object String]" && canTrustToString(obj);
		}
		function isNumber(obj) {
			return toStr(obj) === "[object Number]" && canTrustToString(obj);
		}
		function isBoolean(obj) {
			return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
		}
		function isSymbol(obj) {
			if (hasShammedSymbols) return obj && typeof obj === "object" && obj instanceof Symbol;
			if (typeof obj === "symbol") return true;
			if (!obj || typeof obj !== "object" || !symToString) return false;
			try {
				symToString.call(obj);
				return true;
			} catch (e) {}
			return false;
		}
		function isBigInt(obj) {
			if (!obj || typeof obj !== "object" || !bigIntValueOf) return false;
			try {
				bigIntValueOf.call(obj);
				return true;
			} catch (e) {}
			return false;
		}
		var hasOwn = Object.prototype.hasOwnProperty || function(key) {
			return key in this;
		};
		function has(obj, key) {
			return hasOwn.call(obj, key);
		}
		function toStr(obj) {
			return objectToString.call(obj);
		}
		function nameOf(f) {
			if (f.name) return f.name;
			var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
			if (m) return m[1];
			return null;
		}
		function indexOf(xs, x) {
			if (xs.indexOf) return xs.indexOf(x);
			for (var i = 0, l = xs.length; i < l; i++) if (xs[i] === x) return i;
			return -1;
		}
		function isMap(x) {
			if (!mapSize || !x || typeof x !== "object") return false;
			try {
				mapSize.call(x);
				try {
					setSize.call(x);
				} catch (s) {
					return true;
				}
				return x instanceof Map;
			} catch (e) {}
			return false;
		}
		function isWeakMap(x) {
			if (!weakMapHas || !x || typeof x !== "object") return false;
			try {
				weakMapHas.call(x, weakMapHas);
				try {
					weakSetHas.call(x, weakSetHas);
				} catch (s) {
					return true;
				}
				return x instanceof WeakMap;
			} catch (e) {}
			return false;
		}
		function isWeakRef(x) {
			if (!weakRefDeref || !x || typeof x !== "object") return false;
			try {
				weakRefDeref.call(x);
				return true;
			} catch (e) {}
			return false;
		}
		function isSet(x) {
			if (!setSize || !x || typeof x !== "object") return false;
			try {
				setSize.call(x);
				try {
					mapSize.call(x);
				} catch (m) {
					return true;
				}
				return x instanceof Set;
			} catch (e) {}
			return false;
		}
		function isWeakSet(x) {
			if (!weakSetHas || !x || typeof x !== "object") return false;
			try {
				weakSetHas.call(x, weakSetHas);
				try {
					weakMapHas.call(x, weakMapHas);
				} catch (s) {
					return true;
				}
				return x instanceof WeakSet;
			} catch (e) {}
			return false;
		}
		function isElement(x) {
			if (!x || typeof x !== "object") return false;
			if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) return true;
			return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
		}
		function inspectString(str, opts) {
			if (str.length > opts.maxStringLength) {
				var remaining = str.length - opts.maxStringLength;
				var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
				return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
			}
			var quoteRE = quoteREs[opts.quoteStyle || "single"];
			quoteRE.lastIndex = 0;
			return wrapQuotes($replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte), "single", opts);
		}
		function lowbyte(c) {
			var n = c.charCodeAt(0);
			var x = {
				8: "b",
				9: "t",
				10: "n",
				12: "f",
				13: "r"
			}[n];
			if (x) return "\\" + x;
			return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
		}
		function markBoxed(str) {
			return "Object(" + str + ")";
		}
		function weakCollectionOf(type) {
			return type + " { ? }";
		}
		function collectionOf(type, size, entries, indent) {
			var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
			return type + " (" + size + ") {" + joinedEntries + "}";
		}
		function singleLineValues(xs) {
			for (var i = 0; i < xs.length; i++) if (indexOf(xs[i], "\n") >= 0) return false;
			return true;
		}
		function getIndent(opts, depth) {
			var baseIndent;
			if (opts.indent === "	") baseIndent = "	";
			else if (typeof opts.indent === "number" && opts.indent > 0) baseIndent = $join.call(Array(opts.indent + 1), " ");
			else return null;
			return {
				base: baseIndent,
				prev: $join.call(Array(depth + 1), baseIndent)
			};
		}
		function indentedJoin(xs, indent) {
			if (xs.length === 0) return "";
			var lineJoiner = "\n" + indent.prev + indent.base;
			return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
		}
		function arrObjKeys(obj, inspect) {
			var isArr = isArray(obj);
			var xs = [];
			if (isArr) {
				xs.length = obj.length;
				for (var i = 0; i < obj.length; i++) xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
			}
			var syms = typeof gOPS === "function" ? gOPS(obj) : [];
			var symMap;
			if (hasShammedSymbols) {
				symMap = {};
				for (var k = 0; k < syms.length; k++) symMap["$" + syms[k]] = syms[k];
			}
			for (var key in obj) {
				if (!has(obj, key)) continue;
				if (isArr && String(Number(key)) === key && key < obj.length) continue;
				if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) continue;
				else if ($test.call(/[^\w$]/, key)) xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
				else xs.push(key + ": " + inspect(obj[key], obj));
			}
			if (typeof gOPS === "function") {
				for (var j = 0; j < syms.length; j++) if (isEnumerable.call(obj, syms[j])) xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
			}
			return xs;
		}
	})))(), 1);
	function getPath$2(obj, path) {
		if (!path.length) return obj;
		if (typeof obj !== "object" || obj === null) return void 0;
		const [key, ...rest] = path;
		return getPath$2(obj[key], rest);
	}
	function pick(obj, keys = []) {
		return Object.fromEntries(keys.filter((k) => Object.hasOwn(obj, k)).map((k) => [k, obj[k]]));
	}
	function omit(obj, keys = []) {
		return Object.fromEntries(Object.entries(obj).filter(([k]) => !keys.includes(k)));
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js
	/**
	* Removes all key-value entries from the list cache.
	*
	* @private
	* @name clear
	* @memberOf ListCache
	*/
	function listCacheClear() {
		this.__data__ = [];
		this.size = 0;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/eq.js
	/**
	* Performs a
	* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
	* comparison between two values to determine if they are equivalent.
	*
	* @static
	* @memberOf _
	* @since 4.0.0
	* @category Lang
	* @param {*} value The value to compare.
	* @param {*} other The other value to compare.
	* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
	* @example
	*
	* var object = { 'a': 1 };
	* var other = { 'a': 1 };
	*
	* _.eq(object, object);
	* // => true
	*
	* _.eq(object, other);
	* // => false
	*
	* _.eq('a', 'a');
	* // => true
	*
	* _.eq('a', Object('a'));
	* // => false
	*
	* _.eq(NaN, NaN);
	* // => true
	*/
	function eq(value, other) {
		return value === other || value !== value && other !== other;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js
	/**
	* Gets the index at which the `key` is found in `array` of key-value pairs.
	*
	* @private
	* @param {Array} array The array to inspect.
	* @param {*} key The key to search for.
	* @returns {number} Returns the index of the matched value, else `-1`.
	*/
	function assocIndexOf(array, key) {
		var length = array.length;
		while (length--) if (eq(array[length][0], key)) return length;
		return -1;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js
	/** Built-in value references. */
	var splice = Array.prototype.splice;
	/**
	* Removes `key` and its value from the list cache.
	*
	* @private
	* @name delete
	* @memberOf ListCache
	* @param {string} key The key of the value to remove.
	* @returns {boolean} Returns `true` if the entry was removed, else `false`.
	*/
	function listCacheDelete(key) {
		var data = this.__data__, index = assocIndexOf(data, key);
		if (index < 0) return false;
		if (index == data.length - 1) data.pop();
		else splice.call(data, index, 1);
		--this.size;
		return true;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js
	/**
	* Gets the list cache value for `key`.
	*
	* @private
	* @name get
	* @memberOf ListCache
	* @param {string} key The key of the value to get.
	* @returns {*} Returns the entry value.
	*/
	function listCacheGet(key) {
		var data = this.__data__, index = assocIndexOf(data, key);
		return index < 0 ? void 0 : data[index][1];
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js
	/**
	* Checks if a list cache value for `key` exists.
	*
	* @private
	* @name has
	* @memberOf ListCache
	* @param {string} key The key of the entry to check.
	* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
	*/
	function listCacheHas(key) {
		return assocIndexOf(this.__data__, key) > -1;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js
	/**
	* Sets the list cache `key` to `value`.
	*
	* @private
	* @name set
	* @memberOf ListCache
	* @param {string} key The key of the value to set.
	* @param {*} value The value to set.
	* @returns {Object} Returns the list cache instance.
	*/
	function listCacheSet(key, value) {
		var data = this.__data__, index = assocIndexOf(data, key);
		if (index < 0) {
			++this.size;
			data.push([key, value]);
		} else data[index][1] = value;
		return this;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js
	/**
	* Creates an list cache object.
	*
	* @private
	* @constructor
	* @param {Array} [entries] The key-value pairs to cache.
	*/
	function ListCache(entries) {
		var index = -1, length = entries == null ? 0 : entries.length;
		this.clear();
		while (++index < length) {
			var entry = entries[index];
			this.set(entry[0], entry[1]);
		}
	}
	ListCache.prototype.clear = listCacheClear;
	ListCache.prototype["delete"] = listCacheDelete;
	ListCache.prototype.get = listCacheGet;
	ListCache.prototype.has = listCacheHas;
	ListCache.prototype.set = listCacheSet;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js
	/**
	* Removes all key-value entries from the stack.
	*
	* @private
	* @name clear
	* @memberOf Stack
	*/
	function stackClear() {
		this.__data__ = new ListCache();
		this.size = 0;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js
	/**
	* Removes `key` and its value from the stack.
	*
	* @private
	* @name delete
	* @memberOf Stack
	* @param {string} key The key of the value to remove.
	* @returns {boolean} Returns `true` if the entry was removed, else `false`.
	*/
	function stackDelete(key) {
		var data = this.__data__, result = data["delete"](key);
		this.size = data.size;
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js
	/**
	* Gets the stack value for `key`.
	*
	* @private
	* @name get
	* @memberOf Stack
	* @param {string} key The key of the value to get.
	* @returns {*} Returns the entry value.
	*/
	function stackGet(key) {
		return this.__data__.get(key);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js
	/**
	* Checks if a stack value for `key` exists.
	*
	* @private
	* @name has
	* @memberOf Stack
	* @param {string} key The key of the entry to check.
	* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
	*/
	function stackHas(key) {
		return this.__data__.has(key);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js
	/** Detect free variable `global` from Node.js. */
	var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_root.js
	/** Detect free variable `self`. */
	var freeSelf = typeof self == "object" && self && self.Object === Object && self;
	/** Used as a reference to the global object. */
	var root$2 = freeGlobal || freeSelf || Function("return this")();
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js
	/** Built-in value references. */
	var Symbol$1 = root$2.Symbol;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js
	/** Used for built-in method references. */
	var objectProto$4 = Object.prototype;
	/** Used to check objects for own properties. */
	var hasOwnProperty$12 = objectProto$4.hasOwnProperty;
	/**
	* Used to resolve the
	* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
	* of values.
	*/
	var nativeObjectToString$1 = objectProto$4.toString;
	/** Built-in value references. */
	var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
	/**
	* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
	*
	* @private
	* @param {*} value The value to query.
	* @returns {string} Returns the raw `toStringTag`.
	*/
	function getRawTag(value) {
		var isOwn = hasOwnProperty$12.call(value, symToStringTag$1), tag = value[symToStringTag$1];
		try {
			value[symToStringTag$1] = void 0;
			var unmasked = true;
		} catch (e) {}
		var result = nativeObjectToString$1.call(value);
		if (unmasked) if (isOwn) value[symToStringTag$1] = tag;
		else delete value[symToStringTag$1];
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js
	/**
	* Used to resolve the
	* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
	* of values.
	*/
	var nativeObjectToString = Object.prototype.toString;
	/**
	* Converts `value` to a string using `Object.prototype.toString`.
	*
	* @private
	* @param {*} value The value to convert.
	* @returns {string} Returns the converted string.
	*/
	function objectToString(value) {
		return nativeObjectToString.call(value);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js
	/** `Object#toString` result references. */
	var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
	/** Built-in value references. */
	var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
	/**
	* The base implementation of `getTag` without fallbacks for buggy environments.
	*
	* @private
	* @param {*} value The value to query.
	* @returns {string} Returns the `toStringTag`.
	*/
	function baseGetTag(value) {
		if (value == null) return value === void 0 ? undefinedTag : nullTag;
		return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObject.js
	/**
	* Checks if `value` is the
	* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
	* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
	*
	* @static
	* @memberOf _
	* @since 0.1.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is an object, else `false`.
	* @example
	*
	* _.isObject({});
	* // => true
	*
	* _.isObject([1, 2, 3]);
	* // => true
	*
	* _.isObject(_.noop);
	* // => true
	*
	* _.isObject(null);
	* // => false
	*/
	function isObject(value) {
		var type = typeof value;
		return value != null && (type == "object" || type == "function");
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js
	/** `Object#toString` result references. */
	var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
	/**
	* Checks if `value` is classified as a `Function` object.
	*
	* @static
	* @memberOf _
	* @since 0.1.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a function, else `false`.
	* @example
	*
	* _.isFunction(_);
	* // => true
	*
	* _.isFunction(/abc/);
	* // => false
	*/
	function isFunction(value) {
		if (!isObject(value)) return false;
		var tag = baseGetTag(value);
		return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js
	/** Used to detect overreaching core-js shims. */
	var coreJsData = root$2["__core-js_shared__"];
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js
	/** Used to detect methods masquerading as native. */
	var maskSrcKey = function() {
		var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
		return uid ? "Symbol(src)_1." + uid : "";
	}();
	/**
	* Checks if `func` has its source masked.
	*
	* @private
	* @param {Function} func The function to check.
	* @returns {boolean} Returns `true` if `func` is masked, else `false`.
	*/
	function isMasked(func) {
		return !!maskSrcKey && maskSrcKey in func;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js
	/** Used to resolve the decompiled source of functions. */
	var funcToString$2 = Function.prototype.toString;
	/**
	* Converts `func` to its source code.
	*
	* @private
	* @param {Function} func The function to convert.
	* @returns {string} Returns the source code.
	*/
	function toSource(func) {
		if (func != null) {
			try {
				return funcToString$2.call(func);
			} catch (e) {}
			try {
				return func + "";
			} catch (e) {}
		}
		return "";
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js
	/**
	* Used to match `RegExp`
	* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
	*/
	var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
	/** Used to detect host constructors (Safari). */
	var reIsHostCtor = /^\[object .+?Constructor\]$/;
	/** Used for built-in method references. */
	var funcProto$1 = Function.prototype, objectProto$3 = Object.prototype;
	/** Used to resolve the decompiled source of functions. */
	var funcToString$1 = funcProto$1.toString;
	/** Used to check objects for own properties. */
	var hasOwnProperty$11 = objectProto$3.hasOwnProperty;
	/** Used to detect if a method is native. */
	var reIsNative = RegExp("^" + funcToString$1.call(hasOwnProperty$11).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
	/**
	* The base implementation of `_.isNative` without bad shim checks.
	*
	* @private
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a native function,
	*  else `false`.
	*/
	function baseIsNative(value) {
		if (!isObject(value) || isMasked(value)) return false;
		return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js
	/**
	* Gets the value at `key` of `object`.
	*
	* @private
	* @param {Object} [object] The object to query.
	* @param {string} key The key of the property to get.
	* @returns {*} Returns the property value.
	*/
	function getValue(object, key) {
		return object == null ? void 0 : object[key];
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js
	/**
	* Gets the native function at `key` of `object`.
	*
	* @private
	* @param {Object} object The object to query.
	* @param {string} key The key of the method to get.
	* @returns {*} Returns the function if it's native, else `undefined`.
	*/
	function getNative(object, key) {
		var value = getValue(object, key);
		return baseIsNative(value) ? value : void 0;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Map.js
	var Map$1 = getNative(root$2, "Map");
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js
	var nativeCreate = getNative(Object, "create");
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js
	/**
	* Removes all key-value entries from the hash.
	*
	* @private
	* @name clear
	* @memberOf Hash
	*/
	function hashClear() {
		this.__data__ = nativeCreate ? nativeCreate(null) : {};
		this.size = 0;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js
	/**
	* Removes `key` and its value from the hash.
	*
	* @private
	* @name delete
	* @memberOf Hash
	* @param {Object} hash The hash to modify.
	* @param {string} key The key of the value to remove.
	* @returns {boolean} Returns `true` if the entry was removed, else `false`.
	*/
	function hashDelete(key) {
		var result = this.has(key) && delete this.__data__[key];
		this.size -= result ? 1 : 0;
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js
	/** Used to stand-in for `undefined` hash values. */
	var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
	/** Used to check objects for own properties. */
	var hasOwnProperty$10 = Object.prototype.hasOwnProperty;
	/**
	* Gets the hash value for `key`.
	*
	* @private
	* @name get
	* @memberOf Hash
	* @param {string} key The key of the value to get.
	* @returns {*} Returns the entry value.
	*/
	function hashGet(key) {
		var data = this.__data__;
		if (nativeCreate) {
			var result = data[key];
			return result === HASH_UNDEFINED$2 ? void 0 : result;
		}
		return hasOwnProperty$10.call(data, key) ? data[key] : void 0;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js
	/** Used to check objects for own properties. */
	var hasOwnProperty$9 = Object.prototype.hasOwnProperty;
	/**
	* Checks if a hash value for `key` exists.
	*
	* @private
	* @name has
	* @memberOf Hash
	* @param {string} key The key of the entry to check.
	* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
	*/
	function hashHas(key) {
		var data = this.__data__;
		return nativeCreate ? data[key] !== void 0 : hasOwnProperty$9.call(data, key);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js
	/** Used to stand-in for `undefined` hash values. */
	var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
	/**
	* Sets the hash `key` to `value`.
	*
	* @private
	* @name set
	* @memberOf Hash
	* @param {string} key The key of the value to set.
	* @param {*} value The value to set.
	* @returns {Object} Returns the hash instance.
	*/
	function hashSet(key, value) {
		var data = this.__data__;
		this.size += this.has(key) ? 0 : 1;
		data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
		return this;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js
	/**
	* Creates a hash object.
	*
	* @private
	* @constructor
	* @param {Array} [entries] The key-value pairs to cache.
	*/
	function Hash(entries) {
		var index = -1, length = entries == null ? 0 : entries.length;
		this.clear();
		while (++index < length) {
			var entry = entries[index];
			this.set(entry[0], entry[1]);
		}
	}
	Hash.prototype.clear = hashClear;
	Hash.prototype["delete"] = hashDelete;
	Hash.prototype.get = hashGet;
	Hash.prototype.has = hashHas;
	Hash.prototype.set = hashSet;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js
	/**
	* Removes all key-value entries from the map.
	*
	* @private
	* @name clear
	* @memberOf MapCache
	*/
	function mapCacheClear() {
		this.size = 0;
		this.__data__ = {
			"hash": new Hash(),
			"map": new (Map$1 || ListCache)(),
			"string": new Hash()
		};
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js
	/**
	* Checks if `value` is suitable for use as unique object key.
	*
	* @private
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
	*/
	function isKeyable(value) {
		var type = typeof value;
		return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js
	/**
	* Gets the data for `map`.
	*
	* @private
	* @param {Object} map The map to query.
	* @param {string} key The reference key.
	* @returns {*} Returns the map data.
	*/
	function getMapData(map, key) {
		var data = map.__data__;
		return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js
	/**
	* Removes `key` and its value from the map.
	*
	* @private
	* @name delete
	* @memberOf MapCache
	* @param {string} key The key of the value to remove.
	* @returns {boolean} Returns `true` if the entry was removed, else `false`.
	*/
	function mapCacheDelete(key) {
		var result = getMapData(this, key)["delete"](key);
		this.size -= result ? 1 : 0;
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js
	/**
	* Gets the map value for `key`.
	*
	* @private
	* @name get
	* @memberOf MapCache
	* @param {string} key The key of the value to get.
	* @returns {*} Returns the entry value.
	*/
	function mapCacheGet(key) {
		return getMapData(this, key).get(key);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js
	/**
	* Checks if a map value for `key` exists.
	*
	* @private
	* @name has
	* @memberOf MapCache
	* @param {string} key The key of the entry to check.
	* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
	*/
	function mapCacheHas(key) {
		return getMapData(this, key).has(key);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js
	/**
	* Sets the map `key` to `value`.
	*
	* @private
	* @name set
	* @memberOf MapCache
	* @param {string} key The key of the value to set.
	* @param {*} value The value to set.
	* @returns {Object} Returns the map cache instance.
	*/
	function mapCacheSet(key, value) {
		var data = getMapData(this, key), size = data.size;
		data.set(key, value);
		this.size += data.size == size ? 0 : 1;
		return this;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js
	/**
	* Creates a map cache object to store key-value pairs.
	*
	* @private
	* @constructor
	* @param {Array} [entries] The key-value pairs to cache.
	*/
	function MapCache(entries) {
		var index = -1, length = entries == null ? 0 : entries.length;
		this.clear();
		while (++index < length) {
			var entry = entries[index];
			this.set(entry[0], entry[1]);
		}
	}
	MapCache.prototype.clear = mapCacheClear;
	MapCache.prototype["delete"] = mapCacheDelete;
	MapCache.prototype.get = mapCacheGet;
	MapCache.prototype.has = mapCacheHas;
	MapCache.prototype.set = mapCacheSet;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js
	/** Used as the size to enable large array optimizations. */
	var LARGE_ARRAY_SIZE = 200;
	/**
	* Sets the stack `key` to `value`.
	*
	* @private
	* @name set
	* @memberOf Stack
	* @param {string} key The key of the value to set.
	* @param {*} value The value to set.
	* @returns {Object} Returns the stack cache instance.
	*/
	function stackSet(key, value) {
		var data = this.__data__;
		if (data instanceof ListCache) {
			var pairs = data.__data__;
			if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE - 1) {
				pairs.push([key, value]);
				this.size = ++data.size;
				return this;
			}
			data = this.__data__ = new MapCache(pairs);
		}
		data.set(key, value);
		this.size = data.size;
		return this;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js
	/**
	* Creates a stack cache object to store key-value pairs.
	*
	* @private
	* @constructor
	* @param {Array} [entries] The key-value pairs to cache.
	*/
	function Stack(entries) {
		var data = this.__data__ = new ListCache(entries);
		this.size = data.size;
	}
	Stack.prototype.clear = stackClear;
	Stack.prototype["delete"] = stackDelete;
	Stack.prototype.get = stackGet;
	Stack.prototype.has = stackHas;
	Stack.prototype.set = stackSet;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js
	/**
	* A specialized version of `_.forEach` for arrays without support for
	* iteratee shorthands.
	*
	* @private
	* @param {Array} [array] The array to iterate over.
	* @param {Function} iteratee The function invoked per iteration.
	* @returns {Array} Returns `array`.
	*/
	function arrayEach(array, iteratee) {
		var index = -1, length = array == null ? 0 : array.length;
		while (++index < length) if (iteratee(array[index], index, array) === false) break;
		return array;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js
	var defineProperty = function() {
		try {
			var func = getNative(Object, "defineProperty");
			func({}, "", {});
			return func;
		} catch (e) {}
	}();
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js
	/**
	* The base implementation of `assignValue` and `assignMergeValue` without
	* value checks.
	*
	* @private
	* @param {Object} object The object to modify.
	* @param {string} key The key of the property to assign.
	* @param {*} value The value to assign.
	*/
	function baseAssignValue(object, key, value) {
		if (key == "__proto__" && defineProperty) defineProperty(object, key, {
			"configurable": true,
			"enumerable": true,
			"value": value,
			"writable": true
		});
		else object[key] = value;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js
	/** Used to check objects for own properties. */
	var hasOwnProperty$8 = Object.prototype.hasOwnProperty;
	/**
	* Assigns `value` to `key` of `object` if the existing value is not equivalent
	* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
	* for equality comparisons.
	*
	* @private
	* @param {Object} object The object to modify.
	* @param {string} key The key of the property to assign.
	* @param {*} value The value to assign.
	*/
	function assignValue(object, key, value) {
		var objValue = object[key];
		if (!(hasOwnProperty$8.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js
	/**
	* Copies properties of `source` to `object`.
	*
	* @private
	* @param {Object} source The object to copy properties from.
	* @param {Array} props The property identifiers to copy.
	* @param {Object} [object={}] The object to copy properties to.
	* @param {Function} [customizer] The function to customize copied values.
	* @returns {Object} Returns `object`.
	*/
	function copyObject(source, props, object, customizer) {
		var isNew = !object;
		object || (object = {});
		var index = -1, length = props.length;
		while (++index < length) {
			var key = props[index];
			var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
			if (newValue === void 0) newValue = source[key];
			if (isNew) baseAssignValue(object, key, newValue);
			else assignValue(object, key, newValue);
		}
		return object;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js
	/**
	* The base implementation of `_.times` without support for iteratee shorthands
	* or max array length checks.
	*
	* @private
	* @param {number} n The number of times to invoke `iteratee`.
	* @param {Function} iteratee The function invoked per iteration.
	* @returns {Array} Returns the array of results.
	*/
	function baseTimes(n, iteratee) {
		var index = -1, result = Array(n);
		while (++index < n) result[index] = iteratee(index);
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js
	/**
	* Checks if `value` is object-like. A value is object-like if it's not `null`
	* and has a `typeof` result of "object".
	*
	* @static
	* @memberOf _
	* @since 4.0.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
	* @example
	*
	* _.isObjectLike({});
	* // => true
	*
	* _.isObjectLike([1, 2, 3]);
	* // => true
	*
	* _.isObjectLike(_.noop);
	* // => false
	*
	* _.isObjectLike(null);
	* // => false
	*/
	function isObjectLike(value) {
		return value != null && typeof value == "object";
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js
	/** `Object#toString` result references. */
	var argsTag$3 = "[object Arguments]";
	/**
	* The base implementation of `_.isArguments`.
	*
	* @private
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is an `arguments` object,
	*/
	function baseIsArguments(value) {
		return isObjectLike(value) && baseGetTag(value) == argsTag$3;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js
	/** Used for built-in method references. */
	var objectProto$2 = Object.prototype;
	/** Used to check objects for own properties. */
	var hasOwnProperty$7 = objectProto$2.hasOwnProperty;
	/** Built-in value references. */
	var propertyIsEnumerable$1 = objectProto$2.propertyIsEnumerable;
	/**
	* Checks if `value` is likely an `arguments` object.
	*
	* @static
	* @memberOf _
	* @since 0.1.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is an `arguments` object,
	*  else `false`.
	* @example
	*
	* _.isArguments(function() { return arguments; }());
	* // => true
	*
	* _.isArguments([1, 2, 3]);
	* // => false
	*/
	var isArguments = baseIsArguments(function() {
		return arguments;
	}()) ? baseIsArguments : function(value) {
		return isObjectLike(value) && hasOwnProperty$7.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
	};
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.js
	/**
	* Checks if `value` is classified as an `Array` object.
	*
	* @static
	* @memberOf _
	* @since 0.1.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is an array, else `false`.
	* @example
	*
	* _.isArray([1, 2, 3]);
	* // => true
	*
	* _.isArray(document.body.children);
	* // => false
	*
	* _.isArray('abc');
	* // => false
	*
	* _.isArray(_.noop);
	* // => false
	*/
	var isArray = Array.isArray;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js
	/**
	* This method returns `false`.
	*
	* @static
	* @memberOf _
	* @since 4.13.0
	* @category Util
	* @returns {boolean} Returns `false`.
	* @example
	*
	* _.times(2, _.stubFalse);
	* // => [false, false]
	*/
	function stubFalse() {
		return false;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js
	/** Detect free variable `exports`. */
	var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
	/** Detect free variable `module`. */
	var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
	/** Built-in value references. */
	var Buffer$2 = freeModule$2 && freeModule$2.exports === freeExports$2 ? root$2.Buffer : void 0;
	/**
	* Checks if `value` is a buffer.
	*
	* @static
	* @memberOf _
	* @since 4.3.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
	* @example
	*
	* _.isBuffer(new Buffer(2));
	* // => true
	*
	* _.isBuffer(new Uint8Array(2));
	* // => false
	*/
	var isBuffer = (Buffer$2 ? Buffer$2.isBuffer : void 0) || stubFalse;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js
	/** Used as references for various `Number` constants. */
	var MAX_SAFE_INTEGER$1 = 9007199254740991;
	/** Used to detect unsigned integer values. */
	var reIsUint = /^(?:0|[1-9]\d*)$/;
	/**
	* Checks if `value` is a valid array-like index.
	*
	* @private
	* @param {*} value The value to check.
	* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
	* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
	*/
	function isIndex(value, length) {
		var type = typeof value;
		length = length == null ? MAX_SAFE_INTEGER$1 : length;
		return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isLength.js
	/** Used as references for various `Number` constants. */
	var MAX_SAFE_INTEGER = 9007199254740991;
	/**
	* Checks if `value` is a valid array-like length.
	*
	* **Note:** This method is loosely based on
	* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
	*
	* @static
	* @memberOf _
	* @since 4.0.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
	* @example
	*
	* _.isLength(3);
	* // => true
	*
	* _.isLength(Number.MIN_VALUE);
	* // => false
	*
	* _.isLength(Infinity);
	* // => false
	*
	* _.isLength('3');
	* // => false
	*/
	function isLength(value) {
		return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js
	/** `Object#toString` result references. */
	var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", objectTag$4 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]";
	var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
	/** Used to identify `toStringTag` values of typed arrays. */
	var typedArrayTags = {};
	typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
	typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$5] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$5] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;
	/**
	* The base implementation of `_.isTypedArray` without Node.js optimizations.
	*
	* @private
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
	*/
	function baseIsTypedArray(value) {
		return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js
	/**
	* The base implementation of `_.unary` without support for storing metadata.
	*
	* @private
	* @param {Function} func The function to cap arguments for.
	* @returns {Function} Returns the new capped function.
	*/
	function baseUnary(func) {
		return function(value) {
			return func(value);
		};
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js
	/** Detect free variable `exports`. */
	var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
	/** Detect free variable `module`. */
	var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
	/** Detect free variable `process` from Node.js. */
	var freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && freeGlobal.process;
	/** Used to access faster Node.js helpers. */
	var nodeUtil = function() {
		try {
			var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
			if (types) return types;
			return freeProcess && freeProcess.binding && freeProcess.binding("util");
		} catch (e) {}
	}();
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js
	var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
	/**
	* Checks if `value` is classified as a typed array.
	*
	* @static
	* @memberOf _
	* @since 3.0.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
	* @example
	*
	* _.isTypedArray(new Uint8Array);
	* // => true
	*
	* _.isTypedArray([]);
	* // => false
	*/
	var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js
	/** Used to check objects for own properties. */
	var hasOwnProperty$6 = Object.prototype.hasOwnProperty;
	/**
	* Creates an array of the enumerable property names of the array-like `value`.
	*
	* @private
	* @param {*} value The value to query.
	* @param {boolean} inherited Specify returning inherited property names.
	* @returns {Array} Returns the array of property names.
	*/
	function arrayLikeKeys(value, inherited) {
		var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
		for (var key in value) if ((inherited || hasOwnProperty$6.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) result.push(key);
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js
	/** Used for built-in method references. */
	var objectProto$1 = Object.prototype;
	/**
	* Checks if `value` is likely a prototype object.
	*
	* @private
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
	*/
	function isPrototype(value) {
		var Ctor = value && value.constructor;
		return value === (typeof Ctor == "function" && Ctor.prototype || objectProto$1);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js
	/**
	* Creates a unary function that invokes `func` with its argument transformed.
	*
	* @private
	* @param {Function} func The function to wrap.
	* @param {Function} transform The argument transform.
	* @returns {Function} Returns the new function.
	*/
	function overArg(func, transform) {
		return function(arg) {
			return func(transform(arg));
		};
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js
	var nativeKeys = overArg(Object.keys, Object);
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js
	/** Used to check objects for own properties. */
	var hasOwnProperty$5 = Object.prototype.hasOwnProperty;
	/**
	* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
	*
	* @private
	* @param {Object} object The object to query.
	* @returns {Array} Returns the array of property names.
	*/
	function baseKeys(object) {
		if (!isPrototype(object)) return nativeKeys(object);
		var result = [];
		for (var key in Object(object)) if (hasOwnProperty$5.call(object, key) && key != "constructor") result.push(key);
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js
	/**
	* Checks if `value` is array-like. A value is considered array-like if it's
	* not a function and has a `value.length` that's an integer greater than or
	* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
	*
	* @static
	* @memberOf _
	* @since 4.0.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
	* @example
	*
	* _.isArrayLike([1, 2, 3]);
	* // => true
	*
	* _.isArrayLike(document.body.children);
	* // => true
	*
	* _.isArrayLike('abc');
	* // => true
	*
	* _.isArrayLike(_.noop);
	* // => false
	*/
	function isArrayLike(value) {
		return value != null && isLength(value.length) && !isFunction(value);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/keys.js
	/**
	* Creates an array of the own enumerable property names of `object`.
	*
	* **Note:** Non-object values are coerced to objects. See the
	* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
	* for more details.
	*
	* @static
	* @since 0.1.0
	* @memberOf _
	* @category Object
	* @param {Object} object The object to query.
	* @returns {Array} Returns the array of property names.
	* @example
	*
	* function Foo() {
	*   this.a = 1;
	*   this.b = 2;
	* }
	*
	* Foo.prototype.c = 3;
	*
	* _.keys(new Foo);
	* // => ['a', 'b'] (iteration order is not guaranteed)
	*
	* _.keys('hi');
	* // => ['0', '1']
	*/
	function keys$1(object) {
		return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js
	/**
	* The base implementation of `_.assign` without support for multiple sources
	* or `customizer` functions.
	*
	* @private
	* @param {Object} object The destination object.
	* @param {Object} source The source object.
	* @returns {Object} Returns `object`.
	*/
	function baseAssign(object, source) {
		return object && copyObject(source, keys$1(source), object);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js
	/**
	* This function is like
	* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
	* except that it includes inherited enumerable properties.
	*
	* @private
	* @param {Object} object The object to query.
	* @returns {Array} Returns the array of property names.
	*/
	function nativeKeysIn(object) {
		var result = [];
		if (object != null) for (var key in Object(object)) result.push(key);
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js
	/** Used to check objects for own properties. */
	var hasOwnProperty$4 = Object.prototype.hasOwnProperty;
	/**
	* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
	*
	* @private
	* @param {Object} object The object to query.
	* @returns {Array} Returns the array of property names.
	*/
	function baseKeysIn(object) {
		if (!isObject(object)) return nativeKeysIn(object);
		var isProto = isPrototype(object), result = [];
		for (var key in object) if (!(key == "constructor" && (isProto || !hasOwnProperty$4.call(object, key)))) result.push(key);
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js
	/**
	* Creates an array of the own and inherited enumerable property names of `object`.
	*
	* **Note:** Non-object values are coerced to objects.
	*
	* @static
	* @memberOf _
	* @since 3.0.0
	* @category Object
	* @param {Object} object The object to query.
	* @returns {Array} Returns the array of property names.
	* @example
	*
	* function Foo() {
	*   this.a = 1;
	*   this.b = 2;
	* }
	*
	* Foo.prototype.c = 3;
	*
	* _.keysIn(new Foo);
	* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
	*/
	function keysIn(object) {
		return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js
	/**
	* The base implementation of `_.assignIn` without support for multiple sources
	* or `customizer` functions.
	*
	* @private
	* @param {Object} object The destination object.
	* @param {Object} source The source object.
	* @returns {Object} Returns `object`.
	*/
	function baseAssignIn(object, source) {
		return object && copyObject(source, keysIn(source), object);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js
	/** Detect free variable `exports`. */
	var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
	/** Detect free variable `module`. */
	var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
	/** Built-in value references. */
	var Buffer$1 = freeModule && freeModule.exports === freeExports ? root$2.Buffer : void 0, allocUnsafe = Buffer$1 ? Buffer$1.allocUnsafe : void 0;
	/**
	* Creates a clone of  `buffer`.
	*
	* @private
	* @param {Buffer} buffer The buffer to clone.
	* @param {boolean} [isDeep] Specify a deep clone.
	* @returns {Buffer} Returns the cloned buffer.
	*/
	function cloneBuffer(buffer, isDeep) {
		if (isDeep) return buffer.slice();
		var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
		buffer.copy(result);
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js
	/**
	* Copies the values of `source` to `array`.
	*
	* @private
	* @param {Array} source The array to copy values from.
	* @param {Array} [array=[]] The array to copy values to.
	* @returns {Array} Returns `array`.
	*/
	function copyArray(source, array) {
		var index = -1, length = source.length;
		array || (array = Array(length));
		while (++index < length) array[index] = source[index];
		return array;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js
	/**
	* A specialized version of `_.filter` for arrays without support for
	* iteratee shorthands.
	*
	* @private
	* @param {Array} [array] The array to iterate over.
	* @param {Function} predicate The function invoked per iteration.
	* @returns {Array} Returns the new filtered array.
	*/
	function arrayFilter(array, predicate) {
		var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
		while (++index < length) {
			var value = array[index];
			if (predicate(value, index, array)) result[resIndex++] = value;
		}
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js
	/**
	* This method returns a new empty array.
	*
	* @static
	* @memberOf _
	* @since 4.13.0
	* @category Util
	* @returns {Array} Returns the new empty array.
	* @example
	*
	* var arrays = _.times(2, _.stubArray);
	*
	* console.log(arrays);
	* // => [[], []]
	*
	* console.log(arrays[0] === arrays[1]);
	* // => false
	*/
	function stubArray() {
		return [];
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js
	/** Built-in value references. */
	var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
	var nativeGetSymbols = Object.getOwnPropertySymbols;
	/**
	* Creates an array of the own enumerable symbols of `object`.
	*
	* @private
	* @param {Object} object The object to query.
	* @returns {Array} Returns the array of symbols.
	*/
	var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
		if (object == null) return [];
		object = Object(object);
		return arrayFilter(nativeGetSymbols(object), function(symbol) {
			return propertyIsEnumerable.call(object, symbol);
		});
	};
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js
	/**
	* Copies own symbols of `source` to `object`.
	*
	* @private
	* @param {Object} source The object to copy symbols from.
	* @param {Object} [object={}] The object to copy symbols to.
	* @returns {Object} Returns `object`.
	*/
	function copySymbols(source, object) {
		return copyObject(source, getSymbols(source), object);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js
	/**
	* Appends the elements of `values` to `array`.
	*
	* @private
	* @param {Array} array The array to modify.
	* @param {Array} values The values to append.
	* @returns {Array} Returns `array`.
	*/
	function arrayPush(array, values) {
		var index = -1, length = values.length, offset = array.length;
		while (++index < length) array[offset + index] = values[index];
		return array;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js
	/** Built-in value references. */
	var getPrototype = overArg(Object.getPrototypeOf, Object);
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js
	/**
	* Creates an array of the own and inherited enumerable symbols of `object`.
	*
	* @private
	* @param {Object} object The object to query.
	* @returns {Array} Returns the array of symbols.
	*/
	var getSymbolsIn = !Object.getOwnPropertySymbols ? stubArray : function(object) {
		var result = [];
		while (object) {
			arrayPush(result, getSymbols(object));
			object = getPrototype(object);
		}
		return result;
	};
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js
	/**
	* Copies own and inherited symbols of `source` to `object`.
	*
	* @private
	* @param {Object} source The object to copy symbols from.
	* @param {Object} [object={}] The object to copy symbols to.
	* @returns {Object} Returns `object`.
	*/
	function copySymbolsIn(source, object) {
		return copyObject(source, getSymbolsIn(source), object);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js
	/**
	* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
	* `keysFunc` and `symbolsFunc` to get the enumerable property names and
	* symbols of `object`.
	*
	* @private
	* @param {Object} object The object to query.
	* @param {Function} keysFunc The function to get the keys of `object`.
	* @param {Function} symbolsFunc The function to get the symbols of `object`.
	* @returns {Array} Returns the array of property names and symbols.
	*/
	function baseGetAllKeys(object, keysFunc, symbolsFunc) {
		var result = keysFunc(object);
		return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js
	/**
	* Creates an array of own enumerable property names and symbols of `object`.
	*
	* @private
	* @param {Object} object The object to query.
	* @returns {Array} Returns the array of property names and symbols.
	*/
	function getAllKeys(object) {
		return baseGetAllKeys(object, keys$1, getSymbols);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js
	/**
	* Creates an array of own and inherited enumerable property names and
	* symbols of `object`.
	*
	* @private
	* @param {Object} object The object to query.
	* @returns {Array} Returns the array of property names and symbols.
	*/
	function getAllKeysIn(object) {
		return baseGetAllKeys(object, keysIn, getSymbolsIn);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js
	var DataView$1 = getNative(root$2, "DataView");
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js
	var Promise$1 = getNative(root$2, "Promise");
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Set.js
	var Set$1 = getNative(root$2, "Set");
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js
	var WeakMap$1 = getNative(root$2, "WeakMap");
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js
	/** `Object#toString` result references. */
	var mapTag$4 = "[object Map]", objectTag$3 = "[object Object]", promiseTag = "[object Promise]", setTag$4 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
	var dataViewTag$3 = "[object DataView]";
	/** Used to detect maps, sets, and weakmaps. */
	var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
	/**
	* Gets the `toStringTag` of `value`.
	*
	* @private
	* @param {*} value The value to query.
	* @returns {string} Returns the `toStringTag`.
	*/
	var getTag = baseGetTag;
	if (DataView$1 && getTag(new DataView$1(/* @__PURE__ */ new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1()) != mapTag$4 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$4 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1) getTag = function(value) {
		var result = baseGetTag(value), Ctor = result == objectTag$3 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
		if (ctorString) switch (ctorString) {
			case dataViewCtorString: return dataViewTag$3;
			case mapCtorString: return mapTag$4;
			case promiseCtorString: return promiseTag;
			case setCtorString: return setTag$4;
			case weakMapCtorString: return weakMapTag$1;
		}
		return result;
	};
	var _getTag_default = getTag;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js
	/** Used to check objects for own properties. */
	var hasOwnProperty$3 = Object.prototype.hasOwnProperty;
	/**
	* Initializes an array clone.
	*
	* @private
	* @param {Array} array The array to clone.
	* @returns {Array} Returns the initialized clone.
	*/
	function initCloneArray(array) {
		var length = array.length, result = new array.constructor(length);
		if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
			result.index = array.index;
			result.input = array.input;
		}
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js
	/** Built-in value references. */
	var Uint8Array$1 = root$2.Uint8Array;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js
	/**
	* Creates a clone of `arrayBuffer`.
	*
	* @private
	* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
	* @returns {ArrayBuffer} Returns the cloned array buffer.
	*/
	function cloneArrayBuffer(arrayBuffer) {
		var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
		new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js
	/**
	* Creates a clone of `dataView`.
	*
	* @private
	* @param {Object} dataView The data view to clone.
	* @param {boolean} [isDeep] Specify a deep clone.
	* @returns {Object} Returns the cloned data view.
	*/
	function cloneDataView(dataView, isDeep) {
		var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
		return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js
	/** Used to match `RegExp` flags from their coerced string values. */
	var reFlags = /\w*$/;
	/**
	* Creates a clone of `regexp`.
	*
	* @private
	* @param {Object} regexp The regexp to clone.
	* @returns {Object} Returns the cloned regexp.
	*/
	function cloneRegExp(regexp) {
		var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
		result.lastIndex = regexp.lastIndex;
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js
	/** Used to convert symbols to primitives and strings. */
	var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
	/**
	* Creates a clone of the `symbol` object.
	*
	* @private
	* @param {Object} symbol The symbol object to clone.
	* @returns {Object} Returns the cloned symbol object.
	*/
	function cloneSymbol(symbol) {
		return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js
	/**
	* Creates a clone of `typedArray`.
	*
	* @private
	* @param {Object} typedArray The typed array to clone.
	* @param {boolean} [isDeep] Specify a deep clone.
	* @returns {Object} Returns the cloned typed array.
	*/
	function cloneTypedArray(typedArray, isDeep) {
		var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
		return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js
	/** `Object#toString` result references. */
	var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$2 = "[object Symbol]";
	var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
	/**
	* Initializes an object clone based on its `toStringTag`.
	*
	* **Note:** This function only supports cloning values with tags of
	* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
	*
	* @private
	* @param {Object} object The object to clone.
	* @param {string} tag The `toStringTag` of the object to clone.
	* @param {boolean} [isDeep] Specify a deep clone.
	* @returns {Object} Returns the initialized clone.
	*/
	function initCloneByTag(object, tag, isDeep) {
		var Ctor = object.constructor;
		switch (tag) {
			case arrayBufferTag$2: return cloneArrayBuffer(object);
			case boolTag$2:
			case dateTag$2: return new Ctor(+object);
			case dataViewTag$2: return cloneDataView(object, isDeep);
			case float32Tag$1:
			case float64Tag$1:
			case int8Tag$1:
			case int16Tag$1:
			case int32Tag$1:
			case uint8Tag$1:
			case uint8ClampedTag$1:
			case uint16Tag$1:
			case uint32Tag$1: return cloneTypedArray(object, isDeep);
			case mapTag$3: return new Ctor();
			case numberTag$2:
			case stringTag$2: return new Ctor(object);
			case regexpTag$2: return cloneRegExp(object);
			case setTag$3: return new Ctor();
			case symbolTag$2: return cloneSymbol(object);
		}
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js
	/** Built-in value references. */
	var objectCreate = Object.create;
	/**
	* The base implementation of `_.create` without support for assigning
	* properties to the created object.
	*
	* @private
	* @param {Object} proto The object to inherit from.
	* @returns {Object} Returns the new object.
	*/
	var baseCreate = function() {
		function object() {}
		return function(proto) {
			if (!isObject(proto)) return {};
			if (objectCreate) return objectCreate(proto);
			object.prototype = proto;
			var result = new object();
			object.prototype = void 0;
			return result;
		};
	}();
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js
	/**
	* Initializes an object clone.
	*
	* @private
	* @param {Object} object The object to clone.
	* @returns {Object} Returns the initialized clone.
	*/
	function initCloneObject(object) {
		return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js
	/** `Object#toString` result references. */
	var mapTag$2 = "[object Map]";
	/**
	* The base implementation of `_.isMap` without Node.js optimizations.
	*
	* @private
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a map, else `false`.
	*/
	function baseIsMap(value) {
		return isObjectLike(value) && _getTag_default(value) == mapTag$2;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isMap.js
	var nodeIsMap = nodeUtil && nodeUtil.isMap;
	/**
	* Checks if `value` is classified as a `Map` object.
	*
	* @static
	* @memberOf _
	* @since 4.3.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a map, else `false`.
	* @example
	*
	* _.isMap(new Map);
	* // => true
	*
	* _.isMap(new WeakMap);
	* // => false
	*/
	var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js
	/** `Object#toString` result references. */
	var setTag$2 = "[object Set]";
	/**
	* The base implementation of `_.isSet` without Node.js optimizations.
	*
	* @private
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a set, else `false`.
	*/
	function baseIsSet(value) {
		return isObjectLike(value) && _getTag_default(value) == setTag$2;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isSet.js
	var nodeIsSet = nodeUtil && nodeUtil.isSet;
	/**
	* Checks if `value` is classified as a `Set` object.
	*
	* @static
	* @memberOf _
	* @since 4.3.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a set, else `false`.
	* @example
	*
	* _.isSet(new Set);
	* // => true
	*
	* _.isSet(new WeakSet);
	* // => false
	*/
	var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js
	/** Used to compose bitmasks for cloning. */
	var CLONE_DEEP_FLAG$1 = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4;
	/** `Object#toString` result references. */
	var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$2 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
	var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
	/** Used to identify `toStringTag` values supported by `_.clone`. */
	var cloneableTags = {};
	cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$2] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
	cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
	/**
	* The base implementation of `_.clone` and `_.cloneDeep` which tracks
	* traversed objects.
	*
	* @private
	* @param {*} value The value to clone.
	* @param {boolean} bitmask The bitmask flags.
	*  1 - Deep clone
	*  2 - Flatten inherited properties
	*  4 - Clone symbols
	* @param {Function} [customizer] The function to customize cloning.
	* @param {string} [key] The key of `value`.
	* @param {Object} [object] The parent object of `value`.
	* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
	* @returns {*} Returns the cloned value.
	*/
	function baseClone(value, bitmask, customizer, key, object, stack) {
		var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
		if (customizer) result = object ? customizer(value, key, object, stack) : customizer(value);
		if (result !== void 0) return result;
		if (!isObject(value)) return value;
		var isArr = isArray(value);
		if (isArr) {
			result = initCloneArray(value);
			if (!isDeep) return copyArray(value, result);
		} else {
			var tag = _getTag_default(value), isFunc = tag == funcTag || tag == genTag;
			if (isBuffer(value)) return cloneBuffer(value, isDeep);
			if (tag == objectTag$2 || tag == argsTag$1 || isFunc && !object) {
				result = isFlat || isFunc ? {} : initCloneObject(value);
				if (!isDeep) return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
			} else {
				if (!cloneableTags[tag]) return object ? value : {};
				result = initCloneByTag(value, tag, isDeep);
			}
		}
		stack || (stack = new Stack());
		var stacked = stack.get(value);
		if (stacked) return stacked;
		stack.set(value, result);
		if (isSet(value)) value.forEach(function(subValue) {
			result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
		});
		else if (isMap(value)) value.forEach(function(subValue, key) {
			result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
		});
		var props = isArr ? void 0 : (isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys$1)(value);
		arrayEach(props || value, function(subValue, key) {
			if (props) {
				key = subValue;
				subValue = value[key];
			}
			assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
		});
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js
	/** Used to compose bitmasks for cloning. */
	var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4;
	/**
	* This method is like `_.clone` except that it recursively clones `value`.
	*
	* @static
	* @memberOf _
	* @since 1.0.0
	* @category Lang
	* @param {*} value The value to recursively clone.
	* @returns {*} Returns the deep cloned value.
	* @see _.clone
	* @example
	*
	* var objects = [{ 'a': 1 }, { 'b': 2 }];
	*
	* var deep = _.cloneDeep(objects);
	* console.log(deep[0] === objects[0]);
	* // => false
	*/
	function cloneDeep(value) {
		return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
	}
	//#endregion
	//#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
	var util;
	(function(util) {
		util.assertEqual = (_) => {};
		function assertIs(_arg) {}
		util.assertIs = assertIs;
		function assertNever(_x) {
			throw new Error();
		}
		util.assertNever = assertNever;
		util.arrayToEnum = (items) => {
			const obj = {};
			for (const item of items) obj[item] = item;
			return obj;
		};
		util.getValidEnumValues = (obj) => {
			const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
			const filtered = {};
			for (const k of validKeys) filtered[k] = obj[k];
			return util.objectValues(filtered);
		};
		util.objectValues = (obj) => {
			return util.objectKeys(obj).map(function(e) {
				return obj[e];
			});
		};
		util.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
			const keys = [];
			for (const key in object) if (Object.prototype.hasOwnProperty.call(object, key)) keys.push(key);
			return keys;
		};
		util.find = (arr, checker) => {
			for (const item of arr) if (checker(item)) return item;
		};
		util.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
		function joinValues(array, separator = " | ") {
			return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
		}
		util.joinValues = joinValues;
		util.jsonStringifyReplacer = (_, value) => {
			if (typeof value === "bigint") return value.toString();
			return value;
		};
	})(util || (util = {}));
	var objectUtil;
	(function(objectUtil) {
		objectUtil.mergeShapes = (first, second) => {
			return {
				...first,
				...second
			};
		};
	})(objectUtil || (objectUtil = {}));
	var ZodParsedType = util.arrayToEnum([
		"string",
		"nan",
		"number",
		"integer",
		"float",
		"boolean",
		"date",
		"bigint",
		"symbol",
		"function",
		"undefined",
		"null",
		"array",
		"object",
		"unknown",
		"promise",
		"void",
		"never",
		"map",
		"set"
	]);
	var getParsedType = (data) => {
		switch (typeof data) {
			case "undefined": return ZodParsedType.undefined;
			case "string": return ZodParsedType.string;
			case "number": return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
			case "boolean": return ZodParsedType.boolean;
			case "function": return ZodParsedType.function;
			case "bigint": return ZodParsedType.bigint;
			case "symbol": return ZodParsedType.symbol;
			case "object":
				if (Array.isArray(data)) return ZodParsedType.array;
				if (data === null) return ZodParsedType.null;
				if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") return ZodParsedType.promise;
				if (typeof Map !== "undefined" && data instanceof Map) return ZodParsedType.map;
				if (typeof Set !== "undefined" && data instanceof Set) return ZodParsedType.set;
				if (typeof Date !== "undefined" && data instanceof Date) return ZodParsedType.date;
				return ZodParsedType.object;
			default: return ZodParsedType.unknown;
		}
	};
	//#endregion
	//#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js
	var ZodIssueCode = util.arrayToEnum([
		"invalid_type",
		"invalid_literal",
		"custom",
		"invalid_union",
		"invalid_union_discriminator",
		"invalid_enum_value",
		"unrecognized_keys",
		"invalid_arguments",
		"invalid_return_type",
		"invalid_date",
		"invalid_string",
		"too_small",
		"too_big",
		"invalid_intersection_types",
		"not_multiple_of",
		"not_finite"
	]);
	var ZodError = class ZodError extends Error {
		get errors() {
			return this.issues;
		}
		constructor(issues) {
			super();
			this.issues = [];
			this.addIssue = (sub) => {
				this.issues = [...this.issues, sub];
			};
			this.addIssues = (subs = []) => {
				this.issues = [...this.issues, ...subs];
			};
			const actualProto = new.target.prototype;
			if (Object.setPrototypeOf) Object.setPrototypeOf(this, actualProto);
			else this.__proto__ = actualProto;
			this.name = "ZodError";
			this.issues = issues;
		}
		format(_mapper) {
			const mapper = _mapper || function(issue) {
				return issue.message;
			};
			const fieldErrors = { _errors: [] };
			const processError = (error) => {
				for (const issue of error.issues) if (issue.code === "invalid_union") issue.unionErrors.map(processError);
				else if (issue.code === "invalid_return_type") processError(issue.returnTypeError);
				else if (issue.code === "invalid_arguments") processError(issue.argumentsError);
				else if (issue.path.length === 0) fieldErrors._errors.push(mapper(issue));
				else {
					let curr = fieldErrors;
					let i = 0;
					while (i < issue.path.length) {
						const el = issue.path[i];
						if (!(i === issue.path.length - 1)) curr[el] = curr[el] || { _errors: [] };
						else {
							curr[el] = curr[el] || { _errors: [] };
							curr[el]._errors.push(mapper(issue));
						}
						curr = curr[el];
						i++;
					}
				}
			};
			processError(this);
			return fieldErrors;
		}
		static assert(value) {
			if (!(value instanceof ZodError)) throw new Error(`Not a ZodError: ${value}`);
		}
		toString() {
			return this.message;
		}
		get message() {
			return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);
		}
		get isEmpty() {
			return this.issues.length === 0;
		}
		flatten(mapper = (issue) => issue.message) {
			const fieldErrors = {};
			const formErrors = [];
			for (const sub of this.issues) if (sub.path.length > 0) {
				const firstEl = sub.path[0];
				fieldErrors[firstEl] = fieldErrors[firstEl] || [];
				fieldErrors[firstEl].push(mapper(sub));
			} else formErrors.push(mapper(sub));
			return {
				formErrors,
				fieldErrors
			};
		}
		get formErrors() {
			return this.flatten();
		}
	};
	ZodError.create = (issues) => {
		return new ZodError(issues);
	};
	//#endregion
	//#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js
	var errorMap = (issue, _ctx) => {
		let message;
		switch (issue.code) {
			case ZodIssueCode.invalid_type:
				if (issue.received === ZodParsedType.undefined) message = "Required";
				else message = `Expected ${issue.expected}, received ${issue.received}`;
				break;
			case ZodIssueCode.invalid_literal:
				message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;
				break;
			case ZodIssueCode.unrecognized_keys:
				message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`;
				break;
			case ZodIssueCode.invalid_union:
				message = `Invalid input`;
				break;
			case ZodIssueCode.invalid_union_discriminator:
				message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;
				break;
			case ZodIssueCode.invalid_enum_value:
				message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;
				break;
			case ZodIssueCode.invalid_arguments:
				message = `Invalid function arguments`;
				break;
			case ZodIssueCode.invalid_return_type:
				message = `Invalid function return type`;
				break;
			case ZodIssueCode.invalid_date:
				message = `Invalid date`;
				break;
			case ZodIssueCode.invalid_string:
				if (typeof issue.validation === "object") if ("includes" in issue.validation) {
					message = `Invalid input: must include "${issue.validation.includes}"`;
					if (typeof issue.validation.position === "number") message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
				} else if ("startsWith" in issue.validation) message = `Invalid input: must start with "${issue.validation.startsWith}"`;
				else if ("endsWith" in issue.validation) message = `Invalid input: must end with "${issue.validation.endsWith}"`;
				else util.assertNever(issue.validation);
				else if (issue.validation !== "regex") message = `Invalid ${issue.validation}`;
				else message = "Invalid";
				break;
			case ZodIssueCode.too_small:
				if (issue.type === "array") message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
				else if (issue.type === "string") message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
				else if (issue.type === "number") message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
				else if (issue.type === "bigint") message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
				else if (issue.type === "date") message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
				else message = "Invalid input";
				break;
			case ZodIssueCode.too_big:
				if (issue.type === "array") message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
				else if (issue.type === "string") message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
				else if (issue.type === "number") message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
				else if (issue.type === "bigint") message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
				else if (issue.type === "date") message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;
				else message = "Invalid input";
				break;
			case ZodIssueCode.custom:
				message = `Invalid input`;
				break;
			case ZodIssueCode.invalid_intersection_types:
				message = `Intersection results could not be merged`;
				break;
			case ZodIssueCode.not_multiple_of:
				message = `Number must be a multiple of ${issue.multipleOf}`;
				break;
			case ZodIssueCode.not_finite:
				message = "Number must be finite";
				break;
			default:
				message = _ctx.defaultError;
				util.assertNever(issue);
		}
		return { message };
	};
	//#endregion
	//#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js
	var overrideErrorMap = errorMap;
	function getErrorMap() {
		return overrideErrorMap;
	}
	//#endregion
	//#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
	var makeIssue = (params) => {
		const { data, path, errorMaps, issueData } = params;
		const fullPath = [...path, ...issueData.path || []];
		const fullIssue = {
			...issueData,
			path: fullPath
		};
		if (issueData.message !== void 0) return {
			...issueData,
			path: fullPath,
			message: issueData.message
		};
		let errorMessage = "";
		const maps = errorMaps.filter((m) => !!m).slice().reverse();
		for (const map of maps) errorMessage = map(fullIssue, {
			data,
			defaultError: errorMessage
		}).message;
		return {
			...issueData,
			path: fullPath,
			message: errorMessage
		};
	};
	function addIssueToContext(ctx, issueData) {
		const overrideMap = getErrorMap();
		const issue = makeIssue({
			issueData,
			data: ctx.data,
			path: ctx.path,
			errorMaps: [
				ctx.common.contextualErrorMap,
				ctx.schemaErrorMap,
				overrideMap,
				overrideMap === errorMap ? void 0 : errorMap
			].filter((x) => !!x)
		});
		ctx.common.issues.push(issue);
	}
	var ParseStatus = class ParseStatus {
		constructor() {
			this.value = "valid";
		}
		dirty() {
			if (this.value === "valid") this.value = "dirty";
		}
		abort() {
			if (this.value !== "aborted") this.value = "aborted";
		}
		static mergeArray(status, results) {
			const arrayValue = [];
			for (const s of results) {
				if (s.status === "aborted") return INVALID;
				if (s.status === "dirty") status.dirty();
				arrayValue.push(s.value);
			}
			return {
				status: status.value,
				value: arrayValue
			};
		}
		static async mergeObjectAsync(status, pairs) {
			const syncPairs = [];
			for (const pair of pairs) {
				const key = await pair.key;
				const value = await pair.value;
				syncPairs.push({
					key,
					value
				});
			}
			return ParseStatus.mergeObjectSync(status, syncPairs);
		}
		static mergeObjectSync(status, pairs) {
			const finalObject = {};
			for (const pair of pairs) {
				const { key, value } = pair;
				if (key.status === "aborted") return INVALID;
				if (value.status === "aborted") return INVALID;
				if (key.status === "dirty") status.dirty();
				if (value.status === "dirty") status.dirty();
				if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) finalObject[key.value] = value.value;
			}
			return {
				status: status.value,
				value: finalObject
			};
		}
	};
	var INVALID = Object.freeze({ status: "aborted" });
	var DIRTY = (value) => ({
		status: "dirty",
		value
	});
	var OK = (value) => ({
		status: "valid",
		value
	});
	var isAborted = (x) => x.status === "aborted";
	var isDirty = (x) => x.status === "dirty";
	var isValid = (x) => x.status === "valid";
	var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
	//#endregion
	//#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
	var errorUtil;
	(function(errorUtil) {
		errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
		errorUtil.toString = (message) => typeof message === "string" ? message : message?.message;
	})(errorUtil || (errorUtil = {}));
	//#endregion
	//#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
	var ParseInputLazyPath = class {
		constructor(parent, value, path, key) {
			this._cachedPath = [];
			this.parent = parent;
			this.data = value;
			this._path = path;
			this._key = key;
		}
		get path() {
			if (!this._cachedPath.length) if (Array.isArray(this._key)) this._cachedPath.push(...this._path, ...this._key);
			else this._cachedPath.push(...this._path, this._key);
			return this._cachedPath;
		}
	};
	var handleResult = (ctx, result) => {
		if (isValid(result)) return {
			success: true,
			data: result.value
		};
		else {
			if (!ctx.common.issues.length) throw new Error("Validation failed but no issues detected.");
			return {
				success: false,
				get error() {
					if (this._error) return this._error;
					const error = new ZodError(ctx.common.issues);
					this._error = error;
					return this._error;
				}
			};
		}
	};
	function processCreateParams(params) {
		if (!params) return {};
		const { errorMap, invalid_type_error, required_error, description } = params;
		if (errorMap && (invalid_type_error || required_error)) throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
		if (errorMap) return {
			errorMap,
			description
		};
		const customMap = (iss, ctx) => {
			const { message } = params;
			if (iss.code === "invalid_enum_value") return { message: message ?? ctx.defaultError };
			if (typeof ctx.data === "undefined") return { message: message ?? required_error ?? ctx.defaultError };
			if (iss.code !== "invalid_type") return { message: ctx.defaultError };
			return { message: message ?? invalid_type_error ?? ctx.defaultError };
		};
		return {
			errorMap: customMap,
			description
		};
	}
	var ZodType = class {
		get description() {
			return this._def.description;
		}
		_getType(input) {
			return getParsedType(input.data);
		}
		_getOrReturnCtx(input, ctx) {
			return ctx || {
				common: input.parent.common,
				data: input.data,
				parsedType: getParsedType(input.data),
				schemaErrorMap: this._def.errorMap,
				path: input.path,
				parent: input.parent
			};
		}
		_processInputParams(input) {
			return {
				status: new ParseStatus(),
				ctx: {
					common: input.parent.common,
					data: input.data,
					parsedType: getParsedType(input.data),
					schemaErrorMap: this._def.errorMap,
					path: input.path,
					parent: input.parent
				}
			};
		}
		_parseSync(input) {
			const result = this._parse(input);
			if (isAsync(result)) throw new Error("Synchronous parse encountered promise.");
			return result;
		}
		_parseAsync(input) {
			const result = this._parse(input);
			return Promise.resolve(result);
		}
		parse(data, params) {
			const result = this.safeParse(data, params);
			if (result.success) return result.data;
			throw result.error;
		}
		safeParse(data, params) {
			const ctx = {
				common: {
					issues: [],
					async: params?.async ?? false,
					contextualErrorMap: params?.errorMap
				},
				path: params?.path || [],
				schemaErrorMap: this._def.errorMap,
				parent: null,
				data,
				parsedType: getParsedType(data)
			};
			return handleResult(ctx, this._parseSync({
				data,
				path: ctx.path,
				parent: ctx
			}));
		}
		"~validate"(data) {
			const ctx = {
				common: {
					issues: [],
					async: !!this["~standard"].async
				},
				path: [],
				schemaErrorMap: this._def.errorMap,
				parent: null,
				data,
				parsedType: getParsedType(data)
			};
			if (!this["~standard"].async) try {
				const result = this._parseSync({
					data,
					path: [],
					parent: ctx
				});
				return isValid(result) ? { value: result.value } : { issues: ctx.common.issues };
			} catch (err) {
				if (err?.message?.toLowerCase()?.includes("encountered")) this["~standard"].async = true;
				ctx.common = {
					issues: [],
					async: true
				};
			}
			return this._parseAsync({
				data,
				path: [],
				parent: ctx
			}).then((result) => isValid(result) ? { value: result.value } : { issues: ctx.common.issues });
		}
		async parseAsync(data, params) {
			const result = await this.safeParseAsync(data, params);
			if (result.success) return result.data;
			throw result.error;
		}
		async safeParseAsync(data, params) {
			const ctx = {
				common: {
					issues: [],
					contextualErrorMap: params?.errorMap,
					async: true
				},
				path: params?.path || [],
				schemaErrorMap: this._def.errorMap,
				parent: null,
				data,
				parsedType: getParsedType(data)
			};
			const maybeAsyncResult = this._parse({
				data,
				path: ctx.path,
				parent: ctx
			});
			return handleResult(ctx, await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)));
		}
		refine(check, message) {
			const getIssueProperties = (val) => {
				if (typeof message === "string" || typeof message === "undefined") return { message };
				else if (typeof message === "function") return message(val);
				else return message;
			};
			return this._refinement((val, ctx) => {
				const result = check(val);
				const setError = () => ctx.addIssue({
					code: ZodIssueCode.custom,
					...getIssueProperties(val)
				});
				if (typeof Promise !== "undefined" && result instanceof Promise) return result.then((data) => {
					if (!data) {
						setError();
						return false;
					} else return true;
				});
				if (!result) {
					setError();
					return false;
				} else return true;
			});
		}
		refinement(check, refinementData) {
			return this._refinement((val, ctx) => {
				if (!check(val)) {
					ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData);
					return false;
				} else return true;
			});
		}
		_refinement(refinement) {
			return new ZodEffects({
				schema: this,
				typeName: ZodFirstPartyTypeKind.ZodEffects,
				effect: {
					type: "refinement",
					refinement
				}
			});
		}
		superRefine(refinement) {
			return this._refinement(refinement);
		}
		constructor(def) {
			/** Alias of safeParseAsync */
			this.spa = this.safeParseAsync;
			this._def = def;
			this.parse = this.parse.bind(this);
			this.safeParse = this.safeParse.bind(this);
			this.parseAsync = this.parseAsync.bind(this);
			this.safeParseAsync = this.safeParseAsync.bind(this);
			this.spa = this.spa.bind(this);
			this.refine = this.refine.bind(this);
			this.refinement = this.refinement.bind(this);
			this.superRefine = this.superRefine.bind(this);
			this.optional = this.optional.bind(this);
			this.nullable = this.nullable.bind(this);
			this.nullish = this.nullish.bind(this);
			this.array = this.array.bind(this);
			this.promise = this.promise.bind(this);
			this.or = this.or.bind(this);
			this.and = this.and.bind(this);
			this.transform = this.transform.bind(this);
			this.brand = this.brand.bind(this);
			this.default = this.default.bind(this);
			this.catch = this.catch.bind(this);
			this.describe = this.describe.bind(this);
			this.pipe = this.pipe.bind(this);
			this.readonly = this.readonly.bind(this);
			this.isNullable = this.isNullable.bind(this);
			this.isOptional = this.isOptional.bind(this);
			this["~standard"] = {
				version: 1,
				vendor: "zod",
				validate: (data) => this["~validate"](data)
			};
		}
		optional() {
			return ZodOptional.create(this, this._def);
		}
		nullable() {
			return ZodNullable.create(this, this._def);
		}
		nullish() {
			return this.nullable().optional();
		}
		array() {
			return ZodArray.create(this);
		}
		promise() {
			return ZodPromise.create(this, this._def);
		}
		or(option) {
			return ZodUnion.create([this, option], this._def);
		}
		and(incoming) {
			return ZodIntersection.create(this, incoming, this._def);
		}
		transform(transform) {
			return new ZodEffects({
				...processCreateParams(this._def),
				schema: this,
				typeName: ZodFirstPartyTypeKind.ZodEffects,
				effect: {
					type: "transform",
					transform
				}
			});
		}
		default(def) {
			const defaultValueFunc = typeof def === "function" ? def : () => def;
			return new ZodDefault({
				...processCreateParams(this._def),
				innerType: this,
				defaultValue: defaultValueFunc,
				typeName: ZodFirstPartyTypeKind.ZodDefault
			});
		}
		brand() {
			return new ZodBranded({
				typeName: ZodFirstPartyTypeKind.ZodBranded,
				type: this,
				...processCreateParams(this._def)
			});
		}
		catch(def) {
			const catchValueFunc = typeof def === "function" ? def : () => def;
			return new ZodCatch({
				...processCreateParams(this._def),
				innerType: this,
				catchValue: catchValueFunc,
				typeName: ZodFirstPartyTypeKind.ZodCatch
			});
		}
		describe(description) {
			const This = this.constructor;
			return new This({
				...this._def,
				description
			});
		}
		pipe(target) {
			return ZodPipeline.create(this, target);
		}
		readonly() {
			return ZodReadonly.create(this);
		}
		isOptional() {
			return this.safeParse(void 0).success;
		}
		isNullable() {
			return this.safeParse(null).success;
		}
	};
	var cuidRegex = /^c[^\s-]{8,}$/i;
	var cuid2Regex = /^[0-9a-z]+$/;
	var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
	var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
	var nanoidRegex = /^[a-z0-9_-]{21}$/i;
	var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
	var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
	var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
	var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
	var emojiRegex;
	var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
	var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
	var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
	var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
	var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
	var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
	var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
	var dateRegex = new RegExp(`^${dateRegexSource}$`);
	function timeRegexSource(args) {
		let secondsRegexSource = `[0-5]\\d`;
		if (args.precision) secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
		else if (args.precision == null) secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
		const secondsQuantifier = args.precision ? "+" : "?";
		return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
	}
	function timeRegex(args) {
		return new RegExp(`^${timeRegexSource(args)}$`);
	}
	function datetimeRegex(args) {
		let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
		const opts = [];
		opts.push(args.local ? `Z?` : `Z`);
		if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
		regex = `${regex}(${opts.join("|")})`;
		return new RegExp(`^${regex}$`);
	}
	function isValidIP(ip, version) {
		if ((version === "v4" || !version) && ipv4Regex.test(ip)) return true;
		if ((version === "v6" || !version) && ipv6Regex.test(ip)) return true;
		return false;
	}
	function isValidJWT(jwt, alg) {
		if (!jwtRegex.test(jwt)) return false;
		try {
			const [header] = jwt.split(".");
			if (!header) return false;
			const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
			const decoded = JSON.parse(atob(base64));
			if (typeof decoded !== "object" || decoded === null) return false;
			if ("typ" in decoded && decoded?.typ !== "JWT") return false;
			if (!decoded.alg) return false;
			if (alg && decoded.alg !== alg) return false;
			return true;
		} catch {
			return false;
		}
	}
	function isValidCidr(ip, version) {
		if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) return true;
		if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) return true;
		return false;
	}
	var ZodString = class ZodString extends ZodType {
		_parse(input) {
			if (this._def.coerce) input.data = String(input.data);
			if (this._getType(input) !== ZodParsedType.string) {
				const ctx = this._getOrReturnCtx(input);
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.string,
					received: ctx.parsedType
				});
				return INVALID;
			}
			const status = new ParseStatus();
			let ctx = void 0;
			for (const check of this._def.checks) if (check.kind === "min") {
				if (input.data.length < check.value) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_small,
						minimum: check.value,
						type: "string",
						inclusive: true,
						exact: false,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "max") {
				if (input.data.length > check.value) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_big,
						maximum: check.value,
						type: "string",
						inclusive: true,
						exact: false,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "length") {
				const tooBig = input.data.length > check.value;
				const tooSmall = input.data.length < check.value;
				if (tooBig || tooSmall) {
					ctx = this._getOrReturnCtx(input, ctx);
					if (tooBig) addIssueToContext(ctx, {
						code: ZodIssueCode.too_big,
						maximum: check.value,
						type: "string",
						inclusive: true,
						exact: true,
						message: check.message
					});
					else if (tooSmall) addIssueToContext(ctx, {
						code: ZodIssueCode.too_small,
						minimum: check.value,
						type: "string",
						inclusive: true,
						exact: true,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "email") {
				if (!emailRegex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "email",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "emoji") {
				if (!emojiRegex) emojiRegex = new RegExp(_emojiRegex, "u");
				if (!emojiRegex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "emoji",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "uuid") {
				if (!uuidRegex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "uuid",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "nanoid") {
				if (!nanoidRegex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "nanoid",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "cuid") {
				if (!cuidRegex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "cuid",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "cuid2") {
				if (!cuid2Regex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "cuid2",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "ulid") {
				if (!ulidRegex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "ulid",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "url") try {
				new URL(input.data);
			} catch {
				ctx = this._getOrReturnCtx(input, ctx);
				addIssueToContext(ctx, {
					validation: "url",
					code: ZodIssueCode.invalid_string,
					message: check.message
				});
				status.dirty();
			}
			else if (check.kind === "regex") {
				check.regex.lastIndex = 0;
				if (!check.regex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "regex",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "trim") input.data = input.data.trim();
			else if (check.kind === "includes") {
				if (!input.data.includes(check.value, check.position)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.invalid_string,
						validation: {
							includes: check.value,
							position: check.position
						},
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "toLowerCase") input.data = input.data.toLowerCase();
			else if (check.kind === "toUpperCase") input.data = input.data.toUpperCase();
			else if (check.kind === "startsWith") {
				if (!input.data.startsWith(check.value)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.invalid_string,
						validation: { startsWith: check.value },
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "endsWith") {
				if (!input.data.endsWith(check.value)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.invalid_string,
						validation: { endsWith: check.value },
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "datetime") {
				if (!datetimeRegex(check).test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.invalid_string,
						validation: "datetime",
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "date") {
				if (!dateRegex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.invalid_string,
						validation: "date",
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "time") {
				if (!timeRegex(check).test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.invalid_string,
						validation: "time",
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "duration") {
				if (!durationRegex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "duration",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "ip") {
				if (!isValidIP(input.data, check.version)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "ip",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "jwt") {
				if (!isValidJWT(input.data, check.alg)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "jwt",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "cidr") {
				if (!isValidCidr(input.data, check.version)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "cidr",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "base64") {
				if (!base64Regex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "base64",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "base64url") {
				if (!base64urlRegex.test(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						validation: "base64url",
						code: ZodIssueCode.invalid_string,
						message: check.message
					});
					status.dirty();
				}
			} else util.assertNever(check);
			return {
				status: status.value,
				value: input.data
			};
		}
		_regex(regex, validation, message) {
			return this.refinement((data) => regex.test(data), {
				validation,
				code: ZodIssueCode.invalid_string,
				...errorUtil.errToObj(message)
			});
		}
		_addCheck(check) {
			return new ZodString({
				...this._def,
				checks: [...this._def.checks, check]
			});
		}
		email(message) {
			return this._addCheck({
				kind: "email",
				...errorUtil.errToObj(message)
			});
		}
		url(message) {
			return this._addCheck({
				kind: "url",
				...errorUtil.errToObj(message)
			});
		}
		emoji(message) {
			return this._addCheck({
				kind: "emoji",
				...errorUtil.errToObj(message)
			});
		}
		uuid(message) {
			return this._addCheck({
				kind: "uuid",
				...errorUtil.errToObj(message)
			});
		}
		nanoid(message) {
			return this._addCheck({
				kind: "nanoid",
				...errorUtil.errToObj(message)
			});
		}
		cuid(message) {
			return this._addCheck({
				kind: "cuid",
				...errorUtil.errToObj(message)
			});
		}
		cuid2(message) {
			return this._addCheck({
				kind: "cuid2",
				...errorUtil.errToObj(message)
			});
		}
		ulid(message) {
			return this._addCheck({
				kind: "ulid",
				...errorUtil.errToObj(message)
			});
		}
		base64(message) {
			return this._addCheck({
				kind: "base64",
				...errorUtil.errToObj(message)
			});
		}
		base64url(message) {
			return this._addCheck({
				kind: "base64url",
				...errorUtil.errToObj(message)
			});
		}
		jwt(options) {
			return this._addCheck({
				kind: "jwt",
				...errorUtil.errToObj(options)
			});
		}
		ip(options) {
			return this._addCheck({
				kind: "ip",
				...errorUtil.errToObj(options)
			});
		}
		cidr(options) {
			return this._addCheck({
				kind: "cidr",
				...errorUtil.errToObj(options)
			});
		}
		datetime(options) {
			if (typeof options === "string") return this._addCheck({
				kind: "datetime",
				precision: null,
				offset: false,
				local: false,
				message: options
			});
			return this._addCheck({
				kind: "datetime",
				precision: typeof options?.precision === "undefined" ? null : options?.precision,
				offset: options?.offset ?? false,
				local: options?.local ?? false,
				...errorUtil.errToObj(options?.message)
			});
		}
		date(message) {
			return this._addCheck({
				kind: "date",
				message
			});
		}
		time(options) {
			if (typeof options === "string") return this._addCheck({
				kind: "time",
				precision: null,
				message: options
			});
			return this._addCheck({
				kind: "time",
				precision: typeof options?.precision === "undefined" ? null : options?.precision,
				...errorUtil.errToObj(options?.message)
			});
		}
		duration(message) {
			return this._addCheck({
				kind: "duration",
				...errorUtil.errToObj(message)
			});
		}
		regex(regex, message) {
			return this._addCheck({
				kind: "regex",
				regex,
				...errorUtil.errToObj(message)
			});
		}
		includes(value, options) {
			return this._addCheck({
				kind: "includes",
				value,
				position: options?.position,
				...errorUtil.errToObj(options?.message)
			});
		}
		startsWith(value, message) {
			return this._addCheck({
				kind: "startsWith",
				value,
				...errorUtil.errToObj(message)
			});
		}
		endsWith(value, message) {
			return this._addCheck({
				kind: "endsWith",
				value,
				...errorUtil.errToObj(message)
			});
		}
		min(minLength, message) {
			return this._addCheck({
				kind: "min",
				value: minLength,
				...errorUtil.errToObj(message)
			});
		}
		max(maxLength, message) {
			return this._addCheck({
				kind: "max",
				value: maxLength,
				...errorUtil.errToObj(message)
			});
		}
		length(len, message) {
			return this._addCheck({
				kind: "length",
				value: len,
				...errorUtil.errToObj(message)
			});
		}
		/**
		* Equivalent to `.min(1)`
		*/
		nonempty(message) {
			return this.min(1, errorUtil.errToObj(message));
		}
		trim() {
			return new ZodString({
				...this._def,
				checks: [...this._def.checks, { kind: "trim" }]
			});
		}
		toLowerCase() {
			return new ZodString({
				...this._def,
				checks: [...this._def.checks, { kind: "toLowerCase" }]
			});
		}
		toUpperCase() {
			return new ZodString({
				...this._def,
				checks: [...this._def.checks, { kind: "toUpperCase" }]
			});
		}
		get isDatetime() {
			return !!this._def.checks.find((ch) => ch.kind === "datetime");
		}
		get isDate() {
			return !!this._def.checks.find((ch) => ch.kind === "date");
		}
		get isTime() {
			return !!this._def.checks.find((ch) => ch.kind === "time");
		}
		get isDuration() {
			return !!this._def.checks.find((ch) => ch.kind === "duration");
		}
		get isEmail() {
			return !!this._def.checks.find((ch) => ch.kind === "email");
		}
		get isURL() {
			return !!this._def.checks.find((ch) => ch.kind === "url");
		}
		get isEmoji() {
			return !!this._def.checks.find((ch) => ch.kind === "emoji");
		}
		get isUUID() {
			return !!this._def.checks.find((ch) => ch.kind === "uuid");
		}
		get isNANOID() {
			return !!this._def.checks.find((ch) => ch.kind === "nanoid");
		}
		get isCUID() {
			return !!this._def.checks.find((ch) => ch.kind === "cuid");
		}
		get isCUID2() {
			return !!this._def.checks.find((ch) => ch.kind === "cuid2");
		}
		get isULID() {
			return !!this._def.checks.find((ch) => ch.kind === "ulid");
		}
		get isIP() {
			return !!this._def.checks.find((ch) => ch.kind === "ip");
		}
		get isCIDR() {
			return !!this._def.checks.find((ch) => ch.kind === "cidr");
		}
		get isBase64() {
			return !!this._def.checks.find((ch) => ch.kind === "base64");
		}
		get isBase64url() {
			return !!this._def.checks.find((ch) => ch.kind === "base64url");
		}
		get minLength() {
			let min = null;
			for (const ch of this._def.checks) if (ch.kind === "min") {
				if (min === null || ch.value > min) min = ch.value;
			}
			return min;
		}
		get maxLength() {
			let max = null;
			for (const ch of this._def.checks) if (ch.kind === "max") {
				if (max === null || ch.value < max) max = ch.value;
			}
			return max;
		}
	};
	ZodString.create = (params) => {
		return new ZodString({
			checks: [],
			typeName: ZodFirstPartyTypeKind.ZodString,
			coerce: params?.coerce ?? false,
			...processCreateParams(params)
		});
	};
	function floatSafeRemainder(val, step) {
		const valDecCount = (val.toString().split(".")[1] || "").length;
		const stepDecCount = (step.toString().split(".")[1] || "").length;
		const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
		return Number.parseInt(val.toFixed(decCount).replace(".", "")) % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount;
	}
	var ZodNumber = class ZodNumber extends ZodType {
		constructor() {
			super(...arguments);
			this.min = this.gte;
			this.max = this.lte;
			this.step = this.multipleOf;
		}
		_parse(input) {
			if (this._def.coerce) input.data = Number(input.data);
			if (this._getType(input) !== ZodParsedType.number) {
				const ctx = this._getOrReturnCtx(input);
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.number,
					received: ctx.parsedType
				});
				return INVALID;
			}
			let ctx = void 0;
			const status = new ParseStatus();
			for (const check of this._def.checks) if (check.kind === "int") {
				if (!util.isInteger(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.invalid_type,
						expected: "integer",
						received: "float",
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "min") {
				if (check.inclusive ? input.data < check.value : input.data <= check.value) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_small,
						minimum: check.value,
						type: "number",
						inclusive: check.inclusive,
						exact: false,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "max") {
				if (check.inclusive ? input.data > check.value : input.data >= check.value) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_big,
						maximum: check.value,
						type: "number",
						inclusive: check.inclusive,
						exact: false,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "multipleOf") {
				if (floatSafeRemainder(input.data, check.value) !== 0) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.not_multiple_of,
						multipleOf: check.value,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "finite") {
				if (!Number.isFinite(input.data)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.not_finite,
						message: check.message
					});
					status.dirty();
				}
			} else util.assertNever(check);
			return {
				status: status.value,
				value: input.data
			};
		}
		gte(value, message) {
			return this.setLimit("min", value, true, errorUtil.toString(message));
		}
		gt(value, message) {
			return this.setLimit("min", value, false, errorUtil.toString(message));
		}
		lte(value, message) {
			return this.setLimit("max", value, true, errorUtil.toString(message));
		}
		lt(value, message) {
			return this.setLimit("max", value, false, errorUtil.toString(message));
		}
		setLimit(kind, value, inclusive, message) {
			return new ZodNumber({
				...this._def,
				checks: [...this._def.checks, {
					kind,
					value,
					inclusive,
					message: errorUtil.toString(message)
				}]
			});
		}
		_addCheck(check) {
			return new ZodNumber({
				...this._def,
				checks: [...this._def.checks, check]
			});
		}
		int(message) {
			return this._addCheck({
				kind: "int",
				message: errorUtil.toString(message)
			});
		}
		positive(message) {
			return this._addCheck({
				kind: "min",
				value: 0,
				inclusive: false,
				message: errorUtil.toString(message)
			});
		}
		negative(message) {
			return this._addCheck({
				kind: "max",
				value: 0,
				inclusive: false,
				message: errorUtil.toString(message)
			});
		}
		nonpositive(message) {
			return this._addCheck({
				kind: "max",
				value: 0,
				inclusive: true,
				message: errorUtil.toString(message)
			});
		}
		nonnegative(message) {
			return this._addCheck({
				kind: "min",
				value: 0,
				inclusive: true,
				message: errorUtil.toString(message)
			});
		}
		multipleOf(value, message) {
			return this._addCheck({
				kind: "multipleOf",
				value,
				message: errorUtil.toString(message)
			});
		}
		finite(message) {
			return this._addCheck({
				kind: "finite",
				message: errorUtil.toString(message)
			});
		}
		safe(message) {
			return this._addCheck({
				kind: "min",
				inclusive: true,
				value: Number.MIN_SAFE_INTEGER,
				message: errorUtil.toString(message)
			})._addCheck({
				kind: "max",
				inclusive: true,
				value: Number.MAX_SAFE_INTEGER,
				message: errorUtil.toString(message)
			});
		}
		get minValue() {
			let min = null;
			for (const ch of this._def.checks) if (ch.kind === "min") {
				if (min === null || ch.value > min) min = ch.value;
			}
			return min;
		}
		get maxValue() {
			let max = null;
			for (const ch of this._def.checks) if (ch.kind === "max") {
				if (max === null || ch.value < max) max = ch.value;
			}
			return max;
		}
		get isInt() {
			return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
		}
		get isFinite() {
			let max = null;
			let min = null;
			for (const ch of this._def.checks) if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") return true;
			else if (ch.kind === "min") {
				if (min === null || ch.value > min) min = ch.value;
			} else if (ch.kind === "max") {
				if (max === null || ch.value < max) max = ch.value;
			}
			return Number.isFinite(min) && Number.isFinite(max);
		}
	};
	ZodNumber.create = (params) => {
		return new ZodNumber({
			checks: [],
			typeName: ZodFirstPartyTypeKind.ZodNumber,
			coerce: params?.coerce || false,
			...processCreateParams(params)
		});
	};
	var ZodBigInt = class ZodBigInt extends ZodType {
		constructor() {
			super(...arguments);
			this.min = this.gte;
			this.max = this.lte;
		}
		_parse(input) {
			if (this._def.coerce) try {
				input.data = BigInt(input.data);
			} catch {
				return this._getInvalidInput(input);
			}
			if (this._getType(input) !== ZodParsedType.bigint) return this._getInvalidInput(input);
			let ctx = void 0;
			const status = new ParseStatus();
			for (const check of this._def.checks) if (check.kind === "min") {
				if (check.inclusive ? input.data < check.value : input.data <= check.value) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_small,
						type: "bigint",
						minimum: check.value,
						inclusive: check.inclusive,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "max") {
				if (check.inclusive ? input.data > check.value : input.data >= check.value) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_big,
						type: "bigint",
						maximum: check.value,
						inclusive: check.inclusive,
						message: check.message
					});
					status.dirty();
				}
			} else if (check.kind === "multipleOf") {
				if (input.data % check.value !== BigInt(0)) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.not_multiple_of,
						multipleOf: check.value,
						message: check.message
					});
					status.dirty();
				}
			} else util.assertNever(check);
			return {
				status: status.value,
				value: input.data
			};
		}
		_getInvalidInput(input) {
			const ctx = this._getOrReturnCtx(input);
			addIssueToContext(ctx, {
				code: ZodIssueCode.invalid_type,
				expected: ZodParsedType.bigint,
				received: ctx.parsedType
			});
			return INVALID;
		}
		gte(value, message) {
			return this.setLimit("min", value, true, errorUtil.toString(message));
		}
		gt(value, message) {
			return this.setLimit("min", value, false, errorUtil.toString(message));
		}
		lte(value, message) {
			return this.setLimit("max", value, true, errorUtil.toString(message));
		}
		lt(value, message) {
			return this.setLimit("max", value, false, errorUtil.toString(message));
		}
		setLimit(kind, value, inclusive, message) {
			return new ZodBigInt({
				...this._def,
				checks: [...this._def.checks, {
					kind,
					value,
					inclusive,
					message: errorUtil.toString(message)
				}]
			});
		}
		_addCheck(check) {
			return new ZodBigInt({
				...this._def,
				checks: [...this._def.checks, check]
			});
		}
		positive(message) {
			return this._addCheck({
				kind: "min",
				value: BigInt(0),
				inclusive: false,
				message: errorUtil.toString(message)
			});
		}
		negative(message) {
			return this._addCheck({
				kind: "max",
				value: BigInt(0),
				inclusive: false,
				message: errorUtil.toString(message)
			});
		}
		nonpositive(message) {
			return this._addCheck({
				kind: "max",
				value: BigInt(0),
				inclusive: true,
				message: errorUtil.toString(message)
			});
		}
		nonnegative(message) {
			return this._addCheck({
				kind: "min",
				value: BigInt(0),
				inclusive: true,
				message: errorUtil.toString(message)
			});
		}
		multipleOf(value, message) {
			return this._addCheck({
				kind: "multipleOf",
				value,
				message: errorUtil.toString(message)
			});
		}
		get minValue() {
			let min = null;
			for (const ch of this._def.checks) if (ch.kind === "min") {
				if (min === null || ch.value > min) min = ch.value;
			}
			return min;
		}
		get maxValue() {
			let max = null;
			for (const ch of this._def.checks) if (ch.kind === "max") {
				if (max === null || ch.value < max) max = ch.value;
			}
			return max;
		}
	};
	ZodBigInt.create = (params) => {
		return new ZodBigInt({
			checks: [],
			typeName: ZodFirstPartyTypeKind.ZodBigInt,
			coerce: params?.coerce ?? false,
			...processCreateParams(params)
		});
	};
	var ZodBoolean = class extends ZodType {
		_parse(input) {
			if (this._def.coerce) input.data = Boolean(input.data);
			if (this._getType(input) !== ZodParsedType.boolean) {
				const ctx = this._getOrReturnCtx(input);
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.boolean,
					received: ctx.parsedType
				});
				return INVALID;
			}
			return OK(input.data);
		}
	};
	ZodBoolean.create = (params) => {
		return new ZodBoolean({
			typeName: ZodFirstPartyTypeKind.ZodBoolean,
			coerce: params?.coerce || false,
			...processCreateParams(params)
		});
	};
	var ZodDate = class ZodDate extends ZodType {
		_parse(input) {
			if (this._def.coerce) input.data = new Date(input.data);
			if (this._getType(input) !== ZodParsedType.date) {
				const ctx = this._getOrReturnCtx(input);
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.date,
					received: ctx.parsedType
				});
				return INVALID;
			}
			if (Number.isNaN(input.data.getTime())) {
				addIssueToContext(this._getOrReturnCtx(input), { code: ZodIssueCode.invalid_date });
				return INVALID;
			}
			const status = new ParseStatus();
			let ctx = void 0;
			for (const check of this._def.checks) if (check.kind === "min") {
				if (input.data.getTime() < check.value) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_small,
						message: check.message,
						inclusive: true,
						exact: false,
						minimum: check.value,
						type: "date"
					});
					status.dirty();
				}
			} else if (check.kind === "max") {
				if (input.data.getTime() > check.value) {
					ctx = this._getOrReturnCtx(input, ctx);
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_big,
						message: check.message,
						inclusive: true,
						exact: false,
						maximum: check.value,
						type: "date"
					});
					status.dirty();
				}
			} else util.assertNever(check);
			return {
				status: status.value,
				value: new Date(input.data.getTime())
			};
		}
		_addCheck(check) {
			return new ZodDate({
				...this._def,
				checks: [...this._def.checks, check]
			});
		}
		min(minDate, message) {
			return this._addCheck({
				kind: "min",
				value: minDate.getTime(),
				message: errorUtil.toString(message)
			});
		}
		max(maxDate, message) {
			return this._addCheck({
				kind: "max",
				value: maxDate.getTime(),
				message: errorUtil.toString(message)
			});
		}
		get minDate() {
			let min = null;
			for (const ch of this._def.checks) if (ch.kind === "min") {
				if (min === null || ch.value > min) min = ch.value;
			}
			return min != null ? new Date(min) : null;
		}
		get maxDate() {
			let max = null;
			for (const ch of this._def.checks) if (ch.kind === "max") {
				if (max === null || ch.value < max) max = ch.value;
			}
			return max != null ? new Date(max) : null;
		}
	};
	ZodDate.create = (params) => {
		return new ZodDate({
			checks: [],
			coerce: params?.coerce || false,
			typeName: ZodFirstPartyTypeKind.ZodDate,
			...processCreateParams(params)
		});
	};
	var ZodSymbol = class extends ZodType {
		_parse(input) {
			if (this._getType(input) !== ZodParsedType.symbol) {
				const ctx = this._getOrReturnCtx(input);
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.symbol,
					received: ctx.parsedType
				});
				return INVALID;
			}
			return OK(input.data);
		}
	};
	ZodSymbol.create = (params) => {
		return new ZodSymbol({
			typeName: ZodFirstPartyTypeKind.ZodSymbol,
			...processCreateParams(params)
		});
	};
	var ZodUndefined = class extends ZodType {
		_parse(input) {
			if (this._getType(input) !== ZodParsedType.undefined) {
				const ctx = this._getOrReturnCtx(input);
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.undefined,
					received: ctx.parsedType
				});
				return INVALID;
			}
			return OK(input.data);
		}
	};
	ZodUndefined.create = (params) => {
		return new ZodUndefined({
			typeName: ZodFirstPartyTypeKind.ZodUndefined,
			...processCreateParams(params)
		});
	};
	var ZodNull = class extends ZodType {
		_parse(input) {
			if (this._getType(input) !== ZodParsedType.null) {
				const ctx = this._getOrReturnCtx(input);
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.null,
					received: ctx.parsedType
				});
				return INVALID;
			}
			return OK(input.data);
		}
	};
	ZodNull.create = (params) => {
		return new ZodNull({
			typeName: ZodFirstPartyTypeKind.ZodNull,
			...processCreateParams(params)
		});
	};
	var ZodAny = class extends ZodType {
		constructor() {
			super(...arguments);
			this._any = true;
		}
		_parse(input) {
			return OK(input.data);
		}
	};
	ZodAny.create = (params) => {
		return new ZodAny({
			typeName: ZodFirstPartyTypeKind.ZodAny,
			...processCreateParams(params)
		});
	};
	var ZodUnknown = class extends ZodType {
		constructor() {
			super(...arguments);
			this._unknown = true;
		}
		_parse(input) {
			return OK(input.data);
		}
	};
	ZodUnknown.create = (params) => {
		return new ZodUnknown({
			typeName: ZodFirstPartyTypeKind.ZodUnknown,
			...processCreateParams(params)
		});
	};
	var ZodNever = class extends ZodType {
		_parse(input) {
			const ctx = this._getOrReturnCtx(input);
			addIssueToContext(ctx, {
				code: ZodIssueCode.invalid_type,
				expected: ZodParsedType.never,
				received: ctx.parsedType
			});
			return INVALID;
		}
	};
	ZodNever.create = (params) => {
		return new ZodNever({
			typeName: ZodFirstPartyTypeKind.ZodNever,
			...processCreateParams(params)
		});
	};
	var ZodVoid = class extends ZodType {
		_parse(input) {
			if (this._getType(input) !== ZodParsedType.undefined) {
				const ctx = this._getOrReturnCtx(input);
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.void,
					received: ctx.parsedType
				});
				return INVALID;
			}
			return OK(input.data);
		}
	};
	ZodVoid.create = (params) => {
		return new ZodVoid({
			typeName: ZodFirstPartyTypeKind.ZodVoid,
			...processCreateParams(params)
		});
	};
	var ZodArray = class ZodArray extends ZodType {
		_parse(input) {
			const { ctx, status } = this._processInputParams(input);
			const def = this._def;
			if (ctx.parsedType !== ZodParsedType.array) {
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.array,
					received: ctx.parsedType
				});
				return INVALID;
			}
			if (def.exactLength !== null) {
				const tooBig = ctx.data.length > def.exactLength.value;
				const tooSmall = ctx.data.length < def.exactLength.value;
				if (tooBig || tooSmall) {
					addIssueToContext(ctx, {
						code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,
						minimum: tooSmall ? def.exactLength.value : void 0,
						maximum: tooBig ? def.exactLength.value : void 0,
						type: "array",
						inclusive: true,
						exact: true,
						message: def.exactLength.message
					});
					status.dirty();
				}
			}
			if (def.minLength !== null) {
				if (ctx.data.length < def.minLength.value) {
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_small,
						minimum: def.minLength.value,
						type: "array",
						inclusive: true,
						exact: false,
						message: def.minLength.message
					});
					status.dirty();
				}
			}
			if (def.maxLength !== null) {
				if (ctx.data.length > def.maxLength.value) {
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_big,
						maximum: def.maxLength.value,
						type: "array",
						inclusive: true,
						exact: false,
						message: def.maxLength.message
					});
					status.dirty();
				}
			}
			if (ctx.common.async) return Promise.all([...ctx.data].map((item, i) => {
				return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
			})).then((result) => {
				return ParseStatus.mergeArray(status, result);
			});
			const result = [...ctx.data].map((item, i) => {
				return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
			});
			return ParseStatus.mergeArray(status, result);
		}
		get element() {
			return this._def.type;
		}
		min(minLength, message) {
			return new ZodArray({
				...this._def,
				minLength: {
					value: minLength,
					message: errorUtil.toString(message)
				}
			});
		}
		max(maxLength, message) {
			return new ZodArray({
				...this._def,
				maxLength: {
					value: maxLength,
					message: errorUtil.toString(message)
				}
			});
		}
		length(len, message) {
			return new ZodArray({
				...this._def,
				exactLength: {
					value: len,
					message: errorUtil.toString(message)
				}
			});
		}
		nonempty(message) {
			return this.min(1, message);
		}
	};
	ZodArray.create = (schema, params) => {
		return new ZodArray({
			type: schema,
			minLength: null,
			maxLength: null,
			exactLength: null,
			typeName: ZodFirstPartyTypeKind.ZodArray,
			...processCreateParams(params)
		});
	};
	function deepPartialify(schema) {
		if (schema instanceof ZodObject) {
			const newShape = {};
			for (const key in schema.shape) {
				const fieldSchema = schema.shape[key];
				newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));
			}
			return new ZodObject({
				...schema._def,
				shape: () => newShape
			});
		} else if (schema instanceof ZodArray) return new ZodArray({
			...schema._def,
			type: deepPartialify(schema.element)
		});
		else if (schema instanceof ZodOptional) return ZodOptional.create(deepPartialify(schema.unwrap()));
		else if (schema instanceof ZodNullable) return ZodNullable.create(deepPartialify(schema.unwrap()));
		else if (schema instanceof ZodTuple) return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));
		else return schema;
	}
	var ZodObject = class ZodObject extends ZodType {
		constructor() {
			super(...arguments);
			this._cached = null;
			/**
			* @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.
			* If you want to pass through unknown properties, use `.passthrough()` instead.
			*/
			this.nonstrict = this.passthrough;
			/**
			* @deprecated Use `.extend` instead
			*  */
			this.augment = this.extend;
		}
		_getCached() {
			if (this._cached !== null) return this._cached;
			const shape = this._def.shape();
			const keys = util.objectKeys(shape);
			this._cached = {
				shape,
				keys
			};
			return this._cached;
		}
		_parse(input) {
			if (this._getType(input) !== ZodParsedType.object) {
				const ctx = this._getOrReturnCtx(input);
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.object,
					received: ctx.parsedType
				});
				return INVALID;
			}
			const { status, ctx } = this._processInputParams(input);
			const { shape, keys: shapeKeys } = this._getCached();
			const extraKeys = [];
			if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) {
				for (const key in ctx.data) if (!shapeKeys.includes(key)) extraKeys.push(key);
			}
			const pairs = [];
			for (const key of shapeKeys) {
				const keyValidator = shape[key];
				const value = ctx.data[key];
				pairs.push({
					key: {
						status: "valid",
						value: key
					},
					value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
					alwaysSet: key in ctx.data
				});
			}
			if (this._def.catchall instanceof ZodNever) {
				const unknownKeys = this._def.unknownKeys;
				if (unknownKeys === "passthrough") for (const key of extraKeys) pairs.push({
					key: {
						status: "valid",
						value: key
					},
					value: {
						status: "valid",
						value: ctx.data[key]
					}
				});
				else if (unknownKeys === "strict") {
					if (extraKeys.length > 0) {
						addIssueToContext(ctx, {
							code: ZodIssueCode.unrecognized_keys,
							keys: extraKeys
						});
						status.dirty();
					}
				} else if (unknownKeys === "strip") {} else throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
			} else {
				const catchall = this._def.catchall;
				for (const key of extraKeys) {
					const value = ctx.data[key];
					pairs.push({
						key: {
							status: "valid",
							value: key
						},
						value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
						alwaysSet: key in ctx.data
					});
				}
			}
			if (ctx.common.async) return Promise.resolve().then(async () => {
				const syncPairs = [];
				for (const pair of pairs) {
					const key = await pair.key;
					const value = await pair.value;
					syncPairs.push({
						key,
						value,
						alwaysSet: pair.alwaysSet
					});
				}
				return syncPairs;
			}).then((syncPairs) => {
				return ParseStatus.mergeObjectSync(status, syncPairs);
			});
			else return ParseStatus.mergeObjectSync(status, pairs);
		}
		get shape() {
			return this._def.shape();
		}
		strict(message) {
			errorUtil.errToObj;
			return new ZodObject({
				...this._def,
				unknownKeys: "strict",
				...message !== void 0 ? { errorMap: (issue, ctx) => {
					const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
					if (issue.code === "unrecognized_keys") return { message: errorUtil.errToObj(message).message ?? defaultError };
					return { message: defaultError };
				} } : {}
			});
		}
		strip() {
			return new ZodObject({
				...this._def,
				unknownKeys: "strip"
			});
		}
		passthrough() {
			return new ZodObject({
				...this._def,
				unknownKeys: "passthrough"
			});
		}
		extend(augmentation) {
			return new ZodObject({
				...this._def,
				shape: () => ({
					...this._def.shape(),
					...augmentation
				})
			});
		}
		/**
		* Prior to zod@1.0.12 there was a bug in the
		* inferred type of merged objects. Please
		* upgrade if you are experiencing issues.
		*/
		merge(merging) {
			return new ZodObject({
				unknownKeys: merging._def.unknownKeys,
				catchall: merging._def.catchall,
				shape: () => ({
					...this._def.shape(),
					...merging._def.shape()
				}),
				typeName: ZodFirstPartyTypeKind.ZodObject
			});
		}
		setKey(key, schema) {
			return this.augment({ [key]: schema });
		}
		catchall(index) {
			return new ZodObject({
				...this._def,
				catchall: index
			});
		}
		pick(mask) {
			const shape = {};
			for (const key of util.objectKeys(mask)) if (mask[key] && this.shape[key]) shape[key] = this.shape[key];
			return new ZodObject({
				...this._def,
				shape: () => shape
			});
		}
		omit(mask) {
			const shape = {};
			for (const key of util.objectKeys(this.shape)) if (!mask[key]) shape[key] = this.shape[key];
			return new ZodObject({
				...this._def,
				shape: () => shape
			});
		}
		/**
		* @deprecated
		*/
		deepPartial() {
			return deepPartialify(this);
		}
		partial(mask) {
			const newShape = {};
			for (const key of util.objectKeys(this.shape)) {
				const fieldSchema = this.shape[key];
				if (mask && !mask[key]) newShape[key] = fieldSchema;
				else newShape[key] = fieldSchema.optional();
			}
			return new ZodObject({
				...this._def,
				shape: () => newShape
			});
		}
		required(mask) {
			const newShape = {};
			for (const key of util.objectKeys(this.shape)) if (mask && !mask[key]) newShape[key] = this.shape[key];
			else {
				let newField = this.shape[key];
				while (newField instanceof ZodOptional) newField = newField._def.innerType;
				newShape[key] = newField;
			}
			return new ZodObject({
				...this._def,
				shape: () => newShape
			});
		}
		keyof() {
			return createZodEnum(util.objectKeys(this.shape));
		}
	};
	ZodObject.create = (shape, params) => {
		return new ZodObject({
			shape: () => shape,
			unknownKeys: "strip",
			catchall: ZodNever.create(),
			typeName: ZodFirstPartyTypeKind.ZodObject,
			...processCreateParams(params)
		});
	};
	ZodObject.strictCreate = (shape, params) => {
		return new ZodObject({
			shape: () => shape,
			unknownKeys: "strict",
			catchall: ZodNever.create(),
			typeName: ZodFirstPartyTypeKind.ZodObject,
			...processCreateParams(params)
		});
	};
	ZodObject.lazycreate = (shape, params) => {
		return new ZodObject({
			shape,
			unknownKeys: "strip",
			catchall: ZodNever.create(),
			typeName: ZodFirstPartyTypeKind.ZodObject,
			...processCreateParams(params)
		});
	};
	var ZodUnion = class extends ZodType {
		_parse(input) {
			const { ctx } = this._processInputParams(input);
			const options = this._def.options;
			function handleResults(results) {
				for (const result of results) if (result.result.status === "valid") return result.result;
				for (const result of results) if (result.result.status === "dirty") {
					ctx.common.issues.push(...result.ctx.common.issues);
					return result.result;
				}
				const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_union,
					unionErrors
				});
				return INVALID;
			}
			if (ctx.common.async) return Promise.all(options.map(async (option) => {
				const childCtx = {
					...ctx,
					common: {
						...ctx.common,
						issues: []
					},
					parent: null
				};
				return {
					result: await option._parseAsync({
						data: ctx.data,
						path: ctx.path,
						parent: childCtx
					}),
					ctx: childCtx
				};
			})).then(handleResults);
			else {
				let dirty = void 0;
				const issues = [];
				for (const option of options) {
					const childCtx = {
						...ctx,
						common: {
							...ctx.common,
							issues: []
						},
						parent: null
					};
					const result = option._parseSync({
						data: ctx.data,
						path: ctx.path,
						parent: childCtx
					});
					if (result.status === "valid") return result;
					else if (result.status === "dirty" && !dirty) dirty = {
						result,
						ctx: childCtx
					};
					if (childCtx.common.issues.length) issues.push(childCtx.common.issues);
				}
				if (dirty) {
					ctx.common.issues.push(...dirty.ctx.common.issues);
					return dirty.result;
				}
				const unionErrors = issues.map((issues) => new ZodError(issues));
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_union,
					unionErrors
				});
				return INVALID;
			}
		}
		get options() {
			return this._def.options;
		}
	};
	ZodUnion.create = (types, params) => {
		return new ZodUnion({
			options: types,
			typeName: ZodFirstPartyTypeKind.ZodUnion,
			...processCreateParams(params)
		});
	};
	var getDiscriminator = (type) => {
		if (type instanceof ZodLazy) return getDiscriminator(type.schema);
		else if (type instanceof ZodEffects) return getDiscriminator(type.innerType());
		else if (type instanceof ZodLiteral) return [type.value];
		else if (type instanceof ZodEnum) return type.options;
		else if (type instanceof ZodNativeEnum) return util.objectValues(type.enum);
		else if (type instanceof ZodDefault) return getDiscriminator(type._def.innerType);
		else if (type instanceof ZodUndefined) return [void 0];
		else if (type instanceof ZodNull) return [null];
		else if (type instanceof ZodOptional) return [void 0, ...getDiscriminator(type.unwrap())];
		else if (type instanceof ZodNullable) return [null, ...getDiscriminator(type.unwrap())];
		else if (type instanceof ZodBranded) return getDiscriminator(type.unwrap());
		else if (type instanceof ZodReadonly) return getDiscriminator(type.unwrap());
		else if (type instanceof ZodCatch) return getDiscriminator(type._def.innerType);
		else return [];
	};
	var ZodDiscriminatedUnion = class ZodDiscriminatedUnion extends ZodType {
		_parse(input) {
			const { ctx } = this._processInputParams(input);
			if (ctx.parsedType !== ZodParsedType.object) {
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.object,
					received: ctx.parsedType
				});
				return INVALID;
			}
			const discriminator = this.discriminator;
			const discriminatorValue = ctx.data[discriminator];
			const option = this.optionsMap.get(discriminatorValue);
			if (!option) {
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_union_discriminator,
					options: Array.from(this.optionsMap.keys()),
					path: [discriminator]
				});
				return INVALID;
			}
			if (ctx.common.async) return option._parseAsync({
				data: ctx.data,
				path: ctx.path,
				parent: ctx
			});
			else return option._parseSync({
				data: ctx.data,
				path: ctx.path,
				parent: ctx
			});
		}
		get discriminator() {
			return this._def.discriminator;
		}
		get options() {
			return this._def.options;
		}
		get optionsMap() {
			return this._def.optionsMap;
		}
		/**
		* The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
		* However, it only allows a union of objects, all of which need to share a discriminator property. This property must
		* have a different value for each object in the union.
		* @param discriminator the name of the discriminator property
		* @param types an array of object schemas
		* @param params
		*/
		static create(discriminator, options, params) {
			const optionsMap = /* @__PURE__ */ new Map();
			for (const type of options) {
				const discriminatorValues = getDiscriminator(type.shape[discriminator]);
				if (!discriminatorValues.length) throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
				for (const value of discriminatorValues) {
					if (optionsMap.has(value)) throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
					optionsMap.set(value, type);
				}
			}
			return new ZodDiscriminatedUnion({
				typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,
				discriminator,
				options,
				optionsMap,
				...processCreateParams(params)
			});
		}
	};
	function mergeValues(a, b) {
		const aType = getParsedType(a);
		const bType = getParsedType(b);
		if (a === b) return {
			valid: true,
			data: a
		};
		else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
			const bKeys = util.objectKeys(b);
			const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
			const newObj = {
				...a,
				...b
			};
			for (const key of sharedKeys) {
				const sharedValue = mergeValues(a[key], b[key]);
				if (!sharedValue.valid) return { valid: false };
				newObj[key] = sharedValue.data;
			}
			return {
				valid: true,
				data: newObj
			};
		} else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
			if (a.length !== b.length) return { valid: false };
			const newArray = [];
			for (let index = 0; index < a.length; index++) {
				const itemA = a[index];
				const itemB = b[index];
				const sharedValue = mergeValues(itemA, itemB);
				if (!sharedValue.valid) return { valid: false };
				newArray.push(sharedValue.data);
			}
			return {
				valid: true,
				data: newArray
			};
		} else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) return {
			valid: true,
			data: a
		};
		else return { valid: false };
	}
	var ZodIntersection = class extends ZodType {
		_parse(input) {
			const { status, ctx } = this._processInputParams(input);
			const handleParsed = (parsedLeft, parsedRight) => {
				if (isAborted(parsedLeft) || isAborted(parsedRight)) return INVALID;
				const merged = mergeValues(parsedLeft.value, parsedRight.value);
				if (!merged.valid) {
					addIssueToContext(ctx, { code: ZodIssueCode.invalid_intersection_types });
					return INVALID;
				}
				if (isDirty(parsedLeft) || isDirty(parsedRight)) status.dirty();
				return {
					status: status.value,
					value: merged.data
				};
			};
			if (ctx.common.async) return Promise.all([this._def.left._parseAsync({
				data: ctx.data,
				path: ctx.path,
				parent: ctx
			}), this._def.right._parseAsync({
				data: ctx.data,
				path: ctx.path,
				parent: ctx
			})]).then(([left, right]) => handleParsed(left, right));
			else return handleParsed(this._def.left._parseSync({
				data: ctx.data,
				path: ctx.path,
				parent: ctx
			}), this._def.right._parseSync({
				data: ctx.data,
				path: ctx.path,
				parent: ctx
			}));
		}
	};
	ZodIntersection.create = (left, right, params) => {
		return new ZodIntersection({
			left,
			right,
			typeName: ZodFirstPartyTypeKind.ZodIntersection,
			...processCreateParams(params)
		});
	};
	var ZodTuple = class ZodTuple extends ZodType {
		_parse(input) {
			const { status, ctx } = this._processInputParams(input);
			if (ctx.parsedType !== ZodParsedType.array) {
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.array,
					received: ctx.parsedType
				});
				return INVALID;
			}
			if (ctx.data.length < this._def.items.length) {
				addIssueToContext(ctx, {
					code: ZodIssueCode.too_small,
					minimum: this._def.items.length,
					inclusive: true,
					exact: false,
					type: "array"
				});
				return INVALID;
			}
			if (!this._def.rest && ctx.data.length > this._def.items.length) {
				addIssueToContext(ctx, {
					code: ZodIssueCode.too_big,
					maximum: this._def.items.length,
					inclusive: true,
					exact: false,
					type: "array"
				});
				status.dirty();
			}
			const items = [...ctx.data].map((item, itemIndex) => {
				const schema = this._def.items[itemIndex] || this._def.rest;
				if (!schema) return null;
				return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
			}).filter((x) => !!x);
			if (ctx.common.async) return Promise.all(items).then((results) => {
				return ParseStatus.mergeArray(status, results);
			});
			else return ParseStatus.mergeArray(status, items);
		}
		get items() {
			return this._def.items;
		}
		rest(rest) {
			return new ZodTuple({
				...this._def,
				rest
			});
		}
	};
	ZodTuple.create = (schemas, params) => {
		if (!Array.isArray(schemas)) throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
		return new ZodTuple({
			items: schemas,
			typeName: ZodFirstPartyTypeKind.ZodTuple,
			rest: null,
			...processCreateParams(params)
		});
	};
	var ZodRecord = class ZodRecord extends ZodType {
		get keySchema() {
			return this._def.keyType;
		}
		get valueSchema() {
			return this._def.valueType;
		}
		_parse(input) {
			const { status, ctx } = this._processInputParams(input);
			if (ctx.parsedType !== ZodParsedType.object) {
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.object,
					received: ctx.parsedType
				});
				return INVALID;
			}
			const pairs = [];
			const keyType = this._def.keyType;
			const valueType = this._def.valueType;
			for (const key in ctx.data) pairs.push({
				key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
				value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
				alwaysSet: key in ctx.data
			});
			if (ctx.common.async) return ParseStatus.mergeObjectAsync(status, pairs);
			else return ParseStatus.mergeObjectSync(status, pairs);
		}
		get element() {
			return this._def.valueType;
		}
		static create(first, second, third) {
			if (second instanceof ZodType) return new ZodRecord({
				keyType: first,
				valueType: second,
				typeName: ZodFirstPartyTypeKind.ZodRecord,
				...processCreateParams(third)
			});
			return new ZodRecord({
				keyType: ZodString.create(),
				valueType: first,
				typeName: ZodFirstPartyTypeKind.ZodRecord,
				...processCreateParams(second)
			});
		}
	};
	var ZodMap = class extends ZodType {
		get keySchema() {
			return this._def.keyType;
		}
		get valueSchema() {
			return this._def.valueType;
		}
		_parse(input) {
			const { status, ctx } = this._processInputParams(input);
			if (ctx.parsedType !== ZodParsedType.map) {
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.map,
					received: ctx.parsedType
				});
				return INVALID;
			}
			const keyType = this._def.keyType;
			const valueType = this._def.valueType;
			const pairs = [...ctx.data.entries()].map(([key, value], index) => {
				return {
					key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])),
					value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"]))
				};
			});
			if (ctx.common.async) {
				const finalMap = /* @__PURE__ */ new Map();
				return Promise.resolve().then(async () => {
					for (const pair of pairs) {
						const key = await pair.key;
						const value = await pair.value;
						if (key.status === "aborted" || value.status === "aborted") return INVALID;
						if (key.status === "dirty" || value.status === "dirty") status.dirty();
						finalMap.set(key.value, value.value);
					}
					return {
						status: status.value,
						value: finalMap
					};
				});
			} else {
				const finalMap = /* @__PURE__ */ new Map();
				for (const pair of pairs) {
					const key = pair.key;
					const value = pair.value;
					if (key.status === "aborted" || value.status === "aborted") return INVALID;
					if (key.status === "dirty" || value.status === "dirty") status.dirty();
					finalMap.set(key.value, value.value);
				}
				return {
					status: status.value,
					value: finalMap
				};
			}
		}
	};
	ZodMap.create = (keyType, valueType, params) => {
		return new ZodMap({
			valueType,
			keyType,
			typeName: ZodFirstPartyTypeKind.ZodMap,
			...processCreateParams(params)
		});
	};
	var ZodSet = class ZodSet extends ZodType {
		_parse(input) {
			const { status, ctx } = this._processInputParams(input);
			if (ctx.parsedType !== ZodParsedType.set) {
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.set,
					received: ctx.parsedType
				});
				return INVALID;
			}
			const def = this._def;
			if (def.minSize !== null) {
				if (ctx.data.size < def.minSize.value) {
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_small,
						minimum: def.minSize.value,
						type: "set",
						inclusive: true,
						exact: false,
						message: def.minSize.message
					});
					status.dirty();
				}
			}
			if (def.maxSize !== null) {
				if (ctx.data.size > def.maxSize.value) {
					addIssueToContext(ctx, {
						code: ZodIssueCode.too_big,
						maximum: def.maxSize.value,
						type: "set",
						inclusive: true,
						exact: false,
						message: def.maxSize.message
					});
					status.dirty();
				}
			}
			const valueType = this._def.valueType;
			function finalizeSet(elements) {
				const parsedSet = /* @__PURE__ */ new Set();
				for (const element of elements) {
					if (element.status === "aborted") return INVALID;
					if (element.status === "dirty") status.dirty();
					parsedSet.add(element.value);
				}
				return {
					status: status.value,
					value: parsedSet
				};
			}
			const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
			if (ctx.common.async) return Promise.all(elements).then((elements) => finalizeSet(elements));
			else return finalizeSet(elements);
		}
		min(minSize, message) {
			return new ZodSet({
				...this._def,
				minSize: {
					value: minSize,
					message: errorUtil.toString(message)
				}
			});
		}
		max(maxSize, message) {
			return new ZodSet({
				...this._def,
				maxSize: {
					value: maxSize,
					message: errorUtil.toString(message)
				}
			});
		}
		size(size, message) {
			return this.min(size, message).max(size, message);
		}
		nonempty(message) {
			return this.min(1, message);
		}
	};
	ZodSet.create = (valueType, params) => {
		return new ZodSet({
			valueType,
			minSize: null,
			maxSize: null,
			typeName: ZodFirstPartyTypeKind.ZodSet,
			...processCreateParams(params)
		});
	};
	var ZodFunction = class ZodFunction extends ZodType {
		constructor() {
			super(...arguments);
			this.validate = this.implement;
		}
		_parse(input) {
			const { ctx } = this._processInputParams(input);
			if (ctx.parsedType !== ZodParsedType.function) {
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.function,
					received: ctx.parsedType
				});
				return INVALID;
			}
			function makeArgsIssue(args, error) {
				return makeIssue({
					data: args,
					path: ctx.path,
					errorMaps: [
						ctx.common.contextualErrorMap,
						ctx.schemaErrorMap,
						getErrorMap(),
						errorMap
					].filter((x) => !!x),
					issueData: {
						code: ZodIssueCode.invalid_arguments,
						argumentsError: error
					}
				});
			}
			function makeReturnsIssue(returns, error) {
				return makeIssue({
					data: returns,
					path: ctx.path,
					errorMaps: [
						ctx.common.contextualErrorMap,
						ctx.schemaErrorMap,
						getErrorMap(),
						errorMap
					].filter((x) => !!x),
					issueData: {
						code: ZodIssueCode.invalid_return_type,
						returnTypeError: error
					}
				});
			}
			const params = { errorMap: ctx.common.contextualErrorMap };
			const fn = ctx.data;
			if (this._def.returns instanceof ZodPromise) {
				const me = this;
				return OK(async function(...args) {
					const error = new ZodError([]);
					const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
						error.addIssue(makeArgsIssue(args, e));
						throw error;
					});
					const result = await Reflect.apply(fn, this, parsedArgs);
					return await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
						error.addIssue(makeReturnsIssue(result, e));
						throw error;
					});
				});
			} else {
				const me = this;
				return OK(function(...args) {
					const parsedArgs = me._def.args.safeParse(args, params);
					if (!parsedArgs.success) throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
					const result = Reflect.apply(fn, this, parsedArgs.data);
					const parsedReturns = me._def.returns.safeParse(result, params);
					if (!parsedReturns.success) throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
					return parsedReturns.data;
				});
			}
		}
		parameters() {
			return this._def.args;
		}
		returnType() {
			return this._def.returns;
		}
		args(...items) {
			return new ZodFunction({
				...this._def,
				args: ZodTuple.create(items).rest(ZodUnknown.create())
			});
		}
		returns(returnType) {
			return new ZodFunction({
				...this._def,
				returns: returnType
			});
		}
		implement(func) {
			return this.parse(func);
		}
		strictImplement(func) {
			return this.parse(func);
		}
		static create(args, returns, params) {
			return new ZodFunction({
				args: args ? args : ZodTuple.create([]).rest(ZodUnknown.create()),
				returns: returns || ZodUnknown.create(),
				typeName: ZodFirstPartyTypeKind.ZodFunction,
				...processCreateParams(params)
			});
		}
	};
	var ZodLazy = class extends ZodType {
		get schema() {
			return this._def.getter();
		}
		_parse(input) {
			const { ctx } = this._processInputParams(input);
			return this._def.getter()._parse({
				data: ctx.data,
				path: ctx.path,
				parent: ctx
			});
		}
	};
	ZodLazy.create = (getter, params) => {
		return new ZodLazy({
			getter,
			typeName: ZodFirstPartyTypeKind.ZodLazy,
			...processCreateParams(params)
		});
	};
	var ZodLiteral = class extends ZodType {
		_parse(input) {
			if (input.data !== this._def.value) {
				const ctx = this._getOrReturnCtx(input);
				addIssueToContext(ctx, {
					received: ctx.data,
					code: ZodIssueCode.invalid_literal,
					expected: this._def.value
				});
				return INVALID;
			}
			return {
				status: "valid",
				value: input.data
			};
		}
		get value() {
			return this._def.value;
		}
	};
	ZodLiteral.create = (value, params) => {
		return new ZodLiteral({
			value,
			typeName: ZodFirstPartyTypeKind.ZodLiteral,
			...processCreateParams(params)
		});
	};
	function createZodEnum(values, params) {
		return new ZodEnum({
			values,
			typeName: ZodFirstPartyTypeKind.ZodEnum,
			...processCreateParams(params)
		});
	}
	var ZodEnum = class ZodEnum extends ZodType {
		_parse(input) {
			if (typeof input.data !== "string") {
				const ctx = this._getOrReturnCtx(input);
				const expectedValues = this._def.values;
				addIssueToContext(ctx, {
					expected: util.joinValues(expectedValues),
					received: ctx.parsedType,
					code: ZodIssueCode.invalid_type
				});
				return INVALID;
			}
			if (!this._cache) this._cache = new Set(this._def.values);
			if (!this._cache.has(input.data)) {
				const ctx = this._getOrReturnCtx(input);
				const expectedValues = this._def.values;
				addIssueToContext(ctx, {
					received: ctx.data,
					code: ZodIssueCode.invalid_enum_value,
					options: expectedValues
				});
				return INVALID;
			}
			return OK(input.data);
		}
		get options() {
			return this._def.values;
		}
		get enum() {
			const enumValues = {};
			for (const val of this._def.values) enumValues[val] = val;
			return enumValues;
		}
		get Values() {
			const enumValues = {};
			for (const val of this._def.values) enumValues[val] = val;
			return enumValues;
		}
		get Enum() {
			const enumValues = {};
			for (const val of this._def.values) enumValues[val] = val;
			return enumValues;
		}
		extract(values, newDef = this._def) {
			return ZodEnum.create(values, {
				...this._def,
				...newDef
			});
		}
		exclude(values, newDef = this._def) {
			return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {
				...this._def,
				...newDef
			});
		}
	};
	ZodEnum.create = createZodEnum;
	var ZodNativeEnum = class extends ZodType {
		_parse(input) {
			const nativeEnumValues = util.getValidEnumValues(this._def.values);
			const ctx = this._getOrReturnCtx(input);
			if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {
				const expectedValues = util.objectValues(nativeEnumValues);
				addIssueToContext(ctx, {
					expected: util.joinValues(expectedValues),
					received: ctx.parsedType,
					code: ZodIssueCode.invalid_type
				});
				return INVALID;
			}
			if (!this._cache) this._cache = new Set(util.getValidEnumValues(this._def.values));
			if (!this._cache.has(input.data)) {
				const expectedValues = util.objectValues(nativeEnumValues);
				addIssueToContext(ctx, {
					received: ctx.data,
					code: ZodIssueCode.invalid_enum_value,
					options: expectedValues
				});
				return INVALID;
			}
			return OK(input.data);
		}
		get enum() {
			return this._def.values;
		}
	};
	ZodNativeEnum.create = (values, params) => {
		return new ZodNativeEnum({
			values,
			typeName: ZodFirstPartyTypeKind.ZodNativeEnum,
			...processCreateParams(params)
		});
	};
	var ZodPromise = class extends ZodType {
		unwrap() {
			return this._def.type;
		}
		_parse(input) {
			const { ctx } = this._processInputParams(input);
			if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.promise,
					received: ctx.parsedType
				});
				return INVALID;
			}
			return OK((ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data)).then((data) => {
				return this._def.type.parseAsync(data, {
					path: ctx.path,
					errorMap: ctx.common.contextualErrorMap
				});
			}));
		}
	};
	ZodPromise.create = (schema, params) => {
		return new ZodPromise({
			type: schema,
			typeName: ZodFirstPartyTypeKind.ZodPromise,
			...processCreateParams(params)
		});
	};
	var ZodEffects = class extends ZodType {
		innerType() {
			return this._def.schema;
		}
		sourceType() {
			return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
		}
		_parse(input) {
			const { status, ctx } = this._processInputParams(input);
			const effect = this._def.effect || null;
			const checkCtx = {
				addIssue: (arg) => {
					addIssueToContext(ctx, arg);
					if (arg.fatal) status.abort();
					else status.dirty();
				},
				get path() {
					return ctx.path;
				}
			};
			checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
			if (effect.type === "preprocess") {
				const processed = effect.transform(ctx.data, checkCtx);
				if (ctx.common.async) return Promise.resolve(processed).then(async (processed) => {
					if (status.value === "aborted") return INVALID;
					const result = await this._def.schema._parseAsync({
						data: processed,
						path: ctx.path,
						parent: ctx
					});
					if (result.status === "aborted") return INVALID;
					if (result.status === "dirty") return DIRTY(result.value);
					if (status.value === "dirty") return DIRTY(result.value);
					return result;
				});
				else {
					if (status.value === "aborted") return INVALID;
					const result = this._def.schema._parseSync({
						data: processed,
						path: ctx.path,
						parent: ctx
					});
					if (result.status === "aborted") return INVALID;
					if (result.status === "dirty") return DIRTY(result.value);
					if (status.value === "dirty") return DIRTY(result.value);
					return result;
				}
			}
			if (effect.type === "refinement") {
				const executeRefinement = (acc) => {
					const result = effect.refinement(acc, checkCtx);
					if (ctx.common.async) return Promise.resolve(result);
					if (result instanceof Promise) throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
					return acc;
				};
				if (ctx.common.async === false) {
					const inner = this._def.schema._parseSync({
						data: ctx.data,
						path: ctx.path,
						parent: ctx
					});
					if (inner.status === "aborted") return INVALID;
					if (inner.status === "dirty") status.dirty();
					executeRefinement(inner.value);
					return {
						status: status.value,
						value: inner.value
					};
				} else return this._def.schema._parseAsync({
					data: ctx.data,
					path: ctx.path,
					parent: ctx
				}).then((inner) => {
					if (inner.status === "aborted") return INVALID;
					if (inner.status === "dirty") status.dirty();
					return executeRefinement(inner.value).then(() => {
						return {
							status: status.value,
							value: inner.value
						};
					});
				});
			}
			if (effect.type === "transform") if (ctx.common.async === false) {
				const base = this._def.schema._parseSync({
					data: ctx.data,
					path: ctx.path,
					parent: ctx
				});
				if (!isValid(base)) return INVALID;
				const result = effect.transform(base.value, checkCtx);
				if (result instanceof Promise) throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
				return {
					status: status.value,
					value: result
				};
			} else return this._def.schema._parseAsync({
				data: ctx.data,
				path: ctx.path,
				parent: ctx
			}).then((base) => {
				if (!isValid(base)) return INVALID;
				return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
					status: status.value,
					value: result
				}));
			});
			util.assertNever(effect);
		}
	};
	ZodEffects.create = (schema, effect, params) => {
		return new ZodEffects({
			schema,
			typeName: ZodFirstPartyTypeKind.ZodEffects,
			effect,
			...processCreateParams(params)
		});
	};
	ZodEffects.createWithPreprocess = (preprocess, schema, params) => {
		return new ZodEffects({
			schema,
			effect: {
				type: "preprocess",
				transform: preprocess
			},
			typeName: ZodFirstPartyTypeKind.ZodEffects,
			...processCreateParams(params)
		});
	};
	var ZodOptional = class extends ZodType {
		_parse(input) {
			if (this._getType(input) === ZodParsedType.undefined) return OK(void 0);
			return this._def.innerType._parse(input);
		}
		unwrap() {
			return this._def.innerType;
		}
	};
	ZodOptional.create = (type, params) => {
		return new ZodOptional({
			innerType: type,
			typeName: ZodFirstPartyTypeKind.ZodOptional,
			...processCreateParams(params)
		});
	};
	var ZodNullable = class extends ZodType {
		_parse(input) {
			if (this._getType(input) === ZodParsedType.null) return OK(null);
			return this._def.innerType._parse(input);
		}
		unwrap() {
			return this._def.innerType;
		}
	};
	ZodNullable.create = (type, params) => {
		return new ZodNullable({
			innerType: type,
			typeName: ZodFirstPartyTypeKind.ZodNullable,
			...processCreateParams(params)
		});
	};
	var ZodDefault = class extends ZodType {
		_parse(input) {
			const { ctx } = this._processInputParams(input);
			let data = ctx.data;
			if (ctx.parsedType === ZodParsedType.undefined) data = this._def.defaultValue();
			return this._def.innerType._parse({
				data,
				path: ctx.path,
				parent: ctx
			});
		}
		removeDefault() {
			return this._def.innerType;
		}
	};
	ZodDefault.create = (type, params) => {
		return new ZodDefault({
			innerType: type,
			typeName: ZodFirstPartyTypeKind.ZodDefault,
			defaultValue: typeof params.default === "function" ? params.default : () => params.default,
			...processCreateParams(params)
		});
	};
	var ZodCatch = class extends ZodType {
		_parse(input) {
			const { ctx } = this._processInputParams(input);
			const newCtx = {
				...ctx,
				common: {
					...ctx.common,
					issues: []
				}
			};
			const result = this._def.innerType._parse({
				data: newCtx.data,
				path: newCtx.path,
				parent: { ...newCtx }
			});
			if (isAsync(result)) return result.then((result) => {
				return {
					status: "valid",
					value: result.status === "valid" ? result.value : this._def.catchValue({
						get error() {
							return new ZodError(newCtx.common.issues);
						},
						input: newCtx.data
					})
				};
			});
			else return {
				status: "valid",
				value: result.status === "valid" ? result.value : this._def.catchValue({
					get error() {
						return new ZodError(newCtx.common.issues);
					},
					input: newCtx.data
				})
			};
		}
		removeCatch() {
			return this._def.innerType;
		}
	};
	ZodCatch.create = (type, params) => {
		return new ZodCatch({
			innerType: type,
			typeName: ZodFirstPartyTypeKind.ZodCatch,
			catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
			...processCreateParams(params)
		});
	};
	var ZodNaN = class extends ZodType {
		_parse(input) {
			if (this._getType(input) !== ZodParsedType.nan) {
				const ctx = this._getOrReturnCtx(input);
				addIssueToContext(ctx, {
					code: ZodIssueCode.invalid_type,
					expected: ZodParsedType.nan,
					received: ctx.parsedType
				});
				return INVALID;
			}
			return {
				status: "valid",
				value: input.data
			};
		}
	};
	ZodNaN.create = (params) => {
		return new ZodNaN({
			typeName: ZodFirstPartyTypeKind.ZodNaN,
			...processCreateParams(params)
		});
	};
	var ZodBranded = class extends ZodType {
		_parse(input) {
			const { ctx } = this._processInputParams(input);
			const data = ctx.data;
			return this._def.type._parse({
				data,
				path: ctx.path,
				parent: ctx
			});
		}
		unwrap() {
			return this._def.type;
		}
	};
	var ZodPipeline = class ZodPipeline extends ZodType {
		_parse(input) {
			const { status, ctx } = this._processInputParams(input);
			if (ctx.common.async) {
				const handleAsync = async () => {
					const inResult = await this._def.in._parseAsync({
						data: ctx.data,
						path: ctx.path,
						parent: ctx
					});
					if (inResult.status === "aborted") return INVALID;
					if (inResult.status === "dirty") {
						status.dirty();
						return DIRTY(inResult.value);
					} else return this._def.out._parseAsync({
						data: inResult.value,
						path: ctx.path,
						parent: ctx
					});
				};
				return handleAsync();
			} else {
				const inResult = this._def.in._parseSync({
					data: ctx.data,
					path: ctx.path,
					parent: ctx
				});
				if (inResult.status === "aborted") return INVALID;
				if (inResult.status === "dirty") {
					status.dirty();
					return {
						status: "dirty",
						value: inResult.value
					};
				} else return this._def.out._parseSync({
					data: inResult.value,
					path: ctx.path,
					parent: ctx
				});
			}
		}
		static create(a, b) {
			return new ZodPipeline({
				in: a,
				out: b,
				typeName: ZodFirstPartyTypeKind.ZodPipeline
			});
		}
	};
	var ZodReadonly = class extends ZodType {
		_parse(input) {
			const result = this._def.innerType._parse(input);
			const freeze = (data) => {
				if (isValid(data)) data.value = Object.freeze(data.value);
				return data;
			};
			return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
		}
		unwrap() {
			return this._def.innerType;
		}
	};
	ZodReadonly.create = (type, params) => {
		return new ZodReadonly({
			innerType: type,
			typeName: ZodFirstPartyTypeKind.ZodReadonly,
			...processCreateParams(params)
		});
	};
	function cleanParams(params, data) {
		const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
		return typeof p === "string" ? { message: p } : p;
	}
	function custom(check, _params = {}, fatal) {
		if (check) return ZodAny.create().superRefine((data, ctx) => {
			const r = check(data);
			if (r instanceof Promise) return r.then((r) => {
				if (!r) {
					const params = cleanParams(_params, data);
					const _fatal = params.fatal ?? fatal ?? true;
					ctx.addIssue({
						code: "custom",
						...params,
						fatal: _fatal
					});
				}
			});
			if (!r) {
				const params = cleanParams(_params, data);
				const _fatal = params.fatal ?? fatal ?? true;
				ctx.addIssue({
					code: "custom",
					...params,
					fatal: _fatal
				});
			}
		});
		return ZodAny.create();
	}
	ZodObject.lazycreate;
	var ZodFirstPartyTypeKind;
	(function(ZodFirstPartyTypeKind) {
		ZodFirstPartyTypeKind["ZodString"] = "ZodString";
		ZodFirstPartyTypeKind["ZodNumber"] = "ZodNumber";
		ZodFirstPartyTypeKind["ZodNaN"] = "ZodNaN";
		ZodFirstPartyTypeKind["ZodBigInt"] = "ZodBigInt";
		ZodFirstPartyTypeKind["ZodBoolean"] = "ZodBoolean";
		ZodFirstPartyTypeKind["ZodDate"] = "ZodDate";
		ZodFirstPartyTypeKind["ZodSymbol"] = "ZodSymbol";
		ZodFirstPartyTypeKind["ZodUndefined"] = "ZodUndefined";
		ZodFirstPartyTypeKind["ZodNull"] = "ZodNull";
		ZodFirstPartyTypeKind["ZodAny"] = "ZodAny";
		ZodFirstPartyTypeKind["ZodUnknown"] = "ZodUnknown";
		ZodFirstPartyTypeKind["ZodNever"] = "ZodNever";
		ZodFirstPartyTypeKind["ZodVoid"] = "ZodVoid";
		ZodFirstPartyTypeKind["ZodArray"] = "ZodArray";
		ZodFirstPartyTypeKind["ZodObject"] = "ZodObject";
		ZodFirstPartyTypeKind["ZodUnion"] = "ZodUnion";
		ZodFirstPartyTypeKind["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion";
		ZodFirstPartyTypeKind["ZodIntersection"] = "ZodIntersection";
		ZodFirstPartyTypeKind["ZodTuple"] = "ZodTuple";
		ZodFirstPartyTypeKind["ZodRecord"] = "ZodRecord";
		ZodFirstPartyTypeKind["ZodMap"] = "ZodMap";
		ZodFirstPartyTypeKind["ZodSet"] = "ZodSet";
		ZodFirstPartyTypeKind["ZodFunction"] = "ZodFunction";
		ZodFirstPartyTypeKind["ZodLazy"] = "ZodLazy";
		ZodFirstPartyTypeKind["ZodLiteral"] = "ZodLiteral";
		ZodFirstPartyTypeKind["ZodEnum"] = "ZodEnum";
		ZodFirstPartyTypeKind["ZodEffects"] = "ZodEffects";
		ZodFirstPartyTypeKind["ZodNativeEnum"] = "ZodNativeEnum";
		ZodFirstPartyTypeKind["ZodOptional"] = "ZodOptional";
		ZodFirstPartyTypeKind["ZodNullable"] = "ZodNullable";
		ZodFirstPartyTypeKind["ZodDefault"] = "ZodDefault";
		ZodFirstPartyTypeKind["ZodCatch"] = "ZodCatch";
		ZodFirstPartyTypeKind["ZodPromise"] = "ZodPromise";
		ZodFirstPartyTypeKind["ZodBranded"] = "ZodBranded";
		ZodFirstPartyTypeKind["ZodPipeline"] = "ZodPipeline";
		ZodFirstPartyTypeKind["ZodReadonly"] = "ZodReadonly";
	})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
	var stringType = ZodString.create;
	var numberType = ZodNumber.create;
	ZodNaN.create;
	ZodBigInt.create;
	var booleanType = ZodBoolean.create;
	ZodDate.create;
	var symbolType = ZodSymbol.create;
	var undefinedType = ZodUndefined.create;
	var nullType = ZodNull.create;
	var anyType = ZodAny.create;
	ZodUnknown.create;
	ZodNever.create;
	ZodVoid.create;
	var arrayType = ZodArray.create;
	var objectType = ZodObject.create;
	var strictObjectType = ZodObject.strictCreate;
	var unionType = ZodUnion.create;
	var discriminatedUnionType = ZodDiscriminatedUnion.create;
	ZodIntersection.create;
	var tupleType = ZodTuple.create;
	var recordType = ZodRecord.create;
	ZodMap.create;
	ZodSet.create;
	ZodFunction.create;
	var lazyType = ZodLazy.create;
	var literalType = ZodLiteral.create;
	var enumType = ZodEnum.create;
	ZodNativeEnum.create;
	ZodPromise.create;
	ZodEffects.create;
	ZodOptional.create;
	ZodNullable.create;
	ZodEffects.createWithPreprocess;
	ZodPipeline.create;
	var NEVER = INVALID;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js
	/** `Object#toString` result references. */
	var objectTag$1 = "[object Object]";
	/** Used for built-in method references. */
	var funcProto = Function.prototype, objectProto = Object.prototype;
	/** Used to resolve the decompiled source of functions. */
	var funcToString = funcProto.toString;
	/** Used to check objects for own properties. */
	var hasOwnProperty$2 = objectProto.hasOwnProperty;
	/** Used to infer the `Object` constructor. */
	var objectCtorString = funcToString.call(Object);
	/**
	* Checks if `value` is a plain object, that is, an object created by the
	* `Object` constructor or one with a `[[Prototype]]` of `null`.
	*
	* @static
	* @memberOf _
	* @since 0.8.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
	* @example
	*
	* function Foo() {
	*   this.a = 1;
	* }
	*
	* _.isPlainObject(new Foo);
	* // => false
	*
	* _.isPlainObject([1, 2, 3]);
	* // => false
	*
	* _.isPlainObject({ 'x': 0, 'y': 0 });
	* // => true
	*
	* _.isPlainObject(Object.create(null));
	* // => true
	*/
	function isPlainObject(value) {
		if (!isObjectLike(value) || baseGetTag(value) != objectTag$1) return false;
		var proto = getPrototype(value);
		if (proto === null) return true;
		var Ctor = hasOwnProperty$2.call(proto, "constructor") && proto.constructor;
		return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isElement.js
	/**
	* Checks if `value` is likely a DOM element.
	*
	* @static
	* @memberOf _
	* @since 0.1.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
	* @example
	*
	* _.isElement(document.body);
	* // => true
	*
	* _.isElement('<body>');
	* // => false
	*/
	function isElement(value) {
		return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
	}
	//#endregion
	//#region shared/utils/schemas.js
	var Literal = unionType([
		stringType(),
		numberType(),
		booleanType(),
		nullType(),
		undefinedType()
	]);
	var Defined = anyType().refine((v) => v !== void 0, { message: "Must be defined" });
	var ArrayOrSingleSchema = (value) => unionType([arrayType(value), value]);
	var formatValuesList = (arr, separator = ", ") => arr.map((i) => `'${i}'`).join(separator);
	var FunctionSchema = custom((v) => typeof v === "function", "Input is not a function");
	var DOMElementSchema = custom(isElement, "Input is not an Element");
	//#endregion
	//#region shared/animation/schemas/injects/lazy.js
	var lazyInjectSymbol = Symbol("lazyInject");
	var generatedLazyInjectSymbol = Symbol("generatedLazyInject");
	var LazyInjectSchema = objectType({
		symbol: literalType(lazyInjectSymbol),
		name: stringType(),
		generator: FunctionSchema
	});
	function wrapLazyInject(name, generator) {
		return {
			symbol: lazyInjectSymbol,
			name,
			generator
		};
	}
	function isLazyInject(value) {
		return value?.symbol === lazyInjectSymbol;
	}
	//#endregion
	//#region shared/animation/deepMap.js
	function baseStopPropagation(value) {
		return isElement(value) || isSourceMap(value) || isLazyInject(value);
	}
	function deepMap(obj, callback, { stopPropagation = baseStopPropagation, path = [] } = {}) {
		if (typeof obj === "object" && obj !== null && !stopPropagation(obj)) {
			obj = Array.isArray(obj) ? [...obj] : { ...obj };
			for (const key in obj) obj[key] = deepMap(obj[key], callback, {
				stopPropagation,
				path: path.concat(key)
			});
		}
		const issues = [];
		const addIssue = ({ code = "custom", path: issuePath = [], message, params }) => issues.push({
			code,
			path: path.concat(issuePath),
			message,
			params
		});
		const value = callback(obj, {
			path,
			addIssue
		});
		if (issues.length) throw new ZodError(issues);
		return value;
	}
	//#endregion
	//#region shared/animation/sourceMap.js
	var SOURCE_MAP_KEY = "__sourceMap";
	var IS_SOURCE_MAP_KEY = "__isSourceMap";
	var SELF_KEY = "__self";
	var reservedKeys$1 = [
		SOURCE_MAP_KEY,
		IS_SOURCE_MAP_KEY,
		SELF_KEY
	];
	var sourceMapSymbol = Symbol("sourceMap");
	var SourceMapSchema = objectType({ [IS_SOURCE_MAP_KEY]: literalType(sourceMapSymbol) }).passthrough();
	var SourceMappedObjectSchema = objectType({ [SOURCE_MAP_KEY]: SourceMapSchema.optional() });
	function buildSourceMap(target = {}, path = void 0) {
		return Object.fromEntries([
			[IS_SOURCE_MAP_KEY, sourceMapSymbol],
			[SELF_KEY, path],
			...Object.keys(target).map((key) => [key, (path ?? []).concat(key)])
		]);
	}
	function storeSourceMap(target, path = void 0) {
		target[SOURCE_MAP_KEY] = buildSourceMap(target, path);
		return target;
	}
	function isSourceMap(value) {
		return value?.[IS_SOURCE_MAP_KEY] === sourceMapSymbol;
	}
	function hasSourceMap(value) {
		return typeof value === "object" && value !== null && isSourceMap(value["__sourceMap"]);
	}
	function getSourceMap(value) {
		return hasSourceMap(value) ? value[SOURCE_MAP_KEY] : void 0;
	}
	function getSourcePath(target, key) {
		return getSourceMap(target)?.[key];
	}
	function toSourcePath(data, path = [], options = {}) {
		const { useSelf = false } = options;
		return getSourcePath(getPath$2(data, path.slice(0, -1)), path[path.length - 1] ?? (useSelf ? "__self" : void 0));
	}
	function clearSourceMap(value) {
		if (hasSourceMap(value)) delete value[SOURCE_MAP_KEY];
		return value;
	}
	function clearSourceMapDeep(value) {
		return deepMap(value, (value) => {
			if (isSourceMap(value)) return value;
			clearSourceMap(value);
			return value;
		});
	}
	function sourceMappedObjectEntries(value) {
		return Object.entries(value).filter(([key]) => key !== SOURCE_MAP_KEY);
	}
	function sourceMappedObjectAssign(target, ...source) {
		if (!hasSourceMap(target)) target[SOURCE_MAP_KEY] = buildSourceMap();
		source.forEach((source) => {
			const sourceMap = getSourceMap(source);
			sourceMappedObjectEntries(source).forEach(([key, value]) => {
				target[key] = value;
				const sourcePath = sourceMap?.[key];
				if (sourcePath === void 0) delete target[SOURCE_MAP_KEY][key];
				else target[SOURCE_MAP_KEY][key] = sourcePath;
			});
		});
		return target;
	}
	function sourceMappedPick(obj, keys = []) {
		const value = pick(obj, [SOURCE_MAP_KEY].concat(keys));
		if (hasSourceMap(value)) value[SOURCE_MAP_KEY] = pick(getSourceMap(value), [IS_SOURCE_MAP_KEY, SELF_KEY].concat(keys));
		return value;
	}
	function sourceMappedOmit(obj, keys = []) {
		const value = omit(obj, keys.filter((key) => key !== SOURCE_MAP_KEY));
		if (hasSourceMap(value)) value[SOURCE_MAP_KEY] = omit(getSourceMap(value), keys.filter((key) => ![IS_SOURCE_MAP_KEY, SELF_KEY].includes(key)));
		return value;
	}
	//#endregion
	//#region shared/utils/json.js
	function getKey(key) {
		const intKey = parseInt(key);
		return intKey.toString() === key ? intKey : key;
	}
	function parsePath(path) {
		if (!path.startsWith("/")) throw new Error("JSON Pointer must begin with `/`");
		return path.split("/").slice(1).map((k) => k.replaceAll("~0", "~").replaceAll("~1", "/"));
	}
	function getPath$1(obj, path) {
		if (typeof path === "string") return getPath$1(obj, parsePath(path));
		if (!path.length) return obj;
		if (typeof obj !== "object" || obj === null) return void 0;
		const [key, ...rest] = path;
		return getPath$1(obj[getKey(key)], rest);
	}
	function toPath(path) {
		if (!path?.length) return "";
		return "/" + path.map((k) => String(k).replaceAll("~", "~0").replaceAll("/", "~1")).join("/");
	}
	function positionToLineColumn(content, position) {
		let lineBreaks = 0, lastLineBreakPosition = -1;
		for (let i = 0; i < position; i++) {
			if (content.charAt(i) !== "\n") continue;
			lineBreaks += 1;
			lastLineBreakPosition = i;
		}
		return {
			line: lineBreaks,
			column: position - lastLineBreakPosition - 1
		};
	}
	function visualizePosition(content, start, end = void 0, options = {}) {
		const { lineClamp = 2 } = options;
		const { line, column } = start;
		const lineCounterLength = String(line + lineClamp + 1).length;
		const startLine = Math.max(line - lineClamp, 0);
		const lines = content.slice(startLine, line + lineClamp + 1).map((l, i) => `${startLine + i + 1}`.padStart(lineCounterLength) + "│" + l);
		lines.splice(line - startLine + 1, 0, " ".repeat(lineCounterLength) + "│" + " ".repeat(column) + "^".repeat(line === end?.line ? end.column - column : 1));
		const viewWidth = Math.max(...lines.map((l) => l.length));
		const border = (cornerLeft, center, cornerRight) => cornerLeft + "─".repeat(lineCounterLength) + center + "─".repeat(viewWidth - lineCounterLength) + cornerRight;
		return [
			border("┌", "┬", "┐"),
			...lines.map((l) => "│" + l.padEnd(viewWidth) + " │"),
			border("└", "┴", "┘")
		].join("\n");
	}
	function visualizeAddonPath(addon, path, options = {}) {
		const { pointAt = "value" } = options;
		if (Array.isArray(path)) path = toPath(path);
		const pointer = addon.pointers?.[path] ?? {};
		const start = pointer[pointAt];
		const end = pointer[pointAt + "End"];
		if (!start) return;
		return visualizePosition(addon.fileContent, start, end, options);
	}
	function visualizeAddonParseError(addon, error, rawContent, options = {}) {
		const [, position] = error.message.match(/at position (\d+)/) ?? [];
		if (typeof position !== "string") return;
		const { line, column } = positionToLineColumn(rawContent, +position) ?? {};
		if (typeof line !== "number") return;
		return visualizePosition(addon.fileContent, {
			line,
			column
		}, void 0, options);
	}
	function formatAddonParseError(addon, error, rawContent) {
		let message = "\n• " + error.message;
		const visualized = visualizeAddonParseError(addon, error, rawContent);
		if (visualized) message += indent("\n" + visualized + "\n");
		return message;
	}
	//#endregion
	//#region shared/animation/zod.js
	function stripInject(path) {
		return path[path.length - 1] === "inject" ? path.slice(0, -1) : path;
	}
	function visualizeAddonZodIssue(addon, issue, options = {}) {
		const { path = issue.path, maxCodeBlocks = 2 } = options;
		switch (issue.code) {
			case ZodIssueCode.unrecognized_keys: return issue.keys.map((key) => visualizeAddonPath(addon, path.concat(key), { pointAt: "key" })).filter(Boolean).slice(0, maxCodeBlocks).concat(issue.keys.length > maxCodeBlocks ? `... ${issue.keys.length - maxCodeBlocks} more` : []).join("\n");
			default: return visualizeAddonPath(addon, path, issue.params);
		}
	}
	function formatZodError(error, options = {}) {
		const { pack, data = pack, context, path = context?.path ?? [], received = !!data, sourceMap = {}, docs = null } = options;
		let message = "\n" + error.issues.map((issue) => {
			const relativePath = issue.path.slice(path.length);
			const sourcePath = toSourcePath(data, relativePath, sourceMap) ?? issue.path;
			let message = `• ${issue.message} at "${toPath(sourcePath)}"`;
			if (received && !("received" in (issue.params ?? {}))) {
				issue.params ??= {};
				issue.params.received = getPath$2(data, stripInject(relativePath));
			}
			if (issue.unionErrors) message += indent(issue.unionErrors.map((e) => formatZodError(e, {
				...options,
				received: false
			})).join(`\nOR`));
			if (!issue.unionErrors && pack) {
				const visualized = visualizeAddonZodIssue(pack, issue, { path: sourcePath });
				if (visualized) message += indent("\n" + visualized);
			}
			if ("args" in (issue.params ?? {})) message += indent(`\n↪ Received arguments: ` + indent("(" + (0, import_object_inspect.default)(sanitizeInjectable(issue.params.args), { indent: 2 }).slice(1, -1) + ")").trim());
			else if ("received" in (issue.params ?? {})) message += indent(`\n↪ Received: ` + indent((0, import_object_inspect.default)(sanitizeInjectable(issue.params.received), { indent: 2 })).trim());
			if (issue.params?.error) message += indent(`\n↪ Original error: ` + issue.params.error.stack);
			return message;
		}).join("\n");
		if (docs) message += indent(`\n↪ See documentation: ` + docs);
		return message;
	}
	function zodTransformErrorBoundary(transformFn) {
		return (value, ctx) => {
			try {
				return transformFn(value, ctx);
			} catch (error) {
				ctx.addIssue({
					code: ZodIssueCode.custom,
					message: error.message,
					params: {
						error,
						received: value
					}
				});
				return NEVER;
			}
		};
	}
	//#endregion
	//#region shared/animation/schemas/TrustedFunctionSchema.js
	var trustedFunctionSymbol = Symbol("trustedFunction");
	function trust(fn) {
		fn[trustedFunctionSymbol] = true;
		return fn;
	}
	var TrustedFunctionSchema = FunctionSchema.superRefine((value, ctx) => {
		if (!value[trustedFunctionSymbol]) ctx.addIssue({
			code: ZodIssueCode.custom,
			message: "Untrusted function",
			params: { received: value }
		});
	});
	//#endregion
	//#region shared/animation/utils.js
	function buildStyles(styles) {
		return Object.entries(styles).reduce((str, [name, value]) => str + `    ${name.trim()}: ${String(value).trim()};\n`, "");
	}
	function buildCSS(data, transformSelector = (s) => s) {
		return Object.entries(data).reduce((css, [selector, styles], index) => css + `${transformSelector(selector.trim(), index)} {\n${buildStyles(styles)}}\n`, "\n");
	}
	function executeWithZod(value, fn, context, options = {}) {
		const { path = [] } = options;
		try {
			return anyType().transform(fn).parse(value, { path });
		} catch (error) {
			context.onError(new AnimationError(context.animation, formatZodError(error, {
				pack: context.pack,
				data: value,
				context,
				path
			}), {
				module: context.module,
				pack: context.pack,
				type: context.type,
				context
			}));
			context.instance.cancel(true);
		}
	}
	var zodErrorBoundarySymbol = Symbol("zodErrorBoundary");
	function zodErrorBoundary(fn, context, options = {}) {
		const { name = "untitled", ...opts } = options;
		const boundary = (...args) => executeWithZod(args, (args, ctx) => {
			try {
				return fn(...args);
			} catch (error) {
				ctx.addIssue({
					code: ZodIssueCode.custom,
					message: `An error occurred while executing ${name ? `'${name}'` : "an external function"}`,
					params: {
						error,
						args
					}
				});
				return NEVER;
			}
		}, context, opts);
		boundary[zodErrorBoundarySymbol] = name;
		return trust(boundary);
	}
	/**
	* anime.js - ESM
	* @version v4.1.4
	* @author Julian Garnier
	* @license MIT
	* @copyright (c) 2025 Julian Garnier
	* @see https://animejs.com
	*/
	/**
	* @typedef {Object} DefaultsParams
	* @property {Number|String} [id]
	* @property {PercentageKeyframes|DurationKeyframes} [keyframes]
	* @property {EasingParam} [playbackEase]
	* @property {Number} [playbackRate]
	* @property {Number} [frameRate]
	* @property {Number|Boolean} [loop]
	* @property {Boolean} [reversed]
	* @property {Boolean} [alternate]
	* @property {Boolean|ScrollObserver} [autoplay]
	* @property {Number|FunctionValue} [duration]
	* @property {Number|FunctionValue} [delay]
	* @property {Number} [loopDelay]
	* @property {EasingParam} [ease]
	* @property {'none'|'replace'|'blend'|compositionTypes} [composition]
	* @property {(v: any) => any} [modifier]
	* @property {(tickable: Tickable) => void} [onBegin]
	* @property {(tickable: Tickable) => void} [onBeforeUpdate]
	* @property {(tickable: Tickable) => void} [onUpdate]
	* @property {(tickable: Tickable) => void} [onLoop]
	* @property {(tickable: Tickable) => void} [onPause]
	* @property {(tickable: Tickable) => void} [onComplete]
	* @property {(renderable: Renderable) => void} [onRender]
	*/
	/** @typedef {JSAnimation|Timeline} Renderable */
	/** @typedef {Timer|Renderable} Tickable */
	/** @typedef {Timer&JSAnimation&Timeline} CallbackArgument */
	/** @typedef {Animatable|Tickable|WAAPIAnimation|Draggable|ScrollObserver|TextSplitter|Scope} Revertible */
	/**
	* @template T
	* @callback StaggerFunction
	* @param {Target} [target]
	* @param {Number} [index]
	* @param {Number} [length]
	* @param {Timeline} [tl]
	* @return {T}
	*/
	/**
	* @typedef  {Object} StaggerParams
	* @property {Number|String} [start]
	* @property {Number|'first'|'center'|'last'|'random'} [from]
	* @property {Boolean} [reversed]
	* @property {Array.<Number>} [grid]
	* @property {('x'|'y')} [axis]
	* @property {String|((target: Target, i: Number, length: Number) => Number)} [use]
	* @property {Number} [total]
	* @property {EasingParam} [ease]
	* @property {TweenModifier} [modifier]
	*/
	/**
	* @callback EasingFunction
	* @param {Number} time
	* @return {Number}
	*/
	/**
	* @typedef {('linear'|'linear(x1, x2 25%, x3)'|'in'|'out'|'inOut'|'inQuad'|'outQuad'|'inOutQuad'|'inCubic'|'outCubic'|'inOutCubic'|'inQuart'|'outQuart'|'inOutQuart'|'inQuint'|'outQuint'|'inOutQuint'|'inSine'|'outSine'|'inOutSine'|'inCirc'|'outCirc'|'inOutCirc'|'inExpo'|'outExpo'|'inOutExpo'|'inBounce'|'outBounce'|'inOutBounce'|'inBack'|'outBack'|'inOutBack'|'inElastic'|'outElastic'|'inOutElastic'|'irregular'|'cubicBezier'|'steps'|'in(p = 1.675)'|'out(p = 1.675)'|'inOut(p = 1.675)'|'inBack(overshoot = 1.70158)'|'outBack(overshoot = 1.70158)'|'inOutBack(overshoot = 1.70158)'|'inElastic(amplitude = 1, period = .3)'|'outElastic(amplitude = 1, period = .3)'|'inOutElastic(amplitude = 1, period = .3)'|'irregular(length = 10, randomness = 1)'|'cubicBezier(x1, y1, x2, y2)'|'steps(steps = 10)')} EaseStringParamNames
	*/
	/** @typedef {(String & {})|EaseStringParamNames|EasingFunction|Spring} EasingParam */
	/** @typedef {HTMLElement|SVGElement} DOMTarget */
	/** @typedef {Record<String, any>} JSTarget */
	/** @typedef {DOMTarget|JSTarget} Target */
	/** @typedef {Target|NodeList|String} TargetSelector */
	/** @typedef {DOMTarget|NodeList|String} DOMTargetSelector */
	/** @typedef {Array.<DOMTargetSelector>|DOMTargetSelector} DOMTargetsParam */
	/** @typedef {Array.<DOMTarget>} DOMTargetsArray */
	/** @typedef {Array.<JSTarget>|JSTarget} JSTargetsParam */
	/** @typedef {Array.<JSTarget>} JSTargetsArray */
	/** @typedef {Array.<TargetSelector>|TargetSelector} TargetsParam */
	/** @typedef {Array.<Target>} TargetsArray */
	/**
	* @typedef {Object} SpringParams
	* @property {Number} [mass=1] - Mass, default 1
	* @property {Number} [stiffness=100] - Stiffness, default 100
	* @property {Number} [damping=10] - Damping, default 10
	* @property {Number} [velocity=0] - Initial velocity, default 0
	*/
	/**
	* @template T
	* @callback Callback
	* @param {T} self - Returns itself
	* @param {PointerEvent} [e]
	* @return {*}
	*/
	/**
	* @template {object} T
	* @typedef {Object} TickableCallbacks
	* @property {Callback<T>} [onBegin]
	* @property {Callback<T>} [onBeforeUpdate]
	* @property {Callback<T>} [onUpdate]
	* @property {Callback<T>} [onLoop]
	* @property {Callback<T>} [onPause]
	* @property {Callback<T>} [onComplete]
	*/
	/**
	* @template {object} T
	* @typedef {Object} RenderableCallbacks
	* @property {Callback<T>} [onRender]
	*/
	/**
	* @typedef {Object} TimerOptions
	* @property {Number|String} [id]
	* @property {TweenParamValue} [duration]
	* @property {TweenParamValue} [delay]
	* @property {Number} [loopDelay]
	* @property {Boolean} [reversed]
	* @property {Boolean} [alternate]
	* @property {Boolean|Number} [loop]
	* @property {Boolean|ScrollObserver} [autoplay]
	* @property {Number} [frameRate]
	* @property {Number} [playbackRate]
	*/
	/**
	
/**
	* @typedef {TimerOptions & TickableCallbacks<Timer>} TimerParams
	*/
	/**
	* @callback FunctionValue
	* @param {Target} target - The animated target
	* @param {Number} index - The target index
	* @param {Number} length - The total number of animated targets
	* @return {Number|String|TweenObjectValue|Array.<Number|String|TweenObjectValue>}
	*/
	/**
	* @callback TweenModifier
	* @param {Number} value - The animated value
	* @return {Number|String}
	*/
	/** @typedef {[Number, Number, Number, Number]} ColorArray */
	/**
	* @typedef {Object} Tween
	* @property {Number} id
	* @property {JSAnimation} parent
	* @property {String} property
	* @property {Target} target
	* @property {String|Number} _value
	* @property {Function|null} _func
	* @property {EasingFunction} _ease
	* @property {Array.<Number>} _fromNumbers
	* @property {Array.<Number>} _toNumbers
	* @property {Array.<String>} _strings
	* @property {Number} _fromNumber
	* @property {Number} _toNumber
	* @property {Array.<Number>} _numbers
	* @property {Number} _number
	* @property {String} _unit
	* @property {TweenModifier} _modifier
	* @property {Number} _currentTime
	* @property {Number} _delay
	* @property {Number} _updateDuration
	* @property {Number} _startTime
	* @property {Number} _changeDuration
	* @property {Number} _absoluteStartTime
	* @property {tweenTypes} _tweenType
	* @property {valueTypes} _valueType
	* @property {Number} _composition
	* @property {Number} _isOverlapped
	* @property {Number} _isOverridden
	* @property {Number} _renderTransforms
	* @property {Tween} _prevRep
	* @property {Tween} _nextRep
	* @property {Tween} _prevAdd
	* @property {Tween} _nextAdd
	* @property {Tween} _prev
	* @property {Tween} _next
	*/
	/**
	* @typedef TweenDecomposedValue
	* @property {Number} t - Type
	* @property {Number} n - Single number value
	* @property {String} u - Value unit
	* @property {String} o - Value operator
	* @property {Array.<Number>} d - Array of Numbers (in case of complex value type)
	* @property {Array.<String>} s - Strings (in case of complex value type)
	*/
	/** @typedef {{_head: null|Tween, _tail: null|Tween}} TweenPropertySiblings */
	/** @typedef {Record<String, TweenPropertySiblings>} TweenLookups */
	/** @typedef {WeakMap.<Target, TweenLookups>} TweenReplaceLookups */
	/** @typedef {Map.<Target, TweenLookups>} TweenAdditiveLookups */
	/**
	* @typedef {Number|String|FunctionValue} TweenParamValue
	*/
	/**
	* @typedef {TweenParamValue|[TweenParamValue, TweenParamValue]} TweenPropValue
	*/
	/**
	* @typedef {(String & {})|'none'|'replace'|'blend'|compositionTypes} TweenComposition
	*/
	/**
	* @typedef {Object} TweenParamsOptions
	* @property {TweenParamValue} [duration]
	* @property {TweenParamValue} [delay]
	* @property {EasingParam} [ease]
	* @property {TweenModifier} [modifier]
	* @property {TweenComposition} [composition]
	*/
	/**
	* @typedef {Object} TweenValues
	* @property {TweenParamValue} [from]
	* @property {TweenPropValue} [to]
	* @property {TweenPropValue} [fromTo]
	*/
	/**
	* @typedef {TweenParamsOptions & TweenValues} TweenKeyValue
	*/
	/**
	* @typedef {Array.<TweenKeyValue|TweenPropValue>} ArraySyntaxValue
	*/
	/**
	* @typedef {TweenParamValue|ArraySyntaxValue|TweenKeyValue} TweenOptions
	*/
	/**
	* @typedef {Partial<{to: TweenParamValue|Array.<TweenParamValue>; from: TweenParamValue|Array.<TweenParamValue>; fromTo: TweenParamValue|Array.<TweenParamValue>;}>} TweenObjectValue
	*/
	/**
	* @typedef {Object} PercentageKeyframeOptions
	* @property {EasingParam} [ease]
	*/
	/**
	* @typedef {Record<String, TweenParamValue>} PercentageKeyframeParams
	*/
	/**
	* @typedef {Record<String, PercentageKeyframeParams & PercentageKeyframeOptions>} PercentageKeyframes
	*/
	/**
	* @typedef {Array<Record<String, TweenOptions | TweenModifier | boolean> & TweenParamsOptions>} DurationKeyframes
	*/
	/**
	* @typedef {Object} AnimationOptions
	* @property {PercentageKeyframes|DurationKeyframes} [keyframes]
	* @property {EasingParam} [playbackEase]
	*/
	/**
	* @typedef {Record<String, TweenOptions | Callback<JSAnimation> | TweenModifier | boolean | PercentageKeyframes | DurationKeyframes | ScrollObserver> & TimerOptions & AnimationOptions & TweenParamsOptions & TickableCallbacks<JSAnimation> & RenderableCallbacks<JSAnimation>} AnimationParams
	*/
	/**
	* Accepts:<br>
	* - `Number` - Absolute position in milliseconds (e.g., `500` places element at exactly 500ms)<br>
	* - `'+=Number'` - Addition: Position element X ms after the last element (e.g., `'+=100'`)<br>
	* - `'-=Number'` - Subtraction: Position element X ms before the last element's end (e.g., `'-=100'`)<br>
	* - `'*=Number'` - Multiplier: Position element at a fraction of the total duration (e.g., `'*=.5'` for halfway)<br>
	* - `'<'` - Previous end: Position element at the end position of the previous element<br>
	* - `'<<'` - Previous start: Position element at the start position of the previous element<br>
	* - `'<<+=Number'` - Combined: Position element relative to previous element's start (e.g., `'<<+=250'`)<br>
	* - `'label'` - Label: Position element at a named label position (e.g., `'My Label'`)
	*
	* @typedef {Number|`+=${Number}`|`-=${Number}`|`*=${Number}`|'<'|'<<'|`<<+=${Number}`|`<<-=${Number}`|String} TimelinePosition
	*/
	/**
	* Accepts:<br>
	* - `Number` - Absolute position in milliseconds (e.g., `500` places animation at exactly 500ms)<br>
	* - `'+=Number'` - Addition: Position animation X ms after the last animation (e.g., `'+=100'`)<br>
	* - `'-=Number'` - Subtraction: Position animation X ms before the last animation's end (e.g., `'-=100'`)<br>
	* - `'*=Number'` - Multiplier: Position animation at a fraction of the total duration (e.g., `'*=.5'` for halfway)<br>
	* - `'<'` - Previous end: Position animation at the end position of the previous animation<br>
	* - `'<<'` - Previous start: Position animation at the start position of the previous animation<br>
	* - `'<<+=Number'` - Combined: Position animation relative to previous animation's start (e.g., `'<<+=250'`)<br>
	* - `'label'` - Label: Position animation at a named label position (e.g., `'My Label'`)<br>
	* - `stagger(String|Nummber)` - Stagger multi-elements animation positions (e.g., 10, 20, 30...)
	*
	* @typedef {TimelinePosition | StaggerFunction<Number|String>} TimelineAnimationPosition
	*/
	/**
	* @typedef {Object} TimelineOptions
	* @property {DefaultsParams} [defaults]
	* @property {EasingParam} [playbackEase]
	*/
	/**
	* @typedef {TimerOptions & TimelineOptions & TickableCallbacks<Timeline> & RenderableCallbacks<Timeline>} TimelineParams
	*/
	/**
	* @typedef {String|Number|Array<String>|Array<Number>} WAAPITweenValue
	*/
	/**
	* @callback WAAPIFunctionValue
	* @param {DOMTarget} target - The animated target
	* @param {Number} index - The target index
	* @param {Number} length - The total number of animated targets
	* @return {WAAPITweenValue}
	*/
	/**
	* @typedef {WAAPITweenValue|WAAPIFunctionValue|Array<String|Number|WAAPIFunctionValue>} WAAPIKeyframeValue
	*/
	/**
	* @typedef {(animation: WAAPIAnimation) => void} WAAPICallback
	*/
	/**
	* @typedef {Object} WAAPITweenOptions
	* @property {WAAPIKeyframeValue} [to]
	* @property {WAAPIKeyframeValue} [from]
	* @property {Number|WAAPIFunctionValue} [duration]
	* @property {Number|WAAPIFunctionValue} [delay]
	* @property {EasingParam} [ease]
	* @property {CompositeOperation} [composition]
	*/
	/**
	* @typedef {Object} WAAPIAnimationOptions
	* @property {Number|Boolean} [loop]
	* @property {Boolean} [Reversed]
	* @property {Boolean} [Alternate]
	* @property {Boolean|ScrollObserver} [autoplay]
	* @property {Number} [playbackRate]
	* @property {Number|WAAPIFunctionValue} [duration]
	* @property {Number|WAAPIFunctionValue} [delay]
	* @property {EasingParam} [ease]
	* @property {CompositeOperation} [composition]
	* @property {WAAPICallback} [onComplete]
	*/
	/**
	* @typedef {Record<String, WAAPIKeyframeValue | WAAPIAnimationOptions | Boolean | ScrollObserver | WAAPICallback | EasingParam | WAAPITweenOptions> & WAAPIAnimationOptions} WAAPIAnimationParams
	*/
	/**
	* @callback AnimatablePropertySetter
	* @param  {Number|Array.<Number>} to
	* @param  {Number} [duration]
	* @param  {EasingParam} [ease]
	* @return {AnimatableObject}
	*/
	/**
	* @callback AnimatablePropertyGetter
	* @return {Number|Array.<Number>}
	*/
	/**
	* @typedef {AnimatablePropertySetter & AnimatablePropertyGetter} AnimatableProperty
	*/
	/**
	* @typedef {Animatable & Record<String, AnimatableProperty>} AnimatableObject
	*/
	/**
	* @typedef {Object} AnimatablePropertyParamsOptions
	* @property {String} [unit]
	* @property {TweenParamValue} [duration]
	* @property {EasingParam} [ease]
	* @property {TweenModifier} [modifier]
	* @property {TweenComposition} [composition]
	*/
	/**
	* @typedef {Record<String, TweenParamValue | EasingParam | TweenModifier | TweenComposition | AnimatablePropertyParamsOptions> & AnimatablePropertyParamsOptions} AnimatableParams
	*/
	/**
	* @typedef {Object} ReactRef
	* @property {HTMLElement|SVGElement|null} [current]
	*/
	/**
	* @typedef {Object} AngularRef
	* @property {HTMLElement|SVGElement} [nativeElement]
	*/
	/**
	* @typedef {Object} ScopeParams
	* @property {DOMTargetSelector|ReactRef|AngularRef} [root]
	* @property {DefaultsParams} [defaults]
	* @property {Record<String, String>} [mediaQueries]
	*/
	/**
	* @template T
	* @callback ScopedCallback
	* @param {Scope} scope
	* @return {T}
	*/
	/**
	* @callback ScopeCleanupCallback
	* @param {Scope} [scope]
	*/
	/**
	* @callback ScopeConstructorCallback
	* @param {Scope} [scope]
	* @return {ScopeCleanupCallback|void}
	*/
	/**
	* @callback ScopeMethod
	* @param {...*} args
	* @return {ScopeCleanupCallback|void}
	*/
	/**
	* @typedef {String|Number} ScrollThresholdValue
	*/
	/**
	* @typedef {Object} ScrollThresholdParam
	* @property {ScrollThresholdValue} [target]
	* @property {ScrollThresholdValue} [container]
	*/
	/**
	* @callback ScrollObserverAxisCallback
	* @param {ScrollObserver} self
	* @return {'x'|'y'}
	*/
	/**
	* @callback ScrollThresholdCallback
	* @param {ScrollObserver} self
	* @return {ScrollThresholdValue|ScrollThresholdParam}
	*/
	/**
	* @typedef {Object} ScrollObserverParams
	* @property {Number|String} [id]
	* @property {Boolean|Number|String|EasingParam} [sync]
	* @property {TargetsParam} [container]
	* @property {TargetsParam} [target]
	* @property {'x'|'y'|ScrollObserverAxisCallback|((observer: ScrollObserver) => 'x'|'y'|ScrollObserverAxisCallback)} [axis]
	* @property {ScrollThresholdValue|ScrollThresholdParam|ScrollThresholdCallback|((observer: ScrollObserver) => ScrollThresholdValue|ScrollThresholdParam|ScrollThresholdCallback)} [enter]
	* @property {ScrollThresholdValue|ScrollThresholdParam|ScrollThresholdCallback|((observer: ScrollObserver) => ScrollThresholdValue|ScrollThresholdParam|ScrollThresholdCallback)} [leave]
	* @property {Boolean|((observer: ScrollObserver) => Boolean)} [repeat]
	* @property {Boolean} [debug]
	* @property {Callback<ScrollObserver>} [onEnter]
	* @property {Callback<ScrollObserver>} [onLeave]
	* @property {Callback<ScrollObserver>} [onEnterForward]
	* @property {Callback<ScrollObserver>} [onLeaveForward]
	* @property {Callback<ScrollObserver>} [onEnterBackward]
	* @property {Callback<ScrollObserver>} [onLeaveBackward]
	* @property {Callback<ScrollObserver>} [onUpdate]
	* @property {Callback<ScrollObserver>} [onSyncComplete]
	*/
	/**
	* @typedef {Object} DraggableAxisParam
	* @property {String} [mapTo]
	* @property {TweenModifier} [modifier]
	* @property {TweenComposition} [composition]
	* @property {Number|Array<Number>|((draggable: Draggable) => Number|Array<Number>)} [snap]
	*/
	/**
	* @typedef {Object} DraggableCursorParams
	* @property {String} [onHover]
	* @property {String} [onGrab]
	*/
	/**
	* @typedef {Object} DraggableParams
	* @property {DOMTargetSelector} [trigger]
	* @property {DOMTargetSelector|Array<Number>|((draggable: Draggable) => DOMTargetSelector|Array<Number>)} [container]
	* @property {Boolean|DraggableAxisParam} [x]
	* @property {Boolean|DraggableAxisParam} [y]
	* @property {TweenModifier} [modifier]
	* @property {Number|Array<Number>|((draggable: Draggable) => Number|Array<Number>)} [snap]
	* @property {Number|Array<Number>|((draggable: Draggable) => Number|Array<Number>)} [containerPadding]
	* @property {Number|((draggable: Draggable) => Number)} [containerFriction]
	* @property {Number|((draggable: Draggable) => Number)} [releaseContainerFriction]
	* @property {Number|((draggable: Draggable) => Number)} [dragSpeed]
	* @property {Number|((draggable: Draggable) => Number)} [scrollSpeed]
	* @property {Number|((draggable: Draggable) => Number)} [scrollThreshold]
	* @property {Number|((draggable: Draggable) => Number)} [minVelocity]
	* @property {Number|((draggable: Draggable) => Number)} [maxVelocity]
	* @property {Number|((draggable: Draggable) => Number)} [velocityMultiplier]
	* @property {Number} [releaseMass]
	* @property {Number} [releaseStiffness]
	* @property {Number} [releaseDamping]
	* @property {Boolean} [releaseDamping]
	* @property {EasingParam} [releaseEase]
	* @property {Boolean|DraggableCursorParams|((draggable: Draggable) => Boolean|DraggableCursorParams)} [cursor]
	* @property {Callback<Draggable>} [onGrab]
	* @property {Callback<Draggable>} [onDrag]
	* @property {Callback<Draggable>} [onRelease]
	* @property {Callback<Draggable>} [onUpdate]
	* @property {Callback<Draggable>} [onSettle]
	* @property {Callback<Draggable>} [onSnap]
	* @property {Callback<Draggable>} [onResize]
	* @property {Callback<Draggable>} [onAfterResize]
	*/
	/**
	* @typedef {Object} splitTemplateParams
	* @property {false|String} [class]
	* @property {Boolean|'hidden'|'clip'|'visible'|'scroll'|'auto'} [wrap]
	* @property {Boolean|'top'|'right'|'bottom'|'left'|'center'} [clone]
	*/
	/**
	* @typedef {Boolean|String} SplitValue
	*/
	/**
	* @callback SplitFunctionValue
	* @param {Node|HTMLElement} [value]
	* @return String
	*/
	/**
	* @typedef {Object} TextSplitterParams
	* @property {SplitValue|splitTemplateParams|SplitFunctionValue} [lines]
	* @property {SplitValue|splitTemplateParams|SplitFunctionValue} [words]
	* @property {SplitValue|splitTemplateParams|SplitFunctionValue} [chars]
	* @property {Boolean} [accessible]
	* @property {Boolean} [includeSpaces]
	* @property {Boolean} [debug]
	*/
	/**
	* @typedef {SVGGeometryElement & {
	*   setAttribute(name: 'draw', value: `${number} ${number}`): void;
	*   draw: `${number} ${number}`;
	* }} DrawableSVGGeometry
	*/
	var isBrowser = typeof window !== "undefined";
	/** @type {Document|null} */
	var doc = isBrowser ? document : null;
	/** @enum {Number} */
	var tweenTypes = {
		OBJECT: 0,
		ATTRIBUTE: 1,
		CSS: 2,
		TRANSFORM: 3,
		CSS_VAR: 4
	};
	/** @enum {Number} */
	var valueTypes = {
		NUMBER: 0,
		UNIT: 1,
		COLOR: 2,
		COMPLEX: 3
	};
	/** @enum {Number} */
	var tickModes = {
		NONE: 0,
		AUTO: 1,
		FORCE: 2
	};
	/** @enum {Number} */
	var compositionTypes = {
		replace: 0,
		none: 1,
		blend: 2
	};
	var isRegisteredTargetSymbol = Symbol();
	var isDomSymbol = Symbol();
	var isSvgSymbol = Symbol();
	var transformsSymbol = Symbol();
	var morphPointsSymbol = Symbol();
	var proxyTargetSymbol = Symbol();
	var minValue = 1e-11;
	var maxValue = 0xe8d4a51000;
	var K = 1e3;
	var maxFps = 120;
	var emptyString = "";
	var shortTransforms = /* @__PURE__ */ (() => {
		const map = /* @__PURE__ */ new Map();
		map.set("x", "translateX");
		map.set("y", "translateY");
		map.set("z", "translateZ");
		return map;
	})();
	var validTransforms = [
		"translateX",
		"translateY",
		"translateZ",
		"rotate",
		"rotateX",
		"rotateY",
		"rotateZ",
		"scale",
		"scaleX",
		"scaleY",
		"scaleZ",
		"skew",
		"skewX",
		"skewY",
		"perspective",
		"matrix",
		"matrix3d"
	];
	var transformsFragmentStrings = /* @__PURE__ */ validTransforms.reduce((a, v) => ({
		...a,
		[v]: v + "("
	}), {});
	/** @return {void} */
	var noop = () => {};
	var hexTestRgx = /(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i;
	var rgbExecRgx = /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i;
	var rgbaExecRgx = /rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i;
	var hslExecRgx = /hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i;
	var hslaExecRgx = /hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i;
	var digitWithExponentRgx = /[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi;
	var unitsExecRgx = /^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i;
	var lowerCaseRgx = /([a-z])([A-Z])/g;
	var transformsExecRgx = /(\w+)(\([^)]+\)+)/g;
	var relativeValuesExecRgx = /(\*=|\+=|-=)/;
	/** @type {DefaultsParams} */
	var defaults = {
		id: null,
		keyframes: null,
		playbackEase: null,
		playbackRate: 1,
		frameRate: maxFps,
		loop: 0,
		reversed: false,
		alternate: false,
		autoplay: true,
		duration: K,
		delay: 0,
		loopDelay: 0,
		ease: "out(2)",
		composition: compositionTypes.replace,
		modifier: (v) => v,
		onBegin: noop,
		onBeforeUpdate: noop,
		onUpdate: noop,
		onLoop: noop,
		onPause: noop,
		onComplete: noop,
		onRender: noop
	};
	var scope = {
		/** @type {Scope} */
		current: null,
		/** @type {Document|DOMTarget} */
		root: doc
	};
	var globals = {
		/** @type {DefaultsParams} */
		defaults,
		/** @type {Number} */
		precision: 4,
		/** @type {Number} equals 1 in ms mode, 0.001 in s mode */
		timeScale: 1,
		/** @type {Number} */
		tickThreshold: 200
	};
	var globalVersions = {
		version: "4.1.4",
		engine: null
	};
	/**
	* @param  {String} str
	* @return {String}
	*/
	var toLowerCase = (str) => str.replace(lowerCaseRgx, "$1-$2").toLowerCase();
	/**
	* Prioritize this method instead of regex when possible
	* @param  {String} str
	* @param  {String} sub
	* @return {Boolean}
	*/
	var stringStartsWith = (str, sub) => str.indexOf(sub) === 0;
	var now = Date.now;
	var isArr = Array.isArray;
	/**@param {any} a @return {a is Record<String, any>} */
	var isObj = (a) => a && a.constructor === Object;
	/**@param {any} a @return {a is Number} */
	var isNum = (a) => typeof a === "number" && !isNaN(a);
	/**@param {any} a @return {a is String} */
	var isStr = (a) => typeof a === "string";
	/**@param {any} a @return {a is Function} */
	var isFnc = (a) => typeof a === "function";
	/**@param {any} a @return {a is undefined} */
	var isUnd = (a) => typeof a === "undefined";
	/**@param {any} a @return {a is null | undefined} */
	var isNil = (a) => isUnd(a) || a === null;
	/**@param {any} a @return {a is SVGElement} */
	var isSvg = (a) => isBrowser && a instanceof SVGElement;
	/**@param {any} a @return {Boolean} */
	var isHex = (a) => hexTestRgx.test(a);
	/**@param {any} a @return {Boolean} */
	var isRgb = (a) => stringStartsWith(a, "rgb");
	/**@param {any} a @return {Boolean} */
	var isHsl = (a) => stringStartsWith(a, "hsl");
	/**@param {any} a @return {Boolean} */
	var isCol = (a) => isHex(a) || isRgb(a) || isHsl(a);
	/**@param {any} a @return {Boolean} */
	var isKey = (a) => !globals.defaults.hasOwnProperty(a);
	/**
	* @param  {Number|String} str
	* @return {Number}
	*/
	var parseNumber = (str) => isStr(str) ? parseFloat(str) : str;
	var pow = Math.pow;
	var sqrt = Math.sqrt;
	var sin = Math.sin;
	var cos = Math.cos;
	var abs = Math.abs;
	var ceil = Math.ceil;
	var floor = Math.floor;
	var asin = Math.asin;
	var max = Math.max;
	var atan2 = Math.atan2;
	var PI = Math.PI;
	var _round = Math.round;
	/**
	* @param  {Number} v
	* @param  {Number} min
	* @param  {Number} max
	* @return {Number}
	*/
	var clamp = (v, min, max) => v < min ? min : v > max ? max : v;
	var powCache = {};
	/**
	* @param  {Number} v
	* @param  {Number} decimalLength
	* @return {Number}
	*/
	var round = (v, decimalLength) => {
		if (decimalLength < 0) return v;
		if (!decimalLength) return _round(v);
		let p = powCache[decimalLength];
		if (!p) p = powCache[decimalLength] = 10 ** decimalLength;
		return _round(v * p) / p;
	};
	/**
	* @param  {Number} v
	* @param  {Number|Array<Number>} increment
	* @return {Number}
	*/
	var snap = (v, increment) => isArr(increment) ? increment.reduce((closest, cv) => abs(cv - v) < abs(closest - v) ? cv : closest) : increment ? _round(v / increment) * increment : v;
	/**
	* @param  {Number} start
	* @param  {Number} end
	* @param  {Number} progress
	* @return {Number}
	*/
	var interpolate = (start, end, progress) => start + (end - start) * progress;
	/**
	* @param  {Number} min
	* @param  {Number} max
	* @param  {Number} [decimalLength]
	* @return {Number}
	*/
	var random = (min, max, decimalLength) => {
		const m = 10 ** (decimalLength || 0);
		return floor((Math.random() * (max - min + 1 / m) + min) * m) / m;
	};
	/**
	* Adapted from https://bost.ocks.org/mike/shuffle/
	* @param  {Array} items
	* @return {Array}
	*/
	var shuffle = (items) => {
		let m = items.length, t, i;
		while (m) {
			i = random(0, --m);
			t = items[m];
			items[m] = items[i];
			items[i] = t;
		}
		return items;
	};
	/**
	* @param  {Number} v
	* @return {Number}
	*/
	var clampInfinity = (v) => v === Infinity ? maxValue : v === -Infinity ? -maxValue : v;
	/**
	* @param  {Number} v
	* @return {Number}
	*/
	var normalizeTime = (v) => v <= minValue ? minValue : clampInfinity(round(v, 11));
	/**
	* @template T
	* @param {T[]} a
	* @return {T[]}
	*/
	var cloneArray = (a) => isArr(a) ? [...a] : a;
	/**
	* @template T
	* @template U
	* @param {T} o1
	* @param {U} o2
	* @return {T & U}
	*/
	var mergeObjects = (o1, o2) => {
		const merged = { ...o1 };
		for (let p in o2) {
			const o1p = o1[p];
			merged[p] = isUnd(o1p) ? o2[p] : o1p;
		}
		return merged;
	};
	/**
	* @param {Object} parent
	* @param {Function} callback
	* @param {Boolean} [reverse]
	* @param {String} [prevProp]
	* @param {String} [nextProp]
	* @return {void}
	*/
	var forEachChildren = (parent, callback, reverse, prevProp = "_prev", nextProp = "_next") => {
		let next = parent._head;
		let adjustedNextProp = nextProp;
		if (reverse) {
			next = parent._tail;
			adjustedNextProp = prevProp;
		}
		while (next) {
			const currentNext = next[adjustedNextProp];
			callback(next);
			next = currentNext;
		}
	};
	/**
	* @param  {Object} parent
	* @param  {Object} child
	* @param  {String} [prevProp]
	* @param  {String} [nextProp]
	* @return {void}
	*/
	var removeChild = (parent, child, prevProp = "_prev", nextProp = "_next") => {
		const prev = child[prevProp];
		const next = child[nextProp];
		prev ? prev[nextProp] = next : parent._head = next;
		next ? next[prevProp] = prev : parent._tail = prev;
		child[prevProp] = null;
		child[nextProp] = null;
	};
	/**
	* @param  {Object} parent
	* @param  {Object} child
	* @param  {Function} [sortMethod]
	* @param  {String} prevProp
	* @param  {String} nextProp
	* @return {void}
	*/
	var addChild = (parent, child, sortMethod, prevProp = "_prev", nextProp = "_next") => {
		let prev = parent._tail;
		while (prev && sortMethod && sortMethod(prev, child)) prev = prev[prevProp];
		const next = prev ? prev[nextProp] : parent._head;
		prev ? prev[nextProp] = child : parent._head = child;
		next ? next[prevProp] = child : parent._tail = child;
		child[prevProp] = prev;
		child[nextProp] = next;
	};
	/**
	* @param  {(...args: any[]) => Tickable | ((...args: any[]) => void)} constructor
	* @return {(...args: any[]) => Tickable | ((...args: any[]) => void)}
	*/
	var createRefreshable = (constructor) => {
		/** @type {Tickable} */
		let tracked;
		return (...args) => {
			let currentIteration, currentIterationProgress, reversed, alternate;
			if (tracked) {
				currentIteration = tracked.currentIteration;
				currentIterationProgress = tracked.iterationProgress;
				reversed = tracked.reversed;
				alternate = tracked._alternate;
				tracked.revert();
			}
			const cleanup = constructor(...args);
			if (cleanup && !isFnc(cleanup) && cleanup.revert) tracked = cleanup;
			if (!isUnd(currentIterationProgress)) {
				/** @type {Tickable} */ tracked.currentIteration = currentIteration;
				/** @type {Tickable} */ tracked.iterationProgress = (alternate ? !(currentIteration % 2) ? reversed : !reversed : reversed) ? 1 - currentIterationProgress : currentIterationProgress;
			}
			return cleanup || noop;
		};
	};
	var Clock = class {
		/** @param {Number} [initTime] */
		constructor(initTime = 0) {
			/** @type {Number} */
			this.deltaTime = 0;
			/** @type {Number} */
			this._currentTime = initTime;
			/** @type {Number} */
			this._elapsedTime = initTime;
			/** @type {Number} */
			this._startTime = initTime;
			/** @type {Number} */
			this._lastTime = initTime;
			/** @type {Number} */
			this._scheduledTime = 0;
			/** @type {Number} */
			this._frameDuration = round(K / maxFps, 0);
			/** @type {Number} */
			this._fps = maxFps;
			/** @type {Number} */
			this._speed = 1;
			/** @type {Boolean} */
			this._hasChildren = false;
			/** @type {Tickable|Tween} */
			this._head = null;
			/** @type {Tickable|Tween} */
			this._tail = null;
		}
		get fps() {
			return this._fps;
		}
		set fps(frameRate) {
			const previousFrameDuration = this._frameDuration;
			const fr = +frameRate;
			const fps = fr < minValue ? minValue : fr;
			const frameDuration = round(K / fps, 0);
			this._fps = fps;
			this._frameDuration = frameDuration;
			this._scheduledTime += frameDuration - previousFrameDuration;
		}
		get speed() {
			return this._speed;
		}
		set speed(playbackRate) {
			const pbr = +playbackRate;
			this._speed = pbr < minValue ? minValue : pbr;
		}
		/**
		* @param  {Number} time
		* @return {tickModes}
		*/
		requestTick(time) {
			const scheduledTime = this._scheduledTime;
			const elapsedTime = this._elapsedTime;
			this._elapsedTime += time - elapsedTime;
			if (elapsedTime < scheduledTime) return tickModes.NONE;
			const frameDuration = this._frameDuration;
			const frameDelta = elapsedTime - scheduledTime;
			this._scheduledTime += frameDelta < frameDuration ? frameDuration : frameDelta;
			return tickModes.AUTO;
		}
		/**
		* @param  {Number} time
		* @return {Number}
		*/
		computeDeltaTime(time) {
			const delta = time - this._lastTime;
			this.deltaTime = delta;
			this._lastTime = time;
			return delta;
		}
	};
	/**
	* @param  {Tickable} tickable
	* @param  {Number} time
	* @param  {Number} muteCallbacks
	* @param  {Number} internalRender
	* @param  {tickModes} tickMode
	* @return {Number}
	*/
	var render = (tickable, time, muteCallbacks, internalRender, tickMode) => {
		const parent = tickable.parent;
		const duration = tickable.duration;
		const completed = tickable.completed;
		const iterationDuration = tickable.iterationDuration;
		const iterationCount = tickable.iterationCount;
		const _currentIteration = tickable._currentIteration;
		const _loopDelay = tickable._loopDelay;
		const _reversed = tickable._reversed;
		const _alternate = tickable._alternate;
		const _hasChildren = tickable._hasChildren;
		const tickableDelay = tickable._delay;
		const tickablePrevAbsoluteTime = tickable._currentTime;
		const tickableEndTime = tickableDelay + iterationDuration;
		const tickableAbsoluteTime = time - tickableDelay;
		const tickablePrevTime = clamp(tickablePrevAbsoluteTime, -tickableDelay, duration);
		const tickableCurrentTime = clamp(tickableAbsoluteTime, -tickableDelay, duration);
		const deltaTime = tickableAbsoluteTime - tickablePrevAbsoluteTime;
		const isCurrentTimeAboveZero = tickableCurrentTime > 0;
		const isCurrentTimeEqualOrAboveDuration = tickableCurrentTime >= duration;
		const isSetter = duration <= minValue;
		const forcedTick = tickMode === tickModes.FORCE;
		let isOdd = 0;
		let iterationElapsedTime = tickableAbsoluteTime;
		let hasRendered = 0;
		if (iterationCount > 1) {
			tickable._currentIteration = clamp(~~(tickableCurrentTime / (iterationDuration + (isCurrentTimeEqualOrAboveDuration ? 0 : _loopDelay))), 0, iterationCount);
			if (isCurrentTimeEqualOrAboveDuration) tickable._currentIteration--;
			isOdd = tickable._currentIteration % 2;
			iterationElapsedTime = tickableCurrentTime % (iterationDuration + _loopDelay) || 0;
		}
		const isReversed = _reversed ^ (_alternate && isOdd);
		const _ease = tickable._ease;
		let iterationTime = isCurrentTimeEqualOrAboveDuration ? isReversed ? 0 : duration : isReversed ? iterationDuration - iterationElapsedTime : iterationElapsedTime;
		if (_ease) iterationTime = iterationDuration * _ease(iterationTime / iterationDuration) || 0;
		const isRunningBackwards = (parent ? parent.backwards : tickableAbsoluteTime < tickablePrevAbsoluteTime) ? !isReversed : !!isReversed;
		tickable._currentTime = tickableAbsoluteTime;
		tickable._iterationTime = iterationTime;
		tickable.backwards = isRunningBackwards;
		if (isCurrentTimeAboveZero && !tickable.began) {
			tickable.began = true;
			if (!muteCallbacks && !(parent && (isRunningBackwards || !parent.began))) tickable.onBegin(tickable);
		} else if (tickableAbsoluteTime <= 0) tickable.began = false;
		if (!muteCallbacks && !_hasChildren && isCurrentTimeAboveZero && tickable._currentIteration !== _currentIteration) tickable.onLoop(tickable);
		if (forcedTick || tickMode === tickModes.AUTO && (time >= tickableDelay && time <= tickableEndTime || time <= tickableDelay && tickablePrevTime > tickableDelay || time >= tickableEndTime && tickablePrevTime !== duration) || iterationTime >= tickableEndTime && tickablePrevTime !== duration || iterationTime <= tickableDelay && tickablePrevTime > 0 || time <= tickablePrevTime && tickablePrevTime === duration && completed || isCurrentTimeEqualOrAboveDuration && !completed && isSetter) {
			if (isCurrentTimeAboveZero) {
				tickable.computeDeltaTime(tickablePrevTime);
				if (!muteCallbacks) tickable.onBeforeUpdate(tickable);
			}
			if (!_hasChildren) {
				const forcedRender = forcedTick || (isRunningBackwards ? deltaTime * -1 : deltaTime) >= globals.tickThreshold;
				const absoluteTime = tickable._offset + (parent ? parent._offset : 0) + tickableDelay + iterationTime;
				let tween = tickable._head;
				let tweenTarget;
				let tweenStyle;
				let tweenTargetTransforms;
				let tweenTargetTransformsProperties;
				let tweenTransformsNeedUpdate = 0;
				while (tween) {
					const tweenComposition = tween._composition;
					const tweenCurrentTime = tween._currentTime;
					const tweenChangeDuration = tween._changeDuration;
					const tweenAbsEndTime = tween._absoluteStartTime + tween._changeDuration;
					const tweenNextRep = tween._nextRep;
					const tweenPrevRep = tween._prevRep;
					const tweenHasComposition = tweenComposition !== compositionTypes.none;
					if ((forcedRender || (tweenCurrentTime !== tweenChangeDuration || absoluteTime <= tweenAbsEndTime + (tweenNextRep ? tweenNextRep._delay : 0)) && (tweenCurrentTime !== 0 || absoluteTime >= tween._absoluteStartTime)) && (!tweenHasComposition || !tween._isOverridden && (!tween._isOverlapped || absoluteTime <= tweenAbsEndTime) && (!tweenNextRep || tweenNextRep._isOverridden || absoluteTime <= tweenNextRep._absoluteStartTime) && (!tweenPrevRep || tweenPrevRep._isOverridden || absoluteTime >= tweenPrevRep._absoluteStartTime + tweenPrevRep._changeDuration + tween._delay))) {
						const tweenNewTime = tween._currentTime = clamp(iterationTime - tween._startTime, 0, tweenChangeDuration);
						const tweenProgress = tween._ease(tweenNewTime / tween._updateDuration);
						const tweenModifier = tween._modifier;
						const tweenValueType = tween._valueType;
						const tweenType = tween._tweenType;
						const tweenIsObject = tweenType === tweenTypes.OBJECT;
						const tweenIsNumber = tweenValueType === valueTypes.NUMBER;
						const tweenPrecision = tweenIsNumber && tweenIsObject || tweenProgress === 0 || tweenProgress === 1 ? -1 : globals.precision;
						/** @type {String|Number} */
						let value;
						/** @type {Number} */
						let number;
						if (tweenIsNumber) value = number = tweenModifier(round(interpolate(tween._fromNumber, tween._toNumber, tweenProgress), tweenPrecision));
						else if (tweenValueType === valueTypes.UNIT) {
							number = tweenModifier(round(interpolate(tween._fromNumber, tween._toNumber, tweenProgress), tweenPrecision));
							value = `${number}${tween._unit}`;
						} else if (tweenValueType === valueTypes.COLOR) {
							const fn = tween._fromNumbers;
							const tn = tween._toNumbers;
							const r = round(clamp(tweenModifier(interpolate(fn[0], tn[0], tweenProgress)), 0, 255), 0);
							const g = round(clamp(tweenModifier(interpolate(fn[1], tn[1], tweenProgress)), 0, 255), 0);
							const b = round(clamp(tweenModifier(interpolate(fn[2], tn[2], tweenProgress)), 0, 255), 0);
							const a = clamp(tweenModifier(round(interpolate(fn[3], tn[3], tweenProgress), tweenPrecision)), 0, 1);
							value = `rgba(${r},${g},${b},${a})`;
							if (tweenHasComposition) {
								const ns = tween._numbers;
								ns[0] = r;
								ns[1] = g;
								ns[2] = b;
								ns[3] = a;
							}
						} else if (tweenValueType === valueTypes.COMPLEX) {
							value = tween._strings[0];
							for (let j = 0, l = tween._toNumbers.length; j < l; j++) {
								const n = tweenModifier(round(interpolate(tween._fromNumbers[j], tween._toNumbers[j], tweenProgress), tweenPrecision));
								const s = tween._strings[j + 1];
								value += `${s ? n + s : n}`;
								if (tweenHasComposition) tween._numbers[j] = n;
							}
						}
						if (tweenHasComposition) tween._number = number;
						if (!internalRender && tweenComposition !== compositionTypes.blend) {
							const tweenProperty = tween.property;
							tweenTarget = tween.target;
							if (tweenIsObject) tweenTarget[tweenProperty] = value;
							else if (tweenType === tweenTypes.ATTRIBUTE)
 /** @type {DOMTarget} */ tweenTarget.setAttribute(tweenProperty, value);
							else {
								tweenStyle = tweenTarget.style;
								if (tweenType === tweenTypes.TRANSFORM) {
									if (tweenTarget !== tweenTargetTransforms) {
										tweenTargetTransforms = tweenTarget;
										tweenTargetTransformsProperties = tweenTarget[transformsSymbol];
									}
									tweenTargetTransformsProperties[tweenProperty] = value;
									tweenTransformsNeedUpdate = 1;
								} else if (tweenType === tweenTypes.CSS) tweenStyle[tweenProperty] = value;
								else if (tweenType === tweenTypes.CSS_VAR) tweenStyle.setProperty(tweenProperty, value);
							}
							if (isCurrentTimeAboveZero) hasRendered = 1;
						} else tween._value = value;
					}
					if (tweenTransformsNeedUpdate && tween._renderTransforms) {
						let str = emptyString;
						for (let key in tweenTargetTransformsProperties) str += `${transformsFragmentStrings[key]}${tweenTargetTransformsProperties[key]}) `;
						tweenStyle.transform = str;
						tweenTransformsNeedUpdate = 0;
					}
					tween = tween._next;
				}
				if (!muteCallbacks && hasRendered)
 /** @type {JSAnimation} */ tickable.onRender(tickable);
			}
			if (!muteCallbacks && isCurrentTimeAboveZero) tickable.onUpdate(tickable);
		}
		if (parent && isSetter) {
			if (!muteCallbacks && (parent.began && !isRunningBackwards && tickableAbsoluteTime >= duration && !completed || isRunningBackwards && tickableAbsoluteTime <= minValue && completed)) {
				tickable.onComplete(tickable);
				tickable.completed = !isRunningBackwards;
			}
		} else if (isCurrentTimeAboveZero && isCurrentTimeEqualOrAboveDuration) {
			if (iterationCount === Infinity) tickable._startTime += tickable.duration;
			else if (tickable._currentIteration >= iterationCount - 1) {
				tickable.paused = true;
				if (!completed && !_hasChildren) {
					tickable.completed = true;
					if (!muteCallbacks && !(parent && (isRunningBackwards || !parent.began))) {
						tickable.onComplete(tickable);
						tickable._resolve(tickable);
					}
				}
			}
		} else tickable.completed = false;
		return hasRendered;
	};
	/**
	* @param  {Tickable} tickable
	* @param  {Number} time
	* @param  {Number} muteCallbacks
	* @param  {Number} internalRender
	* @param  {Number} tickMode
	* @return {void}
	*/
	var tick = (tickable, time, muteCallbacks, internalRender, tickMode) => {
		const _currentIteration = tickable._currentIteration;
		render(tickable, time, muteCallbacks, internalRender, tickMode);
		if (tickable._hasChildren) {
			const tl = tickable;
			const tlIsRunningBackwards = tl.backwards;
			const tlChildrenTime = internalRender ? time : tl._iterationTime;
			const tlCildrenTickTime = now();
			let tlChildrenHasRendered = 0;
			let tlChildrenHaveCompleted = true;
			if (!internalRender && tl._currentIteration !== _currentIteration) {
				const tlIterationDuration = tl.iterationDuration;
				forEachChildren(tl, (child) => {
					if (!tlIsRunningBackwards) {
						if (!child.completed && !child.backwards && child._currentTime < child.iterationDuration) render(child, tlIterationDuration, muteCallbacks, 1, tickModes.FORCE);
						child.began = false;
						child.completed = false;
					} else {
						const childDuration = child.duration;
						const childStartTime = child._offset + child._delay;
						const childEndTime = childStartTime + childDuration;
						if (!muteCallbacks && childDuration <= minValue && (!childStartTime || childEndTime === tlIterationDuration)) child.onComplete(child);
					}
				});
				if (!muteCallbacks) tl.onLoop(tl);
			}
			forEachChildren(tl, (child) => {
				const childTime = round((tlChildrenTime - child._offset) * child._speed, 12);
				const childTickMode = child._fps < tl._fps ? child.requestTick(tlCildrenTickTime) : tickMode;
				tlChildrenHasRendered += render(child, childTime, muteCallbacks, internalRender, childTickMode);
				if (!child.completed && tlChildrenHaveCompleted) tlChildrenHaveCompleted = false;
			}, tlIsRunningBackwards);
			if (!muteCallbacks && tlChildrenHasRendered) tl.onRender(tl);
			if ((tlChildrenHaveCompleted || tlIsRunningBackwards) && tl._currentTime >= tl.duration) {
				tl.paused = true;
				if (!tl.completed) {
					tl.completed = true;
					if (!muteCallbacks) {
						tl.onComplete(tl);
						tl._resolve(tl);
					}
				}
			}
		}
	};
	var additive = {
		animation: null,
		update: noop
	};
	/**
	* @typedef AdditiveAnimation
	* @property {Number} duration
	* @property {Number} _offset
	* @property {Number} _delay
	* @property {Tween} _head
	* @property {Tween} _tail
	*/
	/**
	* @param  {TweenAdditiveLookups} lookups
	* @return {AdditiveAnimation}
	*/
	var addAdditiveAnimation = (lookups) => {
		let animation = additive.animation;
		if (!animation) {
			animation = {
				duration: minValue,
				computeDeltaTime: noop,
				_offset: 0,
				_delay: 0,
				_head: null,
				_tail: null
			};
			additive.animation = animation;
			additive.update = () => {
				lookups.forEach((propertyAnimation) => {
					for (let propertyName in propertyAnimation) {
						const tweens = propertyAnimation[propertyName];
						const lookupTween = tweens._head;
						if (lookupTween) {
							const valueType = lookupTween._valueType;
							const additiveValues = valueType === valueTypes.COMPLEX || valueType === valueTypes.COLOR ? cloneArray(lookupTween._fromNumbers) : null;
							let additiveValue = lookupTween._fromNumber;
							let tween = tweens._tail;
							while (tween && tween !== lookupTween) {
								if (additiveValues) for (let i = 0, l = tween._numbers.length; i < l; i++) additiveValues[i] += tween._numbers[i];
								else additiveValue += tween._number;
								tween = tween._prevAdd;
							}
							lookupTween._toNumber = additiveValue;
							lookupTween._toNumbers = additiveValues;
						}
					}
				});
				render(animation, 1, 1, 0, tickModes.FORCE);
			};
		}
		return animation;
	};
	var engineTickMethod = isBrowser ? requestAnimationFrame : setImmediate;
	var engineCancelMethod = isBrowser ? cancelAnimationFrame : clearImmediate;
	var Engine = class extends Clock {
		/** @param {Number} [initTime] */
		constructor(initTime) {
			super(initTime);
			this.useDefaultMainLoop = true;
			this.pauseOnDocumentHidden = true;
			/** @type {DefaultsParams} */
			this.defaults = defaults;
			this.paused = true;
			/** @type {Number|NodeJS.Immediate} */
			this.reqId = 0;
		}
		update() {
			const time = this._currentTime = now();
			if (this.requestTick(time)) {
				this.computeDeltaTime(time);
				const engineSpeed = this._speed;
				const engineFps = this._fps;
				let activeTickable = this._head;
				while (activeTickable) {
					const nextTickable = activeTickable._next;
					if (!activeTickable.paused) tick(activeTickable, (time - activeTickable._startTime) * activeTickable._speed * engineSpeed, 0, 0, activeTickable._fps < engineFps ? activeTickable.requestTick(time) : tickModes.AUTO);
					else {
						removeChild(this, activeTickable);
						this._hasChildren = !!this._tail;
						activeTickable._running = false;
						if (activeTickable.completed && !activeTickable._cancelled) activeTickable.cancel();
					}
					activeTickable = nextTickable;
				}
				additive.update();
			}
		}
		wake() {
			if (this.useDefaultMainLoop && !this.reqId) {
				this.requestTick(now());
				this.reqId = engineTickMethod(tickEngine);
			}
			return this;
		}
		pause() {
			if (!this.reqId) return;
			this.paused = true;
			return killEngine();
		}
		resume() {
			if (!this.paused) return;
			this.paused = false;
			forEachChildren(this, (child) => child.resetTime());
			return this.wake();
		}
		get speed() {
			return this._speed * (globals.timeScale === 1 ? 1 : K);
		}
		set speed(playbackRate) {
			this._speed = playbackRate * globals.timeScale;
			forEachChildren(this, (child) => child.speed = child._speed);
		}
		get timeUnit() {
			return globals.timeScale === 1 ? "ms" : "s";
		}
		set timeUnit(unit) {
			const secondsScale = .001;
			const isSecond = unit === "s";
			const newScale = isSecond ? secondsScale : 1;
			if (globals.timeScale !== newScale) {
				globals.timeScale = newScale;
				globals.tickThreshold = 200 * newScale;
				const scaleFactor = isSecond ? secondsScale : K;
				/** @type {Number} */
				this.defaults.duration *= scaleFactor;
				this._speed *= scaleFactor;
			}
		}
		get precision() {
			return globals.precision;
		}
		set precision(precision) {
			globals.precision = precision;
		}
	};
	var engine = /* @__PURE__ */ (() => {
		const engine = new Engine(now());
		if (isBrowser) globalVersions.engine = engine;
		return engine;
	})();
	var tickEngine = () => {
		if (engine._head) {
			engine.reqId = engineTickMethod(tickEngine);
			engine.update();
		} else engine.reqId = 0;
	};
	var killEngine = () => {
		engineCancelMethod(engine.reqId);
		engine.reqId = 0;
		return engine;
	};
	/**
	* @param  {DOMTarget} target
	* @param  {String} propName
	* @param  {Object} animationInlineStyles
	* @return {String}
	*/
	var parseInlineTransforms = (target, propName, animationInlineStyles) => {
		const inlineTransforms = target.style.transform;
		let inlinedStylesPropertyValue;
		if (inlineTransforms) {
			const cachedTransforms = target[transformsSymbol];
			let t;
			while (t = transformsExecRgx.exec(inlineTransforms)) {
				const inlinePropertyName = t[1];
				const inlinePropertyValue = t[2].slice(1, -1);
				cachedTransforms[inlinePropertyName] = inlinePropertyValue;
				if (inlinePropertyName === propName) {
					inlinedStylesPropertyValue = inlinePropertyValue;
					if (animationInlineStyles) animationInlineStyles[propName] = inlinePropertyValue;
				}
			}
		}
		return inlineTransforms && !isUnd(inlinedStylesPropertyValue) ? inlinedStylesPropertyValue : stringStartsWith(propName, "scale") ? "1" : stringStartsWith(propName, "rotate") || stringStartsWith(propName, "skew") ? "0deg" : "0px";
	};
	/**
	* @param  {DOMTargetsParam|TargetsParam} v
	* @return {NodeList|HTMLCollection}
	*/
	function getNodeList(v) {
		const n = isStr(v) ? scope.root.querySelectorAll(v) : v;
		if (n instanceof NodeList || n instanceof HTMLCollection) return n;
	}
	/**
	* @overload
	* @param  {DOMTargetsParam} targets
	* @return {DOMTargetsArray}
	*
	* @overload
	* @param  {JSTargetsParam} targets
	* @return {JSTargetsArray}
	*
	* @overload
	* @param  {TargetsParam} targets
	* @return {TargetsArray}
	*
	* @param  {DOMTargetsParam|JSTargetsParam|TargetsParam} targets
	*/
	function parseTargets(targets) {
		if (isNil(targets)) return [];
		if (!isBrowser) return isArr(targets) && targets.flat(Infinity) || [targets];
		if (isArr(targets)) {
			const flattened = targets.flat(Infinity);
			/** @type {TargetsArray} */
			const parsed = [];
			for (let i = 0, l = flattened.length; i < l; i++) {
				const item = flattened[i];
				if (!isNil(item)) {
					const nodeList = getNodeList(item);
					if (nodeList) for (let j = 0, jl = nodeList.length; j < jl; j++) {
						const subItem = nodeList[j];
						if (!isNil(subItem)) {
							let isDuplicate = false;
							for (let k = 0, kl = parsed.length; k < kl; k++) if (parsed[k] === subItem) {
								isDuplicate = true;
								break;
							}
							if (!isDuplicate) parsed.push(subItem);
						}
					}
					else {
						let isDuplicate = false;
						for (let j = 0, jl = parsed.length; j < jl; j++) if (parsed[j] === item) {
							isDuplicate = true;
							break;
						}
						if (!isDuplicate) parsed.push(item);
					}
				}
			}
			return parsed;
		}
		const nodeList = getNodeList(targets);
		if (nodeList) return Array.from(nodeList);
		return [targets];
	}
	/**
	* @overload
	* @param  {DOMTargetsParam} targets
	* @return {DOMTargetsArray}
	*
	* @overload
	* @param  {JSTargetsParam} targets
	* @return {JSTargetsArray}
	*
	* @overload
	* @param  {TargetsParam} targets
	* @return {TargetsArray}
	*
	* @param  {DOMTargetsParam|JSTargetsParam|TargetsParam} targets
	*/
	function registerTargets(targets) {
		const parsedTargetsArray = parseTargets(targets);
		const parsedTargetsLength = parsedTargetsArray.length;
		if (parsedTargetsLength) for (let i = 0; i < parsedTargetsLength; i++) {
			const target = parsedTargetsArray[i];
			if (!target[isRegisteredTargetSymbol]) {
				target[isRegisteredTargetSymbol] = true;
				const isSvgType = isSvg(target);
				if (target.nodeType || isSvgType) {
					target[isDomSymbol] = true;
					target[isSvgSymbol] = isSvgType;
					target[transformsSymbol] = {};
				}
			}
		}
		return parsedTargetsArray;
	}
	/**
	* @param  {TargetsParam} path
	* @return {SVGGeometryElement|undefined}
	*/
	var getPath = (path) => {
		const $parsedSvg = parseTargets(path)[0];
		if (!$parsedSvg || !isSvg($parsedSvg)) return;
		return $parsedSvg;
	};
	/**
	* @param  {TargetsParam} path2
	* @param  {Number} [precision]
	* @return {FunctionValue}
	*/
	var morphTo = (path2, precision = .33) => ($path1) => {
		const $path2 = getPath(path2);
		if (!$path2) return;
		const isPath = $path1.tagName === "path";
		const separator = isPath ? " " : ",";
		const previousPoints = $path1[morphPointsSymbol];
		if (previousPoints) $path1.setAttribute(isPath ? "d" : "points", previousPoints);
		let v1 = "", v2 = "";
		if (!precision) {
			v1 = $path1.getAttribute(isPath ? "d" : "points");
			v2 = $path2.getAttribute(isPath ? "d" : "points");
		} else {
			const length1 = $path1.getTotalLength();
			const length2 = $path2.getTotalLength();
			const maxPoints = Math.max(Math.ceil(length1 * precision), Math.ceil(length2 * precision));
			for (let i = 0; i < maxPoints; i++) {
				const t = i / (maxPoints - 1);
				const pointOnPath1 = $path1.getPointAtLength(length1 * t);
				const pointOnPath2 = $path2.getPointAtLength(length2 * t);
				const prefix = isPath ? i === 0 ? "M" : "L" : "";
				v1 += prefix + round(pointOnPath1.x, 3) + separator + pointOnPath1.y + " ";
				v2 += prefix + round(pointOnPath2.x, 3) + separator + pointOnPath2.y + " ";
			}
		}
		$path1[morphPointsSymbol] = v2;
		return [v1, v2];
	};
	/**
	* @param {SVGGeometryElement} [$el]
	* @return {Number}
	*/
	var getScaleFactor = ($el) => {
		let scaleFactor = 1;
		if ($el && $el.getCTM) {
			const ctm = $el.getCTM();
			if (ctm) scaleFactor = (sqrt(ctm.a * ctm.a + ctm.b * ctm.b) + sqrt(ctm.c * ctm.c + ctm.d * ctm.d)) / 2;
		}
		return scaleFactor;
	};
	/**
	* Creates a proxy that wraps an SVGGeometryElement and adds drawing functionality.
	* @param {SVGGeometryElement} $el - The SVG element to transform into a drawable
	* @param {number} start - Starting position (0-1)
	* @param {number} end - Ending position (0-1)
	* @return {DrawableSVGGeometry} - Returns a proxy that preserves the original element's type with additional 'draw' attribute functionality
	*/
	var createDrawableProxy = ($el, start, end) => {
		const pathLength = K;
		const computedStyles = getComputedStyle($el);
		const strokeLineCap = computedStyles.strokeLinecap;
		const $scalled = computedStyles.vectorEffect === "non-scaling-stroke" ? $el : null;
		let currentCap = strokeLineCap;
		const proxy = new Proxy($el, { get(target, property) {
			const value = target[property];
			if (property === proxyTargetSymbol) return target;
			if (property === "setAttribute") return (...args) => {
				if (args[0] === "draw") {
					const values = args[1].split(" ");
					const v1 = +values[0];
					const v2 = +values[1];
					const scaleFactor = getScaleFactor($scalled);
					const os = v1 * -pathLength * scaleFactor;
					const d1 = v2 * pathLength * scaleFactor + os;
					const d2 = pathLength * scaleFactor + (v1 === 0 && v2 === 1 || v1 === 1 && v2 === 0 ? 0 : 10 * scaleFactor) - d1;
					if (strokeLineCap !== "butt") {
						const newCap = v1 === v2 ? "butt" : strokeLineCap;
						if (currentCap !== newCap) {
							target.style.strokeLinecap = `${newCap}`;
							currentCap = newCap;
						}
					}
					target.setAttribute("stroke-dashoffset", `${os}`);
					target.setAttribute("stroke-dasharray", `${d1} ${d2}`);
				}
				return Reflect.apply(value, target, args);
			};
			if (isFnc(value)) return (...args) => Reflect.apply(value, target, args);
			else return value;
		} });
		if ($el.getAttribute("pathLength") !== `${pathLength}`) {
			$el.setAttribute("pathLength", `${pathLength}`);
			proxy.setAttribute("draw", `${start} ${end}`);
		}
		return proxy;
	};
	/**
	* Creates drawable proxies for multiple SVG elements.
	* @param {TargetsParam} selector - CSS selector, SVG element, or array of elements and selectors
	* @param {number} [start=0] - Starting position (0-1)
	* @param {number} [end=0] - Ending position (0-1)
	* @return {Array<DrawableSVGGeometry>} - Array of proxied elements with drawing functionality
	*/
	var createDrawable = (selector, start = 0, end = 0) => {
		return parseTargets(selector).map(($el) => createDrawableProxy($el, start, end));
	};
	/**
	* @param {SVGGeometryElement} $path
	* @param {Number} progress
	* @param {Number}lookup
	* @return {DOMPoint}
	*/
	var getPathPoint = ($path, progress, lookup = 0) => {
		return $path.getPointAtLength(progress + lookup >= 1 ? progress + lookup : 0);
	};
	/**
	* @param {SVGGeometryElement} $path
	* @param {String} pathProperty
	* @return {FunctionValue}
	*/
	var getPathProgess = ($path, pathProperty) => {
		return ($el) => {
			const totalLength = +$path.getTotalLength();
			const inSvg = $el[isSvgSymbol];
			const ctm = $path.getCTM();
			/** @type {TweenObjectValue} */
			return {
				from: 0,
				to: totalLength,
				/** @type {TweenModifier} */
				modifier: (progress) => {
					if (pathProperty === "a") {
						const p0 = getPathPoint($path, progress, -1);
						const p1 = getPathPoint($path, progress, 1);
						return atan2(p1.y - p0.y, p1.x - p0.x) * 180 / PI;
					} else {
						const p = getPathPoint($path, progress, 0);
						return pathProperty === "x" ? inSvg || !ctm ? p.x : p.x * ctm.a + p.y * ctm.c + ctm.e : inSvg || !ctm ? p.y : p.x * ctm.b + p.y * ctm.d + ctm.f;
					}
				}
			};
		};
	};
	/**
	* @param {TargetsParam} path
	*/
	var createMotionPath = (path) => {
		const $path = getPath(path);
		if (!$path) return;
		return {
			translateX: getPathProgess($path, "x"),
			translateY: getPathProgess($path, "y"),
			rotate: getPathProgess($path, "a")
		};
	};
	var cssReservedProperties = [
		"opacity",
		"rotate",
		"overflow",
		"color"
	];
	/**
	* @param  {Target} el
	* @param  {String} propertyName
	* @return {Boolean}
	*/
	var isValidSVGAttribute = (el, propertyName) => {
		if (cssReservedProperties.includes(propertyName)) return false;
		if (el.getAttribute(propertyName) || propertyName in el) {
			if (propertyName === "scale") {
				const elParentNode = el.parentNode;
				return elParentNode && elParentNode.tagName === "filter";
			}
			return true;
		}
	};
	var svg$2 = {
		morphTo,
		createMotionPath,
		createDrawable
	};
	/**
	* RGB / RGBA Color value string -> RGBA values array
	* @param  {String} rgbValue
	* @return {ColorArray}
	*/
	var rgbToRgba = (rgbValue) => {
		const rgba = rgbExecRgx.exec(rgbValue) || rgbaExecRgx.exec(rgbValue);
		const a = !isUnd(rgba[4]) ? +rgba[4] : 1;
		return [
			+rgba[1],
			+rgba[2],
			+rgba[3],
			a
		];
	};
	/**
	* HEX3 / HEX3A / HEX6 / HEX6A Color value string -> RGBA values array
	* @param  {String} hexValue
	* @return {ColorArray}
	*/
	var hexToRgba = (hexValue) => {
		const hexLength = hexValue.length;
		const isShort = hexLength === 4 || hexLength === 5;
		return [
			+("0x" + hexValue[1] + hexValue[isShort ? 1 : 2]),
			+("0x" + hexValue[isShort ? 2 : 3] + hexValue[isShort ? 2 : 4]),
			+("0x" + hexValue[isShort ? 3 : 5] + hexValue[isShort ? 3 : 6]),
			hexLength === 5 || hexLength === 9 ? +(+("0x" + hexValue[isShort ? 4 : 7] + hexValue[isShort ? 4 : 8]) / 255).toFixed(3) : 1
		];
	};
	/**
	* @param  {Number} p
	* @param  {Number} q
	* @param  {Number} t
	* @return {Number}
	*/
	var hue2rgb = (p, q, t) => {
		if (t < 0) t += 1;
		if (t > 1) t -= 1;
		return t < 1 / 6 ? p + (q - p) * 6 * t : t < 1 / 2 ? q : t < 2 / 3 ? p + (q - p) * (2 / 3 - t) * 6 : p;
	};
	/**
	* HSL / HSLA Color value string -> RGBA values array
	* @param  {String} hslValue
	* @return {ColorArray}
	*/
	var hslToRgba = (hslValue) => {
		const hsla = hslExecRgx.exec(hslValue) || hslaExecRgx.exec(hslValue);
		const h = +hsla[1] / 360;
		const s = +hsla[2] / 100;
		const l = +hsla[3] / 100;
		const a = !isUnd(hsla[4]) ? +hsla[4] : 1;
		let r, g, b;
		if (s === 0) r = g = b = l;
		else {
			const q = l < .5 ? l * (1 + s) : l + s - l * s;
			const p = 2 * l - q;
			r = round(hue2rgb(p, q, h + 1 / 3) * 255, 0);
			g = round(hue2rgb(p, q, h) * 255, 0);
			b = round(hue2rgb(p, q, h - 1 / 3) * 255, 0);
		}
		return [
			r,
			g,
			b,
			a
		];
	};
	/**
	* All in one color converter that converts a color string value into an array of RGBA values
	* @param  {String} colorString
	* @return {ColorArray}
	*/
	var convertColorStringValuesToRgbaArray = (colorString) => {
		return isRgb(colorString) ? rgbToRgba(colorString) : isHex(colorString) ? hexToRgba(colorString) : isHsl(colorString) ? hslToRgba(colorString) : [
			0,
			0,
			0,
			1
		];
	};
	/**
	* @template T, D
	* @param {T|undefined} targetValue
	* @param {D} defaultValue
	* @return {T|D}
	*/
	var setValue = (targetValue, defaultValue) => {
		return isUnd(targetValue) ? defaultValue : targetValue;
	};
	/**
	* @param  {TweenPropValue} value
	* @param  {Target} target
	* @param  {Number} index
	* @param  {Number} total
	* @param  {Object} [store]
	* @return {any}
	*/
	var getFunctionValue = (value, target, index, total, store) => {
		if (isFnc(value)) {
			const func = () => {
				const computed = value(target, index, total);
				return !isNaN(+computed) ? +computed : computed || 0;
			};
			if (store) store.func = func;
			return func();
		} else return value;
	};
	/**
	* @param  {Target} target
	* @param  {String} prop
	* @return {tweenTypes}
	*/
	var getTweenType = (target, prop) => {
		return !target[isDomSymbol] ? tweenTypes.OBJECT : target[isSvgSymbol] && isValidSVGAttribute(target, prop) ? tweenTypes.ATTRIBUTE : validTransforms.includes(prop) || shortTransforms.get(prop) ? tweenTypes.TRANSFORM : stringStartsWith(prop, "--") ? tweenTypes.CSS_VAR : prop in target.style ? tweenTypes.CSS : prop in target ? tweenTypes.OBJECT : tweenTypes.ATTRIBUTE;
	};
	/**
	* @param  {DOMTarget} target
	* @param  {String} propName
	* @param  {Object} animationInlineStyles
	* @return {String}
	*/
	var getCSSValue = (target, propName, animationInlineStyles) => {
		const inlineStyles = target.style[propName];
		if (inlineStyles && animationInlineStyles) animationInlineStyles[propName] = inlineStyles;
		const value = inlineStyles || getComputedStyle(target[proxyTargetSymbol] || target).getPropertyValue(propName);
		return value === "auto" ? "0" : value;
	};
	/**
	* @param {Target} target
	* @param {String} propName
	* @param {tweenTypes} [tweenType]
	* @param {Object|void} [animationInlineStyles]
	* @return {String|Number}
	*/
	var getOriginalAnimatableValue = (target, propName, tweenType, animationInlineStyles) => {
		const type = !isUnd(tweenType) ? tweenType : getTweenType(target, propName);
		return type === tweenTypes.OBJECT ? target[propName] || 0 : type === tweenTypes.ATTRIBUTE ? target.getAttribute(propName) : type === tweenTypes.TRANSFORM ? parseInlineTransforms(target, propName, animationInlineStyles) : type === tweenTypes.CSS_VAR ? getCSSValue(target, propName, animationInlineStyles).trimStart() : getCSSValue(target, propName, animationInlineStyles);
	};
	/**
	* @param  {Number} x
	* @param  {Number} y
	* @param  {String} operator
	* @return {Number}
	*/
	var getRelativeValue = (x, y, operator) => {
		return operator === "-" ? x - y : operator === "+" ? x + y : x * y;
	};
	/** @return {TweenDecomposedValue} */
	var createDecomposedValueTargetObject = () => {
		return {
			/** @type {valueTypes} */
			t: valueTypes.NUMBER,
			n: 0,
			u: null,
			o: null,
			d: null,
			s: null
		};
	};
	/**
	* @param  {String|Number} rawValue
	* @param  {TweenDecomposedValue} targetObject
	* @return {TweenDecomposedValue}
	*/
	var decomposeRawValue = (rawValue, targetObject) => {
		/** @type {valueTypes} */
		targetObject.t = valueTypes.NUMBER;
		targetObject.n = 0;
		targetObject.u = null;
		targetObject.o = null;
		targetObject.d = null;
		targetObject.s = null;
		if (!rawValue) return targetObject;
		const num = +rawValue;
		if (!isNaN(num)) {
			targetObject.n = num;
			return targetObject;
		} else {
			let str = rawValue;
			if (str[1] === "=") {
				targetObject.o = str[0];
				str = str.slice(2);
			}
			const unitMatch = str.includes(" ") ? false : unitsExecRgx.exec(str);
			if (unitMatch) {
				targetObject.t = valueTypes.UNIT;
				targetObject.n = +unitMatch[1];
				targetObject.u = unitMatch[2];
				return targetObject;
			} else if (targetObject.o) {
				targetObject.n = +str;
				return targetObject;
			} else if (isCol(str)) {
				targetObject.t = valueTypes.COLOR;
				targetObject.d = convertColorStringValuesToRgbaArray(str);
				return targetObject;
			} else {
				const matchedNumbers = str.match(digitWithExponentRgx);
				targetObject.t = valueTypes.COMPLEX;
				targetObject.d = matchedNumbers ? matchedNumbers.map(Number) : [];
				targetObject.s = str.split(digitWithExponentRgx) || [];
				return targetObject;
			}
		}
	};
	/**
	* @param  {Tween} tween
	* @param  {TweenDecomposedValue} targetObject
	* @return {TweenDecomposedValue}
	*/
	var decomposeTweenValue = (tween, targetObject) => {
		targetObject.t = tween._valueType;
		targetObject.n = tween._toNumber;
		targetObject.u = tween._unit;
		targetObject.o = null;
		targetObject.d = cloneArray(tween._toNumbers);
		targetObject.s = cloneArray(tween._strings);
		return targetObject;
	};
	var decomposedOriginalValue = createDecomposedValueTargetObject();
	var lookups = {
		/** @type {TweenReplaceLookups} */
		_rep: /* @__PURE__ */ new WeakMap(),
		/** @type {TweenAdditiveLookups} */
		_add: /* @__PURE__ */ new Map()
	};
	/**
	* @param  {Target} target
	* @param  {String} property
	* @param  {String} lookup
	* @return {TweenPropertySiblings}
	*/
	var getTweenSiblings = (target, property, lookup = "_rep") => {
		const lookupMap = lookups[lookup];
		let targetLookup = lookupMap.get(target);
		if (!targetLookup) {
			targetLookup = {};
			lookupMap.set(target, targetLookup);
		}
		return targetLookup[property] ? targetLookup[property] : targetLookup[property] = {
			_head: null,
			_tail: null
		};
	};
	/**
	* @param  {Tween} p
	* @param  {Tween} c
	* @return {Number|Boolean}
	*/
	var addTweenSortMethod = (p, c) => {
		return p._isOverridden || p._absoluteStartTime > c._absoluteStartTime;
	};
	/**
	* @param {Tween} tween
	*/
	var overrideTween = (tween) => {
		tween._isOverlapped = 1;
		tween._isOverridden = 1;
		tween._changeDuration = minValue;
		tween._currentTime = minValue;
	};
	/**
	* @param  {Tween} tween
	* @param  {TweenPropertySiblings} siblings
	* @return {Tween}
	*/
	var composeTween = (tween, siblings) => {
		const tweenCompositionType = tween._composition;
		if (tweenCompositionType === compositionTypes.replace) {
			const tweenAbsStartTime = tween._absoluteStartTime;
			addChild(siblings, tween, addTweenSortMethod, "_prevRep", "_nextRep");
			const prevSibling = tween._prevRep;
			if (prevSibling) {
				const prevParent = prevSibling.parent;
				const prevAbsEndTime = prevSibling._absoluteStartTime + prevSibling._changeDuration;
				if (tween.parent.id !== prevParent.id && prevParent.iterationCount > 1 && prevAbsEndTime + (prevParent.duration - prevParent.iterationDuration) > tweenAbsStartTime) {
					overrideTween(prevSibling);
					let prevPrevSibling = prevSibling._prevRep;
					while (prevPrevSibling && prevPrevSibling.parent.id === prevParent.id) {
						overrideTween(prevPrevSibling);
						prevPrevSibling = prevPrevSibling._prevRep;
					}
				}
				const absoluteUpdateStartTime = tweenAbsStartTime - tween._delay;
				if (prevAbsEndTime > absoluteUpdateStartTime) {
					const prevChangeStartTime = prevSibling._startTime;
					const updatedPrevChangeDuration = round(absoluteUpdateStartTime - (prevAbsEndTime - (prevChangeStartTime + prevSibling._updateDuration)) - prevChangeStartTime, 12);
					prevSibling._changeDuration = updatedPrevChangeDuration;
					prevSibling._currentTime = updatedPrevChangeDuration;
					prevSibling._isOverlapped = 1;
					if (updatedPrevChangeDuration < minValue) overrideTween(prevSibling);
				}
				let pausePrevParentAnimation = true;
				forEachChildren(prevParent, (t) => {
					if (!t._isOverlapped) pausePrevParentAnimation = false;
				});
				if (pausePrevParentAnimation) {
					const prevParentTL = prevParent.parent;
					if (prevParentTL) {
						let pausePrevParentTL = true;
						forEachChildren(prevParentTL, (a) => {
							if (a !== prevParent) forEachChildren(a, (t) => {
								if (!t._isOverlapped) pausePrevParentTL = false;
							});
						});
						if (pausePrevParentTL) prevParentTL.cancel();
					} else prevParent.cancel();
				}
			}
		} else if (tweenCompositionType === compositionTypes.blend) {
			const additiveTweenSiblings = getTweenSiblings(tween.target, tween.property, "_add");
			const additiveAnimation = addAdditiveAnimation(lookups._add);
			let lookupTween = additiveTweenSiblings._head;
			if (!lookupTween) {
				lookupTween = { ...tween };
				lookupTween._composition = compositionTypes.replace;
				lookupTween._updateDuration = minValue;
				lookupTween._startTime = 0;
				lookupTween._numbers = cloneArray(tween._fromNumbers);
				lookupTween._number = 0;
				lookupTween._next = null;
				lookupTween._prev = null;
				addChild(additiveTweenSiblings, lookupTween);
				addChild(additiveAnimation, lookupTween);
			}
			const toNumber = tween._toNumber;
			tween._fromNumber = lookupTween._fromNumber - toNumber;
			tween._toNumber = 0;
			tween._numbers = cloneArray(tween._fromNumbers);
			tween._number = 0;
			lookupTween._fromNumber = toNumber;
			if (tween._toNumbers) {
				const toNumbers = cloneArray(tween._toNumbers);
				if (toNumbers) toNumbers.forEach((value, i) => {
					tween._fromNumbers[i] = lookupTween._fromNumbers[i] - value;
					tween._toNumbers[i] = 0;
				});
				lookupTween._fromNumbers = toNumbers;
			}
			addChild(additiveTweenSiblings, tween, null, "_prevAdd", "_nextAdd");
		}
		return tween;
	};
	/**
	* @param  {Tween} tween
	* @return {Tween}
	*/
	var removeTweenSliblings = (tween) => {
		const tweenComposition = tween._composition;
		if (tweenComposition !== compositionTypes.none) {
			const tweenTarget = tween.target;
			const tweenProperty = tween.property;
			const tweenReplaceSiblings = lookups._rep.get(tweenTarget)[tweenProperty];
			removeChild(tweenReplaceSiblings, tween, "_prevRep", "_nextRep");
			if (tweenComposition === compositionTypes.blend) {
				const addTweensLookup = lookups._add;
				const addTargetProps = addTweensLookup.get(tweenTarget);
				if (!addTargetProps) return;
				const additiveTweenSiblings = addTargetProps[tweenProperty];
				const additiveAnimation = additive.animation;
				removeChild(additiveTweenSiblings, tween, "_prevAdd", "_nextAdd");
				const lookupTween = additiveTweenSiblings._head;
				if (lookupTween && lookupTween === additiveTweenSiblings._tail) {
					removeChild(additiveTweenSiblings, lookupTween, "_prevAdd", "_nextAdd");
					removeChild(additiveAnimation, lookupTween);
					let shouldClean = true;
					for (let prop in addTargetProps) if (addTargetProps[prop]._head) {
						shouldClean = false;
						break;
					}
					if (shouldClean) addTweensLookup.delete(tweenTarget);
				}
			}
		}
		return tween;
	};
	/**
	* @param  {Timer} timer
	* @return {Timer}
	*/
	var resetTimerProperties = (timer) => {
		timer.paused = true;
		timer.began = false;
		timer.completed = false;
		return timer;
	};
	/**
	* @param  {Timer} timer
	* @return {Timer}
	*/
	var reviveTimer = (timer) => {
		if (!timer._cancelled) return timer;
		if (timer._hasChildren) forEachChildren(timer, reviveTimer);
		else forEachChildren(timer, (tween) => {
			if (tween._composition !== compositionTypes.none) composeTween(tween, getTweenSiblings(tween.target, tween.property));
		});
		timer._cancelled = 0;
		return timer;
	};
	var timerId = 0;
	/**
	* Base class used to create Timers, Animations and Timelines
	*/
	var Timer = class extends Clock {
		/**
		* @param {TimerParams} [parameters]
		* @param {Timeline} [parent]
		* @param {Number} [parentPosition]
		*/
		constructor(parameters = {}, parent = null, parentPosition = 0) {
			super(0);
			const { id, delay, duration, reversed, alternate, loop, loopDelay, autoplay, frameRate, playbackRate, onComplete, onLoop, onPause, onBegin, onBeforeUpdate, onUpdate } = parameters;
			if (scope.current) scope.current.register(this);
			const timerInitTime = parent ? 0 : engine._elapsedTime;
			const timerDefaults = parent ? parent.defaults : globals.defaults;
			const timerDelay = isFnc(delay) || isUnd(delay) ? timerDefaults.delay : +delay;
			const timerDuration = isFnc(duration) || isUnd(duration) ? Infinity : +duration;
			const timerLoop = setValue(loop, timerDefaults.loop);
			const timerLoopDelay = setValue(loopDelay, timerDefaults.loopDelay);
			const timerIterationCount = timerLoop === true || timerLoop === Infinity || timerLoop < 0 ? Infinity : 
			/** @type {Number} */ timerLoop + 1;
			let offsetPosition = 0;
			if (parent) offsetPosition = parentPosition;
			else {
				if (!engine.reqId) engine.requestTick(now());
				offsetPosition = (engine._elapsedTime - engine._startTime) * globals.timeScale;
			}
			this.id = !isUnd(id) ? id : ++timerId;
			/** @type {Timeline} */
			this.parent = parent;
			this.duration = clampInfinity((timerDuration + timerLoopDelay) * timerIterationCount - timerLoopDelay) || minValue;
			/** @type {Boolean} */
			this.backwards = false;
			/** @type {Boolean} */
			this.paused = true;
			/** @type {Boolean} */
			this.began = false;
			/** @type {Boolean} */
			this.completed = false;
			/** @type {Callback<this>} */
			this.onBegin = onBegin || timerDefaults.onBegin;
			/** @type {Callback<this>} */
			this.onBeforeUpdate = onBeforeUpdate || timerDefaults.onBeforeUpdate;
			/** @type {Callback<this>} */
			this.onUpdate = onUpdate || timerDefaults.onUpdate;
			/** @type {Callback<this>} */
			this.onLoop = onLoop || timerDefaults.onLoop;
			/** @type {Callback<this>} */
			this.onPause = onPause || timerDefaults.onPause;
			/** @type {Callback<this>} */
			this.onComplete = onComplete || timerDefaults.onComplete;
			/** @type {Number} */
			this.iterationDuration = timerDuration;
			/** @type {Number} */
			this.iterationCount = timerIterationCount;
			/** @type {Boolean|ScrollObserver} */
			this._autoplay = parent ? false : setValue(autoplay, timerDefaults.autoplay);
			/** @type {Number} */
			this._offset = offsetPosition;
			/** @type {Number} */
			this._delay = timerDelay;
			/** @type {Number} */
			this._loopDelay = timerLoopDelay;
			/** @type {Number} */
			this._iterationTime = 0;
			/** @type {Number} */
			this._currentIteration = 0;
			/** @type {Function} */
			this._resolve = noop;
			/** @type {Boolean} */
			this._running = false;
			/** @type {Number} */
			this._reversed = +setValue(reversed, timerDefaults.reversed);
			/** @type {Number} */
			this._reverse = this._reversed;
			/** @type {Number} */
			this._cancelled = 0;
			/** @type {Boolean} */
			this._alternate = setValue(alternate, timerDefaults.alternate);
			/** @type {Renderable} */
			this._prev = null;
			/** @type {Renderable} */
			this._next = null;
			/** @type {Number} */
			this._elapsedTime = timerInitTime;
			/** @type {Number} */
			this._startTime = timerInitTime;
			/** @type {Number} */
			this._lastTime = timerInitTime;
			/** @type {Number} */
			this._fps = setValue(frameRate, timerDefaults.frameRate);
			/** @type {Number} */
			this._speed = setValue(playbackRate, timerDefaults.playbackRate);
		}
		get cancelled() {
			return !!this._cancelled;
		}
		/** @param {Boolean} cancelled  */
		set cancelled(cancelled) {
			cancelled ? this.cancel() : this.reset(1).play();
		}
		get currentTime() {
			return clamp(round(this._currentTime, globals.precision), -this._delay, this.duration);
		}
		/** @param {Number} time  */
		set currentTime(time) {
			const paused = this.paused;
			this.pause().seek(+time);
			if (!paused) this.resume();
		}
		get iterationCurrentTime() {
			return round(this._iterationTime, globals.precision);
		}
		/** @param {Number} time  */
		set iterationCurrentTime(time) {
			this.currentTime = this.iterationDuration * this._currentIteration + time;
		}
		get progress() {
			return clamp(round(this._currentTime / this.duration, 10), 0, 1);
		}
		/** @param {Number} progress  */
		set progress(progress) {
			this.currentTime = this.duration * progress;
		}
		get iterationProgress() {
			return clamp(round(this._iterationTime / this.iterationDuration, 10), 0, 1);
		}
		/** @param {Number} progress  */
		set iterationProgress(progress) {
			const iterationDuration = this.iterationDuration;
			this.currentTime = iterationDuration * this._currentIteration + iterationDuration * progress;
		}
		get currentIteration() {
			return this._currentIteration;
		}
		/** @param {Number} iterationCount  */
		set currentIteration(iterationCount) {
			this.currentTime = this.iterationDuration * clamp(+iterationCount, 0, this.iterationCount - 1);
		}
		get reversed() {
			return !!this._reversed;
		}
		/** @param {Boolean} reverse  */
		set reversed(reverse) {
			reverse ? this.reverse() : this.play();
		}
		get speed() {
			return super.speed;
		}
		/** @param {Number} playbackRate  */
		set speed(playbackRate) {
			super.speed = playbackRate;
			this.resetTime();
		}
		/**
		* @param  {Number} internalRender
		* @return {this}
		*/
		reset(internalRender = 0) {
			reviveTimer(this);
			if (this._reversed && !this._reverse) this.reversed = false;
			this._iterationTime = this.iterationDuration;
			tick(this, 0, 1, internalRender, tickModes.FORCE);
			resetTimerProperties(this);
			if (this._hasChildren) forEachChildren(this, resetTimerProperties);
			return this;
		}
		/**
		* @param  {Number} internalRender
		* @return {this}
		*/
		init(internalRender = 0) {
			this.fps = this._fps;
			this.speed = this._speed;
			if (!internalRender && this._hasChildren) tick(this, this.duration, 1, internalRender, tickModes.FORCE);
			this.reset(internalRender);
			const autoplay = this._autoplay;
			if (autoplay === true) this.resume();
			else if (autoplay && !isUnd(
				/** @type {ScrollObserver} */
				autoplay.linked
			))
 /** @type {ScrollObserver} */ autoplay.link(this);
			return this;
		}
		/** @return {this} */
		resetTime() {
			const timeScale = 1 / (this._speed * engine._speed);
			this._startTime = now() - (this._currentTime + this._delay) * timeScale;
			return this;
		}
		/** @return {this} */
		pause() {
			if (this.paused) return this;
			this.paused = true;
			this.onPause(this);
			return this;
		}
		/** @return {this} */
		resume() {
			if (!this.paused) return this;
			this.paused = false;
			if (this.duration <= minValue && !this._hasChildren) tick(this, minValue, 0, 0, tickModes.FORCE);
			else {
				if (!this._running) {
					addChild(engine, this);
					engine._hasChildren = true;
					this._running = true;
				}
				this.resetTime();
				this._startTime -= 12;
				engine.wake();
			}
			return this;
		}
		/** @return {this} */
		restart() {
			return this.reset(0).resume();
		}
		/**
		* @param  {Number} time
		* @param  {Boolean|Number} [muteCallbacks]
		* @param  {Boolean|Number} [internalRender]
		* @return {this}
		*/
		seek(time, muteCallbacks = 0, internalRender = 0) {
			reviveTimer(this);
			this.completed = false;
			const isPaused = this.paused;
			this.paused = true;
			tick(this, time + this._delay, ~~muteCallbacks, ~~internalRender, tickModes.AUTO);
			return isPaused ? this : this.resume();
		}
		/** @return {this} */
		alternate() {
			const reversed = this._reversed;
			const count = this.iterationCount;
			const duration = this.iterationDuration;
			const iterations = count === Infinity ? floor(maxValue / duration) : count;
			this._reversed = +(this._alternate && !(iterations % 2) ? reversed : !reversed);
			if (count === Infinity) this.iterationProgress = this._reversed ? 1 - this.iterationProgress : this.iterationProgress;
			else this.seek(duration * iterations - this._currentTime);
			this.resetTime();
			return this;
		}
		/** @return {this} */
		play() {
			if (this._reversed) this.alternate();
			return this.resume();
		}
		/** @return {this} */
		reverse() {
			if (!this._reversed) this.alternate();
			return this.resume();
		}
		/** @return {this} */
		cancel() {
			if (this._hasChildren) forEachChildren(this, (child) => child.cancel(), true);
			else forEachChildren(this, removeTweenSliblings);
			this._cancelled = 1;
			return this.pause();
		}
		/**
		* @param  {Number} newDuration
		* @return {this}
		*/
		stretch(newDuration) {
			const currentDuration = this.duration;
			const normlizedDuration = normalizeTime(newDuration);
			if (currentDuration === normlizedDuration) return this;
			const timeScale = newDuration / currentDuration;
			const isSetter = newDuration <= minValue;
			this.duration = isSetter ? minValue : normlizedDuration;
			this.iterationDuration = isSetter ? minValue : normalizeTime(this.iterationDuration * timeScale);
			this._offset *= timeScale;
			this._delay *= timeScale;
			this._loopDelay *= timeScale;
			return this;
		}
		/**
		* Cancels the timer by seeking it back to 0 and reverting the attached scroller if necessary
		* @return {this}
		*/
		revert() {
			tick(this, 0, 1, 0, tickModes.AUTO);
			const ap = this._autoplay;
			if (ap && ap.linked && ap.linked === this) ap.revert();
			return this.cancel();
		}
		/**
		* Imediatly completes the timer, cancels it and triggers the onComplete callback
		* @return {this}
		*/
		complete() {
			return this.seek(this.duration).cancel();
		}
		/**
		* @param  {Callback<this>} [callback]
		* @return {Promise}
		*/
		then(callback = noop) {
			const then = this.then;
			const onResolve = () => {
				this.then = null;
				callback(this);
				this.then = then;
				this._resolve = noop;
			};
			return new Promise((r) => {
				this._resolve = () => r(onResolve());
				if (this.completed) this._resolve();
				return this;
			});
		}
	};
	/**
	* @param {TimerParams} [parameters]
	* @return {Timer}
	*/
	var createTimer = (parameters) => new Timer(parameters, null, 0).init();
	/** @type {EasingFunction} */
	var none = (t) => t;
	/**
	* @param  {Number} aT
	* @param  {Number} aA1
	* @param  {Number} aA2
	* @return {Number}
	*/
	var calcBezier = (aT, aA1, aA2) => (((1 - 3 * aA2 + 3 * aA1) * aT + (3 * aA2 - 6 * aA1)) * aT + 3 * aA1) * aT;
	/**
	* @param  {Number} aX
	* @param  {Number} mX1
	* @param  {Number} mX2
	* @return {Number}
	*/
	var binarySubdivide = (aX, mX1, mX2) => {
		let aA = 0, aB = 1, currentX, currentT, i = 0;
		do {
			currentT = aA + (aB - aA) / 2;
			currentX = calcBezier(currentT, mX1, mX2) - aX;
			if (currentX > 0) aB = currentT;
			else aA = currentT;
		} while (abs(currentX) > 1e-7 && ++i < 100);
		return currentT;
	};
	/**
	* @param  {Number} [mX1] The x coordinate of the first point
	* @param  {Number} [mY1] The y coordinate of the first point
	* @param  {Number} [mX2] The x coordinate of the second point
	* @param  {Number} [mY2] The y coordinate of the second point
	* @return {EasingFunction}
	*/
	var cubicBezier = (mX1 = .5, mY1 = 0, mX2 = .5, mY2 = 1) => mX1 === mY1 && mX2 === mY2 ? none : (t) => t === 0 || t === 1 ? t : calcBezier(binarySubdivide(t, mX1, mX2), mY1, mY2);
	/**
	* Steps ease implementation https://developer.mozilla.org/fr/docs/Web/CSS/transition-timing-function
	* Only covers 'end' and 'start' jumpterms
	* @param  {Number} steps
	* @param  {Boolean} [fromStart]
	* @return {EasingFunction}
	*/
	var steps = (steps = 10, fromStart) => {
		const roundMethod = fromStart ? ceil : floor;
		return (t) => roundMethod(clamp(t, 0, 1) * steps) * (1 / steps);
	};
	/**
	* Without parameters, the linear function creates a non-eased transition.
	* Parameters, if used, creates a piecewise linear easing by interpolating linearly between the specified points.
	* @param  {...(String|Number)} args - Points
	* @return {EasingFunction}
	*/
	var linear = (...args) => {
		const argsLength = args.length;
		if (!argsLength) return none;
		const totalPoints = argsLength - 1;
		const firstArg = args[0];
		const lastArg = args[totalPoints];
		const xPoints = [0];
		const yPoints = [parseNumber(firstArg)];
		for (let i = 1; i < totalPoints; i++) {
			const arg = args[i];
			const splitValue = isStr(arg) ? arg.trim().split(" ") : [arg];
			const value = splitValue[0];
			const percent = splitValue[1];
			xPoints.push(!isUnd(percent) ? parseNumber(percent) / 100 : i / totalPoints);
			yPoints.push(parseNumber(value));
		}
		yPoints.push(parseNumber(lastArg));
		xPoints.push(1);
		return function easeLinear(t) {
			for (let i = 1, l = xPoints.length; i < l; i++) {
				const currentX = xPoints[i];
				if (t <= currentX) {
					const prevX = xPoints[i - 1];
					const prevY = yPoints[i - 1];
					return prevY + (yPoints[i] - prevY) * (t - prevX) / (currentX - prevX);
				}
			}
			return yPoints[yPoints.length - 1];
		};
	};
	/**
	* Generate random steps
	* @param  {Number} [length] - The number of steps
	* @param  {Number} [randomness] - How strong the randomness is
	* @return {EasingFunction}
	*/
	var irregular = (length = 10, randomness = 1) => {
		const values = [0];
		const total = length - 1;
		for (let i = 1; i < total; i++) {
			const previousValue = values[i - 1];
			const spacing = i / total;
			const randomVariation = spacing + ((i + 1) / total - spacing) * Math.random();
			const randomValue = spacing * (1 - randomness) + randomVariation * randomness;
			values.push(clamp(randomValue, previousValue, 1));
		}
		values.push(1);
		return linear(...values);
	};
	/**
	* @callback PowerEasing
	* @param {Number|String} [power=1.675]
	* @return {EasingFunction}
	*/
	/**
	* @callback BackEasing
	* @param {Number|String} [overshoot=1.70158]
	* @return {EasingFunction}
	*/
	/**
	* @callback ElasticEasing
	* @param {Number|String} [amplitude=1]
	* @param {Number|String} [period=.3]
	* @return {EasingFunction}
	*/
	/**
	* @callback EaseFactory
	* @param {Number|String} [paramA]
	* @param {Number|String} [paramB]
	* @return {EasingFunction|Number}
	*/
	/** @typedef {PowerEasing|BackEasing|ElasticEasing} EasesFactory */
	var halfPI = PI / 2;
	var doublePI = PI * 2;
	/** @type {PowerEasing} */
	var easeInPower = (p = 1.68) => (t) => pow(t, +p);
	/** @type {Record<String, EasesFactory|EasingFunction>} */
	var easeInFunctions = {
		[emptyString]: easeInPower,
		Quad: easeInPower(2),
		Cubic: easeInPower(3),
		Quart: easeInPower(4),
		Quint: easeInPower(5),
		/** @type {EasingFunction} */
		Sine: (t) => 1 - cos(t * halfPI),
		/** @type {EasingFunction} */
		Circ: (t) => 1 - sqrt(1 - t * t),
		/** @type {EasingFunction} */
		Expo: (t) => t ? pow(2, 10 * t - 10) : 0,
		/** @type {EasingFunction} */
		Bounce: (t) => {
			let pow2, b = 4;
			while (t < ((pow2 = pow(2, --b)) - 1) / 11);
			return 1 / pow(4, 3 - b) - 7.5625 * pow((pow2 * 3 - 2) / 22 - t, 2);
		},
		/** @type {BackEasing} */
		Back: (overshoot = 1.70158) => (t) => (+overshoot + 1) * t * t * t - +overshoot * t * t,
		/** @type {ElasticEasing} */
		Elastic: (amplitude = 1, period = .3) => {
			const a = clamp(+amplitude, 1, 10);
			const p = clamp(+period, minValue, 2);
			const s = p / doublePI * asin(1 / a);
			const e = doublePI / p;
			return (t) => t === 0 || t === 1 ? t : -a * pow(2, -10 * (1 - t)) * sin((1 - t - s) * e);
		}
	};
	/**
	* @callback EaseType
	* @param {EasingFunction} Ease
	* @return {EasingFunction}
	*/
	/** @type {Record<String, EaseType>} */
	var easeTypes = {
		in: (easeIn) => (t) => easeIn(t),
		out: (easeIn) => (t) => 1 - easeIn(1 - t),
		inOut: (easeIn) => (t) => t < .5 ? easeIn(t * 2) / 2 : 1 - easeIn(t * -2 + 2) / 2,
		outIn: (easeIn) => (t) => t < .5 ? (1 - easeIn(1 - t * 2)) / 2 : (easeIn(t * 2 - 1) + 1) / 2
	};
	/**
	* @param  {String} string
	* @param  {Record<String, EasesFactory|EasingFunction>} easesFunctions
	* @param  {Object} easesLookups
	* @return {EasingFunction}
	*/
	var parseEaseString = (string, easesFunctions, easesLookups) => {
		if (easesLookups[string]) return easesLookups[string];
		if (string.indexOf("(") <= -1) {
			const parsedFn = easeTypes[string] || string.includes("Back") || string.includes("Elastic") ? easesFunctions[string]() : easesFunctions[string];
			return parsedFn ? easesLookups[string] = parsedFn : none;
		} else {
			const split = string.slice(0, -1).split("(");
			const parsedFn = easesFunctions[split[0]];
			return parsedFn ? easesLookups[string] = parsedFn(...split[1].split(",")) : none;
		}
	};
	/**
	* @typedef  {Object} EasesFunctions
	* @property {typeof linear} linear
	* @property {typeof irregular} irregular
	* @property {typeof steps} steps
	* @property {typeof cubicBezier} cubicBezier
	* @property {PowerEasing} in
	* @property {PowerEasing} out
	* @property {PowerEasing} inOut
	* @property {PowerEasing} outIn
	* @property {EasingFunction} inQuad
	* @property {EasingFunction} outQuad
	* @property {EasingFunction} inOutQuad
	* @property {EasingFunction} outInQuad
	* @property {EasingFunction} inCubic
	* @property {EasingFunction} outCubic
	* @property {EasingFunction} inOutCubic
	* @property {EasingFunction} outInCubic
	* @property {EasingFunction} inQuart
	* @property {EasingFunction} outQuart
	* @property {EasingFunction} inOutQuart
	* @property {EasingFunction} outInQuart
	* @property {EasingFunction} inQuint
	* @property {EasingFunction} outQuint
	* @property {EasingFunction} inOutQuint
	* @property {EasingFunction} outInQuint
	* @property {EasingFunction} inSine
	* @property {EasingFunction} outSine
	* @property {EasingFunction} inOutSine
	* @property {EasingFunction} outInSine
	* @property {EasingFunction} inCirc
	* @property {EasingFunction} outCirc
	* @property {EasingFunction} inOutCirc
	* @property {EasingFunction} outInCirc
	* @property {EasingFunction} inExpo
	* @property {EasingFunction} outExpo
	* @property {EasingFunction} inOutExpo
	* @property {EasingFunction} outInExpo
	* @property {EasingFunction} inBounce
	* @property {EasingFunction} outBounce
	* @property {EasingFunction} inOutBounce
	* @property {EasingFunction} outInBounce
	* @property {BackEasing} inBack
	* @property {BackEasing} outBack
	* @property {BackEasing} inOutBack
	* @property {BackEasing} outInBack
	* @property {ElasticEasing} inElastic
	* @property {ElasticEasing} outElastic
	* @property {ElasticEasing} inOutElastic
	* @property {ElasticEasing} outInElastic
	*/
	var eases = /* @__PURE__ */ (() => {
		const list = {
			linear,
			irregular,
			steps,
			cubicBezier
		};
		for (let type in easeTypes) for (let name in easeInFunctions) {
			const easeIn = easeInFunctions[name];
			const easeType = easeTypes[type];
			list[type + name] = name === emptyString || name === "Back" || name === "Elastic" ? (a, b) => easeType(
				/** @type {EasesFactory} */
				easeIn(a, b)
			) : easeType(easeIn);
		}
		return list;
	})();
	/** @type {Record<String, EasingFunction>} */
	var JSEasesLookups = { linear: none };
	/**
	* @param  {EasingParam} ease
	* @return {EasingFunction}
	*/
	var parseEasings = (ease) => isFnc(ease) ? ease : isStr(ease) ? parseEaseString(ease, eases, JSEasesLookups) : none;
	var propertyNamesCache = {};
	/**
	* @param  {String} propertyName
	* @param  {Target} target
	* @param  {tweenTypes} tweenType
	* @return {String}
	*/
	var sanitizePropertyName = (propertyName, target, tweenType) => {
		if (tweenType === tweenTypes.TRANSFORM) {
			const t = shortTransforms.get(propertyName);
			return t ? t : propertyName;
		} else if (tweenType === tweenTypes.CSS || tweenType === tweenTypes.ATTRIBUTE && isSvg(target) && propertyName in target.style) {
			const cachedPropertyName = propertyNamesCache[propertyName];
			if (cachedPropertyName) return cachedPropertyName;
			else {
				const lowerCaseName = propertyName ? toLowerCase(propertyName) : propertyName;
				propertyNamesCache[propertyName] = lowerCaseName;
				return lowerCaseName;
			}
		} else return propertyName;
	};
	var angleUnitsMap = {
		"deg": 1,
		"rad": 180 / PI,
		"turn": 360
	};
	var convertedValuesCache = {};
	/**
	* @param  {DOMTarget} el
	* @param  {TweenDecomposedValue} decomposedValue
	* @param  {String} unit
	* @param  {Boolean} [force]
	* @return {TweenDecomposedValue}
	*/
	var convertValueUnit = (el, decomposedValue, unit, force = false) => {
		const currentUnit = decomposedValue.u;
		const currentNumber = decomposedValue.n;
		if (decomposedValue.t === valueTypes.UNIT && currentUnit === unit) return decomposedValue;
		const cachedKey = currentNumber + currentUnit + unit;
		const cached = convertedValuesCache[cachedKey];
		if (!isUnd(cached) && !force) decomposedValue.n = cached;
		else {
			let convertedValue;
			if (currentUnit in angleUnitsMap) convertedValue = currentNumber * angleUnitsMap[currentUnit] / angleUnitsMap[unit];
			else {
				const baseline = 100;
				const tempEl = el.cloneNode();
				const parentNode = el.parentNode;
				const parentEl = parentNode && parentNode !== doc ? parentNode : doc.body;
				parentEl.appendChild(tempEl);
				const elStyle = tempEl.style;
				elStyle.width = baseline + currentUnit;
				const currentUnitWidth = tempEl.offsetWidth || baseline;
				elStyle.width = baseline + unit;
				const factor = currentUnitWidth / (tempEl.offsetWidth || baseline);
				parentEl.removeChild(tempEl);
				convertedValue = factor * currentNumber;
			}
			decomposedValue.n = convertedValue;
			convertedValuesCache[cachedKey] = convertedValue;
		}
		decomposedValue.t, valueTypes.UNIT;
		decomposedValue.u = unit;
		return decomposedValue;
	};
	/**
	* @template {Renderable} T
	* @param {T} renderable
	* @return {T}
	*/
	var cleanInlineStyles = (renderable) => {
		if (renderable._hasChildren) forEachChildren(renderable, cleanInlineStyles, true);
		else {
			const animation = renderable;
			animation.pause();
			forEachChildren(animation, (tween) => {
				const tweenProperty = tween.property;
				const tweenTarget = tween.target;
				if (tweenTarget[isDomSymbol]) {
					const targetStyle = tweenTarget.style;
					const originalInlinedValue = animation._inlineStyles[tweenProperty];
					if (tween._tweenType === tweenTypes.TRANSFORM) {
						const cachedTransforms = tweenTarget[transformsSymbol];
						if (isUnd(originalInlinedValue) || originalInlinedValue === emptyString) delete cachedTransforms[tweenProperty];
						else cachedTransforms[tweenProperty] = originalInlinedValue;
						if (tween._renderTransforms) if (!Object.keys(cachedTransforms).length) targetStyle.removeProperty("transform");
						else {
							let str = emptyString;
							for (let key in cachedTransforms) str += transformsFragmentStrings[key] + cachedTransforms[key] + ") ";
							targetStyle.transform = str;
						}
					} else if (isUnd(originalInlinedValue) || originalInlinedValue === emptyString) targetStyle.removeProperty(tweenProperty);
					else targetStyle[tweenProperty] = originalInlinedValue;
					if (animation._tail === tween) animation.targets.forEach((t) => {
						if (t.getAttribute && t.getAttribute("style") === emptyString) t.removeAttribute("style");
					});
				}
			});
		}
		return renderable;
	};
	var fromTargetObject = createDecomposedValueTargetObject();
	var toTargetObject = createDecomposedValueTargetObject();
	var toFunctionStore = { func: null };
	var keyframesTargetArray = [null];
	var fastSetValuesArray = [null, null];
	/** @type {TweenKeyValue} */
	var keyObjectTarget = { to: null };
	var tweenId = 0;
	var keyframes;
	/** @type {TweenParamsOptions & TweenValues} */
	var key;
	/**
	* @param {DurationKeyframes | PercentageKeyframes} keyframes
	* @param {AnimationParams} parameters
	* @return {AnimationParams}
	*/
	var generateKeyframes = (keyframes, parameters) => {
		/** @type {AnimationParams} */
		const properties = {};
		if (isArr(keyframes)) {
			const propertyNames = [].concat(...keyframes.map((key) => Object.keys(key))).filter(isKey);
			for (let i = 0, l = propertyNames.length; i < l; i++) {
				const propName = propertyNames[i];
				properties[propName] = keyframes.map((key) => {
					/** @type {TweenKeyValue} */
					const newKey = {};
					for (let p in key) {
						const keyValue = key[p];
						if (isKey(p)) {
							if (p === propName) newKey.to = keyValue;
						} else newKey[p] = keyValue;
					}
					return newKey;
				});
			}
		} else {
			const totalDuration = setValue(parameters.duration, globals.defaults.duration);
			Object.keys(keyframes).map((key) => {
				return {
					o: parseFloat(key) / 100,
					p: keyframes[key]
				};
			}).sort((a, b) => a.o - b.o).forEach((key) => {
				const offset = key.o;
				const prop = key.p;
				for (let name in prop) if (isKey(name)) {
					let propArray = properties[name];
					if (!propArray) propArray = properties[name] = [];
					const duration = offset * totalDuration;
					let length = propArray.length;
					let prevKey = propArray[length - 1];
					const keyObj = { to: prop[name] };
					let durProgress = 0;
					for (let i = 0; i < length; i++) durProgress += propArray[i].duration;
					if (length === 1) keyObj.from = prevKey.to;
					if (prop.ease) keyObj.ease = prop.ease;
					keyObj.duration = duration - (length ? durProgress : 0);
					propArray.push(keyObj);
				}
				return key;
			});
			for (let name in properties) {
				const propArray = properties[name];
				let prevEase;
				for (let i = 0, l = propArray.length; i < l; i++) {
					const prop = propArray[i];
					const currentEase = prop.ease;
					prop.ease = prevEase ? prevEase : void 0;
					prevEase = currentEase;
				}
				if (!propArray[0].duration) propArray.shift();
			}
		}
		return properties;
	};
	var JSAnimation = class extends Timer {
		/**
		* @param {TargetsParam} targets
		* @param {AnimationParams} parameters
		* @param {Timeline} [parent]
		* @param {Number} [parentPosition]
		* @param {Boolean} [fastSet=false]
		* @param {Number} [index=0]
		* @param {Number} [length=0]
		*/
		constructor(targets, parameters, parent, parentPosition, fastSet = false, index = 0, length = 0) {
			super(parameters, parent, parentPosition);
			const parsedTargets = registerTargets(targets);
			const targetsLength = parsedTargets.length;
			const kfParams = parameters.keyframes;
			const params = kfParams ? mergeObjects(generateKeyframes(kfParams, parameters), parameters) : parameters;
			const { delay, duration, ease, playbackEase, modifier, composition, onRender } = params;
			const animDefaults = parent ? parent.defaults : globals.defaults;
			const animaPlaybackEase = setValue(playbackEase, animDefaults.playbackEase);
			const animEase = animaPlaybackEase ? parseEasings(animaPlaybackEase) : null;
			const hasSpring = !isUnd(ease) && !isUnd(
				/** @type {Spring} */
				ease.ease
			);
			const tEasing = hasSpring ? ease.ease : setValue(ease, animEase ? "linear" : animDefaults.ease);
			const tDuration = hasSpring ? ease.duration : setValue(duration, animDefaults.duration);
			const tDelay = setValue(delay, animDefaults.delay);
			const tModifier = modifier || animDefaults.modifier;
			const tComposition = isUnd(composition) && targetsLength >= K ? compositionTypes.none : !isUnd(composition) ? composition : animDefaults.composition;
			const animInlineStyles = {};
			const absoluteOffsetTime = this._offset + (parent ? parent._offset : 0);
			let iterationDuration = NaN;
			let iterationDelay = NaN;
			let animationAnimationLength = 0;
			let shouldTriggerRender = 0;
			for (let targetIndex = 0; targetIndex < targetsLength; targetIndex++) {
				const target = parsedTargets[targetIndex];
				const ti = index || targetIndex;
				const tl = length || targetsLength;
				let lastTransformGroupIndex = NaN;
				let lastTransformGroupLength = NaN;
				for (let p in params) if (isKey(p)) {
					const tweenType = getTweenType(target, p);
					const propName = sanitizePropertyName(p, target, tweenType);
					let propValue = params[p];
					const isPropValueArray = isArr(propValue);
					if (fastSet && !isPropValueArray) {
						fastSetValuesArray[0] = propValue;
						fastSetValuesArray[1] = propValue;
						propValue = fastSetValuesArray;
					}
					if (isPropValueArray) {
						const arrayLength = propValue.length;
						const isNotObjectValue = !isObj(propValue[0]);
						if (arrayLength === 2 && isNotObjectValue) {
							keyObjectTarget.to = propValue;
							keyframesTargetArray[0] = keyObjectTarget;
							keyframes = keyframesTargetArray;
						} else if (arrayLength > 2 && isNotObjectValue) {
							keyframes = [];
							/** @type {Array.<Number>} */ propValue.forEach((v, i) => {
								if (!i) fastSetValuesArray[0] = v;
								else if (i === 1) {
									fastSetValuesArray[1] = v;
									keyframes.push(fastSetValuesArray);
								} else keyframes.push(v);
							});
						} else keyframes = propValue;
					} else {
						keyframesTargetArray[0] = propValue;
						keyframes = keyframesTargetArray;
					}
					let siblings = null;
					let prevTween = null;
					let firstTweenChangeStartTime = NaN;
					let lastTweenChangeEndTime = 0;
					let tweenIndex = 0;
					for (let l = keyframes.length; tweenIndex < l; tweenIndex++) {
						const keyframe = keyframes[tweenIndex];
						if (isObj(keyframe)) key = keyframe;
						else {
							keyObjectTarget.to = keyframe;
							key = keyObjectTarget;
						}
						toFunctionStore.func = null;
						const computedToValue = getFunctionValue(key.to, target, ti, tl, toFunctionStore);
						let tweenToValue;
						if (isObj(computedToValue) && !isUnd(computedToValue.to)) {
							key = computedToValue;
							tweenToValue = computedToValue.to;
						} else tweenToValue = computedToValue;
						const tweenFromValue = getFunctionValue(key.from, target, ti, tl);
						const keyEasing = key.ease;
						const hasSpring = !isUnd(keyEasing) && !isUnd(
							/** @type {Spring} */
							keyEasing.ease
						);
						const tweenEasing = hasSpring ? keyEasing.ease : keyEasing || tEasing;
						const tweenDuration = hasSpring ? keyEasing.duration : getFunctionValue(setValue(key.duration, l > 1 ? getFunctionValue(tDuration, target, ti, tl) / l : tDuration), target, ti, tl);
						const tweenDelay = getFunctionValue(setValue(key.delay, !tweenIndex ? tDelay : 0), target, ti, tl);
						const computedComposition = getFunctionValue(setValue(key.composition, tComposition), target, ti, tl);
						const tweenComposition = isNum(computedComposition) ? computedComposition : compositionTypes[computedComposition];
						const tweenModifier = key.modifier || tModifier;
						const hasFromvalue = !isUnd(tweenFromValue);
						const hasToValue = !isUnd(tweenToValue);
						const isFromToArray = isArr(tweenToValue);
						const isFromToValue = isFromToArray || hasFromvalue && hasToValue;
						const tweenStartTime = prevTween ? lastTweenChangeEndTime + tweenDelay : tweenDelay;
						const absoluteStartTime = round(absoluteOffsetTime + tweenStartTime, 12);
						if (!shouldTriggerRender && (hasFromvalue || isFromToArray)) shouldTriggerRender = 1;
						let prevSibling = prevTween;
						if (tweenComposition !== compositionTypes.none) {
							if (!siblings) siblings = getTweenSiblings(target, propName);
							let nextSibling = siblings._head;
							while (nextSibling && !nextSibling._isOverridden && nextSibling._absoluteStartTime <= absoluteStartTime) {
								prevSibling = nextSibling;
								nextSibling = nextSibling._nextRep;
								if (nextSibling && nextSibling._absoluteStartTime >= absoluteStartTime) while (nextSibling) {
									overrideTween(nextSibling);
									nextSibling = nextSibling._nextRep;
								}
							}
						}
						if (isFromToValue) {
							decomposeRawValue(isFromToArray ? getFunctionValue(tweenToValue[0], target, ti, tl) : tweenFromValue, fromTargetObject);
							decomposeRawValue(isFromToArray ? getFunctionValue(tweenToValue[1], target, ti, tl, toFunctionStore) : tweenToValue, toTargetObject);
							if (fromTargetObject.t === valueTypes.NUMBER) if (prevSibling) {
								if (prevSibling._valueType === valueTypes.UNIT) {
									fromTargetObject.t = valueTypes.UNIT;
									fromTargetObject.u = prevSibling._unit;
								}
							} else {
								decomposeRawValue(getOriginalAnimatableValue(target, propName, tweenType, animInlineStyles), decomposedOriginalValue);
								if (decomposedOriginalValue.t === valueTypes.UNIT) {
									fromTargetObject.t = valueTypes.UNIT;
									fromTargetObject.u = decomposedOriginalValue.u;
								}
							}
						} else {
							if (hasToValue) decomposeRawValue(tweenToValue, toTargetObject);
							else if (prevTween) decomposeTweenValue(prevTween, toTargetObject);
							else decomposeRawValue(parent && prevSibling && prevSibling.parent.parent === parent ? prevSibling._value : getOriginalAnimatableValue(target, propName, tweenType, animInlineStyles), toTargetObject);
							if (hasFromvalue) decomposeRawValue(tweenFromValue, fromTargetObject);
							else if (prevTween) decomposeTweenValue(prevTween, fromTargetObject);
							else decomposeRawValue(parent && prevSibling && prevSibling.parent.parent === parent ? prevSibling._value : getOriginalAnimatableValue(target, propName, tweenType, animInlineStyles), fromTargetObject);
						}
						if (fromTargetObject.o) fromTargetObject.n = getRelativeValue(!prevSibling ? decomposeRawValue(getOriginalAnimatableValue(target, propName, tweenType, animInlineStyles), decomposedOriginalValue).n : prevSibling._toNumber, fromTargetObject.n, fromTargetObject.o);
						if (toTargetObject.o) toTargetObject.n = getRelativeValue(fromTargetObject.n, toTargetObject.n, toTargetObject.o);
						if (fromTargetObject.t !== toTargetObject.t) {
							if (fromTargetObject.t === valueTypes.COMPLEX || toTargetObject.t === valueTypes.COMPLEX) {
								const complexValue = fromTargetObject.t === valueTypes.COMPLEX ? fromTargetObject : toTargetObject;
								const notComplexValue = fromTargetObject.t === valueTypes.COMPLEX ? toTargetObject : fromTargetObject;
								notComplexValue.t = valueTypes.COMPLEX;
								notComplexValue.s = cloneArray(complexValue.s);
								notComplexValue.d = complexValue.d.map(() => notComplexValue.n);
							} else if (fromTargetObject.t === valueTypes.UNIT || toTargetObject.t === valueTypes.UNIT) {
								const unitValue = fromTargetObject.t === valueTypes.UNIT ? fromTargetObject : toTargetObject;
								const notUnitValue = fromTargetObject.t === valueTypes.UNIT ? toTargetObject : fromTargetObject;
								notUnitValue.t = valueTypes.UNIT;
								notUnitValue.u = unitValue.u;
							} else if (fromTargetObject.t === valueTypes.COLOR || toTargetObject.t === valueTypes.COLOR) {
								const colorValue = fromTargetObject.t === valueTypes.COLOR ? fromTargetObject : toTargetObject;
								const notColorValue = fromTargetObject.t === valueTypes.COLOR ? toTargetObject : fromTargetObject;
								notColorValue.t = valueTypes.COLOR;
								notColorValue.s = colorValue.s;
								notColorValue.d = [
									0,
									0,
									0,
									1
								];
							}
						}
						if (fromTargetObject.u !== toTargetObject.u) {
							let valueToConvert = toTargetObject.u ? fromTargetObject : toTargetObject;
							valueToConvert = convertValueUnit(target, valueToConvert, toTargetObject.u ? toTargetObject.u : fromTargetObject.u, false);
						}
						if (toTargetObject.d && fromTargetObject.d && toTargetObject.d.length !== fromTargetObject.d.length) {
							const longestValue = fromTargetObject.d.length > toTargetObject.d.length ? fromTargetObject : toTargetObject;
							const shortestValue = longestValue === fromTargetObject ? toTargetObject : fromTargetObject;
							shortestValue.d = longestValue.d.map((_, i) => isUnd(shortestValue.d[i]) ? 0 : shortestValue.d[i]);
							shortestValue.s = cloneArray(longestValue.s);
						}
						const tweenUpdateDuration = round(+tweenDuration || minValue, 12);
						/** @type {Tween} */
						const tween = {
							parent: this,
							id: tweenId++,
							property: propName,
							target,
							_value: null,
							_func: toFunctionStore.func,
							_ease: parseEasings(tweenEasing),
							_fromNumbers: cloneArray(fromTargetObject.d),
							_toNumbers: cloneArray(toTargetObject.d),
							_strings: cloneArray(toTargetObject.s),
							_fromNumber: fromTargetObject.n,
							_toNumber: toTargetObject.n,
							_numbers: cloneArray(fromTargetObject.d),
							_number: fromTargetObject.n,
							_unit: toTargetObject.u,
							_modifier: tweenModifier,
							_currentTime: 0,
							_startTime: tweenStartTime,
							_delay: +tweenDelay,
							_updateDuration: tweenUpdateDuration,
							_changeDuration: tweenUpdateDuration,
							_absoluteStartTime: absoluteStartTime,
							_tweenType: tweenType,
							_valueType: toTargetObject.t,
							_composition: tweenComposition,
							_isOverlapped: 0,
							_isOverridden: 0,
							_renderTransforms: 0,
							_prevRep: null,
							_nextRep: null,
							_prevAdd: null,
							_nextAdd: null,
							_prev: null,
							_next: null
						};
						if (tweenComposition !== compositionTypes.none) composeTween(tween, siblings);
						if (isNaN(firstTweenChangeStartTime)) firstTweenChangeStartTime = tween._startTime;
						lastTweenChangeEndTime = round(tweenStartTime + tweenUpdateDuration, 12);
						prevTween = tween;
						animationAnimationLength++;
						addChild(this, tween);
					}
					if (isNaN(iterationDelay) || firstTweenChangeStartTime < iterationDelay) iterationDelay = firstTweenChangeStartTime;
					if (isNaN(iterationDuration) || lastTweenChangeEndTime > iterationDuration) iterationDuration = lastTweenChangeEndTime;
					if (tweenType === tweenTypes.TRANSFORM) {
						lastTransformGroupIndex = animationAnimationLength - tweenIndex;
						lastTransformGroupLength = animationAnimationLength;
					}
				}
				if (!isNaN(lastTransformGroupIndex)) {
					let i = 0;
					forEachChildren(this, (tween) => {
						if (i >= lastTransformGroupIndex && i < lastTransformGroupLength) {
							tween._renderTransforms = 1;
							if (tween._composition === compositionTypes.blend) forEachChildren(additive.animation, (additiveTween) => {
								if (additiveTween.id === tween.id) additiveTween._renderTransforms = 1;
							});
						}
						i++;
					});
				}
			}
			if (!targetsLength) console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`);
			if (iterationDelay) {
				forEachChildren(this, (tween) => {
					if (!(tween._startTime - tween._delay)) tween._delay -= iterationDelay;
					tween._startTime -= iterationDelay;
				});
				iterationDuration -= iterationDelay;
			} else iterationDelay = 0;
			if (!iterationDuration) {
				iterationDuration = minValue;
				this.iterationCount = 0;
			}
			/** @type {TargetsArray} */
			this.targets = parsedTargets;
			/** @type {Number} */
			this.duration = iterationDuration === minValue ? minValue : clampInfinity((iterationDuration + this._loopDelay) * this.iterationCount - this._loopDelay) || minValue;
			/** @type {Callback<this>} */
			this.onRender = onRender || animDefaults.onRender;
			/** @type {EasingFunction} */
			this._ease = animEase;
			/** @type {Number} */
			this._delay = iterationDelay;
			/** @type {Number} */
			this.iterationDuration = iterationDuration;
			/** @type {{}} */
			this._inlineStyles = animInlineStyles;
			if (!this._autoplay && shouldTriggerRender) this.onRender(this);
		}
		/**
		* @param  {Number} newDuration
		* @return {this}
		*/
		stretch(newDuration) {
			const currentDuration = this.duration;
			if (currentDuration === normalizeTime(newDuration)) return this;
			const timeScale = newDuration / currentDuration;
			forEachChildren(this, (tween) => {
				tween._updateDuration = normalizeTime(tween._updateDuration * timeScale);
				tween._changeDuration = normalizeTime(tween._changeDuration * timeScale);
				tween._currentTime *= timeScale;
				tween._startTime *= timeScale;
				tween._absoluteStartTime *= timeScale;
			});
			return super.stretch(newDuration);
		}
		/**
		* @return {this}
		*/
		refresh() {
			forEachChildren(this, (tween) => {
				const tweenFunc = tween._func;
				if (tweenFunc) {
					decomposeRawValue(getOriginalAnimatableValue(tween.target, tween.property, tween._tweenType), decomposedOriginalValue);
					decomposeRawValue(tweenFunc(), toTargetObject);
					tween._fromNumbers = cloneArray(decomposedOriginalValue.d);
					tween._fromNumber = decomposedOriginalValue.n;
					tween._toNumbers = cloneArray(toTargetObject.d);
					tween._strings = cloneArray(toTargetObject.s);
					tween._toNumber = toTargetObject.o ? getRelativeValue(decomposedOriginalValue.n, toTargetObject.n, toTargetObject.o) : toTargetObject.n;
				}
			});
			return this;
		}
		/**
		* Cancel the animation and revert all the values affected by this animation to their original state
		* @return {this}
		*/
		revert() {
			super.revert();
			return cleanInlineStyles(this);
		}
		/**
		* @param  {Callback<this>} [callback]
		* @return {Promise}
		*/
		then(callback) {
			return super.then(callback);
		}
	};
	/**
	* @param {TargetsParam} targets
	* @param {AnimationParams} parameters
	* @return {JSAnimation}
	*/
	var animate = (targets, parameters) => new JSAnimation(targets, parameters, null, 0, false).init();
	/**
	* Converts an easing function into a valid CSS linear() timing function string
	* @param {EasingFunction} fn
	* @param {number} [samples=100]
	* @returns {string} CSS linear() timing function
	*/
	var easingToLinear = (fn, samples = 100) => {
		const points = [];
		for (let i = 0; i <= samples; i++) points.push(fn(i / samples));
		return `linear(${points.join(", ")})`;
	};
	var WAAPIEasesLookups = {
		in: "ease-in",
		out: "ease-out",
		inOut: "ease-in-out"
	};
	var WAAPIeases = /* @__PURE__ */ (() => {
		const list = {};
		for (let type in easeTypes) list[type] = (p) => easeTypes[type](easeInPower(p));
		return list;
	})();
	/**
	* @param  {EasingParam} ease
	* @return {String}
	*/
	var parseWAAPIEasing = (ease) => {
		let parsedEase = WAAPIEasesLookups[ease];
		if (parsedEase) return parsedEase;
		parsedEase = "linear";
		if (isStr(ease)) {
			if (stringStartsWith(ease, "linear") || stringStartsWith(ease, "cubic-") || stringStartsWith(ease, "steps") || stringStartsWith(ease, "ease")) parsedEase = ease;
			else if (stringStartsWith(ease, "cubicB")) parsedEase = toLowerCase(ease);
			else {
				const parsed = parseEaseString(ease, WAAPIeases, WAAPIEasesLookups);
				if (isFnc(parsed)) parsedEase = parsed === none ? "linear" : easingToLinear(parsed);
			}
			WAAPIEasesLookups[ease] = parsedEase;
		} else if (isFnc(ease)) {
			const easing = easingToLinear(ease);
			if (easing) parsedEase = easing;
		} else if (ease.ease) parsedEase = easingToLinear(
			/** @type {Spring} */
			ease.ease
		);
		return parsedEase;
	};
	var transformsShorthands = [
		"x",
		"y",
		"z"
	];
	var commonDefaultPXProperties = [
		"perspective",
		"width",
		"height",
		"margin",
		"padding",
		"top",
		"right",
		"bottom",
		"left",
		"borderWidth",
		"fontSize",
		"borderRadius",
		...transformsShorthands
	];
	var validIndividualTransforms = [...transformsShorthands, ...validTransforms.filter((t) => [
		"X",
		"Y",
		"Z"
	].some((axis) => t.endsWith(axis)))];
	var transformsPropertiesRegistered = null;
	var WAAPIAnimationsLookups = {
		_head: null,
		_tail: null
	};
	/**
	* @param {DOMTarget} $el
	* @param {String} [property]
	* @param {WAAPIAnimation} [parent]
	*/
	var removeWAAPIAnimation = ($el, property, parent) => {
		let nextLookup = WAAPIAnimationsLookups._head;
		while (nextLookup) {
			const next = nextLookup._next;
			const matchTarget = nextLookup.$el === $el;
			const matchProperty = !property || nextLookup.property === property;
			const matchParent = !parent || nextLookup.parent === parent;
			if (matchTarget && matchProperty && matchParent) {
				const anim = nextLookup.animation;
				try {
					anim.commitStyles();
				} catch {}
				anim.cancel();
				removeChild(WAAPIAnimationsLookups, nextLookup);
				const lookupParent = nextLookup.parent;
				if (lookupParent) {
					lookupParent._completed++;
					if (lookupParent.animations.length === lookupParent._completed) {
						lookupParent.completed = true;
						if (!lookupParent.muteCallbacks) {
							lookupParent.paused = true;
							lookupParent.onComplete(lookupParent);
							lookupParent._resolve(lookupParent);
						}
					}
				}
			}
			nextLookup = next;
		}
	};
	/**
	* @param {WAAPIAnimation} parent
	* @param {DOMTarget} $el
	* @param {String} property
	* @param {PropertyIndexedKeyframes} keyframes
	* @param {KeyframeAnimationOptions} params
	* @retun {Animation}
	*/
	var addWAAPIAnimation = (parent, $el, property, keyframes, params) => {
		const animation = $el.animate(keyframes, params);
		const animTotalDuration = params.delay + +params.duration * params.iterations;
		animation.playbackRate = parent._speed;
		if (parent.paused) animation.pause();
		if (parent.duration < animTotalDuration) {
			parent.duration = animTotalDuration;
			parent.controlAnimation = animation;
		}
		parent.animations.push(animation);
		removeWAAPIAnimation($el, property);
		addChild(WAAPIAnimationsLookups, {
			parent,
			animation,
			$el,
			property,
			_next: null,
			_prev: null
		});
		const handleRemove = () => {
			removeWAAPIAnimation($el, property, parent);
		};
		animation.onremove = handleRemove;
		animation.onfinish = handleRemove;
		return animation;
	};
	/**
	* @param  {String} propName
	* @param  {WAAPIKeyframeValue} value
	* @param  {DOMTarget} $el
	* @param  {Number} i
	* @param  {Number} targetsLength
	* @return {String}
	*/
	var normalizeTweenValue = (propName, value, $el, i, targetsLength) => {
		let v = getFunctionValue(value, $el, i, targetsLength);
		if (!isNum(v)) return v;
		if (commonDefaultPXProperties.includes(propName) || stringStartsWith(propName, "translate")) return `${v}px`;
		if (stringStartsWith(propName, "rotate") || stringStartsWith(propName, "skew")) return `${v}deg`;
		return `${v}`;
	};
	/**
	* @param  {DOMTarget} $el
	* @param  {String} propName
	* @param  {WAAPIKeyframeValue} from
	* @param  {WAAPIKeyframeValue} to
	* @param  {Number} i
	* @param  {Number} targetsLength
	* @return {WAAPITweenValue}
	*/
	var parseIndividualTweenValue = ($el, propName, from, to, i, targetsLength) => {
		/** @type {WAAPITweenValue} */
		let tweenValue = "0";
		const computedTo = !isUnd(to) ? normalizeTweenValue(propName, to, $el, i, targetsLength) : getComputedStyle($el)[propName];
		if (!isUnd(from)) tweenValue = [normalizeTweenValue(propName, from, $el, i, targetsLength), computedTo];
		else tweenValue = isArr(to) ? to.map((v) => normalizeTweenValue(propName, v, $el, i, targetsLength)) : computedTo;
		return tweenValue;
	};
	var WAAPIAnimation = class {
		/**
		* @param {DOMTargetsParam} targets
		* @param {WAAPIAnimationParams} params
		*/
		constructor(targets, params) {
			if (scope.current) scope.current.register(this);
			if (isNil(transformsPropertiesRegistered)) if (isBrowser && (isUnd(CSS) || !Object.hasOwnProperty.call(CSS, "registerProperty"))) transformsPropertiesRegistered = false;
			else {
				validTransforms.forEach((t) => {
					const isSkew = stringStartsWith(t, "skew");
					const isScale = stringStartsWith(t, "scale");
					const isRotate = stringStartsWith(t, "rotate");
					const isTranslate = stringStartsWith(t, "translate");
					const isAngle = isRotate || isSkew;
					const syntax = isAngle ? "<angle>" : isScale ? "<number>" : isTranslate ? "<length-percentage>" : "*";
					try {
						CSS.registerProperty({
							name: "--" + t,
							syntax,
							inherits: false,
							initialValue: isTranslate ? "0px" : isAngle ? "0deg" : isScale ? "1" : "0"
						});
					} catch {}
				});
				transformsPropertiesRegistered = true;
			}
			const parsedTargets = registerTargets(targets);
			const targetsLength = parsedTargets.length;
			if (!targetsLength) console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`);
			const ease = setValue(params.ease, parseWAAPIEasing(globals.defaults.ease));
			const spring = ease.ease && ease;
			const autoplay = setValue(params.autoplay, globals.defaults.autoplay);
			const scroll = autoplay && autoplay.link ? autoplay : false;
			const alternate = params.alternate && params.alternate === true;
			const reversed = params.reversed && params.reversed === true;
			const loop = setValue(params.loop, globals.defaults.loop);
			const iterations = loop === true || loop === Infinity ? Infinity : isNum(loop) ? loop + 1 : 1;
			/** @type {PlaybackDirection} */
			const direction = alternate ? reversed ? "alternate-reverse" : "alternate" : reversed ? "reverse" : "normal";
			/** @type {FillMode} */
			const fill = "forwards";
			/** @type {String} */
			const easing = parseWAAPIEasing(ease);
			const timeScale = globals.timeScale === 1 ? 1 : K;
			/** @type {DOMTargetsArray}] */
			this.targets = parsedTargets;
			/** @type {Array<globalThis.Animation>}] */
			this.animations = [];
			/** @type {globalThis.Animation}] */
			this.controlAnimation = null;
			/** @type {Callback<this>} */
			this.onComplete = params.onComplete || noop;
			/** @type {Number} */
			this.duration = 0;
			/** @type {Boolean} */
			this.muteCallbacks = false;
			/** @type {Boolean} */
			this.completed = false;
			/** @type {Boolean} */
			this.paused = !autoplay || scroll !== false;
			/** @type {Boolean} */
			this.reversed = reversed;
			/** @type {Boolean|ScrollObserver} */
			this.autoplay = autoplay;
			/** @type {Number} */
			this._speed = setValue(params.playbackRate, globals.defaults.playbackRate);
			/** @type {Function} */
			this._resolve = noop;
			/** @type {Number} */
			this._completed = 0;
			/** @type {Array<Object>}] */
			this._inlineStyles = parsedTargets.map(($el) => $el.getAttribute("style"));
			parsedTargets.forEach(($el, i) => {
				const cachedTransforms = $el[transformsSymbol];
				const hasIndividualTransforms = validIndividualTransforms.some((t) => params.hasOwnProperty(t));
				/** @type {Number} */
				const duration = (spring ? spring.duration : getFunctionValue(setValue(params.duration, globals.defaults.duration), $el, i, targetsLength)) * timeScale;
				/** @type {Number} */
				const delay = getFunctionValue(setValue(params.delay, globals.defaults.delay), $el, i, targetsLength) * timeScale;
				/** @type {CompositeOperation} */
				const composite = setValue(params.composition, "replace");
				for (let name in params) {
					if (!isKey(name)) continue;
					/** @type {PropertyIndexedKeyframes} */
					const keyframes = {};
					/** @type {KeyframeAnimationOptions} */
					const tweenParams = {
						iterations,
						direction,
						fill,
						easing,
						duration,
						delay,
						composite
					};
					const propertyValue = params[name];
					const individualTransformProperty = hasIndividualTransforms ? validTransforms.includes(name) ? name : shortTransforms.get(name) : false;
					let parsedPropertyValue;
					if (isObj(propertyValue)) {
						const tweenOptions = propertyValue;
						const tweenOptionsEase = setValue(tweenOptions.ease, ease);
						const tweenOptionsSpring = tweenOptionsEase.ease && tweenOptionsEase;
						const to = tweenOptions.to;
						const from = tweenOptions.from;
						/** @type {Number} */
						tweenParams.duration = (tweenOptionsSpring ? tweenOptionsSpring.duration : getFunctionValue(setValue(tweenOptions.duration, duration), $el, i, targetsLength)) * timeScale;
						/** @type {Number} */
						tweenParams.delay = getFunctionValue(setValue(tweenOptions.delay, delay), $el, i, targetsLength) * timeScale;
						/** @type {CompositeOperation} */
						tweenParams.composite = setValue(tweenOptions.composition, composite);
						/** @type {String} */
						tweenParams.easing = parseWAAPIEasing(tweenOptionsEase);
						parsedPropertyValue = parseIndividualTweenValue($el, name, from, to, i, targetsLength);
						if (individualTransformProperty) {
							keyframes[`--${individualTransformProperty}`] = parsedPropertyValue;
							cachedTransforms[individualTransformProperty] = parsedPropertyValue;
						} else keyframes[name] = parseIndividualTweenValue($el, name, from, to, i, targetsLength);
						addWAAPIAnimation(this, $el, name, keyframes, tweenParams);
						if (!isUnd(from)) if (!individualTransformProperty) $el.style[name] = keyframes[name][0];
						else {
							const key = `--${individualTransformProperty}`;
							$el.style.setProperty(key, keyframes[key][0]);
						}
					} else {
						parsedPropertyValue = isArr(propertyValue) ? propertyValue.map((v) => normalizeTweenValue(name, v, $el, i, targetsLength)) : normalizeTweenValue(name, propertyValue, $el, i, targetsLength);
						if (individualTransformProperty) {
							keyframes[`--${individualTransformProperty}`] = parsedPropertyValue;
							cachedTransforms[individualTransformProperty] = parsedPropertyValue;
						} else keyframes[name] = parsedPropertyValue;
						addWAAPIAnimation(this, $el, name, keyframes, tweenParams);
					}
				}
				if (hasIndividualTransforms) {
					let transforms = emptyString;
					for (let t in cachedTransforms) transforms += `${transformsFragmentStrings[t]}var(--${t})) `;
					$el.style.transform = transforms;
				}
			});
			if (scroll)
 /** @type {ScrollObserver} */ this.autoplay.link(this);
		}
		/**
		* @callback forEachCallback
		* @param {globalThis.Animation} animation
		*/
		/**
		* @param  {forEachCallback|String} callback
		* @return {this}
		*/
		forEach(callback) {
			const cb = isStr(callback) ? (a) => a[callback]() : callback;
			this.animations.forEach(cb);
			return this;
		}
		get speed() {
			return this._speed;
		}
		/** @param {Number} speed */
		set speed(speed) {
			this._speed = +speed;
			this.forEach((anim) => anim.playbackRate = speed);
		}
		get currentTime() {
			const controlAnimation = this.controlAnimation;
			const timeScale = globals.timeScale;
			return this.completed ? this.duration : controlAnimation ? +controlAnimation.currentTime * (timeScale === 1 ? 1 : timeScale) : 0;
		}
		/** @param {Number} time */
		set currentTime(time) {
			const t = time * (globals.timeScale === 1 ? 1 : K);
			this.forEach((anim) => {
				if (t >= this.duration) anim.play();
				anim.currentTime = t;
			});
		}
		get progress() {
			return this.currentTime / this.duration;
		}
		/** @param {Number} progress */
		set progress(progress) {
			this.forEach((anim) => anim.currentTime = progress * this.duration || 0);
		}
		resume() {
			if (!this.paused) return this;
			this.paused = false;
			return this.forEach("play");
		}
		pause() {
			if (this.paused) return this;
			this.paused = true;
			return this.forEach("pause");
		}
		alternate() {
			this.reversed = !this.reversed;
			this.forEach("reverse");
			if (this.paused) this.forEach("pause");
			return this;
		}
		play() {
			if (this.reversed) this.alternate();
			return this.resume();
		}
		reverse() {
			if (!this.reversed) this.alternate();
			return this.resume();
		}
		/**
		* @param {Number} time
		* @param {Boolean} muteCallbacks
		*/
		seek(time, muteCallbacks = false) {
			if (muteCallbacks) this.muteCallbacks = true;
			if (time < this.duration) this.completed = false;
			this.currentTime = time;
			this.muteCallbacks = false;
			if (this.paused) this.pause();
			return this;
		}
		restart() {
			this.completed = false;
			return this.seek(0, true).resume();
		}
		commitStyles() {
			return this.forEach("commitStyles");
		}
		complete() {
			return this.seek(this.duration);
		}
		cancel() {
			this.forEach("cancel");
			return this.pause();
		}
		revert() {
			this.cancel();
			this.targets.forEach(($el, i) => $el.setAttribute("style", this._inlineStyles[i]));
			return this;
		}
		/**
		* @param  {WAAPICallback} [callback]
		* @return {Promise}
		*/
		then(callback = noop) {
			const then = this.then;
			const onResolve = () => {
				this.then = null;
				callback(this);
				this.then = then;
				this._resolve = noop;
			};
			return new Promise((r) => {
				this._resolve = () => r(onResolve());
				if (this.completed) this._resolve();
				return this;
			});
		}
	};
	var waapi = {
		/**
		* @param {DOMTargetsParam} targets
		* @param {WAAPIAnimationParams} params
		* @return {WAAPIAnimation}
		*/
		animate: (targets, params) => new WAAPIAnimation(targets, params),
		convertEase: easingToLinear
	};
	/**
	* @param  {Callback<Timer>} [callback]
	* @return {Timer}
	*/
	var sync = (callback = noop) => {
		return new Timer({
			duration: 1 * globals.timeScale,
			onComplete: callback
		}, null, 0).resume();
	};
	/**
	* @overload
	* @param  {DOMTargetSelector} targetSelector
	* @param  {String}            propName
	* @return {String}
	*
	* @overload
	* @param  {JSTargetsParam} targetSelector
	* @param  {String}         propName
	* @return {Number|String}
	*
	* @overload
	* @param  {DOMTargetsParam} targetSelector
	* @param  {String}          propName
	* @param  {String}          unit
	* @return {String}
	*
	* @overload
	* @param  {TargetsParam} targetSelector
	* @param  {String}       propName
	* @param  {Boolean}      unit
	* @return {Number}
	*
	* @param  {TargetsParam}   targetSelector
	* @param  {String}         propName
	* @param  {String|Boolean} [unit]
	*/
	function getTargetValue(targetSelector, propName, unit) {
		const targets = registerTargets(targetSelector);
		if (!targets.length) return;
		const [target] = targets;
		let originalValue = getOriginalAnimatableValue(target, sanitizePropertyName(propName, target, getTweenType(target, propName)));
		if (isUnd(unit)) return originalValue;
		else {
			decomposeRawValue(originalValue, decomposedOriginalValue);
			if (decomposedOriginalValue.t === valueTypes.NUMBER || decomposedOriginalValue.t === valueTypes.UNIT) if (unit === false) return decomposedOriginalValue.n;
			else {
				const convertedValue = convertValueUnit(target, decomposedOriginalValue, unit, false);
				return `${round(convertedValue.n, globals.precision)}${convertedValue.u}`;
			}
		}
	}
	/**
	* @param  {TargetsParam}    targets
	* @param  {AnimationParams} parameters
	* @return {JSAnimation}
	*/
	var setTargetValues = (targets, parameters) => {
		if (isUnd(parameters)) return;
		parameters.duration = minValue;
		parameters.composition = setValue(parameters.composition, compositionTypes.none);
		return new JSAnimation(targets, parameters, null, 0, true).resume();
	};
	/**
	* @param  {TargetsArray} targetsArray
	* @param  {JSAnimation}    animation
	* @param  {String}       [propertyName]
	* @return {Boolean}
	*/
	var removeTargetsFromAnimation = (targetsArray, animation, propertyName) => {
		let tweensMatchesTargets = false;
		forEachChildren(animation, (tween) => {
			const tweenTarget = tween.target;
			if (targetsArray.includes(tweenTarget)) {
				const tweenName = tween.property;
				const tweenType = tween._tweenType;
				const normalizePropName = sanitizePropertyName(propertyName, tweenTarget, tweenType);
				if (!normalizePropName || normalizePropName && normalizePropName === tweenName) {
					if (tween.parent._tail === tween && tween._tweenType === tweenTypes.TRANSFORM && tween._prev && tween._prev._tweenType === tweenTypes.TRANSFORM) tween._prev._renderTransforms = 1;
					removeChild(animation, tween);
					removeTweenSliblings(tween);
					tweensMatchesTargets = true;
				}
			}
		}, true);
		return tweensMatchesTargets;
	};
	/**
	* @param  {TargetsParam} targets
	* @param  {Renderable|WAAPIAnimation} [renderable]
	* @param  {String}                    [propertyName]
	* @return {TargetsArray}
	*/
	var remove = (targets, renderable, propertyName) => {
		const targetsArray = parseTargets(targets);
		const parent = renderable ? renderable : engine;
		const waapiAnimation = renderable && renderable.controlAnimation && renderable;
		for (let i = 0, l = targetsArray.length; i < l; i++) {
			const $el = targetsArray[i];
			removeWAAPIAnimation($el, propertyName, waapiAnimation);
		}
		let removeMatches;
		if (parent._hasChildren) {
			let iterationDuration = 0;
			forEachChildren(parent, (child) => {
				if (!child._hasChildren) {
					removeMatches = removeTargetsFromAnimation(targetsArray, child, propertyName);
					if (removeMatches && !child._head) {
						child.cancel();
						removeChild(parent, child);
					} else {
						const childDur = child._offset + child._delay + child.duration;
						if (childDur > iterationDuration) iterationDuration = childDur;
					}
				}
				if (child._head) remove(targets, child, propertyName);
				else child._hasChildren = false;
			}, true);
			if (!isUnd(
				/** @type {Renderable} */
				parent.iterationDuration
			))
 /** @type {Renderable} */ parent.iterationDuration = iterationDuration;
		} else removeMatches = removeTargetsFromAnimation(targetsArray, parent, propertyName);
		if (removeMatches && !parent._head) {
			parent._hasChildren = false;
			if (parent.cancel) /** @type {Renderable} */ parent.cancel();
		}
		return targetsArray;
	};
	/**
	* @param  {(...args: any[]) => Tickable} constructor
	* @return {(...args: any[]) => Tickable}
	*/
	var keepTime = createRefreshable;
	/**
	* @param  {String|Array} items
	* @return {any}
	*/
	var randomPick = (items) => items[random(0, items.length - 1)];
	/**
	* @param  {Number|String} v
	* @param  {Number} decimalLength
	* @return {String}
	*/
	var roundPad = (v, decimalLength) => (+v).toFixed(decimalLength);
	/**
	* @param  {Number} v
	* @param  {Number} totalLength
	* @param  {String} padString
	* @return {String}
	*/
	var padStart = (v, totalLength, padString) => `${v}`.padStart(totalLength, padString);
	/**
	* @param  {Number} v
	* @param  {Number} totalLength
	* @param  {String} padString
	* @return {String}
	*/
	var padEnd = (v, totalLength, padString) => `${v}`.padEnd(totalLength, padString);
	/**
	* @param  {Number} v
	* @param  {Number} min
	* @param  {Number} max
	* @return {Number}
	*/
	var wrap = (v, min, max) => ((v - min) % (max - min) + (max - min)) % (max - min) + min;
	/**
	* @param  {Number} value
	* @param  {Number} inLow
	* @param  {Number} inHigh
	* @param  {Number} outLow
	* @param  {Number} outHigh
	* @return {Number}
	*/
	var mapRange = (value, inLow, inHigh, outLow, outHigh) => outLow + (value - inLow) / (inHigh - inLow) * (outHigh - outLow);
	/**
	* @param  {Number} degrees
	* @return {Number}
	*/
	var degToRad = (degrees) => degrees * PI / 180;
	/**
	* @param  {Number} radians
	* @return {Number}
	*/
	var radToDeg = (radians) => radians * 180 / PI;
	/**
	* https://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/
	* @param  {Number} start
	* @param  {Number} end
	* @param  {Number} amount
	* @param  {Renderable|Boolean} [renderable]
	* @return {Number}
	*/
	var lerp = (start, end, amount, renderable) => {
		let dt = K / globals.defaults.frameRate;
		if (renderable !== false) {
			const ticker = renderable || engine._hasChildren && engine;
			if (ticker && ticker.deltaTime) dt = ticker.deltaTime;
		}
		const t = 1 - Math.exp(-amount * dt * .1);
		return !amount ? start : amount === 1 ? end : (1 - t) * start + t * end;
	};
	/**
	* @callback UtilityFunction
	* @param {...*} args
	* @return {Number|String}
	*
	* @param {UtilityFunction} fn
	* @param {Number} [last=0]
	* @return {function(...(Number|String)): function(Number|String): (Number|String)}
	*/
	var curry = (fn, last = 0) => (...args) => last ? (v) => fn(...args, v) : (v) => fn(v, ...args);
	/**
	* @param {Function} fn
	* @return {function(...(Number|String))}
	*/
	var chain = (fn) => {
		return (...args) => {
			const result = fn(...args);
			return new Proxy(noop, {
				apply: (_, __, [v]) => result(v),
				get: (_, prop) => chain(
					/**@param {...Number|String} nextArgs */
					(...nextArgs) => {
						const nextResult = utils[prop](...nextArgs);
						return (v) => nextResult(result(v));
					}
				)
			});
		};
	};
	/**
	* @param {UtilityFunction} fn
	* @param {Number} [right]
	* @return {function(...(Number|String)): UtilityFunction}
	*/
	var makeChainable = (fn, right = 0) => (...args) => (args.length < fn.length ? chain(curry(fn, right)) : fn)(...args);
	/**
	* @callback ChainedUtilsResult
	* @param {Number} value
	* @return {Number}
	*
	* @typedef {Object} ChainableUtils
	* @property {ChainedClamp} clamp
	* @property {ChainedRound} round
	* @property {ChainedSnap} snap
	* @property {ChainedWrap} wrap
	* @property {ChainedInterpolate} interpolate
	* @property {ChainedMapRange} mapRange
	* @property {ChainedRoundPad} roundPad
	* @property {ChainedPadStart} padStart
	* @property {ChainedPadEnd} padEnd
	* @property {ChainedDegToRad} degToRad
	* @property {ChainedRadToDeg} radToDeg
	*
	* @typedef {ChainableUtils & ChainedUtilsResult} ChainableUtil
	*
	* @callback ChainedClamp
	* @param {Number} min
	* @param {Number} max
	* @return {ChainableUtil}
	*
	* @callback ChainedRound
	* @param {Number} decimalLength
	* @return {ChainableUtil}
	*
	* @callback ChainedSnap
	* @param {Number} increment
	* @return {ChainableUtil}
	*
	* @callback ChainedWrap
	* @param {Number} min
	* @param {Number} max
	* @return {ChainableUtil}
	*
	* @callback ChainedInterpolate
	* @param {Number} start
	* @param {Number} end
	* @return {ChainableUtil}
	*
	* @callback ChainedMapRange
	* @param {Number} inLow
	* @param {Number} inHigh
	* @param {Number} outLow
	* @param {Number} outHigh
	* @return {ChainableUtil}
	*
	* @callback ChainedRoundPad
	* @param {Number} decimalLength
	* @return {ChainableUtil}
	*
	* @callback ChainedPadStart
	* @param {Number} totalLength
	* @param {String} padString
	* @return {ChainableUtil}
	*
	* @callback ChainedPadEnd
	* @param {Number} totalLength
	* @param {String} padString
	* @return {ChainableUtil}
	*
	* @callback ChainedDegToRad
	* @return {ChainableUtil}
	*
	* @callback ChainedRadToDeg
	* @return {ChainableUtil}
	*/
	var utils = {
		$: registerTargets,
		get: getTargetValue,
		set: setTargetValues,
		remove,
		cleanInlineStyles,
		random,
		randomPick,
		shuffle,
		lerp,
		sync,
		keepTime,
		clamp: makeChainable(clamp),
		round: makeChainable(round),
		snap: makeChainable(snap),
		wrap: makeChainable(wrap),
		interpolate: makeChainable(interpolate, 1),
		mapRange: makeChainable(mapRange),
		roundPad: makeChainable(roundPad),
		padStart: makeChainable(padStart),
		padEnd: makeChainable(padEnd),
		degToRad: makeChainable(degToRad),
		radToDeg: makeChainable(radToDeg)
	};
	/**
	* Timeline's children offsets positions parser
	* @param  {Timeline} timeline
	* @param  {String} timePosition
	* @return {Number}
	*/
	var getPrevChildOffset = (timeline, timePosition) => {
		if (stringStartsWith(timePosition, "<")) {
			const goToPrevAnimationOffset = timePosition[1] === "<";
			const prevAnimation = timeline._tail;
			const prevOffset = prevAnimation ? prevAnimation._offset + prevAnimation._delay : 0;
			return goToPrevAnimationOffset ? prevOffset : prevOffset + prevAnimation.duration;
		}
	};
	/**
	* @param  {Timeline} timeline
	* @param  {TimelinePosition} [timePosition]
	* @return {Number}
	*/
	var parseTimelinePosition = (timeline, timePosition) => {
		let tlDuration = timeline.iterationDuration;
		if (tlDuration === minValue) tlDuration = 0;
		if (isUnd(timePosition)) return tlDuration;
		if (isNum(+timePosition)) return +timePosition;
		const timePosStr = timePosition;
		const tlLabels = timeline ? timeline.labels : null;
		const hasLabels = !isNil(tlLabels);
		const prevOffset = getPrevChildOffset(timeline, timePosStr);
		const hasSibling = !isUnd(prevOffset);
		const matchedRelativeOperator = relativeValuesExecRgx.exec(timePosStr);
		if (matchedRelativeOperator) {
			const fullOperator = matchedRelativeOperator[0];
			const split = timePosStr.split(fullOperator);
			const labelOffset = hasLabels && split[0] ? tlLabels[split[0]] : tlDuration;
			return getRelativeValue(hasSibling ? prevOffset : hasLabels ? labelOffset : tlDuration, +split[1], fullOperator[0]);
		} else return hasSibling ? prevOffset : hasLabels ? !isUnd(tlLabels[timePosStr]) ? tlLabels[timePosStr] : tlDuration : tlDuration;
	};
	/**
	* @param {Timeline} tl
	* @return {Number}
	*/
	function getTimelineTotalDuration(tl) {
		return clampInfinity((tl.iterationDuration + tl._loopDelay) * tl.iterationCount - tl._loopDelay) || minValue;
	}
	/**
	* @overload
	* @param  {TimerParams} childParams
	* @param  {Timeline} tl
	* @param  {Number} timePosition
	* @return {Timeline}
	*
	* @overload
	* @param  {AnimationParams} childParams
	* @param  {Timeline} tl
	* @param  {Number} timePosition
	* @param  {TargetsParam} targets
	* @param  {Number} [index]
	* @param  {Number} [length]
	* @return {Timeline}
	*
	* @param  {TimerParams|AnimationParams} childParams
	* @param  {Timeline} tl
	* @param  {Number} timePosition
	* @param  {TargetsParam} [targets]
	* @param  {Number} [index]
	* @param  {Number} [length]
	*/
	function addTlChild(childParams, tl, timePosition, targets, index, length) {
		const adjustedPosition = isNum(childParams.duration) && childParams.duration <= minValue ? timePosition - minValue : timePosition;
		tick(tl, adjustedPosition, 1, 1, tickModes.AUTO);
		const tlChild = targets ? new JSAnimation(targets, childParams, tl, adjustedPosition, false, index, length) : new Timer(childParams, tl, adjustedPosition);
		tlChild.init(1);
		addChild(tl, tlChild);
		forEachChildren(tl, (child) => {
			const childDur = child._offset + child._delay + child.duration;
			if (childDur > tl.iterationDuration) tl.iterationDuration = childDur;
		});
		tl.duration = getTimelineTotalDuration(tl);
		return tl;
	}
	var Timeline = class extends Timer {
		/**
		* @param {TimelineParams} [parameters]
		*/
		constructor(parameters = {}) {
			super(parameters, null, 0);
			/** @type {Number} */
			this.duration = 0;
			/** @type {Record<String, Number>} */
			this.labels = {};
			const defaultsParams = parameters.defaults;
			const globalDefaults = globals.defaults;
			/** @type {DefaultsParams} */
			this.defaults = defaultsParams ? mergeObjects(defaultsParams, globalDefaults) : globalDefaults;
			/** @type {Callback<this>} */
			this.onRender = parameters.onRender || globalDefaults.onRender;
			const tlPlaybackEase = setValue(parameters.playbackEase, globalDefaults.playbackEase);
			this._ease = tlPlaybackEase ? parseEasings(tlPlaybackEase) : null;
			/** @type {Number} */
			this.iterationDuration = 0;
		}
		/**
		* @overload
		* @param {TargetsParam} a1
		* @param {AnimationParams} a2
		* @param {TimelinePosition|StaggerFunction<Number|String>} [a3]
		* @return {this}
		*
		* @overload
		* @param {TimerParams} a1
		* @param {TimelinePosition} [a2]
		* @return {this}
		*
		* @param {TargetsParam|TimerParams} a1
		* @param {TimelinePosition|AnimationParams} a2
		* @param {TimelinePosition|StaggerFunction<Number|String>} [a3]
		*/
		add(a1, a2, a3) {
			const isAnim = isObj(a2);
			const isTimer = isObj(a1);
			if (isAnim || isTimer) {
				this._hasChildren = true;
				if (isAnim) {
					const childParams = a2;
					if (isFnc(a3)) {
						const staggeredPosition = a3;
						const parsedTargetsArray = parseTargets(a1);
						const tlDuration = this.duration;
						const tlIterationDuration = this.iterationDuration;
						const id = childParams.id;
						let i = 0;
						/** @type {Number} */
						const parsedLength = parsedTargetsArray.length;
						parsedTargetsArray.forEach((target) => {
							const staggeredChildParams = { ...childParams };
							this.duration = tlDuration;
							this.iterationDuration = tlIterationDuration;
							if (!isUnd(id)) staggeredChildParams.id = id + "-" + i;
							addTlChild(staggeredChildParams, this, parseTimelinePosition(this, staggeredPosition(target, i, parsedLength, this)), target, i, parsedLength);
							i++;
						});
					} else addTlChild(childParams, this, parseTimelinePosition(this, a3), a1);
				} else addTlChild(a1, this, parseTimelinePosition(this, a2));
				return this.init(1);
			}
		}
		/**
		* @overload
		* @param {Tickable} [synced]
		* @param {TimelinePosition} [position]
		* @return {this}
		*
		* @overload
		* @param {globalThis.Animation} [synced]
		* @param {TimelinePosition} [position]
		* @return {this}
		*
		* @overload
		* @param {WAAPIAnimation} [synced]
		* @param {TimelinePosition} [position]
		* @return {this}
		*
		* @param {Tickable|WAAPIAnimation|globalThis.Animation} [synced]
		* @param {TimelinePosition} [position]
		*/
		sync(synced, position) {
			if (isUnd(synced) || synced && isUnd(synced.pause)) return this;
			synced.pause();
			const duration = +(synced.effect ? synced.effect.getTiming().duration : 			/** @type {Tickable} */ synced.duration);
			return this.add(synced, {
				currentTime: [0, duration],
				duration,
				ease: "linear"
			}, position);
		}
		/**
		* @param  {TargetsParam} targets
		* @param  {AnimationParams} parameters
		* @param  {TimelinePosition} [position]
		* @return {this}
		*/
		set(targets, parameters, position) {
			if (isUnd(parameters)) return this;
			parameters.duration = minValue;
			parameters.composition = compositionTypes.replace;
			return this.add(targets, parameters, position);
		}
		/**
		* @param {Callback<Timer>} callback
		* @param {TimelinePosition} [position]
		* @return {this}
		*/
		call(callback, position) {
			if (isUnd(callback) || callback && !isFnc(callback)) return this;
			return this.add({
				duration: 0,
				onComplete: () => callback(this)
			}, position);
		}
		/**
		* @param {String} labelName
		* @param {TimelinePosition} [position]
		* @return {this}
		*
		*/
		label(labelName, position) {
			if (isUnd(labelName) || labelName && !isStr(labelName)) return this;
			this.labels[labelName] = parseTimelinePosition(this, position);
			return this;
		}
		/**
		* @param  {TargetsParam} targets
		* @param  {String} [propertyName]
		* @return {this}
		*/
		remove(targets, propertyName) {
			remove(targets, this, propertyName);
			return this;
		}
		/**
		* @param  {Number} newDuration
		* @return {this}
		*/
		stretch(newDuration) {
			const currentDuration = this.duration;
			if (currentDuration === normalizeTime(newDuration)) return this;
			const timeScale = newDuration / currentDuration;
			const labels = this.labels;
			forEachChildren(this, (child) => child.stretch(child.duration * timeScale));
			for (let labelName in labels) labels[labelName] *= timeScale;
			return super.stretch(newDuration);
		}
		/**
		* @return {this}
		*/
		refresh() {
			forEachChildren(this, (child) => {
				if (child.refresh) child.refresh();
			});
			return this;
		}
		/**
		* @return {this}
		*/
		revert() {
			super.revert();
			forEachChildren(this, (child) => child.revert, true);
			return cleanInlineStyles(this);
		}
		/**
		* @param  {Callback<this>} [callback]
		* @return {Promise}
		*/
		then(callback) {
			return super.then(callback);
		}
	};
	/**
	* @param {TimelineParams} [parameters]
	* @return {Timeline}
	*/
	var createTimeline = (parameters) => new Timeline(parameters).init();
	K * 10;
	typeof Intl !== "undefined" && Intl.Segmenter;
	var dataLine = `data-line`;
	/**
	* @param {HTMLElement} $el
	*/
	var filterEmptyElements = ($el) => {
		if (!$el.childElementCount && !$el.textContent.trim()) {
			const $parent = $el.parentElement;
			$el.remove();
			if ($parent) filterEmptyElements($parent);
		}
	};
	/**
	* @param {HTMLElement} $el
	* @param {Number} lineIndex
	* @param {Set<HTMLElement>} bin
	* @returns {Set<HTMLElement>}
	*/
	var filterLineElements = ($el, lineIndex, bin) => {
		const dataLineAttr = $el.getAttribute(dataLine);
		if (dataLineAttr !== null && +dataLineAttr !== lineIndex || $el.tagName === "BR") bin.add($el);
		let i = $el.childElementCount;
		while (i--) filterLineElements($el.children[i], lineIndex, bin);
		return bin;
	};
	/**
	* @overload
	* @param {Number} val
	* @param {StaggerParams} [params]
	* @return {StaggerFunction<Number>}
	*/
	/**
	* @overload
	* @param {String} val
	* @param {StaggerParams} [params]
	* @return {StaggerFunction<String>}
	*/
	/**
	* @overload
	* @param {[Number, Number]} val
	* @param {StaggerParams} [params]
	* @return {StaggerFunction<Number>}
	*/
	/**
	* @overload
	* @param {[String, String]} val
	* @param {StaggerParams} [params]
	* @return {StaggerFunction<String>}
	*/
	/**
	* @param {Number|String|[Number, Number]|[String, String]} val The staggered value or range
	* @param {StaggerParams} [params] The stagger parameters
	* @return {StaggerFunction<Number|String>}
	*/
	var stagger = (val, params = {}) => {
		let values = [];
		let maxValue = 0;
		const from = params.from;
		const reversed = params.reversed;
		const ease = params.ease;
		const hasEasing = !isUnd(ease);
		const staggerEase = hasEasing && !isUnd(
			/** @type {Spring} */
			ease.ease
		) ? ease.ease : hasEasing ? parseEasings(ease) : null;
		const grid = params.grid;
		const axis = params.axis;
		const customTotal = params.total;
		const fromFirst = isUnd(from) || from === 0 || from === "first";
		const fromCenter = from === "center";
		const fromLast = from === "last";
		const fromRandom = from === "random";
		const isRange = isArr(val);
		const useProp = params.use;
		const val1 = isRange ? parseNumber(val[0]) : parseNumber(val);
		const val2 = isRange ? parseNumber(val[1]) : 0;
		const unitMatch = unitsExecRgx.exec((isRange ? val[1] : val) + emptyString);
		const start = params.start || 0 + (isRange ? val1 : 0);
		let fromIndex = fromFirst ? 0 : isNum(from) ? from : 0;
		return (target, i, t, tl) => {
			const [registeredTarget] = registerTargets(target);
			const total = isUnd(customTotal) ? t : customTotal;
			const customIndex = !isUnd(useProp) ? isFnc(useProp) ? useProp(registeredTarget, i, total) : getOriginalAnimatableValue(registeredTarget, useProp) : false;
			const staggerIndex = isNum(customIndex) || isStr(customIndex) && isNum(+customIndex) ? +customIndex : i;
			if (fromCenter) fromIndex = (total - 1) / 2;
			if (fromLast) fromIndex = total - 1;
			if (!values.length) {
				for (let index = 0; index < total; index++) {
					if (!grid) values.push(abs(fromIndex - index));
					else {
						const fromX = !fromCenter ? fromIndex % grid[0] : (grid[0] - 1) / 2;
						const fromY = !fromCenter ? floor(fromIndex / grid[0]) : (grid[1] - 1) / 2;
						const toX = index % grid[0];
						const toY = floor(index / grid[0]);
						const distanceX = fromX - toX;
						const distanceY = fromY - toY;
						let value = sqrt(distanceX * distanceX + distanceY * distanceY);
						if (axis === "x") value = -distanceX;
						if (axis === "y") value = -distanceY;
						values.push(value);
					}
					maxValue = max(...values);
				}
				if (staggerEase) values = values.map((val) => staggerEase(val / maxValue) * maxValue);
				if (reversed) values = values.map((val) => axis ? val < 0 ? val * -1 : -val : abs(maxValue - val));
				if (fromRandom) values = shuffle(values);
			}
			const spacing = isRange ? (val2 - val1) / maxValue : val1;
			/** @type {String|Number} */
			let output = (tl ? parseTimelinePosition(tl, isUnd(params.start) ? tl.iterationDuration : start) : start) + (spacing * round(values[staggerIndex], 2) || 0);
			if (params.modifier) output = params.modifier(output);
			if (unitMatch) output = `${output}${unitMatch[2]}`;
			return output;
		};
	};
	//#endregion
	//#region shared/animation/injectable/utils.js
	var injectableSymbol = Symbol("injectable");
	function storeInjectable(value, data) {
		value[injectableSymbol] = data;
		return value;
	}
	function createFunctionPlaceholder(name, readme) {
		const fn = function() {};
		Object.defineProperty(fn, "name", {
			value: name,
			writable: false
		});
		if (readme) fn.README = readme;
		return fn;
	}
	var stopPropagation$1 = (value) => baseStopPropagation(value) || value instanceof Timer || value instanceof JSAnimation || value instanceof WAAPIAnimation || value instanceof Timeline;
	function sanitizeInjectable(injectable) {
		try {
			return deepMap(injectable, (value) => {
				if (isSourceMap(value)) return value;
				clearSourceMap(value);
				if (isLazyInject(value) || typeof value === "function" && value[generatedLazyInjectSymbol]) {
					const name = value[generatedLazyInjectSymbol] ?? value.name;
					return createFunctionPlaceholder(name, `Omitted lazy inject '${name}' (contents are parsed only when called)`);
				}
				if (["function", "object"].includes(typeof value) && value !== null && injectableSymbol in value) return sanitizeInjectable(value[injectableSymbol]);
				if (typeof value === "function" && value[zodErrorBoundarySymbol]) return createFunctionPlaceholder(value[zodErrorBoundarySymbol]);
				return value;
			}, { stopPropagation: stopPropagation$1 });
		} catch (error) {
			return injectable;
		}
	}
	//#endregion
	//#region shared/utils/animations.js
	function sanitizeContext(context) {
		const ctx = omit(context, [
			"pack",
			"animation",
			"module",
			"meta",
			"settings",
			"instance",
			"intersectWith",
			"window",
			"document",
			"mouse",
			"onError"
		]);
		if (context.module) ctx.module = pick(context.module, ["id", "name"]);
		if ("vars" in context) ctx.vars = sanitizeInjectable(context.vars);
		return ctx;
	}
	function snapshotContext(context) {
		return cloneDeep(sanitizeContext(context));
	}
	//#endregion
	//#region shared/error/structs/AnimationError.js
	var AnimationError = class extends BaseError {
		constructor(animation, message, { type, context, stage, ...options } = {}) {
			const meta = [`Animation: ${animation.name} (${animation.key})`, `Type: ${type}`];
			if (context) meta.push("Context: " + (0, import_object_inspect.default)(sanitizeContext(context), { indent: 2 }));
			super(message, options, meta);
			this.animation = animation;
			this.animationType = type;
			this.context = context;
		}
		get name() {
			return "AnimationError";
		}
	};
	//#endregion
	//#region shared/enums/ModuleType.js
	var ModuleType_default = Enum({
		Switch: "switch",
		Reveal: "reveal"
	});
	//#endregion
	//#region shared/enums/ParseStage.js
	var ParseStage_default = Enum({
		Initialize: "Initialize",
		BeforeExtend: "BeforeExtend",
		Extend: "Extend",
		BeforeLayout: "BeforeLayout",
		Layout: "Layout",
		BeforeCreate: "BeforeCreate",
		Anime: "Anime",
		Created: "Created",
		BeforeBegin: "BeforeBegin",
		Completed: "Completed",
		BeforeDestroy: "BeforeDestroy",
		Destroyed: "Destroyed",
		Lazy: "Lazy"
	});
	//#endregion
	//#region node_modules/.pnpm/@ungap+structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.js
	var env = typeof self === "object" ? self : globalThis;
	var deserializer = ($, _) => {
		const as = (out, index) => {
			$.set(index, out);
			return out;
		};
		const unpair = (index) => {
			if ($.has(index)) return $.get(index);
			const [type, value] = _[index];
			switch (type) {
				case 0:
				case -1: return as(value, index);
				case 1: {
					const arr = as([], index);
					for (const index of value) arr.push(unpair(index));
					return arr;
				}
				case 2: {
					const object = as({}, index);
					for (const [key, index] of value) object[unpair(key)] = unpair(index);
					return object;
				}
				case 3: return as(new Date(value), index);
				case 4: {
					const { source, flags } = value;
					return as(new RegExp(source, flags), index);
				}
				case 5: {
					const map = as(/* @__PURE__ */ new Map(), index);
					for (const [key, index] of value) map.set(unpair(key), unpair(index));
					return map;
				}
				case 6: {
					const set = as(/* @__PURE__ */ new Set(), index);
					for (const index of value) set.add(unpair(index));
					return set;
				}
				case 7: {
					const { name, message } = value;
					return as(new env[name](message), index);
				}
				case 8: return as(BigInt(value), index);
				case "BigInt": return as(Object(BigInt(value)), index);
				case "ArrayBuffer": return as(new Uint8Array(value).buffer, value);
				case "DataView": {
					const { buffer } = new Uint8Array(value);
					return as(new DataView(buffer), value);
				}
			}
			return as(new env[type](value), index);
		};
		return unpair;
	};
	/**
	* @typedef {Array<string,any>} Record a type representation
	*/
	/**
	* Returns a deserialized value from a serialized array of Records.
	* @param {Record[]} serialized a previously serialized value.
	* @returns {any}
	*/
	var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
	//#endregion
	//#region node_modules/.pnpm/@ungap+structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/serialize.js
	var EMPTY = "";
	var { toString } = {};
	var { keys } = Object;
	var typeOf = (value) => {
		const type = typeof value;
		if (type !== "object" || !value) return [0, type];
		const asString = toString.call(value).slice(8, -1);
		switch (asString) {
			case "Array": return [1, EMPTY];
			case "Object": return [2, EMPTY];
			case "Date": return [3, EMPTY];
			case "RegExp": return [4, EMPTY];
			case "Map": return [5, EMPTY];
			case "Set": return [6, EMPTY];
			case "DataView": return [1, asString];
		}
		if (asString.includes("Array")) return [1, asString];
		if (asString.includes("Error")) return [7, asString];
		return [2, asString];
	};
	var shouldSkip = ([TYPE, type]) => TYPE === 0 && (type === "function" || type === "symbol");
	var serializer = (strict, json, $, _) => {
		const as = (out, value) => {
			const index = _.push(out) - 1;
			$.set(value, index);
			return index;
		};
		const pair = (value) => {
			if ($.has(value)) return $.get(value);
			let [TYPE, type] = typeOf(value);
			switch (TYPE) {
				case 0: {
					let entry = value;
					switch (type) {
						case "bigint":
							TYPE = 8;
							entry = value.toString();
							break;
						case "function":
						case "symbol":
							if (strict) throw new TypeError("unable to serialize " + type);
							entry = null;
							break;
						case "undefined": return as([-1], value);
					}
					return as([TYPE, entry], value);
				}
				case 1: {
					if (type) {
						let spread = value;
						if (type === "DataView") spread = new Uint8Array(value.buffer);
						else if (type === "ArrayBuffer") spread = new Uint8Array(value);
						return as([type, [...spread]], value);
					}
					const arr = [];
					const index = as([TYPE, arr], value);
					for (const entry of value) arr.push(pair(entry));
					return index;
				}
				case 2: {
					if (type) switch (type) {
						case "BigInt": return as([type, value.toString()], value);
						case "Boolean":
						case "Number":
						case "String": return as([type, value.valueOf()], value);
					}
					if (json && "toJSON" in value) return pair(value.toJSON());
					const entries = [];
					const index = as([TYPE, entries], value);
					for (const key of keys(value)) if (strict || !shouldSkip(typeOf(value[key]))) entries.push([pair(key), pair(value[key])]);
					return index;
				}
				case 3: return as([TYPE, value.toISOString()], value);
				case 4: {
					const { source, flags } = value;
					return as([TYPE, {
						source,
						flags
					}], value);
				}
				case 5: {
					const entries = [];
					const index = as([TYPE, entries], value);
					for (const [key, entry] of value) if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry)))) entries.push([pair(key), pair(entry)]);
					return index;
				}
				case 6: {
					const entries = [];
					const index = as([TYPE, entries], value);
					for (const entry of value) if (strict || !shouldSkip(typeOf(entry))) entries.push(pair(entry));
					return index;
				}
			}
			const { message } = value;
			return as([TYPE, {
				name: type,
				message
			}], value);
		};
		return pair;
	};
	/**
	* @typedef {Array<string,any>} Record a type representation
	*/
	/**
	* Returns an array of serialized Records.
	* @param {any} value a serializable value.
	* @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,
	*  if `true`, will not throw errors on incompatible types, and behave more
	*  like JSON stringify would behave. Symbol and Function will be discarded.
	* @returns {Record[]}
	*/
	var serialize = (value, { json, lossy } = {}) => {
		const _ = [];
		return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
	};
	//#endregion
	//#region node_modules/.pnpm/@ungap+structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/index.js
	/**
	* @typedef {Array<string,any>} Record a type representation
	*/
	/**
	* Returns an array of serialized Records.
	* @param {any} any a serializable value.
	* @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with
	* a transfer option (ignored when polyfilled) and/or non standard fields that
	* fallback to the polyfill if present.
	* @returns {Record[]}
	*/
	var esm_default = typeof structuredClone === "function" ? (any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any) : (any, options) => deserialize(serialize(any, options));
	//#endregion
	//#region node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.js
	/**
	* @typedef {import('unist').Node} Node
	* @typedef {import('unist').Point} Point
	* @typedef {import('unist').Position} Position
	*/
	/**
	* @typedef NodeLike
	* @property {string} type
	* @property {PositionLike | null | undefined} [position]
	*
	* @typedef PositionLike
	* @property {PointLike | null | undefined} [start]
	* @property {PointLike | null | undefined} [end]
	*
	* @typedef PointLike
	* @property {number | null | undefined} [line]
	* @property {number | null | undefined} [column]
	* @property {number | null | undefined} [offset]
	*/
	/**
	* Get the ending point of `node`.
	*
	* @param node
	*   Node.
	* @returns
	*   Point.
	*/
	var pointEnd = point("end");
	/**
	* Get the starting point of `node`.
	*
	* @param node
	*   Node.
	* @returns
	*   Point.
	*/
	var pointStart = point("start");
	/**
	* Get the positional info of `node`.
	*
	* @param {'end' | 'start'} type
	*   Side.
	* @returns
	*   Getter.
	*/
	function point(type) {
		return point;
		/**
		* Get the point info of `node` at a bound side.
		*
		* @param {Node | NodeLike | null | undefined} [node]
		* @returns {Point | undefined}
		*/
		function point(node) {
			const point = node && node.position && node.position[type] || {};
			if (typeof point.line === "number" && point.line > 0 && typeof point.column === "number" && point.column > 0) return {
				line: point.line,
				column: point.column,
				offset: typeof point.offset === "number" && point.offset > -1 ? point.offset : void 0
			};
		}
	}
	/**
	* Get the positional info of `node`.
	*
	* @param {Node | NodeLike | null | undefined} [node]
	*   Node.
	* @returns {Position | undefined}
	*   Position.
	*/
	function position(node) {
		const start = pointStart(node);
		const end = pointEnd(node);
		if (start && end) return {
			start,
			end
		};
	}
	//#endregion
	//#region node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/schema.js
	/**
	* @import {Schema} from 'hast-util-sanitize'
	*/
	var aria$1 = [
		"ariaDescribedBy",
		"ariaLabel",
		"ariaLabelledBy"
	];
	/**
	* Default schema.
	*
	* Follows GitHub style sanitation.
	*
	* @type {Schema}
	*/
	var defaultSchema = {
		ancestors: {
			tbody: ["table"],
			td: ["table"],
			th: ["table"],
			thead: ["table"],
			tfoot: ["table"],
			tr: ["table"]
		},
		attributes: {
			a: [
				...aria$1,
				"dataFootnoteBackref",
				"dataFootnoteRef",
				["className", "data-footnote-backref"],
				"href"
			],
			blockquote: ["cite"],
			code: [["className", /^language-./]],
			del: ["cite"],
			div: ["itemScope", "itemType"],
			dl: [...aria$1],
			h2: [["className", "sr-only"]],
			img: [
				...aria$1,
				"longDesc",
				"src"
			],
			input: [["disabled", true], ["type", "checkbox"]],
			ins: ["cite"],
			li: [["className", "task-list-item"]],
			ol: [...aria$1, ["className", "contains-task-list"]],
			q: ["cite"],
			section: ["dataFootnotes", ["className", "footnotes"]],
			source: ["srcSet"],
			summary: [...aria$1],
			table: [...aria$1],
			ul: [...aria$1, ["className", "contains-task-list"]],
			"*": [
				"abbr",
				"accept",
				"acceptCharset",
				"accessKey",
				"action",
				"align",
				"alt",
				"axis",
				"border",
				"cellPadding",
				"cellSpacing",
				"char",
				"charOff",
				"charSet",
				"checked",
				"clear",
				"colSpan",
				"color",
				"cols",
				"compact",
				"coords",
				"dateTime",
				"dir",
				"encType",
				"frame",
				"hSpace",
				"headers",
				"height",
				"hrefLang",
				"htmlFor",
				"id",
				"isMap",
				"itemProp",
				"label",
				"lang",
				"maxLength",
				"media",
				"method",
				"multiple",
				"name",
				"noHref",
				"noShade",
				"noWrap",
				"open",
				"prompt",
				"readOnly",
				"rev",
				"rowSpan",
				"rows",
				"rules",
				"scope",
				"selected",
				"shape",
				"size",
				"span",
				"start",
				"summary",
				"tabIndex",
				"title",
				"useMap",
				"vAlign",
				"value",
				"width"
			]
		},
		clobber: [
			"ariaDescribedBy",
			"ariaLabelledBy",
			"id",
			"name"
		],
		clobberPrefix: "user-content-",
		protocols: {
			cite: ["http", "https"],
			href: [
				"http",
				"https",
				"irc",
				"ircs",
				"mailto",
				"xmpp"
			],
			longDesc: ["http", "https"],
			src: ["http", "https"]
		},
		required: { input: {
			disabled: true,
			type: "checkbox"
		} },
		strip: ["script"],
		tagNames: [
			"a",
			"b",
			"blockquote",
			"br",
			"code",
			"dd",
			"del",
			"details",
			"div",
			"dl",
			"dt",
			"em",
			"h1",
			"h2",
			"h3",
			"h4",
			"h5",
			"h6",
			"hr",
			"i",
			"img",
			"input",
			"ins",
			"kbd",
			"li",
			"ol",
			"p",
			"picture",
			"pre",
			"q",
			"rp",
			"rt",
			"ruby",
			"s",
			"samp",
			"section",
			"source",
			"span",
			"strike",
			"strong",
			"sub",
			"summary",
			"sup",
			"table",
			"tbody",
			"td",
			"tfoot",
			"th",
			"thead",
			"tr",
			"tt",
			"ul",
			"var"
		]
	};
	//#endregion
	//#region node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/index.js
	/**
	* @import {
	*   Comment,
	*   Doctype,
	*   ElementContent,
	*   Element,
	*   Nodes,
	*   Properties,
	*   RootContent,
	*   Root,
	*   Text
	* } from 'hast'
	*/
	/**
	* @typedef {[string, ...Array<Exclude<Properties[keyof Properties], Array<any>> | RegExp>] | string} PropertyDefinition
	*   Definition for a property.
	*
	* @typedef Schema
	*   Schema that defines what nodes and properties are allowed.
	*
	*   The default schema is `defaultSchema`, which follows how GitHub cleans.
	*   If any top-level key is missing in the given schema, the corresponding
	*   value of the default schema is used.
	*
	*   To extend the standard schema with a few changes, clone `defaultSchema`
	*   like so:
	*
	*   ```js
	*   import deepmerge from 'deepmerge'
	*   import {h} from 'hastscript'
	*   import {defaultSchema, sanitize} from 'hast-util-sanitize'
	*
	*   // This allows `className` on all elements.
	*   const schema = deepmerge(defaultSchema, {attributes: {'*': ['className']}})
	*
	*   const tree = sanitize(h('div', {className: ['foo']}), schema)
	*
	*   // `tree` still has `className`.
	*   console.log(tree)
	*   // {
	*   //   type: 'element',
	*   //   tagName: 'div',
	*   //   properties: {className: ['foo']},
	*   //   children: []
	*   // }
	*   ```
	* @property {boolean | null | undefined} [allowComments=false]
	*   Whether to allow comment nodes (default: `false`).
	*
	*   For example:
	*
	*   ```js
	*   allowComments: true
	*   ```
	* @property {boolean | null | undefined} [allowDoctypes=false]
	*   Whether to allow doctype nodes (default: `false`).
	*
	*   For example:
	*
	*   ```js
	*   allowDoctypes: true
	*   ```
	* @property {Record<string, Array<string>> | null | undefined} [ancestors]
	*   Map of tag names to a list of tag names which are required ancestors
	*   (default: `defaultSchema.ancestors`).
	*
	*   Elements with these tag names will be ignored if they occur outside of one
	*   of their allowed parents.
	*
	*   For example:
	*
	*   ```js
	*   ancestors: {
	*     tbody: ['table'],
	*     // …
	*     tr: ['table']
	*   }
	*   ```
	* @property {Record<string, Array<PropertyDefinition>> | null | undefined} [attributes]
	*   Map of tag names to allowed property names (default:
	*   `defaultSchema.attributes`).
	*
	*   The special key `'*'` as a tag name defines property names allowed on all
	*   elements.
	*
	*   The special value `'data*'` as a property name can be used to allow all
	*   `data` properties.
	*
	*   For example:
	*
	*   ```js
	*   attributes: {
	*     'ariaDescribedBy', 'ariaLabel', 'ariaLabelledBy', …, 'href'
	*     // …
	*     '*': [
	*       'abbr',
	*       'accept',
	*       'acceptCharset',
	*       // …
	*       'vAlign',
	*       'value',
	*       'width'
	*     ]
	*   }
	*   ```
	*
	*   Instead of a single string in the array, which allows any property value
	*   for the field, you can use an array to allow several values.
	*   For example, `input: ['type']` allows `type` set to any value on `input`s.
	*   But `input: [['type', 'checkbox', 'radio']]` allows `type` when set to
	*   `'checkbox'` or `'radio'`.
	*
	*   You can use regexes, so for example `span: [['className', /^hljs-/]]`
	*   allows any class that starts with `hljs-` on `span`s.
	*
	*   When comma- or space-separated values are used (such as `className`), each
	*   value in is checked individually.
	*   For example, to allow certain classes on `span`s for syntax highlighting,
	*   use `span: [['className', 'number', 'operator', 'token']]`.
	*   This will allow `'number'`, `'operator'`, and `'token'` classes, but drop
	*   others.
	* @property {Array<string> | null | undefined} [clobber]
	*   List of property names that clobber (default: `defaultSchema.clobber`).
	*
	*   For example:
	*
	*   ```js
	*   clobber: ['ariaDescribedBy', 'ariaLabelledBy', 'id', 'name']
	*   ```
	* @property {string | null | undefined} [clobberPrefix]
	*   Prefix to use before clobbering properties (default:
	*   `defaultSchema.clobberPrefix`).
	*
	*   For example:
	*
	*   ```js
	*   clobberPrefix: 'user-content-'
	*   ```
	* @property {Record<string, Array<string> | null | undefined> | null | undefined} [protocols]
	*   Map of *property names* to allowed protocols (default:
	*   `defaultSchema.protocols`).
	*
	*   This defines URLs that are always allowed to have local URLs (relative to
	*   the current website, such as `this`, `#this`, `/this`, or `?this`), and
	*   only allowed to have remote URLs (such as `https://example.com`) if they
	*   use a known protocol.
	*
	*   For example:
	*
	*   ```js
	*   protocols: {
	*     cite: ['http', 'https'],
	*     // …
	*     src: ['http', 'https']
	*   }
	*   ```
	* @property {Record<string, Record<string, Properties[keyof Properties]>> | null | undefined} [required]
	*   Map of tag names to required property names with a default value
	*   (default: `defaultSchema.required`).
	*
	*   This defines properties that must be set.
	*   If a field does not exist (after the element was made safe), these will be
	*   added with the given value.
	*
	*   For example:
	*
	*   ```js
	*   required: {
	*     input: {disabled: true, type: 'checkbox'}
	*   }
	*   ```
	*
	*   > 👉 **Note**: properties are first checked based on `schema.attributes`,
	*   > then on `schema.required`.
	*   > That means properties could be removed by `attributes` and then added
	*   > again with `required`.
	* @property {Array<string> | null | undefined} [strip]
	*   List of tag names to strip from the tree (default: `defaultSchema.strip`).
	*
	*   By default, unsafe elements (those not in `schema.tagNames`) are replaced
	*   by what they contain.
	*   This option can drop their contents.
	*
	*   For example:
	*
	*   ```js
	*   strip: ['script']
	*   ```
	* @property {Array<string> | null | undefined} [tagNames]
	*   List of allowed tag names (default: `defaultSchema.tagNames`).
	*
	*   For example:
	*
	*   ```js
	*   tagNames: [
	*     'a',
	*     'b',
	*     // …
	*     'ul',
	*     'var'
	*   ]
	*   ```
	*
	* @typedef State
	*   Info passed around.
	* @property {Readonly<Schema>} schema
	*   Schema.
	* @property {Array<string>} stack
	*   Tag names of ancestors.
	*/
	var own$1 = {}.hasOwnProperty;
	/**
	* Sanitize a tree.
	*
	* @param {Readonly<Nodes>} node
	*   Unsafe tree.
	* @param {Readonly<Schema> | null | undefined} [options]
	*   Configuration (default: `defaultSchema`).
	* @returns {Nodes}
	*   New, safe tree.
	*/
	function sanitize(node, options) {
		/** @type {Nodes} */
		let result = {
			type: "root",
			children: []
		};
		const replace = transform$1({
			schema: options ? {
				...defaultSchema,
				...options
			} : defaultSchema,
			stack: []
		}, node);
		if (replace) if (Array.isArray(replace)) if (replace.length === 1) result = replace[0];
		else result.children = replace;
		else result = replace;
		return result;
	}
	/**
	* Sanitize `node`.
	*
	* @param {State} state
	*   Info passed around.
	* @param {Readonly<unknown>} node
	*   Unsafe node.
	* @returns {Array<ElementContent> | Nodes | undefined}
	*   Safe result.
	*/
	function transform$1(state, node) {
		if (node && typeof node === "object") {
			const unsafe = node;
			switch (typeof unsafe.type === "string" ? unsafe.type : "") {
				case "comment": return comment$1(state, unsafe);
				case "doctype": return doctype$1(state, unsafe);
				case "element": return element$1(state, unsafe);
				case "root": return root$1(state, unsafe);
				case "text": return text$1(state, unsafe);
				default:
			}
		}
	}
	/**
	* Make a safe comment.
	*
	* @param {State} state
	*   Info passed around.
	* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
	*   Unsafe comment-like value.
	* @returns {Comment | undefined}
	*   Safe comment (if with `allowComments`).
	*/
	function comment$1(state, unsafe) {
		if (state.schema.allowComments) {
			const result = typeof unsafe.value === "string" ? unsafe.value : "";
			const index = result.indexOf("-->");
			/** @type {Comment} */
			const node = {
				type: "comment",
				value: index < 0 ? result : result.slice(0, index)
			};
			patch(node, unsafe);
			return node;
		}
	}
	/**
	* Make a safe doctype.
	*
	* @param {State} state
	*   Info passed around.
	* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
	*   Unsafe doctype-like value.
	* @returns {Doctype | undefined}
	*   Safe doctype (if with `allowDoctypes`).
	*/
	function doctype$1(state, unsafe) {
		if (state.schema.allowDoctypes) {
			/** @type {Doctype} */
			const node = { type: "doctype" };
			patch(node, unsafe);
			return node;
		}
	}
	/**
	* Make a safe element.
	*
	* @param {State} state
	*   Info passed around.
	* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
	*   Unsafe element-like value.
	* @returns {Array<ElementContent> | Element | undefined}
	*   Safe element.
	*/
	function element$1(state, unsafe) {
		const name = typeof unsafe.tagName === "string" ? unsafe.tagName : "";
		state.stack.push(name);
		const content = children(state, unsafe.children);
		const properties_ = properties(state, unsafe.properties);
		state.stack.pop();
		let safeElement = false;
		if (name && name !== "*" && (!state.schema.tagNames || state.schema.tagNames.includes(name))) {
			safeElement = true;
			if (state.schema.ancestors && own$1.call(state.schema.ancestors, name)) {
				const ancestors = state.schema.ancestors[name];
				let index = -1;
				safeElement = false;
				while (++index < ancestors.length) if (state.stack.includes(ancestors[index])) safeElement = true;
			}
		}
		if (!safeElement) return state.schema.strip && !state.schema.strip.includes(name) ? content : void 0;
		/** @type {Element} */
		const node = {
			type: "element",
			tagName: name,
			properties: properties_,
			children: content
		};
		patch(node, unsafe);
		return node;
	}
	/**
	* Make a safe root.
	*
	* @param {State} state
	*   Info passed around.
	* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
	*   Unsafe root-like value.
	* @returns {Root}
	*   Safe root.
	*/
	function root$1(state, unsafe) {
		/** @type {Root} */
		const node = {
			type: "root",
			children: children(state, unsafe.children)
		};
		patch(node, unsafe);
		return node;
	}
	/**
	* Make a safe text.
	*
	* @param {State} _
	*   Info passed around.
	* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
	*   Unsafe text-like value.
	* @returns {Text}
	*   Safe text.
	*/
	function text$1(_, unsafe) {
		/** @type {Text} */
		const node = {
			type: "text",
			value: typeof unsafe.value === "string" ? unsafe.value : ""
		};
		patch(node, unsafe);
		return node;
	}
	/**
	* Make children safe.
	*
	* @param {State} state
	*   Info passed around.
	* @param {Readonly<unknown>} children
	*   Unsafe value.
	* @returns {Array<Nodes>}
	*   Safe children.
	*/
	function children(state, children) {
		/** @type {Array<Nodes>} */
		const results = [];
		if (Array.isArray(children)) {
			const childrenUnknown = children;
			let index = -1;
			while (++index < childrenUnknown.length) {
				const value = transform$1(state, childrenUnknown[index]);
				if (value) if (Array.isArray(value)) results.push(...value);
				else results.push(value);
			}
		}
		return results;
	}
	/**
	* Make element properties safe.
	*
	* @param {State} state
	*   Info passed around.
	* @param {Readonly<unknown>} properties
	*   Unsafe value.
	* @returns {Properties}
	*   Safe value.
	*/
	function properties(state, properties) {
		const tagName = state.stack[state.stack.length - 1];
		const attributes = state.schema.attributes;
		const required = state.schema.required;
		const specific = attributes && own$1.call(attributes, tagName) ? attributes[tagName] : void 0;
		const defaults = attributes && own$1.call(attributes, "*") ? attributes["*"] : void 0;
		const properties_ = properties && typeof properties === "object" ? properties : {};
		/** @type {Properties} */
		const result = {};
		/** @type {string} */
		let key;
		for (key in properties_) if (own$1.call(properties_, key)) {
			const unsafe = properties_[key];
			let safe = propertyValue(state, findDefinition(specific, key), key, unsafe);
			if (safe === null || safe === void 0) safe = propertyValue(state, findDefinition(defaults, key), key, unsafe);
			if (safe !== null && safe !== void 0) result[key] = safe;
		}
		if (required && own$1.call(required, tagName)) {
			const properties = required[tagName];
			for (key in properties) if (own$1.call(properties, key) && !own$1.call(result, key)) result[key] = properties[key];
		}
		return result;
	}
	/**
	* Sanitize a property value.
	*
	* @param {State} state
	*   Info passed around.
	* @param {Readonly<PropertyDefinition> | undefined} definition
	*   Definition.
	* @param {string} key
	*   Field name.
	* @param {Readonly<unknown>} value
	*   Unsafe value (but an array).
	* @returns {Array<number | string> | boolean | number | string | undefined}
	*   Safe value.
	*/
	function propertyValue(state, definition, key, value) {
		return definition ? Array.isArray(value) ? propertyValueMany(state, definition, key, value) : propertyValuePrimitive(state, definition, key, value) : void 0;
	}
	/**
	* Sanitize a property value which is a list.
	*
	* @param {State} state
	*   Info passed around.
	* @param {Readonly<PropertyDefinition>} definition
	*   Definition.
	* @param {string} key
	*   Field name.
	* @param {Readonly<Array<Readonly<unknown>>>} values
	*   Unsafe value (but an array).
	* @returns {Array<number | string>}
	*   Safe value.
	*/
	function propertyValueMany(state, definition, key, values) {
		let index = -1;
		/** @type {Array<number | string>} */
		const result = [];
		while (++index < values.length) {
			const value = propertyValuePrimitive(state, definition, key, values[index]);
			if (typeof value === "number" || typeof value === "string") result.push(value);
		}
		return result;
	}
	/**
	* Sanitize a property value which is a primitive.
	*
	* @param {State} state
	*   Info passed around.
	* @param {Readonly<PropertyDefinition>} definition
	*   Definition.
	* @param {string} key
	*   Field name.
	* @param {Readonly<unknown>} value
	*   Unsafe value (but not an array).
	* @returns {boolean | number | string | undefined}
	*   Safe value.
	*/
	function propertyValuePrimitive(state, definition, key, value) {
		if (typeof value !== "boolean" && typeof value !== "number" && typeof value !== "string") return;
		if (!safeProtocol(state, key, value)) return;
		if (typeof definition === "object" && definition.length > 1) {
			let ok = false;
			let index = 0;
			while (++index < definition.length) {
				const allowed = definition[index];
				if (allowed && typeof allowed === "object" && "flags" in allowed) {
					if (allowed.test(String(value))) {
						ok = true;
						break;
					}
				} else if (allowed === value) {
					ok = true;
					break;
				}
			}
			if (!ok) return;
		}
		return state.schema.clobber && state.schema.clobberPrefix && state.schema.clobber.includes(key) ? state.schema.clobberPrefix + value : value;
	}
	/**
	* Check whether `value` is a safe URL.
	*
	* @param {State} state
	*   Info passed around.
	* @param {string} key
	*   Field name.
	* @param {Readonly<unknown>} value
	*   Unsafe value.
	* @returns {boolean}
	*   Whether it’s a safe value.
	*/
	function safeProtocol(state, key, value) {
		const protocols = state.schema.protocols && own$1.call(state.schema.protocols, key) ? state.schema.protocols[key] : void 0;
		if (!protocols || protocols.length === 0) return true;
		const url = String(value);
		const colon = url.indexOf(":");
		const questionMark = url.indexOf("?");
		const numberSign = url.indexOf("#");
		const slash = url.indexOf("/");
		if (colon < 0 || slash > -1 && colon > slash || questionMark > -1 && colon > questionMark || numberSign > -1 && colon > numberSign) return true;
		let index = -1;
		while (++index < protocols.length) {
			const protocol = protocols[index];
			if (colon === protocol.length && url.slice(0, protocol.length) === protocol) return true;
		}
		return false;
	}
	/**
	* Add data and position.
	*
	* @param {Nodes} node
	*   Node to patch safe data and position on.
	* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
	*   Unsafe node-like value.
	* @returns {undefined}
	*   Nothing.
	*/
	function patch(node, unsafe) {
		const cleanPosition = position(unsafe);
		if (unsafe.data) node.data = esm_default(unsafe.data);
		if (cleanPosition) node.position = cleanPosition;
	}
	/**
	*
	* @param {Readonly<Array<PropertyDefinition>> | undefined} definitions
	* @param {string} key
	* @returns {Readonly<PropertyDefinition> | undefined}
	*/
	function findDefinition(definitions, key) {
		/** @type {PropertyDefinition | undefined} */
		let dataDefault;
		let index = -1;
		if (definitions) while (++index < definitions.length) {
			const entry = definitions[index];
			const name = typeof entry === "string" ? entry : entry[0];
			if (name === key) return entry;
			if (name === "data*") dataDefault = entry;
		}
		if (key.length > 4 && key.slice(0, 4).toLowerCase() === "data") return dataDefault;
	}
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.js
	/**
	* @import {Schema as SchemaType, Space} from 'property-information'
	*/
	/** @type {SchemaType} */
	var Schema = class {
		/**
		* @param {SchemaType['property']} property
		*   Property.
		* @param {SchemaType['normal']} normal
		*   Normal.
		* @param {Space | undefined} [space]
		*   Space.
		* @returns
		*   Schema.
		*/
		constructor(property, normal, space) {
			this.normal = normal;
			this.property = property;
			if (space) this.space = space;
		}
	};
	Schema.prototype.normal = {};
	Schema.prototype.property = {};
	Schema.prototype.space = void 0;
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.js
	/**
	* @import {Info, Space} from 'property-information'
	*/
	/**
	* @param {ReadonlyArray<Schema>} definitions
	*   Definitions.
	* @param {Space | undefined} [space]
	*   Space.
	* @returns {Schema}
	*   Schema.
	*/
	function merge(definitions, space) {
		/** @type {Record<string, Info>} */
		const property = {};
		/** @type {Record<string, string>} */
		const normal = {};
		for (const definition of definitions) {
			Object.assign(property, definition.property);
			Object.assign(normal, definition.normal);
		}
		return new Schema(property, normal, space);
	}
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.js
	/**
	* Get the cleaned case insensitive form of an attribute or property.
	*
	* @param {string} value
	*   An attribute-like or property-like name.
	* @returns {string}
	*   Value that can be used to look up the properly cased property on a
	*   `Schema`.
	*/
	function normalize(value) {
		return value.toLowerCase();
	}
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.js
	/**
	* @import {Info as InfoType} from 'property-information'
	*/
	/** @type {InfoType} */
	var Info = class {
		/**
		* @param {string} property
		*   Property.
		* @param {string} attribute
		*   Attribute.
		* @returns
		*   Info.
		*/
		constructor(property, attribute) {
			this.attribute = attribute;
			this.property = property;
		}
	};
	Info.prototype.attribute = "";
	Info.prototype.booleanish = false;
	Info.prototype.boolean = false;
	Info.prototype.commaOrSpaceSeparated = false;
	Info.prototype.commaSeparated = false;
	Info.prototype.defined = false;
	Info.prototype.mustUseProperty = false;
	Info.prototype.number = false;
	Info.prototype.overloadedBoolean = false;
	Info.prototype.property = "";
	Info.prototype.spaceSeparated = false;
	Info.prototype.space = void 0;
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.js
	var types_exports = /* @__PURE__ */ __exportAll({
		boolean: () => boolean,
		booleanish: () => booleanish,
		commaOrSpaceSeparated: () => commaOrSpaceSeparated,
		commaSeparated: () => commaSeparated,
		number: () => number$1,
		overloadedBoolean: () => overloadedBoolean,
		spaceSeparated: () => spaceSeparated
	});
	var powers = 0;
	var boolean = increment();
	var booleanish = increment();
	var overloadedBoolean = increment();
	var number$1 = increment();
	var spaceSeparated = increment();
	var commaSeparated = increment();
	var commaOrSpaceSeparated = increment();
	function increment() {
		return 2 ** ++powers;
	}
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.js
	/**
	* @import {Space} from 'property-information'
	*/
	var checks = Object.keys(types_exports);
	var DefinedInfo = class extends Info {
		/**
		* @constructor
		* @param {string} property
		*   Property.
		* @param {string} attribute
		*   Attribute.
		* @param {number | null | undefined} [mask]
		*   Mask.
		* @param {Space | undefined} [space]
		*   Space.
		* @returns
		*   Info.
		*/
		constructor(property, attribute, mask, space) {
			let index = -1;
			super(property, attribute);
			mark(this, "space", space);
			if (typeof mask === "number") while (++index < checks.length) {
				const check = checks[index];
				mark(this, checks[index], (mask & types_exports[check]) === types_exports[check]);
			}
		}
	};
	DefinedInfo.prototype.defined = true;
	/**
	* @template {keyof DefinedInfo} Key
	*   Key type.
	* @param {DefinedInfo} values
	*   Info.
	* @param {Key} key
	*   Key.
	* @param {DefinedInfo[Key]} value
	*   Value.
	* @returns {undefined}
	*   Nothing.
	*/
	function mark(values, key, value) {
		if (value) values[key] = value;
	}
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.js
	/**
	* @import {Info, Space} from 'property-information'
	*/
	/**
	* @typedef Definition
	*   Definition of a schema.
	* @property {Record<string, string> | undefined} [attributes]
	*   Normalzed names to special attribute case.
	* @property {ReadonlyArray<string> | undefined} [mustUseProperty]
	*   Normalized names that must be set as properties.
	* @property {Record<string, number | null>} properties
	*   Property names to their types.
	* @property {Space | undefined} [space]
	*   Space.
	* @property {Transform} transform
	*   Transform a property name.
	*/
	/**
	* @callback Transform
	*   Transform.
	* @param {Record<string, string>} attributes
	*   Attributes.
	* @param {string} property
	*   Property.
	* @returns {string}
	*   Attribute.
	*/
	/**
	* @param {Definition} definition
	*   Definition.
	* @returns {Schema}
	*   Schema.
	*/
	function create(definition) {
		/** @type {Record<string, Info>} */
		const properties = {};
		/** @type {Record<string, string>} */
		const normals = {};
		for (const [property, value] of Object.entries(definition.properties)) {
			const info = new DefinedInfo(property, definition.transform(definition.attributes || {}, property), value, definition.space);
			if (definition.mustUseProperty && definition.mustUseProperty.includes(property)) info.mustUseProperty = true;
			properties[property] = info;
			normals[normalize(property)] = property;
			normals[normalize(info.attribute)] = property;
		}
		return new Schema(properties, normals, definition.space);
	}
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.js
	var aria = create({
		properties: {
			ariaActiveDescendant: null,
			ariaAtomic: booleanish,
			ariaAutoComplete: null,
			ariaBusy: booleanish,
			ariaChecked: booleanish,
			ariaColCount: number$1,
			ariaColIndex: number$1,
			ariaColSpan: number$1,
			ariaControls: spaceSeparated,
			ariaCurrent: null,
			ariaDescribedBy: spaceSeparated,
			ariaDetails: null,
			ariaDisabled: booleanish,
			ariaDropEffect: spaceSeparated,
			ariaErrorMessage: null,
			ariaExpanded: booleanish,
			ariaFlowTo: spaceSeparated,
			ariaGrabbed: booleanish,
			ariaHasPopup: null,
			ariaHidden: booleanish,
			ariaInvalid: null,
			ariaKeyShortcuts: null,
			ariaLabel: null,
			ariaLabelledBy: spaceSeparated,
			ariaLevel: number$1,
			ariaLive: null,
			ariaModal: booleanish,
			ariaMultiLine: booleanish,
			ariaMultiSelectable: booleanish,
			ariaOrientation: null,
			ariaOwns: spaceSeparated,
			ariaPlaceholder: null,
			ariaPosInSet: number$1,
			ariaPressed: booleanish,
			ariaReadOnly: booleanish,
			ariaRelevant: null,
			ariaRequired: booleanish,
			ariaRoleDescription: spaceSeparated,
			ariaRowCount: number$1,
			ariaRowIndex: number$1,
			ariaRowSpan: number$1,
			ariaSelected: booleanish,
			ariaSetSize: number$1,
			ariaSort: null,
			ariaValueMax: number$1,
			ariaValueMin: number$1,
			ariaValueNow: number$1,
			ariaValueText: null,
			role: null
		},
		transform(_, property) {
			return property === "role" ? property : "aria-" + property.slice(4).toLowerCase();
		}
	});
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.js
	/**
	* @param {Record<string, string>} attributes
	*   Attributes.
	* @param {string} attribute
	*   Attribute.
	* @returns {string}
	*   Transformed attribute.
	*/
	function caseSensitiveTransform(attributes, attribute) {
		return attribute in attributes ? attributes[attribute] : attribute;
	}
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.js
	/**
	* @param {Record<string, string>} attributes
	*   Attributes.
	* @param {string} property
	*   Property.
	* @returns {string}
	*   Transformed property.
	*/
	function caseInsensitiveTransform(attributes, property) {
		return caseSensitiveTransform(attributes, property.toLowerCase());
	}
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.js
	var html$1 = create({
		attributes: {
			acceptcharset: "accept-charset",
			classname: "class",
			htmlfor: "for",
			httpequiv: "http-equiv"
		},
		mustUseProperty: [
			"checked",
			"multiple",
			"muted",
			"selected"
		],
		properties: {
			abbr: null,
			accept: commaSeparated,
			acceptCharset: spaceSeparated,
			accessKey: spaceSeparated,
			action: null,
			allow: null,
			allowFullScreen: boolean,
			allowPaymentRequest: boolean,
			allowUserMedia: boolean,
			alt: null,
			as: null,
			async: boolean,
			autoCapitalize: null,
			autoComplete: spaceSeparated,
			autoFocus: boolean,
			autoPlay: boolean,
			blocking: spaceSeparated,
			capture: null,
			charSet: null,
			checked: boolean,
			cite: null,
			className: spaceSeparated,
			cols: number$1,
			colSpan: null,
			content: null,
			contentEditable: booleanish,
			controls: boolean,
			controlsList: spaceSeparated,
			coords: number$1 | commaSeparated,
			crossOrigin: null,
			data: null,
			dateTime: null,
			decoding: null,
			default: boolean,
			defer: boolean,
			dir: null,
			dirName: null,
			disabled: boolean,
			download: overloadedBoolean,
			draggable: booleanish,
			encType: null,
			enterKeyHint: null,
			fetchPriority: null,
			form: null,
			formAction: null,
			formEncType: null,
			formMethod: null,
			formNoValidate: boolean,
			formTarget: null,
			headers: spaceSeparated,
			height: number$1,
			hidden: overloadedBoolean,
			high: number$1,
			href: null,
			hrefLang: null,
			htmlFor: spaceSeparated,
			httpEquiv: spaceSeparated,
			id: null,
			imageSizes: null,
			imageSrcSet: null,
			inert: boolean,
			inputMode: null,
			integrity: null,
			is: null,
			isMap: boolean,
			itemId: null,
			itemProp: spaceSeparated,
			itemRef: spaceSeparated,
			itemScope: boolean,
			itemType: spaceSeparated,
			kind: null,
			label: null,
			lang: null,
			language: null,
			list: null,
			loading: null,
			loop: boolean,
			low: number$1,
			manifest: null,
			max: null,
			maxLength: number$1,
			media: null,
			method: null,
			min: null,
			minLength: number$1,
			multiple: boolean,
			muted: boolean,
			name: null,
			nonce: null,
			noModule: boolean,
			noValidate: boolean,
			onAbort: null,
			onAfterPrint: null,
			onAuxClick: null,
			onBeforeMatch: null,
			onBeforePrint: null,
			onBeforeToggle: null,
			onBeforeUnload: null,
			onBlur: null,
			onCancel: null,
			onCanPlay: null,
			onCanPlayThrough: null,
			onChange: null,
			onClick: null,
			onClose: null,
			onContextLost: null,
			onContextMenu: null,
			onContextRestored: null,
			onCopy: null,
			onCueChange: null,
			onCut: null,
			onDblClick: null,
			onDrag: null,
			onDragEnd: null,
			onDragEnter: null,
			onDragExit: null,
			onDragLeave: null,
			onDragOver: null,
			onDragStart: null,
			onDrop: null,
			onDurationChange: null,
			onEmptied: null,
			onEnded: null,
			onError: null,
			onFocus: null,
			onFormData: null,
			onHashChange: null,
			onInput: null,
			onInvalid: null,
			onKeyDown: null,
			onKeyPress: null,
			onKeyUp: null,
			onLanguageChange: null,
			onLoad: null,
			onLoadedData: null,
			onLoadedMetadata: null,
			onLoadEnd: null,
			onLoadStart: null,
			onMessage: null,
			onMessageError: null,
			onMouseDown: null,
			onMouseEnter: null,
			onMouseLeave: null,
			onMouseMove: null,
			onMouseOut: null,
			onMouseOver: null,
			onMouseUp: null,
			onOffline: null,
			onOnline: null,
			onPageHide: null,
			onPageShow: null,
			onPaste: null,
			onPause: null,
			onPlay: null,
			onPlaying: null,
			onPopState: null,
			onProgress: null,
			onRateChange: null,
			onRejectionHandled: null,
			onReset: null,
			onResize: null,
			onScroll: null,
			onScrollEnd: null,
			onSecurityPolicyViolation: null,
			onSeeked: null,
			onSeeking: null,
			onSelect: null,
			onSlotChange: null,
			onStalled: null,
			onStorage: null,
			onSubmit: null,
			onSuspend: null,
			onTimeUpdate: null,
			onToggle: null,
			onUnhandledRejection: null,
			onUnload: null,
			onVolumeChange: null,
			onWaiting: null,
			onWheel: null,
			open: boolean,
			optimum: number$1,
			pattern: null,
			ping: spaceSeparated,
			placeholder: null,
			playsInline: boolean,
			popover: null,
			popoverTarget: null,
			popoverTargetAction: null,
			poster: null,
			preload: null,
			readOnly: boolean,
			referrerPolicy: null,
			rel: spaceSeparated,
			required: boolean,
			reversed: boolean,
			rows: number$1,
			rowSpan: number$1,
			sandbox: spaceSeparated,
			scope: null,
			scoped: boolean,
			seamless: boolean,
			selected: boolean,
			shadowRootClonable: boolean,
			shadowRootDelegatesFocus: boolean,
			shadowRootMode: null,
			shape: null,
			size: number$1,
			sizes: null,
			slot: null,
			span: number$1,
			spellCheck: booleanish,
			src: null,
			srcDoc: null,
			srcLang: null,
			srcSet: null,
			start: number$1,
			step: null,
			style: null,
			tabIndex: number$1,
			target: null,
			title: null,
			translate: null,
			type: null,
			typeMustMatch: boolean,
			useMap: null,
			value: booleanish,
			width: number$1,
			wrap: null,
			writingSuggestions: null,
			align: null,
			aLink: null,
			archive: spaceSeparated,
			axis: null,
			background: null,
			bgColor: null,
			border: number$1,
			borderColor: null,
			bottomMargin: number$1,
			cellPadding: null,
			cellSpacing: null,
			char: null,
			charOff: null,
			classId: null,
			clear: null,
			code: null,
			codeBase: null,
			codeType: null,
			color: null,
			compact: boolean,
			declare: boolean,
			event: null,
			face: null,
			frame: null,
			frameBorder: null,
			hSpace: number$1,
			leftMargin: number$1,
			link: null,
			longDesc: null,
			lowSrc: null,
			marginHeight: number$1,
			marginWidth: number$1,
			noResize: boolean,
			noHref: boolean,
			noShade: boolean,
			noWrap: boolean,
			object: null,
			profile: null,
			prompt: null,
			rev: null,
			rightMargin: number$1,
			rules: null,
			scheme: null,
			scrolling: booleanish,
			standby: null,
			summary: null,
			text: null,
			topMargin: number$1,
			valueType: null,
			version: null,
			vAlign: null,
			vLink: null,
			vSpace: number$1,
			allowTransparency: null,
			autoCorrect: null,
			autoSave: null,
			disablePictureInPicture: boolean,
			disableRemotePlayback: boolean,
			prefix: null,
			property: null,
			results: number$1,
			security: null,
			unselectable: null
		},
		space: "html",
		transform: caseInsensitiveTransform
	});
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/svg.js
	var svg$1 = create({
		attributes: {
			accentHeight: "accent-height",
			alignmentBaseline: "alignment-baseline",
			arabicForm: "arabic-form",
			baselineShift: "baseline-shift",
			capHeight: "cap-height",
			className: "class",
			clipPath: "clip-path",
			clipRule: "clip-rule",
			colorInterpolation: "color-interpolation",
			colorInterpolationFilters: "color-interpolation-filters",
			colorProfile: "color-profile",
			colorRendering: "color-rendering",
			crossOrigin: "crossorigin",
			dataType: "datatype",
			dominantBaseline: "dominant-baseline",
			enableBackground: "enable-background",
			fillOpacity: "fill-opacity",
			fillRule: "fill-rule",
			floodColor: "flood-color",
			floodOpacity: "flood-opacity",
			fontFamily: "font-family",
			fontSize: "font-size",
			fontSizeAdjust: "font-size-adjust",
			fontStretch: "font-stretch",
			fontStyle: "font-style",
			fontVariant: "font-variant",
			fontWeight: "font-weight",
			glyphName: "glyph-name",
			glyphOrientationHorizontal: "glyph-orientation-horizontal",
			glyphOrientationVertical: "glyph-orientation-vertical",
			hrefLang: "hreflang",
			horizAdvX: "horiz-adv-x",
			horizOriginX: "horiz-origin-x",
			horizOriginY: "horiz-origin-y",
			imageRendering: "image-rendering",
			letterSpacing: "letter-spacing",
			lightingColor: "lighting-color",
			markerEnd: "marker-end",
			markerMid: "marker-mid",
			markerStart: "marker-start",
			navDown: "nav-down",
			navDownLeft: "nav-down-left",
			navDownRight: "nav-down-right",
			navLeft: "nav-left",
			navNext: "nav-next",
			navPrev: "nav-prev",
			navRight: "nav-right",
			navUp: "nav-up",
			navUpLeft: "nav-up-left",
			navUpRight: "nav-up-right",
			onAbort: "onabort",
			onActivate: "onactivate",
			onAfterPrint: "onafterprint",
			onBeforePrint: "onbeforeprint",
			onBegin: "onbegin",
			onCancel: "oncancel",
			onCanPlay: "oncanplay",
			onCanPlayThrough: "oncanplaythrough",
			onChange: "onchange",
			onClick: "onclick",
			onClose: "onclose",
			onCopy: "oncopy",
			onCueChange: "oncuechange",
			onCut: "oncut",
			onDblClick: "ondblclick",
			onDrag: "ondrag",
			onDragEnd: "ondragend",
			onDragEnter: "ondragenter",
			onDragExit: "ondragexit",
			onDragLeave: "ondragleave",
			onDragOver: "ondragover",
			onDragStart: "ondragstart",
			onDrop: "ondrop",
			onDurationChange: "ondurationchange",
			onEmptied: "onemptied",
			onEnd: "onend",
			onEnded: "onended",
			onError: "onerror",
			onFocus: "onfocus",
			onFocusIn: "onfocusin",
			onFocusOut: "onfocusout",
			onHashChange: "onhashchange",
			onInput: "oninput",
			onInvalid: "oninvalid",
			onKeyDown: "onkeydown",
			onKeyPress: "onkeypress",
			onKeyUp: "onkeyup",
			onLoad: "onload",
			onLoadedData: "onloadeddata",
			onLoadedMetadata: "onloadedmetadata",
			onLoadStart: "onloadstart",
			onMessage: "onmessage",
			onMouseDown: "onmousedown",
			onMouseEnter: "onmouseenter",
			onMouseLeave: "onmouseleave",
			onMouseMove: "onmousemove",
			onMouseOut: "onmouseout",
			onMouseOver: "onmouseover",
			onMouseUp: "onmouseup",
			onMouseWheel: "onmousewheel",
			onOffline: "onoffline",
			onOnline: "ononline",
			onPageHide: "onpagehide",
			onPageShow: "onpageshow",
			onPaste: "onpaste",
			onPause: "onpause",
			onPlay: "onplay",
			onPlaying: "onplaying",
			onPopState: "onpopstate",
			onProgress: "onprogress",
			onRateChange: "onratechange",
			onRepeat: "onrepeat",
			onReset: "onreset",
			onResize: "onresize",
			onScroll: "onscroll",
			onSeeked: "onseeked",
			onSeeking: "onseeking",
			onSelect: "onselect",
			onShow: "onshow",
			onStalled: "onstalled",
			onStorage: "onstorage",
			onSubmit: "onsubmit",
			onSuspend: "onsuspend",
			onTimeUpdate: "ontimeupdate",
			onToggle: "ontoggle",
			onUnload: "onunload",
			onVolumeChange: "onvolumechange",
			onWaiting: "onwaiting",
			onZoom: "onzoom",
			overlinePosition: "overline-position",
			overlineThickness: "overline-thickness",
			paintOrder: "paint-order",
			panose1: "panose-1",
			pointerEvents: "pointer-events",
			referrerPolicy: "referrerpolicy",
			renderingIntent: "rendering-intent",
			shapeRendering: "shape-rendering",
			stopColor: "stop-color",
			stopOpacity: "stop-opacity",
			strikethroughPosition: "strikethrough-position",
			strikethroughThickness: "strikethrough-thickness",
			strokeDashArray: "stroke-dasharray",
			strokeDashOffset: "stroke-dashoffset",
			strokeLineCap: "stroke-linecap",
			strokeLineJoin: "stroke-linejoin",
			strokeMiterLimit: "stroke-miterlimit",
			strokeOpacity: "stroke-opacity",
			strokeWidth: "stroke-width",
			tabIndex: "tabindex",
			textAnchor: "text-anchor",
			textDecoration: "text-decoration",
			textRendering: "text-rendering",
			transformOrigin: "transform-origin",
			typeOf: "typeof",
			underlinePosition: "underline-position",
			underlineThickness: "underline-thickness",
			unicodeBidi: "unicode-bidi",
			unicodeRange: "unicode-range",
			unitsPerEm: "units-per-em",
			vAlphabetic: "v-alphabetic",
			vHanging: "v-hanging",
			vIdeographic: "v-ideographic",
			vMathematical: "v-mathematical",
			vectorEffect: "vector-effect",
			vertAdvY: "vert-adv-y",
			vertOriginX: "vert-origin-x",
			vertOriginY: "vert-origin-y",
			wordSpacing: "word-spacing",
			writingMode: "writing-mode",
			xHeight: "x-height",
			playbackOrder: "playbackorder",
			timelineBegin: "timelinebegin"
		},
		properties: {
			about: commaOrSpaceSeparated,
			accentHeight: number$1,
			accumulate: null,
			additive: null,
			alignmentBaseline: null,
			alphabetic: number$1,
			amplitude: number$1,
			arabicForm: null,
			ascent: number$1,
			attributeName: null,
			attributeType: null,
			azimuth: number$1,
			bandwidth: null,
			baselineShift: null,
			baseFrequency: null,
			baseProfile: null,
			bbox: null,
			begin: null,
			bias: number$1,
			by: null,
			calcMode: null,
			capHeight: number$1,
			className: spaceSeparated,
			clip: null,
			clipPath: null,
			clipPathUnits: null,
			clipRule: null,
			color: null,
			colorInterpolation: null,
			colorInterpolationFilters: null,
			colorProfile: null,
			colorRendering: null,
			content: null,
			contentScriptType: null,
			contentStyleType: null,
			crossOrigin: null,
			cursor: null,
			cx: null,
			cy: null,
			d: null,
			dataType: null,
			defaultAction: null,
			descent: number$1,
			diffuseConstant: number$1,
			direction: null,
			display: null,
			dur: null,
			divisor: number$1,
			dominantBaseline: null,
			download: boolean,
			dx: null,
			dy: null,
			edgeMode: null,
			editable: null,
			elevation: number$1,
			enableBackground: null,
			end: null,
			event: null,
			exponent: number$1,
			externalResourcesRequired: null,
			fill: null,
			fillOpacity: number$1,
			fillRule: null,
			filter: null,
			filterRes: null,
			filterUnits: null,
			floodColor: null,
			floodOpacity: null,
			focusable: null,
			focusHighlight: null,
			fontFamily: null,
			fontSize: null,
			fontSizeAdjust: null,
			fontStretch: null,
			fontStyle: null,
			fontVariant: null,
			fontWeight: null,
			format: null,
			fr: null,
			from: null,
			fx: null,
			fy: null,
			g1: commaSeparated,
			g2: commaSeparated,
			glyphName: commaSeparated,
			glyphOrientationHorizontal: null,
			glyphOrientationVertical: null,
			glyphRef: null,
			gradientTransform: null,
			gradientUnits: null,
			handler: null,
			hanging: number$1,
			hatchContentUnits: null,
			hatchUnits: null,
			height: null,
			href: null,
			hrefLang: null,
			horizAdvX: number$1,
			horizOriginX: number$1,
			horizOriginY: number$1,
			id: null,
			ideographic: number$1,
			imageRendering: null,
			initialVisibility: null,
			in: null,
			in2: null,
			intercept: number$1,
			k: number$1,
			k1: number$1,
			k2: number$1,
			k3: number$1,
			k4: number$1,
			kernelMatrix: commaOrSpaceSeparated,
			kernelUnitLength: null,
			keyPoints: null,
			keySplines: null,
			keyTimes: null,
			kerning: null,
			lang: null,
			lengthAdjust: null,
			letterSpacing: null,
			lightingColor: null,
			limitingConeAngle: number$1,
			local: null,
			markerEnd: null,
			markerMid: null,
			markerStart: null,
			markerHeight: null,
			markerUnits: null,
			markerWidth: null,
			mask: null,
			maskContentUnits: null,
			maskUnits: null,
			mathematical: null,
			max: null,
			media: null,
			mediaCharacterEncoding: null,
			mediaContentEncodings: null,
			mediaSize: number$1,
			mediaTime: null,
			method: null,
			min: null,
			mode: null,
			name: null,
			navDown: null,
			navDownLeft: null,
			navDownRight: null,
			navLeft: null,
			navNext: null,
			navPrev: null,
			navRight: null,
			navUp: null,
			navUpLeft: null,
			navUpRight: null,
			numOctaves: null,
			observer: null,
			offset: null,
			onAbort: null,
			onActivate: null,
			onAfterPrint: null,
			onBeforePrint: null,
			onBegin: null,
			onCancel: null,
			onCanPlay: null,
			onCanPlayThrough: null,
			onChange: null,
			onClick: null,
			onClose: null,
			onCopy: null,
			onCueChange: null,
			onCut: null,
			onDblClick: null,
			onDrag: null,
			onDragEnd: null,
			onDragEnter: null,
			onDragExit: null,
			onDragLeave: null,
			onDragOver: null,
			onDragStart: null,
			onDrop: null,
			onDurationChange: null,
			onEmptied: null,
			onEnd: null,
			onEnded: null,
			onError: null,
			onFocus: null,
			onFocusIn: null,
			onFocusOut: null,
			onHashChange: null,
			onInput: null,
			onInvalid: null,
			onKeyDown: null,
			onKeyPress: null,
			onKeyUp: null,
			onLoad: null,
			onLoadedData: null,
			onLoadedMetadata: null,
			onLoadStart: null,
			onMessage: null,
			onMouseDown: null,
			onMouseEnter: null,
			onMouseLeave: null,
			onMouseMove: null,
			onMouseOut: null,
			onMouseOver: null,
			onMouseUp: null,
			onMouseWheel: null,
			onOffline: null,
			onOnline: null,
			onPageHide: null,
			onPageShow: null,
			onPaste: null,
			onPause: null,
			onPlay: null,
			onPlaying: null,
			onPopState: null,
			onProgress: null,
			onRateChange: null,
			onRepeat: null,
			onReset: null,
			onResize: null,
			onScroll: null,
			onSeeked: null,
			onSeeking: null,
			onSelect: null,
			onShow: null,
			onStalled: null,
			onStorage: null,
			onSubmit: null,
			onSuspend: null,
			onTimeUpdate: null,
			onToggle: null,
			onUnload: null,
			onVolumeChange: null,
			onWaiting: null,
			onZoom: null,
			opacity: null,
			operator: null,
			order: null,
			orient: null,
			orientation: null,
			origin: null,
			overflow: null,
			overlay: null,
			overlinePosition: number$1,
			overlineThickness: number$1,
			paintOrder: null,
			panose1: null,
			path: null,
			pathLength: number$1,
			patternContentUnits: null,
			patternTransform: null,
			patternUnits: null,
			phase: null,
			ping: spaceSeparated,
			pitch: null,
			playbackOrder: null,
			pointerEvents: null,
			points: null,
			pointsAtX: number$1,
			pointsAtY: number$1,
			pointsAtZ: number$1,
			preserveAlpha: null,
			preserveAspectRatio: null,
			primitiveUnits: null,
			propagate: null,
			property: commaOrSpaceSeparated,
			r: null,
			radius: null,
			referrerPolicy: null,
			refX: null,
			refY: null,
			rel: commaOrSpaceSeparated,
			rev: commaOrSpaceSeparated,
			renderingIntent: null,
			repeatCount: null,
			repeatDur: null,
			requiredExtensions: commaOrSpaceSeparated,
			requiredFeatures: commaOrSpaceSeparated,
			requiredFonts: commaOrSpaceSeparated,
			requiredFormats: commaOrSpaceSeparated,
			resource: null,
			restart: null,
			result: null,
			rotate: null,
			rx: null,
			ry: null,
			scale: null,
			seed: null,
			shapeRendering: null,
			side: null,
			slope: null,
			snapshotTime: null,
			specularConstant: number$1,
			specularExponent: number$1,
			spreadMethod: null,
			spacing: null,
			startOffset: null,
			stdDeviation: null,
			stemh: null,
			stemv: null,
			stitchTiles: null,
			stopColor: null,
			stopOpacity: null,
			strikethroughPosition: number$1,
			strikethroughThickness: number$1,
			string: null,
			stroke: null,
			strokeDashArray: commaOrSpaceSeparated,
			strokeDashOffset: null,
			strokeLineCap: null,
			strokeLineJoin: null,
			strokeMiterLimit: number$1,
			strokeOpacity: number$1,
			strokeWidth: null,
			style: null,
			surfaceScale: number$1,
			syncBehavior: null,
			syncBehaviorDefault: null,
			syncMaster: null,
			syncTolerance: null,
			syncToleranceDefault: null,
			systemLanguage: commaOrSpaceSeparated,
			tabIndex: number$1,
			tableValues: null,
			target: null,
			targetX: number$1,
			targetY: number$1,
			textAnchor: null,
			textDecoration: null,
			textRendering: null,
			textLength: null,
			timelineBegin: null,
			title: null,
			transformBehavior: null,
			type: null,
			typeOf: commaOrSpaceSeparated,
			to: null,
			transform: null,
			transformOrigin: null,
			u1: null,
			u2: null,
			underlinePosition: number$1,
			underlineThickness: number$1,
			unicode: null,
			unicodeBidi: null,
			unicodeRange: null,
			unitsPerEm: number$1,
			values: null,
			vAlphabetic: number$1,
			vMathematical: number$1,
			vectorEffect: null,
			vHanging: number$1,
			vIdeographic: number$1,
			version: null,
			vertAdvY: number$1,
			vertOriginX: number$1,
			vertOriginY: number$1,
			viewBox: null,
			viewTarget: null,
			visibility: null,
			width: null,
			widths: null,
			wordSpacing: null,
			writingMode: null,
			x: null,
			x1: null,
			x2: null,
			xChannelSelector: null,
			xHeight: number$1,
			y: null,
			y1: null,
			y2: null,
			yChannelSelector: null,
			z: null,
			zoomAndPan: null
		},
		space: "svg",
		transform: caseSensitiveTransform
	});
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xlink.js
	var xlink = create({
		properties: {
			xLinkActuate: null,
			xLinkArcRole: null,
			xLinkHref: null,
			xLinkRole: null,
			xLinkShow: null,
			xLinkTitle: null,
			xLinkType: null
		},
		space: "xlink",
		transform(_, property) {
			return "xlink:" + property.slice(5).toLowerCase();
		}
	});
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xmlns.js
	var xmlns = create({
		attributes: { xmlnsxlink: "xmlns:xlink" },
		properties: {
			xmlnsXLink: null,
			xmlns: null
		},
		space: "xmlns",
		transform: caseInsensitiveTransform
	});
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xml.js
	var xml = create({
		properties: {
			xmlBase: null,
			xmlLang: null,
			xmlSpace: null
		},
		space: "xml",
		transform(_, property) {
			return "xml:" + property.slice(3).toLowerCase();
		}
	});
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/find.js
	/**
	* @import {Schema} from 'property-information'
	*/
	var cap = /[A-Z]/g;
	var dash = /-[a-z]/g;
	var valid = /^data[-\w.:]+$/i;
	/**
	* Look up info on a property.
	*
	* In most cases the given `schema` contains info on the property.
	* All standard,
	* most legacy,
	* and some non-standard properties are supported.
	* For these cases,
	* the returned `Info` has hints about the value of the property.
	*
	* `name` can also be a valid data attribute or property,
	* in which case an `Info` object with the correctly cased `attribute` and
	* `property` is returned.
	*
	* `name` can be an unknown attribute,
	* in which case an `Info` object with `attribute` and `property` set to the
	* given name is returned.
	* It is not recommended to provide unsupported legacy or recently specced
	* properties.
	*
	*
	* @param {Schema} schema
	*   Schema;
	*   either the `html` or `svg` export.
	* @param {string} value
	*   An attribute-like or property-like name;
	*   it will be passed through `normalize` to hopefully find the correct info.
	* @returns {Info}
	*   Info.
	*/
	function find(schema, value) {
		const normal = normalize(value);
		let property = value;
		let Type = Info;
		if (normal in schema.normal) return schema.property[schema.normal[normal]];
		if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) {
			if (value.charAt(4) === "-") {
				const rest = value.slice(5).replace(dash, camelcase);
				property = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
			} else {
				const rest = value.slice(4);
				if (!dash.test(rest)) {
					let dashes = rest.replace(cap, kebab);
					if (dashes.charAt(0) !== "-") dashes = "-" + dashes;
					value = "data" + dashes;
				}
			}
			Type = DefinedInfo;
		}
		return new Type(property, value);
	}
	/**
	* @param {string} $0
	*   Value.
	* @returns {string}
	*   Kebab.
	*/
	function kebab($0) {
		return "-" + $0.toLowerCase();
	}
	/**
	* @param {string} $0
	*   Value.
	* @returns {string}
	*   Camel.
	*/
	function camelcase($0) {
		return $0.charAt(1).toUpperCase();
	}
	//#endregion
	//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.js
	var html = merge([
		aria,
		html$1,
		xlink,
		xmlns,
		xml
	], "html");
	var svg = merge([
		aria,
		svg$1,
		xlink,
		xmlns,
		xml
	], "svg");
	//#endregion
	//#region node_modules/.pnpm/web-namespaces@2.0.1/node_modules/web-namespaces/index.js
	/**
	* Map of web namespaces.
	*
	* @type {Record<string, string>}
	*/
	var webNamespaces = {
		html: "http://www.w3.org/1999/xhtml",
		mathml: "http://www.w3.org/1998/Math/MathML",
		svg: "http://www.w3.org/2000/svg",
		xlink: "http://www.w3.org/1999/xlink",
		xml: "http://www.w3.org/XML/1998/namespace",
		xmlns: "http://www.w3.org/2000/xmlns/"
	};
	//#endregion
	//#region node_modules/.pnpm/hast-util-to-dom@4.0.1/node_modules/hast-util-to-dom/lib/index.js
	/**
	* @import {
	*   Comment as HastComment,
	*   Doctype as HastDoctype,
	*   Element as HastElement,
	*   Nodes as HastNodes,
	*   Properties as HastProperties,
	*   RootContent as HastRootContent,
	*   Root as HastRoot,
	*   Text as HastText
	* } from 'hast'
	* @import {Schema} from 'property-information'
	*/
	/**
	* @callback AfterTransform
	*   Callback called when each node is transformed.
	* @param {HastNodes} hastNode
	*   hast node that was handled.
	* @param {Node} domNode
	*   Corresponding DOM node.
	* @returns {undefined | void}
	*   Nothing.
	*
	*   Note: `void` included until TS infers `undefined` fine.
	*
	* @typedef Options
	*   Configuration.
	* @property {AfterTransform | null | undefined} [afterTransform]
	*   Callback called when each node is transformed (optional).
	* @property {Document | null | undefined} [document]
	*   Document interface to use (default: `globalThis.document`).
	* @property {boolean | null | undefined} [fragment=false]
	*   Whether to return a DOM fragment (`true`) or a whole document (`false`)
	*   (default: `false`).
	* @property {string | null | undefined} [namespace]
	*   Namespace to use to create elements (optional).
	*
	* @typedef State
	*   Info passed around about the current state.
	* @property {Document} doc
	*   Document interface to use.
	* @property {boolean} fragment
	*   Whether a fragment (`true`) or whole document (`false`) is built.
	* @property {string | undefined} namespace
	*   Explicit namespace to use.
	* @property {string | undefined} impliedNamespace
	*   Namespace.
	* @property {AfterTransform | undefined} afterTransform
	*   Callback called after each hast node is transformed.
	*/
	var own = {}.hasOwnProperty;
	/**
	* Transform a hast tree to a DOM tree
	*
	* @param {HastNodes} tree
	*   Tree to transform.
	* @param {Options | null | undefined} [options]
	*   Configuration (optional).
	* @returns {Comment | Document | DocumentFragment | DocumentType | Element | Text}
	*   Equivalent DOM node.
	*/
	function toDom(tree, options) {
		const config = options || {};
		return transform(tree, {
			doc: config.document || document,
			fragment: config.fragment || false,
			namespace: config.namespace || void 0,
			impliedNamespace: void 0,
			afterTransform: config.afterTransform || void 0
		});
	}
	/**
	* @param {HastNodes} node
	*   Node to transform.
	* @param {State} state
	*   Info passed around about the current state.
	* @returns {Comment | Document | DocumentFragment | DocumentType | Element | Text}
	*   Equivalent DOM node.
	*/
	function transform(node, state) {
		const transformed = one(node, state);
		if (state.afterTransform) state.afterTransform(node, transformed);
		return transformed;
	}
	/**
	* Transform any hast node.
	*
	* @param {HastNodes} node
	*   Node to transform.
	* @param {State} state
	*   Info passed around about the current state.
	* @returns {Comment | Document | DocumentFragment | DocumentType | Element | Text}
	*   Equivalent DOM node.
	*/
	function one(node, state) {
		switch (node.type) {
			case "root": return root(node, state);
			case "text": return text(node, state);
			case "doctype": return doctype(node, state);
			case "comment": return comment(node, state);
			default: return element(node, state);
		}
	}
	/**
	* Create a document.
	*
	* @param {HastRoot} node
	*   Node to transform.
	* @param {State} state
	*   Info passed around about the current state.
	* @returns {Document | DocumentFragment | HTMLHtmlElement}
	*   Equivalent DOM node.
	*/
	function root(node, state) {
		const children = node.children || [];
		let rootIsDocument = children.length === 0;
		let index = -1;
		/** @type {string | undefined} */
		let foundNamespace;
		while (++index < children.length) {
			const child = children[index];
			if (child.type === "element" && child.tagName === "html") {
				rootIsDocument = true;
				foundNamespace = String(child.properties && child.properties.xmlns || "") || webNamespaces.html;
				break;
			}
		}
		const namespace = state.namespace || foundNamespace;
		/** @type {Document | DocumentFragment | HTMLHtmlElement} */
		let result;
		if (rootIsDocument) result = state.doc.implementation.createDocument(namespace || null, "");
		else if (state.fragment) result = state.doc.createDocumentFragment();
		else result = state.doc.createElement("html");
		appendAll(result, children, {
			...state,
			namespace,
			impliedNamespace: namespace
		});
		return result;
	}
	/**
	* Create a `doctype`.
	*
	* @param {HastDoctype} _
	*   Node to transform.
	* @param {State} state
	*   Info passed around about the current state.
	* @returns {DocumentType}
	*   DOM document type.
	*/
	function doctype(_, state) {
		return state.doc.implementation.createDocumentType("html", "", "");
	}
	/**
	* Create a `text`.
	*
	* @param {HastText} node
	*   Node to transform.
	* @param {State} state
	*   Info passed around about the current state.
	* @returns {Text}
	*   DOM text.
	*/
	function text(node, state) {
		return state.doc.createTextNode(node.value);
	}
	/**
	* Create a `comment`.
	*
	* @param {HastComment} node
	*   Node to transform.
	* @param {State} state
	*   Info passed around about the current state.
	* @returns {Comment}
	*   DOM comment.
	*/
	function comment(node, state) {
		return state.doc.createComment(node.value);
	}
	/**
	* Create an `element`.
	*
	* @param {HastElement} node
	*   Node to transform.
	* @param {State} state
	*   Info passed around about the current state.
	* @returns {Element}
	*   DOM element.
	*/
	function element(node, state) {
		let impliedNamespace = state.impliedNamespace || state.namespace;
		const tagName = node.tagName || (impliedNamespace === webNamespaces.svg ? "g" : "div");
		const properties = node.properties || {};
		const children = node.children || [];
		if ((impliedNamespace === void 0 || impliedNamespace === webNamespaces.html) && tagName === "svg") impliedNamespace = webNamespaces.svg;
		const result = impliedNamespace ? state.doc.createElementNS(impliedNamespace, tagName) : state.doc.createElement(tagName);
		addProperties(result, properties, impliedNamespace === webNamespaces.svg ? svg : html);
		const currentImpliedNamespace = state.impliedNamespace;
		state.impliedNamespace = impliedNamespace;
		appendAll(result, children, state);
		state.impliedNamespace = currentImpliedNamespace;
		return result;
	}
	/**
	* Add all properties.
	*
	* @param {Element} result
	*   Element.
	* @param {HastProperties} properties
	*   Properties from hast element.
	* @param {Schema} schema
	*   Schema from `property-information`.
	* @returns {undefined}
	*   Nothing.
	*/
	function addProperties(result, properties, schema) {
		/** @type {string} */
		let key;
		for (key in properties) if (own.call(properties, key)) {
			const info = find(schema, key);
			let value = properties[key];
			if (Array.isArray(value)) value = value.join(info.commaSeparated ? ", " : " ");
			if (info.mustUseProperty) result[info.property] = value;
			if (info.boolean || info.overloadedBoolean && typeof value === "boolean") {
				if (value) result.setAttribute(info.attribute, "");
			} else if (info.booleanish) result.setAttribute(info.attribute, String(value));
			else if (value === true) result.setAttribute(info.attribute, "");
			else if (value || value === 0 || value === "") result.setAttribute(info.attribute, String(value));
		}
	}
	/**
	* Add all children.
	*
	* @param {Document | DocumentFragment | Element} node
	*   DOM node to append to.
	* @param {Array<HastRootContent>} children
	*   hast children.
	* @param {State} state
	*   Info passed around about the current state.
	* @returns {undefined}
	*   Nothing.
	*/
	function appendAll(node, children, state) {
		let index = -1;
		while (++index < children.length) node.append(transform(children[index], state));
	}
	//#endregion
	//#region shared/animation/hastSanitizeSchema.js
	var import_cjs = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
		var isMergeableObject = function isMergeableObject(value) {
			return isNonNullObject(value) && !isSpecial(value);
		};
		function isNonNullObject(value) {
			return !!value && typeof value === "object";
		}
		function isSpecial(value) {
			var stringValue = Object.prototype.toString.call(value);
			return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
		}
		var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for ? Symbol.for("react.element") : 60103;
		function isReactElement(value) {
			return value.$$typeof === REACT_ELEMENT_TYPE;
		}
		function emptyTarget(val) {
			return Array.isArray(val) ? [] : {};
		}
		function cloneUnlessOtherwiseSpecified(value, options) {
			return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
		}
		function defaultArrayMerge(target, source, options) {
			return target.concat(source).map(function(element) {
				return cloneUnlessOtherwiseSpecified(element, options);
			});
		}
		function getMergeFunction(key, options) {
			if (!options.customMerge) return deepmerge;
			var customMerge = options.customMerge(key);
			return typeof customMerge === "function" ? customMerge : deepmerge;
		}
		function getEnumerableOwnPropertySymbols(target) {
			return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
				return Object.propertyIsEnumerable.call(target, symbol);
			}) : [];
		}
		function getKeys(target) {
			return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
		}
		function propertyIsOnObject(object, property) {
			try {
				return property in object;
			} catch (_) {
				return false;
			}
		}
		function propertyIsUnsafe(target, key) {
			return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
		}
		function mergeObject(target, source, options) {
			var destination = {};
			if (options.isMergeableObject(target)) getKeys(target).forEach(function(key) {
				destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
			});
			getKeys(source).forEach(function(key) {
				if (propertyIsUnsafe(target, key)) return;
				if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
				else destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
			});
			return destination;
		}
		function deepmerge(target, source, options) {
			options = options || {};
			options.arrayMerge = options.arrayMerge || defaultArrayMerge;
			options.isMergeableObject = options.isMergeableObject || isMergeableObject;
			options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
			var sourceIsArray = Array.isArray(source);
			if (!(sourceIsArray === Array.isArray(target))) return cloneUnlessOtherwiseSpecified(source, options);
			else if (sourceIsArray) return options.arrayMerge(target, source, options);
			else return mergeObject(target, source, options);
		}
		deepmerge.all = function deepmergeAll(array, options) {
			if (!Array.isArray(array)) throw new Error("first argument should be an array");
			return array.reduce(function(prev, next) {
				return deepmerge(prev, next, options);
			}, {});
		};
		module.exports = deepmerge;
	})))(), 1);
	var hastSanitizeSchema = (0, import_cjs.default)(defaultSchema, {
		attributes: { "*": [
			"className",
			"accentHeight",
			"accumulate",
			"additivive",
			"alignmentBaseline",
			"ascent",
			"attributeName",
			"attributeType",
			"azimuth",
			"baseFrequency",
			"baselineShift",
			"begin",
			"bias",
			"by",
			"clip",
			"clipPath",
			"clipRule",
			"color",
			"colorInterpolation",
			"colorInterpolationFilters",
			"colorProfile",
			"colorRendering",
			"cx",
			"cy",
			"d",
			"dx",
			"dy",
			"diffuseConstant",
			"direction",
			"display",
			"divisor",
			"dominantBaseline",
			"dur",
			"edgemode",
			"elevation",
			"end",
			"fill",
			"fillOpacity",
			"fillRule",
			"filter",
			"filterUnits",
			"floodColor",
			"floodOpacity",
			"fontFamily",
			"fontSize",
			"fontSizeAdjust",
			"fontStretch",
			"fontStyle",
			"fontVariant",
			"fontWeight",
			"fx",
			"fy",
			"g1",
			"g2",
			"glyphName",
			"glyphRef",
			"gradientUnits",
			"gradientTransform",
			"height",
			"href",
			"id",
			"imageRendering",
			"in",
			"in2",
			"k",
			"k1",
			"k2",
			"k3",
			"k4",
			"kerning",
			"keyPoints",
			"keySplines",
			"keyTimes",
			"lang",
			"lengthAdjust",
			"letterSpacing",
			"kernelMatrix",
			"kernelUnitLength",
			"lightingColor",
			"local",
			"markerEnd",
			"markerMid",
			"markerStart",
			"markerHeight",
			"markerUnits",
			"markerWidth",
			"maskContentUnits",
			"maskUnits",
			"max",
			"mask",
			"media",
			"method",
			"mode",
			"min",
			"name",
			"numOctaves",
			"offset",
			"operator",
			"opacity",
			"order",
			"orient",
			"orientation",
			"origin",
			"overflow",
			"paintOrder",
			"path",
			"pathLength",
			"patternContentUnits",
			"patternTransform",
			"patternUnits",
			"points",
			"preserveAlpha",
			"preserveAspectRatio",
			"r",
			"rx",
			"ry",
			"radius",
			"refX",
			"refY",
			"repeatCount",
			"repeatDur",
			"restart",
			"result",
			"rotate",
			"scale",
			"seed",
			"shapeRendering",
			"specularConstant",
			"specularExponent",
			"spreadmethod",
			"stdDeviation",
			"stitchTiles",
			"stopColor",
			"stopOpacity",
			"strokeDasharray",
			"strokeDashoffset",
			"strokeLinecap",
			"strokeLinejoin",
			"strokeMiterlimit",
			"strokeOpacity",
			"stroke",
			"strokeWidth",
			"style",
			"surfaceScale",
			"tabindex",
			"targetX",
			"targetY",
			"transform",
			"textAnchor",
			"textDecoration",
			"textRendering",
			"textLength",
			"type",
			"u1",
			"u2",
			"unicode",
			"values",
			"viewBox",
			"visibility",
			"vectorEffect",
			"vertAdvY",
			"vertOriginX",
			"vertOriginY",
			"width",
			"wordSpacing",
			"wrap",
			"writingMode",
			"xChannelSelector",
			"yChannelSelector",
			"x",
			"x1",
			"x2",
			"xmlns",
			"y",
			"y1",
			"y2",
			"z",
			"zoomAndPan"
		] },
		tagNames: [
			"svg",
			"altGlyph",
			"altGlyphDef",
			"altGlyphItem",
			"animateColor",
			"animateMotion",
			"animateTransform",
			"circle",
			"clipPath",
			"defs",
			"desc",
			"ellipse",
			"filter",
			"font",
			"g",
			"glyph",
			"glyphRef",
			"hkern",
			"image",
			"line",
			"linearGradient",
			"marker",
			"mask",
			"metadata",
			"mpath",
			"path",
			"pattern",
			"polygon",
			"polyline",
			"radialGradient",
			"rect",
			"stop",
			"switch",
			"symbol",
			"text",
			"textPath",
			"title",
			"tref",
			"tspan",
			"use",
			"view",
			"vkern",
			"feBlend",
			"feColorMatrix",
			"feComponentTransfer",
			"feComposite",
			"feConvolveMatrix",
			"feDiffuseLighting",
			"feDisplacementMap",
			"feDistantLight",
			"feFlood",
			"feFuncA",
			"feFuncB",
			"feFuncG",
			"feFuncR",
			"feGaussianBlur",
			"feMerge",
			"feMergeNode",
			"feMorphology",
			"feOffset",
			"fePointLight",
			"feSpecularLighting",
			"feSpotLight",
			"feTile",
			"feTurbulence"
		]
	});
	//#endregion
	//#region shared/animation/schemas/utils.js
	var InjectSchema = (type) => SourceMappedObjectSchema.extend({ inject: literalType(type) }).strict();
	var hasInSettings = (name, has) => (value, ctx) => {
		if (!has) {
			ctx.addIssue({
				code: ZodIssueCode.custom,
				message: `Used '${name}' inject while the corresponding setting is not defined in the animation\'s settings`,
				path: ["inject"]
			});
			return NEVER;
		}
		return value;
	};
	function InjectWithMeta(schema, { immediate = false, lazy = false, allowed = null } = {}) {
		if (Array.isArray(schema)) return schema;
		return [schema, {
			immediate,
			lazy,
			allowed
		}];
	}
	var buildSwitchSchema = (keys, value = Defined) => Object.fromEntries([].concat(keys).map((k) => [k.toString(), value]));
	function SwitchSchema(inject, valueList, options = {}) {
		const { currentValue, defaultValue, possibleValues, setting } = options;
		return (context) => {
			const get = (value) => typeof value === "function" ? value(context) : value;
			let values = get(valueList);
			let schema = InjectSchema(inject).extend(buildSwitchSchema(values, Defined.optional()));
			if (setting) schema = schema.transform(hasInSettings(inject, setting in context.settings));
			return schema.transform((params, ctx) => {
				params = clearSourceMap(params);
				if (get(possibleValues)) values = values.filter((v) => get(possibleValues).includes(v));
				else if (setting && context.settings[setting] !== true) values = values.filter((v) => context.settings[setting].includes(v));
				let value = get(currentValue) ?? (setting && context[setting]);
				if (!values.includes(value)) value = defaultValue;
				if (values.some((k) => k in params)) if (values.every((k) => k in params)) return params[value];
				else {
					ctx.addIssue({
						code: ZodIssueCode.custom,
						message: `All of the possible values must be defined in the '${inject}' inject when using switch mode. Missing keys: ${formatValuesList(values.filter((k) => !(k in params)))}`
					});
					return NEVER;
				}
				else return value;
			});
		};
	}
	function _queryElement(target, selector, multiple = false) {
		if (!target) return null;
		if (multiple) return Array.from(target.querySelectorAll(selector));
		return target.querySelector(selector);
	}
	function queryElement(ctx, target, selector, multiple = false) {
		try {
			const matched = _queryElement(target, selector, multiple);
			if (Array.isArray(matched) ? !matched.length : !matched) {
				ctx.addIssue({
					code: ZodIssueCode.custom,
					message: `Couldn't find any element${multiple ? "s" : ""} matching the selector: '${selector}'`
				});
				return NEVER;
			}
			return matched;
		} catch {
			ctx.addIssue({
				code: ZodIssueCode.custom,
				message: `Invalid selector: '${selector}'`
			});
			return NEVER;
		}
	}
	function ElementSchema(inject, element = null, allowDirect = true) {
		return InjectSchema(inject).extend({
			selector: allowDirect ? stringType().optional() : stringType(),
			multiple: booleanType().optional().default(false)
		}).transform(({ selector, multiple }, ctx) => selector != null ? queryElement(ctx, element, selector, multiple) : element);
	}
	var ValidateInjectableDeepSchema = lazyType(() => unionType([
		Literal,
		symbolType(),
		DOMElementSchema,
		SourceMapSchema,
		LazyInjectSchema,
		TrustedFunctionSchema,
		arrayType(ValidateInjectableDeepSchema),
		recordType(ValidateInjectableDeepSchema)
	]));
	var ParametersSchema = recordType(stringType(), anyType()).pipe(ValidateInjectableDeepSchema);
	var TargetSchema = (context, multiple = false) => unionType([stringType(), DOMElementSchema]).transform((target, ctx) => typeof target === "string" ? queryElement(ctx, context.wrapper, target, multiple) : target);
	var TargetsSchema = (context) => ArrayOrSingleSchema(ArrayOrSingleSchema(TargetSchema(context, true).nullable())).transform((targets) => [].concat(targets).flat().filter((t) => t != null)).refine((targets) => targets.length > 0, { message: "No targets specified" });
	//#endregion
	//#region shared/enums/Inject.js
	var Inject_default = Enum({
		Element: "element",
		Hast: "hast",
		Container: "container",
		Anchor: "anchor",
		Stagger: "stagger",
		UtilsRandom: "utils.random",
		UtilsGet: "utils.get",
		UtilsSet: "utils.set",
		SvgMorphTo: "svg.morphTo",
		SvgCreateDrawable: "svg.createDrawable",
		SvgCreateMotionPath: "svg.createMotionPath",
		Duration: "duration",
		Easing: "easing",
		Variant: "variant",
		Position: "position",
		Direction: "direction",
		Module: "module",
		ModuleType: "module.type",
		Type: "type",
		Assign: "assign",
		Pick: "pick",
		Omit: "omit",
		Wait: "wait",
		StringTemplate: "string.template",
		Math: "math",
		StyleRemoveProperty: "style.removeProperty",
		Undefined: "undefined",
		Function: "function",
		Arguments: "arguments",
		Debug: "debug",
		VarGet: "var.get",
		VarSet: "var.set",
		Call: "call",
		Mouse: "mouse",
		Rect: "rect",
		Window: "window",
		IsIntersected: "isIntersected",
		Get: "get",
		If: "if",
		Switch: "switch",
		Load: "load",
		Raw: "raw",
		Vector: "vector",
		Rotate: "rotate",
		MathAbs: "math.abs",
		MathAcos: "math.acos",
		MathAcosh: "math.acosh",
		MathAsin: "math.asin",
		MathAsinh: "math.asinh",
		MathAtan: "math.atan",
		MathAtan2: "math.atan2",
		MathAtanh: "math.atanh",
		MathCbrt: "math.cbrt",
		MathCeil: "math.ceil",
		MathClz32: "math.clz32",
		MathCos: "math.cos",
		MathCosh: "math.cosh",
		MathExp: "math.exp",
		MathExpm1: "math.expm1",
		MathFloor: "math.floor",
		MathFround: "math.fround",
		MathHypot: "math.hypot",
		MathImul: "math.imul",
		MathLog: "math.log",
		MathLog1p: "math.log1p",
		MathLog10: "math.log10",
		MathLog2: "math.log2",
		MathMax: "math.max",
		MathMin: "math.min",
		MathPow: "math.pow",
		MathRandom: "math.random",
		MathRound: "math.round",
		MathSign: "math.sign",
		MathSin: "math.sin",
		MathSinh: "math.sinh",
		MathSqrt: "math.sqrt",
		MathTan: "math.tan",
		MathTanh: "math.tanh",
		MathTrunc: "math.trunc",
		MathE: "math.E",
		MathLN10: "math.LN10",
		MathLN2: "math.LN2",
		MathLOG10E: "math.LOG10E",
		MathLOG2E: "math.LOG2E",
		MathPI: "math.PI",
		MathSQRT1_2: "math.SQRT1_2",
		MathSQRT2: "math.SQRT2",
		AdditionOperator: "+",
		DivisionOperator: "/",
		EqualityOperator: "==",
		GreaterThanOperator: ">",
		GreaterThanOrEqualOperator: ">=",
		InOperator: "in",
		InequalityOperator: "!=",
		LessThanOperator: "<",
		LessThanOrEqualOperator: "<=",
		LogicalAndOperator: "&&",
		LogicalNotOperator: "!",
		LogicalOrOperator: "||",
		MultiplicationOperator: "*",
		NullishCoalescingOperator: "??",
		RemainderOperator: "%",
		StrictEqualityOperator: "===",
		StrictInequalityOperator: "!==",
		SubtractionOperator: "-",
		Includes: "includes",
		Accordion: "accordion",
		Snippet: "snippet",
		SnippetParams: "snippet.params"
	});
	//#endregion
	//#region shared/enums/AnimationType.js
	var AnimationType_default = Enum({
		Enter: "enter",
		Exit: "exit"
	});
	//#endregion
	//#region shared/enums/ModuleKey.js
	var ModuleKeyAlias = Enum({
		Switch: "switch",
		Reveal: "reveal",
		Sidebars: "sidebars"
	});
	var ModuleKey_default = Enum({
		Servers: "servers",
		Channels: "channels",
		Settings: "settings",
		Popouts: "popouts",
		Tooltips: "tooltips",
		ContextMenu: "contextMenu",
		Messages: "messages",
		ChannelList: "channelList",
		Modals: "modals",
		ModalsBackdrop: "modalsBackdrop",
		Layers: "layers",
		MembersSidebar: "membersSidebar",
		ThreadSidebar: "threadSidebar",
		ThreadSidebarSwitch: "threadSidebarSwitch"
	});
	//#endregion
	//#region shared/animation/debug.js
	var Debug = class Debug {
		constructor({ animation, animationType }) {
			this.animation = animation;
			this.animationType = animationType;
		}
		static animation(animation, type) {
			return new Debug({
				animation,
				animationType: type
			});
		}
		get isEnabled() {
			if (this.animation) return [true, this.animationType].includes(this.animation.debug);
			return false;
		}
		__log(type, message, ...data) {
			if (this.animation) return Logger.stylized("Animation", type, `%c${this.animation.key} (${this.animationType}) %c[DEBUG]%c ` + message, "color: #B8AF5E;", "color: #6BA6FF;", "", ...data);
			return Logger[type]("Debug", message, ...data);
		}
		_log(message, ...data) {
			return this.__log("log", message, ...data);
		}
		_warn(message, ...data) {
			return this.__log("warn", message, ...data);
		}
		_error(message, ...data) {
			return this.__log("error", message, ...data);
		}
		_groupCollapsed(message, ...data) {
			return this.__log("groupCollapsed", message, ...data);
		}
		_groupEnd() {
			return Logger.groupEnd();
		}
		_system(event, message = null, meta = {}, type = "log") {
			return this[`_${type}`](`%c${event}%c` + (message ? `: ${message}` : ""), "font-weight: bold;", "", ...Object.entries(meta).flatMap(([key, value]) => [`\n↪ ${capitalize(key)}:`, value]));
		}
		_visualized(event, name, path, context, meta = {}, options = {}) {
			const { type, visPath = path, ...visOptions } = options;
			const visualized = visualizeAddonPath(context.pack, visPath, visOptions);
			return this._system(event, `'${name}' at "${toPath(path)}"` + (visualized ? "\n" + visualized : ""), meta, type);
		}
		_inject(event, name, path, context, meta = {}, options = {}) {
			return this._visualized(event, name, path, context, meta, {
				visPath: path.concat("inject"),
				...options
			});
		}
		debug(name, path, context, data) {
			return this._inject("Debug", name, path, context, {
				context: snapshotContext(context),
				data: sanitizeInjectable(data)
			});
		}
		invalidSelector(selector, path, context) {
			return this._visualized("Invalid selector", selector, path, context, { context: snapshotContext(context) }, {
				type: "warn",
				pointAt: "key"
			});
		}
		inject(name, path, context, received, output = void 0) {
			if (!this.isEnabled) return () => {};
			const contextSnapshot = snapshotContext(context);
			const report = (output) => this._inject("Inject parsed", name, path, context, {
				context: contextSnapshot,
				received: sanitizeInjectable(received),
				output: sanitizeInjectable(output)
			});
			return output ? report(output) : report;
		}
		lazyInjectCall(name, path, args, context) {
			if (!this.isEnabled) return;
			this._system("Lazy inject call", `'${name}' at "${toPath(path)}"`, {}, "groupCollapsed");
			this._inject("Lazy inject called", name, path, context, {
				context: snapshotContext(context),
				arguments: args
			});
			return () => this._groupEnd();
		}
		initializeStart(received, context) {
			if (!this.isEnabled) return;
			this._system("Initialize", null, {}, "groupCollapsed");
			this._system("Initialize started", null, {
				context: snapshotContext(context),
				received: sanitizeInjectable(received)
			});
			return () => this._groupEnd();
		}
		initializeEnd(result, context) {
			if (!this.isEnabled) return;
			return this._system("Initialize completed", null, {
				context: snapshotContext(context),
				result: sanitizeInjectable(result)
			});
		}
		parseStart(stage, received, context) {
			if (!this.isEnabled) return;
			this._system("Parsing stage", stage, {}, "groupCollapsed");
			this._system("Parsing started", stage, {
				context: snapshotContext(context),
				received: sanitizeInjectable(received)
			});
			return () => this._groupEnd();
		}
		parseEnd(stage, result, context) {
			if (!this.isEnabled) return;
			return this._system("Parsing completed", stage, {
				context: snapshotContext(context),
				result: sanitizeInjectable(result)
			});
		}
		hook(name, context) {
			if (!this.isEnabled) return;
			return this._system("Hook triggered", name, { context: snapshotContext(context) });
		}
	};
	//#endregion
	//#region shared/animation/keys.js
	var forbiddenKeys = [
		...reservedKeys$1,
		"toString",
		"valueOf"
	];
	var reservedKeys = [...forbiddenKeys, "inject"];
	function restrictKeys(keys) {
		return (value) => !keys.includes(value);
	}
	var restrictForbiddenKeys = restrictKeys(forbiddenKeys);
	var restrictReservedKeys = restrictKeys(reservedKeys);
	//#endregion
	//#region shared/enums/Position.js
	var Position_default = Enum({
		TopLeft: "top left",
		Top: "top",
		TopRight: "top right",
		Left: "left",
		Center: "center",
		Right: "right",
		BottomLeft: "bottom left",
		Bottom: "bottom",
		BottomRight: "bottom right"
	});
	//#endregion
	//#region shared/enums/Direction.js
	var Direction_default = Enum({
		Upwards: "upwards",
		Downwards: "downwards",
		Leftwards: "leftwards",
		Rightwards: "rightwards",
		Forwards: "forwards",
		Backwards: "backwards"
	});
	//#endregion
	//#region shared/utils/position.js
	function getRect(el, parent = null) {
		if (!parent) {
			const { x, y, left, top, right, bottom, width, height } = el.getBoundingClientRect();
			return {
				x,
				y,
				left,
				top,
				right,
				bottom,
				width,
				height
			};
		}
		const { offsetWidth: width, offsetHeight: height } = el;
		let x = 0, y = 0, current = el;
		while (current != null && current !== parent) {
			x += current.offsetLeft;
			y += current.offsetTop;
			current = current.offsetParent;
		}
		return {
			x,
			y,
			left: x,
			top: y,
			right: x + width,
			bottom: y + height,
			width,
			height
		};
	}
	function reversePosition(position) {
		switch (position) {
			case Position_default.Top: return Position_default.Bottom;
			case Position_default.Bottom: return Position_default.Top;
			case Position_default.Left: return Position_default.Right;
			case Position_default.Right: return Position_default.Left;
			case Position_default.Center: return Position_default.Center;
		}
	}
	function getPosition(position, align = Position_default.Center) {
		if (position === Position_default.Center) return Position_default.Center;
		if (align === Position_default.Center) return position;
		const pair = [position, align];
		const equals = (a, b) => [a, b].every((p) => pair.includes(p));
		if (equals(Position_default.Top, Position_default.Right)) return Position_default.TopRight;
		if (equals(Position_default.Top, Position_default.Left)) return Position_default.TopLeft;
		if (equals(Position_default.Bottom, Position_default.Right)) return Position_default.BottomRight;
		if (equals(Position_default.Bottom, Position_default.Left)) return Position_default.BottomLeft;
	}
	function toDirection(position) {
		switch (position) {
			case Position_default.Top: return Direction_default.Upwards;
			case Position_default.Bottom: return Direction_default.Downwards;
			case Position_default.Left: return Direction_default.Leftwards;
			case Position_default.Right: return Direction_default.Rightwards;
			case Position_default.Center: return Direction_default.Backwards;
		}
	}
	function toPercent(value, rect) {
		if (typeof value === "string") switch (value) {
			case Position_default.TopLeft: return [0, 0];
			case Position_default.Top: return [.5, 0];
			case Position_default.TopRight: return [1, 0];
			case Position_default.Left: return [0, .5];
			case Position_default.Center: return [.5, .5];
			case Position_default.Right: return [1, .5];
			case Position_default.BottomLeft: return [0, 1];
			case Position_default.Bottom: return [.5, 1];
			case Position_default.BottomRight: return [1, 1];
		}
		const [x, y] = value;
		return [x / rect.width, y / rect.height];
	}
	function toPx(value, rect) {
		const [x, y] = typeof value === "string" ? toPercent(value, rect) : value;
		return [x * rect.width, y * rect.height];
	}
	function toUnit(value, unit, rect = void 0) {
		switch (unit) {
			case "px": return toPx(value, rect);
			case "%": return toPercent(value, rect);
		}
	}
	function getCenter(rect, unit = "px", relative = {
		x: 0,
		y: 0
	}) {
		const [x, y] = [rect.x + rect.width / 2 - relative.x, rect.y + rect.height / 2 - relative.y];
		if (unit === "%") return toPercent([x, y], relative);
		return [x, y];
	}
	//#endregion
	//#region shared/animation/schemas/injects/general.js
	var general_exports = /* @__PURE__ */ __exportAll({
		AnchorInjectSchema: () => AnchorInjectSchema,
		ArgumentsInjectSchema: () => ArgumentsInjectSchema,
		CallInjectSchema: () => CallInjectSchema,
		ContainerInjectSchema: () => ContainerInjectSchema,
		DebugInjectSchema: () => DebugInjectSchema,
		ElementInjectSchema: () => ElementInjectSchema,
		FunctionInjectSchema: () => FunctionInjectSchema,
		GetInjectSchema: () => GetInjectSchema,
		HastInjectSchema: () => HastInjectSchema,
		IfInjectSchema: () => IfInjectSchema,
		IsIntersectedInjectSchema: () => IsIntersectedInjectSchema,
		LoadInjectSchema: () => LoadInjectSchema,
		ModuleInjectSchema: () => ModuleInjectSchema,
		ModuleTypeInjectSchema: () => ModuleTypeInjectSchema,
		MouseInjectSchema: () => MouseInjectSchema,
		RawInjectBaseSchema: () => RawInjectBaseSchema,
		RawInjectSchema: () => RawInjectSchema,
		RectInjectSchema: () => RectInjectSchema,
		RotateInjectSchema: () => RotateInjectSchema,
		StringTemplateInjectSchema: () => StringTemplateInjectSchema,
		StyleRemovePropertyInjectSchema: () => StyleRemovePropertyInjectSchema,
		SwitchInjectSchema: () => SwitchInjectSchema,
		TypeInjectSchema: () => TypeInjectSchema,
		UndefinedInjectSchema: () => UndefinedInjectSchema,
		VarGetInjectSchema: () => VarGetInjectSchema,
		VarSetInjectSchema: () => VarSetInjectSchema,
		VectorInjectSchema: () => VectorInjectSchema,
		WindowInjectSchema: () => WindowInjectSchema
	});
	var ElementInjectSchema = ({ element }) => InjectSchema(Inject_default.Element).transform(() => element);
	var ContainerInjectSchema = ({ container }) => InjectSchema(Inject_default.Container).transform(() => container);
	var AnchorInjectSchema = ({ anchor }) => InjectSchema(Inject_default.Anchor).transform(() => isElement(anchor) ? anchor : void 0);
	var HastInjectSchema = ({ wrapper }) => ElementSchema(Inject_default.Hast, wrapper, false);
	var ModuleInjectSchema = InjectWithMeta(SwitchSchema(Inject_default.Module, ModuleKey_default.values(), {
		currentValue: (ctx) => ctx.module.id,
		possibleValues: (ctx) => Array.from(ctx.animation.modules)
	}), { immediate: ["module"] });
	var ModuleTypeInjectSchema = InjectWithMeta(SwitchSchema(Inject_default.ModuleType, ModuleType_default.values(), { currentValue: (ctx) => ctx.module.type }), { immediate: ["module"] });
	var TypeInjectSchema = InjectWithMeta(SwitchSchema(Inject_default.Type, AnimationType_default.values(), { currentValue: (ctx) => ctx.type }), { immediate: ["type"] });
	var StringTemplateInjectSchema = InjectSchema(Inject_default.StringTemplate).extend({
		template: stringType(),
		values: unionType([recordType(anyType()), anyType().array()])
	}).transform(zodTransformErrorBoundary(({ template, values }) => {
		values = clearSourceMap(values);
		return template.replaceAll(/\${([^\${}\s]+)}/g, (_, key) => String(values[Array.isArray(values) ? +key : key]) ?? "");
	}));
	var StyleRemovePropertyInjectSchema = InjectWithMeta((context) => InjectSchema(Inject_default.StyleRemoveProperty).extend({
		targets: TargetsSchema(context).optional().default([context.element]),
		property: ArrayOrSingleSchema(stringType())
	}).transform(({ targets, property }) => targets.forEach((e) => [].concat(property).forEach((p) => e.style.removeProperty(p)))), { lazy: true });
	var UndefinedInjectSchema = InjectWithMeta(InjectSchema(Inject_default.Undefined).transform(() => void 0), { immediate: true });
	var FunctionInjectSchema = InjectWithMeta((context, { args }) => InjectSchema(Inject_default.Function).extend({
		functions: ArrayOrSingleSchema(TrustedFunctionSchema).optional(),
		"return": anyType().optional()
	}).transform(zodTransformErrorBoundary(({ functions, "return": returnValue }) => {
		const functionReturnValues = [].concat(functions).map((f) => f?.(...args));
		return clearSourceMapDeep(returnValue === void 0 ? functionReturnValues.pop() : returnValue);
	})), { lazy: true });
	var ArgumentsInjectSchema = (context, { args }) => InjectSchema(Inject_default.Arguments).extend({ index: numberType().optional() }).transform(({ index }) => index == null ? args : args[index]);
	var DebugInjectSchema = InjectWithMeta((context) => InjectSchema(Inject_default.Debug).extend({ data: anyType().optional() }).transform((value) => Debug.animation(context.animation, context.type).debug(Inject_default.Debug, getSourcePath(value, SELF_KEY), context, value.data)), { lazy: true });
	var VarSetInjectSchema = InjectWithMeta(({ vars }) => InjectSchema(Inject_default.VarSet).extend({
		name: stringType().refine(restrictForbiddenKeys, (name) => ({ message: `Forbidden variable name: '${name}'` })),
		value: anyType()
	}).transform(({ name, value }) => {
		vars[name] = value;
	}), { lazy: true });
	var VarGetInjectSchema = ({ vars }) => InjectSchema(Inject_default.VarGet).extend({ name: stringType().refine(restrictForbiddenKeys, (name) => ({ message: `Forbidden variable name: '${name}'` })) }).transform(({ name }) => vars[name]);
	var CallInjectSchema = InjectSchema(Inject_default.Call).extend({
		function: TrustedFunctionSchema,
		arguments: ArrayOrSingleSchema(anyType()).optional()
	}).transform(zodTransformErrorBoundary(({ function: fn, arguments: args }) => fn(...[].concat(clearSourceMapDeep(args)))));
	var RectInjectSchema = (context) => InjectSchema(Inject_default.Rect).extend({
		target: TargetSchema(context).optional(),
		value: enumType([
			"x",
			"y",
			"top",
			"left",
			"right",
			"bottom",
			"width",
			"height"
		]).optional()
	}).transform(({ target, value }) => {
		const rect = target ? getRect(target, context.viewport) : context.containerRect;
		return value ? rect[value] : rect;
	});
	var WindowInjectSchema = ({ viewport, window }) => InjectSchema(Inject_default.Window).extend({ value: enumType(["width", "height"]) }).transform(({ value }) => {
		switch (value) {
			case "width": return viewport?.offsetWidth ?? window.innerWidth;
			case "height": return viewport?.offsetHeight ?? window.innerHeight;
		}
	});
	var MouseInjectSchema = ({ containerRect, mouse }) => InjectSchema(Inject_default.Mouse).extend({
		value: enumType(["x", "y"]).optional(),
		absolute: booleanType().optional().default(false)
	}).transform(({ value, absolute }) => {
		const { x, y } = (() => {
			if (absolute || !containerRect) return {
				x: mouse.x,
				y: mouse.y
			};
			const { left, top } = containerRect;
			return {
				x: mouse.x - left,
				y: mouse.y - top
			};
		})();
		switch (value) {
			case "x": return x;
			case "y": return y;
			default: return `${x}px ${y}px`;
		}
	});
	var IsIntersectedInjectSchema = SwitchSchema(Inject_default.IsIntersected, [true, false], { currentValue: (ctx) => !!ctx.isIntersected });
	var GetInjectSchema = InjectSchema(Inject_default.Get).extend({
		target: unionType([recordType(anyType()), arrayType(anyType())]),
		key: unionType([stringType(), numberType()]).refine(restrictForbiddenKeys, (key) => ({ message: `Forbidden key: '${key}'` })).optional(),
		path: stringType().startsWith("/", "JSON Pointer must begin with `/`").superRefine((path, ctx) => {
			if (!path.startsWith("/")) return;
			path = parsePath(path);
			const index = path.findIndex((i) => !restrictForbiddenKeys(i));
			if (index === -1) return;
			ctx.addIssue({
				code: ZodIssueCode.custom,
				message: `Forbidden key '${path[index]}' at index ${index} in JSON Pointer`
			});
		}).optional()
	}).transform(({ target, key, path }) => {
		if (key != null) return target[key];
		if (path != null) return getPath$1(target, path);
		return target;
	});
	var IfInjectSchema = InjectSchema(Inject_default.If).extend({
		value: anyType(),
		then: anyType(),
		else: anyType().optional()
	}).transform(({ value, then, else: elseValue }) => value ? then : elseValue);
	var SwitchInjectSchema = InjectSchema(Inject_default.Switch).extend({
		value: anyType(),
		case: unionType([recordType(anyType()), tupleType([anyType(), anyType()]).array()]),
		default: anyType().optional()
	}).transform(({ value, case: cases, default: defaultValue }) => {
		cases = clearSourceMap(cases);
		return new Map(Array.isArray(cases) ? cases : Object.entries(cases)).get(value) ?? defaultValue;
	});
	var LoadInjectSchema = ({ pack, animation, type }) => InjectSchema(Inject_default.Load).extend({
		animation: enumType(pack.animations.map((a) => a.key).filter((k) => k !== animation.key)),
		type: enumType(AnimationType_default.values()).optional().default(type)
	}).transform(({ animation: key, type }) => {
		const target = pack.animations.find((a) => a.key === key);
		return target?.[type] ?? target?.animate;
	});
	var RawInjectBaseSchema = InjectSchema(Inject_default.Raw).extend({ value: anyType() });
	var RawInjectSchema = RawInjectBaseSchema.transform(({ value }) => value);
	var ValueSchema = ArrayOrSingleSchema(unionType([numberType(), stringType()])).optional().default(0).transform((value) => [].concat(value));
	var VectorInjectSchema = InjectSchema(Inject_default.Vector).extend({
		values: SourceMappedObjectSchema.extend({
			x: ValueSchema,
			y: ValueSchema,
			z: ValueSchema
		}).strict(),
		unit: unionType([stringType(), nullType()]).optional().default("px")
	}).transform(({ values: { x, y, z }, unit }) => {
		const amount = Math.max(1, ...[
			x,
			y,
			z
		].map((v) => v.length));
		const keyframes = Array(amount).fill(null).map((_, i) => [
			x,
			y,
			z
		].map((values) => {
			const value = values[i] ?? 0;
			return typeof value === "number" && value !== 0 ? value + (unit ?? "") : String(value);
		}).join(" "));
		return amount === 1 ? keyframes[0] : keyframes;
	});
	var RotateInjectSchema = InjectSchema(Inject_default.Rotate).extend({
		axis: unionType([
			literalType("x"),
			literalType("y"),
			literalType("z")
		]),
		angle: ValueSchema,
		unit: unionType([stringType(), nullType()]).optional().default("deg")
	}).transform(({ axis, angle, unit }) => {
		if (!angle.length) return axis + " 0";
		const keyframes = angle.map((value) => axis + " " + (typeof value === "number" && value !== 0 ? value + (unit ?? "") : String(value)));
		return keyframes.length === 1 ? keyframes[0] : keyframes;
	});
	//#endregion
	//#region shared/animation/schemas/injects/object.js
	var object_exports = /* @__PURE__ */ __exportAll({
		AssignInjectSchema: () => AssignInjectSchema,
		OmitInjectSchema: () => OmitInjectSchema,
		PickInjectSchema: () => PickInjectSchema
	});
	var AssignInjectSchema = InjectSchema(Inject_default.Assign).extend({
		target: recordType(anyType()),
		source: ArrayOrSingleSchema(recordType(anyType()))
	}).transform(({ target, source }) => sourceMappedObjectAssign(target, ...[].concat(source)));
	var PickInjectSchema = InjectSchema(Inject_default.Pick).extend({
		target: recordType(anyType()),
		keys: ArrayOrSingleSchema(stringType().refine(restrictForbiddenKeys, (key) => ({ message: `Forbidden key: '${key}'` })))
	}).transform(({ target, keys }) => sourceMappedPick(target, [].concat(keys)));
	var OmitInjectSchema = InjectSchema(Inject_default.Omit).extend({
		target: recordType(anyType()),
		keys: ArrayOrSingleSchema(stringType().refine(restrictForbiddenKeys, (key) => ({ message: `Forbidden key: '${key}'` })))
	}).transform(({ target, keys }) => sourceMappedOmit(target, [].concat(keys)));
	//#endregion
	//#region shared/animation/schemas/injects/array.js
	var array_exports = /* @__PURE__ */ __exportAll({ IncludesInjectSchema: () => IncludesInjectSchema });
	var ArrayInjectBaseSchema = (inject) => InjectSchema(inject).extend({ target: arrayType(anyType()) });
	var IncludesInjectSchema = ArrayInjectBaseSchema(Inject_default.Includes).extend({ value: anyType() }).transform(({ target, value }) => target.includes(value));
	//#endregion
	//#region shared/animation/schemas/injects/anime.js
	var anime_exports = /* @__PURE__ */ __exportAll({
		StaggerInjectSchema: () => StaggerInjectSchema,
		SvgCreateDrawableInjectSchema: () => SvgCreateDrawableInjectSchema,
		SvgCreateMotionPathInjectSchema: () => SvgCreateMotionPathInjectSchema,
		SvgMorphToInjectSchema: () => SvgMorphToInjectSchema,
		UtilsGetInjectSchema: () => UtilsGetInjectSchema,
		UtilsRandomInjectSchema: () => UtilsRandomInjectSchema,
		UtilsSetInjectSchema: () => UtilsSetInjectSchema
	});
	var StaggerValueSchema = unionType([numberType(), stringType()]);
	var StaggerInjectSchema = (context) => InjectSchema(Inject_default.Stagger).extend({
		value: unionType([StaggerValueSchema, tupleType([StaggerValueSchema, StaggerValueSchema])]),
		parameters: ParametersSchema.optional()
	}).transform(zodTransformErrorBoundary(({ value, parameters }, { path }) => {
		value = clearSourceMapDeep(value);
		parameters = clearSourceMapDeep(parameters);
		return zodErrorBoundary(stagger(value, parameters), context, {
			path,
			name: "stagger"
		});
	}));
	var UtilsRandomInjectSchema = InjectSchema(Inject_default.UtilsRandom).extend({
		min: numberType(),
		max: numberType(),
		decimalLength: numberType().optional()
	}).transform(zodTransformErrorBoundary(({ min, max, decimalLength }) => utils.random(min, max, decimalLength)));
	var UtilsGetInjectSchema = (context) => InjectSchema(Inject_default.UtilsGet).extend({
		target: TargetSchema(context).optional().default(context.element),
		property: stringType(),
		unit: unionType([stringType(), booleanType()]).optional()
	}).transform(zodTransformErrorBoundary(({ target, property, unit }) => utils.get(target, property, unit)));
	var UtilsSetInjectSchema = InjectWithMeta((context) => InjectSchema(Inject_default.UtilsSet).extend({
		targets: TargetsSchema(context).optional().default([context.element]),
		properties: ParametersSchema
	}).transform(zodTransformErrorBoundary(({ targets, properties }, { path }) => {
		const instance = utils.set(targets, clearSourceMapDeep(properties));
		return zodErrorBoundary(instance.revert.bind(instance), context, {
			path,
			name: "revert"
		});
	})), { lazy: true });
	var SvgMorphToInjectSchema = (context) => InjectSchema(Inject_default.SvgMorphTo).extend({
		target: TargetSchema(context),
		precision: numberType().min(0).max(1).optional()
	}).transform(zodTransformErrorBoundary(({ target, precision }, { path }) => zodErrorBoundary(svg$2.morphTo(target, precision), context, {
		path,
		name: "svg.morphTo"
	})));
	var SvgCreateDrawableInjectSchema = (context) => InjectSchema(Inject_default.SvgCreateDrawable).extend({ targets: TargetsSchema(context) }).transform(zodTransformErrorBoundary(({ targets }) => targets.flatMap((target) => svg$2.createDrawable(target))));
	var SvgCreateMotionPathInjectSchema = (context) => InjectSchema(Inject_default.SvgCreateMotionPath).extend({ target: TargetSchema(context) }).transform(zodTransformErrorBoundary(({ target }, { path }) => {
		const { translateX, translateY, rotate } = svg$2.createMotionPath(target);
		const boundary = (fn) => zodErrorBoundary(fn, context, {
			path,
			name: "svg.createMotionPath"
		});
		return {
			translateX: boundary(translateX),
			translateY: boundary(translateY),
			rotate: boundary(rotate)
		};
	}));
	//#endregion
	//#region shared/enums/AnimationSetting.js
	var AnimationSetting_default = Enum({
		Duration: "duration",
		Easing: "easing",
		Variant: "variant",
		Position: "position",
		PositionPreserve: "positionPreserve",
		Direction: "direction",
		DirectionAxis: "directionAxis",
		DirectionReverse: "directionReverse",
		DirectionTowards: "directionTowards",
		Overflow: "overflow"
	});
	//#endregion
	//#region shared/enums/Easing.js
	var EasingType = Enum({
		Linear: "linear",
		Ease: "ease",
		Back: "back",
		Elastic: "elastic",
		Steps: "steps"
	});
	var EasingBezier = Enum({
		In: "in",
		Out: "out",
		InOut: "inOut"
	});
	var EasingStyle = Enum({
		Sine: "sine",
		Quad: "quad",
		Cubic: "cubic",
		Quart: "quart",
		Quint: "quint",
		Circ: "circ",
		Expo: "expo",
		Bounce: "bounce"
	});
	//#endregion
	//#region shared/data/easings.js
	var easingTypes = [
		{
			value: EasingType.Linear,
			label: "Linear"
		},
		{
			value: EasingType.Ease,
			label: "Ease"
		},
		{
			value: EasingType.Back,
			label: "Back"
		},
		{
			value: EasingType.Elastic,
			label: "Elastic"
		},
		{
			value: EasingType.Steps,
			label: "Steps"
		}
	];
	var easingBeziers = [
		{
			value: EasingBezier.In,
			label: "In"
		},
		{
			value: EasingBezier.Out,
			label: "Out"
		},
		{
			value: EasingBezier.InOut,
			label: "In Out"
		}
	];
	var easingStyles = [
		{
			value: EasingStyle.Sine,
			label: "Sine"
		},
		{
			value: EasingStyle.Quad,
			label: "Quad"
		},
		{
			value: EasingStyle.Cubic,
			label: "Cubic"
		},
		{
			value: EasingStyle.Quart,
			label: "Quart"
		},
		{
			value: EasingStyle.Quint,
			label: "Quint"
		},
		{
			value: EasingStyle.Circ,
			label: "Circ"
		},
		{
			value: EasingStyle.Expo,
			label: "Expo"
		},
		{
			value: EasingStyle.Bounce,
			label: "Bounce"
		}
	];
	var easingValues = {
		[EasingType.Back]: { overshoot: {
			min: 1,
			max: 10,
			default: 1.7,
			fractionDigits: 2
		} },
		[EasingType.Elastic]: {
			amplitude: {
				min: 1,
				max: 10,
				default: 1,
				fractionDigits: 2
			},
			period: {
				min: .1,
				max: 2,
				default: .5,
				fractionDigits: 2
			}
		},
		[EasingType.Steps]: { amount: {
			min: 1,
			max: 100,
			default: 10
		} }
	};
	//#endregion
	//#region shared/animation/schemas/EasingSchema.js
	var EasingBaseSchema = (type) => SourceMappedObjectSchema.extend({ type: literalType(type) }).strict();
	var EasingValueSchema = (options) => {
		let schema = numberType();
		if (!options.fractionDigits) schema = schema.int();
		if ("min" in options) schema = schema.min(options.min);
		if ("max" in options) schema = schema.max(options.max);
		schema = schema.optional();
		if ("default" in options) schema = schema.default(options.default);
		return schema;
	};
	var EasingSchema = discriminatedUnionType("type", [
		EasingBaseSchema(EasingType.Linear),
		EasingBaseSchema(EasingType.Ease).extend({
			bezier: enumType(EasingBezier.values()).optional().default(EasingBezier.InOut),
			style: enumType(EasingStyle.values()).optional().default(EasingStyle.Sine)
		}),
		EasingBaseSchema(EasingType.Back).extend({
			bezier: enumType(EasingBezier.values()).optional().default(EasingBezier.Out),
			overshoot: EasingValueSchema(easingValues[EasingType.Back]["overshoot"])
		}),
		EasingBaseSchema(EasingType.Elastic).extend({
			bezier: enumType(EasingBezier.values()).optional().default(EasingBezier.Out),
			amplitude: EasingValueSchema(easingValues[EasingType.Elastic]["amplitude"]),
			period: EasingValueSchema(easingValues[EasingType.Elastic]["period"])
		}),
		EasingBaseSchema(EasingType.Steps).extend({ amount: EasingValueSchema(easingValues[EasingType.Steps]["amount"]) })
	]);
	//#endregion
	//#region shared/utils/easings.js
	function getEasingFn(easing) {
		switch (easing.type) {
			case EasingType.Linear: return eases.linear();
			case EasingType.Ease: return eases[`${easing.bezier}${capitalize(easing.style)}`];
			case EasingType.Back: return eases[`${easing.bezier}Back`](easing.overshoot);
			case EasingType.Elastic: return eases[`${easing.bezier}Elastic`](easing.amplitude, easing.period);
			case EasingType.Steps: return eases.steps(easing.amount);
		}
	}
	//#endregion
	//#region shared/animation/schemas/injects/settings.js
	var settings_exports = /* @__PURE__ */ __exportAll({
		DirectionInjectSchema: () => DirectionInjectSchema,
		DurationInjectSchema: () => DurationInjectSchema,
		EasingInjectSchema: () => EasingInjectSchema,
		PositionInjectSchema: () => PositionInjectSchema,
		VariantInjectSchema: () => VariantInjectSchema
	});
	var DurationInjectSchema = InjectWithMeta(({ duration, settings }) => InjectSchema(Inject_default.Duration).transform(hasInSettings(Inject_default.Duration, AnimationSetting_default.Duration in settings)).transform(() => duration), { immediate: [AnimationSetting_default.Duration, "settings"] });
	var EasingInjectSchema = (context) => InjectSchema(Inject_default.Easing).extend({
		easing: AnimationSetting_default.Easing in context.settings ? EasingSchema.optional().default(context.easing) : EasingSchema,
		raw: booleanType().optional().default(false)
	}).transform(({ easing, raw }, { path }) => raw ? easing : zodErrorBoundary(getEasingFn(easing), context, {
		path,
		name: "easing"
	}));
	var PositionInjectSchema = (context) => {
		if (context.settings?.[AnimationSetting_default.Position] !== true) return SwitchSchema(Inject_default.Position, Position_default.values(), {
			defaultValue: Position_default.Center,
			setting: AnimationSetting_default.Position
		})({
			...context,
			position: context.position?.isAuto ? context.position.value : context.position
		});
		return InjectSchema(Inject_default.Position).extend({
			value: enumType(["x", "y"]).optional(),
			unit: enumType(["px", "%"]).optional().default("px"),
			clip: booleanType().optional().default(true)
		}).transform(({ value, unit, clip }) => {
			const { position, containerRect, anchorRect } = context;
			let [x, y] = (() => {
				if (!position?.isAuto) return toUnit(position, unit, containerRect);
				if (anchorRect) return getCenter(anchorRect, unit, containerRect);
				if (position.value) return toUnit(position.value, unit, containerRect);
				const mouse = [position.mouse.x - containerRect.x, position.mouse.y - containerRect.y];
				if (unit === "%") return toPercent(mouse, containerRect);
				return mouse;
			})();
			if (clip) switch (unit) {
				case "%":
					[x, y] = [x, y].map((v) => Math.min(1, Math.max(0, v)));
					break;
				case "px":
					[x, y] = [Math.min(containerRect.width, Math.max(0, x)), Math.min(containerRect.height, Math.max(0, y))];
					break;
			}
			switch (value) {
				case "x": return x;
				case "y": return y;
				default: switch (unit) {
					case "%": return `${x * 100}% ${y * 100}%`;
					default: return `${x}px ${y}px`;
				}
			}
		});
	};
	var DirectionInjectSchema = InjectWithMeta(SwitchSchema(Inject_default.Direction, Direction_default.values(), {
		defaultValue: Direction_default.Rightwards,
		setting: AnimationSetting_default.Direction
	}), { immediate: [AnimationSetting_default.Direction, "settings"] });
	var getVariantKeys = (context) => context.settings?.[AnimationSetting_default.Variant]?.map((v) => v.key) ?? [];
	var VariantInjectSchema = InjectWithMeta(SwitchSchema(Inject_default.Variant, getVariantKeys, {
		setting: AnimationSetting_default.Variant,
		possibleValues: getVariantKeys
	}), { immediate: [AnimationSetting_default.Variant, "settings"] });
	//#endregion
	//#region node_modules/.pnpm/@emmetio+scanner@1.0.4/node_modules/@emmetio/scanner/scanner.js
	/**
	* Check if given code is a number
	*/
	function isNumber(code) {
		return code > 47 && code < 58;
	}
	/**
	* Check if given character code is a white-space character: a space character
	* or line breaks
	*/
	function isWhiteSpace(code) {
		return code === 32 || code === 9 || code === 160;
	}
	/**
	* A streaming, character code-based string reader
	*/
	var Scanner = class Scanner {
		constructor(str, start, end) {
			if (end == null && typeof str === "string") end = str.length;
			this.string = str;
			this.pos = this.start = start || 0;
			this.end = end || 0;
		}
		/**
		* Returns true only if the stream is at the end of the file.
		*/
		eof() {
			return this.pos >= this.end;
		}
		/**
		* Creates a new stream instance which is limited to given `start` and `end`
		* range. E.g. its `eof()` method will look at `end` property, not actual
		* stream end
		*/
		limit(start, end) {
			return new Scanner(this.string, start, end);
		}
		/**
		* Returns the next character code in the stream without advancing it.
		* Will return NaN at the end of the file.
		*/
		peek() {
			return this.string.charCodeAt(this.pos);
		}
		/**
		* Returns the next character in the stream and advances it.
		* Also returns <code>undefined</code> when no more characters are available.
		*/
		next() {
			if (this.pos < this.string.length) return this.string.charCodeAt(this.pos++);
		}
		/**
		* `match` can be a character code or a function that takes a character code
		* and returns a boolean. If the next character in the stream 'matches'
		* the given argument, it is consumed and returned.
		* Otherwise, `false` is returned.
		*/
		eat(match) {
			const ch = this.peek();
			const ok = typeof match === "function" ? match(ch) : ch === match;
			if (ok) this.next();
			return ok;
		}
		/**
		* Repeatedly calls <code>eat</code> with the given argument, until it
		* fails. Returns <code>true</code> if any characters were eaten.
		*/
		eatWhile(match) {
			const start = this.pos;
			while (!this.eof() && this.eat(match));
			return this.pos !== start;
		}
		/**
		* Backs up the stream n characters. Backing it up further than the
		* start of the current token will cause things to break, so be careful.
		*/
		backUp(n) {
			this.pos -= n || 1;
		}
		/**
		* Get the string between the start of the current token and the
		* current stream position.
		*/
		current() {
			return this.substring(this.start, this.pos);
		}
		/**
		* Returns substring for given range
		*/
		substring(start, end) {
			return this.string.slice(start, end);
		}
		/**
		* Creates error object with current stream state
		*/
		error(message, pos = this.pos) {
			return new ScannerError(`${message} at ${pos + 1}`, pos, this.string);
		}
	};
	var ScannerError = class extends Error {
		constructor(message, pos, str) {
			super(message);
			this.pos = pos;
			this.string = str;
		}
	};
	//#endregion
	//#region node_modules/.pnpm/@emmetio+math-expression@1.0.5/node_modules/@emmetio/math-expression/dist/math.es.js
	var nullary = token("null", 0);
	/**
	* Parses given expression in forward direction
	*/
	function parse$2(expr) {
		const scanner = typeof expr === "string" ? new Scanner(expr) : expr;
		let ch;
		let priority = 0;
		let expected = 21;
		const tokens = [];
		while (!scanner.eof()) {
			scanner.eatWhile(isWhiteSpace);
			scanner.start = scanner.pos;
			if (consumeNumber(scanner)) {
				if ((expected & 1) === 0) error("Unexpected number", scanner);
				tokens.push(number(scanner.current()));
				expected = 10;
			} else if (isOperator(scanner.peek())) {
				ch = scanner.next();
				if (isSign(ch) && expected & 16) {
					if (isNegativeSign(ch)) tokens.push(op1(ch, priority));
					expected = 21;
				} else {
					if ((expected & 2) === 0) error("Unexpected operator", scanner);
					tokens.push(op2(ch, priority));
					expected = 21;
				}
			} else if (scanner.eat(40)) {
				if ((expected & 4) === 0) error("Unexpected \"(\"", scanner);
				priority += 10;
				expected = 53;
			} else if (scanner.eat(41)) {
				priority -= 10;
				if (expected & 32) tokens.push(nullary);
				else if ((expected & 8) === 0) error("Unexpected \")\"", scanner);
				expected = 14;
			} else error("Unknown character", scanner);
		}
		if (priority < 0 || priority >= 10) error("Unmatched \"()\"", scanner);
		const result = orderTokens(tokens);
		if (result === null) error("Parity", scanner);
		return result;
	}
	/**
	* Consumes number from given stream
	* @return Returns `true` if number was consumed
	*/
	function consumeNumber(scanner) {
		const start = scanner.pos;
		if (scanner.eat(46) && scanner.eatWhile(isNumber)) return true;
		if (scanner.eatWhile(isNumber) && (!scanner.eat(46) || scanner.eatWhile(isNumber))) return true;
		scanner.pos = start;
		return false;
	}
	/**
	* Orders parsed tokens (operands and operators) in given array so that they are
	* laid off in order of execution
	*/
	function orderTokens(tokens) {
		const operators = [];
		const operands = [];
		let nOperators = 0;
		for (let i = 0; i < tokens.length; i++) {
			const t = tokens[i];
			if (t.type === "num") operands.push(t);
			else {
				nOperators += t.type === "op1" ? 1 : 2;
				while (operators.length) if (t.priority <= operators[operators.length - 1].priority) operands.push(operators.pop());
				else break;
				operators.push(t);
			}
		}
		return nOperators + 1 === operands.length + operators.length ? operands.concat(operators.reverse()) : null;
	}
	/**
	* Number token factory
	*/
	function number(value, priority) {
		return token("num", parseFloat(value), priority);
	}
	/**
	* Unary operator factory
	* @param value    Operator  character code
	* @param priority Operator execution priority
	*/
	function op1(value, priority = 0) {
		if (value === 45) priority += 2;
		return token("op1", value, priority);
	}
	/**
	* Binary operator factory
	* @param value Operator  character code
	* @param priority Operator execution priority
	*/
	function op2(value, priority = 0) {
		if (value === 42) priority += 1;
		else if (value === 47 || value === 92) priority += 2;
		return token("op2", value, priority);
	}
	function error(name, scanner) {
		if (scanner) name += ` at column ${scanner.pos} of expression`;
		throw new Error(name);
	}
	function isSign(ch) {
		return isPositiveSign(ch) || isNegativeSign(ch);
	}
	function isPositiveSign(ch) {
		return ch === 43;
	}
	function isNegativeSign(ch) {
		return ch === 45;
	}
	function isOperator(ch) {
		return ch === 43 || ch === 45 || ch === 42 || ch === 47 || ch === 92;
	}
	function token(type, value, priority = 0) {
		return {
			type,
			value,
			priority
		};
	}
	var ops1 = { [45]: (num) => -num };
	var ops2 = {
		[43]: (a, b) => a + b,
		[45]: (a, b) => a - b,
		[42]: (a, b) => a * b,
		[47]: (a, b) => a / b,
		[92]: (a, b) => Math.floor(a / b)
	};
	/**
	* Evaluates given math expression
	* @param expr Expression to evaluate
	*/
	function evaluate(expr) {
		if (!Array.isArray(expr)) expr = parse$2(expr);
		if (!expr || !expr.length) return null;
		const nStack = [];
		let n1;
		let n2;
		let f;
		for (let i = 0, il = expr.length; i < il; i++) {
			const token = expr[i];
			if (token.type === "num") nStack.push(token.value);
			else if (token.type === "op2") {
				n2 = nStack.pop();
				n1 = nStack.pop();
				f = ops2[token.value];
				nStack.push(f(n1, n2));
			} else if (token.type === "op1") {
				n1 = nStack.pop();
				f = ops1[token.value];
				nStack.push(f(n1));
			} else throw new Error("Invalid expression");
		}
		if (nStack.length > 1) throw new Error("Invalid Expression (parity)");
		return nStack[0];
	}
	//#endregion
	//#region shared/animation/schemas/injects/math.js
	var math_exports = /* @__PURE__ */ __exportAll({
		MathAbsInjectSchema: () => MathAbsInjectSchema,
		MathAcosInjectSchema: () => MathAcosInjectSchema,
		MathAcoshInjectSchema: () => MathAcoshInjectSchema,
		MathAsinInjectSchema: () => MathAsinInjectSchema,
		MathAsinhInjectSchema: () => MathAsinhInjectSchema,
		MathAtan2InjectSchema: () => MathAtan2InjectSchema,
		MathAtanInjectSchema: () => MathAtanInjectSchema,
		MathAtanhInjectSchema: () => MathAtanhInjectSchema,
		MathCbrtInjectSchema: () => MathCbrtInjectSchema,
		MathCeilInjectSchema: () => MathCeilInjectSchema,
		MathClz32InjectSchema: () => MathClz32InjectSchema,
		MathCosInjectSchema: () => MathCosInjectSchema,
		MathCoshInjectSchema: () => MathCoshInjectSchema,
		MathEInjectSchema: () => MathEInjectSchema,
		MathExpInjectSchema: () => MathExpInjectSchema,
		MathExpm1InjectSchema: () => MathExpm1InjectSchema,
		MathFloorInjectSchema: () => MathFloorInjectSchema,
		MathFroundInjectSchema: () => MathFroundInjectSchema,
		MathHypotInjectSchema: () => MathHypotInjectSchema,
		MathImulInjectSchema: () => MathImulInjectSchema,
		MathInjectSchema: () => MathInjectSchema,
		MathLN10InjectSchema: () => MathLN10InjectSchema,
		MathLN2InjectSchema: () => MathLN2InjectSchema,
		MathLOG10EInjectSchema: () => MathLOG10EInjectSchema,
		MathLOG2EInjectSchema: () => MathLOG2EInjectSchema,
		MathLog10InjectSchema: () => MathLog10InjectSchema,
		MathLog1pInjectSchema: () => MathLog1pInjectSchema,
		MathLog2InjectSchema: () => MathLog2InjectSchema,
		MathLogInjectSchema: () => MathLogInjectSchema,
		MathMaxInjectSchema: () => MathMaxInjectSchema,
		MathMinInjectSchema: () => MathMinInjectSchema,
		MathPIInjectSchema: () => MathPIInjectSchema,
		MathPowInjectSchema: () => MathPowInjectSchema,
		MathRandomInjectSchema: () => MathRandomInjectSchema,
		MathRoundInjectSchema: () => MathRoundInjectSchema,
		MathSQRT1_2InjectSchema: () => MathSQRT1_2InjectSchema,
		MathSQRT2InjectSchema: () => MathSQRT2InjectSchema,
		MathSignInjectSchema: () => MathSignInjectSchema,
		MathSinInjectSchema: () => MathSinInjectSchema,
		MathSinhInjectSchema: () => MathSinhInjectSchema,
		MathSqrtInjectSchema: () => MathSqrtInjectSchema,
		MathTanInjectSchema: () => MathTanInjectSchema,
		MathTanhInjectSchema: () => MathTanhInjectSchema,
		MathTruncInjectSchema: () => MathTruncInjectSchema
	});
	var MathInjectSchema = InjectSchema(Inject_default.Math).extend({ expression: stringType() }).transform(({ expression }, ctx) => {
		try {
			return evaluate(expression);
		} catch (e) {
			ctx.addIssue({
				code: ZodIssueCode.custom,
				message: e.message + ` "${expression}"`,
				path: ["expression"]
			});
			return NEVER;
		}
	});
	var MathConstantInjectSchema = (inject, value) => InjectWithMeta(InjectSchema(inject).transform(() => value), { immediate: true });
	var MathSingleInjectSchema = (inject, fn) => InjectSchema(inject).extend({ value: numberType() }).transform(zodTransformErrorBoundary(({ value }) => fn(value)));
	var MathMultipleInjectSchema = (inject, fn) => InjectSchema(inject).extend({ values: ArrayOrSingleSchema(numberType()) }).transform(zodTransformErrorBoundary(({ values }) => fn(...[].concat(values))));
	var MathAbsInjectSchema = MathSingleInjectSchema(Inject_default.MathAbs, Math.abs);
	var MathAcosInjectSchema = MathSingleInjectSchema(Inject_default.MathAcos, Math.acos);
	var MathAcoshInjectSchema = MathSingleInjectSchema(Inject_default.MathAcosh, Math.acosh);
	var MathAsinInjectSchema = MathSingleInjectSchema(Inject_default.MathAsin, Math.asin);
	var MathAsinhInjectSchema = MathSingleInjectSchema(Inject_default.MathAsinh, Math.asinh);
	var MathAtanInjectSchema = MathSingleInjectSchema(Inject_default.MathAtan, Math.atan);
	var MathAtan2InjectSchema = InjectSchema(Inject_default.MathAtan2).extend({
		y: numberType(),
		x: numberType()
	}).transform(zodTransformErrorBoundary(({ y, x }) => Math.atan2(y, x)));
	var MathAtanhInjectSchema = MathSingleInjectSchema(Inject_default.MathAtanh, Math.atanh);
	var MathCbrtInjectSchema = MathSingleInjectSchema(Inject_default.MathCbrt, Math.cbrt);
	var MathCeilInjectSchema = MathSingleInjectSchema(Inject_default.MathCeil, Math.ceil);
	var MathClz32InjectSchema = MathSingleInjectSchema(Inject_default.MathClz32, Math.clz32);
	var MathCosInjectSchema = MathSingleInjectSchema(Inject_default.MathCos, Math.cos);
	var MathCoshInjectSchema = MathSingleInjectSchema(Inject_default.MathCosh, Math.cosh);
	var MathExpInjectSchema = MathSingleInjectSchema(Inject_default.MathExp, Math.exp);
	var MathExpm1InjectSchema = MathSingleInjectSchema(Inject_default.MathExpm1, Math.expm1);
	var MathFloorInjectSchema = MathSingleInjectSchema(Inject_default.MathFloor, Math.floor);
	var MathFroundInjectSchema = MathSingleInjectSchema(Inject_default.MathFround, Math.fround);
	var MathHypotInjectSchema = MathMultipleInjectSchema(Inject_default.MathHypot, Math.hypot);
	var MathImulInjectSchema = InjectSchema(Inject_default.MathImul).extend({
		a: numberType(),
		b: numberType()
	}).transform(zodTransformErrorBoundary(({ a, b }) => Math.imul(a, b)));
	var MathLogInjectSchema = MathSingleInjectSchema(Inject_default.MathLog, Math.log);
	var MathLog1pInjectSchema = MathSingleInjectSchema(Inject_default.MathLog1p, Math.log1p);
	var MathLog10InjectSchema = MathSingleInjectSchema(Inject_default.MathLog10, Math.log10);
	var MathLog2InjectSchema = MathSingleInjectSchema(Inject_default.MathLog2, Math.log2);
	var MathMaxInjectSchema = MathMultipleInjectSchema(Inject_default.MathMax, Math.max);
	var MathMinInjectSchema = MathMultipleInjectSchema(Inject_default.MathMin, Math.min);
	var MathPowInjectSchema = InjectSchema(Inject_default.MathPow).extend({
		base: numberType(),
		exponent: numberType()
	}).transform(zodTransformErrorBoundary(({ base, exponent }) => Math.pow(base, exponent)));
	var MathRandomInjectSchema = InjectSchema(Inject_default.MathRandom).transform(() => Math.random());
	var MathRoundInjectSchema = MathSingleInjectSchema(Inject_default.MathRound, Math.round);
	var MathSignInjectSchema = MathSingleInjectSchema(Inject_default.MathSign, Math.sign);
	var MathSinInjectSchema = MathSingleInjectSchema(Inject_default.MathSin, Math.sin);
	var MathSinhInjectSchema = MathSingleInjectSchema(Inject_default.MathSinh, Math.sinh);
	var MathSqrtInjectSchema = MathSingleInjectSchema(Inject_default.MathSqrt, Math.sqrt);
	var MathTanInjectSchema = MathSingleInjectSchema(Inject_default.MathTan, Math.tan);
	var MathTanhInjectSchema = MathSingleInjectSchema(Inject_default.MathTanh, Math.tanh);
	var MathTruncInjectSchema = MathSingleInjectSchema(Inject_default.MathTrunc, Math.trunc);
	var MathEInjectSchema = MathConstantInjectSchema(Inject_default.MathE, Math.E);
	var MathLN10InjectSchema = MathConstantInjectSchema(Inject_default.MathLN10, Math.LN10);
	var MathLN2InjectSchema = MathConstantInjectSchema(Inject_default.MathLN2, Math.LN2);
	var MathLOG10EInjectSchema = MathConstantInjectSchema(Inject_default.MathLOG10E, Math.LOG10E);
	var MathLOG2EInjectSchema = MathConstantInjectSchema(Inject_default.MathLOG2E, Math.LOG2E);
	var MathPIInjectSchema = MathConstantInjectSchema(Inject_default.MathPI, Math.PI);
	var MathSQRT1_2InjectSchema = MathConstantInjectSchema(Inject_default.MathSQRT1_2, Math.SQRT1_2);
	var MathSQRT2InjectSchema = MathConstantInjectSchema(Inject_default.MathSQRT2, Math.SQRT2);
	//#endregion
	//#region shared/animation/schemas/injects/operators.js
	var operators_exports = /* @__PURE__ */ __exportAll({
		AdditionOperatorInjectSchema: () => AdditionOperatorInjectSchema,
		DivisionOperatorInjectSchema: () => DivisionOperatorInjectSchema,
		EqualityOperatorInjectSchema: () => EqualityOperatorInjectSchema,
		GreaterThanOperatorInjectSchema: () => GreaterThanOperatorInjectSchema,
		GreaterThanOrEqualOperatorInjectSchema: () => GreaterThanOrEqualOperatorInjectSchema,
		InOperatorInjectSchema: () => InOperatorInjectSchema,
		InequalityOperatorInjectSchema: () => InequalityOperatorInjectSchema,
		LessThanOperatorInjectSchema: () => LessThanOperatorInjectSchema,
		LessThanOrEqualOperatorInjectSchema: () => LessThanOrEqualOperatorInjectSchema,
		LogicalAndOperatorInjectSchema: () => LogicalAndOperatorInjectSchema,
		LogicalNotOperatorInjectSchema: () => LogicalNotOperatorInjectSchema,
		LogicalOrOperatorInjectSchema: () => LogicalOrOperatorInjectSchema,
		MultiplicationOperatorInjectSchema: () => MultiplicationOperatorInjectSchema,
		NullishCoalescingOperatorInjectSchema: () => NullishCoalescingOperatorInjectSchema,
		RemainderOperatorInjectSchema: () => RemainderOperatorInjectSchema,
		StrictEqualityOperatorInjectSchema: () => StrictEqualityOperatorInjectSchema,
		StrictInequalityOperatorInjectSchema: () => StrictInequalityOperatorInjectSchema,
		SubtractionOperatorInjectSchema: () => SubtractionOperatorInjectSchema
	});
	var OperatorInjectSchema = (inject, fn) => InjectSchema(inject).extend({
		a: anyType(),
		b: anyType()
	}).transform(zodTransformErrorBoundary(({ a, b }) => fn(clearSourceMap(a), clearSourceMap(b))));
	var AdditionOperatorInjectSchema = OperatorInjectSchema(Inject_default.AdditionOperator, (a, b) => a + b);
	var DivisionOperatorInjectSchema = OperatorInjectSchema(Inject_default.DivisionOperator, (a, b) => a / b);
	var EqualityOperatorInjectSchema = OperatorInjectSchema(Inject_default.EqualityOperator, (a, b) => a == b);
	var GreaterThanOperatorInjectSchema = OperatorInjectSchema(Inject_default.GreaterThanOperator, (a, b) => a > b);
	var GreaterThanOrEqualOperatorInjectSchema = OperatorInjectSchema(Inject_default.GreaterThanOrEqualOperator, (a, b) => a >= b);
	var InOperatorInjectSchema = OperatorInjectSchema(Inject_default.InOperator, (a, b) => a in b);
	var InequalityOperatorInjectSchema = OperatorInjectSchema(Inject_default.InequalityOperator, (a, b) => a != b);
	var LessThanOperatorInjectSchema = OperatorInjectSchema(Inject_default.LessThanOperator, (a, b) => a < b);
	var LessThanOrEqualOperatorInjectSchema = OperatorInjectSchema(Inject_default.LessThanOrEqualOperator, (a, b) => a <= b);
	var LogicalAndOperatorInjectSchema = OperatorInjectSchema(Inject_default.LogicalAndOperator, (a, b) => a && b);
	var LogicalNotOperatorInjectSchema = InjectSchema(Inject_default.LogicalNotOperator).extend({ value: anyType() }).transform(({ value }) => !value);
	var LogicalOrOperatorInjectSchema = OperatorInjectSchema(Inject_default.LogicalOrOperator, (a, b) => a || b);
	var MultiplicationOperatorInjectSchema = OperatorInjectSchema(Inject_default.MultiplicationOperator, (a, b) => a * b);
	var NullishCoalescingOperatorInjectSchema = OperatorInjectSchema(Inject_default.NullishCoalescingOperator, (a, b) => a ?? b);
	var RemainderOperatorInjectSchema = OperatorInjectSchema(Inject_default.RemainderOperator, (a, b) => a % b);
	var StrictEqualityOperatorInjectSchema = OperatorInjectSchema(Inject_default.StrictEqualityOperator, (a, b) => a === b);
	var StrictInequalityOperatorInjectSchema = OperatorInjectSchema(Inject_default.StrictInequalityOperator, (a, b) => a !== b);
	var SubtractionOperatorInjectSchema = OperatorInjectSchema(Inject_default.SubtractionOperator, (a, b) => a - b);
	//#endregion
	//#region shared/data/constants.js
	var MAX_ANIMATION_DURATION = 5e3;
	//#endregion
	//#region shared/enums/Axis.js
	var Axis_default = Enum({
		X: "x",
		Y: "y",
		Z: "z"
	});
	//#endregion
	//#region shared/utils/direction.js
	function getDirectionsByAxis(axis) {
		switch (axis) {
			case Axis_default.X: return [Direction_default.Rightwards, Direction_default.Leftwards];
			case Axis_default.Y: return [Direction_default.Downwards, Direction_default.Upwards];
			case Axis_default.Z: return [Direction_default.Backwards, Direction_default.Forwards];
		}
	}
	function getSupportedAxes(directions) {
		return Axis_default.values().filter((axis) => getDirectionsByAxis(axis).every((d) => directions.includes(d)));
	}
	function getDirection(axis, isMore) {
		return getDirectionsByAxis(axis)[+isMore];
	}
	function reverseDirection(direction) {
		switch (direction) {
			case Direction_default.Upwards: return Direction_default.Downwards;
			case Direction_default.Downwards: return Direction_default.Upwards;
			case Direction_default.Leftwards: return Direction_default.Rightwards;
			case Direction_default.Rightwards: return Direction_default.Leftwards;
			case Direction_default.Forwards: return Direction_default.Backwards;
			case Direction_default.Backwards: return Direction_default.Forwards;
		}
	}
	function getAnchorDirection(position, isTowards) {
		const direction = toDirection(position);
		return isTowards ? reverseDirection(direction) : direction;
	}
	//#endregion
	//#region shared/utils/accordion.js
	var AccordionType = Enum({
		MarginTop: "marginTop",
		MarginBottom: "marginBottom",
		MarginLeft: "marginLeft",
		MarginRight: "marginRight"
	});
	function reverseType(type) {
		switch (type) {
			case AccordionType.MarginTop: return AccordionType.MarginBottom;
			case AccordionType.MarginBottom: return AccordionType.MarginTop;
			case AccordionType.MarginLeft: return AccordionType.MarginRight;
			case AccordionType.MarginRight: return AccordionType.MarginLeft;
		}
	}
	function getSizeProperty(type) {
		switch (type) {
			case AccordionType.MarginTop:
			case AccordionType.MarginBottom: return "offsetHeight";
			case AccordionType.MarginLeft:
			case AccordionType.MarginRight: return "offsetWidth";
		}
	}
	function getMarginProperty(type, opposite = false) {
		switch (opposite ? reverseType(type) : type) {
			case AccordionType.MarginTop: return "marginTop";
			case AccordionType.MarginBottom: return "marginBottom";
			case AccordionType.MarginLeft: return "marginLeft";
			case AccordionType.MarginRight: return "marginRight";
		}
	}
	function buildAccordionGenerator(type, options = {}) {
		const { hideElement = false } = options;
		return (animationType, { easing, duration }) => ({ container, element, isIntersected }) => Object.assign({ execute: () => {
			const value = -(utils.get(element, getSizeProperty(type), false) + utils.get(container, getMarginProperty(type, true), false));
			return animate(container, {
				autoplay: false,
				duration,
				ease: getEasingFn(easing),
				[getMarginProperty(type)]: {
					[AnimationType_default.Enter]: isIntersected ? 0 : { from: value },
					[AnimationType_default.Exit]: value
				}[animationType]
			});
		} }, hideElement ? {
			onBeforeBegin: () => element.style.visibility = "hidden",
			onCompleted: animationType === AnimationType_default.Exit ? void 0 : () => element.style.removeProperty("visibility"),
			onDestroyed: () => element.style.removeProperty("visibility")
		} : null);
	}
	//#endregion
	//#region shared/enums/DirectionAutoType.js
	var DirectionAutoType_default = Enum({
		Alternate: "alternate",
		Anchor: "anchor"
	});
	//#endregion
	//#region shared/enums/PositionAutoType.js
	var PositionAutoType_default = Enum({ Precise: "precise" });
	//#endregion
	//#region shared/data/modules.js
	var moduleAliases = {
		[ModuleKeyAlias.Switch]: [
			ModuleKey_default.Servers,
			ModuleKey_default.Channels,
			ModuleKey_default.Settings,
			ModuleKey_default.Layers,
			ModuleKey_default.ThreadSidebarSwitch
		],
		[ModuleKeyAlias.Reveal]: [
			ModuleKey_default.Popouts,
			ModuleKey_default.Tooltips,
			ModuleKey_default.ContextMenu,
			ModuleKey_default.Messages,
			ModuleKey_default.ChannelList,
			ModuleKey_default.Modals
		],
		[ModuleKeyAlias.Sidebars]: [ModuleKey_default.MembersSidebar, ModuleKey_default.ThreadSidebar]
	};
	var modules$1 = [
		{
			id: ModuleKey_default.Servers,
			name: "Servers",
			meta: {
				type: ModuleType_default.Switch,
				settings: {
					supportsAuto: {
						[AnimationSetting_default.Position]: PositionAutoType_default.Precise,
						[AnimationSetting_default.Direction]: DirectionAutoType_default.Alternate
					},
					defaults: {
						[AnimationSetting_default.DirectionAxis]: Axis_default.Y,
						[AnimationSetting_default.Overflow]: false
					}
				}
			}
		},
		{
			id: ModuleKey_default.Channels,
			name: "Channels",
			meta: {
				type: ModuleType_default.Switch,
				settings: {
					supportsAuto: {
						[AnimationSetting_default.Position]: PositionAutoType_default.Precise,
						[AnimationSetting_default.Direction]: DirectionAutoType_default.Alternate
					},
					defaults: {
						[AnimationSetting_default.DirectionAxis]: Axis_default.Y,
						[AnimationSetting_default.Overflow]: false
					}
				}
			}
		},
		{
			id: ModuleKey_default.Messages,
			name: "Messages",
			meta: { accordion: {
				create: buildAccordionGenerator(AccordionType.MarginBottom, { hideElement: true }),
				defaults: {
					[AnimationSetting_default.Duration]: 200,
					[AnimationSetting_default.Easing]: {
						type: EasingType.Ease,
						bezier: EasingBezier.InOut,
						style: EasingStyle.Quad
					}
				}
			} }
		},
		{
			id: ModuleKey_default.Tooltips,
			name: "Tooltips",
			meta: {
				interceptEvents: false,
				waitUntilSafe: true,
				settings: { supportsAuto: {
					[AnimationSetting_default.Position]: true,
					[AnimationSetting_default.Direction]: DirectionAutoType_default.Anchor
				} }
			}
		},
		{
			id: ModuleKey_default.Popouts,
			name: "Popouts",
			meta: {
				waitUntilSafe: true,
				settings: { supportsAuto: {
					[AnimationSetting_default.Position]: true,
					[AnimationSetting_default.Direction]: DirectionAutoType_default.Anchor
				} }
			}
		},
		{
			id: ModuleKey_default.ContextMenu,
			name: "Context Menu",
			meta: {
				waitUntilSafe: true,
				settings: { supportsAuto: {
					[AnimationSetting_default.Position]: true,
					[AnimationSetting_default.Direction]: DirectionAutoType_default.Anchor
				} }
			}
		},
		{
			id: ModuleKey_default.ChannelList,
			name: "Channel List",
			meta: { accordion: {
				create: buildAccordionGenerator(AccordionType.MarginBottom, { hideElement: true }),
				defaults: {
					[AnimationSetting_default.Duration]: 200,
					[AnimationSetting_default.Easing]: {
						type: EasingType.Ease,
						bezier: EasingBezier.InOut,
						style: EasingStyle.Quad
					}
				}
			} }
		},
		{
			id: ModuleKey_default.Layers,
			name: "Layers",
			meta: {
				type: ModuleType_default.Switch,
				settings: {
					supportsAuto: {
						[AnimationSetting_default.Position]: [PositionAutoType_default.Precise, {
							preservable: true,
							preserveLabel: "Preserve for individual layers"
						}],
						[AnimationSetting_default.Direction]: DirectionAutoType_default.Alternate
					},
					defaults: {
						[AnimationSetting_default.DirectionAxis]: Axis_default.Z,
						[AnimationSetting_default.Overflow]: false
					},
					hideOverflow: true
				}
			}
		},
		{
			id: ModuleKey_default.Settings,
			name: "Settings",
			meta: {
				type: ModuleType_default.Switch,
				settings: {
					supportsAuto: {
						[AnimationSetting_default.Position]: PositionAutoType_default.Precise,
						[AnimationSetting_default.Direction]: DirectionAutoType_default.Alternate
					},
					defaults: {
						[AnimationSetting_default.DirectionAxis]: Axis_default.Y,
						[AnimationSetting_default.Overflow]: false
					}
				}
			}
		},
		{
			id: ModuleKey_default.Modals,
			name: "Modals",
			meta: { settings: { supportsAuto: { [AnimationSetting_default.Position]: [PositionAutoType_default.Precise, { asDefault: false }] } } }
		},
		{
			id: ModuleKey_default.ModalsBackdrop,
			name: "Backdrop",
			parent: ModuleKey_default.Modals,
			meta: {
				revert: false,
				settings: {
					supportsAuto: { [AnimationSetting_default.Position]: [PositionAutoType_default.Precise, { asDefault: false }] },
					hideOverflow: true
				}
			}
		},
		{
			id: ModuleKey_default.MembersSidebar,
			name: "Members Sidebar",
			meta: {
				settings: { supportsAuto: { [AnimationSetting_default.Position]: [PositionAutoType_default.Precise, { asDefault: false }] } },
				accordion: {
					create: buildAccordionGenerator(AccordionType.MarginRight),
					defaults: {
						[AnimationSetting_default.Duration]: 400,
						[AnimationSetting_default.Easing]: {
							type: EasingType.Ease,
							bezier: EasingBezier.InOut,
							style: EasingStyle.Quint
						}
					}
				}
			}
		},
		{
			id: ModuleKey_default.ThreadSidebar,
			name: "Thread Sidebar",
			meta: {
				settings: { supportsAuto: { [AnimationSetting_default.Position]: [PositionAutoType_default.Precise, { asDefault: false }] } },
				accordion: {
					create: buildAccordionGenerator(AccordionType.MarginRight),
					defaults: {
						[AnimationSetting_default.Duration]: 400,
						[AnimationSetting_default.Easing]: {
							type: EasingType.Ease,
							bezier: EasingBezier.InOut,
							style: EasingStyle.Quint
						}
					}
				}
			}
		},
		{
			id: ModuleKey_default.ThreadSidebarSwitch,
			name: "Switch",
			parent: ModuleKey_default.ThreadSidebar,
			meta: {
				type: ModuleType_default.Switch,
				settings: {
					supportsAuto: { [AnimationSetting_default.Position]: [PositionAutoType_default.Precise, { asDefault: false }] },
					defaults: { [AnimationSetting_default.Overflow]: false }
				}
			}
		}
	];
	//#endregion
	//#region shared/animation/schemas/OverridableSchema.js
	var DefaultConditionsSchema = strictObjectType({
		type: enumType(AnimationType_default.values()),
		"module.type": enumType(ModuleType_default.values()),
		module: ArrayOrSingleSchema(enumType(ModuleKey_default.values().concat(ModuleKeyAlias.values()))).transform((value) => [].concat(value).flatMap((key) => moduleAliases[key] ?? key))
	}).partial();
	function computeOverridable(overridable, conditionValues, presets = {}) {
		return Object.assign(omit(overridable, ["override"]), ...[].concat(overridable.override).flatMap((override) => override != null && "preset" in override ? presets[override.preset] : override).filter((override) => override != null && Object.entries(override.for).every(([condition, values]) => [].concat(values).includes(conditionValues[condition]))).map((v) => omit(v, ["for"])));
	}
	var OverrideSchema = (schema, conditionsSchema = DefaultConditionsSchema) => schema.partial().extend({ for: conditionsSchema });
	var OverridableSchema = (schema, { conditionsSchema, presets = [] } = {}) => schema.extend({ override: ArrayOrSingleSchema(!presets.length ? OverrideSchema(schema, conditionsSchema) : unionType([OverrideSchema(schema, conditionsSchema), strictObjectType({ preset: enumType(presets) })])).optional() });
	//#endregion
	//#region shared/animation/schemas/SettingsSchema.js
	var DurationSchema = (from = 100, to = MAX_ANIMATION_DURATION) => numberType().int().min(from).max(to);
	var DefaultsSchema = (settings) => {
		const entries = [];
		if (AnimationSetting_default.Duration in settings) {
			const { from, to } = settings[AnimationSetting_default.Duration];
			entries.push([AnimationSetting_default.Duration, DurationSchema(from, to)]);
		}
		if (AnimationSetting_default.Easing in settings) entries.push([AnimationSetting_default.Easing, EasingSchema]);
		if (AnimationSetting_default.Variant in settings) entries.push([AnimationSetting_default.Variant, enumType(settings[AnimationSetting_default.Variant].map((v) => v.key))]);
		if (AnimationSetting_default.Position in settings) entries.push([AnimationSetting_default.Position, enumType(settings[AnimationSetting_default.Position] === true ? Position_default.values() : settings[AnimationSetting_default.Position])], [AnimationSetting_default.PositionPreserve, booleanType().optional()]);
		if (AnimationSetting_default.Direction in settings) entries.push([AnimationSetting_default.Direction, enumType(settings[AnimationSetting_default.Direction])], [AnimationSetting_default.DirectionAxis, enumType(getSupportedAxes(settings[AnimationSetting_default.Direction])).optional()], [AnimationSetting_default.DirectionReverse, booleanType().optional()], [AnimationSetting_default.DirectionTowards, booleanType().optional()]);
		if (AnimationSetting_default.Overflow in settings) entries.push([AnimationSetting_default.Overflow, booleanType()]);
		return OverridableSchema(strictObjectType(Object.fromEntries(entries)));
	};
	var SettingsSchema = objectType({
		[AnimationSetting_default.Duration]: unionType([literalType(true), objectType({
			from: numberType().int().min(100).multipleOf(100),
			to: numberType().int().max(MAX_ANIMATION_DURATION).multipleOf(100)
		}).strict()]).optional().transform((v) => v === true ? {
			from: 100,
			to: 2e3
		} : v).refine((value) => !value || value.to > value.from, {
			message: `'to' must be greater than 'from'`,
			path: ["to"]
		}),
		[AnimationSetting_default.Easing]: literalType(true).optional(),
		[AnimationSetting_default.Variant]: objectType({
			key: stringType().refine(restrictReservedKeys, (key) => ({ message: `Forbidden variant key: '${key}'` })),
			name: stringType()
		}).strict().array().nonempty().optional(),
		[AnimationSetting_default.Position]: unionType([
			literalType(true),
			literalType("precise"),
			literalType("enum"),
			literalType("simple"),
			enumType(Position_default.values()).array().nonempty()
		]).optional().transform((value) => {
			switch (value) {
				case "precise": return true;
				case "enum": return Position_default.values();
				case "simple": return [
					Position_default.Top,
					Position_default.Bottom,
					Position_default.Left,
					Position_default.Right,
					Position_default.Center
				];
				default: return value;
			}
		}),
		[AnimationSetting_default.Direction]: unionType([literalType(true), enumType(Direction_default.values()).array().nonempty()]).optional().transform((value) => value === true ? [
			Direction_default.Upwards,
			Direction_default.Downwards,
			Direction_default.Leftwards,
			Direction_default.Rightwards
		] : value),
		[AnimationSetting_default.Overflow]: booleanType().optional(),
		defaults: recordType(anyType())
	}).strict().transform((settings, ctx) => {
		settings.defaults = DefaultsSchema(settings).parse(settings.defaults, { path: [...ctx.path, "defaults"] });
		return settings;
	});
	//#endregion
	//#region shared/animation/schemas/injects/accordions.js
	var accordions_exports = /* @__PURE__ */ __exportAll({ AccordionInjectSchema: () => AccordionInjectSchema });
	function getVariableName(type, name) {
		return `__accordion_${type}__${name}`;
	}
	function getDefaultType(module, type) {
		switch (module.id) {
			case ModuleKey_default.Messages: return type === AnimationType_default.Enter ? AccordionType.MarginBottom : null;
			case ModuleKey_default.MembersSidebar:
			case ModuleKey_default.ThreadSidebar: return AccordionType.MarginRight;
			default: return null;
		}
	}
	function buildAccordion(type, { duration, easing }) {
		const variableName = getVariableName(type, "value");
		return {
			"onBeforeCreate": {
				"inject": "var.set",
				"name": variableName,
				"value": {
					"inject": "*",
					"a": -1,
					"b": {
						"inject": "+",
						"a": {
							"inject": "utils.get",
							"target": { "inject": "element" },
							"property": getSizeProperty(type),
							"unit": false
						},
						"b": {
							"inject": "utils.get",
							"target": { "inject": "container" },
							"property": getMarginProperty(type, true),
							"unit": false
						}
					}
				}
			},
			"anime": {
				"targets": { "inject": "container" },
				"parameters": {
					"duration": duration,
					"ease": {
						"inject": "easing",
						"easing": easing
					},
					[getMarginProperty(type)]: {
						"inject": "type",
						"enter": {
							"inject": "isIntersected",
							"true": 0,
							"false": { "from": {
								"inject": "var.get",
								"name": variableName
							} }
						},
						"exit": {
							"inject": "var.get",
							"name": variableName
						}
					}
				}
			}
		};
	}
	var AccordionInjectSchema = ({ module, type, settings, duration, easing }) => InjectSchema(Inject_default.Accordion).extend({
		type: unionType([enumType(AccordionType.values()), nullType()]).optional().default(getDefaultType(module, type)),
		duration: AnimationSetting_default.Duration in settings ? DurationSchema().optional().default(duration) : DurationSchema(),
		easing: AnimationSetting_default.Easing in settings ? EasingSchema.optional().default(easing) : EasingSchema
	}).transform(({ type, duration, easing }) => type ? buildAccordion(type, {
		duration,
		easing
	}) : null);
	//#endregion
	//#region shared/animation/injectable/parse.js
	function assertInjectType(type) {
		if (Array.isArray(type)) return type.map(assertInjectType).filter(Boolean);
		return injectTypes.find((t) => t.toLowerCase() === type.toLowerCase());
	}
	function parseInject({ schema, context, env, value, ctx }) {
		const path = getSourcePath(value, SELF_KEY);
		const report = path && Debug.animation(context.animation, context.type).inject(value.inject, path, context, value);
		try {
			const parsed = (typeof schema === "function" ? schema(context, env) : schema).parse(value, { path: ctx.path });
			report?.(parsed);
			return parsed;
		} catch (error) {
			throw error instanceof AnimationError ? error : new AnimationError(context.animation, formatZodError(error, {
				pack: context.pack,
				data: value,
				context,
				path: ctx.path,
				sourceMap: { useSelf: true },
				docs: Documentation.getInjectUrl(value.inject)
			}), {
				module: context.module,
				pack: context.pack,
				type: context.type,
				context
			});
		}
	}
	var stopPropagation = (value) => baseStopPropagation(value) || value.inject === Inject_default.Raw;
	function parseInjectable(value, context, env = {}, { path = [] } = {}) {
		const { allowed, disallowed, stage } = env;
		const callback = (value, ctx) => {
			try {
				if (isSourceMap(value)) return value;
				if (isLazyInject(value)) {
					const generated = value.generator(context, env);
					generated[generatedLazyInjectSymbol] = value.name;
					return trust(generated);
				}
				if (value?.inject === void 0) return value;
				try {
					const [schema, meta] = injectSchemas[value.inject] ?? [];
					if (stage === ParseStage_default.Initialize) {
						if (!schema) {
							const { found, word, suggestions } = injectDict.lookup(String(value.inject));
							const injects = assertInjectType(found ? [word] : suggestions.map((s) => s.word));
							ctx.addIssue({
								code: ZodIssueCode.custom,
								message: `Unknown inject '${value.inject}'` + (injects.length ? `. Did you mean: ${formatValuesList(injects)}` : ""),
								path: ["inject"]
							});
							return NEVER;
						}
						if (disallowed?.length && disallowed.includes(value.inject) || allowed?.length && !allowed.includes(value.inject) || typeof meta.allowed === "function" && !meta.allowed({
							value,
							context,
							ctx,
							env
						})) {
							ctx.addIssue({
								code: ZodIssueCode.custom,
								message: `Inject '${value.inject}' is not allowed`
							});
							return NEVER;
						}
						if (meta.immediate === true || Array.isArray(meta.immediate) && meta.immediate.every((key) => key in context)) return parseInject({
							schema,
							context,
							env,
							value,
							ctx
						});
						if (meta.lazy) return wrapLazyInject(value.inject, (context, env) => (...args) => {
							const path = getSourcePath(value, SELF_KEY);
							const groupEnd = path && Debug.animation(context.animation, context.type).lazyInjectCall(value.inject, path, args, context);
							try {
								return parseInjectable(value, context, {
									...env,
									stage: ParseStage_default.Lazy,
									args
								}, { path: ctx.path });
							} catch (error) {
								groupEnd?.();
								context.onError(error instanceof AnimationError ? error : new AnimationError(context.animation, formatZodError(error, {
									pack: context.pack,
									data: value,
									context,
									path: ctx.path,
									sourceMap: { useSelf: true }
								}), {
									module: context.module,
									pack: context.pack,
									type: context.type,
									context
								}));
								context.instance.cancel(true);
							} finally {
								groupEnd?.();
							}
						});
						return value;
					}
					return parseInject({
						schema,
						context,
						env,
						value,
						ctx
					});
				} catch (error) {
					if (error instanceof AnimationError) throw error;
					ctx.addIssue({
						code: ZodIssueCode.custom,
						message: error.message,
						path: ["inject"],
						params: { error }
					});
				}
			} catch (error) {
				if (error instanceof AnimationError) throw error;
				ctx.addIssue({
					code: ZodIssueCode.custom,
					message: error.message,
					params: { error }
				});
			}
		};
		return deepMap(value, callback, {
			stopPropagation,
			path
		});
	}
	//#endregion
	//#region shared/animation/schemas/injects/snippets.js
	var snippets_exports = /* @__PURE__ */ __exportAll({
		SnippetInjectSchema: () => SnippetInjectSchema,
		SnippetParamsInjectSchema: () => SnippetParamsInjectSchema
	});
	var SnippetInjectSchema = (context, env) => InjectSchema(Inject_default.Snippet).extend({
		key: enumType(context.pack.snippets?.map((s) => s.key) ?? []),
		params: recordType(stringType(), anyType()).optional(),
		raw: booleanType().optional().default(false)
	}).transform(({ key, params, raw }, ctx) => {
		if (env.snippet && env.snippet.depth > 10) {
			ctx.addIssue({
				code: ZodIssueCode.custom,
				message: "Maximum snippet depth exceeded"
			});
			return NEVER;
		}
		const snippetIndex = context.pack.snippets?.findIndex((s) => s.key === key);
		if (snippetIndex == null || snippetIndex === -1) return;
		const snippet = context.pack.snippets[snippetIndex];
		if (raw) return snippet.value;
		const snippetEnv = {
			...env,
			snippet: {
				key: snippet.key,
				params: Object.assign({}, snippet.params, params),
				depth: env.snippet ? env.snippet.depth + 1 : 1
			}
		};
		const path = [
			"snippets",
			snippetIndex,
			"value"
		];
		try {
			return parseInjectable(parseInjectable(snippet.value, context, {
				...snippetEnv,
				stage: ParseStage_default.Initialize
			}, { path }), context, snippetEnv, { path });
		} catch (error) {
			throw error instanceof AnimationError ? error : new AnimationError(context.animation, formatZodError(error, {
				pack: context.pack,
				data: snippet.value,
				context,
				path,
				sourceMap: { useSelf: true }
			}), {
				module: context.module,
				pack: context.pack,
				type: context.type,
				context
			});
		}
	});
	var SnippetParamsInjectSchema = InjectWithMeta((context, { snippet }) => InjectSchema(Inject_default.SnippetParams).extend({ name: stringType() }).transform(({ name }) => snippet.params[name]), { allowed: ({ env }) => "snippet" in env });
	//#endregion
	//#region shared/animation/schemas/injects/index.js
	var import_spelling = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
		module.exports = function(dictionary) {
			var dict = [], ALPHABETS = "abcdefghijklmnopqrstuvwxyz'- ".split(""), ETX = String.fromCharCode(3);
			function insert(word, rank) {
				var i, c, subDict = dict;
				if (rank !== void 0 && typeof rank !== "number") throw new TypeError("Word's rank must be a number");
				if (word === void 0) throw new TypeError("Word cannot be undefined");
				word = word.toString().toLowerCase().trim();
				for (i = 0; c = word.charAt(i), c; i++) {
					subDict[c] = subDict[c] || {};
					subDict = subDict[c];
				}
				if (rank !== void 0) subDict[ETX] = rank;
				else subDict[ETX] = subDict[ETX] ? subDict[ETX] + 1 : 1;
				return this;
			}
			function lookup(word, opts) {
				var i, subDict = dict, result = {};
				opts = opts || {};
				if (opts.suggest === void 0) opts.suggest = true;
				if (Array.isArray(word)) {
					result = [];
					for (i = 0; i < word.length; i++) result.push(lookup(word[i], opts));
					return result;
				}
				word = word.toString().toLowerCase().trim();
				if (!Number.isNaN(+word)) return {
					found: true,
					word,
					rank: 0
				};
				for (i = 0; i < word.length && subDict; i++) subDict = subDict[word[i]];
				result.found = subDict && subDict[ETX] ? true : false;
				result.word = word;
				if (result.found) result.rank = subDict[ETX];
				else if (opts.suggest) result.suggestions = suggest(word, opts);
				return result;
			}
			function remove(word) {
				if (lookup(word, { sugget: false }).found) insert(word, 0);
				return this;
			}
			function edits(word) {
				var i, j, edit, results = [], checkResult = function(candidate) {
					var response = lookup(candidate, { suggest: false });
					if (response.found) results.push(response);
				};
				for (i = 0; i < word.length; i++) checkResult(word.slice(0, i) + word.slice(i + 1));
				for (i = 0; i < word.length - 1; i++) {
					edit = word.slice(0, i) + word.slice(i + 1, i + 2) + word.slice(i, i + 1) + word.slice(i + 2);
					checkResult(edit);
				}
				for (i = 0; i < word.length; i++) for (j = 0; j < ALPHABETS.length; j++) {
					edit = word.slice(0, i) + ALPHABETS[j] + word.slice(i + 1);
					checkResult(edit);
				}
				for (i = 0; i <= word.length; i++) for (j = 0; j < ALPHABETS.length; j++) {
					edit = word.slice(0, i) + ALPHABETS[j] + word.slice(i);
					checkResult(edit);
				}
				return results;
			}
			function equal(word) {
				return this.word === word.word;
			}
			function suggest(word, opts) {
				var i, suggestions = [], edit1 = [], edit2 = [];
				opts = opts || {};
				opts.suggestionsLimit = opts.suggestionsLimit || 10;
				word = word.toString().toLowerCase();
				edit1 = edits(word);
				for (i = 0; i < edit1.length && edit1.length < opts.suggestionsLimit; i++) edit2 = edit2.concat(edits(edit1[i].word));
				edit1 = edit1.sort(function(word1, word2) {
					return word2.rank - word1.rank;
				});
				edit2 = edit2.sort(function(word1, word2) {
					return word2.rank - word1.rank;
				});
				for (i = 0; i < edit1.length && suggestions.length < opts.suggestionsLimit; i++) if (!suggestions.some(equal, edit1[i])) suggestions.push(edit1[i]);
				for (i = 0; i < edit2.length && suggestions.length < opts.suggestionsLimit; i++) if (!suggestions.some(equal, edit2[i])) suggestions.push(edit2[i]);
				return suggestions;
			}
			function fetchWords(subDict, prefix) {
				var key, results = [];
				for (key in subDict) if (Object.prototype.hasOwnProperty.call(subDict, key) && subDict[key][ETX]) results.push({
					word: prefix + key,
					rank: subDict[key][ETX]
				});
				return results;
			}
			function doSearch(prefix, subDict, opts) {
				var key, results = [];
				if (!opts.depth || !subDict) return results;
				results = results.concat(fetchWords(subDict, prefix));
				for (key in subDict) if (Object.prototype.hasOwnProperty.call(subDict, key)) results = results.concat(doSearch(prefix + key, subDict[key], { depth: opts.depth - 1 }));
				return results;
			}
			function search(prefix, opts) {
				var i, results = [], subDict = dict, word;
				opts = opts || {};
				if (opts.depth === void 0) opts.depth = 3;
				prefix = prefix.toString().toLowerCase().trim();
				for (i = 0; i < prefix.length && subDict; i++) subDict = subDict[prefix[i]];
				if (!subDict) return results;
				results = doSearch(prefix, subDict, opts);
				word = lookup(prefix, { suggest: false });
				if (word.found) results.push({
					word: prefix,
					rank: word.rank
				});
				return results.sort(function(word1, word2) {
					return word2.rank - word1.rank;
				});
			}
			function build() {
				if (dictionary === void 0) return;
				if (typeof dictionary === "string") {
					var i, words = dictionary.split(" ");
					for (i = 0; i < words.length; i++) insert(words[i], +words[++i]);
					dictionary = "";
				} else if (Array.isArray(dictionary)) {
					dictionary.forEach(function(elem) {
						insert(elem, 1);
					});
					dictionary = "";
				}
			}
			build();
			return {
				insert,
				lookup,
				remove,
				search
			};
		};
	})))(), 1);
	function parseInjectSchemas(schemas) {
		return Object.fromEntries(Object.entries(schemas).filter(([key]) => key.endsWith("InjectSchema")).map(([key, schema]) => [Inject_default[key.replace(/InjectSchema$/, "")], InjectWithMeta(schema)]));
	}
	var groupedInjectSchemas = {
		general: parseInjectSchemas(general_exports),
		object: parseInjectSchemas(object_exports),
		array: parseInjectSchemas(array_exports),
		anime: parseInjectSchemas(anime_exports),
		settings: parseInjectSchemas(settings_exports),
		math: parseInjectSchemas(math_exports),
		operators: parseInjectSchemas(operators_exports),
		accordions: parseInjectSchemas(accordions_exports),
		snippets: parseInjectSchemas(snippets_exports)
	};
	var injectSchemas = Object.assign({}, ...Object.values(groupedInjectSchemas));
	var injectTypes = Object.keys(injectSchemas);
	var injectDict = new import_spelling.default(injectTypes);
	var safeInjects = [
		...Object.keys(groupedInjectSchemas.settings),
		...Object.keys(groupedInjectSchemas.math),
		...Object.keys(groupedInjectSchemas.operators),
		...Object.keys(groupedInjectSchemas.array),
		...Object.keys(groupedInjectSchemas.snippets),
		Inject_default.UtilsRandom,
		Inject_default.UtilsGet,
		Inject_default.Element,
		Inject_default.Hast,
		Inject_default.Container,
		Inject_default.Anchor,
		Inject_default.Module,
		Inject_default.ModuleType,
		Inject_default.Type,
		Inject_default.Assign,
		Inject_default.StringTemplate,
		Inject_default.Undefined,
		Inject_default.VarGet,
		Inject_default.Rect,
		Inject_default.Window,
		Inject_default.Mouse,
		Inject_default.IsIntersected,
		Inject_default.If,
		Inject_default.Switch,
		Inject_default.Raw,
		Inject_default.Vector,
		Inject_default.Rotate
	];
	var layoutDependentInjects = [Inject_default.Hast];
	//#endregion
	//#region shared/documentation.js
	var Documentation = new class Documentation {
		Definition = {
			Pack: "pack",
			Animation: "animation",
			Meta: "meta",
			Settings: "settings",
			Animate: "animate",
			Anime: "anime",
			Snippet: "snippet",
			Easing: "easing"
		};
		Setting = {
			Duration: "duration",
			Position: "position",
			Direction: "direction",
			Variant: "variant",
			Easing: "easing",
			Overflow: "overflow"
		};
		get baseUrl() {
			return "https://docs.betteranimations.net";
		}
		get referenceBaseUrl() {
			return `${this.baseUrl}/reference`;
		}
		get injectsBaseUrl() {
			return `${this.referenceBaseUrl}/injects`;
		}
		get homeUrl() {
			return this.baseUrl;
		}
		get usageUrl() {
			return `${this.baseUrl}/usage/basics`;
		}
		get createUrl() {
			return `${this.baseUrl}/create/introduction`;
		}
		get packDirectoryUrl() {
			return `${this.baseUrl}/usage/pack-directory`;
		}
		get enhanceLayoutUrl() {
			return `${this.baseUrl}/usage/modules#enhance-layout`;
		}
		get accordionUrl() {
			return `${this.baseUrl}/usage/basics#expand-collapse-animations`;
		}
		get themeCompatibilityUrl() {
			return `${this.baseUrl}/usage/theme-compatibility`;
		}
		getDefinitionUrl(definition) {
			return `${this.referenceBaseUrl}/${definition.toLowerCase()}`;
		}
		getInjectGroup(inject) {
			return Object.keys(groupedInjectSchemas).find((group) => inject in groupedInjectSchemas[group] && group !== "operators");
		}
		getInjectAnchor(inject) {
			return inject.match(/[a-zA-Z0-9]+/g).join("-").toLowerCase();
		}
		getInjectUrl(inject) {
			const group = this.getInjectGroup(inject);
			if (!group) return;
			return `${this.injectsBaseUrl}/${group}#${this.getInjectAnchor(inject)}`;
		}
		getSettingUrl(setting) {
			const section = [this.Setting.Easing, this.Setting.Overflow].includes(setting) ? "advanced-animation-settings" : "animation-settings";
			return `${this.baseUrl}/usage/${section}#${setting.toLowerCase()}`;
		}
	}();
	//#endregion
	//#region shared/animation/schemas/ParsableSchema.js
	var ParsableSchema = (stage, schema) => (context, env) => (![ParseStage_default.Initialize, stage].includes(env.stage) ? anyType() : anyType().transform((value, ctx) => parseInjectable(value, context, env, { path: ctx.path }))).transform((value, ctx) => {
		try {
			return (env.stage === stage ? typeof schema === "function" ? schema(context, env) : schema : anyType()).parse(value, { path: ctx.path });
		} catch (error) {
			throw new AnimationError(context.animation, formatZodError(error, {
				pack: context.pack,
				data: value,
				context,
				path: ctx.path,
				docs: Documentation.getDefinitionUrl(Documentation.Definition.Animate)
			}), {
				module: context.module,
				pack: context.pack,
				type: context.type,
				context
			});
		}
	});
	//#endregion
	//#region shared/utils/anime.js
	function promisify(instance) {
		if (instance.finished) return instance.finished;
		instance.finished = Promise.resolve(instance);
		return instance.finished;
	}
	function mergeInlineStyles(instances) {
		return [].concat(instances).reduce((styles, instance) => Object.assign(styles, instance._inlineStyles), {});
	}
	function intersect(instance, withInstances = null) {
		if (!instance) return instance;
		if (withInstances) instance._inlineStyles = mergeInlineStyles(withInstances);
		return instance;
	}
	//#endregion
	//#region shared/animation/schemas/AnimeSchema.js
	var AnimeBaseSchema = (type, isDefault = false) => SourceMappedObjectSchema.extend({ type: isDefault ? literalType(type).optional() : literalType(type) }).strict();
	var AnimeTimerSchema = AnimeBaseSchema("timer").extend({ parameters: ParametersSchema });
	var AnimeAnimationSchema = (context) => AnimeBaseSchema("animation", true).extend({
		targets: TargetsSchema(context),
		parameters: ParametersSchema
	});
	var AnimeWAAPISchema = (context) => AnimeBaseSchema("waapi").extend({
		targets: TargetsSchema(context),
		parameters: ParametersSchema
	});
	var AnimeTimelineChildBaseSchema = (type, isDefault = false) => AnimeBaseSchema(type, isDefault).extend({ position: unionType([
		numberType(),
		stringType(),
		TrustedFunctionSchema
	]).optional() });
	var AnimeTimelineAddChildSchema = (context) => AnimeTimelineChildBaseSchema("add", true).extend({
		targets: TargetsSchema(context).optional(),
		parameters: ParametersSchema
	});
	var AnimeTimelineSetChildSchema = (context) => AnimeTimelineChildBaseSchema("set").extend({
		targets: TargetsSchema(context),
		parameters: ParametersSchema
	});
	var AnimeTimelineLabelChildSchema = AnimeTimelineChildBaseSchema("label").extend({ name: stringType() });
	var AnimeTimelineCallChildSchema = AnimeTimelineChildBaseSchema("call").extend({ callback: TrustedFunctionSchema });
	var AnimeTimelineChildSchema = (context) => discriminatedUnionType("type", [
		AnimeTimelineAddChildSchema(context),
		AnimeTimelineSetChildSchema(context),
		AnimeTimelineLabelChildSchema,
		AnimeTimelineCallChildSchema
	]);
	var AnimeTimelineSchema = (context) => AnimeBaseSchema("timeline").extend({
		parameters: ParametersSchema.optional(),
		children: arrayType(AnimeTimelineChildSchema(context)).nonempty()
	});
	function prepareParameters(parameters) {
		return Object.assign(parameters ? clearSourceMapDeep(parameters) : {}, { autoplay: false });
	}
	function buildInstance({ type, targets, parameters, children }) {
		parameters = prepareParameters(parameters);
		switch (type) {
			case "timer": return createTimer(parameters);
			case "timeline": {
				const tl = createTimeline(parameters);
				clearSourceMapDeep(children).forEach((child) => {
					switch (child.type) {
						case "set": return tl.set(child.targets, prepareParameters(child.parameters), child.position);
						case "label": return tl.label(child.name, child.position);
						case "call": return tl.call(child.callback, child.position);
						default: return tl.add(...(child.targets ? [child.targets] : []).concat([prepareParameters(child.parameters), child.position]));
					}
				});
				return tl;
			}
			case "waapi": return waapi.animate(targets, parameters);
			default: return animate(targets, parameters);
		}
	}
	var AnimeInstanceSchema = (context) => discriminatedUnionType("type", [
		AnimeTimerSchema,
		AnimeAnimationSchema(context),
		AnimeWAAPISchema(context),
		AnimeTimelineSchema(context)
	]).transform(zodTransformErrorBoundary((options) => storeInjectable(intersect(buildInstance(options), context.intersectWith?.instances), options)));
	var AnimeSchema = (context) => ArrayOrSingleSchema(ArrayOrSingleSchema(AnimeInstanceSchema(context).nullable())).transform((instances) => [].concat(instances).flat().filter((i) => i != null)).refine((instances) => instances.length > 0, { message: "No anime instances created" });
	//#endregion
	//#region shared/animation/schemas/ParsableAnimateSchema.js
	function buildPreLayoutEnv(env) {
		return Object.assign({ disallowed: layoutDependentInjects }, env);
	}
	function buildLayoutEnv(env) {
		return Object.assign({
			allowed: safeInjects,
			disallowed: layoutDependentInjects
		}, env);
	}
	var HookSchema = (context, env, stage) => ParsableSchema(stage, (context) => ArrayOrSingleSchema(ArrayOrSingleSchema(TrustedFunctionSchema.nullable())).transform(zodTransformErrorBoundary((value, ctx) => {
		const hook = () => executeWithZod(value, (value, ctx) => {
			[].concat(value).flat().forEach((fn, i) => {
				if (!fn) return;
				try {
					fn();
				} catch (error) {
					ctx.addIssue({
						code: ZodIssueCode.custom,
						message: error.message,
						path: Array.isArray(value) ? [i] : [],
						params: {
							error,
							received: fn
						}
					});
				}
			});
		}, context, ctx);
		return storeInjectable(hook, value);
	})).optional())(context, env);
	var HastSchema = ParsableSchema(ParseStage_default.Layout, ArrayOrSingleSchema(ArrayOrSingleSchema(recordType(anyType()).nullable())).transform(zodTransformErrorBoundary((value, ctx) => {
		return [].concat(value).flat().filter(Boolean).map((node, i) => {
			const sanitized = sanitize(clearSourceMapDeep(node), hastSanitizeSchema);
			if (sanitized.type === "root") {
				ctx.addIssue({
					code: ZodIssueCode.custom,
					message: "Invalid or forbidden hast node",
					path: Array.isArray(value) ? [i] : [],
					params: { received: node }
				});
				return NEVER;
			}
			return storeInjectable(toDom(sanitized), value);
		});
	})).optional());
	var CssSchema = ParsableSchema(ParseStage_default.Layout, ArrayOrSingleSchema(ArrayOrSingleSchema(recordType(unionType([recordType(unionType([
		stringType(),
		numberType(),
		SourceMapSchema
	])), SourceMapSchema])).nullable())).optional());
	var ParsableAnimeSchema = ParsableSchema(ParseStage_default.Anime, AnimeSchema);
	var ParsableAnimateSchema = (context, env) => {
		const preLayoutEnv = buildPreLayoutEnv(env);
		const layoutEnv = buildLayoutEnv(env);
		return SourceMappedObjectSchema.extend({
			onBeforeLayout: HookSchema(context, preLayoutEnv, ParseStage_default.BeforeLayout),
			hast: HastSchema(context, layoutEnv),
			css: CssSchema(context, layoutEnv),
			onBeforeCreate: HookSchema(context, env, ParseStage_default.BeforeCreate),
			anime: ParsableAnimeSchema(context, env),
			onCreated: HookSchema(context, env, ParseStage_default.Created),
			onBeforeBegin: HookSchema(context, env, ParseStage_default.BeforeBegin),
			onCompleted: HookSchema(context, env, ParseStage_default.Completed),
			onBeforeDestroy: HookSchema(context, preLayoutEnv, ParseStage_default.BeforeDestroy),
			onDestroyed: HookSchema(context, preLayoutEnv, ParseStage_default.Destroyed)
		}).strict();
	};
	//#endregion
	//#region shared/animation/schemas/ParsableExtendableAnimateSchema.js
	var ExtendsSchema = ParsableSchema(ParseStage_default.Extend, anyType());
	var ParsableExtendableAnimateSchema = (context, env) => {
		const preLayoutEnv = buildPreLayoutEnv(env);
		return ParsableAnimateSchema(context, env).extend({
			onBeforeExtend: HookSchema(context, preLayoutEnv, ParseStage_default.BeforeExtend),
			extends: ArrayOrSingleSchema(ExtendsSchema(context, preLayoutEnv)).optional()
		}).strict();
	};
	var ParsableExtendsSchema = (context, env) => ArrayOrSingleSchema(ParsableExtendableAnimateSchema(context, env).nullable()).optional();
	//#endregion
	//#region shared/animation/parser.js
	function buildContext(pack, animation, type, settings = {}, meta = {}, context = {}) {
		return Object.assign({
			pack,
			animation,
			settings: animation?.settings,
			meta,
			type,
			vars: {}
		}, settings, context);
	}
	function buildWrapper(data, context) {
		if (!data.hast && !data.css) return null;
		const id = `${context.module.id}-${context.type}-${Date.now()}`;
		const wrapper = context.document.createElement("div");
		wrapper.setAttribute("data-baa", id);
		wrapper.append(...[].concat(data.hast).filter(isElement));
		if (data.css) {
			const parent = `[data-baa="${id}"]`;
			wrapper.append(...[].concat(data.css).flat().filter(Boolean).map((css, cssIndex) => {
				const element = context.document.createElement("style");
				element.appendChild(context.document.createTextNode(buildCSS(clearSourceMapDeep(css), (selector, selectorIndex) => {
					if (selector === "{element}") return `${parent} + *`;
					if (selector === "{container}") return `[data-ba-container]:has(> ${parent})`;
					const attribute = `data-baa-${id}-${cssIndex}-${selectorIndex}`;
					try {
						wrapper.querySelectorAll(selector).forEach((e) => e.setAttribute(attribute, ""));
					} catch {
						Debug.animation(context.animation, context.type).invalidSelector(selector, getSourcePath(css, selector) ?? context.path.concat("css"), context);
					}
					return `[${attribute}]`;
				})));
				return element;
			}));
		}
		return wrapper;
	}
	function parse$1(data = null, context, options = {}) {
		const debug = context.animation ? Debug.animation(context.animation, context.type) : null;
		const _parseStage = (stage, data, schema, path = []) => {
			path = context.path.concat(path);
			const groupEnd = debug?.parseStart(stage, data, context);
			try {
				data = data ? schema(context, { stage }).parse(data, { path }) : {};
				debug?.parseEnd(stage, data, context);
				return data;
			} catch (error) {
				groupEnd?.();
				context.onError(error instanceof AnimationError ? error : new AnimationError(context.animation, formatZodError(error, {
					pack: context.pack,
					data,
					context,
					path,
					docs: Documentation.getDefinitionUrl(Documentation.Definition.Animate)
				}), {
					module: context.module,
					pack: context.pack,
					type: context.type,
					context
				}));
				context.instance.cancel(true);
				return null;
			} finally {
				groupEnd?.();
			}
		};
		const _hook = (name, stage, data, schema, path = []) => {
			debug?.hook(name, context);
			if (!(name in (data ?? {}))) return data;
			data = _parseStage(stage, data, schema, path);
			if (data === null) return null;
			data[name]?.();
			return data;
		};
		const extend = (data, path = [], _depth = 1) => {
			if (_depth > 10) {
				context.onError(new AnimationError(context.animation, "Maximum extend depth exceeded", {
					module: context.module,
					pack: context.pack,
					type: context.type,
					context
				}));
				context.instance.cancel(true);
				return {
					success: false,
					data
				};
			}
			if (!("extends" in (data ?? {}))) return {
				success: true,
				data
			};
			if (_hook("onBeforeExtend", ParseStage_default.BeforeExtend, data, ParsableExtendableAnimateSchema, path) === null) return {
				success: false,
				data
			};
			data = omit(data, ["onBeforeExtend"]);
			let _data = _parseStage(ParseStage_default.Extend, data, ParsableExtendableAnimateSchema, path);
			if (_data === null) return {
				success: false,
				data
			};
			_data.extends = _parseStage(ParseStage_default.Initialize, _data.extends, ParsableExtendsSchema, path.concat("extends"));
			if (_data.extends === null) return {
				success: false,
				data
			};
			const _extends = [];
			for (const value of [].concat(_data.extends)) {
				const { success, data } = extend(value, path.concat("extends", Array.isArray(_data.extends) ? _data.extends.indexOf(value) : []), _depth + 1);
				if (!success) return {
					success: false,
					data
				};
				_extends.unshift(data);
			}
			data = omit(data, ["extends"]);
			_extends.forEach((value) => {
				if (!value) return;
				sourceMappedObjectEntries(value).forEach(([key, value]) => {
					if (!data[key]) data[key] = [];
					data[key] = [].concat(value).concat(data[key]);
				});
			});
			return {
				success: true,
				data
			};
		};
		const parseStage = (stage, schema = ParsableAnimateSchema) => {
			if (data === null) return true;
			const _data = _parseStage(stage, data, schema);
			if (_data === null) return false;
			data = _data;
			return true;
		};
		const hook = (name, stage, schema = ParsableAnimateSchema) => {
			if (data === null) return true;
			const _data = _hook(name, stage, data, schema);
			if (_data === null) return false;
			data = _data;
			return !context.instance.cancelled;
		};
		let before, after, accordion;
		const sharedHook = (name, stage, schema = ParsableExtendableAnimateSchema) => () => {
			before?.[name]?.();
			after?.[name]?.();
			return hook(name, stage, schema);
		};
		context.instance.onBeforeDestroy = sharedHook("onBeforeDestroy", ParseStage_default.BeforeDestroy);
		context.instance.onDestroyed = sharedHook("onDestroyed", ParseStage_default.Destroyed);
		parsing: {
			const { success, data: _data } = extend(data);
			data = _data;
			if (!success) break parsing;
			if (!hook("onBeforeLayout", ParseStage_default.BeforeLayout)) break parsing;
			if (!parseStage(ParseStage_default.Layout)) break parsing;
			context.wrapper = data ? buildWrapper(data, context) : null;
			if (!hook("onBeforeCreate", ParseStage_default.BeforeCreate)) break parsing;
			if (!parseStage(ParseStage_default.Anime)) break parsing;
			if (!hook("onCreated", ParseStage_default.Created)) break parsing;
			before = options.before && (!context.intersectWith?.accordion || context.intersectWith.accordion.began) ? options.before(context) : null;
			after = options.after ? options.after(context) : null;
			accordion = intersect(before?.execute() ?? after?.execute() ?? null, context.intersectWith?.accordion);
		}
		const instances = !context.instance.cancelled ? data?.anime ?? [] : [];
		instances.pause = () => instances.concat(accordion).forEach((i) => i?.pause());
		instances.cancel = () => instances.concat(accordion).forEach((i) => i?.cancel());
		instances.revert = () => instances.concat(accordion).forEach((i) => i?.revert());
		const finishedAll = Promise.all(instances.map(promisify));
		const raf = (fn) => context.window.requestAnimationFrame(() => !context.instance.cancelled && fn());
		let onBeforeBegin;
		const begin = (immediate = true) => {
			if (context.instance.cancelled) return;
			onBeforeBegin = () => hook("onBeforeBegin", ParseStage_default.BeforeBegin);
			if (!immediate) {
				onBeforeBegin();
				if (context.instance.cancelled) return;
			}
			raf(() => instances.forEach(after && context.intersectWith?.accordion && !context.intersectWith.accordion.completed ? (i) => i.complete() : (i) => i.resume()));
		};
		if (before) {
			onBeforeBegin = () => before.onBeforeBegin?.();
			raf(() => {
				accordion.play();
			});
			promisify(accordion).then(() => {
				before.onCompleted?.();
				begin(false);
			});
		} else begin();
		return {
			wrapper: context.wrapper,
			onBeforeBegin,
			accordion,
			instances,
			finished: finishedAll.then(() => {
				if (context.instance.cancelled) return;
				if (!hook("onCompleted", ParseStage_default.Completed)) return;
				if (before) return promisify(accordion);
				if (after) {
					after.onBeforeBegin?.();
					raf(() => accordion.play());
					return promisify(accordion).then(() => after.onCompleted?.());
				}
			})
		};
	}
	//#endregion
	//#region shared/animation/schemas/MetaSchema.js
	var metaOverridePresets = { accordion: [{
		for: { module: [
			ModuleKey_default.Messages,
			ModuleKey_default.MembersSidebar,
			ModuleKey_default.ThreadSidebar
		] },
		accordion: false
	}, {
		for: {
			module: ModuleKey_default.Messages,
			type: AnimationType_default.Exit
		},
		accordion: true
	}] };
	var MetaSchema = OverridableSchema(strictObjectType({
		intersect: booleanType().optional().default(true),
		revert: booleanType().optional().default(true),
		accordion: booleanType().optional().default(true)
	}), { presets: Object.keys(metaOverridePresets) });
	//#endregion
	//#region shared/enums/Auto.js
	function Auto(enumInstance) {
		if (!enumInstance) return "auto";
		return Enum({
			...enumInstance.raw,
			Auto: "auto"
		});
	}
	var preinstalled_pack_default = {
		name: "preinstalled",
		version: "0.0.0",
		snippets: [
			{
				"key": "opacity",
				"value": {
					"inject": "type",
					"enter": {
						"inject": "isIntersected",
						"true": 1,
						"false": [0, 1]
					},
					"exit": 0
				}
			},
			{
				"key": "directionalTranslate",
				"params": {
					"value": 5,
					"negativeValue": -5
				},
				"value": {
					"inject": "vector",
					"values": {
						"inject": "type",
						"enter": {
							"inject": "isIntersected",
							"true": {
								"inject": "direction",
								"upwards": { "y": 0 },
								"downwards": { "y": 0 },
								"leftwards": { "x": 0 },
								"rightwards": { "x": 0 }
							},
							"false": {
								"inject": "direction",
								"upwards": { "y": [{
									"inject": "snippet.params",
									"name": "value"
								}, 0] },
								"downwards": { "y": [{
									"inject": "snippet.params",
									"name": "negativeValue"
								}, 0] },
								"leftwards": { "x": [{
									"inject": "snippet.params",
									"name": "value"
								}, 0] },
								"rightwards": { "x": [{
									"inject": "snippet.params",
									"name": "negativeValue"
								}, 0] }
							}
						},
						"exit": {
							"inject": "direction",
							"upwards": { "y": {
								"inject": "snippet.params",
								"name": "negativeValue"
							} },
							"downwards": { "y": {
								"inject": "snippet.params",
								"name": "value"
							} },
							"leftwards": { "x": {
								"inject": "snippet.params",
								"name": "negativeValue"
							} },
							"rightwards": { "x": {
								"inject": "snippet.params",
								"name": "value"
							} }
						}
					}
				}
			},
			{
				"key": "computeCircle",
				"value": [
					{
						"inject": "var.set",
						"name": "radius",
						"value": {
							"inject": "string.template",
							"template": "${value}px",
							"values": { "value": {
								"inject": "math.hypot",
								"values": [{
									"inject": "math.max",
									"values": [{
										"inject": "math.abs",
										"value": {
											"inject": "position",
											"value": "x",
											"clip": false
										}
									}, {
										"inject": "math.abs",
										"value": {
											"a": {
												"inject": "position",
												"value": "x",
												"clip": false
											},
											"inject": "-",
											"b": {
												"inject": "rect",
												"value": "width"
											}
										}
									}]
								}, {
									"inject": "math.max",
									"values": [{
										"inject": "math.abs",
										"value": {
											"inject": "position",
											"value": "y",
											"clip": false
										}
									}, {
										"inject": "math.abs",
										"value": {
											"a": {
												"inject": "position",
												"value": "y",
												"clip": false
											},
											"inject": "-",
											"b": {
												"inject": "rect",
												"value": "height"
											}
										}
									}]
								}]
							} }
						}
					},
					{
						"inject": "var.set",
						"name": "clipPathExpanded",
						"value": {
							"inject": "string.template",
							"template": "circle(${radius} at ${position})",
							"values": {
								"radius": {
									"inject": "var.get",
									"name": "radius"
								},
								"position": {
									"inject": "position",
									"clip": false
								}
							}
						}
					},
					{
						"inject": "var.set",
						"name": "clipPathCollapsed",
						"value": {
							"inject": "string.template",
							"template": "circle(0px at ${position})",
							"values": { "position": {
								"inject": "position",
								"clip": false
							} }
						}
					}
				]
			}
		],
		animations: [
			{
				"key": "fade",
				"name": "Fade",
				"meta": { "override": { "preset": "accordion" } },
				"settings": {
					"duration": true,
					"easing": true,
					"defaults": {
						"duration": 200,
						"easing": { "type": "ease" },
						"override": [{
							"for": { "module": [
								"switch",
								"messages",
								"sidebars"
							] },
							"easing": {
								"type": "ease",
								"style": "quart"
							}
						}, {
							"for": { "module": ["switch", "sidebars"] },
							"duration": 400
						}]
					}
				},
				"animate": {
					"extends": { "inject": "accordion" },
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"duration": { "inject": "duration" },
							"ease": { "inject": "easing" },
							"opacity": {
								"inject": "snippet",
								"key": "opacity"
							}
						}
					}
				}
			},
			{
				"key": "slip",
				"name": "Slip",
				"settings": {
					"duration": true,
					"easing": true,
					"direction": true,
					"defaults": {
						"duration": 200,
						"easing": { "type": "back" },
						"direction": "upwards",
						"override": [
							{
								"for": {
									"module.type": "reveal",
									"type": "exit"
								},
								"direction": "downwards",
								"directionTowards": true
							},
							{
								"for": { "module": ["switch", "modals"] },
								"easing": {
									"type": "ease",
									"style": "quart"
								}
							},
							{
								"for": { "module": "channelList" },
								"direction": "downwards"
							},
							{
								"for": {
									"module": "channelList",
									"type": "exit"
								},
								"direction": "upwards"
							}
						]
					}
				},
				"animate": { "anime": {
					"type": "waapi",
					"targets": { "inject": "element" },
					"parameters": {
						"duration": { "inject": "duration" },
						"ease": { "inject": "easing" },
						"opacity": {
							"inject": "snippet",
							"key": "opacity"
						},
						"translate": {
							"inject": "snippet",
							"key": "directionalTranslate",
							"params": {
								"value": 5,
								"negativeValue": -5
							}
						}
					}
				} }
			},
			{
				"key": "slide",
				"name": "Slide",
				"modules": [
					"switch",
					"messages",
					"channelList"
				],
				"meta": { "override": { "preset": "accordion" } },
				"settings": {
					"duration": true,
					"easing": true,
					"direction": true,
					"overflow": false,
					"defaults": {
						"duration": 600,
						"easing": {
							"type": "ease",
							"style": "quart"
						},
						"direction": "upwards",
						"overflow": false,
						"override": [{
							"for": { "module": ["messages", "channelList"] },
							"duration": 400,
							"direction": "rightwards",
							"overflow": true
						}, {
							"for": {
								"module": ["messages", "channelList"],
								"type": "exit"
							},
							"direction": "leftwards"
						}]
					}
				},
				"animate": {
					"extends": { "inject": "accordion" },
					"css": { "{container}": { "z-index": {
						"inject": "type",
						"enter": 2,
						"exit": 1
					} } },
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"duration": { "inject": "duration" },
							"ease": { "inject": "easing" },
							"translate": {
								"inject": "snippet",
								"key": "directionalTranslate",
								"params": {
									"value": "100%",
									"negativeValue": "-100%"
								}
							}
						}
					}
				}
			},
			{
				"key": "scale",
				"name": "Scale",
				"settings": {
					"duration": true,
					"easing": true,
					"position": true,
					"direction": ["forwards", "backwards"],
					"defaults": {
						"duration": 200,
						"easing": { "type": "back" },
						"position": "center",
						"direction": "backwards",
						"override": [
							{
								"for": {
									"type": "exit",
									"module.type": "reveal"
								},
								"direction": "forwards"
							},
							{
								"for": { "module.type": "switch" },
								"easing": {
									"type": "ease",
									"style": "cubic"
								}
							},
							{
								"for": { "module": ["messages", "channelList"] },
								"position": "left"
							}
						]
					}
				},
				"animate": {
					"css": { "{element}": { "transform-origin": { "inject": "position" } } },
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"duration": { "inject": "duration" },
							"ease": { "inject": "easing" },
							"opacity": {
								"inject": "snippet",
								"key": "opacity"
							},
							"scale": {
								"inject": "type",
								"enter": {
									"inject": "isIntersected",
									"true": 1,
									"false": [{
										"inject": "direction",
										"forwards": 1.1,
										"backwards": .9
									}, 1]
								},
								"exit": {
									"inject": "direction",
									"forwards": .9,
									"backwards": 1.1
								}
							}
						}
					}
				}
			},
			{
				"key": "point",
				"name": "Point",
				"modules": [
					"popouts",
					"tooltips",
					"contextMenu"
				],
				"settings": {
					"duration": true,
					"easing": true,
					"position": true,
					"defaults": {
						"duration": 400,
						"easing": {
							"type": "ease",
							"bezier": "out",
							"style": "quart"
						},
						"position": "center",
						"override": [{
							"for": { "type": "exit" },
							"easing": {
								"type": "ease",
								"bezier": "in",
								"style": "quart"
							}
						}, {
							"for": { "module": ["tooltips", "contextMenu"] },
							"duration": 200
						}]
					}
				},
				"animate": {
					"css": { "{element}": { "transform-origin": { "inject": "position" } } },
					"onBeforeCreate": [{
						"inject": "var.set",
						"name": "x",
						"value": {
							"a": {
								"inject": "position",
								"value": "x",
								"clip": {
									"a": { "inject": "module" },
									"inject": "===",
									"b": "contextMenu"
								}
							},
							"inject": "-",
							"b": {
								"inject": "position",
								"value": "x"
							}
						}
					}, {
						"inject": "var.set",
						"name": "y",
						"value": {
							"a": {
								"inject": "position",
								"value": "y",
								"clip": {
									"a": { "inject": "module" },
									"inject": "===",
									"b": "contextMenu"
								}
							},
							"inject": "-",
							"b": {
								"inject": "position",
								"value": "y"
							}
						}
					}],
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"duration": { "inject": "duration" },
							"ease": { "inject": "easing" },
							"scale": {
								"inject": "type",
								"enter": {
									"inject": "isIntersected",
									"true": 1,
									"false": [0, 1]
								},
								"exit": 0
							},
							"translate": {
								"inject": "vector",
								"values": {
									"inject": "type",
									"enter": {
										"inject": "isIntersected",
										"true": {
											"x": 0,
											"y": 0
										},
										"false": {
											"x": [{
												"inject": "var.get",
												"name": "x"
											}, 0],
											"y": [{
												"inject": "var.get",
												"name": "y"
											}, 0]
										}
									},
									"exit": {
										"x": {
											"inject": "var.get",
											"name": "x"
										},
										"y": {
											"inject": "var.get",
											"name": "y"
										}
									}
								}
							}
						}
					}
				}
			},
			{
				"key": "blur",
				"name": "Blur",
				"meta": { "override": { "preset": "accordion" } },
				"settings": {
					"duration": true,
					"easing": true,
					"defaults": {
						"duration": 200,
						"easing": { "type": "ease" },
						"override": [{
							"for": { "module": [
								"switch",
								"messages",
								"sidebars"
							] },
							"easing": {
								"type": "ease",
								"style": "quart"
							}
						}, {
							"for": { "module": ["switch", "sidebars"] },
							"duration": 400
						}]
					}
				},
				"animate": {
					"extends": { "inject": "accordion" },
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"duration": { "inject": "duration" },
							"ease": { "inject": "easing" },
							"opacity": {
								"inject": "snippet",
								"key": "opacity"
							},
							"filter": {
								"inject": "type",
								"enter": {
									"inject": "isIntersected",
									"true": "blur(0)",
									"false": ["blur(12px)", "blur(0)"]
								},
								"exit": "blur(12px)"
							}
						}
					}
				}
			},
			{
				"key": "flip",
				"name": "Flip",
				"modules": ["reveal", "sidebars"],
				"meta": { "override": { "preset": "accordion" } },
				"settings": {
					"duration": true,
					"easing": true,
					"position": true,
					"direction": ["forwards", "backwards"],
					"variant": [{
						"key": "horizontal",
						"name": "Horizontal"
					}, {
						"key": "vertical",
						"name": "Vertical"
					}],
					"defaults": {
						"duration": 400,
						"easing": {
							"type": "ease",
							"style": "quart"
						},
						"position": "center",
						"direction": "forwards",
						"variant": "horizontal",
						"override": [
							{
								"for": { "type": "exit" },
								"direction": "backwards"
							},
							{
								"for": { "module": [
									"tooltips",
									"channelList",
									"contextMenu"
								] },
								"duration": 200
							},
							{
								"for": { "module": "tooltips" },
								"easing": { "type": "back" }
							},
							{
								"for": { "module": "messages" },
								"position": "top"
							},
							{
								"for": { "module": "sidebars" },
								"position": "right",
								"variant": "vertical"
							}
						]
					}
				},
				"animate": {
					"extends": {
						"inject": "accordion",
						"type": {
							"inject": "switch",
							"value": { "inject": "module" },
							"case": {
								"membersSidebar": "marginLeft",
								"threadSidebar": "marginLeft"
							},
							"default": { "inject": "undefined" }
						}
					},
					"onBeforeLayout": [{
						"inject": "var.set",
						"name": "origin",
						"value": {
							"inject": "string.template",
							"template": {
								"inject": "variant",
								"horizontal": "50% ${value}px",
								"vertical": "${value}px 50%"
							},
							"values": { "value": {
								"inject": "position",
								"value": {
									"inject": "variant",
									"horizontal": "y",
									"vertical": "x"
								}
							} }
						}
					}, {
						"inject": "var.set",
						"name": "rotate",
						"value": {
							"inject": "type",
							"enter": {
								"inject": "isIntersected",
								"true": 0,
								"false": [{
									"inject": "direction",
									"forwards": -90,
									"backwards": 90
								}, 0]
							},
							"exit": {
								"inject": "direction",
								"forwards": 90,
								"backwards": -90
							}
						}
					}],
					"css": {
						"{container}": {
							"perspective": {
								"a": {
									"inject": "math.max",
									"values": [{
										"a": {
											"inject": "rect",
											"value": {
												"inject": "variant",
												"horizontal": "height",
												"vertical": "width"
											}
										},
										"inject": "*",
										"b": 1.75
									}, 150]
								},
								"inject": "+",
								"b": "px"
							},
							"perspective-origin": {
								"inject": "var.get",
								"name": "origin"
							}
						},
						"{element}": { "transform-origin": {
							"inject": "var.get",
							"name": "origin"
						} }
					},
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"duration": { "inject": "duration" },
							"ease": { "inject": "easing" },
							"opacity": {
								"inject": "snippet",
								"key": "opacity"
							},
							"rotate": {
								"inject": "rotate",
								"axis": {
									"inject": "variant",
									"horizontal": "x",
									"vertical": "y"
								},
								"angle": {
									"inject": "var.get",
									"name": "rotate"
								}
							}
						}
					}
				}
			},
			{
				"key": "outOfBounds",
				"name": "Out-of-bounds",
				"modules": [
					"popouts",
					"contextMenu",
					"modals"
				],
				"settings": {
					"duration": true,
					"easing": true,
					"direction": true,
					"defaults": {
						"duration": 400,
						"easing": {
							"type": "ease",
							"bezier": "out",
							"style": "quart"
						},
						"direction": "upwards",
						"override": [{
							"for": { "type": "exit" },
							"easing": {
								"type": "ease",
								"bezier": "in",
								"style": "quart"
							},
							"direction": "downwards",
							"directionTowards": true
						}, {
							"for": { "module": "tooltips" },
							"duration": 200
						}]
					}
				},
				"animate": {
					"css": { "{element}": { "pointer-events": "none" } },
					"onBeforeCreate": [
						{
							"inject": "var.set",
							"name": "left",
							"value": {
								"a": {
									"inject": "rect",
									"value": "left"
								},
								"inject": "+",
								"b": {
									"inject": "rect",
									"value": "width"
								}
							}
						},
						{
							"inject": "var.set",
							"name": "top",
							"value": {
								"a": {
									"inject": "rect",
									"value": "top"
								},
								"inject": "+",
								"b": {
									"inject": "rect",
									"value": "height"
								}
							}
						},
						{
							"inject": "var.set",
							"name": "right",
							"value": {
								"a": {
									"inject": "window",
									"value": "width"
								},
								"inject": "-",
								"b": {
									"inject": "rect",
									"value": "left"
								}
							}
						},
						{
							"inject": "var.set",
							"name": "bottom",
							"value": {
								"a": {
									"inject": "window",
									"value": "height"
								},
								"inject": "-",
								"b": {
									"inject": "rect",
									"value": "top"
								}
							}
						},
						{
							"inject": "var.set",
							"name": "value",
							"value": {
								"a": {
									"inject": "var.get",
									"name": {
										"inject": "direction",
										"rightwards": {
											"inject": "type",
											"enter": "left",
											"exit": "right"
										},
										"downwards": {
											"inject": "type",
											"enter": "top",
											"exit": "bottom"
										},
										"leftwards": {
											"inject": "type",
											"enter": "right",
											"exit": "left"
										},
										"upwards": {
											"inject": "type",
											"enter": "bottom",
											"exit": "top"
										}
									}
								},
								"inject": "+",
								"b": 20
							}
						}
					],
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"duration": { "inject": "duration" },
							"ease": { "inject": "easing" },
							"translate": {
								"inject": "snippet",
								"key": "directionalTranslate",
								"params": {
									"value": {
										"inject": "var.get",
										"name": "value"
									},
									"negativeValue": {
										"a": {
											"inject": "var.get",
											"name": "value"
										},
										"inject": "*",
										"b": -1
									}
								}
							}
						}
					}
				}
			},
			{
				"key": "circle",
				"name": "Circle",
				"modules": [
					"servers",
					"channels",
					"settings",
					"popouts",
					"contextMenu",
					"sidebars"
				],
				"settings": {
					"duration": true,
					"easing": true,
					"position": true,
					"defaults": {
						"duration": 200,
						"easing": { "type": "ease" },
						"position": "center",
						"override": {
							"for": { "module": "switch" },
							"duration": 400
						}
					}
				},
				"animate": {
					"onBeforeCreate": {
						"inject": "snippet",
						"key": "computeCircle"
					},
					"css": { "{container}": { "z-index": {
						"inject": "type",
						"enter": 2,
						"exit": 1
					} } },
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"duration": { "inject": "duration" },
							"ease": { "inject": "easing" },
							"clipPath": {
								"inject": "type",
								"enter": {
									"inject": "isIntersected",
									"true": {
										"inject": "var.get",
										"name": "clipPathExpanded"
									},
									"false": [{
										"inject": "var.get",
										"name": "clipPathCollapsed"
									}, {
										"inject": "var.get",
										"name": "clipPathExpanded"
									}]
								},
								"exit": {
									"inject": "module.type",
									"reveal": {
										"inject": "isIntersected",
										"true": {
											"inject": "var.get",
											"name": "clipPathCollapsed"
										},
										"false": [{
											"inject": "var.get",
											"name": "clipPathExpanded"
										}, {
											"inject": "var.get",
											"name": "clipPathCollapsed"
										}]
									},
									"switch": []
								}
							},
							"opacity": {
								"inject": "module.type",
								"switch": {
									"inject": "type",
									"exit": [1, 0],
									"enter": []
								},
								"reveal": []
							}
						}
					}
				}
			},
			{
				"key": "circleScale",
				"name": "Circle Scale",
				"modules": "switch",
				"settings": {
					"duration": true,
					"easing": true,
					"position": true,
					"direction": ["forwards", "backwards"],
					"defaults": {
						"duration": 400,
						"easing": { "type": "ease" },
						"position": "center",
						"positionPreserve": true,
						"direction": "forwards"
					}
				},
				"animate": { "extends": {
					"inject": "if",
					"value": {
						"a": {
							"a": {
								"a": { "inject": "type" },
								"inject": "===",
								"b": "enter"
							},
							"inject": "&&",
							"b": {
								"a": { "inject": "direction" },
								"inject": "===",
								"b": "forwards"
							}
						},
						"inject": "||",
						"b": {
							"a": {
								"a": { "inject": "type" },
								"inject": "===",
								"b": "exit"
							},
							"inject": "&&",
							"b": {
								"a": { "inject": "direction" },
								"inject": "===",
								"b": "backwards"
							}
						}
					},
					"then": {
						"inject": "raw",
						"value": {
							"css": { "{container}": { "z-index": 2 } },
							"onBeforeCreate": {
								"inject": "snippet",
								"key": "computeCircle"
							},
							"anime": {
								"type": "waapi",
								"targets": { "inject": "element" },
								"parameters": {
									"duration": { "inject": "duration" },
									"ease": { "inject": "easing" },
									"clipPath": {
										"inject": "type",
										"enter": [{
											"inject": "var.get",
											"name": "clipPathCollapsed"
										}, {
											"inject": "var.get",
											"name": "clipPathExpanded"
										}],
										"exit": [{
											"inject": "var.get",
											"name": "clipPathExpanded"
										}, {
											"inject": "var.get",
											"name": "clipPathCollapsed"
										}]
									}
								}
							}
						}
					},
					"else": {
						"inject": "raw",
						"value": {
							"css": {
								"{container}": { "z-index": 1 },
								"{element}": { "transform-origin": { "inject": "position" } }
							},
							"anime": {
								"type": "waapi",
								"targets": { "inject": "element" },
								"parameters": {
									"duration": { "inject": "duration" },
									"ease": { "inject": "easing" },
									"opacity": {
										"inject": "snippet",
										"key": "opacity"
									},
									"scale": {
										"inject": "type",
										"enter": {
											"inject": "direction",
											"backwards": [1.1, 1],
											"forwards": [.9, 1]
										},
										"exit": {
											"inject": "direction",
											"backwards": .9,
											"forwards": 1.1
										}
									}
								}
							}
						}
					}
				} }
			},
			{
				"key": "drawer",
				"name": "Drawer",
				"modules": [
					"servers",
					"channels",
					"settings",
					"popouts",
					"contextMenu"
				],
				"settings": {
					"duration": true,
					"position": true,
					"defaults": {
						"duration": 300,
						"position": "center",
						"override": {
							"for": { "module.type": "switch" },
							"duration": 500
						}
					}
				},
				"animate": {
					"onBeforeCreate": [
						{
							"inject": "var.set",
							"name": "value",
							"value": {
								"a": {
									"inject": "position",
									"value": "y",
									"unit": "%",
									"clip": false
								},
								"inject": "*",
								"b": 100
							}
						},
						{
							"inject": "var.set",
							"name": "isSwitchExit",
							"value": {
								"a": {
									"a": { "inject": "module.type" },
									"inject": "===",
									"b": "switch"
								},
								"inject": "&&",
								"b": {
									"a": { "inject": "type" },
									"inject": "===",
									"b": "exit"
								}
							}
						},
						{
							"inject": "var.set",
							"name": "collapsed",
							"value": {
								"inject": "if",
								"value": {
									"inject": "var.get",
									"name": "isSwitchExit"
								},
								"then": "polygon(0% 0%, 0% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 100%, 100% 100%, 100% 0%)",
								"else": {
									"inject": "string.template",
									"template": "polygon(0% ${value}%, 100% ${value}%, 100% ${value}%, 0% ${value}%)",
									"values": { "value": {
										"inject": "var.get",
										"name": "value"
									} }
								}
							}
						},
						{
							"inject": "var.set",
							"name": "expanded",
							"value": {
								"inject": "if",
								"value": {
									"inject": "var.get",
									"name": "isSwitchExit"
								},
								"then": {
									"inject": "string.template",
									"template": "polygon(0% 0%, 0% ${value}%, 100% ${value}%, 100% ${value}%, 0% ${value}%, 0% 100%, 100% 100%, 100% 0%)",
									"values": { "value": {
										"inject": "var.get",
										"name": "value"
									} }
								},
								"else": "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)"
							}
						},
						{
							"inject": "var.set",
							"name": "translate",
							"value": {
								"a": {
									"inject": "math",
									"expression": {
										"inject": "string.template",
										"template": "(${value} - 0.5) * 100",
										"values": { "value": {
											"inject": "position",
											"value": "x",
											"unit": "%",
											"clip": false
										} }
									}
								},
								"inject": "+",
								"b": "%"
							}
						},
						{
							"inject": "var.set",
							"name": "translateParameters",
							"value": {
								"inject": "type",
								"enter": {
									"inject": "isIntersected",
									"true": "0%",
									"false": [{
										"inject": "var.get",
										"name": "translate"
									}, "0%"]
								},
								"exit": {
									"inject": "var.get",
									"name": "translate"
								}
							}
						}
					],
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"inject": "assign",
							"target": {
								"duration": { "inject": "duration" },
								"ease": {
									"inject": "type",
									"enter": "cubicBezier(.25,0,0,1)",
									"exit": "cubicBezier(1,0,.75,1)"
								},
								"opacity": {
									"inject": "snippet",
									"key": "opacity"
								},
								"clipPath": {
									"inject": "assign",
									"target": {
										"ease": {
											"inject": "type",
											"enter": "cubicBezier(1,0,.25,1)",
											"exit": "cubicBezier(.75,0,0,1)"
										},
										"to": {
											"inject": "var.get",
											"name": {
												"inject": "type",
												"enter": "expanded",
												"exit": "collapsed"
											}
										}
									},
									"source": {
										"inject": "isIntersected",
										"true": {},
										"false": { "from": {
											"inject": "var.get",
											"name": {
												"inject": "type",
												"enter": "collapsed",
												"exit": "expanded"
											}
										} }
									}
								}
							},
							"source": {
								"inject": "if",
								"value": {
									"inject": "var.get",
									"name": "isSwitchExit"
								},
								"then": {},
								"else": { "translate": {
									"inject": "vector",
									"values": { "x": {
										"inject": "var.get",
										"name": "translateParameters"
									} }
								} }
							}
						}
					}
				}
			},
			{
				"key": "wave",
				"name": "Wave",
				"modules": [
					"servers",
					"channels",
					"settings"
				],
				"settings": {
					"duration": true,
					"defaults": { "duration": 1e3 }
				},
				"enter": { "anime": {
					"type": "timer",
					"parameters": { "duration": { "inject": "duration" } }
				} },
				"exit": {
					"hast": {
						"type": "element",
						"tagName": "svg",
						"properties": {
							"className": "overlay",
							"width": "100%",
							"height": "100%",
							"viewBox": "0 0 100 100",
							"preserveAspectRatio": "none"
						},
						"children": [{
							"type": "element",
							"tagName": "path",
							"properties": {
								"className": "overlay__path",
								"vectorEffect": "non-scaling-stroke",
								"d": "M 0 0 h 0 c 0 50 0 50 0 100 H 0 V 0 Z",
								"fill": "var(--background-base-lowest)"
							}
						}]
					},
					"css": { ".overlay": {
						"inset": 0,
						"z-index": 5
					} },
					"anime": {
						"type": "timeline",
						"children": [
							{
								"targets": ".overlay__path",
								"parameters": {
									"duration": {
										"a": .3720930233,
										"inject": "*",
										"b": { "inject": "duration" }
									},
									"ease": "inQuart",
									"d": ["M 0 0 h 0 c 0 50 0 50 0 100 H 0 V 0 Z", "M 0 0 h 43 c -60 55 140 65 0 100 H 0 V 0 Z"]
								}
							},
							{
								"targets": ".overlay__path",
								"parameters": {
									"duration": {
										"a": .0930232558,
										"inject": "*",
										"b": { "inject": "duration" }
									},
									"ease": "outSine",
									"d": "M 0 0 h 100 c 0 50 0 50 0 100 H 0 V 0 Z"
								}
							},
							{
								"type": "set",
								"targets": { "inject": "element" },
								"parameters": { "opacity": 0 }
							},
							{
								"targets": ".overlay__path",
								"parameters": {
									"duration": {
										"a": .0697674419,
										"inject": "*",
										"b": { "inject": "duration" }
									},
									"ease": "inSine",
									"d": ["M 100 0 H 0 c 0 50 0 50 0 100 h 100 V 50 Z", "M 100 0 H 50 c 28 43 4 81 0 100 h 50 V 0 Z"]
								}
							},
							{
								"targets": ".overlay__path",
								"parameters": {
									"duration": {
										"a": .4651162791,
										"inject": "*",
										"b": { "inject": "duration" }
									},
									"ease": "outExpo",
									"d": "M 100 0 H 100 c 0 50 0 50 0 100 h 0 V 0 Z"
								}
							}
						]
					}
				}
			},
			{
				"key": "backdropSolid",
				"name": "Solid",
				"modules": "modalsBackdrop",
				"meta": { "revert": false },
				"settings": {
					"duration": true,
					"easing": true,
					"variant": [{
						"key": "dark",
						"name": "Dark"
					}, {
						"key": "light",
						"name": "Light"
					}],
					"defaults": {
						"duration": 200,
						"easing": {
							"type": "ease",
							"style": "quart"
						},
						"variant": "dark"
					}
				},
				"animate": {
					"onBeforeCreate": [{
						"inject": "var.set",
						"name": "hidden",
						"value": {
							"inject": "variant",
							"dark": "rgba(0, 0, 0, 0)",
							"light": "rgba(255, 255, 255, 0)"
						}
					}, {
						"inject": "var.set",
						"name": "visible",
						"value": {
							"inject": "variant",
							"dark": "rgba(0, 0, 0, .7)",
							"light": "rgba(255, 255, 255, .7)"
						}
					}],
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"duration": { "inject": "duration" },
							"ease": { "inject": "easing" },
							"background": {
								"inject": "type",
								"enter": {
									"inject": "isIntersected",
									"true": {
										"inject": "var.get",
										"name": "visible"
									},
									"false": [{
										"inject": "var.get",
										"name": "hidden"
									}, {
										"inject": "var.get",
										"name": "visible"
									}]
								},
								"exit": {
									"inject": "var.get",
									"name": "hidden"
								}
							}
						}
					}
				}
			},
			{
				"key": "backdropBlur",
				"name": "Blur",
				"modules": "modalsBackdrop",
				"meta": { "revert": false },
				"settings": {
					"duration": true,
					"easing": true,
					"variant": [{
						"key": "dark",
						"name": "Dark"
					}, {
						"key": "light",
						"name": "Light"
					}],
					"defaults": {
						"duration": 200,
						"easing": {
							"type": "ease",
							"style": "quart"
						},
						"variant": "dark"
					}
				},
				"animate": {
					"extends": {
						"inject": "load",
						"animation": "backdropSolid"
					},
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"duration": { "inject": "duration" },
							"ease": { "inject": "easing" },
							"backdropFilter": {
								"inject": "type",
								"enter": {
									"inject": "isIntersected",
									"true": "blur(2px)",
									"false": ["blur(0px)", "blur(2px)"]
								},
								"exit": "blur(0px)"
							}
						}
					}
				}
			},
			{
				"key": "backdropGrayscale",
				"name": "Grayscale",
				"modules": "modalsBackdrop",
				"meta": { "revert": false },
				"settings": {
					"duration": true,
					"easing": true,
					"variant": [{
						"key": "dark",
						"name": "Dark"
					}, {
						"key": "light",
						"name": "Light"
					}],
					"defaults": {
						"duration": 200,
						"easing": {
							"type": "ease",
							"style": "quart"
						},
						"variant": "dark"
					}
				},
				"animate": {
					"extends": {
						"inject": "load",
						"animation": "backdropSolid"
					},
					"anime": {
						"type": "waapi",
						"targets": { "inject": "element" },
						"parameters": {
							"duration": { "inject": "duration" },
							"ease": { "inject": "easing" },
							"backdropFilter": {
								"inject": "type",
								"enter": {
									"inject": "isIntersected",
									"true": "grayscale(1)",
									"false": ["grayscale(0)", "grayscale(1)"]
								},
								"exit": "grayscale(0)"
							}
						}
					}
				}
			}
		]
	};
	var regex_default = {
		semver: /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,
		url: /^((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)$/i
	};
	//#endregion
	//#region shared/animation/schemas/ExtendableAnimateSchema.js
	var AnimatePropertySchema = ArrayOrSingleSchema(ArrayOrSingleSchema(recordType(anyType()).nullable()));
	var ExtendableAnimateSchema = SourceMappedObjectSchema.extend({
		onBeforeLayout: AnimatePropertySchema,
		hast: AnimatePropertySchema,
		css: AnimatePropertySchema,
		onBeforeCreate: AnimatePropertySchema,
		anime: AnimatePropertySchema,
		onCreated: AnimatePropertySchema,
		onBeforeBegin: AnimatePropertySchema,
		onCompleted: AnimatePropertySchema,
		onBeforeDestroy: AnimatePropertySchema,
		onDestroyed: AnimatePropertySchema
	}).partial().strict().extend({
		onBeforeExtend: AnimatePropertySchema,
		extends: AnimatePropertySchema
	}).partial().strict();
	//#endregion
	//#region shared/animation/schemas/PrepareInjectableSchema.js
	var PrepareInjectableSchema = lazyType(() => anyType().transform((value, ctx) => deepMap(value, (value, { path }) => {
		if (typeof value !== "object" || value === null) return value;
		if (forbiddenKeys.map((key) => {
			if (!Object.hasOwn(value, key)) return false;
			ctx.addIssue({
				code: ZodIssueCode.custom,
				message: `Forbidden key: '${key}'`,
				path: path.concat(key),
				params: { pointAt: "key" }
			});
			return true;
		}).some(Boolean)) return NEVER;
		return storeSourceMap(value, ctx.path.concat(path));
	})));
	//#endregion
	//#region shared/animation/schemas/AnimationSchema.js
	var AnimationSchema = objectType({
		key: stringType().min(1),
		name: stringType().min(1).trim(),
		modules: ArrayOrSingleSchema(enumType(ModuleKey_default.values().concat(ModuleKeyAlias.values()))).optional().default(() => [
			ModuleKeyAlias.Switch,
			ModuleKeyAlias.Reveal,
			ModuleKeyAlias.Sidebars
		]).transform((value) => new Set([].concat(value).flatMap((key) => moduleAliases[key] ?? key))),
		meta: MetaSchema.optional().default({}),
		settings: SettingsSchema.optional().default({ defaults: {} }),
		debug: unionType([booleanType(), enumType(AnimationType_default.values())]).optional(),
		animate: ExtendableAnimateSchema.pipe(PrepareInjectableSchema).optional(),
		enter: ExtendableAnimateSchema.pipe(PrepareInjectableSchema).optional(),
		exit: ExtendableAnimateSchema.pipe(PrepareInjectableSchema).optional()
	}).strict().refine((v) => v.animate ? !(v.enter || v.exit) : v.enter && v.exit, (v) => ({
		message: `Execution definition is required and must be either inside a single 'animate' property or inside 'enter' and 'exit' properties`,
		path: [].concat(Object.keys(v).find((k) => [
			"enter",
			"exit",
			"animate"
		].includes(k)) ?? []),
		params: { pointAt: "key" }
	}));
	//#endregion
	//#region shared/messages.js
	var Messages = {
		SELECT_ANIMATION_TO_ENABLE: "Select animation to enable",
		IMPLEMENTED_BY_ANIMATION: (animationName) => `Implemented by selected animation: ${animationName}`,
		SHOULD_BE_VALID_URL: "Should be a valid URL",
		PRIORITIZE_ANIMATION_SMOOTHNESS: "Prioritize Animation Smoothness",
		CATALOG_OUT_OF_DATE: "The last attempt to load the Catalog was unsuccessful. The information below may be out of date.",
		SETTINGS_MIGRATOR: "Settings Migrator"
	};
	//#endregion
	//#region shared/animation/schemas/PackSchema.js
	var SnippetSchema = strictObjectType({
		key: stringType().min(1),
		params: recordType(stringType(), anyType()).optional(),
		value: PrepareInjectableSchema
	});
	var BasePackSchemaShape = {
		name: stringType().trim().min(1),
		author: stringType().trim().min(1),
		version: stringType().regex(regex_default.semver, "Should match semver format"),
		description: stringType().min(1).optional(),
		changelog: recordType(stringType(), anyType()).optional(),
		invite: stringType().optional(),
		authorLink: stringType().regex(regex_default.url, Messages.SHOULD_BE_VALID_URL).optional(),
		donate: stringType().regex(regex_default.url, Messages.SHOULD_BE_VALID_URL).optional()
	};
	var PackSchema = objectType({
		...BasePackSchemaShape,
		snippets: SnippetSchema.array().optional(),
		animations: AnimationSchema.array().superRefine((animations, ctx) => {
			const keys = {};
			animations.forEach((a, i) => (keys[a.key] ??= []).push(i));
			Object.entries(keys).filter(([, indexes]) => indexes.length > 1).forEach(([key, indexes]) => {
				if (indexes.length <= 1) return;
				indexes.forEach((i) => ctx.addIssue({
					code: ZodIssueCode.custom,
					message: `Duplicate animation key: '${key}'`,
					path: [i, "key"]
				}));
			});
		})
	});
	var PackFallbackSchema = ({ name = "Invalid name", author = "Unknown", version = "0.0.0", ...rest }) => {
		const fallbackValues = {
			name,
			author,
			version,
			...rest
		};
		return objectType(Object.fromEntries(Object.entries(BasePackSchemaShape).map(([key, schema]) => [key, schema.catch(fallbackValues[key])])));
	};
	//#endregion
	//#region shared/packs/index.js
	var PREINSTALLED_PACK_SLUG = "preinstalled";
	function createInternalPack(slug, data) {
		return Object.assign({
			slug,
			id: slug
		}, PackSchema.parse(data));
	}
	var internalPacks = { [PREINSTALLED_PACK_SLUG]: createInternalPack(PREINSTALLED_PACK_SLUG, {
		author: config_default.author,
		invite: config_default.invite,
		...preinstalled_pack_default
	}) };
	var internalPackSlugs = Object.keys(internalPacks);
	//#endregion
	//#region shared/animation/module.js
	var Module$1 = class {
		constructor({ id, name, parent = null, meta = {}, description, controls, alert, onToggle }) {
			this.id = id;
			this.name = name;
			this.description = description ?? "No description provided.";
			this.controls = controls;
			this._alert = alert;
			this._onToggle = onToggle;
			this.meta = meta;
			this.parent = parent;
			this.animations = {};
		}
		get settings() {
			return {};
		}
		getPack(slug) {
			return internalPacks[slug];
		}
		getAnimationConfig(pack, animation, type) {
			return {};
		}
		onToggle(value) {
			this._onToggle?.(value);
		}
		onSettingsChange() {}
		isEnabled(type = null) {
			if (!type) return this.settings.enabled ?? true;
			return (this.settings.enabled ?? true) && (!!this.animations[type]?.animate || !!this.getAccordion(type)?.enabled);
		}
		setIsEnabled(value) {
			this.settings.enabled = value;
			this.onToggle(value);
		}
		enable() {
			this.setIsEnabled(true);
		}
		disable() {
			this.setIsEnabled(false);
		}
		toggle() {
			this.setIsEnabled(!this.isEnabled());
		}
		get type() {
			return this.meta.type ?? ModuleType_default.Reveal;
		}
		get interceptEvents() {
			return this.meta.interceptEvents ?? true;
		}
		get alert() {
			if (typeof this._alert === "function") return this._alert(this.name);
			return this._alert;
		}
		findAnimation(packOrSlug, key) {
			const animation = (typeof packOrSlug === "string" ? this.getPack(packOrSlug) : packOrSlug)?.animations.find((a) => a.key === key);
			return animation && this.isSupportedBy(animation) ? animation : null;
		}
		getAnimationSettings(pack, animation, type, options = {}) {
			return this.buildSettings(animation, type, this.getAnimationConfig(pack, animation, type), options);
		}
		initializeAnimation(pack, animation, type) {
			if (typeof pack === "string") {
				type = pack;
				const pointer = this.settings[type] ?? {};
				pack = pointer.packSlug && this.getPack(pointer.packSlug);
				animation = pack && this.findAnimation(pack, pointer.animationKey);
			}
			const config = animation ? this.getAnimationConfig(pack, animation, type) : {};
			const path = animation ? [
				"animations",
				pack.animations.indexOf(animation),
				type in animation ? type : "animate"
			] : [];
			const settings = animation && this.buildSettings(animation, type, config, { auto: false });
			const meta = animation && this.buildAnimationMeta(animation, type);
			const context = animation && buildContext(pack, animation, type, settings, meta, {
				module: this,
				path
			});
			const debug = Debug.animation(animation, type);
			const data = animation?.[type] ?? animation?.animate;
			let animate, error;
			if (animation) {
				const groupEnd = debug.initializeStart(data, context);
				try {
					animate = ParsableExtendableAnimateSchema(context, { stage: ParseStage_default.Initialize }).parse(data, { path });
					debug.initializeEnd(animate, context);
				} catch (err) {
					error = err instanceof AnimationError ? err : new AnimationError(animation, formatZodError(err, {
						pack,
						data,
						context,
						received: false,
						docs: Documentation.getDefinitionUrl(Documentation.Definition.Animate)
					}), {
						module: this,
						pack,
						type,
						context
					});
				} finally {
					groupEnd?.();
				}
			}
			return {
				packSlug: pack?.slug ?? null,
				animationKey: animation?.key ?? null,
				id: [pack?.slug, animation?.key].filter(Boolean).join("/") || null,
				pack: animation && pack,
				animation,
				path,
				meta,
				config,
				animate,
				error
			};
		}
		initializeAnimations(pack, animation) {
			if (pack && animation) return {
				enter: this.initializeAnimation(pack, animation, AnimationType_default.Enter),
				exit: this.initializeAnimation(pack, animation, AnimationType_default.Exit)
			};
			this.animations = {
				enter: this.initializeAnimation(AnimationType_default.Enter),
				exit: this.initializeAnimation(AnimationType_default.Exit)
			};
			Object.values(this.animations).forEach(({ error }) => error && manager_default.registerAnimationError(error));
			return this;
		}
		getAnimation(data, type, options, context) {
			if (typeof data === "string") {
				[type, options, context] = arguments;
				data = this.animations[type];
			}
			const { pack, animation, path, meta, config } = data;
			const settings = animation && this.buildSettings(animation, type, config, options);
			const ctx = buildContext(pack, animation, type, settings, meta, {
				module: this,
				path,
				...context
			});
			return {
				...data,
				settings,
				context: ctx
			};
		}
		getAnimations(options = {}) {
			return {
				enter: this.getAnimation(AnimationType_default.Enter, options),
				exit: this.getAnimation(AnimationType_default.Exit, options)
			};
		}
		setAnimation(type, packSlug, animationKey) {
			this.settings[type] = {
				packSlug,
				animationKey
			};
			this.onSettingsChange();
		}
		isSupportedBy(animation) {
			return animation.modules.has(this.id);
		}
		getSupportsAuto(setting) {
			const [type, options] = [].concat(this.meta.settings?.supportsAuto?.[setting]);
			return {
				type,
				options: {
					asDefault: true,
					...options
				}
			};
		}
		supportsAuto(animation, setting, autoType = null) {
			if (!animation.settings?.[setting]) return false;
			const { type } = this.getSupportsAuto(setting);
			if (autoType === null ? !type : type !== autoType) return false;
			if (animation.settings[setting] === true) return true;
			switch (setting) {
				case AnimationSetting_default.Position:
					if (type === PositionAutoType_default.Precise) return false;
					return [
						Position_default.Top,
						Position_default.Bottom,
						Position_default.Left,
						Position_default.Right
					].every((v) => animation.settings[setting].includes(v));
				case AnimationSetting_default.Direction: switch (type) {
					case DirectionAutoType_default.Alternate: return getSupportedAxes(animation.settings[setting]).length > 0;
					case DirectionAutoType_default.Anchor: return [
						Direction_default.Upwards,
						Direction_default.Downwards,
						Direction_default.Leftwards,
						Direction_default.Rightwards
					].every((v) => animation.settings[setting]?.includes(v));
				}
				default: return false;
			}
		}
		getAllSettingsSupportingAuto(animation, defaultOnly = false) {
			return [AnimationSetting_default.Position, AnimationSetting_default.Direction].filter((s) => this.supportsAuto(animation, s) && (!defaultOnly || this.getSupportsAuto(s).options.asDefault));
		}
		getOverridableConditionValues(type) {
			return {
				type,
				module: this.id,
				"module.type": this.type
			};
		}
		buildAnimationMeta(animation, type) {
			return computeOverridable(animation.meta, this.getOverridableConditionValues(type), metaOverridePresets);
		}
		buildAnimationDefaultSettings(animation, type) {
			return computeOverridable(animation.settings.defaults, this.getOverridableConditionValues(type));
		}
		buildModuleDefaultSettings(animation) {
			return Object.fromEntries(Object.entries(this.meta.settings?.defaults ?? {}).filter(([key]) => {
				if (key === AnimationSetting_default.Overflow) return true;
				if ([
					AnimationSetting_default.DirectionAxis,
					AnimationSetting_default.DirectionReverse,
					AnimationSetting_default.DirectionTowards
				].includes(key)) key = AnimationSetting_default.Direction;
				return key in (animation.settings ?? {});
			}));
		}
		buildDefaultSettings(animation, type, normalized = true) {
			const settings = Object.assign({ [AnimationSetting_default.Overflow]: true }, this.buildModuleDefaultSettings(animation), this.buildAnimationDefaultSettings(animation, type), Object.fromEntries(this.getAllSettingsSupportingAuto(animation, true).map((s) => [s, Auto()])));
			return normalized ? this.normalizeSettings(animation, type, settings) : settings;
		}
		buildSettings(animation, type, config, options = {}) {
			const settings = animation ? this.normalizeSettings(animation, type, Object.assign(this.buildDefaultSettings(animation, type, false), config)) : {};
			if ("auto" in options) this.assignAutoValues(animation, type, settings, options.auto);
			return settings;
		}
		normalizeSetting(animation, type, setting, value, allSettings, animationDefaults) {
			switch (setting) {
				case AnimationSetting_default.PositionPreserve:
					if (allSettings[AnimationSetting_default.Position] !== Auto() || !this.supportsAuto(animation, AnimationSetting_default.Position, PositionAutoType_default.Precise) || !this.getSupportsAuto(AnimationSetting_default.Position).options.preservable) return void 0;
					return Boolean(value);
				case AnimationSetting_default.DirectionAxis: {
					if (allSettings[AnimationSetting_default.Direction] !== Auto() || !this.supportsAuto(animation, AnimationSetting_default.Direction, DirectionAutoType_default.Alternate)) return void 0;
					const directions = animation.settings[AnimationSetting_default.Direction] ?? [];
					if (getDirectionsByAxis(value)?.every((d) => directions.includes(d))) return value;
					return animationDefaults[setting] ?? [
						Axis_default.Y,
						Axis_default.Z,
						Axis_default.X
					].find((axis) => getDirectionsByAxis(axis).every((d) => directions.includes(d)));
				}
				case AnimationSetting_default.DirectionReverse:
					if (allSettings[AnimationSetting_default.Direction] !== Auto() || !this.supportsAuto(animation, AnimationSetting_default.Direction, DirectionAutoType_default.Alternate)) return void 0;
					return Boolean(value);
				case AnimationSetting_default.DirectionTowards:
					if (allSettings[AnimationSetting_default.Direction] !== Auto() || !this.supportsAuto(animation, AnimationSetting_default.Direction, DirectionAutoType_default.Anchor)) return void 0;
					return Boolean(value);
				case AnimationSetting_default.Overflow:
					if (animation.settings?.[setting] === false) return animationDefaults[setting];
					return Boolean(value);
			}
			if (animation.settings?.[setting] === void 0) return void 0;
			switch (setting) {
				case AnimationSetting_default.Duration: {
					const { from, to } = animation.settings[setting];
					return Math.max(from, Math.min(to, typeof value === "number" ? value : animationDefaults[setting]));
				}
				case AnimationSetting_default.Variant: {
					const keys = animation.settings[setting].map((v) => v.key);
					if (!keys.includes(value)) return animationDefaults[setting] ?? keys[0];
					return value;
				}
				case AnimationSetting_default.Position: {
					if (value === Auto() && this.supportsAuto(animation, setting)) return value;
					const values = animation.settings[setting] === true ? Position_default.values() : animation.settings[setting];
					if (!values.includes(value)) return animationDefaults[setting] ?? values[0];
					return value;
				}
				case AnimationSetting_default.Direction: {
					if (value === Auto() && this.supportsAuto(animation, setting)) return value;
					const values = animation.settings[setting];
					if (!values.includes(value)) return animationDefaults[setting] ?? values[0];
					return value;
				}
				case AnimationSetting_default.Easing: return EasingSchema.catch(animationDefaults[setting]).parse(value);
				default: return;
			}
		}
		normalizeSettings(animation, type, settings) {
			const animationDefaults = this.buildAnimationDefaultSettings(animation, type);
			return Object.fromEntries(AnimationSetting_default.values().map((key) => [key, this.normalizeSetting(animation, type, key, settings[key], settings, animationDefaults)]).filter((a) => a[1] !== void 0));
		}
		assignAutoValues(animation, type, normalizedSettings, values = {}) {
			const settings = normalizedSettings;
			const animationDefaults = this.buildAnimationDefaultSettings(animation, type);
			if (values === false) {
				Object.keys(settings).forEach((key) => settings[key] === Auto() && delete settings[key]);
				return settings;
			}
			if (settings[AnimationSetting_default.Position] === Auto()) if (!values.position) settings[AnimationSetting_default.Position] = {
				isAuto: true,
				mouse: settings[AnimationSetting_default.PositionPreserve] ? values.preservedMouse : values.mouse
			};
			else {
				const position = reversePosition(values.position);
				const mergedPosition = getPosition(position, values.align);
				const supportedPositions = animation.settings[AnimationSetting_default.Position];
				const value = Array.isArray(supportedPositions) && !supportedPositions.includes(mergedPosition) ? position : mergedPosition;
				settings[AnimationSetting_default.Position] = {
					isAuto: true,
					value
				};
			}
			if (settings[AnimationSetting_default.Direction] === Auto()) switch (this.getSupportsAuto(AnimationSetting_default.Direction).type) {
				case DirectionAutoType_default.Alternate: {
					const direction = getDirection(settings[AnimationSetting_default.DirectionAxis], values.direction);
					settings[AnimationSetting_default.Direction] = settings[AnimationSetting_default.DirectionReverse] ? reverseDirection(direction) : direction;
					break;
				}
				case DirectionAutoType_default.Anchor:
					settings[AnimationSetting_default.Direction] = values.position ? getAnchorDirection(values.position, settings[AnimationSetting_default.DirectionTowards]) : animationDefaults[AnimationSetting_default.Direction];
					break;
			}
			return settings;
		}
		getAccordionAnimation() {
			const { accordion } = this.meta;
			if (!accordion) return null;
			return {
				name: "Smooth Expand/Collapse",
				settings: {
					[AnimationSetting_default.Overflow]: false,
					[AnimationSetting_default.Duration]: {
						from: 100,
						to: 2e3
					},
					[AnimationSetting_default.Easing]: true,
					defaults: accordion.defaults
				}
			};
		}
		getAccordion(data, type, options) {
			if (typeof data === "string") {
				[type, options] = arguments;
				data = this.animations[type];
			}
			options ??= {};
			const { accordion } = this.meta;
			if (!accordion) return null;
			const forceDisabled = data?.meta?.accordion === false;
			const animation = this.getAccordionAnimation();
			const config = this.settings.accordion?.[type] ?? {};
			const defaults = () => this.buildDefaultSettings(animation, type);
			const settings = this.buildSettings(animation, type, config.settings, options);
			const context = buildContext(null, animation, type, settings);
			return {
				animate: accordion.create(type, context),
				forceDisabled,
				enabled: !forceDisabled && (config.enabled ?? true),
				setEnabled: forceDisabled ? null : (enabled) => this.updateAccordion(type, { enabled }),
				settings,
				setSettings: (settings) => this.updateAccordion(type, { settings }),
				defaults,
				context,
				onReset: () => this.updateAccordion(type, { settings: defaults() })
			};
		}
		getAccordions(options = {}) {
			const animation = this.getAccordionAnimation();
			if (!animation) return null;
			return {
				animation,
				enter: this.getAccordion(AnimationType_default.Enter, options),
				exit: this.getAccordion(AnimationType_default.Exit, options)
			};
		}
		updateAccordion(type, values) {
			const config = this.settings.accordion ??= {};
			Object.assign(config[type] ??= {}, values);
			this.onSettingsChange();
		}
		buildOptions(data, type, options) {
			if (typeof data === "string") {
				[type, options] = arguments;
				data = this.animations[type];
			}
			const accordion = this.getAccordion(data, type, options);
			if (!accordion?.enabled) return {};
			return { [{
				[AnimationType_default.Enter]: "before",
				[AnimationType_default.Exit]: "after"
			}[type]]: accordion.animate };
		}
	};
	//#endregion
	//#region src/components/Toast.jsx
	var ToastTypes = IconBrandTypes;
	function Toast({ children, text, type = ToastTypes.INFO }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: DiscordClasses.Toast.toast }, /* @__PURE__ */ BdApi.React.createElement(IconBrand, {
			type,
			className: (0, clsx.default)({
				[DiscordClasses.Toast.icon]: true,
				"BA__toastIcon": true,
				"BA__toastIconDefault": type === ToastTypes.DEFAULT
			})
		}), text && /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			color: "text-strong",
			variant: "text-md/normal"
		}, text), children);
	}
	css`.BA__toastIcon {
    width: 32px !important;
    height: 32px !important;
    margin-right: 12px;
}

.BA__toastIconDefault {
    margin-right: 4px;
}``Toast`;
	//#endregion
	//#region src/modules/Toasts.jsx
	function toBDToastType(type) {
		switch (type) {
			case ToastTypes.SUCCESS: return "success";
			case ToastTypes.INFO: return "info";
			case ToastTypes.WARNING: return "warning";
			case ToastTypes.ERROR: return "error";
			default: return "";
		}
	}
	var Toasts = class Toasts {
		static get Types() {
			return ToastTypes;
		}
		static success(content, options = {}) {
			return this.show(content, Object.assign(options, { type: Toasts.Types.SUCCESS }));
		}
		static info(content, options = {}) {
			return this.show(content, Object.assign(options, { type: Toasts.Types.INFO }));
		}
		static warning(content, options = {}) {
			return this.show(content, Object.assign(options, { type: Toasts.Types.WARNING }));
		}
		static error(content, options = {}) {
			return this.show(content, Object.assign(options, { type: Toasts.Types.ERROR }));
		}
		static default(content, options = {}) {
			return this.show(content, Object.assign(options, { type: Toasts.Types.DEFAULT }));
		}
		static show(content, options = {}) {
			const { type = Toasts.Types.DEFAULT, ...rest } = options;
			if (!showToast || !createToast) {
				UI.showToast(`${meta_default.name}: ${content}`, { type: toBDToastType(type) });
				return;
			}
			showToast(createToast(null, null, {
				component: /* @__PURE__ */ BdApi.React.createElement(Toast, {
					type,
					text: content
				}),
				...rest
			}));
		}
	};
	//#endregion
	//#region src/components/icons/VerifiedCheckIcon.jsx
	var import_json_source_map = (/* @__PURE__ */ __commonJSMin(((exports) => {
		var escapedChars = {
			"b": "\b",
			"f": "\f",
			"n": "\n",
			"r": "\r",
			"t": "	",
			"\"": "\"",
			"/": "/",
			"\\": "\\"
		};
		var A_CODE = "a".charCodeAt();
		exports.parse = function(source, _, options) {
			var pointers = {};
			var line = 0;
			var column = 0;
			var pos = 0;
			var bigint = options && options.bigint && typeof BigInt != "undefined";
			return {
				data: _parse("", true),
				pointers
			};
			function _parse(ptr, topLevel) {
				whitespace();
				var data;
				map(ptr, "value");
				var char = getChar();
				switch (char) {
					case "t":
						read("rue");
						data = true;
						break;
					case "f":
						read("alse");
						data = false;
						break;
					case "n":
						read("ull");
						data = null;
						break;
					case "\"":
						data = parseString();
						break;
					case "[":
						data = parseArray(ptr);
						break;
					case "{":
						data = parseObject(ptr);
						break;
					default:
						backChar();
						if ("-0123456789".indexOf(char) >= 0) data = parseNumber();
						else unexpectedToken();
				}
				map(ptr, "valueEnd");
				whitespace();
				if (topLevel && pos < source.length) unexpectedToken();
				return data;
			}
			function whitespace() {
				loop: while (pos < source.length) {
					switch (source[pos]) {
						case " ":
							column++;
							break;
						case "	":
							column += 4;
							break;
						case "\r":
							column = 0;
							break;
						case "\n":
							column = 0;
							line++;
							break;
						default: break loop;
					}
					pos++;
				}
			}
			function parseString() {
				var str = "";
				var char;
				while (true) {
					char = getChar();
					if (char == "\"") break;
					else if (char == "\\") {
						char = getChar();
						if (char in escapedChars) str += escapedChars[char];
						else if (char == "u") str += getCharCode();
						else wasUnexpectedToken();
					} else str += char;
				}
				return str;
			}
			function parseNumber() {
				var numStr = "";
				var integer = true;
				if (source[pos] == "-") numStr += getChar();
				numStr += source[pos] == "0" ? getChar() : getDigits();
				if (source[pos] == ".") {
					numStr += getChar() + getDigits();
					integer = false;
				}
				if (source[pos] == "e" || source[pos] == "E") {
					numStr += getChar();
					if (source[pos] == "+" || source[pos] == "-") numStr += getChar();
					numStr += getDigits();
					integer = false;
				}
				var result = +numStr;
				return bigint && integer && (result > Number.MAX_SAFE_INTEGER || result < Number.MIN_SAFE_INTEGER) ? BigInt(numStr) : result;
			}
			function parseArray(ptr) {
				whitespace();
				var arr = [];
				var i = 0;
				if (getChar() == "]") return arr;
				backChar();
				while (true) {
					var itemPtr = ptr + "/" + i;
					arr.push(_parse(itemPtr));
					whitespace();
					var char = getChar();
					if (char == "]") break;
					if (char != ",") wasUnexpectedToken();
					whitespace();
					i++;
				}
				return arr;
			}
			function parseObject(ptr) {
				whitespace();
				var obj = {};
				if (getChar() == "}") return obj;
				backChar();
				while (true) {
					var loc = getLoc();
					if (getChar() != "\"") wasUnexpectedToken();
					var key = parseString();
					var propPtr = ptr + "/" + escapeJsonPointer(key);
					mapLoc(propPtr, "key", loc);
					map(propPtr, "keyEnd");
					whitespace();
					if (getChar() != ":") wasUnexpectedToken();
					whitespace();
					obj[key] = _parse(propPtr);
					whitespace();
					var char = getChar();
					if (char == "}") break;
					if (char != ",") wasUnexpectedToken();
					whitespace();
				}
				return obj;
			}
			function read(str) {
				for (var i = 0; i < str.length; i++) if (getChar() !== str[i]) wasUnexpectedToken();
			}
			function getChar() {
				checkUnexpectedEnd();
				var char = source[pos];
				pos++;
				column++;
				return char;
			}
			function backChar() {
				pos--;
				column--;
			}
			function getCharCode() {
				var count = 4;
				var code = 0;
				while (count--) {
					code <<= 4;
					var char = getChar().toLowerCase();
					if (char >= "a" && char <= "f") code += char.charCodeAt() - A_CODE + 10;
					else if (char >= "0" && char <= "9") code += +char;
					else wasUnexpectedToken();
				}
				return String.fromCharCode(code);
			}
			function getDigits() {
				var digits = "";
				while (source[pos] >= "0" && source[pos] <= "9") digits += getChar();
				if (digits.length) return digits;
				checkUnexpectedEnd();
				unexpectedToken();
			}
			function map(ptr, prop) {
				mapLoc(ptr, prop, getLoc());
			}
			function mapLoc(ptr, prop, loc) {
				pointers[ptr] = pointers[ptr] || {};
				pointers[ptr][prop] = loc;
			}
			function getLoc() {
				return {
					line,
					column,
					pos
				};
			}
			function unexpectedToken() {
				throw new SyntaxError("Unexpected token " + source[pos] + " in JSON at position " + pos);
			}
			function wasUnexpectedToken() {
				backChar();
				unexpectedToken();
			}
			function checkUnexpectedEnd() {
				if (pos >= source.length) throw new SyntaxError("Unexpected end of JSON input");
			}
		};
		var ESC_0 = /~/g;
		var ESC_1 = /\//g;
		function escapeJsonPointer(str) {
			return str.replace(ESC_0, "~0").replace(ESC_1, "~1");
		}
	})))();
	function VerifiedCheckIcon({ size, width, height, color = "var(--green-360)", secondaryColor = "#FFFFFF", ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...props,
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M9.592 3.2a6 6 0 0 1-.495.399c-.298.2-.633.338-.985.408c-.153.03-.313.043-.632.068c-.801.064-1.202.096-1.536.214a2.71 2.71 0 0 0-1.655 1.655c-.118.334-.15.735-.214 1.536a6 6 0 0 1-.068.632c-.07.352-.208.687-.408.985c-.087.13-.191.252-.399.495c-.521.612-.782.918-.935 1.238c-.353.74-.353 1.6 0 2.34c.153.32.414.626.935 1.238c.208.243.312.365.399.495c.2.298.338.633.408.985c.03.153.043.313.068.632c.064.801.096 1.202.214 1.536a2.71 2.71 0 0 0 1.655 1.655c.334.118.735.15 1.536.214c.319.025.479.038.632.068c.352.07.687.209.985.408c.13.087.252.191.495.399c.612.521.918.782 1.238.935c.74.353 1.6.353 2.34 0c.32-.153.626-.414 1.238-.935c.243-.208.365-.312.495-.399c.298-.2.633-.338.985-.408c.153-.03.313-.043.632-.068c.801-.064 1.202-.096 1.536-.214a2.71 2.71 0 0 0 1.655-1.655c.118-.334.15-.735.214-1.536c.025-.319.038-.479.068-.632c.07-.352.209-.687.408-.985c.087-.13.191-.252.399-.495c.521-.612.782-.918.935-1.238c.353-.74.353-1.6 0-2.34c-.153-.32-.414-.626-.935-1.238a6 6 0 0 1-.399-.495a2.7 2.7 0 0 1-.408-.985a6 6 0 0 1-.068-.632c-.064-.801-.096-1.202-.214-1.536a2.71 2.71 0 0 0-1.655-1.655c-.334-.118-.735-.15-1.536-.214a6 6 0 0 1-.632-.068a2.7 2.7 0 0 1-.985-.408a6 6 0 0 1-.495-.399c-.612-.521-.918-.782-1.238-.935a2.71 2.71 0 0 0-2.34 0c-.32.153-.626.414-1.238.935"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof secondaryColor === "string" ? secondaryColor : secondaryColor?.css,
			d: "M16.374 9.863a.814.814 0 0 0-1.151-1.151l-4.85 4.85l-1.595-1.595a.814.814 0 0 0-1.151 1.151l2.17 2.17a.814.814 0 0 0 1.15 0z"
		}));
	}
	//#endregion
	//#region src/components/icons/DangerIcon.jsx
	function DangerIcon({ size, width, height, color = colors.STATUS_DANGER, secondaryColor = "#FFFFFF", ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...props,
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "m16.157 3.802l.686.406c2.029 1.202 3.043 1.803 3.6 2.792c.557.99.557 2.19.557 4.594v.812c0 2.403 0 3.605-.557 4.594s-1.571 1.59-3.6 2.791l-.686.407C14.128 21.399 13.114 22 12 22s-2.128-.6-4.157-1.802l-.686-.407c-2.029-1.2-3.043-1.802-3.6-2.791C3 16.01 3 14.81 3 12.406v-.812C3 9.19 3 7.989 3.557 7s1.571-1.59 3.6-2.792l.686-.406C9.872 2.601 10.886 2 12 2s2.128.6 4.157 1.802"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof secondaryColor === "string" ? secondaryColor : secondaryColor?.css,
			d: "M12 6.25a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0V7a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2"
		}));
	}
	//#endregion
	//#region src/components/icons/TrashIcon.jsx
	function TrashIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M14.25 1c.41 0 .75.34.75.75V3h5.25c.41 0 .75.34.75.75v.5c0 .41-.34.75-.75.75H3.75A.75.75 0 0 1 3 4.25v-.5c0-.41.34-.75.75-.75H9V1.75c0-.41.34-.75.75-.75h4.5Z"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M5.06 7a1 1 0 0 0-1 1.06l.76 12.13a3 3 0 0 0 3 2.81h8.36a3 3 0 0 0 3-2.81l.75-12.13a1 1 0 0 0-1-1.06H5.07ZM11 12a1 1 0 1 0-2 0v6a1 1 0 1 0 2 0v-6Zm3-1a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-6a1 1 0 0 1 1-1Z",
			clipRule: "evenodd"
		}));
	}
	//#endregion
	//#region src/components/icons/DownloadIcon.jsx
	function DownloadIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M12 2a1 1 0 0 1 1 1v10.59l3.3-3.3a1 1 0 1 1 1.4 1.42l-5 5a1 1 0 0 1-1.4 0l-5-5a1 1 0 1 1 1.4-1.42l3.3 3.3V3a1 1 0 0 1 1-1ZM3 20a1 1 0 1 0 0 2h18a1 1 0 1 0 0-2H3Z"
		}));
	}
	//#endregion
	//#region src/settings/data/verification.jsx
	var VerificationStatus = {
		UNKNOWN: 0,
		UNVERIFIED: 1,
		FAILED: 2,
		VERIFIED: 3,
		OFFICIAL: 4
	};
	var VerificationIssueResolveMethod = {
		DELETE: "delete",
		UNINSTALL: "uninstall",
		REINSTALL: "reinstall",
		UPDATE: "update",
		ALLOW_ONCE: "allowOnce",
		ALLOW_ALWAYS: "allowAlways"
	};
	var verificationStatuses = Object.fromEntries([
		{
			value: VerificationStatus.UNKNOWN,
			icon: (props) => /* @__PURE__ */ BdApi.React.createElement(VerifiedCheckIcon, {
				...props,
				color: colors.ICON_MUTED,
				secondaryColor: colors.ICON_MUTED
			}),
			tooltipColor: Tooltip$1.Colors.PRIMARY,
			label: "Unable to verify",
			description: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, config_default.name, " was unable to verify this pack. It may contain malicious code, use it at your own risk.")
		},
		{
			value: VerificationStatus.UNVERIFIED,
			icon: (props) => /* @__PURE__ */ BdApi.React.createElement(DangerIcon, props),
			tooltipColor: Tooltip$1.Colors.RED,
			label: "Unverified",
			description: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "This pack has not been verified and may contain malicious code. ", config_default.name, " strongly recommends deleting it.")
		},
		{
			value: VerificationStatus.FAILED,
			icon: (props) => /* @__PURE__ */ BdApi.React.createElement(DangerIcon, props),
			tooltipColor: Tooltip$1.Colors.RED,
			label: "Verification failed",
			description: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "This pack has been verified, but the local copy you have installed differs from the one published in the official Catalog. The contents of this pack may have been modified by malicious code from a third party. ", config_default.name, " strongly recommends reinstalling it from the official Catalog before using it.")
		},
		{
			value: VerificationStatus.VERIFIED,
			icon: (props) => /* @__PURE__ */ BdApi.React.createElement(VerifiedCheckIcon, {
				...props,
				color: "var(--green-360)"
			}),
			tooltipColor: Tooltip$1.Colors.GREEN,
			label: "Verified",
			description: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "This community pack has been verified by\xA0", config_default.name, " and is safe to use.")
		},
		{
			value: VerificationStatus.OFFICIAL,
			icon: (props) => /* @__PURE__ */ BdApi.React.createElement(VerifiedCheckIcon, {
				...props,
				color: "var(--brand-500)"
			}),
			tooltipColor: Tooltip$1.Colors.BRAND,
			label: "Official",
			description: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "This is the official pack from the authors of\xA0", config_default.name, ".")
		}
	].map((item) => [item.value, item]));
	var verificationIssueResolveMethods = Object.fromEntries([
		{
			value: VerificationIssueResolveMethod.DELETE,
			variant: "critical-primary",
			icon: TrashIcon,
			label: (past) => `${past ? "Deleted" : "Delete"} permanently`
		},
		{
			value: VerificationIssueResolveMethod.UNINSTALL,
			variant: "critical-primary",
			icon: TrashIcon,
			label: (past) => past ? "Uninstalled" : "Uninstall"
		},
		{
			value: VerificationIssueResolveMethod.REINSTALL,
			variant: "primary",
			icon: DownloadIcon,
			label: (past) => past ? "Reinstalled" : "Reinstall"
		},
		{
			value: VerificationIssueResolveMethod.UPDATE,
			variant: "primary",
			icon: DownloadIcon,
			label: (past) => past ? "Updated" : "Update"
		},
		{
			value: VerificationIssueResolveMethod.ALLOW_ONCE,
			variant: "critical-primary",
			label: (past) => `${past ? "Allowed" : "Allow"} once`,
			confirmation: {
				text: (pack) => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("p", null, "By selecting this option, you grant the pack ", /* @__PURE__ */ BdApi.React.createElement("b", null, pack.name), " full access to your Discord client during the current session. Animations of this pack may try to execute malicious code to harm the client or compromise your Discord account."), /* @__PURE__ */ BdApi.React.createElement("p", null, "Only proceed if you know what you're doing or if you are the author of this pack.")),
				confirmText: "Allow once anyway"
			}
		},
		{
			value: VerificationIssueResolveMethod.ALLOW_ALWAYS,
			variant: "critical-primary",
			label: (past) => `${past ? "Allowed" : "Allow"} all the time`,
			confirmation: {
				text: (pack) => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("p", null, "By selecting this option, you grant the pack ", /* @__PURE__ */ BdApi.React.createElement("b", null, pack.name), " full access to your Discord client ", /* @__PURE__ */ BdApi.React.createElement("b", null, "permanently"), ". Animations of this pack may try to execute malicious code to harm the client or compromise your Discord account."), /* @__PURE__ */ BdApi.React.createElement("p", null, "Only proceed if you know what you're doing or if you are the author of this pack."), /* @__PURE__ */ BdApi.React.createElement("p", null, /* @__PURE__ */ BdApi.React.createElement(Alert, { messageType: AlertTypes.WARNING }, "Note that if the contents of this pack change, ", config_default.name, " will not ask for confirmation and will automatically grant full access to this pack if you choose to allow it all the time."))),
				confirmText: "Allow all the time anyway"
			}
		}
	].map((item) => [item.value, item]));
	//#endregion
	//#region shared/utils/hash.js
	function cyrb53(str, seed = 0) {
		let h1 = 3735928559 ^ seed, h2 = 1103547991 ^ seed;
		for (let i = 0, ch; i < str.length; i++) {
			ch = str.charCodeAt(i);
			h1 = Math.imul(h1 ^ ch, 2654435761);
			h2 = Math.imul(h2 ^ ch, 1597334677);
		}
		h1 = Math.imul(h1 ^ h1 >>> 16, 2246822507);
		h1 ^= Math.imul(h2 ^ h2 >>> 13, 3266489909);
		h2 = Math.imul(h2 ^ h2 >>> 16, 2246822507);
		h2 ^= Math.imul(h1 ^ h1 >>> 13, 3266489909);
		return 4294967296 * (2097151 & h2) + (h1 >>> 0);
	}
	function getFileHash(fileContent, algorithm = cyrb53) {
		return algorithm(fileContent.replaceAll(/\s/g, ""));
	}
	//#endregion
	//#region src/modules/AddonManager.jsx
	var stripBOM = function(fileContent) {
		if (fileContent.charCodeAt(0) === 65279) fileContent = fileContent.slice(1);
		return fileContent;
	};
	var AddonManager = class {
		constructor() {
			this.timeCache = {};
			this.addonList = [];
			this.toastQueue = [];
		}
		get name() {
			return "";
		}
		get extension() {
			return "";
		}
		get duplicatePattern() {
			return /./;
		}
		get addonFolder() {
			return "";
		}
		get language() {
			return "";
		}
		get prefix() {
			return "addon";
		}
		get forbiddenSlugs() {
			return [];
		}
		emit(event, ...args) {
			return Emitter_default.emit(`${this.prefix}-${event}`, ...args);
		}
		initialize() {
			this.ensureAddonFolder();
			const errors = this.loadAllAddons();
			Logger.info(this.name, "Initialized.");
			return errors;
		}
		ensureAddonFolder() {
			if (!fs.default.existsSync(this.addonFolder)) fs.default.mkdirSync(this.addonFolder);
		}
		initializeAddon() {}
		toast(content, event = "loaded") {
			this.toastQueue.push({
				content,
				event
			});
			setTimeout(() => {
				const toasts = this.toastQueue.filter((t) => t.event === event);
				if (!toasts.length) return;
				if (toasts.length === 1) Toasts.show(toasts[0].content);
				else Toasts.show(`${event.slice(0, 1).toUpperCase() + event.slice(1)} ${toasts.length} ${this.prefix}s.`);
				this.toastQueue = this.toastQueue.filter((t) => t.event !== event);
			}, 100);
		}
		watchAddons() {
			if (this.watcher) return Logger.err(this.name, `Already watching ${this.prefix} addons.`);
			Logger.log(this.name, `Starting to watch ${this.prefix} addons...`);
			this.watcher = fs.default.watch(this.addonFolder, { persistent: false }, async (eventType, filename) => {
				if (!eventType || !filename) return;
				const absolutePath = path.default.resolve(this.addonFolder, filename);
				if (!filename.endsWith(this.extension)) {
					const match = filename.match(this.duplicatePattern);
					if (!match) return;
					const ext = match[0];
					const newFilename = filename.replace(ext, "") + this.extension;
					if (fs.default.existsSync(newFilename)) {
						Logger.warn(this.name, `Duplicate files found: ${filename} and ${newFilename}`);
						return;
					}
					try {
						fs.default.renameSync(absolutePath, path.default.resolve(this.addonFolder, newFilename));
					} catch (error) {
						Logger.err(this.name, `Could not rename file: ${filename} ${newFilename}`, error);
					}
				}
				await new Promise((r) => setTimeout(r, 100));
				try {
					const stats = fs.default.statSync(absolutePath);
					if (!stats.isFile()) return;
					if (!stats || !stats.mtimeMs) return;
					if (typeof stats.mtimeMs !== "number") return;
					if (this.timeCache[filename] == stats.mtimeMs) return;
					this.timeCache[filename] = stats.mtimeMs;
					if (eventType == "rename") this.loadAddon(filename, true);
					if (eventType == "change") this.reloadAddon(filename, true);
				} catch (err) {
					if (err.code !== "ENOENT" && !err?.message.startsWith("ENOENT")) return;
					delete this.timeCache[filename];
					this.unloadAddon(filename, true);
				}
			});
		}
		unwatchAddons() {
			if (!this.watcher) return Logger.error(this.name, `Was not watching ${this.prefix} addons.`);
			this.watcher.close();
			delete this.watcher;
			Logger.log(this.name, `No longer watching ${this.prefix} addons.`);
		}
		requireAddon(filename) {
			const slug = path.default.basename(filename).replace(this.extension, "").replace(/ /g, "-");
			let fileContent = fs.default.readFileSync(filename, "utf8");
			fileContent = stripBOM(fileContent);
			const stats = fs.default.statSync(filename);
			let addon, parseError;
			try {
				const { data, pointers } = (0, import_json_source_map.parse)(fileContent);
				addon = data;
				addon.pointers = pointers;
			} catch (e) {
				addon = {};
				parseError = e;
			}
			addon.slug = slug;
			addon.id = slug;
			addon.name = addon.name ?? slug;
			addon.author = addon.author ?? "Unknown";
			addon.version = addon.version ?? "0.0.0";
			addon.filename = path.default.basename(filename);
			addon.added = stats.atimeMs;
			addon.modified = stats.mtimeMs;
			addon.size = stats.size;
			addon.fileContent = fileContent.split(/\r?\n|\r|\n/g);
			addon.hash = getFileHash(fileContent);
			addon.installed = addon;
			addon.verificationStatus = VerificationStatus.UNKNOWN;
			if (this.forbiddenSlugs.includes(slug)) throw new AddonError(this.prefix, addon, `Forbidden ${this.prefix} slug: '${slug}'`);
			const existingIndex = this.addonList.findIndex((c) => c.id === addon.id);
			if (existingIndex !== -1) this.addonList.splice(existingIndex, 1, addon);
			else this.addonList.push(addon);
			if (parseError) throw new AddonError(this.prefix, addon, formatAddonParseError(addon, parseError, fileContent));
			return addon;
		}
		loadAddon(filename, shouldToast = true) {
			if (typeof filename === "undefined") return;
			let addon;
			try {
				addon = this.requireAddon(path.default.resolve(this.addonFolder, filename));
			} catch (e) {
				const { addon: partialAddon } = e;
				if (partialAddon) {
					partialAddon.partial = true;
					partialAddon.error = e;
					this.emit("loaded", partialAddon);
				}
				return e;
			}
			const error = this.initializeAddon(addon);
			if (error) {
				addon.partial = true;
				addon.error = error;
				this.emit("loaded", addon);
				return error;
			}
			if (shouldToast) this.toast(/* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("b", null, addon.name), " was loaded."), "loaded");
			Logger.log(this.name, `${addon.name} v${addon.version} was loaded.`);
			this.emit("loaded", addon);
		}
		unloadAddon(idOrFileOrAddon, shouldToast = true, isReload = false) {
			const addon = typeof idOrFileOrAddon == "string" ? this.addonList.find((c) => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;
			if (!addon) return false;
			this.addonList.splice(this.addonList.indexOf(addon), 1);
			this.emit("unloaded", addon);
			if (shouldToast) this.toast(/* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("b", null, addon.name), " was unloaded."), "unloaded");
			Logger.log(this.name, `${addon.name} was unloaded.`);
			return true;
		}
		reloadAddon(idOrFileOrAddon, shouldToast = true) {
			const addon = typeof idOrFileOrAddon == "string" ? this.addonList.find((c) => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;
			const didUnload = this.unloadAddon(addon, false, true);
			if (addon && !didUnload) return didUnload;
			const error = this.loadAddon(addon ? addon.filename : idOrFileOrAddon, false);
			if (!error && shouldToast) this.toast(/* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("b", null, addon.name), " was reloaded."), "reloaded");
			return error;
		}
		isLoaded(idOrFile) {
			if (!this.addonList.find((c) => c.id == idOrFile || c.filename == idOrFile)) return false;
			return true;
		}
		getAddon(idOrFile) {
			return this.addonList.find((c) => c.id == idOrFile || c.filename == idOrFile);
		}
		loadNewAddons() {
			const files = fs.default.readdirSync(this.addonFolder);
			const removed = this.addonList.filter((t) => !files.includes(t.filename)).map((c) => c.id);
			return {
				added: files.filter((f) => !this.addonList.find((t) => t.filename == f) && f.endsWith(this.extension) && fs.default.statSync(path.default.resolve(this.addonFolder, f)).isFile()),
				removed
			};
		}
		updateList() {
			const results = this.loadNewAddons();
			for (const filename of results.added) this.loadAddon(filename);
			for (const name of results.removed) this.unloadAddon(name);
		}
		loadAllAddons() {
			const errors = [];
			const files = fs.default.readdirSync(this.addonFolder);
			for (const filename of files) {
				const absolutePath = path.default.resolve(this.addonFolder, filename);
				const stats = fs.default.statSync(absolutePath);
				if (!stats || !stats.isFile()) continue;
				this.timeCache[filename] = stats.mtimeMs;
				if (!filename.endsWith(this.extension)) {
					const match = filename.match(this.duplicatePattern);
					if (!match) continue;
					const ext = match[0];
					const newFilename = filename.replace(ext, "") + this.extension;
					if (fs.default.existsSync(newFilename)) {
						Logger.warn("AddonManager", `Duplicate files found: ${filename} and ${newFilename}`);
						continue;
					}
					fs.default.renameSync(absolutePath, path.default.resolve(this.addonFolder, newFilename));
				}
				const addon = this.loadAddon(filename, true);
				if (addon instanceof AddonError) errors.push(addon);
			}
			this.watchAddons();
			return errors;
		}
		unloadAllAddons() {
			this.addonList.slice().forEach((addon) => this.unloadAddon(addon, false));
		}
		shutdown() {
			this.unloadAllAddons();
			this.unwatchAddons();
			Logger.info(this.name, "Shutdown.");
		}
		deleteAddon(filename) {
			return fs.default.unlinkSync(path.default.resolve(this.addonFolder, filename));
		}
		saveAddon(filename, content) {
			return fs.default.writeFileSync(path.default.resolve(this.addonFolder, filename), content);
		}
	};
	//#endregion
	//#region src/modules/Notifications.jsx
	var Notifications = class {
		static info(options = {}) {
			return this.show(Object.assign({}, options, {
				type: "info",
				iconType: IconBrand.Types.INFO
			}));
		}
		static warn(options = {}) {
			return this.show(Object.assign({}, options, {
				type: "warning",
				iconType: IconBrand.Types.WARNING
			}));
		}
		static error(options = {}) {
			return this.show(Object.assign({}, options, {
				type: "error",
				iconType: IconBrand.Types.ERROR
			}));
		}
		static success(options = {}) {
			return this.show(Object.assign({}, options, {
				type: "success",
				iconType: IconBrand.Types.SUCCESS
			}));
		}
		static show(options = {}) {
			return UI.showNotification({
				title: meta_default.name,
				icon: () => /* @__PURE__ */ BdApi.React.createElement(IconBrand, { type: options.iconType ?? IconBrand.Types.DEFAULT }),
				...options
			});
		}
	};
	//#endregion
	//#region shared/enums/SettingsMode.js
	var SettingsMode_default = Enum({
		Simple: "simple",
		Advanced: "advanced"
	});
	//#endregion
	//#region shared/data.js
	var DataEvents = { FieldUpdated: "fieldUpdated" };
	var DataField = class {
		constructor(name, defaultValue) {
			this.$name = name;
			this.$defaultValue = defaultValue;
			this.$parentField = null;
			this.$base = null;
			this.$emitter = null;
		}
		$load() {
			if (this.$parentField) return this.$parentField.$reflect("get", this.$name);
			if (!this.$base) throw new Error("Trying to manipulate root DataField before $base was assigned");
			return this.$base.load(this.$name);
		}
		$save(value) {
			if (this.$parentField) return this.$parentField.$mutationReflect("set", this.$name, value);
			if (!this.$base) throw new Error("Trying to manipulate root DataField before $base was assigned");
			this.$base.save(this.$name, structuredClone(value));
			this.$emitter?.emit(DataEvents.FieldUpdated, this.$name);
		}
		get $value() {
			return this.$load() ?? this.$defaultValue;
		}
		set $value(value) {
			this.$save(value);
		}
	};
	var DataObjectField = class DataObjectField extends DataField {
		static mutationMethods = [];
		constructor(name, fields = [], defaultValue = {}) {
			super(name, defaultValue);
			this.$fields = Object.fromEntries(fields.map((field) => {
				field.$parentField = this;
				return [field.$name, field];
			}));
			const reflect = (method) => (self, ...args) => this.$reflect.call(self, method, ...args);
			const mutationReflect = (method) => (self, ...args) => this.$mutationReflect.call(self, method, ...args);
			return new Proxy(this, {
				get(self, key) {
					if (key in self) return self[key];
					if (key in self.$fields) {
						if (self.$fields[key] instanceof DataObjectField) return self.$fields[key];
						return self.$fields[key].$value;
					}
					const value = self.$value[key];
					if (typeof value === "function") return (...args) => {
						const value = self.$value;
						const returnValue = value[key](...args);
						if (self.constructor.mutationMethods.includes(key)) self.$value = value;
						return returnValue;
					};
					return value;
				},
				set(self, key, value) {
					if (key in self) self[key] = value;
					else if (key in self.$fields) self.$fields[key].$value = value;
					else self.$mutationReflect("set", key, value);
					return true;
				},
				defineProperty: mutationReflect("defineProperty"),
				deleteProperty: mutationReflect("deleteProperty"),
				has: reflect("has"),
				ownKeys: reflect("ownKeys"),
				getOwnPropertyDescriptor: reflect("getOwnPropertyDescriptor")
			});
		}
		$reflect(method, ...args) {
			return Reflect[method](this.$value, ...args);
		}
		$mutationReflect(method, ...args) {
			const value = this.$value;
			Reflect[method](value, ...args);
			this.$value = value;
			return true;
		}
	};
	var DataArrayField = class extends DataObjectField {
		static mutationMethods = [
			"push",
			"pop",
			"shift",
			"unshift",
			"splice",
			"sort",
			"reverse"
		];
		constructor(name, defaultValue = []) {
			return super(name, [], defaultValue);
		}
	};
	var DataSetField = class extends DataArrayField {
		static mutationMethods = [
			"add",
			"delete",
			"clear"
		];
		constructor(name, defaultValue = /* @__PURE__ */ new Set()) {
			return super(name, Array.from(defaultValue));
		}
		get $value() {
			return new Set(super.$value);
		}
		set $value(value) {
			super.$value = Array.from(value);
		}
	};
	var Data = class {
		constructor(base, fields = []) {
			this.$base = base;
			this.$emitter = new events.default();
			this.$fields = Object.fromEntries(fields.map((field) => {
				field.$base = this.$base;
				field.$emitter = this.$emitter;
				return [field.$name, field];
			}));
			return new Proxy(this, {
				get(self, key) {
					if (key in self) return self[key];
					if (!(key in self.$fields)) self.$createField(key);
					if (self.$fields[key] instanceof DataObjectField) return self.$fields[key];
					return self.$fields[key].$value;
				},
				set(self, key, value) {
					if (key in self.$fields) self.$fields[key].$value = value;
					else self.$createField(key).$value = value;
					return true;
				}
			});
		}
		$createField(name, defaultValue) {
			const field = new DataField(name, defaultValue);
			field.$base = this.$base;
			this.$fields[name] = field;
			return field;
		}
		$use(name) {
			const update = useUpdate();
			(0, react.useEffect)(() => {
				const onDataFieldUpdated = (updatedName) => {
					if (updatedName === name) update();
				};
				this.$emitter.on(DataEvents.FieldUpdated, onDataFieldUpdated);
				return () => this.$emitter.off(DataEvents.FieldUpdated, onDataFieldUpdated);
			}, [name]);
			return [this[name], (0, react.useCallback)((value) => this[name] = value, [name])];
		}
	};
	//#endregion
	//#region src/modules/Data.js
	var data = new Data(BDData, [
		new DataObjectField("currentVersionInfo", [new DataField("version", version$1), new DataField("hasShownChangelog", false)]),
		new DataField("configVersion"),
		new DataField("settings"),
		new DataField("settingsMode", SettingsMode_default.Simple),
		new DataObjectField("packs"),
		new DataObjectField("preferences", [
			new DataField("module"),
			new DataField("pack"),
			new DataField("sort")
		]),
		new DataObjectField("catalog", [
			new DataField("visited", false),
			new DataSetField("known"),
			new DataField("cache"),
			new DataField("sort")
		]),
		new DataObjectField("library", [new DataSetField("whitelist"), new DataField("sort")]),
		new DataObjectField("prompts"),
		new DataObjectField("dismissibles")
	]);
	var useData = data.$use.bind(data);
	//#endregion
	//#region src/settings/hooks/useMode.js
	var useMode = () => useData("settingsMode");
	function useAdvancedMode(force = false) {
		const [mode] = useMode();
		return force || mode === SettingsMode_default.Advanced;
	}
	//#endregion
	//#region shared/enums/AnimationSettingContainer.js
	var AnimationSettingContainer_default = Enum({
		Group: "group",
		List: "list"
	});
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js
	/** Used to stand-in for `undefined` hash values. */
	var HASH_UNDEFINED = "__lodash_hash_undefined__";
	/**
	* Adds `value` to the array cache.
	*
	* @private
	* @name add
	* @memberOf SetCache
	* @alias push
	* @param {*} value The value to cache.
	* @returns {Object} Returns the cache instance.
	*/
	function setCacheAdd(value) {
		this.__data__.set(value, HASH_UNDEFINED);
		return this;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js
	/**
	* Checks if `value` is in the array cache.
	*
	* @private
	* @name has
	* @memberOf SetCache
	* @param {*} value The value to search for.
	* @returns {boolean} Returns `true` if `value` is found, else `false`.
	*/
	function setCacheHas(value) {
		return this.__data__.has(value);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js
	/**
	*
	* Creates an array cache object to store unique values.
	*
	* @private
	* @constructor
	* @param {Array} [values] The values to cache.
	*/
	function SetCache(values) {
		var index = -1, length = values == null ? 0 : values.length;
		this.__data__ = new MapCache();
		while (++index < length) this.add(values[index]);
	}
	SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
	SetCache.prototype.has = setCacheHas;
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js
	/**
	* A specialized version of `_.some` for arrays without support for iteratee
	* shorthands.
	*
	* @private
	* @param {Array} [array] The array to iterate over.
	* @param {Function} predicate The function invoked per iteration.
	* @returns {boolean} Returns `true` if any element passes the predicate check,
	*  else `false`.
	*/
	function arraySome(array, predicate) {
		var index = -1, length = array == null ? 0 : array.length;
		while (++index < length) if (predicate(array[index], index, array)) return true;
		return false;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js
	/**
	* Checks if a `cache` value for `key` exists.
	*
	* @private
	* @param {Object} cache The cache to query.
	* @param {string} key The key of the entry to check.
	* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
	*/
	function cacheHas(cache, key) {
		return cache.has(key);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js
	/** Used to compose bitmasks for value comparisons. */
	var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
	/**
	* A specialized version of `baseIsEqualDeep` for arrays with support for
	* partial deep comparisons.
	*
	* @private
	* @param {Array} array The array to compare.
	* @param {Array} other The other array to compare.
	* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
	* @param {Function} customizer The function to customize comparisons.
	* @param {Function} equalFunc The function to determine equivalents of values.
	* @param {Object} stack Tracks traversed `array` and `other` objects.
	* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
	*/
	function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
		var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length;
		if (arrLength != othLength && !(isPartial && othLength > arrLength)) return false;
		var arrStacked = stack.get(array);
		var othStacked = stack.get(other);
		if (arrStacked && othStacked) return arrStacked == other && othStacked == array;
		var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
		stack.set(array, other);
		stack.set(other, array);
		while (++index < arrLength) {
			var arrValue = array[index], othValue = other[index];
			if (customizer) var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
			if (compared !== void 0) {
				if (compared) continue;
				result = false;
				break;
			}
			if (seen) {
				if (!arraySome(other, function(othValue, othIndex) {
					if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) return seen.push(othIndex);
				})) {
					result = false;
					break;
				}
			} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
				result = false;
				break;
			}
		}
		stack["delete"](array);
		stack["delete"](other);
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js
	/**
	* Converts `map` to its key-value pairs.
	*
	* @private
	* @param {Object} map The map to convert.
	* @returns {Array} Returns the key-value pairs.
	*/
	function mapToArray(map) {
		var index = -1, result = Array(map.size);
		map.forEach(function(value, key) {
			result[++index] = [key, value];
		});
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js
	/**
	* Converts `set` to an array of its values.
	*
	* @private
	* @param {Object} set The set to convert.
	* @returns {Array} Returns the values.
	*/
	function setToArray(set) {
		var index = -1, result = Array(set.size);
		set.forEach(function(value) {
			result[++index] = value;
		});
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js
	/** Used to compose bitmasks for value comparisons. */
	var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
	/** `Object#toString` result references. */
	var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
	var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
	/** Used to convert symbols to primitives and strings. */
	var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
	/**
	* A specialized version of `baseIsEqualDeep` for comparing objects of
	* the same `toStringTag`.
	*
	* **Note:** This function only supports comparing values with tags of
	* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
	*
	* @private
	* @param {Object} object The object to compare.
	* @param {Object} other The other object to compare.
	* @param {string} tag The `toStringTag` of the objects to compare.
	* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
	* @param {Function} customizer The function to customize comparisons.
	* @param {Function} equalFunc The function to determine equivalents of values.
	* @param {Object} stack Tracks traversed `object` and `other` objects.
	* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
	*/
	function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
		switch (tag) {
			case dataViewTag:
				if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) return false;
				object = object.buffer;
				other = other.buffer;
			case arrayBufferTag:
				if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) return false;
				return true;
			case boolTag:
			case dateTag:
			case numberTag: return eq(+object, +other);
			case errorTag: return object.name == other.name && object.message == other.message;
			case regexpTag:
			case stringTag: return object == other + "";
			case mapTag: var convert = mapToArray;
			case setTag:
				var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
				convert || (convert = setToArray);
				if (object.size != other.size && !isPartial) return false;
				var stacked = stack.get(object);
				if (stacked) return stacked == other;
				bitmask |= COMPARE_UNORDERED_FLAG;
				stack.set(object, other);
				var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
				stack["delete"](object);
				return result;
			case symbolTag: if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other);
		}
		return false;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js
	/** Used to compose bitmasks for value comparisons. */
	var COMPARE_PARTIAL_FLAG$1 = 1;
	/** Used to check objects for own properties. */
	var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
	/**
	* A specialized version of `baseIsEqualDeep` for objects with support for
	* partial deep comparisons.
	*
	* @private
	* @param {Object} object The object to compare.
	* @param {Object} other The other object to compare.
	* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
	* @param {Function} customizer The function to customize comparisons.
	* @param {Function} equalFunc The function to determine equivalents of values.
	* @param {Object} stack Tracks traversed `object` and `other` objects.
	* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
	*/
	function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
		var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length;
		if (objLength != getAllKeys(other).length && !isPartial) return false;
		var index = objLength;
		while (index--) {
			var key = objProps[index];
			if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) return false;
		}
		var objStacked = stack.get(object);
		var othStacked = stack.get(other);
		if (objStacked && othStacked) return objStacked == other && othStacked == object;
		var result = true;
		stack.set(object, other);
		stack.set(other, object);
		var skipCtor = isPartial;
		while (++index < objLength) {
			key = objProps[index];
			var objValue = object[key], othValue = other[key];
			if (customizer) var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
			if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
				result = false;
				break;
			}
			skipCtor || (skipCtor = key == "constructor");
		}
		if (result && !skipCtor) {
			var objCtor = object.constructor, othCtor = other.constructor;
			if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) result = false;
		}
		stack["delete"](object);
		stack["delete"](other);
		return result;
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js
	/** Used to compose bitmasks for value comparisons. */
	var COMPARE_PARTIAL_FLAG = 1;
	/** `Object#toString` result references. */
	var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
	/** Used to check objects for own properties. */
	var hasOwnProperty = Object.prototype.hasOwnProperty;
	/**
	* A specialized version of `baseIsEqual` for arrays and objects which performs
	* deep comparisons and tracks traversed objects enabling objects with circular
	* references to be compared.
	*
	* @private
	* @param {Object} object The object to compare.
	* @param {Object} other The other object to compare.
	* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
	* @param {Function} customizer The function to customize comparisons.
	* @param {Function} equalFunc The function to determine equivalents of values.
	* @param {Object} [stack] Tracks traversed `object` and `other` objects.
	* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
	*/
	function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
		var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : _getTag_default(object), othTag = othIsArr ? arrayTag : _getTag_default(other);
		objTag = objTag == argsTag ? objectTag : objTag;
		othTag = othTag == argsTag ? objectTag : othTag;
		var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
		if (isSameTag && isBuffer(object)) {
			if (!isBuffer(other)) return false;
			objIsArr = true;
			objIsObj = false;
		}
		if (isSameTag && !objIsObj) {
			stack || (stack = new Stack());
			return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
		}
		if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
			var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
			if (objIsWrapped || othIsWrapped) {
				var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
				stack || (stack = new Stack());
				return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
			}
		}
		if (!isSameTag) return false;
		stack || (stack = new Stack());
		return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js
	/**
	* The base implementation of `_.isEqual` which supports partial comparisons
	* and tracks traversed objects.
	*
	* @private
	* @param {*} value The value to compare.
	* @param {*} other The other value to compare.
	* @param {boolean} bitmask The bitmask flags.
	*  1 - Unordered comparison
	*  2 - Partial comparison
	* @param {Function} [customizer] The function to customize comparisons.
	* @param {Object} [stack] Tracks traversed `value` and `other` objects.
	* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
	*/
	function baseIsEqual(value, other, bitmask, customizer, stack) {
		if (value === other) return true;
		if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) return value !== value && other !== other;
		return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
	}
	//#endregion
	//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js
	/**
	* Performs a deep comparison between two values to determine if they are
	* equivalent.
	*
	* **Note:** This method supports comparing arrays, array buffers, booleans,
	* date objects, error objects, maps, numbers, `Object` objects, regexes,
	* sets, strings, symbols, and typed arrays. `Object` objects are compared
	* by their own, not inherited, enumerable properties. Functions and DOM
	* nodes are compared by strict equality, i.e. `===`.
	*
	* @static
	* @memberOf _
	* @since 0.1.0
	* @category Lang
	* @param {*} value The value to compare.
	* @param {*} other The other value to compare.
	* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
	* @example
	*
	* var object = { 'a': 1 };
	* var other = { 'a': 1 };
	*
	* _.isEqual(object, other);
	* // => true
	*
	* object === other;
	* // => false
	*/
	function isEqual(value, other) {
		return baseIsEqual(value, other);
	}
	//#endregion
	//#region src/settings/hooks/useAnimationSettings.js
	function isSame(array, key) {
		return array.every((item) => isEqual(item?.[key], array[0]?.[key]));
	}
	function canMerge(settings) {
		const _isSame = (key) => isSame(settings, key);
		if (!_isSame("type")) return false;
		const base = _isSame("animation") && _isSame("value");
		switch (settings[0].type) {
			case AnimationSetting_default.Position: return base && _isSame("preserve");
			case AnimationSetting_default.Direction: return base && _isSame("axis") && _isSame("reverse") && _isSame("towards");
			default: return base;
		}
	}
	function mergeFunctions(array) {
		return Object.fromEntries(Object.entries(array[0] ?? {}).filter(([, value]) => typeof value === "function").map(([key]) => [key, (...args) => array.forEach((item) => item[key]?.(...args))]));
	}
	function _useAnimationSettings(module, items, options = {}) {
		const { hideOverflow = false } = options;
		const isAdvanced = useAdvancedMode();
		const sets = items.map(({ animation, settings, setSettings: _setSettings, defaults }) => {
			if (!animation) return [];
			const setSettings = (values) => _setSettings({
				...settings,
				...values
			});
			const buildSetting = (setting, props = {}) => {
				const value = settings[setting];
				const defaultValue = defaults()[setting];
				return {
					module,
					animation,
					type: setting,
					value,
					onChange: (value) => setSettings({ [setting]: value }),
					defaultValue,
					onReset: !isEqual(value, defaultValue) ? () => setSettings({ [setting]: defaults()[setting] }) : null,
					...props
				};
			};
			return [
				animation.settings?.[AnimationSetting_default.Duration] && buildSetting(AnimationSetting_default.Duration),
				animation.settings?.[AnimationSetting_default.Variant] && buildSetting(AnimationSetting_default.Variant),
				animation.settings?.[AnimationSetting_default.Position] && (() => {
					const keys = [AnimationSetting_default.Position, AnimationSetting_default.PositionPreserve];
					const values = pick(settings, keys);
					const defaultValues = pick(defaults(), keys);
					return buildSetting(AnimationSetting_default.Position, {
						preserve: settings[AnimationSetting_default.PositionPreserve],
						onPreserveChange: (value) => setSettings({ [AnimationSetting_default.PositionPreserve]: value }),
						onReset: !isEqual(values, defaultValues) ? () => setSettings(defaultValues) : null
					});
				})(),
				animation.settings?.[AnimationSetting_default.Direction] && (() => {
					const keys = [
						AnimationSetting_default.Direction,
						AnimationSetting_default.DirectionAxis,
						AnimationSetting_default.DirectionReverse,
						AnimationSetting_default.DirectionTowards
					];
					const values = pick(settings, keys);
					const defaultValues = pick(defaults(), keys);
					return buildSetting(AnimationSetting_default.Direction, {
						axis: settings[AnimationSetting_default.DirectionAxis],
						onAxisChange: (value) => setSettings({ [AnimationSetting_default.DirectionAxis]: value }),
						reverse: settings[AnimationSetting_default.DirectionReverse],
						onReverseChange: (value) => setSettings({ [AnimationSetting_default.DirectionReverse]: value }),
						towards: settings[AnimationSetting_default.DirectionTowards],
						onTowardsChange: (value) => setSettings({ [AnimationSetting_default.DirectionTowards]: value }),
						onReset: !isEqual(values, defaultValues) ? () => setSettings(defaultValues) : null
					});
				})(),
				isAdvanced && animation.settings?.[AnimationSetting_default.Easing] && buildSetting(AnimationSetting_default.Easing),
				isAdvanced && !hideOverflow && !module.meta?.settings?.hideOverflow && buildSetting(AnimationSetting_default.Overflow, { forced: animation.settings?.[AnimationSetting_default.Overflow] === false })
			].filter(Boolean);
		});
		if (!isSame(items, "animation")) return [{
			type: AnimationSettingContainer_default.Group,
			children: sets.map((settings) => ({
				type: AnimationSettingContainer_default.List,
				children: settings
			}))
		}];
		return Array(Math.max(...sets.map((s) => s.length), 0)).fill(null).map((_, i) => {
			const settings = sets.map((s) => s[i] ?? null);
			if (!(!isAdvanced && module.meta?.type === ModuleType_default.Switch && isSame(items, "enabled") && canMerge(settings))) return {
				type: AnimationSettingContainer_default.Group,
				children: settings
			};
			return {
				...settings[0],
				defaultValue: isSame(settings, "defaultValue") ? settings[0].defaultValue : null,
				...mergeFunctions(settings)
			};
		});
	}
	function useAnimationSettingsHeaders(module, items, settings = _useAnimationSettings(module, items)) {
		const typeLabel = (type) => ({
			[AnimationType_default.Enter]: "Enter",
			[AnimationType_default.Exit]: "Exit"
		})[type];
		const headers = items.map(({ animation, type, enabled, setEnabled, settings, defaults, onReset, title, subtitle, headerAfter, switchTooltip }) => ({
			key: type,
			title: title || typeLabel(type) || animation.name,
			subtitle: title && subtitle ? subtitle === true ? typeLabel(type) : subtitle : null,
			headerAfter,
			enabled,
			setEnabled,
			switchTooltip,
			onReset: onReset && !isEqual(settings, defaults()) ? onReset : null
		}));
		if (!settings.some((s) => s.type === AnimationSettingContainer_default.Group)) return [{
			key: "both",
			title: items[0]?.animation?.name || "No animations selected",
			enabled: items.every((i) => i.enabled),
			...mergeFunctions(headers)
		}];
		return headers;
	}
	function useAnimationSettings(module, items, options = {}) {
		const settings = _useAnimationSettings(module, items, options);
		return {
			headers: useAnimationSettingsHeaders(module, items, settings),
			settings
		};
	}
	//#endregion
	//#region shared/enums/SuppressErrors.js
	var SuppressErrors_default = Enum({
		All: "all",
		Animation: "animation",
		None: "none"
	});
	//#endregion
	//#region shared/data/config.js
	var packConfigDefaults = { entries: [] };
	var configDefaults = {
		modules: {
			[ModuleKey_default.Servers]: {
				enabled: true,
				enhanceLayout: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slide"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slide"
				}
			},
			[ModuleKey_default.Channels]: {
				enabled: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				}
			},
			[ModuleKey_default.Settings]: {
				enabled: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				}
			},
			[ModuleKey_default.Layers]: {
				enabled: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "scale"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "scale"
				}
			},
			[ModuleKey_default.Tooltips]: {
				enabled: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				}
			},
			[ModuleKey_default.Popouts]: {
				enabled: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				}
			},
			[ModuleKey_default.ContextMenu]: {
				enabled: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "scale"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "scale"
				}
			},
			[ModuleKey_default.Messages]: {
				enabled: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				}
			},
			[ModuleKey_default.ChannelList]: {
				enabled: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				}
			},
			[ModuleKey_default.Modals]: {
				enabled: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "slip"
				}
			},
			[ModuleKey_default.ModalsBackdrop]: {
				enabled: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "backdropSolid"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "backdropSolid"
				}
			},
			[ModuleKey_default.MembersSidebar]: {
				enabled: true,
				enter: {
					packSlug: null,
					animationKey: null
				},
				exit: {
					packSlug: null,
					animationKey: null
				}
			},
			[ModuleKey_default.ThreadSidebar]: {
				enabled: true,
				enter: {
					packSlug: null,
					animationKey: null
				},
				exit: {
					packSlug: null,
					animationKey: null
				}
			},
			[ModuleKey_default.ThreadSidebarSwitch]: {
				enabled: true,
				enter: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "fade"
				},
				exit: {
					packSlug: PREINSTALLED_PACK_SLUG,
					animationKey: "fade"
				}
			}
		},
		general: {
			quickPreview: true,
			disableHints: false,
			suppressErrors: SuppressErrors_default.None,
			prioritizeAnimationSmoothness: true,
			cacheUserSettingsSections: true,
			preloadLayers: true,
			switchCooldownDuration: 1e3
		}
	};
	//#endregion
	//#region src/modules/PackData.js
	var ExternalPackDataStore = new class {
		constructor() {
			this.cache = {};
		}
		_getFile(slug) {
			return path.default.resolve(PackManager_default.addonFolder, `${slug}.config.json`);
		}
		_ensureData(slug) {
			if (typeof this.cache[slug] !== "undefined") return;
			if (!fs.default.existsSync(this._getFile(slug))) return this.cache[slug] = {};
			try {
				this.cache[slug] = JSON.parse(fs.default.readFileSync(this._getFile(slug)).toString());
			} catch {
				return this.cache[slug] = {};
			}
		}
		_saveData(slug) {
			fs.default.writeFileSync(this._getFile(slug), JSON.stringify(this.cache[slug], null, 4));
		}
		getData(slug, key) {
			this._ensureData(slug);
			return this.cache[slug][key];
		}
		setData(slug, key, value) {
			if (value === void 0) return;
			this._ensureData(slug);
			this.cache[slug][key] = value;
			this._saveData(slug);
		}
		deleteData(slug, key) {
			this._ensureData(slug);
			delete this.cache[slug][key];
			this._saveData(slug);
		}
	}();
	var BaseExternalPackData = class {
		constructor(slug) {
			this.slug = slug;
		}
		save(key, value) {
			return ExternalPackDataStore.setData(this.slug, key, value);
		}
		load(key) {
			return ExternalPackDataStore.getData(this.slug, key);
		}
	};
	var BaseInternalPackData = class {
		constructor(slug) {
			this.slug = slug;
		}
		save(key, value) {
			data.packs[this.slug] = {
				...data.packs[this.slug],
				[key]: value
			};
		}
		load(key) {
			return data.packs[this.slug]?.[key];
		}
	};
	var PackData = class {
		get name() {
			return "PackData";
		}
		constructor() {
			this.internalInstances = new Map(internalPackSlugs.map((slug) => [slug, this.create(slug, new BaseInternalPackData(slug))]));
			this.externalInstances = /* @__PURE__ */ new Map();
			this.onPackLoaded = (pack) => this.externalInstances.set(pack.slug, this.create(pack.slug));
			this.onPackUnloaded = (pack) => this.externalInstances.delete(pack.slug);
		}
		create(slug, base = new BaseExternalPackData(slug)) {
			return new Data(base, [
				new DataField("configVersion"),
				new DataField("currentVersion"),
				new DataField("settings")
			]);
		}
		pack(slug) {
			return this.internalInstances.get(slug) ?? this.externalInstances.get(slug) ?? this.create(slug);
		}
		initialize() {
			Emitter_default.on(Events_default.PackLoaded, this.onPackLoaded);
			Emitter_default.on(Events_default.PackUnloaded, this.onPackUnloaded);
			Logger.info(this.name, "Initialized.");
		}
		shutdown() {
			Emitter_default.off(Events_default.PackLoaded, this.onPackLoaded);
			Emitter_default.off(Events_default.PackUnloaded, this.onPackUnloaded);
			this.externalInstances.clear();
			Logger.info(this.name, "Shutdown.");
		}
	};
	var PackData_default = new PackData();
	//#endregion
	//#region src/components/Migrator.jsx
	function MigratorModal({ migrator, ...props }) {
		const { isActive, message, actions } = migrator.use();
		(0, react.useEffect)(() => {
			if (!isActive) props.onClose?.();
		}, [isActive]);
		return /* @__PURE__ */ BdApi.React.createElement(Modal$2, {
			...props,
			title: Messages.SETTINGS_MIGRATOR,
			footer: /* @__PURE__ */ BdApi.React.createElement(ButtonGroup$1, { direction: "horizontal-reverse" }, actions.map((props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, props)))
		}, /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-md/normal" }, message));
	}
	function MigratorAlert({ migrator, ...props }) {
		const { message, actions } = migrator.use();
		return /* @__PURE__ */ BdApi.React.createElement(Alert, {
			...props,
			messageType: AlertTypes.WARNING
		}, /* @__PURE__ */ BdApi.React.createElement(Stack$1, { gap: 8 }, message, /* @__PURE__ */ BdApi.React.createElement(ButtonGroup$1, { size: "sm" }, actions.map((props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			...props,
			size: "sm"
		})))));
	}
	function MigratorContainer({ migrator, children, className, contentClassName }) {
		const { isActive } = migrator.use();
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)({
			"BA__migratorContainer": true,
			"BA__migratorContainer--blocked": isActive
		}, className) }, isActive && /* @__PURE__ */ BdApi.React.createElement(MigratorAlert, { migrator }), /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("BA__migratorContainerContent", contentClassName) }, children));
	}
	css`.BA__migratorContainer {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.BA__migratorContainer--blocked .BA__migratorContainerContent {
    pointer-events: none;
    opacity: .4;
}``Migrator Components`;
	//#endregion
	//#region src/modules/Migrator.jsx
	var AbortSymbol = Symbol("Abort");
	var Migrator = class Migrator {
		static IDLE = 0;
		static BUSY = 1;
		static ERROR = 2;
		get name() {
			return "Migrator";
		}
		constructor(config, migrations = {}) {
			this.config = config;
			this.migrations = migrations;
			this._status = Migrator.IDLE;
			this._abortController = null;
			this._schedulerCallbackId = null;
			this.error = null;
		}
		get status() {
			return this._status;
		}
		set status(value) {
			this._status = value;
			if (value !== Migrator.ERROR) this.error = null;
			Emitter_default.emit(Events_default.MigratorUpdated);
		}
		get configs() {
			return this.config.getAll();
		}
		getOutdatedConfigs(configs = this.configs) {
			return configs.filter((config) => config.isOutdated);
		}
		hasOutdatedConfigs(configs = this.configs) {
			return configs.some((config) => config.isOutdated);
		}
		get isActive() {
			return this.hasOutdatedConfigs();
		}
		getMinVersion(configs, latestVersion = 2) {
			return configs.reduce((minVersion, config) => Math.min(minVersion, config.configVersion), latestVersion);
		}
		buildPromptMessage(configs = this.getOutdatedConfigs()) {
			return this.config.buildMigrationPromptMessage(configs);
		}
		useEffect() {
			useEmitterEffect(Events_default.MigratorUpdated);
		}
		useMessage() {
			this.useEffect();
			switch (this.status) {
				case Migrator.IDLE:
					if (!this.hasOutdatedConfigs()) return /* @__PURE__ */ BdApi.React.createElement("p", null, "Your settings are up to date.");
					return this.buildPromptMessage();
				case Migrator.BUSY: return /* @__PURE__ */ BdApi.React.createElement("p", null, "Your settings are being migrated to the latest version...");
				case Migrator.ERROR: return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("p", null, "An error occurred while trying to migrate your settings to the latest version."), /* @__PURE__ */ BdApi.React.createElement("p", null, "Contact the support if you don't want to lose your settings."));
			}
		}
		useActions() {
			this.useEffect();
			switch (this.status) {
				case Migrator.IDLE:
					if (!this.hasOutdatedConfigs()) return [];
					return [{
						text: "Migrate",
						onClick: () => this.migrate(true)
					}, {
						variant: "secondary",
						text: "Cancel",
						onClick: () => this.promptCancel()
					}];
				case Migrator.BUSY: return [{
					text: "Migrate",
					disabled: true,
					loading: true
				}, {
					variant: "secondary",
					text: "Abort",
					onClick: () => this.abort()
				}];
				case Migrator.ERROR: return [
					{
						text: "View",
						onClick: () => manager_default.showModal([this.error])
					},
					{
						variant: "secondary",
						text: "Try again",
						onClick: () => this.migrate(true)
					},
					{
						variant: "secondary",
						text: "Cancel",
						onClick: () => this.promptCancel()
					}
				];
			}
		}
		use() {
			this.useEffect();
			return {
				isActive: this.isActive,
				status: this.status,
				loading: this.status === Migrator.BUSY,
				error: this.error,
				message: this.useMessage(),
				actions: this.useActions()
			};
		}
		prompt() {
			ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(MigratorModal, {
				...props,
				migrator: this
			}), { modalKey: "BA__migratorModal" });
		}
		promptIfNeeded(versionOrConfigs = this.configs) {
			if (Array.isArray(versionOrConfigs)) return this.promptIfNeeded(this.getMinVersion(versionOrConfigs));
			for (let v = versionOrConfigs + 1; v <= 2; v++) {
				if (!this.migrations[v].prompt) continue;
				this.prompt();
				return true;
			}
			return false;
		}
		applyMutations(mutations) {
			const incompleteMutations = mutations.filter((mutation) => mutation.version !== 2);
			if (incompleteMutations.length) {
				Logger.error(this.name, "Found incomplete mutations after migration:", incompleteMutations);
				throw new Error("Found incomplete mutations");
			}
			this.config.applyMutations(mutations);
		}
		async migrate(confirmed = false) {
			if (this.status === Migrator.BUSY || !this.hasOutdatedConfigs()) return;
			const version = this.getMinVersion(this.configs);
			if (!confirmed && this.promptIfNeeded(version)) return;
			this.status = Migrator.BUSY;
			this._abortController = new AbortController();
			const signal = this._abortController.signal;
			try {
				const configs = this.configs.map((config) => ({
					slug: config.slug,
					version: config.configVersion,
					data: config.data.settings
				}));
				const mutations = [];
				for (let v = version + 1; v <= 2; v++) {
					const migration = this.migrations[v];
					if (!migration) throw new Error(`Migration for version ${v} doesn't exist`);
					const result = await migration.handler(mutations.concat(configs).filter((config) => config.version === v - 1).map((config) => structuredClone(config)), signal);
					if (result === false || signal.aborted) throw AbortSymbol;
					for (const mutation of result) {
						const existing = mutations.find((m) => m.slug === mutation.slug);
						if (existing) Object.assign(existing, mutation);
						else mutations.push(mutation);
					}
				}
				this.applyMutations(mutations);
				if (confirmed) Toasts.success("Settings successfully migrated.");
				this.status = Migrator.IDLE;
			} catch (error) {
				if (error === AbortSymbol) {
					Logger.warn(this.name, "Migration aborted.");
					this.status = Migrator.IDLE;
					return;
				}
				Logger.error(this.name, "Migration failed:", error);
				error = new InternalError(`${this.name}: ${error.stack ?? error.message}`);
				this.prompt();
				this.error = error;
				this.status = Migrator.ERROR;
			}
		}
		schedule() {
			cancelIdleCallback(this._schedulerCallbackId);
			this._schedulerCallbackId = requestIdleCallback(() => this.migrate());
		}
		validate(configs = this.configs) {
			if (!this.hasOutdatedConfigs(configs)) return;
			if (!this.promptIfNeeded(configs)) this.schedule();
			Emitter_default.emit(Events_default.MigratorUpdated);
		}
		abort() {
			this._abortController?.abort(AbortSymbol);
		}
		cancel() {
			for (const config of this.configs) if (config.isOutdated) config.reset();
		}
		promptCancel() {
			ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(Modal$2, {
				...props,
				title: Messages.SETTINGS_MIGRATOR,
				confirmText: "Confirm cancellation",
				confirmButtonVariant: "critical-primary",
				cancelText: "Back to migration",
				onConfirm: () => this.cancel()
			}, /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-md/normal" }, /* @__PURE__ */ BdApi.React.createElement("p", null, "Are you sure you want to cancel migration? Your configuration will be deleted ", /* @__PURE__ */ BdApi.React.createElement("b", null, "permanently"), "."), /* @__PURE__ */ BdApi.React.createElement("p", null, "This means that you will lose all your settings from the previous version and it will be replaced with the default settings. ", /* @__PURE__ */ BdApi.React.createElement("b", null, "This action cannot be undone.")))));
		}
	};
	//#endregion
	//#region src/settings/components/IconButton.jsx
	function IconButton({ children, tooltip, disabled = false, active = false, className, ...props }) {
		const button = (_props) => /* @__PURE__ */ BdApi.React.createElement("div", {
			className,
			..._props
		}, /* @__PURE__ */ BdApi.React.createElement(Clickable, {
			tag: "button",
			className: (0, clsx.default)("BA__iconButton", { "BA__iconButton--active": active }),
			disabled,
			...props
		}, children));
		if (!tooltip) return button({});
		const tooltipProps = typeof tooltip === "string" ? { text: tooltip } : tooltip;
		return /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, tooltipProps, button);
	}
	css`.BA__iconButton {
    display: block;
    color: var(--interactive-icon-default);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
.BA__iconButton:hover {
    color: var(--interactive-icon-hover);
}
.BA__iconButton:active,
.BA__iconButton--active {
    color: var(--interactive-icon-active);
}
.BA__iconButton:disabled {
    color: var(--interactive-muted);
    cursor: not-allowed;
}

.BA__iconButton svg {
    display: block;
    fill: currentColor;
}``IconButton`;
	//#endregion
	//#region src/components/icons/CheckIcon.jsx
	function CheckIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M18.7 7.3a1 1 0 0 1 0 1.4l-8 8a1 1 0 0 1-1.4 0l-4-4a1 1 0 1 1 1.4-1.4l3.3 3.29 7.3-7.3a1 1 0 0 1 1.4 0Z",
			clipRule: "evenodd"
		}));
	}
	//#endregion
	//#region src/components/icons/CircleQuestionIcon.jsx
	function CircleQuestionIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT, secondaryColor = "transparent" }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("circle", {
			cx: "12",
			cy: "12",
			r: "10",
			fill: typeof secondaryColor === "string" ? secondaryColor : secondaryColor?.css
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm-.28-16c-.98 0-1.81.47-2.27 1.14A1 1 0 1 1 7.8 7.01 4.73 4.73 0 0 1 11.72 5c2.5 0 4.65 1.88 4.65 4.38 0 2.1-1.54 3.77-3.52 4.24l.14 1a1 1 0 0 1-1.98.27l-.28-2a1 1 0 0 1 .99-1.14c1.54 0 2.65-1.14 2.65-2.38 0-1.23-1.1-2.37-2.65-2.37ZM13 17.88a1.13 1.13 0 1 1-2.25 0 1.13 1.13 0 0 1 2.25 0Z",
			clipRule: "evenodd"
		}));
	}
	//#endregion
	//#region src/components/icons/CircleDollarSignIcon.jsx
	function CircleDollarSignIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "1 1 22 22"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10m.75-16a.75.75 0 0 0-1.5 0v.317c-1.63.292-3 1.517-3 3.183c0 1.917 1.813 3.25 3.75 3.25c1.377 0 2.25.906 2.25 1.75s-.873 1.75-2.25 1.75c-1.376 0-2.25-.906-2.25-1.75a.75.75 0 0 0-1.5 0c0 1.666 1.37 2.891 3 3.183V18a.75.75 0 0 0 1.5 0v-.317c1.63-.292 3-1.517 3-3.183c0-1.917-1.813-3.25-3.75-3.25c-1.376 0-2.25-.906-2.25-1.75s.874-1.75 2.25-1.75c1.377 0 2.25.906 2.25 1.75a.75.75 0 0 0 1.5 0c0-1.666-1.37-2.891-3-3.183z",
			clipRule: "evenodd"
		}));
	}
	//#endregion
	//#region src/settings/components/SquircleMask.jsx
	function SquircleMask({ children, size = 40, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...props,
			height: size,
			width: size,
			viewBox: `0 0 ${size} ${size}`
		}, /* @__PURE__ */ BdApi.React.createElement("foreignObject", {
			x: 0,
			y: 0,
			height: size,
			width: size,
			overflow: "visible",
			mask: "url(#svg-mask-squircle)"
		}, children));
	}
	//#endregion
	//#region src/components/icons/LinkIcon.jsx
	function LinkIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M16.32 14.72a1 1 0 0 1 0-1.41l2.51-2.51a3.98 3.98 0 0 0-5.62-5.63l-2.52 2.51a1 1 0 0 1-1.41-1.41l2.52-2.52a5.98 5.98 0 0 1 8.45 8.46l-2.52 2.51a1 1 0 0 1-1.41 0ZM7.68 9.29a1 1 0 0 1 0 1.41l-2.52 2.51a3.98 3.98 0 1 0 5.63 5.63l2.51-2.52a1 1 0 0 1 1.42 1.42l-2.52 2.51a5.98 5.98 0 0 1-8.45-8.45l2.51-2.51a1 1 0 0 1 1.42 0Z"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M14.7 10.7a1 1 0 0 0-1.4-1.4l-4 4a1 1 0 1 0 1.4 1.4l4-4Z"
		}));
	}
	//#endregion
	//#region src/components/icons/ArrowSmallRightIcon.jsx
	function ArrowSmallRightIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M20.7 12.7a1 1 0 0 0 0-1.4l-5-5a1 1 0 1 0-1.4 1.4l3.29 3.3H4a1 1 0 1 0 0 2h13.59l-3.3 3.3a1 1 0 0 0 1.42 1.4l5-5Z"
		}));
	}
	//#endregion
	//#region src/components/icons/CircleWarningIcon.jsx
	function CircleWarningIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT, secondaryColor = "transparent", ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24",
			...props
		}, /* @__PURE__ */ BdApi.React.createElement("circle", {
			cx: "12",
			cy: "12",
			r: "10",
			fill: typeof secondaryColor === "string" ? secondaryColor : secondaryColor?.css
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm1.44-15.94L13.06 14a1.06 1.06 0 0 1-2.12 0l-.38-6.94a1 1 0 0 1 1-1.06h.88a1 1 0 0 1 1 1.06Zm-.19 10.69a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Z",
			clipRule: "evenodd"
		}));
	}
	//#endregion
	//#region src/hooks/usePackRegistry.js
	function usePackRegistry() {
		useEmitterEffect([
			Events_default.PackLoaded,
			Events_default.PackUnloaded,
			Events_default.PackUpdated,
			Events_default.PackRegistryUpdated
		]);
		return PackRegistry_default;
	}
	//#endregion
	//#region src/settings/utils/eventModifiers.js
	function stop(callback) {
		return (event) => {
			event.stopPropagation();
			callback?.(event);
		};
	}
	function prevent(callback) {
		return (event) => {
			event.preventDefault();
			callback?.(event);
		};
	}
	//#endregion
	//#region src/components/icons/JSONIcon.jsx
	function JSONIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 512 512"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M284.096 382.755c126.41-96.067 39.609-294.896-69.513-277.86C9.315 136.94 60.658 422.223 129.047 475.258C22.042 422.39-22.426 291.217 10.82 179.74C37.161 91.427 119.287 3.962 243.708.61c196.367-17.91 254.873 364.165 40.388 382.145M219.247 130.2c-112.3 5.728-136.522 119.158-127.29 201.114c13.467 119.577 89.242 197.216 207.553 177.684c181.777-30.01 331.904-318.726 76.441-480.015c94.11 109.624 94.983 331.713-59.624 371.13c-142.981 43.102-208.076-187.725-97.08-269.913"
		}));
	}
	//#endregion
	//#region src/settings/components/Skeleton.jsx
	function Skeleton({ className, rounded = true, animated = true, width, height, style, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", {
			className: (0, clsx.default)({
				"BA__skeleton": true,
				"BA__skeleton--rounded": rounded,
				"BA__skeleton--animated": animated
			}, className),
			style: {
				width,
				height,
				...style
			},
			...props
		});
	}
	css`.BA__skeleton {
    display: inline-block;
    height: 1em;
    width: 100px;
    background-color: var(--text-default);
    opacity: .15;
}
.BA__skeleton--rounded {
    border-radius: 999px;
}
.BA__skeleton--animated {
    animation: BA__skeletonAnimation 1.5s ease infinite;
}

@keyframes BA__skeletonAnimation {
    0%, 100% { opacity: .15; }
    50% { opacity: .075; }
}``Skeleton`;
	//#endregion
	//#region src/discord/utils.js
	function isInviteInvalid(invite) {
		return [
			InviteStates.EXPIRED,
			InviteStates.BANNED,
			InviteStates.ERROR
		].includes(invite?.state);
	}
	//#endregion
	//#region src/hooks/useDismissible.js
	function isDismissed(name) {
		return data.dismissibles[name] === true;
	}
	function useDismissible(name) {
		const [dismissibles] = useData("dismissibles");
		return [dismissibles[name] === true, (0, react.useCallback)((value) => dismissibles[name] = value, [name])];
	}
	//#endregion
	//#region src/components/DismissibleModal.jsx
	function DismissibleModal({ name, ...props }) {
		const [, setIsDismissed] = useDismissible(name);
		const [shouldDismiss, setShouldDismiss] = (0, react.useState)(false);
		const onConfirm = (...args) => {
			props.onConfirm?.(...args);
			if (shouldDismiss) setIsDismissed(true);
		};
		return /* @__PURE__ */ BdApi.React.createElement(Modal$2, {
			...props,
			onConfirm,
			footerLeading: /* @__PURE__ */ BdApi.React.createElement(Checkbox, {
				value: shouldDismiss,
				onChange: (_, value) => setShouldDismiss(value)
			}, /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-sm/normal" }, "Don't show again"))
		});
	}
	//#endregion
	//#region src/components/icons/MoreIcon.jsx
	function MoreIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M4 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",
			clipRule: "evenodd"
		}));
	}
	//#endregion
	//#region src/components/VerificationIssueActions.jsx
	function useResolveMethods(pack) {
		const hasUpdate = usePackRegistry().hasUpdate(pack);
		return (0, react.useMemo)(() => {
			const additional = [verificationIssueResolveMethods[VerificationIssueResolveMethod.ALLOW_ONCE], verificationIssueResolveMethods[VerificationIssueResolveMethod.ALLOW_ALWAYS]];
			switch (pack.verificationStatus) {
				case VerificationStatus.UNKNOWN: return {
					main: [verificationIssueResolveMethods[VerificationIssueResolveMethod.ALLOW_ONCE]],
					additional: [verificationIssueResolveMethods[VerificationIssueResolveMethod.ALLOW_ALWAYS]]
				};
				case VerificationStatus.UNVERIFIED: return {
					main: [verificationIssueResolveMethods[VerificationIssueResolveMethod.DELETE]],
					additional
				};
				case VerificationStatus.FAILED: return {
					main: [hasUpdate ? verificationIssueResolveMethods[VerificationIssueResolveMethod.UPDATE] : verificationIssueResolveMethods[VerificationIssueResolveMethod.REINSTALL]],
					additional: [verificationIssueResolveMethods[VerificationIssueResolveMethod.UNINSTALL], ...additional]
				};
				default: return {
					main: [],
					additional
				};
			}
		}, [pack.verificationStatus, hasUpdate]);
	}
	function VerificationIssueActions({ pack, onSelect, size = "sm", disabled = false, ...props }) {
		const additionalButtonRef = (0, react.useRef)();
		const { main, additional } = useResolveMethods(pack);
		const selectMethod = (0, react.useCallback)((method) => {
			const dismissibleName = `verificationIssueResolveMethodConfirmation:${method.value}`;
			if (!method.confirmation || isDismissed(dismissibleName)) return onSelect(method);
			ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(DismissibleModal, {
				...props,
				name: dismissibleName,
				size: ModalSize.MEDIUM,
				title: method.label(),
				cancelText: "Cancel",
				confirmText: method.confirmation.confirmText,
				confirmButtonVariant: "critical-primary",
				onConfirm: () => onSelect(method)
			}, /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-md/normal" }, method.confirmation.text(pack))));
		}, [pack, onSelect]);
		return /* @__PURE__ */ BdApi.React.createElement(ButtonGroup$1, {
			...props,
			size
		}, main.map((method) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			variant: method.variant,
			icon: method.icon,
			text: method.label(),
			size,
			onClick: () => selectMethod(method),
			disabled
		})), /* @__PURE__ */ BdApi.React.createElement(Popout, {
			targetElementRef: additionalButtonRef,
			position: "bottom",
			align: "right",
			renderPopout: ({ closePopout, ...props }) => /* @__PURE__ */ BdApi.React.createElement(ContextMenu$1.Menu, {
				...props,
				onClose: closePopout
			}, additional.map((method) => /* @__PURE__ */ BdApi.React.createElement(ContextMenu$1.Item, {
				key: method.value,
				id: method.value,
				label: method.label(),
				icon: method.icon,
				color: method.variant === "critical-primary" ? "danger" : void 0,
				action: () => selectMethod(method)
			})))
		}, (props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			...props,
			buttonRef: additionalButtonRef,
			variant: "secondary",
			size,
			icon: MoreIcon,
			disabled
		})));
	}
	//#endregion
	//#region src/components/icons/RedoIcon.jsx
	function RedoIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("g", {
			fill: "none",
			stroke: typeof color === "string" ? color : color?.css,
			strokeLinecap: "round",
			strokeLinejoin: "round",
			strokeWidth: "2"
		}, /* @__PURE__ */ BdApi.React.createElement("path", { d: "m15 14l5-5l-5-5" }), /* @__PURE__ */ BdApi.React.createElement("path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" })));
	}
	//#endregion
	//#region src/components/VerificationIssueSelection.jsx
	function VerificationIssueSelection({ variant, icon: Icon, label, onUndo, size = "sm", disabled = false, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(ButtonGroup$1, {
			...props,
			size
		}, /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)(["BA__verificationIssueSelection", `BA__verificationIssueSelection--${variant}`]) }, Icon && /* @__PURE__ */ BdApi.React.createElement(Icon, {
			size,
			color: "currentColor"
		}), /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "text-md/semibold",
			color: "currentColor"
		}, typeof label === "function" ? label() : label)), onUndo && /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, { text: "Undo" }, (props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			...props,
			variant: "secondary",
			size,
			icon: RedoIcon,
			onClick: onUndo,
			disabled
		})));
	}
	css`.BA__verificationIssueSelection {
    display: flex;
    align-items: center;
    gap: 4px;
}
.BA__verificationIssueSelection--primary {
    color: var(--text-brand);
}
.BA__verificationIssueSelection--critical-primary {
    color: var(--text-feedback-critical);
}``VerificationIssueSelection`;
	//#endregion
	//#region src/settings/components/pack/PackVerificationBadge.jsx
	function BadgePopout({ pack, onClose }) {
		const registry = usePackRegistry();
		const { icon, label, description } = verificationStatuses[pack.verificationStatus];
		const resolveMethod = verificationIssueResolveMethods[registry.verifier.getResolveMethod(pack)];
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__badgePopout" }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__badgePopoutIcon" }, icon({
			size: "custom",
			width: 64,
			height: 64
		})), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__badgePopoutInfo" }, /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "heading-lg/semibold" }, label), description && /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__badgePopoutDescription",
			variant: "text-sm/normal"
		}, description), !registry.verifier.check(pack) ? /* @__PURE__ */ BdApi.React.createElement(VerificationIssueActions, {
			className: "BA__badgePopoutActions",
			pack,
			onSelect: (method) => {
				registry.verifier.resolveIssue({
					pack,
					method: method.value
				});
				onClose?.();
			},
			size: "sm",
			disabled: registry.hasPending
		}) : resolveMethod && /* @__PURE__ */ BdApi.React.createElement(VerificationIssueSelection, {
			...resolveMethod,
			className: "BA__badgePopoutActions",
			label: resolveMethod.label(true),
			onUndo: () => registry.verifier.removeFromWhitelist(pack)
		})));
	}
	function PackVerificationBadge({ pack, size = "sm", popoutType = "popout" }) {
		const { icon, tooltipColor, label } = verificationStatuses[pack.verificationStatus];
		const iconRef = (0, react.useRef)();
		const [shouldShow, setShouldShow] = (0, react.useState)(false);
		const showTimeout = (0, react.useMemo)(() => new Timeout(), []);
		const hideTimeout = (0, react.useMemo)(() => new Timeout(), []);
		const handleEnter = (0, react.useCallback)(() => {
			hideTimeout.stop();
			showTimeout.start(200, () => setShouldShow(true));
		}, [
			showTimeout,
			hideTimeout,
			setShouldShow
		]);
		const handleLeave = (0, react.useCallback)(() => {
			showTimeout.stop();
			hideTimeout.start(200, () => setShouldShow(false));
		}, [
			showTimeout,
			hideTimeout,
			setShouldShow
		]);
		if (popoutType === "tooltip") return /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, {
			text: label,
			color: tooltipColor
		}, (props) => icon({
			...props,
			size
		}));
		return /* @__PURE__ */ BdApi.React.createElement(Popout, {
			targetElementRef: iconRef,
			shouldShow,
			onRequestClose: () => setShouldShow(false),
			position: "right",
			align: "center",
			spacing: 0,
			renderPopout: () => /* @__PURE__ */ BdApi.React.createElement("div", {
				className: "BA__badgePopoutContainer",
				onMouseEnter: () => hideTimeout.stop(),
				onMouseLeave: handleLeave,
				onClick: stop()
			}, /* @__PURE__ */ BdApi.React.createElement(BadgePopout, {
				pack,
				onClose: () => setShouldShow(false)
			}))
		}, () => icon({
			ref: iconRef,
			onMouseEnter: handleEnter,
			onMouseLeave: handleLeave,
			size
		}));
	}
	css`.BA__badgePopoutContainer {
    padding: 8px;
}
.BA__badgePopout {
    box-shadow: var(--shadow-high);
    background-color: var(--background-surface-high);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    max-width: 400px;
    padding: 16px;
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.BA__badgePopoutIcon {
    width: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
}
.BA__badgePopoutInfo {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.BA__badgePopoutDescription {
    margin-top: 2px;
}
.BA__badgePopoutActions {
    margin-top: 8px;
}``PackVerificationBadge`;
	//#endregion
	//#region src/settings/components/pack/PackHeader.jsx
	function PackHeader({ pack, icon, popoutType, size = "sm" }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packHeader" }, icon ?? /* @__PURE__ */ BdApi.React.createElement(PackVerificationBadge, {
			pack,
			popoutType,
			size
		}), /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			tag: "h2",
			variant: size === "md" ? "heading-lg/bold" : "heading-md/bold",
			color: "text-strong",
			lineClamp: 2
		}, pack.name));
	}
	css`.BA__packHeader {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}
.BA__packHeader svg {
    flex-shrink: 0;
}
.BA__packHeader h2 {
    word-break: break-word;
}``PackHeader`;
	//#endregion
	//#region src/assets/placeholders/thumbnail.png
	var thumbnail_default = "data:image/png;base64,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";
	//#endregion
	//#region src/settings/components/pack/PackSplash.jsx
	function PackSplash({ pack, showAuthor = false, className }) {
		const registry = usePackRegistry();
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("BA__packSplash", className) }, /* @__PURE__ */ BdApi.React.createElement("img", {
			className: "BA__packSplashImage",
			src: registry.getThumbnailSrc(pack) ?? "data:image/png;base64,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",
			onError: (event) => event.currentTarget.src = thumbnail_default,
			alt: pack.name,
			loading: "lazy",
			draggable: "false"
		}), showAuthor && /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, { text: pack.author }, (props) => /* @__PURE__ */ BdApi.React.createElement("div", {
			...props,
			className: "BA__packSplashAuthor"
		}, /* @__PURE__ */ BdApi.React.createElement("img", {
			className: "BA__packAuthorAvatar",
			src: registry.getAuthorAvatarSrc(pack),
			alt: pack.author,
			draggable: "false"
		}))));
	}
	css`.BA__packSplash {
    background: linear-gradient(180deg, rgba(68, 70, 73, 0), rgba(68, 70, 73, .4));
    aspect-ratio: 16 / 9;
    position: relative;
}
.BA__packSplashImage {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.BA__packSplashAuthor {
    position: absolute;
    right: 20px;
    bottom: -16px;
    z-index: 2;
    border-radius: 50%;
    box-shadow: 0 0 0 5px currentColor;
}``PackSplash`;
	//#endregion
	//#region src/settings/components/pack/PackContent.jsx
	var PackContentLocation = {
		CATALOG: 0,
		LIBRARY: 1
	};
	function PackVersion({ version, from }) {
		return /* @__PURE__ */ BdApi.React.createElement("span", { className: "BA__packVersion" }, from && /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("span", null, from), /* @__PURE__ */ BdApi.React.createElement(ArrowSmallRightIcon, {
			size: "xs",
			color: "currentColor"
		})), /* @__PURE__ */ BdApi.React.createElement("span", null, version));
	}
	function PackField({ icon, title, titleColor, subtitle, children }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packField" }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packFieldInfo" }, icon, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packFieldInfoContent" }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__packFieldTitle",
			variant: "text-md/semibold",
			lineClamp: 1,
			color: titleColor
		}, title), subtitle && /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__packFieldSubtitle",
			variant: "text-sm/normal",
			color: "text-muted"
		}, subtitle))), children && /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packFieldActions" }, children));
	}
	function PackAction({ pack, size, location }) {
		const registry = usePackRegistry();
		const isInstalled = !!pack.installed;
		const hasUpdate = isInstalled && registry.hasUpdate(pack.installed);
		const pending = registry.isPending(pack.filename);
		const props = {
			size,
			fullWidth: size === "md",
			loading: pending,
			disabled: pending
		};
		if (hasUpdate) return /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			...props,
			icon: DownloadIcon,
			text: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("span", null, "Update"), size === "md" && /* @__PURE__ */ BdApi.React.createElement(PackVersion, {
				from: pack.installed.version,
				version: registry.getPack(pack.filename).version
			})),
			onClick: stop(() => registry.update(pack.filename))
		});
		if (isInstalled) {
			if (location === PackContentLocation.LIBRARY && size === "sm") return null;
			return /* @__PURE__ */ BdApi.React.createElement(Button$1, {
				...props,
				icon: CheckIcon,
				variant: "active",
				disabled: true,
				text: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("span", null, location === PackContentLocation.LIBRARY && registry.hasPack(pack.filename) ? "Up to date" : "Installed"), size === "md" && /* @__PURE__ */ BdApi.React.createElement(PackVersion, { version: pack.version }))
			});
		}
		return /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			...props,
			icon: DownloadIcon,
			text: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("span", null, "Install"), size === "md" && /* @__PURE__ */ BdApi.React.createElement(PackVersion, { version: pack.version })),
			onClick: stop(() => registry.install(pack.filename))
		});
	}
	function PackInvite({ code }) {
		const invite = useStateFromStores([InviteStore], () => InviteStore.getInvite(code));
		const guild = useStateFromStores([GuildStore], () => GuildStore.getGuild(invite?.guild?.id), [invite]);
		(0, react.useEffect)(() => {
			if (!invite) InviteActions.resolveInvite(code);
		}, [code, invite]);
		const pending = !invite || invite.state === InviteStates.RESOLVING;
		const invalid = isInviteInvalid(invite);
		const join = (0, react.useCallback)(() => {
			if (guild) {
				ModalActions.closeAllModals();
				LayerActions.popAllLayers();
			}
			UI.showInviteModal(code);
		}, [code, guild]);
		return /* @__PURE__ */ BdApi.React.createElement(PackField, {
			icon: /* @__PURE__ */ BdApi.React.createElement(SquircleMask, { size: 48 }, pending || invalid || !invite?.guild ? /* @__PURE__ */ BdApi.React.createElement(Skeleton, {
				width: 48,
				height: 48,
				rounded: false,
				animated: pending
			}) : /* @__PURE__ */ BdApi.React.createElement(GuildIcon, {
				className: "BA__packServerIcon",
				guild: invite.guild,
				active: true
			})),
			title: pending ? /* @__PURE__ */ BdApi.React.createElement(Skeleton, { width: 130 }) : invalid ? "Invalid Invite" : invite?.guild?.name,
			titleColor: invalid ? "text-danger" : void 0,
			subtitle: "Support Server"
		}, /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			variant: "secondary",
			size: "sm",
			text: guild ? "Open" : "Join",
			loading: pending,
			disabled: pending || invalid,
			onClick: join
		}));
	}
	function PackBadge({ pack, location }) {
		const registry = usePackRegistry();
		const isUnknown = (0, react.useMemo)(() => registry.isUnknown(pack), []);
		if (pack.installed && registry.hasUpdate(pack.installed)) return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packBadge" }, /* @__PURE__ */ BdApi.React.createElement(Badge, { type: { text: "Update available" } }));
		if (location === PackContentLocation.CATALOG && isUnknown) return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packBadge" }, /* @__PURE__ */ BdApi.React.createElement(Badge, { type: "new" }));
		return null;
	}
	function PackMeta$1({ pack, onShowSource = () => PackManager_default.showInFolder(pack.filename) }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packMeta" }, /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "Source",
			onClick: stop(onShowSource)
		}, /* @__PURE__ */ BdApi.React.createElement(JSONIcon, {
			size: "sm",
			color: "currentColor"
		})), pack.invite && /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "Support Server",
			onClick: stop(() => UI.showInviteModal(pack.invite))
		}, /* @__PURE__ */ BdApi.React.createElement(CircleQuestionIcon, {
			size: "sm",
			color: "currentColor"
		})));
	}
	function PackContent({ pack, className, size = "sm", location = PackContentLocation.CATALOG }) {
		const registry = usePackRegistry();
		const isPublished = registry.hasPack(pack.filename);
		const authorAvatarSrc = registry.getAuthorAvatarSrc(pack);
		const showSource = (0, react.useCallback)(() => {
			if (location === PackContentLocation.CATALOG) handleClick({ href: registry.getSourceURL(pack.filename) });
			else PackManager_default.showInFolder(pack.filename);
		}, [pack, location]);
		const uninstall = (0, react.useCallback)(() => {
			if (!pack.installed) return;
			const affectedModules = Core_default.getModulesUsingPack(pack);
			ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(Modal$2, {
				...props,
				title: "Uninstall Pack",
				confirmText: isPublished ? "Uninstall" : "Delete permanently",
				confirmButtonVariant: "critical-primary",
				cancelText: "Cancel",
				onConfirm: () => registry.delete(pack.filename)
			}, /* @__PURE__ */ BdApi.React.createElement(Stack$1, { gap: 8 }, /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-md/normal" }, "Are you sure you want to delete pack ", /* @__PURE__ */ BdApi.React.createElement("b", null, pack.name), "?", isPublished ? " It can always be reinstalled from the Catalog." : " It is not published in the Catalog, so it cannot be reinstalled."), affectedModules.length > 0 && /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-md/normal" }, "Animations of this pack are currently applied for: ", affectedModules.map((module, i, { length }) => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("b", null, module.name), i < length - 1 ? ", " : ".")), " They will be automatically deselected."))));
		}, [pack]);
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("BA__packContent", `BA__packContent--${size}`, className) }, /* @__PURE__ */ BdApi.React.createElement(PackBadge, {
			pack,
			location
		}), /* @__PURE__ */ BdApi.React.createElement(PackSplash, {
			pack,
			showAuthor: size === "sm"
		}), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packContentContainer" }, /* @__PURE__ */ BdApi.React.createElement(PackHeader, {
			pack,
			size
		}), pack.description && /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: (0, clsx.default)("BA__packDescription", DiscordClasses.Scroller.thin),
			variant: "text-sm/medium",
			color: "text-muted",
			lineClamp: size === "sm" && 2
		}, pack.description), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packContentSpacer" }), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packFooter" }, size === "md" ? /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("div", null, /* @__PURE__ */ BdApi.React.createElement(PackField, {
			icon: /* @__PURE__ */ BdApi.React.createElement("img", {
				className: "BA__packAuthorAvatar",
				src: authorAvatarSrc,
				alt: pack.author
			}),
			title: pack.author,
			subtitle: "Author"
		}, pack.authorLink && /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, { text: "Author's Page" }, (props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			...props,
			variant: "secondary",
			size: "sm",
			icon: LinkIcon,
			onClick: () => handleClick({ href: pack.authorLink })
		})), pack.donate && /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, { text: "Donate" }, (props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			...props,
			variant: "active",
			size: "sm",
			icon: CircleDollarSignIcon,
			onClick: () => handleClick({ href: pack.donate })
		}))), pack.invite && /* @__PURE__ */ BdApi.React.createElement(PackInvite, { code: pack.invite })), /* @__PURE__ */ BdApi.React.createElement(Divider$2, null), /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			variant: "icon-only",
			icon: JSONIcon,
			text: pack.filename,
			fullWidth: true,
			onClick: showSource
		})) : /* @__PURE__ */ BdApi.React.createElement(PackMeta$1, {
			pack,
			onShowSource: showSource
		}), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packActions" }, pack.partial && /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "An error occurred",
			onClick: stop(() => manager_default.showModal([pack.error]))
		}, /* @__PURE__ */ BdApi.React.createElement(CircleWarningIcon, {
			size: "md",
			color: colors.STATUS_DANGER,
			secondaryColor: "#FFFFFF"
		})), /* @__PURE__ */ BdApi.React.createElement(PackAction, {
			pack,
			size,
			location
		}), pack.installed && /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, { text: "Uninstall" }, (props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			...props,
			variant: "critical-primary",
			size,
			icon: TrashIcon,
			disabled: registry.isPending(pack.filename),
			onClick: stop(uninstall)
		}))))));
	}
	PackContent.Location = PackContentLocation;
	css`.BA__packContent {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.BA__packBadge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}
.BA__packContentContainer {
    display: flex;
    flex-direction: column;
    padding: 16px;
    flex: 1;
    min-height: 0;
}
.BA__packContent .BA__packHeader {
    margin-bottom: 6px;
}
.BA__packDescription {
    word-break: break-word;
}
.BA__packContentSpacer {
    flex: 1;
}
.BA__packFooter {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.BA__packMeta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.BA__packActions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.BA__packField {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}
.BA__packFieldInfo {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.BA__packFieldInfo > * {
    flex-shrink: 0;
}
.BA__packFieldInfoContent {
    min-width: 0;
    flex: 1;
}
.BA__packFieldActions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.BA__packAuthorAvatar,
.BA__packServerIcon {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    background-color: var(--background-base-low);
    border-radius: 0;
}
.BA__packAuthorAvatar {
    border-radius: 50%;
}
.BA__packVersion {
    opacity: .8;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-weight: 400;
}

.BA__packContent--sm .BA__packHeader {
    padding-right: 56px;
}
.BA__packContent--md .BA__packFooter {
    flex-direction: column;
    align-items: stretch;
}
.BA__packContent--md .BA__packDescription {
    overflow: hidden auto;
}``PackContent`;
	//#endregion
	//#region src/settings/context/ModuleContext.js
	var ModuleContext = (0, react.createContext)();
	//#endregion
	//#region shared/preview/components/Block.jsx
	function Block({ className, children, relative, absolute, x, y, w, h, p, px, py, pt, pr, pb, pl, m, mx, my, mt, mr, mb, ml, bg, radius, style, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", {
			className,
			style: {
				position: relative ? "relative" : absolute ? "absolute" : void 0,
				top: y,
				left: x,
				width: w,
				height: h,
				paddingTop: pt ?? py ?? p,
				paddingRight: pr ?? px ?? p,
				paddingBottom: pb ?? py ?? p,
				paddingLeft: pl ?? px ?? p,
				marginTop: mt ?? my ?? m,
				marginRight: mr ?? mx ?? m,
				marginBottom: mb ?? my ?? m,
				marginLeft: ml ?? mx ?? m,
				background: bg && `var(--bap-${bg})`,
				borderRadius: radius,
				...props,
				...style
			}
		}, children);
	}
	//#endregion
	//#region shared/preview/components/Rect.jsx
	function Rect({ className, width, height, radius, color, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(Block, {
			...props,
			className: (0, clsx.default)("BAP__rect", className),
			style: {
				width,
				height,
				borderRadius: radius,
				background: color && `var(--bap-${color})`
			}
		});
	}
	function Text({ length, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(Rect, {
			...props,
			className: "BAP__text",
			width: length
		});
	}
	function Icon({ size, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(Rect, {
			...props,
			className: "BAP__icon",
			width: size,
			height: size
		});
	}
	function Divider$1({ vertical = false, length, ...props }) {
		const params = vertical ? { height: length } : { width: length };
		return /* @__PURE__ */ BdApi.React.createElement(Rect, {
			...props,
			className: "BAP__divider",
			...params
		});
	}
	function Button({ color = "brand-primary", ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(Rect, {
			...props,
			className: "BAP__button",
			color
		});
	}
	css`.BAP__rect {
    background: var(--bap-text-primary);
    width: 20px;
    height: 20px;
    border-radius: 8px;
    flex-shrink: 0;
}
.BAP__text {
    width: 40px;
    height: 16px;
    border-radius: 999px;
}
.BAP__icon {
    width: 22px;
    height: 22px;
}
.BAP__divider {
    width: 1px;
    height: 1px;
    background: var(--bap-border-subtle);
}
.BAP__button {
    width: 80px;
    height: 30px;
    border-width: 1px !important;
    border-radius: 8px;
}``Preview: Rect`;
	//#endregion
	//#region shared/preview/components/Flex.jsx
	function Flex({ className, children, column, justify, align, wrap, center, gap, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(Block, {
			...props,
			className: (0, clsx.default)("BAP__flex", className),
			style: {
				flexDirection: column && "column",
				justifyContent: justify ?? (center && "center"),
				alignItems: align ?? (center && "center"),
				flexWrap: wrap && "wrap",
				gap
			}
		}, children);
	}
	css`.BAP__flex {
    display: flex;
    flex-shrink: 0;
    min-height: 0;
    min-width: 0;
}``Preview: Flex`;
	//#endregion
	//#region shared/preview/components/main/SystemBar.jsx
	function SystemBar() {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			relative: true,
			h: 32,
			justify: "flex-end"
		}, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			absolute: true,
			inset: 0,
			center: true,
			gap: 8
		}, /* @__PURE__ */ BdApi.React.createElement(Icon, {
			size: 20,
			radius: 4,
			color: "text-heading"
		}), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 140,
			color: "text-heading"
		})), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			align: "center",
			gap: 18,
			pr: 12
		}, /* @__PURE__ */ BdApi.React.createElement(Icon, null), /* @__PURE__ */ BdApi.React.createElement(Icon, null)));
	}
	//#endregion
	//#region shared/preview/context/PreviewContext.js
	var PreviewContext = (0, react.createContext)({
		store: null,
		id: null,
		modules: [],
		active: true,
		pack: null,
		animation: null,
		data: null,
		viewportRef: { current: null },
		serverListIconRefs: { current: [] },
		userPanelActionRefs: { current: [] },
		channelHeaderItemRefs: { current: [] },
		memberListItemRefs: { current: [] },
		serverList: {},
		setServerList: () => {},
		userPanel: {},
		setUserPanel: () => {},
		memberListShown: true,
		setMemberListShown: () => {},
		memberList: {},
		setMemberList: () => {},
		threadPopoutShown: false,
		setThreadPopoutShown: () => {}
	});
	//#endregion
	//#region shared/preview/hooks/useModule.js
	function useModule$1(id) {
		const { id: activeId, modules, active } = (0, react.use)(PreviewContext);
		return [modules.find((m) => m.id === id), active && id === activeId];
	}
	//#endregion
	//#region shared/utils/prng.js
	function sfc32(a, b, c, d) {
		return () => {
			a |= 0;
			b |= 0;
			c |= 0;
			d |= 0;
			let t = (a + b | 0) + d | 0;
			d = d + 1 | 0;
			a = b ^ b >>> 9;
			b = c + (c << 3) | 0;
			c = c << 21 | c >>> 11;
			c = c + t | 0;
			return (t >>> 0) / 4294967296;
		};
	}
	function int(rng, min, max) {
		return min + Math.floor(rng() * (max - min));
	}
	function stream(rng, count, fnOrMin, max = -1) {
		return Array(count).fill(null).map(typeof fnOrMin === "function" ? (_, i) => fnOrMin(rng, i) : () => int(rng, fnOrMin, max));
	}
	//#endregion
	//#region shared/preview/hooks/useStages.js
	var STAGE_DEFAULT_DURATION = 500;
	function useStages(stages, isActive = true) {
		if (typeof stages === "number") stages = stages === Infinity ? new Proxy({ length: Infinity }, { get: (target, key) => target[key] ?? STAGE_DEFAULT_DURATION }) : Array(stages).fill(STAGE_DEFAULT_DURATION);
		const { store } = (0, react.use)(PreviewContext);
		const [stage, setStage] = (0, react.useState)(0);
		const timeoutId = (0, react.useRef)();
		const callback = (0, react.useCallback)(() => {
			clearTimeout(timeoutId.current);
			if (!isActive) return;
			timeoutId.current = setTimeout(() => setStage((stage) => (stage + 1) % stages.length), stages[stage]);
		}, [stage, isActive]);
		(0, react.useEffect)(() => store.watch((animations) => {
			if (!animations.length) callback();
		}), []);
		(0, react.useEffect)(() => {
			const tid = setTimeout(() => {
				if (!store.animations.length) callback();
			}, 100);
			return () => clearTimeout(tid);
		}, [stage]);
		(0, react.useEffect)(() => () => clearTimeout(timeoutId.current), []);
		return stage;
	}
	//#endregion
	//#region shared/components/Freeze.jsx
	var infiniteThenable = { then() {} };
	function Suspender({ freeze, children }) {
		if (freeze) throw infiniteThenable;
		return /* @__PURE__ */ BdApi.React.createElement(react.Fragment, null, children);
	}
	function Freeze({ freeze, children, placeholder = null, nodeRef }) {
		(0, react.useEffect)(() => {
			if (freeze && nodeRef?.current) {
				nodeRef.current.style.display = "";
				[].forEach.call(nodeRef.current.children, (n) => n.style.display = "");
			}
		}, [freeze]);
		return /* @__PURE__ */ BdApi.React.createElement(react.Suspense, { fallback: placeholder }, /* @__PURE__ */ BdApi.React.createElement(Suspender, { freeze }, children));
	}
	//#endregion
	//#region shared/utils/react.js
	function createAwaitableRef() {
		return new class {
			constructor() {
				this._current = null;
				this._callbacks = [];
			}
			get current() {
				return this._current;
			}
			set current(value) {
				this._current = value;
				this._callbacks.forEach((callback) => callback(value));
				this._callbacks = [];
			}
			await(callback) {
				this._callbacks.push(callback);
			}
		}();
	}
	function getRef$1(refLike) {
		return typeof refLike === "function" ? refLike() : "current" in (refLike ?? {}) ? refLike.current : refLike;
	}
	function isLazyLoaded(component) {
		return component._payload._status !== -1;
	}
	function loadLazy(component) {
		try {
			return Promise.resolve(component._init(component._payload));
		} catch (promise) {
			return promise;
		}
	}
	//#endregion
	//#region shared/animation/index.js
	var Animation = class {
		constructor(store, { module, data, type, container, element, viewport, window, mouse, anchor, auto, doneCallbackRef, onError }) {
			this.store = store;
			this.module = module;
			this.data = data ?? module.animations[type];
			this.type = type;
			this.container = container;
			this.element = element;
			this.viewport = viewport;
			this.window = window;
			this.mouse = mouse;
			this.anchor = anchor;
			this.auto = auto;
			this.doneCallbackRef = doneCallbackRef;
			this.onError = onError ?? manager_default.registerAnimationError;
			this.context = null;
			this.timeout = null;
			this.cancelled = false;
			this.cleared = false;
		}
		applyAttributes() {
			this.container.setAttribute("data-baa-type", this.type);
			if ("overflow" in (this.context ?? {})) this.container.setAttribute("data-baa-overflow", this.context.overflow);
			if (this.module.type) this.container.setAttribute(`data-baa-${this.module.type}`, "");
		}
		initialize(callback, allowed, intersectWith = null) {
			if (!allowed || !this.element || intersectWith && !intersectWith.instances || this.window.document.hidden) {
				this.doneCallbackRef.await((done) => {
					done?.();
					callback?.();
				});
				return false;
			}
			if (!intersectWith) {
				callback?.();
				if (this.cancelled) return false;
			}
			this.applyAttributes();
			const mouseAnchor = this.mouse.getAnchor();
			this.window.requestAnimationFrame(() => {
				if (this.cancelled) {
					if (intersectWith) callback?.();
					return;
				}
				const anchor = getRef$1(this.anchor);
				const { animate, context } = this.module.getAnimation(this.data, this.type, { auto: Object.assign({ mouse: mouseAnchor }, this.auto?.current) }, {
					instance: this,
					container: this.container,
					containerRect: getRect(this.container, this.viewport),
					element: this.element,
					viewport: this.viewport,
					window: this.window,
					document: this.window.document,
					mouse: this.mouse,
					anchor,
					anchorRect: isElement(anchor) ? getRect(anchor, this.viewport) : anchor,
					intersectWith,
					isIntersected: !!intersectWith,
					onError: this.onError
				});
				this.context = context;
				const { wrapper, onBeforeBegin, accordion, instances, finished } = parse$1(animate, context, this.module.buildOptions(this.data, this.type));
				this.wrapper = wrapper;
				this.accordion = accordion;
				this.instances = instances;
				if (intersectWith && callback) {
					callback(false);
					if (this.cancelled) return;
				}
				this.applyAttributes();
				onBeforeBegin?.();
				if (this.cancelled) return;
				if (wrapper) this.element.before(wrapper);
				this.ensureTimeLimit();
				finished.then(() => this.module.meta.waitUntilSafe ? this.store.untilSafe() : null).then(() => this.cancel());
			});
			return true;
		}
		cancel(dueToError = false, provideCallback = false) {
			if (this.cancelled) {
				if (dueToError) return this.callback?.();
				if (provideCallback) {
					this.destroy(dueToError);
					return this.callback;
				}
				return;
			}
			this.cancelled = true;
			this.onBeforeDestroy?.();
			this.instances?.pause();
			this.doneCallbackRef.current?.();
			const callback = (revert = true) => {
				if (this.cleared) return;
				this.cleared = true;
				this.wrapper?.remove();
				[].filter.call(this.container.attributes, (a) => a.name?.startsWith("data-baa")).forEach((a) => this.container.removeAttribute(a.name));
				if (revert && ((this.context?.module.meta.revert ?? true) || this.context?.meta.revert)) this.instances?.revert();
				else this.instances?.cancel();
				this.destroy(dueToError);
				this.onDestroyed?.();
			};
			if (dueToError) return callback();
			if (provideCallback) {
				this.destroy(dueToError);
				return callback;
			}
			this.callback = callback;
		}
		computeTimeLimit() {
			return 5e3 + (this.context.duration ?? 0);
		}
		ensureTimeLimit(limit = this.computeTimeLimit()) {
			this.timeout = this.window.setTimeout(() => {
				const { animation, module, pack, type, onError } = this.context;
				onError(new AnimationError(animation, `Animation exceeded the execution time limit (${(limit / 1e3).toFixed(1)}s)`, {
					module,
					pack,
					type,
					context: this.context
				}));
				this.cancel(true);
			}, limit);
		}
		destroy(dueToError = false) {
			this.window.clearTimeout(this.timeout);
			this.store.destroyAnimation(this, dueToError);
		}
	};
	//#endregion
	//#region shared/animation/store.js
	var AnimationStore$1 = class {
		get name() {
			return "AnimationStore";
		}
		get switchCooldownDuration() {
			return 1e3;
		}
		constructor() {
			this.animations = [];
			this.switchCooldownUntil = 0;
			this.shouldPauseEmitter = false;
			this.shouldInterceptEvents = false;
			this.isSafe = true;
			this._watchers = [];
			this.onDocumentVisibilityChange = () => {
				if (document.hidden) {
					engine.pause();
					this.cancelAllAnimations();
				} else {
					engine.resume();
					this.trigger();
				}
			};
		}
		initialize() {
			document.addEventListener("visibilitychange", this.onDocumentVisibilityChange);
		}
		shutdown() {
			document.removeEventListener("visibilitychange", this.onDocumentVisibilityChange);
			this.cancelAllAnimations();
		}
		cooldown() {
			this.switchCooldownUntil = Date.now() + this.switchCooldownDuration;
		}
		isCooldown() {
			return this.switchCooldownUntil > Date.now();
		}
		cancelAnimations(animations, provideCallback = true) {
			const callbacks = (typeof animations === "function" ? this.animations.filter(animations) : [].concat(animations)).map((animation) => animation.cancel(false, provideCallback)).filter((c) => typeof c === "function");
			const callback = (...args) => callbacks.forEach((c) => c(...args));
			if (provideCallback) return callback;
			else callback();
		}
		cancelAllAnimations() {
			return this.cancelAnimations(this.animations, false);
		}
		processAnimation(animation) {
			switch (animation.module.type) {
				case ModuleType_default.Reveal:
					const [conflict] = this.animations.filter((a) => a.module.id === animation.module.id && a.element === animation.element);
					const intersect = (animation.data?.id ?? null) === (conflict?.data?.id ?? null) && (!animation.data?.id || animation.data.meta?.intersect);
					return [
						this.cancelAnimations(conflict ?? []),
						true,
						intersect ? conflict : null
					];
				case ModuleType_default.Switch: {
					if (this.isCooldown()) {
						this.cooldown();
						return [() => {}, false];
					}
					const conflicts = this.animations.filter((a) => a.module.type === ModuleType_default.Switch);
					if (!conflicts.some((a) => a.type === animation.type)) return [() => {}, true];
					this.cooldown();
					return [this.cancelAnimations(conflicts), false];
				}
			}
		}
		requestAnimation(payload) {
			const animation = new Animation(this, payload);
			const [callback, allowed, intersectWith = null] = this.processAnimation(animation);
			if (!animation.initialize(callback, allowed, intersectWith)) return null;
			this.animations.push(animation);
			this.trigger();
			return animation;
		}
		destroyAnimation(animation, dueToError = false) {
			if (dueToError && animation.module.type === ModuleType_default.Switch) {
				this.cooldown();
				this.cancelAnimations(this.animations.filter((a) => a.module.type === ModuleType_default.Switch), false);
			}
			this.removeAnimation(animation);
		}
		removeAnimation(animation) {
			const index = this.animations.indexOf(animation);
			if (index === -1) return;
			this.animations.splice(index, 1);
			this.trigger();
		}
		watch(callback) {
			this._watchers.push(callback);
			return () => this._watchers = this._watchers.filter((c) => c !== callback);
		}
		onceSafe(callback) {
			const unwatch = this.watch((animations, isSafe) => {
				if (!isSafe) return;
				unwatch();
				callback();
			});
			return unwatch;
		}
		untilSafe() {
			return new Promise((resolve) => {
				if (this.isSafe) return resolve();
				this.onceSafe(resolve);
			});
		}
		trigger() {
			this.shouldPauseEmitter = this.animations.some((a) => a.module.type === ModuleType_default.Switch);
			this.shouldInterceptEvents = this.animations.some((a) => a.module.interceptEvents);
			this.isSafe = !this.animations.some((a) => a.module.type === ModuleType_default.Switch);
			this._watchers.forEach((callback) => {
				try {
					callback([...this.animations], this.isSafe);
				} catch (error) {
					Logger.warn(this.name, `Watcher threw an error:`, error);
				}
			});
		}
	};
	new AnimationStore$1();
	//#endregion
	//#region src/modules/AnimationStore.js
	var AnimationStore = class extends AnimationStore$1 {
		get switchCooldownDuration() {
			return Config_default.current.general.switchCooldownDuration;
		}
	};
	var AnimationStore_default = new AnimationStore();
	//#endregion
	//#region shared/components/AnimeContainer.jsx
	function AnimeContainer({ ref, id = "", container, children }) {
		if (!container) return children;
		return /* @__PURE__ */ BdApi.React.createElement("div", {
			ref,
			"data-ba-container": id,
			...container
		}, children);
	}
	//#endregion
	//#region shared/utils/transition.js
	function directChild(node, last = false) {
		return node && [][last ? "findLast" : "find"].call(node.children, (e) => !e.getAttribute("data-baa"));
	}
	function pass(props = null) {
		return (e) => (0, react.cloneElement)(e, props);
	}
	function passAuto(auto) {
		return pass({ auto });
	}
	//#endregion
	//#region shared/mouse.js
	var Mouse = class {
		get name() {
			return "Mouse";
		}
		constructor({ x, y } = {
			x: -1,
			y: -1
		}) {
			this.x = x;
			this.y = y;
			this.onMouseMove = (e) => {
				this.x = e.clientX;
				this.y = e.clientY;
			};
		}
		getAnchor() {
			return {
				x: this.x,
				y: this.y,
				width: 0,
				height: 0
			};
		}
		initialize() {
			if (this.x === -1 && this.y === -1) {
				this.x = window.innerWidth / 2;
				this.y = window.innerHeight / 2;
			}
			document.addEventListener("mousemove", this.onMouseMove);
			Logger.info(this.name, "Initialized.");
			return this;
		}
		shutdown() {
			document.removeEventListener("mousemove", this.onMouseMove);
			Logger.info(this.name, "Shutdown.");
			return this;
		}
	};
	var mouse_default = new Mouse();
	//#endregion
	//#region shared/components/AnimeTransition.jsx
	var getRef = (ref) => typeof ref === "function" ? ref() : ref.current;
	var injectContainerRefFn = (children, ref) => {
		if (children?.props) children.props.ref = ref;
	};
	var AnimeTransitionContext = (0, react.createContext)({
		isEnterActive: false,
		isExitActive: false,
		isActive: false,
		state: null,
		module: null,
		instance: (0, react.createRef)(),
		nodeRef: (0, react.createRef)(),
		props: null,
		data: {},
		tree: []
	});
	var AnimeTransition = class extends react.Component {
		static contextType = AnimeTransitionContext;
		static defaultProps = {
			container: false,
			freeze: false,
			mountOnEnter: true,
			unmountOnExit: true,
			enter: true,
			exit: true,
			injectContainerRef: false
		};
		constructor(props) {
			super(props);
			this.doneCallback = createAwaitableRef();
			this.containerRef = (0, react.createRef)();
			this.instance = (0, react.createRef)();
			this.data = { emoji: {
				1: 0,
				2: 0
			} };
			const self = this;
			this.nodeRef = { get current() {
				if (self.props.containerRef) return getRef(self.props.containerRef);
				if (self.props.layerRef) return getRef(self.props.layerRef)?.elementRef.current;
				return self.containerRef.current;
			} };
		}
		get mouse() {
			return this.props.mouse ?? mouse_default;
		}
		get store() {
			return this.props.store ?? AnimationStore_default;
		}
		clearCurrentInstance() {
			this.instance.current?.cancel(false, true)?.();
		}
		componentWillUnmount() {
			this.clearCurrentInstance();
		}
		onAnimate(type, fn) {
			return () => {
				const container = this.nodeRef.current;
				container?.setAttribute("data-ba-container", this.props.module.id);
				if (this.props.defaultLayoutStyles === false) container?.setAttribute("data-ba-default-layout-styles", "false");
				this.instance.current = this.store.requestAnimation({
					module: this.props.module,
					data: this.props.data?.[type],
					type,
					container,
					element: this.props.element?.(container) ?? directChild(container),
					viewport: this.props.viewportRef?.current,
					window,
					mouse: this.mouse,
					anchor: this.props.anchor,
					auto: this.props.autoRef ?? { current: this.props.auto },
					doneCallbackRef: this.doneCallback,
					onError: this.props.onError ?? manager_default.registerAnimationError
				});
				fn?.();
			};
		}
		onCallback(fn) {
			return () => {
				this.clearCurrentInstance();
				fn?.();
			};
		}
		provideContext(state, children) {
			const isEnterActive = state === Transition.EXITED && this.props.in || state === Transition.ENTERING;
			const isExitActive = state === Transition.ENTERED && !this.props.in || state === Transition.EXITING;
			const isActive = isEnterActive || isExitActive;
			const current = {
				isEnterActive,
				isExitActive,
				isActive,
				state,
				module: this.props.module,
				instance: this.instance,
				nodeRef: this.nodeRef,
				props: this.props,
				data: this.data
			};
			const value = {
				...isActive ? current : this.context,
				tree: [current, ...this.context.tree]
			};
			return /* @__PURE__ */ BdApi.React.createElement(AnimeTransitionContext, { value }, children);
		}
		render() {
			const { module, data, children, container, freeze, mountOnEnter, unmountOnExit, enter, exit, injectContainerRef, onEntering, onExiting, onEntered, onExited, ...props } = this.props;
			const contents = (state = null) => {
				const _children = typeof children === "function" ? children(state) : children;
				if (injectContainerRef) (typeof injectContainerRef === "function" ? injectContainerRef : injectContainerRefFn)(_children, this.containerRef);
				return this.provideContext(state, /* @__PURE__ */ BdApi.React.createElement(AnimeContainer, {
					ref: this.containerRef,
					id: module.id,
					container: children && container
				}, /* @__PURE__ */ BdApi.React.createElement(Freeze, {
					freeze: freeze && props.in === false,
					nodeRef: this.nodeRef
				}, _children)));
			};
			return /* @__PURE__ */ BdApi.React.createElement(Transition, {
				...props,
				nodeRef: this.nodeRef,
				enter: (data != null || module.isEnabled(AnimationType_default.Enter)) && enter,
				exit: (data != null || module.isEnabled(AnimationType_default.Exit)) && exit,
				mountOnEnter,
				unmountOnExit,
				onEntering: this.onAnimate(AnimationType_default.Enter, onEntering),
				onExiting: this.onAnimate(AnimationType_default.Exit, onExiting),
				onEntered: this.onCallback(onEntered),
				onExited: this.onCallback(onExited),
				addEndListener: (done) => this.doneCallback.current = done
			}, contents);
		}
	};
	css`[data-ba-container][data-baa-type], /* Animating Container */
[data-ba-container][data-baa-type] > :not([data-baa]) { /* Animating Element */
    isolation: isolate;
}
[data-ba-container][data-baa-type]:not([data-ba-default-layout-styles="false"]) {
    position: relative;
}

[data-baa] {
    display: contents;
}
[data-baa] > * {
    position: absolute;
}

[data-ba-container][data-baa-overflow="false"] {
    overflow: clip;
}
[data-baa-type="exit"] {
    pointer-events: none;
}

[data-ba-container][data-baa-switch][data-baa-type="exit"] {
    z-index: 1;
}
[data-ba-container][data-baa-switch][data-baa-type="exit"]:not([data-ba-default-layout-styles="false"]) { /* Exiting switch container */
    position: absolute !important;
    inset: 0;
}``AnimeTransition`;
	//#endregion
	//#region shared/preview/hooks/useMouse.js
	function useMouse({ x, y } = {}) {
		const { viewportRef } = (0, react.use)(PreviewContext);
		x ??= (viewportRef.current?.offsetWidth ?? 0) / 2;
		y ??= (viewportRef.current?.offsetHeight ?? 0) / 2;
		const mouse = (0, react.useMemo)(() => new Mouse({
			x,
			y
		}), []);
		(0, react.useEffect)(() => {
			mouse.x = x;
			mouse.y = y;
		}, [x, y]);
		return mouse;
	}
	//#endregion
	//#region shared/preview/components/PreviewTransition.jsx
	function PreviewTransition({ module, anchor, ...props }) {
		const { store, id, data, viewportRef, onError } = (0, react.use)(PreviewContext);
		const [mouseCoords, setMouseCoords] = (0, react.useState)();
		const mouse = useMouse(mouseCoords);
		const onStart = () => {
			const anchorRef = getRef$1(anchor);
			if (!anchorRef || !viewportRef.current) return setMouseCoords(void 0);
			const [x, y] = getCenter(getRect(anchorRef, viewportRef.current));
			setMouseCoords({
				x,
				y
			});
		};
		return /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			store,
			module,
			data: module.id === id ? data : void 0,
			mouse,
			viewportRef,
			anchor,
			onEntering: onStart,
			onExiting: onStart,
			onError,
			...props
		});
	}
	//#endregion
	//#region shared/preview/components/main/Chat.jsx
	function generateMessage(rng, key = null) {
		return {
			key,
			username: int(rng, 60, 128),
			rows: stream(rng, int(rng, 1, 4), () => stream(rng, int(rng, 3, 8), 30, 80)),
			embed: rng() < .3 ? [int(rng, 140, 400), int(rng, 100, 240)] : null
		};
	}
	function generateMessageStream(rng, count) {
		return stream(rng, count, generateMessage);
	}
	function Message({ username = 40, rows = [], embed = null }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__message" }, /* @__PURE__ */ BdApi.React.createElement(Icon, {
			size: 40,
			radius: "50%"
		}), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			flex: 1,
			column: true,
			align: "flex-start",
			gap: 6
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: username,
			color: "text-heading"
		}), rows.map((columns, i) => /* @__PURE__ */ BdApi.React.createElement(Flex, {
			key: i,
			gap: "6px 4px",
			wrap: true
		}, columns.map((length, i) => /* @__PURE__ */ BdApi.React.createElement(Text, {
			key: i,
			length
		})))), embed && /* @__PURE__ */ BdApi.React.createElement(Block, {
			w: embed[0],
			h: embed[1],
			maxWidth: "100%",
			radius: 8,
			bg: "text-primary"
		})));
	}
	function Chat({ messages, rng }) {
		const [module, isActive] = useModule$1(ModuleKey_default.Messages);
		const [data, setData] = (0, react.useState)(messages);
		(0, react.useEffect)(() => setData(messages), [messages]);
		const stage = useStages(Infinity, isActive);
		(0, react.useEffect)(() => {
			if (stage === 0) return;
			setData((data) => {
				if (rng() < .2) {
					const index = data.length - int(rng, 1, 4);
					return data.slice(0, index).concat(data.slice(index + 1));
				}
				return data.slice(-10).concat(generateMessage(rng, messages.length + stage));
			});
		}, [stage]);
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			flex: 1,
			column: true,
			bg: "background-secondary"
		}, /* @__PURE__ */ BdApi.React.createElement(Block, {
			relative: true,
			flex: 1,
			overflow: "hidden"
		}, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			className: "BAP__messages",
			flex: 1,
			column: true
		}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, data.map(({ key, ...props }, i) => /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			key,
			container: { className: "BAP__messageContainer" },
			module,
			enter: i > 1,
			exit: i > 1
		}, /* @__PURE__ */ BdApi.React.createElement(Message, props)))))), /* @__PURE__ */ BdApi.React.createElement(Block, {
			px: 8,
			pb: 24,
			mt: -4,
			bg: "background-secondary"
		}, /* @__PURE__ */ BdApi.React.createElement(Block, {
			h: 50,
			bg: "background-primary",
			radius: 8,
			borderWidth: 1
		})));
	}
	var Chat_default = (0, react.memo)(Chat);
	css`.BAP__messages {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding-right: 16px;
    padding-bottom: 16px;
    box-sizing: border-box !important;
}
.BAP__messageContainer {
    margin-top: 16px;
}
.BAP__message {
    display: flex;
    gap: 16px;
    padding: 4px 0 2px 16px;
}``Preview: Chat`;
	//#endregion
	//#region shared/preview/data.js
	var chat = {
		main: () => {
			const rng = sfc32(450181629, 238323892, 206681137, 215170589);
			return {
				rng,
				messages: generateMessageStream(rng, 8)
			};
		},
		alt: () => {
			const rng = sfc32(3849863118, 865888779, 2963917516, 814392167);
			return {
				rng,
				messages: generateMessageStream(rng, 5)
			};
		},
		tertiary: () => {
			const rng = sfc32(243164468, 1892646852, 3229717884, 3028721673);
			return {
				rng,
				messages: generateMessageStream(rng, 5)
			};
		}
	};
	var memberList = {
		main: () => ({ sections: [
			{
				length: 55,
				items: [
					{ length: 150 },
					{ length: 92 },
					{ length: 122 }
				]
			},
			{
				length: 130,
				items: [
					{ length: 102 },
					{ length: 92 },
					{ length: 122 },
					{ length: 58 },
					{ length: 138 }
				]
			},
			{
				length: 96,
				items: [
					{ length: 70 },
					{ length: 135 },
					{ length: 122 },
					{ length: 144 },
					{ length: 130 }
				]
			}
		] }),
		alt: () => ({ sections: [{
			length: 115,
			items: [
				{ length: 61 },
				{ length: 91 },
				{ length: 75 },
				{ length: 137 },
				{ length: 109 }
			]
		}, {
			length: 90,
			items: [
				{ length: 98 },
				{ length: 114 },
				{ length: 86 },
				{ length: 126 },
				{ length: 133 },
				{ length: 120 },
				{ length: 54 },
				{ length: 98 },
				{ length: 126 }
			]
		}] })
	};
	var channel = {
		main: () => ({
			header: {
				name: 60,
				description: 282
			},
			chat: chat.main(),
			memberList: memberList.main()
		}),
		alt: () => ({
			header: {
				name: 182,
				description: 176
			},
			chat: chat.alt(),
			memberList: memberList.alt()
		})
	};
	var thread = {
		main: () => ({
			header: { name: 103 },
			chat: chat.alt()
		}),
		alt: () => ({
			header: { name: 143 },
			chat: chat.tertiary()
		})
	};
	var channelList = {
		main: () => ({
			name: 140,
			items: [
				{
					type: "channel",
					length: 126
				},
				{
					type: "channel",
					length: 63
				},
				{
					type: "section",
					length: 77
				},
				{
					type: "channel",
					length: 37
				},
				{
					type: "channel",
					length: 124
				},
				{
					type: "channel",
					length: 83
				},
				{
					type: "channel",
					length: 111
				},
				{
					type: "section",
					length: 136
				},
				{
					type: "channel",
					length: 143
				},
				{
					type: "channel",
					length: 111
				},
				{
					type: "channel",
					length: 123
				},
				{
					type: "channel",
					length: 162
				},
				{
					type: "channel",
					length: 83
				},
				{
					type: "channel",
					length: 103
				},
				{
					type: "section",
					length: 83
				},
				{
					type: "channel",
					length: 124
				},
				{
					type: "channel",
					length: 80
				}
			],
			active: 4
		}),
		alt: () => ({
			name: 67,
			items: [
				{
					type: "channel",
					length: 37
				},
				{
					type: "channel",
					length: 111
				},
				{
					type: "channel",
					length: 63
				},
				{
					type: "section",
					length: 54
				},
				{
					type: "channel",
					length: 58
				},
				{
					type: "channel",
					length: 159
				},
				{
					type: "channel",
					length: 87
				},
				{
					type: "channel",
					length: 72
				},
				{
					type: "channel",
					length: 125
				},
				{
					type: "section",
					length: 127
				},
				{
					type: "channel",
					length: 82
				},
				{
					type: "channel",
					length: 154
				},
				{
					type: "channel",
					length: 100
				},
				{
					type: "section",
					length: 77
				},
				{
					type: "channel",
					length: 125
				},
				{
					type: "channel",
					length: 72
				}
			],
			active: 7
		})
	};
	var server = {
		main: () => ({
			channelList: channelList.main(),
			channel: channel.main()
		}),
		alt: () => ({
			channelList: channelList.alt(),
			channel: channel.alt()
		})
	};
	//#endregion
	//#region shared/preview/components/main/ServerList.jsx
	function ServerList({ active = -1, hover = -1, iconRefs = (0, react.use)(PreviewContext).serverListIconRefs }) {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			w: 72,
			column: true,
			align: "center",
			gap: 8,
			mb: 64,
			bg: "background-tertiary",
			overflow: "hidden"
		}, /* @__PURE__ */ BdApi.React.createElement(Icon, {
			size: 40,
			radius: 12
		}), /* @__PURE__ */ BdApi.React.createElement(Divider$1, { length: 32 }), Array(13).fill(null).map((_, i) => /* @__PURE__ */ BdApi.React.createElement(Flex, {
			key: i,
			center: true,
			w: "100%",
			relative: true
		}, /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)({
			"BAP__serverPill": true,
			"BAP__serverPill--hover": i === hover,
			"BAP__serverPill--active": i === active
		}) }), /* @__PURE__ */ BdApi.React.createElement("div", { ref: (ref) => {
			iconRefs.current[i] = ref;
		} }, /* @__PURE__ */ BdApi.React.createElement(Icon, {
			size: 40,
			radius: 12
		})))));
	}
	css`.BAP__serverPill {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    border-radius: 0 5px 5px 0;
    background-color: var(--bap-white);
    transform-origin: 0 0;
    opacity: 0;
    scale: .5;
    transition: opacity .2s, scale .2s, height .2s;
}
.BAP__serverPill--hover, .BAP__serverPill--active {
    opacity: 1;
    scale: 1;
}
.BAP__serverPill--active {
    height: 40px;
}``Preview: ServerList`;
	//#endregion
	//#region shared/preview/components/icons/ChevronIcon.jsx
	function ChevronIcon({ size = 20, color = "var(--bap-text-heading)" }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			width: size,
			height: size,
			viewBox: "0 0 20 20",
			fill: "none",
			xmlns: "http://www.w3.org/2000/svg"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M4.41691 7.74999C4.57268 7.5973 4.78211 7.51177 5.00024 7.51177C5.21837 7.51177 5.4278 7.5973 5.58358 7.74999L10.0002 12.1583L14.4169 7.74165C14.4922 7.65499 14.5847 7.58484 14.6884 7.53559C14.7921 7.48634 14.9049 7.45906 15.0197 7.45546C15.1345 7.45186 15.2488 7.47202 15.3554 7.51467C15.462 7.55732 15.5586 7.62155 15.6392 7.70332C15.7199 7.78509 15.7827 7.88264 15.8238 7.98985C15.865 8.09705 15.8835 8.2116 15.8783 8.32631C15.8731 8.44102 15.8442 8.55342 15.7935 8.65644C15.7428 8.75946 15.6713 8.85089 15.5836 8.92499L10.5836 13.925C10.4278 14.0777 10.2184 14.1632 10.0002 14.1632C9.78211 14.1632 9.57268 14.0777 9.41691 13.925L4.41691 8.92499C4.3388 8.84752 4.27681 8.75535 4.2345 8.6538C4.19219 8.55225 4.17041 8.44333 4.17041 8.33332C4.17041 8.22331 4.19219 8.11439 4.2345 8.01284C4.27681 7.91129 4.3388 7.81912 4.41691 7.74165V7.74999Z",
			fill: color
		}));
	}
	//#endregion
	//#region shared/preview/components/main/Channel.jsx
	function ChannelHeader({ name, description, items = [
		0,
		0,
		0,
		1
	], itemRefs = (0, react.useRef)([]), search = true }) {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			h: 48,
			pl: 21,
			pr: 8,
			justify: "space-between",
			borderBottomWidth: 1,
			bg: "background-secondary"
		}, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			relative: true,
			align: "center",
			gap: 8,
			flex: 1,
			overflow: "hidden"
		}, /* @__PURE__ */ BdApi.React.createElement(Icon, { color: "text-heading" }), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: name,
			color: "text-heading"
		}), description && /* @__PURE__ */ BdApi.React.createElement(Text, { length: description }), /* @__PURE__ */ BdApi.React.createElement(Block, {
			absolute: true,
			top: 0,
			right: 0,
			bottom: 0,
			w: 8,
			background: "linear-gradient(to right, transparent, var(--bap-background-secondary))"
		})), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			pl: 8,
			align: "center",
			gap: 18
		}, items.map((active, i) => /* @__PURE__ */ BdApi.React.createElement("div", {
			key: i,
			ref: (ref) => {
				itemRefs.current[i] = ref;
			},
			className: (0, clsx.default)({
				"BAP__channelHeaderItem": true,
				"BAP__channelHeaderItem--active": active
			})
		})), search && /* @__PURE__ */ BdApi.React.createElement(Block, {
			w: 244,
			h: 32,
			radius: 8,
			bg: "background-secondary-alt",
			borderWidth: 1
		})));
	}
	function MemberListItem({ ref, active = false, length }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", {
			ref,
			className: (0, clsx.default)({
				"BAP__memberListItem": true,
				"BAP__memberListItem--active": active
			})
		}, /* @__PURE__ */ BdApi.React.createElement(Icon, {
			size: 32,
			radius: "50%",
			color: active && "text-heading"
		}), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length,
			color: active && "text-heading"
		}));
	}
	function MemberList({ sections = [], itemRefs = (0, react.useRef)([]), active = -1 }) {
		const { memberListShown, setMemberListShown } = (0, react.use)(PreviewContext);
		const [module, isActive] = useModule$1(ModuleKey_default.MembersSidebar);
		const stage = useStages(2, isActive);
		const mouse = useMouse({
			x: 997,
			y: 57
		});
		(0, react.useEffect)(() => {
			if (isActive) setMemberListShown(!stage, true);
		}, [stage]);
		return /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			in: memberListShown,
			container: { className: "BAP__sidebar" },
			module,
			mouse
		}, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__memberList" }, sections.map(({ length, items = [] }, i) => /* @__PURE__ */ BdApi.React.createElement(Flex, {
			key: i,
			column: true,
			gap: 2
		}, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			px: 8,
			pb: 4
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length,
			height: 12
		})), items.map((props, j) => {
			const index = sections.slice(0, i).reduce((n, s) => n + s.items.length, 0) + j;
			return /* @__PURE__ */ BdApi.React.createElement(MemberListItem, {
				key: j,
				ref: (ref) => {
					itemRefs.current[index] = ref;
				},
				active: index === active,
				...props
			});
		})))));
	}
	function ThreadSidebar() {
		const { setMemberListShown } = (0, react.use)(PreviewContext);
		const data = (0, react.useMemo)(() => [thread.main(), thread.alt()], []);
		const [module, isActive] = useModule$1(ModuleKey_default.ThreadSidebar);
		const [switchModule, isSwitchActive] = useModule$1(ModuleKey_default.ThreadSidebarSwitch);
		const stage = useStages(2, isActive || isSwitchActive);
		const key = isSwitchActive ? stage : 0;
		(0, react.useEffect)(() => {
			if (isActive) setMemberListShown(!stage, !!stage);
		}, [stage]);
		if (!isActive && !isSwitchActive) return null;
		return /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			in: !!stage || isSwitchActive,
			container: { className: "BAP__sidebar" },
			module
		}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			key,
			container: { className: "BAP__sidebar" },
			module: switchModule
		}, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__threadSidebar" }, /* @__PURE__ */ BdApi.React.createElement(Block, { w: 8 }), /* @__PURE__ */ BdApi.React.createElement(Flex, { className: "BAP__threadSidebarContents" }, /* @__PURE__ */ BdApi.React.createElement(ChannelHeader, {
			...data[key].header,
			items: [
				0,
				0,
				0
			],
			search: false
		}), /* @__PURE__ */ BdApi.React.createElement(Chat_default, data[key].chat))))));
	}
	function Channel({ header, chat, memberList }) {
		const { channelHeaderItemRefs, memberListItemRefs, memberListShown, memberList: memberListOverrides, threadPopoutShown } = (0, react.use)(PreviewContext);
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__channel" }, /* @__PURE__ */ BdApi.React.createElement(Flex, { className: "BAP__channelContents" }, /* @__PURE__ */ BdApi.React.createElement(ChannelHeader, {
			...header,
			items: [
				threadPopoutShown,
				0,
				0,
				memberListShown
			],
			itemRefs: channelHeaderItemRefs
		}), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			align: "stretch",
			flex: 1
		}, /* @__PURE__ */ BdApi.React.createElement(Chat_default, chat), /* @__PURE__ */ BdApi.React.createElement(MemberList, {
			...memberList,
			...memberListOverrides,
			itemRefs: memberListItemRefs
		}))), /* @__PURE__ */ BdApi.React.createElement(ThreadSidebar, null));
	}
	css`.BAP__channel {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-width: 0;
}
.BAP__channelContents {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bap-background-tertiary);
    border-top-width: 1px !important;
    overflow: clip;
}
.BAP__sidebar {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.BAP__memberList {
    width: 247px;
    padding: 20px 8px;
    background-color: var(--bap-background-secondary);
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left-width: 1px !important;
    overflow: hidden;
}
.BAP__memberListItem {
    display: flex;
    align-items: center;
    padding: 4px 16px;
    gap: 12px;
    border-radius: 8px;
}
.BAP__memberListItem--active {
    background-color: var(--bap-background-primary);
}
.BAP__threadSidebar {
    width: 458px;
    display: flex;
    align-items: stretch;
    height: 100%;
}
.BAP__threadSidebarContents {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top-width: 1px !important;
    border-left-width: 1px !important;
    border-radius: 8px 0 0 8px;
    overflow: clip;
}
.BAP__channel:has(.BAP__threadSidebar) .BAP__channelContents {
    border-right-width: 1px !important;
    border-radius: 0 8px 8px 0;
}
.BAP__channelHeaderItem {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background-color: var(--bap-text-primary);
}
.BAP__channelHeaderItem--active {
    background-color: var(--bap-text-heading);
}``Preview: Channel`;
	//#endregion
	//#region shared/preview/components/main/Server.jsx
	function ChannelListItem({ active = false, length }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__channelListItem" }, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			px: 8,
			align: "center",
			gap: 8,
			radius: 4,
			flex: 1,
			bg: active && "background-primary"
		}, /* @__PURE__ */ BdApi.React.createElement(Icon, {
			size: 19,
			color: active && "text-heading"
		}), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length,
			color: active && "text-heading"
		})));
	}
	function ChannelListSection({ active, length }) {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, { className: (0, clsx.default)({
			"BAP__channelListSection": true,
			"BAP__channelListSection--active": active
		}) }, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			h: 24,
			px: 16,
			align: "center",
			gap: 4,
			flex: 1
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length,
			height: 12
		}), active != null && /* @__PURE__ */ BdApi.React.createElement(ChevronIcon, null)));
	}
	function ChannelList({ name, items = [], active = -1 }) {
		const [module, isActive] = useModule$1(ModuleKey_default.ChannelList);
		const stage = useStages(4, isActive);
		const sectionIndexes = (0, react.useMemo)(() => items.map(({ type }, i) => type === "section" ? i : -1).filter((i) => i !== -1).concat(items.length), [items]);
		const hiddenSections = (0, react.useMemo)(() => [0, 1].slice(Math.max(0, stage - 2), stage), [stage]);
		return /* @__PURE__ */ BdApi.React.createElement(Flex, { className: "BAP__channelList" }, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			h: 48,
			align: "center",
			px: 14,
			borderBottomWidth: 1
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: name,
			color: "text-heading"
		})), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			column: true,
			py: 12,
			pr: 8,
			flex: 1
		}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, items.map(({ type, ...props }, i) => {
			if (type === "section") return /* @__PURE__ */ BdApi.React.createElement(ChannelListSection, {
				key: i,
				active: isActive ? !hiddenSections.some((s) => i === sectionIndexes[s]) : null,
				...props
			});
			if (hiddenSections.some((j) => i >= sectionIndexes[j] && i < sectionIndexes[j + 1]) && i !== active) return null;
			return /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
				key: i,
				container: { className: "BAP__channelListItemContainer" },
				module
			}, /* @__PURE__ */ BdApi.React.createElement(ChannelListItem, {
				active: i === active,
				...props
			}));
		}))));
	}
	function Server({ channelList, channel: channel$1 }) {
		const [module, isActive] = useModule$1(ModuleKey_default.Channels);
		const data = (0, react.useMemo)(() => !isActive ? [channel$1, channel$1] : [channel.main(), channel.alt()], [channel$1]);
		const stage = useStages(2, isActive);
		const auto = { direction: stage };
		const mouse = useMouse({
			x: 207,
			y: stage ? 463 : 253
		});
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__server" }, /* @__PURE__ */ BdApi.React.createElement(ChannelList, {
			...channelList,
			active: isActive ? stage ? 10 : 4 : channelList.active
		}), /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, {
			className: "BAP__page",
			childFactory: passAuto(auto)
		}, /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			key: stage,
			container: { className: "BAP__page" },
			module,
			auto,
			mouse
		}, /* @__PURE__ */ BdApi.React.createElement(Channel, data[stage]))));
	}
	css`.BAP__server {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-width: 0;
}
.BAP__channelList {
    display: flex;
    flex-direction: column;
    width: 268px;
    padding-bottom: 64px;
    border-top-width: 1px !important;
    border-left-width: 1px !important;
    border-top-left-radius: 12px;
    background-color: var(--bap-background-tertiary);
    overflow: hidden;
}
.BAP__channelListSection {
    height: 40px;
    display: flex;
    align-items: flex-end;
}
.BAP__channelListSection svg {
    transition: .2s transform;
    transform: rotate(-90deg);
}
.BAP__channelListSection--active svg {
    transform: rotate(0);
}
.BAP__channelListItem {
    display: flex;
    align-items: stretch;
    height: 32px;
    margin-left: 8px;
    padding: 1px 0;
}
.BAP__page {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: stretch;
    flex: 1;
    min-width: 0;
}``Preview: Server`;
	//#endregion
	//#region shared/preview/components/main/UserPanel.jsx
	function UserPanel({ active = -1, actionRefs = (0, react.use)(PreviewContext).userPanelActionRefs }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__userPanelContainer" }, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			className: "BAP__userPanel",
			justify: "space-between",
			align: "center"
		}, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			align: "center",
			gap: 10
		}, /* @__PURE__ */ BdApi.React.createElement(Icon, {
			size: 40,
			radius: "50%"
		}), /* @__PURE__ */ BdApi.React.createElement(Text, { length: 100 })), /* @__PURE__ */ BdApi.React.createElement(Flex, null, Array(3).fill(null).map((_, i) => /* @__PURE__ */ BdApi.React.createElement("div", {
			ref: (ref) => {
				actionRefs.current[i] = ref;
			},
			key: i,
			className: (0, clsx.default)("BAP__userPanelAction", { "BAP__userPanelAction--active": i === active })
		}, /* @__PURE__ */ BdApi.React.createElement(Icon, {
			size: 19,
			color: "current"
		}))))));
	}
	css`.BAP__userPanelContainer {
    position: absolute;
    z-index: 100;
    left: 0;
    bottom: 0;
    width: 341px;
    padding: 0 8px 8px;
    box-sizing: border-box !important;
}
.BAP__userPanel {
    height: 54px;
    border-width: 1px !important;
    border-radius: 8px;
    padding: 0 8px;
    background: var(--bap-background-primary);
}
.BAP__userPanelAction {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: transparent;
    color: var(--bap-text-primary);
    transition: background-color .2s, color .2s;
}
.BAP__userPanelAction--active {
    background-color: var(--bap-border-subtle);
    color: var(--bap-text-heading);
}``Preview: UserPanel`;
	//#endregion
	//#region shared/preview/components/main/Content.jsx
	function Content() {
		const { serverList, userPanel } = (0, react.use)(PreviewContext);
		const [module, isActive] = useModule$1(ModuleKey_default.Servers);
		const enhanceLayout = module.settings.enhanceLayout ?? true;
		const data = (0, react.useMemo)(() => [server.main(), server.alt()], []);
		const stage = useStages(2, isActive);
		const auto = { direction: stage };
		const mouse = useMouse({
			x: 36,
			y: stage ? 445 : 205
		});
		const wrap = (children, enabled = false) => enabled ? /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, {
			className: "BAP__content",
			childFactory: passAuto(auto)
		}, /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			key: stage,
			container: { className: "BAP__content" },
			module,
			auto,
			mouse
		}, children)) : children;
		return wrap(/* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__content" }, /* @__PURE__ */ BdApi.React.createElement(ServerList, {
			active: stage ? 7 : 2,
			...serverList
		}), wrap(/* @__PURE__ */ BdApi.React.createElement(Server, data[stage]), enhanceLayout), /* @__PURE__ */ BdApi.React.createElement(UserPanel, userPanel)), !enhanceLayout);
	}
	css`.BAP__content {
    position: relative;
    isolation: isolate;
    display: flex;
    flex: 1;
    min-height: 0;
    min-width: 0;
}``Preview: Content`;
	//#endregion
	//#region shared/preview/views/Main.jsx
	function Main() {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, { column: true }, /* @__PURE__ */ BdApi.React.createElement(SystemBar, null), /* @__PURE__ */ BdApi.React.createElement(Content, null));
	}
	//#endregion
	//#region shared/preview/components/settings/NavSidebar.jsx
	var items$1 = [
		{
			type: "title",
			length: 96
		},
		{
			type: "section",
			length: 85
		},
		{
			type: "section",
			length: 56
		},
		{
			type: "section",
			length: 119
		},
		{
			type: "section",
			length: 105
		},
		{
			type: "section",
			length: 98
		},
		{
			type: "section",
			length: 118
		},
		{
			type: "section",
			length: 56
		},
		{
			type: "section",
			length: 90
		},
		{
			type: "section",
			length: 38
		},
		{ type: "divider" },
		{
			type: "title",
			length: 121
		},
		{
			type: "section",
			length: 38
		},
		{
			type: "section",
			length: 92
		},
		{
			type: "section",
			length: 97
		},
		{
			type: "section",
			length: 98
		},
		{
			type: "section",
			length: 46
		},
		{ type: "divider" },
		{
			type: "title",
			length: 90
		}
	];
	function Title({ length }) {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			h: 24,
			px: 8,
			align: "center"
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length,
			height: 12,
			color: "background-primary"
		}));
	}
	function Section$1({ length, active = false }) {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			h: 32,
			radius: 4,
			px: 8,
			align: "center",
			bg: active && "background-primary"
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length,
			color: active && "text-heading"
		}));
	}
	function Divider() {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			h: 17,
			px: 10,
			align: "center"
		}, /* @__PURE__ */ BdApi.React.createElement(Block, {
			h: 1,
			flex: 1,
			bg: "border-subtle"
		}));
	}
	function NavSidebar({ active = -1 }) {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			w: 238,
			pt: 60,
			pl: 120,
			pr: 14,
			column: true,
			gap: 22
		}, /* @__PURE__ */ BdApi.React.createElement(Block, {
			h: 36,
			radius: 8,
			borderWidth: 1
		}), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			column: true,
			gap: 2
		}, items$1.map(({ type, ...props }, i) => {
			switch (type) {
				case "title": return /* @__PURE__ */ BdApi.React.createElement(Title, {
					key: i,
					...props
				});
				case "divider": return /* @__PURE__ */ BdApi.React.createElement(Divider, {
					key: i,
					...props
				});
				case "section": return /* @__PURE__ */ BdApi.React.createElement(Section$1, {
					key: i,
					active: i === active,
					...props
				});
			}
		})));
	}
	//#endregion
	//#region shared/preview/components/icons/XIcon.jsx
	function XIcon$1({ size = 24, color = "var(--bap-text-heading)" }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			width: size,
			height: size,
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M17.3 18.7a1 1 0 0 0 1.4-1.4L13.42 12l5.3-5.3a1 1 0 0 0-1.42-1.4L12 10.58l-5.3-5.3a1 1 0 0 0-1.4 1.42L10.58 12l-5.3 5.3a1 1 0 1 0 1.42 1.4L12 13.42l5.3 5.3Z",
			fill: color
		}));
	}
	//#endregion
	//#region shared/preview/components/settings/Section.jsx
	function CloseButton(props) {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			column: true,
			align: "center",
			gap: 9,
			...props
		}, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			w: 36,
			h: 36,
			center: true,
			radius: "50%",
			border: "2px solid var(--bap-text-heading)"
		}, /* @__PURE__ */ BdApi.React.createElement(XIcon$1, { size: 18 })), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 26,
			height: 12,
			color: "text-heading"
		}));
	}
	function Section({ children }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__section" }, /* @__PURE__ */ BdApi.React.createElement(CloseButton, {
			absolute: true,
			top: 92,
			right: 132
		}), children);
	}
	css`.BAP__section {
    position: relative;
    flex: 1;
    padding: 96px 208px 0 40px;
    overflow: hidden;
    background-color: var(--bap-background-primary);
}``Preview: Section`;
	//#endregion
	//#region shared/preview/components/Tabs.jsx
	function Tab({ length, active = false, activeColor = "text-heading" }) {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			mb: -1,
			column: true,
			justify: "space-between"
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length,
			color: active && activeColor,
			height: 12
		}), active && /* @__PURE__ */ BdApi.React.createElement(Block, {
			h: 2,
			bg: activeColor
		}));
	}
	function Tabs({ tabs = [], active = -1, activeColor, gap = 55, h = 24, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			gap,
			h: h - 1,
			align: "stretch",
			borderBottomWidth: 1,
			...props
		}, tabs.map((length, i) => /* @__PURE__ */ BdApi.React.createElement(Tab, {
			key: i,
			length,
			active: i === active,
			activeColor
		})));
	}
	//#endregion
	//#region shared/preview/components/settings/UserProfileSection.jsx
	function UserProfileSection() {
		return /* @__PURE__ */ BdApi.React.createElement(Section, null, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 127,
			height: 24,
			color: "text-heading"
		}), /* @__PURE__ */ BdApi.React.createElement(Tabs, {
			mt: 36,
			tabs: [52, 56],
			active: 0,
			activeColor: "brand-primary"
		}), /* @__PURE__ */ BdApi.React.createElement(Block, {
			mt: 32,
			relative: true,
			radius: 8,
			bg: "background-tertiary",
			overflow: "hidden"
		}, /* @__PURE__ */ BdApi.React.createElement(Block, {
			h: 100,
			bg: "brand-primary",
			mb: 87
		}), /* @__PURE__ */ BdApi.React.createElement(Block, {
			absolute: true,
			top: 76,
			left: 16,
			w: 82,
			h: 82,
			radius: "50%",
			bg: "brand-primary",
			border: "5px solid var(--bap-background-tertiary)"
		}), /* @__PURE__ */ BdApi.React.createElement(Text, {
			absolute: true,
			top: 119,
			left: 117,
			length: 88,
			height: 24,
			color: "text-heading"
		}), /* @__PURE__ */ BdApi.React.createElement(Button, {
			absolute: true,
			top: 119,
			right: 16,
			width: 133
		}), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			m: 16,
			py: 18,
			pl: 14,
			pr: 16,
			column: true,
			gap: 28,
			radius: 8,
			bg: "background-secondary"
		}, [
			[101, 67],
			[76, 101],
			[55, 155],
			[110, 133]
		].map((items, i) => /* @__PURE__ */ BdApi.React.createElement(Flex, {
			key: i,
			justify: "space-between",
			align: "center"
		}, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			column: true,
			align: "flex-start",
			gap: 8
		}, items.map((length, i) => /* @__PURE__ */ BdApi.React.createElement(Text, {
			key: i,
			length,
			color: "text-heading"
		}))), /* @__PURE__ */ BdApi.React.createElement(Button, {
			width: 60,
			color: "text-primary"
		}))))));
	}
	//#endregion
	//#region shared/preview/components/settings/SwitchesSection.jsx
	function Switch({ title = 90, note = [276], active = false }) {
		return /* @__PURE__ */ BdApi.React.createElement(Flex, {
			relative: true,
			mt: 20,
			pt: 6,
			pb: 22,
			borderBottomWidth: 1,
			column: true,
			gap: 16
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: title,
			color: "text-heading"
		}), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			column: true,
			gap: 4
		}, note.map((length, i) => /* @__PURE__ */ BdApi.React.createElement(Text, {
			key: i,
			length
		}))), /* @__PURE__ */ BdApi.React.createElement(Block, {
			absolute: true,
			top: 0,
			right: 0,
			w: 42,
			h: 26,
			radius: 24,
			borderWidth: 1,
			bg: active ? "brand-primary" : "text-primary"
		}, /* @__PURE__ */ BdApi.React.createElement(Block, {
			absolute: true,
			top: 3,
			left: active ? 19 : 3,
			w: 20,
			h: 20,
			radius: "50%",
			bg: "white"
		})));
	}
	var switches = [
		{
			title: 201,
			note: [385, 128],
			active: true
		},
		{
			title: 90,
			note: [406],
			active: true
		},
		{
			title: 238,
			note: [276],
			active: true
		},
		{
			title: 150,
			note: [339, 314],
			active: false
		},
		{
			title: 227,
			note: [171],
			active: true
		},
		{
			title: 212,
			note: [329],
			active: false
		}
	];
	function SwitchesSection() {
		return /* @__PURE__ */ BdApi.React.createElement(Section, null, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 114,
			color: "text-heading"
		}), switches.map((props, i) => /* @__PURE__ */ BdApi.React.createElement(Switch, {
			key: i,
			...props
		})));
	}
	//#endregion
	//#region shared/preview/views/Settings.jsx
	function Settings() {
		const [module, isActive] = useModule$1(ModuleKey_default.Settings);
		const stage = useStages(2, isActive);
		const auto = { direction: stage };
		const mouse = useMouse({
			x: 239,
			y: stage ? 400 : 162
		});
		return /* @__PURE__ */ BdApi.React.createElement(Flex, { bg: "background-tertiary" }, /* @__PURE__ */ BdApi.React.createElement(NavSidebar, { active: stage ? 8 : 1 }), /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, {
			className: "BAP__contentRegion",
			childFactory: passAuto(auto)
		}, /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			key: stage,
			container: { className: "BAP__contentRegion" },
			module,
			auto,
			mouse
		}, stage ? /* @__PURE__ */ BdApi.React.createElement(SwitchesSection, null) : /* @__PURE__ */ BdApi.React.createElement(UserProfileSection, null))));
	}
	css`.BAP__contentRegion {
    position: relative;
    isolation: isolate;
    display: flex;
    flex: 1;
    background: var(--bap-background-primary);
}
.BAP__contentRegion > .BAP__contentRegion {
    background: none;
}``Preview: Settings`;
	//#endregion
	//#region shared/preview/components/Layers.jsx
	function Layer$1({ baseLayer = false, hidden = false, children }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("BAP__layer", {
			"BAP__baseLayer": baseLayer,
			"BAP__layer--hidden": hidden
		}) }, children);
	}
	function LayerTransition$1({ baseLayer, shown, children, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			...props,
			in: shown && props.in,
			container: { className: "BAP__layerContainer" },
			defaultLayoutStyles: false,
			mountOnEnter: false,
			unmountOnExit: false
		}, (state) => /* @__PURE__ */ BdApi.React.createElement(Layer$1, {
			baseLayer,
			hidden: state === Transition.EXITED
		}, children));
	}
	function Layers({ layer }) {
		const [module, isActive] = useModule$1(ModuleKey_default.Layers);
		const stage = useStages(2, isActive);
		const mainMouse = useMouse({
			x: 308,
			y: 684
		});
		const settingsMouse = useMouse({
			x: 1128,
			y: 112
		});
		if (!isActive) return /* @__PURE__ */ BdApi.React.createElement(Layer$1, { baseLayer: true }, layer);
		const auto = {
			direction: stage,
			preservedMouse: mainMouse
		};
		const props = {
			module,
			mouse: stage ? mainMouse : settingsMouse,
			auto
		};
		return /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, {
			component: null,
			childFactory: passAuto(auto)
		}, /* @__PURE__ */ BdApi.React.createElement(LayerTransition$1, {
			...props,
			key: "main",
			baseLayer: true,
			shown: stage === 0
		}, /* @__PURE__ */ BdApi.React.createElement(Main, null)), /* @__PURE__ */ BdApi.React.createElement(LayerTransition$1, {
			...props,
			key: "settings",
			shown: stage === 1
		}, /* @__PURE__ */ BdApi.React.createElement(Settings, null)));
	}
	css`.BAP__layerContainer, .BAP__layer, .BAP__layer > * {
    position: absolute;
    inset: 0;
}
.BAP__layer {
    background-color: var(--bap-background-primary);
    overflow: hidden;
    contain: strict;
}
.BAP__layer--hidden {
    visibility: hidden;
    pointer-events: none;
}
.BAP__baseLayer {
    background-color: transparent;
}``Preview: Layers`;
	//#endregion
	//#region shared/preview/components/Floating.jsx
	function FloatingLayerContainer({ className, children, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", {
			className: (0, clsx.default)("BAP__floatingLayerContainer", className),
			...props
		}, children);
	}
	function FloatingLayer({ className, children, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", {
			className: (0, clsx.default)("BAP__floatingLayer", className),
			...props
		}, children);
	}
	function Floating({ ref, className, top, left, right, bottom, layer, children }) {
		return /* @__PURE__ */ BdApi.React.createElement(FloatingLayer, layer, /* @__PURE__ */ BdApi.React.createElement("div", {
			ref,
			className: (0, clsx.default)("BAP__floating", className),
			style: {
				position: "absolute",
				top,
				left,
				right,
				bottom
			}
		}, children));
	}
	css`.BAP__floatingLayerContainer,
.BAP__floatingLayer {
    position: absolute;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    isolation: isolate;
}
.BAP__floating {
    position: absolute;
    pointer-events: all;
}``Preview: Floating`;
	//#endregion
	//#region shared/preview/components/Tooltip.jsx
	function Tooltip({ children, position = Position_default.Top, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(Floating, props, /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("BAP__tooltip", `BAP__tooltip--${position}`) }, children, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__tooltipArrow" })));
	}
	css`.BAP__tooltip {
    position: relative;
    padding: 8px;
    border-radius: 5px;
    background-color: var(--bap-background-surface-overlay);
    border-width: 1px !important;
    box-shadow: 0 12px 24px 0 rgba(0, 0, 0, .24);
}
.BAP__tooltipArrow {
    position: absolute;
    top: var(--arrow-top);
    left: var(--arrow-left);
    bottom: var(--arrow-bottom);
    right: var(--arrow-right);
    translate: var(--arrow-translate);
    width: 20px;
    height: 20px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}
.BAP__tooltipArrow::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--bap-background-surface-overlay);
    border: 1px solid var(--bap-border-subtle);
    rotate: 45deg;
    translate: var(--arrow-translate-inner);
}
.BAP__tooltip--top {
    --arrow-top: 100%;
    --arrow-left: 50%;
    --arrow-translate: -50% 0;
    --arrow-translate-inner: 0 -10px;
    transform-origin: 50% 100%;
}
.BAP__tooltip--bottom {
    --arrow-bottom: 100%;
    --arrow-left: 50%;
    --arrow-translate: -50% 0;
    --arrow-translate-inner: 0 10px;
    transform-origin: 50% 0;
}
.BAP__tooltip--left {
    --arrow-left: 100%;
    --arrow-top: 50%;
    --arrow-translate: 0 -50%;
    --arrow-translate-inner: -10px 0;
    transform-origin: 100% 50%;
}
.BAP__tooltip--right {
    --arrow-right: 100%;
    --arrow-top: 50%;
    --arrow-translate: 0 -50%;
    --arrow-translate-inner: 10px 0;
    transform-origin: 0 50%;
}``Preview: Tooltip`;
	//#endregion
	//#region shared/preview/components/floating/Tooltips.jsx
	function AnimatedTooltip({ position, align = Position_default.Center, top, left, children, ...props }) {
		const containerRef = (0, react.useRef)();
		const [module] = useModule$1(ModuleKey_default.Tooltips);
		return /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			containerRef,
			module,
			auto: {
				position,
				align
			},
			...props
		}, /* @__PURE__ */ BdApi.React.createElement(Tooltip, {
			ref: containerRef,
			position,
			top,
			left
		}, children));
	}
	function Tooltips() {
		const { userPanelActionRefs, serverListIconRefs, setUserPanel, setServerList } = (0, react.use)(PreviewContext);
		const [, isActive] = useModule$1(ModuleKey_default.Tooltips);
		const stage = useStages(4, isActive);
		const userPanelActionIndex = 0;
		(0, react.useEffect)(() => {
			if (isActive) setUserPanel(stage === 1 ? { active: userPanelActionIndex } : {});
		}, [stage]);
		const serverListIconIndex = 9;
		(0, react.useEffect)(() => {
			if (isActive) setServerList(stage === 3 ? { hover: serverListIconIndex } : {});
		}, [stage]);
		if (!isActive) return null;
		return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(AnimatedTooltip, {
			in: stage === 1,
			top: 625,
			left: 190,
			position: Position_default.Top,
			anchor: () => userPanelActionRefs.current[userPanelActionIndex]
		}, /* @__PURE__ */ BdApi.React.createElement(Text, { length: 90 })), /* @__PURE__ */ BdApi.React.createElement(AnimatedTooltip, {
			in: stage === 3,
			top: 497,
			left: 68,
			position: Position_default.Right,
			anchor: () => serverListIconRefs.current[serverListIconIndex]
		}, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			column: true,
			gap: 8
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 140,
			color: "text-heading"
		}), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			gap: 8,
			align: "center"
		}, /* @__PURE__ */ BdApi.React.createElement(Icon, { size: 19 }), /* @__PURE__ */ BdApi.React.createElement(Flex, null, Array(4).fill(null).map((_, i) => /* @__PURE__ */ BdApi.React.createElement(Icon, {
			key: i,
			size: 24,
			radius: "50%",
			mr: -5,
			boxShadow: "0 0 0 2px var(--bap-background-surface-overlay)"
		})))), /* @__PURE__ */ BdApi.React.createElement(Text, { length: 37 }))));
	}
	//#endregion
	//#region shared/preview/components/floating/Popouts.jsx
	function UserPopout(props) {
		return /* @__PURE__ */ BdApi.React.createElement(Floating, props, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__userPopout" }, /* @__PURE__ */ BdApi.React.createElement(Block, {
			h: 105,
			bg: "brand-primary"
		}), /* @__PURE__ */ BdApi.React.createElement(Icon, {
			absolute: true,
			size: 82,
			top: 60,
			left: 15,
			radius: "50%",
			color: "brand-primary",
			boxShadow: "0 0 0 5px var(--bap-background-surface-overlay)"
		}), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			column: true,
			pt: 54,
			px: 16,
			pb: 16,
			flex: 1
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 225,
			height: 24,
			color: "text-heading"
		}), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 169,
			mt: 12
		}), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			gap: 4,
			mt: 16
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 34,
			color: "text-heading"
		}), /* @__PURE__ */ BdApi.React.createElement(Text, { length: 106 })), /* @__PURE__ */ BdApi.React.createElement(Block, {
			mt: "auto",
			h: 44,
			radius: 3,
			bg: "background-primary",
			borderWidth: 1
		}))));
	}
	function ThreadsPopout(props) {
		return /* @__PURE__ */ BdApi.React.createElement(Floating, props, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__threadsPopout" }, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			h: 48,
			px: 16,
			justify: "space-between",
			align: "center",
			borderBottomWidth: 1
		}, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			gap: 10,
			center: true
		}, /* @__PURE__ */ BdApi.React.createElement(Icon, { color: "text-heading" }), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 167,
			color: "text-heading"
		})), /* @__PURE__ */ BdApi.React.createElement(Icon, { size: 26 })), /* @__PURE__ */ BdApi.React.createElement(Flex, {
			column: true,
			center: true,
			flex: 1
		}, /* @__PURE__ */ BdApi.React.createElement(Icon, {
			size: 84,
			radius: "50%",
			color: "background-primary"
		}), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 225,
			height: 24,
			color: "text-heading",
			mt: 20
		}), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 299,
			mt: 14
		}), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 265,
			mt: 6
		}), /* @__PURE__ */ BdApi.React.createElement(Button, {
			width: 118,
			height: 36,
			mt: 24
		}))));
	}
	function Popouts() {
		const { channelHeaderItemRefs, memberListItemRefs, setMemberList, setThreadPopoutShown } = (0, react.use)(PreviewContext);
		const userPopoutRef = (0, react.useRef)();
		const threadPopoutRef = (0, react.useRef)();
		const [module, isActive] = useModule$1(ModuleKey_default.Popouts);
		const stage = useStages(4, isActive);
		const memberListItemIndex = 0;
		(0, react.useEffect)(() => {
			if (isActive) setMemberList(stage === 1 ? { active: memberListItemIndex } : {});
		}, [stage]);
		const channelHeaderItemIndex = 0;
		(0, react.useEffect)(() => {
			if (isActive) setThreadPopoutShown(stage === 3);
		}, [stage]);
		if (!isActive) return null;
		return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			in: stage === 1,
			module,
			containerRef: userPopoutRef,
			anchor: () => memberListItemRefs.current[memberListItemIndex],
			auto: {
				position: Position_default.Left,
				align: Position_default.Top
			}
		}, /* @__PURE__ */ BdApi.React.createElement(UserPopout, {
			ref: userPopoutRef,
			top: 120,
			right: 272
		})), /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			in: stage === 3,
			module,
			containerRef: threadPopoutRef,
			anchor: () => channelHeaderItemRefs.current[channelHeaderItemIndex],
			auto: {
				position: Position_default.Bottom,
				align: Position_default.Right
			}
		}, /* @__PURE__ */ BdApi.React.createElement(ThreadsPopout, {
			ref: threadPopoutRef,
			top: 81,
			right: 392
		})));
	}
	css`.BAP__userPopout {
    width: 300px;
    height: 380px;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, .24);
    background-color: var(--bap-background-surface-overlay);
    overflow: clip;
}

.BAP__threadsPopout {
    width: 534px;
    height: 448px;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: 0 0 0 1px var(--bap-border-subtle),
        0 12px 24px 0 rgba(0, 0, 0, .24);
    background-color: var(--bap-background-surface-overlay);
    overflow: clip;
}``Preview: Popouts`;
	//#endregion
	//#region shared/preview/components/floating/ContextMenus.jsx
	var coords = {
		x: 36,
		y: 157
	};
	var auto = {
		position: Position_default.Right,
		align: Position_default.Top
	};
	var items = [
		{
			type: "action",
			length: 79
		},
		{
			type: "submenu",
			length: 82
		},
		{
			type: "action",
			length: 35
		},
		{
			type: "action",
			length: 52
		},
		{
			type: "action",
			length: 87
		},
		{ type: "divider" },
		{
			type: "action",
			length: 60
		},
		{
			type: "action",
			length: 75
		},
		{
			type: "action",
			length: 32
		},
		{
			type: "action",
			length: 81
		},
		{
			type: "action",
			length: 116
		},
		{ type: "divider" },
		{
			type: "action",
			length: 97
		}
	];
	var submenuIndex = items.findIndex((item) => item.type === "submenu");
	var submenuItems = [
		{
			type: "action",
			length: 48
		},
		{
			type: "action",
			length: 88
		},
		{
			type: "action",
			length: 62
		},
		{
			type: "action",
			length: 54
		},
		{
			type: "action",
			length: 99
		},
		{
			type: "action",
			length: 66
		},
		{
			type: "action",
			length: 82
		},
		{
			type: "action",
			length: 41
		},
		{ type: "divider" },
		{
			type: "action",
			length: 97
		}
	];
	function ContextMenuItem({ type, length, active = false, ...props }) {
		if (type === "divider") return /* @__PURE__ */ BdApi.React.createElement(Divider$1, {
			length: "100%",
			my: 8
		});
		return /* @__PURE__ */ BdApi.React.createElement("div", {
			className: (0, clsx.default)({
				"BAP__contextMenuItem": true,
				"BAP__contextMenuItem--active": active
			}),
			...props
		}, /* @__PURE__ */ BdApi.React.createElement(Text, {
			length,
			color: "text-heading"
		}), type === "submenu" ? /* @__PURE__ */ BdApi.React.createElement(ChevronIcon, { size: 20 }) : /* @__PURE__ */ BdApi.React.createElement(Icon, { size: 20 }));
	}
	function ContextMenu({ items, itemRefs = (0, react.useRef)([]), active = -1, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(Floating, props, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__contextMenu" }, items.map((props, i) => /* @__PURE__ */ BdApi.React.createElement(ContextMenuItem, {
			key: i,
			ref: (ref) => {
				itemRefs.current[i] = ref;
			},
			active: i === active,
			...props
		}))));
	}
	function ContextMenus() {
		const menuRef = (0, react.useRef)();
		const submenuRef = (0, react.useRef)();
		const itemRefs = (0, react.useRef)([]);
		const [module, isActive] = useModule$1(ModuleKey_default.ContextMenu);
		const stage = useStages(4, isActive);
		const mouse = useMouse(coords);
		if (!isActive) return null;
		return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			in: stage > 0,
			module,
			containerRef: menuRef,
			auto,
			mouse
		}, /* @__PURE__ */ BdApi.React.createElement(ContextMenu, {
			ref: menuRef,
			top: coords.y,
			left: coords.x,
			items,
			itemRefs,
			active: stage === 2 ? submenuIndex : -1
		})), /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			in: stage === 2,
			module,
			containerRef: submenuRef,
			auto,
			anchor: () => itemRefs.current[submenuIndex]
		}, /* @__PURE__ */ BdApi.React.createElement(ContextMenu, {
			ref: submenuRef,
			top: 202,
			left: 261,
			items: submenuItems
		})));
	}
	css`.BAP__contextMenu {
    width: 204px;
    border-width: 1px !important;
    box-shadow: 0 12px 24px 0 rgba(0, 0, 0, .24);
    background-color: var(--bap-background-surface-overlay);
    border-radius: 8px;
    padding: 8px;
}
.BAP__contextMenuItem {
    height: 36px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
}
.BAP__contextMenuItem svg {
    rotate: -90deg;
}
.BAP__contextMenuItem--active {
    background-color: var(--bap-border-subtle);
}``Preview: ContextMenus`;
	//#endregion
	//#region shared/preview/components/floating/Modals.jsx
	function Modal$1({ children, ...props }) {
		const containerRef = (0, react.useRef)();
		const [module] = useModule$1(ModuleKey_default.Modals);
		return /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			module,
			containerRef,
			...props
		}, /* @__PURE__ */ BdApi.React.createElement(FloatingLayer, { className: "BAP__modalLayer" }, /* @__PURE__ */ BdApi.React.createElement(AnimeContainer, {
			ref: containerRef,
			id: ModuleKey_default.Modals,
			container: { className: "BAP__modalContainer" }
		}, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__modal" }, children))));
	}
	function UserModal(props) {
		return /* @__PURE__ */ BdApi.React.createElement(Modal$1, props, /* @__PURE__ */ BdApi.React.createElement(Block, {
			h: 780,
			relative: true
		}, /* @__PURE__ */ BdApi.React.createElement(Block, {
			h: 210,
			bg: "brand-primary"
		}), /* @__PURE__ */ BdApi.React.createElement(Icon, {
			absolute: true,
			size: 120,
			top: 145,
			left: 24,
			radius: "50%",
			color: "brand-primary",
			boxShadow: "0 0 0 8px var(--bap-background-primary)"
		}), /* @__PURE__ */ BdApi.React.createElement(Block, {
			px: 16,
			py: 22
		}, /* @__PURE__ */ BdApi.React.createElement(Flex, {
			justify: "flex-end",
			gap: 8,
			mb: 22
		}, /* @__PURE__ */ BdApi.React.createElement(Button, {
			width: 32,
			color: "text-primary"
		}), /* @__PURE__ */ BdApi.React.createElement(Button, { width: 120 })), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 124,
			height: 24,
			color: "text-heading"
		}), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 166,
			mt: 8
		}), /* @__PURE__ */ BdApi.React.createElement(Tabs, {
			tabs: [
				59,
				112,
				95
			],
			active: 0,
			mt: 34,
			mb: 18
		}), /* @__PURE__ */ BdApi.React.createElement(Text, { length: 162 }), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 76,
			height: 12,
			color: "text-heading",
			mt: 22,
			mb: 8
		}), /* @__PURE__ */ BdApi.React.createElement(Text, { length: 334 }), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 216,
			mt: 4
		}), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 128,
			height: 12,
			color: "text-heading",
			mt: 22,
			mb: 8
		}), /* @__PURE__ */ BdApi.React.createElement(Text, { length: 171 }), /* @__PURE__ */ BdApi.React.createElement(Text, {
			length: 92,
			mt: 4
		}))));
	}
	function Backdrop(props) {
		const layerRef = (0, react.useRef)();
		const [module] = useModule$1(ModuleKey_default.ModalsBackdrop);
		return /* @__PURE__ */ BdApi.React.createElement(PreviewTransition, {
			module,
			containerRef: layerRef,
			defaultLayoutStyles: false,
			...props
		}, /* @__PURE__ */ BdApi.React.createElement(FloatingLayer, {
			ref: layerRef,
			className: "BAP__backdropLayer"
		}, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BAP__backdrop" })));
	}
	function Modals() {
		const [, isActive] = useModule$1(ModuleKey_default.Modals);
		const [, isBackdropActive] = useModule$1(ModuleKey_default.ModalsBackdrop);
		const stage = useStages(2, isActive || isBackdropActive);
		if (!isActive && !isBackdropActive) return null;
		return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(Backdrop, { in: !!stage }), /* @__PURE__ */ BdApi.React.createElement(UserModal, { in: !!stage }));
	}
	css`.BAP__modalLayer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
}
.BAP__modalContainer {
    min-height: 0;
}
.BAP__modal {
    background-color: var(--bap-background-primary);
    border-radius: 8px;
    overflow: clip;
    width: 600px;
    min-height: 220px;
    pointer-events: all;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}
.BAP__backdropLayer {
    pointer-events: all;
}
.BAP__backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.7);
}``Preview: Modals`;
	//#endregion
	//#region shared/preview/assets/placeholders/main.png
	var main_default = "data:image/png;base64,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";
	//#endregion
	//#region shared/preview/assets/placeholders/settings.png
	var settings_default$1 = "data:image/png;base64,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";
	//#endregion
	//#region shared/preview/assets/placeholders/threadSidebarSwitch.png
	var threadSidebarSwitch_default = "data:image/png;base64,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";
	//#endregion
	//#region shared/preview/index.jsx
	var PREVIEW_WIDTH = 1280;
	function Preview({ id = null, modules = [], active = true, placeholder = false, pack = null, animation = null, dataKey = 0, className, style, ref, viewportRef = (0, react.useRef)(), preferences = { memberListShown: true }, onError = manager_default.registerAnimationError }) {
		const store = (0, react.useMemo)(() => new AnimationStore(), []);
		(0, react.useEffect)(() => {
			store.initialize();
			return () => store.shutdown();
		}, [store]);
		const module = (0, react.useMemo)(() => modules.find((m) => m.id === id), [id, modules]);
		const [data, setData] = (0, react.useState)(null);
		(0, react.useEffect)(() => {
			if (placeholder || !module || !pack || !animation) {
				setData(null);
				return;
			}
			const data = module.initializeAnimations(pack, animation);
			const error = data.enter.error || data.exit.error;
			if (error) onError(error);
			setData(data);
		}, [
			placeholder,
			module,
			pack,
			animation,
			dataKey
		]);
		const placeholderRef = (0, react.useRef)();
		const placeholderSrc = (0, react.useMemo)(() => {
			if (typeof placeholder === "string") return placeholder;
			switch (module?.id) {
				case ModuleKey_default.Settings: return settings_default$1;
				case ModuleKey_default.ThreadSidebarSwitch: return threadSidebarSwitch_default;
				default: return main_default;
			}
		}, [placeholder, module]);
		const layer = (0, react.useMemo)(() => {
			switch (module.id) {
				case ModuleKey_default.Settings: return /* @__PURE__ */ BdApi.React.createElement(Settings, null);
				default: return /* @__PURE__ */ BdApi.React.createElement(Main, null);
			}
		}, [module]);
		const serverListIconRefs = (0, react.useRef)([]);
		const userPanelActionRefs = (0, react.useRef)([]);
		const channelHeaderItemRefs = (0, react.useRef)([]);
		const memberListItemRefs = (0, react.useRef)([]);
		const [serverList, setServerList] = (0, react.useState)({});
		const [userPanel, setUserPanel] = (0, react.useState)({});
		const [memberList, setMemberList] = (0, react.useState)({});
		const [threadPopoutShown, setThreadPopoutShown] = (0, react.useState)(false);
		const [memberListShown, _setMemberListShown] = (0, react.useState)(id === ModuleKey_default.ThreadSidebar ? preferences.memberListShown : id !== ModuleKey_default.ThreadSidebarSwitch);
		const setMemberListShown = (value, force = false) => {
			if (value === preferences.memberListShown || force) _setMemberListShown(value);
		};
		const context = {
			store,
			id,
			modules,
			active,
			pack,
			animation,
			data,
			viewportRef,
			onError,
			serverListIconRefs,
			userPanelActionRefs,
			channelHeaderItemRefs,
			memberListItemRefs,
			serverList,
			setServerList,
			userPanel,
			setUserPanel,
			memberListShown,
			setMemberListShown,
			memberList,
			setMemberList,
			threadPopoutShown,
			setThreadPopoutShown
		};
		return /* @__PURE__ */ BdApi.React.createElement(PreviewContext, { value: context }, /* @__PURE__ */ BdApi.React.createElement("div", {
			ref,
			className: (0, clsx.default)("BAP__container", `BAP--${id}`, className),
			style
		}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, /* @__PURE__ */ BdApi.React.createElement(CSSTransition, {
			key: placeholder ? "placeholder" : "viewport",
			nodeRef: placeholder ? placeholderRef : viewportRef,
			classNames: placeholder ? "BAP__fade" : void 0,
			timeout: 400
		}, placeholder ? /* @__PURE__ */ BdApi.React.createElement("img", {
			ref: placeholderRef,
			src: placeholderSrc,
			className: "BAP__viewport"
		}) : /* @__PURE__ */ BdApi.React.createElement("div", {
			ref: viewportRef,
			className: "BAP__viewport"
		}, /* @__PURE__ */ BdApi.React.createElement(Layers, { layer }), /* @__PURE__ */ BdApi.React.createElement(FloatingLayerContainer, null, /* @__PURE__ */ BdApi.React.createElement(Modals, null), /* @__PURE__ */ BdApi.React.createElement(Tooltips, null), /* @__PURE__ */ BdApi.React.createElement(Popouts, null), /* @__PURE__ */ BdApi.React.createElement(ContextMenus, null)))))));
	}
	var preview_default = (0, react.memo)(Preview);
	css`.BAP__container {
    position: relative;
    overflow: clip;
    width: ${PREVIEW_WIDTH}px;
    height: ${720}px;
    contain: strict;
}
.BAP__viewport {
    --bap-background-primary: #202024;
    --bap-background-secondary: #1A1A1E;
    --bap-background-secondary-alt: #18181C;
    --bap-background-tertiary: #121214;
    --bap-background-surface-overlay: #242429;
    --bap-border-subtle: rgba(151, 151, 159, .12);
    --bap-text-primary: #3B3D42;
    --bap-text-heading: #505357;
    --bap-brand-primary: #5865F2;
    --bap-white: #FBFBFB;
    --bap-current: currentColor;

    position: absolute;
    inset: 0;
    isolation: isolate;
    font-size: 16px;
    color: var(--bap-text-primary);
    background-color: var(--bap-background-tertiary);
    overflow: clip;
    object-fit: cover;
}
img.BAP__viewport {
    z-index: 2;
}
.BAP__viewport > * {
    position: absolute;
    inset: 0;
}
.BAP__viewport * {
    border-color: var(--bap-border-subtle);
    border-style: solid;
    border-width: 0;
    box-sizing: content-box;
}

.BAP--messages .BAP__viewport {
    transform-origin: 63% bottom;
    scale: 1.35;
}
.BAP--membersSidebar .BAP__viewport {
    transform-origin: bottom right;
    scale: 1.05;
}
.BAP--tooltips .BAP__viewport {
    transform-origin: bottom left;
    scale: 2.8;
}
.BAP--channelList .BAP__viewport {
    transform-origin: left 66%;
    scale: 1.5;
}
.BAP--popouts .BAP__viewport {
    transform-origin: top right;
    scale: 1.3;
}
.BAP--contextMenu .BAP__viewport {
    transform-origin: 0 58%;
    scale: 1.45;
}

.BAP__fade-enter-active, .BAP__fade-exit-active {
    transition: opacity .4s;
}
.BAP__fade-enter, .BAP__fade-exit-active {
    opacity: 0;
}
.BAP__fade-enter-active {
    opacity: 1;
}``Preview`;
	//#endregion
	//#region src/settings/components/ButtonGroup.jsx
	function ButtonGroupItem({ children, tooltip, selected, disabled, className, onClick }) {
		const button = (props) => /* @__PURE__ */ BdApi.React.createElement(Clickable, {
			...props,
			tag: "button",
			className: (0, clsx.default)({
				"BA__buttonGroupItem": true,
				"BA__buttonGroupItem--selected": selected,
				"BA__buttonGroupItem--disabled": disabled
			}, className),
			onClick
		}, children);
		if (!tooltip) return button({});
		return /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, typeof tooltip === "string" ? { text: tooltip } : tooltip, button);
	}
	function ButtonGroup({ options, multiple = false, selected, onChange, className, itemClassName, size = "sm" }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("BA__buttonGroup", `BA__buttonGroup--${size}`, { "BA__buttonGroup--single": !multiple }, className) }, options.map((option) => /* @__PURE__ */ BdApi.React.createElement(ButtonGroupItem, {
			...option,
			key: option.value,
			className: (0, clsx.default)(itemClassName, option.className),
			selected: multiple ? option.selected : selected === option.value,
			onClick: multiple ? option.onClick : () => selected !== option.value && onChange(option.value),
			children: option.children ?? option.label
		})));
	}
	css`.BA__buttonGroup {
    --ba--button-group-border-radius: 4px;
    
    display: flex;
    border-radius: var(--ba--button-group-border-radius);
    height: 28px;
    box-sizing: border-box;
}

.BA__buttonGroupItem {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background-color: var(--input-background-default);
    border-style: solid;
    border-color: var(--input-border-default);
    border-top-width: 1px;
    border-bottom-width: 1px;
    color: var(--text-subtle);
    flex: 1;
    transition: background-color .1s, border-color .1s, color .1s;
}
.BA__buttonGroupItem:hover {
    background-color: var(--background-mod-subtle);
    border-color: var(--input-border-hover);
    color: var(--text-strong);
}
.BA__buttonGroupItem.BA__buttonGroupItem--disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}    

.BA__buttonGroup > .BA__buttonGroupItem {
    padding: 0 8px;
}
.BA__buttonGroup > .BA__buttonGroupItem:first-of-type {
    border-top-left-radius: var(--ba--button-group-border-radius);
    border-bottom-left-radius: var(--ba--button-group-border-radius);
    border-left-width: 1px;
}
.BA__buttonGroup > .BA__buttonGroupItem:last-of-type {
    border-top-right-radius: var(--ba--button-group-border-radius);
    border-bottom-right-radius: var(--ba--button-group-border-radius);
    border-right-width: 1px;
}

.BA__buttonGroup--md {
    --ba--button-group-border-radius: 8px;
    height: 36px;
}
.BA__buttonGroup--md > .BA__buttonGroupItem {
    padding: 0 12px;
}

.BA__buttonGroup--lg {
    --ba--button-group-border-radius: 8px;
    height: 42px;
}
.BA__buttonGroup--lg > .BA__buttonGroupItem {
    padding: 0 12px;
}

.BA__buttonGroupItem.BA__buttonGroupItem--selected {
    background-color: var(--brand-500);
    border-color: var(--brand-500);
    color: #FFFFFF;
}
.BA__buttonGroup.BA__buttonGroup--single .BA__buttonGroupItem.BA__buttonGroupItem--selected {
    cursor: default;
}``ButtonGroup`;
	//#endregion
	//#region src/components/icons/DoorEnterIcon.jsx
	function DoorEnterIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M9 12a1 1 0 0 1 1 1v2a1 1 0 1 1-2 0v-2a1 1 0 0 1 1-1Z"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M2.75 3.02A3 3 0 0 1 5 2h10a3 3 0 0 1 3 3v7.5a.5.5 0 0 1-.5.5H16a3 3 0 0 0-3 3v3.5a2.5 2.5 0 0 1-3.68 2.2l-5.8-3.09A3 3 0 0 1 2 16V5a3 3 0 0 1 .76-1.98Zm1.3 1.95A.04.04 0 0 0 4 5v11c0 .36.2.68.49.86l5.77 3.08a.5.5 0 0 0 .74-.44V8.02a.5.5 0 0 0-.32-.46l-6.63-2.6Z",
			clipRule: "evenodd"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M15 18.5V22a1 1 0 1 0 2 0v-3.59l4.3 4.3a1 1 0 0 0 1.4-1.42L18.42 17H22a1 1 0 1 0 0-2h-6a1 1 0 0 0-1 1v2.5Z"
		}));
	}
	//#endregion
	//#region src/components/icons/DoorExitIcon.jsx
	function DoorExitIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M9 12a1 1 0 0 1 1 1v2a1 1 0 1 1-2 0v-2a1 1 0 0 1 1-1Z"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M2.75 3.02A3 3 0 0 1 5 2h10a3 3 0 0 1 3 3v7.64c0 .44-.55.7-.95.55a3 3 0 0 0-3.17 4.93l.02.03a.5.5 0 0 1-.35.85h-.05a.5.5 0 0 0-.5.5 2.5 2.5 0 0 1-3.68 2.2l-5.8-3.09A3 3 0 0 1 2 16V5a3 3 0 0 1 .76-1.98Zm1.3 1.95A.04.04 0 0 0 4 5v11c0 .36.2.68.49.86l5.77 3.08a.5.5 0 0 0 .74-.44V8.02a.5.5 0 0 0-.32-.46l-6.63-2.6Z",
			clipRule: "evenodd"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M15.3 16.7a1 1 0 0 1 1.4-1.4l4.3 4.29V16a1 1 0 1 1 2 0v6a1 1 0 0 1-1 1h-6a1 1 0 1 1 0-2h3.59l-4.3-4.3Z"
		}));
	}
	//#endregion
	//#region src/settings/components/animation/AnimationToggleControl.jsx
	function useToggleHint() {
		const [hintShown, setHintShown] = (0, react.useState)(false);
		const showHint = (0, react.useCallback)(() => setHintShown(true), [setHintShown]);
		const hideHint = (0, react.useCallback)(() => setHintShown(false), [setHintShown]);
		return {
			hintShown,
			setHintShown,
			showHint,
			hideHint,
			hintProps: (0, react.useCallback)((optionDisabled, text = Messages.SELECT_ANIMATION_TO_ENABLE) => {
				if (!optionDisabled) return {};
				return Object.assign({ onClick: stop(showHint) }, hintShown ? { tooltip: {
					text,
					onTooltipHide: hideHint
				} } : {});
			}, [
				hintShown,
				showHint,
				hideHint
			])
		};
	}
	function AnimationToggleControl({ enter, exit, setEnter, setExit }) {
		const module = (0, react.use)(ModuleContext);
		const isAdvanced = useAdvancedMode(enter !== exit);
		const { hintProps } = useToggleHint();
		const options = (0, react.useMemo)(() => {
			if (module.meta?.type === ModuleType_default.Switch && !isAdvanced) return [{
				value: "enabled",
				selected: enter && exit,
				disabled: !setEnter || !setExit,
				onClick: stop(() => {
					const value = !(enter && exit);
					setEnter(value);
					setExit(value);
				}),
				children: /* @__PURE__ */ BdApi.React.createElement(CheckIcon, {
					size: "sm",
					color: "currentColor"
				}),
				...hintProps(!setEnter || !setExit)
			}];
			return [{
				value: "enter",
				tooltip: "Enter",
				selected: enter,
				disabled: !setEnter,
				onClick: stop(() => setEnter(!enter)),
				children: /* @__PURE__ */ BdApi.React.createElement(DoorEnterIcon, {
					size: "custom",
					width: 18,
					height: 18,
					color: "currentColor"
				}),
				...hintProps(!setEnter)
			}, {
				value: "exit",
				tooltip: "Exit",
				selected: exit,
				disabled: !setExit,
				onClick: stop(() => setExit(!exit)),
				children: /* @__PURE__ */ BdApi.React.createElement(DoorExitIcon, {
					size: "custom",
					width: 18,
					height: 18,
					color: "currentColor"
				}),
				...hintProps(!setExit)
			}];
		}, [
			enter,
			exit,
			setEnter,
			setExit,
			hintProps,
			module.meta?.type,
			isAdvanced
		]);
		return /* @__PURE__ */ BdApi.React.createElement(ButtonGroup, {
			size: "md",
			itemClassName: "BA__animationToggleGroupItem",
			options,
			multiple: true
		});
	}
	css`.BA__animationToggleGroupItem {
    border: none;
    background-color: transparent;
    border-radius: 0 !important;
}
.BA__animationToggleGroupItem:last-of-type {
    border-bottom-right-radius: 8px !important;
}``AnimationToggleControl`;
	//#endregion
	//#region src/components/icons/SettingsIcon.jsx
	function SettingsIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M10.56 1.1c-.46.05-.7.53-.64.98.18 1.16-.19 2.2-.98 2.53-.8.33-1.79-.15-2.49-1.1-.27-.36-.78-.52-1.14-.24-.77.59-1.45 1.27-2.04 2.04-.28.36-.12.87.24 1.14.96.7 1.43 1.7 1.1 2.49-.33.8-1.37 1.16-2.53.98-.45-.07-.93.18-.99.64a11.1 11.1 0 0 0 0 2.88c.06.46.54.7.99.64 1.16-.18 2.2.19 2.53.98.33.8-.14 1.79-1.1 2.49-.36.27-.52.78-.24 1.14.59.77 1.27 1.45 2.04 2.04.36.28.87.12 1.14-.24.7-.95 1.7-1.43 2.49-1.1.8.33 1.16 1.37.98 2.53-.07.45.18.93.64.99a11.1 11.1 0 0 0 2.88 0c.46-.06.7-.54.64-.99-.18-1.16.19-2.2.98-2.53.8-.33 1.79.14 2.49 1.1.27.36.78.52 1.14.24.77-.59 1.45-1.27 2.04-2.04.28-.36.12-.87-.24-1.14-.96-.7-1.43-1.7-1.1-2.49.33-.8 1.37-1.16 2.53-.98.45.07.93-.18.99-.64a11.1 11.1 0 0 0 0-2.88c-.06-.46-.54-.7-.99-.64-1.16.18-2.2-.19-2.53-.98-.33-.8.14-1.79 1.1-2.49.36-.27.52-.78.24-1.14a11.07 11.07 0 0 0-2.04-2.04c-.36-.28-.87-.12-1.14.24-.7.96-1.7 1.43-2.49 1.1-.8-.33-1.16-1.37-.98-2.53.07-.45-.18-.93-.64-.99a11.1 11.1 0 0 0-2.88 0ZM16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z",
			clipRule: "evenodd"
		}));
	}
	//#endregion
	//#region src/components/icons/CollapseListIcon.jsx
	function CollapseListIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M7.3 2.3a1 1 0 0 1 1.4 0L12 5.58l3.3-3.3a1 1 0 1 1 1.4 1.42l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.42ZM2 12a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1ZM8.7 21.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L12 18.42l-3.3 3.3Z",
			clipRule: "evenodd"
		}));
	}
	//#endregion
	//#region src/settings/components/animation/AnimationCardControls.jsx
	function AnimationCardControls({ hasSettings, hasAccordions, expanded, setExpanded, enter, exit, setEnter, setExit, errors = [], forceOpenSettingsTooltip = false }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__animationCardControls" }, /* @__PURE__ */ BdApi.React.createElement("div", {
			className: "BA__animationCardControlsGroup",
			...useMovable("controls")
		}, /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: {
				text: hasSettings ? "Settings" : "No settings available",
				forceOpen: forceOpenSettingsTooltip
			},
			disabled: !hasSettings,
			active: expanded === "settings",
			onClick: stop(() => setExpanded("settings"))
		}, /* @__PURE__ */ BdApi.React.createElement(SettingsIcon, {
			size: "xs",
			color: "currentColor"
		})), hasAccordions && /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "Smooth Expand/Collapse",
			active: expanded === "accordions",
			onClick: stop(() => setExpanded("accordions"))
		}, /* @__PURE__ */ BdApi.React.createElement(CollapseListIcon, {
			size: "xs",
			color: "currentColor"
		})), !!errors.length && /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "An error occurred",
			onClick: stop(() => manager_default.showModal(errors))
		}, /* @__PURE__ */ BdApi.React.createElement(CircleWarningIcon, {
			size: "xs",
			color: colors.STATUS_DANGER
		}))), /* @__PURE__ */ BdApi.React.createElement("div", {
			className: "BA__animationCardControlsToggle",
			...useMovable("toggle")
		}, /* @__PURE__ */ BdApi.React.createElement(AnimationToggleControl, {
			enter,
			exit,
			setEnter,
			setExit
		})));
	}
	css`.BA__animationCardControls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 36px;
}

.BA__animationCardControlsGroup {
    display: flex;
    gap: 8px;
    padding-left: 10px;
}``AnimationCardControls`;
	//#endregion
	//#region src/hooks/useLatest.js
	function useLatest(value) {
		const ref = (0, react.useRef)(value);
		(0, react.useEffect)(() => {
			ref.current = value;
		}, [value]);
		return ref;
	}
	//#endregion
	//#region src/hooks/useCustomCompareEffect.js
	function useCustomCompareEffect(effect, deps, depsEqual) {
		const ref = (0, react.useRef)(void 0);
		const forceUpdate = useUpdate();
		if (!ref.current) ref.current = deps;
		(0, react.useLayoutEffect)(() => {
			if (!depsEqual(deps, ref.current)) {
				ref.current = deps;
				forceUpdate();
			}
		});
		(0, react.useEffect)(effect, ref.current);
	}
	//#endregion
	//#region src/hooks/useDeepCompareEffect.js
	function useDeepCompareEffect(effect, deps) {
		useCustomCompareEffect(effect, deps, isEqual);
	}
	//#endregion
	//#region shared/utils/domTarget.js
	function getTargetElement(target, defaultElement = void 0) {
		if (!target) return defaultElement;
		if (typeof target === "function") return target();
		if ("current" in target) return target.current;
		return target;
	}
	//#endregion
	//#region shared/utils/browser.js
	function on(obj, ...args) {
		if (obj && obj.addEventListener) obj.addEventListener(...args);
	}
	function off(obj, ...args) {
		if (obj && obj.removeEventListener) obj.removeEventListener(...args);
	}
	//#endregion
	//#region src/hooks/useEventListener.js
	function useEventListener(eventName, handler, element, options) {
		const savedHandler = useLatest(handler);
		useDeepCompareEffect(() => {
			const targetElement = getTargetElement(element, window);
			if (!(targetElement && targetElement.addEventListener)) return;
			const eventListener = (event) => savedHandler.current(event);
			on(targetElement, eventName, eventListener, options);
			return () => {
				if (!(targetElement && targetElement.removeEventListener)) return;
				off(targetElement, eventName, eventListener);
			};
		}, [
			eventName,
			element,
			options
		]);
	}
	//#endregion
	//#region src/hooks/useHover.js
	function useHover(target) {
		const [hovered, setHovered] = (0, react.useState)(false);
		const onMouseEnter = (0, react.useCallback)(() => setHovered(true), []);
		const onMouseLeave = (0, react.useCallback)(() => setHovered(false), []);
		useEventListener("mouseenter", onMouseEnter, target);
		useEventListener("mouseleave", onMouseLeave, target);
		return hovered;
	}
	//#endregion
	//#region builtin:esm-external-require-react
	var require_builtin_esm_external_require_react = /* @__PURE__ */ __commonJSMin(((exports, module) => {
		module.exports = { ...react };
	}));
	//#endregion
	//#region node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.1.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
	/**
	* @license React
	* use-sync-external-store-shim.production.js
	*
	* Copyright (c) Meta Platforms, Inc. and affiliates.
	*
	* This source code is licensed under the MIT license found in the
	* LICENSE file in the root directory of this source tree.
	*/
	var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJSMin(((exports) => {
		var React = require_builtin_esm_external_require_react();
		function is(x, y) {
			return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
		}
		var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
		function useSyncExternalStore$2(subscribe, getSnapshot) {
			var value = getSnapshot(), _useState = useState({ inst: {
				value,
				getSnapshot
			} }), inst = _useState[0].inst, forceUpdate = _useState[1];
			useLayoutEffect(function() {
				inst.value = value;
				inst.getSnapshot = getSnapshot;
				checkIfSnapshotChanged(inst) && forceUpdate({ inst });
			}, [
				subscribe,
				value,
				getSnapshot
			]);
			useEffect(function() {
				checkIfSnapshotChanged(inst) && forceUpdate({ inst });
				return subscribe(function() {
					checkIfSnapshotChanged(inst) && forceUpdate({ inst });
				});
			}, [subscribe]);
			useDebugValue(value);
			return value;
		}
		function checkIfSnapshotChanged(inst) {
			var latestGetSnapshot = inst.getSnapshot;
			inst = inst.value;
			try {
				var nextValue = latestGetSnapshot();
				return !objectIs(inst, nextValue);
			} catch (error) {
				return !0;
			}
		}
		function useSyncExternalStore$1(subscribe, getSnapshot) {
			return getSnapshot();
		}
		var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
		exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
	}));
	//#endregion
	//#region node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.1.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
	/**
	* @license React
	* use-sync-external-store-shim.development.js
	*
	* Copyright (c) Meta Platforms, Inc. and affiliates.
	*
	* This source code is licensed under the MIT license found in the
	* LICENSE file in the root directory of this source tree.
	*/
	var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJSMin(((exports) => {
		"production" !== process.env.NODE_ENV && (function() {
			function is(x, y) {
				return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
			}
			function useSyncExternalStore$2(subscribe, getSnapshot) {
				didWarnOld18Alpha || void 0 === React.startTransition || (didWarnOld18Alpha = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
				var value = getSnapshot();
				if (!didWarnUncachedGetSnapshot) {
					var cachedValue = getSnapshot();
					objectIs(value, cachedValue) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), didWarnUncachedGetSnapshot = !0);
				}
				cachedValue = useState({ inst: {
					value,
					getSnapshot
				} });
				var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
				useLayoutEffect(function() {
					inst.value = value;
					inst.getSnapshot = getSnapshot;
					checkIfSnapshotChanged(inst) && forceUpdate({ inst });
				}, [
					subscribe,
					value,
					getSnapshot
				]);
				useEffect(function() {
					checkIfSnapshotChanged(inst) && forceUpdate({ inst });
					return subscribe(function() {
						checkIfSnapshotChanged(inst) && forceUpdate({ inst });
					});
				}, [subscribe]);
				useDebugValue(value);
				return value;
			}
			function checkIfSnapshotChanged(inst) {
				var latestGetSnapshot = inst.getSnapshot;
				inst = inst.value;
				try {
					var nextValue = latestGetSnapshot();
					return !objectIs(inst, nextValue);
				} catch (error) {
					return !0;
				}
			}
			function useSyncExternalStore$1(subscribe, getSnapshot) {
				return getSnapshot();
			}
			"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
			var React = require_builtin_esm_external_require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue, didWarnOld18Alpha = !1, didWarnUncachedGetSnapshot = !1, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
			exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
			"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
		})();
	}));
	//#endregion
	//#region src/hooks/useWindowSize.js
	var import_shim = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
		if (process.env.NODE_ENV === "production") module.exports = require_use_sync_external_store_shim_production();
		else module.exports = require_use_sync_external_store_shim_development();
	})))();
	function subscribe(callback) {
		window.addEventListener("resize", callback);
		return () => {
			window.removeEventListener("resize", callback);
		};
	}
	function useWindowSize() {
		const stateDependencies = (0, react.useRef)({}).current;
		const previous = (0, react.useRef)({
			width: 0,
			height: 0
		});
		const isEqual = (prev, current) => {
			for (const t in stateDependencies) if (current[t] !== prev[t]) return false;
			return true;
		};
		const cached = (0, import_shim.useSyncExternalStore)(subscribe, () => {
			const data = {
				width: window.innerWidth,
				height: window.innerHeight
			};
			if (!isEqual(previous.current, data)) {
				previous.current = data;
				return data;
			}
			return previous.current;
		}, () => {
			return previous.current;
		});
		return {
			get width() {
				stateDependencies.width = true;
				return cached.width;
			},
			get height() {
				stateDependencies.height = true;
				return cached.height;
			}
		};
	}
	//#endregion
	//#region src/hooks/useConfig.js
	function useConfig() {
		useEmitterEffect(Events_default.SettingsChanged);
		return {
			config: Config_default.current,
			onChange: (0, react.useCallback)(() => Emitter_default.emit(Events_default.SettingsChanged), []),
			save: () => Config_default.save(),
			load: () => Config_default.load()
		};
	}
	//#endregion
	//#region src/settings/components/Hint.jsx
	function Hint({ href, onClick, ...props }) {
		const { config } = useConfig();
		if (config.general.disableHints) return null;
		return /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			onClick: href ? () => handleClick({ href }) : () => {},
			...props
		}, /* @__PURE__ */ BdApi.React.createElement(CircleQuestionIcon, {
			size: "xs",
			color: "currentColor"
		}));
	}
	//#endregion
	//#region src/settings/components/controls/SettingControl.jsx
	function SettingControl({ label, doc, onReset, children }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__settingControl" }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__settingControlHeader",
			variant: "text-md/semibold",
			color: "text-strong"
		}, /* @__PURE__ */ BdApi.React.createElement("span", null, label), doc && /* @__PURE__ */ BdApi.React.createElement(Hint, { href: Documentation.getSettingUrl(doc) }), onReset && /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			className: "BA__settingControlReset",
			tooltip: "Reset",
			onClick: onReset
		}, /* @__PURE__ */ BdApi.React.createElement(RedoIcon, {
			size: "xs",
			color: "currentColor"
		}))), children);
	}
	css`.BA__settingControl {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.BA__settingControlHeader {
    display: flex;
    align-items: center;
    gap: 4px;
}
.BA__settingControlReset {
    margin-left: auto;
}``SettingControl`;
	//#endregion
	//#region shared/utils/general.js
	var range = (start, stop, step) => Array.from({ length: (stop - start) / step + 1 }, (_, i) => start + i * step);
	//#endregion
	//#region src/utils/findInReactTree.js
	function findInReactTree(tree, searchFilter) {
		return Utils.findInTree(tree, searchFilter, { walkable: ["props", "children"] });
	}
	var byClassName = (className) => (m) => m?.props?.className?.includes(className);
	//#endregion
	//#region src/components/Slider.jsx
	var Slider = class extends Slider$1 {
		static getDerivedStateFromProps(props, state) {
			const original = super.getDerivedStateFromProps(props, state);
			const derived = "value" in props && props.value !== state.valueProp ? {
				value: props.value,
				valueProp: props.value
			} : null;
			if (!original && !derived) return null;
			return Object.assign({}, original, derived);
		}
		render() {
			const { forceShowBubble = false, onValueRender } = this.props;
			const value = super.render();
			if (forceShowBubble) TinyPatcher.after(value.props, "children", (self, args, value) => {
				TinyPatcher.after(value.props, "children", (self, args, value) => {
					const tooltip = findInReactTree(value, (m) => "__unsupportedReactNodeAsText" in (m?.props ?? {}));
					if (!tooltip) return;
					tooltip.props["__unsupportedReactNodeAsText"] = onValueRender(this.state.value);
				});
			});
			return value;
		}
		componentDidUpdate(...args) {
			super.componentDidUpdate?.(...args);
			if (this.props.stickToMarkers) {
				const value = this.unscaleValue(this.state.markerPositions[this.state.newClosestIndex ?? this.state.closestMarkerIndex]);
				if (Math.abs(this.state.value - value) > 1e-6) this.setState({ value });
			}
		}
	};
	//#endregion
	//#region src/settings/components/DurationSlider.jsx
	function DurationSlider({ from, to, dense = to - from <= 2e3, step = dense ? 50 : 100, ...props }) {
		const markers = range(from - from % step, to, step);
		const onMarkerRender = (v) => v % 500 === 0 || [from, to].includes(v) ? (v / 1e3).toFixed(1) + "s" : to - from <= 3e3 && v % 100 === 0 ? "" : null;
		const onValueRender = (value) => (value / 1e3).toFixed(dense ? 2 : 1) + "s";
		return /* @__PURE__ */ BdApi.React.createElement(Slider, {
			minValue: from,
			maxValue: to,
			markers,
			onMarkerRender,
			stickToMarkers: true,
			forceShowBubble: true,
			onValueRender,
			...props
		});
	}
	//#endregion
	//#region src/settings/components/controls/DurationControl.jsx
	function DurationControl({ animation, value, onChange, label = "Duration", onReset, ...props }) {
		const { to, from } = animation.settings[AnimationSetting_default.Duration];
		return /* @__PURE__ */ BdApi.React.createElement(SettingControl, {
			label,
			doc: Documentation.Setting.Duration,
			onReset
		}, /* @__PURE__ */ BdApi.React.createElement(DurationSlider, {
			...props,
			from,
			to,
			initialValue: value,
			onValueChange: onChange
		}));
	}
	//#endregion
	//#region src/settings/components/controls/EasingControl.jsx
	function EasingField({ label, children }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__easingField" }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__easingFieldLabel",
			variant: "text-xs/medium",
			color: "text-muted"
		}, label), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__easingFieldControl" }, children));
	}
	function EasingValueSlider({ options, value, onChange, ...props }) {
		const { min, max, default: defaultValue, fractionDigits = 0 } = options;
		const [draftValue, setDraftValue] = (0, react.useState)(value.toFixed(fractionDigits));
		(0, react.useEffect)(() => setDraftValue(value.toFixed(fractionDigits)), [value]);
		function onSubmit() {
			let value = Number(parseFloat(draftValue).toFixed(fractionDigits));
			value = Math.max(min, Math.min(max, !isNaN(value) ? value : defaultValue));
			onChange(value);
			setDraftValue(value.toFixed(fractionDigits));
		}
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__easingValueSliderWrapper" }, /* @__PURE__ */ BdApi.React.createElement(Slider, {
			className: "BA__easingValueSlider",
			minValue: min,
			maxValue: max,
			onValueRender: (value) => value.toFixed(fractionDigits),
			value,
			initialValue: value,
			asValueChanges: (value) => onChange(Number(value.toFixed(fractionDigits))),
			...props
		}), /* @__PURE__ */ BdApi.React.createElement("form", {
			className: "BA__easingValueSliderInput",
			onSubmit: prevent(onSubmit)
		}, /* @__PURE__ */ BdApi.React.createElement(TextInput, {
			value: draftValue,
			onChange: setDraftValue,
			onBlur: onSubmit
		})));
	}
	function buildEasingValueSliders(type, items, { easing }) {
		return items.map(([key, label]) => /* @__PURE__ */ BdApi.React.createElement(EasingField, { label }, /* @__PURE__ */ BdApi.React.createElement(EasingValueSlider, {
			options: easingValues[type][key],
			value: easing[key],
			onChange: (value) => easing[key] = value
		})));
	}
	function EasingBezierSelect({ value, onChange }) {
		return /* @__PURE__ */ BdApi.React.createElement(EasingField, { label: "Bezier" }, /* @__PURE__ */ BdApi.React.createElement(SingleSelect, {
			options: easingBeziers,
			value,
			onChange
		}));
	}
	function EasingEaseControl({ easing }) {
		return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(EasingBezierSelect, {
			value: easing.bezier,
			onChange: (bezier) => easing.bezier = bezier
		}), /* @__PURE__ */ BdApi.React.createElement(EasingField, { label: "Style" }, /* @__PURE__ */ BdApi.React.createElement(SingleSelect, {
			options: easingStyles,
			value: easing.style,
			onChange: (style) => easing.style = style
		})));
	}
	function EasingBackControl({ easing }) {
		return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(EasingBezierSelect, {
			value: easing.bezier,
			onChange: (bezier) => easing.bezier = bezier
		}), buildEasingValueSliders(EasingType.Back, [["overshoot", "Overshoot"]], { easing }));
	}
	function EasingElasticControl({ easing }) {
		return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(EasingBezierSelect, {
			value: easing.bezier,
			onChange: (bezier) => easing.bezier = bezier
		}), buildEasingValueSliders(EasingType.Elastic, [["amplitude", "Amplitude"], ["period", "Period"]], { easing }));
	}
	function EasingStepsControl({ easing }) {
		return /* @__PURE__ */ BdApi.React.createElement(EasingField, { label: "Amount" }, /* @__PURE__ */ BdApi.React.createElement(EasingValueSlider, {
			options: easingValues[EasingType.Steps]["amount"],
			value: easing.amount,
			onChange: (amount) => easing.amount = Math.round(amount)
		}));
	}
	function EasingControl({ value, onChange, onReset }) {
		const easing = (0, react.useMemo)(() => new Proxy(value, { set(obj, key, value) {
			onChange({
				...obj,
				[key]: value
			});
			return true;
		} }), [value, onChange]);
		const AdditionalControl = (0, react.useMemo)(() => ({
			[EasingType.Ease]: EasingEaseControl,
			[EasingType.Back]: EasingBackControl,
			[EasingType.Elastic]: EasingElasticControl,
			[EasingType.Steps]: EasingStepsControl
		})[easing.type] ?? null, [easing.type]);
		return /* @__PURE__ */ BdApi.React.createElement(SettingControl, {
			label: "Easing",
			doc: Documentation.Setting.Easing,
			onReset
		}, /* @__PURE__ */ BdApi.React.createElement(SingleSelect, {
			options: easingTypes,
			value: easing.type,
			onChange: (type) => onChange({ type })
		}), AdditionalControl && /* @__PURE__ */ BdApi.React.createElement(AdditionalControl, { easing }));
	}
	css`.BA__easingField {
    display: flex;
    align-items: center;
    gap: 16px;
}
.BA__easingFieldLabel {
    text-transform: uppercase;
    flex-shrink: 0;
    width: 70px;
}
.BA__easingFieldControl {
    flex-grow: 1;
}

.BA__easingValueSliderWrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}
.BA__easingValueSlider {
    flex-grow: 1;
}
.BA__easingValueSliderInput {
    width: 60px;
    flex-shrink: 0;
}``EasingControl`;
	//#endregion
	//#region src/settings/components/controls/VariantControl.jsx
	function VariantControl({ animation, value, onChange, defaultValue, onReset }) {
		const options = animation.settings[AnimationSetting_default.Variant].map((o) => ({
			label: o.name,
			value: o.key
		}));
		return /* @__PURE__ */ BdApi.React.createElement(SettingControl, {
			label: "Variant",
			doc: Documentation.Setting.Variant,
			onReset
		}, /* @__PURE__ */ BdApi.React.createElement(SingleSelect, {
			placeholder: defaultValue,
			options,
			value,
			onChange
		}));
	}
	//#endregion
	//#region shared/data/positions.js
	var positions = [
		{
			value: Auto(Position_default).Auto,
			label: "Auto"
		},
		{
			value: Position_default.TopLeft,
			label: "Top Left"
		},
		{
			value: Position_default.Top,
			label: "Top"
		},
		{
			value: Position_default.TopRight,
			label: "Top Right"
		},
		{
			value: Position_default.Left,
			label: "Left"
		},
		{
			value: Position_default.Center,
			label: "Center"
		},
		{
			value: Position_default.Right,
			label: "Right"
		},
		{
			value: Position_default.BottomLeft,
			label: "Bottom Left"
		},
		{
			value: Position_default.Bottom,
			label: "Bottom"
		},
		{
			value: Position_default.BottomRight,
			label: "Bottom Right"
		}
	];
	//#endregion
	//#region src/settings/components/controls/PositionControl.jsx
	function PositionPreserveControl({ value, onChange, label = "Preserve" }) {
		return /* @__PURE__ */ BdApi.React.createElement(Checkbox, {
			value,
			onChange: (_, value) => onChange(value),
			type: CheckboxTypes.INVERTED
		}, /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-sm/normal" }, label));
	}
	function PositionControl({ module, animation, value, onChange, defaultValue, preserve, onPreserveChange, onReset }) {
		const options = positions.filter((p) => p.value === Auto() ? module?.supportsAuto(animation, AnimationSetting_default.Position) : animation.settings[AnimationSetting_default.Position] === true || animation.settings[AnimationSetting_default.Position].includes(p.value));
		const auto = module?.getSupportsAuto(AnimationSetting_default.Position);
		const additionalControl = value === Auto(Position_default).Auto ? { [PositionAutoType_default.Precise]: auto?.options.preservable && /* @__PURE__ */ BdApi.React.createElement(PositionPreserveControl, {
			value: preserve,
			onChange: onPreserveChange,
			label: auto?.options.preserveLabel
		}) }[auto?.type] : null;
		return /* @__PURE__ */ BdApi.React.createElement(SettingControl, {
			label: "Position",
			doc: Documentation.Setting.Position,
			onReset
		}, /* @__PURE__ */ BdApi.React.createElement(SingleSelect, {
			placeholder: defaultValue,
			options,
			value,
			onChange
		}), additionalControl);
	}
	//#endregion
	//#region shared/data/directions.js
	var directions = [
		{
			value: Auto(Direction_default).Auto,
			label: "Auto"
		},
		{
			value: Direction_default.Upwards,
			label: "Upwards"
		},
		{
			value: Direction_default.Downwards,
			label: "Downwards"
		},
		{
			value: Direction_default.Leftwards,
			label: "Leftwards"
		},
		{
			value: Direction_default.Rightwards,
			label: "Rightwards"
		},
		{
			value: Direction_default.Forwards,
			label: "Forwards"
		},
		{
			value: Direction_default.Backwards,
			label: "Backwards"
		}
	];
	//#endregion
	//#region shared/data/directionAxes.js
	var directionAxes = [
		{
			value: Axis_default.Y,
			name: "Vertical",
			desc: "Automatically choose between Upwards and Downwards"
		},
		{
			value: Axis_default.X,
			name: "Horizontal",
			desc: "Automatically choose between Leftwards and Rightwards"
		},
		{
			value: Axis_default.Z,
			name: "Depth",
			desc: "Automatically choose between Forwards and Backwards"
		}
	];
	//#endregion
	//#region shared/data/directionAnchorOptions.js
	var directionAnchorOptions = [{
		value: false,
		name: "Away",
		desc: "Move away from the anchor"
	}, {
		value: true,
		name: "Towards",
		desc: "Move towards the anchor"
	}];
	//#endregion
	//#region src/components/icons/HorizontalIcon.jsx
	function HorizontalIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: "none",
			stroke: typeof color === "string" ? color : color?.css,
			strokeLinecap: "round",
			strokeLinejoin: "round",
			strokeWidth: "2",
			d: "M3 12h18M3 12l3 3m-3-3l3-3m15 3l-3-3m3 3l-3 3"
		}));
	}
	//#endregion
	//#region src/components/icons/VerticalIcon.jsx
	function VerticalIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: "none",
			stroke: typeof color === "string" ? color : color?.css,
			strokeLinecap: "round",
			strokeLinejoin: "round",
			strokeWidth: "2",
			d: "M12 21V3m0 18l3-3m-3 3l-3-3m3-15L9 6m3-3l3 3"
		}));
	}
	//#endregion
	//#region src/components/icons/DepthIcon.jsx
	function DepthIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			strokeWidth: "2",
			d: "M12,22C12,22,12,22,12,22L12,22c-0.5,0-0.9-0.1-1.2-0.2c-0.4-0.2-0.7-0.4-1-0.7l-6.6-6.9c-0.6-0.7-0.2-1.6,0.9-2.2\n	c1-0.5,2.4-0.5,3,0l2.5,2l1.2-10.7L9.3,3.7C8.7,3.9,8,3.9,7.6,3.7C7.2,3.5,7.3,3.3,7.8,3.1l3.5-1c0.1,0,0.2-0.1,0.3-0.1\n	c0.1,0,0.2,0,0.4,0l0,0c0,0,0,0,0,0l0,0c0.1,0,0.3,0,0.4,0c0.1,0,0.2,0,0.3,0.1l3.5,1c0.5,0.2,0.6,0.4,0.2,0.6\n	c-0.4,0.2-1.2,0.2-1.7,0l-1.6-0.5l1.2,10.7l2.5-2c0.7-0.5,2-0.5,3,0c1.1,0.6,1.6,1.5,0.9,2.2l-6.6,6.9c-0.3,0.3-0.6,0.5-1,0.7\n	C12.9,21.9,12.5,22,12,22L12,22C12,22,12,22,12,22z"
		}));
	}
	//#endregion
	//#region src/components/icons/RepeatIcon.jsx
	function RepeatIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("g", {
			fill: "none",
			stroke: typeof color === "string" ? color : color?.css,
			strokeLinecap: "round",
			strokeLinejoin: "round",
			strokeWidth: "2"
		}, /* @__PURE__ */ BdApi.React.createElement("path", { d: "m17 2l4 4l-4 4" }), /* @__PURE__ */ BdApi.React.createElement("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14M7 22l-4-4l4-4" }), /* @__PURE__ */ BdApi.React.createElement("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })));
	}
	//#endregion
	//#region src/components/icons/ArrowLeftToLineIcon.jsx
	function ArrowLeftToLineIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: "none",
			stroke: typeof color === "string" ? color : color?.css,
			strokeLinecap: "round",
			strokeLinejoin: "round",
			strokeWidth: "2",
			d: "M3 19V5m10 1l-6 6l6 6m-6-6h14"
		}));
	}
	//#endregion
	//#region src/components/icons/ArrowRightFromLineIcon.jsx
	function ArrowRightFromLineIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: "none",
			stroke: typeof color === "string" ? color : color?.css,
			strokeLinecap: "round",
			strokeLinejoin: "round",
			strokeWidth: "2",
			d: "M3 5v14m18-7H7m8 6l6-6l-6-6"
		}));
	}
	//#endregion
	//#region src/settings/components/controls/DirectionControl.jsx
	function getAxisIcon(axis) {
		switch (axis) {
			case Axis_default.Y: return /* @__PURE__ */ BdApi.React.createElement(VerticalIcon, { color: "currentColor" });
			case Axis_default.X: return /* @__PURE__ */ BdApi.React.createElement(HorizontalIcon, { color: "currentColor" });
			case Axis_default.Z: return /* @__PURE__ */ BdApi.React.createElement(DepthIcon, { color: "currentColor" });
		}
	}
	function getAnchorIcon(isTowards) {
		return isTowards ? /* @__PURE__ */ BdApi.React.createElement(ArrowLeftToLineIcon, { color: "currentColor" }) : /* @__PURE__ */ BdApi.React.createElement(ArrowRightFromLineIcon, { color: "currentColor" });
	}
	function DirectionAxisControl({ animation, value, onChange, reverse, onReverseChange }) {
		const options = directionAxes.filter((a) => animation.settings.direction === true || getDirectionsByAxis(a.value).every((d) => animation.settings.direction.includes(d))).map((option) => ({
			value: option.value,
			children: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, getAxisIcon(option.value), /* @__PURE__ */ BdApi.React.createElement("span", null, option.name))
		}));
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__directionAxisControl" }, /* @__PURE__ */ BdApi.React.createElement(ButtonGroup, {
			className: "BA__directionAxisControlSelect",
			size: "lg",
			options,
			selected: value,
			onChange
		}), /* @__PURE__ */ BdApi.React.createElement(ButtonGroup, {
			className: "BA__directionAxisControlReverse",
			size: "lg",
			multiple: true,
			options: [{
				children: /* @__PURE__ */ BdApi.React.createElement(RepeatIcon, { color: "currentColor" }),
				tooltip: "Reverse",
				selected: reverse,
				onClick: () => onReverseChange(!reverse)
			}]
		}));
	}
	function DirectionAnchorControl({ value, onChange }) {
		const options = directionAnchorOptions.map((option) => ({
			value: option.value,
			children: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, getAnchorIcon(option.value), /* @__PURE__ */ BdApi.React.createElement("span", null, option.name))
		}));
		return /* @__PURE__ */ BdApi.React.createElement(ButtonGroup, {
			size: "lg",
			options,
			selected: value,
			onChange
		});
	}
	function DirectionControl({ module, animation, value, onChange, defaultValue, axis, onAxisChange, reverse, onReverseChange, towards, onTowardsChange, onReset }) {
		const options = directions.filter((d) => d.value === Auto() ? module?.supportsAuto(animation, AnimationSetting_default.Direction) : animation.settings[AnimationSetting_default.Direction] === true || animation.settings[AnimationSetting_default.Direction].includes(d.value));
		const additionalControl = value === Auto(Direction_default).Auto ? {
			[DirectionAutoType_default.Alternate]: /* @__PURE__ */ BdApi.React.createElement(DirectionAxisControl, {
				animation,
				value: axis,
				onChange: onAxisChange,
				reverse,
				onReverseChange
			}),
			[DirectionAutoType_default.Anchor]: /* @__PURE__ */ BdApi.React.createElement(DirectionAnchorControl, {
				value: towards,
				onChange: onTowardsChange
			})
		}[module?.getSupportsAuto(AnimationSetting_default.Direction).type] : null;
		return /* @__PURE__ */ BdApi.React.createElement(SettingControl, {
			label: "Direction",
			doc: Documentation.Setting.Direction,
			onReset
		}, /* @__PURE__ */ BdApi.React.createElement(SingleSelect, {
			placeholder: defaultValue,
			options,
			value,
			onChange
		}), additionalControl);
	}
	css`.BA__directionAxisControl {
    display: flex;
    align-items: center;
    gap: 8px;
}
.BA__directionAxisControlSelect {
    flex-grow: 1;
}
.BA__directionAxisControlReverse {
    flex-shrink: 0;
}``DirectionControl`;
	//#endregion
	//#region src/settings/components/controls/OverflowControl.jsx
	function OverflowControl({ value, onChange, forced = false, onReset }) {
		const control = (props) => /* @__PURE__ */ BdApi.React.createElement("div", props, /* @__PURE__ */ BdApi.React.createElement(Checkbox, {
			value,
			onChange: (_, value) => onChange(value),
			type: CheckboxTypes.INVERTED,
			disabled: forced
		}, /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-sm/normal" }, "Enable overflow")));
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__overflowControl" }, forced ? /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, {
			text: "Forced by the animation",
			hideOnClick: false
		}, control) : control(), /* @__PURE__ */ BdApi.React.createElement(Hint, { href: Documentation.getSettingUrl(Documentation.Setting.Overflow) }), !forced && onReset && /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			className: "BA__overflowControlReset",
			tooltip: "Reset",
			onClick: onReset
		}, /* @__PURE__ */ BdApi.React.createElement(RedoIcon, {
			size: "xs",
			color: "currentColor"
		})));
	}
	css`.BA__overflowControl {
    display: flex;
    align-items: center;
    gap: 4px;
}
.BA__overflowControlReset {
    margin-left: auto;
}``OverflowControl`;
	//#endregion
	//#region src/settings/components/animation/AnimationSettings.jsx
	function SettingList({ children, className = "BA__animationSettingsList" }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className }, typeof children === "function" ? children() : children.map((item) => {
			if (!item) return /* @__PURE__ */ BdApi.React.createElement("div", null);
			return /* @__PURE__ */ BdApi.React.createElement(Setting, item);
		}));
	}
	function SettingGroup({ children, className }) {
		return /* @__PURE__ */ BdApi.React.createElement(SettingList, { className: (0, clsx.default)("BA__animationSettingsGroup", className) }, children);
	}
	function Setting({ type, ...props }) {
		if (type === AnimationSettingContainer_default.List) return /* @__PURE__ */ BdApi.React.createElement(SettingList, props);
		if (type === AnimationSettingContainer_default.Group) return /* @__PURE__ */ BdApi.React.createElement(SettingGroup, props);
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__animationSettingsItem" }, (0, react.createElement)({
			[AnimationSetting_default.Duration]: DurationControl,
			[AnimationSetting_default.Easing]: EasingControl,
			[AnimationSetting_default.Variant]: VariantControl,
			[AnimationSetting_default.Position]: PositionControl,
			[AnimationSetting_default.Direction]: DirectionControl,
			[AnimationSetting_default.Overflow]: OverflowControl
		}[type], props));
	}
	function AnimationSettingsHeader({ headers }) {
		return /* @__PURE__ */ BdApi.React.createElement(SettingGroup, { className: "BA__animationSettingsHeaderGroup" }, () => headers.map(({ key, title, subtitle, headerAfter, enabled, setEnabled, onReset, switchTooltip }) => /* @__PURE__ */ BdApi.React.createElement("div", {
			className: "BA__animationSettingsItem BA__animationSettingsHeader",
			key
		}, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__animationSettingsHeading" }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "heading-lg/semibold",
			lineClamp: 1
		}, title), subtitle && /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			tag: "span",
			variant: "heading-md/normal",
			color: "text-muted"
		}, subtitle), headerAfter), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__animationSettingsHeaderControls" }, onReset && /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "Reset all",
			onClick: onReset
		}, /* @__PURE__ */ BdApi.React.createElement(RedoIcon, {
			size: "sm",
			color: "currentColor"
		})), typeof enabled === "boolean" && /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, {
			text: switchTooltip,
			hideOnClick: false
		}, (props) => /* @__PURE__ */ BdApi.React.createElement("div", props, /* @__PURE__ */ BdApi.React.createElement(SwitchIndicator, {
			checked: enabled,
			disabled: !setEnabled,
			onChange: setEnabled
		})))))));
	}
	function AnimationSettings({ headers, settings }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__animationSettings" }, /* @__PURE__ */ BdApi.React.createElement(AnimationSettingsHeader, { headers }), settings.map(Setting));
	}
	css`.BA__animationSettings {
    position: relative;
    isolation: isolate;
}
.BA__animationSettings::before,
.BA__animationSettingsHeaderGroup::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    border-right: 1px solid var(--border-subtle);
    z-index: -1;
}
.BA__animationSettings, .BA__animationSettingsList {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.BA__animationSettingsGroup {
    display: flex;
    gap: 40px;
}
.BA__animationSettingsGroup > * {
    flex: 1;
}

.BA__animationSettingsItem {
    background-color: var(--background-base-lowest);
    box-shadow: 0 -16px 0 var(--background-base-lowest),
                0 16px 0 var(--background-base-lowest);
}

.BA__animationSettingsHeaderGroup {
    position: sticky;
    top: 0;
    z-index: 5;
    isolation: isolate;
}
.BA__animationSettingsHeaderGroup::before {
    top: -20px;
    bottom: -16px;
}
.BA__animationSettingsHeaderGroup::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -16px;
    background-color: var(--background-base-lowest);
    z-index: -2;
}
.BA__animationSettingsHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 4px;
    box-shadow: 0 -20px 0 var(--background-base-lowest),
                0 16px 0 var(--background-base-lowest);
    min-width: 0;
}
.BA__animationSettingsHeading {
    display: flex;
    gap: 8px;
    min-width: 0;
    align-items: flex-end;
}
.BA__animationSettingsHeaderControls {
    display: flex;
    gap: 10px;
    align-items: center;
}``AnimationSettings`;
	//#endregion
	//#region src/hooks/useResizeObserver.js
	function useResizeObserver(target, callback, options = {}) {
		const savedCallback = useLatest(callback);
		const observerRef = (0, react.useRef)();
		const stop = (0, react.useCallback)(() => {
			if (observerRef.current) observerRef.current.disconnect();
		}, []);
		useDeepCompareEffect(() => {
			const element = getTargetElement(target);
			if (!element) return;
			observerRef.current = new ResizeObserver(savedCallback.current);
			observerRef.current.observe(element, options);
			return stop;
		}, [
			savedCallback,
			stop,
			target,
			options
		]);
		return stop;
	}
	//#endregion
	//#region src/hooks/useElementBounding.js
	function useElementBounding(target, options = {}) {
		const { windowResize = true, windowScroll = true, immediate = true } = options;
		const update = useUpdate();
		useResizeObserver(target, update);
		(0, react.useLayoutEffect)(() => {
			if (immediate) update();
		}, [immediate, update]);
		(0, react.useEffect)(() => {
			if (windowScroll) window.addEventListener("scroll", update, { passive: true });
			if (windowResize) window.addEventListener("resize", update, { passive: true });
			return () => {
				if (windowScroll) window.removeEventListener("scroll", update);
				if (windowResize) window.removeEventListener("resize", update);
			};
		}, [
			update,
			windowResize,
			windowScroll
		]);
		const bounding = getTargetElement(target)?.getBoundingClientRect();
		const boundingCached = (0, react.useRef)();
		if (bounding) boundingCached.current = bounding;
		return {
			top: bounding?.top ?? boundingCached.current?.top ?? 0,
			left: bounding?.left ?? boundingCached.current?.left ?? 0,
			width: bounding?.width ?? boundingCached.current?.width ?? 0,
			height: bounding?.height ?? boundingCached.current?.height ?? 0,
			update
		};
	}
	//#endregion
	//#region src/components/icons/CircleInfoIcon.jsx
	function CircleInfoIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT, secondaryColor = "transparent" }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("circle", {
			cx: "12",
			cy: "12",
			r: "10",
			fill: typeof secondaryColor === "string" ? secondaryColor : secondaryColor?.css
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M23 12a11 11 0 1 1-22 0 11 11 0 0 1 22 0Zm-9.5-4.75a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Zm-.77 3.96a1 1 0 1 0-1.96-.42l-1.04 4.86a2.77 2.77 0 0 0 4.31 2.83l.24-.17a1 1 0 1 0-1.16-1.62l-.24.17a.77.77 0 0 1-1.2-.79l1.05-4.86Z",
			clipRule: "evenodd"
		}));
	}
	//#endregion
	//#region src/settings/components/HintTooltip.jsx
	function HintTooltip({ text: _text, color = Tooltip$1.Colors.BRAND, children, ...props }) {
		const text = (0, react.useCallback)(() => /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__hintTooltip" }, /* @__PURE__ */ BdApi.React.createElement(CircleInfoIcon, {
			size: "xs",
			color: "currentColor"
		}), /* @__PURE__ */ BdApi.React.createElement("span", null, _text)), [_text]);
		return /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, {
			text,
			color,
			...props
		}, children);
	}
	css`.BA__hintTooltip {
    display: flex;
    gap: 4px;
}
.BA__hintTooltip > svg {
    flex-shrink: 0;
}``HintTooltip`;
	//#endregion
	//#region shared/enums/DispatcherEvents.js
	var DispatcherEvents_default = Enum({
		SET_SETTINGS_SECTION: "BA__SET_SETTINGS_SECTION",
		SET_ANIMATION_EXPANDED: "BA__SET_ANIMATION_EXPANDED"
	});
	//#endregion
	//#region shared/enums/SettingsSection.js
	var SettingsSection_default = Enum({
		Home: "home",
		Catalog: "catalog",
		Library: "library",
		General: "general"
	});
	//#endregion
	//#region src/settings/stores/SettingsStore.js
	var section = SettingsSection_default.Home;
	var animationExpanded = false;
	function handleSetSection({ section: _section }) {
		section = _section;
	}
	function handleSetAnimationExpanded({ value }) {
		animationExpanded = value;
	}
	var SettingsStore = new class SettingsStore extends Flux.Store {
		initialize() {
			[
				Events_default.ModuleToggled,
				Events_default.ModuleSettingsChanged,
				Events_default.SettingsChanged,
				Events_default.SettingsSaved,
				Events_default.MigratorUpdated
			].forEach((event) => Emitter_default.on(event, this.emitChange.bind(this)));
		}
		getSection() {
			return section;
		}
		_getAnimationExpanded() {
			return animationExpanded;
		}
		isAnimationExpanded() {
			return animationExpanded !== false;
		}
		showNotice() {
			return !Config_default.migrator.isActive && Config_default.hasUnsavedChanges();
		}
	}(Dispatcher, {
		[DispatcherEvents_default.SET_SETTINGS_SECTION]: handleSetSection,
		[DispatcherEvents_default.SET_ANIMATION_EXPANDED]: handleSetAnimationExpanded
	});
	function setSection(section) {
		Dispatcher.dispatch({
			type: DispatcherEvents_default.SET_SETTINGS_SECTION,
			section
		});
	}
	function setAnimationExpanded(value) {
		Dispatcher.dispatch({
			type: DispatcherEvents_default.SET_ANIMATION_EXPANDED,
			value
		});
	}
	function useSection() {
		return [useStateFromStores([SettingsStore], () => SettingsStore.getSection()), setSection];
	}
	function useIsAnimationExpanded(useValue = null) {
		const id = (0, react.useId)();
		const clearIfNeeded = () => {
			if (SettingsStore._getAnimationExpanded() === id) setAnimationExpanded(false);
		};
		(0, react.useEffect)(() => {
			if (useValue == null) return;
			if (useValue) setAnimationExpanded(id);
			else clearIfNeeded();
		}, [useValue]);
		(0, react.useEffect)(() => clearIfNeeded, [id]);
		return useStateFromStores([SettingsStore], () => SettingsStore.isAnimationExpanded());
	}
	//#endregion
	//#region src/settings/components/animation/AnimationCard.jsx
	function getCardHeight(width) {
		return getPreviewHeight(width) + 36;
	}
	var CARD_WIDE_WIDTH = 320;
	var CARD_EXPANDED_WIDTH = 460;
	var CARD_EXPANDED_HEIGHT = getCardHeight(CARD_EXPANDED_WIDTH);
	var TOP_BAR_HEIGHT = 0;
	var TOP_OFFSET = TOP_BAR_HEIGHT + 40;
	var BOTTOM_OFFSET = 92;
	var POPOUT_GAP = 20;
	var MovableContext = (0, react.createContext)({ styles: {} });
	var MOVABLE_ATTRIBUTE = "data-expand-movable";
	function useMovable(key) {
		return {
			[MOVABLE_ATTRIBUTE]: key,
			style: (0, react.use)(MovableContext).styles[key] ?? {}
		};
	}
	function useAnimationCardExpand({ expanded, positionerRef, cardRef, popoutRef, refToScroller }) {
		const window = useWindowSize();
		const positioner = {
			...useElementBounding(positionerRef),
			width: positionerRef.current?.clientWidth ?? 0,
			height: positionerRef.current?.clientHeight ?? 0
		};
		useEventListener("scroll", () => expanded && positioner.update(), (0, react.useCallback)(() => refToScroller.current?.getScrollerNode(), [refToScroller]));
		const popout = useElementBounding(popoutRef);
		const update = (0, react.useCallback)(() => {
			positioner.update();
			popout.update();
		}, [positioner.update, popout.update]);
		const popoutMaxHeight = window.height - (TOP_OFFSET + CARD_EXPANDED_HEIGHT + POPOUT_GAP + BOTTOM_OFFSET);
		const totalHeight = CARD_EXPANDED_HEIGHT + POPOUT_GAP + popout.height;
		const top = Math.max(TOP_OFFSET, Math.min(window.height - (BOTTOM_OFFSET + totalHeight), positioner.top));
		(0, react.useLayoutEffect)(update, [expanded, top]);
		const [movableStyles, setMovableStyles] = (0, react.useState)({});
		(0, react.useLayoutEffect)(() => {
			if (!expanded || !cardRef.current) {
				setMovableStyles({});
				return;
			}
			const movables = Array.from(cardRef.current.querySelectorAll(`[${MOVABLE_ATTRIBUTE}]`));
			const store = (fn) => Object.fromEntries(movables.map((movable) => {
				const key = movable.getAttribute(MOVABLE_ATTRIBUTE);
				return [key, fn(movable, key)];
			}));
			const original = store((movable) => getRect(movable, positionerRef.current));
			cardRef.current.style.width = CARD_EXPANDED_WIDTH + "px";
			setMovableStyles(store((movable, key) => {
				const rect = getRect(movable, positionerRef.current);
				return { transform: [`translate(${rect.x - original[key].x}px, ${rect.y - original[key].y}px)`, `scale(${rect.width / original[key].width}, ${rect.height / original[key].height})`].join(" ") };
			}));
			cardRef.current.style.removeProperty("width");
		}, [expanded]);
		return {
			update,
			positionerStyle: { height: getCardHeight(positioner.width) + "px" },
			cardStyle: { transform: expanded ? `translateY(${top - positioner.top}px)` : "translateY(0)" },
			popoutWrapperStyle: {
				maxHeight: popoutMaxHeight + "px",
				transform: `translateY(${top + CARD_EXPANDED_HEIGHT + POPOUT_GAP - TOP_BAR_HEIGHT}px)`
			},
			popoutStyle: { transformOrigin: `${positioner.left + positioner.width / 2 - popout.left}px ${positioner.top + positioner.height / 2 - popout.top}px` },
			wrap: (children) => /* @__PURE__ */ BdApi.React.createElement(MovableContext, { value: { styles: movableStyles } }, children)
		};
	}
	function useQuickPreview(cardRef) {
		const { config } = useConfig();
		const hovered = useHover(cardRef);
		const [isActive, setIsActive] = (0, react.useState)(hovered);
		const timeout = (0, react.useMemo)(() => new Timeout(), []);
		(0, react.useEffect)(() => {
			if (hovered) timeout.start(500, () => setIsActive(true));
			else {
				timeout.stop();
				setIsActive(false);
			}
		}, [hovered]);
		return config.general.quickPreview && isActive;
	}
	function AnimationCard({ pack, animation, name = animation?.name, enter, exit, setEnter, setExit, onClick, refToScroller, animationSettings, accordionsSettings, active = enter || exit, header = false, wide = header, errors }) {
		const positionerRef = (0, react.useRef)();
		const settingsPopoutRef = (0, react.useRef)();
		const accordionsPopoutRef = (0, react.useRef)();
		const popoutRefs = (0, react.useMemo)(() => ({
			settings: settingsPopoutRef,
			accordions: accordionsPopoutRef
		}), [settingsPopoutRef, accordionsPopoutRef]);
		const [expanded, setExpanded] = (0, react.useState)(null);
		const close = (0, react.useCallback)(() => setExpanded(null), [setExpanded]);
		const [isHeaderVisible, setIsHeaderVisible] = (0, react.useState)(false);
		const cardRef = useIsVisible((isVisible) => header && setIsHeaderVisible(isVisible), .5);
		const isAnimationExpanded = useIsAnimationExpanded(header ? null : !!expanded);
		const { update, positionerStyle, cardStyle, popoutWrapperStyle, popoutStyle, wrap } = useAnimationCardExpand({
			expanded,
			positionerRef,
			cardRef,
			popoutRef: popoutRefs[expanded],
			refToScroller
		});
		(0, react.useLayoutEffect)(update, [animationSettings, accordionsSettings]);
		const isQuickPreview = useQuickPreview(cardRef);
		const [rightClickHint, setRightClickHint] = useDismissible("rightClickAnimationCard");
		(0, react.useEffect)(() => {
			const onKeyDown = (e) => {
				if (e.key !== "Escape" || !expanded) return;
				close();
				e.preventDefault();
				e.stopPropagation();
			};
			document.addEventListener("keydown", onKeyDown);
			return () => {
				document.removeEventListener("keydown", onKeyDown);
			};
		}, [expanded, close]);
		useEventListener("wheel", (e) => {
			if (!expanded) return;
			e.stopPropagation();
			e.preventDefault();
		}, cardRef);
		const hasSettings = !!animationSettings.settings.length;
		const hasAccordions = !!accordionsSettings?.settings?.length;
		const [forceOpenSettingsTooltip, setForceOpenSettingsTooltip] = (0, react.useState)(false);
		const expandSettings = (rightClick = false) => {
			if (expanded) return;
			if (!hasSettings && !hasAccordions) return setForceOpenSettingsTooltip(true);
			setExpanded(hasSettings ? "settings" : "accordions");
			if (rightClick === true && !rightClickHint && !header) setRightClickHint(true);
		};
		return wrap(/* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("BA__animationCardWrapper", {
			"BA__animationCard--expanded": expanded,
			"BA__animationCard--wide": wide,
			"BA__animationCard--active": active
		}) }, /* @__PURE__ */ BdApi.React.createElement(HintTooltip, {
			text: "Right-click the card to open the settings",
			shouldShow: !rightClickHint && !!expandSettings && !expanded && hasSettings && !header
		}, (props) => /* @__PURE__ */ BdApi.React.createElement("div", {
			ref: positionerRef,
			className: "BA__animationCardPositioner",
			style: positionerStyle,
			...props
		}, /* @__PURE__ */ BdApi.React.createElement(Clickable, {
			innerRef: cardRef,
			tag: "div",
			className: "BA__animationCard",
			style: cardStyle,
			onClick: onClick ?? expandSettings,
			onContextMenu: () => expandSettings?.(true),
			onMouseLeave: () => setForceOpenSettingsTooltip(false)
		}, /* @__PURE__ */ BdApi.React.createElement("div", {
			className: "BA__animationCardBg",
			...useMovable("bg")
		}), /* @__PURE__ */ BdApi.React.createElement(AnimationPreview, {
			className: "BA__animationCardPreview",
			pack,
			animation,
			title: name,
			active: header && isHeaderVisible && !isAnimationExpanded || isQuickPreview || !!expanded
		}), /* @__PURE__ */ BdApi.React.createElement(AnimationCardControls, {
			enter,
			exit,
			setEnter,
			setExit,
			hasSettings,
			hasAccordions,
			expanded,
			setExpanded,
			errors,
			forceOpenSettingsTooltip
		})))), /* @__PURE__ */ BdApi.React.createElement("div", {
			className: "BA__animationCardBackdrop",
			onClick: close
		}), /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, expanded && /* @__PURE__ */ BdApi.React.createElement(CSSTransition, {
			key: expanded,
			nodeRef: popoutRefs[expanded],
			timeout: 400,
			classNames: "BA__fade",
			mountOnEnter: true,
			unmountOnExit: true
		}, /* @__PURE__ */ BdApi.React.createElement("div", {
			ref: popoutRefs[expanded],
			className: "BA__animationCardPopoutWrapper",
			style: popoutWrapperStyle
		}, /* @__PURE__ */ BdApi.React.createElement("div", {
			className: "BA__animationCardPopout",
			style: popoutStyle
		}, /* @__PURE__ */ BdApi.React.createElement("div", { className: `BA__animationCardPopoutScroller ${DiscordClasses.Scroller.thin}` }, /* @__PURE__ */ BdApi.React.createElement(AnimationSettings, {
			settings: animationSettings,
			accordions: accordionsSettings
		}[expanded]))))))));
	}
	css`.BA__animationCardWrapper {
    min-width: 0;
}

[${MOVABLE_ATTRIBUTE}] {
    transform-origin: top left;
    transition: transform .4s;
}

.BA__animationCardBackdrop {
    position: absolute;
    inset: 0;
    z-index: 99;
    background-color: rgba(0, 0, 0, .8);
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s;
}

.BA__animationCardPositioner {
    position: relative;
    display: flex;
}
.BA__animationCardWrapper:nth-child(3n - 1) .BA__animationCardPositioner {
    justify-content: center;
}
.BA__animationCardWrapper:nth-child(3n) .BA__animationCardPositioner {
    justify-content: flex-end;
}

.BA__animationCard {
    position: absolute;
    width: 100%;
    cursor: pointer;
    z-index: 10;
    transition: transform .4s, z-index .4s step-end;
    isolation: isolate;
}
.BA__animationCardBg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: var(--background-base-lowest);
    border-radius: 8px;
    box-shadow: 0 0 0 1px var(--border-subtle);
    transition: background-color .2s, box-shadow .2s, border-radius .4s, transform .4s;
}
.BA__animationCard:hover .BA__animationCardBg {
    background-color: var(--background-base-lower);
}
.BA__animationPreviewContainer.BA__animationCardPreview {
    border-radius: 8px 8px 0 0;
    box-shadow: none;
    background: var(--background-base-lowest);
}

.BA__animationCard--wide .BA__animationCardPositioner,
.BA__animationCard--wide .BA__animationCard {
    width: ${CARD_WIDE_WIDTH}px;
}

.BA__animationCard--expanded .BA__animationCardBackdrop {
    opacity: 1;
    pointer-events: all;
}
.BA__animationCard--expanded .BA__animationCard {
    z-index: 205;
    transition: transform .4s, z-index .4s step-start;
}
.BA__animationCard--expanded .BA__animationCardBg {
    border-radius: 4px;
    box-shadow: 0 0 0 .5px var(--border-subtle);
}
.BA__animationCard--expanded .BA__animationPreviewContainer {
    border-radius: 4px 4px 0 0;
}

.BA__animationCard--active .BA__animationCardBg {
    box-shadow: 0 0 0 2.5px var(--brand-500);
}
.BA__animationCard--active.BA__animationCard--expanded .BA__animationCardBg {
    box-shadow: 0 0 0 1.5px var(--brand-500);
}

.BA__animationCardPopoutWrapper {
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    z-index: 200;
    display: flex;
    transition: transform .4s, translate .4s;
}
.BA__animationCardPopout {
    background-color: var(--background-base-lowest);
    box-shadow: 0 0 0 1px var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    display: flex;
}
.BA__animationCardPopoutScroller {
    position: relative;
    overflow: hidden scroll;
    padding: 20px;
    padding-right: 12px;
}

.BA__fade-enter, .BA__fade-exit-active {
    opacity: 0;
}
:is(.BA__fade-enter, .BA__fade-exit-active) > * {
    scale: .5;
}
.BA__fade-enter-active {
    opacity: 1;
}
.BA__fade-enter-active > * {
    scale: 1;
}
.BA__fade-enter-active, .BA__fade-exit-active {
    transition: opacity .4s;
}
.BA__fade-exit-active {
    pointer-events: none;
}
:is(.BA__fade-enter-active, .BA__fade-exit-active) > * {
    transition: scale .4s;
}``AnimationCard`;
	//#endregion
	//#region src/components/icons/EyeIcon.jsx
	function EyeIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M15.56 11.77c.2-.1.44.02.44.23a4 4 0 1 1-4-4c.21 0 .33.25.23.44a2.5 2.5 0 0 0 3.32 3.32Z"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M22.89 11.7c.07.2.07.4 0 .6C22.27 13.9 19.1 21 12 21c-7.11 0-10.27-7.11-10.89-8.7a.83.83 0 0 1 0-.6C1.73 10.1 4.9 3 12 3c7.11 0 10.27 7.11 10.89 8.7Zm-4.5-3.62A15.11 15.11 0 0 1 20.85 12c-.38.88-1.18 2.47-2.46 3.92C16.87 17.62 14.8 19 12 19c-2.8 0-4.87-1.38-6.39-3.08A15.11 15.11 0 0 1 3.15 12c.38-.88 1.18-2.47 2.46-3.92C7.13 6.38 9.2 5 12 5c2.8 0 4.87 1.38 6.39 3.08Z",
			clipRule: "evenodd"
		}));
	}
	//#endregion
	//#region src/components/icons/RefreshIcon.jsx
	function RefreshIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			fillRule: "evenodd",
			d: "M21 2a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-6a1 1 0 1 1 0-2h3.93A8 8 0 0 0 6.97 5.78a1 1 0 0 1-1.26-1.56A9.98 9.98 0 0 1 20 6V3a1 1 0 0 1 1-1ZM3 22a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H5.07a8 8 0 0 0 11.96 2.22 1 1 0 1 1 1.26 1.56A9.99 9.99 0 0 1 4 18v3a1 1 0 0 1-1 1Z",
			clipRule: "evenodd"
		}));
	}
	//#endregion
	//#region src/settings/components/animation/AnimationPreview.jsx
	function getPreviewHeight(width) {
		return width * 9 / 16;
	}
	function AnimationPreview({ module = (0, react.use)(ModuleContext), pack, animation, title = animation?.name, active = false, className }) {
		const { isActive: hasActiveAnimation } = (0, react.use)(AnimeTransitionContext);
		const isActive = active && !hasActiveAnimation;
		const [dataKey, setDataKey] = (0, react.useState)(0);
		(0, react.useEffect)(() => moduleEffect(module.id, () => setDataKey((key) => key + 1), true), [module]);
		const containerRef = (0, react.useRef)();
		const [scale, setScale] = (0, react.useState)(1);
		const onUpdate = (0, react.useCallback)(() => {
			setScale(containerRef.current.offsetWidth / PREVIEW_WIDTH);
		}, [setScale]);
		useResizeObserver(containerRef, onUpdate);
		(0, react.useLayoutEffect)(onUpdate, []);
		const [error, setError] = (0, react.useState)(null);
		(0, react.useEffect)(() => {
			if (!isActive) setError(null);
		}, [isActive]);
		const onError = (0, react.useCallback)((error) => {
			setError(error);
			Logger.error("AnimationPreview", error);
		}, [setError]);
		const { isMembersOpen: memberListShown = true } = useStateFromStores([ChannelSectionStore], () => ChannelSectionStore.getState());
		const modules = (0, react.useMemo)(() => Core_default.getAllModules(true), []);
		const style = (0, react.useMemo)(() => ({ scale }), [scale]);
		const preferences = (0, react.useMemo)(() => ({ memberListShown }), [memberListShown]);
		return /* @__PURE__ */ BdApi.React.createElement("div", {
			ref: containerRef,
			className: (0, clsx.default)("BA__animationPreviewContainer", className),
			...useMovable("preview")
		}, /* @__PURE__ */ BdApi.React.createElement(preview_default, {
			className: (0, clsx.default)(getThemeClass("darker"), "BA__animationPreview"),
			style,
			key: module.id,
			id: module.id,
			modules,
			placeholder: !isActive || error != null,
			pack,
			animation,
			dataKey,
			preferences,
			onError
		}), /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("BA__animationPreviewOverlay", { "BA__animationPreviewOverlay--hidden": (isActive || !title) && !error }) }, error ? /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__animationPreviewError" }, /* @__PURE__ */ BdApi.React.createElement(CircleWarningIcon, {
			size: "lg",
			color: colors.STATUS_DANGER
		}), /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "text-sm/bold",
			color: "white"
		}, "An error occurred."), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__animationPreviewErrorActions" }, /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "View",
			onClick: stop(() => manager_default.showModal([error]))
		}, /* @__PURE__ */ BdApi.React.createElement(EyeIcon, {
			size: "sm",
			color: "currentColor"
		})), /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "Try again",
			onClick: stop(() => setError(null))
		}, /* @__PURE__ */ BdApi.React.createElement(RefreshIcon, {
			size: "xs",
			color: "currentColor"
		})))) : title ? /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "heading-sm/semibold",
			lineClamp: 2,
			color: "white"
		}, title) : null));
	}
	css`.BA__animationPreviewContainer {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    background: var(--background-base-low);
    display: flex;
    align-items: center;
    box-shadow: 0 0 0 1px var(--border-faint);
    transition: border-radius .4s, box-shadow .4s, transform .4s;
}
.BA__animationPreview {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
}
.BA__animationPreview::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 80px 0 rgba(0,0,0,.5);
    z-index: 10;
}
.BA__animationPreviewOverlay {
    position: absolute;
    inset: 0;
    padding: 12px;
    background: rgba(0, 0, 0, .1);
    backdrop-filter: blur(15px);
    transition: .4s;
    display: flex;
    flex-direction: column;
}
.BA__animationPreviewOverlay--hidden {
    opacity: 0;
    backdrop-filter: blur(0);
}
.BA__animationPreviewError {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    text-align: center;
}
.BA__animationPreviewErrorActions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}``AnimationPreview`;
	//#endregion
	//#region src/components/icons/XIcon.jsx
	function XIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M17.3 18.7a1 1 0 0 0 1.4-1.4L13.42 12l5.3-5.3a1 1 0 0 0-1.42-1.4L12 10.58l-5.3-5.3a1 1 0 0 0-1.4 1.42L10.58 12l-5.3 5.3a1 1 0 1 0 1.42 1.4L12 13.42l5.3 5.3Z"
		}));
	}
	//#endregion
	//#region src/components/icons/ChevronSmallLeftIcon.jsx
	function ChevronSmallLeftIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M14.7 5.3a1 1 0 0 1 0 1.4L9.42 12l5.3 5.3a1 1 0 0 1-1.42 1.4l-6-6a1 1 0 0 1 0-1.4l6-6a1 1 0 0 1 1.42 0Z"
		}));
	}
	//#endregion
	//#region src/components/icons/ChevronSmallRightIcon.jsx
	function ChevronSmallRightIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z"
		}));
	}
	//#endregion
	//#region src/error/components/ErrorCard.jsx
	function ErrorCard({ text, actions, className, iconType = IconBrandTypes.ERROR, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", {
			...props,
			className: (0, clsx.default)("BA__errorCard", className)
		}, /* @__PURE__ */ BdApi.React.createElement(IconBrand, {
			type: iconType,
			size: "xl"
		}), /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-md/bold" }, text), actions && /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__errorCardActions" }, actions));
	}
	css`.BA__errorCard {
    padding: 16px;
    background-color: #e7828430;
    border: 1px solid #e78284;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-align: center;
    min-width: 170px;
}
.BA__errorCard a:hover {
    text-decoration: underline;
}
.BA__errorCardActions {
    display: flex;
    align-items: center;
    gap: 8px;
}``ErrorCard`;
	//#endregion
	//#region src/settings/components/pack/PackModal.jsx
	function ModuleLabel({ module }) {
		const parent = Core_default.getParentModule(module);
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__moduleLabel" }, parent && /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, parent.name, /* @__PURE__ */ BdApi.React.createElement(ChevronSmallRightIcon, {
			size: "xs",
			color: "currentColor"
		})), module.name);
	}
	function PackPreview({ pack, module }) {
		const animations = pack.animations.filter((a) => module?.isSupportedBy(a));
		const [index, setIndex] = (0, react.useState)(0);
		const step = (step) => setIndex((index) => (animations.length + index + step) % animations.length);
		useEventListener("keydown", (e) => {
			if (e.repeat) return;
			switch (e.code) {
				case "ArrowLeft": return step(-1);
				case "ArrowRight": return step(1);
			}
		});
		const animation = animations[index];
		(0, react.useEffect)(() => {
			if (index >= animations.length) setIndex(0);
		});
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packPreview" }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packPreviewContent" }, /* @__PURE__ */ BdApi.React.createElement(AnimationPreview, {
			key: animation?.key,
			className: "BA__packPreviewAnimation",
			module,
			pack,
			animation,
			title: null,
			active: animation != null
		})), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packPreviewFooter" }, animations.length > 1 && /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			variant: "icon-only",
			icon: ChevronSmallLeftIcon,
			onClick: () => step(-1)
		}), animation && /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__packPreviewTitle",
			variant: "heading-lg/semibold",
			lineClamp: 1
		}, animation.name), animations.length > 1 && /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			variant: "icon-only",
			icon: ChevronSmallRightIcon,
			onClick: () => step(1)
		})));
	}
	function usePack({ filename, location, onClose }) {
		const registry = usePackRegistry();
		const cachedPack = (0, react.useRef)();
		const storedPack = location === PackContentLocation.CATALOG ? registry.getPack(filename) : PackManager_default.getPackByFile(filename, true);
		(0, react.useEffect)(() => {
			if (!storedPack) onClose();
			else cachedPack.current = storedPack;
		}, [!storedPack]);
		return storedPack ?? cachedPack.current;
	}
	function useLoadedPack(pack, isRemote) {
		const remoteData = usePackRegistry().storage.use(isRemote ? pack?.filename : null);
		return isRemote ? remoteData : {
			pack,
			loading: false,
			error: null
		};
	}
	function PackMeta({ pack }) {
		const meta = [];
		if (pack.createdAt) meta.push(/* @__PURE__ */ BdApi.React.createElement(Timestamp, {
			timestamp: pack.createdAt,
			timestampFormat: "[Published] L"
		}));
		if (pack.updatedAt) meta.push(/* @__PURE__ */ BdApi.React.createElement(Timestamp, {
			timestamp: pack.updatedAt,
			timestampFormat: "[Updated] L"
		}));
		const size = pack.size ?? pack.installed?.size;
		if (size) meta.push(humanize.filesize(size));
		if (pack.installed) {
			const modules = Core_default.getModulesUsingPack(pack.installed);
			meta.push(/* @__PURE__ */ BdApi.React.createElement(Tooltip$1, {
				text: modules.map((m) => m.name).join(", "),
				shouldShow: modules.length > 0
			}, (props) => /* @__PURE__ */ BdApi.React.createElement("span", props, modules.length > 0 ? `Used in ${modules.length} ${modules.length > 1 ? "modules" : "module"}` : "Not used in any modules")));
		}
		return /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__packModalMeta",
			variant: "text-sm/medium",
			color: "text-muted"
		}, meta.map((item, index) => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, item, index < meta.length - 1 && " • ")));
	}
	function PackModal({ filename, location = PackContentLocation.CATALOG, onClose, ...props }) {
		useEmitterEffect(Events_default.PluginDisabled, onClose);
		const registry = usePackRegistry();
		const pack = usePack({
			filename,
			location,
			onClose
		});
		const { pack: loadedPack, loading, error } = useLoadedPack(pack, location === PackContentLocation.CATALOG);
		const modules = Core_default.getAllModules(true).filter((module) => !loadedPack || loadedPack.partial || loadedPack.animations?.some((a) => module.isSupportedBy(a)));
		const [moduleId, setModuleId] = (0, react.useState)(data.preferences.module ?? modules[0]?.id);
		const moduleIndex = modules.findIndex((m) => m.id === moduleId);
		const module = modules[moduleIndex];
		const selectModule = (0, react.useCallback)((moduleId) => {
			setModuleId(moduleId);
			data.preferences.module = moduleId;
		}, [setModuleId]);
		const step = (step) => {
			const module = modules.at((moduleIndex + step) % modules.length);
			if (module) selectModule(module.id);
		};
		const options = modules.map((module) => ({
			module,
			value: module.id,
			label: module.name
		}));
		(0, react.useEffect)(() => {
			if (!modules.some((m) => m.id === moduleId)) setModuleId(modules[0]?.id);
		});
		useEventListener("keydown", (e) => {
			if (e.repeat) return;
			switch (e.code) {
				case "ArrowUp": return step(-1);
				case "ArrowDown": return step(1);
			}
		});
		const errorCard = (() => {
			if (pack?.partial) return { text: "Pack did not load properly. Preview is unavailable." };
			if (error || !loadedPack) return { text: "Failed to load the preview." };
			if (!registry.verifier.check(pack)) return {
				iconType: IconBrandTypes.WARNING,
				text: "Preview is not available for unverified packs."
			};
			if (!modules.length) return {
				iconType: IconBrandTypes.WARNING,
				text: "This pack does not support any animation modules."
			};
			if (!module) return {
				iconType: IconBrandTypes.WARNING,
				text: "Module not found."
			};
			return null;
		})();
		return /* @__PURE__ */ BdApi.React.createElement(ModalRoot, {
			...props,
			className: "BA__packModal",
			size: ModalSize.DYNAMIC,
			onClose
		}, /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, null, pack && /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packModalSidebar" }, /* @__PURE__ */ BdApi.React.createElement(PackContent, {
			className: "BA__packModalContent",
			pack,
			location,
			size: "md"
		})), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packModalPreview" }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packModalPreviewHeader" }, /* @__PURE__ */ BdApi.React.createElement(SingleSelect, {
			className: "BA__packModalPreviewSelect",
			options,
			value: moduleId,
			onChange: selectModule,
			isDisabled: loading || errorCard,
			renderOptionLabel: ({ module }) => /* @__PURE__ */ BdApi.React.createElement(ModuleLabel, { module }),
			renderOptionValue: ([option]) => option && /* @__PURE__ */ BdApi.React.createElement(ModuleLabel, { module: option.module })
		}), /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			variant: "icon-only",
			icon: XIcon,
			onClick: onClose
		})), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packModalPreviewContent" }, loading ? /* @__PURE__ */ BdApi.React.createElement(Spinner, { className: "BA__packModalPreviewSpinner" }) : errorCard ? /* @__PURE__ */ BdApi.React.createElement(ErrorCard, {
			className: "BA__packModalPreviewError",
			...errorCard
		}) : /* @__PURE__ */ BdApi.React.createElement(PackPreview, {
			key: moduleId,
			module,
			pack: loadedPack
		})), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packModalPreviewFooter" }, /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, { noop: true }, /* @__PURE__ */ BdApi.React.createElement(PackMeta, { pack })))))));
	}
	css`.BA__packModal {
    display: flex;
    align-items: stretch;
    flex-direction: row;
    height: 600px;
    overflow: clip;
    max-width: 100%;
}
.BA__packModalSidebar {
    width: 350px;
    display: flex;
    flex-direction: column;
    background-color: var(--background-base-lowest);
}
.BA__packModalContent {
    flex: 1;
}

.BA__packModalPreview {
    width: 560px;
    flex-grow: 1;
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 16px;
}
.BA__packModalPreviewHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.BA__packModalPreviewSelect {
    min-width: 260px;
}
.BA__packModalPreviewContent {
    flex: 1;
}
.BA__packModalPreviewFooter {
    text-align: center;
}
.BA__packModalPreviewError,
.BA__packModalPreviewSpinner {
    aspect-ratio: 16 / 9;
}
.BA__packModalMeta > * {
    margin: 0 !important;
}

.BA__packPreviewContent {
    display: flex;
    align-items: center;
    gap: 8px;
}
.BA__packPreviewAnimation {
    flex: 1;
    border-radius: 8px;
    box-shadow: 0 0 0 1px var(--border-subtle);
}
.BA__packPreviewFooter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    text-align: center;
}
.BA__packPreviewTitle {
    flex: 1;
}

.BA__moduleLabel {
    display: flex;
    align-items: center;
    gap: 2px;
}``PackModal`;
	//#endregion
	//#region src/migrations/utils.js
	function getMainConfig(configs) {
		return configs.find((config) => !config.slug);
	}
	//#endregion
	//#region src/migrations/2.jsx
	var slug = "olDays";
	var modules = [
		["guild", "servers"],
		["channel", "channels"],
		["settings", "settings"],
		["messages", "messages"],
		["popouts", "popouts"],
		["popouts", "tooltips"],
		["popouts", "contextMenu"]
	];
	var switchTypes = {
		slipUp: {
			key: "containerSlip",
			direction: "upwards"
		},
		slipDown: {
			key: "containerSlip",
			direction: "downwards"
		},
		slipLeft: {
			key: "containerSlip",
			direction: "leftwards"
		},
		slipRight: {
			key: "containerSlip",
			direction: "rightwards"
		},
		slideUp: {
			key: "containerSlide",
			direction: "upwards"
		},
		slideDown: {
			key: "containerSlide",
			direction: "downwards"
		},
		slideLeft: {
			key: "containerSlide",
			direction: "leftwards"
		},
		slideRight: {
			key: "containerSlide",
			direction: "rightwards"
		},
		flipForwards: {
			key: "containerFlip",
			direction: "forwards"
		},
		flipBackwards: {
			key: "containerFlip",
			direction: "backwards"
		},
		flipLeft: {
			key: "containerFlip",
			direction: "leftwards"
		},
		flipRight: {
			key: "containerFlip",
			direction: "rightwards"
		},
		scaleUp: {
			key: "containerScale",
			direction: "upwards"
		},
		scaleDown: {
			key: "containerScale",
			direction: "downwards"
		},
		scaleLeft: {
			key: "containerScale",
			direction: "leftwards"
		},
		scaleRight: {
			key: "containerScale",
			direction: "rightwards"
		},
		fade: { key: "containerFade" },
		scaleForwards: {
			key: "containerScale",
			direction: "forwards"
		},
		scaleBackwards: {
			key: "containerScale",
			direction: "backwards"
		},
		scaleChange: { key: "containerScaleChange" }
	};
	var revealTypes = {
		fade: { key: "revealFade" },
		slip: {
			key: "revealSlip",
			position: "auto"
		},
		slipScale: {
			key: "revealSlipScale",
			position: "auto"
		},
		flip: {
			key: "revealFlip",
			position: "auto"
		},
		scaleForwards: {
			key: "revealScale",
			position: "center",
			direction: "forwards"
		},
		scaleBackwards: {
			key: "revealScale",
			position: "center",
			direction: "backwards"
		},
		scaleForwardsSide: {
			key: "revealScale",
			position: "auto",
			direction: "forwards"
		},
		scaleBackwardsSide: {
			key: "revealScale",
			position: "auto",
			direction: "backwards"
		},
		rotateForwardsLeft: {
			key: "revealRotate",
			direction: "forwards",
			variant: "left"
		},
		rotateForwardsRight: {
			key: "revealRotate",
			direction: "forwards",
			variant: "right"
		},
		rotateBackwardsLeft: {
			key: "revealRotate",
			direction: "backwards",
			variant: "left"
		},
		rotateBackwardsRight: {
			key: "revealRotate",
			direction: "backwards",
			variant: "right"
		}
	};
	function parseEasing(easing) {
		switch (easing) {
			case "linear": return { type: "linear" };
			case "easeIn": return {
				type: "ease",
				bezier: "in",
				style: "sine"
			};
			case "easeOut": return {
				type: "ease",
				bezier: "out",
				style: "sine"
			};
			case "ease":
			case "easeInOut": return {
				type: "ease",
				bezier: "inOut",
				style: "sine"
			};
			default:
				const [, bezier, style] = easing.match(/^ease(In|Out|InOut)(Sine|Quad|Cubic|Quart|Quint|Expo|Circ|Back)$/).map((i) => i.slice(0, 1).toLowerCase() + i.slice(1));
				switch (style) {
					case "back": return {
						type: "back",
						bezier,
						overshoot: 2.7
					};
					default: return {
						type: "ease",
						bezier,
						style
					};
				}
		}
	}
	function parsePosition(position) {
		switch (position) {
			case "bottom": return "top";
			case "top": return "bottom";
			case "right": return "left";
			case "left": return "right";
		}
	}
	function generateMutations(config) {
		const data = structuredClone(configDefaults);
		const packData = structuredClone(packConfigDefaults);
		for (const [key, moduleKey] of modules) {
			if (!config[key]) continue;
			const moduleData = data.modules[moduleKey];
			const { enabled, type, duration, easing, position } = config[key];
			const { key: animationKey, ...settings } = ["messages", "popouts"].includes(key) ? revealTypes[type] : switchTypes[type];
			moduleData.enabled = enabled;
			const pointer = {
				packSlug: slug,
				animationKey
			};
			moduleData.enter = pointer;
			moduleData.exit = pointer;
			settings.duration = duration;
			settings.easing = parseEasing(easing);
			if (position) settings.position = parsePosition(position);
			packData.entries.push({
				animation: animationKey,
				module: moduleKey,
				enter: settings,
				exit: settings
			});
		}
		return [{
			version: 2,
			data
		}, {
			slug,
			version: 2,
			data: packData
		}];
	}
	function promptDownload() {
		return new Promise((resolve) => {
			const showPackModal = () => ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(PackModal, {
				...props,
				filename: slug + PackManager_default.extension,
				location: PackContentLocation.CATALOG
			}), { onCloseCallback: () => PackRegistry_default.storage.clear() });
			ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(Modal$2, {
				...props,
				title: Messages.SETTINGS_MIGRATOR,
				confirmText: "Install",
				confirmButtonVariant: "primary",
				cancelText: "Cancel",
				onConfirm: () => resolve(true)
			}, /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-md/normal" }, /* @__PURE__ */ BdApi.React.createElement("p", null, "Animations from V1 are considered legacy and no longer come preinstalled with BetterAnimations."), /* @__PURE__ */ BdApi.React.createElement("p", null, "In order to successfully migrate your settings from V1 to V2 pack ", /* @__PURE__ */ BdApi.React.createElement(TextButton, {
				text: "Ol' Days",
				onClick: showPackModal
			}), " will be installed. Proceed?"))), { onCloseCallback: () => resolve(false) });
		});
	}
	async function downloadPack(signal) {
		if (PackManager_default.getPack(slug)) return true;
		if (!await promptDownload()) return false;
		if (!await PackRegistry_default.install(slug + PackManager_default.extension, { signal })) throw new Error(`Failed to install pack "${slug}"`);
		return true;
	}
	async function handler(configs, signal) {
		const config = getMainConfig(configs);
		if (!config) return [];
		if (!await downloadPack(signal)) return false;
		return generateMutations(config.data);
	}
	//#endregion
	//#region src/migrations/index.js
	var migrations = { 2: {
		handler,
		prompt: true
	} };
	//#endregion
	//#region src/components/InlineList.jsx
	function InlineList({ items, limit = 3, dividers = [", ", " and "], tag: Tag = react.Fragment, itemTag: ItemTag = "b" }) {
		const nodes = items.length <= limit ? items : items.slice(0, limit - 1).concat(items.length - limit + 1);
		if (!nodes.length) return null;
		return /* @__PURE__ */ BdApi.React.createElement(Tag, null, nodes.map((node, index) => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, typeof node === "number" ? `${node} others` : /* @__PURE__ */ BdApi.React.createElement(ItemTag, null, node), [...dividers, ""][Math.max(0, index - nodes.length + dividers.length + 1)])));
	}
	//#endregion
	//#region src/modules/Config.jsx
	var BaseConfig = class {
		get name() {
			return "BaseConfig";
		}
		constructor(data, defaults) {
			this.data = data;
			this.defaults = defaults;
			this.stored = {};
			this.current = {};
		}
		get configVersion() {
			const configVersion = this.data.configVersion;
			if (configVersion != null) return configVersion;
			if (this.data.settings != null) return 1;
			return 2;
		}
		get isOutdated() {
			return this.configVersion < 2;
		}
		read() {
			if (this.isOutdated) {
				Logger.warn(this.name, `Config version is outdated, falling back to defaults.`);
				this.stored = structuredClone(this.defaults);
				return;
			}
			this.stored = (0, import_cjs.default)(this.defaults, this.data.settings ?? {});
		}
		load() {
			this.current = structuredClone(this.stored);
		}
		save() {
			this.data.configVersion = 2;
			this.data.settings = this.current;
			this.stored = structuredClone(this.current);
		}
		hasUnsavedChanges() {
			return !isEqual(this.current, this.stored);
		}
		reset() {
			this.current = structuredClone(this.defaults);
			this.save();
		}
	};
	var PackConfig = class extends BaseConfig {
		get name() {
			return `PackConfig: ${this.slug}`;
		}
		constructor(slug) {
			super(PackData_default.pack(slug), packConfigDefaults);
			this.slug = slug;
			this.read();
			this.load();
		}
		createAnimationConfigEntry(key, moduleKey) {
			return {
				animation: key,
				module: moduleKey
			};
		}
		getAnimationConfigEntry(key, moduleKey, createIfMissing = false) {
			const entry = this.current.entries.find(({ animation, module }) => animation === key && module === moduleKey);
			if (entry || !createIfMissing) return entry;
			const newEntry = this.createAnimationConfigEntry(key, moduleKey);
			this.current.entries.push(newEntry);
			return newEntry;
		}
		getAnimationConfig(key, moduleKey, type) {
			return this.getAnimationConfigEntry(key, moduleKey)?.[type] ?? {};
		}
		setAnimationConfig(key, moduleKey, type, value) {
			this.getAnimationConfigEntry(key, moduleKey, true)[type] = value;
			Emitter_default.emit(Events_default.ModuleSettingsChanged, moduleKey);
		}
	};
	var Config_default = new class Config extends BaseConfig {
		get name() {
			return "Config";
		}
		constructor() {
			super(data, configDefaults);
			this.migrator = new Migrator(this, migrations);
			this.packs = /* @__PURE__ */ new Map();
			this.onPackLoaded = (pack) => {
				if (pack.partial) return;
				const config = new PackConfig(pack.slug);
				this.packs.set(pack.slug, config);
				this.migrator.validate([config]);
			};
			this.onPackUnloaded = (pack) => this.packs.delete(pack.slug);
		}
		initialize() {
			super.read();
			super.load();
			internalPackSlugs.forEach((slug) => this.packs.set(slug, new PackConfig(slug)));
			Emitter_default.on(Events_default.PackLoaded, this.onPackLoaded);
			Emitter_default.on(Events_default.PackUnloaded, this.onPackUnloaded);
			this.migrator.validate();
			Logger.info(this.name, "Initialized.");
		}
		load() {
			super.load();
			this.packs.forEach((pack) => pack.load());
			Emitter_default.emit(Events_default.SettingsLoaded);
			Emitter_default.emit(Events_default.SettingsChanged);
		}
		save() {
			super.save();
			this.packs.forEach((pack) => pack.save());
			Emitter_default.emit(Events_default.SettingsSaved);
		}
		hasUnsavedChanges() {
			return super.hasUnsavedChanges() || Array.from(this.packs.values()).some((pack) => pack.hasUnsavedChanges());
		}
		pack(slug) {
			return this.packs.get(slug) ?? new PackConfig(slug);
		}
		getAll() {
			return [this, ...this.packs.values()];
		}
		buildMigrationPromptMessage(configs) {
			const { internals = [], packs = [] } = Object.groupBy(configs, (config) => !config.slug || internalPackSlugs.includes(config.slug) ? "internals" : "packs");
			const packNames = packs.map((pack) => PackManager_default.getPack(pack.slug, true)?.name ?? pack.slug);
			const parts = [];
			if (packNames.length) parts.push(/* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, packNames.length > 1 ? "packs " : "pack ", /* @__PURE__ */ BdApi.React.createElement(InlineList, {
				items: packNames,
				limit: Infinity
			})));
			if (internals.length && parts.length) parts.unshift("the plugin");
			return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("p", null, "The version of your saved ", parts.length > 1 ? "configurations " : "configuration ", parts.length > 0 && /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "for ", /* @__PURE__ */ BdApi.React.createElement(InlineList, {
				items: parts,
				limit: Infinity,
				itemTag: react.Fragment
			})), parts.length > 1 ? " are " : " is ", "outdated and cannot be used with the current version of the plugin."), /* @__PURE__ */ BdApi.React.createElement("p", null, "Would you like to migrate your settings to the latest version?"));
		}
		applyMutations(mutations) {
			for (const mutation of mutations) {
				const config = mutation.slug ? this.pack(mutation.slug) : this;
				config.current = mutation.data;
				config.save();
			}
			Emitter_default.emit(Events_default.SettingsChanged);
		}
		shutdown() {
			this.migrator.abort();
			Emitter_default.off(Events_default.PackLoaded, this.onPackLoaded);
			Emitter_default.off(Events_default.PackUnloaded, this.onPackUnloaded);
			this.packs.clear();
			Logger.info(this.name, "Shutdown.");
		}
	}();
	//#endregion
	//#region src/settings/context/SectionContext.js
	var SectionContext = (0, react.createContext)({
		section: null,
		setSection: null
	});
	//#endregion
	//#region src/settings/components/DismissibleAlert.jsx
	function DismissibleAlert({ children, onDismiss, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(Alert, props, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__dismissibleAlert" }, /* @__PURE__ */ BdApi.React.createElement("div", null, children), /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			className: "BA__dismissibleAlertDismiss",
			onClick: onDismiss
		}, /* @__PURE__ */ BdApi.React.createElement(XIcon, {
			size: "xs",
			color: "currentColor"
		}))));
	}
	css`.BA__dismissibleAlert {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.BA__dismissibleAlertDismiss {
    flex-shrink: 0;
}``DismissibleAlert`;
	//#endregion
	//#region src/settings/components/ModuleSettingsHeader.jsx
	function ModuleSettingsHeader({ module, enabled, setEnabled, selected, onSelect, ...props }) {
		const { setSection } = (0, react.use)(SectionContext);
		const parentModules = (0, react.useMemo)(() => Core_default.getParentModules(module), [module]);
		const childModules = (0, react.useMemo)(() => Core_default.getChildModules(module), [module]);
		const breadcrumbs = parentModules.concat(module).map((m) => ({
			id: m.id,
			label: m.name
		}));
		const handleSetSettings = (pack, animation, type) => (value) => Config_default.pack(pack.slug).setAnimationConfig(animation.key, module.id, type, value);
		const defaultSettings = (animation, type) => module.buildDefaultSettings(animation, type);
		const handleResetSettings = (pack, animation, type) => {
			const setSettings = handleSetSettings(pack, animation, type);
			return () => setSettings(defaultSettings(animation, type));
		};
		const setEnterEnabled = selected.enter.animation ? (value) => !value && onSelect(AnimationType_default.Enter, null, null) : null;
		const setExitEnabled = selected.exit.animation ? (value) => !value && onSelect(AnimationType_default.Exit, null, null) : null;
		const animationSettings = useAnimationSettings(module, [{
			animation: selected.enter.animation,
			type: AnimationType_default.Enter,
			title: selected.enter.animation?.name,
			subtitle: true,
			settings: selected.enter.animation && module.getAnimationSettings(selected.enter.pack, selected.enter.animation, AnimationType_default.Enter),
			setSettings: selected.enter.animation && handleSetSettings(selected.enter.pack, selected.enter.animation, AnimationType_default.Enter),
			enabled: !!selected.enter.animation,
			setEnabled: setEnterEnabled,
			context: selected.enter.context,
			switchTooltip: !selected.enter.animation ? Messages.SELECT_ANIMATION_TO_ENABLE : null,
			defaults: () => defaultSettings(selected.enter.animation, AnimationType_default.Enter),
			onReset: selected.enter.animation && handleResetSettings(selected.enter.pack, selected.enter.animation, AnimationType_default.Enter)
		}, {
			animation: selected.exit.animation,
			type: AnimationType_default.Exit,
			title: selected.exit.animation?.name,
			subtitle: true,
			settings: selected.exit.animation && module.getAnimationSettings(selected.exit.pack, selected.exit.animation, AnimationType_default.Exit),
			setSettings: selected.exit.animation && handleSetSettings(selected.exit.pack, selected.exit.animation, AnimationType_default.Exit),
			enabled: !!selected.exit.animation,
			setEnabled: setExitEnabled,
			context: selected.exit.context,
			switchTooltip: !selected.exit.animation ? Messages.SELECT_ANIMATION_TO_ENABLE : null,
			defaults: () => defaultSettings(selected.exit.animation, AnimationType_default.Exit),
			onReset: selected.exit.animation && handleResetSettings(selected.exit.pack, selected.exit.animation, AnimationType_default.Exit)
		}]);
		const accordionHint = /* @__PURE__ */ BdApi.React.createElement(Hint, {
			className: "BA__accordionHint",
			href: Documentation.accordionUrl
		});
		const accordions = module.getAccordions();
		const accordionsSettings = useAnimationSettings(module, accordions ? [{
			animation: accordions.animation,
			type: AnimationType_default.Enter,
			title: "Smooth Expand",
			headerAfter: accordionHint,
			switchTooltip: accordions.enter.forceDisabled ? Messages.IMPLEMENTED_BY_ANIMATION(selected.enter.animation?.name) : null,
			...accordions.enter
		}, {
			animation: accordions.animation,
			type: AnimationType_default.Exit,
			title: "Smooth Collapse",
			headerAfter: accordionHint,
			switchTooltip: accordions.exit.forceDisabled ? Messages.IMPLEMENTED_BY_ANIMATION(selected.exit.animation?.name) : null,
			...accordions.exit
		}] : [], { hideOverflow: true });
		const errors = [selected.enter.error, selected.exit.error].filter(Boolean);
		const [alertDismissed, setAlertDismissed] = useDismissible(`moduleAlert:${module.id}`);
		return /* @__PURE__ */ BdApi.React.createElement(Stack$1, { gap: 8 }, module.alert && !alertDismissed && /* @__PURE__ */ BdApi.React.createElement(DismissibleAlert, {
			messageType: AlertTypes.WARNING,
			onDismiss: () => setAlertDismissed(true)
		}, module.alert), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__moduleSettingsHeader" }, /* @__PURE__ */ BdApi.React.createElement(AnimationCard, {
			...props,
			enter: !!selected.enter.animation,
			exit: !!selected.exit.animation,
			setEnter: setEnterEnabled,
			setExit: setExitEnabled,
			animationSettings,
			accordionsSettings,
			active: false,
			header: true,
			errors
		}), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__moduleSettingsHeading" }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__moduleSettingsTitle" }, /* @__PURE__ */ BdApi.React.createElement(Breadcrumbs, {
			breadcrumbs,
			activeId: module.id,
			renderCustomBreadcrumb: ({ label }, active) => /* @__PURE__ */ BdApi.React.createElement(Text$1, {
				variant: "heading-lg/semibold",
				className: `BA__moduleSettingsBreadcrumb ${active ? "BA__moduleSettingsBreadcrumb--active" : ""}`
			}, label),
			onBreadcrumbClick: ({ id }) => setSection(id)
		}), /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, {
			text: `${enabled ? "Disable" : "Enable"} ${module.name} animations`,
			hideOnClick: false
		}, (props) => /* @__PURE__ */ BdApi.React.createElement("div", props, /* @__PURE__ */ BdApi.React.createElement(SwitchIndicator, {
			checked: enabled,
			onChange: setEnabled
		})))), module.description && /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-sm/normal" }, typeof module.description === "function" ? module.description(setSection) : module.description), module.controls && /* @__PURE__ */ BdApi.React.createElement("div", null, module.controls({ module })), childModules.map((m) => /* @__PURE__ */ BdApi.React.createElement(Clickable, {
			tag: "div",
			onClick: () => setSection(m.id)
		}, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			key: m.id,
			variant: "text-md/normal",
			className: "BA__moduleSettingsLink"
		}, m.name, " animations", /* @__PURE__ */ BdApi.React.createElement(ArrowSmallRightIcon, { size: "xs" })))))));
	}
	css`.BA__moduleSettingsHeader {
    display: flex;
    gap: 20px;
}
    
.BA__moduleSettingsHeader .BA__animationCardWrapper {
    flex-shrink: 0;
}

.BA__moduleSettingsHeading {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
    flex-grow: 1;
}
    
.BA__moduleSettingsTitle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.BA__moduleSettingsBreadcrumb {
    color: var(--text-muted);
}
.BA__moduleSettingsBreadcrumb:not(.BA__moduleSettingsBreadcrumb--active) {
    cursor: pointer;
}
.BA__moduleSettingsBreadcrumb:hover,
.BA__moduleSettingsBreadcrumb.BA__moduleSettingsBreadcrumb--active {
    color: var(--text-strong);
}

.BA__moduleSettingsLink {
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--text-subtle);
    margin-top: 8px;
    cursor: pointer;
}
.BA__moduleSettingsLink:hover {
    text-decoration: underline;
}
.BA__moduleSettingsLink svg {
    transition: transform .2s;
}
.BA__moduleSettingsLink:hover svg {
    transform: translateX(4px);
}

.BA__accordionHint {
    margin: auto 0;
}``ModuleSettingsHeader`;
	//#endregion
	//#region src/settings/components/animation/AnimationList.jsx
	function AnimationItem({ module, pack, animation, selected, onSelect, ...props }) {
		const packConfig = (0, react.useMemo)(() => Config_default.pack(pack.slug), [pack]);
		const isActive = (type) => selected[type].packSlug === pack.slug && selected[type].animationKey === animation.key;
		const handleSelect = (type) => (value) => onSelect(type, value && animation && pack, value && animation);
		const handleSelectAll = () => {
			const value = !AnimationType_default.values().every((type) => isActive(type));
			AnimationType_default.values().forEach((type) => handleSelect(type)(value));
		};
		const handleSetSettings = (type) => (value) => packConfig.setAnimationConfig(animation.key, module.id, type, value);
		const defaultSettings = (type) => module.buildDefaultSettings(animation, type);
		const handleResetSettings = (type) => {
			const setSettings = handleSetSettings(type);
			return () => setSettings(defaultSettings(type));
		};
		const animationSettings = useAnimationSettings(module, AnimationType_default.values().map((type) => ({
			animation,
			type,
			settings: module.getAnimationSettings(pack, animation, type),
			setSettings: handleSetSettings(type),
			enabled: isActive(type),
			setEnabled: handleSelect(type),
			context: isActive(type) ? selected[type].context : null,
			defaults: () => defaultSettings(type),
			onReset: handleResetSettings(type)
		})));
		const errors = AnimationType_default.values().map((type) => isActive(type) && selected[type].error).filter(Boolean);
		return /* @__PURE__ */ BdApi.React.createElement(AnimationCard, {
			...props,
			key: animation.key,
			pack,
			animation,
			enter: isActive(AnimationType_default.Enter),
			exit: isActive(AnimationType_default.Exit),
			setEnter: handleSelect(AnimationType_default.Enter),
			setExit: handleSelect(AnimationType_default.Exit),
			onClick: handleSelectAll,
			animationSettings,
			errors
		});
	}
	function AnimationList({ animations, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__animationList" }, animations.map((animation) => /* @__PURE__ */ BdApi.React.createElement(AnimationItem, {
			key: animation.key,
			animation,
			...props
		})));
	}
	css`.BA__animationList {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, 1fr);
}``AnimationList`;
	//#endregion
	//#region src/settings/components/pack/PackPicture.jsx
	function PackPicture(props) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...props,
			width: "160",
			height: "192",
			viewBox: "0 0 160 192",
			fill: "none",
			xmlns: "http://www.w3.org/2000/svg"
		}, /* @__PURE__ */ BdApi.React.createElement("g", { "clip-path": "url(#clip0_364_497)" }, /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M0.12699 43.8989C-0.863275 37.1255 4.04575 30.863 11.0915 29.911L113.152 16.1221C120.197 15.1702 126.712 19.8893 127.702 26.6627L147.873 164.635C148.863 171.409 143.954 177.671 136.908 178.623L39.1006 191.837C29.7063 193.107 21.0203 186.814 19.7001 177.784L0.12699 43.8989Z",
			fill: "url(#paint0_linear_364_497)"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M10.1376 30.5728C9.06483 22.8787 14.3827 15.7647 22.0152 14.6834L124.678 0.138664C132.31 -0.942678 139.367 4.41806 140.44 12.1122L159.862 151.427C160.935 159.121 155.617 166.235 147.985 167.317L45.3224 181.861C37.6899 182.943 30.6329 177.582 29.5602 169.888L10.1376 30.5728Z",
			fill: "url(#paint1_linear_364_497)"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M19.0979 33.7417C18.3346 28.2753 22.1183 23.221 27.5489 22.4527L121.946 9.09852C127.376 8.33025 132.397 12.1389 133.161 17.6054L151.402 148.258C152.165 153.725 148.382 158.779 142.951 159.547L48.5544 172.901C43.1238 173.67 38.1027 169.861 37.3394 164.395L19.0979 33.7417Z",
			fill: "white"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			"fill-rule": "evenodd",
			"clip-rule": "evenodd",
			d: "M91.6298 136.767C104.339 149.771 112.123 129.724 110.522 118.561C108.63 105.362 94.2015 99.8837 86.5377 100.972C74.237 102.719 63.9659 114.548 65.9411 128.458C68.1366 143.918 82.7808 150.575 93.3682 149.072C90.9234 149.067 82.6965 148.49 79.9777 130.116C78.1393 117.689 81.5632 112.133 88.286 113.408C88.4372 113.441 95.755 115.191 97.0231 124.121C98.2858 133.013 91.6298 136.767 91.6298 136.767Z",
			fill: "url(#paint2_linear_364_497)"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			"fill-rule": "evenodd",
			"clip-rule": "evenodd",
			d: "M88.2981 113.397C80.9178 111.971 73.1222 118.994 74.7716 130.609C77.4648 149.574 91.7633 149.3 93.4668 149.058C105.768 147.311 116.039 135.481 114.063 121.572C111.868 106.111 97.2237 99.4545 86.6364 100.958C89.5111 100.135 102.892 101.887 105.39 119.481C107.02 130.954 98.2947 138.565 91.6643 136.784C91.5131 136.751 84.1953 135.001 82.9272 126.071C81.6645 117.179 88.2981 113.397 88.2981 113.397Z",
			fill: "url(#paint3_linear_364_497)"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M47.8507 42.0276C47.8349 41.9761 47.8165 41.9254 47.7955 41.8757C47.775 41.8263 47.752 41.778 47.7266 41.731C47.7016 41.6837 47.6741 41.6378 47.644 41.5935C47.6135 41.5495 47.5812 41.5068 47.5471 41.4665C47.5126 41.4252 47.4757 41.3858 47.4368 41.3487C47.399 41.312 47.3583 41.2768 47.3168 41.2438C47.2747 41.2126 47.231 41.1838 47.1858 41.1573C47.1407 41.129 47.0938 41.1021 47.0463 41.0783C46.9982 41.0547 46.9489 41.0336 46.8986 41.0152C46.5918 40.9079 46.262 40.8844 45.943 40.9471C45.4691 41.1322 45.0954 41.3724 44.8774 41.8574C44.8551 41.9067 44.8356 41.9571 44.819 42.0086C44.8031 42.0592 44.7885 42.1117 44.7771 42.1649C44.7655 42.2175 44.7565 42.2707 44.7504 42.3242C44.7443 42.3776 44.7413 42.4306 44.7396 42.4855C44.738 42.5404 44.7409 42.5904 44.7459 42.6475C44.7503 42.7011 44.7579 42.7544 44.7685 42.8072C44.7762 42.8608 44.7904 42.9092 44.8057 42.9648C44.8209 43.0204 44.8388 43.0652 44.8598 43.1169C44.9176 43.2604 44.9965 43.3944 45.094 43.5145C45.1259 43.5541 45.1607 43.5922 45.1964 43.6292C45.2322 43.6662 45.2707 43.7006 45.31 43.7329C45.3494 43.7662 45.3906 43.7971 45.4335 43.8257C45.4754 43.8544 45.5201 43.8806 45.5647 43.9058C45.6093 43.931 45.6564 43.9517 45.7045 43.9722C46.0531 44.1181 46.3754 44.1154 46.7427 44.0601C47.2113 43.8663 47.5776 43.6261 47.7889 43.1389C47.8103 43.0892 47.829 43.0385 47.8451 42.9869C47.8621 42.9358 47.8758 42.8837 47.886 42.8308C47.9183 42.6723 47.9271 42.51 47.9121 42.3489C47.9045 42.2954 47.8975 42.2459 47.8894 42.1892C47.8814 42.1326 47.8664 42.079 47.8507 42.0276Z",
			fill: "url(#paint4_linear_364_497)"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M60.4791 52.2765C60.5 52.3274 60.5239 52.377 60.5507 52.425C60.576 52.4723 60.6039 52.5182 60.6343 52.5624C60.6638 52.6066 60.6958 52.649 60.7301 52.6896C60.7647 52.7305 60.8015 52.7694 60.8403 52.8064C60.8783 52.8435 60.9184 52.8785 60.9603 52.9112C61.0025 52.9445 61.0466 52.9754 61.0922 53.0039C61.1372 53.0322 61.184 53.0581 61.2315 53.0818C61.2792 53.1057 61.3281 53.1268 61.3782 53.1451C61.4281 53.164 61.4792 53.18 61.531 53.1927C61.8483 53.2683 62.1804 53.2539 62.4899 53.151C62.9429 52.929 63.2885 52.6466 63.4547 52.1521C63.4714 52.1012 63.4854 52.0493 63.4967 51.9969C63.5081 51.9438 63.5171 51.8889 63.5235 51.8376C63.5298 51.784 63.5334 51.7302 63.5342 51.6763C63.535 51.6226 63.5329 51.5714 63.5281 51.5153C63.5233 51.4592 63.5135 51.4123 63.5054 51.3556C63.4974 51.299 63.4826 51.2538 63.4674 51.1992C63.4523 51.1446 63.4343 51.0988 63.4133 51.0471C63.3936 50.9971 63.3709 50.9484 63.3452 50.9012C63.3207 50.8543 63.2932 50.8088 63.2637 50.7636C63.2341 50.7184 63.2019 50.6767 63.1678 50.6364C63.1337 50.596 63.0975 50.556 63.0596 50.5183C63.0217 50.4806 62.9831 50.4461 62.9394 50.4124C62.8985 50.3787 62.8555 50.3476 62.8106 50.3193C62.7663 50.2899 62.7204 50.2631 62.6731 50.239C62.6254 50.2142 62.5772 50.1927 62.527 50.1725C62.4776 50.153 62.4272 50.1363 62.3759 50.1225C62.0311 50.0254 61.7375 50.0671 61.3936 50.1402C60.942 50.3641 60.595 50.6436 60.429 51.1401C60.4127 51.1929 60.3983 51.2464 60.3857 51.3008C60.3742 51.3548 60.3654 51.4093 60.3595 51.4642C60.3529 51.5191 60.3495 51.5743 60.3494 51.6296C60.3489 51.6854 60.3513 51.7397 60.3562 51.7958C60.3608 51.8508 60.3686 51.9055 60.3794 51.9596C60.3872 52.0142 60.4042 52.0675 60.4202 52.1209C60.437 52.1738 60.4566 52.2257 60.4791 52.2765Z",
			fill: "url(#paint5_linear_364_497)"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M58.6152 47.0068C58.6285 46.9597 58.6387 46.9131 58.6477 46.8656C58.6567 46.818 58.6614 46.7701 58.665 46.7212C58.6689 46.6732 58.6701 46.6249 58.6686 46.5767C58.6672 46.5284 58.6631 46.4802 58.6565 46.4323C58.6523 46.3843 58.6455 46.3365 58.6362 46.2891C58.6241 46.2415 58.6112 46.1949 58.5954 46.1499C58.5797 46.1042 58.5614 46.0594 58.5406 46.0158C58.5207 45.9718 58.4981 45.929 58.473 45.8877C58.374 45.7258 58.2418 45.5866 58.0851 45.4795C57.9284 45.3724 57.7507 45.2998 57.5639 45.2665C56.9696 45.1523 53.7461 45.6766 52.9821 45.8398C52.5752 46.0532 52.2879 46.3021 52.1465 46.7563C52.1318 46.8014 52.1205 46.8472 52.1103 46.8938C52.1001 46.9405 52.0933 46.9887 52.0884 47.0357C52.0835 47.0826 52.0808 47.1303 52.0804 47.1787C52.0799 47.2271 52.0823 47.274 52.087 47.3217C52.0917 47.3694 52.1003 47.4155 52.1071 47.4629C52.1161 47.5098 52.1276 47.5562 52.1416 47.602C52.1545 47.648 52.1704 47.6931 52.1891 47.7371C52.2069 47.7812 52.227 47.8243 52.2495 47.8662C52.333 48.0206 52.4466 48.1567 52.5837 48.2663C52.7208 48.3759 52.8785 48.4568 53.0475 48.5042C53.2375 48.5572 53.4351 48.5771 53.6318 48.5631C54.2106 48.5313 54.797 48.3975 55.3708 48.316C56.1712 48.2022 56.9789 48.1169 57.7717 47.9643C58.1838 47.7355 58.4792 47.477 58.6152 47.0068Z",
			fill: "url(#paint6_linear_364_497)"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M104.452 55.4932C105.883 53.1573 106.79 49.8482 106.973 47.1232C107.196 43.8283 106.508 40.383 104.27 37.8487C102.357 35.6822 99.4849 34.4981 96.6252 34.3432C93.987 34.201 91.124 34.7918 88.4959 35.1579L58.7608 39.3191L53.0144 40.1357C52.1903 40.2528 51.3438 40.3237 50.5284 40.4805C50.2035 40.5312 49.8999 40.6739 49.6536 40.8918C49.5264 41.0127 49.4245 41.1578 49.3539 41.3185C49.2832 41.4792 49.2453 41.6523 49.2422 41.8278C49.2417 41.8762 49.2423 41.9245 49.2459 41.9723C49.2501 42.02 49.2568 42.0675 49.2661 42.1145C49.2744 42.1618 49.2853 42.2087 49.2987 42.2549C49.3114 42.3012 49.3266 42.3467 49.3443 42.3913C49.3808 42.4807 49.4254 42.5665 49.4775 42.6478C49.5041 42.6871 49.5317 42.7262 49.5623 42.7639C49.5929 42.8016 49.6252 42.837 49.6584 42.8711C49.8982 43.1132 50.2142 43.265 50.553 43.3011C51.1149 43.3358 53.1592 42.9517 53.8165 42.8583L65.9119 41.1396C66.4384 41.0648 66.9972 40.9296 67.5311 40.9442C67.9321 40.9555 68.2853 41.0745 68.5554 41.3851C68.8108 41.6772 68.9431 42.057 68.9246 42.4446C68.9072 42.676 68.8294 42.8989 68.6991 43.091C68.5687 43.2831 68.3902 43.4376 68.1815 43.5391C67.6328 43.8273 66.8942 43.8513 66.2851 43.9358L62.5608 44.4492C61.9427 44.5371 61.2569 44.5704 60.6629 44.7463C60.4156 44.814 60.1863 44.9356 59.9915 45.1023C59.8598 45.2137 59.7531 45.3517 59.6785 45.5072C59.6039 45.6627 59.563 45.8322 59.5585 46.0046C59.5489 46.3886 59.6756 46.8288 59.9573 47.0957C60.178 47.3167 60.4678 47.4554 60.7783 47.4887C61.4675 47.561 62.3016 47.3437 62.989 47.2408L67.594 46.5864C68.2811 46.4888 69.0334 46.302 69.7235 46.2922C70.1326 46.2866 70.5103 46.378 70.8075 46.6721C70.9503 46.809 71.0626 46.9743 71.1374 47.1575C71.2121 47.3406 71.2475 47.5374 71.2413 47.735C71.2365 47.9687 71.1708 48.197 71.0508 48.3975C70.9307 48.598 70.7603 48.7636 70.5566 48.8781C69.399 49.5334 65.8126 49.2201 64.9229 50.1253C64.7998 50.2588 64.7051 50.4159 64.6445 50.5871C64.584 50.7583 64.5587 50.94 64.5704 51.1213C64.5713 51.3152 64.6127 51.5069 64.6922 51.6839C64.7716 51.8609 64.8873 52.0192 65.0317 52.1487C65.3096 52.3878 65.6694 52.5096 66.0354 52.4885C66.6586 52.4735 67.3324 52.3189 67.9525 52.2308L89.9636 49.103C90.8104 48.9827 91.6754 48.8199 92.5301 48.7699C93.0358 48.8746 93.4749 49.0434 93.7811 49.4897C94.062 49.8985 94.096 50.3519 94.0766 50.8297C94.012 51.2682 93.8591 51.689 93.6272 52.0666C93.3952 52.4442 93.0891 52.7709 92.7272 53.0268C92.4863 53.2013 92.22 53.3377 91.9376 53.4311C91.1221 53.609 90.2717 53.6973 89.4414 53.8153C87.7653 54.0535 86.0811 54.2644 84.4099 54.5303C84.0268 58.1875 83.536 61.8411 83.1965 65.5016L88.2114 64.789C89.0449 64.6706 89.9378 64.468 90.7761 64.4582C91.2511 64.5389 91.6963 64.7205 91.9944 65.1175C92.3213 65.5545 92.3882 66.143 92.2967 66.6678C92.2122 67.0968 92.0433 67.5046 91.7997 67.8677C91.5561 68.2307 91.2427 68.5416 90.8777 68.7823C90.5982 68.9642 90.2879 69.0938 89.962 69.1646C89.4074 69.2928 88.8223 69.3392 88.2583 69.4162L85.6488 69.787C83.1548 70.1414 80.6574 70.5467 78.1573 70.8515C78.1439 70.3132 78.2548 69.7331 78.316 69.1947L78.6867 65.9312L79.8911 55.1766L66.03 57.1399C65.42 62.3513 64.9158 67.5896 64.269 72.8083C63.9473 76.2392 63.5118 79.6685 63.1293 83.0934L62.8127 85.9466C62.7831 86.2336 62.7083 86.5206 62.6908 86.8047C62.6761 86.9189 62.6926 87.035 62.7386 87.1406C62.8264 87.1711 62.922 87.1705 63.0095 87.1389C64.8136 86.9582 66.6278 86.6342 68.4234 86.379L86.4549 83.8167C89.2024 83.4263 91.9513 83.0683 94.6113 82.2468C97.119 81.47 99.5452 80.3202 101.512 78.5546C105.213 75.232 106.367 70.6266 106.612 65.8581C106.784 62.5029 106.357 58.8904 104.02 56.2998L104.016 56.2771C104.174 56.0193 104.316 55.7585 104.452 55.4932Z",
			fill: "url(#paint7_linear_364_497)"
		})), /* @__PURE__ */ BdApi.React.createElement("defs", null, /* @__PURE__ */ BdApi.React.createElement("linearGradient", {
			id: "paint0_linear_364_497",
			x1: "0.447603",
			y1: "16.413",
			x2: "148.448",
			y2: "191.541",
			gradientUnits: "userSpaceOnUse"
		}, /* @__PURE__ */ BdApi.React.createElement("stop", { "stop-color": "#508AB7" }), /* @__PURE__ */ BdApi.React.createElement("stop", {
			offset: "1",
			"stop-color": "#1F2569"
		})), /* @__PURE__ */ BdApi.React.createElement("linearGradient", {
			id: "paint1_linear_364_497",
			x1: "11.1858",
			y1: "19.1536",
			x2: "158.875",
			y2: "162.67",
			gradientUnits: "userSpaceOnUse"
		}, /* @__PURE__ */ BdApi.React.createElement("stop", { "stop-color": "#41D1FF" }), /* @__PURE__ */ BdApi.React.createElement("stop", {
			offset: "1",
			"stop-color": "#5865F2"
		})), /* @__PURE__ */ BdApi.React.createElement("linearGradient", {
			id: "paint2_linear_364_497",
			x1: "73.3725",
			y1: "107.902",
			x2: "107.5",
			y2: "144.392",
			gradientUnits: "userSpaceOnUse"
		}, /* @__PURE__ */ BdApi.React.createElement("stop", { "stop-color": "#5865F2" }), /* @__PURE__ */ BdApi.React.createElement("stop", {
			offset: "1",
			"stop-color": "#41D1FF"
		})), /* @__PURE__ */ BdApi.React.createElement("linearGradient", {
			id: "paint3_linear_364_497",
			x1: "109.369",
			y1: "139.553",
			x2: "70.6513",
			y2: "110.457",
			gradientUnits: "userSpaceOnUse"
		}, /* @__PURE__ */ BdApi.React.createElement("stop", { "stop-color": "#5865F2" }), /* @__PURE__ */ BdApi.React.createElement("stop", {
			offset: "1",
			"stop-color": "#41D1FF"
		})), /* @__PURE__ */ BdApi.React.createElement("linearGradient", {
			id: "paint4_linear_364_497",
			x1: "44.7007",
			y1: "44.5189",
			x2: "111.604",
			y2: "78.0676",
			gradientUnits: "userSpaceOnUse"
		}, /* @__PURE__ */ BdApi.React.createElement("stop", { "stop-color": "#41D1FF" }), /* @__PURE__ */ BdApi.React.createElement("stop", {
			offset: "1",
			"stop-color": "#5865F2"
		})), /* @__PURE__ */ BdApi.React.createElement("linearGradient", {
			id: "paint5_linear_364_497",
			x1: "44.7007",
			y1: "44.5189",
			x2: "111.604",
			y2: "78.0676",
			gradientUnits: "userSpaceOnUse"
		}, /* @__PURE__ */ BdApi.React.createElement("stop", { "stop-color": "#41D1FF" }), /* @__PURE__ */ BdApi.React.createElement("stop", {
			offset: "1",
			"stop-color": "#5865F2"
		})), /* @__PURE__ */ BdApi.React.createElement("linearGradient", {
			id: "paint6_linear_364_497",
			x1: "44.7007",
			y1: "44.5189",
			x2: "111.604",
			y2: "78.0676",
			gradientUnits: "userSpaceOnUse"
		}, /* @__PURE__ */ BdApi.React.createElement("stop", { "stop-color": "#41D1FF" }), /* @__PURE__ */ BdApi.React.createElement("stop", {
			offset: "1",
			"stop-color": "#5865F2"
		})), /* @__PURE__ */ BdApi.React.createElement("linearGradient", {
			id: "paint7_linear_364_497",
			x1: "44.7007",
			y1: "44.5189",
			x2: "111.604",
			y2: "78.0676",
			gradientUnits: "userSpaceOnUse"
		}, /* @__PURE__ */ BdApi.React.createElement("stop", { "stop-color": "#41D1FF" }), /* @__PURE__ */ BdApi.React.createElement("stop", {
			offset: "1",
			"stop-color": "#5865F2"
		})), /* @__PURE__ */ BdApi.React.createElement("clipPath", { id: "clip0_364_497" }, /* @__PURE__ */ BdApi.React.createElement("rect", {
			width: "160",
			height: "192",
			fill: "white"
		}))));
	}
	//#endregion
	//#region src/components/icons/ShopIcon.jsx
	function ShopIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M2.63 4.19A3 3 0 0 1 5.53 2H7a1 1 0 0 1 1 1v3.98a3.07 3.07 0 0 1-.3 1.35A2.97 2.97 0 0 1 4.98 10c-2 0-3.44-1.9-2.9-3.83l.55-1.98ZM10 2a1 1 0 0 0-1 1v4a3 3 0 0 0 3 3 3 3 0 0 0 3-2.97V3a1 1 0 0 0-1-1h-4ZM17 2a1 1 0 0 0-1 1v3.98a3.65 3.65 0 0 0 0 .05A2.95 2.95 0 0 0 19.02 10c2 0 3.44-1.9 2.9-3.83l-.55-1.98A3 3 0 0 0 18.47 2H17Z"
		}), /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M21 11.42V19a3 3 0 0 1-3 3h-2.75a.25.25 0 0 1-.25-.25V16a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v5.75c0 .14-.11.25-.25.25H6a3 3 0 0 1-3-3v-7.58c0-.18.2-.3.37-.24a4.46 4.46 0 0 0 4.94-1.1c.1-.12.3-.12.4 0a4.49 4.49 0 0 0 6.58 0c.1-.12.3-.12.4 0a4.45 4.45 0 0 0 4.94 1.1c.17-.07.37.06.37.24Z"
		}));
	}
	//#endregion
	//#region src/components/icons/LibraryIcon.jsx
	function LibraryIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M5.5 3A1.5 1.5 0 0 1 7 4.5v15A1.5 1.5 0 0 1 5.5 21h-2A1.5 1.5 0 0 1 2 19.5v-15A1.5 1.5 0 0 1 3.5 3zm6 0A1.5 1.5 0 0 1 13 4.5v15a1.5 1.5 0 0 1-1.5 1.5h-2A1.5 1.5 0 0 1 8 19.5v-15A1.5 1.5 0 0 1 9.5 3zm7.281 3.124l3.214 12.519a1.5 1.5 0 0 1-1.08 1.826l-1.876.48a1.5 1.5 0 0 1-1.826-1.08L13.999 7.354a1.5 1.5 0 0 1 1.08-1.826l1.876-.483a1.5 1.5 0 0 1 1.826 1.08"
		}));
	}
	//#endregion
	//#region src/settings/components/NoPacksPlaceholder.jsx
	function NoPacksPlaceholder({ title = "Install Animation Packs", description = /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Expand your animation library with collections of\xA0community-made animations"), actions = ["catalog", "library"] }) {
		const [section, setSection] = useSection();
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__noPacks" }, /* @__PURE__ */ BdApi.React.createElement(PackPicture, { className: "BA__noPacksPicture" }), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__noPacksContent" }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__noPacksTitle",
			variant: "heading-xl/bold"
		}, title), /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__noPacksDescription",
			variant: "text-md/normal"
		}, description), actions && /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__noPacksActions" }, actions.map((action) => {
			switch (action) {
				case "catalog": return /* @__PURE__ */ BdApi.React.createElement(Button$1, {
					icon: ShopIcon,
					text: "Catalog",
					onClick: () => setSection(SettingsSection_default.Catalog)
				});
				case "library": return /* @__PURE__ */ BdApi.React.createElement(Button$1, {
					variant: "secondary",
					icon: LibraryIcon,
					text: "Library",
					onClick: () => setSection(SettingsSection_default.Library)
				});
				default: return action;
			}
		}))));
	}
	css`.BA__noPacks {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 48px;
    justify-content: center;
}
.BA__noPacksContent {
    padding-bottom: 20px;
}
.BA__noPacksPicture {
    flex-shrink: 0;
}
.BA__noPacksDescription {
    margin-top: 8px;
    max-width: 360px;
}
.BA__noPacksActions {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}``NoPacksPlaceholder`;
	//#endregion
	//#region src/settings/hooks/usePagination.js
	function usePagination(allItems, pageSize, dependencies = []) {
		return {
			page: 1,
			setPage: () => {},
			offset: 0,
			items: allItems
		};
	}
	//#endregion
	//#region src/components/icons/ChevronSmallDownIcon.jsx
	function ChevronSmallDownIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M5.3 9.3a1 1 0 0 1 1.4 0l5.3 5.29 5.3-5.3a1 1 0 1 1 1.4 1.42l-6 6a1 1 0 0 1-1.4 0l-6-6a1 1 0 0 1 0-1.42Z"
		}));
	}
	//#endregion
	//#region src/components/icons/ChevronSmallUpIcon.jsx
	function ChevronSmallUpIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M5.3 14.7a1 1 0 0 0 1.4 0L12 9.42l5.3 5.3a1 1 0 0 0 1.4-1.42l-6-6a1 1 0 0 0-1.4 0l-6 6a1 1 0 0 0 0 1.42Z"
		}));
	}
	//#endregion
	//#region src/hooks/useRafFn.js
	function useRafFn(callback, initiallyActive = true) {
		const raf = (0, react.useRef)(null);
		const rafActivity = (0, react.useRef)(false);
		const rafCallback = useLatest(callback);
		const step = (0, react.useCallback)((time) => {
			if (rafActivity.current) {
				rafCallback.current(time);
				raf.current = requestAnimationFrame(step);
			}
		}, [rafCallback]);
		const result = (0, react.useMemo)(() => [
			() => {
				if (rafActivity.current) {
					rafActivity.current = false;
					raf.current && cancelAnimationFrame(raf.current);
				}
			},
			() => {
				if (!rafActivity.current) {
					rafActivity.current = true;
					raf.current = requestAnimationFrame(step);
				}
			},
			() => rafActivity.current
		], [step]);
		(0, react.useEffect)(() => {
			if (initiallyActive) result[1]();
			return result[0];
		}, [initiallyActive, result]);
		return result;
	}
	//#endregion
	//#region src/components/icons/ArrowSmallUpDownIcon.jsx
	function ArrowSmallUpDownIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M16.3 21.7a1 1 0 0 0 1.4 0l4-4a1 1 0 0 0-1.4-1.4L18 18.58V3a1 1 0 1 0-2 0v15.59l-2.3-2.3a1 1 0 0 0-1.4 1.42l4 4ZM6.3 2.3a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L8 5.42V21a1 1 0 1 1-2 0V5.41l-2.3 2.3a1 1 0 0 1-1.4-1.42l4-4Z"
		}));
	}
	//#endregion
	//#region src/settings/components/SortSelect.jsx
	function SortSelect({ options, value, onChange }) {
		const buttonRef = (0, react.useRef)();
		const selectedSort = options.find((o) => o.value === value);
		return /* @__PURE__ */ BdApi.React.createElement(Popout, {
			targetElementRef: buttonRef,
			position: "bottom",
			align: "right",
			renderPopout: (props) => /* @__PURE__ */ BdApi.React.createElement(ContextMenu$1.Menu, props, /* @__PURE__ */ BdApi.React.createElement(ContextMenu$1.Group, { label: "Sort" }, options.map((option) => /* @__PURE__ */ BdApi.React.createElement(ContextMenu$1.RadioItem, {
				key: option.value,
				id: `sort-${option.value}`,
				group: "sort",
				label: option.label,
				checked: option.value === value,
				action: () => onChange(option.value)
			}))))
		}, (props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			...props,
			ref: buttonRef,
			variant: "secondary",
			rounded: true,
			icon: ArrowSmallUpDownIcon,
			text: selectedSort?.label ?? "Sort"
		}));
	}
	//#endregion
	//#region src/settings/components/pack/PackCard.jsx
	function PackCard({ pack, location = PackContentLocation.CATALOG }) {
		const onClick = () => ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(PackModal, {
			...props,
			filename: pack.filename,
			location
		}));
		const cardRef = useIsVisible((0, react.useCallback)((isIntersecting) => {
			if (location === PackContentLocation.CATALOG && isIntersecting) PackRegistry_default.markAsKnown(pack);
		}, [pack, location]), .5);
		return /* @__PURE__ */ BdApi.React.createElement(Clickable, {
			tag: "div",
			innerRef: cardRef,
			className: "BA__packCard",
			onClick
		}, /* @__PURE__ */ BdApi.React.createElement(PackContent, {
			className: "BA__packCardContent",
			pack,
			location,
			size: "sm"
		}));
	}
	css`.BA__packCard {
    color: var(--background-base-lowest);
    background-color: currentColor;
    box-shadow: 0 0 0 1px var(--border-subtle);
    border-radius: 16px;
    cursor: pointer;
    overflow: clip;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: color .2s ease;
}
.BA__packCard:hover {
    color: var(--background-base-lower);
}
.BA__packCardContent {
    flex: 1;
}``PackCard`;
	//#endregion
	//#region src/settings/hooks/usePackSearch.js
	var defaultSortOptions = [{
		value: "name",
		label: "By name",
		compare: (a, b) => a.name.localeCompare(b.name)
	}, {
		value: "author",
		label: "By author",
		compare: (a, b) => a.author.localeCompare(b.author)
	}];
	var defaultSearchableFields = [
		"name",
		"author",
		"description"
	];
	function usePackSearch(allItems, { searchableFields = defaultSearchableFields, sort: { options: sortOptions = defaultSortOptions, preference: sortPreference, setPreference: setSortPreference } = {} } = {}) {
		const [query, setQuery] = (0, react.useState)("");
		const trimmedQuery = query.trim();
		const [sort, setSort] = (0, react.useState)(sortPreference ?? sortOptions[0].value);
		const selectedSort = sortOptions.find((o) => o.value === sort);
		(0, react.useEffect)(() => {
			setSortPreference?.(sort);
		}, [sort]);
		return {
			items: matchSorter(allItems, trimmedQuery, { keys: searchableFields }).sort(selectedSort?.compare ?? (() => 0)),
			query,
			setQuery,
			sort,
			setSort,
			selectedSort,
			sortOptions,
			searchableFields
		};
	}
	//#endregion
	//#region src/settings/components/pack/PackListView.jsx
	function PackListView({ title, items: allItems, pending = false, error = null, location, empty = /* @__PURE__ */ BdApi.React.createElement(NoPacksPlaceholder, null), actions, sortOptions, searchableFields, pageSize = 6, adjective = "available", data, leading, trailing }) {
		const { items: filteredItems, query, setQuery, sort, setSort, sortOptions: displayedSortOptions } = usePackSearch(allItems, {
			searchableFields,
			sort: {
				options: sortOptions,
				preference: data?.sort,
				setPreference: (value) => data && (data.sort = value)
			}
		});
		const { page, setPage, offset, items } = usePagination(filteredItems, pageSize, [query, pending]);
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packListView" }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packListViewHeader" }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "heading-xl/semibold",
			color: "text-strong"
		}, title), /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, { noop: true }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packListViewSearchBar" }, /* @__PURE__ */ BdApi.React.createElement(SearchBar, {
			className: "BA__packListViewSearchBar",
			placeholder: "Search",
			size: "md",
			query,
			onChange: setQuery,
			onClear: () => setQuery(""),
			autoFocus: true
		})))), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packListViewActionBar" }, actions && /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packListViewActions" }, actions), /* @__PURE__ */ BdApi.React.createElement(SortSelect, {
			options: displayedSortOptions,
			value: sort,
			onChange: setSort
		})), pending ? /* @__PURE__ */ BdApi.React.createElement(Spinner, { className: "BA__packListViewSpinner" }) : error ? /* @__PURE__ */ BdApi.React.createElement(ErrorCard, { text: error }) : allItems.length > 0 ? /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, items.length > 0 ? /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, leading, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packListViewList" }, items.map((pack) => /* @__PURE__ */ BdApi.React.createElement(PackCard, {
			key: pack.filename,
			pack,
			location
		}))), /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__packListViewMeta",
			variant: "text-sm/medium",
			color: "text-muted"
		}, "Displaying ", items.length < filteredItems.length ? /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement("b", null, offset + 1, "-", offset + items.length), " out of ") : filteredItems.length === allItems.length && allItems.length > 1 ? "all " : "", items.length < filteredItems.length ? /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, filteredItems.length) : /* @__PURE__ */ BdApi.React.createElement("b", null, filteredItems.length), filteredItems.length === allItems.length && ` ${adjective}`, filteredItems.length > 1 ? " packs" : " pack", filteredItems.length < allItems.length && ` • ${allItems.length} ${adjective}`), trailing) : /* @__PURE__ */ BdApi.React.createElement(NoPacksPlaceholder, {
			title: "No results",
			description: "There are no packs matching your search",
			actions: [/* @__PURE__ */ BdApi.React.createElement(Button$1, {
				text: "Show all",
				onClick: () => setQuery("")
			})]
		})) : empty);
	}
	css`.BA__packListViewHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    margin-bottom: 16px;
}
.BA__packListViewSearchBar {
    flex-basis: 260px;
}
.BA__packListViewActionBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.BA__packListViewActions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.BA__packListViewMeta {
    margin: 16px 0;
    text-align: right;
}
.BA__packListViewMeta b {
    font-weight: 600;
    color: var(--text-default);
}
.BA__packListViewList {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}
.BA__packListViewSpinner {
    padding: 40px;
}``PackListView`;
	//#endregion
	//#region src/components/icons/FolderIcon.jsx
	function FolderIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"
		}));
	}
	//#endregion
	//#region src/settings/views/Library.jsx
	var usageCompare = (a, b) => Core_default.getModulesUsingPack(b).length - Core_default.getModulesUsingPack(a).length;
	var librarySortOptions = [
		{
			value: "default",
			label: "Default",
			compare: (a, b) => {
				const [hasUpdateA, hasUpdateB] = [a, b].map((pack) => PackRegistry_default.hasUpdate(pack));
				if (hasUpdateA !== hasUpdateB) return hasUpdateA ? -1 : 1;
				return usageCompare(a, b);
			}
		},
		{
			value: "usage",
			label: "By usage",
			compare: usageCompare
		},
		...defaultSortOptions
	];
	function Library() {
		const registry = usePackRegistry();
		const [data] = useData("library");
		return /* @__PURE__ */ BdApi.React.createElement(PackListView, {
			title: "Library",
			items: PackManager_default.getAllPacks(true),
			sortOptions: librarySortOptions,
			data,
			adjective: "installed",
			empty: /* @__PURE__ */ BdApi.React.createElement(NoPacksPlaceholder, { actions: ["catalog"] }),
			actions: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, registry.verifier.hasIssues() && /* @__PURE__ */ BdApi.React.createElement(Button$1, {
				variant: "critical-primary",
				icon: CircleWarningIcon,
				text: "Resolve issues",
				onClick: () => registry.verifier.showModal()
			}), registry.hasOutdatedPacks() && /* @__PURE__ */ BdApi.React.createElement(Button$1, {
				icon: DownloadIcon,
				text: "Update all",
				onClick: () => registry.updateAll(),
				loading: registry.hasPending,
				disabled: registry.hasPending
			}), /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, { text: "Open Pack Directory" }, (props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
				...props,
				variant: "icon-only",
				icon: FolderIcon,
				onClick: () => electron.default.shell.openPath(PackManager_default.addonFolder)
			})), /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, { text: "Check for updates" }, (props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
				...props,
				variant: "icon-only",
				icon: RefreshIcon,
				onClick: () => registry.checkForUpdates({ useToasts: true }),
				loading: registry.isPending(),
				disabled: registry.isPending()
			}))),
			location: PackContentLocation.LIBRARY,
			leading: registry.hasError && /* @__PURE__ */ BdApi.React.createElement(Alert, { messageType: AlertTypes.ERROR }, Messages.CATALOG_OUT_OF_DATE)
		});
	}
	//#endregion
	//#region src/settings/components/pack/PackSelect.jsx
	var packSelectSortOptions = librarySortOptions.filter((option) => ["usage", "name"].includes(option.value));
	function scrollIntoView(el) {
		if (typeof el === "string") el = document.querySelector(el);
		if (!el) return;
		if (typeof el.scrollIntoViewIfNeeded === "function") el.scrollIntoViewIfNeeded(false);
		else el.scrollIntoView({
			block: "nearest",
			inline: "nearest"
		});
	}
	function PackSelectContent({ pack }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packSelectContent" }, /* @__PURE__ */ BdApi.React.createElement(PackSplash, { pack }), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packSelectContentContainer" }, /* @__PURE__ */ BdApi.React.createElement(PackHeader, {
			pack,
			size: "sm",
			popoutType: "tooltip"
		}), pack.description && /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__packSelectContentDescription",
			variant: "text-sm/medium",
			color: "text-muted",
			lineClamp: 2
		}, pack.description)));
	}
	function PackSelectOption({ pack, selected = false, focused = false, active = false, onClick }) {
		const props = useListItem(pack.slug);
		return /* @__PURE__ */ BdApi.React.createElement(Clickable, {
			...props,
			className: (0, clsx.default)({
				"BA__packSelectOption": true,
				"BA__packSelectOption--focused": focused,
				"BA__packSelectOption--selected": selected
			}),
			onClick,
			focusProps: { enabled: false },
			role: "option"
		}, /* @__PURE__ */ BdApi.React.createElement(PackSelectContent, { pack }), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packSelectTrailing" }, active && /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packSelectActiveDot" })));
	}
	function PackSelectPopout({ selectRef, packs, selected, onSelect, isActive, updatePosition }) {
		const popoutRef = (0, react.useRef)();
		const scrollerRef = (0, react.useRef)();
		const { width } = useElementBounding(selectRef);
		useRafFn(updatePosition);
		const [focused, setFocused] = (0, react.useState)(selected);
		const setFocus = (0, react.useCallback)((selector, slug) => {
			setFocused(slug);
			scrollIntoView(selector);
		}, [setFocused]);
		const scrollToStart = (0, react.useCallback)(() => new Promise((resolve) => {
			scrollerRef.current?.scrollTo({ top: 0 });
			requestAnimationFrame(resolve);
		}), [scrollerRef]);
		const scrollToEnd = (0, react.useCallback)(() => new Promise((resolve) => {
			scrollerRef.current?.scrollTo({ top: scrollerRef.current?.scrollHeight });
			requestAnimationFrame(resolve);
		}), [scrollerRef]);
		const id = (0, react.useId)();
		const navigator = useListNavigator({
			id,
			isEnabled: true,
			wrap: true,
			defaultFocused: selected,
			useVirtualFocus: true,
			setFocus,
			scrollToStart,
			scrollToEnd,
			disableClickOnSpace: true
		});
		(0, react.useLayoutEffect)(() => scrollIntoView(`[data-list-item-id="${id}___${selected}"]`), []);
		useFocusLock(popoutRef);
		const [preferences] = useData("preferences");
		const { items, query, setQuery, sort, setSort, sortOptions } = usePackSearch(packs, {
			searchableFields: ["name", "description"],
			sort: {
				options: packSelectSortOptions,
				preference: preferences.sort,
				setPreference: (value) => preferences.sort = value
			}
		});
		return /* @__PURE__ */ BdApi.React.createElement(ListNavigatorProvider, { navigator }, /* @__PURE__ */ BdApi.React.createElement("div", {
			ref: popoutRef,
			className: "BA__packSelectPopout",
			style: { width },
			onKeyDown: navigator.containerProps.onKeyDown
		}, /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, { noop: true }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packSelectPopoutHeader" }, /* @__PURE__ */ BdApi.React.createElement(SearchBar, {
			placeholder: "Search",
			size: "md",
			query,
			onChange: setQuery,
			onClear: () => setQuery(""),
			autoFocus: true
		}), /* @__PURE__ */ BdApi.React.createElement(SortSelect, {
			options: sortOptions,
			value: sort,
			onChange: setSort
		}))), /* @__PURE__ */ BdApi.React.createElement(ListNavigatorContainer, null, ({ ref, ...props }) => /* @__PURE__ */ BdApi.React.createElement("div", {
			...props,
			ref: (el) => {
				ref.current = el;
				scrollerRef.current = el;
			},
			className: (0, clsx.default)("BA__packSelectPopoutScroller", DiscordClasses.Scroller.thin),
			role: "listbox"
		}, items.map((item) => /* @__PURE__ */ BdApi.React.createElement(PackSelectOption, {
			key: item.slug,
			pack: item,
			selected: item.slug === selected,
			focused: item.slug === focused,
			active: isActive?.(item),
			onClick: () => onSelect(item)
		}))))));
	}
	function PackSelect({ packs, selected, onSelect, className, isActive }) {
		const selectRef = (0, react.useRef)();
		const selectedPack = packs.find((pack) => pack.slug === selected);
		return /* @__PURE__ */ BdApi.React.createElement(Popout, {
			targetElementRef: selectRef,
			position: "bottom",
			align: "center",
			clickTrap: true,
			renderPopout: ({ closePopout, updatePosition }) => /* @__PURE__ */ BdApi.React.createElement(PackSelectPopout, {
				selectRef,
				packs,
				selected,
				onSelect: (pack) => {
					onSelect(pack);
					closePopout();
				},
				isActive,
				updatePosition
			})
		}, (props, { isShown }) => /* @__PURE__ */ BdApi.React.createElement(Clickable, {
			...props,
			innerRef: selectRef,
			className: (0, clsx.default)("BA__packSelect", className)
		}, selectedPack ? /* @__PURE__ */ BdApi.React.createElement(PackSelectContent, {
			key: selectedPack.slug,
			pack: selectedPack
		}) : /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__packSelectPlaceholder",
			variant: "text-md/normal",
			color: "text-muted"
		}, "Select pack"), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__packSelectTrailing" }, isShown ? /* @__PURE__ */ BdApi.React.createElement(ChevronSmallUpIcon, {
			size: "md",
			color: colors.INTERACTIVE_ICON_DEFAULT
		}) : /* @__PURE__ */ BdApi.React.createElement(ChevronSmallDownIcon, {
			size: "md",
			color: colors.INTERACTIVE_ICON_DEFAULT
		}))));
	}
	css`.BA__packSelect {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-radius: 8px;
    background-color: var(--background-base-lowest);
    box-shadow: 0 0 0 1px var(--border-subtle);
    transition: background-color .2s;
    min-height: 84px;
    overflow: hidden;
}
.BA__packSelect:hover {
    background-color: var(--background-base-lower);
}
.BA__packSelectPlaceholder {
    padding-left: 16px;
}

.BA__packSelectPopout {
    display: flex;
    flex-direction: column;
    max-height: 360px;
    border-radius: 8px;
    background-color: var(--background-base-lowest);
    box-shadow: 0 0 0 1px var(--border-subtle),
        var(--shadow-high);
    overflow: hidden;
}
.BA__packSelectPopoutHeader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.BA__packSelectPopoutScroller {
    overflow: hidden auto;
}

.BA__packSelectOption {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    cursor: pointer;
    background-color: var(--background-base-lowest);
    transition: background-color .2s;
}
.BA__packSelectOption:is(:hover, :focus-visible),
.BA__packSelectOption--focused {
    background-color: var(--background-base-lower);
}
.BA__packSelectOption--selected {
    background-color: var(--background-base-low) !important;
}

.BA__packSelectContent {
    height: 84px;
    display: flex;
    align-items: stretch;
}
.BA__packSelectContentContainer {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.BA__packSelectContentDescription {
    margin-top: 2px;
    word-break: break-word;
}

.BA__packSelectTrailing {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    box-sizing: content-box;
    width: 24px;
    padding-left: 12px;
    padding-right: 16px;
    flex-shrink: 0;
}

.BA__packSelectActiveDot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--brand-500);
}``PackSelect`;
	//#endregion
	//#region src/settings/views/ModuleSettings.jsx
	function ModuleSettings({ moduleId, refToScroller, pageSize = 15 }) {
		const [preferences] = useData("preferences");
		const module = useModule(moduleId, true);
		const onSelect = (0, react.useCallback)((type, pack, animation) => {
			if (!animation) module.setAnimation(type, null, null);
			else module.setAnimation(type, pack.slug, animation.key, {});
		}, [module]);
		const setIsEnabled = (0, react.useCallback)((value) => module.setIsEnabled(value), [module]);
		const selected = module.getAnimations();
		const preinstalledPack = PackManager_default.getPack(PREINSTALLED_PACK_SLUG);
		const preinstalledAnimations = preinstalledPack?.animations.filter((a) => module.isSupportedBy(a)) ?? [];
		const packs = PackManager_default.getAllPacks().filter((p) => p.animations.some((a) => module.isSupportedBy(a)));
		const [packSlug, setPackSlug] = (0, react.useState)(null);
		const pack = packs.find((pack) => pack.slug === packSlug);
		const selectPack = (0, react.useCallback)((pack) => {
			setPackSlug(pack.slug);
			preferences.pack = pack.slug;
		}, [setPackSlug, preferences]);
		const isPackActive = (pack) => Object.values(selected).some((data) => data.pack?.slug === pack.slug);
		(0, react.useEffect)(() => {
			if (!pack) setPackSlug(packs.find((pack) => pack.slug === selected.enter.pack?.slug)?.slug ?? packs.find((pack) => pack.slug === preferences.pack)?.slug ?? packs[0]?.slug ?? null);
		}, [!pack]);
		const animations = pack?.animations.filter((animation) => module.isSupportedBy(animation)) ?? [];
		const { page, setPage, items } = usePagination(animations, pageSize, [packSlug]);
		(0, react.useEffect)(() => {
			if (!pack) return;
			const indexes = Object.values(selected).map(({ packSlug, animationKey }) => packSlug === pack.slug ? animations.findIndex((animation) => animation.key === animationKey) : -1).filter((i) => i !== -1);
			if (indexes.length) setPage(Math.min(...indexes.map((i) => Math.floor(i / pageSize) + 1)));
		}, [packSlug]);
		return /* @__PURE__ */ BdApi.React.createElement(MigratorContainer, {
			migrator: Config_default.migrator,
			className: "BA__moduleSettingsContainer"
		}, /* @__PURE__ */ BdApi.React.createElement(ModuleContext, { value: module }, /* @__PURE__ */ BdApi.React.createElement("div", {
			key: moduleId,
			className: "BA__moduleSettings"
		}, /* @__PURE__ */ BdApi.React.createElement(ModuleSettingsHeader, {
			module,
			enabled: module.isEnabled(),
			setEnabled: setIsEnabled,
			selected,
			onSelect,
			refToScroller
		}), preinstalledAnimations.length ? /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "heading-sm/semibold",
			className: "BA__moduleSettingsSectionTitle"
		}, /* @__PURE__ */ BdApi.React.createElement("span", null, "ANIMATIONS")), /* @__PURE__ */ BdApi.React.createElement(AnimationList, {
			module,
			pack: preinstalledPack,
			animations: preinstalledAnimations,
			selected,
			onSelect,
			refToScroller
		})) : null, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "heading-sm/semibold",
			className: "BA__moduleSettingsSectionTitle"
		}, /* @__PURE__ */ BdApi.React.createElement("span", null, "PACKS")), !!packs.length ? /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(PackSelect, {
			className: "BA__moduleSettingsPackSelect",
			packs,
			selected: packSlug,
			onSelect: selectPack,
			isActive: isPackActive
		}), pack && /* @__PURE__ */ BdApi.React.createElement("div", {
			key: pack.slug,
			className: "BA__moduleSettingsPack"
		}, /* @__PURE__ */ BdApi.React.createElement(AnimationList, {
			module,
			pack,
			animations: items,
			selected,
			onSelect,
			refToScroller
		}))) : /* @__PURE__ */ BdApi.React.createElement(NoPacksPlaceholder, null))));
	}
	css`.BA__moduleSettings {
    transition: transform .4s;
}

.BA__moduleSettingsSectionTitle {
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-subtle);
    text-align: center;
    position: relative;
}
.BA__moduleSettingsSectionTitle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-normal);
}
.BA__moduleSettingsSectionTitle > span {
    position: relative;
    background: var(--background-base-low);
    padding: 0 8px;
}

.BA__moduleSettingsPackSelect {
    margin-bottom: 12px;
}``ModuleSettings`;
	//#endregion
	//#region src/settings/components/SettingsSidebarHeader.jsx
	function SettingsSidebarHeader() {
		const [section] = useSection();
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("BA__settingsSidebarHeader", { "BA__settingsSidebarHeader--hidden": section === SettingsSection_default.Home }) }, /* @__PURE__ */ BdApi.React.createElement(IconBrand, null), /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-md/semibold" }, meta_default.name.slice(1)));
	}
	css`.BA__settingsSidebarHeader {
    position: relative;
    margin-top: -30px;
    padding-bottom: 10px;
    transition: .2s opacity, .2s transform;
    pointer-events: none;
}
    
.BA__settingsSidebarHeader > svg {
    display: block;
    width: 52px;
    height: 52px;
}

.BA__settingsSidebarHeader > div {
    position: absolute;
    top: 26px;
    left: 41px;
    color: var(--text-strong);
}

.BA__settingsSidebarHeader--hidden {
    opacity: 0;
    transform: translateX(-2px);
}``SettingsSidebarHeader`;
	//#endregion
	//#region src/settings/components/ModeSwitch.jsx
	function ModeSwitch() {
		const [mode, setMode] = useMode();
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__modeSwitch" }, /* @__PURE__ */ BdApi.React.createElement(ButtonGroup, {
			options: [{
				label: "Simple",
				value: SettingsMode_default.Simple
			}, {
				label: "Advanced",
				value: SettingsMode_default.Advanced
			}],
			selected: mode,
			onChange: setMode
		}));
	}
	css`.BA__modeSwitch {
  margin-bottom: 8px;
}``ModeSwitch`;
	//#endregion
	//#region src/settings/components/FormNotice.jsx
	var SettingsNoticeComponent = (0, react.lazy)(async () => ({ default: await SettingsNotice }));
	function FormNotice() {
		const onSave = (0, react.useCallback)(() => Config_default.save(), []);
		const onReset = (0, react.useCallback)(() => Config_default.load(), []);
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__formNotice" }, /* @__PURE__ */ BdApi.React.createElement(react.Suspense, null, /* @__PURE__ */ BdApi.React.createElement(SettingsNoticeComponent, {
			onSave,
			onReset
		})));
	}
	css`.BA__formNotice > * {
    background-color: var(--background-base-lowest);
    border: none;
    box-shadow: 0 0 0 1px var(--border-subtle);
}``FormNotice`;
	//#endregion
	//#region src/components/icons/SpineIcon.jsx
	function SpineIcon() {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			width: "12",
			height: "11",
			viewBox: "0 0 12 11",
			fill: "none",
			"aria-hidden": "true"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",
			fill: "currentColor"
		}));
	}
	//#endregion
	//#region src/components/icons/HomeIcon.jsx
	function HomeIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "m2.4 8.4 8.38-6.46a2 2 0 0 1 2.44 0l8.39 6.45a2 2 0 0 1-.79 3.54l-.32.07-.82 8.2a2 2 0 0 1-1.99 1.8H16a1 1 0 0 1-1-1v-5a3 3 0 0 0-6 0v5a1 1 0 0 1-1 1H6.31a2 2 0 0 1-1.99-1.8L3.5 12l-.32-.07a2 2 0 0 1-.79-3.54Z"
		}));
	}
	//#endregion
	//#region src/components/icons/ExternalLinkIcon.jsx
	function ExternalLinkIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: "none",
			stroke: typeof color === "string" ? color : color?.css,
			strokeLinecap: "round",
			strokeLinejoin: "round",
			strokeWidth: "2",
			d: "M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
		}));
	}
	//#endregion
	//#region src/components/icons/IconAuthor.jsx
	function IconAuthor({ size, width, height, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...props,
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			viewBox: "0 0 678 678"
		}, /* @__PURE__ */ BdApi.React.createElement("defs", null, /* @__PURE__ */ BdApi.React.createElement("radialGradient", {
			id: "BA__iconAuthorGradient",
			cx: "90.13",
			cy: "669.95",
			r: "809.18",
			gradientTransform: "matrix(-0.1, -0.99, -0.99, 0.1, 711.72, 640.54)",
			gradientUnits: "userSpaceOnUse"
		}, /* @__PURE__ */ BdApi.React.createElement("stop", {
			offset: "0",
			stopColor: "#f9ed32"
		}), /* @__PURE__ */ BdApi.React.createElement("stop", {
			offset: "0.66",
			stopColor: "#ee2a7b"
		}), /* @__PURE__ */ BdApi.React.createElement("stop", {
			offset: "1",
			stopColor: "#002aff"
		}))), /* @__PURE__ */ BdApi.React.createElement("path", {
			d: "M583.89,526.07a33.47,33.47,0,0,0,45-11.69q2.84-4.69,5.53-9.49A338.85,338.85,0,0,0,247.38,12.77a338.85,338.85,0,0,0-74.27,621.69,339.76,339.76,0,0,0,353.77-13.27,16.78,16.78,0,0,0-1.11-28.6L480.13,567a33.78,33.78,0,0,0-31.25-.86c-72.77,35.08-161.16,34.86-236.44-8.74-119.18-69-160.94-222.16-93.38-342.18C187.26,94,341.3,50.83,462.57,118.92c102,57.28,148.84,175.34,120.71,283.6a16.77,16.77,0,0,1-24.45,10.33l-38.12-21.4a33.51,33.51,0,0,1-16.92-33.06C511.47,292.38,478.88,225,416,192c-75.58-39.67-175.43-11.64-219.32,61.57-48.18,80.39-20.14,184.51,61,230.09,60.08,33.73,132.39,25.91,183.57-14.08a33.54,33.54,0,0,1,37.05-2.78ZM297.36,406.71A79.49,79.49,0,1,1,400.7,389.12,79.57,79.57,0,0,1,297.36,406.71Z",
			fill: "url(#BA__iconAuthorGradient)"
		}));
	}
	//#endregion
	//#region src/settings/components/SpotlightAnimation.jsx
	function toStyle(state) {
		return {
			transform: `translate(${Object.values(state.position).map((v) => v + "px").join(", ")})`,
			transition: `${state.duration}s ease transform`
		};
	}
	function SpotlightAnimation({ count = 8, size = 400, areaSize = 200, speed = 50, className }) {
		const getRandomPosition = (0, react.useCallback)(() => ({
			x: Math.random() * areaSize,
			y: Math.random() * areaSize
		}), [areaSize]);
		const [states, setStates] = (0, react.useState)((0, react.useCallback)(() => Array.from({ length: count }).map(() => ({ position: getRandomPosition() })), [count, getRandomPosition])());
		const generateNewState = (0, react.useCallback)((state) => {
			const position = getRandomPosition();
			return {
				position,
				duration: Math.hypot(Math.abs(position.x - state.position.x), Math.abs(position.y - state.position.y)) / speed
			};
		}, [getRandomPosition]);
		const updatePosition = (0, react.useCallback)((i) => setStates((_states) => {
			const states = [..._states];
			states[i] = generateNewState(states[i]);
			return states;
		}), [setStates, generateNewState]);
		(0, react.useEffect)(() => {
			const id = requestAnimationFrame(() => setStates((states) => states.map(generateNewState)));
			return () => cancelAnimationFrame(id);
		}, [count]);
		return /* @__PURE__ */ BdApi.React.createElement("div", {
			className: (0, clsx.default)("BA__spotlightAnimation", className),
			style: {
				width: areaSize + "px",
				"--ba--spotlight-animation-size": size + "px"
			}
		}, states.map((state, index) => /* @__PURE__ */ BdApi.React.createElement("div", {
			className: "BA__spotlightAnimationItem",
			style: toStyle(state),
			onTransitionEnd: () => updatePosition(index)
		})));
	}
	var SpotlightAnimation_default = (0, react.memo)(SpotlightAnimation);
	css`.BA__spotlightAnimation {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    pointer-events: none;
    aspect-ratio: 1;
    opacity: .3;
    filter: blur(30px);
    animation: BA__spotlightAnimationRotate 30s linear infinite;
}

.BA__spotlightAnimationItem {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--ba--spotlight-animation-size);
    height: var(--ba--spotlight-animation-size);
    translate: -50% -50%;
}
.BA__spotlightAnimationItem::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, var(--brand-500) 30%, transparent 70%);
    animation: BA__spotlightAnimationEnter 5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes BA__spotlightAnimationRotate {
    0% { rotate: 0deg; }
    100% { rotate: 360deg; }
}
@keyframes BA__spotlightAnimationEnter {
    0% {
        scale: .3;
        opacity: 0;
    }
    100% {
        scale: 1;
        opacity: 1;
    }
}``SpotlightAnimation`;
	//#endregion
	//#region src/components/icons/BookIcon.jsx
	function BookIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M6.5 2A2.5 2.5 0 0 0 4 4.5v15A2.5 2.5 0 0 0 6.5 22h13.25a.75.75 0 0 0 0-1.5H6.5a1 1 0 0 1-1-1h14.25a.75.75 0 0 0 .75-.75V4.5A2.5 2.5 0 0 0 18 2zM8 5h8a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1"
		}));
	}
	//#endregion
	//#region src/settings/views/Home.jsx
	var madeByPhrases = [
		"Made by",
		"Developed by",
		"Created by",
		"Authored by",
		"Brought to you by",
		"Crafted by",
		"Produced by",
		"Built by",
		"Designed by",
		"Brought to life by",
		"Cultivated by",
		"Established by"
	];
	function CatalogPromoTooltip({ packs, displayLimit = 3, children, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, {
			shouldShow: packs.length > 0,
			tooltipClassName: "BA__catalogPromoTooltip",
			position: "bottom",
			color: Tooltip$1.Colors.BRAND,
			spacing: 12,
			allowOverflow: true,
			text: () => /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__catalogPromoTooltipContent" }, /* @__PURE__ */ BdApi.React.createElement(PackPicture, null), /* @__PURE__ */ BdApi.React.createElement("div", null, `Check out the newly available ${packs.length > 1 ? "packs" : "pack"}: `, /* @__PURE__ */ BdApi.React.createElement(InlineList, { items: packs.map((pack) => pack.name) }), "!")),
			...props
		}, children);
	}
	function Home() {
		const [section, setSection] = useSection();
		const madeBy = (0, react.useMemo)(() => madeByPhrases[Math.floor(Math.random() * madeByPhrases.length)], []);
		const { isEnterActive } = (0, react.use)(AnimeTransitionContext);
		const [{ visited: visitedCatalog }] = useData("catalog");
		const unknownPacks = usePackRegistry().getUnknownPacks();
		const highlightCatalog = !visitedCatalog || unknownPacks.length > 0;
		const { isActive: isMigratorActive } = Config_default.migrator.use();
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__homeContainer" }, isMigratorActive && /* @__PURE__ */ BdApi.React.createElement(MigratorAlert, { migrator: Config_default.migrator }), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__home" }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__homeHeading" }, !isEnterActive && /* @__PURE__ */ BdApi.React.createElement(SpotlightAnimation_default, { className: "BA__homeSpotlightAnimation" }), /* @__PURE__ */ BdApi.React.createElement(IconBrand, {
			size: "custom",
			width: 120,
			height: 120,
			className: "BA__homeIcon"
		}), /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__homeTitle",
			variant: "heading-xxl/bold",
			tag: "h3",
			color: "text-strong"
		}, meta_default.name), /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__homeDescription",
			variant: "text-md/normal",
			color: "text-strong"
		}, sanitize$1(meta_default.description)), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__homeHeadingActions" }, /* @__PURE__ */ BdApi.React.createElement(CatalogPromoTooltip, { packs: unknownPacks }, (props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			...props,
			variant: highlightCatalog ? "expressive" : "primary",
			icon: ShopIcon,
			text: "Catalog",
			onClick: () => setSection(SettingsSection_default.Catalog)
		})), /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			variant: "secondary",
			icon: BookIcon,
			text: "Documentation",
			onClick: () => handleClick({ href: Documentation.homeUrl })
		}))), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__homeAuthorSection" }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__homeAuthorLabel",
			variant: "text-sm/normal",
			color: "text-muted"
		}, madeBy), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__homeAuthor" }, /* @__PURE__ */ BdApi.React.createElement(IconAuthor, {
			className: "BA__homeAuthorAvatar",
			size: "custom",
			width: 36,
			height: 36
		}), /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-lg/medium" }, meta_default.author)), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__homeAuthorActions" }, /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			variant: "active",
			icon: CircleDollarSignIcon,
			text: "Support the author",
			fullWidth: true,
			onClick: () => handleClick({ href: meta_default.donate })
		}), /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			size: "sm",
			variant: "secondary",
			icon: ExternalLinkIcon,
			iconPosition: "end",
			text: `Plugins made by ${meta_default.author}`,
			fullWidth: true,
			onClick: () => handleClick({ href: meta_default.authorLink })
		})))));
	}
	css`.BA__homeContainer {
    position: absolute;
    inset: 0;
    padding: 60px 40px 40px;
    display: flex;
    flex-direction: column;
}
.BA__home {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    text-align: center;
    flex: 1;
}

.BA__homeHeading {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 8vh;
    position: relative;
    isolation: isolate;
}
.BA__homeDescription {
    margin-top: 12px;
}
.BA__homeHeadingActions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}
.BA__homeSpotlightAnimation {
    z-index: -1;
}

.BA__homeAuthorSection {
    position: relative;
    margin-top: 11vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.BA__homeAuthorLabel {
    margin-bottom: 12px;
    text-transform: uppercase;
}
.BA__homeAuthor {
    display: flex;
    align-items: center;
    gap: 12px;
}
.BA__homeAuthorActions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 28px;
    width: 250px;
}

.BA__catalogPromoTooltip {
    max-width: 100%;
}
.BA__catalogPromoTooltipContent {
    width: 230px;
    position: relative;
    padding: 10px 0 12px 80px;
}
.BA__catalogPromoTooltipContent svg {
    position: absolute;
    left: -62px;
    top: calc(50% + 6px);
    transform: translateY(-50%);
    height: 123px;
}``Home`;
	//#endregion
	//#region src/settings/components/CreateUpsellBanner.jsx
	function CreateUpsellBanner({ className }) {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("BA__createUpsellBanner", className) }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__createUpsellArtContainer" }, /* @__PURE__ */ BdApi.React.createElement(PackPicture, { className: "BA__createUpsellArt" })), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__mainColumn" }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			tag: "h3",
			variant: "heading-lg/extrabold",
			color: "currentColor"
		}, "Create your own Animation Packs"), /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "text-sm/normal",
			color: "currentColor"
		}, "Build your own animations and publish them to the official Catalog for everyone to download and use")), /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			className: "BA__createUpsellButton",
			variant: "overlay-primary",
			icon: BookIcon,
			text: "Documentation",
			onClick: () => handleClick({ href: Documentation.createUrl })
		}));
	}
	css`.BA__createUpsellBanner {
    align-items: center;
    background: linear-gradient(187deg, #5865F2, #2F379F);
    background-size: cover;
    border-radius: 16px;
    flex-direction: row;
    padding-right: 24px;
}

.BA__createUpsellBanner, .BA__mainColumn {
    display: flex;
    justify-content: center;
}

.BA__mainColumn {
    color: #FFFFFF;
    flex: 1;
    flex-direction: column;
    margin: auto 0;
    min-height: 96px;
    padding: 16px 16px 16px 4px;
}

.BA__createUpsellBanner h3 {
    margin-bottom: 4px;
}

.BA__createUpsellButton {
    padding: 11px 20px;
}

.BA__createUpsellButton:hover {
    opacity: .9;
}

.BA__createUpsellArtContainer {
    align-items: center;
    align-self: stretch;
    display: flex;
    flex-basis: 124px;
    height: 100px;
    position: relative;
}

.BA__createUpsellArt {
    width: 129px;
    bottom: -46px;
    left: -15px;
    object-fit: contain;
    pointer-events: none;
    position: absolute;
}``CreateUpsellBanner`;
	//#endregion
	//#region src/components/icons/GitHubIcon.jsx
	function GitHubIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "-1 -1 26 26"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "m12 .5c-6.63 0-12 5.28-12 11.792 0 5.211 3.438 9.63 8.205 11.188.6.111.82-.254.82-.567 0-.28-.01-1.022-.015-2.005-3.338.711-4.042-1.582-4.042-1.582-.546-1.361-1.335-1.725-1.335-1.725-1.087-.731.084-.716.084-.716 1.205.082 1.838 1.215 1.838 1.215 1.07 1.803 2.809 1.282 3.495.981.108-.763.417-1.282.76-1.577-2.665-.295-5.466-1.309-5.466-5.827 0-1.287.465-2.339 1.235-3.164-.135-.298-.54-1.497.105-3.121 0 0 1.005-.316 3.3 1.209.96-.262 1.98-.392 3-.398 1.02.006 2.04.136 3 .398 2.28-1.525 3.285-1.209 3.285-1.209.645 1.624.24 2.823.12 3.121.765.825 1.23 1.877 1.23 3.164 0 4.53-2.805 5.527-5.475 5.817.42.354.81 1.077.81 2.182 0 1.578-.015 2.846-.015 3.229 0 .309.21.678.825.56 4.801-1.548 8.236-5.97 8.236-11.173 0-6.512-5.373-11.792-12-11.792z"
		}));
	}
	//#endregion
	//#region src/settings/views/Catalog.jsx
	var catalogSortOptions = [
		{
			value: "newest",
			label: "Newest first",
			compare: (a, b) => new Date(b.createdAt) - new Date(a.createdAt)
		},
		{
			value: "oldest",
			label: "Oldest first",
			compare: (a, b) => new Date(a.createdAt) - new Date(b.createdAt)
		},
		{
			value: "official",
			label: "Official first",
			compare: (a, b) => b.official - a.official
		},
		...defaultSortOptions
	];
	function Catalog() {
		const registry = usePackRegistry();
		const [data] = useData("catalog");
		(0, react.useEffect)(() => {
			if (!data.visited) data.visited = true;
			registry.items.forEach((item) => registry.markAsKnown(item));
		}, []);
		return /* @__PURE__ */ BdApi.React.createElement(PackListView, {
			title: "Catalog",
			items: registry.items,
			sortOptions: catalogSortOptions,
			data,
			pending: registry.isPending(),
			error: registry.isFatal && "Failed to load packs. Please try again later.",
			empty: /* @__PURE__ */ BdApi.React.createElement(NoPacksPlaceholder, {
				title: "No packs at the time",
				description: "Please come back later",
				actions: false
			}),
			location: PackContentLocation.CATALOG,
			actions: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, { text: "View on GitHub" }, (props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
				...props,
				variant: "icon-only",
				icon: GitHubIcon,
				onClick: () => handleClick({ href: registry.baseUrl })
			})), /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, { text: "Refresh" }, (props) => /* @__PURE__ */ BdApi.React.createElement(Button$1, {
				...props,
				variant: "icon-only",
				icon: RefreshIcon,
				onClick: () => registry.updateRegistry(),
				disabled: registry.isPending()
			}))),
			leading: registry.hasError && /* @__PURE__ */ BdApi.React.createElement(Alert, { messageType: AlertTypes.ERROR }, Messages.CATALOG_OUT_OF_DATE),
			trailing: /* @__PURE__ */ BdApi.React.createElement(CreateUpsellBanner, { className: "BA__catalogBanner" })
		});
	}
	css` .BA__catalogBanner {
    margin-top: 52px;
}``Catalog`;
	//#endregion
	//#region src/settings/views/GeneralSettings.jsx
	function GeneralSettings() {
		const { config, onChange } = useConfig();
		return /* @__PURE__ */ BdApi.React.createElement(MigratorContainer, { migrator: Config_default.migrator }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__generalSettings" }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "heading-xl/semibold",
			color: "text-strong"
		}, "General Settings"), /* @__PURE__ */ BdApi.React.createElement(FieldSet, { label: "Appearance" }, /* @__PURE__ */ BdApi.React.createElement(Switch$1, {
			label: "Quick Preview",
			description: "Play the animation preview when hovering over an animation card. Disable to play it only when an animation card is expanded.",
			checked: config.general.quickPreview,
			onChange: (value) => {
				config.general.quickPreview = value;
				onChange();
			}
		}), /* @__PURE__ */ BdApi.React.createElement(Switch$1, {
			label: "Disable Hints",
			description: `Hide reference links to ${meta_default.name} documentation in the module settings, animation settings, etc.`,
			checked: config.general.disableHints,
			onChange: (value) => {
				config.general.disableHints = value;
				onChange();
			}
		}), /* @__PURE__ */ BdApi.React.createElement(RadioGroup, {
			label: "Suppress Errors",
			description: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Disable the toast notification for occurring errors. When an error is suppressed, it can only be seen via\xA0the\xA0Console."),
			options: [
				{
					value: SuppressErrors_default.All,
					name: "Suppress all errors"
				},
				{
					value: SuppressErrors_default.Animation,
					name: "Suppress animation errors"
				},
				{
					value: SuppressErrors_default.None,
					name: "Do not suppress errors"
				}
			],
			value: config.general.suppressErrors,
			onChange: ({ value }) => {
				config.general.suppressErrors = value;
				onChange();
			}
		})), /* @__PURE__ */ BdApi.React.createElement(Divider$2, null), /* @__PURE__ */ BdApi.React.createElement(FieldSet, { label: "Optimizations" }, /* @__PURE__ */ BdApi.React.createElement(Switch$1, {
			label: Messages.PRIORITIZE_ANIMATION_SMOOTHNESS,
			description: "Delay resource-intensive operations until after animations finish to avoid most of the stuttering that occurs while they are running.",
			checked: config.general.prioritizeAnimationSmoothness,
			onChange: (value) => {
				config.general.prioritizeAnimationSmoothness = value;
				onChange();
			}
		}), /* @__PURE__ */ BdApi.React.createElement(Switch$1, {
			label: "Preload Layers",
			description: "Load full-screen pages (Server Settings, Channel Settings, etc.) in advance to prevent them from interrupting the animations when opened.",
			checked: config.general.preloadLayers,
			onChange: (value) => {
				config.general.preloadLayers = value;
				onChange();
			}
		})), /* @__PURE__ */ BdApi.React.createElement(Divider$2, null), /* @__PURE__ */ BdApi.React.createElement(FieldSet, { label: "Behavior" }, /* @__PURE__ */ BdApi.React.createElement(DurationSlider, {
			label: "Switch Cooldown Duration",
			description: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "If switch animations overlap, they cancel each other and trigger a cooldown preventing new switch animations from playing for a period of time."),
			from: 100,
			to: 2e3,
			defaultValue: configDefaults.general.switchCooldownDuration,
			initialValue: config.general.switchCooldownDuration,
			onValueChange: (value) => {
				config.general.switchCooldownDuration = value;
				onChange();
			}
		}))));
	}
	css`.BA__generalSettings {
    display: flex;
    flex-direction: column;
    gap: 32px;
}``GeneralSettings`;
	//#endregion
	//#region src/components/icons/BetterDiscordIcon.jsx
	function BetterDiscordIcon({ size, width, height, color = colors.INTERACTIVE_ICON_DEFAULT }) {
		return /* @__PURE__ */ BdApi.React.createElement("svg", {
			...useIconSize(size, {
				width,
				height
			}),
			xmlns: "http://www.w3.org/2000/svg",
			fill: "none",
			viewBox: "-2 -2 28 28"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: typeof color === "string" ? color : color?.css,
			d: "M14.393.861q.514.258.964.57a6.6 6.6 0 0 1 2.122 2.387c.513.987.792 2.133.828 3.409v9.556c-.035 1.275-.313 2.422-.828 3.408a6.6 6.6 0 0 1-2.122 2.387a8 8 0 0 1-.933.555h.933c4.46.024 8.643-2.205 8.643-7.315V8.352c.024-5.21-4.16-7.49-8.62-7.49zM0 .867v9.197l5.693 5.127V5.44h3.31c3.537 0 3.537 4.444 0 4.444H6.817v4.244h2.188c3.536 0 3.536 4.441 0 4.441H0v4.57h8.904c4.59 0 8.151-1.836 8.278-6.388c0-2.094-.574-3.66-1.584-4.748c1.01-1.087 1.584-2.652 1.584-4.746c-.125-4.553-3.687-6.39-8.278-6.39z"
		}));
	}
	//#endregion
	//#region src/components/SocialLinks.jsx
	function SocialLinks() {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__socialLinks" }, /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "Donate",
			onClick: () => handleClick({ href: meta_default.donate })
		}, /* @__PURE__ */ BdApi.React.createElement(CircleDollarSignIcon, {
			size: "sm",
			color: "currentColor"
		})), /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "Support Server",
			onClick: () => UI.showInviteModal(meta_default.invite)
		}, /* @__PURE__ */ BdApi.React.createElement(CircleQuestionIcon, {
			size: "sm",
			color: "currentColor"
		})), /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "GitHub",
			onClick: () => handleClick({ href: meta_default.source })
		}, /* @__PURE__ */ BdApi.React.createElement(GitHubIcon, {
			size: "sm",
			color: "currentColor"
		})), /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "BetterDiscord",
			onClick: () => handleClick({ href: "https://betterdiscord.app/plugin/BetterAnimations" })
		}, /* @__PURE__ */ BdApi.React.createElement(BetterDiscordIcon, {
			size: "sm",
			color: "currentColor"
		})), /* @__PURE__ */ BdApi.React.createElement(IconButton, {
			tooltip: "Documentation",
			onClick: () => handleClick({ href: Documentation.homeUrl }),
			style: { margin: "0 -2px" }
		}, /* @__PURE__ */ BdApi.React.createElement(BookIcon, {
			size: "sm",
			color: "currentColor"
		})));
	}
	css`.BA__socialLinks {
    display: flex;
    align-items: center;
    gap: 8px;
}``SocialLinks`;
	//#endregion
	//#region src/settings/components/SettingsSidebarFooter.jsx
	function SystemInfo() {
		const data = (0, react.useMemo)(() => [`${meta_default.name} ${meta_default.version}`, `BetterDiscord ${bdVersion}`], []);
		return /* @__PURE__ */ BdApi.React.createElement(CopiableField, {
			text: "Click to copy",
			copyValue: data.join("\n")
		}, (props) => /* @__PURE__ */ BdApi.React.createElement(Clickable, {
			...props,
			tag: "div",
			className: "BA__settingsSidebarFooterSystemInfo"
		}, data.map((text, i) => /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			key: i,
			variant: "text-xs/normal",
			color: "text-muted"
		}, text))));
	}
	function SettingsSidebarFooter() {
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__settingsSidebarFooter" }, /* @__PURE__ */ BdApi.React.createElement(SocialLinks, null), /* @__PURE__ */ BdApi.React.createElement(SystemInfo, null));
	}
	css`.BA__settingsSidebarFooter {
    padding: 8px 10px;
}
.BA__settingsSidebarFooterSystemInfo {
    margin-top: 16px;
    cursor: pointer;
}``SidebarFooter`;
	//#endregion
	//#region src/settings/data/sections.jsx
	function useSections() {
		const registry = usePackRegistry();
		const hasIssues = registry.verifier.hasIssues();
		const hasOutdatedPacks = registry.hasOutdatedPacks();
		return (0, react.useMemo)(() => {
			const notice = {
				element: FormNotice,
				stores: [SettingsStore]
			};
			return [
				{
					section: "CUSTOM",
					element: ErrorBoundary.wrap(SettingsSidebarHeader, { noop: true })
				},
				{
					section: SettingsSection_default.Home,
					label: "Home",
					icon: /* @__PURE__ */ BdApi.React.createElement(HomeIcon, {
						size: "xs",
						color: "currentColor"
					}),
					element: ErrorBoundary.wrap(Home)
				},
				{ section: "DIVIDER" },
				{
					section: SettingsSection_default.Catalog,
					label: "Catalog",
					icon: /* @__PURE__ */ BdApi.React.createElement(ShopIcon, {
						size: "xs",
						color: "currentColor"
					}),
					element: ErrorBoundary.wrap(Catalog)
				},
				{
					section: SettingsSection_default.Library,
					label: "Library",
					icon: hasIssues ? /* @__PURE__ */ BdApi.React.createElement(CircleWarningIcon, {
						size: "xs",
						color: colors.STATUS_DANGER
					}) : hasOutdatedPacks ? /* @__PURE__ */ BdApi.React.createElement(DownloadIcon, {
						size: "xs",
						color: "var(--brand-400)"
					}) : /* @__PURE__ */ BdApi.React.createElement(LibraryIcon, {
						size: "xs",
						color: "currentColor"
					}),
					element: ErrorBoundary.wrap(Library)
				},
				{ section: "DIVIDER" },
				{
					section: "CUSTOM",
					element: ErrorBoundary.wrap(ModeSwitch, { noop: true })
				},
				...Core_default.getAllModules(true).map((module) => ({
					section: module.id,
					label: module.name,
					className: module.parent ? "BA__nestedTabBarItem" : void 0,
					icon: module.parent ? /* @__PURE__ */ BdApi.React.createElement(SpineIcon, null) : void 0,
					elementProps: { moduleId: module.id },
					element: ErrorBoundary.wrap(ModuleSettings),
					notice
				})),
				{ section: "DIVIDER" },
				{
					section: SettingsSection_default.General,
					label: "General",
					icon: /* @__PURE__ */ BdApi.React.createElement(SettingsIcon, {
						size: "xs",
						color: "currentColor"
					}),
					element: ErrorBoundary.wrap(GeneralSettings),
					notice
				},
				{ section: "DIVIDER" },
				{
					section: "CUSTOM",
					element: ErrorBoundary.wrap(SettingsSidebarFooter, { noop: true })
				}
			];
		}, [hasIssues, hasOutdatedPacks]);
	}
	//#endregion
	//#region src/discord/selectors.js
	var DiscordSelectors = new Proxy(DiscordClasses, { get(obj, prop) {
		const module = obj[prop];
		return new Proxy({}, { get(_, prop) {
			return module?.[prop]?.split(" ").filter((i) => !!i).map((c) => "." + c).join("") ?? `[class^="${prop}_"]`;
		} });
	} });
	//#endregion
	//#region src/settings/SettingsModal.jsx
	var StandardSidebarViewComponent = (0, react.lazy)(async () => ({ default: await StandardSidebarViewWrapper }));
	function SettingsModal() {
		const theme = useStateFromStores([ThemeStore], () => ThemeStore.theme);
		const title = `${meta_default.name} Settings`;
		const sections = useSections();
		const [section, setSection] = useSection();
		const onClose = (0, react.useCallback)(() => LayerActions.popLayer(), []);
		const actions = (actions) => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, actions, /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			variant: "secondary",
			size: "sm",
			text: "Close Settings",
			onClick: onClose
		}));
		(0, react.useEffect)(() => () => PackRegistry_default.storage.clear(), []);
		return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
			style: { margin: "auto" },
			actions
		}, /* @__PURE__ */ BdApi.React.createElement(SectionContext, { value: {
			section,
			setSection
		} }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__settingsModal" }, /* @__PURE__ */ BdApi.React.createElement(react.Suspense, null, /* @__PURE__ */ BdApi.React.createElement(StandardSidebarViewComponent, {
			title,
			theme,
			sidebarTheme: theme,
			sections,
			section,
			onSetSection: setSection,
			onClose
		})))));
	}
	StandardSidebarViewKeyed.then(() => css`.BA__settingsModal {
    position: absolute;
    inset: 0;
}
.BA__settingsModal ${DiscordSelectors.StandardSidebarView.noticeRegion} {
    padding-left: 40px;
    padding-right: 40px;
    z-index: 200;
}
.BA__settingsModal ${DiscordSelectors.StandardSidebarView.contentRegionScroller} {
    position: static !important;
}

${DiscordSelectors.StandardSidebarView.contentColumnDefault}:has(> .BA__moduleSettingsContainer) {
    position: static;
}

.BA__nestedTabBarItem {
    position: relative;
    margin-left: 30px;
    overflow: visible;
}
.BA__nestedTabBarItem svg {
    position: absolute;
    left: -14px;
    bottom: calc(50% - 1px);
    color: var(--interactive-muted);
}``SettingsModal`);
	//#endregion
	//#region src/settings/index.jsx
	var settings_default = new class Settings {
		isSettingsModalOpen() {
			return !!LayerStore$1.getLayers().at(-1)?.__BA_isSettingsModal;
		}
		openSettingsModal(section = SettingsSection_default.Home) {
			if (this.isSettingsModalOpen()) return;
			setSection(section);
			const component = () => /* @__PURE__ */ BdApi.React.createElement(SettingsModal, null);
			component.__BA_isSettingsModal = true;
			LayerActions.pushLayer(component);
		}
		closeSettingsModal() {
			if (this.isSettingsModalOpen()) LayerActions.popLayer();
		}
	}();
	//#endregion
	//#region src/assets/placeholders/avatar.png
	var avatar_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAAhFBMVEV1fop9hpGgpq+ytr2prraXnqfT19vu7/H////29/iGjpju7/DCxszc3+K6vsS6v8WOlqD39/fLztPLz9OPlqDl5+nDx8ygpq6xtr6xtr3m5+iOlp/Dxsvc3+Hd3+GorraGjpnT19rT1tv29/eOlqHU19p+hpGprrWxt72or7bLz9Kfpq+ibmTzAAAEY0lEQVR4AezBAQEAAAQAIPB/swkMqAIAAAAAAAAAAAAAAAAAAAAAgBNZPfFWy86dLimOw3AAV5qYEXFicMKxHIFs03e///PtvaouagjRGMKfNr/vmhorsiMbpwcm+UZjN4PhD2YedR5TZpnZDgfmOww+L/h/jjoaS0iRG7pdk0HBQlECmeevisGEbpDJf7DQlUDJh2xlbm30noWmBGQFuOUcTMeej3CqFeCQzTOCl8i8bymBbPKQDlxeCecGqTH/Dc/ycUVK0LKx51ZVXs08H+WLoSu5la0yQmUK7sXQEKQ592ZOgFLukSE4meUe2YTQlCyinARTFnFOAss9swRlzL1zBCTj/o2ySFdAURCMBV+FiXQFFLP4esADvxGExPKVjJJIX4HCxbcJACyBkq/IxdkDQZVAyVfl4i4AgBIo+cpcvK8AiBJYMsddApY56hJIGcCSrmfFAAq6GsMQTKTvQDEEaILiXAZTBuEAlsAYl8E1wzCRLoEij7QLFKNYmwBhIp0BIo9tBgDMAcMc9xzYMJQcugvytl55VtCHWNx9wHaZ0d+mO6sP6Z7mBnQfYA2R2Fl1yMKCHov8zp3kycHKoQ9x3Mkj9Wv/i9s0FxCC9CJca8cv3JlDxBPecfgz/cwzt9j+etO5hFsCbEM/89I2e/QhoqI+2YBzGnfWEGHRuoBRQ6R9nu0hQJ3AIqgkNwEhLR6oPy7o/2MCQwC2AwWfltAxL/oifgFrhfZhtxitvpexAKug7nnU+gKqw2sO6DDk8bwJKKF6wZRPq8IToO28XqkvDnMK5FiNMB1n9SErqGZ4xeGvQV0IYV2f34ed05qgEIAjgZfAc9oyIATiPbgOvLZgA0IgtkMm7NpCGhCC8evIgkNKILHqEJIQjEZgGfR971wfMmasBLiQj5regkLaObifBd/p0Ls+xHBXOd7NgLH+YepDRIWXAK4yIpE9B4QAJaBgjcq0/3Wl8BDxiJUA4Yuqqob+YiGi7i0BiO4JuCfgnoB7Au4J6ME9AfcE3BNQMqjqnoAYrgkDnAc4BuWoH0sGtUS6J7xdWj4bu5wBHIqqL+yYZz6Lrek47wzOL0M7+kfjLAfyLpGJB3NDYrfnE2wq5VLagNF/GJl3nk/wS+pNM+PuKZAc6EefKP5m87ahPjnWpICMq1lllRsSpmCYxy8aq0sBJcbVnjvw23yR0OHwcR6/cPsuKcjoq+kir1d8lH3O0yl9lYw9oz1+0ZSqQ34SU5O6/KOuV/Zfdf3x4dJFltAB8+wZ9PErvoKqL7vxtp90TY5Pmlyy5ZI2QcDNg+qSZy9VQ9fX1Je7uDM91SNjMPZie/QN9vDFrtZ8OaXwsgcfvjB1y64owBJp+PrlsLrIGfSzIUzN4a7HNxSs2cO8+PSLwfLsJ3Dbh4QEfBlsz/xDjHcTQicHAPIGONck8LJBvpkc7OhMduxzk9CtmUL+U3+2BwcyAAAAAIP8re/xVQAAAAAAAAAAAAAAAAAAAAAAKwFiKavpSRGzHgAAAABJRU5ErkJggg==";
	//#endregion
	//#region src/components/VerificationIssuesModal.jsx
	function ResolveMethodSelector({ size = "sm", pack, method, setMethod, disabled = false }) {
		const selectedMethod = verificationIssueResolveMethods[method];
		const children = selectedMethod ? /* @__PURE__ */ BdApi.React.createElement(VerificationIssueSelection, {
			...selectedMethod,
			size,
			onUndo: () => setMethod(null)
		}) : /* @__PURE__ */ BdApi.React.createElement(VerificationIssueActions, {
			pack,
			onSelect: (method) => setMethod(method.value),
			size,
			direction: "horizontal-reverse",
			disabled
		});
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__verificationIssueActions" }, children);
	}
	function VerificationIssue({ pack, method, setMethod, disabled }) {
		const status = (0, react.useMemo)(() => verificationStatuses[pack.verificationStatus], [pack.verificationStatus]);
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__verificationIssue" }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__verificationIssueInfo" }, /* @__PURE__ */ BdApi.React.createElement(PackHeader, {
			pack,
			popoutType: "tooltip",
			size: "sm",
			icon: method != null ? /* @__PURE__ */ BdApi.React.createElement(CheckIcon, {
				size: "sm",
				color: colors.STATUS_POSITIVE
			}) : void 0
		}), /* @__PURE__ */ BdApi.React.createElement(ResolveMethodSelector, {
			pack,
			method,
			setMethod,
			disabled
		})), method == null && status?.description && /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			className: "BA__verificationIssueDescription",
			variant: "text-sm/normal"
		}, status.description));
	}
	function VerificationIssuesModal({ onClose, ...props }) {
		const registry = usePackRegistry();
		const loading = registry.hasPending;
		const issues = registry.verifier.getIssues();
		const [selectedMethods, setSelectedMethods] = (0, react.useState)({});
		(0, react.useEffect)(() => {
			if (!issues.length) onClose?.();
		}, [issues.length]);
		const resolvers = issues.filter((pack) => selectedMethods[pack.id] != null).map((pack) => ({
			pack,
			method: selectedMethods[pack.id]
		}));
		const confirmText = (0, react.useMemo)(() => {
			if (!resolvers.length) return "Resolve issues";
			if (resolvers.length < issues.length) return `Resolve ${resolvers.length} out of ${issues.length} issues`;
			return "Resolve all issues";
		}, [resolvers.length, issues.length]);
		const onConfirm = async (preventClose) => {
			preventClose();
			if (await registry.verifier.resolveIssues(resolvers)) onClose();
		};
		return /* @__PURE__ */ BdApi.React.createElement(Modal$2, {
			...props,
			onClose,
			size: ModalSize.MEDIUM,
			title: "Resolve issues",
			cancelText: "Cancel",
			confirmText,
			confirmButtonVariant: "primary",
			loading,
			disabled: !resolvers.length || loading,
			onConfirm
		}, /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, null, registry.hasError && /* @__PURE__ */ BdApi.React.createElement(Alert, { messageType: AlertTypes.ERROR }, Messages.CATALOG_OUT_OF_DATE), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__verificationIssuesList" }, issues.map((pack) => /* @__PURE__ */ BdApi.React.createElement(VerificationIssue, {
			key: pack.filename,
			pack,
			method: selectedMethods[pack.id],
			setMethod: (method) => setSelectedMethods((prev) => ({
				...prev,
				[pack.id]: method
			})),
			disabled: loading
		})))));
	}
	css`.BA__verificationIssue {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.BA__verificationIssueInfo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.BA__verificationIssueActions {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.BA__verificationIssueDescription {
    margin-top: 12px;
}``VerificationIssuesModal`;
	//#endregion
	//#region src/modules/PackRegistry.jsx
	var PackVerifier = class {
		constructor(registry) {
			this.registry = registry;
			this.temporaryWhitelist = /* @__PURE__ */ new Set();
		}
		get permanentWhitelist() {
			return data.library.whitelist;
		}
		get whitelist() {
			return this.permanentWhitelist.union(this.temporaryWhitelist);
		}
		addToWhitelist(pack, permanent = false) {
			if (permanent) this.permanentWhitelist.add(pack.filename);
			else this.temporaryWhitelist.add(pack.filename);
			Emitter_default.emit(Events_default.PackUpdated, pack);
			return true;
		}
		removeFromWhitelist(pack) {
			this.temporaryWhitelist.delete(pack.filename);
			this.permanentWhitelist.delete(pack.filename);
			Emitter_default.emit(Events_default.PackUpdated, pack);
			return true;
		}
		check(pack) {
			return this.whitelist.has(pack.filename) || [VerificationStatus.VERIFIED, VerificationStatus.OFFICIAL].includes(pack.verificationStatus);
		}
		getResolveMethod(pack) {
			if (this.permanentWhitelist.has(pack.filename)) return VerificationIssueResolveMethod.ALLOW_ALWAYS;
			if (this.temporaryWhitelist.has(pack.filename)) return VerificationIssueResolveMethod.ALLOW_ONCE;
			return null;
		}
		_verify(pack) {
			if (!this.registry.isReady) return VerificationStatus.UNKNOWN;
			const publishedPack = this.registry.getPack(pack.filename);
			if (!publishedPack) return VerificationStatus.UNVERIFIED;
			if (pack.hash !== (publishedPack.history?.[pack.version] ?? publishedPack).hash) return VerificationStatus.FAILED;
			return publishedPack.official ? VerificationStatus.OFFICIAL : VerificationStatus.VERIFIED;
		}
		verify(pack) {
			const status = this._verify(pack);
			const didChange = status !== pack.verificationStatus;
			const hasFailed = didChange && !this.check({
				...pack,
				verificationStatus: status
			});
			if (didChange) {
				pack.verificationStatus = status;
				Emitter_default.emit(Events_default.PackUpdated, pack);
			}
			return hasFailed;
		}
		verifyAll(packs = PackManager_default.getAllPacks(true)) {
			const hasFailed = packs.map((pack) => this.verify(pack)).some(Boolean);
			if (hasFailed) this.showModal();
			return hasFailed;
		}
		getIssues(packs = PackManager_default.getAllPacks(true)) {
			return packs.filter((pack) => !this.check(pack));
		}
		hasIssues(packs = PackManager_default.getAllPacks(true)) {
			return packs.some((pack) => !this.check(pack));
		}
		showModal() {
			if (!this.hasIssues()) return;
			ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(VerificationIssuesModal, props), { modalKey: "BA__verificationIssuesModal" });
		}
		resolveIssue({ pack, method }) {
			switch (method) {
				case VerificationIssueResolveMethod.DELETE:
				case VerificationIssueResolveMethod.UNINSTALL: return this.registry.delete(pack.filename);
				case VerificationIssueResolveMethod.REINSTALL: return this.registry.reinstall(pack.filename);
				case VerificationIssueResolveMethod.UPDATE: return this.registry.update(pack.filename);
				case VerificationIssueResolveMethod.ALLOW_ONCE: return this.addToWhitelist(pack, false);
				case VerificationIssueResolveMethod.ALLOW_ALWAYS: return this.addToWhitelist(pack, true);
				default: return false;
			}
		}
		async resolveIssues(resolvers) {
			return (await Promise.all(resolvers.map((resolver) => this.resolveIssue(resolver)))).every(Boolean);
		}
	};
	var PackRegistryStorage = class {
		get name() {
			return "PackRegistryStorage";
		}
		constructor(registry) {
			this.registry = registry;
			this._storage = /* @__PURE__ */ new Map();
		}
		async _load(filename) {
			try {
				return PackSchema.parse(await this.registry.fetch(filename));
			} catch (error) {
				Logger.error(this.name, `Failed to load "${filename}":`, error);
				this._storage.delete(filename);
				throw error;
			}
		}
		load(filename) {
			const promise = this._load(filename);
			this._storage.set(filename, promise);
			return promise;
		}
		get(filename) {
			return this._storage.get(filename) ?? this.load(filename);
		}
		clear() {
			this._storage.clear();
		}
		use(filename = null) {
			const [pack, setPack] = (0, react.useState)(null);
			const [loading, setLoading] = (0, react.useState)(true);
			const [error, setError] = (0, react.useState)(null);
			(0, react.useEffect)(() => {
				if (filename == null) {
					setPack(null);
					setLoading(false);
					setError(null);
					return;
				}
				let ignore = false;
				setLoading(true);
				this.get(filename).then((pack) => ignore || setPack(pack)).catch((error) => ignore || setError(error)).finally(() => ignore || setLoading(false));
				return () => ignore = true;
			}, [filename]);
			return {
				pack,
				loading,
				error
			};
		}
	};
	var PackRegistry_default = new class PackRegistry {
		get name() {
			return "PackRegistry";
		}
		get baseUrl() {
			return "https://gist.githubusercontent.com/okdevme/c0200ac6bc1665a91df8bd3c0eb46749";
		}
		get mainFilename() {
			return "Better-Animations-Pack-Registry.json";
		}
		get data() {
			return data.catalog;
		}
		get cache() {
			return this.data.cache;
		}
		set cache(value) {
			this.data.cache = value;
		}
		get hasCache() {
			return this.cache != null;
		}
		constructor() {
			this.verifier = new PackVerifier(this);
			this.storage = new PackRegistryStorage(this);
			this._pending = /* @__PURE__ */ new Set();
			this._error = null;
			this._items = this.cache?.items ?? [];
			this._authors = this.cache?.authors ?? [];
			this._notification = null;
			this._schedulerCallbackId = null;
			this.onPackLoaded = (pack) => {
				this.verifier.verifyAll([pack]);
				this.scheduleCheckForUpdates({ updateRegistry: false });
			};
			this.onPackUnloaded = (pack) => {
				this.verifier.temporaryWhitelist.delete(pack.filename);
			};
		}
		isPending(filename = this.mainFilename) {
			return this._pending.has(filename);
		}
		get hasPending() {
			return this._pending.size > 0;
		}
		get error() {
			return this._error;
		}
		set error(value) {
			this._error = value;
			this.onChange();
		}
		get hasError() {
			return this.error != null;
		}
		get isFatal() {
			return this.hasError && !this.hasCache;
		}
		get isReady() {
			return !this.isPending() || this.hasCache;
		}
		get items() {
			return this._items.map((item) => ({
				...item,
				verificationStatus: item.official ? VerificationStatus.OFFICIAL : VerificationStatus.VERIFIED,
				installed: PackManager_default.getPackByFile(item.filename, true)
			}));
		}
		set items(value) {
			this._items = value;
			this.onChange();
		}
		get authors() {
			return this._authors;
		}
		set authors(value) {
			this._authors = value;
			this.onChange();
		}
		onChange() {
			Emitter_default.emit(Events_default.PackRegistryUpdated);
		}
		initialize() {
			this.listenPackEvents();
			this.checkForUpdates();
			Logger.info(this.name, "Initialized.");
		}
		hasPack(filename) {
			return this.items.some((item) => item.filename === filename);
		}
		getPack(filename) {
			return this.items.find((item) => item.filename === filename);
		}
		getAuthor(username) {
			return this.authors.find((author) => author.username === username);
		}
		getSourceURL(filename) {
			return `${this.baseUrl}/raw/${filename}`;
		}
		async fetch(filename, parse = true, options = {}) {
			const response = await Net.fetch(`${this.getSourceURL(filename)}?${Date.now()}`, options);
			if (!response.ok) throw response;
			return parse ? response.json() : response.text();
		}
		async load(filename, parse, options) {
			this._pending.add(filename);
			this.onChange();
			try {
				return await this.fetch(filename, parse, options);
			} finally {
				this._pending.delete(filename);
				this.onChange();
			}
		}
		async updateRegistry(options) {
			this.error = null;
			Logger.info(this.name, "Updating registry...");
			try {
				const data = await this.load(this.mainFilename, options);
				this.cache = data;
				this.items = data.items;
				this.authors = data.authors;
				Logger.info(this.name, `Loaded ${this.items.length} packs.`);
				return true;
			} catch (error) {
				this.error = error;
				Logger.error(this.name, "Failed to update registry:", error);
				return false;
			} finally {
				this.storage.clear();
				this.verifier.verifyAll();
			}
		}
		async install(filename, options = {}, action = "install") {
			try {
				PackManager_default.saveAddon(filename, await this.load(filename, false, options));
				return true;
			} catch (error) {
				Logger.error(this.name, `Failed to ${action} "${filename}":`, error);
				Toasts.error(`Failed to ${action} "${filename}".`);
				return false;
			}
		}
		update(filename, options) {
			return this.install(filename, options, "update");
		}
		reinstall(filename, options) {
			return this.install(filename, options, "reinstall");
		}
		delete(filename) {
			try {
				PackManager_default.deleteAddon(filename);
				return true;
			} catch (error) {
				Logger.error(this.name, `Failed to delete "${filename}":`, error);
				Toasts.error(`Failed to delete "${filename}".`);
				return false;
			}
		}
		hasUpdate(pack) {
			const latest = this.getPack(pack.filename);
			if (!latest) return false;
			try {
				return Utils.semverCompare(pack.version, latest.version) > 0;
			} catch (error) {
				Logger.warn(this.name, `Failed to compare versions for "${pack.filename}":`, error);
				return regex_default.semver.test(latest.version);
			}
		}
		getOutdatedPacks() {
			return PackManager_default.getAllPacks(true).filter((pack) => this.hasUpdate(pack));
		}
		hasOutdatedPacks() {
			return PackManager_default.getAllPacks(true).some((pack) => this.hasUpdate(pack));
		}
		showUpdatesNotification(outdatedPacks = this.getOutdatedPacks()) {
			this._notification?.close();
			this._notification = Notifications.info({
				id: "BA__updatesNotification",
				content: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, outdatedPacks.length > 1 ? `${outdatedPacks.length} packs have updates!` : "One pack has an update!", /* @__PURE__ */ BdApi.React.createElement("ul", { class: "BA__updatesNotificationList" }, outdatedPacks.map((pack) => {
					const latest = this.getPack(pack.filename);
					return /* @__PURE__ */ BdApi.React.createElement("li", null, pack.name, latest && /* @__PURE__ */ BdApi.React.createElement("i", null, " v", latest.version));
				}))),
				duration: Infinity,
				actions: [{
					label: "Update All",
					onClick: () => this.updateAll()
				}, {
					label: "View Library",
					onClick: () => {
						data.library.sort = "default";
						settings_default.openSettingsModal(SettingsSection_default.Library);
					}
				}]
			});
		}
		async checkForUpdates(options = {}) {
			const { useToasts = false, updateRegistry = true } = options;
			Logger.info(this.name, "Checking for updates...");
			if (updateRegistry) {
				if (!await this.updateRegistry()) {
					if (useToasts) Toasts.error("Unable to check for updates. Please try again later.");
					return;
				}
			}
			const outdatedPacks = this.getOutdatedPacks();
			const updatesCount = outdatedPacks.length;
			if (!updatesCount) {
				Logger.info(this.name, "No updates found.");
				if (useToasts) Toasts.success("Everything is up to date!");
				return;
			}
			Logger.info(this.name, `Found ${updatesCount} updates.`);
			if (useToasts) return Toasts.show(`Found updates for ${updatesCount} of your packs!`);
			this.showUpdatesNotification(outdatedPacks);
		}
		scheduleCheckForUpdates(options) {
			cancelIdleCallback(this._schedulerCallbackId);
			this._schedulerCallbackId = requestIdleCallback(() => this.checkForUpdates(options));
		}
		async updateAll() {
			const packs = this.getOutdatedPacks();
			const results = await Promise.all(packs.map((pack) => this.update(pack.filename)));
			Logger.info(this.name, `Updated ${packs.length} packs.`);
			if (results.every(Boolean)) {
				Toasts.success("Everything is up to date!");
				this._notification?.close();
			}
		}
		getThumbnailSrc(pack) {
			return pack.thumbnailSrc ?? this.getPack(pack.filename)?.thumbnailSrc;
		}
		getAuthorAvatarSrc(pack) {
			if (!this.getPack(pack.filename)) return avatar_default;
			const author = this.getAuthor(pack.author);
			if (!author) return avatar_default;
			return `https://avatars.githubusercontent.com/u/${author.githubId}?s=60&v=4`;
		}
		isUnknown(pack) {
			return this.data.visited && !this.data.known.has(pack.filename);
		}
		markAsKnown(pack) {
			if (!this.isUnknown(pack)) return;
			this.data.known.add(pack.filename);
		}
		getUnknownPacks() {
			return this.items.filter((pack) => this.isUnknown(pack));
		}
		listenPackEvents() {
			Emitter_default.on(Events_default.PackLoaded, this.onPackLoaded);
			Emitter_default.on(Events_default.PackUnloaded, this.onPackUnloaded);
		}
		unlistenPackEvents() {
			Emitter_default.off(Events_default.PackLoaded, this.onPackLoaded);
			Emitter_default.off(Events_default.PackUnloaded, this.onPackUnloaded);
		}
		shutdown() {
			this.unlistenPackEvents();
			this.storage.clear();
			this._notification?.close();
			Logger.info(this.name, "Shutdown.");
		}
	}();
	css`.BA__updatesNotificationList {
    margin-top: 8px;
}``PackRegistry`;
	//#endregion
	//#region src/modules/PackManager.js
	var PackManager_default = new class PackManager extends AddonManager {
		get name() {
			return "PackManager";
		}
		get extension() {
			return ".pack.json";
		}
		get duplicatePattern() {
			return /\.pack\s?\([0-9]+\)\.json/;
		}
		get addonFolder() {
			return path.default.resolve(Plugins.folder, meta_default.name);
		}
		get prefix() {
			return "pack";
		}
		get language() {
			return "json";
		}
		get forbiddenSlugs() {
			return internalPackSlugs;
		}
		updatePackList() {
			return this.updateList();
		}
		loadAllPacks() {
			return this.loadAllAddons();
		}
		unloadPack(idOrFileOrAddon) {
			return this.unloadAddon(idOrFileOrAddon);
		}
		loadPack(filename) {
			return this.loadAddon(filename);
		}
		reloadPack(idOrFileOrAddon) {
			return this.reloadAddon(idOrFileOrAddon);
		}
		loadAddon(filename, shouldToast = true) {
			const error = super.loadAddon(filename, shouldToast);
			if (error) manager_default.registerAddonError(error);
			return error;
		}
		initializeAddon(addon) {
			try {
				Object.assign(addon, PackSchema.parse(addon));
			} catch (e) {
				Object.assign(addon, PackFallbackSchema({
					name: addon.slug,
					...PackRegistry_default.getPack(addon.filename),
					version: "0.0.0"
				}).parse(addon));
				return new AddonError(this.prefix, addon, formatZodError(e, {
					pack: addon,
					received: false,
					docs: Documentation.getDefinitionUrl(Documentation.Definition.Pack)
				}));
			}
		}
		isRestricted(pack) {
			return pack.partial || !PackRegistry_default.verifier.check(pack);
		}
		getAllPacks(includeRestricted = false) {
			return this.addonList.filter((p) => includeRestricted || !this.isRestricted(p)).sort((a, b) => a.name.localeCompare(b.name));
		}
		_getPack(predicate, includeRestricted = false) {
			return this.addonList.find((p) => (includeRestricted || !this.isRestricted(p)) && predicate(p));
		}
		getPack(slug, includeRestricted = false) {
			if (internalPackSlugs.includes(slug)) return internalPacks[slug];
			return this._getPack((p) => p.slug === slug, includeRestricted);
		}
		getPackByFile(filename, includeRestricted = false) {
			return this._getPack((p) => p.filename === filename, includeRestricted);
		}
		showInFolder(filename) {
			electron.default.shell.showItemInFolder(path.default.resolve(this.addonFolder, filename));
		}
	}();
	//#endregion
	//#region src/components/ServerModuleControls.jsx
	function ServerModuleControls({ module }) {
		return /* @__PURE__ */ BdApi.React.createElement(Checkbox, {
			value: module.settings.enhanceLayout,
			onChange: (_, value) => {
				module.settings.enhanceLayout = value;
				Emitter_default.emit(Events_default.ModuleSettingsChanged, module.id);
			}
		}, /* @__PURE__ */ BdApi.React.createElement(Stack$1, {
			direction: "horizontal",
			gap: 8
		}, /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-sm/normal" }, "Enhance layout"), /* @__PURE__ */ BdApi.React.createElement(Hint, { href: Documentation.enhanceLayoutUrl })));
	}
	//#endregion
	//#region src/modules/Core.jsx
	var Module = class extends Module$1 {
		get settings() {
			return Config_default.current.modules[this.id] ??= {};
		}
		getPack(slug) {
			return PackManager_default.getPack(slug);
		}
		getAnimationConfig(pack, animation, type) {
			return Config_default.pack(pack.slug).getAnimationConfig(animation.key, this.id, type);
		}
		onToggle(value) {
			super.onToggle(value);
			Emitter_default.emit(Events_default.ModuleToggled, this.id, value);
		}
		onSettingsChange() {
			super.onSettingsChange();
			Emitter_default.emit(Events_default.ModuleSettingsChanged, this.id);
		}
	};
	var moduleOptions = {
		[ModuleKey_default.Servers]: {
			description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0transitions when switching between servers and\xA0other full-screen pages, such as DMs and Discover."),
			controls: ServerModuleControls
		},
		[ModuleKey_default.Channels]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0transitions when switching between channels and other pages sharing the\xA0same sidebar.") },
		[ModuleKey_default.Settings]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0transitions when switching between sections of\xA0the\xA0settings.") },
		[ModuleKey_default.Layers]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0transitions when switching between full-screen views of\xA0the\xA0Discord\xA0app, such as Server\xA0Settings, Channel\xA0Settings, ", meta_default.name, " Settings, etc.") },
		[ModuleKey_default.Tooltips]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0appearance and disappearance of\xA0informative floating UI elements application-wide, such as various control descriptions, server titles in\xA0the\xA0server list and other non-interactive elements that provide clarity to\xA0Discord's interfaces.") },
		[ModuleKey_default.Popouts]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0appearance and disappearance of\xA0interactive floating UI elements application-wide, such as User Profiles, Select Inputs, Pinned Messages, etc.") },
		[ModuleKey_default.ContextMenu]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0appearance and disappearance of\xA0a\xA0context menu that is activated by\xA0right-clicking on\xA0various UI elements.") },
		[ModuleKey_default.Messages]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0appearance of\xA0new messages and the\xA0disappearance of\xA0deleted messages and other UI elements in\xA0the\xA0chat.") },
		[ModuleKey_default.ChannelList]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0appearance and disappearance of\xA0channels in\xA0the\xA0channel list triggered by\xA0switching categories, creating or deleting a\xA0channel, and other actions that change the contents of\xA0the\xA0channel list.") },
		[ModuleKey_default.Modals]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0appearance and disappearance of\xA0full-screen modal windows.") },
		[ModuleKey_default.ModalsBackdrop]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0appearance and disappearance of\xA0a\xA0dimming overlay behind modal windows.") },
		[ModuleKey_default.MembersSidebar]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0appearance and disappearance of\xA0sidebars inside the\xA0chat area, such as Member List, Message Search Results, etc.") },
		[ModuleKey_default.ThreadSidebar]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0appearance and disappearance of\xA0full-screen sidebars, such as Thread Chat, Forum Post Chat, etc.") },
		[ModuleKey_default.ThreadSidebarSwitch]: { description: () => /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Animates the\xA0transitions when switching between full-screen sidebars, such as between threads or forum posts.") }
	};
	var Core_default = new class Core {
		get name() {
			return "Core";
		}
		constructor() {
			this.modules = modules$1.map((options) => new Module({
				...options,
				...moduleOptions[options.id]
			}));
			this.globalChangeEvents = [
				Events_default.PackLoaded,
				Events_default.PackUnloaded,
				Events_default.PackUpdated,
				Events_default.SettingsChanged
			];
			this.onGlobalChange = () => this.onChange();
			this.onModuleChange = (id) => this.onChange(id);
		}
		initialize() {
			this.modules.forEach((m) => m.initializeAnimations());
			this.listenEvents();
			Logger.log(this.name, `Initialized ${this.modules.length} animation modules.`);
		}
		shutdown() {
			this.unlistenEvents();
			Logger.log(this.name, "Shutdown.");
		}
		onChange(id = null) {
			if (!id) return this.modules.forEach((m) => m.initializeAnimations());
			this.getModule(id)?.initializeAnimations();
		}
		listenEvents() {
			this.globalChangeEvents.forEach((e) => Emitter_default.on(e, this.onGlobalChange));
			Emitter_default.on(Events_default.ModuleSettingsChanged, this.onModuleChange);
		}
		unlistenEvents() {
			this.globalChangeEvents.forEach((e) => Emitter_default.off(e, this.onGlobalChange));
			Emitter_default.off(Events_default.ModuleSettingsChanged, this.onModuleChange);
		}
		getAllModules(includeNested = false) {
			return this.modules.filter((m) => includeNested || !m.parent);
		}
		getModule(id) {
			return this.modules.find((m) => m.id === id);
		}
		getParentModule(module) {
			return module.parent && this.getModule(module.parent);
		}
		getParentModules(module, _list = []) {
			const parent = this.getParentModule(module);
			if (!parent) return _list;
			return this.getParentModules(parent, [parent, ..._list]);
		}
		getChildModules(module) {
			return this.modules.filter((m) => m.parent === module.id);
		}
		getModulesUsingPack(pack) {
			return this.getAllModules(true).filter((module) => Object.values(module.animations).some((data) => data.pack?.filename === pack.filename));
		}
	}();
	//#endregion
	//#region src/hooks/useModule.js
	function moduleEffectFull(id, callback) {
		const events = [
			Events_default.PackLoaded,
			Events_default.PackUnloaded,
			Events_default.PackEnabled,
			Events_default.PackDisabled,
			Events_default.PackUpdated,
			Events_default.SettingsChanged
		];
		const moduleEvents = [Events_default.ModuleToggled, Events_default.ModuleSettingsChanged];
		const ifSameId = (moduleId) => moduleId === id && callback();
		events.forEach((e) => Emitter_default.on(e, callback));
		moduleEvents.forEach((e) => Emitter_default.on(e, ifSameId));
		return () => {
			events.forEach((e) => Emitter_default.off(e, callback));
			moduleEvents.forEach((e) => Emitter_default.off(e, ifSameId));
		};
	}
	function moduleEffectToggleOnly(id, callback) {
		const ifSameId = (moduleId) => moduleId === id && callback();
		Emitter_default.on(Events_default.ModuleToggled, ifSameId);
		return () => Emitter_default.off(Events_default.ModuleToggled, ifSameId);
	}
	function moduleEffect(id, callback, full = false) {
		if (full) return moduleEffectFull(id, callback);
		return moduleEffectToggleOnly(id, callback);
	}
	function injectModule(component, id, full = false) {
		Patcher_default.after(component?.prototype, "componentDidMount", (self) => {
			const effects = [].concat(id).map((id) => moduleEffect(id, () => self.forceUpdate(), full));
			self.__clearModuleEffect = () => effects.forEach((e) => e());
		});
		Patcher_default.after(component?.prototype, "componentWillUnmount", (self) => {
			self.__clearModuleEffect?.();
		});
	}
	function useModule(id, full = false) {
		const update = useUpdate();
		(0, react.useEffect)(() => moduleEffect(id, update, full), [id]);
		return Core_default.getModule(id);
	}
	//#endregion
	//#region src/components/error/ErrorDetailsActions.jsx
	function useSetting(error) {
		const { config, onChange } = useConfig();
		if (!(error instanceof InternalError)) return null;
		switch (error.category) {
			case InternalError.Category.PRIORITIZE_ANIMATION_SMOOTHNESS: return {
				name: Messages.PRIORITIZE_ANIMATION_SMOOTHNESS,
				value: config.general.prioritizeAnimationSmoothness,
				setValue: (value) => {
					config.general.prioritizeAnimationSmoothness = value;
					onChange();
				}
			};
			default: return null;
		}
	}
	function useActions(error) {
		const module = useModule(error.module?.id);
		const setting = useSetting(error);
		const actions = [];
		if (error instanceof InternalError) {
			actions.push(/* @__PURE__ */ BdApi.React.createElement(Button$1, {
				size: "sm",
				text: "Check for updates",
				onClick: () => UserSettings.openUserSettings("betterdiscord_updates_panel")
			}));
			if (setting) actions.push(/* @__PURE__ */ BdApi.React.createElement(Button$1, {
				variant: "secondary",
				size: "sm",
				text: `${setting.value ? "Disable" : "Disabled"} ${setting.name}`,
				disabled: !setting.value,
				onClick: () => {
					setting.setValue(false);
					Config_default.save();
				}
			}));
		} else if (module && !settings_default.isSettingsModalOpen()) actions.push(/* @__PURE__ */ BdApi.React.createElement(Button$1, {
			size: "sm",
			text: "Go to Settings",
			onClick: () => {
				settings_default.openSettingsModal(module.id);
				ModalActions.closeAllModals();
			}
		}));
		if (module) actions.push(/* @__PURE__ */ BdApi.React.createElement(Button$1, {
			variant: "secondary",
			size: "sm",
			text: `${module.isEnabled() ? "Disable" : "Disabled"} ${error.module.name} animations`,
			disabled: !module.isEnabled(),
			onClick: () => {
				module.setIsEnabled(false);
				Config_default.save();
			}
		}));
		return actions;
	}
	function ErrorDetailsActions({ error, className }) {
		const actions = useActions(error);
		if (!actions.length) return null;
		return /* @__PURE__ */ BdApi.React.createElement(Stack$1, { gap: 8 }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "heading-md/medium",
			color: "text-strong"
		}, "Suggested Actions"), /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("BA__errorDetailsActions", className) }, actions));
	}
	var ErrorDetailsActions_default = (0, react.memo)(ErrorDetailsActions);
	css`.BA__errorDetailsActions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}``ErrorDetailsActions`;
	//#endregion
	//#region src/components/error/ErrorDetails.jsx
	function ErrorDetails({ error, open = false }) {
		const icon = (0, react.useMemo)(() => {
			if (error instanceof AnimationError || error instanceof AddonError) return /* @__PURE__ */ BdApi.React.createElement(JSONIcon, { size: "md" });
			return /* @__PURE__ */ BdApi.React.createElement(IconBrand, {
				size: "lg",
				color: colors.INTERACTIVE_ICON_DEFAULT
			});
		}, [error]);
		const title = (0, react.useMemo)(() => {
			if (error instanceof InternalError) return "Internal error";
			if (error.pack) return error.pack.name;
			return "Unclassified error";
		}, [error]);
		const hint = (0, react.useMemo)(() => {
			if (error instanceof InternalError) return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, error.module ? `${error.module.name} animations` : `Some parts of ${meta_default.name}`, " may\xA0not\xA0work or\xA0function\xA0incorrectly.");
			if (error instanceof AddonError) return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "This pack cannot be\xA0loaded due to an\xA0unexpected error.");
			if (error instanceof AnimationError) return /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "An unexpected error occurred in the\xA0\"", error.animation.name, "\"\xA0animation on\xA0", error.module.name, ".");
			return "Unknown error occurred.";
		}, [error]);
		const code = (0, react.useMemo)(() => {
			if (error instanceof InternalError) return meta_default.invite;
			return error.pack?.invite;
		}, [error]);
		const invite = useStateFromStores([InviteStore], () => isInviteInvalid(InviteStore.getInvite(code)) ? null : code);
		const alert = (0, react.useMemo)(() => {
			if (invite) return "Go to the Support Server to get help with this error:";
			if (error.pack) return `Reach out to the pack's author${error.pack.author ? ` (${error.pack.author})` : ""} to get help with this error.`;
			return null;
		}, [error, invite]);
		const content = `${error.name}: ` + error.message;
		const codeBlock = attempt(() => Parser.codeBlock.react({
			content,
			lang: "json"
		}, null, {}), () => /* @__PURE__ */ BdApi.React.createElement("pre", null, /* @__PURE__ */ BdApi.React.createElement("code", { className: "hljs" }, content)));
		return /* @__PURE__ */ BdApi.React.createElement("details", {
			className: "BA__errorDetails",
			open
		}, /* @__PURE__ */ BdApi.React.createElement("summary", { className: "BA__errorDetailsHeader" }, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__errorDetailsIcon" }, icon), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__errorDetailsHeaderInner" }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			tag: "h3",
			variant: "heading-md/semibold"
		}, title), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__errorDetailsHeading" }, /* @__PURE__ */ BdApi.React.createElement("svg", {
			className: "BA__errorDetailsHeadingIcon",
			"aria-hidden": "false",
			width: "16",
			height: "16",
			viewBox: "0 0 12 12"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: "currentColor",
			d: "M6 1C3.243 1 1 3.244 1 6c0 2.758 2.243 5 5 5s5-2.242 5-5c0-2.756-2.243-5-5-5zm0 2.376a.625.625 0 110 1.25.625.625 0 010-1.25zM7.5 8.5h-3v-1h1V6H5V5h1a.5.5 0 01.5.5v2h1v1z"
		})), /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "text-xs/normal",
			color: "text-subtle"
		}, hint))), /* @__PURE__ */ BdApi.React.createElement("svg", {
			className: "BA__errorDetailsExpander",
			width: "24",
			height: "24",
			viewBox: "0 0 24 24"
		}, /* @__PURE__ */ BdApi.React.createElement("path", {
			fill: "none",
			stroke: "currentColor",
			strokeWidth: "2",
			strokeLinecap: "round",
			strokeLinejoin: "round",
			d: "M7 10L12 15 17 10",
			"aria-hidden": "true"
		}))), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__errorDetailsBody" }, /* @__PURE__ */ BdApi.React.createElement(Divider$2, null), /* @__PURE__ */ BdApi.React.createElement(Stack$1, { gap: 20 }, /* @__PURE__ */ BdApi.React.createElement(ErrorDetailsActions_default, { error }), /* @__PURE__ */ BdApi.React.createElement(Stack$1, { gap: 8 }, /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "heading-md/medium",
			color: "text-strong"
		}, "Error"), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__errorDetailsStack" }, codeBlock)), /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, { noop: true }, alert ? /* @__PURE__ */ BdApi.React.createElement(Alert, { messageType: AlertTypes.INFO }, /* @__PURE__ */ BdApi.React.createElement("div", null, alert), invite ? /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__errorDetailsInvite" }, /* @__PURE__ */ BdApi.React.createElement(InviteEmbed, {
			code: invite,
			message: { author: { username: error.pack?.author } },
			getAcceptInviteContext: () => ({})
		})) : null) : null))));
	}
	css`.BA__errorDetails {
    position: relative;
    border-radius: 8px;
    padding: 0;
    background: var(--background-base-lower);
    border: 1px solid var(--border-subtle);
}

.BA__errorDetailsHeader {
    display: flex;
    align-items: center;
    border-radius: 5px;
    padding: 20px 16px;
    cursor: pointer;
    outline: none;
}

.BA__errorDetailsHeader:focus-visible {
    box-shadow: 0 0 0 4px var(--focus-primary);
}

.BA__errorDetailsIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    background-color: var(--background-base-lowest);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 10px;
}

.BA__errorDetailsIcon svg {
    fill: var(--interactive-icon-default);
}

.BA__errorDetailsExpander {
    transform: rotate(-90deg);
    color: var(--interactive-icon-default);
    transition: transform 0.2s ease;
}

.BA__errorDetails[open] .BA__errorDetailsExpander {
    transform: none;
}

.BA__errorDetailsExpander,
.BA__errorDetailsIcon {
    flex: 0 0 auto;
}

.BA__errorDetailsHeaderInner {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.BA__errorDetailsBody {
    padding: 0 16px 24px;
}

.BA__errorDetailsBody .BA__divider {
    margin-bottom: 24px;
}

.BA__errorDetailsHeading {
    display: flex;
    flex-grow: 0;
    justify-content: flex-start;
    margin-top: 4px;
}

.BA__errorDetailsHeadingIcon {
    margin-right: 4px;
    color: var(--interactive-icon-default);
}

.BA__errorDetailsStack code {
    user-select: text;
    font-size: 0.875rem;
    line-height: 1.125rem;
    text-indent: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--background-base-lowest) var(--background-base-lower);
    background: var(--background-base-lower);
    border: 1px solid var(--background-base-lowest);
}

.BA__errorDetailsStack pre {
    position: relative;
}

.BA__errorDetailsStack pre [class*="codeActions"] {
    position: absolute;
    display: none;
    right: 4px;
    top: 8px;
    color: var(--text-default);
}

.BA__errorDetailsStack pre:hover [class*="codeActions"] {
    display: block;
}

.BA__errorDetailsStack pre [class*="codeActions"] > div {
    cursor: pointer;
}

.BA__errorDetailsInvite {
    margin-top: 8px;
}
.BA__errorDetailsInvite > div {
    max-width: none;
}``ErrorDetails`;
	//#endregion
	//#region src/components/error/ErrorModal.jsx
	function ErrorModal({ errors = [], ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(Modal$2, {
			title: "Error Inspector",
			size: ModalSize.MEDIUM,
			confirmText: "Dismiss",
			...props
		}, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__errorModalList" }, errors.map((error) => /* @__PURE__ */ BdApi.React.createElement(ErrorDetails, {
			error,
			open: errors.length <= 1
		}))));
	}
	css`.BA__errorModalList {
    display: flex;
    flex-direction: column;
    gap: 16px;
}``ErrorModal`;
	//#endregion
	//#region src/components/error/ErrorToast.jsx
	function ErrorToastText() {
		useEmitterEffect(Events_default.ErrorOccurred);
		const count = manager_default.errors.length;
		const text = count > 1 ? `${count}${manager_default.errorsOverload ? "+" : ""} errors occurred.` : "An error occurred.";
		return /* @__PURE__ */ BdApi.React.createElement("span", null, text);
	}
	function ErrorToast({ onView }) {
		return /* @__PURE__ */ BdApi.React.createElement(Toast, {
			type: ToastTypes.ERROR,
			text: /* @__PURE__ */ BdApi.React.createElement(ErrorToastText, null)
		}, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__errorToastButton" }, /* @__PURE__ */ BdApi.React.createElement(TextButton, {
			className: "BA__errorToastButton",
			text: "View",
			onClick: onView
		})));
	}
	css`.BA__errorToastButton {
    display: flex;
    align-items: center;
    padding: 0 16px;
}``ErrorToast`;
	//#endregion
	//#region src/error/manager.jsx
	var ErrorManagerToastSymbol = Symbol("ErrorManagerToast");
	var ERROR_MANAGER_NOTIFICATION_ID = "BA__errorManagerNotification";
	var manager_default = new class ErrorManager$1 extends ErrorManager {
		get timeoutDuration() {
			return 1e4;
		}
		get maxErrors() {
			return 20;
		}
		constructor() {
			super();
			this.errors = [];
			this.errorsOverload = false;
			this.timeout = null;
			this.notification = null;
		}
		initialize() {
			this.clear();
			Logger.info(this.name, "Initialized.");
		}
		shouldSuppress(error) {
			if (error.silent && true) return true;
			switch (Config_default.current.general.suppressErrors) {
				case SuppressErrors_default.All: return true;
				case SuppressErrors_default.Animation: return error instanceof AnimationError;
				default: return false;
			}
		}
		registerError(error, suppress = false) {
			super.registerError(error);
			if (suppress || this.shouldSuppress(error)) return;
			this.errors.unshift(error);
			if (this.errors.length > this.maxErrors) {
				this.errors = this.errors.slice(0, this.maxErrors);
				this.errorsOverload = true;
			}
			Emitter_default.emit(Events_default.ErrorOccurred);
			if (this.isToastActive()) clearTimeout(this.timeout);
			else this.showToast();
			this.timeout = setTimeout(this.clear.bind(this), this.timeoutDuration);
		}
		get usingNotifications() {
			return !createToast || !ToastStoreModule || !useToastStore || !popToast;
		}
		onView() {
			this.showModal();
			this.clear();
		}
		showToast() {
			if (this.usingNotifications) {
				this.notification = Notifications.error({
					id: ERROR_MANAGER_NOTIFICATION_ID,
					content: /* @__PURE__ */ BdApi.React.createElement(ErrorToastText, null),
					duration: Infinity,
					actions: [{
						label: "View",
						onClick: this.onView.bind(this)
					}],
					onClose: this.clear.bind(this)
				});
				return;
			}
			useToastStore.setState((state) => ({
				...state,
				currentToastMap: new Map([...state.currentToastMap, ["APP", createToast(null, ErrorManagerToastSymbol, {
					component: /* @__PURE__ */ BdApi.React.createElement(ErrorToast, { onView: this.onView.bind(this) }),
					duration: 0
				})]])
			}));
		}
		closeToast() {
			if (this.usingNotifications) return this.notification?.close();
			if (this.isToastActive()) popToast("APP", true);
		}
		isToastActive() {
			if (this.usingNotifications) return this.notification?.isVisible() ?? false;
			return useToastStore.getState().currentToastMap.get("APP")?.type === ErrorManagerToastSymbol;
		}
		clear() {
			this.errors = [];
			this.errorsOverload = false;
			clearTimeout(this.timeout);
			this.timeout = null;
			this.closeToast();
		}
		showModal(errors = this.errors) {
			if (!errors?.length) return;
			ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(ErrorModal, {
				errors,
				...props
			}));
		}
		shutdown() {
			this.clear();
			Logger.info(this.name, "Shutdown.");
		}
	}();
	//#endregion
	//#region src/error/boundary.jsx
	function errorBoundary(callback, fallback = () => {}, options = {}) {
		return (...args) => {
			try {
				return callback(...args);
			} catch (error) {
				manager_default.registerInternalError(new InternalError(error.stack, options));
			}
			return fallback(...args);
		};
	}
	function moduleErrorBoundary(moduleId, callback, fallback) {
		return errorBoundary(callback, fallback, { module: Core_default.getModule(moduleId) });
	}
	function attempt(callback, fallback, options) {
		return errorBoundary(callback, fallback, options)();
	}
	var ErrorBoundary = class ErrorBoundary extends react.Component {
		static NO_ERROR = {};
		state = { error: ErrorBoundary.NO_ERROR };
		componentDidCatch(error, errorInfo) {
			this.props.onError?.({
				error,
				errorInfo
			});
			const internalError = new InternalError(error.stack + errorInfo.componentStack, { module: this.props.module });
			this.setState({ error: internalError });
			manager_default.registerError(internalError, this.props.silent === true);
		}
		render() {
			const { noop, fallback, children, text = "An error occurred.", actions = (e) => e, module, ...props } = this.props;
			if (this.state.error === ErrorBoundary.NO_ERROR) return children;
			if (noop) return null;
			if (fallback !== void 0) return fallback;
			const _actions = /* @__PURE__ */ BdApi.React.createElement(Button$1, {
				size: "sm",
				text: "View",
				onClick: () => manager_default.showModal([this.state.error])
			});
			return /* @__PURE__ */ BdApi.React.createElement(ErrorCard, {
				...props,
				text,
				actions: actions?.(_actions)
			});
		}
	};
	ErrorBoundary.wrap = (Component, boundaryProps) => (props) => /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, boundaryProps, /* @__PURE__ */ BdApi.React.createElement(Component, props));
	//#endregion
	//#region src/modules/Patcher.js
	var BaseTinyPatcher = class {
		static before(moduleToPatch, functionName, callback) {
			const originalFunction = moduleToPatch[functionName];
			moduleToPatch[functionName] = function(...args) {
				callback(this, args);
				return originalFunction.apply(this, args);
			};
		}
		static after(moduleToPatch, functionName, callback) {
			const originalFunction = moduleToPatch[functionName];
			moduleToPatch[functionName] = function(...args) {
				const value = originalFunction.apply(this, args);
				const returnValue = callback(this, args, value);
				return returnValue !== void 0 ? returnValue : value;
			};
		}
		static instead(moduleToPatch, functionName, callback) {
			const originalFunction = moduleToPatch[functionName];
			moduleToPatch[functionName] = function(...args) {
				return callback(this, args, originalFunction.bind(this));
			};
		}
		static unpatchAll() {}
	};
	function getDefaultFallback(type) {
		switch (type) {
			case "after": return (self, args, value) => value;
			case "instead": return (self, args, original) => original.apply(self, args);
			default: return () => void 0;
		}
	}
	var PatcherWrapper = class {
		constructor(_basePatcher) {
			this._basePatcher = _basePatcher;
		}
		_patch(type, moduleId, moduleToPatch, functionName, callback, options) {
			if (typeof moduleId !== "string") {
				[, moduleToPatch, functionName, callback, options] = arguments;
				moduleId = null;
			}
			const { fallback = getDefaultFallback(type), ...rest } = options ?? {};
			const errorOptions = {
				module: moduleId && Core_default.getModule(moduleId),
				category: moduleId ? InternalError.Category.MODULE : InternalError.Category.GENERAL,
				...rest
			};
			return attempt(() => {
				if (typeof moduleToPatch !== "object" || typeof functionName !== "string") throw new Error("Module received by Patcher is unresolved or invalid");
				return this._basePatcher[type](moduleToPatch, functionName, errorBoundary(callback, fallback, errorOptions));
			}, () => {}, errorOptions);
		}
		before(moduleId, moduleToPatch, functionName, callback, options) {
			return this._patch("before", moduleId, moduleToPatch, functionName, callback, options);
		}
		after(moduleId, moduleToPatch, functionName, callback, options) {
			return this._patch("after", moduleId, moduleToPatch, functionName, callback, options);
		}
		instead(moduleId, moduleToPatch, functionName, callback, options) {
			return this._patch("instead", moduleId, moduleToPatch, functionName, callback, options);
		}
		unpatchAll() {
			return this._basePatcher.unpatchAll();
		}
	};
	var Patcher_default = new PatcherWrapper(BDPatcher);
	var TinyPatcher = new PatcherWrapper(BaseTinyPatcher);
	//#endregion
	//#region src/utils/forceUpdate.js
	function forceAppUpdate() {
		Dispatcher.dispatch({ type: "DOMAIN_MIGRATION_START" });
		requestIdleCallback(() => Dispatcher.dispatch({ type: "DOMAIN_MIGRATION_SKIP" }));
	}
	//#endregion
	//#region src/hooks/usePrevious.js
	function usePrevious(value) {
		const ref = (0, react.useRef)(value);
		(0, react.useEffect)(() => {
			ref.current = value;
		}, [value]);
		return ref.current;
	}
	//#endregion
	//#region src/hooks/useLocationKey.js
	function useLocationKey(shouldSwitch, getSwitchDirection = () => 0, location = Router.useLocation()) {
		const prevLocation = usePrevious(location);
		const key = (0, react.useRef)(0);
		let direction = 0;
		if (prevLocation && !Object.is(prevLocation, location) && shouldSwitch(location, prevLocation)) {
			key.current += 1;
			direction = getSwitchDirection(location, prevLocation);
		}
		return [key.current, direction];
	}
	//#endregion
	//#region src/utils/routes.js
	function guildActionRowToChannelRoute(guildActionRow) {
		return {
			[GuildActionRow.GUILD_HOME]: StaticChannelRoute.GUILD_HOME,
			[GuildActionRow.GUILD_SCHEDULED_EVENTS]: StaticChannelRoute.GUILD_SCHEDULED_EVENTS,
			[GuildActionRow.GUILD_ROLE_SUBSCRIPTIONS]: StaticChannelRoute.ROLE_SUBSCRIPTIONS,
			[GuildActionRow.GUILD_SHOP]: StaticChannelRoute.GUILD_SHOP,
			[GuildActionRow.GUILD_GAME_SHOP]: StaticChannelRoute.GAME_SHOP,
			[GuildActionRow.CHANNELS_AND_ROLES]: [StaticChannelRoute.CHANNEL_BROWSER, StaticChannelRoute.CUSTOMIZE_COMMUNITY],
			[GuildActionRow.GUILD_MOD_DASH_MEMBER_SAFETY]: StaticChannelRoute.MEMBER_SAFETY,
			[GuildActionRow.GUILD_BOOSTS]: StaticChannelRoute.GUILD_BOOSTS,
			[GuildActionRow.GAME_SERVERS]: StaticChannelRoute.GAME_SERVERS
		}[guildActionRow] ?? guildActionRow;
	}
	function getStaticDMRouteIndex(pathname) {
		return [
			(p) => p === Routes.ME_ACTIVITY,
			(p) => p === Routes.FRIENDS,
			(p) => p.startsWith(Routes.APPLICATION_LIBRARY),
			(p) => p.startsWith(Routes.MESSAGE_REQUESTS),
			(p) => p.startsWith(Routes.APPLICATION_STORE),
			(p) => p.startsWith(Routes.COLLECTIBLES_SHOP),
			(p) => p.startsWith(Routes.FAMILY_CENTER),
			(p) => p.startsWith(Routes.QUEST_HOME_V2)
		].findIndex((c) => c(pathname ?? ""));
	}
	//#endregion
	//#region src/utils/guilds.js
	function getSortedGuildTreeIds(node = SortedGuildStore.getGuildsTree().root) {
		if (node.children?.length) return node.children.map(getSortedGuildTreeIds).flat();
		return node.id;
	}
	function getSortedGuildChannelIds(guildChannels) {
		return [(guildChannels.guildActionSection?.guildActionRows ?? []).map(guildActionRowToChannelRoute), guildChannels.getSortedCategories().flatMap((c) => (c.shownChannelIds ?? []).flatMap((id) => [id, ...c.channels[id].threadIds]))].flat();
	}
	//#endregion
	//#region shared/utils/ensureOnce.js
	function ensureOnce() {
		let triggered = /* @__PURE__ */ new Map();
		return (fn, key = "default") => {
			if (triggered.get(key)) return;
			fn();
			triggered.set(key, true);
		};
	}
	//#endregion
	//#region src/patches/GuildChannelList/ChannelStackStore.js
	var channels = /* @__PURE__ */ new Set();
	var guilds = /* @__PURE__ */ new Set();
	function add(set, item, timeout = 10) {
		set.add(item);
		setTimeout(() => set.delete(item), timeout);
	}
	function handleCategoryCollapse({ id }) {
		add(guilds, ChannelStore.getChannel(id)?.guild_id ?? id);
	}
	function handleCategoryCollapseAll({ guildId }) {
		add(guilds, guildId);
	}
	function handleChannelCreate({ channel }) {
		add(channels, channel.id);
	}
	var ChannelStackStore_default = new class ChannelStackStore extends Flux.Store {
		getChannelsAwaitingTransition() {
			return {
				channels,
				guilds
			};
		}
	}(Dispatcher, {
		CATEGORY_COLLAPSE: handleCategoryCollapse,
		CATEGORY_EXPAND: handleCategoryCollapse,
		CATEGORY_COLLAPSE_ALL: handleCategoryCollapseAll,
		CATEGORY_EXPAND_ALL: handleCategoryCollapseAll,
		CHANNEL_CREATE: handleChannelCreate,
		CHANNEL_DELETE: handleChannelCreate
	});
	//#endregion
	//#region src/components/PassThrough.jsx
	function PassThrough({ children, ...props }) {
		return children(props);
	}
	//#endregion
	//#region src/patches/GuildChannelList/patchChannelItem.js
	function patchChannelItem() {
		const once = ensureOnce();
		const callback = (key) => (self, args, value) => {
			once(() => {
				injectModule(value?.type?.DecoratedComponent, ModuleKey_default.ChannelList);
				Patcher_default.after(ModuleKey_default.ChannelList, value?.type?.DecoratedComponent?.prototype, "render", (self, args, value) => {
					if (!Core_default.getModule(ModuleKey_default.ChannelList).isEnabled()) return;
					if (!self.__containerRef) self.__containerRef = (0, react.createRef)();
					const container = findInReactTree(value, (m) => m?.type === "li");
					if (!container) return;
					switch (typeof container.props.ref) {
						case "object":
							self.__containerRef = container.props.ref;
							break;
						case "function":
							TinyPatcher.after(container.props, "ref", (_, [ref]) => self.__containerRef.current = ref);
							break;
						default: container.props.ref = self.__containerRef;
					}
				});
			}, key);
		};
		Patcher_default.after(...ChannelItemKeyed, callback("channel"));
		Patcher_default.after(...VoiceChannelItemKeyed, callback("voice"));
		Patcher_default.after(...StageVoiceChannelItemKeyed, callback("stage"));
	}
	//#endregion
	//#region src/hooks/useWindow.js
	var mainWindow = window;
	function useWindow() {
		const { renderWindow } = (0, react.use)(AppContext);
		return {
			window: renderWindow,
			isMainWindow: renderWindow === mainWindow
		};
	}
	function MainWindowOnly({ children, fallback }) {
		const { isMainWindow } = useWindow();
		return isMainWindow ? typeof children === "function" ? children() : children : fallback;
	}
	//#endregion
	//#region src/patches/GuildChannelList/patchChannelThreadList.js
	function patchChannelThreadList() {
		Patcher_default.after(ModuleKey_default.ChannelList, ChannelThreadList, "type", (self, [props], value) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.ChannelList);
			if (!isMainWindow || !module.isEnabled()) return;
			const container = findInReactTree(value, (m) => m?.type === "li");
			if (!container) return;
			container.props.ref = props.ref;
		});
	}
	//#endregion
	//#region src/patches/GuildChannelList/patchListThin.jsx
	function ListItem({ children, ...props }) {
		const itemRef = (0, react.useRef)();
		children.props.ref = itemRef;
		const containerRef = (0, react.useMemo)(() => ({ get current() {
			if (itemRef.current instanceof HTMLElement) return itemRef.current;
			return Utils.findInTree(itemRef.current, (m) => m?.__containerRef, { walkable: ["decoratedRef", "current"] })?.__containerRef.current;
		} }), [itemRef]);
		return /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			containerRef,
			...props
		}, children);
	}
	function patchListThin(ListThin) {
		Patcher_default.after(ModuleKey_default.ChannelList, ListThin, "render", (self, [props], value) => {
			const isChannelList = props.id?.includes("channels");
			const channelsToAnimate = isChannelList && useStateFromStores([ChannelStackStore_default], () => ChannelStackStore_default.getChannelsAwaitingTransition());
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.ChannelList);
			if (!isMainWindow || !isChannelList || !module.isEnabled()) return;
			const focusRingScope = findInReactTree(value, (m) => m?.containerRef);
			if (!focusRingScope || !Array.isArray(focusRingScope.children)) return;
			const shouldAnimate = (item) => {
				if (isChannelList) {
					const { channel } = findInReactTree(item, (m) => m?.channel) ?? {};
					if (channel) return channelsToAnimate.channels.has(channel.id) || channelsToAnimate.guilds.has(channel.guild_id);
				}
				return false;
			};
			const childFactory = (e) => (0, react.cloneElement)(e, { exit: e.props.items.some((i) => shouldAnimate(i)) });
			focusRingScope.children = /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
				module,
				fallback: focusRingScope.children
			}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, {
				component: null,
				childFactory
			}, focusRingScope.children.map((item) => {
				if (!item) return item;
				const items = [].concat(item.type === react.Fragment ? item.props.children : item).filter((i) => !!i);
				return /* @__PURE__ */ BdApi.React.createElement(PassThrough, {
					key: item.key,
					enter: shouldAnimate(item),
					exit: false,
					module,
					items
				}, (props) => props.items.map((item) => /* @__PURE__ */ BdApi.React.createElement(ListItem, props, item)));
			})));
		});
		patchChannelItem();
		patchChannelThreadList();
	}
	css`${DiscordSelectors.ChannelItem.containerDefault}, ${DiscordSelectors.ChannelItem.containerDragBefore},
${DiscordSelectors.ChannelItem.containerUserOver}, ${DiscordSelectors.ChannelItem.containerDragAfter} {
    transition: none;
}``ListThin (Channel List)`;
	//#endregion
	//#region src/patches/GuildChannelList/patchGuildChannelList.js
	var currentGuildChannels = null;
	function patchGuildChannelList() {
		const once = ensureOnce();
		let patched = null;
		Patcher_default.after(ModuleKey_default.ChannelList, ...GuildChannelListKeyed, (self, args, value) => {
			currentGuildChannels = value.props.guildChannels;
			if (patched) {
				value.type = patched;
				return;
			}
			TinyPatcher.after(ModuleKey_default.ChannelList, value, "type", (self, args, value) => {
				const channelList = findInReactTree(value, (m) => m?.type?.prototype?.renderList);
				if (!channelList) return;
				once(() => {
					Patcher_default.after(ModuleKey_default.ChannelList, channelList.type.prototype, "renderList", (self, args, value) => {
						TinyPatcher.after(ModuleKey_default.ChannelList, value.props, "children", (self, args, value) => {
							once(() => patchListThin(value.type), "scroller");
						});
					});
				}, "channelList");
			});
			patched = value.type;
		});
	}
	//#endregion
	//#region src/utils/locations.js
	function matchExact(pathname, path) {
		return Router.matchPath(pathname, {
			path,
			exact: true
		});
	}
	function matchChannelRoutes(...locations) {
		return locations.map((l) => {
			const channel = matchExact(l.pathname, guildChannelPath);
			if (channel && !channel.params.guildId) channel.params.guildId = "@me";
			return channel;
		});
	}
	function shouldSwitchContent(next, prev) {
		const [nextChannel, prevChannel] = matchChannelRoutes(next, prev);
		const nextOrPrev = errorBoundary((fn, n = next, p = prev) => fn(n) + fn(p), () => 0);
		if (nextOrPrev((l) => l.pathname.startsWith(Routes.GLOBAL_DISCOVERY)) === 1 || nextOrPrev((l) => l.pathname.startsWith(Routes.GUILD_MEMBER_VERIFICATION(""))) || nextOrPrev((l) => l.pathname.startsWith(Routes.GUILD_MEMBER_VERIFICATION_FOR_HUB(""))) || nextOrPrev((l) => matchExact(l.pathname, Routes.GUILD_BOOSTING_MARKETING(GuildChannelRouteParams.guildId()))) || nextOrPrev((l) => l?.params?.channelId === StaticChannelRoute.GUILD_ONBOARDING, nextChannel, prevChannel)) return true;
		if (nextChannel && prevChannel) return nextChannel.params.guildId !== prevChannel.params.guildId;
		if (nextChannel || prevChannel) return (nextChannel ?? prevChannel).params.guildId !== "@me";
		return false;
	}
	function shouldSwitchPage(next, prev, isContentSwitched = shouldSwitchContent(next, prev)) {
		if (isContentSwitched || next.pathname === prev.pathname) return false;
		const nextOrPrev = (fn, n = next, p = prev) => fn(n) + fn(p);
		if (nextOrPrev((l) => l.pathname.startsWith(Routes.GLOBAL_DISCOVERY))) return false;
		const [nextChannel, prevChannel] = matchChannelRoutes(next, prev);
		if (nextChannel && prevChannel && nextChannel.params.channelId === prevChannel.params.channelId) return false;
		return true;
	}
	function getSwitchContentDirection(next, prev) {
		const [nextChannel, prevChannel] = matchChannelRoutes(next, prev);
		if (prevChannel?.params.guildId === "@me") return 1;
		if (nextChannel?.params.guildId === "@me") return 0;
		if (prev.pathname.startsWith(Routes.GLOBAL_DISCOVERY)) return 0;
		if (next.pathname.startsWith(Routes.GLOBAL_DISCOVERY)) return 1;
		if (!nextChannel) return 0;
		if (!prevChannel) return 1;
		const sortedGuildIds = getSortedGuildTreeIds();
		const indexOf = (channel) => sortedGuildIds.indexOf(channel.params.guildId);
		return +(indexOf(nextChannel) > indexOf(prevChannel));
	}
	function getSwitchPageDirection(next, prev) {
		const [nextChannel, prevChannel] = matchChannelRoutes(next, prev);
		if (nextChannel && prevChannel && nextChannel.params.guildId !== "@me" && nextChannel.params.guildId === prevChannel.params.guildId) {
			const sortedChannelIds = currentGuildChannels ? getSortedGuildChannelIds(currentGuildChannels) : [];
			const indexOf = (channel) => sortedChannelIds.indexOf(channel.params.channelId);
			return +(indexOf(nextChannel) > indexOf(prevChannel));
		}
		const [nextDMStaticIndex, prevDMStaticIndex] = [next.pathname, prev.pathname].map(getStaticDMRouteIndex);
		if (nextDMStaticIndex !== -1 && prevDMStaticIndex !== -1) return +(nextDMStaticIndex > prevDMStaticIndex);
		if (nextChannel?.params.channelId && prevChannel?.params.channelId) {
			const sortedChannelIds = PrivateChannelSortStore.getPrivateChannelIds();
			const indexOf = (channel) => sortedChannelIds.indexOf(channel.params.channelId);
			return +(indexOf(nextChannel) > indexOf(prevChannel));
		}
		if (prevChannel?.params.channelId) return 0;
		if (nextChannel?.params.channelId) return 1;
		return 0;
	}
	//#endregion
	//#region src/patches/AppView/patchAppPanels.jsx
	function getDismissibleKey(theme) {
		return `userPanelMisplacedAlert:${theme.id}`;
	}
	function UserPanelMisplacedAlertModal({ theme, setEnhanceLayout, onClose, ...props }) {
		const themeName = theme.name ?? theme.id;
		const [isDismissed, setIsDismissed] = useDismissible(getDismissibleKey(theme));
		(0, react.useEffect)(() => {
			if (isDismissed) onClose();
		}, [isDismissed]);
		return /* @__PURE__ */ BdApi.React.createElement(Modal$2, {
			...props,
			onClose,
			footer: false
		}, /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-md/normal" }, /* @__PURE__ */ BdApi.React.createElement("p", null, "User Panel appears to be out of place."), /* @__PURE__ */ BdApi.React.createElement("p", null, "This may be due to the ", /* @__PURE__ */ BdApi.React.createElement(Anchor, { onClick: () => handleClick({ href: Documentation.enhanceLayoutUrl }) }, /* @__PURE__ */ BdApi.React.createElement("b", null, "Enhance layout")), " option of Servers animations being incompatible with the custom theme ", /* @__PURE__ */ BdApi.React.createElement("b", null, themeName), " you have enabled."), /* @__PURE__ */ BdApi.React.createElement("p", null, /* @__PURE__ */ BdApi.React.createElement(ButtonGroup$1, {
			direction: "vertical",
			fullWidth: true
		}, /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			text: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Disable ", /* @__PURE__ */ BdApi.React.createElement("b", null, "Enhance layout")),
			onClick: () => {
				setEnhanceLayout(false);
				onClose();
			}
		}), /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			text: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, "Disable ", /* @__PURE__ */ BdApi.React.createElement("b", null, themeName)),
			onClick: () => {
				Themes.disable(theme.id);
				onClose();
			}
		}), /* @__PURE__ */ BdApi.React.createElement(Button$1, {
			variant: "secondary",
			text: "How can I make them compatible?",
			onClick: () => handleClick({ href: Documentation.themeCompatibilityUrl })
		})))), /* @__PURE__ */ BdApi.React.createElement(Text$1, {
			variant: "text-sm/normal",
			color: "text-muted"
		}, /* @__PURE__ */ BdApi.React.createElement(Anchor, { onClick: () => setIsDismissed(true) }, "Hide this notification"), " if you believe that it has been shown to\xA0you by\xA0mistake."));
	}
	UserPanelMisplacedAlertModal.key = "BA__userPanelMisplacedAlert";
	function patchAppPanels() {
		Patcher_default.after(ModuleKey_default.Servers, AppPanels, "type", (self, args, value) => {
			const [isCooldown, setIsCooldown] = (0, react.useState)(false);
			const isModalShown = useIsModalAtTop(UserPanelMisplacedAlertModal.key);
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Servers, true);
			if (!isMainWindow || !module.isEnabled() || !module.settings.enhanceLayout) return;
			if (isModalShown) value.props.className = (0, clsx.default)(value.props.className, "BA__appPanelsHighlight");
			value.props.onMouseEnter = (event) => {
				if (isCooldown) return;
				const { x, y, width } = event.currentTarget.getBoundingClientRect();
				if (y >= window.innerHeight / 2 && x + width <= window.innerWidth / 2) return;
				const theme = Themes.getAll().find((theme) => Themes.isEnabled(theme.id) && !isDismissed(getDismissibleKey(theme)));
				if (!theme) return;
				ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(UserPanelMisplacedAlertModal, {
					...props,
					theme,
					setEnhanceLayout: (value) => {
						module.settings.enhanceLayout = value;
						Emitter_default.emit(Events_default.ModuleSettingsChanged, module.id);
						Config_default.save();
					}
				}), {
					modalKey: UserPanelMisplacedAlertModal.key,
					onCloseCallback: () => {
						setIsCooldown(true);
						setTimeout(() => setIsCooldown(false), 3e4);
					}
				});
			};
		});
	}
	css`.BA__appPanelsHighlight {
    z-index: 10000 !important;
}
.BA__appPanelsHighlight > * {
    pointer-events: none !important;
}``AppPanels`;
	//#endregion
	//#region src/patches/AppView/patchAppView.jsx
	var guildChannelPath = [];
	function useServersModule() {
		const module = useModule(ModuleKey_default.Servers, true);
		const currentState = {
			isEnabled: module.isEnabled(),
			isEnhancedLayout: module.isEnabled() && module.settings.enhanceLayout
		};
		const [isEnabled, setIsEnabled] = (0, react.useState)(currentState.isEnabled);
		const [isEnhancedLayout] = (0, react.useState)(currentState.isEnhancedLayout);
		(0, react.useEffect)(() => {
			if (isEnhancedLayout !== currentState.isEnhancedLayout) forceAppUpdate();
			else if (isEnabled !== currentState.isEnabled) setIsEnabled(currentState.isEnabled);
		}, [currentState.isEnabled, currentState.isEnhancedLayout]);
		return {
			module,
			isEnabled,
			isEnhancedLayout
		};
	}
	function AppViewTransition({ className, module, shouldSwitch, getSwitchDirection, children }) {
		const [key, direction] = useLocationKey(shouldSwitch, getSwitchDirection);
		const auto = { direction };
		return /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, {
			className,
			childFactory: passAuto(auto)
		}, /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			key,
			container: { className },
			defaultLayoutStyles: false,
			freeze: true,
			module,
			auto
		}, children));
	}
	function patchAppView() {
		Patcher_default.after(...AppViewKeyed, (self, args, value) => {
			const { isMainWindow } = useWindow();
			const { module: serversModule, isEnabled: isServersModuleEnabled, isEnhancedLayout } = useServersModule();
			const channelsModule = useModule(ModuleKey_default.Channels);
			if (!isMainWindow) return;
			const base = findInReactTree(value, byClassName(DiscordClasses.AppView.base));
			if (!base) return;
			const contentIndex = base.props.children.findIndex(byClassName(DiscordClasses.AppView.content));
			if (contentIndex === -1) return;
			const content = base.props.children[contentIndex];
			if (isServersModuleEnabled) base.props.children[contentIndex] = /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
				module: serversModule,
				fallback: content
			}, /* @__PURE__ */ BdApi.React.createElement(AppViewTransition, {
				className: "BA__content",
				module: serversModule,
				shouldSwitch: shouldSwitchContent,
				getSwitchDirection: getSwitchContentDirection
			}, content));
			const pageIndex = content.props.children.findIndex(byClassName(DiscordClasses.AppView.page));
			if (pageIndex === -1) return;
			const page = content.props.children[pageIndex];
			if (channelsModule.isEnabled()) content.props.children[pageIndex] = /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
				module: channelsModule,
				fallback: page
			}, /* @__PURE__ */ BdApi.React.createElement(AppViewTransition, {
				className: "BA__page",
				module: channelsModule,
				shouldSwitch: shouldSwitchPage,
				getSwitchDirection: getSwitchPageDirection
			}, page));
			const guildChannelRoute = (findInReactTree(page, (m) => m?.type === Router.Switch)?.props.children)?.find((r) => r?.props?.impressionName === ImpressionNames.GUILD_CHANNEL && Array.isArray(r.props.path));
			if (guildChannelRoute) guildChannelPath = guildChannelRoute.props.path;
			if (!isEnhancedLayout) return;
			base.props.className = (0, clsx.default)(base.props.className, "BA__baseEnhancedLayout");
			const sidebarIndex = content.props.children.findIndex((m) => "isSidebarOpen" in (m?.props ?? {}));
			if (sidebarIndex === -1) return;
			const sidebar = content.props.children[sidebarIndex];
			let renderedSidebar = sidebar.type(sidebar.props);
			renderedSidebar = renderedSidebar.type(renderedSidebar.props);
			const sidebarContainer = findInReactTree(renderedSidebar, byClassName(DiscordClasses.AppView.sidebar));
			if (sidebarContainer) {
				sidebarContainer.props.children = sidebarContainer.props.children.flatMap((m) => m?.type === react.Fragment ? m.props.children : m);
				const guildsIndex = sidebarContainer.props.children.findIndex(byClassName(DiscordClasses.AppView.guilds));
				if (guildsIndex !== -1) base.props.children.splice(contentIndex, 0, ...sidebarContainer.props.children.splice(guildsIndex, 1));
				const panelsIndex = sidebarContainer.props.children.findIndex((m) => m?.type === AppPanels);
				if (panelsIndex !== -1) base.props.children.push(...sidebarContainer.props.children.splice(panelsIndex, 1));
			}
			content.props.children[sidebarIndex] = renderedSidebar;
		});
		patchAppPanels();
	}
	css`.BA__content, .BA__page {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
    min-width: 0;
    min-height: 0;
    flex: 1;
}
.BA__content {
    grid-column: start / end;
    grid-row: titleBarEnd / end;
}
.BA__page {
    grid-area: page;
}

.BA__baseEnhancedLayout :is(.BA__content, ${DiscordSelectors.AppView.content}) {
    /* Indexes used instead of labels to solve conflicts with ServerFolders */
    grid-column: -3 / end;
    grid-row: -2 / end;
}
.BA__baseEnhancedLayout ${DiscordSelectors.AppView.sidebar} {
    grid-area: channelsList;
}
.BA__baseEnhancedLayout ${DiscordSelectors.AppView.panels} {
    width: calc(var(--custom-guild-sidebar-width) - var(--space-xs)*2);
    z-index: 100;
}

/* Hide the moved elements in the fullscreen voice call */
.BA__baseEnhancedLayout[data-fullscreen="true"] :is(${DiscordSelectors.AppView.guilds}, ${DiscordSelectors.AppView.panels}) {
    display: none;
}

/* Fix for ServerFolders */
.BA__baseEnhancedLayout ${DiscordSelectors.AppView.guilds}[class*="closed"] {
    display: none;
}``AppView (Servers, Channels)`;
	//#endregion
	//#region src/components/AnimeFloating.jsx
	function getAlign(position, align) {
		switch (position) {
			case "top":
			case "bottom": switch (align) {
				case "start": return Position_default.Left;
				case "end": return Position_default.Right;
				default: return Position_default.Center;
			}
			case "left":
			case "right": switch (align) {
				case "start": return Position_default.Top;
				case "end": return Position_default.Bottom;
				default: return Position_default.Center;
			}
			default: return Position_default.Center;
		}
	}
	function toPositionAlign(placement) {
		const [position, align] = placement.split("-");
		return {
			position,
			align: getAlign(position, align)
		};
	}
	function AnimeFloating({ in: _in = true, open, module, onExited, transition, ...props }) {
		open = open && _in;
		const rootValue = Floating$1({
			...props,
			open
		});
		const floating = findInReactTree(rootValue, (m) => m?.props?.renderLayer);
		const anchorRef = (0, react.useRef)();
		const autoRef = (0, react.useRef)(toPositionAlign(floating.props.placement));
		const value = floating.type({
			...floating.props,
			children: ({ ref, ...props }) => floating.props.children({
				...props,
				ref: (el) => {
					ref(el);
					anchorRef.current = el;
				}
			}),
			renderLayer: (props) => {
				autoRef.current = toPositionAlign(props.placement);
				return floating.props.renderLayer(props);
			}
		});
		const { children } = value.props.children[1].props;
		const containerRef = (0, react.useRef)();
		const container = findInReactTree(children, byClassName("layer"));
		if (container) {
			const { ref } = container.props;
			container.props.ref = (el) => {
				ref(el);
				containerRef.current = el;
			};
		}
		const anchor = floating.props.overrideTargetRect ?? floating.props.reference ?? anchorRef;
		const childrenCache = (0, react.useRef)();
		if (children) childrenCache.current = children;
		value.props.children[1].props.children = /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			in: !!children,
			module,
			containerRef,
			anchor,
			autoRef,
			onExited,
			...transition
		}, children || childrenCache.current);
		Object.assign(floating, value);
		return rootValue;
	}
	//#endregion
	//#region src/patches/ContextMenu/patchContextSubmenu.jsx
	function patchContextSubmenu() {
		const callback = (self, [props], value) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.ContextMenu);
			if (!isMainWindow || !module.isEnabled()) return;
			return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
				module,
				fallback: value
			}, /* @__PURE__ */ BdApi.React.createElement(AnimeFloating, {
				...value.props,
				module
			}));
		};
		Patcher_default.after(ModuleKey_default.ContextMenu, ...MenuSubmenuItemKeyed, callback);
		Patcher_default.after(ModuleKey_default.ContextMenu, ...MenuSubmenuListItemKeyed, callback);
	}
	//#endregion
	//#region src/patches/ContextMenu/patchContextMenu.jsx
	function patchContextMenu() {
		const once = ensureOnce();
		let patchedFloating = null;
		Patcher_default.after(ModuleKey_default.ContextMenu, ...ContextMenuKeyed, (self, args, value) => {
			once(() => {
				injectModule(value?.type, ModuleKey_default.ContextMenu);
				Patcher_default.after(ModuleKey_default.ContextMenu, value?.type?.prototype, "render", (self, args, value) => {
					const module = Core_default.getModule(ModuleKey_default.ContextMenu);
					if (!module.isEnabled() || !value) return;
					value.props.in = self.props.in;
					value.props.onExited = self.props.onExited;
					if (patchedFloating) value.type = patchedFloating;
					else {
						TinyPatcher.after(ModuleKey_default.ContextMenu, value, "type", (self, [props], value) => {
							return /* @__PURE__ */ BdApi.React.createElement(AnimeFloating, {
								...value.props,
								in: props.in,
								onExited: props.onExited,
								module,
								debug: true
							});
						});
						patchedFloating = value.type;
					}
				});
			});
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.ContextMenu);
			if (!isMainWindow || !module.isEnabled()) return;
			return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
				module,
				fallback: value
			}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, value.props.isOpen && value));
		});
		patchContextSubmenu();
	}
	//#endregion
	//#region src/patches/BasePopout/patchPopoutCSSAnimator.jsx
	function patchPopoutCSSAnimator() {
		Patcher_default.instead(ModuleKey_default.Popouts, ...PopoutCSSAnimatorKeyed, (self, [props], original) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Popouts);
			if (!isMainWindow || !module.isEnabled()) return original(props);
			return props?.children;
		});
	}
	//#endregion
	//#region src/hooks/useAutoPosition.js
	function autoPosition(self, defaultPosition, source = { align: Position_default.Top }) {
		if (!self.__autoRef) {
			self.__autoRef = (0, react.createRef)();
			self.__autoRef.current = Object.assign({}, source, { position: defaultPosition });
		}
		return {
			autoRef: self.__autoRef,
			setPosition: (position) => self.__autoRef.current.position = position
		};
	}
	function useAutoPosition(defaultPosition, source = { align: Position_default.Top }) {
		const autoRef = (0, react.useRef)(Object.assign({}, source, { position: defaultPosition }));
		return {
			autoRef,
			setPosition: (position) => autoRef.current.position = position
		};
	}
	//#endregion
	//#region src/patches/BasePopout/patchBasePopout.jsx
	function shouldShow(self, props = self.props, state = self.state) {
		return (!state.isLoading || state.shouldShowLoadingState) && self.shouldShowPopout(props, state);
	}
	function PopoutLayer({ ref, children, ...props }) {
		const layerRef = (0, react.useRef)();
		const layer = findInReactTree(children, (m) => m?.type === ReferencePositionLayer);
		if (layer) layer.props.ref = (value) => {
			layerRef.current = value;
			if (props.in) ref.current = value;
		};
		return /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			layerRef,
			...props
		}, children);
	}
	function patchBasePopout() {
		injectModule(BasePopout, ModuleKey_default.Popouts);
		Patcher_default.after(ModuleKey_default.Popouts, BasePopout?.prototype, "componentDidUpdate", (self, [props, state]) => {
			if (shouldShow(self, props, state) !== shouldShow(self) || state.isLoading !== self.state.isLoading) requestAnimationFrame(() => {
				(0, react_dom.flushSync)(() => self.setState({ resizeKey: self.state.resizeKey + 1 }));
			});
		});
		Patcher_default.after(ModuleKey_default.Popouts, BasePopout?.prototype, "renderLayer", (self, args, value) => {
			const module = Core_default.getModule(ModuleKey_default.Popouts);
			if (!module.isEnabled()) return;
			return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
				module,
				fallback: value
			}, /* @__PURE__ */ BdApi.React.createElement(MainWindowOnly, { fallback: value }, () => {
				const { autoRef, setPosition } = autoPosition(self, self.props.position, { align: self.props.align });
				const position = self.state.renderedPosition ?? self.props.position;
				if (autoRef.current.position !== position) setPosition(position);
				return /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, value && shouldShow(self) && /* @__PURE__ */ BdApi.React.createElement(PopoutLayer, {
					key: +self.state.isLoading,
					ref: self.layerRef,
					module,
					autoRef,
					anchor: self.domElementRef
				}, value));
			}));
		});
		patchPopoutCSSAnimator();
	}
	//#endregion
	//#region src/hooks/useAnimationStore.js
	function useSafeBoolean(value, store = AnimationStore_default) {
		const [safeValue, setSafeValue] = (0, react.useState)(value);
		(0, react.useLayoutEffect)(() => {
			if (store.isSafe) return setSafeValue(value);
			setSafeValue(false);
			return store.onceSafe(() => setSafeValue(value));
		}, [value]);
		return safeValue;
	}
	//#endregion
	//#region src/patches/Tooltip/patchManaTooltip.jsx
	function TooltipTransition$1({ module, shouldShow, onExitComplete, onAnimationRest, ...props }) {
		const value = Mana.TooltipLayer({
			...props,
			isVisible: true,
			isRendered: true
		});
		const safeShouldShow = useSafeBoolean(shouldShow);
		const onRest = (isVisible) => () => {
			if (!isVisible) onExitComplete?.();
			onAnimationRest?.({
				value: {},
				finished: true
			}, {
				ctrl: {},
				expired: !isVisible,
				item: isVisible,
				key: isVisible ? "tooltip" : "empty",
				phase: isVisible ? SpringTransitionPhases.ENTER : SpringTransitionPhases.LEAVE
			});
		};
		return /* @__PURE__ */ BdApi.React.createElement(AnimeFloating, {
			...value.props,
			in: safeShouldShow,
			module,
			onEntered: onRest(true),
			onExited: onRest(false)
		});
	}
	function patchUseTooltipTransition() {
		Patcher_default.instead(ModuleKey_default.Tooltips, ...Mana.useTooltipTransitionKeyed, (self, [options], original) => {
			const { shouldShow, onExitComplete, onAnimationRest } = options;
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Tooltips);
			if (!isMainWindow || !module.isEnabled()) return original(options);
			original({
				...options,
				shouldShow: false
			});
			return moduleErrorBoundary(ModuleKey_default.Tooltips, (render) => {
				const value = render({}, true);
				const tooltipLayer = findInReactTree(value, (m) => m?.props?.position);
				if (!tooltipLayer) throw new Error("Unable to find TooltipLayer");
				Object.assign(tooltipLayer, /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
					module,
					fallback: render({}, shouldShow)
				}, /* @__PURE__ */ BdApi.React.createElement(TooltipTransition$1, {
					...tooltipLayer.props,
					module,
					shouldShow,
					onExitComplete,
					onAnimationRest
				})));
				return value;
			}, (render) => render({}, shouldShow));
		});
	}
	function patchManaTooltip() {
		patchUseTooltipTransition();
	}
	//#endregion
	//#region src/patches/Tooltip/patchTooltip.jsx
	var TooltipLayer = null;
	function TooltipTransition(props) {
		const { module, isVisible, onAnimationRest, ...rest } = props;
		const onRest = (isVisible) => () => onAnimationRest?.({
			value: {},
			finished: true
		}, {
			ctrl: {},
			expired: !isVisible,
			item: isVisible,
			key: isVisible ? "tooltip" : "empty",
			phase: isVisible ? SpringTransitionPhases.ENTER : SpringTransitionPhases.LEAVE
		});
		const layerRef = (0, react.useRef)();
		const { autoRef, setPosition } = useAutoPosition(props.position, { align: props.align });
		if (!TooltipLayer) throw new Error("Unable to resolve TooltipLayer");
		const layer = TooltipLayer(rest);
		const safeIsVisible = useSafeBoolean(isVisible);
		return /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			in: safeIsVisible,
			layerRef,
			module,
			autoRef,
			onEntered: onRest(true),
			onExited: onRest(false),
			anchor: props.targetElementRef
		}, (0, react.cloneElement)(layer, {
			ref: layerRef,
			onPositionChange: setPosition
		}));
	}
	function patchTooltip() {
		if (Tooltip$1) Tooltip$1.defaultProps.delay = 0;
		injectModule(Tooltip$1, ModuleKey_default.Tooltips);
		Patcher_default.after(ModuleKey_default.Tooltips, Tooltip$1?.prototype, "renderTooltip", (self, args, value) => {
			const module = Core_default.getModule(ModuleKey_default.Tooltips);
			if (!module.isEnabled()) return;
			if (!TooltipLayer) TooltipLayer = findInReactTree(ReactUtils.wrapInHooks(value.type)({
				...value.props,
				isVisible: true
			}), (m) => m?.key === "tooltip")?.type;
			const { text } = self.props;
			return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
				module,
				fallback: value
			}, /* @__PURE__ */ BdApi.React.createElement(MainWindowOnly, { fallback: value }, () => /* @__PURE__ */ BdApi.React.createElement(TooltipTransition, {
				...value.props,
				children: typeof text === "function" ? text() : text,
				module
			})));
		});
		patchManaTooltip();
	}
	//#endregion
	//#region src/patches/ChannelMessageList/utils.js
	var findMessageInReactTree = (tree) => findInReactTree(tree, (m) => m?.props?.message);
	function getMessageKey(message) {
		message = (0, react.isValidElement)(message) ? findMessageInReactTree(message)?.props?.message : message;
		return message?.nonce ?? message?.id;
	}
	//#endregion
	//#region src/patches/ChannelMessageList/MessageStackStore.js
	var toEnter = /* @__PURE__ */ new Set();
	var toExit = /* @__PURE__ */ new Set();
	function handleMessageCreate({ message }) {
		const key = getMessageKey(message);
		toEnter.add(key);
		setTimeout(() => toEnter.delete(key), MAX_ANIMATION_DURATION);
	}
	function handleMessageDelete({ id }) {
		toExit.add(id);
		setTimeout(() => toExit.delete(id), MAX_ANIMATION_DURATION);
	}
	var MessageStackStore_default = new class MessageStackStore extends Flux.Store {
		getMessagesAwaitingTransition() {
			return {
				toEnter,
				toExit
			};
		}
	}(Dispatcher, {
		MESSAGE_CREATE: handleMessageCreate,
		MESSAGE_DELETE: handleMessageDelete
	});
	//#endregion
	//#region src/patches/ChannelMessageList/patchMessage.js
	function patchMessage() {
		Patcher_default.after(ModuleKey_default.Messages, Message$1, "type", (self, [props], value) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Messages);
			if (!isMainWindow || !module.isEnabled()) return;
			const messageListItem = findInReactTree(value, (m) => m?.className?.includes(DiscordClasses.MessageList.messageListItem));
			if (!messageListItem) return;
			messageListItem.ref = props.ref;
			const message = findInReactTree(messageListItem, (m) => m?.className?.includes(DiscordClasses.MessageList.message));
			if (!message?.className.includes(DiscordClasses.MessageList.groupStart)) return;
			message.className = message.className.replace(DiscordClasses.MessageList.groupStart, "");
			messageListItem.className += " " + DiscordClasses.MessageList.groupStart;
		});
	}
	//#endregion
	//#region src/patches/ChannelMessageList/patchMessageDivider.jsx
	function patchMessageDivider() {
		Patcher_default.after(ModuleKey_default.Messages, MessageDivider, "render", (self, [props], value) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Messages);
			if (!isMainWindow || !module.isEnabled()) return;
			const { children, className, ...rest } = value.props;
			return /* @__PURE__ */ BdApi.React.createElement("div", {
				className: props.className,
				...rest
			}, /* @__PURE__ */ BdApi.React.createElement(value.type, { className: className.replace(props.className, "") }, children));
		});
	}
	//#endregion
	//#region src/patches/ChannelMessageList/patchChannelMessageList.jsx
	function patchChannelMessageList() {
		const once = ensureOnce();
		Patcher_default.after(ChannelMessageList, "type", (self, args, value) => {
			once(() => Patcher_default.after(ModuleKey_default.Messages, findInReactTree(value?.props?.children, (m) => m?.props?.messages)?.type, "type", (self, [{ channel }], value) => {
				const hasLayers = useStateFromStores([LayerStore$1], () => LayerStore$1.hasLayers());
				const { toEnter, toExit } = useStateFromStores([MessageStackStore_default], () => MessageStackStore_default.getMessagesAwaitingTransition());
				const { isMainWindow } = useWindow();
				const module = useModule(ModuleKey_default.Messages);
				if (!isMainWindow || !module.isEnabled()) return;
				const list = findInReactTree(value, (m) => m?.type === "ol");
				if (!list) return;
				const i = list.props.children.findIndex((i) => Array.isArray(i));
				if (i === -1) return;
				const childFactory = (e, index, arr) => {
					const message = findInReactTree(e, (m) => m?.message)?.message ?? findInReactTree(arr[index + 1] ?? {}, (m) => m?.message)?.message;
					return (0, react.cloneElement)(e, { exit: !hasLayers && toExit.has(message?.id) });
				};
				list.props.children[i] = /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
					module,
					fallback: list.props.children[i]
				}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, {
					key: channel.id,
					component: null,
					childFactory
				}, list.props.children[i].map((item, index, arr) => {
					const message = findMessageInReactTree(item);
					if (message) item.key = getMessageKey(message.props.message);
					return /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
						key: item.key,
						injectContainerRef: (children, ref) => {
							const message = findMessageInReactTree(children);
							if (message) message.props.ref = ref;
							else children.props.ref = ref;
						},
						enter: !hasLayers && toEnter.has(message ? item.key : getMessageKey(arr[index + 1])),
						exit: false,
						module
					}, item);
				})));
			}));
		});
		patchMessage();
		patchMessageDivider();
	}
	css`${DiscordSelectors.MessageList.divider} {
    position: relative;
}``ChannelMessageList (Messages)`;
	//#endregion
	//#region src/components/SwitchTransition.jsx
	var { ENTERED, ENTERING, EXITING } = Transition ?? {};
	function areChildrenDifferent(oldChildren, newChildren) {
		if (oldChildren === newChildren) return false;
		if ((0, react.isValidElement)(oldChildren) && (0, react.isValidElement)(newChildren) && oldChildren.key != null && oldChildren.key === newChildren.key) return false;
		return true;
	}
	/**
	* Enum of modes for SwitchTransition component
	* @enum { string }
	*/
	var modes = {
		out: "out-in",
		in: "in-out"
	};
	var callHook = (element, name, cb) => (...args) => {
		element.props[name] && element.props[name](...args);
		cb();
	};
	var leaveRenders = {
		[modes.out]: ({ current, changeState }) => (0, react.cloneElement)(current, {
			in: false,
			onExited: callHook(current, "onExited", () => {
				changeState(ENTERING, null);
			})
		}),
		[modes.in]: ({ current, changeState, children }) => [current, (0, react.cloneElement)(children, {
			in: true,
			onEntered: callHook(children, "onEntered", () => {
				changeState(ENTERING);
			})
		})]
	};
	var enterRenders = {
		[modes.out]: ({ children, changeState }) => (0, react.cloneElement)(children, {
			in: true,
			onEntered: callHook(children, "onEntered", () => {
				changeState(ENTERED, (0, react.cloneElement)(children, { in: true }));
			})
		}),
		[modes.in]: ({ current, children, changeState }) => [(0, react.cloneElement)(current, {
			in: false,
			onExited: callHook(current, "onExited", () => {
				changeState(ENTERED, (0, react.cloneElement)(children, { in: true }));
			})
		}), (0, react.cloneElement)(children, { in: true })]
	};
	/**
	* A transition component inspired by the [vue transition modes](https://vuejs.org/v2/guide/transitions.html#Transition-Modes).
	* You can use it when you want to control the render between state transitions.
	* Based on the selected mode and the child's key which is the `Transition` or `CSSTransition` component, the `SwitchTransition` makes a consistent transition between them.
	*
	* If the `out-in` mode is selected, the `SwitchTransition` waits until the old child leaves and then inserts a new child.
	* If the `in-out` mode is selected, the `SwitchTransition` inserts a new child first, waits for the new child to enter and then removes the old child.
	*
	* **Note**: If you want the animation to happen simultaneously
	* (that is, to have the old child removed and a new child inserted **at the same time**),
	* you should use
	* [`TransitionGroup`](https://reactcommunity.org/react-transition-group/transition-group)
	* instead.
	*
	* ```jsx
	* function App() {
	*  const [state, setState] = useState(false);
	*  const helloRef = useRef(null);
	*  const goodbyeRef = useRef(null);
	*  const nodeRef = state ? goodbyeRef : helloRef;
	*  return (
	*    <SwitchTransition>
	*      <CSSTransition
	*        key={state ? "Goodbye, world!" : "Hello, world!"}
	*        nodeRef={nodeRef}
	*        addEndListener={(node, done) => node.addEventListener("transitionend", done, false)}
	*        classNames='fade'
	*      >
	*        <button ref={nodeRef} onClick={() => setState(state => !state)}>
	*          {state ? "Goodbye, world!" : "Hello, world!"}
	*        </button>
	*      </CSSTransition>
	*    </SwitchTransition>
	*  );
	* }
	* ```
	*
	* ```css
	* .fade-enter{
	*    opacity: 0;
	* }
	* .fade-exit{
	*    opacity: 1;
	* }
	* .fade-enter-active{
	*    opacity: 1;
	* }
	* .fade-exit-active{
	*    opacity: 0;
	* }
	* .fade-enter-active,
	* .fade-exit-active{
	*    transition: opacity 500ms;
	* }
	* ```
	*/
	var SwitchTransition = class extends react.Component {
		state = {
			status: ENTERED,
			current: null
		};
		appeared = false;
		static getDerivedStateFromProps(props, state) {
			if (props.children == null) return { current: null };
			if (state.status === ENTERING && props.mode === modes.in) return { status: ENTERING };
			if (state.current && areChildrenDifferent(state.current, props.children)) return { status: EXITING };
			return { current: (0, react.cloneElement)(props.children, { in: true }) };
		}
		componentDidMount() {
			this.appeared = true;
		}
		changeState = (status, current = this.state.current) => {
			this.setState({
				status,
				current
			});
		};
		render() {
			const { props: { children, mode }, state: { status, current } } = this;
			const data = {
				children,
				current,
				changeState: this.changeState,
				status
			};
			let component;
			switch (status) {
				case ENTERING:
					component = enterRenders[mode](data);
					break;
				case EXITING:
					component = leaveRenders[mode](data);
					break;
				case ENTERED: component = current;
			}
			return /* @__PURE__ */ BdApi.React.createElement(TransitionGroupContext.Provider, { value: { isMounting: !this.appeared } }, component);
		}
	};
	SwitchTransition.defaultProps = { mode: modes.out };
	//#endregion
	//#region src/patches/ChannelView/patchChatSidebar.jsx
	function patchChatSidebar() {
		Patcher_default.instead(...ChatSidebarKeyed, (self, [props], original) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.ThreadSidebar);
			const switchModule = useModule(ModuleKey_default.ThreadSidebarSwitch);
			if (!isMainWindow || !module.isEnabled() && !switchModule.isEnabled()) return original(props);
			const value = original({
				...props,
				maxWidth: Math.max(props.maxWidth, 451),
				floatingLayer: null
			});
			const chatTarget = findInReactTree(value, byClassName(DiscordClasses.ChatSidebar.chatTarget));
			if (chatTarget) {
				chatTarget.props = {};
				chatTarget.type = react.Fragment;
			}
			return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ BdApi.React.createElement("original", props) }, /* @__PURE__ */ BdApi.React.createElement(AnimeContainer, {
				ref: props.ref,
				id: ModuleKey_default.ThreadSidebarSwitch,
				container: { className: "BA__sidebar" }
			}, /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__sidebar" }, value)));
		});
	}
	//#endregion
	//#region src/patches/ChannelView/components/SwitchSidebarTransition.jsx
	function SwitchSidebarTransition({ transitionKey, injectContainerRef = true, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			key: transitionKey,
			injectContainerRef,
			...props
		}));
	}
	//#endregion
	//#region src/patches/ChannelView/components/SidebarTransition.jsx
	function buildSwitchKey(state) {
		return JSON.stringify(state?.type === SidebarType.VIEW_MOD_REPORT ? {
			...state,
			details: pick(state.details, ["userId"])
		} : state);
	}
	function SidebarTransition({ module, switchModule, state, transitionKey = state?.type ?? "none", switchTransitionKey = buildSwitchKey(state), injectContainerRef, children }) {
		return /* @__PURE__ */ BdApi.React.createElement(SwitchTransition, null, /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			key: transitionKey,
			container: { className: "BA__sidebar" },
			module
		}, /* @__PURE__ */ BdApi.React.createElement(SwitchSidebarTransition, {
			transitionKey: switchTransitionKey,
			module: switchModule,
			injectContainerRef
		}, children)));
	}
	//#endregion
	//#region src/patches/ChannelView/patchMembersModViewSidebar.jsx
	function injectContainerRef(children, ref) {
		const div = findInReactTree(children, (m) => m?.type === "div");
		if (div) div.props.ref = ref;
	}
	async function patchMembersModViewSidebar() {
		Patcher_default.after(...await MembersModViewSidebarKeyed, (self, [{ guildId }], value) => {
			const state = useStateFromStores([ChannelSectionStore], () => ChannelSectionStore.getGuildSidebarState(guildId), [guildId]);
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.ThreadSidebar);
			const switchModule = useModule(ModuleKey_default.ThreadSidebarSwitch);
			if (!isMainWindow || !module.isEnabled() && !switchModule.isEnabled()) return;
			return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, { fallback: value }, /* @__PURE__ */ BdApi.React.createElement(SidebarTransition, {
				module,
				switchModule,
				state,
				injectContainerRef
			}, value));
		});
	}
	//#endregion
	//#region src/patches/ChannelView/patchVoiceChannelView.jsx
	async function patchCallChatSidebar() {
		Patcher_default.after(ModuleKey_default.ThreadSidebar, ...await CallChatSidebarKeyed, (self, [props], value) => {
			value.props.ref = props.ref;
		});
	}
	async function patchVoiceChannelView() {
		patchCallChatSidebar();
		const once = ensureOnce();
		Patcher_default.after(ModuleKey_default.ThreadSidebar, ...await VoiceChannelViewKeyed, (self, args, value) => {
			const channelView = findInReactTree(value, (m) => m?.props?.channel);
			if (!channelView) return;
			once(() => {
				injectModule(channelView.type, ModuleKey_default.ThreadSidebar);
				Patcher_default.after(ModuleKey_default.ThreadSidebar, channelView.type?.prototype, "render", (self, args, originalValue) => {
					const module = Core_default.getModule(ModuleKey_default.ThreadSidebar);
					if (!module.isEnabled()) return;
					const value = cloneDeep(originalValue);
					const chatWrapper = findInReactTree(value, byClassName("channelChatWrapper"));
					if (!chatWrapper) return;
					return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
						module,
						fallback: originalValue
					}, /* @__PURE__ */ BdApi.React.createElement(MainWindowOnly, { fallback: originalValue }, () => {
						chatWrapper.props.children = /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, chatWrapper.props.children && /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
							injectContainerRef: true,
							module
						}, chatWrapper.props.children));
						return value;
					}));
				});
			});
		});
	}
	//#endregion
	//#region src/patches/ChannelView/patchSidebarActions.js
	/**
	* `SearchBar` fires `setSelectedSearchContext` that stores currently passed `searchContextId` when mounted,
	* and `null` when unmounted, meaning that Discord expects only one instance of `SearchBar` at a time.
	*
	* But since there can be two instances of `SearchBar` while switching servers/channels animation is running,
	* unmount of the old instance happens later than mount of the new one, overriding the `searchContextId` with `null`;
	* therefore, the search sidebar is always considered closed after the animation is finished.
	*
	* This patch makes it to simply ignore the `null` value, preventing it from overriding the actual `searchContextId`.
	* However, it causes the `searchContextId` to still exist even when there are no `SearchBar` instances,
	* but this shouldn't be a problem since if there are no `SearchBar` instances, then there are no `ChatSidebar` instances either,
	* which can display the search sidebar.
	*
	* Hopefully Discord will change this in the future so that this patch can be removed.
	*/
	function patchSidebarActions() {
		if (!SidebarActions) return;
		Patcher_default.instead(SidebarActions, "setSelectedSearchContext", (self, [id], original) => {
			if (id === null) return;
			original(id);
		});
	}
	//#endregion
	//#region src/patches/ChannelView/patchChannelView.jsx
	function patchChannelView() {
		const once = ensureOnce();
		Patcher_default.after(ChannelView, "type", (self, args, value) => {
			TinyPatcher.after(value?.type, "render", (self, args, value) => {
				const guildChannel = findInReactTree(value, (m) => "guild" in (m?.props ?? {}));
				if (!guildChannel) return;
				once(() => {
					injectModule(guildChannel.type, [
						ModuleKey_default.MembersSidebar,
						ModuleKey_default.ThreadSidebar,
						ModuleKey_default.ThreadSidebarSwitch
					]);
					Patcher_default.after(ModuleKey_default.MembersSidebar, guildChannel.type?.prototype, "renderSidebar", (self, args, value) => {
						const module = Core_default.getModule(ModuleKey_default.MembersSidebar);
						if (!module.isEnabled()) return value;
						return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
							module,
							fallback: value
						}, /* @__PURE__ */ BdApi.React.createElement(MainWindowOnly, { fallback: value }, /* @__PURE__ */ BdApi.React.createElement(SwitchTransition, null, /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
							key: self.props.section,
							container: { className: "BA__sidebar" },
							module,
							freeze: true
						}, value))));
					});
					Patcher_default.after(guildChannel.type?.prototype, "renderThreadSidebar", (self, args, value) => {
						const module = Core_default.getModule(ModuleKey_default.ThreadSidebar);
						const switchModule = Core_default.getModule(ModuleKey_default.ThreadSidebarSwitch);
						if (!module.isEnabled() && !switchModule.isEnabled()) return;
						const state = self.props.channelSidebarState ?? self.props.guildSidebarState;
						return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, { fallback: value }, /* @__PURE__ */ BdApi.React.createElement(MainWindowOnly, { fallback: value }, /* @__PURE__ */ BdApi.React.createElement(SidebarTransition, {
							module,
							switchModule,
							state
						}, value)));
					});
				});
			});
		});
		patchChatSidebar();
		patchVoiceChannelView();
		patchMembersModViewSidebar();
		patchSidebarActions();
	}
	css`.BA__sidebar {
    position: relative;
    isolation: isolate;
    display: flex;
    justify-content: flex-end;
    height: 100%;
}
${DiscordSelectors.AppView.base} {
    overflow: clip;
}
${DiscordSelectors.AppView.page} {
    overflow: visible !important;
    min-height: 0;
    min-width: 0;
}
${DiscordSelectors.ChannelView.chat} {
    overflow: clip;
    isolation: isolate;
}
${DiscordSelectors.ChatSidebar.chatLayerWrapper} {
    filter: none;
}``ChannelView (Sidebars)`;
	//#endregion
	//#region src/hooks/useDirection.js
	function useDirection(list, current) {
		const prev = usePrevious(current);
		const direction = (0, react.useRef)(1);
		if (prev !== current) direction.current = +(list.indexOf(prev) < list.indexOf(current));
		return direction.current;
	}
	//#endregion
	//#region src/patches/StandardSidebarView/patchStandardSidebarView.jsx
	async function patchStandardSidebarView() {
		Patcher_default.after((await StandardSidebarViewWrapper)?.prototype, "render", (self, args, value) => {
			const view = findInReactTree(value, (m) => m?.props?.content && m?.props?.sidebar);
			if (!view) return;
			view.props.sections = self.getPredicateSections().map((s) => s.section);
		});
		Patcher_default.after(...await StandardSidebarViewKeyed, (self, [props], value) => {
			const direction = useDirection(props.sections, props.section);
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Settings);
			const layersModule = useModule(ModuleKey_default.Layers);
			if (!isMainWindow) return;
			if (layersModule.isEnabled()) {
				const animated = findInReactTree(value, (m) => m?.type?.displayName?.startsWith("Animated"));
				if (animated) {
					delete animated.props.style;
					animated.type = "div";
				}
			}
			if (!module.isEnabled()) return;
			const standardSidebarView = findInReactTree(value, byClassName(DiscordClasses.StandardSidebarView.standardSidebarView));
			if (!standardSidebarView) return;
			const { children } = standardSidebarView.props;
			const i = children.findIndex(byClassName(DiscordClasses.StandardSidebarView.contentRegion));
			if (i === -1) return;
			const contentRegion = children[i];
			const auto = { direction };
			children[i] = /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
				module,
				fallback: contentRegion
			}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, {
				className: DiscordClasses.StandardSidebarView.contentRegion,
				childFactory: passAuto(auto)
			}, /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
				key: props.section,
				container: { className: DiscordClasses.StandardSidebarView.contentRegion },
				module,
				auto
			}, contentRegion)));
		});
	}
	StandardSidebarViewKeyed.then(() => css`${DiscordSelectors.StandardSidebarView.contentRegion}:has(> ${DiscordSelectors.StandardSidebarView.contentRegion}[data-ba-container]) {
    isolation: isolate;
    z-index: 2; /* Allow overflowing the sidebar */
}
${DiscordSelectors.StandardSidebarView.contentRegion}[data-ba-container] {
    background: none;
}
${DiscordSelectors.StandardSidebarView.contentRegion} > ${DiscordSelectors.StandardSidebarView.contentRegion} {
    height: 100%;
}

.platform-win ${DiscordSelectors.StandardSidebarView.contentRegionScroller} {
    height: calc(100% - var(--custom-app-top-bar-height));
}

${DiscordSelectors.StandardSidebarView.contentRegionScroller}:has(.BA__home) {
    overflow: visible !important;
}``StandardSidebarView (Settings)`);
	//#endregion
	//#region src/patches/Modals/patchModalItem.jsx
	function patchModalItem(component) {
		injectModule(component, ModuleKey_default.Modals);
		Patcher_default.after(ModuleKey_default.Modals, component?.prototype, "render", (self, args, value) => {
			if (!Core_default.getModule(ModuleKey_default.Modals).isEnabled()) return;
			const container = findInReactTree(value, (m) => m?.type === "div");
			if (!container) return;
			container.props.ref = self.props.layerRef;
			container.props.className = (0, clsx.default)(container.props.className, { "BA__modal--hidden": self.props.hidden });
		});
	}
	//#endregion
	//#region src/hooks/useTransitionCustomCondition.js
	/**
	* Ensure to trigger `onExited` used by `TransitionGroup` to determine if it should unmount the child
	* even if animation did not execute when `in` prop passed by `TransitionGroup` changed.
	* This may happen if the child connects an additional condition on top of the received `in` value.
	*/
	function useTransitionCustomCondition(condition, props) {
		const isShown = condition && props.in;
		const wasShown = usePrevious(isShown);
		(0, react.useEffect)(() => {
			if (!props.in && !wasShown) props.onExited?.();
		}, [props.in]);
		return isShown;
	}
	//#endregion
	//#region src/patches/Modals/patchManaModals.jsx
	function renderContainer(value) {
		const container = findInReactTree(value, byClassName(DiscordClasses.ManaModal.container));
		if (!container) return;
		Object.assign(container, /* @__PURE__ */ BdApi.React.createElement(AnimeContainer, {
			id: ModuleKey_default.Modals,
			container: { className: (0, clsx.default)("BA__manaModalContainer", container.props.className) }
		}, (0, react.cloneElement)(container)));
	}
	async function patchManaModals() {
		Patcher_default.after(ModuleKey_default.Modals, ...Mana.ModalRootKeyed, (self, args, value) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Modals);
			if (!isMainWindow || !module.isEnabled()) return;
			renderContainer(value);
		});
		Patcher_default.after(ModuleKey_default.Modals, ...await LayerModalKeyed, (self, args, value) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Modals);
			if (!isMainWindow || !module.isEnabled()) return;
			const wrapper = findInReactTree(value, (m) => typeof m?.children === "function");
			if (!wrapper) return;
			TinyPatcher.after(ModuleKey_default.Modals, wrapper, "children", (self, args, value) => {
				renderContainer(value);
			});
		});
	}
	css`.BA__manaModalContainer {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow: visible;
}

${DiscordSelectors.ManaModal.container} {
    min-height: 0;
}
${DiscordSelectors.ManaModal.container} > ${DiscordSelectors.ManaModal.container} {
    width: 100% !important;
    height: 100% !important;
}``ManaModalRoot`;
	//#endregion
	//#region src/patches/Modals/patchModalScrim.jsx
	function ModalBackdrop({ isVisible, onClick, disabled = false, disablePointerEvents = false, ...props }) {
		return /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			...props,
			in: isVisible,
			container: { className: (0, clsx.default)({
				"BA__backdropContainer": true,
				"BA__backdropContainer--disablePointerEvents": disablePointerEvents
			}) },
			appear: true,
			defaultLayoutStyles: false
		}, /* @__PURE__ */ BdApi.React.createElement("div", {
			className: "BA__backdrop",
			onClick: disabled ? void 0 : onClick
		}));
	}
	function patchModalScrim() {
		Patcher_default.after(ModuleKey_default.ModalsBackdrop, ...ModalScrimKeyed, (self, [props], value) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.ModalsBackdrop);
			if (!isMainWindow || !module.isEnabled()) return;
			return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
				module,
				fallback: value
			}, /* @__PURE__ */ BdApi.React.createElement(ModalBackdrop, {
				...props,
				module
			}));
		});
	}
	css`.BA__backdropContainer {
    position: fixed;
    inset: 0;
    right: var(--devtools-sidebar-width, 0);
    pointer-events: auto;
}
.BA__backdropContainer--disablePointerEvents {
    pointer-events: none;
}
.BA__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, .7);
}``ModalScrim`;
	//#endregion
	//#region src/patches/Modals/patchModals.jsx
	function Modal({ modal, ...props }) {
		const layerRef = (0, react.useRef)();
		const containerRef = (0, react.useMemo)(() => ({ get current() {
			return layerRef.current?.querySelector(`[data-ba-container="${ModuleKey_default.Modals}"]`) ?? directChild(layerRef.current);
		} }), [layerRef]);
		const isShown = useTransitionCustomCondition(modal.props.isVisible, props);
		return /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			...props,
			in: isShown,
			containerRef,
			element: (container) => directChild(container, true),
			enter: !modal.props.instant,
			exit: !modal.props.instant,
			mountOnEnter: false,
			unmountOnExit: false
		}, (state) => (0, react.cloneElement)(modal, {
			layerRef,
			hidden: state === Transition.EXITED && !modal.props.isVisible,
			instant: true
		}));
	}
	function patchModals() {
		const once = ensureOnce();
		Patcher_default.after(ModuleKey_default.Modals, ...ModalsKeyed, (self, args, value) => {
			const modals = value.props.children[1];
			if (modals?.length) once(() => patchModalItem(modals[0].type));
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Modals);
			if (!isMainWindow || !module.isEnabled()) return;
			value.props.children[1] = /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
				module,
				fallback: modals
			}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, modals.map((modal) => /* @__PURE__ */ BdApi.React.createElement(Modal, {
				key: modal.props.modalKey,
				module,
				modal
			}))));
		});
		patchModalScrim();
		patchManaModals();
	}
	css`${DiscordSelectors.Modal.root}, .bd-modal-root {
    isolation: isolate;
}
${DiscordSelectors.Modal.focusLock}:has(> [class*="carouselModal"]) {
    position: absolute !important;
    inset: 0;
}
.BA__modal--hidden {
    visibility: hidden;
    pointer-events: none;
}
${DiscordSelectors.Modals.inactive} {
    z-index: -1;
}``Modals`;
	//#endregion
	//#region src/patches/Layers/patchLayers.jsx
	var LayersComponent = null;
	function getWindowCenterAnchor() {
		return {
			x: window.innerWidth / 2,
			y: window.innerHeight / 2,
			width: 0,
			height: 0
		};
	}
	function Layer({ baseLayer, hidden, children }) {
		const isUserPanelMisplacedAlertModalShown = useIsModalAtTop(UserPanelMisplacedAlertModal.key);
		return /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)(DiscordClasses.Layers.layer, {
			[DiscordClasses.Layers.baseLayer]: baseLayer,
			"BA__layer--hidden": hidden,
			"BA__layer--containNone": baseLayer && isUserPanelMisplacedAlertModalShown
		}) }, children);
	}
	function LayerTransition({ layer, ...props }) {
		const isShown = useTransitionCustomCondition(layer.props.mode === "SHOWN", props);
		return /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			...props,
			in: isShown,
			container: { className: "BA__layerContainer" },
			defaultLayoutStyles: false,
			mountOnEnter: false,
			unmountOnExit: false
		}, (state) => /* @__PURE__ */ BdApi.React.createElement(Layer, {
			...layer.props,
			key: layer.key,
			hidden: state === Transition.EXITED
		}));
	}
	var LayerStore = class {
		constructor() {
			this.anchors = [];
			this.currentAnchor = null;
			this.currentDirection = 0;
		}
		get count() {
			return this.anchors.length;
		}
		getLastAnchor() {
			return this.anchors[this.anchors.length - 1];
		}
		report() {
			return {
				direction: this.currentDirection,
				anchor: this.currentAnchor ?? getWindowCenterAnchor()
			};
		}
		update(count) {
			this.anchors = Array.from({ length: count }).map(this.count === 0 ? () => null : (_, i) => this.anchors[i] === void 0 ? mouse_default.getAnchor() : this.anchors[i]);
		}
		onRender(count) {
			if (this.count === count) return this.report();
			if (count > this.count) {
				this.currentDirection = 1;
				this.update(count);
				this.currentAnchor = this.getLastAnchor();
			} else {
				this.currentDirection = 0;
				this.currentAnchor = this.getLastAnchor();
				this.update(count);
			}
			return this.report();
		}
	};
	function patchLayers() {
		const once = ensureOnce();
		Patcher_default.after(ModuleKey_default.Layers, ...LayersKeyed, (self, args, value) => {
			once(() => {
				LayersComponent = value?.type;
				const layerStore = new LayerStore();
				injectModule(value?.type, ModuleKey_default.Layers);
				Patcher_default.after(ModuleKey_default.Layers, value?.type?.prototype, "renderLayers", (self, args, value) => {
					const module = Core_default.getModule(ModuleKey_default.Layers);
					if (!module.isEnabled()) return;
					const { direction, anchor } = layerStore.onRender(value.length);
					const auto = {
						direction,
						preservedMouse: anchor
					};
					return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
						module,
						fallback: value
					}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, {
						component: null,
						childFactory: passAuto(auto)
					}, value.map((layer) => /* @__PURE__ */ BdApi.React.createElement(LayerTransition, {
						key: layer.key,
						module,
						auto,
						layer
					}))));
				});
			});
		});
	}
	css`.BA__layerContainer {
    position: absolute;
    inset: 0;
}
${DiscordSelectors.Layers.layer} {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    contain: strict;
}
.BA__layer--hidden {
    visibility: hidden;
    pointer-events: none;
}
.BA__layer--containNone {
    contain: none;
}``Layers`;
	//#endregion
	//#region src/modules/Prompt.jsx
	var Prompt_default = new class Prompt {
		Types = Enum({ HardwareAcceleration: "hardwareAcceleration" });
		get state() {
			return data.prompts;
		}
		onStartup() {
			this.showPrompt(this.Types.HardwareAcceleration);
		}
		hasShown(type) {
			return this.state[type] === true;
		}
		setHasShown(type, value) {
			this.state[type] = value;
		}
		_showPrompt(type) {
			switch (type) {
				case this.Types.HardwareAcceleration: return this.promptHardwareAccelerationIfNeeded();
			}
		}
		async showPrompt(type, force = false) {
			if (this.hasShown(type) && !force) return;
			this.setHasShown(type, !!await Promise.resolve(this._showPrompt(type)));
		}
		promptHardwareAccelerationIfNeeded() {
			if (!App.getEnableHardwareAcceleration()) return this.promptHardwareAcceleration();
		}
		promptHardwareAcceleration() {
			return new Promise((resolve) => ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(Modal$2, {
				...props,
				cancelText: "Cancel",
				confirmText: "Enable",
				confirmButtonVariant: "critical-primary",
				onCancel: () => resolve(true),
				onConfirm: () => {
					resolve(false);
					App.setEnableHardwareAcceleration(true);
				}
			}, /* @__PURE__ */ BdApi.React.createElement(Stack$1, { gap: 8 }, /* @__PURE__ */ BdApi.React.createElement(Heading, { variant: "heading-md/semibold" }, "HARDWARE ACCELERATION IS DISABLED"), /* @__PURE__ */ BdApi.React.createElement(Text$1, { variant: "text-sm/normal" }, "The animations might be choppy, turn the Hardware Acceleration on to drastically improve the performance. Discord will quit and re-launch.")))));
		}
	}();
	//#endregion
	//#region src/patches/ReferencePositionLayer/patchReferencePositionLayer.js
	function patchReferencePositionLayer() {
		Patcher_default.after(ReferencePositionLayer?.prototype, "componentDidMount", (self) => {
			queueMicrotask(() => self.props.onPositionChange?.call(self.props, self.calculateState().position));
		});
	}
	css`/* Force layers to respect their order inside DOM for overlapping */
${DiscordSelectors.Layer.layerContainer} > * {
    isolation: isolate;
}

/* Don't trap clicks while exit animation is playing on the layer */
${DiscordSelectors.Layer.clickTrapContainer}:has([data-baa-type="exit"]) {
    pointer-events: none !important;
}``ReferencePositionLayer`;
	new class Utils {
		get name() {
			return "Utils";
		}
		setAnimationForAllSupportedModules(packSlug, animationKey) {
			const modules = Core_default.getAllModules(true).filter((m) => m.findAnimation(packSlug, animationKey));
			modules.forEach((m) => AnimationType_default.values().forEach((t) => m.setAnimation(t, packSlug, animationKey)));
			Config_default.save();
			Logger.log(this.name, `Set animation '${animationKey}' for the following modules:\n` + modules.map((m) => `• ${m.name}`).join("\n"));
		}
		getCurrentGuildChannels() {
			return currentGuildChannels;
		}
		getGuildChannelPath() {
			return guildChannelPath;
		}
		Documentation = new class Documentation {
			buildInjectRefList(predicate = () => true) {
				return injectTypes.filter((type) => predicate(injectSchemas[type], type)).map((type) => `- <InjectRef inject="${type}" />`).join("\n");
			}
			buildImmediateInjectRefList() {
				return this.buildInjectRefList(([, meta]) => !!meta.immediate);
			}
			buildLazyInjectRefList() {
				return this.buildInjectRefList(([, meta]) => meta.lazy);
			}
			buildSafeInjectRefList() {
				return this.buildInjectRefList((_, type) => safeInjects.includes(type));
			}
		}();
	}();
	//#endregion
	//#region src/patches/ContextMenu/patchMenuItem.jsx
	function patchMenuItem() {
		/**
		* Context Menu Item's `action` callback executes inside rAF by default,
		* which forces the animation to skip a frame before executing,
		* as it also uses rAF to schedule an execution, resulting in a flicker on the enter animations.
		* > rAF inside rAF schedules callback on the next frame, not on the current one.
		*
		* This patch intercepts Discord's rAF call and executes the callback synchronously instead.
		*/
		Patcher_default.after(...MenuItemKeyed, (self, [props], value) => {
			if (!value?.props?.onClick) return;
			TinyPatcher.before(value.props, "onClick", (self, [event]) => {
				Object.defineProperty(event.nativeEvent, "view", { value: new Proxy(event.nativeEvent.view, { get(target, prop) {
					if (prop === "requestAnimationFrame") return (cb) => cb();
					return target[prop];
				} }) });
			});
		});
	}
	//#endregion
	//#region src/patches/ChannelTextArea/patchExpressionPicker.jsx
	function patchExpressionPicker() {
		let expressionPickerRendering = false;
		Patcher_default.before(...useExpressionPickerStoreKeyed, (self, args) => {
			if (!expressionPickerRendering) return;
			args[0] = (state) => state.activeView ?? state.lastActiveView;
		});
		Patcher_default.instead(ModuleKey_default.Popouts, ExpressionPicker, "type", (self, [props], original) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Popouts);
			if (!isMainWindow || !module.isEnabled()) return original(props);
			expressionPickerRendering = true;
			let value;
			try {
				value = original(props);
			} finally {
				expressionPickerRendering = false;
			}
			const positionLayer = findInReactTree(value, byClassName("positionLayer"));
			if (!positionLayer) return value;
			positionLayer.props.onPositionChange = props.onPositionChange;
			TinyPatcher.after(ModuleKey_default.Popouts, positionLayer.props, "children", (self, args, value) => {
				const drawerSizingWrapper = findInReactTree(value, byClassName("drawerSizingWrapper"));
				if (!drawerSizingWrapper) return;
				const { children } = drawerSizingWrapper.props;
				const contentWrapperIndex = children.findIndex(byClassName("contentWrapper"));
				if (contentWrapperIndex === -1) return;
				children[contentWrapperIndex] = /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
					module,
					fallback: children[contentWrapperIndex]
				}, /* @__PURE__ */ BdApi.React.createElement(AnimeContainer, {
					ref: props.__containerRef,
					id: ModuleKey_default.Popouts,
					container: { className: "BA__expressionPickerContainer" }
				}, children[contentWrapperIndex]));
			});
			return value;
		});
	}
	css`.BA__expressionPickerContainer {
    height: 100%;
}``ExpressionPicker`;
	//#endregion
	//#region src/patches/ChannelTextArea/patchChannelTextArea.jsx
	function patchChannelTextAreaButtons() {
		Patcher_default.after(ModuleKey_default.Popouts, ChannelTextAreaButtons, "type", (self, [{ buttonRefs }], value) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Popouts);
			if (!isMainWindow || !module.isEnabled() || !buttonRefs) return;
			const buttons = findInReactTree(value, byClassName("buttons"));
			if (!buttons) return;
			for (const button of buttons.props.children) {
				if (!button.key) continue;
				button.props.ref = (el) => buttonRefs.current[button.key] = el;
			}
		});
	}
	function useButtonRefs(value) {
		const buttonRefs = (0, react.useRef)({});
		const { isMainWindow } = useWindow();
		const module = useModule(ModuleKey_default.Popouts);
		if (!isMainWindow || !module.isEnabled()) return buttonRefs;
		const buttons = findInReactTree(value, (m) => m?.type === ChannelTextAreaButtons);
		if (buttons) buttons.props.buttonRefs = buttonRefs;
		return buttonRefs;
	}
	function useExpressionPicker(value, buttonRefs) {
		const { autoRef, setPosition } = useAutoPosition(Position_default.Top, { align: Position_default.Right });
		const anchorRef = (0, react.useCallback)(() => {
			const { activeView, lastActiveView } = unkeyed(useExpressionPickerStoreKeyed).getState();
			return buttonRefs.current[activeView ?? lastActiveView] ?? buttonRefs.current["emoji"];
		}, [buttonRefs]);
		const { isMainWindow } = useWindow();
		const module = useModule(ModuleKey_default.Popouts);
		if (!isMainWindow || !module.isEnabled()) return;
		const wrapper = findInReactTree(value, (m) => Array.isArray(m?.children));
		if (!wrapper) return;
		const { children } = wrapper;
		const expressionPickerIndex = children.length - 1;
		const injectContainerRef = (children, ref) => {
			if (children?.props) children.props.__containerRef = ref;
		};
		children[expressionPickerIndex] = /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
			module,
			fallback: children[expressionPickerIndex]
		}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, children[expressionPickerIndex] && /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			module,
			injectContainerRef,
			autoRef,
			anchor: anchorRef
		}, (0, react.cloneElement)(children[expressionPickerIndex], { onPositionChange: setPosition }))));
	}
	function useAppLauncherPopup(value, buttonRefs) {
		const layerRef = (0, react.useRef)();
		const { autoRef, setPosition } = useAutoPosition(Position_default.Top, { align: Position_default.Right });
		const { isMainWindow } = useWindow();
		const module = useModule(ModuleKey_default.Popouts);
		if (!isMainWindow || !module.isEnabled()) return;
		const inner = findInReactTree(value, byClassName("inner"));
		if (!inner) return;
		const { children } = inner.props;
		const popupIndex = 0;
		if (children[popupIndex]) TinyPatcher.after(ModuleKey_default.Popouts, children[popupIndex].type, "type", (self, [props], value) => {
			const positionLayer = findInReactTree(value, byClassName("positionLayer"));
			if (!positionLayer) return;
			positionLayer.props.ref = props.layerRef;
			positionLayer.props.onPositionChange = props.onPositionChange;
		});
		children[popupIndex] = /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
			module,
			fallback: children[popupIndex]
		}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, { component: null }, children[popupIndex] && /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
			module,
			layerRef,
			autoRef,
			anchor: () => buttonRefs.current["appLauncher"] ?? children[popupIndex].props?.positionTargetRef
		}, (0, react.cloneElement)(children[popupIndex], {
			layerRef,
			onPositionChange: setPosition
		}))));
	}
	function patchChannelTextArea() {
		Patcher_default.after(ModuleKey_default.Popouts, ChannelTextArea?.type, "render", (self, args, value) => {
			const buttonRefs = useButtonRefs(value);
			useExpressionPicker(value, buttonRefs);
			useAppLauncherPopup(value, buttonRefs);
		});
		patchChannelTextAreaButtons();
		patchExpressionPicker();
	}
	//#endregion
	//#region src/patches/Toast/patchPopToast.js
	function patchPopToast() {
		Patcher_default.instead(...popToastKeyed, (self, [key, force], original) => {
			if (key === "APP" && force !== true && manager_default.isToastActive()) return;
			return original(key);
		}, { silent: true });
	}
	//#endregion
	//#region src/modules/WebSocketController.js
	var WebSocketController = class {
		get name() {
			return "WebSocketController";
		}
		constructor() {
			this.queue = [];
			this.isPaused = false;
			this._messageHandler = null;
			this.interceptor = (message) => {
				this.queue.push(message);
			};
		}
		getOriginalMessageHandler() {
			const handler = GatewaySocket.webSocket?.onmessage;
			return handler === this.interceptor ? this._messageHandler : handler;
		}
		setMessageHandler(handler) {
			if (GatewaySocket.webSocket) GatewaySocket.webSocket.onmessage = handler;
		}
		get messageHandler() {
			return this._messageHandler ?? this.getOriginalMessageHandler();
		}
		flushQueue() {
			if (!this.queue.length || !this.messageHandler) return;
			Logger.debug(this.name, `Flushing ${this.queue.length} message${this.queue.length > 1 ? "s" : ""}.`);
			Flux.Emitter.batched(() => {
				this.queue.forEach((message) => this.messageHandler(message));
				this.queue = [];
			});
		}
		pauseMessages() {
			if (this.isPaused || !GatewaySocket.webSocket) return;
			this._messageHandler = this.getOriginalMessageHandler();
			this.setMessageHandler(this.interceptor);
			this.isPaused = true;
			Logger.debug(this.name, "Messages paused.");
		}
		resumeMessages(flush = true) {
			if (!this.isPaused || !GatewaySocket.webSocket) return;
			this.setMessageHandler(this.messageHandler);
			this._messageHandler = null;
			this.isPaused = false;
			Logger.debug(this.name, "Messages resumed.");
			if (flush) this.flushQueue();
		}
	};
	//#endregion
	//#region src/modules/DispatchController.js
	var ignoredEvents = [
		"CHANNEL_SELECT",
		"UPDATE_CHANNEL_DIMENSIONS",
		"GUILD_HOME_SETTINGS_FETCH_START"
	];
	var alwaysInterceptedEvents = [
		"GUILD_CREATE",
		"GUILD_MEMBER_LIST_UPDATE",
		"LOAD_MESSAGES_SUCCESS",
		"THREAD_LIST_SYNC"
	];
	var connectedStores = [
		SelectedGuildStore,
		SelectedChannelStore,
		ChannelSectionStore,
		LayerStore$1
	];
	var DispatchController = class {
		get name() {
			return "DispatchController";
		}
		get isEnabled() {
			return Config_default.current.general.prioritizeAnimationSmoothness;
		}
		constructor() {
			this.webSocketController = new WebSocketController();
			this.queue = [];
			this.isEmitterPaused = false;
			this._visibleEntities = this.getVisibleEntities();
			this._clearWatcher = null;
			this.interceptor = (event) => {
				if (!AnimationStore_default.shouldInterceptEvents || this.isEmitterPaused) return;
				if (!this.shouldIntercept(event)) return;
				Logger.debug(this.name, `Intercepted and queued ${event.type}.`);
				this.queue.push(event);
				return true;
			};
			this.onSettingsChange = () => {
				if (this.isEnabled) {
					this.registerInterceptor();
					Logger.log(this.name, "Enabled.");
				} else {
					this.clearInterceptor();
					this.webSocketController.resumeMessages(false);
					this.resumeEmitter();
					this.flush();
					Logger.log(this.name, "Disabled.");
				}
			};
			this.onConnectedStoreChange = () => {
				const visibleEntities = this.getVisibleEntities();
				if (!isEqual(visibleEntities, this._visibleEntities)) this.flush();
				this._visibleEntities = visibleEntities;
			};
		}
		_debugEvent(event) {
			Logger.debug(this.name, `Event fired:`, event);
			console.time(event.type);
			requestAnimationFrame(() => console.timeEnd(event.type));
		}
		getVisibleEntities() {
			if (LayerStore$1.hasLayers()) return {
				guildId: null,
				channelId: null,
				threadId: null
			};
			const guildId = SelectedGuildStore.getGuildId();
			const channelId = SelectedChannelStore.getChannelId(guildId);
			return {
				guildId,
				channelId,
				threadId: ChannelSectionStore.getCurrentSidebarChannelId(channelId)
			};
		}
		shouldIntercept(event) {
			if (ignoredEvents.includes(event.type)) return false;
			if (alwaysInterceptedEvents.includes(event.type)) return true;
			const { guildId, channelId, threadId } = this._visibleEntities;
			return typeof event.guildId === "string" && event.guildId !== guildId || typeof event.channelId === "string" && event.channelId !== channelId && event.channelId !== threadId;
		}
		flushQueue() {
			if (!this.queue.length) return;
			Logger.debug(this.name, `Flushing ${this.queue.length} event${this.queue.length > 1 ? "s" : ""}:`, this.queue);
			Flux.Emitter.batched(() => {
				this.queue.forEach((event) => Dispatcher.dispatch(event));
				this.queue = [];
			});
		}
		flush() {
			this.webSocketController.flushQueue();
			this.flushQueue();
		}
		registerInterceptor() {
			if (Dispatcher._interceptors.includes(this.interceptor)) return;
			Dispatcher._interceptors.unshift(this.interceptor);
		}
		clearInterceptor() {
			Dispatcher._interceptors = Dispatcher._interceptors.filter((i) => i !== this.interceptor);
		}
		pauseEmitter() {
			if (this.isEmitterPaused) return;
			this.isEmitterPaused = true;
			Logger.debug(this.name, "Emitter paused. Safely flushing queue...");
			this.flushQueue();
		}
		resumeEmitter() {
			if (!this.isEmitterPaused) return;
			this.isEmitterPaused = false;
			Logger.debug(this.name, "Emitter resumed. Emitting changes...");
			Flux.Emitter.emit();
		}
		registerWatcher() {
			this._clearWatcher = AnimationStore_default.watch(() => {
				if (this.isEnabled && AnimationStore_default.shouldPauseEmitter) {
					this.webSocketController.pauseMessages();
					this.pauseEmitter();
				} else {
					this.webSocketController.resumeMessages();
					this.resumeEmitter();
				}
				if (!AnimationStore_default.shouldInterceptEvents) this.flush();
			});
		}
		clearWatcher() {
			this._clearWatcher?.();
		}
		connectStores() {
			connectedStores.forEach((store) => store.addChangeListener(this.onConnectedStoreChange));
		}
		disconnectStores() {
			connectedStores.forEach((store) => store.removeChangeListener(this.onConnectedStoreChange));
		}
		initialize() {
			if (this.isEnabled) this.registerInterceptor();
			this.registerWatcher();
			this.connectStores();
			Emitter_default.on(Events_default.SettingsChanged, this.onSettingsChange);
			Logger.log(this.name, `Initialized${this.isEnabled ? " and enabled" : ""}.`);
		}
		shutdown() {
			this.clearInterceptor();
			this.clearWatcher();
			this.disconnectStores();
			Emitter_default.off(Events_default.SettingsChanged, this.onSettingsChange);
			this.webSocketController.resumeMessages(false);
			this.resumeEmitter();
			this.flush();
			Logger.log(this.name, "Shutdown.");
		}
	};
	var DispatchController_default = new DispatchController();
	//#endregion
	//#region src/utils/layers.js
	function getLazyLayerComponent(id) {
		if (!LayersComponent) return;
		try {
			return findInReactTree(LayersComponent.prototype.renderComponent(id), (m) => m?.type?.displayName?.startsWith("Suspense"))?.type()?.props?.children?.type;
		} catch (error) {
			Logger.err("getLazyLayerComponent", error);
		}
	}
	//#endregion
	//#region src/modules/LazyLoader.js
	var LAYER_IDS = [
		"CHANNEL_SETTINGS",
		"GUILD_SETTINGS",
		"COLLECTIBLES_SHOP"
	];
	var LoadStatus = {
		IDLE: 0,
		PENDING: 1,
		FINISHED: 2
	};
	var LazyLoader = class {
		get name() {
			return "LazyLoader";
		}
		constructor() {
			this.active = false;
			this.layers = LAYER_IDS.map((id) => ({
				id,
				status: LoadStatus.IDLE
			}));
			this.iterate = () => {
				if (!this.active) return;
				if (this.isIdle()) {
					if (this.iterateLayers()) return Logger.log(this.name, "No modules in queue.");
				}
				requestIdleCallback(this.iterate);
			};
		}
		isIdle() {
			return !AnimationStore_default.animations.length;
		}
		iterateLayers() {
			if (!Config_default.current.general.preloadLayers) return true;
			const layer = this.layers.find((l) => l.status !== LoadStatus.FINISHED);
			if (!layer) return true;
			if (layer.status === LoadStatus.PENDING) return false;
			const component = getLazyLayerComponent(layer.id);
			if (!component || isLazyLoaded(component)) {
				if (!component) Logger.warn(this.name, `Unable to find component for layer "${layer.id}". Skipping...`);
				else Logger.log(this.name, `Layer "${layer.id}" is already loaded. Skipping...`);
				layer.status = LoadStatus.FINISHED;
			} else {
				Logger.log(this.name, `Loading layer "${layer.id}"...`);
				loadLazy(component).then(() => Logger.log(this.name, `Layer "${layer.id}" was loaded.`)).catch((err) => Logger.error(this.name, `Failed to load layer "${layer.id}":`, err)).finally(() => layer.status = LoadStatus.FINISHED);
			}
			return false;
		}
		initialize() {
			this.active = true;
			requestIdleCallback(this.iterate);
			Emitter_default.on(Events_default.SettingsChanged, this.iterate);
			Logger.info(this.name, "Initialized.");
		}
		shutdown() {
			this.active = false;
			Emitter_default.off(Events_default.SettingsChanged, this.iterate);
			Logger.info(this.name, "Shutdown.");
		}
	};
	var LazyLoader_default = new LazyLoader();
	//#endregion
	//#region src/patches/optimizations/patchEmoji.jsx
	function isEmojiOverload(data, priority, limit = 100) {
		let count = 0;
		for (let i = priority; i >= 1; i--) {
			count += data[i];
			if (count > limit) return true;
		}
		return false;
	}
	/**
	* If the count of emojis of a certain priority and of priorities above
	* exceed the limit in the context of an active transition (see `isEmojiOverload`),
	* load them after enter animations are finished
	*/
	function patchEmoji() {
		Patcher_default.after(...EmojiKeyed, (self, [{ className, size }], value) => {
			const { config } = useConfig();
			const { isEnterActive, state, props, data, tree } = (0, react.use)(AnimeTransitionContext);
			const priority = (0, react.useMemo)(() => size === "reaction" ? 2 : 1, [size]);
			(0, react.useEffect)(() => {
				tree.forEach((t) => t.data.emoji[priority] += 1);
				return () => tree.forEach((t) => t.data.emoji[priority] -= 1);
			}, [priority]);
			if (config.general.prioritizeAnimationSmoothness && isEnterActive && props?.mountOnEnter && (state === Transition.EXITED || isEmojiOverload(data.emoji, priority))) return /* @__PURE__ */ BdApi.React.createElement("div", { className: (0, clsx.default)("emoji", "BA__emojiPlaceholder", className, { jumboable: size === "jumbo" }) });
			return value;
		}, { category: InternalError.Category.PRIORITIZE_ANIMATION_SMOOTHNESS });
	}
	css`.BA__emojiPlaceholder {
    display: inline-block;
    border-radius: 12%;
    background-color: var(--background-mod-strong);
    flex-shrink: 0;
}``Emoji`;
	//#endregion
	//#region src/patches/optimizations/patchProfileEffects.jsx
	/**
	* Load profile effects after enter animations are finished
	*/
	function patchProfileEffects() {
		Patcher_default.after(...ProfileEffectsKeyed, () => {
			const { config } = useConfig();
			const { isEnterActive } = (0, react.use)(AnimeTransitionContext);
			if (config.general.prioritizeAnimationSmoothness && isEnterActive) return null;
		}, { category: InternalError.Category.PRIORITIZE_ANIMATION_SMOOTHNESS });
	}
	//#endregion
	//#region src/patches/optimizations/patchUseIsVisible.js
	/**
	* Commit the `IntersectionObserver` state after animations are finished
	*/
	function patchUseIsVisible() {
		Patcher_default.instead(...useIsVisibleKeyed, (self, [callback, ...args], original) => {
			const { config } = useConfig();
			const isEnabled = config.general.prioritizeAnimationSmoothness;
			const unwatch = (0, react.useRef)();
			const onUpdate = (0, react.useCallback)((isIntersecting) => {
				unwatch.current?.();
				if (AnimationStore_default.isSafe) callback(isIntersecting);
				else unwatch.current = AnimationStore_default.onceSafe(() => callback(isIntersecting));
			}, [callback]);
			(0, react.useEffect)(() => () => unwatch.current?.(), []);
			return original(isEnabled ? onUpdate : callback, ...args);
		}, { category: InternalError.Category.PRIORITIZE_ANIMATION_SMOOTHNESS });
	}
	//#endregion
	//#region src/patches/optimizations/patchEmitter.js
	/**
	* Pause Flux Emitter while switch animations are active
	*/
	function patchEmitter() {
		Patcher_default.instead(Flux.Emitter, "emit", (self, args, original) => {
			if (DispatchController_default.isEmitterPaused) return;
			return original.apply(self, args);
		});
	}
	//#endregion
	//#region src/patches/optimizations/index.js
	function applyOptimizationPatches() {
		patchEmoji();
		patchProfileEffects();
		patchUseIsVisible();
		patchEmitter();
	}
	//#endregion
	//#region src/patches/AppView/patchRootElementContext.jsx
	/**
	* Inject module indicator classes in the root element for easy theme compatibility
	*
	* NOTE: We can't use hooks here since `useRootElementContext` is not covered by `forceAppUpdate`,
	* but it's updated regularly by itself, so there's no real need to add settings listeners here.
	*/
	function patchRootElementContext() {
		Patcher_default.after(...useRootElementContextKeyed, (self, args, value) => {
			return {
				...value,
				className: (0, clsx.default)(value.className, Core_default.getAllModules(true).filter((m) => {
					switch (m.id) {
						case ModuleKey_default.ThreadSidebar: return m.isEnabled() || Core_default.getModule(ModuleKey_default.ThreadSidebarSwitch).isEnabled();
						default: return m.isEnabled();
					}
				}).map((m) => `BA__module_${m.id}`))
			};
		});
	}
	//#endregion
	//#region src/patches/BasePopover/patchBasePopover.jsx
	/**
	* Disable Discord's internal animations for Mana Popovers
	*
	* (They are absolute garbage btw)
	*/
	function patchBasePopover() {
		Patcher_default.after(ModuleKey_default.Popouts, ...BasePopoverKeyed, (self, [{ shouldShow = true }], value) => {
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Popouts);
			if (!isMainWindow || !module.isEnabled()) return;
			value.props.shouldShow = shouldShow;
			TinyPatcher.after(value.props, "renderPopout", (self, args, value) => {
				const animated = findInReactTree(value, (m) => m?.type?.displayName?.startsWith("Animated"));
				if (!animated) return;
				delete animated.props.style;
				animated.type = "div";
			});
		});
	}
	//#endregion
	//#region changelog.json
	var changelog_default = {
		"2.0.0": {
			"banner": "https://github.com/okdevme/BetterAnimations/raw/refs/heads/main/assets/V2.webp",
			"blurb": "Larger, faster, and rebuilt from the ground up. **BetterAnimations 2.0** is here, transforming your Discord experience with a new generation of silky-smooth, deeply integrated animations.",
			"changes": [{
				"type": "added",
				"title": "What's New in 2.0",
				"items": [
					"🎭 **Expanded Animation Library** — experience motion across Discord like never before. This release introduces 10 new animation modules, bringing the total to 14. Animate everything from Servers and Messages to the Thread Sidebar and Modals.",
					"⚙️ **Native-Level Integration** — animations are now woven directly into Discord's core UI. This creates a more reliable, rigid, and natural-feeling experience that truly belongs.",
					"🚀 **Unmatched Performance** — enjoy buttery-smooth animations that make Discord feel snappier and more responsive than ever.",
					"🎨 **Ultimate Customization** — take full control with a completely redesigned Settings Panel. Fine-tune every detail of your animations or craft entirely new ones from scratch.",
					"🌐 **Client Mod & Framework** — expand your library with community-made animations or build and share your own through the official Catalog."
				]
			}]
		},
		"2.0.1": { "changes": [{
			"type": "added",
			"title": "What's new",
			"items": ["Enhance layout: Added alert when conflict with the custom theme is detected."]
		}, {
			"type": "fixed",
			"title": "Fixes",
			"items": ["General Settings: Updated to work in the latest release of Discord."]
		}] },
		"2.0.2": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Fixed the plugin failing to load."]
		}] },
		"2.0.3": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Updated to work in the latest release of Discord."]
		}] },
		"2.0.4": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Updated to work in the latest release of Discord."]
		}] },
		"2.0.5": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Channels: Fixed the animation direction being incorrectly determined for the Quests page.", "Updated to work in the latest release of Discord."]
		}] },
		"2.0.6": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Modals Backdrop: Updated to work in the latest release of Discord."]
		}] },
		"2.0.7": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Settings: Updated to work in the latest release of Discord."]
		}] },
		"2.0.8": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Catalog & Library: Updated to work in the latest release of Discord."]
		}] },
		"2.0.9": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Updated to work in the latest release of Discord."]
		}] },
		"2.0.10": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": [
				"Servers and Channels: Updated to work in the latest release of Discord.",
				"Settings: Fixed the tooltip for the Duration slider not being displayed.",
				"Fixed an issue where the search sidebar sometimes doesn't open when trying to search messages with Servers or Channels animations enabled."
			]
		}] },
		"2.0.11": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Thread Sidebar: Fixed the animations misfiring while navigating the Mod View.", "Updated to work in the latest release of Discord."]
		}] },
		"2.1.0": { "changes": [{
			"type": "added",
			"title": "What's new",
			"items": [
				"Tooltips: Integrated the new Mana Discord Tooltips.",
				"Settings: Integrated the new Discord User Settings Modal.",
				"Modals: Added support for the Discord Layer Modals.",
				"Plugin Settings: Optimized for the new Discord User Settings Modal. Legacy User Settings will no longer be opened when accessing the plugin settings."
			]
		}, {
			"type": "fixed",
			"title": "Fixes",
			"items": [
				"Popouts: Updated Apps & Commands integration to work in the latest release of Discord.",
				"Modals: Inactive modals are now correctly dimmed.",
				"Tooltips: Fixed the occasional misfiring of exit animation when rapidly hovering over tooltips."
			]
		}] },
		"2.1.1": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Updated to work in the latest release of Discord."]
		}] },
		"2.1.2": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Updated to work in the latest release of Discord."]
		}] },
		"2.1.3": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Minor style fixes."]
		}] },
		"2.1.4": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Servers: Updated to work in the latest release of Discord.", "Minor style fixes."]
		}] },
		"2.1.5": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Tooltips: Updated to work in the latest release of Discord."]
		}] },
		"2.1.6": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Updated to work in the latest release of Discord."]
		}] },
		"2.1.7": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Updated to work in the latest release of Discord.", "General Settings: Removed \"Cache Legacy User Settings Sections\"."]
		}] },
		"2.1.8": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Updated to work in the latest release of Discord."]
		}] },
		"2.1.9": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Settings: Updated to work in the latest release of Discord.", "Channel List: Updated to work in the latest release of Discord."]
		}] },
		"2.1.10": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Messages: Updated to work with BetterDiscord 1.13.8.", "Modals: Updated to work in the latest release of Discord."]
		}] },
		"2.1.11": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Thread Sidebar: Updated to work in the latest release of Discord."]
		}] },
		"2.1.12": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Updated to work in the latest release of Discord.", "Minor bugfixes."]
		}] },
		"2.1.13": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Updated author GitHub username.", "Polished the Pack Updater and ported it to BD notifications."]
		}] },
		"2.1.14": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Modals: Updated to work in the latest release of Discord."]
		}] },
		"2.1.15": { "changes": [{
			"type": "fixed",
			"title": "Fixes",
			"items": ["Updated to work in the latest release of Discord."]
		}] }
	};
	//#endregion
	//#region src/modules/Changelog.jsx
	function parseVersion(version) {
		const data = version.match(regex_default.semver);
		if (!data) return null;
		const [, major, minor, patch, id] = data;
		return {
			major,
			minor,
			patch,
			id
		};
	}
	var Changelog = class {
		get name() {
			return "Changelog";
		}
		constructor() {
			this.onPackLoaded = (pack) => this.showPackModalIfNeeded(pack);
		}
		get data() {
			return data.currentVersionInfo;
		}
		set data(value) {
			data.currentVersionInfo = value;
		}
		initialize() {
			this.showPluginModalIfNeeded();
			Emitter_default.on(Events_default.PackLoaded, this.onPackLoaded);
			Logger.log(this.name, "Initialized.");
		}
		shutdown() {
			Emitter_default.off(Events_default.PackLoaded, this.onPackLoaded);
			Logger.log(this.name, "Shutdown.");
		}
		showModal({ title, version, subtitle, footer, ...props }) {
			return UI.showChangelogModal({
				...props,
				title: /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__changelogModalHeader" }, /* @__PURE__ */ BdApi.React.createElement(Tooltip$1, {
					text: meta_default.name,
					shouldShow: !!title,
					position: "bottom",
					align: "left"
				}, (props) => /* @__PURE__ */ BdApi.React.createElement(IconBrand, {
					...props,
					size: "custom",
					width: 36,
					height: 36
				})), /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__changelogModalHeaderInfo" }, /* @__PURE__ */ BdApi.React.createElement("span", null, title ?? meta_default.name, " "), version && /* @__PURE__ */ BdApi.React.createElement(Text$1, {
					tag: "span",
					variant: "text-sm/semibold",
					color: "text-muted"
				}, "v", version))),
				footer: footer && /* @__PURE__ */ BdApi.React.createElement("div", { className: "BA__changelogModalFooter" }, footer)
			});
		}
		showPluginModal(version, props = changelog_default[version]) {
			if (!props) return;
			return this.showModal({
				...props,
				version,
				footer: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(SocialLinks, null), /* @__PURE__ */ BdApi.React.createElement(Button$1, {
					size: "sm",
					icon: ArrowSmallRightIcon,
					iconPosition: "end",
					text: "Go to Settings",
					onClick: () => {
						ModalActions.closeAllModals();
						settings_default.openSettingsModal();
					}
				}))
			});
		}
		showPluginMajorModalIfNeeded() {
			const [a, b] = [this.data.version, version$1].map(parseVersion);
			if (a && b && a.major !== b.major && [b.minor, b.patch].some((i) => i !== "0")) this.showPluginModal(`${b.major}.0.0`);
		}
		showPluginModalIfNeeded() {
			if (this.data.version === "2.1.15" && this.data.hasShownChangelog) return;
			this.showPluginModal(version$1);
			this.showPluginMajorModalIfNeeded();
			this.data = {
				version: version$1,
				hasShownChangelog: true
			};
		}
		showPackModal(pack) {
			if (!pack.changelog) return;
			const showPackModal = () => ModalActions.openModal((props) => /* @__PURE__ */ BdApi.React.createElement(PackModal, {
				...props,
				filename: pack.filename,
				location: PackContentLocation.LIBRARY
			}));
			try {
				return this.showModal({
					banner: PackRegistry_default.getThumbnailSrc(pack),
					...pack.changelog,
					title: pack.name,
					version: pack.version,
					footer: /* @__PURE__ */ BdApi.React.createElement(BdApi.React.Fragment, null, /* @__PURE__ */ BdApi.React.createElement(PackMeta$1, { pack }), /* @__PURE__ */ BdApi.React.createElement(Button$1, {
						size: "sm",
						icon: ArrowSmallRightIcon,
						iconPosition: "end",
						text: "View",
						onClick: showPackModal
					}))
				});
			} catch (error) {
				Logger.error(this.name, `Failed to show changelog modal for pack ${pack.name}:`, error);
			}
		}
		showPackModalIfNeeded(pack) {
			if (pack.partial) return;
			const data = PackData_default.pack(pack.slug);
			if (data.currentVersion === pack.version) return;
			if (data.currentVersion) this.showPackModal(pack);
			data.currentVersion = pack.version;
		}
	};
	var Changelog_default = new Changelog();
	css`.BA__changelogModalHeader {
    display: flex;
    align-items: center;
    gap: 4px;
}
.BA__changelogModalFooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}``Changelog`;
	//#endregion
	//#region src/utils/settings.js
	var isNode = (node, type) => typeof type === "function" ? type(node) : node?.type === type;
	function closest(node, type) {
		if (isNode(node, type)) return node;
		if (!node?.parent) return null;
		return closest(node.parent, type);
	}
	function flatten(nodes, type) {
		return nodes.flatMap((node) => {
			if (isNode(node, type)) return [node];
			if (!Array.isArray(node?.layout)) return [];
			return flatten(node.layout, type);
		});
	}
	//#endregion
	//#region src/patches/Settings/patchSettingsContent.jsx
	async function patchSettingsContent() {
		Patcher_default.after(ModuleKey_default.Settings, await SettingsContent, "type", (self, [{ setting }], value) => {
			const root = (0, react.useMemo)(() => setting ? closest(setting, SettingsNodeType.ROOT) : null, [setting]);
			const direction = useDirection((0, react.useMemo)(() => root ? flatten(root.layout, SettingsNodeType.PANEL).map((node) => node.key) : [], [root]), setting?.key);
			const { isMainWindow } = useWindow();
			const module = useModule(ModuleKey_default.Settings);
			if (!isMainWindow || !module.isEnabled()) return;
			const auto = { direction };
			return /* @__PURE__ */ BdApi.React.createElement(ErrorBoundary, {
				module,
				fallback: value
			}, /* @__PURE__ */ BdApi.React.createElement(TransitionGroup, {
				className: "BA__settingsContent",
				childFactory: passAuto(auto)
			}, /* @__PURE__ */ BdApi.React.createElement(AnimeTransition, {
				key: setting?.key ?? "none",
				container: { className: "BA__settingsContent" },
				module,
				auto
			}, value)));
		});
	}
	SettingsContent.then(() => css`.BA__settingsContent {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

${DiscordSelectors.SettingsSidebar.sidebar} {
    isolation: isolate;
}``SettingsContent`);
	//#endregion
	//#region src/patches/FocusLock/patchFocusLock.js
	/**
	* Release focus lock during exit animations
	*/
	function patchFocusLock() {
		Patcher_default.before(...useFocusLockKeyed, (self, args) => {
			const { isEnterActive, tree } = (0, react.use)(AnimeTransitionContext);
			if (isEnterActive || tree.every((item) => [Transition.ENTERING, Transition.ENTERED].includes(item.state))) return;
			args[1] ??= {};
			args[1].disable = true;
		});
	}
	function src_default(meta) {
		saveMeta(meta);
		return {
			start() {
				Logger.info("Startup", "Initializing modules...");
				manager_default.initialize();
				PackData_default.initialize();
				Config_default.initialize();
				mouse_default.initialize();
				style.initialize();
				Changelog_default.initialize();
				PackRegistry_default.initialize();
				PackManager_default.initialize();
				AnimationStore_default.initialize();
				Core_default.initialize();
				DispatchController_default.initialize();
				LazyLoader_default.initialize();
				validator_default.onStartup();
				Prompt_default.onStartup();
				Logger.info("Startup", "Applying patches...");
				patchAppView();
				patchContextMenu();
				patchMenuItem();
				patchBasePopout();
				patchBasePopover();
				patchTooltip();
				patchChannelMessageList();
				patchChannelView();
				patchStandardSidebarView();
				patchSettingsContent();
				patchModals();
				patchLayers();
				patchGuildChannelList();
				patchReferencePositionLayer();
				patchChannelTextArea();
				patchPopToast();
				patchRootElementContext();
				patchFocusLock();
				applyOptimizationPatches();
				Logger.info("Startup", "Forcing app update...");
				queueMicrotask(() => forceAppUpdate());
				Logger.info("Startup", "Finished.");
			},
			stop() {
				Emitter_default.emit(Events_default.PluginDisabled);
				Logger.info("Shutdown", "Shutting down modules...");
				Core_default.shutdown();
				mouse_default.shutdown();
				style.shutdown();
				Config_default.shutdown();
				PackData_default.shutdown();
				manager_default.shutdown();
				Changelog_default.shutdown();
				PackRegistry_default.shutdown();
				PackManager_default.shutdown();
				AnimationStore_default.shutdown();
				DispatchController_default.shutdown();
				LazyLoader_default.shutdown();
				settings_default.closeSettingsModal();
				Logger.info("Shutdown", "Removing patches...");
				Patcher_default.unpatchAll();
				Logger.info("Shutdown", "Forcing app update...");
				forceAppUpdate();
				Logger.info("Shutdown", "Finished.");
			},
			getSettingsPanel() {
				queueMicrotask(() => {
					ModalActions.closeAllModals();
					settings_default.openSettingsModal();
				});
			}
		};
	}
	css`#app-mount {
    overflow: clip;
}``General`;
	//#endregion
	return src_default;
})(BdApi.React, require("events"), BdApi.Utils.className, require("fs"), require("path"), require("electron"), BdApi.ReactDOM);

module.exports = BetterAnimations;
