Build 533169stable
Module 35177
8,017 characters · in 30a277b9d32d70b1.jsDependencies
Source Raw
function(e,t,n){n.d(t,{A:()=>p}),n(393431),n(532706),n(42231),n(232424),n(949626),n(767709),n(65162);var i=n(311907),l=n(554146),a=n(873298),r=n(406935),s=n(506774),o=n(168186),d=n(450510),c=n(734057),u=n(460288),A=n(761821),h=n(652215),_=n(573879);function m(e,t){let n=!1;return null==e.userContent&&(e.userContent={dismissedContents:new Uint8Array,lastReceivedChangelogId:"0",recurringDismissibleContentStates:{}}),null==e.userContent.dismissedContents&&(e.userContent.dismissedContents=new Uint8Array),(0,u.c0)(e.userContent.dismissedContents,t)||(e.userContent.dismissedContents=(0,u.Vf)(e.userContent.dismissedContents,t),n=!0),n}function g(e,t,n){return!!d.HP.hasHiddenHotspot(t)&&m(e,n)}let p=[{version:2,run(e){if(null!=e.inbox)return!1;let t=!1,n=a.Q0.create();e.inbox=n,s.w.get("seenInboxTutorial",!1)&&(n.viewedTutorial=!0,t=!0);let i=s.w.get("recentsButtonTab2");null!=i&&(n.currentTab="Recent Mentions"===i?a.Y2.MENTIONS:a.Y2.UNREADS,t=!0);let l=s.w.get("unread-messages-collapsed-channels")??{};for(let n in l){if(!l[n])continue;let i=c.A.getChannel(n);null!=i&&(t=!0,(0,A.gc)(e,i.guild_id??"0",i.id,e=>{e.collapsedInInbox=!0}))}return t},cleanup(){s.w.remove("seenInboxTutorial"),s.w.remove("recentsButtonTab2"),s.w.remove("unread-messages-collapsed-channels")}},{version:3,run(e){let{state:t}=i.Ay.PersistedStore.migrateAndReadStoreState("EmojiStore",[()=>({diversitySurrogate:s.w.get("EmojiDiversitySurrogate")||""})]);if(null==t)return!1;let n=!1;return null!=t.diversitySurrogate&&""!==t.diversitySurrogate&&(null==e.textAndImages&&(e.textAndImages=a.oJ.create()),null==e.textAndImages.diversitySurrogate&&(e.textAndImages.diversitySurrogate=r.hU.create()),e.textAndImages.diversitySurrogate.value=t.diversitySurrogate,n=!0),n},cleanup(){}},{version:4,run(e){let t=!1;return(!0===s.w.get("HAS_SEEN_HUB_UPSELL")||d.HP.hasHiddenHotspot(d._2.HUB_SECOND_EMAIL_CONNECTION_UPSELL))&&(t=m(e,l.M.HUB_WAITLIST_UPSELL)),t},cleanup(){s.w.remove("HAS_SEEN_HUB_UPSELL")}},{version:5,run(e){let t=!1;e.textAndImages=e.textAndImages??a.oJ.create(),e.notifications=e.notifications??a.TY.create(),e.privacy=e.privacy??a.E.create(),e.voiceAndVideo=e.voiceAndVideo??a.GY.create(),e.gameLibrary=e.gameLibrary??a.F1.create(),e.debug=e.debug??a.X9.create();let n=s.w.get("UserSettingsStore")??{};return"boolean"==typeof n.useRichChatTextBox&&(e.textAndImages.useRichChatInput=r._t.create({value:n.useRichChatTextBox}),t=!0),"string"==typeof n.renderSpoilers&&(e.textAndImages.renderSpoilers=r.hU.create({value:n.renderSpoilers}),t=!0),"boolean"==typeof n.useThreadSidebar&&(e.textAndImages.useThreadSidebar=r._t.create({value:n.useThreadSidebar}),t=!0),"boolean"==typeof n.showInAppNotifications&&(e.notifications.showInAppNotifications=r._t.create({value:n.showInAppNotifications}),t=!0),n.emojiPickerCollapsedSections instanceof Array&&(e.textAndImages.emojiPickerCollapsedSections=n.emojiPickerCollapsedSections,t=!0),n.stickerPickerCollapsedSections instanceof Array&&(e.textAndImages.stickerPickerCollapsedSections=n.stickerPickerCollapsedSections,t=!0),"boolean"==typeof n.viewImageDescriptions&&(e.textAndImages.viewImageDescriptions=r._t.create({value:n.viewImageDescriptions}),t=!0),"boolean"==typeof n.showCommandSuggestions&&(e.textAndImages.showCommandSuggestions=r._t.create({value:n.showCommandSuggestions}),t=!0),"boolean"==typeof n.alwaysPreviewVideo&&(e.voiceAndVideo.alwaysPreviewVideo=r._t.create({value:n.alwaysPreviewVideo}),t=!0),"boolean"==typeof n.notifyFriendsOnGoLive&&(e.notifications.notifyFriendsOnGoLive=r._t.create({value:n.notifyFriendsOnGoLive}),t=!0),"boolean"==typeof n.installShortcutDesktop&&(e.gameLibrary.installShortcutDesktop=r._t.create({value:n.installShortcutDesktop}),t=!0),"boolean"==typeof n.installShortcutStartMenu&&(e.gameLibrary.installShortcutStartMenu=r._t.create({value:n.installShortcutStartMenu}),t=!0),"boolean"==typeof n.allowActivityPartyPrivacyFriends&&(e.privacy.allowActivityPartyPrivacyFriends=r._t.create({value:n.allowActivityPartyPrivacyFriends}),t=!0),"boolean"==typeof n.allowActivityPartyPrivacyVoiceChannel&&(e.privacy.allowActivityPartyPrivacyVoiceChannel=r._t.create({value:n.allowActivityPartyPrivacyVoiceChannel}),t=!0),"boolean"==typeof n.rtcPanelShowVoiceStates&&(e.debug.rtcPanelShowVoiceStates=r._t.create({value:n.rtcPanelShowVoiceStates}),t=!0),t},cleanup(){}},{version:7,run:e=>g(e,d._2.APPLICATION_COMMAND_TOOLTIP,l.M.APPLICATION_COMMAND_TOOLTIP),cleanup(){}},{version:8,run:e=>g(e,d._2.CHANNEL_BANNER_MEMBER_LIST_NOTICE,l.M.CHANNELINFO_CHANNELBANNER_NOTICE),cleanup(){}},{version:9,run:e=>(d.HP.hasHiddenHotspot(d._2.MULTI_ACCOUNT_TOOLTIP)&&s.w.set(_.JE,"true"),g(e,d._2.MULTI_ACCOUNT_TOOLTIP,l.M.ACCOUNT_MULTIACCOUNT_TOOLTIP)),cleanup(){}},{version:10,run(e){let t=g(e,d._2.HUB_LINK_CHANNEL_NOTICE,l.M.CHANNEL_NOTICE_HUBLINK),n=s.w.get("channelNotices")??{};return!1===n[h.n5X.INVITE]&&m(e,l.M.CHANNEL_NOTICE_INVITE)&&(t=!0),!1===n[h.n5X.QUICKSWITCHER]&&m(e,l.M.CHANNEL_NOTICE_QUICKSWITCHER)&&(t=!0),!1===n[h.n5X.GUILD_BOOSTING]&&m(e,l.M.CHANNEL_NOTICE_PREMIUM_GUILD_SUBSCRIPTION)&&(t=!0),t},cleanup(){s.w.remove("channelNotices")}},{version:11,run(e){let t=!1;return g(e,d._2.GUILD_EVENT_UPSELL,l.M.GUILD_HEADER_EVENT_UPSELL)&&(t=!0),g(e,d._2.ANIMATED_GUILD_BANNER_GUILD_HEADER_TOOLTIP,l.M.GUILD_HEADER_ANIMATED_GUILD_BANNER)&&(t=!0),t},cleanup(){}},{version:12,run(e){let t=!1;return s.w.get("hideNag")&&m(e,l.M.NAGBAR_NOTICE_DOWNLOAD)&&(t=!0),s.w.get("hideConnectSpotify")&&m(e,l.M.NAGBAR_NOTICE_CONNECT_SPOTIFY)&&(t=!0),s.w.get("hideConnectPlayStation")&&m(e,l.M.NAGBAR_NOTICE_CONNECT_PLAYSTATION)&&(t=!0),t},cleanup(){s.w.remove("hideNag"),s.w.remove("hideConnectSpotify"),s.w.remove("hideConnectPlayStation")}},{version:13,run(e){let t=!1;return s.w.get("hidePremiumPromo")&&m(e,l.M.NAGBAR_NOTICE_PREMIUM_PROMO)&&(t=!0),s.w.get("hidePremiumTier2TrialEnding")&&m(e,l.M.NAGBAR_NOTICE_PREMIUM_TIER_TWO_TRIAL_ENDING)&&(t=!0),s.w.get("hidePremiumReactivateNotice")&&m(e,l.M.NAGBAR_NOTICE_PREMIUM_REACTIVATE)&&(t=!0),t},cleanup(){s.w.remove("hidePremiumPromo"),s.w.remove("hidePremiumTier2TrialEnding"),s.w.remove("hidePremiumReactivateNotice")}},{version:14,run:e=>g(e,d._2.ACTIVITY_BEB_TUTORIAL,l.M.ACTIVITIES_TUTORIAL_COACH_MARK),cleanup(){}},{version:15,run:e=>g(e,d._2.NOW_PLAYING_CONSENT_CARD,l.M.NOW_PLAYING_CONSENT_CARD),cleanup(){}},{version:16,run(e){let t=s.w.get("PromotionsPersistedStore");if(null==t)return!1;let n=t._state.lastDismissedOutboundPromotionStartDate;return null!=n&&(null==e.userContent&&(e.userContent=a.YW.create()),null==e.userContent.lastDismissedOutboundPromotionStartDate)&&(e.userContent.lastDismissedOutboundPromotionStartDate=r.hU.create({value:n}),!0)},cleanup(){}},{version:17,run(e){let{state:t}=i.Ay.PersistedStore.migrateAndReadStoreState("ExpressionSuggestionsPersistedStore",null);if(null==t)return!1;let n=t.expressionSuggestionsEnabled;return null!=n&&(null==e.textAndImages&&(e.textAndImages=a.oJ.create()),null==e.textAndImages.expressionSuggestionsEnabled)&&(e.textAndImages.expressionSuggestionsEnabled=r._t.create({value:n}),!0)},cleanup(){s.w.remove("ExpressionSuggestionsPersistedStore")}},{version:18,run(e){let t=!1;return g(e,d._2.GUILD_DELETE_FEEDBACK,l.M.GUILD_DELETE_FEEDBACK)&&(t=!0),g(e,d._2.GUILD_LEAVE_FEEDBACK,l.M.GUILD_LEAVE_FEEDBACK)&&(t=!0),t},cleanup(){}},{version:19,run(e){let t=!1;return s.w.get("forumHelperCardStorageKey")&&(t=m(e,l.M.FORUM_CHANNEL_HELPER_CARD)),t},cleanup(){s.w.remove("forumHelperCardStorageKey")}},{version:20,run(e){let t=s.w.get("lastChangeLogId");if(null==t)return!1;if(!(0,o.hT)(t))return s.w.remove("lastChangeLogId"),!1;if(null==e.userContent)e.userContent=a.YW.create();else if(null!=e.userContent&&null!=e.userContent.lastReceivedChangelogId&&"0"!==e.userContent.lastReceivedChangelogId)return s.w.remove("lastChangeLogId"),!1;return e.userContent.lastReceivedChangelogId=t,!0},cleanup(){s.w.remove("lastChangeLogId")}},{version:21,run:e=>e.appearance?.uiDensity===a.NS.COMPACT&&(e.appearance.uiDensity=a.NS.DEFAULT,!0),cleanup(){}}]}