var CLSTAMP = "8811541"; (() => { var e, t, n, i, o, r = { 3119: (e, t, n) => { var i = { "./friendsui_arabic.json": [58480, 6992], "./friendsui_brazilian.json": [33109, 2862], "./friendsui_bulgarian.json": [5242, 8518], "./friendsui_czech.json": [98399, 4448], "./friendsui_danish.json": [34581, 9775], "./friendsui_dutch.json": [27904, 7575], "./friendsui_english.json": [67927, 8247], "./friendsui_finnish.json": [63907, 4596], "./friendsui_french.json": [49877, 3500], "./friendsui_german.json": [90262, 4989], "./friendsui_greek.json": [84583, 1471], "./friendsui_hungarian.json": [85581, 5802], "./friendsui_indonesian.json": [37371, 6646], "./friendsui_italian.json": [31577, 8815], "./friendsui_japanese.json": [86521, 6727], "./friendsui_koreana.json": [73827, 6986], "./friendsui_latam.json": [13236, 7651], "./friendsui_norwegian.json": [19181, 4716], "./friendsui_polish.json": [3751, 699], "./friendsui_portuguese.json": [21520, 4264], "./friendsui_romanian.json": [98235, 3182], "./friendsui_russian.json": [99942, 2913], "./friendsui_sc_schinese.json": [64522, 3140], "./friendsui_schinese.json": [19456, 7706], "./friendsui_spanish.json": [12011, 3471], "./friendsui_swedish.json": [66100, 9818], "./friendsui_tchinese.json": [74628, 7340], "./friendsui_thai.json": [88902, 9263], "./friendsui_turkish.json": [95797, 5632], "./friendsui_ukrainian.json": [83292, 2822], "./friendsui_vietnamese.json": [39248, 1635], }; function o(e) { if (!n.o(i, e)) return Promise.resolve().then(() => { var t = new Error("Cannot find module '" + e + "'"); throw ((t.code = "MODULE_NOT_FOUND"), t); }); var t = i[e], o = t[0]; return n.e(t[1]).then(() => n.t(o, 19)); } (o.keys = () => Object.keys(i)), (o.id = 3119), (e.exports = o); }, 9014: (e, t, n) => { var i = { "./friendsui_arabic.json": [58480, 6992], "./friendsui_brazilian.json": [33109, 2862], "./friendsui_bulgarian.json": [5242, 8518], "./friendsui_czech.json": [98399, 4448], "./friendsui_danish.json": [34581, 9775], "./friendsui_dutch.json": [27904, 7575], "./friendsui_english.json": [67927, 8247], "./friendsui_finnish.json": [63907, 4596], "./friendsui_french.json": [49877, 3500], "./friendsui_german.json": [90262, 4989], "./friendsui_greek.json": [84583, 1471], "./friendsui_hungarian.json": [85581, 5802], "./friendsui_indonesian.json": [37371, 6646], "./friendsui_italian.json": [31577, 8815], "./friendsui_japanese.json": [86521, 6727], "./friendsui_koreana.json": [73827, 6986], "./friendsui_latam.json": [13236, 7651], "./friendsui_norwegian.json": [19181, 4716], "./friendsui_polish.json": [3751, 699], "./friendsui_portuguese.json": [21520, 4264], "./friendsui_romanian.json": [98235, 3182], "./friendsui_russian.json": [99942, 2913], "./friendsui_sc_schinese.json": [64522, 3140], "./friendsui_schinese.json": [19456, 7706], "./friendsui_spanish.json": [12011, 3471], "./friendsui_swedish.json": [66100, 9818], "./friendsui_tchinese.json": [74628, 7340], "./friendsui_thai.json": [88902, 9263], "./friendsui_turkish.json": [95797, 5632], "./friendsui_ukrainian.json": [83292, 2822], "./friendsui_vietnamese.json": [39248, 1635], }; function o(e) { if (!n.o(i, e)) return Promise.resolve().then(() => { var t = new Error("Cannot find module '" + e + "'"); throw ((t.code = "MODULE_NOT_FOUND"), t); }); var t = i[e], o = t[0]; return n.e(t[1]).then(() => n.t(o, 19)); } (o.keys = () => Object.keys(i)), (o.id = 9014), (e.exports = o); }, 27385: (e) => { e.exports = { "duration-app-launch": "800ms" }; }, 44550: (e) => { e.exports = { "duration-app-launch": "800ms", ChatMessageSteamStore_Failed: "bbcode_ChatMessageSteamStore_Failed_POkia", ChatMessageSteamStore: "bbcode_ChatMessageSteamStore_tdVvE", ChatMessagesSteamStore_FilteredContent: "bbcode_ChatMessagesSteamStore_FilteredContent_3D-qb", TinyContent: "bbcode_TinyContent_2nHeA", ChatMessageSteamStore_HeaderImage: "bbcode_ChatMessageSteamStore_HeaderImage_2TxYr", Blurred: "bbcode_Blurred_1PTbG", SmallContent: "bbcode_SmallContent_1jJqS", MediumContent: "bbcode_MediumContent_qWPvC", ChatMessageSteamStore_GameDetails: "bbcode_ChatMessageSteamStore_GameDetails_2lHQv", ChatMessageSteamStore_MediaContainer: "bbcode_ChatMessageSteamStore_MediaContainer_E2ikP", ChatMessageSteamStore_MainMedia: "bbcode_ChatMessageSteamStore_MainMedia_3N2Lb", senderName: "bbcode_senderName_vnEqe", URLSent: "bbcode_URLSent_3emIc", SteamURL: "bbcode_SteamURL_l55fo", ChatMessageSteamStore_Name: "bbcode_ChatMessageSteamStore_Name_ihXhe", ChatMessageSteamStore_GameNameAndIcon: "bbcode_ChatMessageSteamStore_GameNameAndIcon_4GpSr", ChatMessageSteamStore_Header: "bbcode_ChatMessageSteamStore_Header_2KIJQ", ChatMessageSteamStore_HeaderImageFiltered: "bbcode_ChatMessageSteamStore_HeaderImageFiltered_3mT9j", ChatMessageSteamStore_Description: "bbcode_ChatMessageSteamStore_Description_2-RDz", ChatMessageSteamStore_FilteredDescription: "bbcode_ChatMessageSteamStore_FilteredDescription_2ck_R", ChatMessageSteamStore_GameIcon: "bbcode_ChatMessageSteamStore_GameIcon_1F9xl", ChatMessageSteamStore_Body: "bbcode_ChatMessageSteamStore_Body_2VE1v", ChatMessageSteamStore_DetailsContainer: "bbcode_ChatMessageSteamStore_DetailsContainer_3gcwY", ChatMessageSteamStore_VideoThumbnail: "bbcode_ChatMessageSteamStore_VideoThumbnail_3I1zl", ChatMessageSteamStore_ThumbnailsContainer: "bbcode_ChatMessageSteamStore_ThumbnailsContainer_34Rxn", ChatMessageSteamStore_Screenshot: "bbcode_ChatMessageSteamStore_Screenshot_3qmZW", ChatMessageSteamStore_ScreenshotThumbnail: "bbcode_ChatMessageSteamStore_ScreenshotThumbnail_2dT1V", videoPlaying: "bbcode_videoPlaying_RHKEP", ChatMessageSteamStore_VideoPlayButton: "bbcode_ChatMessageSteamStore_VideoPlayButton_hvkD1", ChatMessageSteamStore_VideoLargeContainer: "bbcode_ChatMessageSteamStore_VideoLargeContainer_1WCdP", ChatMessageSteamStore_VideoLarge: "bbcode_ChatMessageSteamStore_VideoLarge_-Ge8B", ChatMessageSteamStore_Footer: "bbcode_ChatMessageSteamStore_Footer_EuKJj", ChatMessageSteamStore_PricingContainer: "bbcode_ChatMessageSteamStore_PricingContainer_23NxJ", ChatMessageSteamStore_Pricing: "bbcode_ChatMessageSteamStore_Pricing_3qTYl", ChatMessageSteamStore_Pricing_Discount: "bbcode_ChatMessageSteamStore_Pricing_Discount_2u76T", ChatMessageSteamStore_Pricing_FinalContainer: "bbcode_ChatMessageSteamStore_Pricing_FinalContainer_1ZFsy", ChatMessageSteamStore_Pricing_Final: "bbcode_ChatMessageSteamStore_Pricing_Final_1Nn_P", hasDiscount: "bbcode_hasDiscount_t5udJ", ChatMessageSteamStore_Pricing_Initial: "bbcode_ChatMessageSteamStore_Pricing_Initial_2jXsq", ChatMessageSteamStore_ViewStore: "bbcode_ChatMessageSteamStore_ViewStore_2SBI6", ChatMessageSteamStore_Free: "bbcode_ChatMessageSteamStore_Free_rJaoz", ChatMessageSteamStore_CopyURL: "bbcode_ChatMessageSteamStore_CopyURL_FLbi2", ChatMessageTweet: "bbcode_ChatMessageTweet_xuMZ3", ChatMessageTweet_Header: "bbcode_ChatMessageTweet_Header_38ujm", ChatMessageTweet_ProfileImage: "bbcode_ChatMessageTweet_ProfileImage_zx9vf", ChatMessageTweet_NameSection: "bbcode_ChatMessageTweet_NameSection_-lb62", ChatMessageTweet_NameGroup: "bbcode_ChatMessageTweet_NameGroup_pjf4e", ChatMessageTweet_Name: "bbcode_ChatMessageTweet_Name_1lQ98", ChatMessageTweet_Logo: "bbcode_ChatMessageTweet_Logo_3WqG0", ChatMessageTweet_Verified: "bbcode_ChatMessageTweet_Verified_2gPBN", ChatMessageTweet_ScreenName: "bbcode_ChatMessageTweet_ScreenName_3VjS6", ChatMessageTweet_Body: "bbcode_ChatMessageTweet_Body_1RFo5", ChatMessageTweet_Footer: "bbcode_ChatMessageTweet_Footer_35Jlr", ChatMessageTweet_Created: "bbcode_ChatMessageTweet_Created_shGvL", numberCounterContainer: "bbcode_numberCounterContainer_C4Hz0", numberColumn: "bbcode_numberColumn_2enY9", randomNumberLabel: "bbcode_randomNumberLabel_2-fsM", randomActual: "bbcode_randomActual_1EGTO", randomNumberShadow: "bbcode_randomNumberShadow_19_KK", startingZero: "bbcode_startingZero_1kHyX", randomMsg: "bbcode_randomMsg_13nuz", MsgAnimating: "bbcode_MsgAnimating_1yiaq", none: "bbcode_none_3CUw2", randomValues: "bbcode_randomValues_4j8MC", coinLabel: "bbcode_coinLabel_dj-Tq", CoinModel: "bbcode_CoinModel_1YPnK", flipCoinContainer: "bbcode_flipCoinContainer_3piF5", coinFade: "bbcode_coinFade_3vnZn", flipCoinAndResult: "bbcode_flipCoinAndResult_1Cjb-", coin: "bbcode_coin_1NRdX", front: "bbcode_front_M-4A0", back: "bbcode_back_VjaUk", coinFlipBottom: "bbcode_coinFlipBottom_2QVOk", coinFlipTop: "bbcode_coinFlipTop_YyWbD", front_b: "bbcode_front_b_J0ttd", back_b: "bbcode_back_b_2iPGJ", mid: "bbcode_mid_1nWDG", coinFace: "bbcode_coinFace_1abwJ", flipCoinWinningSide: "bbcode_flipCoinWinningSide_1Akyv", flipCoinLosingSide: "bbcode_flipCoinLosingSide_3Bl0q", coinFlip: "bbcode_coinFlip_1Jv6_", resultLabel: "bbcode_resultLabel_1E5Fs", coinFlipResult: "bbcode_coinFlipResult_19V-m", plusOne: "bbcode_plusOne_1QO4I", ImageModalBackground: "bbcode_ImageModalBackground_1feGl", ImageModalContent: "bbcode_ImageModalContent_gDAHS", RoomEffectContainer: "bbcode_RoomEffectContainer_1JKUF", RoomEffectIcon: "bbcode_RoomEffectIcon_3uKYi", randomNumbers: "bbcode_randomNumbers_1n1A9", randomNumbers0: "bbcode_randomNumbers0_3QS0S", randomNumbers1: "bbcode_randomNumbers1_3jFyW", randomNumbers2: "bbcode_randomNumbers2_20O32", randomNumbers3: "bbcode_randomNumbers3_zIVdx", randomNumbers4: "bbcode_randomNumbers4_aYdH6", randomNumbers5: "bbcode_randomNumbers5_jPYa-", randomNumbers6: "bbcode_randomNumbers6_2pW0w", randomNumbers7: "bbcode_randomNumbers7_16G5k", randomNumbers8: "bbcode_randomNumbers8_3gDn5", randomNumbers9: "bbcode_randomNumbers9_1TE63", randomNumbers10: "bbcode_randomNumbers10_2WzZJ", randomNumbersZero: "bbcode_randomNumbersZero_1LaDI", coinSpin: "bbcode_coinSpin_2j-M3", }; }, 64179: (e) => { e.exports = { InviteDropMessage: "invitedrop_InviteDropMessage_2f19f", InviteDropImage: "invitedrop_InviteDropImage_2r81X", InviteDropName: "invitedrop_InviteDropName_3jmXx", InviteDropContainer: "invitedrop_InviteDropContainer_zQt7M", InviteDropBackground: "invitedrop_InviteDropBackground_1JqA8", ChatModalCover: "invitedrop_ChatModalCover_tIAxX", appear: "invitedrop_appear_2qt74", enter: "invitedrop_enter_2uAVr", appearActive: "invitedrop_appearActive_38QQQ", enterActive: "invitedrop_enterActive_22bK-", exit: "invitedrop_exit_1G2Ph", exitActive: "invitedrop_exitActive_ccqOP" }; }, 257: (e) => { e.exports = { PreMessage: "messages_PreMessage_2M4GH", CodeMessage: "messages_CodeMessage_1E4OI", QuoteMessage: "messages_QuoteMessage_3-LVU" }; }, 94207: (e) => { e.exports = { MessageReactions: "reactions_MessageReactions_2AYLk", OpenPickerButton: "reactions_OpenPickerButton_2q3fS", AddReactionIcon: "reactions_AddReactionIcon_ynET7", Plus: "reactions_Plus_1TuQz", MessageReaction: "reactions_MessageReaction_22B6h", EmoticonReaction: "reactions_EmoticonReaction_1NDA4", Large: "reactions_Large_1s0yZ", StickerReaction: "reactions_StickerReaction_2rRhc", ReactionCount: "reactions_ReactionCount_2-mTQ", ReactionHover: "reactions_ReactionHover_12Ox3", HoverDescription: "reactions_HoverDescription_3nUn3", ReactorName: "reactions_ReactorName_1epTJ", ReactionName: "reactions_ReactionName_2bwkm" }; }, 10237: (e) => { e.exports = { "duration-app-launch": "800ms", DialogContent_InnerWidth: "chatroom_DialogContent_InnerWidth_3GRWm", FriendPicker_Focus: "chatroom_FriendPicker_Focus_3qxoN", FriendRequestViewActive: "chatroom_FriendRequestViewActive_1o-7-", VoiceRequested: "chatroom_VoiceRequested_1ocVq", chatRoomGroupHeader: "chatroom_chatRoomGroupHeader_2t--s", YuleLog: "chatroom_YuleLog_2SldD", Watching: "chatroom_Watching_18OiO", VoiceChatQuickChatChannelOption: "chatroom_VoiceChatQuickChatChannelOption_sV-rY", ManageVoiceChannelsModal: "chatroom_ManageVoiceChannelsModal_1e0x4", ManageTextChannelsModal: "chatroom_ManageTextChannelsModal_3XLA3", ManageVoiceChannels: "chatroom_ManageVoiceChannels_ojO_e", AddVoiceChannelBtn: "chatroom_AddVoiceChannelBtn_1t6E6", "ItemFocusAnim-darkerGrey": "chatroom_ItemFocusAnim-darkerGrey_3R7Sv", ChannelStatusLabel: "chatroom_ChannelStatusLabel_3jAZQ", ChatRoomGroupControlsSteamDeck: "chatroom_ChatRoomGroupControlsSteamDeck_imObP", currentUserInVoiceChannel: "chatroom_currentUserInVoiceChannel_2TAg1", HasActiveVoiceRoom: "chatroom_HasActiveVoiceRoom_3leHQ", VoiceChannelCount: "chatroom_VoiceChannelCount_115TN", "ItemFocusAnim-darkGrey": "chatroom_ItemFocusAnim-darkGrey_1a6zU", "ItemFocusAnim-green": "chatroom_ItemFocusAnim-green_w6bcQ", RightAlignedStats: "chatroom_RightAlignedStats_2sB5U", MemberCount: "chatroom_MemberCount_2wtcJ", InGame: "chatroom_InGame_32Voq", Total: "chatroom_Total_2Zymb", TextChannelCount: "chatroom_TextChannelCount_13NBA", ChatRoomGroupControlsFiller: "chatroom_ChatRoomGroupControlsFiller_1Op5Z", UnreadTextChannel: "chatroom_UnreadTextChannel_KiYpf", GroupMemberListDialog: "chatroom_GroupMemberListDialog_45AAE", ChatRoomVoiceInviteDialog: "chatroom_ChatRoomVoiceInviteDialog_3k-p6", FriendSearchInput: "chatroom_FriendSearchInput_2OcL1", InviteLists: "chatroom_InviteLists_29o-F", InviteList: "chatroom_InviteList_3KgQD", BackgroundAnimation: "chatroom_BackgroundAnimation_225-z", "ItemFocusAnim-darkerGrey-nocolor": "chatroom_ItemFocusAnim-darkerGrey-nocolor_2SpA2", "ItemFocusAnim-grey": "chatroom_ItemFocusAnim-grey_3b0vu", "ItemFocusAnim-translucent-white-10": "chatroom_ItemFocusAnim-translucent-white-10_3sQ7j", "ItemFocusAnim-translucent-white-20": "chatroom_ItemFocusAnim-translucent-white-20_j2b41", "ItemFocusAnimBorder-darkGrey": "chatroom_ItemFocusAnimBorder-darkGrey_1gy_j", }; }, 47109: (e) => { e.exports = { ChatRoomContextNoPermission: "chatroommenu_ChatRoomContextNoPermission_w04cA", SVGIcon_Lock: "chatroommenu_SVGIcon_Lock_2GYOl", ChatroomContextMenuDisableableItem: "chatroommenu_ChatroomContextMenuDisableableItem_wxpoI", DisabledDescriptor: "chatroommenu_DisabledDescriptor_l2_77" }; }, 89911: (e) => { e.exports = { "duration-app-launch": "800ms", DialogContent_InnerWidth: "chattabs_DialogContent_InnerWidth_3SFdH", FriendPicker_Focus: "chattabs_FriendPicker_Focus_2TZpS", FriendRequestViewActive: "chattabs_FriendRequestViewActive_cWNMu", VoiceRequested: "chattabs_VoiceRequested_x4Xq_", chatRoomGroupHeader: "chattabs_chatRoomGroupHeader_33pi7", ChatTabTransitionGroup: "chattabs_ChatTabTransitionGroup_1GEzX", ChatTab: "chattabs_ChatTab_2Vrcp", Active: "chattabs_Active_Lrqoj", ChatTabTransition_Enter: "chattabs_ChatTabTransition_Enter_2GwaB", ChatTabTransition_EnterActive: "chattabs_ChatTabTransition_EnterActive_2DmAV", ChatTabTransition_Exit: "chattabs_ChatTabTransition_Exit_2aLc6", TabBounce: "chattabs_TabBounce_2PkSl", ChatTabTransition_ExitActive: "chattabs_ChatTabTransition_ExitActive_pfXry", VoiceStatusMessage: "chattabs_VoiceStatusMessage_2UhLP", VoiceActive: "chattabs_VoiceActive_33vMa", MicMuted: "chattabs_MicMuted_2Sn4b", MicStatus: "chattabs_MicStatus_30H7N", CloseButton: "chattabs_CloseButton_7gMwY", ChatTabRow: "chattabs_ChatTabRow_2TndF", ChatTabContent_Friend: "chattabs_ChatTabContent_Friend_2ZiZ7", IsNotFriendLabel: "chattabs_IsNotFriendLabel_2vv7a", ChatTabContent_ChatRoom: "chattabs_ChatTabContent_ChatRoom_3kJeo", ChatTabContent_ChatRoomName: "chattabs_ChatTabContent_ChatRoomName_1svcL", UnreadGlow: "chattabs_UnreadGlow_3oV47", UnreadCircle: "chattabs_UnreadCircle_52cn_", BackgroundAnimation: "chattabs_BackgroundAnimation_20GyX", "ItemFocusAnim-darkerGrey-nocolor": "chattabs_ItemFocusAnim-darkerGrey-nocolor_wLNQI", "ItemFocusAnim-darkerGrey": "chattabs_ItemFocusAnim-darkerGrey_hzsQQ", "ItemFocusAnim-darkGrey": "chattabs_ItemFocusAnim-darkGrey_1esdt", "ItemFocusAnim-grey": "chattabs_ItemFocusAnim-grey_ry028", "ItemFocusAnim-translucent-white-10": "chattabs_ItemFocusAnim-translucent-white-10_33vsA", "ItemFocusAnim-translucent-white-20": "chattabs_ItemFocusAnim-translucent-white-20_2nvh8", "ItemFocusAnimBorder-darkGrey": "chattabs_ItemFocusAnimBorder-darkGrey_1NFKR", "ItemFocusAnim-green": "chattabs_ItemFocusAnim-green_1-pOQ", }; }, 21658: (e) => { e.exports = { General: "chatroomgroupsettings_General_8XwlG", Avatar: "chatroomgroupsettings_Avatar_2LpXh", AvatarAndUser: "chatroomgroupsettings_AvatarAndUser_24KH7", NoIconLabel: "chatroomgroupsettings_NoIconLabel_2ZLCb", ChannelsButtons: "chatroomgroupsettings_ChannelsButtons_oAUPW", Notification: "chatroomgroupsettings_Notification_3uem_", LeaveButton: "chatroomgroupsettings_LeaveButton_2qL15", PermissionsEdit: "chatroomgroupsettings_PermissionsEdit_18be2", Back: "chatroomgroupsettings_Back_15FJA", PermissionsGroup: "chatroomgroupsettings_PermissionsGroup_3-iw_", PermissionToggle: "chatroomgroupsettings_PermissionToggle_55say", PermissionsDescription: "chatroomgroupsettings_PermissionsDescription_3volV", RoleNameHeader: "chatroomgroupsettings_RoleNameHeader_33Yxs", FixedRoleName: "chatroomgroupsettings_FixedRoleName_2aLHy" }; }, 65040: (e) => { e.exports = { scrollMaskVertical: "chatroomnotificationsettings_scrollMaskVertical_3tyz6" }; }, 98865: (e) => { e.exports = { DialogTitle: "dialogs_DialogTitle_2dqzN", DialogContent: "dialogs_DialogContent_3yd-p" }; }, 51630: (e) => { e.exports = { "duration-app-launch": "800ms", DialogContent_InnerWidth: "pagedcontent_DialogContent_InnerWidth_3bR0Z", FriendPicker_Focus: "pagedcontent_FriendPicker_Focus_1SF7f", FriendRequestViewActive: "pagedcontent_FriendRequestViewActive_3R0N_", VoiceRequested: "pagedcontent_VoiceRequested_1DtjQ", chatRoomGroupHeader: "pagedcontent_chatRoomGroupHeader_7oNG5", Container: "pagedcontent_Container_3-t6T", Nav: "pagedcontent_Nav_1Vqsn", NavTitle: "pagedcontent_NavTitle_tK0Cu", NavItems: "pagedcontent_NavItems_1ce4K", NavItem: "pagedcontent_NavItem_-GYTF", Active: "pagedcontent_Active_36pPi", Content: "pagedcontent_Content_2mJpA", BackgroundAnimation: "pagedcontent_BackgroundAnimation_1XVbj", "ItemFocusAnim-darkerGrey-nocolor": "pagedcontent_ItemFocusAnim-darkerGrey-nocolor_1vMKF", "ItemFocusAnim-darkerGrey": "pagedcontent_ItemFocusAnim-darkerGrey_2g_AN", "ItemFocusAnim-darkGrey": "pagedcontent_ItemFocusAnim-darkGrey_1c2HK", "ItemFocusAnim-grey": "pagedcontent_ItemFocusAnim-grey_2BLVS", "ItemFocusAnim-translucent-white-10": "pagedcontent_ItemFocusAnim-translucent-white-10_3TnSz", "ItemFocusAnim-translucent-white-20": "pagedcontent_ItemFocusAnim-translucent-white-20_1C2QC", "ItemFocusAnimBorder-darkGrey": "pagedcontent_ItemFocusAnimBorder-darkGrey_OpVxu", "ItemFocusAnim-green": "pagedcontent_ItemFocusAnim-green_fceUL", }; }, 36226: (e) => { e.exports = { "duration-app-launch": "800ms", PanelSection: "remoteplay_PanelSection_3CTSQ", PanelSectionTitle: "remoteplay_PanelSectionTitle_2y3UQ", Text: "remoteplay_Text__u55r", PanelSectionRow: "remoteplay_PanelSectionRow_rC25a", Label: "remoteplay_Label_UfIGB", ComingSoon: "remoteplay_ComingSoon_2MGRk", QuickAccessNotifications: "remoteplay_QuickAccessNotifications_3EHGW", VR: "remoteplay_VR_3zGD_", EmptyNotifications: "remoteplay_EmptyNotifications_2H2il", LowBattery: "remoteplay_LowBattery_2byQS", ReallyLow: "remoteplay_ReallyLow_3CHEe", LowBatteryGauge: "remoteplay_LowBatteryGauge_1UMUg", Remaining: "remoteplay_Remaining_lttQ8", BatterySectionContainer: "remoteplay_BatterySectionContainer_1Dlgs", BatteryIcon: "remoteplay_BatteryIcon_3XW55", BatteryPercentageLabel: "remoteplay_BatteryPercentageLabel_1SDW_", BatteryDetailsLabels: "remoteplay_BatteryDetailsLabels_2pdWI", BatteryProjectedValue: "remoteplay_BatteryProjectedValue_30ZTF", BatteryProjectedLabel: "remoteplay_BatteryProjectedLabel_1bS5R", ContentForm: "remoteplay_ContentForm_3yIT_", ContentBox: "remoteplay_ContentBox_3g04Q", Interactable: "remoteplay_Interactable_2_OjI", DialogHeader: "remoteplay_DialogHeader_1omLn", StreamPausedNote: "remoteplay_StreamPausedNote_1yY7B", HeaderActions: "remoteplay_HeaderActions_IZNod", GameInfo: "remoteplay_GameInfo_1Wexk", GameName: "remoteplay_GameName_3tbCv", GameIcon: "remoteplay_GameIcon_1xj5E", HeaderActionsButtons: "remoteplay_HeaderActionsButtons_3VsHt", MediaBox: "remoteplay_MediaBox_UAdii", Media: "remoteplay_Media_1b-b-", Content: "remoteplay_Content_7-0ht", Top: "remoteplay_Top_2e2Pp", DesktopButtons: "remoteplay_DesktopButtons_2dyAi", Bottom: "remoteplay_Bottom_2sHQp", Section: "remoteplay_Section_1gsof", SectionItemMargin: "remoteplay_SectionItemMargin_14zCU", SectionTitle: "remoteplay_SectionTitle_2w_yp", GameSettingsBox: "remoteplay_GameSettingsBox_3CJFr", ControllerDropSlotsContainer: "remoteplay_ControllerDropSlotsContainer_EIvpa", ControllerDropSlots: "remoteplay_ControllerDropSlots_1BzWI", HowToHint: "remoteplay_HowToHint_3tZOj", ControllerDropSlot: "remoteplay_ControllerDropSlot_14PL3", WithMargin: "remoteplay_WithMargin_3SadY", Controller: "remoteplay_Controller_1Kwg5", SlotFilled: "remoteplay_SlotFilled_xQywn", DragHovered: "remoteplay_DragHovered_Md8vG", DropSlotNumber: "remoteplay_DropSlotNumber_16UQH", QuickAccessControllerOrderSlot: "remoteplay_QuickAccessControllerOrderSlot_bA_5P", DropSlotBackgroundPulse: "remoteplay_DropSlotBackgroundPulse_FQlQN", ControllerClearDropSlot: "remoteplay_ControllerClearDropSlot_23QlC", ClearDropSlotIcon: "remoteplay_ClearDropSlotIcon_3q7Qx", DropSlotClearFillPulse: "remoteplay_DropSlotClearFillPulse_GQKQT", MediaButton: "remoteplay_MediaButton_2a9L1", ButtonContent: "remoteplay_ButtonContent_1HCRV", RecentlyInteracted: "remoteplay_RecentlyInteracted_2TDHR", MediaButtonLabel: "remoteplay_MediaButtonLabel_1a0qK", MediaImage: "remoteplay_MediaImage_3TsrF", PersonaName: "remoteplay_PersonaName_11FQa", PersonaNameName: "remoteplay_PersonaNameName_1vbfY", PersonaAvatar: "remoteplay_PersonaAvatar_1sgR5", PlayerControlsContainer: "remoteplay_PlayerControlsContainer_1MLzR", PlayerControls: "remoteplay_PlayerControls_3IoOu", QuickAccessPlayerControlsContainer: "remoteplay_QuickAccessPlayerControlsContainer_RNCoe", PlayerControl: "remoteplay_PlayerControl_1SN8P", NoInputWarning: "remoteplay_NoInputWarning_1hPkC", WarningIcon: "remoteplay_WarningIcon_1fiUw", ControlEnabled: "remoteplay_ControlEnabled_XdDQO", QuickAccess: "remoteplay_QuickAccess_2UJXH", ControlDisabled: "remoteplay_ControlDisabled_306vA", InteractableControl: "remoteplay_InteractableControl_1qor0", SliderControlContainer: "remoteplay_SliderControlContainer_1RJcX", SliderIconContainer: "remoteplay_SliderIconContainer_2XRDA", SliderContainer: "remoteplay_SliderContainer_1Ppzh", SliderIcon: "remoteplay_SliderIcon_1Ygk7", Disabled: "remoteplay_Disabled_wH_Ax", Slider: "remoteplay_Slider_3fHEV", MediaBoxTitle: "remoteplay_MediaBoxTitle_3WR0p", TitleText: "remoteplay_TitleText_H4M1y", TitleStatusDivider: "remoteplay_TitleStatusDivider_1b2Fy", TitleStatus: "remoteplay_TitleStatus_1UC1a", InvitedGuestBox: "remoteplay_InvitedGuestBox_st7xQ", LinkContainer: "remoteplay_LinkContainer_2Ojy0", GuestTitle: "remoteplay_GuestTitle_1ysXO", PlayerController: "remoteplay_PlayerController_14Xjj", PlayerControllerNumber: "remoteplay_PlayerControllerNumber_3dA2r", Hidden: "remoteplay_Hidden_MlU_V", PlayerControllerIcon: "remoteplay_PlayerControllerIcon_2kild", Enabled: "remoteplay_Enabled_2T1ZK", InteractableController: "remoteplay_InteractableController_k4Tnw", Grabbable: "remoteplay_Grabbable_1vagK", QuickAccessPlayerController: "remoteplay_QuickAccessPlayerController_wHOHE", BoxButton: "remoteplay_BoxButton_hewCY", Light: "remoteplay_Light_3QXQR", Dark: "remoteplay_Dark_31ktR", MicFillOverride: "remoteplay_MicFillOverride_3PcsE", ClientQualityContainer: "remoteplay_ClientQualityContainer_2lHmz", CanGrab: "remoteplay_CanGrab_3XVXb", Wiggle: "remoteplay_Wiggle_2D6_l", HeaderBitrate: "remoteplay_HeaderBitrate_2tJ0L", PlayerBitRate: "remoteplay_PlayerBitRate_3ILbI", BitRateQuality_1: "remoteplay_BitRateQuality_1_253Jl", BitRateQuality_2: "remoteplay_BitRateQuality_2_1kGJj", BitRateQuality_3: "remoteplay_BitRateQuality_3_1eQXB", BitRateQuality_4: "remoteplay_BitRateQuality_4_215zU", IconMobile: "remoteplay_IconMobile_2371n", Row: "remoteplay_Row_1Z52v", HeaderButton: "remoteplay_HeaderButton_2IHDm", NoMarginTop: "remoteplay_NoMarginTop_1qAhG", QuickAccessContainer: "remoteplay_QuickAccessContainer_3Moue", QuickAccessTitle: "remoteplay_QuickAccessTitle_2dcwM", QuickAccessScrollPanel: "remoteplay_QuickAccessScrollPanel_1kWfg", QuickAccessMediaBoxTitleRow: "remoteplay_QuickAccessMediaBoxTitleRow_2ouij", Wrap: "remoteplay_Wrap_1M_Cq", QuickAccessMediaBoxTitle: "remoteplay_QuickAccessMediaBoxTitle_doZeh", QuickAccessIconContainer: "remoteplay_QuickAccessIconContainer_bVyVi", QuickAccessMediaBoxChildrenContainer: "remoteplay_QuickAccessMediaBoxChildrenContainer_2NyJr", QuickAccessStatusText: "remoteplay_QuickAccessStatusText_1EJYY", QuickAccessConnectURL: "remoteplay_QuickAccessConnectURL_H2sUm", QuickAccessClipboardStatus: "remoteplay_QuickAccessClipboardStatus_2rioh", QuickAccessControlIcon: "remoteplay_QuickAccessControlIcon_Ll-uN", Mouse: "remoteplay_Mouse_3lhsI", Keyboard: "remoteplay_Keyboard_2kge0", QuickAccessControllerOrderContainer: "remoteplay_QuickAccessControllerOrderContainer_2xZxy", Divider: "remoteplay_Divider_1D4hg", ReorderLabelName: "remoteplay_ReorderLabelName_3ZavZ", ReorderLabelPersonaAvatar: "remoteplay_ReorderLabelPersonaAvatar_-dtG_", InviteFriendGuestButtons: "remoteplay_InviteFriendGuestButtons_XVDsC", InlineInviteButton: "remoteplay_InlineInviteButton_2WLe2", MediaBoxBody: "remoteplay_MediaBoxBody_322vo", Footer: "remoteplay_Footer_2l7VY", BackgroundAnimation: "remoteplay_BackgroundAnimation_2Uu7J", "ItemFocusAnim-darkerGrey-nocolor": "remoteplay_ItemFocusAnim-darkerGrey-nocolor_PvXtR", "ItemFocusAnim-darkerGrey": "remoteplay_ItemFocusAnim-darkerGrey_2B8-4", "ItemFocusAnim-darkGrey": "remoteplay_ItemFocusAnim-darkGrey_3ybDj", "ItemFocusAnim-grey": "remoteplay_ItemFocusAnim-grey_1C6kb", "ItemFocusAnim-translucent-white-10": "remoteplay_ItemFocusAnim-translucent-white-10_260b3", "ItemFocusAnim-translucent-white-20": "remoteplay_ItemFocusAnim-translucent-white-20_3OEDn", "ItemFocusAnimBorder-darkGrey": "remoteplay_ItemFocusAnimBorder-darkGrey_1SP1k", "ItemFocusAnim-green": "remoteplay_ItemFocusAnim-green_3xx9X", focusAnimation: "remoteplay_focusAnimation_-2njw", hoverAnimation: "remoteplay_hoverAnimation_jPA3E", }; }, 43965: (e) => { e.exports = { RecommendedNote: "voicesettings_RecommendedNote_iZ7Ud", TransmissionTypeSettings: "voicesettings_TransmissionTypeSettings_2lDZA", HotkeySettingRow: "voicesettings_HotkeySettingRow_2TALW", HotkeyButton: "voicesettings_HotkeyButton_1Lz3_", Capturing: "voicesettings_Capturing_ANwfj", WalkDashedOutline: "voicesettings_WalkDashedOutline_37_j8", HotkeyClearButton: "voicesettings_HotkeyClearButton_CRx3r", HotkeySettingDescription: "voicesettings_HotkeySettingDescription_1WaGV", VoiceSettings: "voicesettings_VoiceSettings_W4WXV", AdvancedSettingsButton: "voicesettings_AdvancedSettingsButton_1e8R9", ToggleRow: "voicesettings_ToggleRow_2u4ju" }; }, 33613: (e) => { e.exports = { "duration-app-launch": "800ms", DialogContent_InnerWidth: "friendinvites_DialogContent_InnerWidth_1y6SQ", FriendPicker_Focus: "friendinvites_FriendPicker_Focus_1XujO", FriendRequestViewActive: "friendinvites_FriendRequestViewActive_3EsTu", VoiceRequested: "friendinvites_VoiceRequested_1QzU9", chatRoomGroupHeader: "friendinvites_chatRoomGroupHeader_3F_La", InvitesList: "friendinvites_InvitesList_3i8Fo", IncomingInvites: "friendinvites_IncomingInvites_3Usmq", OutgoingInvites: "friendinvites_OutgoingInvites_exhhf", InvitesSectionHeader: "friendinvites_InvitesSectionHeader_3B_sJ", Text: "friendinvites_Text_45XAJ", InvitesRow: "friendinvites_InvitesRow_35_aF", InvitesFriend: "friendinvites_InvitesFriend_HtZ4l", MutualFriendRow: "friendinvites_MutualFriendRow_3ajxC", TopSection: "friendinvites_TopSection_2uvvl", AddFriendSection: "friendinvites_AddFriendSection_3BjIx", InputForm: "friendinvites_InputForm_36n9v", Input: "friendinvites_Input_OgGFI", SubmitButton: "friendinvites_SubmitButton_3H1Wq", Title: "friendinvites_Title_1ZEdD", Description: "friendinvites_Description_KI_gF", FriendCodeSection: "friendinvites_FriendCodeSection_39nte", FriendCode: "friendinvites_FriendCode_27408", Code: "friendinvites_Code_1-bTQ", Caption: "friendinvites_Caption__XK9j", Divider: "friendinvites_Divider_3Jqss", BackgroundAnimation: "friendinvites_BackgroundAnimation_3ZMc5", "ItemFocusAnim-darkerGrey-nocolor": "friendinvites_ItemFocusAnim-darkerGrey-nocolor_1OURP", "ItemFocusAnim-darkerGrey": "friendinvites_ItemFocusAnim-darkerGrey_1Fi1a", "ItemFocusAnim-darkGrey": "friendinvites_ItemFocusAnim-darkGrey_wQRdQ", "ItemFocusAnim-grey": "friendinvites_ItemFocusAnim-grey_51gAo", "ItemFocusAnim-translucent-white-10": "friendinvites_ItemFocusAnim-translucent-white-10_2JKoK", "ItemFocusAnim-translucent-white-20": "friendinvites_ItemFocusAnim-translucent-white-20_2oq2Q", "ItemFocusAnimBorder-darkGrey": "friendinvites_ItemFocusAnimBorder-darkGrey_WAjoc", "ItemFocusAnim-green": "friendinvites_ItemFocusAnim-green_Dm1Of", }; }, 94357: (e) => { e.exports = { "duration-app-launch": "800ms", DialogContent_InnerWidth: "friendslist_DialogContent_InnerWidth_21fxW", FriendPicker_Focus: "friendslist_FriendPicker_Focus_2E-wE", FriendRequestViewActive: "friendslist_FriendRequestViewActive_3JB6m", VoiceRequested: "friendslist_VoiceRequested_1_H_d", chatRoomGroupHeader: "friendslist_chatRoomGroupHeader_33QGT", RemotePlayInviteLinkSection: "friendslist_RemotePlayInviteLinkSection_3J8nN", LinkRow: "friendslist_LinkRow_3rRyF", LinkRowText: "friendslist_LinkRowText_25cZw", LinkRowIconContainer: "friendslist_LinkRowIconContainer_psSBf", LinkRowIcon: "friendslist_LinkRowIcon_1aGTk", LinkExplanation: "friendslist_LinkExplanation_-1XpC", ExplanationText: "friendslist_ExplanationText_1Qb3G", Strong: "friendslist_Strong_23ygL", GotItButton: "friendslist_GotItButton_2Pup6", AccentChevron: "friendslist_AccentChevron_1m0a1", TabBumper: "friendslist_TabBumper_3Jr0A", RecentChatIcon: "friendslist_RecentChatIcon_2mQc_", UnreadAlert: "friendslist_UnreadAlert_1RSzq", NotificationUnreadMention: "friendslist_NotificationUnreadMention_pSwCC", LastMessage: "friendslist_LastMessage_3HNwU", OfflineContainer: "friendslist_OfflineContainer_J8oP5", OfflineMessage: "friendslist_OfflineMessage_2aYfi", summaryText: "friendslist_summaryText_A_QAo", detailText: "friendslist_detailText_37w_J", retryButton: "friendslist_retryButton_1NI2e", BackgroundAnimation: "friendslist_BackgroundAnimation_1-Raw", "ItemFocusAnim-darkerGrey-nocolor": "friendslist_ItemFocusAnim-darkerGrey-nocolor_3BGg0", "ItemFocusAnim-darkerGrey": "friendslist_ItemFocusAnim-darkerGrey_3FD_T", "ItemFocusAnim-darkGrey": "friendslist_ItemFocusAnim-darkGrey_i0vR_", "ItemFocusAnim-grey": "friendslist_ItemFocusAnim-grey_m46wK", "ItemFocusAnim-translucent-white-10": "friendslist_ItemFocusAnim-translucent-white-10_118kp", "ItemFocusAnim-translucent-white-20": "friendslist_ItemFocusAnim-translucent-white-20_9L9Wc", "ItemFocusAnimBorder-darkGrey": "friendslist_ItemFocusAnimBorder-darkGrey_I4Me_", "ItemFocusAnim-green": "friendslist_ItemFocusAnim-green_2Ox84", }; }, 20850: (e) => { e.exports = { "duration-app-launch": "800ms", DialogContent_InnerWidth: "quickaccessvoicecontrolssteamdeck_DialogContent_InnerWidth_HlXy1", FriendPicker_Focus: "quickaccessvoicecontrolssteamdeck_FriendPicker_Focus_120ia", FriendRequestViewActive: "quickaccessvoicecontrolssteamdeck_FriendRequestViewActive_3Uu-6", VoiceRequested: "quickaccessvoicecontrolssteamdeck_VoiceRequested_RXOEA", chatRoomGroupHeader: "quickaccessvoicecontrolssteamdeck_chatRoomGroupHeader_3TQLb", Title: "quickaccessvoicecontrolssteamdeck_Title_8BFsa", PendingVoiceChats: "quickaccessvoicecontrolssteamdeck_PendingVoiceChats_3WFt2", PendingVoiceChatsList: "quickaccessvoicecontrolssteamdeck_PendingVoiceChatsList_kGZyg", PendingVoiceChatRequest: "quickaccessvoicecontrolssteamdeck_PendingVoiceChatRequest_1qta3", VoiceChatList: "quickaccessvoicecontrolssteamdeck_VoiceChatList_3Ri6R", FriendVoiceChatSliderContainer: "quickaccessvoicecontrolssteamdeck_FriendVoiceChatSliderContainer_ucY0N", SliderPadding: "quickaccessvoicecontrolssteamdeck_SliderPadding_1xn70", FriendVoiceChatContainer: "quickaccessvoicecontrolssteamdeck_FriendVoiceChatContainer_303Rc", FriendVoiceChat: "quickaccessvoicecontrolssteamdeck_FriendVoiceChat_2djlw", "ItemFocusAnim-darkerGrey": "quickaccessvoicecontrolssteamdeck_ItemFocusAnim-darkerGrey_3xI7Y", GroupVoiceChatContainer: "quickaccessvoicecontrolssteamdeck_GroupVoiceChatContainer_3rgaD", GroupContainer: "quickaccessvoicecontrolssteamdeck_GroupContainer_2x4Fd", GroupTitle: "quickaccessvoicecontrolssteamdeck_GroupTitle_3uwZc", LeaveVoiceChat: "quickaccessvoicecontrolssteamdeck_LeaveVoiceChat_1DSas", GroupRoomContainer: "quickaccessvoicecontrolssteamdeck_GroupRoomContainer_2MbsP", ActiveVoiceRoom: "quickaccessvoicecontrolssteamdeck_ActiveVoiceRoom_xHmjh", UserInRoom: "quickaccessvoicecontrolssteamdeck_UserInRoom_1hpKh", RoomHeader: "quickaccessvoicecontrolssteamdeck_RoomHeader_1lbdO", RoomTitle: "quickaccessvoicecontrolssteamdeck_RoomTitle_1H-_S", GroupVoiceChatFriend: "quickaccessvoicecontrolssteamdeck_GroupVoiceChatFriend_jSCjW", MicMutedLocally: "quickaccessvoicecontrolssteamdeck_MicMutedLocally_KMowQ", OutputMutedRemotely: "quickaccessvoicecontrolssteamdeck_OutputMutedRemotely_32Kh-", MicMutedRemotely: "quickaccessvoicecontrolssteamdeck_MicMutedRemotely_3gMw6", BackgroundAnimation: "quickaccessvoicecontrolssteamdeck_BackgroundAnimation_23GbG", "ItemFocusAnim-darkerGrey-nocolor": "quickaccessvoicecontrolssteamdeck_ItemFocusAnim-darkerGrey-nocolor_1xyIi", "ItemFocusAnim-darkGrey": "quickaccessvoicecontrolssteamdeck_ItemFocusAnim-darkGrey_2GqB7", "ItemFocusAnim-grey": "quickaccessvoicecontrolssteamdeck_ItemFocusAnim-grey_2bTxY", "ItemFocusAnim-translucent-white-10": "quickaccessvoicecontrolssteamdeck_ItemFocusAnim-translucent-white-10_2jM4E", "ItemFocusAnim-translucent-white-20": "quickaccessvoicecontrolssteamdeck_ItemFocusAnim-translucent-white-20_O-onA", "ItemFocusAnimBorder-darkGrey": "quickaccessvoicecontrolssteamdeck_ItemFocusAnimBorder-darkGrey_OGL0h", "ItemFocusAnim-green": "quickaccessvoicecontrolssteamdeck_ItemFocusAnim-green_RX24G", }; }, 6708: (e) => { e.exports = { "duration-app-launch": "800ms", DialogContent_InnerWidth: "recentchatssteamdeck_DialogContent_InnerWidth_7aHI_", FriendPicker_Focus: "recentchatssteamdeck_FriendPicker_Focus_2dn20", FriendRequestViewActive: "recentchatssteamdeck_FriendRequestViewActive_1Rudc", VoiceRequested: "recentchatssteamdeck_VoiceRequested_TymZy", chatRoomGroupHeader: "recentchatssteamdeck_chatRoomGroupHeader_3GxlH", RecentChatsList: "recentchatssteamdeck_RecentChatsList_2-4f0", RecentChatElement: "recentchatssteamdeck_RecentChatElement_1-Coz", "ItemFocusAnim-darkerGrey": "recentchatssteamdeck_ItemFocusAnim-darkerGrey_-5J2j", "ItemFocusAnim-darkGrey": "recentchatssteamdeck_ItemFocusAnim-darkGrey_1pEXV", UnreadCount: "recentchatssteamdeck_UnreadCount_LTCvn", Time: "recentchatssteamdeck_Time_20ewu", BackgroundAnimation: "recentchatssteamdeck_BackgroundAnimation_v87rF", "ItemFocusAnim-darkerGrey-nocolor": "recentchatssteamdeck_ItemFocusAnim-darkerGrey-nocolor_1W_MK", "ItemFocusAnim-grey": "recentchatssteamdeck_ItemFocusAnim-grey_35kWn", "ItemFocusAnim-translucent-white-10": "recentchatssteamdeck_ItemFocusAnim-translucent-white-10_odmKL", "ItemFocusAnim-translucent-white-20": "recentchatssteamdeck_ItemFocusAnim-translucent-white-20_smtou", "ItemFocusAnimBorder-darkGrey": "recentchatssteamdeck_ItemFocusAnimBorder-darkGrey_8pVLM", "ItemFocusAnim-green": "recentchatssteamdeck_ItemFocusAnim-green_ENPFC", }; }, 62210: (e) => { e.exports = { "duration-app-launch": "800ms", DialogContent_InnerWidth: "main_DialogContent_InnerWidth_3NSzY", FriendPicker_Focus: "main_FriendPicker_Focus_1VEHr", FriendRequestViewActive: "main_FriendRequestViewActive_2m8dd", VoiceRequested: "main_VoiceRequested_1Us1G", chatRoomGroupHeader: "main_chatRoomGroupHeader_2kpIH", throbberContainer: "main_throbberContainer_2gRz4", throbberContainerSteamDeckFriendsQuickAccess: "main_throbberContainerSteamDeckFriendsQuickAccess_oq071", throbberContainerSteamDeckFriends: "main_throbberContainerSteamDeckFriends_28sB2", "throbberContainer-exit-active": "main_throbberContainer-exit-active_2z9OY", SteamPageHeader: "main_SteamPageHeader_3NLSM", SteamPageHeaderShortLogo: "main_SteamPageHeaderShortLogo_lWgFM", LogoGlobal: "main_LogoGlobal_3A7qr", LogoChina: "main_LogoChina_iYyr7", SteamPageHeaderTopLink: "main_SteamPageHeaderTopLink_2mGrI", BackgroundAnimation: "main_BackgroundAnimation_3-MCu", "ItemFocusAnim-darkerGrey-nocolor": "main_ItemFocusAnim-darkerGrey-nocolor_3plWN", "ItemFocusAnim-darkerGrey": "main_ItemFocusAnim-darkerGrey_BqEst", "ItemFocusAnim-darkGrey": "main_ItemFocusAnim-darkGrey_3khNe", "ItemFocusAnim-grey": "main_ItemFocusAnim-grey_9rnEz", "ItemFocusAnim-translucent-white-10": "main_ItemFocusAnim-translucent-white-10_38cxd", "ItemFocusAnim-translucent-white-20": "main_ItemFocusAnim-translucent-white-20_1KpqF", "ItemFocusAnimBorder-darkGrey": "main_ItemFocusAnimBorder-darkGrey_4BFNo", "ItemFocusAnim-green": "main_ItemFocusAnim-green_1mHZe", }; }, 22982: (e) => { e.exports = { "duration-app-launch": "800ms", SpeakerName_InGame: "messages_SpeakerName_InGame_3xyn_", SpeakerName_WatchingBroadcast: "messages_SpeakerName_WatchingBroadcast_42oIW", SpeakerName_Online: "messages_SpeakerName_Online_7B6M2", SpeakerName_Default: "messages_SpeakerName_Default_2NMuV", MsgWithAddons: "messages_MsgWithAddons_32Uri", Addons: "messages_Addons_1pGgX", Emoticon: "messages_Emoticon_3uwQM", Open: "messages_Open_3GQR8" }; }, 58118: (e) => { e.exports = { "duration-app-launch": "800ms", DialogContent_InnerWidth: "unreadchatmessagesheadersteamdeck_DialogContent_InnerWidth_hbNOn", FriendPicker_Focus: "unreadchatmessagesheadersteamdeck_FriendPicker_Focus_3_Emp", FriendRequestViewActive: "unreadchatmessagesheadersteamdeck_FriendRequestViewActive_2mE7I", VoiceRequested: "unreadchatmessagesheadersteamdeck_VoiceRequested_1FUOI", chatRoomGroupHeader: "unreadchatmessagesheadersteamdeck_chatRoomGroupHeader_cZggu", NotificationUnreadMentionContainer: "unreadchatmessagesheadersteamdeck_NotificationUnreadMentionContainer_jWNCx", HasMessages: "unreadchatmessagesheadersteamdeck_HasMessages_3Xg0H", Header_NotificationUnreadMention: "unreadchatmessagesheadersteamdeck_Header_NotificationUnreadMention_16uUR", BackgroundAnimation: "unreadchatmessagesheadersteamdeck_BackgroundAnimation_1Hj25", "ItemFocusAnim-darkerGrey-nocolor": "unreadchatmessagesheadersteamdeck_ItemFocusAnim-darkerGrey-nocolor_1drG4", "ItemFocusAnim-darkerGrey": "unreadchatmessagesheadersteamdeck_ItemFocusAnim-darkerGrey_3dXBv", "ItemFocusAnim-darkGrey": "unreadchatmessagesheadersteamdeck_ItemFocusAnim-darkGrey_3vJLM", "ItemFocusAnim-grey": "unreadchatmessagesheadersteamdeck_ItemFocusAnim-grey_1-Lro", "ItemFocusAnim-translucent-white-10": "unreadchatmessagesheadersteamdeck_ItemFocusAnim-translucent-white-10_3yWy7", "ItemFocusAnim-translucent-white-20": "unreadchatmessagesheadersteamdeck_ItemFocusAnim-translucent-white-20_3Z08b", "ItemFocusAnimBorder-darkGrey": "unreadchatmessagesheadersteamdeck_ItemFocusAnimBorder-darkGrey_1gM3D", "ItemFocusAnim-green": "unreadchatmessagesheadersteamdeck_ItemFocusAnim-green_3Pxdu", }; }, 43825: (e) => { e.exports = { "duration-app-launch": "800ms", "vrgamepadui-floating-side-panel-width": "300px", "vrgamepadui-floating-side-panel-height": "600px", "vrgamepadui-floating-bar-popup-panel-width": "300px", "vrgamepadui-floating-bar-popup-panel-height": "600px", "vrgamepadui-floating-keyboard-width": "854px", "vrgamepadui-floating-keyboard-height": "279px", DialogContent_InnerWidth: "voicechatheadersteamdeck_DialogContent_InnerWidth_30h2e", FriendPicker_Focus: "voicechatheadersteamdeck_FriendPicker_Focus_Lv2z8", FriendRequestViewActive: "voicechatheadersteamdeck_FriendRequestViewActive_2cb6v", VoiceRequested: "voicechatheadersteamdeck_VoiceRequested_2S7KP", chatRoomGroupHeader: "voicechatheadersteamdeck_chatRoomGroupHeader_-AK_a", PopupBody: "voicechatheadersteamdeck_PopupBody_1s0kV", VoiceChatHeader: "voicechatheadersteamdeck_VoiceChatHeader_18snG", ActiveCall: "voicechatheadersteamdeck_ActiveCall_1ln1Q", VoiceChatStatusBackground: "voicechatheadersteamdeck_VoiceChatStatusBackground_1zp0Z", IncomingCall: "voicechatheadersteamdeck_IncomingCall_3Wjn7", GroupVoice: "voicechatheadersteamdeck_GroupVoice_2f6GG", FriendVoice: "voicechatheadersteamdeck_FriendVoice_13yPS", BackgroundAnimation: "voicechatheadersteamdeck_BackgroundAnimation_3E1yZ", "ItemFocusAnim-darkerGrey-nocolor": "voicechatheadersteamdeck_ItemFocusAnim-darkerGrey-nocolor_jyLlf", "ItemFocusAnim-darkerGrey": "voicechatheadersteamdeck_ItemFocusAnim-darkerGrey_2CPyB", "ItemFocusAnim-darkGrey": "voicechatheadersteamdeck_ItemFocusAnim-darkGrey_HsK6E", "ItemFocusAnim-grey": "voicechatheadersteamdeck_ItemFocusAnim-grey_2plaQ", "ItemFocusAnim-translucent-white-10": "voicechatheadersteamdeck_ItemFocusAnim-translucent-white-10_2f5VL", "ItemFocusAnim-translucent-white-20": "voicechatheadersteamdeck_ItemFocusAnim-translucent-white-20_AoFA7", "ItemFocusAnimBorder-darkGrey": "voicechatheadersteamdeck_ItemFocusAnimBorder-darkGrey_lrn8I", "ItemFocusAnim-green": "voicechatheadersteamdeck_ItemFocusAnim-green_2Gaqx", }; }, 57428: (e) => { e.exports = { Bold: "bbcodes_Bold_Whyj8", Italic: "bbcodes_Italic_3sfhE", Paragraph: "bbcodes_Paragraph_KPN-t", Header1: "bbcodes_Header1_2SIyP", Header2: "bbcodes_Header2_38_5M", Header3: "bbcodes_Header3_2QwSx", Header4: "bbcodes_Header4_qpkV7", Header5: "bbcodes_Header5_2_91m", CenterSpan: "bbcodes_CenterSpan_23ZsN", SmallText: "bbcodes_SmallText_I5szu", Underline: "bbcodes_Underline_2vtht", Strike: "bbcodes_Strike_1f7F7", Spoiler: "bbcodes_Spoiler_3JtzY", Revealed: "bbcodes_Revealed_34mzj", SpoilerText: "bbcodes_SpoilerText_3j-5-", DisabledMouseEvents: "bbcodes_DisabledMouseEvents_2-fAv", BlockQuote: "bbcodes_BlockQuote_3yBUp", QuoteAuthor: "bbcodes_QuoteAuthor_1VjBB", PullQuote: "bbcodes_PullQuote_11kxj", Code: "bbcodes_Code_3R99i", CodeBlock: "bbcodes_CodeBlock_3hI9g", List: "bbcodes_List_2YF79", OrderedList: "bbcodes_OrderedList_1DQ9h", ListItem: "bbcodes_ListItem_3FrNm", HR: "bbcodes_HR_3M2PS", Table: "bbcodes_Table_1iK3C", NoBorder: "bbcodes_NoBorder_3Gpas", TableRow: "bbcodes_TableRow_qVi0G", TableData: "bbcodes_TableData_1vHUl", TableHeader: "bbcodes_TableHeader_3rbaO", EqualCells: "bbcodes_EqualCells_2_DPN", ExpandSectionBlock: "bbcodes_ExpandSectionBlock_2UXXq", ExpandSectionHeader: "bbcodes_ExpandSectionHeader_3d8DX", EmbedArrow: "bbcodes_EmbedArrow_PDL62", ExpandSectionBody: "bbcodes_ExpandSectionBody_2U2l0", ExpandSection_WithTitle: "bbcodes_ExpandSection_WithTitle_HXzMO", LinkButton: "bbcodes_LinkButton_jPpgc", Image: "bbcodes_Image_38ivO", }; }, 20698: (e) => { e.exports = { BroadcastChat: "broadcastchat_BroadcastChat_3URK7", ChatEntry: "broadcastchat_ChatEntry_3soy-", ChatPanel: "broadcastchat_ChatPanel_2ZCAI", ChatMessages: "broadcastchat_ChatMessages_3M5L0", EmoticonContainer: "broadcastchat_EmoticonContainer_1wa4o", ChatSend: "broadcastchat_ChatSend_3JUnD", ChatBox: "broadcastchat_ChatBox_2qfgS", ChatControls: "broadcastchat_ChatControls_1TekO", MessageChat: "broadcastchat_MessageChat_22PB4", MessageName: "broadcastchat_MessageName_BJe6C", MessageContents: "broadcastchat_MessageContents_PNYZa", EmoticonsOnly: "broadcastchat_EmoticonsOnly_gFjH8", MessageNotification: "broadcastchat_MessageNotification_3Xb4_", MessageError: "broadcastchat_MessageError_8MzyW", minHeightZero: "broadcastchat_minHeightZero_r7HLM", ChatLoginButton: "broadcastchat_ChatLoginButton_2TAQo", RateLimitProgressBarContainer: "broadcastchat_RateLimitProgressBarContainer_JPqUG", RateLimitProgressBar: "broadcastchat_RateLimitProgressBar_1EcVK", TimedProgressBarContainer: "broadcastchat_TimedProgressBarContainer_39xGj", wrapper: "broadcastchat_wrapper_2vz6R", pie: "broadcastchat_pie_1k4dS", spinner: "broadcastchat_spinner_3nRh5", rota: "broadcastchat_rota_1xXh6", filler: "broadcastchat_filler_3Eegk", fill: "broadcastchat_fill_2tyuX", mask: "broadcastchat_mask_1V4Ke", SelectedUserNameCtn: "broadcastchat_SelectedUserNameCtn_3K4QX", SelectedUserName: "broadcastchat_SelectedUserName_c907V", FlairContainer: "broadcastchat_FlairContainer_166wp", RoleFlairContainer: "broadcastchat_RoleFlairContainer_1QRJ2", Description: "broadcastchat_Description_105HH", LogInPrompt: "broadcastchat_LogInPrompt_CsA8v", SignInButton: "broadcastchat_SignInButton_1dMwW", }; }, 93628: (e) => { e.exports = { GiveawayWinnerBox: "broadcastchatannouncement_GiveawayWinnerBox_3cv4l", GiveawayWinnerAnnounced: "broadcastchatannouncement_GiveawayWinnerAnnounced_oLk3w", WinnerFlash: "broadcastchatannouncement_WinnerFlash_29x--", GiveawayWinnerBoxRight: "broadcastchatannouncement_GiveawayWinnerBoxRight_2ftrc", GiveawayWinnerText: "broadcastchatannouncement_GiveawayWinnerText_1SY2g", GiveawayWinnerCountdown: "broadcastchatannouncement_GiveawayWinnerCountdown_1eP67", GiveawayWinnerBoxLeft: "broadcastchatannouncement_GiveawayWinnerBoxLeft_N6Rk1", GiveawayWinnerArt: "broadcastchatannouncement_GiveawayWinnerArt_1sgyp", GiveawayWinnerQuestion: "broadcastchatannouncement_GiveawayWinnerQuestion_3mvdc", InViewerBar: "broadcastchatannouncement_InViewerBar_25VQ8", GiveawayRegisterButton: "broadcastchatannouncement_GiveawayRegisterButton_eKSAv", GiveawayAlreadyRegistered: "broadcastchatannouncement_GiveawayAlreadyRegistered_2AVNR" }; }, 14664: (e) => { e.exports = { FocusRingRoot: "focusring_FocusRingRoot_3m2Fo", FocusRing: "focusring_FocusRing_1sTuv", flash: "focusring_flash_15zi-", growOutline: "focusring_growOutline_3vSPb", fadeOutline: "focusring_fadeOutline_xL-jG", blinker: "focusring_blinker_3mURo", DebugFocusRing: "focusring_DebugFocusRing_1cTVW", FocusRingOnHiddenItem: "focusring_FocusRingOnHiddenItem_8uyqy" }; }, 88975: (e) => { e.exports = { ScrollPanel: "scrollpanel_ScrollPanel_1Ecbh", ScrollY: "scrollpanel_ScrollY_3yFwd", ScrollX: "scrollpanel_ScrollX_3TJWg", ScrollBoth: "scrollpanel_ScrollBoth_7h7DE" }; }, 31721: (e) => { e.exports = { Login: "newlogindialog_Login_lat0M", SideBySide: "newlogindialog_SideBySide_ZHRZ8", GuestContainer: "newlogindialog_GuestContainer_3Sfbz", GuestLayout: "newlogindialog_GuestLayout_1r_sY", GuestText: "newlogindialog_GuestText_2gE59", GuestLink: "newlogindialog_GuestLink_3zcmX", QRSection: "newlogindialog_QRSection_3wSeH", MessagingContainer: "newlogindialog_MessagingContainer_mFCQS", MessagingTag: "newlogindialog_MessagingTag_2vrvE", MessagingSubtitleCtn: "newlogindialog_MessagingSubtitleCtn_1SepN", MessagingIcon: "newlogindialog_MessagingIcon_1IIkZ", MessagingSubtitle: "newlogindialog_MessagingSubtitle_14ZzK", MessagingButton: "newlogindialog_MessagingButton_3k-6J", MessagingLink: "newlogindialog_MessagingLink_1kBrG", ScanQRButton: "newlogindialog_ScanQRButton_3wGxE", QRIcon: "newlogindialog_QRIcon_27u_P", QRCodeContainer: "newlogindialog_QRCodeContainer_3ToZQ", QR: "newlogindialog_QR_35Q-U", QRHideLink: "newlogindialog_QRHideLink_1MIDA", HideButton: "newlogindialog_HideButton_1kEk5", UseMobileAppForQR: "newlogindialog_UseMobileAppForQR_3pxTS", InClient: "newlogindialog_InClient_1VAFg", TextField: "newlogindialog_TextField_3BkiH", TextInput: "newlogindialog_TextInput_2GBWe", Danger: "newlogindialog_Danger_16BUa", LoginForm: "newlogindialog_LoginForm_2v60t", FieldLabel: "newlogindialog_FieldLabel_XrYge", Highlight: "newlogindialog_Highlight_12zBm", CheckboxField: "newlogindialog_CheckboxField_1Qku5", CheckboxFieldLabel: "newlogindialog_CheckboxFieldLabel_10bGi", Checkbox: "newlogindialog_Checkbox_LBS7I", Check: "newlogindialog_Check_28MB9", RefreshButtonContainer: "newlogindialog_RefreshButtonContainer_1Y8X9", SignInButtonContainer: "newlogindialog_SignInButtonContainer_16fbi", RefreshQuitButton: "newlogindialog_RefreshQuitButton_9Ig1o", OfferOfflineButton: "newlogindialog_OfferOfflineButton_2Z68v", TryAgainButton: "newlogindialog_TryAgainButton_25eT2", GuestButton: "newlogindialog_GuestButton_3t6Qg", SubmitButton: "newlogindialog_SubmitButton_DjSvC", Loading: "newlogindialog_Loading_2NVQc", LoadingContainer: "newlogindialog_LoadingContainer_3AseU", Text: "newlogindialog_Text_1zFEa", Center: "newlogindialog_Center_2jDjx", TextLink: "newlogindialog_TextLink_1K431", FormError: "newlogindialog_FormError_1W_6H", TextAlignCenter: "newlogindialog_TextAlignCenter_2FyQD", FlexCol: "newlogindialog_FlexCol_1NOsG", AlignItemsCenter: "newlogindialog_AlignItemsCenter_2QHQ1", JustifyContentCenter: "newlogindialog_JustifyContentCenter_2tsIi", ProtectingAccount: "newlogindialog_ProtectingAccount_3JBYG", Label: "newlogindialog_Label_1hKgi", AccountName: "newlogindialog_AccountName_31Vq4", Description: "newlogindialog_Description_2o5mE", ConfirmationContainer: "newlogindialog_ConfirmationContainer_3zQ9h", AwaitingMobileConfText: "newlogindialog_AwaitingMobileConfText_2WgwH", ConfirmationEntryContainer: "newlogindialog_ConfirmationEntryContainer_3huyZ", AwaitingMobileConfIcon: "newlogindialog_AwaitingMobileConfIcon_3WvDp", AwaitingEmailConfIcon: "newlogindialog_AwaitingEmailConfIcon_3qdu3", LinkContainer: "newlogindialog_LinkContainer_3yz6x", EnterCodeInsteadLink: "newlogindialog_EnterCodeInsteadLink_2YsaR", EnterBackupCodeContainer: "newlogindialog_EnterBackupCodeContainer_DdK_F", EnterCodeFromMobileContainer: "newlogindialog_EnterCodeFromMobileContainer_2Io_J", EnterCodeFromEmailContainer: "newlogindialog_EnterCodeFromEmailContainer_1YQZI", EnterCodeFromMobile: "newlogindialog_EnterCodeFromMobile_1rEWO", EnterCodeFromEmail: "newlogindialog_EnterCodeFromEmail_3aMbj", EnterCodeEmailAddress: "newlogindialog_EnterCodeEmailAddress_3BKzb", CodeInputFieldContainer: "newlogindialog_CodeInputFieldContainer_3FIQq", CodeInputField: "newlogindialog_CodeInputField_1gZuG", SegmentContainer: "newlogindialog_SegmentContainer_8gteG", Segment: "newlogindialog_Segment_3l55O", RefreshTitle: "newlogindialog_RefreshTitle_3yMMw", RefreshReason: "newlogindialog_RefreshReason_1b-mL", InsecureComputer: "newlogindialog_InsecureComputer_3onX-", StandardLayout: "newlogindialog_StandardLayout_2EuR6", PrimaryHeader: "newlogindialog_PrimaryHeader_g5L61", FormContainer: "newlogindialog_FormContainer_3XCnc", Embedded: "newlogindialog_Embedded_2R_n2", Compact: "newlogindialog_Compact_3FB9K", HeaderLogo: "newlogindialog_HeaderLogo_3v6Wn", LogoContainer: "newlogindialog_LogoContainer_14exB", BackArrowContainer: "newlogindialog_BackArrowContainer_2Jkgs", BackArrow: "newlogindialog_BackArrow_3NHpq", EmbeddedRoot: "newlogindialog_EmbeddedRoot_2v9dC", RefreshReasonContainer: "newlogindialog_RefreshReasonContainer_1kQPd", Universe: "newlogindialog_Universe_yQUZi", EmbeddedRootFooter: "newlogindialog_EmbeddedRootFooter_27aIt", AccountCreation: "newlogindialog_AccountCreation_3oena", AccountCreationPrompt: "newlogindialog_AccountCreationPrompt_3dwSW", FailureTitle: "newlogindialog_FailureTitle_1A8Mk", FailureDescription: "newlogindialog_FailureDescription_3H-JH", FailureButtons: "newlogindialog_FailureButtons_Vf2Dk", OfferOffline: "newlogindialog_OfferOffline_2gqhn", LoadingSpinner: "newlogindialog_LoadingSpinner_1VLuk", LoadAmin: "newlogindialog_LoadAmin_14OTB", Small: "newlogindialog_Small_WYrJy", Medium: "newlogindialog_Medium_CQ9fA", Large: "newlogindialog_Large_1EIKW", MutedErrorReference: "newlogindialog_MutedErrorReference_J_2Q0", WaitingForTokenContainer: "newlogindialog_WaitingForTokenContainer_1h8nX", Client: "newlogindialog_Client_3NSip", }; }, 10335: (e) => { e.exports = { LoginQR: "qrlogin_LoginQR_xlEVp", NonPublic: "qrlogin_NonPublic_39rmY", QRLoginDeck: "qrlogin_QRLoginDeck_J3DO-", Blur: "qrlogin_Blur_1rteF", Overlay: "qrlogin_Overlay_464mF", Box: "qrlogin_Box_2ltn2", Column: "qrlogin_Column_2u8B9", Loading: "qrlogin_Loading_3jObI", LoadAmin: "qrlogin_LoadAmin_3GMW9", Small: "qrlogin_Small_3YZnI", Medium: "qrlogin_Medium_rYn6L", Large: "qrlogin_Large_16VPM" }; }, 75377: (e) => { e.exports = { SnoozeContainer: "friendsnooze_SnoozeContainer_1Dsum", SnoozeZ: "friendsnooze_SnoozeZ_2n0Ei", none: "friendsnooze_none_T3Fb5", Medium: "friendsnooze_Medium_1iYPl", Large: "friendsnooze_Large_3BESV", Dim: "friendsnooze_Dim_rpZ9b", Z1: "friendsnooze_Z1_2hnF3", Z2: "friendsnooze_Z2_VmQTO", Z3: "friendsnooze_Z3_29mta", hoverParent: "friendsnooze_hoverParent_3-8cB", animating: "friendsnooze_animating_2rXc7", Snoring: "friendsnooze_Snoring_38wIV" }; }, 61805: (e) => { e.exports = { HoverPosition: "hoverposition_HoverPosition_3vg1v", Ready: "hoverposition_Ready_1Ye_0", NoSpace: "hoverposition_NoSpace_pxVZH", EnablePointerEvents: "hoverposition_EnablePointerEvents_2b9OE", HoverAboveModal: "hoverposition_HoverAboveModal_EQqOx", HoverPositionOuter: "hoverposition_HoverPositionOuter_2_lmT" }; }, 49361: (e) => { e.exports = { miniProfile: "miniprofile_miniProfile_2QPdq", miniProfileContent: "miniprofile_miniProfileContent_1xTAT", miniProfileHeader: "miniprofile_miniProfileHeader_3CZcH", miniProfilePlayer: "miniprofile_miniProfilePlayer_2jZ0A", playerContent: "miniprofile_playerContent_2-pwJ", miniProfileBackground: "miniprofile_miniProfileBackground_3HzZh", miniProfileBackgroundBlur: "miniprofile_miniProfileBackgroundBlur_xUosY", miniProfileVideoBackground: "miniprofile_miniProfileVideoBackground_2Zqfb", miniProfileVideoBackgroundContainer: "miniprofile_miniProfileVideoBackgroundContainer_3MrYv", miniProfileBackdropBlur: "miniprofile_miniProfileBackdropBlur_1QhpY", miniProfileBlocked: "miniprofile_miniProfileBlocked_39Jef", miniProfileNotFriends: "miniprofile_miniProfileNotFriends_3Ea91", notFriends: "miniprofile_notFriends_2zgR7", SnoozeContainer: "miniprofile_SnoozeContainer_1cAsx", miniProfileHover: "miniprofile_miniProfileHover_2AWay", miniprofile_arrow: "miniprofile_miniprofile_arrow_1YsNo", left: "miniprofile_left_1qS_b", playerAvatar: "miniprofile_playerAvatar_36eQg", Frame: "miniprofile_Frame_2nPON", avatarStatus: "miniprofile_avatarStatus_1YdpX", miniProfileAvatarStatus: "miniprofile_miniProfileAvatarStatus_1k5Yk", personaName: "miniprofile_personaName_qiP8a", hasNickname: "miniprofile_hasNickname_2TAWS", personaNameLabel: "miniprofile_personaNameLabel_2VUw8", nickName: "miniprofile_nickName_h_So5", persona: "miniprofile_persona_3c5GO", personaAndIcons: "miniprofile_personaAndIcons_1p9kf", awayStatusLabel: "miniprofile_awayStatusLabel_1FgWI", nickname: "miniprofile_nickname_1SWhp", playerNicknameBracket: "miniprofile_playerNicknameBracket_3qa8c", notInOrWatchingGame: "miniprofile_notInOrWatchingGame_1NkB7", miniProfileBottom: "miniprofile_miniProfileBottom_26ga2", miniProfileGameContainer: "miniprofile_miniProfileGameContainer_7-U6j", gameLogo: "miniprofile_gameLogo_A0XYr", ingame: "miniprofile_ingame_24oQz", richPresence: "miniprofile_richPresence_39T3E", gameState: "miniprofile_gameState_3Hxc3", watchingbroadcast: "miniprofile_watchingbroadcast_3hSAG", watchingbroadcastThumbnail: "miniprofile_watchingbroadcastThumbnail_FmBWy", gameContent: "miniprofile_gameContent_3YwnZ", miniProfileFeaturedContainer: "miniprofile_miniProfileFeaturedContainer_1KDhd", favoriteBadgeIcon: "miniprofile_favoriteBadgeIcon_qP4hs", badgeIcon: "miniprofile_badgeIcon_1oWOa", featuredLabels: "miniprofile_featuredLabels_39har", friendPlayerLevelNum: "miniprofile_friendPlayerLevelNum_3vvwM", featuredTitle: "miniprofile_featuredTitle_2mCgt", mutualFriends: "miniprofile_mutualFriends_3AWk3", featuredSubTitle: "miniprofile_featuredSubTitle_3DelZ", }; }, 58557: (e) => { e.exports = { "duration-app-launch": "800ms", statusAndName: "personanameandstatus_statusAndName_4ZTzG", threeLines: "personanameandstatus_threeLines_1oYSX", blocked: "personanameandstatus_blocked_VTxPk", richPresenceLabel: "personanameandstatus_richPresenceLabel_2Ri00", playerName: "personanameandstatus_playerName_nOdcT", playerNickname: "personanameandstatus_playerNickname_2saJT", playerNicknameBracket: "personanameandstatus_playerNicknameBracket_3XEmW", richPresenceContainer: "personanameandstatus_richPresenceContainer_3sxE7", gameName: "personanameandstatus_gameName_1cB0q", NoMask: "personanameandstatus_NoMask_2dAj6", twoLine: "personanameandstatus_twoLine_1BbOe", DNDContainer: "personanameandstatus_DNDContainer_3IswZ", partyBeaconJoin: "personanameandstatus_partyBeaconJoin_3BnDs", hidePersona: "personanameandstatus_hidePersona_3ZJkO", compactView: "personanameandstatus_compactView_3bbRZ", noContextMenu: "personanameandstatus_noContextMenu_1JE5G", gameIsPrivateIcon: "personanameandstatus_gameIsPrivateIcon_2gBKQ", PendingPersona: "personanameandstatus_PendingPersona_2sxXn", }; }, 30677: (e) => { e.exports = { "duration-app-launch": "800ms", PersonaStatusIcon: "personastatusicons_PersonaStatusIcon_KxAI_", MobilePhoneIcon: "personastatusicons_MobilePhoneIcon_1iRFj" }; }, 81376: (e) => { e.exports = { avatarHolder: "steamavatar_avatarHolder_nibod", avatarStatus: "steamavatar_avatarStatus_3xUpb", avatar: "steamavatar_avatar_3h-QR", avatarFrame: "steamavatar_avatarFrame_X_mJE", avatarFrameImg: "steamavatar_avatarFrameImg_3fM0F" }; }, 64627: (e) => { e.exports = { "duration-app-launch": "800ms", Picker: "addonpicker_Picker_tid_O", Tabs: "addonpicker_Tabs_1yVkT", Tab: "addonpicker_Tab_2CJ0L", Focus: "addonpicker_Focus_1xH5s", TabContent: "addonpicker_TabContent_1mROo", Active: "addonpicker_Active_1ddEQ", Content: "addonpicker_Content_dUQIH", ItemList: "addonpicker_ItemList_2OWGR", Item: "addonpicker_Item_1SFqy", SectionedPageTitle: "addonpicker_SectionedPageTitle_ZmsEl", SectionTitle: "addonpicker_SectionTitle_3WuFl", FilterInputContainer: "addonpicker_FilterInputContainer_EuFeP", FilterInput: "addonpicker_FilterInput_2l4z-", AddonPickerMessage: "addonpicker_AddonPickerMessage_2wUk7" }; }, 28464: (e) => { e.exports = { DynamicLinkBox: "youtubeembed_DynamicLinkBox_1IGUR", DynamicLink_Preview: "youtubeembed_DynamicLink_Preview_3ZK9R", DynamicLink_Author: "youtubeembed_DynamicLink_Author_3z0n0", DynamicLink_Description: "youtubeembed_DynamicLink_Description_eMdGA", DynamicLink_Content: "youtubeembed_DynamicLink_Content_2FhVX", DynamicLink_Name: "youtubeembed_DynamicLink_Name_1R7Ng", DynamicLink_YoutubeViews: "youtubeembed_DynamicLink_YoutubeViews_3clz2", Dynamiclink_Content: "youtubeembed_Dynamiclink_Content_1EYgV", DynamicLink_URL: "youtubeembed_DynamicLink_URL_3otyz", DynamicLink_AuthorName: "youtubeembed_DynamicLink_AuthorName_2DML9", DynamicLink_Date: "youtubeembed_DynamicLink_Date_281Dh", PreviewYouTubeVideo: "youtubeembed_PreviewYouTubeVideo_rUASs", sizeThumb: "youtubeembed_sizeThumb_3dy3K", sizeFull: "youtubeembed_sizeFull_14CxW", floatLeft: "youtubeembed_floatLeft_2OWxr", floatRight: "youtubeembed_floatRight_om0Rs" }; }, 2204: (e) => { e.exports = { "duration-app-launch": "800ms", chatEntryControls: "chatentry_chatEntryControls_3Ule3", chatTextarea: "chatentry_chatTextarea_113iu", chatEntryActionsGroup: "chatentry_chatEntryActionsGroup_2WfNo", chatEntryActionsContainer: "chatentry_chatEntryActionsContainer_W0Ohk", minHeightZero: "chatentry_minHeightZero_2zeeh", chatSubmitButton: "chatentry_chatSubmitButton_RVIs8", EmbedButton: "chatentry_EmbedButton_3zOBe", EmoticonPickerButton: "chatentry_EmoticonPickerButton_Aupsw", disabled: "chatentry_disabled_jaQN2", Inactive: "chatentry_Inactive_3G-I9", AudioLines: "chatentry_AudioLines_IWaba", Active: "chatentry_Active_37tPt" }; }, 97841: (e) => { e.exports = { "duration-app-launch": "800ms", ContextMenuMouseOverlay: "contextmenu_ContextMenuMouseOverlay_3Knd7", ContextMenuFocusContainer: "contextmenu_ContextMenuFocusContainer_1S6CC", contextMenu: "contextmenu_contextMenu_PP7LM", ContextMenuPopup: "contextmenu_ContextMenuPopup_14wqd", contextMenuContents: "contextmenu_contextMenuContents_2EstN", contextMenuItem: "contextmenu_contextMenuItem_1n7Wl", active: "contextmenu_active_18z-3", MenuSectionHeader: "contextmenu_MenuSectionHeader_2Bb4J", ContextMenuSeparator: "contextmenu_ContextMenuSeparator_WUOrU", NoSeparation: "contextmenu_NoSeparation_3hRb6", UpperCase: "contextmenu_UpperCase_uz1Xm", SubMenu: "contextmenu_SubMenu_2RlEO", Label: "contextmenu_Label_2qdHl", Arrow: "contextmenu_Arrow_114nF", IconContainer: "contextmenu_IconContainer_38-c8", ContextMenuHRSeparator: "contextmenu_ContextMenuHRSeparator_IjIBR", ForceDesktop: "contextmenu_ForceDesktop_3qIuY", PopoutSubMenu: "contextmenu_PopoutSubMenu_Baq37", PopoutSubMenuItems: "contextmenu_PopoutSubMenuItems_2fZ_e", }; }, 81034: (e) => { e.exports = { DialogDropDownMenu_Item: "dropdown_DialogDropDownMenu_Item_2oAiZ", DialogDropDownMenu: "dropdown_DialogDropDownMenu_30wJO" }; }, 76362: (e) => { e.exports = { DropDownLabelContainer: "dropdownlabel_DropDownLabelContainer_uujQH", DropDownLabelIconContainer: "dropdownlabel_DropDownLabelIconContainer_3H05C", DropDownLabelTextColumn: "dropdownlabel_DropDownLabelTextColumn_3WTX4", DropDownLabelTitle: "dropdownlabel_DropDownLabelTitle_3g-QH", DropDownLabelUpperDescription: "dropdownlabel_DropDownLabelUpperDescription_2fl-T", DropDownLabelDescription: "dropdownlabel_DropDownLabelDescription_cbinv" }; }, 34245: (e) => { e.exports = { "duration-app-launch": "800ms", GamepadDialogContent: "gamepaddialog_GamepadDialogContent_16sYN", GamepadDialogContent_InnerWidth: "gamepaddialog_GamepadDialogContent_InnerWidth_2ywyS", Field: "gamepaddialog_Field_eKmEX", Button: "gamepaddialog_Button_cXzBZ", NoMinWidth: "gamepaddialog_NoMinWidth_R7OZb", ActiveAndUnfocused: "gamepaddialog_ActiveAndUnfocused_28cXJ", StandaloneFieldSeparator: "gamepaddialog_StandaloneFieldSeparator_1vcky", StandardPadding: "gamepaddialog_StandardPadding_xIITX", CompactPadding: "gamepaddialog_CompactPadding_3hgIZ", WithDescription: "gamepaddialog_WithDescription_3tB2l", WithBottomSeparatorStandard: "gamepaddialog_WithBottomSeparatorStandard_GxgIy", WithBottomSeparatorThick: "gamepaddialog_WithBottomSeparatorThick_39x36", HighlightOnFocus: "gamepaddialog_HighlightOnFocus_2HFrm", Clickable: "gamepaddialog_Clickable_2Huzv", Disabled: "gamepaddialog_Disabled_aIeh3", WithBottomSeparator: "gamepaddialog_WithBottomSeparator_3YKpU", "ItemFocusAnim-darkerGrey": "gamepaddialog_ItemFocusAnim-darkerGrey_3NU8G", "ItemFocusAnim-darkGrey": "gamepaddialog_ItemFocusAnim-darkGrey_2NVMb", FieldChildrenWithIcon: "gamepaddialog_FieldChildrenWithIcon_1aw7c", FieldChildrenInner: "gamepaddialog_FieldChildrenInner_2o2fX", FieldClickTarget: "gamepaddialog_FieldClickTarget_1cGG5", FieldIcon: "gamepaddialog_FieldIcon_2DM37", Front: "gamepaddialog_Front_2sj0i", BeforeChildren: "gamepaddialog_BeforeChildren_1mbHa", FieldLabelRow: "gamepaddialog_FieldLabelRow_2VcTl", VerticalAlignCenter: "gamepaddialog_VerticalAlignCenter_16vVn", InlineWrapShiftsChildrenBelow: "gamepaddialog_InlineWrapShiftsChildrenBelow_3LCXh", ExtraPaddingOnChildrenBelow: "gamepaddialog_ExtraPaddingOnChildrenBelow_3nLNL", ChildrenWidthFixed: "gamepaddialog_ChildrenWidthFixed_ljcbL", ChildrenWidthGrow: "gamepaddialog_ChildrenWidthGrow_Jgod1", WithFirstRow: "gamepaddialog_WithFirstRow_2bDqk", WithChildrenBelow: "gamepaddialog_WithChildrenBelow_37xzV", FieldLabel: "gamepaddialog_FieldLabel_3jMlJ", FieldLabelValue: "gamepaddialog_FieldLabelValue_KGS2r", FieldDescription: "gamepaddialog_FieldDescription_1W1to", ModalPosition: "gamepaddialog_ModalPosition_3A5uj", VR: "gamepaddialog_VR_3-Nqu", WithStandardPadding: "gamepaddialog_WithStandardPadding_1XQXQ", NoHeaderPadding: "gamepaddialog_NoHeaderPadding_1Y7qW", ModalClickToDismiss: "gamepaddialog_ModalClickToDismiss_27uCS", slideInAnimation: "gamepaddialog_slideInAnimation_2JseU", ScrollWithin: "gamepaddialog_ScrollWithin_ze1or", BasicTextInput: "gamepaddialog_BasicTextInput_3ZR32", Toggle: "gamepaddialog_Toggle_9Ql-o", ToggleRail: "gamepaddialog_ToggleRail_2bl0i", On: "gamepaddialog_On_yLrDA", ToggleSwitch: "gamepaddialog_ToggleSwitch_1PQpp", LabelFieldValue: "gamepaddialog_LabelFieldValue_3pteV", DropDownControlButtonContents: "gamepaddialog_DropDownControlButtonContents_3OHR1", Spacer: "gamepaddialog_Spacer_2H-4-", DropDownRow: "gamepaddialog_DropDownRow_1fwM1", IconContainer: "gamepaddialog_IconContainer_3xrmZ", Label: "gamepaddialog_Label_sNbXz", ControlsListOuterPanel: "gamepaddialog_ControlsListOuterPanel_2XSsN", StandardSpacing: "gamepaddialog_StandardSpacing_1_1cc", ExtraSpacing: "gamepaddialog_ExtraSpacing_3CqNn", ItemMaxSizeDesktop: "gamepaddialog_ItemMaxSizeDesktop_30JCQ", AlignRight: "gamepaddialog_AlignRight_DfEz4", AlignLeft: "gamepaddialog_AlignLeft_32h79", AlignCenter: "gamepaddialog_AlignCenter_2ilj8", FullWidth: "gamepaddialog_FullWidth_3vgH-", ControlsListChild: "gamepaddialog_ControlsListChild_2LQjj", "QuickAccess-Menu": "gamepaddialog_QuickAccess-Menu_1RRDR", BottomButtons: "gamepaddialog_BottomButtons_UeBsD", BackgroundAnimation: "gamepaddialog_BackgroundAnimation_3PwEE", "ItemFocusAnim-darkerGrey-nocolor": "gamepaddialog_ItemFocusAnim-darkerGrey-nocolor_OLaBY", "ItemFocusAnim-grey": "gamepaddialog_ItemFocusAnim-grey_2cC0L", "ItemFocusAnim-translucent-white-10": "gamepaddialog_ItemFocusAnim-translucent-white-10_2ZXhF", "ItemFocusAnim-translucent-white-20": "gamepaddialog_ItemFocusAnim-translucent-white-20_3FYJQ", "ItemFocusAnimBorder-darkGrey": "gamepaddialog_ItemFocusAnimBorder-darkGrey_2bQL7", "ItemFocusAnim-green": "gamepaddialog_ItemFocusAnim-green_3YEiB", focusAnimation: "gamepaddialog_focusAnimation_27hQa", hoverAnimation: "gamepaddialog_hoverAnimation_1n0zr", }; }, 11808: (e) => { e.exports = { "duration-app-launch": "800ms", DropDownControlButton: "gamepaddropdown_DropDownControlButton_v8oJc" }; }, 64699: (e) => { e.exports = { TogglePasswordVisibilityBtn: "gamepadinput_TogglePasswordVisibilityBtn_2-fpY", Digits: "gamepadinput_Digits_c-4HN", PinDigit: "gamepadinput_PinDigit_15-eR" }; }, 51921: (e) => { e.exports = { "duration-app-launch": "800ms", PagedSettingsDialog: "gamepadpagedsettings_PagedSettingsDialog_33vqr", PagedSettingsDialog_PageContent: "gamepadpagedsettings_PagedSettingsDialog_PageContent_3mgb-", NoPadding: "gamepadpagedsettings_NoPadding_3ePFF", PagedSettingsDialog_PageListColumn: "gamepadpagedsettings_PagedSettingsDialog_PageListColumn_1d6VI", PagedSettingsDialog_Title: "gamepadpagedsettings_PagedSettingsDialog_Title_3aOHb", PagedSettingsDialog_PageList: "gamepadpagedsettings_PagedSettingsDialog_PageList_gNwoz", PagedSettingsDialog_PageList_DisableScrolling: "gamepadpagedsettings_PagedSettingsDialog_PageList_DisableScrolling_sMDrh", PagedSettingsDialog_PageList_ShowTitle: "gamepadpagedsettings_PagedSettingsDialog_PageList_ShowTitle_3UfIN", PageSettingsDialog_PageList_NoHeaderPadding: "gamepadpagedsettings_PageSettingsDialog_PageList_NoHeaderPadding_2EiZ3", PagedSettingsDialog_PageListItem: "gamepadpagedsettings_PagedSettingsDialog_PageListItem_2mL2H", DisabledItem: "gamepadpagedsettings_DisabledItem_1G3wh", Active: "gamepadpagedsettings_Active_1ELdD", "ItemFocusAnim-darkerGrey": "gamepadpagedsettings_ItemFocusAnim-darkerGrey_2Shps", "ItemFocusAnim-darkGrey": "gamepadpagedsettings_ItemFocusAnim-darkGrey_2x0HR", PageListItem_Icon: "gamepadpagedsettings_PageListItem_Icon_3f2IO", PageListItem_Title: "gamepadpagedsettings_PageListItem_Title_4niDT", Separator: "gamepadpagedsettings_Separator_3sUwu", PagedSettingDialog_ContentColumn: "gamepadpagedsettings_PagedSettingDialog_ContentColumn_ZjHHX", Up: "gamepadpagedsettings_Up_1dnQH", ContentTransition: "gamepadpagedsettings_ContentTransition_1IuEv", Enter: "gamepadpagedsettings_Enter_1GyNi", EnterActive: "gamepadpagedsettings_EnterActive_3MKje", Exit: "gamepadpagedsettings_Exit_3Xxqh", ExitActive: "gamepadpagedsettings_ExitActive_13X1O", Down: "gamepadpagedsettings_Down_1C1Jj", BackgroundAnimation: "gamepadpagedsettings_BackgroundAnimation_5VEJ9", "ItemFocusAnim-darkerGrey-nocolor": "gamepadpagedsettings_ItemFocusAnim-darkerGrey-nocolor_gmWXV", "ItemFocusAnim-grey": "gamepadpagedsettings_ItemFocusAnim-grey_2_WUb", "ItemFocusAnim-translucent-white-10": "gamepadpagedsettings_ItemFocusAnim-translucent-white-10_3JK1V", "ItemFocusAnim-translucent-white-20": "gamepadpagedsettings_ItemFocusAnim-translucent-white-20_2PDwQ", "ItemFocusAnimBorder-darkGrey": "gamepadpagedsettings_ItemFocusAnimBorder-darkGrey_21sRA", "ItemFocusAnim-green": "gamepadpagedsettings_ItemFocusAnim-green_1JVe0", focusAnimation: "gamepadpagedsettings_focusAnimation_2mE4Z", hoverAnimation: "gamepadpagedsettings_hoverAnimation_2TiOQ", }; }, 23773: (e) => { e.exports = { "duration-app-launch": "800ms", "error-shake-duration": "500ms", SliderControlPanelGroup: "gamepadslider_SliderControlPanelGroup_198v6", SliderControlAndNotches: "gamepadslider_SliderControlAndNotches_23hjX", WithDefaultValue: "gamepadslider_WithDefaultValue_2vIQR", SliderControl: "gamepadslider_SliderControl_1udlG", Disabled: "gamepadslider_Disabled_35GyZ", SliderTrack: "gamepadslider_SliderTrack_2_vG6", SliderHasNotches: "gamepadslider_SliderHasNotches_1Lr71", DefaultValueIsColorRange: "gamepadslider_DefaultValueIsColorRange_BKyEN", DefaultValueColorLeft: "gamepadslider_DefaultValueColorLeft_3mRyv", DefaultValueColorRight: "gamepadslider_DefaultValueColorRight_2KP6T", SliderTrackDark: "gamepadslider_SliderTrackDark_20c10", SliderHandleContainer: "gamepadslider_SliderHandleContainer_8xNY6", VerticalLineSliderHandleContainer: "gamepadslider_VerticalLineSliderHandleContainer_2jnK7", ParenSliderHandleContainer: "gamepadslider_ParenSliderHandleContainer_VKqgk", SliderHandle: "gamepadslider_SliderHandle_11PBf", SliderHandleFocusPop: "gamepadslider_SliderHandleFocusPop_1RC4f", VerticalLineSliderHandle: "gamepadslider_VerticalLineSliderHandle_3zRgr", ParenSliderHandle: "gamepadslider_ParenSliderHandle_2Yg4-", Left: "gamepadslider_Left_2vrO5", Icon: "gamepadslider_Icon_K9V_G", SliderNotchContainer: "gamepadslider_SliderNotchContainer_2yM7S", SliderNotch: "gamepadslider_SliderNotch_LYPXt", AlignToEnds: "gamepadslider_AlignToEnds_VvfcC", SliderNotchLabel: "gamepadslider_SliderNotchLabel_dbACW", AlignToLeft: "gamepadslider_AlignToLeft_3jR_d", AlignToRight: "gamepadslider_AlignToRight_OBP79", SliderNotchTick: "gamepadslider_SliderNotchTick_u8QEa", TickActive: "gamepadslider_TickActive_j418S", LabelText: "gamepadslider_LabelText_1eMTv", DescriptionValue: "gamepadslider_DescriptionValue_11I0_", EditableValue: "gamepadslider_EditableValue_3aMli", FakeEditableValue: "gamepadslider_FakeEditableValue_1iWWS", RedBorder: "gamepadslider_RedBorder_2fKVy", ErrorShake: "gamepadslider_ErrorShake_1Fa-z", "error-shake": "gamepadslider_error-shake_1LFde", CompoundSlider: "gamepadslider_CompoundSlider_2hwF2", CompoundSliderSubSlider: "gamepadslider_CompoundSliderSubSlider_uOFmz", Right: "gamepadslider_Right_3GOpB", CompoundSliderSubSliderLabelContainer: "gamepadslider_CompoundSliderSubSliderLabelContainer_2iD1m", CompoundSliderSubSliderLabelPositioner: "gamepadslider_CompoundSliderSubSliderLabelPositioner_3Tp7J", CompoundSliderSubSliderLabel: "gamepadslider_CompoundSliderSubSliderLabel_2Yb0r", CompoundSliderSubSliderLabelInternal: "gamepadslider_CompoundSliderSubSliderLabelInternal_38VX5", DefaultValueTickContainer: "gamepadslider_DefaultValueTickContainer_2aCoH", DefaultValueTick: "gamepadslider_DefaultValueTick_1NgUy", BackgroundAnimation: "gamepadslider_BackgroundAnimation_34gou", "ItemFocusAnim-darkerGrey-nocolor": "gamepadslider_ItemFocusAnim-darkerGrey-nocolor_3uBtl", "ItemFocusAnim-darkerGrey": "gamepadslider_ItemFocusAnim-darkerGrey_1so9R", "ItemFocusAnim-darkGrey": "gamepadslider_ItemFocusAnim-darkGrey_3rHHM", "ItemFocusAnim-grey": "gamepadslider_ItemFocusAnim-grey_3bS2Y", "ItemFocusAnim-translucent-white-10": "gamepadslider_ItemFocusAnim-translucent-white-10_1eyjV", "ItemFocusAnim-translucent-white-20": "gamepadslider_ItemFocusAnim-translucent-white-20_1iqNj", "ItemFocusAnimBorder-darkGrey": "gamepadslider_ItemFocusAnimBorder-darkGrey_2Pzyj", "ItemFocusAnim-green": "gamepadslider_ItemFocusAnim-green_2C-5C", }; }, 3067: (e) => { e.exports = { "duration-app-launch": "800ms", PagedSettingsDialog: "pagedsettings_PagedSettingsDialog_2sssI", PagedSettingsDialog_PageContent: "pagedsettings_PagedSettingsDialog_PageContent_CFTLX", NoPadding: "pagedsettings_NoPadding_qvR0K", PagedSettingsDialog_PageListColumn: "pagedsettings_PagedSettingsDialog_PageListColumn_2kwFF", Hidden: "pagedsettings_Hidden_1v7Jd", NewNoteButton: "pagedsettings_NewNoteButton_g8SKU", PagedSettingsDialog_Title: "pagedsettings_PagedSettingsDialog_Title_2rjVT", PagedSettingsDialog_PageList: "pagedsettings_PagedSettingsDialog_PageList_18QCu", PagedSettingsDialog_PageList_DisableScrolling: "pagedsettings_PagedSettingsDialog_PageList_DisableScrolling_yTqIu", PagedSettingsDialog_PageListItem: "pagedsettings_PagedSettingsDialog_PageListItem_1-vlr", PageListItem_Icon: "pagedsettings_PageListItem_Icon_1rD8X", PageListItem_Title: "pagedsettings_PageListItem_Title_2PPbM", DisabledItem: "pagedsettings_DisabledItem_oUzYn", Active: "pagedsettings_Active_2DpXj", PageListSpacer: "pagedsettings_PageListSpacer_3HW2U", PageListSeparator: "pagedsettings_PageListSeparator_1Hye7", Transparent: "pagedsettings_Transparent_1ahzM", HidePageListButton: "pagedsettings_HidePageListButton_3LLH_", }; }, 66500: (e) => { e.exports = { Group: "radio_Group_1ml4S", Button: "radio_Button_Hijmc", Active: "radio_Active_3-_jM" }; }, 22820: (e) => { e.exports = { "duration-app-launch": "800ms", ReorderableListDialog: "reorderablelist_ReorderableListDialog_2NTC7", ModalHeader: "reorderablelist_ModalHeader_3JmF6", CloseButtonContainer: "reorderablelist_CloseButtonContainer_3Pp8L", ReorderableListIconIndexCtr: "reorderablelist_ReorderableListIconIndexCtr_3cPT1", Selected: "reorderablelist_Selected_3HlFd", ReorderableListIndexCtr: "reorderablelist_ReorderableListIndexCtr_bu2nP", ReorderArrow: "reorderablelist_ReorderArrow_1jEeo", ReorderableListIndex: "reorderablelist_ReorderableListIndex_3ZoWp", ReorderableListItemLabel: "reorderablelist_ReorderableListItemLabel_2HB1m", Disabled: "reorderablelist_Disabled_QkdPx", ReorderableListItem: "reorderablelist_ReorderableListItem_ZO8-r", BackgroundAnimation: "reorderablelist_BackgroundAnimation_3Jw1U", "ItemFocusAnim-darkerGrey-nocolor": "reorderablelist_ItemFocusAnim-darkerGrey-nocolor_T4rhf", "ItemFocusAnim-darkerGrey": "reorderablelist_ItemFocusAnim-darkerGrey_3gv_g", "ItemFocusAnim-darkGrey": "reorderablelist_ItemFocusAnim-darkGrey_2Uq4O", "ItemFocusAnim-grey": "reorderablelist_ItemFocusAnim-grey_8Gnfe", "ItemFocusAnim-translucent-white-10": "reorderablelist_ItemFocusAnim-translucent-white-10_3iJJl", "ItemFocusAnim-translucent-white-20": "reorderablelist_ItemFocusAnim-translucent-white-20_1bgRU", "ItemFocusAnimBorder-darkGrey": "reorderablelist_ItemFocusAnimBorder-darkGrey_108fZ", "ItemFocusAnim-green": "reorderablelist_ItemFocusAnim-green_1jzI2", focusAnimation: "reorderablelist_focusAnimation_3yn4k", hoverAnimation: "reorderablelist_hoverAnimation_3lmWT", }; }, 63561: (e) => { e.exports = { Toggle: "toggle_Toggle_3Sl0Q", Disabled: "toggle_Disabled_M8qsA", ToggleRail: "toggle_ToggleRail_2Fw7g", Highlight: "toggle_Highlight_2OUxg", On: "toggle_On_317le", Off: "toggle_Off_3blKB", ToggleSwitch: "toggle_ToggleSwitch_3IWp5", ToggleRow: "toggle_ToggleRow_1MBq0", Label: "toggle_Label_1Dhs8" }; }, 23663: (e) => { e.exports = { NewEmoticonIndicator: "emoticon_NewEmoticonIndicator_3O2gR", NewEmoticonCircle: "emoticon_NewEmoticonCircle_JRMFr", EmoticonSelector: "emoticon_EmoticonSelector_1_1QI", emoticon: "emoticon_emoticon_AB86v", large: "emoticon_large_4xBaT", EmoticonSelector_Emoticons: "emoticon_EmoticonSelector_Emoticons_XWWY6", EmoticonSelector_Separator: "emoticon_EmoticonSelector_Separator_2rvMU", EmoticonSelector_SeparatorBackground: "emoticon_EmoticonSelector_SeparatorBackground_3_kYc", EmoticonSelector_Controls: "emoticon_EmoticonSelector_Controls_2cdkF", EmoticonSelector_Item: "emoticon_EmoticonSelector_Item_2C8r7", EmoticonSelector_Item_New: "emoticon_EmoticonSelector_Item_New_1vWJH", EffectHeading: "emoticon_EffectHeading_2-uNY", StickerHeading: "emoticon_StickerHeading_3-4KS", GetFestive: "emoticon_GetFestive_1tX6q", TopDivider: "emoticon_TopDivider_2A8Fl", BottomDivider: "emoticon_BottomDivider_2IZ1K", StickerButton: "emoticon_StickerButton_3Wc3j", EffectButton: "emoticon_EffectButton_nnnSn", EmoticonHover: "emoticon_EmoticonHover_36iQ4", Info: "emoticon_Info_1EGMu", Name: "emoticon_Name_1Ancw", AppName: "emoticon_AppName_335w0", StickerHoverSticker: "emoticon_StickerHoverSticker_2VN79", EffectHoverEffect: "emoticon_EffectHoverEffect_3ngRv", PickerTab: "emoticon_PickerTab_3JpKJ", Clock: "emoticon_Clock_2osi8", EmoticonItem: "emoticon_EmoticonItem_gZL64", }; }, 95762: (e) => { e.exports = { Emoticon_Toggle: "emoticonsuggestion_Emoticon_Toggle_Y5J3n", Active: "emoticonsuggestion_Active_YCbwL", Emoticon: "emoticonsuggestion_Emoticon_2o57_" }; }, 29324: (e) => { e.exports = { Header1: "eventbbcodeparser_Header1_SPYFj", Header2: "eventbbcodeparser_Header2_QuKtT", Header3: "eventbbcodeparser_Header3_3s7cU", Link: "eventbbcodeparser_Link_29bMZ", LinkHost: "eventbbcodeparser_LinkHost_16eO9", LinkButton: "eventbbcodeparser_LinkButton_2HnDg", UnorderedList: "eventbbcodeparser_UnorderedList_2FoSx", OrderedList: "eventbbcodeparser_OrderedList_vV4Iw", StoreWidget: "eventbbcodeparser_StoreWidget_36Y-l", MedalTVWidget: "eventbbcodeparser_MedalTVWidget_1j2vi", LoyaltyRewardCtn: "eventbbcodeparser_LoyaltyRewardCtn_14p7R", SaleSectionCtn: "eventbbcodeparser_SaleSectionCtn_39HWX", SaleTextCtn: "eventbbcodeparser_SaleTextCtn_2Tqq0", ReminderCtn: "eventbbcodeparser_ReminderCtn_25AZk", BlockQuote: "eventbbcodeparser_BlockQuote_2cY7b", SocialLink: "eventbbcodeparser_SocialLink_2LAnc", SocialIcon: "eventbbcodeparser_SocialIcon_dDjYN", LocalizeBlock: "eventbbcodeparser_LocalizeBlock_1oBce", CheckMark: "eventbbcodeparser_CheckMark_24AtT", ScreenshotCarousel: "eventbbcodeparser_ScreenshotCarousel_3uA0h", }; }, 47013: (e) => { e.exports = { FlexColumnContainer: "eventreminder_FlexColumnContainer_15ufN", FullStartTime: "eventreminder_FullStartTime_1YLHW", ReminderDialog: "eventreminder_ReminderDialog_3YUEY", ReminderOptions: "eventreminder_ReminderOptions_1Tp8K", ReminderBackground: "eventreminder_ReminderBackground_TNf9_", ReminderExpandsLeft: "eventreminder_ReminderExpandsLeft_38Xly", ReminderOption: "eventreminder_ReminderOption_26nnh", Unverified: "eventreminder_Unverified_1dcmA", CheckboxWrapper: "eventreminder_CheckboxWrapper_1xuKE", ReminderCheckBox: "eventreminder_ReminderCheckBox_vPo2j", IconMode: "eventreminder_IconMode_1YjsR", RemindBell: "eventreminder_RemindBell_3-_M2", RemindCheck: "eventreminder_RemindCheck_2qaPr", ReminderDefault: "eventreminder_ReminderDefault_19p2Q", TextMode: "eventreminder_TextMode_553rC", ReminderCheck: "eventreminder_ReminderCheck_3fMhC", ReminderOpennedOptions: "eventreminder_ReminderOpennedOptions_vBuhk", ReminderOptionsHeader: "eventreminder_ReminderOptionsHeader_2oOZC", ReminderCalendarOptions: "eventreminder_ReminderCalendarOptions_VO6FS", ReminderSettings: "eventreminder_ReminderSettings_2Pn59", ReminderNotes: "eventreminder_ReminderNotes_3qE0w", RpcThrobber: "eventreminder_RpcThrobber_3F3aB", }; }, 70404: (e) => { e.exports = { "duration-app-launch": "800ms", PartnerEventFont: "partnereventshared_PartnerEventFont_LK4bX", Clear: "partnereventshared_Clear_3UhsQ", Divider: "partnereventshared_Divider_3B5HO", EventDefaultRowContainer: "partnereventshared_EventDefaultRowContainer_3WO6c", EventStartPublic: "partnereventshared_EventStartPublic_2LU_Y", EventOptions: "partnereventshared_EventOptions_2r_Qe", EventStatusContainer: "partnereventshared_EventStatusContainer_vOPSZ", FlexColumnContainer: "partnereventshared_FlexColumnContainer_1qhLq", FlexRowContainer: "partnereventshared_FlexRowContainer_Ke5f1", Centered: "partnereventshared_Centered_qy-9m", FlexContainSpaceBetween: "partnereventshared_FlexContainSpaceBetween_3nPGW", FlexRowWrapSpaceBetweenContainer: "partnereventshared_FlexRowWrapSpaceBetweenContainer_19CjI", FlexRowWrapFlexStartContainer: "partnereventshared_FlexRowWrapFlexStartContainer_tyP_c", SaveBackground: "partnereventshared_SaveBackground_V0mbI", SupportedGroupLabel: "partnereventshared_SupportedGroupLabel_APmJN", LanguageWithContent: "partnereventshared_LanguageWithContent_2Cd1u", LargeInput: "partnereventshared_LargeInput_fq68I", InputBorder: "partnereventshared_InputBorder_Obyys", RadioOption: "partnereventshared_RadioOption_3iJX1", FlexGrow: "partnereventshared_FlexGrow_1KvZA", EventEditorTextTitleCtn: "partnereventshared_EventEditorTextTitleCtn_htm7d", doclink: "partnereventshared_doclink_1-bAK", EventEditorUnpaddedTextTitle: "partnereventshared_EventEditorUnpaddedTextTitle_9hsCL", EventEditorTextTitle: "partnereventshared_EventEditorTextTitle_18fHx", EventEditorTextTitleLengthInfo: "partnereventshared_EventEditorTextTitleLengthInfo_2nHJ1", CollapsableSectionTitle: "partnereventshared_CollapsableSectionTitle_2zejQ", SectionTitle: "partnereventshared_SectionTitle_7Qc_e", EventSectionTitleCtn: "partnereventshared_EventSectionTitleCtn_onqWK", EventSectionTitle: "partnereventshared_EventSectionTitle_Idd_A", EventSectionSpacer: "partnereventshared_EventSectionSpacer_1Bloe", EventSectionMoreBtn: "partnereventshared_EventSectionMoreBtn_uckBi", EventEditorSpacerPadding: "partnereventshared_EventEditorSpacerPadding_1RBfN", EventEditorVisibilityCtn: "partnereventshared_EventEditorVisibilityCtn_1nqBh", EventEditorTextSubTitle: "partnereventshared_EventEditorTextSubTitle_1i_pY", FloatingTitle: "partnereventshared_FloatingTitle_31XRt", EventEditorEventStatus: "partnereventshared_EventEditorEventStatus_2JGoL", EventHidden: "partnereventshared_EventHidden_2H6fn", EventVisible: "partnereventshared_EventVisible_3Z0Qr", EventBarBackAndTitle: "partnereventshared_EventBarBackAndTitle_2rTjP", EventBarTitleCtn: "partnereventshared_EventBarTitleCtn_WfVze", EventBarTitle: "partnereventshared_EventBarTitle_29kVX", EventEditButtons: "partnereventshared_EventEditButtons_3nYmf", EventStatus: "partnereventshared_EventStatus_1sOFB", EventBarBack: "partnereventshared_EventBarBack_s3r9b", EditPreviewButton: "partnereventshared_EditPreviewButton_1FhZQ", Delete: "partnereventshared_Delete_32kR7", Disabled: "partnereventshared_Disabled_2wVCx", BrowseMoreButton: "partnereventshared_BrowseMoreButton_1Yrcl", Button: "partnereventshared_Button_1ABCO", Icon: "partnereventshared_Icon_1dDpS", Primary: "partnereventshared_Primary_30ipl", ClearThings: "partnereventshared_ClearThings_3x_qL", OnIndicator: "partnereventshared_OnIndicator_1GBsB", OffIndicator: "partnereventshared_OffIndicator_w0I94", IconImage: "partnereventshared_IconImage_2RY89", RightColumnContainer: "partnereventshared_RightColumnContainer_30-E9", EventPublishButton: "partnereventshared_EventPublishButton_3nIAe", FloatRight: "partnereventshared_FloatRight_1bzHf", TTip: "partnereventshared_TTip_2aWuk", ValveSupportOnly: "partnereventshared_ValveSupportOnly_wC6-U", ArtworkAgeNotAppropriate: "partnereventshared_ArtworkAgeNotAppropriate_3V64Z", EventDashboardHeader: "partnereventshared_EventDashboardHeader_2kZr_", ContainerSpaceBetween: "partnereventshared_ContainerSpaceBetween_3gYZG", EventDashboardTitles: "partnereventshared_EventDashboardTitles_1ym4r", EventDashboardActions: "partnereventshared_EventDashboardActions_2z_02", EventDashboardStatsCtn: "partnereventshared_EventDashboardStatsCtn_3IptF", EventDashboardAppCtn: "partnereventshared_EventDashboardAppCtn_2iPrK", maintitle: "partnereventshared_maintitle_vEk_z", AppTitle: "partnereventshared_AppTitle_l-Ow7", subtitle: "partnereventshared_subtitle_2mJfc", ValveOnlyBackground: "partnereventshared_ValveOnlyBackground_Jckrn", ValveOnlyAdminBackground: "partnereventshared_ValveOnlyAdminBackground_3HVu1", Columns: "partnereventshared_Columns_1oVIR", LeftCol: "partnereventshared_LeftCol_3PPz-", RightCol: "partnereventshared_RightCol_25xel", DropDownScroll: "partnereventshared_DropDownScroll_1CewB", DropDownScrollItem: "partnereventshared_DropDownScrollItem_3D3hC", CloseButton: "partnereventshared_CloseButton_gR2gS", CloseSectionTools: "partnereventshared_CloseSectionTools_1d0D9", HalfColumn: "partnereventshared_HalfColumn_3Xmp4", tooltip_Ctn: "partnereventshared_tooltip_Ctn_3nqxI", SaleEditorSpacing: "partnereventshared_SaleEditorSpacing_2ZGwd", SaleSectionHeader: "partnereventshared_SaleSectionHeader_2WMiQ", SaleSectionSubtitle: "partnereventshared_SaleSectionSubtitle_2rIaW", SaleSectionContainer: "partnereventshared_SaleSectionContainer_3gb3J", AddSectionButton: "partnereventshared_AddSectionButton_2_djj", EventElementRequired: "partnereventshared_EventElementRequired_12rm6", EventElementOptional: "partnereventshared_EventElementOptional_1mpG6", HelperTooltip: "partnereventshared_HelperTooltip_3T6MQ", PixelOffsetCtn: "partnereventshared_PixelOffsetCtn_3Xk96", PixelOffsetRow: "partnereventshared_PixelOffsetRow_2PtWb", PixelOffsetNote: "partnereventshared_PixelOffsetNote_JjEwa", PixelOffsetCallout: "partnereventshared_PixelOffsetCallout_f5QZT", Error: "partnereventshared_Error_mSSED", GamepadOnlyScrollPanel: "partnereventshared_GamepadOnlyScrollPanel_2NO6w", }; }, 44864: (e) => { e.exports = { SpeakerOuter: "presenterpopup_SpeakerOuter_3rRqP", Speaker: "presenterpopup_Speaker_3F7-F", SpeakerPopup: "presenterpopup_SpeakerPopup_3y7kV", SpeakerInfoOuter: "presenterpopup_SpeakerInfoOuter_1NC9n", SpeakerInfoInner: "presenterpopup_SpeakerInfoInner_1bMpE", SpeakerTitle: "presenterpopup_SpeakerTitle_2Vo0l", SpeakerBio: "presenterpopup_SpeakerBio_2yP7s", SpeakerHover: "presenterpopup_SpeakerHover_16UyH" }; }, 71411: (e) => { e.exports = { ErrorDiv: "saleeventbbcodeparser_ErrorDiv_XeZEx" }; }, 40155: (e) => { e.exports = { Dark: "footericons_Dark_2UAf_", Background: "footericons_Background_yjs9m", Foreground: "footericons_Foreground_JgT6Z", Light: "footericons_Light_1LgIo", Knockout: "footericons_Knockout_3BGwJ", SizeSmall: "footericons_SizeSmall_1Zc5j", SizeMedium: "footericons_SizeMedium_12wgo", SizeLarge: "footericons_SizeLarge_3E-9r", ChordSummary: "footericons_ChordSummary_2NB_h" }; }, 3987: (e) => { e.exports = { "duration-app-launch": "800ms", Heading: "managefriends_Heading_3kTQI", Body: "managefriends_Body_2s393", HeaderBlock: "managefriends_HeaderBlock_X9bYN", Background: "managefriends_Background_1xwi0", DimBackground: "managefriends_DimBackground_2N55H", Input: "managefriends_Input_1BUty", CopyContainer: "managefriends_CopyContainer_1HjkZ", Text: "managefriends_Text_1ehqR", Link: "managefriends_Link_18Sc0", Button: "managefriends_Button_2772E", GenerateLinkButton: "managefriends_GenerateLinkButton_T52tU", ProfileCard: "managefriends_ProfileCard_28a_C", UserContainer: "managefriends_UserContainer_29w-2", Image: "managefriends_Image_1n4lD", ProfileContent: "managefriends_ProfileContent_1qz9x", ProfileLink: "managefriends_ProfileLink_1tEt0", Failure: "managefriends_Failure_UoMCo", Success: "managefriends_Success_zNkyw", FriendCodeSelector: "managefriends_FriendCodeSelector_3nmSp", SendInviteButton: "managefriends_SendInviteButton_kcAlk" }; }, 96139: (e) => { e.exports = { Spinner: "gamepadui_svg_library_Spinner_3m_2l", SpinnerSpokeFade: "gamepadui_svg_library_SpinnerSpokeFade_2Wg5d", WirelessConnectingActive: "gamepadui_svg_library_WirelessConnectingActive_cop8-", WifiBar1: "gamepadui_svg_library_WifiBar1_1o6HA", WifiBar1Anim: "gamepadui_svg_library_WifiBar1Anim_1PDAZ", WifiBar2: "gamepadui_svg_library_WifiBar2_1q8-n", WifiBar2Anim: "gamepadui_svg_library_WifiBar2Anim_QyijT", WifiBar3: "gamepadui_svg_library_WifiBar3_23ih_", WifiBar3Anim: "gamepadui_svg_library_WifiBar3Anim_2wGDz", WifiBar4: "gamepadui_svg_library_WifiBar4_2DSRH", WifiBar4Anim: "gamepadui_svg_library_WifiBar4Anim_3jrA8", GenericGamepadHighlight: "gamepadui_svg_library_GenericGamepadHighlight_3-ZZD", GenericGamepadEmpty: "gamepadui_svg_library_GenericGamepadEmpty_1toTl" }; }, 49269: (e) => { e.exports = { "duration-app-launch": "800ms", PanelSection: "quickaccesscontrols_PanelSection_3gY0a", PanelSectionTitle: "quickaccesscontrols_PanelSectionTitle_1IigU", Text: "quickaccesscontrols_Text_1cokl", PanelSectionRow: "quickaccesscontrols_PanelSectionRow_3LM_Z", Label: "quickaccesscontrols_Label_2HohC", ComingSoon: "quickaccesscontrols_ComingSoon_3GXel", QuickAccessNotifications: "quickaccesscontrols_QuickAccessNotifications_2qO6x", VR: "quickaccesscontrols_VR_1sOgl", EmptyNotifications: "quickaccesscontrols_EmptyNotifications_1W8Ty", LowBattery: "quickaccesscontrols_LowBattery_3R8-d", ReallyLow: "quickaccesscontrols_ReallyLow_1iaw2", LowBatteryGauge: "quickaccesscontrols_LowBatteryGauge_yBJZj", Remaining: "quickaccesscontrols_Remaining_1tx3e", BatterySectionContainer: "quickaccesscontrols_BatterySectionContainer_2prtQ", BatteryIcon: "quickaccesscontrols_BatteryIcon_1BT6i", BatteryPercentageLabel: "quickaccesscontrols_BatteryPercentageLabel_3S2zx", BatteryDetailsLabels: "quickaccesscontrols_BatteryDetailsLabels_2jtM9", BatteryProjectedValue: "quickaccesscontrols_BatteryProjectedValue_3ISN8", BatteryProjectedLabel: "quickaccesscontrols_BatteryProjectedLabel_1N4s2", BackgroundAnimation: "quickaccesscontrols_BackgroundAnimation_nTEVK", "ItemFocusAnim-darkerGrey-nocolor": "quickaccesscontrols_ItemFocusAnim-darkerGrey-nocolor_2HixS", "ItemFocusAnim-darkerGrey": "quickaccesscontrols_ItemFocusAnim-darkerGrey_qTKB3", "ItemFocusAnim-darkGrey": "quickaccesscontrols_ItemFocusAnim-darkGrey_3s1Va", "ItemFocusAnim-grey": "quickaccesscontrols_ItemFocusAnim-grey_1DbWa", "ItemFocusAnim-translucent-white-10": "quickaccesscontrols_ItemFocusAnim-translucent-white-10_wzXlo", "ItemFocusAnim-translucent-white-20": "quickaccesscontrols_ItemFocusAnim-translucent-white-20_2l5JI", "ItemFocusAnimBorder-darkGrey": "quickaccesscontrols_ItemFocusAnimBorder-darkGrey_3wM82", "ItemFocusAnim-green": "quickaccesscontrols_ItemFocusAnim-green_1-PV8", focusAnimation: "quickaccesscontrols_focusAnimation_38pAq", hoverAnimation: "quickaccesscontrols_hoverAnimation_r9xRK", }; }, 52112: (e) => { e.exports = { ScrollFade: "scrollfade_ScrollFade_30Xro", ScrolledToTop: "scrollfade_ScrolledToTop_3bWn5", ScrolledToBottom: "scrollfade_ScrolledToBottom_2wvQS" }; }, 25548: (e) => { e.exports = { "duration-app-launch": "800ms", FriendsListInsetShadowCtn: "insetshadow_FriendsListInsetShadowCtn_1qeW3", FriendListInsetShadowTop: "insetshadow_FriendListInsetShadowTop_1osHa", FriendListInsetShadowBottom: "insetshadow_FriendListInsetShadowBottom_2OoTJ" }; }, 8314: (e) => { e.exports = { DateAndTime: "localdateandtime_DateAndTime_2V6GL", DateAndTimeInline: "localdateandtime_DateAndTimeInline_HZ6b2", At: "localdateandtime_At_Fn5EU", ActiveEvent: "localdateandtime_ActiveEvent_rT7Ek", ActiveEventCallOut: "localdateandtime_ActiveEventCallOut_2pJft", RightSideTitles: "localdateandtime_RightSideTitles_4LAnP", DateToolTip: "localdateandtime_DateToolTip_2E5LH", ShortDateAndTime: "localdateandtime_ShortDateAndTime_MBkkh", ShortDateRange: "localdateandtime_ShortDateRange_3CN6I" }; }, 53600: (e) => { e.exports = { BodyNoScroll: "modals_BodyNoScroll_1Xs5d", BodyNoScrollDialog: "modals_BodyNoScrollDialog_3jhMI", OverlayModal: "modals_OverlayModal_24YFX", GamepadOnlyModalWrapper: "modals_GamepadOnlyModalWrapper_1GlTs", GamepadOnlyPanelWrapper: "modals_GamepadOnlyPanelWrapper_1aY-r" }; }, 187: (e) => { e.exports = { QRBits: "qrcode_QRBits_3BALY", Bit: "qrcode_Bit_1YVDT", Active: "qrcode_Active_1zNnN" }; }, 87149: (e) => { e.exports = { SegmentedCharacterInput: "segmentedinputs_SegmentedCharacterInput_1gzkm", Disabled: "segmentedinputs_Disabled_4Wrcv", Danger: "segmentedinputs_Danger_3lEvx", BackupCode: "segmentedinputs_BackupCode_V5oAz", Loading: "segmentedinputs_Loading_3khV2", Input: "segmentedinputs_Input_3xcXq" }; }, 94729: (e) => { e.exports = { ManualOverlayContainer: "logsettings_ManualOverlayContainer_jKuCG", DropDownRow: "logsettings_DropDownRow_cv_p8", IconContainer: "logsettings_IconContainer_ka3_o", Label: "logsettings_Label_3ces1" }; }, 65059: (e) => { e.exports = { v6: "shared_common_v6_2Lxgd", SubText: "shared_common_SubText_vg0EO", AvatarImageContainer: "shared_common_AvatarImageContainer_33hdF", GameImageContainer: "shared_common_GameImageContainer_2OYAD", AvatarImage: "shared_common_AvatarImage_2CQYc", STV_HomeGridPreviewDetails: "shared_common_STV_HomeGridPreviewDetails_Yncr-", ChatAvatarImage: "shared_common_ChatAvatarImage_1cUR_", EditButton: "shared_common_EditButton_VsZ-b", Small: "shared_common_Small_3M4j8", FlexCenter: "shared_common_FlexCenter_1R3yc", ThrobberCtn: "shared_common_ThrobberCtn_3m7p6", MarkdownLink: "shared_common_MarkdownLink_1Wqum", SummaryTextArea: "shared_common_SummaryTextArea_cNMZ-", RemoveIcon: "shared_common_RemoveIcon_3NeLW" }; }, 35313: (e) => { e.exports = { "duration-app-launch": "800ms", EmoticonBow: "shared_svg_library_EmoticonBow_2Llzt", EmoticonBow_st0: "shared_svg_library_EmoticonBow_st0_Fw2WG", EmoticonBow_st1: "shared_svg_library_EmoticonBow_st1_luj0t", SteamDeckCompatInfo: "shared_svg_library_SteamDeckCompatInfo_3VPnv", SteamDeckCompatLogo: "shared_svg_library_SteamDeckCompatLogo_1dzQL", SteamDeckCompatIcon: "shared_svg_library_SteamDeckCompatIcon_3hAj0", SteamDeckCompatVerified: "shared_svg_library_SteamDeckCompatVerified_kEODD", SteamDeckCompatPlayable: "shared_svg_library_SteamDeckCompatPlayable_mPD42", SteamDeckCompatUnsupported: "shared_svg_library_SteamDeckCompatUnsupported_2LAax", SteamDeckCompatUnknown: "shared_svg_library_SteamDeckCompatUnknown_xBqU_" }; }, 87805: (e) => { e.exports = { "duration-app-launch": "800ms", mentionDialogPosition: "suggestdialog_mentionDialogPosition_3isL0", mentionDialog: "suggestdialog_mentionDialog_1QU3c", mentionSearchText: "suggestdialog_mentionSearchText_1xVcZ", suggestOption: "suggestdialog_suggestOption_vquL9", mentionSearchOption: "suggestdialog_mentionSearchOption_3O0sM", manyMatches: "suggestdialog_manyMatches_1cweL", selected: "suggestdialog_selected_boNOG", nickname: "suggestdialog_nickname_2dKJq", mentionSearchMatch: "suggestdialog_mentionSearchMatch_2_0t_" }; }, 54196: (e) => { e.exports = { LoadingWrapper: "throbber_LoadingWrapper_2wAKy", Static: "throbber_Static_1Qfwp", none: "throbber_none_1F0lz", bottomCircle: "throbber_bottomCircle_2qjZm", noString: "throbber_noString_1Sy0p", Throbber: "throbber_Throbber_lYUEj", throbber_small: "throbber_throbber_small_2zbyh", throbber_medium: "throbber_throbber_medium_2CphU", throbber_large: "throbber_throbber_large_1x18v", throbber_center_wrapper: "throbber_throbber_center_wrapper_3IYPz", ThrobberText: "throbber_ThrobberText_21nVi", blur: "throbber_blur_1ctjA", ThrobberRoundLoop: "throbber_ThrobberRoundLoop_1O-cW", roundOuterOutline: "throbber_roundOuterOutline_1Vv--", roundOuter: "throbber_roundOuter_2K0Lz", roundFill: "throbber_roundFill_3sQFk", ThrobberFillLoop: "throbber_ThrobberFillLoop_ofdi9", topCircle: "throbber_topCircle_1LZff", circlePulse: "throbber_circlePulse_1XN6Z", ThrobberTopCircleLoop: "throbber_ThrobberTopCircleLoop_1jALk", ThrobberBottomCircleLoop: "throbber_ThrobberBottomCircleLoop_1KvOg", roundThrobber15: "throbber_roundThrobber15_2LGHp", roundThrobber14: "throbber_roundThrobber14_2FGCn", roundThrobber13: "throbber_roundThrobber13_1X-5j", roundThrobber12: "throbber_roundThrobber12_1pj1Q", roundThrobber11: "throbber_roundThrobber11_xFmZa", roundThrobber10: "throbber_roundThrobber10_3MGYo", roundThrobber09: "throbber_roundThrobber09_ktVJ4", roundThrobber08: "throbber_roundThrobber08_3s_7m", roundThrobber07: "throbber_roundThrobber07_11MVp", roundThrobber06: "throbber_roundThrobber06_2cl-m", roundThrobber05: "throbber_roundThrobber05_3-JE0", roundThrobber04: "throbber_roundThrobber04_1xNIK", roundThrobber03: "throbber_roundThrobber03_1S17y", roundThrobber02: "throbber_roundThrobber02_1-oUJ", roundThrobber01: "throbber_roundThrobber01_2tXge", ThrobberRoundLoopThickness: "throbber_ThrobberRoundLoopThickness_1fs4R", throbber_xlarge: "throbber_throbber_xlarge_1gYeZ", throbber_xxlarge: "throbber_throbber_xxlarge_3j-p4", ThrobberDelayAppear: "throbber_ThrobberDelayAppear_I3aEq", Visible: "throbber_Visible_2SwSJ", NewThrobber: "throbber_NewThrobber_1m8iQ", }; }, 10491: (e) => { e.exports = { TextToolTip: "tooltip_TextToolTip_2FxbH", ToolTipCustom: "tooltip_ToolTipCustom_3XGRk", ToolTipTitle: "tooltip_ToolTipTitle_1LhVf", Center: "tooltip_Center_2ZDqE", ToolTipInsetContent: "tooltip_ToolTipInsetContent_i4LuY" }; }, 5430: (e) => { e.exports = { TransitionGroup: "overlappingtransition_TransitionGroup_2PuNB", ContentWrapper: "overlappingtransition_ContentWrapper_MGaAv" }; }, 37174: (e) => { e.exports = { confettiDurationMs: "7000s/s", goldfettiDurationMs: "7000s/s", goldfettiColorsNum: "3", goldfettiEmojiNum: "4", crackerDurationMs: "300s/s", balloonsDurationMs: "4000s/s", balloonsDurationS: "4s/s", balloonsDurationJitterS: "1s/s", balloonsDurationMaxMs: "5000s/s", snowballDurationMs: "3010s/s", snowballSpeed: "1s", "animation-container": "chatroomeffects_animation-container_3ZR8Q", Snowflake: "chatroomeffects_Snowflake_cZ5Au", "Snowflake-0": "chatroomeffects_Snowflake-0_2-hBh", "snowflake-0": "chatroomeffects_snowflake-0_U-YAV", "Snowflake-1": "chatroomeffects_Snowflake-1_2b67l", "snowflake-1": "chatroomeffects_snowflake-1_2Rb7w", "Snowflake-2": "chatroomeffects_Snowflake-2_2_NWs", "snowflake-2": "chatroomeffects_snowflake-2_1Y4tS", "Snowflake-3": "chatroomeffects_Snowflake-3_cBxtQ", "snowflake-3": "chatroomeffects_snowflake-3_3t5Lt", "Snowflake-4": "chatroomeffects_Snowflake-4_1JQNl", "snowflake-4": "chatroomeffects_snowflake-4_1vyLw", "Snowflake-5": "chatroomeffects_Snowflake-5_cUP1f", "snowflake-5": "chatroomeffects_snowflake-5_3louc", "Snowflake-6": "chatroomeffects_Snowflake-6_2F8cs", "snowflake-6": "chatroomeffects_snowflake-6_3Hfej", "Snowflake-7": "chatroomeffects_Snowflake-7_zJ9BE", "snowflake-7": "chatroomeffects_snowflake-7_nX1rZ", "Snowflake-8": "chatroomeffects_Snowflake-8_3BAdG", "snowflake-8": "chatroomeffects_snowflake-8_WFJba", "Snowflake-9": "chatroomeffects_Snowflake-9_2DNE8", "snowflake-9": "chatroomeffects_snowflake-9_1m6q0", "Snowflake-10": "chatroomeffects_Snowflake-10_19m8q", "snowflake-10": "chatroomeffects_snowflake-10_3HhrW", "Snowflake-11": "chatroomeffects_Snowflake-11_ijWSF", "snowflake-11": "chatroomeffects_snowflake-11_vukho", "Snowflake-12": "chatroomeffects_Snowflake-12_Ripsa", "snowflake-12": "chatroomeffects_snowflake-12_2KXNx", "Snowflake-13": "chatroomeffects_Snowflake-13__5IUE", "snowflake-13": "chatroomeffects_snowflake-13_35I49", "Snowflake-14": "chatroomeffects_Snowflake-14_pmIdk", "snowflake-14": "chatroomeffects_snowflake-14_1MH-J", "Snowflake-15": "chatroomeffects_Snowflake-15_2nQdH", "snowflake-15": "chatroomeffects_snowflake-15_ek7ku", "Snowflake-16": "chatroomeffects_Snowflake-16_lJyG7", "snowflake-16": "chatroomeffects_snowflake-16_20hUR", "Snowflake-17": "chatroomeffects_Snowflake-17_1L0AZ", "snowflake-17": "chatroomeffects_snowflake-17_3CfBV", "Snowflake-18": "chatroomeffects_Snowflake-18_1ozac", "snowflake-18": "chatroomeffects_snowflake-18_HP-ye", "Snowflake-19": "chatroomeffects_Snowflake-19_FOXzc", "snowflake-19": "chatroomeffects_snowflake-19_1d9D9", "Snowflake-20": "chatroomeffects_Snowflake-20_Qt7pR", "snowflake-20": "chatroomeffects_snowflake-20_2N-xe", confetti: "chatroomeffects_confetti_VelNh", "confetti-0": "chatroomeffects_confetti-0_tlO-i", "drop-0": "chatroomeffects_drop-0__37zJ", "confetti-1": "chatroomeffects_confetti-1_3OuSs", "drop-1": "chatroomeffects_drop-1_x-HP7", "confetti-2": "chatroomeffects_confetti-2_1mdZ0", "drop-2": "chatroomeffects_drop-2_3XfWb", "confetti-3": "chatroomeffects_confetti-3_36OCs", "drop-3": "chatroomeffects_drop-3_OTZKZ", "confetti-4": "chatroomeffects_confetti-4_3NbOc", "drop-4": "chatroomeffects_drop-4_1CAil", "confetti-5": "chatroomeffects_confetti-5_VnTYG", "drop-5": "chatroomeffects_drop-5_1pPPC", "confetti-6": "chatroomeffects_confetti-6_3KEfm", "drop-6": "chatroomeffects_drop-6_4Wj8s", "confetti-7": "chatroomeffects_confetti-7_1C-Ak", "drop-7": "chatroomeffects_drop-7_oHsjU", "confetti-8": "chatroomeffects_confetti-8_4oJYN", "drop-8": "chatroomeffects_drop-8_2y189", "confetti-9": "chatroomeffects_confetti-9_1bEjR", "drop-9": "chatroomeffects_drop-9_5c9w0", "confetti-10": "chatroomeffects_confetti-10_1oRBM", "drop-10": "chatroomeffects_drop-10_1L13_", "confetti-11": "chatroomeffects_confetti-11_3W9ZL", "drop-11": "chatroomeffects_drop-11_vYvGB", "confetti-12": "chatroomeffects_confetti-12_2TwZ0", "drop-12": "chatroomeffects_drop-12_3b2Dc", "confetti-13": "chatroomeffects_confetti-13_1m8Vr", "drop-13": "chatroomeffects_drop-13_2n4ZP", "confetti-14": "chatroomeffects_confetti-14_1YV6p", "drop-14": "chatroomeffects_drop-14_xQzPb", "confetti-15": "chatroomeffects_confetti-15_2D2LH", "drop-15": "chatroomeffects_drop-15_oKVqM", "confetti-16": "chatroomeffects_confetti-16_pvt2J", "drop-16": "chatroomeffects_drop-16_T5UBd", "confetti-17": "chatroomeffects_confetti-17_2NCF0", "drop-17": "chatroomeffects_drop-17_1d8Dj", "confetti-18": "chatroomeffects_confetti-18_o_Hf7", "drop-18": "chatroomeffects_drop-18_1zoqm", "confetti-19": "chatroomeffects_confetti-19_28L_3", "drop-19": "chatroomeffects_drop-19_1zkpz", "confetti-20": "chatroomeffects_confetti-20_P-SKX", "drop-20": "chatroomeffects_drop-20_2HmVc", "confetti-21": "chatroomeffects_confetti-21_27GkO", "drop-21": "chatroomeffects_drop-21_1T4Mt", "confetti-22": "chatroomeffects_confetti-22_1sCDh", "drop-22": "chatroomeffects_drop-22_2svz8", "confetti-23": "chatroomeffects_confetti-23_9SZ_A", "drop-23": "chatroomeffects_drop-23_3vAxI", "confetti-24": "chatroomeffects_confetti-24_1Am3e", "drop-24": "chatroomeffects_drop-24_RhAjb", "confetti-25": "chatroomeffects_confetti-25_1Ja7L", "drop-25": "chatroomeffects_drop-25_201NA", "confetti-26": "chatroomeffects_confetti-26_2jMUO", "drop-26": "chatroomeffects_drop-26_29n7q", "confetti-27": "chatroomeffects_confetti-27_2yQQd", "drop-27": "chatroomeffects_drop-27_2m3A7", "confetti-28": "chatroomeffects_confetti-28_1Qlxx", "drop-28": "chatroomeffects_drop-28_18frj", "confetti-29": "chatroomeffects_confetti-29_1b2l6", "drop-29": "chatroomeffects_drop-29_2Q2T3", "confetti-30": "chatroomeffects_confetti-30_1JH00", "drop-30": "chatroomeffects_drop-30_35aPE", "confetti-31": "chatroomeffects_confetti-31_Osdxn", "drop-31": "chatroomeffects_drop-31_3xx2U", "confetti-32": "chatroomeffects_confetti-32_f1SYA", "drop-32": "chatroomeffects_drop-32_215c3", "confetti-33": "chatroomeffects_confetti-33_g65ei", "drop-33": "chatroomeffects_drop-33_2oegr", "confetti-34": "chatroomeffects_confetti-34_2yCKI", "drop-34": "chatroomeffects_drop-34_3K9VA", "confetti-35": "chatroomeffects_confetti-35_3JsiR", "drop-35": "chatroomeffects_drop-35_5jMlo", "confetti-36": "chatroomeffects_confetti-36_R14L0", "drop-36": "chatroomeffects_drop-36_13yR4", "confetti-37": "chatroomeffects_confetti-37_24ZmD", "drop-37": "chatroomeffects_drop-37_2uYeL", "confetti-38": "chatroomeffects_confetti-38_25jbU", "drop-38": "chatroomeffects_drop-38_3BJYZ", "confetti-39": "chatroomeffects_confetti-39_8zwxi", "drop-39": "chatroomeffects_drop-39_2zKzQ", "confetti-40": "chatroomeffects_confetti-40_Du-Wg", "drop-40": "chatroomeffects_drop-40_3DiQ2", "confetti-41": "chatroomeffects_confetti-41_3LjK4", "drop-41": "chatroomeffects_drop-41_10ZGR", "confetti-42": "chatroomeffects_confetti-42_3u0x8", "drop-42": "chatroomeffects_drop-42_2GaWP", "confetti-43": "chatroomeffects_confetti-43_2Iip-", "drop-43": "chatroomeffects_drop-43_3zDFZ", "confetti-44": "chatroomeffects_confetti-44_2qI_Q", "drop-44": "chatroomeffects_drop-44_3G_AJ", "confetti-45": "chatroomeffects_confetti-45_3FUIw", "drop-45": "chatroomeffects_drop-45_1BAsF", "confetti-46": "chatroomeffects_confetti-46_2wAK3", "drop-46": "chatroomeffects_drop-46_1LOgZ", "confetti-47": "chatroomeffects_confetti-47_2dO3B", "drop-47": "chatroomeffects_drop-47_l_1GZ", "confetti-48": "chatroomeffects_confetti-48_2ud75", "drop-48": "chatroomeffects_drop-48_cnRU6", "confetti-49": "chatroomeffects_confetti-49_EX-pu", "drop-49": "chatroomeffects_drop-49_3ElNG", "confetti-50": "chatroomeffects_confetti-50_8qyUx", "drop-50": "chatroomeffects_drop-50_IlkNs", "confetti-51": "chatroomeffects_confetti-51_AtKXb", "drop-51": "chatroomeffects_drop-51_2msFB", "confetti-52": "chatroomeffects_confetti-52_1my5Z", "drop-52": "chatroomeffects_drop-52_1QnRe", "confetti-53": "chatroomeffects_confetti-53_2Cb1i", "drop-53": "chatroomeffects_drop-53_1CQh7", "confetti-54": "chatroomeffects_confetti-54_2VhA6", "drop-54": "chatroomeffects_drop-54_3hZKt", "confetti-55": "chatroomeffects_confetti-55_yL87g", "drop-55": "chatroomeffects_drop-55_3dM49", "confetti-56": "chatroomeffects_confetti-56_1xqgg", "drop-56": "chatroomeffects_drop-56_3SnEp", "confetti-57": "chatroomeffects_confetti-57_f9kuG", "drop-57": "chatroomeffects_drop-57_3DCDa", "confetti-58": "chatroomeffects_confetti-58_1O4Ku", "drop-58": "chatroomeffects_drop-58_3d1_1", "confetti-59": "chatroomeffects_confetti-59_XOFkR", "drop-59": "chatroomeffects_drop-59_1ZKa_", "confetti-60": "chatroomeffects_confetti-60_2iInd", "drop-60": "chatroomeffects_drop-60_3stXq", "confetti-61": "chatroomeffects_confetti-61_4hvgI", "drop-61": "chatroomeffects_drop-61_ENSW2", "confetti-62": "chatroomeffects_confetti-62_1vcmC", "drop-62": "chatroomeffects_drop-62_3gyQe", "confetti-63": "chatroomeffects_confetti-63_3dgPj", "drop-63": "chatroomeffects_drop-63_2047M", "confetti-64": "chatroomeffects_confetti-64_Cewk5", "drop-64": "chatroomeffects_drop-64_2YCRK", "confetti-65": "chatroomeffects_confetti-65_ciQUm", "drop-65": "chatroomeffects_drop-65_3kUQk", "confetti-66": "chatroomeffects_confetti-66_3a3mu", "drop-66": "chatroomeffects_drop-66_3DoHw", "confetti-67": "chatroomeffects_confetti-67_39YTy", "drop-67": "chatroomeffects_drop-67_Qb0h2", "confetti-68": "chatroomeffects_confetti-68_2zcwH", "drop-68": "chatroomeffects_drop-68_zRaTb", "confetti-69": "chatroomeffects_confetti-69_1O9Qn", "drop-69": "chatroomeffects_drop-69_oogaf", "confetti-70": "chatroomeffects_confetti-70_3wL25", "drop-70": "chatroomeffects_drop-70_ouiMF", "confetti-71": "chatroomeffects_confetti-71_2FN6I", "drop-71": "chatroomeffects_drop-71_y2t-j", "confetti-72": "chatroomeffects_confetti-72_2tgnG", "drop-72": "chatroomeffects_drop-72_3hLQt", "confetti-73": "chatroomeffects_confetti-73_-0y9h", "drop-73": "chatroomeffects_drop-73_-Wx7W", "confetti-74": "chatroomeffects_confetti-74_1_vWA", "drop-74": "chatroomeffects_drop-74_2L0XL", "confetti-75": "chatroomeffects_confetti-75_qNiwF", "drop-75": "chatroomeffects_drop-75_2iJw_", "confetti-76": "chatroomeffects_confetti-76_2Isn6", "drop-76": "chatroomeffects_drop-76_3MdvI", "confetti-77": "chatroomeffects_confetti-77_2bgtx", "drop-77": "chatroomeffects_drop-77_2ItPx", "confetti-78": "chatroomeffects_confetti-78_veCdx", "drop-78": "chatroomeffects_drop-78_3D9KT", "confetti-79": "chatroomeffects_confetti-79_5cczs", "drop-79": "chatroomeffects_drop-79_1x9H7", "confetti-80": "chatroomeffects_confetti-80_hz59y", "drop-80": "chatroomeffects_drop-80_2ZjKF", "confetti-81": "chatroomeffects_confetti-81_1rhSJ", "drop-81": "chatroomeffects_drop-81_tGBBf", "confetti-82": "chatroomeffects_confetti-82_1jWl7", "drop-82": "chatroomeffects_drop-82_26Ftm", "confetti-83": "chatroomeffects_confetti-83_1Veaf", "drop-83": "chatroomeffects_drop-83_2VByP", "confetti-84": "chatroomeffects_confetti-84_3_bdr", "drop-84": "chatroomeffects_drop-84_m6um-", "confetti-85": "chatroomeffects_confetti-85_9Zttw", "drop-85": "chatroomeffects_drop-85_2xtS5", "confetti-86": "chatroomeffects_confetti-86_2EJMi", "drop-86": "chatroomeffects_drop-86_2dudW", "confetti-87": "chatroomeffects_confetti-87_uys-9", "drop-87": "chatroomeffects_drop-87_1PZvt", "confetti-88": "chatroomeffects_confetti-88_24exN", "drop-88": "chatroomeffects_drop-88_5ZbRz", "confetti-89": "chatroomeffects_confetti-89_2yKbS", "drop-89": "chatroomeffects_drop-89_1s66w", "confetti-90": "chatroomeffects_confetti-90_2tEzr", "drop-90": "chatroomeffects_drop-90_1dLha", "confetti-91": "chatroomeffects_confetti-91_3T4UL", "drop-91": "chatroomeffects_drop-91_P_MRR", "confetti-92": "chatroomeffects_confetti-92_7p5vh", "drop-92": "chatroomeffects_drop-92_1Mwkv", "confetti-93": "chatroomeffects_confetti-93_2BaTW", "drop-93": "chatroomeffects_drop-93_3NCsF", "confetti-94": "chatroomeffects_confetti-94_3DVf7", "drop-94": "chatroomeffects_drop-94_fZgnW", "confetti-95": "chatroomeffects_confetti-95_23jtb", "drop-95": "chatroomeffects_drop-95_1tw1t", "confetti-96": "chatroomeffects_confetti-96_2CxeZ", "drop-96": "chatroomeffects_drop-96_37GFJ", "confetti-97": "chatroomeffects_confetti-97_qoLlt", "drop-97": "chatroomeffects_drop-97_v1bhd", "confetti-98": "chatroomeffects_confetti-98_3Po3_", "drop-98": "chatroomeffects_drop-98_1TcCu", "confetti-99": "chatroomeffects_confetti-99_2-vdA", "drop-99": "chatroomeffects_drop-99_3lQGo", cracker: "chatroomeffects_cracker_k_Aq7", "cracker-left": "chatroomeffects_cracker-left_IBSjh", "cracker-right": "chatroomeffects_cracker-right_3M0en", goldfetti: "chatroomeffects_goldfetti_2oOnq", "goldfetti-fragment": "chatroomeffects_goldfetti-fragment_oRJxW", "goldfetti-color-1": "chatroomeffects_goldfetti-color-1_2zN8S", "goldfetti-color-2": "chatroomeffects_goldfetti-color-2_1fchb", "goldfetti-color-3": "chatroomeffects_goldfetti-color-3_2pBYi", "goldfetti-emoji-1": "chatroomeffects_goldfetti-emoji-1_33y_B", "goldfetti-emoji-2": "chatroomeffects_goldfetti-emoji-2_oOIEt", "goldfetti-emoji-3": "chatroomeffects_goldfetti-emoji-3_1oNfH", "goldfetti-emoji-4": "chatroomeffects_goldfetti-emoji-4_YFAWN", balloons: "chatroomeffects_balloons_2_1pf", lantern_glow: "chatroomeffects_lantern_glow_v2QAm", snowball_fragment: "chatroomeffects_snowball_fragment_VMzCI", "snowball-container": "chatroomeffects_snowball-container_UvZyS", snowball: "chatroomeffects_snowball_2buSf", SnowballImage: "chatroomeffects_SnowballImage_2_42e", SnowballImageCW: "chatroomeffects_SnowballImageCW_1Tf0O", "snowball-rotate-cw": "chatroomeffects_snowball-rotate-cw_1x1_6", SnowballImageCCW: "chatroomeffects_SnowballImageCCW_3NMkR", "snowball-rotate-ccw": "chatroomeffects_snowball-rotate-ccw_2U4NC", "snowball-path": "chatroomeffects_snowball-path_3gxEb", "snowball-residue": "chatroomeffects_snowball-residue_1aw_2", "snowball-chunk": "chatroomeffects_snowball-chunk_379oU", "snowball-chunk-1": "chatroomeffects_snowball-chunk-1_7DFP9", "snowball-chunk-2": "chatroomeffects_snowball-chunk-2_2TZ3i", "snowball-chunk-3": "chatroomeffects_snowball-chunk-3_2dgXy", "snowball-chunk-4": "chatroomeffects_snowball-chunk-4_9zq4T", "slide-out-tl": "chatroomeffects_slide-out-tl_2vxAr", "slide-out-tr": "chatroomeffects_slide-out-tr_1UxlH", "slide-out-bottom": "chatroomeffects_slide-out-bottom_2bNZV", pyro: "chatroomeffects_pyro_1uf8l", before: "chatroomeffects_before_35CE-", after: "chatroomeffects_after_1tbcr", bang: "chatroomeffects_bang_3GL2k", gravity: "chatroomeffects_gravity_S4aDc", position: "chatroomeffects_position_15NGb", pyroBodyShake: "chatroomeffects_pyroBodyShake_3E298", "pyro-body-shake": "chatroomeffects_pyro-body-shake_38sc5", pyroBodyShake2: "chatroomeffects_pyroBodyShake2_1Ti3z", "pyro-body-shake2": "chatroomeffects_pyro-body-shake2_3qwwM", FireworkPath: "chatroomeffects_FireworkPath_1Bk7_", "firework-path-animation": "chatroomeffects_firework-path-animation_Mm8cl", FireworkContainer: "chatroomeffects_FireworkContainer_1aN3b", FireworkPNG: "chatroomeffects_FireworkPNG_EHDSM", balloon_small_1: "chatroomeffects_balloon_small_1_h2Q7G", balloon_move_right: "chatroomeffects_balloon_move_right_8PLpZ", balloon_move_left: "chatroomeffects_balloon_move_left_tgIbt", balloon_big_1: "chatroomeffects_balloon_big_1_1TGq_", balloon_big_2: "chatroomeffects_balloon_big_2_1dSX8", balloon_small_2: "chatroomeffects_balloon_small_2_2SLtS", balloon_small_3: "chatroomeffects_balloon_small_3_3-4lC", "snowball-path-1": "chatroomeffects_snowball-path-1_2XM4v", "snowball-path-2": "chatroomeffects_snowball-path-2_1rYsb", "snowball-path-3": "chatroomeffects_snowball-path-3_3EhG3", "snowball-path-4": "chatroomeffects_snowball-path-4_oIEK7", "snowball-path-5": "chatroomeffects_snowball-path-5_1nGpu", "snowball-path-6": "chatroomeffects_snowball-path-6_2bquC", fireworkBigX: "chatroomeffects_fireworkBigX_3EASz", fireworkBigY: "chatroomeffects_fireworkBigY_3HtJy", fireworkSmallX: "chatroomeffects_fireworkSmallX_xZrme", fireworkSmallY: "chatroomeffects_fireworkSmallY_Vy4av", fireworkLongX: "chatroomeffects_fireworkLongX_1h91p", fireworkLongY: "chatroomeffects_fireworkLongY_3f3gs", }; }, 95126: (e, t, n) => { var i = { "./af": 1009, "./af.js": 1009, "./ar": 88769, "./ar-dz": 23739, "./ar-dz.js": 23739, "./ar-kw": 93745, "./ar-kw.js": 93745, "./ar-ly": 99576, "./ar-ly.js": 99576, "./ar-ma": 67408, "./ar-ma.js": 67408, "./ar-ps": 13857, "./ar-ps.js": 13857, "./ar-sa": 48781, "./ar-sa.js": 48781, "./ar-tn": 87856, "./ar-tn.js": 87856, "./ar.js": 88769, "./az": 2030, "./az.js": 2030, "./be": 56476, "./be.js": 56476, "./bg": 25304, "./bg.js": 25304, "./bm": 48125, "./bm.js": 48125, "./bn": 34, "./bn-bd": 29835, "./bn-bd.js": 29835, "./bn.js": 34, "./bo": 64082, "./bo.js": 64082, "./br": 8317, "./br.js": 8317, "./bs": 93107, "./bs.js": 93107, "./ca": 68272, "./ca.js": 68272, "./cs": 98567, "./cs.js": 98567, "./cv": 61583, "./cv.js": 61583, "./cy": 10076, "./cy.js": 10076, "./da": 31760, "./da.js": 31760, "./de": 8973, "./de-at": 63214, "./de-at.js": 63214, "./de-ch": 74728, "./de-ch.js": 74728, "./de.js": 8973, "./dv": 54053, "./dv.js": 54053, "./el": 7499, "./el.js": 7499, "./en-au": 67876, "./en-au.js": 67876, "./en-ca": 47010, "./en-ca.js": 47010, "./en-gb": 34239, "./en-gb.js": 34239, "./en-ie": 99830, "./en-ie.js": 99830, "./en-il": 28438, "./en-il.js": 28438, "./en-in": 25322, "./en-in.js": 25322, "./en-nz": 43264, "./en-nz.js": 43264, "./en-sg": 55449, "./en-sg.js": 55449, "./eo": 39486, "./eo.js": 39486, "./es": 32430, "./es-do": 16310, "./es-do.js": 16310, "./es-mx": 27038, "./es-mx.js": 27038, "./es-us": 73099, "./es-us.js": 73099, "./es.js": 32430, "./et": 34975, "./et.js": 34975, "./eu": 87063, "./eu.js": 87063, "./fa": 68073, "./fa.js": 68073, "./fi": 50957, "./fi.js": 50957, "./fil": 8764, "./fil.js": 8764, "./fo": 81775, "./fo.js": 81775, "./fr": 74179, "./fr-ca": 14306, "./fr-ca.js": 14306, "./fr-ch": 73791, "./fr-ch.js": 73791, "./fr.js": 74179, "./fy": 47014, "./fy.js": 47014, "./ga": 46911, "./ga.js": 46911, "./gd": 62958, "./gd.js": 62958, "./gl": 87344, "./gl.js": 87344, "./gom-deva": 33161, "./gom-deva.js": 33161, "./gom-latn": 35798, "./gom-latn.js": 35798, "./gu": 68485, "./gu.js": 68485, "./he": 27917, "./he.js": 27917, "./hi": 52159, "./hi.js": 52159, "./hr": 95842, "./hr.js": 95842, "./hu": 30005, "./hu.js": 30005, "./hy-am": 51312, "./hy-am.js": 51312, "./id": 60781, "./id.js": 60781, "./is": 64101, "./is.js": 64101, "./it": 43467, "./it-ch": 4759, "./it-ch.js": 4759, "./it.js": 43467, "./ja": 44164, "./ja.js": 44164, "./jv": 70079, "./jv.js": 70079, "./ka": 57036, "./ka.js": 57036, "./kk": 92022, "./kk.js": 92022, "./km": 63418, "./km.js": 63418, "./kn": 43655, "./kn.js": 43655, "./ko": 30986, "./ko.js": 30986, "./ku": 91902, "./ku-kmr": 16513, "./ku-kmr.js": 16513, "./ku.js": 91902, "./ky": 4604, "./ky.js": 4604, "./lb": 99026, "./lb.js": 99026, "./lo": 20537, "./lo.js": 20537, "./lt": 22288, "./lt.js": 22288, "./lv": 1495, "./lv.js": 1495, "./me": 60690, "./me.js": 60690, "./mi": 2571, "./mi.js": 2571, "./mk": 93959, "./mk.js": 93959, "./ml": 97225, "./ml.js": 97225, "./mn": 88, "./mn.js": 88, "./mr": 46622, "./mr.js": 46622, "./ms": 11070, "./ms-my": 48899, "./ms-my.js": 48899, "./ms.js": 11070, "./mt": 63931, "./mt.js": 63931, "./my": 95393, "./my.js": 95393, "./nb": 4274, "./nb.js": 4274, "./ne": 8914, "./ne.js": 8914, "./nl": 33114, "./nl-be": 68479, "./nl-be.js": 68479, "./nl.js": 33114, "./nn": 4513, "./nn.js": 4513, "./oc-lnc": 46549, "./oc-lnc.js": 46549, "./pa-in": 28264, "./pa-in.js": 28264, "./pl": 32848, "./pl.js": 32848, "./pt": 90899, "./pt-br": 55077, "./pt-br.js": 55077, "./pt.js": 90899, "./ro": 92512, "./ro.js": 92512, "./ru": 21753, "./ru.js": 21753, "./sd": 16840, "./sd.js": 16840, "./se": 78362, "./se.js": 78362, "./si": 50464, "./si.js": 50464, "./sk": 66324, "./sk.js": 66324, "./sl": 41963, "./sl.js": 41963, "./sq": 53039, "./sq.js": 53039, "./sr": 93454, "./sr-cyrl": 10466, "./sr-cyrl.js": 10466, "./sr.js": 93454, "./ss": 95158, "./ss.js": 95158, "./sv": 28859, "./sv.js": 28859, "./sw": 57594, "./sw.js": 57594, "./ta": 26915, "./ta.js": 26915, "./te": 15677, "./te.js": 15677, "./tet": 92154, "./tet.js": 92154, "./tg": 74098, "./tg.js": 74098, "./th": 89071, "./th.js": 89071, "./tk": 49381, "./tk.js": 49381, "./tl-ph": 1869, "./tl-ph.js": 1869, "./tlh": 92346, "./tlh.js": 92346, "./tr": 71483, "./tr.js": 71483, "./tzl": 30266, "./tzl.js": 30266, "./tzm": 33138, "./tzm-latn": 32960, "./tzm-latn.js": 32960, "./tzm.js": 33138, "./ug-cn": 29456, "./ug-cn.js": 29456, "./uk": 50805, "./uk.js": 50805, "./ur": 61127, "./ur.js": 61127, "./uz": 29628, "./uz-latn": 80840, "./uz-latn.js": 80840, "./uz.js": 29628, "./vi": 56962, "./vi.js": 56962, "./x-pseudo": 49257, "./x-pseudo.js": 49257, "./yo": 62423, "./yo.js": 62423, "./zh-cn": 61002, "./zh-cn.js": 61002, "./zh-hk": 6046, "./zh-hk.js": 6046, "./zh-mo": 36903, "./zh-mo.js": 36903, "./zh-tw": 24710, "./zh-tw.js": 24710, }; function o(e) { var t = r(e); return n(t); } function r(e) { if (!n.o(i, e)) { var t = new Error("Cannot find module '" + e + "'"); throw ((t.code = "MODULE_NOT_FOUND"), t); } return i[e]; } (o.keys = function () { return Object.keys(i); }), (o.resolve = r), (e.exports = o), (o.id = 95126); }, 19953: (e, t, n) => { "use strict"; n.d(t, { De: () => i.De, E_: () => i.E_, Ek: () => i.Ek, Kc: () => i.Kc, L7: () => i.L7, id: () => i.id }); var i = n(10553); }, 4853: (e, t, n) => { "use strict"; var i = n(85556), o = n(19953), r = n(62553), a = n(14206), s = n.n(a), l = n(1736), c = n(2049), m = n(79588), d = n(11612), h = n(88991), u = n(93635); class p { constructor(e, t) { (this.m_bLogonFailed = !1), (this.m_bForcedDisconnect = !1), (this.m_eSteamRealm = d.IN.k_ESteamRealmUnknown), (this.m_bConnectSucceeded = !1), (this.m_bEverConnected = !1), (this.m_bEverLoggedOn = !1), (this.m_cConsecutiveConnectionFailures = 0), (this.m_bWaitingToReconnect = !1), (this.m_rgdtRecentFailures = []), (this.m_eWebLogonState = 0), (0, m.rC)(this), (this.m_CMInterface = e), (this.m_eSteamRealm = t), this.m_CMInterface.AddOnDisconnectCallback(this.OnCMDisconnected), this.m_CMInterface.AddOnLogonCallback(this.OnCMLoggedOn), this.m_CMInterface.messageHandlers.RegisterEMessageHandler(757, r.bL, (e) => { 34 == e.Body().eresult() && ((this.m_eWebLogonState = 15), (this.m_bWaitingToReconnect = !0)); }); } get web_logon_state() { return this.m_eWebLogonState; } BIsInInitialConnect() { return 1 == this.m_eWebLogonState || 5 == this.m_eWebLogonState; } BIsWaitingToReconnect() { return this.m_bWaitingToReconnect; } BWillAutoReconnect() { return void 0 !== this.m_iTimeoutRetryLogon; } ClearRetryTimeout() { this.m_iTimeoutRetryLogon && (window.clearTimeout(this.m_iTimeoutRetryLogon), (this.m_iTimeoutRetryLogon = void 0)); } GetMSUntilNextReconnectAttempt() { return this.m_dtNextLogonAttempt ? Math.max(0, this.m_dtNextLogonAttempt.getTime() - new Date().getTime()) : 0; } ReconnectNow() { this.m_bWaitingToReconnect && ((this.m_rgdtRecentFailures = []), this.RetryLogin()); } OnCMDisconnected(e) { if (13 != this.m_eWebLogonState && 14 != this.m_eWebLogonState && 15 != this.m_eWebLogonState) { if (this.m_bForcedDisconnect) return (this.m_bForcedDisconnect = !1), void this.RetryLogin(); for (; this.m_rgdtRecentFailures.length >= 24; ) this.m_rgdtRecentFailures.shift(); if ((this.m_rgdtRecentFailures.push(new Date()), this.m_bConnectSucceeded && !this.m_CMInterface.session.m_bWaitingForLogonResponse)) { let e = this.m_CMInterface.session.m_eResultLogonSuccess; this.m_eWebLogonState = 1 != e ? (this.m_bEverLoggedOn ? 6 : 8) : 10; } else this.m_eWebLogonState = this.m_bEverConnected ? 10 : 2; this.m_cConsecutiveConnectionFailures++, e || this.RescheduleLogin(); } } OnCMLoggedOn() { (this.m_eWebLogonState = 9), (this.m_bEverLoggedOn = !0), (this.m_cConsecutiveConnectionFailures = 0); } PerformInitialLogon(e) { e.token_use_id && (window.sessionStorage.getItem("token_use_id") == e.token_use_id ? (console.log("In-page token has already been consumed, requesting a new token."), (e = null)) : window.sessionStorage.setItem("token_use_id", e.token_use_id)), this.PerformWebLogOn(e); } PerformWebLogOn(e) { if (((this.m_bConnectSucceeded = !1), (this.m_eWebLogonState = this.m_bEverConnected ? 3 : 1), !(e && e.steamid && e.token && e.account_name))) return void this.RetryLogin(); (o.L7.steamid = e.steamid), (o.L7.accountid = new h.K(e.steamid).GetAccountID()), (o.L7.account_name = e.account_name); let t = l.gA.Init(r.p$, 5514); t.Body().set_account_name(e.account_name), t.Body().set_protocol_version(65580), t.Body().set_qos_level(2), t.Body().set_client_os_type(4294966596), t.Body().set_ui_mode(3), t.Body().set_chat_mode(2), t.Body().set_web_logon_nonce(e.token), t.Hdr().set_steamid(e.steamid), (function (e, t) { switch (t) { case d.IN.k_ESteamRealmChina: e.Body().set_launcher_type(7); break; case d.IN.k_ESteamRealmGlobal: break; default: (0, u.X)(!1, "Unknown realm: " + t); } })(t, this.m_eSteamRealm), this.m_CMInterface.session.m_nSessionIDLast && t.Body().set_last_session_id(this.m_CMInterface.session.m_nSessionIDLast >>> 0), t.Body().set_client_instance_id(this.m_CMInterface.session.m_nClientInstanceID), this.m_CMInterface.Connect().then(() => { (o.L7.logged_in = !0), (this.m_bConnectSucceeded = !0), (this.m_bEverConnected = !0), (this.m_eWebLogonState = this.m_bEverLoggedOn ? 7 : 5), this.m_CMInterface.Send(t); }); } RetryLogin() { if (((this.m_bWaitingToReconnect = !1), this.ClearRetryTimeout(), this.m_CMInterface.BIsConnected() && this.m_bConnectSucceeded)) return (this.m_bForcedDisconnect = !0), void this.m_CMInterface.ForceDisconnect(); (0, u.X)(11 != this.m_eWebLogonState, "RetryLogin called while request in flight"), 11 != this.m_eWebLogonState && ((this.m_eWebLogonState = 11), this.m_CMInterface.Connect().catch(() => {}), s() .get(o.De.TOKEN_URL, { method: "POST" }) .then((e) => { let t = e.data; if (t.logged_in && t.steamid && t.token && t.account_name) { let e = new h.K(t.steamid); this.m_bEverLoggedOn && this.m_CMInterface.steamid.GetAccountID() != e.GetAccountID() ? ((this.m_eWebLogonState = 14), this.m_CMInterface.ForceDisconnect()) : this.PerformWebLogOn(t); } else (this.m_eWebLogonState = 13), this.m_CMInterface.ForceDisconnect(); }) .catch((e) => { (this.m_eWebLogonState = 12), this.RescheduleLogin(); })); } RescheduleLogin() { let e = 0, t = 0, n = new Date(); for (let i of this.m_rgdtRecentFailures) i.getTime() >= n.getTime() - 6e4 ? e++ : i.getTime() >= n.getTime() - 36e5 && t++; t += e; let i = this.m_cConsecutiveConnectionFailures + e; if (i <= 2) this.RetryLogin(); else if (i <= 10 && t <= 10) { let e = 5e3 * (i - 2); (this.m_dtNextLogonAttempt = new Date(new Date().getTime() + e)), (this.m_bWaitingToReconnect = !0), this.ClearRetryTimeout(), (this.m_iTimeoutRetryLogon = window.setTimeout(() => { (this.m_dtNextLogonAttempt = void 0), this.RetryLogin(); }, e)); } else this.m_bWaitingToReconnect = !0; } } (0, i.gn)([m.LO], p.prototype, "m_eWebLogonState", void 0), (0, i.gn)([c.ak], p.prototype, "OnCMDisconnected", null), (0, i.gn)([c.ak], p.prototype, "OnCMLoggedOn", null); var _ = n(37234), g = n(63036), C = n(66035), f = n(91300), v = n(62902), S = n(24782), b = n(10553), I = n(23282), y = n(76262), E = n(40786), D = n(6181), w = n(85105), R = n(22394); class A { constructor(e = !1) { (this.m_bRunOnce = !1), (this.m_ClientConnectionCallbacks = new R.pB()), (this.m_mapServerTypeCallbacks = new Map()), (this.m_bRunOnce = e); } RunCallbacks(e, ...t) { void 0 === e ? (this.m_ClientConnectionCallbacks.Dispatch(...t), this.m_bRunOnce && this.m_ClientConnectionCallbacks.ClearAllCallbacks()) : this.m_mapServerTypeCallbacks.has(e) && (this.m_mapServerTypeCallbacks.get(e).Dispatch(...t), this.m_bRunOnce && this.m_mapServerTypeCallbacks.delete(e)); } RunAllCallbacks(e, ...t) { this.RunCallbacks(void 0, ...t), e.forEach((e) => this.RunCallbacks(e, ...t)); } AddCallback(e, t) { let n = this.m_ClientConnectionCallbacks; return void 0 !== t && (this.m_mapServerTypeCallbacks.has(t) || this.m_mapServerTypeCallbacks.set(t, new R.pB()), (n = this.m_mapServerTypeCallbacks.get(t))), n.Register(e); } } function M(e, t) { return () => { try { e(); } catch (e) { console.error(`Error in ${t} callback:`, e); } }; } class k { constructor() { (this.m_steamid = new h.K()), (this.m_bLoggedOn = !1), (this.m_bCompletedInitialConnect = !1), (this.m_unAccountFlags = 0), (this.m_strIPCountry = ""), (this.m_strPersonaName = ""), (this.m_rtReconnectThrottleStart = 0), (this.m_rtReconnectThrottleExpiration = 0), (this.m_bConnected = !1), (this.m_bConnectionFailed = !1), (this.m_setConnectedServers = new Set()), (this.m_callbacksOnConnectOneTime = new A(!0)), (this.m_callbacksOnConnect = new A()), (this.m_callbacksOnDisconnect = new A()), (this.m_bForceDisconnect = !1), (this.m_bPerformedInitialClockAdjustment = !1), (this.m_nWallClockDriftMS = 0), (this.m_nPerfClockServerMSOffset = new Date().getTime() - performance.now()), (this.m_messageHandlers = new E.N()), (this.ClientServersAvailableHandler = this.m_messageHandlers.RegisterEMessageAction(5501, w.f9, (e) => { let t = new Set(this.m_setConnectedServers); for (let n of e.Body().server_types_available()) { let e = n.server(); void 0 !== e && (this.m_bLoggedOn && ((this.m_setConnectedServers.has(e) && !n.changed()) || (n.changed() && this.m_setConnectedServers.has(e) && this.m_callbacksOnDisconnect.RunCallbacks(e, !1), this.m_callbacksOnConnect.RunCallbacks(e), this.m_callbacksOnConnectOneTime.RunCallbacks(e))), this.m_setConnectedServers.add(e), t.delete(e)); } t.forEach((e) => { this.m_setConnectedServers.delete(e), this.m_bLoggedOn && this.m_callbacksOnDisconnect.RunCallbacks(e, !1); }); })), (0, m.rC)(this), (this.m_ServiceTransport = { SendMsg: (e, t, n) => ((void 0 !== t.GetEMsg() && 9804 == t.GetEMsg()) || t.SetEMsg(151), t.Hdr().set_target_job_name(e), this.SendMsgAndAwaitResponse(t, n)), SendNotification: (e, t) => ((void 0 !== t.GetEMsg() && 9804 == t.GetEMsg()) || t.SetEMsg(151), t.Hdr().set_target_job_name(e), this.Send(t)), MakeReady: this.MakeReady.bind(this) }), window && window.addEventListener && window.addEventListener("unload", (e) => { this.ForceDisconnect(); }); } get steamid() { return this.m_steamid; } get logged_on() { return this.m_bLoggedOn; } get persona_name() { return this.m_strPersonaName; } get messageHandlers() { return this.m_messageHandlers; } get rtReconnectThrottleStart() { return this.m_rtReconnectThrottleStart; } get rtReconnectThrottleExpiration() { return this.m_rtReconnectThrottleExpiration; } BDisconnected() { return !this.logged_on && this.m_steamid.BIsValid(); } BConnectedToServer(e) { return void 0 === e ? this.m_bLoggedOn : this.m_setConnectedServers.has(e); } get has_completed_initial_connect() { return this.m_bCompletedInitialConnect; } get account_flags() { return this.m_unAccountFlags; } GetServiceTransport() { return this.m_ServiceTransport; } GetAnonymousServiceTransport() { return this.m_ServiceTransport; } MakeReady() { return SteamClient.User.Connect(); } RunWhenLoggedOn(e, t) { let n = M(e, "RunWhenLoggedOn"); this.BConnectedToServer(t) ? n() : this.m_callbacksOnConnectOneTime.AddCallback(n, t); } WaitUntilLoggedOn() { return new Promise((e) => this.RunWhenLoggedOn(e)); } AddOnLogonCallback(e, t) { let n = M(e, "AddOnLogonCallback"); return this.BConnectedToServer(t) && n(), this.m_callbacksOnConnect.AddCallback(n, t); } AddOnDisconnectCallback(e, t) { let n = (function (e, t) { return (n) => { try { e(n); } catch (e) { console.error(`Error in ${t} callback:`, e); } }; })(e, "AddOnDisconnectCallback"); return this.m_callbacksOnDisconnect.AddCallback(n, t); } ForceDisconnect() { (this.m_bForceDisconnect = !0), this.Disconnect(); } Send(e) { return !!this.BIsConnected() && (this.DEBUG_LogCMInterfaceActivity(e, "send"), this.SendInternal(e)); } BInternalShouldDispatchMessage(e) { return !0; } ResolveAwaitWithTransportError(e, t, n, i) { let o = l.gA.Init(t); o.Hdr().set_eresult(2), o.Hdr().set_transport_error(n), i && o.Hdr().set_error_message(i), e(o); } DispatchMessage(e) { try { if (!this.BInternalShouldDispatchMessage(e)) return; if (e.BIsValid()) { let t = (t) => { t.Hdr().set_jobid_target(e.Hdr().jobid_source()), this.Send(t); }; this.m_messageHandlers.DispatchMsgToHandlers(e, t) || this.DEBUG_LogCMInterfaceActivity(e, "receive", !1); } else console.error("CMInterface RECV could not parse message of type " + (0, D.SR)(e.GetEMsg()) + " " + e.GetEMsg()); } catch (t) { console.error(`CMInterface RECV exception thrown while processing message of type ${(0, D.SR)(e.GetEMsg())}`, t), e.DEBUG_LogToConsole(); } } BIsConnected() { return this.m_bConnected; } OnConnect() { (this.m_bConnected = !0), (this.m_bConnectionFailed = !1), (this.m_bForceDisconnect = !1); } OnLoggedOn() { (this.m_bCompletedInitialConnect = !0), this.InternalAdjustClock(), this.m_callbacksOnConnect.RunAllCallbacks(this.m_setConnectedServers), this.m_callbacksOnConnectOneTime.RunAllCallbacks(this.m_setConnectedServers); } OnDisconnect() { (this.m_bConnected = !1), (this.m_bConnectionFailed = !0), (this.m_onConnect = void 0), (this.m_bLoggedOn = !1), (this.m_unAccountFlags = 0), (this.m_strIPCountry = ""), this.m_callbacksOnDisconnect.RunAllCallbacks(this.m_setConnectedServers, this.m_bForceDisconnect), this.m_setConnectedServers.clear(); } DEBUG_LogCMInterfaceActivity(e, t, n = !0) { 0; } DEBUG_LogMessage(e, ...t) { 0; } InternalAdjustClock() { return (0, i.mG)(this, void 0, void 0, function* () { let e = l.gA.Init(r.mr, 9802); return ( e.Body().set_client_request_timestamp(Math.floor(performance.now()).toString()), this.SendMsgAndAwaitResponse(e, r.a1).then((e) => { let t = performance.now(), n = new Date(), i = parseInt(e.Body().client_request_timestamp()), o = parseInt(e.Body().server_timestamp_ms()) - ((t - i) >> 1); return o && !isNaN(o) && t && !isNaN(t) ? ((this.m_bPerformedInitialClockAdjustment = !0), (this.m_nPerfClockServerMSOffset = o - t), (this.m_nWallClockDriftMS = n.getTime() - o)) : (0, u.X)(!1, `Error computing server time, server echo: ${i} server time ${o}`), !0; }) ); }); } BPerformedInitialClockAdjustment() { return this.m_bPerformedInitialClockAdjustment; } GetServerTimeMS() { return performance.now() + this.m_nPerfClockServerMSOffset; } GetServerRTime32() { return Math.floor((performance.now() + this.m_nPerfClockServerMSOffset) / 1e3); } RTime32ToDate(e) { return new Date(1e3 * e + this.m_nWallClockDriftMS); } } (0, i.gn)([m.LO], k.prototype, "m_steamid", void 0), (0, i.gn)([m.LO], k.prototype, "m_bLoggedOn", void 0), (0, i.gn)([m.LO], k.prototype, "m_bCompletedInitialConnect", void 0), (0, i.gn)([m.LO], k.prototype, "m_unAccountFlags", void 0), (0, i.gn)([m.LO], k.prototype, "m_strIPCountry", void 0), (0, i.gn)([m.LO], k.prototype, "m_strPersonaName", void 0), (0, i.gn)([m.LO], k.prototype, "m_rtReconnectThrottleStart", void 0), (0, i.gn)([m.LO], k.prototype, "m_rtReconnectThrottleExpiration", void 0), (0, i.gn)([m.LO], k.prototype, "m_bConnected", void 0), (0, i.gn)([m.LO], k.prototype, "m_bPerformedInitialClockAdjustment", void 0), (0, i.gn)([m.aD], k.prototype, "DispatchMessage", null), (0, i.gn)([m.aD], k.prototype, "OnDisconnect", null); var T = n(57476), L = n(5395); class G extends k { constructor() { super(), (this.m_setEMsgHandlers = new Set()), (this.m_setServiceMethodHandlers = new Set()), (this.m_bShouldChangePersonaStatusOnDisconnect = !0), (0, m.rC)(this), (0, T.U5)("User.RegisterForConnectionAttemptsThrottled") && SteamClient.User.RegisterForConnectionAttemptsThrottled(this.OnConnectionAttemptThrottled); } SendMsgAndAwaitResponse(e, t) { return new Promise((n, i) => { if (this.m_hSharedConnection) { this.DEBUG_LogCMInterfaceActivity(e, "send"); let i = S.JQ(e.Serialize()); void 0 !== SteamClient.SharedConnection.SendMsgAndAwaitBinaryResponse ? SteamClient.SharedConnection.SendMsgAndAwaitBinaryResponse(this.m_hSharedConnection, i) .then((e) => { let i = new I.At(e), o = l.gA.InitFromPacket(t, i); this.DEBUG_LogCMInterfaceActivity(o, "receive", !0), o.BIsValid() ? n(o) : this.ResolveAwaitWithTransportError(n, t, 102, "Failed to parse response from server"); }) .catch((e) => { this.ResolveAwaitWithTransportError(n, t, 2, e); }) : SteamClient.SharedConnection.SendMsgAndAwaitResponse(this.m_hSharedConnection, i) .then((e) => { let i = new I.At(S.b$(e)), o = l.gA.InitFromPacket(t, i); this.DEBUG_LogCMInterfaceActivity(o, "receive", !0), o.BIsValid() ? n(o) : this.ResolveAwaitWithTransportError(n, t, 102, "Failed to parse response from server"); }) .catch((e) => { this.ResolveAwaitWithTransportError(n, t, 2, e); }); } else this.ResolveAwaitWithTransportError(n, t, 102, "Shared connection handle is empty, dropping traffic"), console.warn("Shared connection handle is empty, dropping traffic"); }); } SendInternal(e) { let t = S.JQ(e.Serialize()); return SteamClient.SharedConnection.SendMsg(this.m_hSharedConnection, t), !0; } OnMsgRecvd(e) { let t = new I.At(e), n = l.lq.InitHeaderFromPacket(t); this.DispatchMessage(n); } OnLogonInfoChanged(e) { this.DEBUG_LogMessage("Login info from client: ", e), (this.m_bLoggedOn = e.bLoggedOn), (b.De.EUNIVERSE = e.eUniverse), (b.De.MEDIA_CDN_COMMUNITY_URL = e.strCommunityImagesURL), (b.De.COUNTRY = e.strUserCountry), e.strSteamid ? ((this.m_steamid = new h.K(e.strSteamid)), (this.m_strPersonaName = e.strPersonaName), (b.L7.logged_in = e.bLoggedOn), (b.L7.steamid = e.strSteamid), (b.L7.accountid = this.m_steamid.GetAccountID()), (b.L7.account_name = e.strAccountName)) : 0 != this.m_steamid.GetAccountID() && (this.m_steamid = new h.K()), this.m_bLoggedOn ? (this.m_bConnected || this.OnConnect(), this.OnLoggedOn()) : this.OnDisconnect(); } Connect() { return this.m_hSharedConnection ? Promise.resolve() : (this.m_onConnect = new Promise((e, t) => { SteamClient.SharedConnection.AllocateSharedConnection() .then((n) => { n ? (this.OnSharedConnectionEstablished(n), this.DEBUG_LogMessage("obtained handle ", this.m_hSharedConnection), this.OnConnect(), e()) : t(); }) .catch(t); })); } OnSharedConnectionEstablished(e) { (this.m_hSharedConnection = e), this.m_setEMsgHandlers.clear(), this.m_setServiceMethodHandlers.clear(), this.m_hEMsgRegistrationObserver && this.m_hEMsgRegistrationObserver(), (this.m_hEMsgRegistrationObserver = (0, m.EH)(() => { if (this.m_hSharedConnection) { for (let e of this.m_messageHandlers.emsg_list) this.m_setEMsgHandlers.has(e) || (this.m_setEMsgHandlers.add(e), SteamClient.SharedConnection.SubscribeToEMsg(this.m_hSharedConnection, e)); for (let e of this.m_messageHandlers.servicemethod_list) this.m_setServiceMethodHandlers.has(e) || (this.m_setServiceMethodHandlers.add(e), SteamClient.SharedConnection.SubscribeToClientServiceMethod(this.m_hSharedConnection, e)); } })); let t = !1; SteamClient.SharedConnection.RegisterOnLogonInfoChanged(this.m_hSharedConnection, (e) => { this.OnLogonInfoChanged(e), t || ((t = !0), void 0 !== SteamClient.SharedConnection.RegisterOnBinaryMessageReceived ? SteamClient.SharedConnection.RegisterOnBinaryMessageReceived(this.m_hSharedConnection, this.OnMsgRecvd.bind(this)) : SteamClient.SharedConnection.RegisterOnMessageReceived(this.m_hSharedConnection, (e) => this.OnMsgRecvd(S.b$(e)))); }); } OnConnect() { super.OnConnect(); } Disconnect() { if (this.m_hSharedConnection) { if (this.m_bShouldChangePersonaStatusOnDisconnect) { let e = l.gA.Init(y.bx, 716); e.Body().set_persona_state(0), e.Body().set_persona_set_by_user(!1), this.Send(e); } SteamClient.SharedConnection.Close(this.m_hSharedConnection), this.OnSharedConnectionClosed(); } } OnSharedConnectionClosed() { super.OnDisconnect(), (this.m_hSharedConnection = void 0), this.m_setEMsgHandlers.clear(), this.m_hEMsgRegistrationObserver && (this.m_hEMsgRegistrationObserver(), (this.m_hEMsgRegistrationObserver = void 0)); } SendHeartbeat() {} ClearHeartbeatInterval() {} ResetHeartbeatInterval() {} SetShouldChangePersonaStatusOnDisconnect(e) { this.m_bShouldChangePersonaStatusOnDisconnect = e; } GetShouldChangePersonaStatusOnDisconnect() { return this.m_bShouldChangePersonaStatusOnDisconnect; } OnConnectionAttemptThrottled(e) { 0 == e.rtCooldownExpiration ? (this.m_rtReconnectThrottleStart = 0) : 0 == this.m_rtReconnectThrottleStart && (this.m_rtReconnectThrottleStart = (0, L.QU)()), (this.m_rtReconnectThrottleExpiration = e.rtCooldownExpiration); } } (0, i.gn)([m.aD], G.prototype, "OnLogonInfoChanged", null), (0, i.gn)([m.aD.bound], G.prototype, "OnConnectionAttemptThrottled", null); var O = n(60991), F = n(27918), B = n(78654); class x { constructor() { this.m_CMList = { rgCMList: [], rtLastLoaded: 0 }; } Init(e) { (this.m_Storage = e), (this.m_InitPromise = this.LoadFromCache()); } LoadFromCache() { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_InitPromise) return this.m_InitPromise; const e = yield this.m_Storage.GetObject(this.GetLocalStorageKey()); return (t = e) && "object" == typeof t && Array.isArray(t.rgCMList) && "number" == typeof t.rtLastLoaded ? ((this.m_CMList = e), this.m_CMList) : ((this.m_CMList = { rgCMList: [], rtLastLoaded: 0 }), this.WriteCMListToLocalStorage(), this.m_CMList); var t; }); } GetBestCMsToConnectTo() { return (0, i.mG)(this, void 0, void 0, function* () { try { let e = yield this.LoadFromCache(); (!e.rgCMList.length || Date.now() / 1e3 - e.rtLastLoaded > 604800) && ((this.m_CMList = yield this.GetCMListFromWebAPI()), this.WriteCMListToLocalStorage()); } catch (e) { console.error(`There was a problem loading CM list. Attempting to use stale data. ${e}`); } return this.PingCMs(); }); } RecordCMDisconnected(e) { (e.nConnectFailures = (e.nConnectFailures || 0) + 1), (e.msPing = Number.MAX_SAFE_INTEGER), (e.nCMLoad = Number.MAX_SAFE_INTEGER), this.WriteCMListToLocalStorage(); } BuildCMWebSocketURL(e) { return "wss://" + this.FixDevHost(e) + "/cmsocket/"; } FixDevHost(e) { if (4 == b.De.EUNIVERSE && "dev" == b.De.WEB_UNIVERSE && e.match(/^127\.0\.0\.1/)) { let t = b.De.WEBAPI_BASE_URL.match(/https?:\/\/([^\/:]*)/); if (t && t[1]) return e.replace(/^127\.0\.0\.1/, t[1]); } return e; } GetLocalStorageKey() { return "CCMList_" + b.De.EUNIVERSE; } WriteCMListToLocalStorage() { this.m_Storage.StoreObject(this.GetLocalStorageKey(), this.m_CMList); } GetCMListFromWebAPI() { return (0, i.mG)(this, void 0, void 0, function* () { try { const n = yield ((e = N), (t = 1e4), () => new Promise((n, i) => { let o = !1; const r = window.setTimeout(() => { (o = !0), i(new Error("Timed out")); }, t); e().then( (e) => { o || (clearTimeout(r), n(e)); }, (e) => { o || (clearTimeout(r), i(e)); }, ); }))(), i = this.m_CMList.rgCMList.reduce((e, t) => Object.assign(Object.assign({}, e), { [t.strHost]: t }), {}); return { rgCMList: n.map((e) => Object.assign(Object.assign({}, i[e.strHost] || {}), e)), rtLastLoaded: new Date().getTime() / 1e3 }; } catch (e) { throw new Error("Failed to load CM List from webapi"); } var e, t; }); } PingCMs() { let e = new Date().getTime() / 1e3 - 18e3, t = []; const n = {}; for (const i of this.m_CMList.rgCMList) { const o = P(i), r = !o || i.rtLastCheck < e; r && t.length < 20 && t.push(i), (r && !b.De.IN_MOBILE) || (o && o < 1e4 && (n[i.strHost] = i)); } t.length; let i = !1; return new Promise((e, o) => { let r, a, s = "immediate", l = (t) => { if (((0, u.X)(!i, "fnPingingComplete called a second time"), !i)) { const n = Object.keys(t) .map((e) => t[e]) .sort((e, t) => P(e) - P(t)); if ((n.length, n.length && n[0].strHost, (i = !0), this.WriteCMListToLocalStorage(), r && window.clearTimeout(r), a && window.clearTimeout(a), n.length)) return e(n); const s = this.GetCMWithFewestDisconnects(); if (s) return e([s]); o("No CMs available"); } }; (0 === t.length || Object.keys(n).some((e) => this.BCMOkToUse(n[e], s)) || (b.De.IN_MOBILE && Object.keys(n).length)) && (Object.keys(n).length && b.De.IN_MOBILE, l(n)), i || ((r = window.setTimeout(() => { (s = "timeout"), !i && Object.keys(n).some((e) => this.BCMOkToUse(n[e], s)) && l(n); }, 400)), (a = window.setTimeout(() => { (s = "seriouslytimeout"), l(n); }, 12e3))); let c, m = 0, d = 0, h = (e) => { !i && this.BCMOkToUse(e, s) ? l({ [e.strHost]: e }) : (n[e.strHost] = e), (!i && c()) || (0 == --d && (i ? this.WriteCMListToLocalStorage() : this.BCMOkToUse(e, "seriouslytimeout") ? l({ [e.strHost]: e }) : ((n[e.strHost] = e), l(n)))); }; c = () => { if (m < t.length) { let e = t[m++]; return ( this.PingCM(e).then(() => { h(e); }), !0 ); } return !1; }; for (let e = 0; e < 4; e++) c() && d++; }); } GetCMWithFewestDisconnects() { if (!this.m_CMList.rgCMList.length) return; let e = this.m_CMList.rgCMList[0], t = 1; for (; e.nConnectFailures > 0 && t < this.m_CMList.rgCMList.length; ) { let n = this.m_CMList.rgCMList[t++]; (!n.nConnectFailures || n.nConnectFailures < e.nConnectFailures) && (e = n); } return e && this.FixDevHost(e.strHost), e; } BCMOkToUse(e, t) { if (!e) return !1; let n = e.msPing + e.nCMLoad; return (n < 80 && e.msPing < 60) || ("immediate" !== t && ((n < 140 && e.msPing < 100) || ("timeout" !== t && n < 350 && e.msPing < 275))); } PingCM(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = "https://" + this.FixDevHost(e.strHost) + "/cmping/", n = performance.now(); const i = s().CancelToken.source(); let o = window.setTimeout(() => { e.strHost, i.cancel(); }, 1e3); try { let r = yield s().head(t, { cancelToken: i.token }); e.strHost, window.clearTimeout(o); let a = performance.now() - n, l = r.headers["x-steam-cmload"] ? parseInt(r.headers["x-steam-cmload"]) : void 0; e.strHost, (e.msPing = a), (e.nCMLoad = l); } catch (t) { s().isCancel(t) ? e.strHost : window.clearTimeout(o), (e.msPing = 1e4), (e.nCMLoad = 0); } return (e.rtLastCheck = new Date().getTime() / 1e3), e.msPing; }); } } function N() { return (0, i.mG)(this, void 0, void 0, function* () { const e = b.De.WEBAPI_BASE_URL + "ISteamDirectory/GetCMListForConnect/v1/?cellid=0&cmtype=websockets", t = (yield s().get(e)).data, n = (t && t.response && t.response.serverlist) || []; return n.length, n.map((e, t) => ({ strHost: e.endpoint, nPriority: t })); }); } function P(e) { return (e.msPing || 0) + (e.nCMLoad || 0); } class U extends k { constructor(e) { super(), (this.m_Session = { m_bWaitingForLogonResponse: !1, m_nSessionID: 0, m_eResultLogonSuccess: 2, m_nSessionIDLast: 0, m_nClientInstanceID: "0" }), (this.m_bLoadingCMList = !1), (this.m_iCallSeq = 1), (this.m_mapWaitingCallbacks = new Map()), (this.m_CMList = new x()), (this.LogOnResponseHandler = this.messageHandlers.RegisterEMessageAction(751, r.Cm, (e) => { let t = e.Body().eresult(); (this.m_Session.m_bWaitingForLogonResponse = !1), (this.m_Session.m_eResultLogonSuccess = t), 1 == t ? ((this.m_steamid = new h.K(e.Body().client_supplied_steamid())), (this.m_bLoggedOn = !0), (this.m_Session.m_nSessionID = e.Hdr().client_sessionid()), (this.m_Session.m_nSessionIDLast = this.m_Session.m_nSessionID), (this.m_Session.m_nClientInstanceID = e.Body().client_instance_id()), this.OnLoggedOn()) : (console.warn("Received error code from LogOnResponse, disconnecting. EResult=", e.Body().eresult()), 48 == t && this.m_CMList.RecordCMDisconnected(this.m_SocketCMHost), this.Disconnect()); })), (this.ClientAccountInfoHandler = this.messageHandlers.RegisterEMessageAction(768, r.Rt, (e) => { (this.m_unAccountFlags = e.Body().account_flags() || 0), (this.m_strIPCountry = e.Body().ip_country() || ""), (this.m_strPersonaName = e.Body().persona_name() || ""); })), (0, m.rC)(this), this.m_CMList.Init(e); } BIsConnected() { return this.m_Socket && this.m_Socket.readyState == WebSocket.OPEN; } Connect() { return ( this.m_onConnect || (console.log("Loading CM List"), (this.m_bConnected = !1), (this.m_bLoggedOn = !1), (this.m_bForceDisconnect = !1), (this.m_Session.m_bWaitingForLogonResponse = !0), (this.m_bLoadingCMList = !0), (this.m_onConnect = this.m_CMList .GetBestCMsToConnectTo() .then( (e) => ( (this.m_bLoadingCMList = !1), new Promise((t, n) => { let i = 0, o = !1; e.slice(0, 3).forEach((e, r, a) => this.AttemptHostConnect(e).then( (n) => { o ? n.close(4e3) : ((o = !0), (this.m_Socket = n), (this.m_SocketCMHost = e), (this.m_bConnected = !0), this.OnConnect(), t()); }, () => { console.log(`Failed to connect to CM ${r + 1} of ${a.length}: ${e.strHost}`), i++, i === a.length && (console.log(`Failed to connect to all ${a.length} best CMs`), n()); }, ), ); }) ), ) .catch((e) => { throw ((this.m_bLoadingCMList = !1), this.OnDisconnect(), e); }))), this.m_onConnect ); } AttemptHostConnect(e) { console.log(`Attempting to connect to host ${e.strHost}`); let t = new WebSocket(this.m_CMList.BuildCMWebSocketURL(e.strHost)); return ( (t.binaryType = "arraybuffer"), (t.onmessage = (e) => { let t = new I.At(e.data), n = l.lq.InitHeaderFromPacket(t); 1 == n.GetEMsg() ? this.DecodeAndDispatchMultiMsg(l.gA.InitFromMsg(F.ne, n)) : this.DispatchMessage(n); }), new Promise((n, i) => { let o = !1; const r = window.setTimeout(() => { console.warn(`Socket connection timed out after 3000ms: ${e.strHost}`), (o = !0), t.close(4e3), this.m_CMList.RecordCMDisconnected(e), i(); }, 3e3); (t.onopen = () => { console.log(`Connected socket to host ${e.strHost}`), (0, u.X)(!o, "Socket connection was opened after timing out."), o || window.clearTimeout(r), n(t); }), (t.onerror = (t) => { o || (window.clearTimeout(r), (0, u.X)(!1, "Socket connect failed", t), console.log(t), t.message ? console.log(t.message) : console.log("No message"), this.m_CMList.RecordCMDisconnected(e), i()); }); }) ); } get session() { return this.m_Session; } ClearHeartbeatInterval() { this.m_iIntervalHeartbeat && (window.clearInterval(this.m_iIntervalHeartbeat), (this.m_iIntervalHeartbeat = void 0)); } ResetHeartbeatInterval() { this.ClearHeartbeatInterval(), (this.m_iIntervalHeartbeat = window.setInterval(() => this.SendHeartbeat(), 27e3)); } SendHeartbeat() { let e = l.gA.Init(r.cp, 703); this.Send(e); } OnConnect() { super.OnConnect(), this.m_Socket && ((this.m_Socket.onerror = (e) => {}), this.ResetHeartbeatInterval(), (this.m_Socket.onclose = (e) => { this.OnDisconnect(); })); } Disconnect() { this.m_Socket && this.m_Socket.close(); } OnDisconnect() { (this.m_Socket = void 0), (this.m_SocketCMHost = void 0), (this.m_onConnect = void 0), this.ClearHeartbeatInterval(), super.OnDisconnect(); } SendMsgAndAwaitResponse(e, t) { return new Promise((n, i) => { let o = this.m_iCallSeq++; e.Hdr().set_jobid_source("" + o), this.Send(e) ? this.m_mapWaitingCallbacks.set(o, { iSeq: o, msgClass: t, fnCallback: n }) : this.ResolveAwaitWithTransportError(n, t, 2, "Web socket not connected"); }); } SendInternal(e) { return !!this.m_Socket && (this.m_steamid.BIsValid() && e.Hdr().set_steamid(this.m_steamid.ConvertTo64BitString()), this.m_Session.m_nSessionID && e.Hdr().set_client_sessionid(this.m_Session.m_nSessionID), this.m_Socket.send(e.Serialize()), 703 != e.GetEMsg() && this.ResetHeartbeatInterval(), !0); } BInternalShouldDispatchMessage(e) { if (e.BIsValid() && e.Hdr().jobid_target() && e.Hdr().jobid_target() !== B.Z3) { let t = parseInt(e.Hdr().jobid_target()); if (this.m_mapWaitingCallbacks.has(t)) { let n = this.m_mapWaitingCallbacks.get(t); if (n) { let i = l.gA.InitFromMsg(n.msgClass, e); this.DEBUG_LogCMInterfaceActivity(i, "receive", !0), i.BIsValid() ? n.fnCallback(i) : this.ResolveAwaitWithTransportError(n.fnCallback, n.msgClass, 102, "Failed to parse response from server"), this.m_mapWaitingCallbacks.delete(t); } return !1; } this.DEBUG_LogCMInterfaceActivity(e, "receive", !1); } return !0; } DecodeAndDispatchMultiMsg(e) { let t = e.Body().message_body(); if (!t) return; e.Body().size_unzipped() && (t = O.inflate(t)); let n = new I.At(t); for (; n.GetCountBytesRemaining() > 0; ) { let e = n.GetUint32(), t = l.lq.InitHeaderFromPacket(new I.At(n.GetPacket(), n.TellGet(), e)); this.DispatchMessage(t), n.SeekGetCurrent(e); } } } (0, i.gn)([m.aD], U.prototype, "DecodeAndDispatchMultiMsg", null); n(65059), n(19744); new Map(); var V = n(84290), H = n(72746); n(46361), n(27385); (0, m.jQ)({ enforceActions: "never" }), (window.AssertMsg = u.X), document.addEventListener("DOMContentLoaded", function () { return (0, i.mG)(this, void 0, void 0, function* () { (0, o.Ek)(), o.De.IN_GAMEPADUI || (yield n.e(2388).then(n.t.bind(n, 72388, 23))), yield (function (e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = V.LJ.GetLanguageFallback(e), i = e === t, [o, r, a, s] = yield Promise.all([n(41171)(`./shared_${e}.json`), n(3119)(`./friendsui_${e}.json`), i ? {} : n(91090)(`./shared_${t}.json`), i ? {} : n(9014)(`./friendsui_${t}.json`)]); V.Yt.AddTokens(Object.assign(Object.assign({}, o), r), Object.assign(Object.assign({}, a), s)); }); })(o.De.LANGUAGE); let e = !0; b.dk.steamid && (0, C.G$)(b.dk.steamid), !o.De.IN_CLIENT && o.De.STEAM_TV && (o.L7.logged_in ? (0, _.yz)(b.dk.steamid) : ((e = !1), (function () { (0, i.mG)(this, void 0, void 0, function* () { (0, _.PX)(); let { CBroadcastApp: e } = yield Promise.all([n.e(5140), n.e(4679)]).then(n.bind(n, 73035)); new e().Init(() => { window.location = window.location; }); }); })())), v.ZP.SetNavEventParams("steamclient", o.De.STEAM_TV ? "steamtv" : "friendsui"), e && (function () { let e, t = o.De.IN_GAMEPADUI, n = new _.iY(t), i = null, r = !1; { const t = { GetFriendsUIExportsVersion: () => f.NA, FriendsListRoot: (e) => (0, g.IU)(n.FriendStore, n.ChatStore, e), FriendsListQuickAccess: (e) => (0, g.Sd)(n.FriendStore, n.ChatStore, e), GroupsListRoot: (e) => (0, g.nY)(n.FriendStore, n.ChatStore, e), FriendsListAndChatsRoot: (e) => (0, g.r0)(n.FriendStore, n.ChatStore, e), TabSetRoot: (e) => (0, g.GR)(e), VoiceChatControlsRoot: (e) => (0, g._l)(n.ChatStore, e), VoiceChatHeaderRoot: (e) => (0, g.dS)(n.ChatStore, e), RemotePlayTogetherControlsRoot: (e) => (0, g.cc)(n.ChatStore, e), BShowRemotePlayQuickAccessControls: () => H.Ul.RemotePlayStore.BShowQuickAccessControls(), UnreadChatMessagesHeaderRoot: (e) => (0, g.g5)(n.ChatStore, e), InvitesList: (e) => (0, g.E6)(n.FriendStore, e), InstrumentWindow: (e) => { _.g_FriendsUIDesktopApp.InstrumentWindow(e), (0, _.YF)(e, _.D); }, GetCurrentUserStatusInterface: () => n.GetCurrentUserStatusInterface(), GetVoiceInterface: () => n.GetVoiceInterface(), SetEmoticonTrackerCallback: (e) => n.SetEmoticonTrackerCallback(e), SetStickerTrackerCallback: (e) => n.SetStickerTrackerCallback(e), ShowPopupFriendsList: (e) => H.Ul.ShowPopupFriendsList(_.D, !e, e), SetShouldChangePersonaStatusOnDisconnect: (e) => _.g_FriendsUIDesktopApp.SetShouldChangePersonaStatusOnDisconnect(e), StopListening: () => H.Ul.StopListening(), Reconnect: () => e.Connect(), GetPreferredPersonaState: () => H.Ul.FriendStore.GetPersonaStatePreference(), }; Object.assign(window, t); } if (o.De.IN_CLIENT) { (0, b.Tl)(); let t = { message: "ChatJavascriptInitialized", data: o.De.BUILD_TIMESTAMP }; window.parent.postMessage(t, "https://steamloopback.host"), window.parent.postMessage("ChatJavascriptIntialized", "https://steamloopback.host"), (e = new G()), (r = !0), e.Connect(); } else { const t = (e = new U(n.Storage)); (i = new p(t, o.De.EREALM)), i.PerformInitialLogon(o.L7); } n.Init(e, r, i), r ? (0, g.bI)(n.FriendStore, n.ChatStore, document.getElementById("friendslist-container")) : (0, g.Li)(n.FriendStore, n.ChatStore, document.getElementById("friendslist-container")); })(); }); }); }, 46519: (e, t, n) => { "use strict"; n.d(t, { j: () => C }); var i = n(85556), o = n(19953), r = n(46962), a = n(92883), s = n(79588), l = n(78654), c = n(93635), m = n(77385), d = n(5395); class h { constructor(e, t) { if (!t.hasOwnProperty(e)) throw new Error("Room effect " + e + " is not defined."); (this.name = e), (this.timestamp = Date.now()), (this.settings = t[e]), (this.expires = this.timestamp + this.settings.timeout); } static QueueFor(e) { return h.k_QueueForEffect[e]; } Queue() { return h.k_QueueForEffect[this.name]; } bIsExpired() { return Date.now() > this.expires; } bIsActive() { const e = Date.now(); return this.timestamp <= e && this.expires > e; } iTimeToExpiry() { return this.expires - Date.now(); } render() { return this.bIsActive() ? this.settings.render(this) : null; } } h.k_QueueForEffect = { snowball: "snowball", snow: "confetti_snow", confetti: "confetti_snow", goldfetti: "confetti_snow", firework: "festive", balloons: "festive", lny2020_lanterns: "festive", lny2020_firework: "festive", lny2020_confetti: "confetti_snow" }; class u { constructor(e) { (this.m_mapRoomEffectQueue = { default: [], snowball: [], confetti_snow: [], festive: [] }), (this.m_rgRunningEffects = []), (0, s.rC)(this), (this.m_effectSettings = e); } AddRoomEffect(e) { this.QueueRoomEffect(e), this.UpdateRunningRoomEffects(); } QueueRoomEffect(e) { this.m_mapRoomEffectQueue[h.QueueFor(e)].push(e); } ActivateRoomEffect(e) { try { const t = new h(e, this.m_effectSettings); this.m_rgRunningEffects.push(t), window.setTimeout(() => { this.UpdateRunningRoomEffects(); }, t.iTimeToExpiry() + 100); } catch (e) { console.log(e); } } BIsQueueFull(e) { return this.m_rgRunningEffects.filter((t) => t.Queue() == e).length >= u.k_MaxRoomEffectRunning[e]; } UpdateRunningRoomEffects() { this.m_rgRunningEffects = this.m_rgRunningEffects.filter((e) => !e.bIsExpired()); for (let e in this.m_mapRoomEffectQueue) { const t = e; for (; this.m_mapRoomEffectQueue[t].length > 0 && !this.BIsQueueFull(t); ) this.ActivateRoomEffect(this.m_mapRoomEffectQueue[t].shift()); } } } (u.k_MaxRoomEffectRunning = { default: 1, snowball: 10, confetti_snow: 3, festive: 10 }), (0, i.gn)([s.LO], u.prototype, "m_rgRunningEffects", void 0); var p = n(72746); const _ = d._H.PerMinute, g = 6 * d._H.PerHour; class C { constructor(e, t, n) { (this.BASELOG = new m.sO("Chat", () => this.unique_id).Debug), (this.m_rgChatViews = []), (this.m_bChatLogsLoaded = !1), (this.m_bReceivedChatLogs = !1), (this.m_bMoreAvailable = !1), (this.m_nLoadingHistoryInProgressCount = 0), (this.m_rgChatMessages = []), (this.m_ChatMessageBlockList = new r.n()), (this.m_cUnreadChatMessages = 0), (this.m_bHasUnreadPriorityChatMessages = !1), (this.m_rtFirstUnreadChatMsg = 0), (this.m_rtLastAckedChatMsg = 0), (this.m_rtLastServerAckedChatMsg = 0), (this.m_rtLastMessageReceived = 0), (this.m_rtLastServerMessageReceived = 0), (this.m_strLastMessage = void 0), (this.m_accountIDLastMessage = void 0), (this.m_rtFirstUnread = 0), (this.m_msTimeActivated = 0), (this.m_setInflightClientMessageID = new Set()), (this.m_bPrepended = !1), (0, s.rC)(this), (this.m_FriendStore = e), (this.m_ChatStore = t), (this.m_CMInterface = n), (this.m_chatRoomEffects = new u(t.ChatRoomEffectSettings)); } UnloadChatState() { this.UnloadActiveChatState(), (this.m_rtLastMessageReceived = 0), (this.m_rtLastServerMessageReceived = 0); } UnloadActiveChatState() { (this.m_rgChatMessages = []), this.m_ChatMessageBlockList.Clear(), (this.m_bChatLogsLoaded = !1), (this.m_bReceivedChatLogs = !1); } get BIsPrepend() { return this.m_bPrepended; } ResetPrepended() { this.m_bPrepended = !1; } OnTyping() {} get is_friend_typing() { return !1; } OnReceivedNewMessage(e, t, n, i) {} BShouldTrackUnreadMessages() { return !0; } BIsVoiceAllowed() { return !0; } GetVoiceNotAllowedReason() { return null; } SendChatMessage(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = this.m_MessageSendQueue.Add(e); try { const n = yield this.SendChatMessageInternal(e); n === r.p.None ? this.m_MessageSendQueue.RemoveItem(t) : this.m_MessageSendQueue.SetItemFailed(t, n); } catch (e) { this.m_MessageSendQueue.SetItemFailed(t, r.p.Generic); } }); } SendWithRetries(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = 1; const i = Date.now(); for (; Date.now() - 1e3 * _ < i; ) { try { const i = yield t(); if (1 === i.GetEResult()) return (0, s.z)(() => { (e.rtTimestamp = i.Body().server_timestamp()), (e.unOrdinal = i.Body().ordinal() || 0), this.OnUserChatEcho(e.rtTimestamp, e.unOrdinal, e.strMessage, i.Body().message_without_bb_code() || e.strMessage); let t = i.Body().modified_message(); return t && (this.m_ChatStore.EmoticonStore.TrackEmoticonUsage(t, e.rtTimestamp), (e.strMessage = t), (this.m_strLastMessage = t), (this.m_accountIDLastMessage = this.m_FriendStore.self.accountid), this.AddRoomEffectIfNeeded(t)), e.OnServerAcknowledged(), r.p.None; }); switch (i.GetEResult()) { case 15: return e.SetErrorSending(r.p.NotFriends), e.eErrorSending; case 84: return e.SetErrorSending(r.p.RateLimitExceeded), e.eErrorSending; default: if (3 === i.Hdr().transport_error()) return e.SetErrorSending(r.p.Generic), e.eErrorSending; console.warn(`Error sending message (Attempt #${n}). Got EResult ${i.GetEResult()}`); } } catch (e) { console.warn(`Error sending message (Attempt #${n}). Got error ${e}`); } const i = 1 * Math.pow(2, n - 1); yield new Promise((e) => setTimeout(e, 1e3 * i)), n++; } return e.SetErrorSending(r.p.Generic), e.eErrorSending; }); } InitMessageSessionFromServer(e, t, n) { 4 !== this.GetVisibilityState() && (this.m_cUnreadChatMessages = e), (this.m_bHasUnreadPriorityChatMessages = !1), (this.m_rtLastAckedChatMsg = this.m_rtLastServerAckedChatMsg = t), (this.m_rtLastMessageReceived = n), this.m_rtLastAckedChatMsg < this.m_rtLastMessageReceived && (this.m_rtFirstUnreadChatMsg = this.m_rtLastAckedChatMsg + 1); } AddChatView(e) { this.m_rgChatViews.push(e); } RemoveChatView(e) { let t = this.m_rgChatViews.indexOf(e); -1 != t && this.m_rgChatViews.splice(t, 1); } IsMoreHistoryAvailable() { return this.m_bMoreAvailable; } RoomEffectManager() { return this.m_chatRoomEffects; } InternalLoadChatLogs(e = !1) { let t, n, i, o; if (e) { let e = this.GetMostRecentChatMsg(); e ? ((t = e.rtTimestamp), (n = e.unOrdinal)) : ((t = l.r7), (n = 0)); } else (t = l.r7), (n = 0); return ( (i = l.g1), (o = 0), (this.m_nLoadingHistoryInProgressCount += 1), this.GetMessagesFromTimeRange(t, n, i, 0, C.k_InitialMessageCount) .then(({ messages: e, moreAvailable: t }) => { this.AddMessagesToHistory(e, t), (this.m_nLoadingHistoryInProgressCount -= 1), (this.m_bReceivedChatLogs = !0); }) .catch((e) => ((this.m_nLoadingHistoryInProgressCount -= 1), Promise.reject(e))) ); } LoadMoreHistory() { return 0 != this.m_nLoadingHistoryInProgressCount ? Promise.resolve(!0) : ((this.m_nLoadingHistoryInProgressCount += 1), this.GetMessagesFromTimeRange(l.r7, 0, this.m_oldestMessageTime, this.m_oldestMessageOrdinal, C.k_LoadMoreMessageCount) .then(({ messages: e, moreAvailable: t }) => (this.AddMessagesToHistory(e, t), (this.m_nLoadingHistoryInProgressCount -= 1), !0)) .catch((e) => ((this.m_nLoadingHistoryInProgressCount -= 1), Promise.reject(e)))); } AddMessagesToHistory(e, t) { this.BASELOG(`merging ${e.length} messages`), this.MergeChatHistoryChunk(e), this.BASELOG(`${this.m_rgChatMessages.length} total messages`), (this.m_bMoreAvailable = t), this.BASELOG(`friend chat oldest time ${this.m_oldestMessageTime} oldest ordinal ${this.m_oldestMessageOrdinal} bMoreAvailable ${this.m_bMoreAvailable}`); } get ChatStore() { return this.m_ChatStore; } OnActivate() { (this.m_cUnreadChatMessages || this.m_bHasUnreadPriorityChatMessages) && ((this.m_cUnreadChatMessages = 0), (this.m_bHasUnreadPriorityChatMessages = !1), this.m_rtLastMessageReceived && ((this.m_rtLastAckedChatMsg = this.m_rtLastMessageReceived), this.AckChatMsg(this.m_rtLastMessageReceived)), p.Ul.FriendStore.UpdateUnreadMessagesGlobal(), p.Ul.UIStore.FlashChatWindow(this, !1)); } OnDeactivate() { this.m_rtFirstUnreadChatMsg = 0; } get self() { return this.m_FriendStore.self; } InternalAppendChatMsg(e) { (0 != this.m_rgChatViews.length || this.m_bChatLogsLoaded) && (this.HasChatMessage(e.rtTimestamp, e.unOrdinal) || (this.m_rgChatMessages.push(e), this.m_ChatMessageBlockList.AppendNewMessage(e), this.TrimLogsIfPossible())); } TrimLogsIfPossible() { let e = this.m_rgChatMessages.length - C.k_KeepLoadedWhenAtScrollBottom; if (e <= 0) return; for (let e of this.m_rgChatViews) if (!e.is_scrolled_to_bottom) return; let t = this.m_ChatMessageBlockList.RemoveOldestMessages(e); if (!t) return; let n = this.m_rgChatMessages.indexOf(t); n < 0 ? (0, c.X)(!1, "Failed to find message being removed") : this.m_rgChatMessages.splice(0, n + 1); } HasChatMessage(e, t) { for (let n = this.m_rgChatMessages.length - 1; n >= 0; n--) { let i = this.m_rgChatMessages[n]; if (i.rtTimestamp == e && i.unOrdinal == t) return !0; } return !1; } HasClientMessageInFlight(e) { return this.m_setInflightClientMessageID.has(e); } AppendChatMsg(e, t, n, i) { let o = new r.dz(e, t, n, i); return (o.eAnimationState = r.P9.Animating), this.InternalAppendChatMsg(o), o; } AppendLocalEchoChatMsg(e) { let t = new r.iA(this.self.accountid, p.Ul.GetServerRTime32(), e); return (t.eAnimationState = r.P9.Animating), this.InternalAppendChatMsg(t), t; } RemoveMessage(e) { const t = this.m_rgChatMessages.findIndex((t) => t.UniqueKey() === e.UniqueKey()); -1 === t ? console.warn("Could not find message to remove.") : this.m_rgChatMessages.splice(t, 1), this.m_ChatMessageBlockList.RemoveLocalMessage(e), this.TrimLogsIfPossible(); } RetryFailedMessage(e) { e.eErrorSending !== r.p.None ? (this.RemoveMessage(e), this.SendChatMessage(e.strMessage)) : console.log("RetryFailedMessage called with a non-failed message. Ignoring."); } AddNewChatMsgAndNotify(e, t, n, i, o, r) { let a = this.AppendChatMsg(e, t, n, i); (a.Mentions = r), this.OnNewChatMsgAdded(e, t, n, i); let s = void 0 !== o; this.CheckShouldNotify(a, s ? o : i, i), this.AddRoomEffectIfNeeded(a.strMessage); } AddRoomEffectIfNeeded(e) { const t = (0, a.jr)(e); t && t[0] && "roomeffect" === t[0].tag && this.m_chatRoomEffects.AddRoomEffect(t[0].args.type); } UpdateChatMessageDeletedState(e, t) { for (let n of this.m_rgChatMessages) for (let i of e) n.rtTimestamp == i.rtTimestamp && n.unOrdinal == i.unOrdinal && n.eDeleteState != r.im.Deleted && (n.eDeleteState = t); } BShouldSilentlyAddMessage(e) { return !1; } DecorateNotification(e, t, n, i) { if (i !== n) { const n = this.m_ChatStore.NotificationBBCodeParser, o = { chat: this, unAccountIDSender: e.unAccountID, key: e.UniqueKey(), rtTimestamp: e.rtTimestamp, onLoad: () => {} }, r = n.ParseBBCode(i, o); if (r) return Object.assign(Object.assign({}, t), r); } return t; } CheckShouldNotify(e, t, n) { let i = this.self.accountid == e.unAccountID, o = !1, r = !1, a = this.GetVisibilityState(), s = this.BShouldSilentlyAddMessage(e), l = e.Mentions; if (e.BIsServerMessage() && !l.mention_all && !l.mention_here && !l.mention_user) return void (this.m_rtLastServerMessageReceived = e.rtTimestamp); i ? ((o = !0), (r = !0)) : (s && 0 == this.m_cUnreadChatMessages) || 4 == a ? (o = !0) : 3 == a && 0 == this.m_cUnreadChatMessages && p.Ul.IdleTracker.AddOnNextActivityCallback(() => { 4 == this.GetVisibilityState() && this.OnActivate(); }), (this.m_rtLastMessageReceived = e.rtTimestamp), (this.m_strLastMessage = e.strMessage), (this.m_accountIDLastMessage = e.unAccountID); let c = this.m_cUnreadChatMessages, m = this.m_bHasUnreadPriorityChatMessages; this.BShouldTrackUnreadMessages() && (o ? ((this.m_rtLastAckedChatMsg = e.rtTimestamp), (this.m_cUnreadChatMessages = 0), (this.m_bHasUnreadPriorityChatMessages = !1), r || this.AckChatMsg(e.rtTimestamp)) : (0 == this.m_rtFirstUnreadChatMsg && (this.m_rtFirstUnreadChatMsg = this.m_rtLastMessageReceived), this.m_cUnreadChatMessages++)), s || this.OnReceivedNewMessage(e, a, t, n), (c == this.m_cUnreadChatMessages && m == this.m_bHasUnreadPriorityChatMessages) || p.Ul.FriendStore.UpdateUnreadMessagesGlobal(); } AddVoiceChannelInviteMsg(e, t, n) { this.InternalAppendChatMsg(new r.Ok(e, t, n)); } AddLocalMsg(e, t, n) { this.InternalAppendChatMsg(new r.tw(e, t, n)); } AddNewServerMsg(e, t, n, i, o, a, s) { if (!(0, r.R$)(i)) return; let l = new r.dz(e, t, n, o, [], i, a, s); 11 == l.eServerMsgType && this.SetupAppCustomServerMsg(l).then((i) => { this.OnNewChatMsgAdded(e, t, n, i), this.CheckShouldNotify(l, i, l.strServerMsgAppCustomLocalized); }), this.InternalAppendChatMsg(l); } AckChatMsg(e) { (this.m_cUnreadChatMessages > 0 || this.m_rtLastServerAckedChatMsg != e) && (this.AckChatMsgOnServer(e), (this.m_rtLastServerAckedChatMsg = e)); } OnUserChatEcho(e, t, n, i) { e >= this.m_rtLastAckedChatMsg && ((this.m_rtLastMessageReceived = e), this.UpdateLastAckTimeFromServer(e)), this.OnNewChatMsgAdded(this.m_FriendStore.self.accountid, e, t, n); } UpdateLastAckTimeFromServer(e) { this.m_rtLastServerAckedChatMsg <= e && ((this.m_rtLastServerAckedChatMsg = e), (this.m_rtLastAckedChatMsg = e), this.m_rtLastMessageReceived <= e && ((this.m_cUnreadChatMessages = 0), (this.m_bHasUnreadPriorityChatMessages = !1), p.Ul.FriendStore.UpdateUnreadMessagesGlobal(), p.Ul.UIStore.FlashChatWindow(this, !1))); } GetMostRecentChatMsg() { for (let e = this.m_rgChatMessages.length - 1; e >= 0; e--) if (-1 != this.m_rgChatMessages[e].unOrdinal) return this.m_rgChatMessages[e]; return null; } MergeChatHistoryChunk(e) { if (!e.length) return; let t, n = e[0], i = e[e.length - 1], o = 0; for (t = this.m_rgChatMessages.length - 1; t >= 0; t--) if (-1 != this.m_rgChatMessages[t].unOrdinal) { if (this.m_rgChatMessages[t].BIsOlderThan(n)) break; this.m_rgChatMessages[t].BIsNewerThan(i) && o++; } for (let t of e) this.MsgLoadedFromHistory(t); for (t++, this.m_rgChatMessages.splice(t, this.m_rgChatMessages.length - t - o, ...e), t = 0; t < this.m_rgChatMessages.length && -1 == this.m_rgChatMessages[t].unOrdinal; t++); t >= this.m_rgChatMessages.length ? ((this.m_oldestMessageTime = l.g1), (this.m_oldestMessageOrdinal = 0)) : ((this.m_oldestMessageTime = this.m_rgChatMessages[t].rtTimestamp), (this.m_oldestMessageOrdinal = this.m_rgChatMessages[t].unOrdinal)), this.m_ChatMessageBlockList.BuildMessageBlocks(this.m_rgChatMessages), (this.m_bPrepended = !0); } InitQueuedMessages() { const e = this.m_MessageSendQueue.queued_messages; if (0 === e.length) return; const t = []; e.forEach(({ timestamp: e, message: n, eError: i, id: o }) => { if (void 0 === i || i === r.p.None) Date.now() - 1e3 * g < e && (this.m_MessageSendQueue.RemoveItem(o), this.SendChatMessage(n)); else { const o = new r.iA(this.self.accountid, p.Ul.GetServerRTime32(), n); (o.rtTimestamp = e), o.SetErrorSending(i), t.push(o); } }), this.MergeLocalMessages(t); } MergeLocalMessages(e) { e.sort((e, t) => e.rtTimestamp - t.rtTimestamp); const t = []; let n = 0, i = 0; for (; n < this.m_rgChatMessages.length || i < e.length; ) n >= this.m_rgChatMessages.length ? t.push(e[i++]) : i >= e.length ? t.push(this.m_rgChatMessages[n++]) : this.m_rgChatMessages[n].rtTimestamp < e[i].rtTimestamp ? t.push(e[i++]) : t.push(this.m_rgChatMessages[n++]); this.m_rgChatMessages = t; } GetBeginFileUploadURL() { return o.De.CHAT_BASE_URL + "chat/beginfileupload/"; } GetCommitFileUploadURL() { return o.De.CHAT_BASE_URL + "chat/commitfileupload/"; } LogFileUploadMessage(e) { this.BASELOG(e); } GetMaxFileSizeMB() { return 30; } MsgLoadedFromHistory(e) { 11 == e.eServerMsgType && this.SetupAppCustomServerMsg(e); } SetupAppCustomServerMsg(e) { return (0, i.mG)(this, void 0, void 0, function* () { return console.warn("App custom server message should only be used in a class that knows what to do with it"), ""; }); } GetVisibilityState(e) { let t = 0; for (let n of this.m_rgChatViews) { if (e && !n.BIsInBrowserContext(e)) continue; let i = n.GetVisibilityState(); i > t && (t = i); } return t; } GetLastMessage() { return this.m_strLastMessage; } get accountid_last_message() { return this.m_accountIDLastMessage; } get unread_message_count() { return this.m_cUnreadChatMessages; } get has_unread_priority_messages() { return this.m_bHasUnreadPriorityChatMessages; } get first_unread_msg_time() { return this.m_rtFirstUnreadChatMsg; } get time_last_message() { return this.m_rtLastMessageReceived; } get time_last_ack() { return this.m_rtLastAckedChatMsg; } get chat_messages() { return this.m_rgChatMessages; } get chat_message_blocks() { return this.m_ChatMessageBlockList; } get last_voice_participation_time() { return this.m_rtLastAckedChatMsg; } LoadChatLogs() { return (0, i.mG)(this, void 0, void 0, function* () { if (!this.m_bChatLogsLoaded && this.m_CMInterface.logged_on) return (this.m_bChatLogsLoaded = !0), this.InternalLoadChatLogs(!1); }); } OnConnectionRestored() { this.m_bChatLogsLoaded && this.InternalLoadChatLogs(!0); } } (C.k_InitialMessageCount = 100), (C.k_KeepLoadedWhenAtScrollBottom = 2 * C.k_InitialMessageCount), (C.k_LoadMoreMessageCount = 50), (0, i.gn)([s.LO], C.prototype, "m_bReceivedChatLogs", void 0), (0, i.gn)([s.LO], C.prototype, "m_bMoreAvailable", void 0), (0, i.gn)([s.LO.shallow], C.prototype, "m_rgChatMessages", void 0), (0, i.gn)([s.LO], C.prototype, "m_cUnreadChatMessages", void 0), (0, i.gn)([s.LO], C.prototype, "m_rtFirstUnreadChatMsg", void 0), (0, i.gn)([s.LO], C.prototype, "m_rtLastAckedChatMsg", void 0), (0, i.gn)([s.LO], C.prototype, "m_rtLastMessageReceived", void 0), (0, i.gn)([s.LO], C.prototype, "m_rtLastServerMessageReceived", void 0), (0, i.gn)([s.LO], C.prototype, "m_strLastMessage", void 0), (0, i.gn)([s.LO], C.prototype, "m_accountIDLastMessage", void 0), (0, i.gn)([s.LO], C.prototype, "m_rtFirstUnread", void 0), (0, i.gn)([s.aD], C.prototype, "InitMessageSessionFromServer", null), (0, i.gn)([s.aD], C.prototype, "AddMessagesToHistory", null), (0, i.gn)([s.aD], C.prototype, "OnActivate", null), (0, i.gn)([s.aD], C.prototype, "OnDeactivate", null), (0, i.gn)([s.aD], C.prototype, "AppendChatMsg", null), (0, i.gn)([s.aD], C.prototype, "AppendLocalEchoChatMsg", null), (0, i.gn)([s.aD], C.prototype, "AddNewChatMsgAndNotify", null), (0, i.gn)([s.aD], C.prototype, "UpdateChatMessageDeletedState", null), (0, i.gn)([s.aD], C.prototype, "AddVoiceChannelInviteMsg", null), (0, i.gn)([s.aD], C.prototype, "AddLocalMsg", null), (0, i.gn)([s.aD], C.prototype, "AddNewServerMsg", null); }, 23503: (e, t, n) => { "use strict"; n.d(t, { v: () => l }); var i = n(85556), o = n(71576), r = n(79588), a = n(66035), s = n(88991); class l extends o.Q { constructor(e, t) { super(), (this.m_info = void 0), (this.m_bShowWatchPromptDialog = !1), (this.m_watchPromptInitialFriend = void 0), (0, r.rC)(this), (this.m_steamID = s.K.InitFromAccountID(t)), (this.m_tabset = e), this.InitInfo(); } InitInfo() { return (0, i.mG)(this, void 0, void 0, function* () { this.m_info = (yield l.GetBroadcastWatchStore()).StartInfo(this.m_steamID.ConvertTo64BitString()); }); } static GetBroadcastWatchStore() { return (0, i.mG)(this, void 0, void 0, function* () { const { BroadcastWatchStore: e } = yield Promise.all([n.e(5140), n.e(4679)]).then(n.bind(n, 90656)); return e; }); } GetSteamID() { return this.m_steamID; } GetTabName() { const e = this.m_info && this.m_info.m_strTitle; return !e && a.rr.bValid ? a.rr.name : e; } GetUniqueID() { return "br" + this.m_steamID.GetAccountID(); } OnTabFocus() {} InternalOnTabActivate() {} OnTabDeactivate() {} OnTabClosed() { (() => { (0, i.mG)(this, void 0, void 0, function* () { (yield l.GetBroadcastWatchStore()).StopInfo(this.m_info); }); })(); } IsVoiceActive() { return !1; } GetUnreadMessageCount() { return 0; } IsTabForChat(e) { return !1; } GetChatView() { return null; } IsBroadcast() { return !0; } ShowWatchPromptDialog(e) { (this.m_bShowWatchPromptDialog = !0), (this.m_watchPromptInitialFriend = e); } HideWatchPromptDialog() { (this.m_bShowWatchPromptDialog = !1), (this.m_watchPromptInitialFriend = void 0); } } (0, i.gn)([r.LO], l.prototype, "m_info", void 0), (0, i.gn)([r.LO], l.prototype, "m_bShowWatchPromptDialog", void 0), (0, i.gn)([r.LO], l.prototype, "m_watchPromptInitialFriend", void 0), (0, i.gn)([r.aD], l.prototype, "ShowWatchPromptDialog", null), (0, i.gn)([r.aD], l.prototype, "HideWatchPromptDialog", null); }, 67915: (e, t, n) => { "use strict"; n.d(t, { R5: () => G.R5, ic: () => F }); var i = n(85556), o = n(19953), r = n(46962), a = n(72746), s = n(79588); class l { constructor() { this.bCollapsed = !1; } IsEmpty() { return !this.bCollapsed && void 0 === this.nDefaultWidth && void 0 === this.nDesiredWidth; } } const c = "ChatEmbeds"; class m { constructor() { this.m_mapEmbed = new s.vP(); } Init() { a.Ul.SettingsStore.GetObjectFromLocalStorageWhenReady(c, {}).then((e) => { this.m_mapEmbed.clear(); for (let t in e) { let n = new l(); Object.assign(n, e[t]), this.m_mapEmbed.set(t, n); } }); } GetKey(e, t) { return t + "_" + e; } EvictOldestIfNecessary() { if (this.m_mapEmbed.size > 100) { let e = Array.from(this.m_mapEmbed.keys()).sort()[0]; this.m_mapEmbed.delete(e); } } GetOrCreateEmbedData(e, t) { let n = this.GetKey(e, t), i = this.m_mapEmbed.get(n); return i || ((i = new l()), (i.bCollapsed = !1)), i; } SaveEmbedData(e, t, n) { n.IsEmpty() ? this.m_mapEmbed.delete(this.GetKey(e, t)) : this.m_mapEmbed.set(this.GetKey(e, t), n), this.EvictOldestIfNecessary(), this.WriteToLocalStorage(); } WriteToLocalStorage() { a.Ul.SettingsStore.StoreObjectInLocalStorage(c, this.m_mapEmbed); } GetCollapsedState(e, t) { let n = this.m_mapEmbed.get(this.GetKey(e, t)); return !(!n || !n.bCollapsed); } SetCollapsedState(e, t, n) { let i = this.GetOrCreateEmbedData(e, t); (i.bCollapsed = n), this.SaveEmbedData(e, t, i); } GetWidths(e, t) { let n = this.m_mapEmbed.get(this.GetKey(e, t)); if (n && n.nDesiredWidth && n.nDefaultWidth) return { nDesiredWidth: n.nDesiredWidth, nDefaultWidth: n.nDefaultWidth }; } SetWidths(e, t, n, i) { let o = this.GetOrCreateEmbedData(e, t); n == i ? (delete o.nDefaultWidth, delete o.nDesiredWidth) : ((o.nDesiredWidth = n), (o.nDefaultWidth = i)), this.SaveEmbedData(e, t, o); } } var d = n(13114), h = n(25629), u = n(20891), p = n(93354), _ = n(19339), g = n(1736), C = n(88991), f = n(57476), v = n(4638), S = n(91867), b = n(76262); class I extends S.u { Init(e) { (this.m_CMInterface = e), this.m_CMInterface.messageHandlers.RegisterEMessageAction(9331, b.jD, (e) => { let t = []; for (let n of e.Body().emoticons()) { let e = n.name(); if (e.startsWith("^")) t.push({ name: e }); else { let i = { name: e.substr(1, e.length - 2) }, o = i.name.toLowerCase(); o != i.name && (i.name_normalized = o), n.time_last_used() && (i.last_used = n.time_last_used()), n.use_count() && (i.use_count = n.use_count()), n.time_received() && (i.time_received = n.time_received()), n.appid() && (i.appid = n.appid()), t.push(i); } } this.OnEmoticonListReceived(t); const n = e.Body().toObject(); n.stickers && (this.m_rgStickers = n.stickers.map((e) => e)), n.effects && (this.m_rgEffects = n.effects.map((e) => { var { name: t } = e, n = (0, i._T)(e, ["name"]); return Object.assign({ name: t }, n); })); let o = this.m_rgStickers.map((e) => e.time_received).reduce((e, t) => Math.max(e, t), Number.MIN_SAFE_INTEGER), r = this.m_rgEffects.map((e) => e.time_received).reduce((e, t) => Math.max(e, t), Number.MIN_SAFE_INTEGER); this.m_rtLastStickerOrEffect = Math.max(o, r); }); } BInitialized() { return !!this.m_CMInterface; } GetServerTime() { return this.m_CMInterface.GetServerRTime32(); } RequestEmoticonListInternal() { this.m_CMInterface.RunWhenLoggedOn(() => { let e = g.gA.Init(b.nW, 9330); this.m_CMInterface.Send(e); }); } } var y = n(58594), E = n(9612); class D extends E.l { InitCM(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return null != this.m_CMInterface ? null : ((this.m_CMInterface = e), yield this.m_CMInterface.WaitUntilLoggedOn(), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(y.jj.NotifyCommunityPreferencesChangedHandler, (e) => (this.UpdateCommunityPreferences(e.Body().preferences()), this.OnFilterDataChanged(), 1)), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(y.jj.NotifyTextFilterWordsChangedHandler, (e) => (this.UpdateTextFilterWords(e.Body().words()), this.OnFilterDataChanged(), 1)), this.Init(this.m_CMInterface.steamid.GetAccountID(), this.m_CMInterface.GetServiceTransport(), t)); }); } } var w = n(9824), R = n(93635), A = n(84290); function M(e, t) { if (!e || !t) return []; let n = [], i = e.values(), o = i.next(); for (; !o.done; ) t(o.value) && n.push(o.value), (o = i.next()); return n; } function k(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { const n = Math.floor(Math.random() * t * 1e3); return yield new Promise((e) => setTimeout(e, n)), e(); }); } var T = n(5395); class L { constructor() { (this.m_bReady = !1), (0, s.rC)(this); } Init(e) { (this.m_storage = e), this.InitFromStorage(); } get bReady() { return this.m_bReady; } InitFromStorage() { return (0, i.mG)(this, void 0, void 0, function* () { try { const e = yield this.m_storage.GetObject(L.strSettingsStorageKey); if (!e) return (this.m_settings = s.LO.object({ friends: {}, groups: {} })), void (this.m_bReady = !0); if (!this.ParseStoredObject(e)) throw new Error("Stored object was malformed. Could not parse correctly."); (this.m_settings = s.LO.object(e)), (this.m_bReady = !0); } catch (e) { console.error(`CHiddenRecentItemsSettings: Problem initializing from cache: ${e}`), this.m_storage.RemoveObject(L.strSettingsStorageKey), (this.m_settings = s.LO.object({ friends: {}, groups: {} })), (this.m_bReady = !0); } }); } ParseStoredObject(e) { try { if ("object" != typeof e) return !1; const t = e; return "object" == typeof t.friends && "object" == typeof t.groups && !Object.keys(t.friends).some((e) => "number" != typeof t.friends[e]) && !Object.keys(t.groups).some((e) => "number" != typeof t.groups[e]); } catch (e) { return !1; } } BIsFriendHidden(e, t) { if (!this.m_bReady) return !1; const n = this.m_settings.friends[e.accountid.toString()]; return n && n >= t; } BIsGroupHidden(e, t) { if (!this.m_bReady) return !1; const n = this.m_settings.groups[e.GetGroupID()]; return n && n >= t; } SetHiddenTimeForFriend(e, t) { return (this.m_settings.friends[e.accountid.toString()] = t), (this.m_settings.bHasEverHiddenFriend = !0), this.Save(); } SetHiddenTimeForGroup(e, t) { return (this.m_settings.groups[e.GetGroupID()] = t), (this.m_settings.bHasEverHiddenGroup = !0), this.Save(); } Save() { return this.m_storage.StoreObject(L.strSettingsStorageKey, this.m_settings); } BHasEverHiddenFriend() { return this.m_settings.bHasEverHiddenFriend; } BHasEverHiddenGroup() { return this.m_settings.bHasEverHiddenGroup; } } (L.strSettingsStorageKey = "RecentChats.HiddenItems"), (0, i.gn)([s.LO], L.prototype, "m_bReady", void 0); var G = n(71240), O = n(22394); n(46519); class F { constructor(e) { (this.m_EmoticonStore = new I()), (this.m_FriendChatStore = new _.d(this)), (this.m_InviteStore = new h.kQ(this)), (this.m_GameInviteStore = new d.JL()), (this.m_ChatRoomGroupDisplayPrefs = new p.jx()), (this.m_EmbedStore = new m()), (this.m_TextFilterStore = new D({ BIsFriend: (e) => !!this.m_FriendStore.GetFriendIfCached(e) })), (this.m_mapChatGroups = s.LO.map()), (this.m_mapActiveChatGroupsToRefCount = s.LO.map()), (this.m_mapVirtualizedMemberListViews = new Map()), (this.m_mapClanChatsByClanID = new Map()), (this.m_HiddenRecentChatSettings = new L()), (this.m_GroupAddedCallbacks = new O.pB()), (this.m_bReceivedChatGroupList = !1), (this.m_bReadyToRender = !1), (this.m_bSendingActiveGroups = !1), (this.m_bSendActiveGroupsQueued = !1), (0, s.rC)(this), (this.m_FriendStore = e); } Init(e, t) { (this.m_CMInterface = e), this.m_EmoticonStore.Init(e), (this.m_VoiceChat = t), (this.m_ChatRoomBBCodeParser = a.Ul.GetChatRoomBBCodeParser()), (this.m_FriendChatBBCodeParser = a.Ul.GetFriendChatBBCodeParser()), (this.m_NotificationBBCodeParser = a.Ul.GetNotificationBBCodeParser()), (this.m_ChatRoomEffectSettings = a.Ul.GetChatRoomEffectSettings()), this.m_ChatRoomGroupDisplayPrefs.Init(a.Ul.SettingsStore), this.m_EmbedStore.Init(), this.m_FriendChatStore.Init(), this.m_HiddenRecentChatSettings.Init(a.Ul.Storage), this.m_TextFilterStore.InitCM(this.m_CMInterface, a.Ul.Storage); let n = !1, i = 0; return ( this.m_CMInterface.AddOnLogonCallback(() => { if (n) { const e = i < Date.now() / 1e3 - T._H.PerMinute / 2; e ? k(() => this.RestoreStatePostDisconnect(e), 4) : this.RestoreStatePostDisconnect(e); } else u.d.Init(a.Ul.Storage, e.steamid.GetAccountID().toString()).then(() => this.LoadMyChatRooms()), this.m_FriendChatStore.OnLogon(), (n = !0); this.m_GameInviteStore.Init(); }, 102), this.m_CMInterface.AddOnDisconnectCallback(() => (i = Date.now() / 1e3), 102), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(v.ej.NotifyIncomingChatMessageHandler, (e) => { let t = e.Body(), n = this.FindChatRoom(t.chat_group_id(), t.chat_id()); if (!n) return 2; let i = new C.K(t.steamid_sender()); if (0 != (t.server_message().message() || 0)) n.AddNewServerMsg(i.GetAccountID(), t.timestamp(), t.ordinal() || 0, t.server_message().message(), t.message(), t.server_message().string_param(), t.server_message().accountid_param()); else { let e = t.mentions(), o = null; e && ((o = {}), e.mention_all() && (o.mention_all = !0), e.mention_here() && (o.mention_here = !0), e.mention_accountids() && -1 !== e.mention_accountids().indexOf(this.m_FriendStore.self.accountid) && (o.mention_user = !0)), n.AddNewChatMsgAndNotify(i.GetAccountID(), t.timestamp(), t.ordinal() || 0, t.message(), t.message_no_bbcode(), o); let r = this.m_TextFilterStore; if (!r.BShownFilterTip() && r.BHasFilter()) { let e = t.message(); this.m_TextFilterStore.FilterText(i.GetAccountID(), e) !== e && (n.AddLocalMsg(i.GetAccountID(), t.timestamp(), (0, A.Xx)("#Chat_TextFilter_Active", this.GetTextFilterSettingsURL())), r.SetFilterTipShown(!0)); } } return 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(v.ej.NotifyChatMessageModifiedHandler, (e) => { let t = e.Body(), n = this.FindChatRoom(t.chat_group_id(), t.chat_id()); if (!n) return 2; let i = []; for (let t of e.Body().messages()) t.deleted && i.push({ rtTimestamp: t.server_timestamp(), unOrdinal: t.ordinal() }); return n.UpdateChatMessageDeletedState(i, r.im.Deleting), 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(v.ej.NotifyChatRoomHeaderStateChangeHandler, (e) => { let t = e.Body().header_state().chat_group_id(), n = this.m_mapChatGroups.get(t); return n && n.UpdateChatRoomHeaderState(e.Body().header_state()), 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(v.ej.NotifyMemberStateChangeHandler, (e) => { let t = e.Body().chat_group_id(), n = e.Body().change(), i = e.Body().member(); o.De.IN_CLIENT && (0, f.U5)("WebChat.OnGroupChatUserStateChange") && a.Ul.SettingsStore.BClientHasFeatureOrOnWeb("SteamworksChatAPI") && SteamClient.WebChat.OnGroupChatUserStateChange(t, i.accountid(), n); let r = this.m_mapChatGroups.get(t); return r && r.OnUserStateChange(i, n), 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(v.ej.NotifyChatRoomGroupRoomsChangeHandler, (e) => { let t = e.Body(), n = this.m_mapChatGroups.get(t.chat_group_id()); return n && n.OnRoomStateChange(t), 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(v.ej.NotifyChatGroupUserStateChangedHandler, (e) => { let t = e.Body(), n = t.chat_group_id(), i = t.user_action(); switch ((o.De.IN_CLIENT && (0, f.U5)("WebChat.OnGroupChatUserStateChange") && a.Ul.SettingsStore.BClientHasFeatureOrOnWeb("SteamworksChatAPI") && SteamClient.WebChat.OnGroupChatUserStateChange(n, o.L7.accountid, i), i)) { case 1: { let e = this.AddJoinedChatRoomGroup(t.group_summary(), t.user_chat_group_state()); a.Ul.UIStore.ShowAndOrActivateChatRoomGroup(a.Ul.GetDefaultBrowserContext(), e, !1); break; } case 2: case 3: case 10: { a.Ul.VoiceStore.GetActiveChatRoomGroupID() == n && a.Ul.VoiceStore.OnUserEndVoiceChat(); let e = this.GetChatRoomGroup(n), t = e ? e.name : void 0; this.RemoveChatRoomGroup(n), t && (3 == i ? a.Ul.ShowAlert((0, A.Xx)("#Alert_YouWereKickedTitle"), (0, A.Xx)("#Alert_YouWereKickedDescription", t)) : 10 == i && a.Ul.ShowAlert((0, A.Xx)("#Alert_YouWereBannedTitle"), (0, A.Xx)("#Alert_YouWereBannedDescription", t))); break; } case 7: case 0: { let e = this.GetChatRoomGroup(n); (0, R.X)(e, "Got state change for ChatRoomGroup we don't know about"), e && e.UpdateUserState(t.user_chat_group_state()); break; } case 4: break; default: (0, R.X)(!1, `Don't know how to handle state change of type ${(0, v.dH)(i)} `); } return 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(v.ej.NotifyAckChatMessageEchoHandler, (e) => { let t = e.Body().chat_group_id(), n = e.Body().chat_id(), i = e.Body().timestamp(), o = this.GetChatRoomGroup(t); if (!o) return 2; if (n) { let e = o.GetChatRoom(n); if (!e) return 11; e.UpdateLastAckTimeFromServer(i); } else o.UpdateLastAckTimeFromServer(i); return 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(v.ej.NotifyMessageReactionHandler, (e) => { const { chat_group_id: t, chat_id: n, server_timestamp: i, ordinal: o, is_add: r, reactor: s, reaction: l, reaction_type: c } = e.Body().toObject(), m = this.GetChatRoomGroup(t); if (m) { const e = m.GetChatRoom(n); if (e) { const t = e.chat_messages.find((e) => e.rtTimestamp === i && e.unOrdinal === o); if (t) { const n = t.reactions.find((e) => e.strReaction === l), i = r ? 1 : -1; if (-1 === i && !n) return console.error("ChatRoomClientService.NotifyMessageReaction: Got reaction removal notifiaction but no matching reaction was found."), 1; let o = !!n && n.bUserReacted; s === a.Ul.FriendStore.self.steamid64 && (o = r); t.UpdateReaction(c, l, n ? n.cReactors + i : i, o); const m = new C.K(s); e.UpdateMessageReactionReactors(t, l, m.GetAccountID(), r); } } } return 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler( v.ej.NotifyChatRoomDisconnectHandler, (e) => ( k( () => (0, s.z)(() => { for (let t of e.Body().chat_group_ids()) { let e = this.m_mapChatGroups.get(t); e && e.OnConnectionRestored(!0); } this.SendActiveChatRoomGroupsToServer(); }), 4, ), 1 ), ), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(v.ej.NotifyMemberListViewUpdatedHandler, (e) => { let t = this.m_mapVirtualizedMemberListViews.get(e.Body().view_id()); return t && t.OnServerUpdate(e.Body()), 1; }), new Promise((e) => { this.m_fnOnReadyToRender = e; }) ); } SetReadyToRender() { this.m_bReadyToRender || ((this.m_bReadyToRender = !0), this.m_fnOnReadyToRender && (this.m_fnOnReadyToRender(), (this.m_fnOnReadyToRender = void 0))); } RestoreStatePostDisconnect(e) { e && this.LoadMyChatRooms(); const t = Array.from(this.m_mapActiveChatGroupsToRefCount.values()).some((e) => e > 0); this.m_FriendChatStore.RestoreStatePostDisconnect(e), this.m_mapChatGroups.forEach((t) => t.OnConnectionRestored(e)), t && this.SendActiveChatRoomGroupsToServer(); } LoadMyChatRooms() { let e = !1, t = g.gA.Init(v.RG); v.Xn.GetMyChatRoomGroups(this.m_CMInterface.GetServiceTransport(), t) .then((t) => { (0, s.z)(() => { 1 != t.GetEResult() && (e = !0); let n = t.Body().chat_room_groups(); for (let t of n) { let n = t.group_summary().chat_group_id(); if (!n) { e = !0; continue; } let i = this.m_mapChatGroups.get(n); i || ((i = new p.PR(this, n)), this.m_mapChatGroups.set(n, i)), i.SetInitialGroupState(t.group_summary()), i.UpdateUserState(t.user_chat_group_state()), this.OnGroupAdded(i), i.BHasEverBeenAcked() || a.Ul.UIStore.ShowUnackedGroup(i); } this.SetReadyToRender(), (this.m_bReceivedChatGroupList = !0); }); }) .catch((e) => { console.error("Failed to load chat rooms from server", e), this.SetReadyToRender(); }); } OnGroupAdded(e) { e.GetClanID() && (this.m_mapClanChatsByClanID.set(e.GetClanID(), e.GetGroupID()), this.m_FriendStore.ClanStore.SetClanChatGroupID(e.GetClanID(), e.GetGroupID())), this.m_GroupAddedCallbacks.Dispatch(e); } RegisterForGroupAdded(e) { return this.m_GroupAddedCallbacks.Register(e); } OnChatRoomActivated(e) { e.GetGroup().OnActivate(); } JoinAndShowChatRoomGroup(e, t, n) { let i = this.GetChatRoomGroup(t); i && i.BIsCurrentUserAMember() ? a.Ul.UIStore.ShowAndOrActivateChatRoomGroup(e, i, n) : this.m_InviteStore.JoinChatGroup(t, null, e); } AddCreatedChatRoomGroup(e, t, n, i) { if (this.m_mapChatGroups.has(t)) return; let o = new p.PR(this, t); this.m_mapChatGroups.set(t, o), o.UpdateGroupState(n), o.UpdateUserState(i), this.OnGroupAdded(o), a.Ul.UIStore.ShowAndOrActivateChatRoomGroup(e, o, !0); } AddKnownChatRoomGroup(e, t) { let n = e.chat_group_id(); if (this.m_mapChatGroups.has(n)) { this.m_mapChatGroups.get(n).SetInitialGroupState(e); } else { let i = new p.PR(this, n); this.m_mapChatGroups.set(n, i), i.SetInitialGroupState(e), t && i.UpdateUserState(t), this.OnGroupAdded(i); } } AddJoinedChatRoomGroup(e, t) { let n = t.chat_group_id(), i = this.m_mapChatGroups.get(n); return i || ((i = new p.PR(this, n)), this.m_mapChatGroups.set(n, i)), e instanceof v.Pt ? i.UpdateGroupState(e) : i.SetInitialGroupState(e), this.OnGroupAdded(i), i.UpdateUserState(t), i; } RemoveChatRoomGroup(e) { let t = this.m_mapChatGroups.get(e); if (!t) return; let n = this.m_mapChatGroups.get(e); n && a.Ul.UIStore.CloseTabByID(n.unique_id), this.GetRefCountActiveChatRoomGroup(e) <= 0 && t.UnloadAndResetGroupState(); } FindChatRoom_Deprecated(e) { let t = null; return ( this.m_mapChatGroups.forEach((n) => { let i = n.GetChatRoom(e); i && (t = i); }), t ); } FindChatRoom(e, t) { let n = this.m_mapChatGroups.get(e); return n ? n.GetChatRoom(t) : null; } get chat_group_list_ready() { return this.m_bReceivedChatGroupList; } get FriendStore() { return this.m_FriendStore; } get CMInterface() { return this.m_CMInterface; } get VoiceChat() { return this.m_VoiceChat; } get ChatRoomBBCodeParser() { return this.m_ChatRoomBBCodeParser; } get FriendChatBBCodeParser() { return this.m_FriendChatBBCodeParser; } get NotificationBBCodeParser() { return this.m_NotificationBBCodeParser; } get ChatRoomEffectSettings() { return this.m_ChatRoomEffectSettings; } get FriendChatStore() { return this.m_FriendChatStore; } get EmoticonStore() { return this.m_EmoticonStore; } get InviteStore() { return this.m_InviteStore; } get GameInviteStore() { return this.m_GameInviteStore; } get EmbedStore() { return this.m_EmbedStore; } get TextFilterStore() { return this.m_TextFilterStore; } GetTextFilterStatus() { let e = this.m_TextFilterStore.TextFilterPreferences; switch (e.eTextFilterSetting) { case 0: return (0, A.Xx)("#TextFilterStatus_SteamLabOptedOut"); case 1: return e.bIgnoreFriends ? (0, A.Xx)("#TextFilterStatus_Enabled_IgnoreFriends") : (0, A.Xx)("#TextFilterStatus_Enabled"); case 2: return e.bIgnoreFriends ? (0, A.Xx)("#TextFilterStatus_EnabledAllowProfanity_IgnoreFriends") : (0, A.Xx)("#TextFilterStatus_EnabledAllowProfanity"); case 3: return (0, A.Xx)("#TextFilterStatus_Disabled"); default: return ""; } } GetTextFilterSettingsURL() { return o.De.STORE_BASE_URL + "account/preferences#CommunityContentPreferences"; } get ChatRoomGroupDisplayPrefs() { return this.m_ChatRoomGroupDisplayPrefs; } BIsEligibleForVoiceChat(e, t) { let n; t && t instanceof _.a && (n = t); let i = 2 == e.efriendrelationship, o = 4 == e.efriendrelationship; return e.persona.is_online && !n && !i && !o && !e.is_blocked; } GetActiveVoiceChat() { let e = this.m_VoiceChat.GetActiveVoiceChatID(); if ("" != e) { let t = this.FindChatRoom_Deprecated(e); if (t) return t; } else { let e = this.m_VoiceChat.GetActiveOneOnOneVoiceChatAccountID(); if (0 != e) { let t = this.GetFriendChat(e, !1); if (t) return t; } } } GetActiveVoiceChannelName() { let e = this.GetActiveVoiceChat(); return null != e ? e.name : ""; } GetFriendChat(e, t = !0) { return e == this.FriendStore.self.accountid ? null : this.m_FriendChatStore.GetFriendChat(e, t); } GetRecentChats() { function e(e) { return Math.max(e.time_last_ack, e.time_last_message); } function t(e) { return e.time_last_activity; } const n = a.Ul.ChatStore.FriendChatStore.GetAllChats() .filter((t) => !this.m_HiddenRecentChatSettings.BIsFriendHidden(t.chat_partner, e(t)) && e(t) > 0) .sort((t, n) => e(n) - e(t)), i = a.Ul.ChatStore.currentChatRoomGroups.filter((e) => !!e.room_with_last_message && !this.m_HiddenRecentChatSettings.BIsGroupHidden(e, t(e))).sort((e, n) => t(n) - t(e)), o = []; for (let r = 0, a = 0; r + a < n.length + i.length; ) r === n.length ? o.push(i[a++]) : a === i.length ? o.push(n[r++]) : i[a].room_with_last_message ? (e(n[r]) < t(i[a]) ? o.push(i[a++]) : o.push(n[r++])) : a++; return o; } GetChatRoomGroup(e) { return this.m_mapChatGroups.get(e); } get currentChatRoomGroups() { return M(this.m_mapChatGroups, (e) => e.BIsCurrentUserAMember()); } FindChatRoomGroupsMatchingSearch(e) { return this.currentChatRoomGroups.filter((t) => -1 !== t.name.toLocaleLowerCase().indexOf(e)); } get ClanChatRooms() { return M(this.m_mapChatGroups, (e) => e.BIsClanChatRoom()); } GetRefCountActiveChatRoomGroup(e) { let t = this.m_mapActiveChatGroupsToRefCount.get(e); return void 0 === t && (t = 0), t; } IncRefActiveChatRoomGroup(e, t) { let n = this.m_mapActiveChatGroupsToRefCount.get(e); return void 0 === n && (n = 0), (n += 1), this.m_mapActiveChatGroupsToRefCount.set(e, n), 1 == n && t && this.SendActiveChatRoomGroupsToServer(), n; } DecRefActiveChatRoomGroup(e) { let t = this.m_mapActiveChatGroupsToRefCount.get(e), n = void 0 !== t && t > 0; if (((0, R.X)(n, "Attempting to DecRef a Chat Group that has no existing references. Doing nothing."), !n)) return 0; if (((t -= 1), t <= 0)) { this.m_mapActiveChatGroupsToRefCount.delete(e); let t = this.m_mapChatGroups.get(e); t && t.UnloadActiveGroupState(), this.SendActiveChatRoomGroupsToServer(); } else this.m_mapActiveChatGroupsToRefCount.set(e, t); return t; } OnRestorePopupsComplete() { this.m_mapActiveChatGroupsToRefCount.size > 0 && this.SendActiveChatRoomGroupsToServer(); } SendActiveChatRoomGroupsToServer() { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_bSendingActiveGroups) return void (this.m_bSendActiveGroupsQueued = !0); let e = 0.5; const t = () => (0, i.mG)(this, void 0, void 0, function* () { try { return yield this.InternalSendActiveChatRoomGroupsToServer(); } catch (e) { return !1; } }); for (; !(yield t()); ) yield new Promise((t) => setTimeout(t, 1e3 * e)), (e *= 2); }); } InternalSendActiveChatRoomGroupsToServer() { return (0, i.mG)(this, void 0, void 0, function* () { return new Promise((e) => { let t = [], n = g.gA.Init(v.$r); this.m_mapActiveChatGroupsToRefCount.forEach((e, i) => { if (((0, R.X)(e > 0, "SendActiveChatRoomGroupsToServer found invalid ref count for chat group."), e <= 0)) return; n.Body().add_chat_group_ids(i); let o = this.m_mapChatGroups.get(i); (o && o.readyToRender) || n.Body().add_chat_groups_data_requested(i), a.Ul.SettingsStore.BClientHasFeatureOrOnWeb("ServerVirtualizedMemberLists") && n.Body().set_virtualize_members_threshold(100), o && o.BIsClanChatRoom() && t.push(o.GetClanID()); }); const i = (n) => { o.De.IN_CLIENT && SteamClient.WebChat.SetActiveClanChatIDs(t), n && void 0 !== r && ClearBackgroundTimeout(r), (this.m_bSendingActiveGroups = !1), this.m_bSendActiveGroupsQueued ? e(!1) : e(n); }, r = SetBackgroundTimeout(() => { (this.m_bSendActiveGroupsQueued = !0), i(!1); }, 1e4); (this.m_bSendActiveGroupsQueued = !1), (this.m_bSendingActiveGroups = !0), v.Xn.SetSessionActiveChatRoomGroups(this.m_CMInterface.GetServiceTransport(), n) .then( (e) => { let n = !1; return ( (0, s.z)(() => { if (1 == e.GetEResult()) { for (let i of e.Body().chat_states()) { let e = this.m_mapChatGroups.get(i.header_state().chat_group_id()); if (e) try { e.UpdateGroupState(i), e.BIsClanChatRoom() && -1 === t.indexOf(e.GetClanID()) && t.push(e.GetClanID()); } catch (t) { (n = !0), console.error(`exception processing group update for group ${e.GetGroupID()}`, t); } } for (let t of e.Body().virtualize_members_chat_group_ids()) { let e = this.m_mapChatGroups.get(t); e && e.SetMemberListVirtualized(!0); } } else n = !0; }), !n ); }, () => !1, ) .then(i); }); }); } CreateChatRoomGroup(e, t, n, i = {}) { const { unBroadcastAccountId: o } = i; let r = g.gA.Init(v.Hf); r.Body().set_name(t); for (let e of n) r.Body().add_steamid_invitees(e); return ( o && r.Body().set_watching_broadcast_accountid(o), v.Xn.CreateChatRoomGroup(this.m_CMInterface.GetServiceTransport(), r).then((t) => { let n = t.GetEResult(); if (1 != n) throw n; return this.AddCreatedChatRoomGroup(e, t.Body().chat_group_id(), t.Body().state(), t.Body().user_chat_state()), t.Body().chat_group_id(); }) ); } LeaveChatRoomGroup(e, t) { let n = g.gA.Init(v.ju); return ( n.Body().set_chat_group_id(t), v.Xn.LeaveChatRoomGroup(this.m_CMInterface.GetServiceTransport(), n).then((e) => { let n = e.GetEResult(); if (1 != n) throw n; this.RemoveChatRoomGroup(t); }) ); } FindNamelessChatGroupWithFriends(e) { if (0 == e.length) return null; let t = e.map((e) => new C.K(e).GetAccountID()), n = Array.from(this.m_mapChatGroups.values()); for (let e of n) if (!e.IsNamedGroupChat() && e.BRoomContainsJustTheseFriendsAndSelf(t)) return e; return null; } FillInChatUsabilityMetrics(e) { e.metrics().set_group_chat_count(w.W(Array.from(this.m_mapChatGroups.values()), (e) => e.BIsCurrentUserAMember())), this.m_ChatRoomGroupDisplayPrefs.FillInChatUsabilityMetrics(e); } GetChatsWithUnreadPriorityMessages() { let e = [], t = this.FriendChatStore.GetFriendsWithUnreadMessages(null); for (let n of t) n.has_unread_priority_messages && e.push(n); let n = this; return ( this.m_mapActiveChatGroupsToRefCount.forEach(function (t, i) { n.m_mapChatGroups.get(i).GetChatRoomsWithUnreadPriorityMessages(e); }), e ); } GetChatToActivateForOldestUnread(e) { let t = null, n = (n) => !(!n.has_unread_priority_messages && 0 == n.GetVisibilityState(e)) && (!t || (!(t.has_unread_priority_messages && !n.has_unread_priority_messages) && (!(t.has_unread_priority_messages || !n.has_unread_priority_messages) || t.m_msTimeActivated < n.m_msTimeActivated || (!(t.m_msTimeActivated > n.m_msTimeActivated) && t.time_last_message < n.time_last_message)))); this.m_mapActiveChatGroupsToRefCount.forEach((e, i) => { const o = this.m_mapChatGroups.get(i).chatRoomList; for (let e of o) n(e) && (t = e); }); const i = this.m_FriendChatStore.GetAllChats(); for (let e of i) n(e) && (t = e); return t; } RegisterVirtualizedMemberListView(e) { this.m_mapVirtualizedMemberListViews.set(e.GetViewID(), e); } UnregisterVirtualizedMemberListView(e) { e && (this.m_mapVirtualizedMemberListViews.delete(e.GetViewID()), e.UnregisterFromServer()); } } (0, i.gn)([s.LO], F.prototype, "m_bReceivedChatGroupList", void 0), (0, i.gn)([a.IN], F.prototype, "JoinAndShowChatRoomGroup", null), (0, i.gn)([s.aD], F.prototype, "AddCreatedChatRoomGroup", null), (0, i.gn)([s.aD], F.prototype, "AddKnownChatRoomGroup", null), (0, i.gn)([s.aD], F.prototype, "AddJoinedChatRoomGroup", null), (0, i.gn)([s.aD], F.prototype, "RemoveChatRoomGroup", null), (0, i.gn)([s.Fl], F.prototype, "currentChatRoomGroups", null), (0, i.gn)([s.Fl], F.prototype, "ClanChatRooms", null); }, 46962: (e, t, n) => { "use strict"; n.d(t, { Ok: () => v, P9: () => _, R$: () => b, VO: () => h, dz: () => C, iA: () => f, im: () => p, n: () => I, oT: () => u, p: () => g, tw: () => S }); var i = n(85556), o = n(79588), r = n(78654), a = n(72746), s = n(10553), l = n(11612); const c = { "/me": { strDescriptionToken: "#SlashCommandDescription_Me", bAvailableInChina: !0 }, "/code": { strDescriptionToken: "#SlashCommandDescription_Code", bAvailableInChina: !0 }, "/pre": { strDescriptionToken: "#SlashCommandDescription_Pre", bAvailableInChina: !0 }, "/giphy": { strDescriptionToken: "#SlashCommandDescription_Giphy", bAvailableInChina: !1 }, "/spoiler": { strDescriptionToken: "#SlashCommandDescription_Spoiler", bAvailableInChina: !0 }, "/quote": { strDescriptionToken: "#SlashCommandDescription_Quote", bAvailableInChina: !0 }, "/random": { strDescriptionToken: "#SlashCommandDescription_Random", unExpectedArguments: [1, 2], bAvailableInChina: !0 }, "/flip": { strDescriptionToken: "#SlashCommandDescription_Flip", unExpectedArguments: 0, bAvailableInChina: !0 }, "/store": { strDescriptionToken: "#SlashCommandDescription_Store", bAvailableInChina: !1 } }; let m = null; function d() { if (null == m) { m = {}; for (let e in c) { let t = c[e]; (s.De.EREALM != l.IN.k_ESteamRealmChina || t.bAvailableInChina) && (m[e] = t); } } return m; } function h() { return Object.keys(d()); } function u(e) { return d()[e]; } var p, _, g; !(function (e) { (e[(e.None = 0)] = "None"), (e[(e.Deleting = 1)] = "Deleting"), (e[(e.Deleted = 2)] = "Deleted"); })(p || (p = {})), (function (e) { (e[(e.None = 0)] = "None"), (e[(e.Animating = 1)] = "Animating"); })(_ || (_ = {})), (function (e) { (e[(e.None = 0)] = "None"), (e[(e.Generic = 1)] = "Generic"), (e[(e.NotFriends = 2)] = "NotFriends"), (e[(e.NoChatPermissionInGroup = 3)] = "NoChatPermissionInGroup"), (e[(e.RateLimitExceeded = 4)] = "RateLimitExceeded"); })(g || (g = {})); class C { constructor(e, t, n, i, r = [], a, s, l) { (this.rtTimestamp = void 0), (this.unOrdinal = 0), (this.eDeleteState = p.None), (this.eAnimationState = _.None), (this.strServerMsgAppCustomLocalized = void 0), (this.m_rgReactions = void 0), (0, o.rC)(this), (this.unAccountID = e), (this.rtTimestamp = t), (this.unOrdinal = n || 0), (this.m_rgReactions = r), i && i.length > 13e3 ? (this.strMessageInternal = i.substr(0, 13e3)) : (this.strMessageInternal = i), (this.m_strSlashCommand = (function (e) { if (!e) return null; const [t, ...n] = e.split(/\s/); let i = d(); if (i[t]) { const e = i[t].unExpectedArguments; if (void 0 === e || ("number" == typeof e ? e === n.length : e.indexOf(n.length) > -1)) return t; } return null; })(i)), (this.strMessageInternal = this.HandleSpecialMessage(this.strMessageInternal)), void 0 !== a && ((this.eServerMsgType = a), (this.strServerMsgParam = s), (this.unServerMsgParamAccountID = l)); } get strMessage() { return this.strMessageInternal; } UniqueKey() { return this.unOrdinal ? this.rtTimestamp + "_" + this.unOrdinal : this.rtTimestamp; } set Mentions(e) { this.m_mentions = e; } get Mentions() { return this.m_mentions || {}; } BIsLocalEcho() { return !1; } BHasServerAcknowledged() { return !0; } get eErrorSending() { return g.None; } BIsServerMessage() { return null != this.eServerMsgType && 0 != this.eServerMsgType; } BIsInvite() { return 5 == this.eServerMsgType; } GetSlashCommand() { return this.m_strSlashCommand; } BIsOlderThan(e) { return this.rtTimestamp < e.rtTimestamp || (this.rtTimestamp == e.rtTimestamp && this.unOrdinal < e.unOrdinal); } BIsNewerThan(e) { return this.rtTimestamp > e.rtTimestamp || (this.rtTimestamp == e.rtTimestamp && this.unOrdinal > e.unOrdinal); } HasUserContent() { return !this.m_bNoUserContent; } HandleSpecialMessage(e) { return "+1" == e ? ((this.m_bNoUserContent = !0), "[plusone][/plusone]") : e; } OnAnimationEnd() { this.eAnimationState = _.None; } UpdateReaction(e, t, n, i) { const o = this.m_rgReactions.findIndex((e) => e.strReaction === t); if (-1 === o) { if (n > 0) { const o = { eReactionType: e, strReaction: t, cReactors: n, bUserReacted: i }; return this.m_rgReactions.push(o), o; } return console.error("Did not find reaction we wanted to remove"), null; } return 0 === n ? (this.m_rgReactions.splice(o, 1), null) : ((this.m_rgReactions[o].cReactors = n), (this.m_rgReactions[o].bUserReacted = i), this.m_rgReactions[o]); } get reactions() { return this.m_rgReactions; } } (0, i.gn)([o.LO], C.prototype, "rtTimestamp", void 0), (0, i.gn)([o.LO], C.prototype, "unOrdinal", void 0), (0, i.gn)([o.LO], C.prototype, "eDeleteState", void 0), (0, i.gn)([o.LO], C.prototype, "eAnimationState", void 0), (0, i.gn)([o.LO], C.prototype, "strServerMsgAppCustomLocalized", void 0), (0, i.gn)([o.LO], C.prototype, "m_rgReactions", void 0); class f extends C { constructor(e, t, n) { super(e, t, -1, n), (this.eErrorSendingObservable = g.None), (this.strMessageObservable = void 0), (this.m_bServerAcknowledged = !1), (0, o.rC)(this), (this.strMessageObservable = this.HandleSpecialMessage(n)), (this.m_iLocalEchoID = f.sm_iLocalEchoID++); } get strMessage() { return this.strMessageObservable; } set strMessage(e) { this.strMessageObservable = this.HandleSpecialMessage(e); } get eErrorSending() { return this.eErrorSendingObservable; } SetErrorSending(e) { this.eErrorSendingObservable = e; } BIsLocalEcho() { return !0; } UniqueKey() { return this.m_bServerAcknowledged ? super.UniqueKey() : "localecho_" + this.m_iLocalEchoID; } BHasServerAcknowledged() { return this.m_bServerAcknowledged; } OnServerAcknowledged() { this.m_bServerAcknowledged = !0; } } (f.sm_iLocalEchoID = 0), (0, i.gn)([o.LO], f.prototype, "eErrorSendingObservable", void 0), (0, i.gn)([o.LO], f.prototype, "strMessageObservable", void 0), (0, i.gn)([o.LO], f.prototype, "m_bServerAcknowledged", void 0), (0, i.gn)([o.aD], f.prototype, "OnServerAcknowledged", null); class v extends C { constructor(e, t, n) { super(e, t, ++v.m_nOrdinal, n); } } v.m_nOrdinal = 0; class S extends C { constructor(e, t, n) { super(e, t, ++S.m_nOrdinal, n); } } function b(e) { switch (e) { case 1: case 5: case 2: case 3: case 4: case 9: case 10: case 11: return !0; } return !1; } S.m_nOrdinal = 0; class I { constructor() { (this.m_rgMessageBlocks = o.LO.array([], { deep: !1 })), (this.m_iIndexLastTimePassesGap = void 0), (0, o.rC)(this), this.Clear(); } get message_blocks() { return this.m_rgMessageBlocks; } get time_passes_index() { return this.m_iIndexLastTimePassesGap; } Clear() { this.m_rgMessageBlocks.clear(), this.m_rgMessageBlocks.push(new y()), (this.m_iIndexLastTimePassesGap = void 0); } AppendMessage(e) { let t = this.m_rgMessageBlocks[this.m_rgMessageBlocks.length - 1]; if (!t.BCanAccumulateMessage(e)) { let n = t; (t = new y()), this.m_rgMessageBlocks.push(t), n.SetNextBlock(t), e.rtTimestamp - n.GetRTimeLastMessage() >= 3600 && (n.GetRTimeMidnightBeforeBlock() == a.Ul.GetLocalMidnightInRTime32(e.rtTimestamp) ? (this.m_iIndexLastTimePassesGap = this.m_rgMessageBlocks.length - 1) : (this.m_iIndexLastTimePassesGap = void 0)); } t.AppendMessage(e); } BuildMessageBlocks(e) { this.Clear(); for (let t of e) this.AppendMessage(t); } AppendNewMessage(e) { this.AppendMessage(e); } RemoveLocalMessage(e) { for (const t of this.m_rgMessageBlocks) if (t.RemoveLocalMessage(e)) return !0; return !1; } RemoveOldestMessages(e) { let t = 0; for (; e > 0 && !(t >= this.m_rgMessageBlocks.length); ) { let n = this.m_rgMessageBlocks[t].messages; if (n.length > e) break; (e -= n.length), t++; } if (0 == t) return null; let n = null; for (let e = t - 1; e >= 0; e--) { let t = this.m_rgMessageBlocks[e].messages; if (0 != t.length) { n = t[t.length - 1]; break; } } return this.m_rgMessageBlocks.splice(0, t), n; } } (0, i.gn)([o.LO], I.prototype, "m_iIndexLastTimePassesGap", void 0), (0, i.gn)([o.aD], I.prototype, "BuildMessageBlocks", null), (0, i.gn)([o.aD], I.prototype, "AppendNewMessage", null), (0, i.gn)([o.aD], I.prototype, "RemoveLocalMessage", null), (0, i.gn)([o.aD], I.prototype, "RemoveOldestMessages", null); class y { constructor() { (this.m_rgMessages = []), (this.m_nextBlock = void 0), (this.m_bMessageBlockIsOnlyEmotes = !0), (0, o.rC)(this); } CreateVirtualSplitOnTimestamp(e) { let t = new y(), n = new y(); t.SetNextBlock(n), n.SetNextBlock(this.m_nextBlock); for (let i of this.m_rgMessages) i.rtTimestamp < e ? t.AppendMessage(i) : n.AppendMessage(i); return [t, n]; } UniqueKey() { return this.m_rgMessages.length ? this.m_rgMessages[0].UniqueKey() : "EmptyBlock"; } get messages() { return this.m_rgMessages; } SetNextBlock(e) { this.m_nextBlock = e; } get is_last_block() { return void 0 === this.m_nextBlock; } GetRTimeMidnightBeforeBlock() { return this.m_rtMidnightBeforeBlock; } GetRTimeMidnightBeforeNextBlock() { return this.m_nextBlock ? this.m_nextBlock.GetRTimeMidnightBeforeBlock() : a.Ul.GetLocalMidnightInRTime32(); } GetRTimeLastMessage() { return this.m_rgMessages.length ? this.m_rgMessages[this.m_rgMessages.length - 1].rtTimestamp : r.g1; } GetRTimeFirstMessage() { return this.m_rgMessages.length ? this.m_rgMessages[0].rtTimestamp : 0; } AppendMessage(e) { "/me" === e.GetSlashCommand() || (this.m_bMessageBlockIsOnlyEmotes = !1), this.m_rgMessages.length || (this.m_rtMidnightBeforeBlock = a.Ul.GetLocalMidnightInRTime32(e.rtTimestamp)), this.m_rgMessages.push(e); } BCanAccumulateMessage(e) { if (!this.m_rgMessages.length) return !0; let t = this.m_rgMessages[0].unAccountID, n = this.m_rgMessages[this.m_rgMessages.length - 1].rtTimestamp, i = this.m_rgMessages[this.m_rgMessages.length - 1]; return e.BIsServerMessage() == this.m_rgMessages[0].BIsServerMessage() && (!(!e.BIsServerMessage() || e.BIsInvite() || this.m_rgMessages[0].BIsInvite()) || (!(!t || t != e.unAccountID) && e.BIsInvite() == this.m_rgMessages[0].BIsInvite() && !(e.rtTimestamp - n > 300) && (!this.m_bMessageBlockIsOnlyEmotes || "/me" === e.GetSlashCommand()) && !(e instanceof v || i instanceof v) && !(a.Ul.GetLocalMidnightInRTime32(e.rtTimestamp) > this.m_rtMidnightBeforeBlock) && !(e instanceof S || i instanceof S))); } BIsInvite() { return this.m_rgMessages.length > 0 && this.m_rgMessages[0].BIsInvite(); } BIsServerMsg() { return this.m_rgMessages.length > 0 && this.m_rgMessages[0].BIsServerMessage() && !this.m_rgMessages[0].BIsInvite(); } BIsLocalMsg() { return this.m_rgMessages.length > 0 && this.m_rgMessages[0] instanceof S; } RemoveLocalMessage(e) { const t = this.m_rgMessages.findIndex((t) => t.BIsLocalEcho() && t.UniqueKey() === e.UniqueKey()); return -1 !== t && (this.m_rgMessages.splice(t, 1), !0); } } (0, i.gn)([o.LO.shallow], y.prototype, "m_rgMessages", void 0), (0, i.gn)([o.LO.shallow], y.prototype, "m_nextBlock", void 0), (0, i.gn)([o.aD], y.prototype, "CreateVirtualSplitOnTimestamp", null); }, 71576: (e, t, n) => { "use strict"; n.d(t, { Q: () => i }); class i { OnTabActivate() { (this.m_msLastActive = performance.now()), this.InternalOnTabActivate(); } GetTimeLastActivate() { return this.m_msLastActive || 0; } IsChatRoom() { return !1; } IsFriendChat() { return !1; } IsBroadcast() { return !1; } } }, 71240: (e, t, n) => { "use strict"; n.d(t, { R5: () => _, ub: () => p }); var i = n(85556), o = n(92883), r = n(79588), a = n(9824), s = n(22394), l = n(10553), c = n(84446), m = n(35341), d = n(19339), h = n(72746), u = n(71576); class p extends u.Q { constructor(e, t) { super(), (this.m_rgOnChatFrameChangedCallbacks = []), (this.m_rgOnChatRequestScrollBottomCallbacks = []), (this.m_bScrolledToBottom = !0), (this.m_scrollTop = -1), (this.m_scrollHeight = -1), (this.m_clientHeight = 1), (this.m_textEntryFocusCallbacks = new s.pB()), (this.m_clipToUpload = void 0), (0, r.rC)(this), (this.m_tabset = e), (this.m_chat = t), this.m_tabset && this.m_chat.AddChatView(this), (this.m_strTextEntry = ""), (this.m_fileUploadManager = new m.Gg(t)); } GetTabName() { return this.m_chat.name; } GetUniqueID() { return this.m_chat.unique_id; } OnTabFocus() { this.OnFocus(); } InternalOnTabActivate() { this.OnActivate(); } OnTabDeactivate() { this.OnDeactivate(); } OnTabClosed() { this.OnViewClosed(); } IsChatRoom() { return this.m_chat instanceof c.K; } IsFriendChat() { return this.m_chat instanceof d.a; } IsVoiceActive() { return this.m_chat.BVoiceActive(); } GetUnreadMessageCount() { return this.m_chat.unread_message_count; } IsTabForChat(e) { return this.m_chat == e; } GetChatView() { return this; } OnViewClosed() { this.m_chat.RemoveChatView(this); } get chat() { return this.m_chat; } BIsInBrowserContext(e) { let t = this.m_tabset.GetBrowserContext(); return e.m_nBrowserID == t.m_nBrowserID && e.m_unPID == t.m_unPID; } GetVisibilityState() { if (!this.m_tabset || (!this.m_tabset.is_popup_active && !l.De.IN_MOBILE)) return 0; let e; return this.m_tabset.activeTab && (e = this.m_tabset.activeTab.GetChatView()), e != this || (!this.m_tabset.is_popup_visible && !l.De.IN_MOBILE) ? 1 : this.m_tabset.is_popup_focused || l.De.IN_MOBILE ? (this.m_bScrolledToBottom && !h.Ul.IdleTracker.BIsUserIdle(60) ? 4 : 3) : 2; } get lastScrollHeight() { return this.m_scrollHeight; } set lastScrollHeight(e) { this.m_scrollHeight = e; } get lastScrollTop() { return this.m_scrollTop; } set lastScrollTop(e) { this.m_scrollTop = e; } get lastClientHeight() { return this.m_clientHeight; } set lastClientHeight(e) { this.m_clientHeight = e; } get is_scrolled_to_bottom() { return this.m_bScrolledToBottom; } set is_scrolled_to_bottom(e) { !this.m_bScrolledToBottom && e && this.m_chat.OnActivate(), (this.m_bScrolledToBottom = e); } get text_entry() { return this.m_strTextEntry; } set text_entry(e) { this.m_strTextEntry = e; } get file_upload_manager() { return this.m_fileUploadManager; } get clip_to_upload() { return this.m_clipToUpload; } CheckActivationAndNotifyChat() { this.m_bScrolledToBottom && this.m_chat.OnActivate(); } OnActivate() { this.CheckActivationAndNotifyChat(), this.FocusTextInput(), (this.m_chat.m_msTimeActivated = Date.now()); } OnDeactivate() { this.m_chat.OnDeactivate(); } OnFocus() { this.CheckActivationAndNotifyChat(); } FocusTextInput() { this.m_textEntryFocusCallbacks.Dispatch(); } AddOnChatFrameChangedCallback(e) { this.m_rgOnChatFrameChangedCallbacks.push(e); } RemoveOnChatFrameChangedCallback(e) { a.Zf(this.m_rgOnChatFrameChangedCallbacks, e); } AddOnChatRequestScrollBottomCallback(e) { this.m_rgOnChatRequestScrollBottomCallbacks.push(e); } RemoveOnChatRequestScrollBottomCallback(e) { a.Zf(this.m_rgOnChatRequestScrollBottomCallbacks, e); } OnChatFrameChanged() { for (let e of this.m_rgOnChatFrameChangedCallbacks) e(); } OnScrollBottomRequest() { for (let e of this.m_rgOnChatRequestScrollBottomCallbacks) e(); } SetFileToUpload(e, t) { this.m_fileUploadManager.SetImageFileToUpload(e, t); } UploadFile(e) { return (0, i.mG)(this, void 0, void 0, function* () { yield this.m_fileUploadManager.BeginFileUpload({ bSpoiler: e }), this.m_fileUploadManager.Reset(); }); } SetClipToUpload(e) { this.m_clipToUpload = e; } RegisterForTextEntryFocus(e) { return this.m_textEntryFocusCallbacks.Register(e); } BVoiceActive() { return this.m_chat.BVoiceActive(); } ConvertMessageToBBCode(e) { return (0, o.Ao)(e); } SendChatMessage(e) { return (0, i.mG)(this, void 0, void 0, function* () { return this.m_chat.SendChatMessage(this.ConvertMessageToBBCode(e)); }); } } (0, i.gn)([r.LO], p.prototype, "m_bScrolledToBottom", void 0), (0, i.gn)([r.LO], p.prototype, "m_clipToUpload", void 0); class _ extends p { constructor(e, t, n) { super(e, t), (this.m_parentGroupView = n); } SearchMembers(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.m_parentGroupView.SearchMembers(e, t); }); } SearchMembersForMention(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { const n = yield this.SearchMembers(e, t); return this.m_parentGroupView.GetGroup().AddMetaMentionsToResults(e, n), n; }); } BIsMemberNameAmbiguous(e) { return this.m_parentGroupView.BIsMemberNameAmbiguous(e); } ConvertMessageToBBCode(e) { let t = (0, o.Ao)(e); return this.m_parentGroupView.ProcessMentions(t); } get virtualizer() { return this.m_parentGroupView.GetGroup().BIsMemberListVirtualized() ? this.m_parentGroupView.GetVirtualizedMemberListView() : null; } GetParentGroupView() { return this.m_parentGroupView; } } }, 13114: (e, t, n) => { "use strict"; n.d(t, { JL: () => h, gh: () => l }); var i = n(85556), o = n(88991), r = n(72746), a = n(19953), s = n(79588); function l(e, t, n, i, r) { let s, l = o.K.InitFromAccountID(e); return r ? (s = "steam://joinlobby/" + t + "/" + r + "/" + l.ConvertTo64BitString()) : i ? (s = a.De.IN_MOBILE ? "https://s.team/remoteplay/connect/" + l.ConvertTo64BitString() + "?appid=" + t + "&" + i : "steam://remoteplay/connect/" + l.ConvertTo64BitString() + "?appid=" + t + "&" + i) : ((s = "steam://rungame/" + t + "/" + l.ConvertTo64BitString()), void 0 !== n && (s += "/" + encodeURIComponent(n))), s; } class c { constructor(e, t, n, i, o, r, a) { (this.bDismissed = void 0), (this.bAccepted = void 0), (0, s.rC)(this), (this.unAccountIDInviter = e), (this.rtTimestamp = t), (this.appID = n), (this.connectString = i), (this.remoteplayString = o), (this.lobbyID = a), (this.bDismissed = r), (this.bAccepted = !1); } get inviteString() { return l(this.unAccountIDInviter, this.appID, null == this ? void 0 : this.connectString, null == this ? void 0 : this.remoteplayString, null == this ? void 0 : this.lobbyID); } AcceptGameInvite() { r.Ul.OpenURLInBrowser(this.inviteString, r.D), (this.bAccepted = !0), r.Ul.ChatStore.GameInviteStore.RecordDismissTime(this), this.remoteplayString ? SteamClient.Messaging.PostMessage("FriendsUI", "AcceptedRemotePlayInvite", JSON.stringify({ id: this.appID })) : SteamClient.Messaging.PostMessage("FriendsUI", "AcceptedGameInvite", JSON.stringify({ id: this.appID })); } DismissInvite() { (this.bDismissed = !0), r.Ul.ChatStore.GameInviteStore.RecordDismissTime(this); } get bOld() { return r.Ul.GetServerRTime32() - this.rtTimestamp > 21600; } } (0, i.gn)([s.LO], c.prototype, "bDismissed", void 0), (0, i.gn)([s.LO], c.prototype, "bAccepted", void 0), (0, i.gn)([s.aD], c.prototype, "AcceptGameInvite", null), (0, i.gn)([s.aD], c.prototype, "DismissInvite", null); const m = { dismisstimes: {} }, d = "GameInvites"; class h { constructor() { (this.m_mapGameInvites = new Map()), (this.m_mapDismissedInvites = s.LO.map()), (this.m_mapInviteByCode = new Map()); } Init() { r.Ul.SettingsStore.GetObjectFromLocalStorageWhenReady(d, m).then((e) => { let t = new Date(); t.setDate(t.getDate() - 14), this.m_mapDismissedInvites.clear(); for (let n in e.dismisstimes) { let i = parseInt(n), o = e.dismisstimes[n]; new Date(1e3 * o) < t || this.m_mapDismissedInvites.set(i, o); } }); } RegisterGameInvite(e, t, n, i, o, r) { let a = this.m_mapGameInvites.get(e); a || ((a = new Map()), this.m_mapGameInvites.set(e, a)); let s = a.get(t); if (!s) { let l = !1, m = this.m_mapDismissedInvites.get(e); m && (l = t <= m), (s = new c(e, t, n, i, o, l, r)), a.set(t, s), a.forEach((e) => { e.rtTimestamp < t && e.DismissInvite(); }); } return s; } RecordDismissTime(e) { let t = this.m_mapDismissedInvites.get(e.unAccountIDInviter); (t && t > e.rtTimestamp) || (this.m_mapDismissedInvites.set(e.unAccountIDInviter, e.rtTimestamp), this.WriteToLocalStorage()); } WriteToLocalStorage() { r.Ul.SettingsStore.StoreObjectInLocalStorage(d, { dismisstimes: this.m_mapDismissedInvites }); } } }, 25629: (e, t, n) => { "use strict"; n.d(t, { kQ: () => u, qH: () => p }); var i = n(85556), o = n(79588), r = n(4638), a = n(1736), s = n(88991), l = n(78654), c = n(72746), m = n(51075), d = n(84290); class h extends m.x { constructor(e) { super(e), (0, o.rC)(this); } BIsExpired() { return c.Ul.GetServerRTime32() >= this.m_rtTimeExpires; } InitFromInviteLinkInfo(e) { (this.m_ulChatRoomGroupID = e.group_summary().chat_group_id()), (this.m_ulChatID = e.chat_id()); let t = new s.K(e.steamid_sender()); t.BIsIndividualAccount() && (this.m_unAccountIDInviter = t.GetAccountID()), (this.m_rtTimeExpires = e.time_expires()), (this.m_bIsBanned = e.banned()), (this.m_rtKickExpires = e.time_kick_expire()), (this.m_bValid = !0), (this.m_bReady = !0); } InitInvalid() { (this.m_bValid = !1), (this.m_bReady = !0); } InitDirectInvite(e, t, n = !1, i = void 0) { (this.m_ulChatRoomGroupID = e), (this.m_ulChatID = t), (this.m_bIsBanned = n), (this.m_rtKickExpires = i), (this.m_rtTimeExpires = l.g1), (this.m_bValid = !0), (this.m_bReady = !0); } } (0, i.gn)([o.aD], h.prototype, "InitFromInviteLinkInfo", null); class u { constructor(e) { (this.m_mapInviteByCode = new Map()), (this.m_ChatStore = e); } JoinChatGroup(e, t, n) { let i = new h(); return i.InitDirectInvite(e, t), this.AcceptInvite(i, n); } AcceptInvite(e, t) { null == t && (t = c.Ul.GetDefaultBrowserContext()); let n = a.gA.Init(r.Gz); return ( n.Body().set_chat_group_id(e.GetChatRoomGroupID()), e.BIsInviteLink() && n.Body().set_invite_code(e.GetInviteCode()), e.GetChatID() && n.Body().set_chat_id(e.GetChatID()), r.Xn.JoinChatRoomGroup(this.m_ChatStore.CMInterface.GetServiceTransport(), n).then((e) => { let n = { result: e.GetEResult() }; if (1 == n.result) { let n = this.m_ChatStore.AddJoinedChatRoomGroup(e.Body().state(), e.Body().user_chat_state()); c.Ul.UIStore.ShowAndOrActivateChatRoomGroup(t, n, !0); let i = e.Body().join_chat_id(); if (n) { let e = n.GetChatRoom(i); e && e.StartVoiceChat(); } } else 15 == n.result && (n.time = e.Body().time_expire()); return n; }) ); } GetInviteFromCode(e) { let t = this.m_mapInviteByCode.get(e); if ((t || ((t = new h(e)), this.m_mapInviteByCode.set(e, t)), !t.BIsReady() || !this.m_ChatStore.GetChatRoomGroup(t.GetChatRoomGroupID()))) { let n = a.gA.Init(r.Jh); n.Body().set_invite_code(e), r.Xn.GetInviteLinkInfo(this.m_ChatStore.CMInterface.GetServiceTransport(), n).then((e) => { 1 == e.GetEResult() ? (this.m_ChatStore.AddKnownChatRoomGroup(e.Body().group_summary(), e.Body().user_chat_group_state()), t.InitFromInviteLinkInfo(e.Body())) : t.InitInvalid(); }); } return t; } GetDirectInviteInfo(e, t, n) { let i = new h(), o = this.m_ChatStore.GetChatRoomGroup(e); if (o && o.GetChatRoom(t)) i.InitDirectInvite(e, t); else { let o = a.gA.Init(r.I9); o.Body().set_steamid_invitee(s.K.InitFromAccountID(n).ConvertTo64BitString()), o.Body().set_chat_group_id(e), o.Body().set_chat_id(t), r.Xn.GetInviteInfo(this.m_ChatStore.CMInterface.GetServiceTransport(), o).then((n) => { if (1 != n.GetEResult() || !n.Body().group_summary().chat_group_id()) return console.log(`GetDirectInviteInfo: respose EResult ${n.GetEResult()}`), void i.InitInvalid(); this.m_ChatStore.AddKnownChatRoomGroup(n.Body().group_summary(), null), i.InitDirectInvite(e, t, n.Body().banned(), n.Body().time_kick_expire()); }); } return i; } } function p(e) { if (15 == e.result) { 0 == e.time && console.log("no longer valid"); let t = c.Ul.RTime32ToDate(e.time).toLocaleString([], { weekday: "long", year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric" }); return (0, d.Xx)("#ChatRoom_InviteMessage_Failed_Kicked", t); } return 17 == e.result ? (0, d.Xx)("#ChatRoom_InviteMessage_Failed_Banned") : 42 == e.result ? (0, d.Xx)("#ChatRoom_InviteMessage_Not_Found") : null; } }, 20891: (e, t, n) => { "use strict"; n.d(t, { d: () => a, o: () => s }); var i = n(85556); function o(e) { return ( !(!e || "object" != typeof e || Array.isArray(e)) && Object.keys(e).every((t) => (function (e) { return !(!e || "object" != typeof e || !Array.isArray(e)) && e.every(r); })(e[t]), ) ); } function r(e) { if (!e || "object" != typeof e || Array.isArray(e)) return !1; const t = e; return "number" == typeof t.timestamp && "string" == typeof t.message && (void 0 === t.eError || "number" == typeof t.eError); } const a = new (class { constructor() { this.m_bInitialized = !1; } Init(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (!this.m_bInitialized) { (this.m_storage = e), (this.m_strStorageKey = `InflightMessageQueue_${t}`); try { const t = yield e.GetObject(this.m_strStorageKey); t ? (o(t) ? (this.m_queues = t) : (console.warn(`Malformed ${this.m_strStorageKey} found in storage. Resetting.`), (this.m_queues = {}), this.WriteToStorage())) : (this.m_queues = {}); } catch (e) { console.warn("Error while parsing stored message queues. Resetting.", e), (this.m_queues = {}), this.WriteToStorage(); } this.m_bInitialized = !0; } }); } Update(e, t) { 0 === t.length ? delete this.m_queues[e] : (this.m_queues[e] = t), this.WriteToStorage(); } WriteToStorage() { Object.keys(this.m_queues).length > 0 ? this.m_storage.StoreObject(this.m_strStorageKey, this.m_queues) : this.m_storage.RemoveObject(this.m_strStorageKey); } Get(e) { return this.m_queues[e] || []; } })(); class s { constructor(e) { (this.m_id = e), this.InitFromStorage(); } InitFromStorage() { return (0, i.mG)(this, void 0, void 0, function* () { this.m_queue = yield a.Get(this.m_id); }); } Add(e) { const t = { message: e, timestamp: Date.now() }; return this.m_queue.push(t), this.UpdateStoredQueue(), this.GetItemID(t); } get queued_messages() { return this.m_queue.map((e) => Object.assign(Object.assign({}, e), { id: this.GetItemID(e) })); } RemoveItem(e) { const t = this.GetItemIndex(e); -1 !== t ? (this.m_queue.splice(t, 1), this.UpdateStoredQueue()) : console.warn("Could not find item to remove from send queue"); } UpdateStoredQueue() { a.Update(this.m_id, this.m_queue); } GetItemID(e) { return `${e.message.slice(0, 10)}_${e.timestamp}`; } GetItemIndex(e) { return this.m_queue.findIndex((t) => this.GetItemID(t) === e); } SetItemFailed(e, t) { const n = this.GetItemIndex(e); -1 !== n ? ((this.m_queue[n].eError = t), this.UpdateStoredQueue()) : console.warn("Could not find item to update from send queue"); } } }, 51075: (e, t, n) => { "use strict"; n.d(t, { V: () => l, x: () => s }); var i = n(85556), o = n(79588), r = n(78654), a = n(19953); class s { constructor(e) { (this.m_bReady = !1), (this.m_bValid = !1), (0, o.rC)(this), (this.m_strInviteCode = e); } BIsReady() { return this.m_bReady; } BIsValid() { return this.m_bValid; } BIsInviteLink() { return !!this.m_strInviteCode; } GetInviteCode() { return this.m_strInviteCode; } BNeverExpires() { return this.m_rtTimeExpires == r.g1; } GetChatRoomGroupID() { return this.m_ulChatRoomGroupID; } BIsVoiceChatInvite() { return !!this.m_ulChatID; } GetChatID() { return this.m_ulChatID; } GetURL() { return this.m_strInviteCode ? l(this.m_strInviteCode) : null; } BIsUserBanned() { return this.m_bIsBanned; } GetTimeKickExpires() { return this.m_rtKickExpires; } get time_expires() { return this.m_rtTimeExpires; } InitInvalid() { (this.m_bValid = !1), (this.m_bReady = !0); } InitDirectInvite(e, t, n = !1, i = void 0) { (this.m_ulChatRoomGroupID = e), (this.m_ulChatID = t), (this.m_bIsBanned = n), (this.m_rtKickExpires = i), (this.m_rtTimeExpires = r.g1), (this.m_bValid = !0), (this.m_bReady = !0); } } function l(e) { return "public" == a.De.WEB_UNIVERSE ? `https://s.team/chat/${e}` : `${a.De.COMMUNITY_BASE_URL}chat/invite/${e}`; } (0, i.gn)([o.LO], s.prototype, "m_bReady", void 0), (0, i.gn)([o.aD], s.prototype, "InitInvalid", null), (0, i.gn)([o.aD], s.prototype, "InitDirectInvite", null); }, 84446: (e, t, n) => { "use strict"; n.d(t, { K: () => I }); var i = n(85556), o = n(19953), r = n(1736), a = n(4638), s = n(92883), l = n(79588), c = n(84290), m = n(77385), d = n(46519), h = (n(67915), n(10167)), u = n(72746), p = n(2049), _ = n(46962), g = n(51075), C = n(97063), f = n(93635), v = n(20891), S = n(57476), b = n(22394); class I extends d.j { constructor(e, t, n, i) { super(e.FriendStore, e, e.CMInterface), (this.LOG = new m.sO("ChatRoom", () => this.unique_id).Debug), (this.m_strName = void 0), (this.m_unSortOrder = 0), (this.m_lastChatLink = null), (this.m_rtLastMention = void 0), (this.m_groupVoiceActiveMembers = new h.a2((0, c.Xx)("#Chat_MemberGroup_VoiceChatting"))), (this.m_eDesktopNotificationLevel = 0), (this.m_eMobileNotificationLevel = 0), (this.m_bUnreadIndicatorMuted = !1), (this.m_mapMessageReactionReactors = l.LO.map()), (this.m_NewChatMsgAddedCallbacks = new b.pB()), (0, l.rC)(this), (this.m_group = t), (this.m_ulGroupID = t.GetGroupID()), (this.m_ulChatID = n), (this.m_bIsDefaultForGroup = i), this.m_groupVoiceActiveMembers.SetOnHeaderClick(this.StartVoiceChat), (this.m_MessageSendQueue = new v.o(`${this.m_ulGroupID}.${this.m_ulChatID}`)), this.m_MessageSendQueue.InitFromStorage().then(() => this.InitQueuedMessages()); } get VoiceChatStore() { return this.ChatStore.VoiceChat; } get unread_message_count() { switch (this.GetPlatformNotificationLevel()) { case 4: return this.m_cUnreadChatMessages; case 3: case 2: return this.has_unread_mention ? 1 : 0; default: return 0; } } get time_last_activity() { let e = this.GetPlatformNotificationLevel(), t = 0, n = this.m_rtFirstUnread || this.time_last_ack; switch ((n && (t = Math.max(n, t)), e)) { case 4: t = Math.max(this.time_last_message || 0, t); break; case 3: case 2: t = Math.max(this.time_last_mention || 0, t); break; case 1: case 0: break; default: (0, f.X)(!1, `unhandled EChatRoomNotificationLevel: ${e}`); } return t; } get has_unread_messages() { return this.BIsUnreadIndicatorMuted() ? this.unread_message_count > 0 : this.has_any_unread_messages; } get has_any_unread_messages() { return this.m_cUnreadChatMessages > 0; } get has_unread_mention() { return this.m_rtLastMention > this.m_rtLastAckedChatMsg; } get time_last_mention() { return this.m_rtLastMention; } BHasAckedChatMsg() { return this.m_rtLastAckedChatMsg && 0 != this.m_rtLastAckedChatMsg; } LoadChatLogs() { return super.LoadChatLogs(); } GetMessagesFromTimeRange(e, t, n, i, o) { let s = r.gA.Init(a.Xf); return ( s.Body().set_chat_group_id(this.m_ulGroupID), s.Body().set_chat_id(this.m_ulChatID), s.Body().set_max_count(o), s.Body().set_start_time(e), s.Body().set_start_ordinal(t), s.Body().set_last_time(n), s.Body().set_last_ordinal(i), this.LOG(`trying to load ${o} messages in range ${e}:${t} - ${n}:${i}`), a.Xn.GetMessageHistory(this.m_ChatStore.CMInterface.GetServiceTransport(), s).then((e) => { let t = e.GetEResult(); if (1 != t) throw t; return { messages: this.GetMessagesFromResponse(e), moreAvailable: e.Body().more_available() }; }) ); } GetMessagesFromResponse(e) { let t = e.Body().messages(), n = []; if (m.cH.Get().IsDebugLogEnabled("ChatRoom")) { let e = t[0], n = t[t.length - 1]; this.LOG(`received ${t.length} messages in range ${n.server_timestamp()}:${n.ordinal()} to ${e.server_timestamp()}:${e.ordinal()}`); } for (let e = t.length - 1; e >= 0; e--) { let i, o, r = t[e], a = r.server_message().message() || 0; if (0 != a) { if (((a = r.server_message().message()), (i = r.server_message().string_param()), (o = r.server_message().accountid_param()), !(0, _.R$)(a))) { this.LOG(`unrenderable message ${a}`); continue; } } else if (!r.message() || 0 == r.message().trim().length) continue; let s = new _.dz( r.sender(), r.server_timestamp(), r.ordinal() || 0, r.message(), r.reactions().map((e) => ({ eReactionType: e.reaction_type(), strReaction: e.reaction(), cReactors: e.num_reactors(), bUserReacted: e.has_user_reacted() })), a, i, o, ); r.deleted() && (s.eDeleteState = _.im.Deleted), n.push(s); } return n; } GetBBCodeParser() { return this.m_ChatStore.ChatRoomBBCodeParser; } OnNewChatMsgAdded(e, t, n, i) { o.De.IN_CLIENT && (0, S.U5)("WebChat.OnNewGroupChatMsgAdded") && u.Ul.SettingsStore.BClientHasFeatureOrOnWeb("SteamworksChatAPI") && SteamClient.WebChat.OnNewGroupChatMsgAdded(this.m_ulGroupID, this.m_ulChatID, e, t, n, i), this.m_NewChatMsgAddedCallbacks.Dispatch(this.m_ulGroupID, this.m_ulChatID, e, t, n, i); } RegisterOnNewChatMsgAdded(e) { return this.m_NewChatMsgAddedCallbacks.Register(e); } AckChatMsgOnServer(e) { let t = r.gA.Init(a.ig); t.Body().set_chat_group_id(this.m_ulGroupID), t.Body().set_chat_id(this.m_ulChatID), t.Body().set_timestamp(e), a.Xn.AckChatMessage(this.m_CMInterface.GetServiceTransport(), t); } GetPlatformNotificationLevel() { return o.De.IN_MOBILE ? this.GetMobileNotificationLevel() : this.GetDesktopNotificationLevel(); } GetDesktopNotificationLevel() { return 0 == this.m_eDesktopNotificationLevel ? this.m_group.GetDesktopNotificationLevel() : this.m_eDesktopNotificationLevel; } GetMobileNotificationLevel() { return 0 === this.m_eMobileNotificationLevel ? this.m_group.GetMobileNotificationLevel() : this.m_eMobileNotificationLevel; } BIsUnreadIndicatorMuted() { return this.m_group.BIsUnreadIndicatorMuted(); } GetDesktopNotificationLevelSetting() { return this.m_eDesktopNotificationLevel; } GetMobileNotificationLevelsetting() { return this.m_eMobileNotificationLevel; } UpdateUserState(e) { (this.m_rtLastAckedChatMsg = e.time_last_ack()), (this.m_rtLastMention = e.time_last_mention()), (this.m_eDesktopNotificationLevel = e.desktop_notification_level()), (this.m_eMobileNotificationLevel = e.mobile_notification_level()), (this.m_bUnreadIndicatorMuted = e.unread_indicator_muted()), (this.m_rtFirstUnread = e.time_first_unread()), (this.m_rtLastAckedChatMsg || 0) < this.m_rtLastMessageReceived && ((this.m_cUnreadChatMessages = 1), this.m_rtLastAckedChatMsg && (this.m_rtFirstUnreadChatMsg = this.m_rtLastAckedChatMsg + 1), u.Ul.FriendStore.UpdateUnreadMessagesGlobal()); } UpdateChatState(e) { (0, f.X)(this.m_ulChatID == e.chat_id(), "State for different chat room"), (this.m_strName = e.chat_name()), (this.m_bVoiceAllowed = e.voice_allowed()); let t = !1, n = !1, i = this.m_FriendStore.self.accountid, r = new Set(this.m_groupVoiceActiveMembers.GetCurrentMemberSet()); for (let n of e.members_in_voice()) r.delete(n) || (this.m_groupVoiceActiveMembers.AddMember(n), n != i && (t = !0)); r.forEach((e) => { this.m_groupVoiceActiveMembers.RemoveMember(e); let t = this.m_groupVoiceActiveMembers.HasMember(e); this.VoiceChatStore.OnUserLeftChatRoomVoiceChat(this.m_ulGroupID, this.m_ulChatID, e, t), e != i && (n = !0); }), this.BVoiceActive() && (t ? u.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_voice_channel_enter.m4a?v=1") : n && u.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_voice_channel_exit.m4a?v=1")), (this.m_rtLastMessageReceived = e.time_last_message()), (this.m_strLastMessage = e.last_message()), (this.m_accountIDLastMessage = e.accountid_last_message()), (this.m_unSortOrder = e.sort_order()); } get voice_active_member_list() { return this.m_groupVoiceActiveMembers; } get voice_active_contains_friends() { for (let e = 0; e < this.m_groupVoiceActiveMembers.member_list.length; e++) if (this.m_groupVoiceActiveMembers.member_list[e].is_friend || this.m_groupVoiceActiveMembers.member_list[e] == u.Ul.FriendStore.self) return !0; return !1; } get voice_active_contains_self() { for (let e = 0; e < this.m_groupVoiceActiveMembers.member_list.length; e++) if (this.m_groupVoiceActiveMembers.member_list[e] == u.Ul.FriendStore.self) return !0; return !1; } get voice_active_contains_only_self() { return 1 == this.m_groupVoiceActiveMembers.member_list.length && this.m_groupVoiceActiveMembers.member_list[0] == u.Ul.FriendStore.self; } get name() { return this.IsDefaultRoomForGroup() ? "Home" : this.IsUnsavedVoiceChannel() ? (0, c.Xx)("#Chat_CreateChatChannel_DefaultName") : this.m_strName; } IsUnsavedVoiceChannel() { return !(0 != this.m_strName.length || !this.m_bVoiceAllowed); } GetParentGroupID() { return this.m_ulGroupID; } GetGroup() { return this.m_group; } IsDefaultRoomForGroup() { return this.m_bIsDefaultForGroup; } GetRoomID() { return this.m_ulChatID; } BIsDefaultRoom() { return this.m_bIsDefaultForGroup; } get unique_id() { return "cr" + this.m_ulChatID; } GetVoiceAllowed() { return this.m_bVoiceAllowed; } IsTempVoiceRoom() { return !!this.GetVoiceAllowed() && (!this.m_strName || 0 == this.m_strName.length); } GetSortOrder() { return this.m_unSortOrder; } StartVoiceChat() { this.BVoiceActive() || this.ChatStore.VoiceChat.InitiateRoomChat(this.m_ulGroupID, this.m_ulChatID); } ToggleVoiceChat() { this.BVoiceActive() ? this.ChatStore.VoiceChat.OnUserEndVoiceChat() : this.StartVoiceChat(); } BVoiceActive() { return this.ChatStore.VoiceChat.IsVoiceActiveForRoom(this.m_ulGroupID, this.m_ulChatID); } UpdateMessageReaction(e, t, n, o) { return (0, i.mG)(this, void 0, void 0, function* () { const i = r.gA.Init(a.uV); i.Body().set_chat_group_id(this.m_ulGroupID), i.Body().set_chat_id(this.m_ulChatID), i.Body().set_reaction_type(t), i.Body().set_reaction(n), i.Body().set_is_add(o), i.Body().set_server_timestamp(e.rtTimestamp), i.Body().set_ordinal(e.unOrdinal); const s = e.reactions.find((e) => n === e.strReaction), l = o ? 1 : -1, c = s ? s.cReactors + l : l; e.UpdateReaction(t, n, c, o); const m = yield a.Xn.UpdateMessageReaction(this.m_CMInterface.GetServiceTransport(), i); return 1 !== m.GetEResult() ? (e.UpdateReaction(t, n, c - l, !o), console.log(`Error updating message reaction. EResult: ${m.GetEResult()}`)) : o && 1 === m.Body().num_reactors() && (1 === t ? this.m_ChatStore.EmoticonStore.TrackEmoticonUsage(n, Date.now() / 1e3) : 2 === t && this.m_ChatStore.EmoticonStore.TrackStickerUsage(n, Date.now() / 1e3)), m.GetEResult(); }); } GetMessageReactionReactors(e, t, n) { const i = []; if (t.bUserReacted && (i.push(u.Ul.FriendStore.self.accountid), 1 === t.cReactors)) return i; const o = this.GetMessageReactionKey(e, t.strReaction), r = () => this.LoadMessageReactionReactors(e, t, n).then((e) => { const t = {}; e.forEach((e) => (t[e] = !0)), this.m_mapMessageReactionReactors.set(o, { cRequested: n, reactors: t }); }); if (this.m_mapMessageReactionReactors.has(o)) { const o = this.m_mapMessageReactionReactors.get(this.GetMessageReactionKey(e, t.strReaction)); o.cRequested < n && o.cRequested < t.cReactors && r(); const a = Object.keys(o.reactors) .map((e) => parseInt(e)) .filter((e) => e !== u.Ul.FriendStore.self.accountid); i.push(...a); } else r(); return i.slice(0, n); } UpdateMessageReactionReactors(e, t, n, i) { const o = this.GetMessageReactionKey(e, t); if (this.m_mapMessageReactionReactors.has(o)) { const e = this.m_mapMessageReactionReactors.get(o); e.reactors[n] && !i ? (delete e.reactors[n], e.cRequested--, 0 == e.cRequested && this.m_mapMessageReactionReactors.delete(o)) : !e.reactors[n] && i && ((e.reactors[n] = !0), e.cRequested++); } else i && this.m_mapMessageReactionReactors.set(o, { cRequested: 1, reactors: { [n]: !0 } }); } GetMessageReactionKey(e, t) { return `${e.rtTimestamp}_${e.unOrdinal}_${t}`; } LoadMessageReactionReactors(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { const i = r.gA.Init(a.vL); i.Body().set_chat_group_id(this.m_ulGroupID), i.Body().set_chat_id(this.m_ulChatID), i.Body().set_server_timestamp(e.rtTimestamp), i.Body().set_ordinal(e.unOrdinal), i.Body().set_reaction_type(1), i.Body().set_reaction(t.strReaction), i.Body().set_limit(n); const o = yield a.Xn.GetMessageReactionReactors(this.m_CMInterface.GetServiceTransport(), i); return 1 != o.GetEResult() ? (console.error(`Failed to load message reaction reactors: ${o.GetEResult()}`), []) : o.Body().reactors(); }); } SendChatMessageInternal(e) { return (0, i.mG)(this, void 0, void 0, function* () { if (!this.GetChatRoomGroup().BCanChat()) { let e = this.AppendLocalEchoChatMsg(""); return e.SetErrorSending(_.p.NoChatPermissionInGroup), e.eErrorSending; } let t = r.gA.Init(a.qk); t.Body().set_chat_group_id(this.m_ulGroupID), t.Body().set_chat_id(this.m_ulChatID), t.Body().set_message(e); let n = this.AppendLocalEchoChatMsg(e); (this.m_strLastMessage = e), (this.m_accountIDLastMessage = this.m_FriendStore.self.accountid); const i = yield this.SendWithRetries(n, () => a.Xn.SendChatMessage(this.m_ChatStore.CMInterface.GetServiceTransport(), t)); return i === _.p.None && (this.m_accountIDLastMessage = this.m_FriendStore.self.accountid), i; }); } DeleteChatMessages(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = e.map((e) => ({ rtTimestamp: e.rtTimestamp, unOrdinal: e.unOrdinal })); this.UpdateChatMessageDeletedState(t, _.im.Deleting); let n = r.gA.Init(a.Jo); n.Body().set_chat_group_id(this.m_ulGroupID), n.Body().set_chat_id(this.m_ulChatID); for (let t of e) { let e = n.Body().add_messages(); e.set_server_timestamp(t.rtTimestamp), e.set_ordinal(t.unOrdinal); } let i = (yield a.Xn.DeleteChatMessages(this.m_ChatStore.CMInterface.GetServiceTransport(), n)).GetEResult(); return 1 != i ? (this.UpdateChatMessageDeletedState(t, _.im.None), i) : (this.UpdateChatMessageDeletedState(t, _.im.Deleted), 1); }); } PopulateCommitFileUploadFormData(e, t) { e.append("chat_group_id", this.m_ulGroupID), e.append("chat_id", this.m_ulChatID), e.append("spoiler", t.bSpoiler ? "1" : "0"); } BShouldTrackUnreadMessages() { return this.m_bIsDefaultForGroup || !this.m_bVoiceAllowed || this.BVoiceActive(); } BShouldSilentlyAddMessage(e) { return u.Ul.FriendStore.GetPlayer(e.unAccountID).is_blocked; } PlayChatRoomNotificationSound() { u.Ul.FriendStore.GetUserDoNotDisturb() || u.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_chatroom_notification.m4a?v=1"); } PlayAtMentionSound() { u.Ul.FriendStore.GetUserDoNotDisturb() || u.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_at_mention.m4a?v=1"); } OnReceivedNewMessage(e, t, n, i) { if (this.BShouldTrackUnreadMessages()) { if (!e.BIsLocalEcho() && e.unAccountID != this.self.accountid) { let o; switch (((e.Mentions.mention_all || e.Mentions.mention_here || e.Mentions.mention_user) && (this.m_rtLastMention = e.rtTimestamp), this.GetPlatformNotificationLevel())) { case 1: o = !1; break; case 2: o = e.Mentions.mention_user; break; case 3: o = e.Mentions.mention_user || e.Mentions.mention_here || e.Mentions.mention_all; break; default: o = !0; } if (o && !u.Ul.FriendStore.GetUserDoNotDisturb()) { let o = e.Mentions.mention_all || e.Mentions.mention_here || e.Mentions.mention_user; if ((u.Ul.BPlayChatRoomNotificationSound() && o ? this.PlayAtMentionSound() : u.Ul.BPlayChatRoomNotificationSound() && t < 4 && this.PlayChatRoomNotificationSound(), u.Ul.NotificationManager.BNotificationsPermitted() && t < 4 && u.Ul.BShowChatRoomNotification())) { const t = u.Ul.FriendStore.GetPlayer(e.unAccountID); t.LoadIfNecessary(); const r = () => { let r = { title: this.m_bIsDefaultForGroup ? this.GetGroup().name : this.GetGroup().name + " | " + this.name, body: `${t.display_name}: "${n}"`, icon: t.persona.avatar_url_medium, rawbody: n, tag: "groupmsg_" + (o ? "mention_" : "") + t.accountid, steamid: t.persona.m_steamid.ConvertTo64BitString(), chatroomgroupid: this.GetParentGroupID(), chatroomid: this.GetRoomID() }; (r = this.DecorateNotification(e, r, n, i)), (r.body = this.m_ChatStore.TextFilterStore.FilterText(e.unAccountID, r.body)), r.body && (u.Ul.NotificationManager.DisplayNotification(r, (e) => u.Ul.UIStore.ShowAndOrActivateChat(e, this, !0)), this.m_bHasUnreadPriorityChatMessages || ((this.m_bHasUnreadPriorityChatMessages = !0), u.Ul.FriendStore.UpdateUnreadMessagesGlobal())); }; (0, l.gx)(() => t.is_ready, r, { timeout: 1e3 }); } if (t < 4) { const e = u.Ul.SettingsStore.FriendsSettings.nChatFlashMode; let t = Promise.resolve(0 == e); 1 == e && (t = u.Ul.UIStore.IsChatWindowMinimized(this)), t.then((e) => { e && u.Ul.UIStore.FlashChatWindow(this, !0); }); } } } (!this.m_rtFirstUnread || (!this.m_group.BIsUnreadIndicatorMuted() && this.m_rtFirstUnread <= this.m_rtLastAckedChatMsg)) && (this.m_rtFirstUnread = e.rtTimestamp); } } GetChatRoomGroup() { return this.m_ChatStore.GetChatRoomGroup(this.m_ulGroupID); } GetMember(e) { return this.GetChatRoomGroup().GetMember(e); } CreateInviteLink(e) { let t = r.gA.Init(a.Q2); t.Body().set_chat_group_id(this.m_ulGroupID), t.Body().set_seconds_valid(e), t.Body().set_chat_id(this.m_ulChatID), a.Xn.CreateInviteLink(this.m_ChatStore.CMInterface.GetServiceTransport(), t).then((e) => { let t = e.Body().invite_code(), n = (0, g.V)(t), i = e.Body().seconds_valid(); 0 != i && (i += Math.floor(Date.now() / 1e3)), (this.m_lastChatLink = { strInviteURL: n, rtExpires: i }); }); } OnActivate() { this.m_ChatStore.OnChatRoomActivated(this), super.OnActivate(); } get lastChatLinkInfo() { return this.m_lastChatLink; } BCanDeleteMemberMessages(e) { return this.GetChatRoomGroup().BCanDeleteMemberMessages(e); } ChangeNameWhileWaitingForRenameRequest(e) { this.m_strName = e; } SetNotificationPreferences(e, t, n) { let i = r.gA.Init(a.x1); i.Body().set_chat_group_id(this.m_ulGroupID); let o = i.Body().add_chat_room_preferences(); return o.set_chat_id(this.m_ulChatID), void 0 !== e && ((this.m_eDesktopNotificationLevel = e), o.set_desktop_notification_level(e), 4 == e && this.m_bUnreadIndicatorMuted && (n = !1)), void 0 !== t && ((this.m_eMobileNotificationLevel = t), o.set_mobile_notification_level(t)), void 0 !== n && ((this.m_bUnreadIndicatorMuted = n), o.set_unread_indicator_muted(n)), a.Xn.SetUserChatGroupPreferences(u.Ul.CMInterface.GetServiceTransport(), i).then((e) => 1 == e.GetEResult()); } SetupAppCustomServerMsg(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = JSON.parse(e.strMessage) || {}, n = new Map(); if (t.params) for (let e in t.params) n.set(e.toString(), t.params[e].toString()); e.strServerMsgAppCustomLocalized = "..."; let i = yield u.Ul.AppInfoStore.GetRichPresenceLocAsync(this.m_group.GetOwnerAppID()); t.tok ? (e.strServerMsgAppCustomLocalized = i.Localize(t.tok, n)) : t.msg ? (e.strServerMsgAppCustomLocalized = i.SubstituteParams(t.msg, n)) : (e.strServerMsgAppCustomLocalized = e.strMessage); let o = (0, s.jr)(e.strServerMsgAppCustomLocalized), r = null, a = "", l = !1; for (let e of o) if (1 != e.type) { if (2 == e.type) if ("mention" != e.tag) "spoiler" != e.tag && (console.log("bbcode tag '" + e.tag + "' not allowed!"), (l = !0)); else if (e.args) { r || (r = {}); let t = e.args[""]; "all" == t ? (r.mention_all = !0) : "here" == t ? (r.mention_here = !0) : t == this.m_FriendStore.self.accountid.toString() && (r.mention_user = !0); } } else a += e.text; return l && (e.strServerMsgAppCustomLocalized = a), r && (e.Mentions = r), a; }); } } (0, i.gn)([l.LO], I.prototype, "m_strName", void 0), (0, i.gn)([l.LO], I.prototype, "m_unSortOrder", void 0), (0, i.gn)([l.LO], I.prototype, "m_lastChatLink", void 0), (0, i.gn)([l.LO], I.prototype, "m_rtLastMention", void 0), (0, i.gn)([l.LO], I.prototype, "m_eDesktopNotificationLevel", void 0), (0, i.gn)([l.LO], I.prototype, "m_eMobileNotificationLevel", void 0), (0, i.gn)([l.LO], I.prototype, "m_bUnreadIndicatorMuted", void 0), (0, i.gn)([l.aD], I.prototype, "UpdateUserState", null), (0, i.gn)([l.aD], I.prototype, "UpdateChatState", null), (0, i.gn)([l.Fl], I.prototype, "name", null), (0, i.gn)([p.ak], I.prototype, "StartVoiceChat", null), (0, i.gn)([l.aD], I.prototype, "UpdateMessageReactionReactors", null), (0, i.gn)([p.ak, (0, C.D)(100)], I.prototype, "PlayChatRoomNotificationSound", null), (0, i.gn)([p.ak, (0, C.D)(100)], I.prototype, "PlayAtMentionSound", null), (0, i.gn)([l.aD], I.prototype, "CreateInviteLink", null), (0, i.gn)([l.KG], I.prototype, "OnActivate", null), (0, i.gn)([l.aD], I.prototype, "ChangeNameWhileWaitingForRenameRequest", null); }, 93354: (e, t, n) => { "use strict"; n.d(t, { Xc: () => w, PR: () => E, jx: () => M, we: () => D }); var i = n(85556), o = n(9824), r = n(72080), a = n(77385), s = n(67915), l = n(84446), c = n(88991), m = n(79588), d = n(84290), h = n(1736), u = n(4638), p = n(23346), _ = n(72746), g = n(23282), C = n(19953), f = n(93635); class v { constructor(e) { (this.m_nLastClientChangenumberFromServer = -1), (this.m_bViewChanged = !1), (this.m_iStartIndex = void 0), (this.m_iEndIndex = void 0), (this.m_nLastServerChangenumber = void 0), (this.m_iLastServerStartIndex = void 0), (this.m_iLastServerEndIndex = void 0), (this.m_mapMembers = new Map()), (this.m_mapRankByAccountID = new Map()), (this.m_mapPersonaStates = m.LO.map()), (this.m_cMemberSummaryTotal = void 0), (this.m_cMemberSummaryOnline = void 0), (this.m_cMemberSummaryInGame = void 0), (this.m_mapPersonaSubscriptions = new Map()), (this.m_setQueuedPersonaSubscriptions = new Set()), (this.m_setQueuedPersonaUnsubscriptions = new Set()), (this.m_rgUpdateQueue = []), (this.m_rgQueuedViewExtents = { iStartIndex: -1, iEndIndex: -1 }), (0, m.rC)(this), (this.m_ulChatRoomGroupID = e), (this.m_nClientChangenumber = 0), (this.m_ulViewID = "" + v.sm_ulNextViewID++); } GetViewID() { return this.m_ulViewID; } ApplyUpdates() { for (const e of this.m_rgUpdateQueue) { if (e.view(!1)) { const t = e.view(); let n = t.client_changenumber() == this.m_nClientChangenumber, i = t.client_changenumber() == this.m_nLastClientChangenumberFromServer; if (((this.m_nLastServerChangenumber = t.server_changenumber()), t.start() != this.m_iLastServerStartIndex && i)) { let e = []; for (let t = this.m_iLastServerStartIndex; t <= this.m_iLastServerEndIndex; t++) e.push(this.m_mapMembers.get(t)); for (let n = t.start(); n <= t.end(); n++) { let t = e.shift(); if (!t) continue; let i = this.m_mapRankByAccountID.get(t); void 0 !== i && this.m_mapMembers.get(i) == t && this.m_mapMembers.delete(i), this.m_mapMembers.set(n, t), this.m_mapRankByAccountID.set(t, n); } } (this.m_nLastClientChangenumberFromServer = t.client_changenumber()), (this.m_iLastServerStartIndex = t.start()), (this.m_iLastServerEndIndex = t.end()), this.m_bViewChanged || ((this.m_iLastServerStartIndex < this.m_iStartIndex - 10 || this.m_iLastServerEndIndex > this.m_iEndIndex + 10) && this.PublishViewExtentsToServer(this.m_iStartIndex, this.m_iEndIndex, 11)), n && (this.m_bViewChanged = !1); } for (let t of e.members()) { let n = t.accountid(), i = this.m_mapRankByAccountID.get(n); void 0 !== i && this.m_mapMembers.get(i) == n && this.m_mapMembers.delete(i), this.m_mapMembers.set(t.rank(), n), this.m_mapRankByAccountID.set(n, t.rank()), t.persona() && this.UpdatePersonaState(t.accountid(), e.status_flags(), t.persona()); } let t = e.member_summary(!1); t && ((this.m_cMemberSummaryTotal = t.offline() + t.online() + t.ingame()), (this.m_cMemberSummaryOnline = t.online() + t.ingame()), (this.m_cMemberSummaryInGame = t.ingame())); } (this.m_rgUpdateQueue = []), (this.m_iTimeoutApplyUpdates = void 0); } OnServerUpdate(e) { this.m_rgUpdateQueue.push(e), this.m_bViewChanged ? (this.m_iTimeoutApplyUpdates && window.clearInterval(this.m_iTimeoutApplyUpdates), this.ApplyUpdates()) : this.m_iTimeoutApplyUpdates || (this.m_iTimeoutApplyUpdates = window.setTimeout(() => this.ApplyUpdates(), 1e3)); for (const t of e.subscribed_personas()) { const n = new c.K(t.friendid()).GetAccountID(); this.UpdatePersonaState(n, e.status_flags(), t); } } GetViewChangenumber() { return [this.m_nLastClientChangenumberFromServer, this.m_nLastServerChangenumber]; } GetAccountIDAt(e) { return e >= this.m_iLastServerStartIndex && e <= this.m_iLastServerEndIndex && this.m_mapMembers.has(e) ? this.m_mapMembers.get(e) : null; } GetMember(e) { return this.m_mapPersonaStates.has(e) ? this.m_mapPersonaStates.get(e) : _.Ul.FriendStore.GetPlayer(e); } GetMemberCountTotal() { return this.m_cMemberSummaryTotal; } GetMemberCountOnline() { return this.m_cMemberSummaryOnline; } GetMemberCountInGame() { return this.m_cMemberSummaryInGame; } UpdatePersonaState(e, t, n) { if (n && n.player_name()) if (this.m_mapPersonaStates.has(e)) this.m_mapPersonaStates.get(e).mutable_persona.UpdateFromMessage(t, n); else { let i = _.Ul.FriendStore.GetPlayer(e); i.mutable_persona.UpdateFromMessage(t, n), this.m_mapPersonaStates.set(e, i); } } SetViewExtents(e, t) { (this.m_rgQueuedViewExtents = { iStartIndex: e, iEndIndex: t }), this.m_hSetViewExtentsInterval || (this.PublishQueuedViewExtentsToServer(), (this.m_hSetViewExtentsInterval = window.setTimeout(() => this.PublishQueuedViewExtentsToServer(), 400))); } PublishQueuedViewExtentsToServer() { if (((this.m_hSetViewExtentsInterval = void 0), !this.m_rgQueuedViewExtents)) return; const { iStartIndex: e, iEndIndex: t } = this.m_rgQueuedViewExtents; (this.m_rgQueuedViewExtents = null), this.PublishViewExtentsToServer(e, t, 100), this.m_hResetViewExtentsInterval && clearInterval(this.m_hResetViewExtentsInterval), (this.m_hResetViewExtentsInterval = window.setTimeout(() => { this.PublishViewExtentsToServer(e, t, 11), (this.m_hResetViewExtentsInterval = void 0); }, 1e4)); } PublishViewExtentsToServer(e, t, n) { const i = Math.max(e - n, 0), o = t + n; if (this.m_iStartIndex == i && this.m_iEndIndex == o) return; (this.m_iStartIndex = i), (this.m_iEndIndex = o), this.m_nClientChangenumber++, (this.m_bViewChanged = !0); let r = h.gA.Init(u.QN); r.Body().set_chat_group_id(this.m_ulChatRoomGroupID), r.Body().set_view_id(this.m_ulViewID), r.Body().set_client_changenumber(this.m_nClientChangenumber), r.Body().set_start(this.m_iStartIndex), r.Body().set_end(this.m_iEndIndex), u.Xn.UpdateMemberListView(_.Ul.CMInterface.GetServiceTransport(), r); } SubscribeToPersona(e) { const t = this.m_mapPersonaSubscriptions.get(e); t ? this.m_mapPersonaSubscriptions.set(e, t + 1) : (this.m_mapPersonaSubscriptions.set(e, 1), this.m_setQueuedPersonaSubscriptions.add(e), this.ScheduleSubscriptionUpdate()); } UnsubscribeFromPersona(e) { const t = this.m_mapPersonaSubscriptions.get(e); t ? (t > 1 ? this.m_mapPersonaSubscriptions.set(e, t - 1) : (this.m_mapPersonaSubscriptions.delete(e), this.m_setQueuedPersonaUnsubscriptions.add(e), this.ScheduleSubscriptionUpdate())) : console.warn(`Attempting to unsubscribe from a persona that we are not subscribed to. Chat: ${this.m_ulChatRoomGroupID}, Account: ${e}`); } ScheduleSubscriptionUpdate() { this.m_nPersonaSubscriptionTimer || (this.m_nPersonaSubscriptionTimer = window.setTimeout(() => { this.m_nClientChangenumber++; let e = h.gA.Init(u.QN); e.Body().set_chat_group_id(this.m_ulChatRoomGroupID), e.Body().set_view_id(this.m_ulViewID), e.Body().set_client_changenumber(this.m_nClientChangenumber), e.Body().set_start(this.m_iStartIndex), e.Body().set_end(this.m_iEndIndex), this.m_setQueuedPersonaSubscriptions.size && (e.Body().set_persona_subscribe_accountids(Array.from(this.m_setQueuedPersonaSubscriptions)), this.m_setQueuedPersonaSubscriptions.clear()), this.m_setQueuedPersonaUnsubscriptions.size && (e.Body().set_persona_unsubscribe_accountids(Array.from(this.m_setQueuedPersonaUnsubscriptions)), this.m_setQueuedPersonaUnsubscriptions.clear()), u.Xn.UpdateMemberListView(_.Ul.CMInterface.GetServiceTransport(), e), (this.m_nPersonaSubscriptionTimer = void 0); }, 50)); } UnregisterFromServer() { let e = h.gA.Init(u.QN); e.Body().set_chat_group_id(this.m_ulChatRoomGroupID), e.Body().set_view_id(this.m_ulViewID), e.Body().set_delete_view(!0), u.Xn.UpdateMemberListView(_.Ul.CMInterface.GetServiceTransport(), e); } PerformSearch(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { let e = n.toLocaleLowerCase(), i = h.gA.Init(u.B3); return ( i.Body().set_chat_group_id(this.m_ulChatRoomGroupID), i.Body().set_search_id(t), i.Body().set_search_text(e), u.Xn.SearchMembers(_.Ul.CMInterface.GetServiceTransport(), i).then((t) => { let n = []; for (let i of t.Body().matching_members()) { i.persona() && this.UpdatePersonaState(i.accountid(), t.Body().status_flags(), i.persona()); let o = this.m_mapPersonaStates.get(i.accountid()); if (((0, f.X)(o, "Missing persona in member matches"), !o)) continue; let r = o.MatchSearchString(e); n.push({ friend: o, iMatchOffset: r.iOffset, bNicknameMatch: 2 == r.match }); } return n; }) ); }); } GetAllKnownPersonas() { return Array.from(this.m_mapPersonaStates.values()); } } (v.sm_ulNextViewID = 1), (0, i.gn)([m.LO], v.prototype, "m_iStartIndex", void 0), (0, i.gn)([m.LO], v.prototype, "m_iEndIndex", void 0), (0, i.gn)([m.LO], v.prototype, "m_nLastServerChangenumber", void 0), (0, i.gn)([m.LO], v.prototype, "m_iLastServerStartIndex", void 0), (0, i.gn)([m.LO], v.prototype, "m_iLastServerEndIndex", void 0), (0, i.gn)([m.LO], v.prototype, "m_cMemberSummaryTotal", void 0), (0, i.gn)([m.LO], v.prototype, "m_cMemberSummaryOnline", void 0), (0, i.gn)([m.LO], v.prototype, "m_cMemberSummaryInGame", void 0), (0, i.gn)([m.aD], v.prototype, "ApplyUpdates", null), (0, i.gn)([m.aD], v.prototype, "OnServerUpdate", null); var S = n(92883), b = n(71576); class I { constructor(e = 20, t) { (this.m_rank = void 0), (this.m_role_ids = void 0), (0, m.rC)(this), (this.m_rank = e), (this.m_role_ids = t); } BHasRole(e) { return -1 != this.m_role_ids.findIndex((t) => t == e); } } (0, i.gn)([m.LO], I.prototype, "m_rank", void 0), (0, i.gn)([m.LO], I.prototype, "m_role_ids", void 0); class y { constructor(e) { (this.m_roleActions = new u.Xm()), (this.m_roleActions = e); } BCanPerformAction(e) { switch (e) { case 1: return this.m_roleActions.can_create_rename_delete_channel(); case 2: return this.m_roleActions.can_kick(); case 3: return this.m_roleActions.can_ban(); case 4: return this.m_roleActions.can_invite(); case 5: return this.m_roleActions.can_change_tagline_avatar_name(); case 6: return this.m_roleActions.can_chat(); case 8: return this.m_roleActions.can_change_group_roles(); case 9: return this.m_roleActions.can_change_user_roles(); case 10: return this.m_roleActions.can_mention_all(); case 11: return this.m_roleActions.can_set_watching_broadcast(); default: return !1; } } SetCanPerformAction(e, t) { switch (e) { case 1: this.m_roleActions.set_can_create_rename_delete_channel(t); break; case 2: this.m_roleActions.set_can_kick(t); break; case 3: this.m_roleActions.set_can_ban(t); break; case 4: this.m_roleActions.set_can_invite(t); break; case 5: this.m_roleActions.set_can_change_tagline_avatar_name(t); break; case 6: this.m_roleActions.set_can_chat(t); break; case 8: this.m_roleActions.set_can_change_group_roles(t); break; case 9: this.m_roleActions.set_can_change_user_roles(t); break; case 10: this.m_roleActions.set_can_mention_all(t); break; case 11: this.m_roleActions.set_can_set_watching_broadcast(t); } } toString() { let e = this.role_id; return this.m_roleActions.can_create_rename_delete_channel() && (e += " CreateRenameDeleteChannel"), this.m_roleActions.can_kick() && (e += " Kick"), this.m_roleActions.can_ban() && (e += " Ban"), this.m_roleActions.can_invite() && (e += " Invite"), this.m_roleActions.can_change_tagline_avatar_name() && (e += " ChangeTaglineAvatarName"), this.m_roleActions.can_chat() && (e += " Chat"), this.m_roleActions.can_change_group_roles() && (e += " ChangeGroupRoles"), this.m_roleActions.can_change_user_roles() && (e += " ChangeUserRoles"), e; } get role_id() { return this.m_roleActions.role_id(); } get roleActions() { return this.m_roleActions; } } class E { constructor(e, t) { (this.LOG = new a.sO("ChatRoomGroup", () => this.unique_id).Debug), (this.m_chatStore = null), (this.m_ulGroupID = ""), (this.m_ulDefaultChatID = ""), (this.m_rtTimeJoined = 0), (this.m_rtLastAck = 0), (this.m_unOwnerAccountID = void 0), (this.m_bFullStateLoaded = !1), (this.m_strName = ""), (this.m_strTagLine = ""), (this.m_strAvatarSHA = ""), (this.m_strAvatarUGCURL = ""), (this.m_unWatchingBroadcastAccountID = void 0), (this.m_strWatchingBroadcastChannelID = ""), (this.m_mapRooms = m.LO.map(null, { deep: !1 })), (this.m_rgPartyBeacons = []), (this.m_eUserDesktopNotificationLevel = 4), (this.m_eUserMobileNotificationLevel = 4), (this.m_bUnreadIndicatorMuted = !1), (this.m_roles = []), (this.m_roleActions = []), (this.m_rgGroupMembersSummary = void 0), (this.m_groupMembers = new k()), (this.m_cMemberSummaryCount = 0), (this.m_bMemberListVirtualized = !1), (0, m.rC)(this), (this.m_chatStore = e), (this.m_ulGroupID = t); } get ChatStore() { return this.m_chatStore; } BIsValid() { return this.m_mapRooms.size > 0; } IsNamedGroupChat() { return !!this.m_strName || this.BIsClanChatRoom(); } GetOwnerAccountID() { return this.m_unOwnerAccountID; } BIsAccountIDOwner(e) { return this.BIsClanChatRoom() ? 50 == this.GetMemberRankIfPresent(e) : this.GetOwnerAccountID() == e; } SetOwnerAppID(e) { e || (e = 0), this.m_unAppID != e && ((this.m_unAppID = e), this.m_unAppID && (_.Ul.AppInfoStore.GetAppInfo(this.m_unAppID), _.Ul.AppInfoStore.GetRichPresenceLoc(this.m_unAppID))); } GetOwnerAppID() { return this.m_unAppID; } get name() { if (this.m_strName || this.BIsClanChatRoom()) return this.m_strName; { let e = this.members_to_highlight_name, t = e.members; if (!t.length) return e.remaining_count ? (0, d.Xx)("#ChatRoom_GenericWithOthers", e.remaining_count) : (0, d.Xx)("#ChatRoom_GenericEmpty"); switch (t.length) { case 1: return e.remaining_count > 0 ? (0, d.Xx)("#ChatRoom_OneFriendPlusMore", t[0].display_name, e.remaining_count) : (0, d.Xx)("#ChatRoom_OneFriend", t[0].display_name); case 2: return e.remaining_count > 0 ? (0, d.Xx)("#ChatRoom_TwoPlusMore", t[0].display_name, t[1].display_name, e.remaining_count) : (0, d.Xx)("#ChatRoom_TwoFriends", t[0].display_name, t[1].display_name); case 3: return (0, d.Xx)("#ChatRoom_ThreeFriends", t[0].display_name, t[1].display_name, t[2].display_name); default: return (0, f.X)(!1, `unexpected number of friends: ${t.length}`), ""; } } } get tagline() { return this.m_strTagLine; } get avatarSHA() { return this.m_strAvatarSHA; } get avatarUGCURL() { return this.m_strAvatarUGCURL; } get watching_broadcast_steamid() { return this.m_unWatchingBroadcastAccountID ? c.K.InitFromAccountID(this.m_unWatchingBroadcastAccountID) : null; } get watching_broadcast_channel_id() { return this.m_strWatchingBroadcastChannelID; } get hasAvatarSHA() { return this.m_strAvatarSHA.length > 0; } get hasIcon() { return this.hasAvatarSHA || 0 != this.m_unAppID; } GetAvatarOrAppIconURL(e) { if (this.m_strAvatarUGCURL) return this.m_strAvatarUGCURL; if (!this.m_strAvatarSHA && this.m_unAppID) { let e = _.Ul.AppInfoStore.GetAppInfo(this.m_unAppID); if (e.is_valid && e.icon_url) return e.icon_url; } return (function (e, t) { t = t <= 32 ? 32 : t <= 64 ? 64 : 256; let n = C.De.AVATAR_BASE_URL; return n || (n = C.De.MEDIA_CDN_COMMUNITY_URL + "images/chaticons/" + e.substr(0, 2) + "/" + e.substr(2, 2) + "/" + e.substr(4, 2) + "/"), (n += e + "_" + t + ".jpg"), n; })(this.m_strAvatarSHA, e); } get avatar_url_small() { return this.GetAvatarOrAppIconURL(32); } get avatar_url_medium() { return this.GetAvatarOrAppIconURL(64); } get avatar_url_full() { return this.GetAvatarOrAppIconURL(256); } get memberCountTotal() { return this.m_bFullStateLoaded ? this.m_groupMembers.unfiltered_count : this.m_cMemberSummaryCount; } get readyToRender() { return this.m_bFullStateLoaded; } get memberCountOnline() { return this.m_bFullStateLoaded ? this.m_groupMembers.member_counts.online : this.memberCountTotal; } get memberCountInGame() { return this.m_groupMembers.member_counts.ingame; } get memberList() { return this.m_groupMembers; } get unique_id() { return "cg" + this.m_ulGroupID; } get timeJoined() { return this.m_rtTimeJoined; } GetGroupID() { return this.m_ulGroupID; } GetDefaultChatID() { return this.m_ulDefaultChatID; } BIsClanChatRoom() { return !!this.m_unClanID; } BIsVoiceChannel(e) { let t = this.GetChatRoom(e); return null != t && t.GetVoiceAllowed() && t.GetRoomID() != this.GetDefaultChatID(); } BIsTempVoiceChannel(e) { let t = this.GetChatRoom(e); return t && t.IsTempVoiceRoom(); } GetClanID() { return this.m_unClanID; } get chatRoomList() { let e = Array.from(this.m_mapRooms.values()); return ( e.sort((e, t) => { if (e.GetSortOrder() < t.GetSortOrder()) return -1; if (e.GetSortOrder() > t.GetSortOrder()) return 1; let n = r.Z.fromString(e.GetRoomID()), i = r.Z.fromString(t.GetRoomID()); return n.lessThan(i) ? -1 : n.greaterThan(i) ? 1 : 0; }), e ); } get textRoomList() { return this.chatRoomList.filter((e) => !e.GetVoiceAllowed() || e.GetRoomID() == this.GetDefaultChatID()); } get voiceRoomList() { return this.chatRoomList.filter((e) => e.GetVoiceAllowed()); } get hasVoiceRoom() { let e, t = this.m_mapRooms.values(); for (; (e = t.next()) && !e.done; ) if (e.value.GetVoiceAllowed()) return !0; return !1; } GetDesktopNotificationLevel(e = !1) { return 0 == this.m_eUserDesktopNotificationLevel ? (this.BIsClanChatRoom() ? 3 : 4) : this.m_eUserDesktopNotificationLevel; } GetMobileNotificationLevel() { return 0 === this.m_eUserMobileNotificationLevel ? 3 : this.m_eUserMobileNotificationLevel; } BIsUnreadIndicatorMuted() { return this.m_bUnreadIndicatorMuted; } get hasUnreadChatMessage() { let e = Array.from(this.m_mapRooms.values()); for (let t of e) { if ((this.m_bUnreadIndicatorMuted ? t.has_unread_messages : t.has_any_unread_messages) && (t.BIsDefaultRoom() || t.time_last_ack >= this.m_rtLastAck || t.time_last_mention > this.m_rtLastAck)) return !0; } return !1; } get HasUnreadMention() { let e = Array.from(this.m_mapRooms.values()); for (let t of e) if (t.has_unread_mention) return !0; return !1; } GetChatRoomsWithUnreadPriorityMessages(e) { this.m_mapRooms.forEach(function (t) { t.has_unread_priority_messages && e.push(t); }); } get time_last_activity() { let e = 0, t = 0; this.m_mapRooms.forEach((n) => { if (!n.BShouldTrackUnreadMessages()) return; let i = n.time_last_activity; i > this.m_rtLastAck ? (t = 0 == t ? i : Math.min(i, t)) : (e = Math.max(i, e)); }); let n = t; return n || (n = e), this.m_rtTimeJoined > n && (n = this.m_rtTimeJoined), n; } get room_with_last_message() { let e, t = 0; return ( this.m_mapRooms.forEach((n) => { t < n.time_last_message && ((e = n), (t = n.time_last_message)); }), e ); } GetRoomWithLastMessageForUser() { let e, t = 0; return ( this.m_mapRooms.forEach((n) => { t < n.time_last_message && ((e = n), (t = n.time_last_message)); }), e ); } BHasEverBeenAcked() { if (this.m_rtLastAck) return !0; let e = Array.from(this.m_mapRooms.values()); for (let t of e) if (t.time_last_ack) return !0; return !1; } UpdateLastAckTimeFromServer(e) { this.m_rtLastAck < e && (this.m_rtLastAck = e); } IsInRoom(e) { return (0, f.X)(this.m_bFullStateLoaded, "Group state not fully loaded"), this.m_groupMembers.HasMember(e); } BRoomContainsJustTheseFriendsAndSelf(e) { if (!this.BIsCurrentUserAMember()) return !1; if (this.memberCountTotal != e.length + 1) return !1; let t = !0; for (let n of e) if (this.m_rgGroupMembersSummary.indexOf(n) < 0) { t = !1; break; } return t; } GetMyRank() { return this.GetMemberRank(this.m_chatStore.CMInterface.steamid.GetAccountID()); } ChangeMemberRank(e, t) { (0, f.X)(this.m_groupMembers.HasMember(e), "ChangeMemberRank: missing member"), (this.m_groupMembers.GetExtra(e).m_rank = t); } GetMemberRank(e) { (0, f.X)(this.m_groupMembers.HasMember(e), "GetMemberRank: missing member"); let t = this.m_groupMembers.GetExtra(e); return t && 0 != t.m_rank ? t.m_rank : this.BIsClanChatRoom() ? 0 : 20; } GetMemberRankIfPresent(e) { let t = this.m_groupMembers.GetExtra(e); return t ? t.m_rank : 0; } GetMemberPartyBeacon(e) { return this.m_rgPartyBeacons.find(function (t) { return t.account_id == e; }); } ChangeMemberRoles(e, t) { (0, f.X)(this.m_groupMembers.HasMember(e), "GetMemberRank: missing member"); let n = this.m_groupMembers.GetExtra(e); n && (n.m_role_ids = t); } GetMemberRankString(e) { if (!this.IsInRoom(e)) return ""; switch (this.GetMemberRank(e)) { case 50: return (0, d.Xx)("#Chat_rank_owner"); case 40: return (0, d.Xx)("#Chat_rank_officer"); case 30: return (0, d.Xx)("#Chat_rank_moderator"); case 20: return (0, d.Xx)("#Chat_rank_member"); case 15: return (0, d.Xx)("#Chat_rank_guest"); case 10: return (0, d.Xx)("#Chat_rank_viewer"); case 0: return ""; default: return (0, d.Xx)("#Chat_rank_unknown"); } } GetMemberRankStringUnlocalized(e) { if (!this.IsInRoom(e)) return ""; switch (this.GetMemberRank(e)) { case 50: return "Owner"; case 40: return "Officer"; case 30: return "Moderator"; case 20: return "Member"; case 15: return "Guest"; case 10: return "Viewer"; case 0: return "DefaultRank"; default: return (0, d.Xx)("UnknownRank"); } } GetMember(e) { if (this.IsInRoom(e)) return this.m_chatStore.FriendStore.GetPlayer(e); this.m_bFullStateLoaded; } SetInitialGroupState(e) { (0, f.X)(e.chat_group_id() == this.m_ulGroupID, "Chat group id doesn't match header"), this.UpdateGroupStateFromSummary(e), this.UpdateChatRoomState(e.default_chat_id(), e.chat_rooms()); } UpdateGroupStateFromSummary(e) { (this.m_strTagLine = e.chat_group_tagline()), null != e.chat_group_avatar_sha() && (this.m_strAvatarSHA = (0, g.BH)(e.chat_group_avatar_sha())), (this.m_strAvatarUGCURL = e.avatar_ugc_url() || ""), (this.m_unWatchingBroadcastAccountID = e.watching_broadcast_accountid()), (this.m_strWatchingBroadcastChannelID = e.watching_broadcast_channel_id()), (this.m_cMemberSummaryCount = e.active_member_count()), (this.m_unClanID = e.clanid()), (this.m_unOwnerAccountID = e.accountid_owner()), (this.m_rgGroupMembersSummary = e.top_members()), (this.m_defaultRoleID = e.default_role_id()), (this.m_roleActions = e.role_actions().map((e) => new y(e))), this.m_groupMembers.AddMember(_.Ul.CMInterface.steamid.GetAccountID(), new I(e.rank(), e.role_ids())), this.SetOwnerAppID(e.appid()), this.SetNameCheckingForAppLocalization(e.chat_group_name()), (this.m_rgPartyBeacons = e.party_beacons().map((e) => ({ account_id: new c.K(e.steamid_owner()).GetAccountID(), app_id: e.app_id(), beacon_id: e.beacon_id(), game_metadata: e.game_metadata() }))), _.Ul.GroupMemberStore.OnPartyBeaconsUpdated(this.m_ulGroupID, this.m_rgPartyBeacons); } SetNameCheckingForAppLocalization(e) { let t = null; !this.m_unOwnerAccountID && this.GetOwnerAppID() && ("#" == e[0] ? (t = { tok: e }) : "{" == e[0] && (t = JSON.parse(e))), t && t.tok ? ((this.m_strName = "..."), _.Ul.AppInfoStore.GetRichPresenceLocAsync(this.GetOwnerAppID()).then((e) => { let n = new Map(); if (t.params) for (let e in t.params) n.set(e.toString(), t.params[e].toString()); this.m_strName = e.Localize(t.tok, n); })) : (this.m_strName = e); } UpdateGroupState(e) { (0, f.X)(e.header_state().chat_group_id() == this.m_ulGroupID, "Chat group id doesn't match header"), this.UpdateChatRoomHeaderState(e.header_state()), this.m_groupMembers.Clear(); let t = []; for (let n of e.members()) { let e = n.accountid(); this.m_groupMembers.AddMember(e, new I(n.rank(), n.role_ids())), t.length < 10 && t.push(e); } (!this.m_rgGroupMembersSummary || this.m_rgGroupMembersSummary.length < t.length) && (this.m_rgGroupMembersSummary = t), this.UpdateChatRoomState(e.default_chat_id(), e.chat_rooms()), (this.m_bFullStateLoaded = !0); } SetMemberListVirtualized(e) { (this.m_bMemberListVirtualized = e), this.m_groupMembers.SetMemberDataVirtualized(e); } BIsMemberListVirtualized() { return this.m_bMemberListVirtualized; } UnloadActiveGroupState() { this.UnloadGroupState(), this.m_mapRooms.forEach((e) => { e.UnloadActiveChatState(); }); } UnloadGroupState() { (this.m_bFullStateLoaded = !1), (this.m_bMemberListVirtualized = !1), this.m_groupMembers.Clear(); } UnloadAndResetGroupState() { this.UnloadGroupState(), this.UpdateUserState(new u.r9()), this.m_mapRooms.forEach((e) => { e.UnloadChatState(); }); } OnUserStateChange(e, t) { let n = e.accountid(); 1 == t ? (this.LOG(`new member ${n} roles [${e.role_ids().toString()}]`), this.m_groupMembers.AddMember(n, new I(e.rank(), e.role_ids())), _.Ul.GroupMemberStore.OnMemberAdded(this.m_ulGroupID, n), this.m_rgGroupMembersSummary.length < 10 && -1 == this.m_rgGroupMembersSummary.indexOf(n) && (this.m_rgGroupMembersSummary = [...this.m_rgGroupMembersSummary, n])) : 2 == t || 3 == t || 10 == t ? (this.m_groupMembers.RemoveMember(n), _.Ul.GroupMemberStore.OnMemberRemoved(this.m_ulGroupID, n), -1 !== this.m_rgGroupMembersSummary.indexOf(n) && (this.m_rgGroupMembersSummary = o.de(this.m_rgGroupMembersSummary, n))) : 7 == t ? this.ChangeMemberRank(n, e.rank()) : 12 == t && this.ChangeMemberRoles(n, e.role_ids()); } UpdateChatRoomState(e, t) { this.m_ulDefaultChatID = e; let n = new Set(); this.m_mapRooms.forEach((e, t) => n.add(t)); for (let i of t) { let t = i.chat_id(); n.delete(t); let o = this.m_mapRooms.get(t); o || ((o = new l.K(this.m_chatStore, this, t, t == e)), this.m_mapRooms.set(t, o)), o.UpdateChatState(i); } n.forEach((e) => this.m_mapRooms.delete(e)); } UpdateUserState(e) { for (let t of e.user_chat_room_state()) { let e = t.chat_id(), n = this.m_mapRooms.get(e); n && n.UpdateUserState(t); } (this.m_rtTimeJoined = e.time_joined()), (this.m_rtLastAck = e.time_last_group_ack()), (this.m_eUserDesktopNotificationLevel = e.desktop_notification_level()), (this.m_eUserMobileNotificationLevel = e.mobile_notification_level()), (this.m_bUnreadIndicatorMuted = e.unread_indicator_muted()); } UpdateChatRoomHeaderState(e) { (0, f.X)(e.chat_group_id() == this.m_ulGroupID, "Chat group id doesn't match header"), (this.m_strTagLine = e.tagline()), null != e.avatar_sha() && (this.m_strAvatarSHA = (0, g.BH)(e.avatar_sha())), (this.m_strAvatarUGCURL = e.avatar_ugc_url() || ""), (this.m_unWatchingBroadcastAccountID = e.watching_broadcast_accountid()), (this.m_unClanID = e.clanid()), (this.m_unOwnerAccountID = e.accountid_owner()), (this.m_defaultRoleID = e.default_role_id()), (this.m_roles = e.roles().map((e) => ({ role_id: e.role_id(), name: e.name(), ordinal: e.ordinal() }))); for (let e of this.m_roles) this.LOG(`role ${e.role_id} ${e.name}`); this.m_roleActions = e.role_actions().map((e) => new y(e)); for (let e of this.m_roleActions) this.LOG(`role/action ${e.toString()}`); this.SetOwnerAppID(e.appid()), this.SetNameCheckingForAppLocalization(e.chat_name()), (this.m_rgPartyBeacons = e.party_beacons().map((e) => ({ account_id: new c.K(e.steamid_owner()).GetAccountID(), app_id: e.app_id(), beacon_id: e.beacon_id(), game_metadata: e.game_metadata() }))), _.Ul.GroupMemberStore.OnPartyBeaconsUpdated(this.m_ulGroupID, this.m_rgPartyBeacons); } BIsCurrentUserAMember() { return !!this.m_rtTimeJoined; } DefaultRoleID() { return this.m_defaultRoleID; } GetRoleActions(e) { for (let t of this.m_roleActions) if (t.role_id == e) return t; } GetRoles() { return this.m_roles; } GetRoleOrdinal(e) { for (let t of this.m_roles) if (t.role_id == e) return t.ordinal; } BIsUserGroupMember(e) { for (let t of this.m_rgGroupMembersSummary) if (t == e.accountid) return !0; return !1; } GetMemberRoleIDs(e) { return null == this.m_groupMembers.GetExtra(e) ? [] : this.m_groupMembers.GetExtra(e).m_role_ids; } ToggleMemberRoleState(e, t) { let n = this.BMemberHasRole(e, t); return this.SetMemberRoleState(e, t, !n); } SetMemberRoleState(e, t, n) { if (n == this.BMemberHasRole(e, t)) return Promise.resolve(!0); if (!this.BCanIAssignRole(t)) return Promise.resolve(!1); let i = c.K.InitFromAccountID(e); if (n) { let e = h.gA.Init(u.eF); return e.Body().set_chat_group_id(this.GetGroupID()), e.Body().set_steamid(i.ConvertTo64BitString()), e.Body().set_role_id(t), u.Xn.AddRoleToUser(_.Ul.ChatStore.CMInterface.GetServiceTransport(), e).then((e) => (e.GetEResult(), 1 == e.GetEResult())); } { let e = h.gA.Init(u.$n); return e.Body().set_chat_group_id(this.GetGroupID()), e.Body().set_steamid(i.ConvertTo64BitString()), e.Body().set_role_id(t), u.Xn.DeleteRoleFromUser(_.Ul.ChatStore.CMInterface.GetServiceTransport(), e).then((e) => (e.GetEResult(), 1 == e.GetEResult())); } } BDoesRoleAllowAction(e, t) { for (let n of this.m_roleActions) if (n.role_id == e && n.BCanPerformAction(t)) return !0; return !1; } BCanIPerformActionOnUser(e, t, n = !1) { return !(!n && !this.BHasMember(e)) && !this.BIsAccountIDOwner(e) && this.BCanIPerformAction(t); } BHasMember(e) { return void 0 !== this.m_groupMembers.GetExtra(e); } BMemberHasRole(e, t) { let n = this.m_groupMembers.GetExtra(e); return !!n && n.BHasRole(t); } BCanIPerformAction(e) { if (this.BIsAccountIDOwner(this.m_chatStore.CMInterface.steamid.GetAccountID())) return !0; let t = this.m_chatStore.CMInterface.steamid.GetAccountID(), n = this.m_groupMembers.GetExtra(t); if (n) for (let t of n.m_role_ids) if (this.BDoesRoleAllowAction(t, e)) return !0; return !1; } BCanKickMember(e) { return this.BCanIPerformActionOnUser(e, 2); } BCanBanMember(e) { return this.BCanIPerformActionOnUser(e, 3); } BCanDeleteMemberMessages(e) { if (_.Ul.FriendStore.self.accountid == e) return !0; return this.BCanIPerformActionOnUser(e, 2, true) || this.BCanIPerformActionOnUser(e, 3, true); } BCanICreateRoles() { return this.BCanIPerformAction(8); } BCanIModifyRole(e) { if (this.BIsAccountIDOwner(this.m_chatStore.CMInterface.steamid.GetAccountID())) return !0; if (!this.BCanIPerformAction(8)) return !1; if (!this.GetRoleActions(e)) return !1; let t = this.GetRoleOrdinal(e); if (null == t) return !1; let n = this.GetHighestRankRoleIDForPermission(this.m_chatStore.CMInterface.steamid.GetAccountID(), 8), i = this.GetRoleOrdinal(n); return null != i && i < t; } BCanIAssignRoles() { return this.BCanIPerformAction(9); } BCanIAssignRole(e) { if (this.BIsClanChatRoom()) return !1; if (e == this.DefaultRoleID()) return !1; if (this.BIsAccountIDOwner(this.m_chatStore.CMInterface.steamid.GetAccountID())) return !0; if (!this.BCanIPerformAction(9)) return !1; if (!this.GetRoleActions(e)) return !1; let t = this.GetRoleOrdinal(e); if (null == t) return !1; let n = this.GetHighestRankRoleIDForPermission(this.m_chatStore.CMInterface.steamid.GetAccountID(), 9), i = this.GetRoleOrdinal(n); return null != i && i < t; } BCanIMentionAll() { return this.BCanIPerformAction(10); } BCanIAssociateBroadcast() { return this.BCanIPerformAction(11); } GetHighestRankRoleIDForPermission(e, t) { let n, i = Number.MAX_VALUE, o = this.m_groupMembers.GetExtra(e); if (o) { for (let e of o.m_role_ids) if (this.BDoesRoleAllowAction(e, t)) { let t = this.GetRoleOrdinal(e); t < i && ((n = e), (i = t)); } return n; } } GetDefaultChatRoom() { return this.m_mapRooms.get(this.m_ulDefaultChatID); } GetChatRoom(e) { return this.m_mapRooms.get(e); } OnConnectionRestored(e) { e && this.UnloadGroupState(), this.m_mapRooms.forEach((e) => e.OnConnectionRestored()); } OnRoomStateChange(e) { this.UpdateChatRoomState(e.default_chat_id(), e.chat_rooms()); } OnActivate() { if (!this.m_rtLastAck || this.hasUnreadChatMessage) { let e = 0; this.m_mapRooms.forEach((t) => { t.time_last_message && (e = Math.max(e, t.time_last_message)); }), (this.m_rtLastAck = e || _.Ul.GetServerRTime32()); let t = h.gA.Init(u.ig); t.Body().set_chat_group_id(this.m_ulGroupID), t.Body().set_timestamp(this.m_rtLastAck), u.Xn.AckChatMessage(_.Ul.CMInterface.GetServiceTransport(), t); } } InviteFriend(e, t) { let n = c.K.InitFromAccountID(e), i = h.gA.Init(u.xT); i.Body().set_chat_group_id(this.m_ulGroupID), i.Body().set_steamid(n.ConvertTo64BitString()), t && i.Body().set_chat_id(t.GetRoomID()), u.Xn.InviteFriendToChatRoomGroup(this.m_chatStore.CMInterface.GetServiceTransport(), i).then((e) => { e.GetEResult(); }); } SaveChatRoomGroup(e) { let t = h.gA.Init(u.Rz); return ( t.Body().set_chat_group_id(this.m_ulGroupID), t.Body().set_name(e), u.Xn.SaveChatRoomGroup(this.m_chatStore.CMInterface.GetServiceTransport(), t).then((e) => { let t = e.GetEResult(); if (1 != t) throw t; }) ); } RenameChatRoomGroup(e) { if (!e) return Promise.resolve(2); let t = this.m_strName; this.m_strName = e; let n = h.gA.Init(u.E9); return n.Body().set_chat_group_id(this.m_ulGroupID), n.Body().set_name(e), u.Xn.RenameChatRoomGroup(this.m_chatStore.CMInterface.GetServiceTransport(), n).then((e) => (1 != e.GetEResult() && (this.m_strName = t), e.GetEResult())); } SetChatRoomGroupTagline(e) { let t = this.m_strTagLine; if ((e.length > 255 && (e = e.substring(0, 255)), e == this.m_strTagLine)) return Promise.resolve(); this.m_strTagLine = e; let n = h.gA.Init(u.Yv); return ( n.Body().set_chat_group_id(this.m_ulGroupID), n.Body().set_tagline(e), u.Xn.SetChatRoomGroupTagline(this.m_chatStore.CMInterface.GetServiceTransport(), n).then((e) => { 1 != e.GetEResult() && (this.m_strTagLine = t); }) ); } SetChatRoomGroupWatchingBroadcast(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (e == this.m_unWatchingBroadcastAccountID && !t) return Promise.resolve(); let n = h.gA.Init(u.Sm); n.Body().set_chat_group_id(this.m_ulGroupID), n.Body().set_watching_broadcast_accountid(e), t && n.Body().set_watching_broadcast_channel_id(t); const i = (yield u.Xn.SetChatRoomGroupWatchingBroadcast(this.m_chatStore.CMInterface.GetServiceTransport(), n)).GetEResult(); if (1 !== i) throw i; (this.m_unWatchingBroadcastAccountID = e), (this.m_strWatchingBroadcastChannelID = t); }); } SetChatRoomGroupAvatar(e) { if (e == this.m_strAvatarSHA) return Promise.resolve(); let t = h.gA.Init(u.SS); return ( t.Body().set_chat_group_id(this.m_ulGroupID), t.Body().set_avatar_sha((0, g.$x)(e)), u.Xn.SetChatRoomGroupAvatar(this.m_chatStore.CMInterface.GetServiceTransport(), t).then((t) => { let n = t.GetEResult(); if (1 != n) throw n; this.m_strAvatarSHA = e; }) ); } BCanInvite() { return this.BCanIPerformAction(4); } BCanBan() { return this.BCanIPerformAction(3); } BCanKick() { return this.BCanIPerformAction(2); } BCanAdminChannel() { return this.BCanIPerformAction(1); } BCanAdminGroup() { return this.BCanIPerformAction(5); } BCanChat() { return this.BCanIPerformAction(6); } BCanEditRoles() { return !this.BIsClanChatRoom() && this.BCanIPerformAction(9); } get members_to_highlight_name() { return this.InternalGetMembersToHighlight(3, !0); } get members_to_highlight() { return this.InternalGetMembersToHighlight(4, !1); } InternalGetMembersToHighlight(e, t) { const n = !t, i = !!this.m_rtTimeJoined; let o = this.m_bFullStateLoaded ? this.m_groupMembers.unfiltered_count : this.m_cMemberSummaryCount; const r = o > e ? e - 1 : e; let a = _.Ul.FriendStore, s = a.self, l = [], c = a.GetPlayer(this.GetOwnerAccountID()); if ((c && c.accountid != s.accountid && l.push(c), this.m_rgGroupMembersSummary)) { for (let e of this.m_rgGroupMembersSummary) { if (e == s.accountid || this.BIsAccountIDOwner(e)) continue; let n = a.GetFriendIfCached(e); if (n && (t || n.persona.BHasAvatarSet()) && (l.push(n), l.length >= r)) break; } if (n && l.length < r) for (let e of this.m_rgGroupMembersSummary) { if (e == s.accountid || this.BIsAccountIDOwner(e)) continue; let n = a.GetPlayer(e); if (n && !n.is_friend && (t || n.persona.BHasAvatarSet()) && (l.push(n), l.length >= r)) break; } } return i && l.length < r && l.push(s), { members: l, remaining_count: o - l.length }; } SetUserBanState(e, t) { let n = c.K.InitFromAccountID(e).ConvertTo64BitString(), i = h.gA.Init(u.NQ); return ( i.Body().set_chat_group_id(this.m_ulGroupID), i.Body().set_steamid(n), i.Body().set_ban_state(t), u.Xn.SetUserBanState(this.m_chatStore.CMInterface.GetServiceTransport(), i).then((e) => { let t = e.GetEResult(); if (1 != t && 29 != t) throw ((0, f.X)(!1, `Failed to change ban state ${t}`), t); }) ); } MuteUser(e, t) { let n = c.K.InitFromAccountID(e).ConvertTo64BitString(), i = h.gA.Init(u.l); return ( i.Body().set_chat_group_id(this.m_ulGroupID), i.Body().set_steamid(n), i.Body().set_expiration(t), u.Xn.MuteUserInGroup(this.m_chatStore.CMInterface.GetServiceTransport(), i).then((e) => { let t = e.GetEResult(); if (1 != t) throw ((0, f.X)(!1, `Failed to change muteexpiration ${t}`), t); }) ); } KickUser(e, t) { let n = c.K.InitFromAccountID(e).ConvertTo64BitString(), i = h.gA.Init(u.LA); return ( i.Body().set_chat_group_id(this.m_ulGroupID), i.Body().set_steamid(n), i.Body().set_expiration(t), u.Xn.KickUserFromGroup(this.m_chatStore.CMInterface.GetServiceTransport(), i).then((e) => { let t = e.GetEResult(); if (1 != t) throw (this.LOG(`Kick returned ${t}`), t); }) ); } RevokeInvite(e) { let t = c.K.InitFromAccountID(e).ConvertTo64BitString(), n = h.gA.Init(u.H0); return ( n.Body().set_chat_group_id(this.m_ulGroupID), n.Body().set_steamid(t), u.Xn.RevokeInviteToGroup(this.m_chatStore.CMInterface.GetServiceTransport(), n).then((e) => { let t = e.GetEResult(); if (1 != t) throw (this.LOG(`RevokeInvite returned ${t}`), t); }) ); } CreateChatRoom(e, t) { let n = h.gA.Init(u.vx); return ( n.Body().set_chat_group_id(this.m_ulGroupID), n.Body().set_name(e), n.Body().set_allow_voice(t), u.Xn.CreateChatRoom(this.m_chatStore.CMInterface.GetServiceTransport(), n).then((e) => { let t = e.Body().chat_room().chat_id(); if (1 != e.GetEResult() || "" == t || "0" == t) throw ((0, f.X)(!1, "Failed to create chat room"), new Error("Failed to create chat room")); return this.AddCreatedRoom(t, e.Body().chat_room()); }) ); } CreateAndJoinTempVoiceRoom() { this.CreateChatRoom("", !0) .then((e) => { e.StartVoiceChat(); }) .catch(() => {}); } AddCreatedRoom(e, t) { let n = this.m_mapRooms.get(e); return n || ((n = new l.K(this.m_chatStore, this, e, !1)), this.m_mapRooms.set(e, n)), n.UpdateChatState(t), n; } RenameRoom(e, t) { if (e == this.m_ulDefaultChatID) return; if (!t) return; let n = this.GetChatRoom(e); if (!n) return; let i = n.name; n.ChangeNameWhileWaitingForRenameRequest(t); let o = h.gA.Init(u.YT); o.Body().set_chat_group_id(this.m_ulGroupID), o.Body().set_chat_id(e), o.Body().set_name(t), u.Xn.RenameChatRoom(this.m_chatStore.CMInterface.GetServiceTransport(), o).then((e) => { 1 == e.GetEResult() || ((0, f.X)(!1, "Failed to change room name"), n.ChangeNameWhileWaitingForRenameRequest(i)); }); } ReorderRoom(e, t) { let n = h.gA.Init(u.nw); n.Body().set_chat_group_id(this.m_ulGroupID), n.Body().set_chat_id(e), n.Body().set_move_after_chat_id(t), u.Xn.ReorderChatRoom(this.m_chatStore.CMInterface.GetServiceTransport(), n).then((e) => { 1 == e.GetEResult() || (0, f.X)(!1, "Failed to reorder room"); }); } DeleteChatRoom(e) { let t = h.gA.Init(u.YS); t.Body().set_chat_group_id(this.m_ulGroupID), t.Body().set_chat_id(e), u.Xn.DeleteChatRoom(this.m_chatStore.CMInterface.GetServiceTransport(), t).then((t) => { 1 == t.GetEResult() ? this.RemoveRoom(e) : (0, f.X)(!1, "Failed to delete chat room"); }); } RemoveRoom(e) { this.m_mapRooms.delete(e); } LeaveChatRoomGroup(e) { this.m_chatStore.LeaveChatRoomGroup(e, this.m_ulGroupID).catch(() => {}); } GetInviteLinksForGroup() { let e = h.gA.Init(u.At); return ( e.Body().set_chat_group_id(this.GetGroupID()), u.Xn.GetInviteLinksForGroup(_.Ul.ChatStore.CMInterface.GetServiceTransport(), e).then((e) => { let t; return (t = 1 != e.GetEResult() ? { loadingState: "failed", rgInviteLinks: null } : { loadingState: "loaded", rgInviteLinks: e.Body().invite_links() }), t; }) ); } GetInvitedUsersForGroup() { let e = h.gA.Init(u.G4); return ( e.Body().set_chat_group_id(this.GetGroupID()), u.Xn.GetInviteList(_.Ul.ChatStore.CMInterface.GetServiceTransport(), e).then((e) => { let t; return (t = 1 != e.GetEResult() ? { loadingState: "failed", rgInvitedUsers: null } : { loadingState: "loaded", rgInvitedUsers: e.Body().invites() }), t; }) ); } GetBanList() { let e = h.gA.Init(u.Qx); return ( e.Body().set_chat_group_id(this.GetGroupID()), u.Xn.GetBanList(_.Ul.ChatStore.CMInterface.GetServiceTransport(), e).then((e) => { let t = new w(); return 15 == e.GetEResult() ? (t.loadingState = "denied") : 1 == e.GetEResult() ? ((t.rgBans = e.Body().bans()), (t.loadingState = "loaded")) : (t.loadingState = "failed"), t; }) ); } GetRoleName(e) { let t = this.m_roles.findIndex((t) => t.role_id == e); if (t >= 0) return this.m_roles[t].name; } CreateRole(e) { if (0 == (e = e.trim()).length) return Promise.resolve(); let t = h.gA.Init(u.NU); return ( t.Body().set_chat_group_id(this.GetGroupID()), t.Body().set_name(e), this.m_roles.push({ role_id: "-1", name: e, ordinal: Number.MAX_VALUE }), u.Xn.CreateRole(_.Ul.ChatStore.CMInterface.GetServiceTransport(), t).then((t) => { let n = t.GetEResult(); if (1 != n) { let e = this.m_roles.findIndex((e) => "-1" == e.role_id); throw (e >= 0 && this.m_roles.splice(e, 1), new Error(`unable to create role, error ${n}`)); } this.LOG(`created role ${e}`); }) ); } DeleteRole(e) { let t = h.gA.Init(u.A_); return ( t.Body().set_chat_group_id(this.GetGroupID()), t.Body().set_role_id(e), u.Xn.DeleteRole(_.Ul.ChatStore.CMInterface.GetServiceTransport(), t).then((t) => { if (1 != t.GetEResult()) throw new Error(`unable to delete role ${e}`); let n = this.m_roles.findIndex((t) => t.role_id == e); n >= 0 && this.m_roles.splice(n, 1); }) ); } RenameRole(e, t) { if (0 == (t = t.trim()).length) return Promise.resolve(); let n = h.gA.Init(u.zT); return ( n.Body().set_chat_group_id(this.GetGroupID()), n.Body().set_role_id(e), n.Body().set_name(t), u.Xn.RenameRole(_.Ul.ChatStore.CMInterface.GetServiceTransport(), n).then((n) => { let i = n.GetEResult(); if (1 != i) throw new Error(`unable to rename role ${e} ${i}`); let o = this.m_roles.findIndex((t) => t.role_id == e); o >= 0 && (this.m_roles[o].name = t); }) ); } ReorderRole(e, t) { let n = h.gA.Init(u.uB); return n.Body().set_chat_group_id(this.GetGroupID()), n.Body().set_role_id(e), n.Body().set_ordinal(t), u.Xn.ReorderRole(_.Ul.ChatStore.CMInterface.GetServiceTransport(), n).then((e) => 1 == e.GetEResult()); } SetRoleAction(e, t, n) { let i = this.GetRoleActions(e); if (i) { if (n == i.BCanPerformAction(t)) return; let o = i.BCanPerformAction(t); i.SetCanPerformAction(t, n); let r = h.gA.Init(u.m3); return ( r.Body().set_chat_group_id(this.GetGroupID()), r.Body().set_role_id(e), r.Body().set_actions(i.roleActions), u.Xn.ReplaceRoleActions(_.Ul.ChatStore.CMInterface.GetServiceTransport(), r).then((e) => { 1 != e.GetEResult() && (i.SetCanPerformAction(t, o), this.LOG(`SetRoleAction error, restoring ${t} to ${o}`)); }) ); } } DeleteInviteLink(e, t) { let n = h.gA.Init(u.qu); if ((n.Body().set_chat_group_id(this.GetGroupID()), n.Body().set_invite_code(e), t && "loaded" == t.loadingState)) { let n = t.rgInviteLinks.findIndex((t) => t.invite_code() == e); n >= 0 && (t.rgInviteLinks.splice(n, 1), this.LOG(`removed link ${t.rgInviteLinks}`)); } return u.Xn.DeleteInviteLink(_.Ul.ChatStore.CMInterface.GetServiceTransport(), n).then((e) => 1 == e.GetEResult()); } SetNotificationPreferences(e, t, n) { let i = h.gA.Init(u.x1); return i.Body().set_chat_group_id(this.m_ulGroupID), void 0 !== e && ((this.m_eUserDesktopNotificationLevel = e), i.Body().chat_group_preferences().set_desktop_notification_level(e), 4 == e && this.m_bUnreadIndicatorMuted && (n = !1)), void 0 !== t && ((this.m_eUserMobileNotificationLevel = t), i.Body().chat_group_preferences().set_mobile_notification_level(t)), void 0 !== n && ((this.m_bUnreadIndicatorMuted = n), i.Body().chat_group_preferences().set_unread_indicator_muted(n)), u.Xn.SetUserChatGroupPreferences(_.Ul.CMInterface.GetServiceTransport(), i).then((e) => 1 == e.GetEResult()); } AddMetaMentionsToResults(e, t) { let n = this.BCanIMentionAll() ? "" : (0, d.Xx)("#ChatMentionSuggest_NoPermission"); "online".startsWith(e) && t.unshift({ friend: null, iMatchOffset: 0, bNicknameMatch: !1, meta_mention: "online", strNotSelectable: n }), "all".startsWith(e) && t.unshift({ friend: null, iMatchOffset: 0, bNicknameMatch: !1, meta_mention: "all", strNotSelectable: n }); } SearchMembers(e, t = 5, n = !1) { let i = [], o = e.toLocaleLowerCase(), r = this.m_chatStore.CMInterface.steamid.GetAccountID(), a = [], s = []; for (let e of this.memberList.member_list) if (e.accountid != r) { if (o.length) { let t = e.MatchSearchString(o), i = 0 === t.iOffset; if (0 == t.match || (n && !i)) continue; let r = { friend: e, iMatchOffset: t.iOffset, bNicknameMatch: 2 == t.match }; i ? (t.bFullMatch ? a.unshift(r) : a.push(r)) : s.push(r); } else i.push({ friend: e, iMatchOffset: 0, bNicknameMatch: !1 }); if (i.length + a.length >= t) break; } for (let e = 0; e < a.length && i.length < t; e++) i.push(a[e]); for (let e = 0; e < s.length && i.length < t; e++) i.push(s[e]); return i; } BNameMatchesSearch(e) { return -1 != this.name.toLocaleLowerCase().indexOf(e); } } (0, i.gn)([m.LO], E.prototype, "m_rtTimeJoined", void 0), (0, i.gn)([m.LO], E.prototype, "m_rtLastAck", void 0), (0, i.gn)([m.LO], E.prototype, "m_unOwnerAccountID", void 0), (0, i.gn)([m.LO], E.prototype, "m_bFullStateLoaded", void 0), (0, i.gn)([m.LO], E.prototype, "m_strName", void 0), (0, i.gn)([m.LO], E.prototype, "m_strTagLine", void 0), (0, i.gn)([m.LO], E.prototype, "m_strAvatarSHA", void 0), (0, i.gn)([m.LO], E.prototype, "m_strAvatarUGCURL", void 0), (0, i.gn)([m.LO], E.prototype, "m_unWatchingBroadcastAccountID", void 0), (0, i.gn)([m.LO], E.prototype, "m_strWatchingBroadcastChannelID", void 0), (0, i.gn)([m.LO], E.prototype, "m_rgPartyBeacons", void 0), (0, i.gn)([m.LO], E.prototype, "m_eUserDesktopNotificationLevel", void 0), (0, i.gn)([m.LO], E.prototype, "m_eUserMobileNotificationLevel", void 0), (0, i.gn)([m.LO], E.prototype, "m_bUnreadIndicatorMuted", void 0), (0, i.gn)([m.LO], E.prototype, "m_roles", void 0), (0, i.gn)([m.LO], E.prototype, "m_rgGroupMembersSummary", void 0), (0, i.gn)([m.LO], E.prototype, "m_cMemberSummaryCount", void 0), (0, i.gn)([m.LO], E.prototype, "m_bMemberListVirtualized", void 0), (0, i.gn)([m.Fl], E.prototype, "name", null), (0, i.gn)([m.Fl], E.prototype, "hasAvatarSHA", null), (0, i.gn)([m.Fl], E.prototype, "hasIcon", null), (0, i.gn)([m.Fl], E.prototype, "avatar_url_small", null), (0, i.gn)([m.Fl], E.prototype, "avatar_url_medium", null), (0, i.gn)([m.Fl], E.prototype, "avatar_url_full", null), (0, i.gn)([m.Fl], E.prototype, "chatRoomList", null), (0, i.gn)([m.Fl], E.prototype, "textRoomList", null), (0, i.gn)([m.Fl], E.prototype, "voiceRoomList", null), (0, i.gn)([m.Fl], E.prototype, "hasVoiceRoom", null), (0, i.gn)([m.Fl], E.prototype, "hasUnreadChatMessage", null), (0, i.gn)([m.Fl], E.prototype, "HasUnreadMention", null), (0, i.gn)([m.Fl], E.prototype, "time_last_activity", null), (0, i.gn)([m.Fl], E.prototype, "room_with_last_message", null), (0, i.gn)([m.aD], E.prototype, "ChangeMemberRank", null), (0, i.gn)([m.aD], E.prototype, "ChangeMemberRoles", null), (0, i.gn)([m.aD], E.prototype, "SetInitialGroupState", null), (0, i.gn)([m.aD], E.prototype, "UpdateGroupStateFromSummary", null), (0, i.gn)([m.aD], E.prototype, "SetNameCheckingForAppLocalization", null), (0, i.gn)([m.aD], E.prototype, "UpdateGroupState", null), (0, i.gn)([m.aD], E.prototype, "UnloadActiveGroupState", null), (0, i.gn)([m.aD], E.prototype, "UnloadGroupState", null), (0, i.gn)([m.aD], E.prototype, "UnloadAndResetGroupState", null), (0, i.gn)([m.aD], E.prototype, "UpdateChatRoomState", null), (0, i.gn)([m.aD], E.prototype, "UpdateUserState", null), (0, i.gn)([m.aD], E.prototype, "UpdateChatRoomHeaderState", null), (0, i.gn)([m.aD], E.prototype, "OnActivate", null), (0, i.gn)([m.Fl], E.prototype, "members_to_highlight_name", null), (0, i.gn)([m.Fl], E.prototype, "members_to_highlight", null), (0, i.gn)([m.aD], E.prototype, "AddCreatedRoom", null), (0, i.gn)([m.aD], E.prototype, "RemoveRoom", null); class D extends b.Q { constructor(e, t) { super(), (this.LOG = new a.sO("ChatRoomGroup", () => this.GetUniqueID()).Debug), (this.m_mapChatViews = new Map()), (this.m_selectedChatView = void 0), (this.m_popoverChatView = void 0), (this.m_bShowSettingsDialog = !1), (this.m_ulRenameChatRoomID = void 0), (this.m_bShowBroadcast = !1), (this.m_bShowVerticalBroadcastChat = void 0), (this.m_strLocalBroadcastId = void 0), (this.m_bChatHidden = !1), (this.m_bShowGlobalChat = !1), (this.m_bMemberSearchActive = !1), (this.m_strMemberSearchString = ""), (this.m_rgSearchResults = []), (this.m_bSearchError = !1), (this.m_bMemberListCollapsedOverride = void 0), (this.m_bChannelListCollapsedOverride = void 0), (0, m.rC)(this), (this.m_tabset = e), (this.m_group = t), this.m_group.BIsValid() && this.SelectChat(this.m_group.GetDefaultChatID()), (this.m_disposeChatRooms = (0, m.EH)(() => { let e = this.m_group.chatRoomList; this.m_selectedChatView && e.length && e.indexOf(this.m_selectedChatView.chat) < 0 && this.SelectChat(this.m_group.GetDefaultChatID()); })); } get search_results() { return this.m_rgSearchResults; } get has_search_error() { return this.m_bSearchError; } GetGroup() { return this.m_group; } GetSelectedChatView() { return this.m_selectedChatView; } GetActiveChatView() { return this.GetPopoverChatView() || this.GetSelectedChatView(); } GetPopoverChatView() { return this.m_popoverChatView; } get isBroadcastShown() { return this.m_bShowBroadcast; } ShowBroadcast() { (this.m_bShowBroadcast = !0), this.SetLayoutForBroadcast(); } SetLayoutForBroadcast() { this.SetChannelListCollapsed(!0, !1), this.SetMemberListCollapsed(!0, !1), SetBackgroundTimeout(() => { this.GetActiveChatView() && this.GetActiveChatView().OnChatFrameChanged(); }, 30); } HideBroadcast() { (this.m_bShowBroadcast = !1), this.SetLayoutForHiddenBroadcast(); } SetLayoutForHiddenBroadcast() { _.Ul.UIStore.SetTheaterMode(!1), SetBackgroundTimeout(() => { this.GetActiveChatView() && this.GetActiveChatView().OnChatFrameChanged(); }, 30); } SetVerticalBroadcastChat(e) { this.m_bShowVerticalBroadcastChat = e; } ToggleTheaterModeBroadcastChat() { _.Ul.UIStore.SetTheaterMode(!_.Ul.UIStore.GetTheaterMode()); } SetChatHidden(e) { this.m_bChatHidden = e; } SetGlobalBroadcastChatShown(e) { (this.m_bShowGlobalChat = e), this.GetActiveChatView() && this.GetActiveChatView().OnChatFrameChanged(); } SetLocalBroadcastId(e) { this.m_strLocalBroadcastId = e; } SetMemberListCollapsed(e, t = !0) { if (t) { this.m_bMemberListCollapsedOverride = void 0; const t = this.GetGroup(); _.Ul.ChatStore.ChatRoomGroupDisplayPrefs.SetChatRoomDisplayPref(t.GetGroupID(), "bMemberListCollapsed", e); } else this.m_bMemberListCollapsedOverride = e; } SetChannelListCollapsed(e, t = !0) { if (t) { this.m_bChannelListCollapsedOverride = void 0; const t = this.GetGroup(); _.Ul.ChatStore.ChatRoomGroupDisplayPrefs.SetChatRoomDisplayPref(t.GetGroupID(), "bChannelListCollapsed", e); } else this.m_bChannelListCollapsedOverride = e; } ClosePopoverChat() { this.m_popoverChatView && (this.m_popoverChatView.OnViewClosed(), this.m_disposeActiveVoice && this.m_disposeActiveVoice(), (this.m_popoverChatView = null)); } SelectChat(e) { let t = this.m_group.GetChatRoom(e); if (t) { if (t.GetVoiceAllowed() && t != this.m_group.GetDefaultChatRoom()) { if (this.m_popoverChatView && this.m_popoverChatView.chat == t) return; } else if ((this.ClosePopoverChat(), this.m_selectedChatView && this.m_selectedChatView.chat == t)) return; t.GetVoiceAllowed() && this.m_group.GetDefaultChatRoom() != t && !_.Ul.IsGamepadUIActive() ? (this.ClosePopoverChat(), (this.m_popoverChatView = this.GetChatViewForRoom(t)), this.m_disposeActiveVoice && this.m_disposeActiveVoice(), (this.m_disposeActiveVoice = (0, m.gx)( () => !t.BVoiceActive(), () => { this.m_popoverChatView && this.m_popoverChatView.chat == t && this.ClosePopoverChat(); }, ))) : (this.m_selectedChatView && this.m_selectedChatView.OnViewClosed(), (this.m_selectedChatView = this.GetChatViewForRoom(t))), this.m_tabset.activeTab == this && this.m_tabset.is_popup_focused && this.OnTabActivate(); } } SelectNextChannel() { const e = this.GetSelectedChannelIndex(), t = this.GetGroup().textRoomList, n = e >= t.length - 1 ? 0 : e + 1; this.SelectChat(t[n].GetRoomID()); } SelectPreviousChannel() { const e = this.GetSelectedChannelIndex(), t = this.GetGroup().textRoomList, n = e <= 0 ? t.length - 1 : e - 1; this.SelectChat(t[n].GetRoomID()); } GetSelectedChannelIndex() { const e = this.GetSelectedChatView().chat.GetRoomID(); return this.GetGroup().textRoomList.findIndex((t) => t.GetRoomID() === e); } GetChatViewForRoom(e) { let t = e.GetRoomID(), n = this.m_mapChatViews.get(t); return n ? this.LOG(`reusing chat for ${t}`) : (n = new s.R5(this.m_tabset, e, this)), n; } StartRoomRename(e) { this.m_ulRenameChatRoomID = e; } EndRoomRename() { this.m_ulRenameChatRoomID = ""; } IsRoomRenameActive(e) { return "" != this.m_ulRenameChatRoomID && this.m_ulRenameChatRoomID == e; } GetRenameRoomID() { return this.m_ulRenameChatRoomID; } OnTabClosed() { this.m_disposeActiveVoice && this.m_disposeActiveVoice(), this.m_disposeChatRooms && this.m_disposeChatRooms(), this.m_VirtualizedMemberList && _.Ul.ChatStore.UnregisterVirtualizedMemberListView(this.m_VirtualizedMemberList), this.ClosePopoverChat(), this.GetSelectedChatView().OnViewClosed(), _.Ul.ChatStore.DecRefActiveChatRoomGroup(this.GetGroup().GetGroupID()); } IsVoiceActive() { return _.Ul.ChatStore.VoiceChat.GetActiveChatRoomGroupID() == this.m_group.GetGroupID(); } IsTabForChat(e) { if (!(e instanceof l.K)) return !1; let t = e; return !!this.m_group.GetChatRoom(t.GetRoomID()); } GetUnreadMessageCount() { return this.m_group.hasUnreadChatMessage ? 1 : 0; } UpdateMemberSearch(e) { (this.m_bMemberSearchActive && this.m_strMemberSearchString == e) || ((this.m_bMemberSearchActive = !0), (this.m_strMemberSearchString = e || ""), e ? this.SearchMembers(e, 200).then( (e) => { (this.m_rgSearchResults = e), (this.m_bSearchError = !1); }, (e) => { console.warn(`Failed to filter members: ${e}`), (this.m_bSearchError = !0); }, ) : (this.m_rgSearchResults = void 0)); } ClearMemberSearch() { (this.m_bMemberSearchActive = !1), (this.m_strMemberSearchString = ""), (this.m_rgSearchResults = void 0); } IsMemberSearchActive() { return this.m_bMemberSearchActive; } GetMemberSearch() { return this.m_strMemberSearchString; } get normalizedMemberSearch() { return this.m_strMemberSearchString.trim().toLocaleLowerCase(); } get isMemberListExpanded() { if (this.m_bMemberSearchActive) return !0; if (void 0 === this.m_bMemberListCollapsedOverride) { const e = this.GetGroup(); return !_.Ul.ChatStore.ChatRoomGroupDisplayPrefs.GetChatRoomDisplayPref(e.GetGroupID(), "bMemberListCollapsed"); } return !this.m_bMemberListCollapsedOverride; } get isChannelListCollapsed() { if (void 0 === this.m_bChannelListCollapsedOverride) { const e = this.GetGroup(); return _.Ul.ChatStore.ChatRoomGroupDisplayPrefs.GetChatRoomDisplayPref(e.GetGroupID(), "bChannelListCollapsed"); } return this.m_bChannelListCollapsedOverride; } GetTabName() { return this.m_group.name; } GetUniqueID() { return this.m_group.unique_id; } OnTabFocus() { let e = this.GetActiveChatView(); e && e.OnFocus(); } InternalOnTabActivate() { let e = this.GetActiveChatView(); e && e.OnActivate(); } OnTabDeactivate() { let e = this.GetActiveChatView(); e && e.OnDeactivate(); } IsChatRoom() { return !0; } GetChatView() { return this.GetActiveChatView(); } GetMemberCountTotal() { return this.m_group.BIsMemberListVirtualized() ? this.GetVirtualizedMemberListView().GetMemberCountTotal() : this.m_group.memberCountTotal; } GetMemberCountOnline() { return this.m_group.BIsMemberListVirtualized() ? this.GetVirtualizedMemberListView().GetMemberCountOnline() : this.m_group.memberCountOnline; } GetMemberCountInGame() { return this.m_group.BIsMemberListVirtualized() ? this.GetVirtualizedMemberListView().GetMemberCountInGame() : this.m_group.memberCountInGame; } GetVirtualizedMemberListView() { return this.m_VirtualizedMemberList || ((this.m_VirtualizedMemberList = new v(this.m_group.GetGroupID())), _.Ul.ChatStore.RegisterVirtualizedMemberListView(this.m_VirtualizedMemberList)), this.m_VirtualizedMemberList; } SearchMembers(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.m_group.BIsMemberListVirtualized() ? this.GetVirtualizedMemberListView().PerformSearch(this.m_group, "1", e) : this.m_group.SearchMembers(e, t); }); } BIsMemberNameAmbiguous(e) { if (this.m_group.BIsMemberListVirtualized()) return !0; return this.m_group.SearchMembers(e, 2, !0).length >= 2; } ProcessMentions(e) { e.replace(/@/g, "@"); let t = e.indexOf("@"); for (; -1 !== t; ) { let n, i, o, r = e.indexOf("@", t + 1), a = e.indexOf(" ", t + 1), s = Math.min(-1 === r ? e.length : r, -1 === a ? e.length : a), l = e.substr(t + 1, s - t - 1).toLocaleLowerCase(); o = this.m_group.BIsMemberListVirtualized() ? this.GetVirtualizedMemberListView().GetAllKnownPersonas() : this.m_group.memberList.member_list_unsorted; for (let r of o) { let o = (0, S.Ao)(r.player_name_normalized), a = o + "#" + r.accountid.toString(36); if (a.startsWith(l)) { let s, c = a.length === l.length, m = c || o.length === l.length; (m || c) && (s = l.length), !c && e.length - t - 1 >= a.length && e.substr(t + 1, a.length).toLocaleLowerCase() === a && ((m = c = !0), (s = a.length)), !m && e.length - t - 1 >= o.length && e.substr(t + 1, o.length).toLocaleLowerCase() === o && (s = o.length), s && (void 0 === i || s >= i) && ((n = r), (i = s)); } } let c, m, d, h = !1; if ((this.m_group.BCanIMentionAll() && (h = "online" == l || "online#0" == l || "all" == l || "all#0" == l), h && (void 0 === i || i <= l.length))) { let e = l; -1 !== l.indexOf("#") && (e = l.substr(0, l.indexOf("#"))), (c = e), (m = e), (d = l.length), "online" == c && (c = "here"); } else n && void 0 !== i && ((c = "" + n.accountid), (m = n.persona.m_strPlayerName), (d = i)); if (m && void 0 !== d) { let n = e.substr(0, t), i = e.substr(t + 1 + d), o = `[mention=${c}]@${(0, S.Ao)(m)}[/mention]`; r = (e = n + o + i).indexOf("@", n.length + o.length); } t = r; } return e; } } (0, i.gn)([m.LO], D.prototype, "m_selectedChatView", void 0), (0, i.gn)([m.LO], D.prototype, "m_popoverChatView", void 0), (0, i.gn)([m.LO], D.prototype, "m_bShowSettingsDialog", void 0), (0, i.gn)([m.LO], D.prototype, "m_ulRenameChatRoomID", void 0), (0, i.gn)([m.LO], D.prototype, "m_bShowBroadcast", void 0), (0, i.gn)([m.LO], D.prototype, "m_bShowVerticalBroadcastChat", void 0), (0, i.gn)([m.LO], D.prototype, "m_strLocalBroadcastId", void 0), (0, i.gn)([m.LO], D.prototype, "m_bChatHidden", void 0), (0, i.gn)([m.LO], D.prototype, "m_bShowGlobalChat", void 0), (0, i.gn)([m.LO], D.prototype, "m_bMemberSearchActive", void 0), (0, i.gn)([m.LO], D.prototype, "m_strMemberSearchString", void 0), (0, i.gn)([m.LO.ref], D.prototype, "m_rgSearchResults", void 0), (0, i.gn)([m.LO], D.prototype, "m_bSearchError", void 0), (0, i.gn)([m.LO], D.prototype, "m_bMemberListCollapsedOverride", void 0), (0, i.gn)([m.LO], D.prototype, "m_bChannelListCollapsedOverride", void 0), (0, i.gn)([m.aD], D.prototype, "ShowBroadcast", null), (0, i.gn)([m.aD.bound], D.prototype, "HideBroadcast", null), (0, i.gn)([m.aD.bound], D.prototype, "SetVerticalBroadcastChat", null), (0, i.gn)([m.aD], D.prototype, "ToggleTheaterModeBroadcastChat", null), (0, i.gn)([m.aD], D.prototype, "SetChatHidden", null), (0, i.gn)([m.aD], D.prototype, "SetGlobalBroadcastChatShown", null), (0, i.gn)([m.aD], D.prototype, "SetLocalBroadcastId", null), (0, i.gn)([m.aD], D.prototype, "SetMemberListCollapsed", null), (0, i.gn)([m.aD], D.prototype, "SetChannelListCollapsed", null), (0, i.gn)([m.aD], D.prototype, "ClosePopoverChat", null), (0, i.gn)([m.aD], D.prototype, "SelectChat", null), (0, i.gn)([m.aD], D.prototype, "SelectNextChannel", null), (0, i.gn)([m.aD], D.prototype, "SelectPreviousChannel", null), (0, i.gn)([m.aD], D.prototype, "StartRoomRename", null), (0, i.gn)([m.aD], D.prototype, "EndRoomRename", null), (0, i.gn)([m.aD], D.prototype, "OnTabClosed", null), (0, i.gn)([m.aD], D.prototype, "UpdateMemberSearch", null), (0, i.gn)([m.aD], D.prototype, "ClearMemberSearch", null), (0, i.gn)([m.Fl], D.prototype, "isMemberListExpanded", null), (0, i.gn)([m.Fl], D.prototype, "isChannelListCollapsed", null); class w { constructor() { (this.loadingState = "pending"), (this.rgBans = void 0), (0, m.rC)(this); } } (0, i.gn)([m.LO], w.prototype, "loadingState", void 0), (0, i.gn)([m.LO], w.prototype, "rgBans", void 0); const R = { bMemberListCollapsed: void 0, bChannelListCollapsed: void 0 }, A = "ChatRoomGroupDisplayPrefs"; class M { constructor() { (this.m_mapDisplayPrefs = m.LO.map()), (0, m.rC)(this); } Init(e) { (this.m_SettingsStore = e), this.m_SettingsStore.GetObjectFromLocalStorageWhenReady(A).then((e) => { this.m_mapDisplayPrefs.clear(); for (let t in e.chatRoomGroups) { const n = e.chatRoomGroups[t]; "object" == typeof n && (("boolean" != typeof n.bMemberListCollapsed && "boolean" != typeof n.bChannelListCollapsed) || this.m_mapDisplayPrefs.set(t, e.chatRoomGroups[t])); } }); } GetChatRoomDisplayPref(e, t) { return (this.m_mapDisplayPrefs.get(e) || R)[t]; } ToggleChatRoomDisplayPref(e, t) { let n = this.GetChatRoomDisplayPref(e, t); this.SetChatRoomDisplayPref(e, t, !n); } SetChatRoomDisplayPref(e, t, n) { let i = this.m_mapDisplayPrefs.get(e); (i && i[t] === n) || (i || (this.m_mapDisplayPrefs.set(e, Object.assign({}, R)), (i = this.m_mapDisplayPrefs.get(e))), (i[t] = n), this.WritePrefs()); } WritePrefs() { this.m_SettingsStore.StoreObjectInLocalStorage(A, { chatRoomGroups: Object.fromEntries(this.m_mapDisplayPrefs) }); } FillInChatUsabilityMetrics(e) { let t = Array.from(this.m_mapDisplayPrefs.values()); e.ui_state().set_group_chat_left_col_collapsed(o.W(t, (e) => e.bChannelListCollapsed)), e.ui_state().set_group_chat_right_col_collapsed(o.W(t, (e) => e.bMemberListCollapsed)); } } (0, i.gn)([m.aD], M.prototype, "SetChatRoomDisplayPref", null); class k { constructor() { (this.m_mapAccountToExtra = m.LO.map()), (this.m_bMemberDataVirtualized = !1), (0, m.rC)(this); } GetCurrentMemberSet() { let e = new Set(); return ( this.m_mapAccountToExtra.forEach((t, n) => { e.add(n); }), e ); } SetMemberDataVirtualized(e) { this.m_bMemberDataVirtualized = e; } get unfiltered_count() { return this.m_mapAccountToExtra.size; } get member_counts() { let e = 0, t = 0; for (let n of this.member_list_unsorted) n.persona.is_online && (e++, n.persona.is_ingame && t++); return { online: e, ingame: t }; } Clear() { this.m_mapAccountToExtra.clear(), (this.m_bMemberDataVirtualized = !1); } AddMember(e, t = void 0) { this.HasMember(e) || this.m_mapAccountToExtra.set(e, t); } RemoveMember(e) { this.HasMember(e) && this.m_mapAccountToExtra.delete(e); } GetExtra(e) { return this.m_mapAccountToExtra.get(e); } HasMember(e) { return this.m_mapAccountToExtra.has(e); } get member_list() { let e = this.member_list_unsorted.slice(); return e.sort(p.Xp.DefaultFriendSortComparator), e; } get member_list_unsorted() { (0, f.X)(!this.m_bMemberDataVirtualized, "Shouldn't be accessing member_list when virtualized"); let e = []; return ( this.m_bMemberDataVirtualized || this.m_mapAccountToExtra.forEach((t, n) => { e.push(_.Ul.FriendStore.GetPlayer(n)); }), e ); } } (0, i.gn)([m.Fl], k.prototype, "unfiltered_count", null), (0, i.gn)([m.Fl], k.prototype, "member_counts", null), (0, i.gn)([m.aD], k.prototype, "Clear", null), (0, i.gn)([m.aD], k.prototype, "AddMember", null), (0, i.gn)([m.aD], k.prototype, "RemoveMember", null), (0, i.gn)([m.Fl], k.prototype, "member_list", null), (0, i.gn)([m.Fl], k.prototype, "member_list_unsorted", null); }, 23346: (e, t, n) => { "use strict"; n.d(t, { Yp: () => W, Xp: () => U, ji: () => X, Ev: () => P }); var i = n(85556), o = n(19953), r = n(1736), a = n(70215), s = n(23282), l = n(66035), c = n(88991), m = n(22103); class d extends a.Pv { UpdateFromMessage(e, t) { if ((0 != (1 & e) && ((this.m_bStatusInitialized = !0), (this.m_ePersonaState = t.persona_state() || 0), 0 != this.m_ePersonaState ? ((this.m_unGamePlayedAppID = t.game_played_app_id() || 0), (this.m_gameid = t.gameid() || "0"), (this.m_strGameExtraInfo = t.game_name() || ""), (this.m_unGameServerIP = t.game_server_ip() || 0), (this.m_unGameServerPort = t.game_server_port() || 0), (this.m_game_lobby_id = t.game_lobby_id() || "")) : this.Reset()), 0 != (2 & e))) { this.m_bNameInitialized = !0; let e = t.player_name() || ""; this.m_strPlayerName = e; } if ((0 != (64 & e) && (this.m_rtLastSeenOnline = t.last_seen_online() || t.last_logoff() || 0), 0 != (16 & e))) { let e = t.avatar_hash(), n = !0; if (e) { for (let t = 0; t < e.length && n; t++) n = !e[t]; this.m_strAvatarHash = n ? m.W : (0, s.BH)(e); } } if ((void 0 !== t.persona_state_flags() && (this.m_unPersonaStateFlags = t.persona_state_flags()), 0 != (4096 & e))) { this.m_mapRichPresence.clear(); for (let e of t.rich_presence()) this.m_mapRichPresence.set(e.key().toLowerCase(), e.value()); } if ((0 != (8192 & e) && (this.m_broadcastId = t.broadcast_id()), 0 != (16384 & e))) { let e = c.K.InitFromAccountID(t.watching_broadcast_accountid()).ConvertTo64BitString(); e && l.rr.stream[e] ? ((this.m_broadcastAccountId = t.watching_broadcast_accountid()), (this.m_broadcastAppId = t.watching_broadcast_appid()), (this.m_broadcastViewerCount = t.watching_broadcast_viewers()), (this.m_strBroadcastTitle = t.watching_broadcast_title())) : ((this.m_broadcastAccountId = 0), (this.m_broadcastAppId = 0), (this.m_broadcastViewerCount = 0), (this.m_strBroadcastTitle = "")); } (this.m_bCommunityBanned = t.is_community_banned()), this.m_bNameInitialized && this.m_bStatusInitialized && (this.m_bInitialized = !0), void 0 !== t.player_name_pending_review() && (this.m_bPlayerNamePending = t.player_name_pending_review()), void 0 !== t.avatar_pending_review() && (this.m_bAvatarPending = t.avatar_pending_review()); } } var h = n(4638), u = n(76262), p = n(85105), _ = n(46186), g = n(22858), C = n(26626), f = n(58594), v = n(98004), S = n(50403), b = n(72746), I = n(79588), y = n(93635); class E { constructor(e, t) { (this.m_bInitialized = !1), (this.m_bGotInitialState = !1), (this.m_eClanRelationship = void 0), (this.m_strClanName = ""), (this.m_strClanTag = ""), (this.m_strAvatarHash = a.WV), (this.m_eClanAccountFlags = 0), (this.m_ulChatRoomGroupID = void 0), (this.m_cMemberCount = 0), (this.m_cUsersOnline = 0), (this.m_cUsersInGame = 0), (this.m_cChatRoomMembers = 0), (this.m_bChatRoomPrivate = void 0), (this.m_bPersonaStateDesired = !1), (this.m_bPersonaStateLoadRequested = !1), (0, I.rC)(this), (this.m_steamid = e), (this.m_eClanRelationship = t); } BNeedsToLoadPersonaStateData() { return !this.m_bInitialized && !this.m_bPersonaStateLoadRequested; } BPersonaStateDesired() { return this.m_bPersonaStateDesired; } SetPersonaStateDesired() { this.m_bPersonaStateDesired = !0; } SetPersonaStateLoadRequested() { this.m_bPersonaStateLoadRequested = !0; } get name() { return this.m_bInitialized ? this.m_strClanName : ""; } get steamid() { return this.m_steamid; } get clanid() { return this.m_steamid.GetAccountID(); } get member_count() { return this.m_cMemberCount; } get users_online() { return this.m_cUsersOnline; } get users_ingame() { return this.m_cUsersInGame; } get count_chat_room_members() { return this.m_cChatRoomMembers; } get chat_room_private() { return this.m_bChatRoomPrivate; } BIsMember() { return 3 == this.m_eClanRelationship; } BIsInvite() { return 2 == this.m_eClanRelationship; } SetRelationship(e) { this.m_eClanRelationship = e; } BIsOGG() { return !!this.m_unOGGAppID || (this.m_bGotInitialState && 0 != (16 & this.m_eClanAccountFlags)); } GetOGGAppID() { return this.m_unOGGAppID; } BMatchesSearchString(e) { return -1 !== this.m_strClanName.toLocaleLowerCase().indexOf(e); } get avatar_url() { return (0, a.U0)(this.m_strAvatarHash); } get avatar_url_medium() { return this.BIsOGG() ? this.avatar_url : (0, a.U0)(this.m_strAvatarHash, "medium"); } get avatar_url_full() { return this.BIsOGG() ? this.avatar_url : (0, a.U0)(this.m_strAvatarHash, "full"); } OpenChatDialog(e, t = !0) { return this.GetChatRoomGroupID().then((n) => (b.Ul.ChatStore.JoinAndShowChatRoomGroup(e, n, t), n)); } ReadPersonaStateUpdate(e, t) { if (((this.m_bInitialized = !0), 0 != (2 & e) && (this.m_strClanName = t.player_name()), 0 != (1024 & e) && ((this.m_strClanTag = t.clan_tag()), t.clan_data().chat_group_id() && (this.m_ulChatRoomGroupID = t.clan_data().chat_group_id()), t.clan_data().ogg_app_id() && (this.m_unOGGAppID = t.clan_data().ogg_app_id())), 0 != (16 & e))) { let e = t.avatar_hash(), n = !0; if (e) { for (let t = 0; t < e.length && n; t++) n = !e[t]; this.m_strAvatarHash = n ? a.WV : (0, s.BH)(e); } } } ReadStateUpdate(e) { if (((this.m_bGotInitialState = !0), (this.m_eClanAccountFlags = e.clan_account_flags()), (this.m_bChatRoomPrivate = e.chat_room_private()), void 0 !== e.user_counts() && e.user_counts().members())) { let t = e.user_counts(); (this.m_cMemberCount = t.members()), (this.m_cUsersOnline = t.online()), (this.m_cUsersInGame = t.in_game()), (this.m_cChatRoomMembers = t.chat_room_members()); } } GetChatGroupIDIfLoaded() { return this.m_ulChatRoomGroupID; } GetChatRoomGroupID() { if (this.m_ulChatRoomGroupID) return Promise.resolve(this.m_ulChatRoomGroupID); { let e = r.gA.Init(h.w4); return e.Body().set_steamid(this.steamid.ConvertTo64BitString()), e.Body().set_autocreate(!0), h.s6.GetClanChatRoomInfo(b.Ul.CMInterface.GetServiceTransport(), e).then((e) => (1 == e.GetEResult() && e.Body().chat_group_summary().chat_group_id() ? ((this.m_ulChatRoomGroupID = e.Body().chat_group_summary().chat_group_id()), this.m_ulChatRoomGroupID) : null)); } } SetChatGroupID(e) { this.m_ulChatRoomGroupID = e; } } (0, i.gn)([I.LO], E.prototype, "m_bInitialized", void 0), (0, i.gn)([I.LO], E.prototype, "m_bGotInitialState", void 0), (0, i.gn)([I.LO], E.prototype, "m_eClanRelationship", void 0), (0, i.gn)([I.LO], E.prototype, "m_strAvatarHash", void 0), (0, i.gn)([I.LO], E.prototype, "m_ulChatRoomGroupID", void 0), (0, i.gn)([I.LO], E.prototype, "m_cMemberCount", void 0), (0, i.gn)([I.LO], E.prototype, "m_cUsersOnline", void 0), (0, i.gn)([I.LO], E.prototype, "m_cUsersInGame", void 0), (0, i.gn)([I.LO], E.prototype, "m_cChatRoomMembers", void 0), (0, i.gn)([I.LO], E.prototype, "m_bChatRoomPrivate", void 0), (0, i.gn)([I.Fl], E.prototype, "avatar_url", null), (0, i.gn)([I.Fl], E.prototype, "avatar_url_medium", null), (0, i.gn)([I.Fl], E.prototype, "avatar_url_full", null); class D { constructor(e) { (this.m_mapClans = I.LO.map()), (0, I.rC)(this), (this.m_FriendStore = e); } Init(e) { (this.m_CMInterface = e), this.m_CMInterface.AddOnLogonCallback(this.OnLogOn.bind(this)), this.m_CMInterface.messageHandlers.RegisterEMessageAction(822, p.m$, (e) => { let t = new c.K(e.Body().steamid_clan()); this.GetOrCreateClan(t).ReadStateUpdate(e.Body()); }); } OnLogOn() {} get clan_invite_count() { let e = 0; return ( this.m_mapClans.forEach((t) => { t.BIsInvite() && e++; }), e ); } get clan_invites() { let e = []; return ( this.m_mapClans.forEach((t) => { t.m_bInitialized && t.BIsInvite() && e.push(t); }), e.sort((e, t) => e.name.localeCompare(t.name)), e ); } GetClan(e) { let t; e instanceof c.K ? ((0, y.X)(e.BIsClanAccount(), "expected clan steamid in GetClan()"), (t = e.GetAccountID())) : (t = e); const n = this.m_mapClans.get(t); return n && this.LoadClanPersonaIfNeeded(n), n; } JoinClanChatRoom(e, t) { let n = this.GetOrCreateClan(t); n.OpenChatDialog(e, !0), this.LoadClanPersonaIfNeeded(n); } ClearClanMembershipData() { this.m_mapClans.forEach((e) => { e.SetRelationship(0); }); } SetClanChatGroupID(e, t) { this.GetOrCreateClan(e).SetChatGroupID(t); } LoadClanPersonaIfNeeded(e) { e.SetPersonaStateDesired(), e.BNeedsToLoadPersonaStateData() && this.ScheduleLoadMissingClanPersonas(); } GetOrCreateClan(e, t) { let n; n = e instanceof c.K ? e : c.K.InitFromClanID(e); let i = this.m_mapClans.get(n.GetAccountID()); return i ? void 0 !== t && i.SetRelationship(t) : ((i = new E(n, t || 0)), this.m_mapClans.set(n.GetAccountID(), i)), i; } OnClanRelationshipChanged(e, t) { this.GetOrCreateClan(e, t); } RespondToClanInvite(e, t) { let n = r.gA.Init(S.NA); return n.Body().set_steamid(e.ConvertTo64BitString()), n.Body().set_accept(t), S.Zh.RespondToClanInvite(this.m_CMInterface.GetServiceTransport(), n).then((e) => 1 == e.GetEResult()); } EnsureInitialStateForClanInvites() { let e = r.gA.Init(v.$Z, 5554); this.clan_invites.forEach((t) => { t.m_bGotInitialState || e.Body().add_steamid_clans(t.steamid.ConvertTo64BitString()); }), e.Body().steamid_clans().length <= 0 || this.m_CMInterface.Send(e); } ScheduleLoadMissingClanPersonas() { this.m_iIntervalLoadClanData || (this.m_iIntervalLoadClanData = SetBackgroundTimeout(this.LoadMissingClanPersonas.bind(this), 100)); } LoadMissingClanPersonas() { this.m_iIntervalLoadClanData && (ClearBackgroundTimeout(this.m_iIntervalLoadClanData), (this.m_iIntervalLoadClanData = void 0)); let e = r.gA.Init(u.KW, 815); e.Body().set_persona_state_requested(1042), this.m_mapClans.forEach((t) => { t.BPersonaStateDesired() && t.BNeedsToLoadPersonaStateData() && (e.Body().add_friends(t.steamid.ConvertTo64BitString()), t.SetPersonaStateLoadRequested()); }), e.Body().friends().length && this.m_CMInterface.Send(e); } OnClanPersonaStateUpdate(e, t) { let n = new c.K(t.friendid()); this.GetOrCreateClan(n).ReadPersonaStateUpdate(e, t); } } (0, i.gn)([I.Fl], D.prototype, "clan_invite_count", null), (0, i.gn)([I.Fl], D.prototype, "clan_invites", null); var w = n(10167), R = n(32572), A = n(78654), M = n(22394), k = n(97063), T = n(84290), L = n(2049), G = n(14206), O = n.n(G), F = n(52705); class B { constructor(e, t, n) { (this.m_numStartingTokens = 0), (this.m_numTokensPerMillisecond = 0), (this.m_numIntervalsPerMillisecond = 0), (this.m_TimeLastChecked = 0), (this.m_flTokens = 0), (this.m_numIntervalsPerMillisecond = 0.001 / Math.max(1, n)), (this.m_numStartingTokens = e), (this.m_numTokensPerMillisecond = Math.max(0, t) * this.m_numIntervalsPerMillisecond), this.Reset(); } Reset() { (this.m_TimeLastChecked = performance.now()), (this.m_flTokens = this.m_numStartingTokens); } AddTokens() { let e = performance.now(), t = (e - this.m_TimeLastChecked) * this.m_numTokensPerMillisecond; (this.m_flTokens = Math.min(this.m_flTokens + t, this.m_numStartingTokens)), (this.m_TimeLastChecked = e); } BRemoveToken() { return this.AddTokens(), !(this.m_flTokens < 1) && ((this.m_flTokens -= 1), !0); } } var x = n(57476), N = n(38060); class P { constructor() { (this.Notifications_ShowInGame = 0), (this.Notifications_ShowOnline = 0), (this.Notifications_ShowMessage = 0), (this.Notifications_SendMobile = 0), (this.Sounds_PlayInGame = 0), (this.Sounds_PlayOnline = 0), (this.Sounds_PlayMessage = 0); } } class U { constructor(e, t = null, n = null) { (this.m_persona = void 0), (this.m_eFriendRelationship = 0), (this.m_bPersonaStateLoadRequested = !1), (this.m_bPersonaNameHistoryLoaded = void 0), (this.m_rgPersonaNameHistory = []), (this.m_strPlayerNicknameNormalized = void 0), (this.m_strNickname = void 0), (this.m_NotificationSettings = void 0), (this.m_bLoadedEquippedProfileItems = !1), (this.m_bRequestedEquippedProfileItems = !1), (this.m_equippedProfileItems = {}), (this.m_nAppIDLastSeenPlaying = 0), (0, I.rC)(this), (this.m_unAccountID = e), (this.m_persona = new d(c.K.InitFromAccountID(e))), 0 == e && ((0, y.X)(!1, "unset accountid"), (this.m_persona.m_bInitialized = !0)), t && this.m_persona.UpdateFromMessage(n, t); } LoadIfNecessary() { this.m_persona.m_bInitialized || this.m_bPersonaStateLoadRequested || ((this.m_bPersonaStateLoadRequested = !0), b.Ul.FriendStore.QueueFriendPersonaStateLoad(this)); } ClearStateOnDisconnect() { this.m_persona.m_bInitialized && this.m_persona.ClearStateOnDisconnect(); } get is_ready() { return !!this.m_persona.m_bNameInitialized && (Object.defineProperty(this, "is_ready", { value: !0 }), !0); } get persona() { return this.LoadIfNecessary(), Object.defineProperty(this, "persona", { value: this.m_persona }), this.m_persona; } get mutable_persona() { return this.m_persona; } get accountid() { return this.m_unAccountID; } get steamid() { return this.m_persona.m_steamid; } get steamid64() { return this.m_persona.m_steamid.ConvertTo64BitString(); } get efriendrelationship() { return this.m_eFriendRelationship; } set efriendrelationship(e) { this.m_eFriendRelationship = e; } get is_friend() { return (0, A.my)(this.m_eFriendRelationship); } get is_blocked() { return (0, A.fk)(this.m_eFriendRelationship); } GetCommunityProfileURL() { return o.De.COMMUNITY_BASE_URL + "profiles/" + this.steamid64 + "/"; } get has_nickname() { return !!this.m_strNickname; } get nickname() { return this.m_strNickname; } set nickname(e) { (this.m_strNickname = e), (this.m_strPlayerNicknameNormalized = e ? U.NormalizeNameForSearch(e) : ""); } get notification_settings() { return this.m_NotificationSettings || (this.m_NotificationSettings = new P()), this.m_NotificationSettings; } set notification_settings(e) { this.m_NotificationSettings = e; } BShowInGameNotification() { return !!b.Ul.IsGamepadUIActive() || 1 == this.notification_settings.Notifications_ShowInGame || (b.Ul.SettingsStore.FriendsSettings.bNotifications_ShowIngame && 2 != this.notification_settings.Notifications_ShowInGame); } BShowMessageNotification() { return o.De.IN_MOBILE ? 1 === this.notification_settings.Notifications_SendMobile || (b.Ul.BShowDirectChatNotification() && 2 !== this.notification_settings.Notifications_SendMobile) : !!b.Ul.IsGamepadUIActive() || 1 === this.notification_settings.Notifications_ShowMessage || (b.Ul.BShowDirectChatNotification() && 2 !== this.notification_settings.Notifications_ShowMessage); } BShowOnlineNotification() { return !!b.Ul.IsGamepadUIActive() || 1 == this.notification_settings.Notifications_ShowOnline || (b.Ul.SettingsStore.FriendsSettings.bNotifications_ShowOnline && 2 != this.notification_settings.Notifications_ShowOnline); } BPlayInGameSound() { return !b.Ul.IsGamepadUIActive() && (1 == this.notification_settings.Sounds_PlayInGame || (b.Ul.SettingsStore.FriendsSettings.bSounds_PlayIngame && 2 != this.notification_settings.Sounds_PlayInGame)); } BPlayMessageSound() { return !b.Ul.IsGamepadUIActive() && (1 == this.notification_settings.Sounds_PlayMessage || (b.Ul.SettingsStore.FriendsSettings.bSounds_PlayMessage && 2 != this.notification_settings.Sounds_PlayMessage)); } BPlayOnlineSound() { return !b.Ul.IsGamepadUIActive() && (1 == this.notification_settings.Sounds_PlayOnline || (b.Ul.SettingsStore.FriendsSettings.bSounds_PlayOnline && 2 != this.notification_settings.Sounds_PlayOnline)); } get display_name() { if (this.has_nickname) { let e = this.primary_display_name; return this.showing_secondary_display_name && (e += " (" + this.secondary_display_name + ")"), e; } return this.persona.m_strPlayerName; } get primary_display_name() { if (this.has_nickname) { if (!b.Ul.SettingsStore.CommunityPreferences.bParenthesizeNicknames) return this.nickname; } return this.persona.m_strPlayerName; } get has_secondary_display_name() { return this.has_nickname; } get showing_secondary_display_name() { return !!b.Ul.SettingsStore.CommunityPreferences.bParenthesizeNicknames && this.has_secondary_display_name; } get secondary_display_name() { return b.Ul.SettingsStore.CommunityPreferences.bParenthesizeNicknames && this.has_nickname ? this.nickname : this.persona.m_strPlayerName; } get is_display_name_nickname() { return this.has_nickname && !b.Ul.SettingsStore.CommunityPreferences.bParenthesizeNicknames; } static NormalizeNameForSearch(e) { return e.toLocaleLowerCase(); } get player_name_normalized() { if (void 0 === this.m_strPlayerNameNormalized) { if (!this.is_ready) return ""; let e = () => { this.m_strPlayerNameNormalized = U.NormalizeNameForSearch(this.m_persona.m_strPlayerName); }; (0, I.EH)(e), void 0 === this.m_strPlayerNameNormalized && e(); } return this.m_strPlayerNameNormalized; } get current_game_name() { return this.m_persona.GetCurrentGameName(); } get current_game_icon_url() { return this.m_persona.GetCurrentGameIconURL(); } is_appinfo_ready() { return this.m_persona.BIsAppInfoReady(); } get current_game_rich_presence() { return this.m_persona.GetCurrentGameRichPresence(); } get game_name_normalized() { if (void 0 === this.m_strGameNameNormalized) { if (!this.is_ready) return ""; let e = () => { this.m_strGameNameNormalized = U.NormalizeNameForSearch(this.current_game_name); }; (0, I.EH)(e), void 0 === this.m_strGameNameNormalized && e(); } return this.m_strGameNameNormalized; } MatchSearchString(e) { let t = this.player_name_normalized.indexOf(e); return -1 !== t ? { match: 1, iOffset: t, bFullMatch: 0 === t && this.player_name_normalized.length === e.length } : this.has_nickname && ((t = this.m_strPlayerNicknameNormalized.indexOf(e)), -1 !== t) ? { match: 2, iOffset: t, bFullMatch: 0 === t && this.m_strPlayerNicknameNormalized.length === e.length } : { match: 0 }; } BMatchesSearchString(e, t) { if (-1 !== this.player_name_normalized.indexOf(e)) return !0; if (this.has_nickname) { if (-1 !== this.m_strPlayerNicknameNormalized.indexOf(e)) return !0; } else if (t && this.m_persona.is_ingame && -1 !== this.game_name_normalized.indexOf(e)) return !0; return !1; } get persona_name_history() { if (void 0 === this.m_bPersonaNameHistoryLoaded) { let e = r.gA.Init(p.x0, 5570); e.Body().add_Ids().set_steamid(this.steamid64), e.Body().set_id_count(1), b.Ul.CMInterface.SendMsgAndAwaitResponse(e, p.Km).then((e) => { if (((0, y.X)(1 == e.Body().responses().length, "Got an invalid number of responses to CMsgClientAMGetPersonaNameHistory"), 1 != e.Body().responses().length)) return; let t = e.Body().responses()[0]; (0, y.X)(t.steamid() == this.steamid64, "Got a response for the wrong user from CMsgClientAMGetPersonaNameHistory"), t.steamid() == this.steamid64 && ((0, y.X)(0 == this.m_rgPersonaNameHistory.length, "Got persona name history response for same user twice."), (0, I.z)(() => { for (let e of t.names()) this.m_rgPersonaNameHistory.push(e.name()); this.m_bPersonaNameHistoryLoaded = !0; })); }), (this.m_bPersonaNameHistoryLoaded = !1); } return this.m_rgPersonaNameHistory; } get persona_name_history_loaded() { return !0 === this.m_bPersonaNameHistoryLoaded; } OpenChatDialog(e) { return this.is_blocked ? (o.De.IN_MOBILE ? b.Ul.ShowAlert((0, T.Xx)("#Friend_Chat_OpenError_Blocked"), (0, T.Xx)("#Friend_Chat_OpenError_BlockedBody")) : b.Ul.OpenURLInBrowser(this.GetCommunityProfileURL(), e), null) : b.Ul.ShowFriendChatDialog(e, this.m_unAccountID, !0); } static get FriendSortStatusComparator() { let e = b.Ul.SettingsStore.BForceAlphabeticFriendSorting(); return U.FriendSortStatusComparatorInternal.bind(null, e); } static FriendSortStatusComparatorInternal(e, t, n) { let i = t.persona, o = n.persona; return a.Pv.SortStatusComparator(!e, i, o); } static get DefaultFriendSortComparator() { let e = b.Ul.SettingsStore.BForceAlphabeticFriendSorting(); return (t, n) => { let i = U.FriendSortStatusComparatorInternal(e, t, n); return 0 != i ? i : t.display_name.localeCompare(n.display_name); }; } static FriendSortByLastSeenComparator(e, t) { let n = e.persona, i = t.persona; if (!n.is_online && !i.is_online) { let e = b.Ul.GetServerRTime32() - n.last_seen_online, t = b.Ul.GetServerRTime32() - i.last_seen_online; if (e > t) return 1; if (t > e) return -1; } return e.display_name.localeCompare(t.display_name); } static FriendSortByFriendOrNotComparator(e, t) { return (e.is_friend && !t.is_friend) || (!e.is_friend && t.is_friend) ? (e.is_friend ? -1 : 1) : e.display_name.localeCompare(t.display_name); } get localized_online_status() { return this.persona.GetLocalizedOnlineStatus(); } GetBroadcastDescription() { if (this.persona.m_strBroadcastTitle) return this.persona.m_strBroadcastTitle; if (this.persona.m_broadcastAccountId) { let e = b.Ul.FriendStore.GetPlayer(this.persona.m_broadcastAccountId), t = this.persona.m_broadcastAppId ? b.Ul.AppInfoStore.GetAppInfo(this.persona.m_broadcastAppId) : null; return t && t.is_valid ? (0, T.Xx)("#PersonaStateWatchingBroadcast_PlayerGame", e.display_name, t.name) : (0, T.Xx)("#PersonaStateWatchingBroadcast_Player", e.display_name); } return null; } LoadEquippedProfileItems(e = !1) { return (0, i.mG)(this, void 0, void 0, function* () { if (!b.Ul.CMInterface.logged_on || (this.m_bRequestedEquippedProfileItems && !e)) return; this.m_bRequestedEquippedProfileItems = !0; let t = r.gA.Init(f.cy); t.Body().set_steamid(this.m_persona.m_steamid.ConvertTo64BitString()); let n = yield f.lk.GetProfileItemsEquipped(b.Ul.CMInterface.GetServiceTransport(), t).catch((e) => console.log("Couldn't get friend equipped items, ", e)); n && 1 == n.GetEResult() ? ((this.m_bLoadedEquippedProfileItems = !0), (this.m_equippedProfileItems = n.Body().toObject()), this.m_persona.is_golden && this.m_equippedProfileItems.profile_modifier && this.m_equippedProfileItems.profile_modifier.appid && ((this.m_equippedProfileItems.avatar_frame.image_small && 0 != this.m_equippedProfileItems.avatar_frame.image_small.length) || this.LoadAndSetGoldenProfileFrame())) : ((this.m_bLoadedEquippedProfileItems = !1), (this.m_bRequestedEquippedProfileItems = !1)); }); } LoadAndSetGoldenProfileFrame() { return (0, i.mG)(this, void 0, void 0, function* () { try { const e = { appid: this.m_equippedProfileItems.profile_modifier.appid, origin: self.origin }; yield O() .get(`${o.De.CHAT_BASE_URL}actions/ajaxgetgoldenprofiledata/`, { params: e }) .then((e) => { const t = e.data; (this.m_equippedProfileItems.avatar_frame.image_small = t.frame), (this.m_equippedProfileItems.avatar_frame.image_large = t.frame); }); } catch (e) { let t = (0, F.l)(e); console.error(`Error when calling ajaxgetgoldenprofiledata: ${t}`); } }); } BLoadedEquippedItems() { return this.m_bLoadedEquippedProfileItems; } GetEquippedProfileItems() { return (0, y.X)(this.BLoadedEquippedItems(), "Called GetEquippedProfileItems without loading"), this.m_equippedProfileItems; } SetLastSeenPlaying(e) { (this.m_nAppIDLastSeenPlaying = e), (this.m_dtLastSeenPlaying = new Date()); } BWasRecentlyPlayingAppID(e, t = 15) { return this.m_nAppIDLastSeenPlaying == e && new Date().getTime() - this.m_dtLastSeenPlaying.getTime() < 1e3 * t; } get miniProfileData() { return this.m_miniProfileDataLoader || (this.m_miniProfileDataLoader = new N.s(this.m_unAccountID)), this.m_miniProfileDataLoader; } } (0, i.gn)([I.LO], U.prototype, "m_persona", void 0), (0, i.gn)([I.LO], U.prototype, "m_eFriendRelationship", void 0), (0, i.gn)([I.LO], U.prototype, "m_bPersonaNameHistoryLoaded", void 0), (0, i.gn)([I.LO], U.prototype, "m_rgPersonaNameHistory", void 0), (0, i.gn)([I.LO], U.prototype, "m_strPlayerNicknameNormalized", void 0), (0, i.gn)([I.LO], U.prototype, "m_strNickname", void 0), (0, i.gn)([I.LO], U.prototype, "m_NotificationSettings", void 0), (0, i.gn)([I.LO], U.prototype, "m_bLoadedEquippedProfileItems", void 0), (0, i.gn)([I.LO], U.prototype, "m_bRequestedEquippedProfileItems", void 0), (0, i.gn)([I.LO], U.prototype, "m_equippedProfileItems", void 0), (0, i.gn)([I.Fl], U.prototype, "display_name", null), (0, i.gn)([I.Fl], U.prototype, "secondary_display_name", null), (0, i.gn)([I.Fl], U.prototype, "current_game_name", null), (0, i.gn)([I.Fl], U.prototype, "current_game_icon_url", null), (0, i.gn)([I.Fl], U.prototype, "current_game_rich_presence", null), (0, i.gn)([I.Fl], U.prototype, "persona_name_history", null), (0, i.gn)([I.Fl], U.prototype, "persona_name_history_loaded", null), (0, i.gn)([I.Fl], U.prototype, "localized_online_status", null); const V = "FriendStoreLocalPrefs"; class H { constructor() { (this.m_currentMsg = null), (this.m_mapLastSeenApp = new Map()), (0, I.rC)(this); } Init(e) { (this.m_CMInterface = e), o.De.IN_MOBILE || SetBackgroundInterval(this.NotifyImpressions, 12e4); } RecordFriendInGameImpression(e) { if (o.De.IN_MOBILE) return; if (e == A.p6 || (e >= A.RI && e <= A.pv)) return; this.m_currentMsg || (this.m_currentMsg = r.gA.Init(g.XX)); let t = !0; if (this.m_mapLastSeenApp.has(e)) { let n = this.m_mapLastSeenApp.get(e); t = Date.now() - n > 864e5; } let n = null; if (t) this.m_mapLastSeenApp.set(e, Date.now()), (n = this.m_currentMsg.Body().add_impressions()), n.set_appid(e), n.set_type(2), n.set_num_impressions(0); else { for (let t = 0; t < this.m_currentMsg.Body().impressions().length; ++t) { let i = this.m_currentMsg.Body().impressions()[t]; if (i.appid() == e && 1 == i.type()) { n = i; break; } } n || ((n = this.m_currentMsg.Body().add_impressions()), n.set_appid(e), n.set_type(1), n.set_num_impressions(0)); } n.set_num_impressions(n.num_impressions() + 1); } NotifyImpressions() { if (this.m_currentMsg) { let e = this.m_currentMsg; (this.m_currentMsg = null), g.KZ.ReportProductImpressionsFromClient(this.m_CMInterface.GetServiceTransport(), e); } } } (0, i.gn)([I.aD.bound], H.prototype, "NotifyImpressions", null); class W { constructor() { (this.m_FriendGroupStore = new w.jY(this)), (this.m_ClanStore = new D(this)), (this.m_FavoritesStore = new R.C(this)), (this.m_self = void 0), (this.m_mapPlayerCache = new Map()), (this.m_setFriendsNeedingPersonaStateLoad = new Set()), (this.m_iIntervalSubscribeToPersonaStateUpdates = 0), (this.m_setFriendAccountIDs = new Set()), (this.m_setIncomingInviteAccountIDs = new Set()), (this.m_bUserSetPersonaState = !1), (this.m_eUserPersonaState = 0), (this.m_bIsClientIdle = !1), (this.m_FriendStorePrefs = { ePersonaState: 1, strNonFriendsAllowedToMsg: "" }), (this.m_cFriendPersonaStatesInitialized = 0), (this.m_bReadyToRender = !1), (this.m_bPerFriendPreferencesLoaded = !1), (this.m_bReceivedFriendsList = !1), (this.m_bInitialPersonaStatesLoaded = !1), (this.m_InitialAppInfoPromises = []), (this.m_bInitialAppInfoLoaded = !1), (this.m_bParentalLocked = void 0), (this.m_eUserPersonaStateParental = 1), (this.m_rgPersonaStateChangeCallbacks = new M.pB()), (this.m_rgPlayerGameChangedCallbacks = new M.pB()), (this.m_nMissingPersonaStateRetryCount = 0), (this.m_nMissingPersonaStateMaxRetries = 5), (this.m_FriendInGameNotificationStore = new H()), (this.m_TokenBucketChangeStatus = new B(200, 1, 10)), (this.m_vecLastTenChangeStatusReasons = []), (this.m_TokenFailureAssertCount = 30), (this.m_cLastUnreadPriorityMessageCountPosted = void 0), (this.m_bSnoozeCallbackFired = !0), (this.m_bAwayCallbackFired = !0), (this.m_bReconnectedSinceLastIdleUpdate = !0), (this.m_bNextActivityCallbackRegistered = !1), (0, I.rC)(this); } Init(e) { (this.m_CMInterface = e), this.m_FriendGroupStore.Init(e), this.m_ClanStore.Init(e), this.m_FavoritesStore.Init(e), this.m_FriendInGameNotificationStore.Init(e); let t = !1; return ( this.m_CMInterface.AddOnLogonCallback(() => (0, i.mG)(this, void 0, void 0, function* () { if (t) this.SendPersonaStateToServer(!0, "MoreLogonCallback"); else { (t = !0), (this.m_self = this.AddPlayerToCache(this.m_CMInterface.steamid.GetAccountID(), 1)); let e = !0; (0, x.U5)("WebChat.GetSignIntoFriendsOnStart") && (e = yield SteamClient.WebChat.GetSignIntoFriendsOnStart()), b.Ul.SettingsStore.GetObjectFromLocalStorage(V, this.m_FriendStorePrefs).then((t) => { (this.m_FriendStorePrefs = t), e && ((this.m_eUserPersonaState = t.ePersonaState), (this.m_bUserSetPersonaState = !1), this.SendPersonaStateToServer(!0, "LogonCallback")); }), this.m_bReadyToRender || SetBackgroundTimeout(this.ForceReadyToRender.bind(this), 1e3); } this.GetFriendsList(), this.SetReconnectedSinceLastIdleUpdate(); }), ), this.m_CMInterface.AddOnDisconnectCallback(() => { this.SetPersonasOffline(!0); }, 102), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(f.jj.NotifyPerFriendPreferencesChangedHandler, (e) => { let t = this.GetPlayer(e.Body().accountid()); if (t) { let n = e.Body().preferences(); t.nickname = n.nickname() || void 0; let i = new P(); this.FillPerFriendNotificationSettingsFromMessage(i, n), (t.notification_settings = i); } return 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(f.jj.NotifyFriendEquippedProfileItemsChangedHandler, (e) => { let t = this.GetPlayer(e.Body().accountid()); return t && t.BLoadedEquippedItems() && t.LoadEquippedProfileItems(!0), 1; }), this.m_CMInterface.messageHandlers.RegisterEMessageAction(767, u.Qu, (e) => { e.Body().bincremental() && this.SetFriendsList(e.Body()); }), this.m_CMInterface.messageHandlers.RegisterEMessageAction(766, u.$K, (e) => { let t = e.Body().status_flags(), n = new Set(), i = new Set(); for (let o of e.Body().friends()) { let e = new c.K(o.friendid()); if (e.BIsClanAccount()) { this.m_ClanStore.OnClanPersonaStateUpdate(t, o); continue; } if (!e.BIsIndividualAccount()) continue; let r = this.GetPlayerIfCached(e.GetAccountID()); r || (r = this.GetPlayer(e.GetAccountID())); let a = r.mutable_persona, s = a.m_ePersonaState, m = a.m_strPlayerName, d = a.m_unGamePlayedAppID, h = a.m_strGameExtraInfo, u = a.is_in_nonsteam_game, p = a.m_broadcastAppId, _ = a.m_bInitialized; a.UpdateFromMessage(t, o), !_ && a.m_bInitialized && this.m_setFriendAccountIDs.has(r.accountid) && this.m_cFriendPersonaStatesInitialized++; let g = 0 != (1 & t); if (e.GetAccountID() == this.self.accountid && g) { let e = !!o.persona_set_by_user(), t = a.m_ePersonaState; this.UpdateUserPersonaStateInternal(t, e, this.m_bIsClientIdle, !0, "RecvFromSrv"), 1 == t && this.m_bReconnectedSinceLastIdleUpdate && ((this.m_bReconnectedSinceLastIdleUpdate = !1), (t = this.AdjustPersonaStateForIdleTime(t)), 1 != t && this.UpdateUserPersonaStateInternal(t, !1, this.m_bIsClientIdle, !1, "AdjustForIdle")); } let C = !1, f = a.m_unGamePlayedAppID, v = a.m_broadcastAppId; l.rr.bValid && p && p != l.rr.appID && (p = void 0), l.rr.bValid && v && v != l.rr.appID && (v = void 0); let S = !1; if (f || d || u || a.is_in_nonsteam_game || v || p) { if (((C = d != f), f && n.add(f), v && n.add(v), a.GetAccountID() != this.m_self.accountid)) { let t = d, n = f; 0 == a.m_ePersonaState && (n = 0), u && (t = w.v5), a.is_in_nonsteam_game && (n = w.v5), !t && p && (t = p), !n && v && (n = v), r.is_friend && this.m_FriendGroupStore.OnFriendGameChanged(e.GetAccountID(), t, n), this.m_rgPlayerGameChangedCallbacks.Dispatch(e.GetAccountID(), t, n), (S = !0); } } else a.m_strGameExtraInfo && (C = h != a.m_strGameExtraInfo); (4096 & t || C) && f && a.HasCurrentGameRichPresence() && i.add(f), _ && r.is_friend && r.accountid != this.m_self.accountid && (s != a.m_ePersonaState || C) && (r.BPlayInGameSound() && C && r.persona.is_ingame ? this.PlayJoinGameSound() : r.BPlayOnlineSound() && s != a.m_ePersonaState && 1 == a.m_ePersonaState && this.PlayFriendOnlineSound(), d && !r.persona.is_ingame && r.SetLastSeenPlaying(d), this.OnFriendPersonaStateChanged(r, s, a.m_ePersonaState, C, f && r.BWasRecentlyPlayingAppID(f))), S || (a.m_ePersonaState == s && !C && a.m_strPlayerName == m) || this.m_rgPersonaStateChangeCallbacks.Dispatch(r); } const o = b.Ul.AppInfoStore.EnsureAppInfoForAppIDs(n); this.m_bInitialPersonaStatesLoaded || this.m_InitialAppInfoPromises.push(o), !this.m_bInitialPersonaStatesLoaded && i.size && (console.log("Preloading Game Rich Presence for AppIDs:", Array.from(i)), i.forEach((e) => b.Ul.AppInfoStore.GetRichPresenceLoc(e))); }), (0, I.EH)(() => { let e = b.Ul.ParentalStore.BIsFriendsBlocked() || b.Ul.SettingsStore.IsSteamInTournamentMode(); this.OnParentalLockChanged(e); }), this.InitializeIdleTracking(), this.m_bReadyToRender ? Promise.resolve() : new Promise((e, t) => { this.m_fnOnReadyToRender = e; }) ); } UpdateUnreadMessagesGlobal() { if (void 0 !== window.SteamClient && null != window.SteamClient.WebChat && null != window.SteamClient.WebChat.SetNumChatsWithUnreadPriorityMessages) { let e = b.Ul.ChatStore.GetChatsWithUnreadPriorityMessages().length; this.m_cLastUnreadPriorityMessageCountPosted !== e && (window.SteamClient.WebChat.SetNumChatsWithUnreadPriorityMessages(e), (this.m_cLastUnreadPriorityMessageCountPosted = e)); } } GetFriendsList() { return (0, i.mG)(this, void 0, void 0, function* () { let e = r.gA.Init(C.Fi), t = yield C.qW.GetFriendsList(this.m_CMInterface.GetServiceTransport(), e); if (1 == t.GetEResult()) this.SetFriendsList(t.Body().friendslist()); else { let e = { message: "ShowFriendsErrorRetryDialog" }; window.parent.postMessage(e, "https://steamloopback.host"), (0, y.X)(!1, "GetFriendsList returned", t.GetEResult()); } }); } get not_ready_to_render_reason() { if (this.m_bReadyToRender) return ""; let e = ""; return this.m_bPerFriendPreferencesLoaded || (e += "P"), this.m_bReceivedFriendsList || (e += "F"), this.m_bInitialPersonaStatesLoaded || (e += "I"), this.m_bInitialAppInfoLoaded || (e += "A"), e; } UpdateReadyToRenderState() { this.m_bReadyToRender || (this.m_bReceivedFriendsList && this.m_bInitialPersonaStatesLoaded && this.m_bPerFriendPreferencesLoaded && this.m_bInitialAppInfoLoaded && ((this.m_bReadyToRender = !0), this.m_fnOnReadyToRender && (this.m_fnOnReadyToRender(), (this.m_fnOnReadyToRender = void 0)))); } ForceReadyToRender() { const e = o.De.IN_CLIENT ? console.warn : console.error; this.m_bReceivedFriendsList ? (this.m_bInitialPersonaStatesLoaded || e(`FriendStore.ForceReadyToRender() - Initial Persona States not ready: ${this.m_cFriendPersonaStatesInitialized} received, friends list: ${this.m_setFriendAccountIDs.size} users`), this.m_bInitialAppInfoLoaded || e("FriendStore.ForceReadyToRender() - Initial app info not ready"), this.m_bPerFriendPreferencesLoaded || e("FriendStore.ForceReadyToRender() - Per-friend preferences not ready")) : e("FriendStore Initialization - Still no friends list from server. Waiting."), (this.m_bInitialPersonaStatesLoaded = !0), (this.m_bPerFriendPreferencesLoaded = !0), (this.m_bInitialAppInfoLoaded = !0), this.UpdateReadyToRenderState(); } AddPersonaStateChangedCallback(e) { return this.m_rgPersonaStateChangeCallbacks.Register(e); } AddPlayerGameChangedCallback(e) { return this.m_rgPlayerGameChangedCallbacks.Register(e); } BIsInvisibleMode() { return 7 == this.m_eUserPersonaState; } BIsOfflineMode() { return 0 == this.m_eUserPersonaState; } GetUserDoNotDisturb() { var e; return null === (e = b.Ul.SettingsStore.FriendsSettings) || void 0 === e ? void 0 : e.bDoNotDisturbMode; } SetUserDoNotDisturb(e) { (b.Ul.SettingsStore.FriendsSettings.bDoNotDisturbMode = e), b.Ul.SettingsStore.BUpdateFriendsSettings(b.Ul.SettingsStore.FriendsSettings); } SetUserPersonaState(e, t = !0) { this.UpdateUserPersonaStateInternal(e, t, !1, !1, "SetUserPersonaState"); } EnsureApprovedNonFriendMapReady() { if (void 0 === this.m_mapApprovedNonFriendMessages && ((this.m_mapApprovedNonFriendMessages = I.LO.map()), null != this.m_FriendStorePrefs.strNonFriendsAllowedToMsg && "" != this.m_FriendStorePrefs.strNonFriendsAllowedToMsg)) { let e = new Date().getTime(), t = this.m_FriendStorePrefs.strNonFriendsAllowedToMsg.split(","); for (let n = 0; n < t.length; ++n) { let i = t[n].split("="); if (2 == i.length) { let t = Number(i[0]), n = Number(i[1]); n > e && this.m_mapApprovedNonFriendMessages.set(t, n); } } } } BApprovedNonFriendMessages(e) { this.EnsureApprovedNonFriendMapReady(); let t = new Date(), n = this.m_mapApprovedNonFriendMessages.get(e); return null != n && n > t.getTime(); } SetApprovedNonFriendMessages(e) { this.EnsureApprovedNonFriendMapReady(); let t = new Date().getTime(); this.m_mapApprovedNonFriendMessages.set(e, t + 864e5); let n = ""; this.m_mapApprovedNonFriendMessages.forEach(function (e, i, o) { e > t && (0 != n.length && (n += ","), (n += i.toString() + "=" + e.toString())); }), (this.m_FriendStorePrefs.strNonFriendsAllowedToMsg = n), b.Ul.SettingsStore.StoreObjectInLocalStorage(V, this.m_FriendStorePrefs); } OnParentalLockChanged(e) { !this.m_bParentalLocked && e ? ((this.m_eUserPersonaStateParental = this.m_eUserPersonaState), this.UpdateUserPersonaStateInternal(0, !1, this.m_bIsClientIdle, !1, "ParentalLockChange"), (this.m_bParentalLocked = e)) : this.m_bParentalLocked && !e && ((this.m_bParentalLocked = e), this.UpdateUserPersonaStateInternal(this.m_eUserPersonaStateParental, !1, this.m_bIsClientIdle, !1, "ParentalLockChange")); } UpdateUserPersonaStateInternal(e, t, n, i, o) { if (this.m_bParentalLocked) return; if ((b.Ul.UpdatePersonaState(e), e == this.m_eUserPersonaState && this.m_bUserSetPersonaState == t && this.m_bIsClientIdle == n)) return; if ((0 == e && t && b.Ul.SignOutOfFriends(void 0), 0 == this.m_eUserPersonaState && !t)) return; t || (3 != e && 4 != e) || (n = !0), i && this.m_bIsClientIdle != n && (i = !1); let r = this.m_eUserPersonaState, a = this.m_bUserSetPersonaState, s = this.m_bIsClientIdle; (this.m_eUserPersonaState = e), (this.m_bUserSetPersonaState = t), (this.m_bIsClientIdle = n), i || (this.SendPersonaStateToServer(!1, o) || ((this.m_eUserPersonaState = r), (this.m_bUserSetPersonaState = a), (this.m_bIsClientIdle = s)), 0 === this.m_eUserPersonaState && (this.m_self.mutable_persona.m_ePersonaState = 0)), 0 === r && this.m_eUserPersonaState !== r && b.Ul.Reconnect(), (!t && 1 != this.m_eUserPersonaState) || 0 === this.m_eUserPersonaState || ((this.m_FriendStorePrefs.ePersonaState = e), b.Ul.SettingsStore.StoreObjectInLocalStorage(V, this.m_FriendStorePrefs)); } SendPersonaStateToServer(e, t) { if ((this.m_vecLastTenChangeStatusReasons.push(t), this.m_vecLastTenChangeStatusReasons.length > 10 && (this.m_vecLastTenChangeStatusReasons = this.m_vecLastTenChangeStatusReasons.slice(1)), !this.m_TokenBucketChangeStatus.BRemoveToken())) return this.m_TokenFailureAssertCount > 0 && (--this.m_TokenFailureAssertCount, (0, y.X)(!1, "No ClientChangeStatus tokens, last 10 reasons: " + this.m_vecLastTenChangeStatusReasons.join(","))), !1; let n = r.gA.Init(u.bx, 716); return n.Body().set_persona_state(this.m_eUserPersonaState), n.Body().set_persona_set_by_user(this.m_bUserSetPersonaState), n.Body().set_need_persona_response(e), n.Body().set_is_client_idle(this.m_bIsClientIdle), this.m_CMInterface.Send(n), !0; } AdjustPersonaStateForIdleTime(e) { return (1 == e || 3 == e) && b.Ul.IdleTracker.GetUserIdleTime() >= 7200 ? 4 : 1 == e && b.Ul.IdleTracker.GetUserIdleTime() >= 300 ? 3 : e; } get FriendGroupStore() { return this.m_FriendGroupStore; } get ClanStore() { return this.m_ClanStore; } get FavoritesStore() { return this.m_FavoritesStore; } get all_friends() { return Array.from(this.m_setFriendAccountIDs).map((e) => this.GetFriend(e)); } get online_friends() { return this.all_friends.filter((e) => e.persona.is_online); } get all_friends_accountids() { return this.m_setFriendAccountIDs; } get friends_list_ready() { return this.m_bReceivedFriendsList; } GetFriend(e) { let t = this.m_mapPlayerCache.get(e); if (t) { if (!t.is_friend) return null; } else (0, y.X)(!1, `Friend missing from cache: ${e}`); return t; } GetPlayer(e) { let t = this.m_mapPlayerCache.get(e); return t || (t = this.AddPlayerToCache(e, 3)), t; } AddPlayerToCache(e, t, n = !0) { if (this.m_mapPlayerCache.has(e)) return this.m_mapPlayerCache.get(e); let i = new U(e); return this.m_mapPlayerCache.set(e, i), i; } GetPlayerIfCached(e) { return this.m_mapPlayerCache.get(e); } GetFriendIfCached(e) { let t = this.m_mapPlayerCache.get(e); return t && t.is_friend ? t : null; } SetPersonasOffline(e) { this.m_mapPlayerCache.forEach((t) => { (e && (t.is_friend || t.accountid == this.self.accountid)) || t.ClearStateOnDisconnect(); }); } QueueFriendPersonaStateLoad(e) { this.m_setFriendsNeedingPersonaStateLoad.add(e.accountid), !this.m_iIntervalSubscribeToPersonaStateUpdates && this.m_bInitialPersonaStatesLoaded && (this.m_iIntervalSubscribeToPersonaStateUpdates = SetBackgroundTimeout(this.SubscribeToMissingPersonaStates.bind(this), 50)); } get self() { return this.m_self; } SubscribeToMissingPersonaStates() { this.m_iIntervalSubscribeToPersonaStateUpdates && (ClearBackgroundTimeout(this.m_iIntervalSubscribeToPersonaStateUpdates), (this.m_iIntervalSubscribeToPersonaStateUpdates = 0)); let e = []; if ( (this.m_setFriendsNeedingPersonaStateLoad.forEach((t) => { let n = this.m_mapPlayerCache.get(t); n && !n.persona.m_bNameInitialized && e.push(n.accountid); }), this.m_setFriendsNeedingPersonaStateLoad.clear(), e.length) ) { let t = r.gA.Init(u.KW, 815); t.Body().set_persona_state_requested(1106); for (let n of e) t.Body().add_friends(c.K.InitFromAccountID(n).ConvertTo64BitString()); this.m_CMInterface.Send(t), SetBackgroundTimeout(() => { let t = 0; for (let n of e) { let e = this.GetPlayer(n); e && !e.persona.m_bNameInitialized && ((0, y.X)(e.m_bPersonaStateLoadRequested, "PersonaStateLoadRequested not set"), this.m_setFriendsNeedingPersonaStateLoad.add(n), t++); } t > 0 ? (this.m_nMissingPersonaStateRetryCount < this.m_nMissingPersonaStateMaxRetries ? (this.m_nMissingPersonaStateRetryCount++, this.m_iIntervalSubscribeToPersonaStateUpdates || (this.m_iIntervalSubscribeToPersonaStateUpdates = SetBackgroundTimeout(this.SubscribeToMissingPersonaStates.bind(this), 1e4))) : console.log("Giving up persona state retries with", t, "still not filled", this.m_setFriendsNeedingPersonaStateLoad)) : (this.m_nMissingPersonaStateRetryCount = 0); }, W.k_nMSToWaitForFriendData); } } InitializeIdleTracking() { this.m_bAwayCallbackFired && ((this.m_bAwayCallbackFired = !1), b.Ul.IdleTracker.AddOnIdleCallback(this.OnIdle.bind(this, 3), 300)), this.m_bSnoozeCallbackFired && ((this.m_bSnoozeCallbackFired = !1), b.Ul.IdleTracker.AddOnIdleCallback(this.OnIdle.bind(this, 4), 7200)); } ResetIdleState() { this.m_bReconnectedSinceLastIdleUpdate = !1; let e = this.m_eUserPersonaState; this.m_bUserSetPersonaState || (3 != this.m_eUserPersonaState && 4 != this.m_eUserPersonaState) || (e = 1), this.UpdateUserPersonaStateInternal(e, this.m_bUserSetPersonaState, !1, !1, "ResetIdleState"), (this.m_bNextActivityCallbackRegistered = !1), this.InitializeIdleTracking(); } SetReconnectedSinceLastIdleUpdate() { this.m_bReconnectedSinceLastIdleUpdate = !0; } OnIdle(e) { this.m_bReconnectedSinceLastIdleUpdate = !1; let t = e; 3 == e ? ((this.m_bAwayCallbackFired = !0), 4 == this.m_eUserPersonaState && (t = 4)) : 4 == e && (this.m_bSnoozeCallbackFired = !0), this.m_bUserSetPersonaState && (t = this.m_eUserPersonaState), this.UpdateUserPersonaStateInternal(t, this.m_bUserSetPersonaState, !0, !1, "OnIdle"), this.m_bNextActivityCallbackRegistered || ((this.m_bNextActivityCallbackRegistered = !0), b.Ul.IdleTracker.AddOnNextActivityCallback(this.ResetIdleState.bind(this))); } GetFriendInviteCount() { return this.m_FriendGroupStore.incoming_invites_group.unfiltered_count; } GetClanInviteCount() { return this.m_ClanStore.clan_invite_count; } GetPendingInviteCount() { return this.GetFriendInviteCount() + this.GetClanInviteCount(); } GetOutgoingFriendRequestCount() { return this.m_FriendGroupStore.outgoing_invites_group.unfiltered_count; } GetOnlineFriendCount() { return this.online_friends.length; } SendFriendInvite(e) { return (0, i.mG)(this, void 0, void 0, function* () { return this.SendFriendInviteBySteamID(e.persona.m_steamid); }); } SendFriendInviteBySteamID(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = r.gA.Init(f.pl); t.Body().set_steamid(e.ConvertTo64BitString()); let n = yield f.lk.AddFriend(this.m_CMInterface.GetServiceTransport(), t), i = 1; return void 0 !== n.Body().result() && (i = n.Body().result()), { eResult: i, eFriendRelationship: n.Body().friend_relationship() }; }); } RemoveFriend(e) { let t = r.gA.Init(f.Xg); return t.Body().set_steamid(e.persona.m_steamid.ConvertTo64BitString()), f.lk.RemoveFriend(this.m_CMInterface.GetServiceTransport(), t).then((e) => e.Body().friend_relationship()); } BlockPlayer(e, t = !1) { let n = r.gA.Init(f.iM); return n.Body().set_steamid(e.persona.m_steamid.ConvertTo64BitString()), t && n.Body().set_unignore(!0), f.lk.IgnoreFriend(this.m_CMInterface.GetServiceTransport(), n).then((e) => e.Body().friend_relationship()); } AddFriend(e, t, n) { let i = new c.K(e).GetAccountID(), o = this.m_setIncomingInviteAccountIDs.has(i); if (2 == t) { if (!o) { let e = this.AddPlayerToCache(i, 3, !1); (e.efriendrelationship = t), n || e.LoadIfNecessary(), this.m_setIncomingInviteAccountIDs.add(i), this.m_FriendGroupStore.OnIncomingInviteAdded(i); } } else if (o) { (this.AddPlayerToCache(i, 3, !1).efriendrelationship = t), this.m_setIncomingInviteAccountIDs.delete(i), this.m_FriendGroupStore.OnIncomingInviteRemoved(i); } if (4 == t) { let e = this.AddPlayerToCache(i, 3, !1); (e.efriendrelationship = t), n || e.LoadIfNecessary(), this.m_FriendGroupStore.OnOutgoingInviteAdded(i); } else this.m_FriendGroupStore.OnOutgoingInviteRemoved(i); if (5 == t || 6 == t) { let e = b.Ul.ChatStore.GetFriendChat(i, !1); e && b.Ul.UIStore.CloseTabByID(e.unique_id); } let r = this.m_setFriendAccountIDs.has(i); if ((0, A.my)(t)) { let e; r ? (e = this.GetFriend(i)) : (this.m_setFriendAccountIDs.add(i), (e = this.AddPlayerToCache(i, 2, !1)), n || e.LoadIfNecessary(), this.m_FriendGroupStore.OnFriendAdded(i)), (e.efriendrelationship = t); } else { r && (this.m_FriendGroupStore.OnFriendRemoved(i), this.m_FavoritesStore.OnFriendRemoved(i), this.m_setFriendAccountIDs.delete(i)), (this.AddPlayerToCache(i, 3, !1).efriendrelationship = t); } } SetFriendsList(e) { let t = e.friends(); const n = !e.bincremental(); if (n) { for (let e of this.all_friends) e.efriendrelationship = 0; this.m_setFriendAccountIDs.clear(), this.m_setIncomingInviteAccountIDs.clear(), this.m_FriendGroupStore.OnFullFriendsListUpdateStart(), this.m_ClanStore.ClearClanMembershipData(); } for (let e of t) { let t = new c.K(e.ulfriendid()); if (t.BIsIndividualAccount()) { let i = e.efriendrelationship(); this.AddFriend(t.ConvertTo64BitString(), i, n); } else t.BIsClanAccount() && this.m_ClanStore.OnClanRelationshipChanged(t, e.efriendrelationship()); } n && (this.m_FriendGroupStore.OnFullFriendsListUpdateComplete(), (this.m_bReceivedFriendsList = !0), this.RequestPerFriendPreferences(), this.RequestFriendPersonaStates(), this.UpdateReadyToRenderState()); } RequestFriendPersonaStates() { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_setFriendAccountIDs.size > 0) { let e = r.gA.Init(h.TJ); yield h.al.RequestFriendPersonaStates(this.m_CMInterface.GetServiceTransport(), e); } window.setTimeout(() => { (this.m_bInitialPersonaStatesLoaded = !0), this.StartWaitForInitialAppInfo(), this.SubscribeToMissingPersonaStates(), this.UpdateReadyToRenderState(); }, 1); }); } OnFriendPersonaStateChanged(e, t, n, i, o) { if (!b.Ul.NotificationManager.BNotificationsPermitted() || !b.Ul.SettingsStore.BReady() || b.Ul.FriendStore.GetUserDoNotDisturb()) return; const r = b.Ul.IsGamepadUIActive() || e.BShowInGameNotification(); if (i && e.persona.is_ingame && r) { let t = e.current_game_name; return e.persona.is_in_nonsteam_game || o || this.m_FriendInGameNotificationStore.RecordFriendInGameImpression(e.persona.m_unGamePlayedAppID), void (t && b.Ul.NotificationManager.DisplayNotificationFromFriend(e, { title: e.display_name, body: (0, T.Xx)("#Friend_StateChange_InGame", t), rawbody: t, tag: "state_" + e.accountid, state: "ingame", steamid: e.persona.m_steamid.ConvertTo64BitString() })); } 0 == t && 0 != n && e.BShowOnlineNotification() && b.Ul.NotificationManager.DisplayNotificationFromFriend(e, { title: e.display_name, body: (0, T.Xx)("#Friend_StateChange_Online"), tag: "state_" + e.accountid, state: "online", steamid: e.persona.m_steamid.ConvertTo64BitString() }); } PlayJoinGameSound() { b.Ul.FriendStore.GetUserDoNotDisturb() || b.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/ui_steam_smoother_friend_join.m4a"); } PlayFriendOnlineSound() { b.Ul.FriendStore.GetUserDoNotDisturb() || b.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/ui_steam_smoother_friend_online.m4a"); } FillPerFriendNotificationSettingsFromMessage(e, t) { (e.Notifications_ShowInGame = t.notifications_showingame()), (e.Notifications_ShowMessage = t.notifications_showmessages()), (e.Notifications_ShowOnline = t.notifications_showonline()), (e.Notifications_SendMobile = t.notifications_sendmobile()), (e.Sounds_PlayInGame = t.sounds_showingame()), (e.Sounds_PlayMessage = t.sounds_showmessages()), (e.Sounds_PlayOnline = t.sounds_showonline()); } RequestPerFriendPreferences() { let e = r.gA.Init(f.gN); f.lk.GetPerFriendPreferences(this.m_CMInterface.GetServiceTransport(), e).then((e) => { (0, I.z)(() => { for (let t of e.Body().preferences()) { let e = this.GetPlayer(t.accountid()); if (e) { e.nickname = t.nickname() || void 0; let n = new P(); this.FillPerFriendNotificationSettingsFromMessage(n, t), (e.notification_settings = n); } else console.log("Got per-friend preferences back for a user we don't have a Player for:", t); } (this.m_bPerFriendPreferencesLoaded = !0), this.UpdateReadyToRenderState(); }); }); } StartWaitForInitialAppInfo() { return (0, i.mG)(this, void 0, void 0, function* () { yield Promise.all(this.m_InitialAppInfoPromises), (this.m_bInitialAppInfoLoaded = !0), this.UpdateReadyToRenderState(); }); } FillMessageFromPerFriendNotificationSettings(e, t) { e.set_notifications_showingame(t.Notifications_ShowInGame), e.set_notifications_showmessages(t.Notifications_ShowMessage), e.set_notifications_showonline(t.Notifications_ShowOnline), e.set_notifications_sendmobile(t.Notifications_SendMobile), e.set_sounds_showingame(t.Sounds_PlayInGame), e.set_sounds_showmessages(t.Sounds_PlayMessage), e.set_sounds_showonline(t.Sounds_PlayOnline); } SetPlayerNickname(e, t) { return this.SetPlayerPerFriendPreferences(e, t, e.notification_settings); } SetPlayerNotificationSettings(e, t) { return this.SetPlayerPerFriendPreferences(e, e.nickname, t); } SetPlayerPerFriendPreferences(e, t, n) { let i = r.gA.Init(f.Qq), o = i.Body().preferences(); return o.set_accountid(e.accountid), o.set_nickname(t), this.FillMessageFromPerFriendNotificationSettings(o, n), f.lk.SetPerFriendPreferences(b.Ul.CMInterface.GetServiceTransport(), i).then((e) => e.GetEResult()); } InviteToGame(e, t, n) { let i = r.gA.Init(p.yc, 7005); i.Hdr().set_routing_appid(t), i.Body().set_steam_id_src(this.m_CMInterface.steamid.ConvertTo64BitString()), i.Body().set_steam_id_dest(c.K.InitFromAccountID(e.accountid).ConvertTo64BitString()), n && i.Body().set_connect_string(n), this.m_CMInterface.Send(i); } InviteToLobby(e, t, n) { let i = r.gA.Init(_.BQ, 6621); i.Hdr().set_routing_appid(t), i.Body().set_steam_id_lobby(n), i.Body().set_steam_id_user_invited(c.K.InitFromAccountID(e.accountid).ConvertTo64BitString()), this.m_CMInterface.Send(i); } InviteToWatch(e) { b.Ul.ShowFriendChatDialog(b.Ul.GetDefaultBrowserContext(), e.accountid, !0); b.Ul.BroadcastStore.InviteToWatch(e.accountid).then((e) => {}); } FillInChatUsabilityMetrics(e) { let t = 0, n = 0, i = 0; for (let e of this.all_friends) 3 == e.efriendrelationship && (t++, e.persona.is_online && n++, e.persona.is_ingame && i++); e.metrics().set_friends_count(t), e.metrics().set_friends_online_count(n), e.metrics().set_friends_in_game_count(i), this.m_FriendGroupStore.FillInChatUsabilityMetrics(e), this.m_FavoritesStore.FillInChatUsabilityMetrics(e); } GetPersonaStatePreference() { var e; return null === (e = this.m_FriendStorePrefs) || void 0 === e ? void 0 : e.ePersonaState; } } function X(e) { switch (e) { case 25: return "#Friend_InviteError_LimitExceeded"; case 15: return "#Friend_InviteError_AccessDenied"; case 40: return "#Friend_InviteError_Blocked"; case 11: return "#Friend_InviteError_InvalidState"; case 84: return "#Friend_InviteError_RateLimitExceeded"; case 24: return "#Friend_InviteError_InsufficientPrivilege"; } return "#Friend_InviteError"; } (W.k_nMSToWaitForFriendData = 1e3), (0, i.gn)([I.LO], W.prototype, "m_self", void 0), (0, i.gn)([I.LO], W.prototype, "m_setFriendAccountIDs", void 0), (0, i.gn)([I.LO], W.prototype, "m_eUserPersonaState", void 0), (0, i.gn)([I.LO], W.prototype, "m_bPerFriendPreferencesLoaded", void 0), (0, i.gn)([I.LO], W.prototype, "m_bReceivedFriendsList", void 0), (0, i.gn)([I.LO], W.prototype, "m_bInitialPersonaStatesLoaded", void 0), (0, i.gn)([I.LO], W.prototype, "m_bInitialAppInfoLoaded", void 0), (0, i.gn)([I.Fl], W.prototype, "not_ready_to_render_reason", null), (0, i.gn)([I.aD], W.prototype, "OnParentalLockChanged", null), (0, i.gn)([I.Fl], W.prototype, "all_friends", null), (0, i.gn)([I.Fl], W.prototype, "online_friends", null), (0, i.gn)([I.aD], W.prototype, "SetPersonasOffline", null), (0, i.gn)([I.aD], W.prototype, "SetFriendsList", null), (0, i.gn)([L.ak, (0, k.D)(100)], W.prototype, "PlayJoinGameSound", null), (0, i.gn)([L.ak, (0, k.D)(100)], W.prototype, "PlayFriendOnlineSound", null), (0, i.gn)([I.aD], W.prototype, "SetPlayerNickname", null), (0, i.gn)([I.aD], W.prototype, "SetPlayerNotificationSettings", null), (0, i.gn)([I.aD], W.prototype, "SetPlayerPerFriendPreferences", null), (0, i.gn)([I.aD], W.prototype, "InviteToGame", null), (0, i.gn)([I.aD], W.prototype, "InviteToLobby", null), (0, i.gn)([I.aD], W.prototype, "InviteToWatch", null); }, 19339: (e, t, n) => { "use strict"; n.d(t, { a: () => y, d: () => I }); var i = n(85556), o = n(59702), r = n(19953), a = n(1736), s = n(88991), l = n(61326), c = n(23346), m = n(72746), d = n(79588), h = n(84290), u = n(46519), p = (n(67915), n(46962)), _ = n(2049), g = n(97063), C = n(5395), f = n(77385), v = n(20891); const S = new f.sO("Chat"); const b = "FriendRecentChats"; class I { constructor(e) { (this.m_rgFriendChats = []), (this.m_bReceivedFriendChats = !1), (this.m_rtLastSessionUpdate = 0), (this.m_mapLastChatTimeByFriend = d.LO.map()), (this.m_mapRecentIgnoreTimeBeforeByFriend = d.LO.map()), (this.m_LastMessageCache = r.De.IN_MOBILE ? new E() : new D()), (0, d.rC)(this), (this.m_ChatStore = e); } Init() { this.m_LastMessageCache.Init(), this.m_ChatStore.CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(l.cV.IncomingMessageHandler, (e) => { let t = new s.K(e.Body().steamid_friend()), n = m.Ul.FriendStore.GetPlayerIfCached(t.GetAccountID()); if (!n) { if (e.Body().low_priority()) return 41; n = m.Ul.FriendStore.GetPlayer(t.GetAccountID()); } if (1 == e.Body().chat_entry_type()) { let i = e.Body().local_echo(), o = n.is_blocked || (e.Body().low_priority() && !n.is_friend), a = i ? this.m_ChatStore.FriendStore.self.persona.m_steamid : t, s = this.GetFriendChat(t.GetAccountID(), !o), l = s.GetVisibilityState(); if ((!o && !i && !m.Ul.FriendStore.BIsInvisibleMode() && !m.Ul.FriendStore.GetUserDoNotDisturb() && m.Ul.BShowIncomingChatMessages() && !r.De.IN_MOBILE && m.Ul.UIStore.ShowAndOrActivateChat(m.Ul.GetDefaultBrowserContext(), s, !1), s)) if ((n.is_friend || 0 != l || s.SetShowNonFriendWarning(!0), i || !n.is_blocked)) { s.AddNewChatMsgAndNotify(a.GetAccountID(), e.Body().rtime32_server_timestamp(), e.Body().ordinal(), e.Body().message(), e.Body().message_no_bbcode()); let t = this.m_ChatStore.TextFilterStore; if (!i && !t.BShownFilterTip() && t.BHasFilter()) { let n = e.Body().message(); t.FilterText(a.GetAccountID(), n) !== n && (s.AddLocalMsg(a.GetAccountID(), e.Body().rtime32_server_timestamp(), (0, h.Xx)("#Chat_TextFilter_Active", this.m_ChatStore.GetTextFilterSettingsURL())), t.SetFilterTipShown(!0)); } } else s.AppendChatMsg(a.GetAccountID(), e.Body().rtime32_server_timestamp(), e.Body().ordinal(), e.Body().message()); this.m_mapLastChatTimeByFriend.set(t.GetAccountID(), e.Body().rtime32_server_timestamp()); } else if (2 == e.Body().chat_entry_type() && !e.Body().local_echo() && !n.is_blocked) { let e = this.GetFriendChat(t.GetAccountID(), !1); e && e.OnFriendTypingNotification(); } return 1; }), this.m_ChatStore.CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(l.cV.NotifyAckMessageEchoHandler, (e) => { let t = new s.K(e.Body().steamid_partner()), n = this.GetFriendChat(t.GetAccountID()); return n && n.UpdateLastAckTimeFromServer(e.Body().timestamp()), 1; }), this.m_ChatStore.CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(l.cV.MessageReactionHandler, (e) => { const t = new s.K(e.Body().steamid_friend()), n = this.GetFriendChat(t.GetAccountID()); if (n) { const t = n.chat_messages.find((t) => t.rtTimestamp === e.Body().server_timestamp() && t.unOrdinal === e.Body().ordinal()); if (t) { const { is_add: n, reactor: i, reaction: o } = e.Body().toObject(), r = t.reactions.find((e) => e.strReaction === o), a = n ? 1 : -1; if (-1 === a && !r) return S.Error("Got reaction removal notification but no matching reaction was found"), 1; let s = !!r && r.bUserReacted; i === m.Ul.FriendStore.self.steamid64 && (s = n), t.UpdateReaction(e.Body().reaction_type(), e.Body().reaction(), r ? r.cReactors + a : a, s); } } return 1; }); } GetFriendChat(e, t = !0) { for (let t of this.m_rgFriendChats) if (t.accountid_partner == e) return t; if (!t) return null; let n = new y(e, this.m_ChatStore, this.m_ChatStore.CMInterface); return this.m_rgFriendChats.push(n), n; } OnLogon() { this.LoadFriendMessageSessions(), m.Ul.SettingsStore.GetObjectFromLocalStorageWhenReady(b).then((e) => { this.m_mapRecentIgnoreTimeBeforeByFriend.clear(); for (let t in e.ignoretimes) { let n = parseInt(t, 10); this.m_mapRecentIgnoreTimeBeforeByFriend.set(n, e.ignoretimes[t]); } }); } RestoreStatePostDisconnect(e) { e && this.LoadFriendMessageSessions(); for (let e of this.m_rgFriendChats) e.OnConnectionRestored(); } GetServiceTransport() { return this.m_ChatStore.CMInterface.GetServiceTransport(); } LoadFriendMessageSessions() { let e = a.gA.Init(l.mb); e.Body().set_lastmessage_since(this.m_rtLastSessionUpdate), e.Body().set_only_sessions_with_messages(!0), l.Pt.GetActiveMessageSessions(this.GetServiceTransport(), e).then((e) => { this.m_rtLastSessionUpdate = e.Body().timestamp(); for (let t of e.Body().message_sessions()) { this.m_mapLastChatTimeByFriend.set(t.accountid_friend(), t.last_message()), this.GetFriendChat(t.accountid_friend()).InitMessageSessionFromServer(t.unread_message_count(), t.last_view(), t.last_message()); } m.Ul.FriendStore.UpdateUnreadMessagesGlobal(), (this.m_bReceivedFriendChats = !0); }); } GetFriendChatsByLastChatTime() { const e = []; return ( this.m_mapLastChatTimeByFriend.forEach((t, n) => { e.push([t, this.GetFriendChat(n)]); }), e.sort(([e], [t]) => t - e).map(([e, t]) => t) ); } GetFriendsWithUnreadMessages(e) { let t = []; for (let n of this.m_rgFriendChats) n.unread_message_count > 0 && (!e || n.GetVisibilityState(e) < 2) && !n.is_blocked_friend && t.push(n); return t.sort((e, t) => e.time_last_message - t.time_last_message), t; } BIsFriendChatRecent(e) { const t = m.Ul.GetServerRTime32() - this.RecentChatCutoffDuration, n = this.m_mapLastChatTimeByFriend.get(e); if (!n) return !1; if (n >= t) { let t = this.m_mapRecentIgnoreTimeBeforeByFriend.get(e); if (!t || t < n) return !0; } return !1; } GetFriendChatsWithRecentMessages() { return this.m_rgFriendChats.filter((e) => this.BIsFriendChatRecent(e.accountid_partner)); } GetUnfilteredFriendsWithUnreadMessages() { let e = []; for (let t of this.m_rgFriendChats) t.unread_message_count > 0 && !t.is_blocked_friend && e.push(t); return e.sort((e, t) => e.time_last_message - t.time_last_message), e; } GetAllChats() { return this.m_rgFriendChats.slice(); } get RecentChatCutoffDuration() { return 3600; } get LastMessageCache() { return this.m_LastMessageCache; } ClearRecentChatsForFriend(e) { this.m_mapRecentIgnoreTimeBeforeByFriend.set(e, m.Ul.GetServerRTime32()), this.WriteRecentChatsPrefs(); } WriteRecentChatsPrefs() { let e = m.Ul.GetServerRTime32() - this.RecentChatCutoffDuration; this.m_mapRecentIgnoreTimeBeforeByFriend.forEach((t, n) => { t < e && this.m_mapRecentIgnoreTimeBeforeByFriend.delete(n); }), m.Ul.SettingsStore.StoreObjectInLocalStorage(b, { ignoretimes: new Map(this.m_mapRecentIgnoreTimeBeforeByFriend) }); } get GetRecentlyChattingFriends() { let e = []; return ( this.m_mapLastChatTimeByFriend.forEach((t, n) => { if (this.BIsFriendChatRecent(n)) { let t = m.Ul.FriendStore.GetFriend(n); t && e.push(t); } }), e.sort(c.Xp.DefaultFriendSortComparator), e ); } GetUnreadFriendMessageCount(e) { let t = 0; for (let n of this.m_rgFriendChats) n.unread_message_count > 0 && (!e || n.GetVisibilityState(e) < 2) && !n.is_blocked_friend && (t += n.unread_message_count); return t; } GetFriendLastChatTime(e) { return this.m_mapLastChatTimeByFriend.get(e) || 0; } AddFriendPushNotificationData(e, t) { let n = new s.K(e.steamid_friend()).GetAccountID(); if (1 == e.chat_entry_type()) { let t = e.local_echo() ? this.m_ChatStore.FriendStore.self.persona.m_steamid.GetAccountID() : n, i = this.GetFriendChat(n, !1); if (!i) return; if (e.local_echo() && i.HasClientMessageInFlight(e.client_message_id())) return; if (!i.HasChatMessage(e.previous_message_timestamp(), e.previous_message_ordinal())) return; i.AppendChatMsg(t, e.current_message_timestamp(), e.current_message_ordinal(), e.message()), this.m_mapLastChatTimeByFriend.set(n, e.current_message_timestamp()); } } } (0, i.gn)([d.LO], I.prototype, "m_rgFriendChats", void 0), (0, i.gn)([d.LO], I.prototype, "m_bReceivedFriendChats", void 0), (0, i.gn)([d.aD], I.prototype, "ClearRecentChatsForFriend", null), (0, i.gn)([d.Fl], I.prototype, "GetRecentlyChattingFriends", null); class y extends u.j { constructor(e, t, n) { super(t.FriendStore, t, n), (this.m_iClearFriendIsTypingInterval = void 0), (this.m_bFriendIsTyping = !1), (this.m_bNeedsNonFriendWarning = !1), (0, d.rC)(this), (this.m_unAccountIDFriend = e), (this.m_MessageSendQueue = new v.o(e.toString())), this.m_MessageSendQueue.InitFromStorage().then(() => this.InitQueuedMessages()); } GetLastMessage() { if (!this.m_strLastMessage && !this.m_bChatLogsLoaded) { const e = this.m_ChatStore.FriendChatStore.LastMessageCache.GetLastMessage(this.m_unAccountIDFriend); if (e && this.m_rtLastMessageReceived <= e.rtTime) return e.strMessage; if ( (this.LoadChatLogs().then(() => { const e = this.chat_messages[this.chat_messages.length - 1]; e && ((this.m_strLastMessage = e.strMessage), (this.m_accountIDLastMessage = e.unAccountID), (this.m_rtLastMessageReceived = e.rtTimestamp), this.m_ChatStore.FriendChatStore.LastMessageCache.UpdateLastMessage(this.m_unAccountIDFriend, { strMessage: e.strMessage, rtTime: e.rtTimestamp, unAccountIDSender: e.unAccountID })); }), e) ) return e.strMessage; } return this.m_strLastMessage; } get time_last_message() { if (this.m_rtLastMessageReceived) return this.m_rtLastMessageReceived; const e = this.m_ChatStore.FriendChatStore.LastMessageCache.GetLastMessage(this.m_unAccountIDFriend); return e ? e.rtTime : void 0; } get accountid_last_message() { if (this.m_accountIDLastMessage) return this.m_accountIDLastMessage; const e = this.m_ChatStore.FriendChatStore.LastMessageCache.GetLastMessage(this.m_unAccountIDFriend); return e ? e.unAccountIDSender : void 0; } get unread_message_count() { let e = this.m_ChatStore.VoiceChat.BPartnerHasRequestedAndIsInOneOnOneChat(this.m_unAccountIDFriend); return (e = e && !this.BVoiceActive()), this.m_cUnreadChatMessages + (e ? 1 : 0); } get VoiceChatStore() { return this.m_ChatStore.VoiceChat; } SetShowNonFriendWarning(e) { this.m_bNeedsNonFriendWarning = e; } GetShowNonFriendWarning() { let e = this.m_bNeedsNonFriendWarning && !m.Ul.FriendStore.BApprovedNonFriendMessages(this.accountid_partner); if (e) { let t = m.Ul.FriendStore.GetFriend(this.accountid_partner); e = !t || !t.is_friend; } return e; } GetMessagesFromTimeRange(e, t, n, i, o) { let r = a.gA.Init(l.yq); return ( r.Body().set_steamid1(this.m_CMInterface.steamid.ConvertTo64BitString()), r.Body().set_steamid2(s.K.InitFromAccountID(this.m_unAccountIDFriend).ConvertTo64BitString()), r.Body().set_count(u.j.k_LoadMoreMessageCount), r.Body().set_bbcode_format(!0), r.Body().set_rtime32_start_time(e), r.Body().set_start_ordinal(t), r.Body().set_time_last(n), r.Body().set_ordinal_last(i), S.Info(`${this.unique_id} friend trying to load ${o} messages in range ${e}:${t} - ${n}:${i}`), l.Pt.GetRecentMessages(this.m_ChatStore.CMInterface.GetServiceTransport(), r).then((e) => { let t = e.GetEResult(); if (1 != t) throw t; return { messages: this.GetMessagesFromResponse(e), moreAvailable: e.Body().more_available() }; }) ); } GetMessagesFromResponse(e) { let t = e.Body().messages(), n = []; for (let e = t.length - 1; e >= 0; e--) { let i = t[e], o = i.accountid(); n.push( new p.dz( o, i.timestamp(), i.ordinal(), i.message() || "", i.reactions().map((e) => ({ eReactionType: e.reaction_type(), strReaction: e.reaction(), cReactors: e.reactors().length, bUserReacted: e.reactors().indexOf(m.Ul.FriendStore.self.accountid) > -1 })), ), ); } return n; } OnNewChatMsgAdded(e, t, n, i) {} GetBBCodeParser() { return this.m_ChatStore.FriendChatBBCodeParser; } AckChatMsgOnServer(e) { let t = a.gA.Init(l.F5); t.Body().set_steamid_partner(s.K.InitFromAccountID(this.accountid_partner).ConvertTo64BitString()), t.Body().set_timestamp(e), l.Pt.AckMessage(this.m_CMInterface.GetServiceTransport(), t); } CheckShouldNotify(e, t, n) { super.CheckShouldNotify(e, t, n), this.m_ChatStore.FriendChatStore.LastMessageCache.UpdateLastMessage(this.m_unAccountIDFriend, { rtTime: e.rtTimestamp, strMessage: e.strMessage, unAccountIDSender: e.unAccountID }); } get name() { let e = this.chat_partner; return e ? e.display_name : void 0; } get unique_id() { return "f" + this.accountid_partner; } BIsVoiceAllowed() { return !!this.chat_partner.is_friend && 0 != this.chat_partner.persona.m_ePersonaState; } GetVoiceNotAllowedReason() { return this.chat_partner.is_friend ? (0 == this.chat_partner.persona.m_ePersonaState ? (0, h.Xx)("#VoiceChat_Unavailable_NotOnline", this.chat_partner.display_name) : null) : (0, h.Xx)("#VoiceChat_Unavailable_NotFriend", this.chat_partner.display_name); } ToggleVoiceChat() { return this.ChatStore.VoiceChat.IsVoiceActiveForFriend(this.accountid_partner) ? this.ChatStore.VoiceChat.OnUserEndVoiceChat() : this.ChatStore.VoiceChat.InitiateFriendChat(this.accountid_partner), !0; } BVoiceActive() { return this.ChatStore.VoiceChat.IsVoiceActiveForFriend(this.accountid_partner); } get is_blocked_friend() { return this.chat_partner.is_blocked; } SendChatMessageInternal(e) { return (0, i.mG)(this, void 0, void 0, function* () { this.chat_partner.is_friend || m.Ul.FriendStore.SetApprovedNonFriendMessages(this.chat_partner.accountid); let t = this.AppendLocalEchoChatMsg(e); this.m_strLastMessage = e; let n = a.gA.Init(l.lN); n.Body().set_chat_entry_type(1), n.Body().set_message(e), n.Body().set_steamid(s.K.InitFromAccountID(this.accountid_partner).ConvertTo64BitString()), n.Body().set_contains_bbcode(!0); let i = (function () { let e = ""; for (let t = 0; t < 16; t++) e += o.LO(0, 15).toString(16); return e; })(); n.Body().set_client_message_id(i), this.m_setInflightClientMessageID.add(i), (this.m_tsLastSentTypingNotification = void 0); const r = yield this.SendWithRetries(t, () => l.Pt.SendMessage(this.m_CMInterface.GetServiceTransport(), n)); return this.m_setInflightClientMessageID.delete(i), r === p.p.None && this.m_ChatStore.FriendChatStore.LastMessageCache.UpdateLastMessage(this.m_unAccountIDFriend, { rtTime: t.rtTimestamp, unAccountIDSender: this.self.accountid, strMessage: t.strMessage }), r; }); } UpdateMessageReaction(e, t, n, o) { return (0, i.mG)(this, void 0, void 0, function* () { const i = a.gA.Init(l.UD); i.Body().set_steamid(s.K.InitFromAccountID(this.accountid_partner).ConvertTo64BitString()), i.Body().set_reaction_type(t), i.Body().set_reaction(n), i.Body().set_is_add(o), i.Body().set_server_timestamp(e.rtTimestamp), i.Body().set_ordinal(e.unOrdinal); const r = e.reactions.find((e) => n === e.strReaction), c = o ? 1 : -1, m = r ? r.cReactors + c : c; e.UpdateReaction(t, n, m, o); const d = yield l.Pt.UpdateMessageReaction(this.m_CMInterface.GetServiceTransport(), i); return 1 !== d.GetEResult() ? (e.UpdateReaction(t, n, m - c, !o), S.Warning(`Error updating message reaction. EResult: ${d.GetEResult()}`)) : o && 1 === d.Body().reactors().length && (1 === t ? this.m_ChatStore.EmoticonStore.TrackEmoticonUsage(n, Date.now() / 1e3) : 2 === t && this.m_ChatStore.EmoticonStore.TrackStickerUsage(n, Date.now() / 1e3)), d.GetEResult(); }); } GetMessageReactionReactors(e, t, n) { const i = []; return t.bUserReacted && i.push(m.Ul.FriendStore.self.accountid), t.cReactors > i.length && i.push(this.chat_partner.accountid), i.slice(0, n); } OnTyping() { if (!this.m_tsLastSentTypingNotification || performance.now() - this.m_tsLastSentTypingNotification > 1e4) { this.m_tsLastSentTypingNotification = performance.now(); let e = a.gA.Init(l.lN); e.Body().set_chat_entry_type(2), e.Body().set_steamid(s.K.InitFromAccountID(this.accountid_partner).ConvertTo64BitString()), l.Pt.SendMessage(this.m_CMInterface.GetServiceTransport(), e); } } get is_friend_typing() { return this.m_bFriendIsTyping; } OnFriendTypingNotification() { this.m_bFriendIsTyping || (this.m_bFriendIsTyping = !0), void 0 !== this.m_iClearFriendIsTypingInterval && window.clearInterval(this.m_iClearFriendIsTypingInterval), (this.m_iClearFriendIsTypingInterval = window.setTimeout(() => { (this.m_iClearFriendIsTypingInterval = void 0), this.ClearFriendIsTypingState(); }, 11e3)); } PlayFriendMessageSound() { m.Ul.FriendStore.GetUserDoNotDisturb() || m.Ul.AudioPlaybackManager.PlayAudioURL(r.De.COMMUNITY_CDN_URL + "public/sounds/webui/ui_steam_message_old_smooth.m4a"); } OnReceivedNewMessage(e, t, n, i) { if (!e.BIsLocalEcho() && e.unAccountID != this.self.accountid) { if ((this.ClearFriendIsTypingState(), t < 2 && (this.is_blocked_friend || m.Ul.FriendStore.BIsInvisibleMode()))) return; if (m.Ul.NotificationManager.BNotificationsPermitted() && this.chat_partner.BShowMessageNotification() && t < 4 && !m.Ul.FriendStore.GetUserDoNotDisturb()) { let t = { title: this.chat_partner.display_name, body: n, tag: "message_" + this.chat_partner.accountid, steamid: this.chat_partner.persona.m_steamid.ConvertTo64BitString() }; (t = this.DecorateNotification(e, t, n, i)), (t.body = this.m_ChatStore.TextFilterStore.FilterText(e.unAccountID, t.body)), t.body && (this.GetShowNonFriendWarning() && m.Ul.SettingsStore.BClientHasFeatureOrOnWeb("NonFriendMessageHandling") && (t.body = ""), m.Ul.NotificationManager.DisplayNotificationFromFriend(this.chat_partner, t), this.m_bHasUnreadPriorityChatMessages || ((this.m_bHasUnreadPriorityChatMessages = !0), m.Ul.FriendStore.UpdateUnreadMessagesGlobal())); } if ((this.chat_partner.BPlayMessageSound() && t < 4 && this.PlayFriendMessageSound(), t < 4 && !m.Ul.FriendStore.GetUserDoNotDisturb())) { const e = m.Ul.SettingsStore.FriendsSettings.nChatFlashMode; let t = Promise.resolve(0 == e); 1 == e && (t = m.Ul.UIStore.IsChatWindowMinimized(this)), t.then((e) => { e && m.Ul.UIStore.FlashChatWindow(this, !0); }); } } } ClearFriendIsTypingState() { void 0 !== this.m_iClearFriendIsTypingInterval && (window.clearInterval(this.m_iClearFriendIsTypingInterval), (this.m_iClearFriendIsTypingInterval = void 0)), (this.m_bFriendIsTyping = !1); } PopulateCommitFileUploadFormData(e, t) { e.append("friend_steamid", s.K.InitFromAccountID(this.accountid_partner).ConvertTo64BitString()), e.append("spoiler", t.bSpoiler ? "1" : "0"); } GetMember(e) { return e == this.m_unAccountIDFriend ? this.chat_partner : e == this.self.accountid ? this.self : void 0; } get accountid_partner() { return this.m_unAccountIDFriend; } get chat_partner() { return m.Ul.FriendStore.GetPlayer(this.m_unAccountIDFriend); } ViewerNeedsApproval(e) { let t = `[broadcastviewrequest requestid="${e}"][/broadcastviewrequest]`; this.InternalAppendChatMsg(new p.dz(this.chat_partner.accountid, m.Ul.GetServerRTime32(), 0, t)), m.Ul.FriendStore.GetUserDoNotDisturb() || m.Ul.NotificationManager.DisplayNotificationFromFriend(this.chat_partner, { title: "", body: (0, h.Xx)("#Chat_BroadcastViewRequest_Notification"), tag: "message_" + this.chat_partner.accountid, steamid: this.chat_partner.persona.m_steamid.ConvertTo64BitString() }); } } (0, i.gn)([d.LO], y.prototype, "m_bFriendIsTyping", void 0), (0, i.gn)([d.LO], y.prototype, "m_bNeedsNonFriendWarning", void 0), (0, i.gn)([d.aD], y.prototype, "ToggleVoiceChat", null), (0, i.gn)([_.ak, (0, g.D)(100)], y.prototype, "PlayFriendMessageSound", null), (0, i.gn)([d.aD], y.prototype, "ClearFriendIsTypingState", null), (0, i.gn)([d.aD], y.prototype, "ViewerNeedsApproval", null); class E { constructor() { this.m_cache = d.LO.map(); } Init() { return (0, i.mG)(this, void 0, void 0, function* () { try { const e = yield m.Ul.Storage.GetObject(E.StorageKey); this.Validate(e) ? (this.m_cache.replace(e), this.TrimCache()) : this.ClearCache(); } catch (e) { S.Error(`There was a problem loading recent friend messages from storage: ${e}`), this.ClearCache(); } }); } Validate(e) { if ("object" != typeof e || !e) return !1; for (const t in e) { if (isNaN(parseInt(t))) return !1; const n = e[t]; if ("object" != typeof n) return !1; if (("string" != typeof n.strMessage && null !== n.strMessage) || "number" != typeof n.rtTime || "number" != typeof n.unAccountIDSender) return !1; } return !0; } ClearCache() { this.m_cache.clear(), this.SerializeToStorage(); } SerializeToStorage() { return m.Ul.Storage.StoreObject(E.StorageKey, Object.fromEntries(this.m_cache)); } GetLastMessage(e) { return this.m_cache.get(e.toString()); } UpdateLastMessage(e, t) { return this.m_cache.set(e.toString(), t), this.SerializeToStorage(); } TrimCache() { const e = Date.now() / 1e3; this.m_cache.forEach(({ rtTime: t }, n) => { t < e - C._H.PerYear / 2 && this.m_cache.delete(n); }), this.SerializeToStorage(); } } E.StorageKey = "FriendLastMessageCache"; class D { Init() { return (0, i.mG)(this, void 0, void 0, function* () {}); } GetLastMessage() {} UpdateLastMessage() { return (0, i.mG)(this, void 0, void 0, function* () {}); } } }, 10167: (e, t, n) => { "use strict"; n.d(t, { a2: () => C, h1: () => g, jY: () => M, v5: () => _ }); var i = n(85556), o = n(9824), r = n(1736), a = n(88991), s = n(76262), l = n(58594), c = n(72746), m = n(79588), d = n(84290), h = n(23346), u = n(26626), p = n(66035); const _ = -6; var g; !(function (e) { (e[(e.eOnlineOnly = 0)] = "eOnlineOnly"), (e[(e.eOnlineOnlyNotInGame = 1)] = "eOnlineOnlyNotInGame"), (e[(e.eOfflineOnly = 2)] = "eOfflineOnly"), (e[(e.eIncomingInvites = 3)] = "eIncomingInvites"), (e[(e.eOutgoingInvites = 4)] = "eOutgoingInvites"), (e[(e.eAll = 5)] = "eAll"); })(g || (g = {})); class C { constructor(e) { (this.m_eDisplayType = g.eAll), (this.m_strName = ""), (this.m_bCollapsed = !1), (this.m_OnHeaderClick = void 0), (this.m_rgAccountIDMembers = m.LO.array()), (this.m_setMembers = new Set()), (0, m.rC)(this), (this.m_strName = e); } get name() { return this.m_strName; } set name(e) { this.m_strName = e; } get icon_url() { return ""; } get display_type() { return this.m_eDisplayType; } get onheaderclick() { return this.m_OnHeaderClick; } get collapsed() { return this.m_bCollapsed; } set collapsed(e) { this.m_bCollapsed = e; } GetCurrentMemberSet() { return this.m_setMembers; } get member_count() { return this.display_type == g.eAll ? this.unfiltered_count : this.member_list.length; } get unfiltered_count() { return this.member_accountid_list.length; } get member_counts() { let e = 0, t = 0; for (let n of this.member_list_unsorted) n.persona.is_online && (e++, n.persona.is_ingame && t++); return { online: e, ingame: t }; } SetOnHeaderClick(e) { this.m_OnHeaderClick = e; } Clear() { this.m_rgAccountIDMembers.clear(), this.m_setMembers.clear(); } AddMember(e) { this.HasMember(e) || (this.m_setMembers.add(e), this.m_rgAccountIDMembers.push(e)); } RemoveMember(e) { this.HasMember(e) && (this.m_setMembers.delete(e), o.Zf(this.m_rgAccountIDMembers, e)); } HasMember(e) { return this.m_setMembers.has(e); } get GetRawMemberList() { return this.m_rgAccountIDMembers.map((e) => c.Ul.FriendStore.GetPlayer(e)); } get member_list() { let e = this.member_list_unsorted.slice(); return e.sort(h.Xp.DefaultFriendSortComparator), e; } get member_list_unsorted() { let e = []; for (let t of this.GetRawMemberList) if ((this.display_type != g.eOnlineOnly || t.persona.is_online) && (this.display_type != g.eOfflineOnly || !t.persona.is_online)) { if (this.display_type == g.eOnlineOnlyNotInGame) { if (!t.persona.is_online || t.persona.is_ingame) continue; if (t.persona.m_broadcastAppId && t.persona.m_broadcastAppId == p.rr.appID) continue; } e.push(t); } return e; } get member_accountid_list() { return this.m_rgAccountIDMembers; } } (0, i.gn)([m.LO], C.prototype, "m_strName", void 0), (0, i.gn)([m.LO], C.prototype, "m_bCollapsed", void 0), (0, i.gn)([m.Fl], C.prototype, "member_count", null), (0, i.gn)([m.Fl], C.prototype, "unfiltered_count", null), (0, i.gn)([m.Fl], C.prototype, "member_counts", null), (0, i.gn)([m.aD], C.prototype, "SetOnHeaderClick", null), (0, i.gn)([m.aD], C.prototype, "Clear", null), (0, i.gn)([m.aD], C.prototype, "AddMember", null), (0, i.gn)([m.aD], C.prototype, "RemoveMember", null), (0, i.gn)([m.Fl], C.prototype, "member_list", null), (0, i.gn)([m.Fl], C.prototype, "member_list_unsorted", null); class f extends C { constructor(e, t = -1, n = !1, i = !1) { super(e), (this.m_bModifiable = !1), (this.m_bAcceptsGroupRemovals = !1), (0, m.rC)(this), (this.m_iGroupID = t), (this.m_bModifiable = n), (this.m_bAcceptsGroupRemovals = i); } get id() { return this.m_iGroupID; } get unique_id() { return "" + this.m_iGroupID; } get modifiable() { return this.m_bModifiable; } get accepts_group_removals() { return this.m_bAcceptsGroupRemovals; } get should_filter_categorized_friends() { return !1; } get GetRawMemberList() { return this.member_accountid_list.map((e) => c.Ul.FriendStore.GetPlayer(e)); } GetMembersMatchingSearch(e) { let t = []; for (let n of this.GetRawMemberList) n.BMatchesSearchString(e, !1) && t.push(n); return t.sort(h.Xp.DefaultFriendSortComparator), t; } } (0, i.gn)([m.Fl], f.prototype, "GetRawMemberList", null); class v extends f { get display_type() { return c.Ul.SettingsStore.FriendsSettings.bHideOfflineFriendsInTagGroups ? g.eOnlineOnly : g.eAll; } } class S extends f { constructor(e, t) { super(e, t, !1, !0), (this.m_eDisplayType = g.eOnlineOnlyNotInGame); } get unique_id() { return "all"; } get display_type() { return c.Ul.SettingsStore.FriendsSettings.bCategorizeInGameFriendsByGame ? g.eOnlineOnlyNotInGame : g.eOnlineOnly; } get should_filter_categorized_friends() { return c.Ul.SettingsStore.FriendsSettings.bHideCategorizedFriends; } } class b extends f { constructor(e, t) { super(e, t, !1, !0); } get unique_id() { return "offline"; } get should_filter_categorized_friends() { let e = c.Ul.SettingsStore.FriendsSettings; return e.bHideCategorizedFriends && !e.bHideOfflineFriendsInTagGroups; } } class I extends f { constructor(e, t) { super(e, t, !1, !0), (this.m_eDisplayType = g.eOutgoingInvites); } get unique_id() { return "outgoing"; } } class y extends f { constructor(e, t) { super(e, t, !1, !0); } get unique_id() { return "ingame"; } } class E extends f { constructor(e, t) { super(e, t, !1, !0), (this.m_mapSteamIDToMutualFriends = m.LO.map()), (this.m_unMutualFriendsCacheHash = 0), (this.m_eDisplayType = g.eIncomingInvites); } get unique_id() { return "incominginvites"; } GetMutualFriendsCacheHash() { return this.m_unMutualFriendsCacheHash; } SetMutualFriendsCacheHash(e) { this.m_unMutualFriendsCacheHash = e; } SetMutualFriends(e) { this.m_mapSteamIDToMutualFriends.replace(e); } get map_steamid_to_mutual_friends() { return this.m_mapSteamIDToMutualFriends; } } class D extends f { constructor(e) { super("", e, !1, !1), (0, m.rC)(this); } get is_initialized() { return 0 != this.id && c.Ul.AppInfoStore.GetAppInfo(this.id).is_initialized; } get unique_id() { return "game_" + this.id; } get name() { return !this.is_initialized || this.id < 0 ? "" : c.Ul.AppInfoStore.GetAppInfo(this.id).name; } set name(e) {} get icon_url() { return !this.is_initialized || this.id < 0 ? "" : c.Ul.AppInfoStore.GetAppInfo(this.id).icon_url; } PlayerGroupSortComparator(e, t, n, i) { let o = e.persona.player_group, r = t.persona.player_group, a = o ? Math.max(e.persona.player_group_size, n.get(o) || 1) : 1, s = r ? Math.max(t.persona.player_group_size, n.get(r) || 1) : 1; return a != s ? s - a : a > 1 && o != r ? o.localeCompare(r) : i(e, t); } get member_list() { let e = [], t = new Map(); for (let n of this.GetRawMemberList) if ((e.push(n), n.persona.player_group)) { let e = t.get(n.persona.player_group); t.set(n.persona.player_group, e ? e + 1 : 1); } let n = h.Xp.DefaultFriendSortComparator; return 0 == this.id ? e.sort(n) : e.sort((e, i) => this.PlayerGroupSortComparator(e, i, t, n)), e; } } (0, i.gn)([m.KG], D.prototype, "member_list", null); const w = { groups: { offline: !0, outgoing: !0 } }, R = "FriendGroupCollapse"; class A { constructor() { (this.m_mapCollapsePrefs = m.LO.map()), (0, m.rC)(this); } Init() { c.Ul.SettingsStore.GetObjectFromLocalStorageWhenReady(R, w).then((e) => { this.m_mapCollapsePrefs.clear(); for (let t in e.groups) "boolean" == typeof e.groups[t] && this.m_mapCollapsePrefs.set(t, e.groups[t]); }); } GetUserGroupCollapsed(e) { return !!this.m_mapCollapsePrefs.get(e); } SetUserGroupCollapsed(e, t) { !!this.m_mapCollapsePrefs.get(e) != t && (t || w.groups[e] ? this.m_mapCollapsePrefs.set(e, t) : this.m_mapCollapsePrefs.delete(e), this.WritePrefs()); } ToggleUserGroupCollapsed(e) { this.SetUserGroupCollapsed(e, !this.GetUserGroupCollapsed(e)); } WritePrefs() { c.Ul.SettingsStore.StoreObjectInLocalStorage(R, { groups: Object.fromEntries(this.m_mapCollapsePrefs) }); } } (0, i.gn)([m.aD], A.prototype, "SetUserGroupCollapsed", null), (0, i.gn)([m.aD], A.prototype, "ToggleUserGroupCollapsed", null); class M { constructor(e) { (this.m_FriendGroupDisplayPrefs = new A()), (this.m_mapGroups = m.LO.map()), (this.m_mapGameGroups = m.LO.map()), (this.m_singletonGameGroup = new D(0)), (this.m_nonSteamGameGroup = new D(_)), (this.m_groupAllFriends = new S((0, d.Xx)("#FriendGroup_Online"), -1)), (this.m_groupOfflineFriends = new b((0, d.Xx)("#FriendGroup_Offline"), -3)), (this.m_groupIngameFriends = new y((0, d.Xx)("#FriendGroup_InGame"), -4)), (this.m_groupIncomingInvites = new E((0, d.Xx)("#FriendGroup_IncomingInvites"), -5)), (this.m_groupOutgoingInvites = new I((0, d.Xx)("#FriendGroup_Outgoing"), -6)), (0, m.rC)(this), (this.m_FriendStore = e), (this.m_groupOfflineFriends.m_eDisplayType = g.eOfflineOnly); } Init(e) { (this.m_CMInterface = e), this.m_FriendGroupDisplayPrefs.Init(), this.m_CMInterface.AddOnLogonCallback( () => (0, i.mG)(this, void 0, void 0, function* () { let e = r.gA.Init(u.u), t = yield u.qW.GetCategories(this.m_CMInterface.GetServiceTransport(), e); 1 == t.GetEResult() && this.RecvCategoriesList(t.Body()); }), 47, ); } get all_friends() { return this.m_groupAllFriends; } get ingame_group() { return this.m_groupIngameFriends; } get incoming_invites_group() { return this.m_groupIncomingInvites; } get outgoing_invites_group() { return this.m_groupOutgoingInvites; } get friend_groups() { return [...this.game_groups, ...this.user_groups, ...this.default_groups]; } get groupDisplayPrefs() { return this.m_FriendGroupDisplayPrefs; } get user_groups() { let e = []; return ( this.m_mapGroups.forEach((t) => { e.push(t); }), e.sort((e, t) => e.name.localeCompare(t.name)), e ); } get game_groups() { let e = [], t = 2; return ( 1 == this.m_singletonGameGroup.unfiltered_count && (t = 1), this.m_mapGameGroups.forEach((n) => { n.name && n.member_count >= t && e.push(n); }), e.sort((e, t) => (e.member_count == t.member_count ? e.name.localeCompare(t.name) : t.member_count - e.member_count)), e ); } get singleton_game_group() { if (1 == this.m_singletonGameGroup.unfiltered_count) { let e = this.m_singletonGameGroup.member_accountid_list[0]; if (!c.Ul.FriendStore.GetPlayer(e).persona.is_in_nonsteam_game) return; } return this.m_singletonGameGroup; } get default_groups() { return [this.m_groupAllFriends, this.m_groupOfflineFriends]; } get games_with_friends_playing() { return Array.from(this.m_mapGameGroups.keys()); } GetGameGroup(e) { return this.m_mapGameGroups.get(e); } GetCountFriendsInGame(e) { var t; return (null === (t = this.m_mapGameGroups.get(e)) || void 0 === t ? void 0 : t.unfiltered_count) || 0; } GetMaxCountFriendsInGame() { return Array.from(this.m_mapGameGroups.values()).reduce((e, t) => (t.unfiltered_count > e ? t.unfiltered_count : e), 0); } OnFullFriendsListUpdateStart() { this.m_groupOfflineFriends.Clear(), this.m_groupAllFriends.Clear(), this.m_groupIncomingInvites.Clear(), this.m_groupOutgoingInvites.Clear(); } OnFullFriendsListUpdateComplete() { this.m_mapGameGroups.clear(), this.m_singletonGameGroup.Clear(), this.m_groupIngameFriends.Clear(); for (let e of this.m_FriendStore.all_friends) if (e.persona.is_ingame) { let t = e.persona.is_in_nonsteam_game ? _ : e.persona.m_unGamePlayedAppID; this.OnFriendGameChanged(e.accountid, 0, t); } } OnPersonaStateCacheReset() { this.m_mapGameGroups.clear(), this.m_singletonGameGroup.Clear(), this.m_groupIngameFriends.Clear(); } OnFriendAdded(e) { this.m_groupAllFriends.AddMember(e), this.m_groupOfflineFriends.AddMember(e); } OnFriendRemoved(e) { this.m_groupAllFriends.RemoveMember(e), this.m_groupOfflineFriends.RemoveMember(e), this.m_groupIngameFriends.RemoveMember(e), this.m_singletonGameGroup.RemoveMember(e), this.m_mapGroups.forEach((t) => { t.RemoveMember(e); }), this.m_mapGameGroups.forEach((t) => { t.RemoveMember(e); }); } OnFriendGameChanged(e, t, n) { let i = t == _ ? this.m_nonSteamGameGroup : 0 != t ? this.m_mapGameGroups.get(t) : null, o = n == _ ? this.m_nonSteamGameGroup : 0 != n ? this.m_mapGameGroups.get(n) : null; (i && o && t == n) || (o && o.HasMember(e)) || (i && i.HasMember(e) && (i.RemoveMember(e), 0 == i.unfiltered_count || i == this.m_nonSteamGameGroup ? this.m_singletonGameGroup.RemoveMember(e) : 1 == i.unfiltered_count && this.m_singletonGameGroup.AddMember(i.member_accountid_list[0])), o || 0 == n || ((o = new D(n)), this.m_mapGameGroups.set(n, o)), o && (0 == o.unfiltered_count || o == this.m_nonSteamGameGroup ? this.m_singletonGameGroup.AddMember(e) : 1 == o.unfiltered_count && this.m_singletonGameGroup.RemoveMember(o.member_accountid_list[0]), o.AddMember(e)), 0 != n ? this.m_groupIngameFriends.AddMember(e) : this.m_groupIngameFriends.RemoveMember(e)); } OnIncomingInviteAdded(e) { this.m_groupIncomingInvites.AddMember(e); } OnIncomingInviteRemoved(e) { this.m_groupIncomingInvites.RemoveMember(e); } OnOutgoingInviteAdded(e) { this.m_groupOutgoingInvites.AddMember(e); } OnOutgoingInviteRemoved(e) { this.m_groupOutgoingInvites.RemoveMember(e); } EnsureMutualFriendsForIncomingInvites() { function e(e) { let t = 2166136261; for (let n = 0; n < e.length; ++n) (t ^= e.charCodeAt(n)), (t += (t << 1) + (t << 4) + (t << 7) + (t << 8) + (t << 24)); return t >>> 0; } let t = 0; for (let n of this.m_groupIncomingInvites.member_list) t ^= e("" + n.accountid); if (this.m_groupIncomingInvites.GetMutualFriendsCacheHash() == t) return; this.m_groupIncomingInvites.SetMutualFriendsCacheHash(t); let n = r.gA.Init(l.B); l.lk.GetMutualFriendsForIncomingInvites(this.m_CMInterface.GetServiceTransport(), n).then((e) => { if (1 != e.GetEResult()) return; if (this.m_groupIncomingInvites.GetMutualFriendsCacheHash() != t) return; let n = m.LO.map(); for (let t of e.Body().incoming_invite_mutual_friends_lists()) { let e = new Set(); for (let n of t.mutual_friend_account_ids()) e.add(n); n.set(t.steamid(), e); } this.m_groupIncomingInvites.SetMutualFriends(n); }); } CreateGroup(e, t) { let n = r.gA.Init(s.l5, 5560); return ( n.Body().set_groupname(e), t && n.Body().set_steamid_friends(t), new Promise((i, o) => { this.m_CMInterface .SendMsgAndAwaitResponse(n, s.wr) .then((n) => { 1 == n.Body().eresult() && (0, m.z)(() => { let i = n.Body().groupid(), o = new v(e, n.Body().groupid(), !0); if (t) for (let e of t) o.AddMember(new a.K(e).GetAccountID()); this.m_mapGroups.set(i, o); }), i(1 == n.Body().eresult()); }) .catch(() => { i(!1); }); }) ); } ManageGroup(e, t, n, i) { if (t == e.name && !n && !i) return Promise.resolve(!0); let o = r.gA.Init(s._q, 5564); return ( o.Body().set_groupid(e.id), t && t != e.name && o.Body().set_groupname(t), n && o.Body().set_steamid_friends_added(n), i && o.Body().set_steamid_friends_removed(i), new Promise((r, l) => { this.m_CMInterface .SendMsgAndAwaitResponse(o, s.r1) .then((o) => { if (1 == o.Body().eresult()) { e.name = t; for (let t of n) e.AddMember(new a.K(t).GetAccountID()); for (let t of i) e.RemoveMember(new a.K(t).GetAccountID()); } r(1 == o.Body().eresult()); }) .catch(() => { r(!1); }); }) ); } RemoveGroup(e) { let t = r.gA.Init(s.QY, 5562); t.Body().set_groupid(e.id), this.m_CMInterface.SendMsgAndAwaitResponse(t, s.dZ).then((t) => { 1 == t.Body().eresult() && this.HandleGroupRemoval(e); }); } HandleGroupRemoval(e) { this.m_mapGroups.delete(e.id); } get categorized_friend_set() { let e = new Set(); return ( this.m_mapGroups.forEach((t) => { t.member_accountid_list.forEach(e.add.bind(e)); }), e ); } RecvCategoriesList(e) { this.m_mapGroups.clear(); for (let t of e.categories()) { let e = t.groupid(), n = new v(t.name() || "", t.groupid(), !0); (n.m_eDisplayType = g.eAll), this.m_mapGroups.set(e, n); for (let e of t.accountid_members()) n.AddMember(e); } } TransferFriendFromToGroup(e, t, n) { let i = n && n.modifiable, o = t && t.modifiable, a = []; if (i) { let t = r.gA.Init(s.Ek, 5566); t.Body().set_groupid(n.id), t.Body().set_steamiduser(e.persona.m_steamid.ConvertTo64BitString()), a.push(this.m_CMInterface.SendMsgAndAwaitResponse(t, s.Yw).then((t) => 1 == t.Body().eresult() && (n.AddMember(e.accountid), !0))); } if (o) { let n = r.gA.Init(s.Py, 5568); n.Body().set_groupid(t.id), n.Body().set_steamiduser(e.persona.m_steamid.ConvertTo64BitString()), a.push(this.m_CMInterface.SendMsgAndAwaitResponse(n, s.Kl).then((n) => 1 == n.Body().eresult() && (t.RemoveMember(e.accountid), 0 == t.unfiltered_count && this.HandleGroupRemoval(t), !0))); } return Promise.all(a); } FillInChatUsabilityMetrics(e) { e.metrics().set_friends_category_count(this.m_mapGroups.size), e.metrics().set_friends_categorized_count(this.categorized_friend_set.size), this.singleton_game_group && e.metrics().set_friends_in_game_singleton_count(this.singleton_game_group.unfiltered_count), e.metrics().set_game_group_count(this.game_groups.length); let t = (e) => this.m_FriendGroupDisplayPrefs.GetUserGroupCollapsed(e.unique_id), n = e.ui_state().category_collapse(); n.set_in_game_collapsed(t(this.m_singletonGameGroup)), n.set_online_collapsed(t(this.m_groupAllFriends)), n.set_offline_collapsed(t(this.m_groupOfflineFriends)), n.set_categories_collapsed(o.W(Array.from(this.m_mapGroups.values()), t)), n.set_game_groups_collapsed(o.W(Array.from(this.m_mapGameGroups.values()), t)); } } (0, i.gn)([m.Fl], M.prototype, "friend_groups", null), (0, i.gn)([m.Fl], M.prototype, "user_groups", null), (0, i.gn)([m.Fl], M.prototype, "game_groups", null), (0, i.gn)([m.Fl], M.prototype, "singleton_game_group", null), (0, i.gn)([m.Fl], M.prototype, "default_groups", null), (0, i.gn)([m.Fl], M.prototype, "games_with_friends_playing", null), (0, i.gn)([m.aD], M.prototype, "OnFullFriendsListUpdateComplete", null), (0, i.gn)([m.aD], M.prototype, "OnPersonaStateCacheReset", null), (0, i.gn)([m.aD], M.prototype, "HandleGroupRemoval", null), (0, i.gn)([m.Fl], M.prototype, "categorized_friend_set", null), (0, i.gn)([m.aD], M.prototype, "RecvCategoriesList", null), (0, i.gn)([m.aD], M.prototype, "TransferFriendFromToGroup", null); }, 32572: (e, t, n) => { "use strict"; n.d(t, { C: () => d, j: () => m }); var i = n(85556), o = n(1736), r = n(26626), a = n(72746), s = n(79588), l = n(9824), c = n(93635); function m(e, t) { return e == t || (e && t && e.friend == t.friend && e.clan == t.clan && e.chat == t.chat); } class d { constructor(e) { (this.m_rgFavorites = s.LO.array()), (0, s.rC)(this), (this.m_FriendStore = e), (this.m_ClanStore = e.ClanStore); } Init(e) { (this.m_CMInterface = e), (this.m_ChatStore = a.Ul.ChatStore), this.m_CMInterface.AddOnLogonCallback(() => { let e = o.gA.Init(r.Zi); r.qW.GetFavorites(this.m_CMInterface.GetServiceTransport(), e).then((e) => { 1 == e.GetEResult() && this.RecvFavoritesList(e.Body().favorites()); }); }, 47), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(r.i6.FavoritesChangedHandler, (e) => (this.RecvFavoritesList(e.Body().favorites()), 1)); } BIsFavorited(e) { for (let t of this.m_rgFavorites) if (m(t, e)) return !0; return !1; } get favorites() { return this.m_rgFavorites; } AddToFavorites(e, t) { let n = this.m_rgFavorites.findIndex((t) => m(t, e)); return -1 === n || (void 0 !== t && n !== t) ? (-1 !== n ? l.hV(this.m_rgFavorites, n, t > n ? t - 1 : t) : void 0 !== t ? this.m_rgFavorites.splice(t, 0, e) : this.m_rgFavorites.push(e), this.SaveFavorites()) : Promise.resolve(!0); } RemoveFromFavorites(e) { return l.Qf(this.m_rgFavorites, (t) => m(t, e)) ? this.SaveFavorites() : Promise.resolve(!0); } OnFriendRemoved(e) { let t = this.m_FriendStore.GetPlayer(e); this.RemoveFromFavorites({ friend: t }); } SaveFavorites() { let e = o.gA.Init(r.k4); for (let t of this.m_rgFavorites) { let n = e.Body().add_favorites(); t.friend ? n.set_accountid(t.friend.accountid) : t.clan ? n.set_clanid(t.clan.clanid) : t.chat ? n.set_chat_group_id(t.chat.GetGroupID()) : (0, c.X)(!1, "empty favorite struct"); } return r.qW.SetFavorites(this.m_CMInterface.GetServiceTransport(), e).then((e) => 1 == e.GetEResult()); } ReadFavorites(e) { this.m_rgFavorites.clear(); for (let t of e) if (t.accountid()) { let e = this.m_FriendStore.GetFriend(t.accountid()); e && this.m_rgFavorites.push({ friend: e }); } else if (t.clanid()) { let e = this.m_ClanStore.GetClan(t.clanid()); e && this.m_rgFavorites.push({ clan: e }); } else if (t.chat_group_id()) { let e = this.m_ChatStore.GetChatRoomGroup(t.chat_group_id()); e && this.m_rgFavorites.push({ chat: e }); } } RecvFavoritesList(e) { (0, s.gx)(() => this.m_FriendStore.friends_list_ready && this.m_ChatStore.chat_group_list_ready, this.ReadFavorites.bind(this, e)); } FillInChatUsabilityMetrics(e) { e.metrics().set_friends_favorite_count(l.W(this.m_rgFavorites, (e) => !!e.friend)), e.metrics().set_group_chat_favorite_count(l.W(this.m_rgFavorites, (e) => !!e.chat || !!e.clan)); } } (0, i.gn)([s.aD], d.prototype, "AddToFavorites", null), (0, i.gn)([s.aD], d.prototype, "RemoveFromFavorites", null), (0, i.gn)([s.aD], d.prototype, "OnFriendRemoved", null), (0, i.gn)([s.aD], d.prototype, "ReadFavorites", null); }, 33082: (e, t, n) => { "use strict"; function i(e, t) { return e.m_unPID == t.m_unPID && e.m_nBrowserID == t.m_nBrowserID; } n.d(t, { D: () => o, n: () => i }); const o = { m_unPID: 0, m_nBrowserID: -1 }; }, 37234: (e, t, n) => { "use strict"; n.d(t, { YF: () => In, D: () => sn.D, i5: () => un, iY: () => fn, PX: () => vn, Um: () => ln, rb: () => cn, Og: () => mn, yz: () => Sn, g_FriendsUIDesktopApp: () => yn, pF: () => bn }); var i = n(85556), o = n(19953), r = n(39827); class a { constructor() { this.m_rgActivityCallbacks = []; } AddTrackedWindow(e) {} BIsUserIdle(e) { return this.GetUserIdleTime() > e; } AddOnIdleCallback(e, t) { this.RunOnIdleCallback(e, t); } AddOnNextActivityCallback(e) { this.m_rgActivityCallbacks.push(e); } Init() {} FireOnUserActivityCallbacks() { if (this.m_rgActivityCallbacks.length) { for (let e of this.m_rgActivityCallbacks) e(); this.m_rgActivityCallbacks = []; } } RunOnIdleCallback(e, t) { this.GetUserIdleTime() >= t - 1 ? e() : SetBackgroundTimeout(this.RunOnIdleCallback.bind(this, e, t), 1e3 * (t - this.GetUserIdleTime())); } } var s = n(2049), l = n(9824); class c extends a { constructor() { super(), (this.m_rgWindows = []), (this.m_bEventTrackingActive = !1), (this.m_msUserLastAction = performance.now()); } GetUserIdleTime() { return Math.floor((performance.now() - this.m_msUserLastAction) / 1e3); } AddTrackedWindow(e) { this.m_rgWindows.push(e), e.addEventListener("unload", this.RemoveTrackedWindow.bind(this, e)), this.m_bEventTrackingActive && this.BindEventsForWindow(e); } Init() { window.setTimeout(this.BindEvents.bind(this), 1e4); } RemoveTrackedWindow(e) { this.m_bEventTrackingActive && this.UnbindEventsForWindow(e), l.Zf(this.m_rgWindows, e); } OnUserAction() { (this.m_msUserLastAction = performance.now()), this.FireOnUserActivityCallbacks(), this.UnbindEvents(), window.setTimeout(this.BindEvents.bind(this), 1e4); } BindEvents() { if (!this.m_bEventTrackingActive) { this.m_bEventTrackingActive = !0; for (let e of this.m_rgWindows) this.BindEventsForWindow(e); } } UnbindEvents() { if (this.m_bEventTrackingActive) { this.m_bEventTrackingActive = !1; for (let e of this.m_rgWindows) this.UnbindEventsForWindow(e); } } UnbindEventsForWindow(e) { for (let t of c.sm_rgUserEvents) e.removeEventListener(t, this.OnUserAction); } BindEventsForWindow(e) { for (let t of c.sm_rgUserEvents) e.addEventListener(t, this.OnUserAction); } } (c.sm_rgUserEvents = ["mousemove", "mousedown", "keypress", "focus"]), (0, i.gn)([s.ak], c.prototype, "OnUserAction", null); class m extends c { constructor() { super(), (this.m_eActiveState = r.c4.k_EComputerActiveStateActive), (this.m_hRegisterForComputerActiveStateChange = null), (this.m_hFireUserStillActive = void 0); } Init() { this.m_hRegisterForComputerActiveStateChange = SteamClient.WebChat.RegisterForComputerActiveStateChange(this.OnComputerActiveStateChange); } OnComputerActiveStateChange(e, t) { let n = new Date().getTime() / 1e3 - t; (this.m_eActiveState = e), (this.m_msUserLastAction = Math.max(performance.now() - 1e3 * n, this.m_msUserLastAction)), this.m_eActiveState == r.c4.k_EComputerActiveStateActive && (this.m_hFireUserStillActive && (clearTimeout(this.m_hFireUserStillActive), (this.m_hFireUserStillActive = void 0)), this.UpdateStillActive()); } UpdateStillActive() { (this.m_hFireUserStillActive = void 0), this.m_eActiveState == r.c4.k_EComputerActiveStateActive && (this.OnUserAction(), (this.m_hFireUserStillActive = SetBackgroundTimeout(this.UpdateStillActive, 1e4))); } } (0, i.gn)([s.ak], m.prototype, "OnComputerActiveStateChange", null), (0, i.gn)([s.ak], m.prototype, "UpdateStillActive", null); var d, h = n(72746); class u { constructor(e) { this.m_FriendStore = e; } DisplayNotificationFromFriend(e, t, n = {}) { return this.DisplayNotification(Object.assign({ icon: e.persona.avatar_url_medium }, t), (t) => e.OpenChatDialog(t), n); } BNotificationsPermitted() { return !h.Ul.ParentalStore.BIsFriendsBlocked() && !h.Ul.SettingsStore.IsSteamInTournamentMode(); } RequestNotificationPermission() { return Promise.resolve(!0); } } !(function (e) { (e[(e.k_EClientUINotificationGroupChatMessage = 1)] = "k_EClientUINotificationGroupChatMessage"), (e[(e.k_EClientUINotificationFriendChatMessage = 2)] = "k_EClientUINotificationFriendChatMessage"), (e[(e.k_EClientUINotificationFriendPersonaState = 3)] = "k_EClientUINotificationFriendPersonaState"); })(d || (d = {})); class p extends u { DisplayNotification(e, t, n = {}) { if (e.tag) { let n = JSON.stringify(e); e.tag.startsWith("groupmsg_") ? SteamClient.ClientNotifications.DisplayClientNotification(d.k_EClientUINotificationGroupChatMessage, n, t) : e.tag.startsWith("message_") ? SteamClient.ClientNotifications.DisplayClientNotification(d.k_EClientUINotificationFriendChatMessage, n, t) : h.Ul.SettingsStore.BClientHasFeatureOrOnWeb("PersonaNotifications") && e.tag.startsWith("state_") && SteamClient.ClientNotifications.DisplayClientNotification(d.k_EClientUINotificationFriendPersonaState, n, t); } return Promise.resolve(); } } class _ extends u { GetNotificationPermissionLevel() { if ("undefined" == typeof Notification) return "unsupported"; let e = Notification.permission; return "default" == e || "granted" == e || "denied" == e ? e : "unsupported"; } DisplayNotification(e, t, n = {}) { let i = { body: e.body, icon: e.icon, tag: e.tag, silent: !0 }, r = new Notification(e.title, Object.assign({ badge: o.De.COMMUNITY_CDN_URL + "public/shared/images/responsive/share_steam_logo.png" }, i)); return ( window.setTimeout(() => { r.close(); }, n.timeoutMS || 5e3), r.addEventListener("click", () => this.OnNotificationClicked(r, t)), new Promise((e, t) => { r.addEventListener("close", () => { e(); }); }) ); } OnNotificationClicked(e, t) { t(h.D), e.close(); } BNotificationsPermitted() { return "granted" == this.GetNotificationPermissionLevel(); } RequestNotificationPermission() { return "unsupported" == this.GetNotificationPermissionLevel() ? Promise.resolve(!1) : this.BNotificationsPermitted() ? super.RequestNotificationPermission() : new Promise((e, t) => { Notification.requestPermission((t) => { e("granted" == t); }); }); } } var g = n(23503), C = n(33690), f = n(22394), v = n(93635); class S { constructor() { (this.m_bDropConsumed = !1), (this.m_onDropCompleteCallbacks = new f.pB()), (this.m_vecClasses = []); } BInDrag() { return !!this.m_data; } StartDrag(e) { (0, v.X)(!this.m_data, "second drag started, existing data discarded", this.m_data), (this.m_data = e), (this.m_bDropConsumed = !1), this.m_vecClasses.push("in_global_drag"), this.m_vecClasses.push("drag_type_" + e.type), void 0 !== e.source && this.m_vecClasses.push("drag_source_" + e.source); for (let e of Array.from(C.AN.GetPopups())) e.window && e.window.document.body && e.window.document.body.classList.add(...this.m_vecClasses); window.document.body.classList.add(...this.m_vecClasses); } EndDrag() { this.m_onDropCompleteCallbacks.Dispatch(this.m_bDropConsumed), this.m_onDropCompleteCallbacks.ClearAllCallbacks(), (this.m_data = void 0), (this.m_bDropConsumed = void 0); for (let e of Array.from(C.AN.GetPopups())) e.window && e.window.document.body && e.window.document.body.classList.remove(...this.m_vecClasses); window.document.body.classList.remove(...this.m_vecClasses), (this.m_vecClasses = []); } GetDragData() { return this.m_data; } BWasDropConsumed() { return this.m_bDropConsumed; } SetDropConsumed() { (0, v.X)(this.BInDrag(), "Asked to set drop consumed but no active drag"), (this.m_bDropConsumed = !0); } RegisterForDropComplete(e) { return this.m_onDropCompleteCallbacks.Register(e); } } var b = n(4638), I = n(1736), y = n(79588); class E { constructor(e, t) { (this.m_fnFillAppUsabilityMetrics = e), t.messageHandlers.RegisterServiceNotificationHandler(b.hq.NotifyRequestClientUsabilityMetricsHandler, (e) => (0, i.mG)(this, void 0, void 0, function* () { let t = I.gA.Init(b.y3); return t.Body().set_metrics_run_id(e.Body().metrics_run_id()), t.Body().set_metrics_version(3), t.Body().set_client_build(o.De.BUILD_TIMESTAMP), t.Body().set_in_web(!o.De.IN_CLIENT), h.Ul.ready_to_render || (yield (0, y.gx)(() => h.Ul.ready_to_render)), yield h.Ul.SettingsStore.FillInChatUsabilityMetrics(t.Body()), yield h.Ul.FriendStore.FillInChatUsabilityMetrics(t.Body()), yield h.Ul.ChatStore.FillInChatUsabilityMetrics(t.Body()), yield h.Ul.UIStore.FillInChatUsabilityMetrics(t.Body()), yield h.Ul.VoiceStore.FillInChatUsabilityMetrics(t.Body()), this.m_fnFillAppUsabilityMetrics && (yield this.m_fnFillAppUsabilityMetrics(t.Body())), b.uC.NotifyClientUsabilityMetrics(h.Ul.CMInterface.GetServiceTransport(), t), 1; }), ); } } var D = n(24292); class w { constructor() { (this.m_mapBrowserInfo = new Map()), (this.m_hOverlayChatBrowserInfoChanged = null); } Init(e) { (this.m_CMInterface = e), (this.m_hOverlayChatBrowserInfoChanged = SteamClient.WebChat.RegisterOverlayChatBrowserInfoChanged(this.OnOverlayChatBrowserInfoChanged)), this.m_CMInterface.RunWhenLoggedOn(() => { this.OnOverlayChatBrowserInfoChanged(); }); } HasOverlayInstance(e) { return this.m_mapBrowserInfo.has(e); } OnOverlayChatBrowserInfoChanged() { SteamClient.WebChat.GetOverlayChatBrowserInfo() .then((e) => { let t = new Map(this.m_mapBrowserInfo); for (let n of e) { t.delete(n.unPID); let e = { m_unPID: n.unPID, m_nBrowserID: n.nBrowserID, m_eBrowserType: n.eBrowserType, m_eUIMode: n.eUIMode }, i = this.m_mapBrowserInfo.get(n.unPID); i && (i.m_nBrowserID != n.nBrowserID ? (this.OverlayBrowserClosed(i), this.m_mapBrowserInfo.delete(n.unPID), (i = void 0)) : h.Ul.UIStore.OnOverlayBrowserChanged(e, n.nScreenWidth, n.nScreenHeight)), i || (this.m_mapBrowserInfo.set(n.unPID, e), this.OverlayBrowserCreated(e, n.nScreenWidth, n.nScreenHeight)); } t.forEach((e, t) => { this.m_mapBrowserInfo.delete(t), this.OverlayBrowserClosed(e); }); }) .catch((e) => { console.log("Failed to load overlay browser info:", e); }); } OverlayBrowserCreated(e, t, n) { var i; const o = Object.assign(Object.assign({}, e), { m_eUIMode: null !== (i = e.m_eUIMode) && void 0 !== i ? i : h.Ul.IsGamepadUIActive() ? 4 : 0 }); h.Ul.UIStore.OnOverlayBrowserCreated(o, t, n), 0 == o.m_eUIMode && yn.ShowPopupFriendsList(o, !1, !1), h.Ul.SetDefaultPopupContext(o); } OverlayBrowserClosed(e) { var t; const n = Object.assign(Object.assign({}, e), { m_eUIMode: null !== (t = e.m_eUIMode) && void 0 !== t ? t : h.Ul.IsGamepadUIActive() ? 4 : 0 }); h.Ul.UIStore.SetSuppressBrowserContextBroadcasting(!0), h.Ul.GetDefaultBrowserContext().m_nBrowserID == e.m_nBrowserID && h.Ul.GetDefaultBrowserContext().m_unPID == e.m_unPID && h.Ul.SetDefaultPopupContext(h.D), console.log("Removing overlay browser window:", e.m_unPID, e.m_nBrowserID), C.AN.ClosePopupsOwnedByBrowser(n), h.Ul.UIStore.SetSuppressBrowserContextBroadcasting(!1), h.Ul.UIStore.OnOverlayBrowserClosed(n); } } (0, i.gn)([s.ak], w.prototype, "OnOverlayChatBrowserInfoChanged", null); var R = n(96119), A = n(14206), M = n.n(A), k = n(50649), T = n(27378), L = n(84290), G = n(14341), O = n(41758), F = n(83817), B = n(16518); let x = class extends T.Component { constructor(e) { super(e), (this.state = { bSubscribed: !1, bDismissed: !1, bThumbnailLoaded: !1 }); } componentDidMount() { this.props.broadcaster.accountid != h.Ul.FriendStore.self.accountid && this.props.broadcastid && (h.Ul.BroadcastStore.SubscribeToBroadcastDetails(this.props.broadcastid, this.props.broadcaster.steamid64), this.setState({ bSubscribed: !0 })); } componentWillUnmount() { this.state.bSubscribed && h.Ul.BroadcastStore.UnsubscribeFromBroadcastDetails(this.props.broadcastid, this.props.broadcaster.steamid64); } OnWatch(e) { if ("undefined" != typeof SteamClient && void 0 !== SteamClient.WebChat) { let t = "steam://broadcast/watch/" + this.props.broadcaster.steamid64, n = ln(this, e); SteamClient.WebChat.OpenURLInClient(t, n.m_unPID, !1); } else { let t = `${o.De.COMMUNITY_BASE_URL}broadcast/watch/${this.props.broadcaster.steamid64}`; (0, G.b8)(e, t), e.stopPropagation(); } this.OnClose(); } OnClose() { this.setState({ bDismissed: !0 }); } OnOpen() { this.setState({ bDismissed: !1 }); } ShowThumbnail() { this.setState({ bThumbnailLoaded: !0 }); } render() { let e = h.Ul.AppInfoStore.GetAppInfo(this.props.appid), t = T.createElement("span", null, T.createElement("img", { src: e.icon_url, className: "productImage" }), T.createElement("span", { className: "productName" }, e.name)); if (this.props.broadcaster.accountid == h.Ul.FriendStore.self.accountid) { let e = this.props.viewer.display_name; return T.createElement("div", { className: "broadcastInviteSelf" }, this.props.appid ? (0, L.kQ)("#ChatRoom_BroadcastInvite_YouInvited", e, t) : (0, L.kQ)("#ChatRoom_BroadcastInvite_YouInvited_NoAppID", e)); } { let n = this.props.broadcaster.display_name; const i = h.Ul.BroadcastStore.GetBroadcastDetails(this.props.broadcastid, this.props.broadcaster.steamid64) || { strThumbnail: "", bExpired: !1 }; if (this.state.bDismissed || !this.props.broadcastid || i.bExpired) return T.createElement("div", { className: "broadcastInviteDismissed" }, this.props.appid ? (0, L.kQ)("#ChatRoom_BroadcastInvite_Expired", n, t) : (0, L.kQ)("#ChatRoom_BroadcastInvite_Expired_NoAppID", n)); let r = o.De.COMMUNITY_CDN_URL + "public/images/broadcast/apphub_default_thumbnail.jpg", a = (0, L.kQ)("#ChatRoom_BroadcastInvite_Invite", n); return T.createElement( F.s, { className: "msg ChatMessageInvite broadcastInviteMsg", focusable: !0, onOKButton: this.OnWatch, onOKActionDescription: (0, L.Xx)("#ChatRoom_BroadcastInvite_Watch"), onCancel: this.OnClose, onCancelActionDescription: (0, L.Xx)("#ChatRoom_BroadcastInvite_Dismiss") }, T.createElement("div", { className: "leftInviteContainer" }, T.createElement("img", { src: i.strThumbnail, onLoad: this.ShowThumbnail, className: "broadcastThumbnail" + (this.state.bThumbnailLoaded ? " loaded" : "") }), T.createElement("img", { src: r, className: "broadcastThumbnail broadcastThumbnailFallback" + (this.state.bThumbnailLoaded ? "" : " loaded") }), T.createElement("div", { className: "noisePattern" })), T.createElement("div", { className: "rightInviteContainer" }, T.createElement(O.v$, null, T.createElement("div", { className: "centerBlock" }, T.createElement("div", { className: "inviteLabel" }, a), T.createElement("div", { className: "productName" }, e.name))), T.createElement("button", { className: "DialogButton Primary inviteButtonWatchBroadcast", onClick: this.OnWatch }, (0, L.Xx)("#ChatRoom_BroadcastInvite_Watch")), T.createElement("div", { className: "closeButton", onClick: this.OnClose }, T.createElement(B.pVO, null))), ); } } }; (0, i.gn)([s.ak], x.prototype, "OnWatch", null), (0, i.gn)([s.ak], x.prototype, "OnClose", null), (0, i.gn)([s.ak], x.prototype, "OnOpen", null), (0, i.gn)([s.ak], x.prototype, "ShowThumbnail", null), (x = (0, i.gn)([k.Pi], x)); var N = n(49367); let P = class extends T.Component { constructor(e) { super(e), (this.m_pollTimeout = void 0), (this.m_broadcastid = void 0), (this.m_bExpired = !1), (this.state = { strThumbnail: "", nUpdateInterval: 10, bThumbnailLoaded: !1, nThumbnailUpdateCounter: 0 }); } OnAccept(e) { h.Ul.BroadcastStore.ApproveViewerRequest(this.props.viewer.accountid, this.props.requestid); } OnClose() { h.Ul.BroadcastStore.RejectViewerRequest(this.props.viewer.accountid, this.props.requestid); } ShowThumbnail() { this.setState({ bThumbnailLoaded: !0 }); } render() { let e = h.Ul.AppInfoStore.GetAppInfo(this.props.appid), t = T.createElement("span", null, T.createElement("img", { src: e.icon_url, className: "productImage" }), T.createElement("span", { className: "productName" }, e.name)), n = this.props.viewer.display_name, i = h.Ul.BroadcastStore.GetRequestState(this.props.viewer.accountid, this.props.requestid), r = void 0 !== this.m_broadcastid && this.m_broadcastid != h.Ul.BroadcastStore.broadcastid; if ((void 0 === this.m_broadcastid && "0" !== h.Ul.BroadcastStore.broadcastid && (this.m_broadcastid = h.Ul.BroadcastStore.broadcastid), r || i != N.c$.k_EPending)) { let e = "#ChatRoom_BroadcastViewRequest_Expired"; return i == N.c$.k_EAccepted ? (e = "#ChatRoom_BroadcastViewRequest_Accepted") : i == N.c$.k_ERejected && (e = "#ChatRoom_BroadcastViewRequest_Dismissed"), T.createElement("div", { className: "broadcastViewRequestDismissed" }, (0, L.kQ)(e, n, t)); } let a = o.De.COMMUNITY_CDN_URL + "public/images/broadcast/apphub_default_thumbnail.jpg", s = (this.state.bThumbnailLoaded, this.state.nThumbnailUpdateCounter), l = (0, L.kQ)("#ChatRoom_BroadcastViewRequest_Invite", n); return T.createElement( "div", { className: "msg ChatMessageInvite broadcastInviteMsg broadcastViewRequestMsg" }, T.createElement("div", { className: "leftInviteContainer" }, this.state.strThumbnail && T.createElement("img", { src: this.state.strThumbnail + "?n=" + s, onLoad: this.ShowThumbnail, className: "broadcastThumbnail" + (this.state.bThumbnailLoaded ? " loaded" : "") }), T.createElement("img", { src: a, className: "broadcastThumbnail broadcastThumbnailFallback" + (this.state.bThumbnailLoaded ? "" : " loaded") }), T.createElement("div", { className: "noisePattern" })), T.createElement("div", { className: "rightInviteContainer" }, T.createElement(O.v$, null, T.createElement("div", { className: "centerBlock" }, T.createElement("div", { className: "inviteLabel" }, l), T.createElement("div", { className: "productName" }, e.name))), T.createElement("button", { className: "inviteButton inviteButtonWatchBroadcast", onClick: this.OnAccept }, (0, L.Xx)("#ChatRoom_BroadcastViewRequest_Accept")), T.createElement("div", { className: "closeButton", onClick: this.OnClose })), ); } }; (0, i.gn)([s.ak], P.prototype, "OnAccept", null), (0, i.gn)([s.ak], P.prototype, "OnClose", null), (0, i.gn)([s.ak], P.prototype, "ShowThumbnail", null), (P = (0, i.gn)([k.Pi], P)); class U extends T.Component { constructor(e) { super(e), (this.m_pollTimeout = void 0), (this.m_broadcastid = void 0), (this.m_bExpired = !1), (this.state = { strThumbnail: "", nUpdateInterval: 10, bThumbnailLoaded: !1, nThumbnailUpdateCounter: 0 }); } OnWatch(e) { if ("undefined" != typeof SteamClient && void 0 !== SteamClient.WebChat) { let t = "steam://broadcast/watch/" + this.props.broadcaster.steamid64, n = ln(this, e); SteamClient.WebChat.OpenURLInClient(t, n.m_unPID, !1); } else { let t = `${o.De.COMMUNITY_BASE_URL}broadcast/watch/${this.props.broadcaster.steamid64}`; (0, G.b8)(e, t), e.stopPropagation(); } } ShowThumbnail() { this.setState({ bThumbnailLoaded: !0 }); } render() { let e = this.props.broadcaster.current_game_name, t = this.props.broadcaster.display_name, n = o.De.COMMUNITY_CDN_URL + "public/images/broadcast/apphub_default_thumbnail.jpg", i = (this.state.bThumbnailLoaded, this.state.nThumbnailUpdateCounter), r = (0, L.kQ)("#ChatRoom_BroadcastInvite_WatchGame", t); return T.createElement( "div", { className: "msg ChatMessageInvite broadcastInviteMsg", style: { padding: 0, display: "flex", overflow: "hidden" } }, T.createElement("div", { className: "leftInviteContainer" }, this.state.strThumbnail && T.createElement("img", { src: this.state.strThumbnail + "?n=" + i, onLoad: this.ShowThumbnail, className: "broadcastThumbnail" + (this.state.bThumbnailLoaded ? " loaded" : "") }), T.createElement("img", { src: n, className: "broadcastThumbnail broadcastThumbnailFallback" + (this.state.bThumbnailLoaded ? "" : " loaded") }), T.createElement("div", { className: "noisePattern" })), T.createElement("div", { className: "rightInviteContainer" }, T.createElement(O.v$, null, T.createElement("div", { className: "centerBlock" }, T.createElement("div", { className: "inviteLabel" }, r), e && T.createElement("div", { className: "productName" }, e))), T.createElement("button", { className: "DialogButton Primary inviteButtonWatchBroadcast", onClick: this.OnWatch }, (0, L.Xx)("#ChatRoom_BroadcastInvite_Watch"))), ); } } (0, i.gn)([s.ak], U.prototype, "OnWatch", null), (0, i.gn)([s.ak], U.prototype, "ShowThumbnail", null); var V = n(46057), H = n(97669); let W = class extends T.Component { constructor() { super(...arguments), (this.state = { bCanAcceptRemotePlayInvite: !1 }); } componentDidMount() { return (0, i.mG)(this, void 0, void 0, function* () { if (this.props.gameInvite.remoteplayString) { let e = this.props.gameInvite.remoteplayString.split("&"), t = "restricted_countries=", n = ""; e.forEach((e) => { e.startsWith(t) && (n = e.slice(t.length)); }); const i = yield h.Ul.RemotePlayStore.BCanAcceptInviteForGame(this.props.gameInvite.appID.toString(), n); this.setState({ bCanAcceptRemotePlayInvite: i }); } }); } AcceptGameInvite() { this.props.gameInvite.AcceptGameInvite(); } BCanAcceptVoiceChat() { let e = this.props.inviter, t = 2 == e.efriendrelationship, n = 4 == e.efriendrelationship, i = e.persona.is_online && !t && !n && !e.is_blocked; return !h.Ul.VoiceStore.IsAnyVoiceActive() && i; } AcceptGameInviteAndVoiceChat() { this.props.gameInvite.AcceptGameInvite(), this.BCanAcceptVoiceChat() && h.Ul.UIStore.ShowFriendChatDialogAndStartVoice(h.Ul.GetDefaultBrowserContext(), this.props.inviter.accountid); } DismissInvite() { this.props.gameInvite.DismissInvite(); } OnShowGameContextMenu(e) { (0, V.HR)(ln(this, e), this.props.gameInvite.appID, e); } render() { let e = h.Ul.AppInfoStore.GetAppInfo(this.props.gameInvite.appID); if ((e || ((e = new H.Am(this.props.gameInvite.appID)), e.DeserializeFromCacheObject({ strName: (0, L.Xx)("#ChatRoom_GameInvite_UnreleasedGame"), strIconURL: "", strLogoURL: "", eAppType: 1 })), h.Ul.FriendStore.self == this.props.inviter)) { let t = this.props.inviteTarget.display_name, n = this.props.gameInvite.remoteplayString ? "#ChatRoom_GameInviteRemotePlay_YouInvited" : "#ChatRoom_GameInvite_YouInvited"; return T.createElement("div", { className: "gameInviteSelf" }, T.createElement("div", { onClick: this.OnShowGameContextMenu }, (0, L.kQ)(n, t, T.createElement("img", { src: e.icon_url, className: "productImage" }), e.name))); } if (this.props.gameInvite.bOld || this.props.gameInvite.bDismissed || this.props.inviter.persona.m_unGamePlayedAppID != this.props.gameInvite.appID) { let t = this.props.inviter.display_name, n = this.props.gameInvite.remoteplayString ? "#ChatRoom_GameInviteRemotePlay_Dismissed" : "#ChatRoom_GameInvite_Dismissed"; return T.createElement("div", { className: "gameInviteDismissed" }, T.createElement("div", { onClick: this.OnShowGameContextMenu }, (0, L.kQ)(n, t, T.createElement("img", { src: e.icon_url, className: "productImage" }), e.name))); } if (this.props.gameInvite.bAccepted) { let t = this.props.gameInvite.remoteplayString ? "#ChatRoom_GameInviteRemotePlay_Accepted" : "#ChatRoom_GameInvite_Accepted"; return T.createElement("div", { className: "gameInviteAccepted" }, T.createElement("div", { onClick: this.OnShowGameContextMenu }, (0, L.kQ)(t, T.createElement("img", { src: e.icon_url, className: "productImage" }), e.name))); } if (this.props.gameInvite.remoteplayString && !this.state.bCanAcceptRemotePlayInvite) { let t = this.props.inviter.display_name, n = "#ChatRoom_GameInviteRemotePlay_CantAccept"; return T.createElement("div", { className: "gameInviteDismissed" }, T.createElement("div", { onClick: this.OnShowGameContextMenu }, (0, L.kQ)(n, t, T.createElement("img", { src: e.icon_url, className: "productImage" }), e.name))); } let t = this.props.inviter, n = null, i = t.persona.player_group_size - 1; if (t.persona.m_unGamePlayedAppID == this.props.gameInvite.appID && t.persona.player_group_size > 0) { let e = t.persona.player_group; if (e) { n = h.Ul.FriendStore.FriendGroupStore.ingame_group.member_list.map((n) => (n != t && n.persona.player_group == e ? (i--, T.createElement(V.o2, { key: n.accountid, friend: n, context: null })) : null)).filter(Boolean); } } let o = { paddingLeft: 0, display: "flex", alignItems: "stretch", overflow: "hidden" }; this.props.chatGutterWidth && (o.marginLeft = "-" + this.props.chatGutterWidth + "px"); let r = this.props.gameInvite.remoteplayString ? "#ChatRoom_GameInviteRemotePlay_Invite" : "#ChatRoom_GameInvite_Invite", a = (0, L.kQ)(r, this.props.inviter.display_name), s = this.props.gameInvite.remoteplayString && this.BCanAcceptVoiceChat() && h.Ul.VoiceStore.BPartnerHasAcceptedOrInitiatedOneOnOneChat(this.props.inviter.accountid), l = h.Ul.ParentalStore.BIsAppBlocked(this.props.gameInvite.appID), c = (null == n ? void 0 : n.length) || i > 0; return T.createElement( F.s, { className: "msg ChatMessageInvite gameInviteMsg", style: o, onOKButton: l ? null : this.AcceptGameInvite, onOKActionDescription: l ? null : (0, L.Xx)("#ChatRoom_GameInvite_Accept") }, T.createElement("div", { className: "leftInviteContainer", style: { overflow: "visible" } }, T.createElement("img", { src: e.header_image_url, className: "productImage productImageBlur" }), T.createElement("img", { src: e.header_image_url, className: "productImage" })), T.createElement( "div", { className: "rightInviteContainer" }, T.createElement("div", { className: "centerBlock" }, T.createElement("div", { className: "invitedTimeLabel" }, (0, L.Xx)("#ChatRoom_GameInvite_InviteTime"), T.createElement(G.tS, { rtime: this.props.gameInvite.rtTimestamp, bTimeOnly: !0 })), T.createElement(O.v$, null, T.createElement("div", { className: "inviteLabel" }, a)), T.createElement(O.v$, null, T.createElement("div", { className: "productName" }, e.name)), c && T.createElement(O.v$, null, T.createElement("div", { className: "playingWithBlock" }, T.createElement("div", null, (0, L.Xx)("#ChatRoom_GameInvite_PlayingWith")), T.createElement("div", { className: "playingWithAvatars" }, T.createElement("div", { className: "playingWithLine" }), n, i > 0 && T.createElement("div", { className: "playingWithExtraCount" }, (0, L.Xx)("#ChatRoom_GameInvite_PartyMore", i), " "))))), T.createElement("div", { className: "acceptButtonsGroup" }, l ? T.createElement("div", null, (0, L.Xx)("#ChatRoom_GameInvite_Family_View")) : T.createElement(T.Fragment, null, T.createElement("button", { className: "DialogButton GreenPlay", onClick: this.AcceptGameInvite }, (0, L.Xx)("#ChatRoom_GameInvite_Accept")), s && T.createElement("button", { className: "DialogButton GreenPlay", onClick: this.AcceptGameInviteAndVoiceChat }, (0, L.Xx)("#ChatRoom_GameInvite_Accept_And_Voice_Chat")))), T.createElement("div", { className: "closeButton", onClick: this.DismissInvite }, T.createElement(B.pVO, null)), ), ); } }; (0, i.gn)([s.ak], W.prototype, "AcceptGameInvite", null), (0, i.gn)([s.ak], W.prototype, "BCanAcceptVoiceChat", null), (0, i.gn)([s.ak], W.prototype, "AcceptGameInviteAndVoiceChat", null), (0, i.gn)([s.ak], W.prototype, "DismissInvite", null), (0, i.gn)([s.ak], W.prototype, "OnShowGameContextMenu", null), (W = (0, i.gn)([k.Pi], W)); var X = n(88669), j = n(25629), z = n(618), K = n(71357), q = n(68816), Z = n(99165), Q = n(10553); const $ = (0, h.R6)(function (e, t, n) { (0, q.BR)(T.createElement(ee, Object.assign({}, e, { bIsInviteDialog: !0 })), n, "InviteDialog", { strTitle: "Invite", popupWidth: 540, popupHeight: 260 }, mn(n)); }); let Y = class extends T.Component { AcceptInvite(e) { let t = X.RA(e); h.Ul.ChatStore.InviteStore.AcceptInvite(this.props.invite, ln(this, e)).then((e) => { this.HandleJoinResult(t, e); }); } HandleJoinResult(e, t) { const n = (0, j.qH)(t); n && (0, K.zp)(e, (0, L.Xx)("#ChatRoom_InviteMessage_Header"), n, (0, L.Xx)("#Button_OK")), this.props.onAccept && this.props.onAccept(); } render() { var e, t; let n = this.props.invite; if (!n || !n.BIsReady()) return T.createElement("div", { className: "ChatMessageInvite RequestingInfo displayRow" }, T.createElement(Z.V, { size: "small" }), T.createElement("div", { className: "postedExpiredInvite" }, (0, L.Xx)("#bbcode_invite_requesting_info"))); if (!n.BIsValid()) return T.createElement("div", { className: "ChatMessageInvite InviteExpired" }, T.createElement("div", { className: "postedExpiredInvite" }, (0, L.Xx)("#bbcode_invite_no_longer_valid"))); let i = this.props.inviter && h.Ul.FriendStore.self.accountid == this.props.inviter.accountid, o = h.Ul.ChatStore.GetChatRoomGroup(n.GetChatRoomGroupID()), r = o && o.BIsCurrentUserAMember(), a = n.BIsExpired(), s = o && o.name, l = "", c = "ChatMessageInvite NoBGSplitInvite", m = "inviteButton inviteButtonJoinChat"; this.props.strClassName && (c += " " + this.props.strClassName); let d, u, p = n.BIsInviteLink(), _ = n.BIsVoiceChatInvite(); if (_) { (m += " inviteButtonJoinVoice"), (c += " VoiceChannelInvite"); let e = o.GetChatRoom(n.GetChatID()); e && (l = e.name); } if ((this.props.bIsInviteDialog || (r && !i && (c += " GroupAlreadyJoined"), i && (c += " Inviter")), p && (c += " InviteLink"), a)) c += " InviteExpired"; else if (n.BNeverExpires()) d = T.createElement("div", { className: "Invite_ExpireTime" }, (0, L.Xx)("#bbcode_invite_never_expires")); else { let e = h.Ul.RTime32ToDate(n.time_expires); d = T.createElement("div", { className: "Invite_ExpireTime" }, (0, L.Xx)("#bbcode_invite_expires", e.toLocaleTimeString(), e.toDateString())); } u = i ? (_ ? (0, L.Xx)("#Voice_StartTalking") : (0, L.Xx)("#ChatRoom_Invite_Accept_Inviter")) : _ ? (0, L.Xx)("#Voice_StartTalking") : r ? (0, L.Xx)("#ChatRoom_Invite_Accept_Inviter") : (0, L.Xx)("#ChatRoom_Invite_Accept"); let g = null, C = !1; if (n.BIsUserBanned()) (C = !0), (g = T.createElement("div", null, (0, L.Xx)("#bbcode_invite_banned_forever"))); else if (n.GetTimeKickExpires() && n.GetTimeKickExpires() > h.Ul.GetServerRTime32()) { C = !0; let e = h.Ul.RTime32ToDate(n.GetTimeKickExpires()).toLocaleString([], { weekday: "long", year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric" }); g = T.createElement("div", null, (0, L.Xx)("#bbcode_invite_banned_until", e)); } let f = this.props.inviter && r, v = !f && !i, S = _ ? l : s; return T.createElement( O.v$, { text: [u, S, n.GetURL()] }, T.createElement( F.s, { className: c, focusable: !0, onActivate: a || C ? null : this.AcceptInvite }, T.createElement("div", { className: "leftInviteContainer" }, T.createElement(z._P, { group: o, small: f, large: v }), _ && T.createElement("div", null, T.createElement(B.Cq4, null))), T.createElement("div", { className: "rightInviteContainer" + (r || i ? " rightInvite_Horizontal" : "") }, T.createElement("div", { className: "rightInviteContainerContent" }, T.createElement(J, { invite: this.props.invite, inviter: this.props.inviter, invitee: this.props.invitee }), T.createElement("div", null, T.createElement("div", { className: "groupName" }, S)), p && T.createElement(te, { url: n.GetURL(), bDisabled: n.BIsExpired() }), g, !i && r && !_ && T.createElement("div", null, T.createElement("span", { className: "groupAlreadyJoined" }, (0, L.Xx)("#bbcode_invite_already_group_member")))), !a && !C && !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && T.createElement("button", { className: m, type: "button", onClick: this.AcceptInvite }, u), !a && !C && (null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) && T.createElement(F.s, { className: m, onOKButton: this.AcceptInvite }, u)), ((!i && !r) || p) && d, T.createElement("div", { style: { clear: "left" } }), ), ); } }; (Y.contextType = Q.E_), (0, i.gn)([s.ak], Y.prototype, "AcceptInvite", null), (Y = (0, i.gn)([k.Pi], Y)); let J = (0, k.Pi)((e) => { let t = e.invite, n = e.inviter, i = e.invitee, o = t.BIsVoiceChatInvite(), r = t.BIsInviteLink(), a = e.inviter && h.Ul.FriendStore.self.accountid == e.inviter.accountid, s = h.Ul.ChatStore.GetChatRoomGroup(t.GetChatRoomGroupID()).name, l = (0, L.Xx)("#bbcode_invite_youre_invited"); return ( a ? (l = o ? (r ? (0, L.kQ)("#bbcode_invite_you_shared_voice_link", T.createElement("span", { className: "inviteHighlight" }, s, " ")) : (0, L.kQ)("#bbcode_invite_you_invited_friend_voice", T.createElement("span", { className: "inviteHighlight" }, i.display_name, " "), T.createElement("span", { className: "inviteHighlight" }, s, " "))) : r ? (0, L.kQ)("#bbcode_invite_you_shared_invite_link") : (0, L.kQ)("#bbcode_invite_you_invited_friend", T.createElement("span", { className: "inviteHighlight" }, i.display_name, " "))) : n && (l = o ? (r ? (0, L.kQ)("#bbcode_invite_voice_url_description", T.createElement("span", { className: "inviteHighlight" }, n.display_name, " "), T.createElement("span", { className: "inviteHighlight" }, s, " ")) : (0, L.kQ)("#bbcode_invite_voice_description", T.createElement("span", { className: "inviteHighlight" }, n.display_name, " "), T.createElement("span", { className: "inviteHighlight" }, s, " "))) : r ? (0, L.kQ)("#bbcode_invite_url_description", T.createElement("span", { className: "inviteHighlight" }, n.display_name, " ")) : (0, L.kQ)("#bbcode_invite_description", T.createElement("span", { className: "inviteHighlight" }, n.display_name, " "))), T.createElement("div", { className: "inviteLabel" }, l) ); }); class ee extends T.Component { render() { let e = this.props, { closeModal: t, onAccept: n, strClassName: o } = e, r = (0, i._T)(e, ["closeModal", "onAccept", "strClassName"]); return ( (o = "InviteDialog" + (o ? " " + o : "")), T.createElement( q.e1, { onEscKeypress: t }, T.createElement( Y, Object.assign({}, r, { strClassName: o, onAccept: () => { this.props.closeModal && this.props.closeModal(), n && n(); }, }), ), ) ); } } class te extends T.Component { CopyToClipboard(e) { X.J$(this.props.url); } HandleFocus(e) { e.currentTarget.select(); } render() { let e = this.props.strLabel || (0, L.Xx)("#bbcode_invite_url_desc"); return T.createElement("div", { className: "inviteURLContainer" }, T.createElement("span", { className: "inviteURLLinkDesc" }, e), T.createElement("div", { className: "inviteURLAndCopy" }, T.createElement("input", { className: "inviteURLLink", value: this.props.bDisabled ? (0, L.Xx)("#bbcode_invite_link_text_expired") : this.props.url, onFocus: this.HandleFocus, onClick: this.HandleFocus, readOnly: !0 }), !this.props.bDisabled && T.createElement("span", { className: "copyInviteLink", onClick: this.CopyToClipboard, title: (0, L.Xx)("#Chat_Copy_Clipboard") }, T.createElement(B.h9, null)))); } } (0, i.gn)([s.ak], te.prototype, "CopyToClipboard", null), (0, i.gn)([s.ak], te.prototype, "HandleFocus", null); var ne = n(87018), ie = n(257), oe = n.n(ie); class re extends T.Component { CheckLoadPrettify() { if (!this.m_preElem) return; let e = this.m_preElem.ownerDocument.defaultView; if (!e || "object" == typeof e.PR || !0 === e.PR) return; e.PR = !0; let t = e.document.createElement("script"); e.document.head.appendChild(t), (t.onload = () => { this.TryRunPrettyPrint(); }), (t.src = o.De.COMMUNITY_CDN_ASSET_URL + "prettify/prettify.js"); } BindRef(e) { this.m_preElem = e; } TryRunPrettyPrint() { if ((this.CheckLoadPrettify(), !this.m_preElem)) return; let e = this.m_preElem.ownerDocument.defaultView; e && "object" == typeof e.PR && e.PR.prettyPrint(); } componentDidMount() { this.TryRunPrettyPrint(); } componentDidUpdate() { this.TryRunPrettyPrint(); } render() { return T.createElement("div", null, T.createElement("pre", { className: (0, ne.Z)("prettyprint", oe().CodeMessage), ref: this.BindRef }, this.props.children)); } } (0, i.gn)([s.ak], re.prototype, "BindRef", null); const ae = ({ children: e }) => T.createElement("div", null, T.createElement("pre", { className: oe().PreMessage }, e)), se = ({ children: e }) => T.createElement("div", { className: oe().QuoteMessage }, e), le = ({ children: e }) => T.createElement(O.v$, { text: e }, T.createElement("div", { className: "spoilerMsgText" }, T.createElement("div", { className: "spoilerMsg" }, e))); var ce = n(92883), me = n(31542); const de = /^(?:(?:([\d]+)h)?(?:([\d]+)m)?(?:([\d]+)s)?|([\d]+))$/; function he(e) { const t = de.exec(e); if (!((null == t ? void 0 : t[1]) || (null == t ? void 0 : t[2]) || (null == t ? void 0 : t[3]) || (null == t ? void 0 : t[4]))) return; if (null == t ? void 0 : t[4]) return parseInt(null == t ? void 0 : t[4]); let n = 0; return (null == t ? void 0 : t[1]) && (n += 3600 * parseInt(t[1])), (null == t ? void 0 : t[2]) && (n += 60 * parseInt(t[2])), (null == t ? void 0 : t[3]) && (n += parseInt(t[3])), n; } var ue = n(88991), pe = n(62902), _e = n(98004), ge = n(26671), Ce = n(37153), fe = n(11259), ve = n(51579), Se = n(18608), be = n(39353), Ie = n(97063), ye = n(59702), Ee = n(21298), De = n(61752), we = n(36175), Re = n(90406), Ae = n(44550), Me = n.n(Ae), ke = n(19339), Te = n(13114); function Le(e) { var t, n, i, o, r, a; if (e.context.chat instanceof ke.a) { let s = e.args.appid, l = h.Ul.AppInfoStore.GetAppInfo(parseInt(s)).name; const c = (null === (t = e.args) || void 0 === t ? void 0 : t.connectString) || (null === (n = e.args) || void 0 === n ? void 0 : n.remoteplay) || (null === (i = e.args) || void 0 === i ? void 0 : i.lobbyID) ? (0, Te.gh)(e.context.chat.chat_partner.accountid, parseInt(s), null === (o = e.args) || void 0 === o ? void 0 : o.connectString, null === (r = e.args) || void 0 === r ? void 0 : r.remoteplay, null === (a = e.args) || void 0 === a ? void 0 : a.lobbyID) : void 0; let m = ""; return (m = e.context.unAccountIDSender === e.context.chat.self.accountid ? (e.args.remoteplay ? "#ChatRoom_GameInviteRemotePlay_YouInvited" : "#ChatRoom_GameInvite_YouInvited") : e.args.remoteplay ? "#Friend_Notification_GameInviteRemotePlay" : "#Friend_Notification_GameInvite"), { title: "", body: (0, L.Xx)(m, e.context.chat.chat_partner.display_name, l, ""), state: c }; } return null; } function Ge(e) { if (e.context.chat instanceof ke.a) { let t = e.args.appid, n = e.args.lobbyid, i = h.Ul.AppInfoStore.GetAppInfo(parseInt(t)).name; return { title: "", body: e.context.unAccountIDSender === e.context.chat.self.accountid ? (0, L.Xx)("#Friend_Notification_GameInviteYouInvited", e.context.chat.chat_partner.display_name, i) : (0, L.Xx)("#Friend_Notification_GameInvite", e.context.chat.chat_partner.display_name, i), state: "steam://joinlobby/" + t + "/" + n + "/" + e.context.chat.chat_partner.steamid64.toString() }; } return null; } function Oe(e) { if (e.context.chat instanceof ke.a) { return null != e.args.chatid ? { title: "", body: e.context.unAccountIDSender === e.context.chat.self.accountid ? (0, L.Xx)("#bbcode_invite_you_invited_friend_voice", e.context.chat.chat_partner.display_name, e.args.chatname) : (0, L.Xx)("#Friend_Notification_InviteVoice", e.context.chat.chat_partner.display_name, e.args.chatname) } : { title: "", body: e.context.unAccountIDSender === e.context.chat.self.accountid ? (0, L.Xx)("#bbcode_invite_you_invited_friend", e.context.chat.chat_partner.display_name) : (0, L.Xx)("#Friend_Notification_Invite", e.context.chat.chat_partner.display_name, e.args.chatgroupname) }; } return null; } function Fe(e) { const t = e.context.chat; return t instanceof ke.a ? { title: (0, L.Xx)("#TradeOffer_FriendSentYou", t.chat_partner.display_name), body: e.text } : null; } function Be(e) { return { body: (0, L.Xx)("#Notification_Spoiler") }; } function xe(e) { const t = h.Ul.FriendStore.GetPlayer(e.context.unAccountIDSender), n = e.args.type; if (!n) return null; const i = e.context.chat.ChatStore.ChatRoomEffectSettings[n]; return i && i.locToken ? { body: (0, L.Xx)(i.locToken, t.display_name) } : null; } Pe("#bbcode_random_description"), Pe("#bbcode_flip_description"), Pe("#bbcode_video_description"), Pe("#bbcode_inviteurl_description"), Pe("#bbcode_image_description"); const Ne = Pe("#bbcode_sticker_description"); function Pe(e) { return (t) => { const n = h.Ul.FriendStore.GetPlayer(t.context.unAccountIDSender); return { body: (0, L.Xx)(e, n.display_name) }; }; } var Ue = n(37091), Ve = n(73085); function He(e) { const { href: t, copyText: n, loadFailed: i, children: o } = e; let r = "NonInlinedEmbed"; return i && (r += " LoadFailed"), T.createElement(O.v$, { text: n || t, style: "merge-adjacent" }, T.createElement("div", { className: r }, T.createElement(Ue.ns, { href: t, title: t }, o))); } function We(e) { const { preference: t, render: n, fallbackHref: i, fallbackRender: o, children: r } = e, a = (0, Ve.d)(h.Ul.CookiePreferenceStore); if (!a) return null; return h.Ul.CookiePreferenceStore.CheckThirdPartyCookiePreference(a, t) ? (n ? n() : r) : o ? o() : T.createElement(He, { href: i }, i); } var Xe, je = n(5997); const ze = function (e) { return T.createElement(T.Fragment, null); }; function Ke(e) { return T.createElement(T.Suspense, { fallback: null }, T.createElement(ze, Object.assign({}, e))); } function qe() { return { url: Qe, youtube: tt, filteredurl: Gt, emoticon: Ft, img: ot, video: lt, og: dt, tweet: ht, inviteurl: It, publishedfile: At, tradeofferlink: Mt, econitem: Lt, steamstore: xt, broadcast: Tt, oembed: ut, spoiler: _t, plusone: gt, flip: Ct, random: ft, quote: vt, pre: St, code: bt, roomeffect: Nt, sticker: Pt }; } function Ze(e) { if ("string" == typeof e) return e; let t = ""; return ( T.Children.forEach(e, (e) => { if ("string" != typeof e) { if ("object" == typeof e && e.props) { let n = e.props["bbcode-text"]; n && (t += n); } } else t += e; }), t ); } let Qe = class extends ce.fb { render() { let e = this.GetArgument(), t = this.props.children, n = null, i = De.H8(e); return i != e && (n = i), (t && !this.GetArgument("fromclient")) || (n = i), h.Ul.SettingsStore.FriendsSettings.bDisableEmbedInlining && "string" != typeof t ? T.createElement(He, { href: e }, T.createElement(B.nWq, null), i) : T.createElement(O.v$, { text: e, style: "merge-adjacent" }, T.createElement(G.ns, { href: e }, n || t)); } }; Qe = (0, i.gn)([k.Pi], Qe); class $e extends T.Component { constructor(e) { super(e); let t = h.Ul.ChatStore.EmbedStore.GetCollapsedState(this.props.unAccountIDSender, this.props.msgUniqueKey), n = h.Ul.ChatStore.EmbedStore.GetWidths(this.props.unAccountIDSender, this.props.msgUniqueKey); (this.state = { nResizedWidth: t ? 16 : n ? n.nDesiredWidth : 0, bResized: void 0 !== n, bIsResizing: !1, bIsRestoring: !1, bMinimized: t, bIsMinimizing: !1 }), (this.m_frameInitialXPos = -1), (this.m_frameInitialYPos = -1), (this.m_frameInitialWidth = -1), (this.m_frameDefaultWidth = n ? n.nDefaultWidth : -1), (this.m_frameDesiredWidth = n ? n.nDesiredWidth : -1); } BindContainer(e) { (this.m_elContainer = e), this.m_elContainer && this.props.height > 450 && this.HandleTallImages(); } handleCollapse(e) { this.state.bMinimized || (this.m_frameDesiredWidth = this.m_elContainer.clientWidth), this.m_animationCollapse && this.m_animationCollapse.Cancel(); let t = !this.state.bMinimized, n = t ? this.m_frameDesiredWidth : 16, i = t ? 16 : this.m_frameDesiredWidth; this.setState({ nResizedWidth: n, bMinimized: !1, bIsMinimizing: !0 }, () => { (this.m_animationCollapse = new be.P(this, { nResizedWidth: i }, { msDuration: 300, timing: "sine", setStateOnComplete: { bMinimized: t, bIsMinimizing: !1 }, onComplete: this.OnSizeChanged })), this.m_animationCollapse.Start(); }), h.Ul.ChatStore.EmbedStore.SetCollapsedState(this.props.unAccountIDSender, this.props.msgUniqueKey, t); } OnSizeChanged() { this.props.onSizeChanged("BBCodeResizableComponent " + this.props.msgUniqueKey + this.state.bResized + this.state.bMinimized); } handleRestore(e) { this.state.bResized && (this.m_animationCollapse && this.m_animationCollapse.Cancel(), this.setState({ bIsRestoring: !0 }, () => { (this.m_animationCollapse = new be.P(this, { nResizedWidth: this.m_frameDefaultWidth }, { msDuration: 300, timing: "sine", setStateOnComplete: { bMinimized: !1, bIsRestoring: !1, bResized: !1 }, onComplete: this.OnSizeChanged })), this.m_animationCollapse.Start(); }), h.Ul.ChatStore.EmbedStore.SetWidths(this.props.unAccountIDSender, this.props.msgUniqueKey, this.m_frameDefaultWidth, this.m_frameDefaultWidth)); } OnResize(e) { let t = e.currentTarget.ownerDocument.defaultView; t.addEventListener("mousemove", this.HandleMouseMove), t.addEventListener("mouseup", this.HandleMouseUp); } HandleMouseMove(e) { this.m_frameInitialXPos < 0 && (this.m_frameInitialXPos = e.clientX), this.m_frameInitialWidth < 0 && (this.m_frameInitialWidth = this.m_elContainer.clientWidth), this.m_frameDefaultWidth < 0 && !this.state.bResized && (this.m_frameDefaultWidth = this.m_elContainer.clientWidth), this.m_frameInitialYPos < 0 && (this.m_frameInitialYPos = e.clientY); let t = e.clientX - this.m_frameInitialXPos, n = e.clientY - this.m_frameInitialYPos, i = this.m_frameInitialWidth + t + n, o = "image" == this.props.strMediaType ? 64 : 320; i < o && (i = o), i > 1280 && (i = 1280), this.setState({ nResizedWidth: i, bResized: !0, bIsResizing: !0 }), this.OnSizeChanged(); } HandleTallImages() { let e = 450 * (this.props.width / this.props.height), t = this.props.width; t > Math.min(1280, e) && (t = Math.min(1280, e)), t < parseInt(this.m_elContainer.ownerDocument.defaultView.getComputedStyle(this.m_elContainer).maxWidth) && this.setState({ nMaxWidth: t }), this.OnSizeChanged(); } HandleMouseUp(e) { e.view.removeEventListener("mousemove", this.HandleMouseMove), e.view.removeEventListener("mouseup", this.HandleMouseUp), (this.m_frameInitialXPos = -1), (this.m_frameInitialYPos = -1), (this.m_frameInitialWidth = -1), this.state.bIsResizing && this.setState({ bIsResizing: !1 }), !this.state.bMinimized && this.m_elContainer && (this.m_frameDesiredWidth = this.m_elContainer.clientWidth), h.Ul.ChatStore.EmbedStore.SetWidths(this.props.unAccountIDSender, this.props.msgUniqueKey, this.m_frameDesiredWidth, this.m_frameDefaultWidth); } render() { let e = {}; this.state.nResizedWidth > 0 ? (e.width = this.state.nResizedWidth + "px") : this.state.nMaxWidth && (e.maxWidth = this.state.nMaxWidth + "px"); let t = "BBCodeResizableComponent"; this.props.className && (t += " " + this.props.className), this.state.bResized && (t += " Resized"), this.state.bIsResizing && (t += " ActivelyResizing"), this.state.bMinimized && (t += " Minimized"), this.state.bIsMinimizing && (t += " Minimizing"); let n = this.props.titleInfo ? this.props.titleInfo : ""; return T.createElement( O.v$, { style: this.props["data-copystyle"], text: this.props["data-copytext"] }, T.createElement( "div", { className: t, style: e, ref: this.BindContainer }, T.createElement("div", { className: "BBCodeCollapsed", onClick: this.handleCollapse, title: n }, (0, L.Xx)(`#bbcode_${this.props.strMediaType}_minimized`)), !this.state.bMinimized && !this.state.bIsMinimizing && this.props.children, T.createElement("div", { className: "BBCodeRestoreControl", onClick: this.handleRestore, title: (0, L.Xx)(`#bbcode_${this.props.strMediaType}_tooltip_restore`) }, T.createElement("div", { className: "restoreSize" })), T.createElement("div", { className: "BBCodeResizeControl", onMouseDown: this.OnResize, title: (0, L.Xx)(`#bbcode_${this.props.strMediaType}_tooltip_resize`) }, T.createElement(B.$nj, null)), T.createElement("div", { className: "BBCodeCollapseControl", onClick: this.handleCollapse, title: this.state.bMinimized ? (0, L.Xx)(`#bbcode_${this.props.strMediaType}_tooltip_uncollapse`) : (0, L.Xx)(`#bbcode_${this.props.strMediaType}_tooltip_collapse`) }, T.createElement(B.X, null)), ), ); } } (0, i.gn)([s.ak], $e.prototype, "BindContainer", null), (0, i.gn)([s.ak], $e.prototype, "handleCollapse", null), (0, i.gn)([s.ak], $e.prototype, "OnSizeChanged", null), (0, i.gn)([s.ak], $e.prototype, "handleRestore", null), (0, i.gn)([s.ak], $e.prototype, "OnResize", null), (0, i.gn)([s.ak], $e.prototype, "HandleMouseMove", null), (0, i.gn)([s.ak], $e.prototype, "HandleTallImages", null), (0, i.gn)([s.ak], $e.prototype, "HandleMouseUp", null); class Ye extends T.Component { constructor(e) { super(e); let t = h.Ul.ChatStore.EmbedStore.GetCollapsedState(this.props.unAccountIDSender, this.props.msgUniqueKey); this.state = { bCollapsed: t }; } OnToggleCollapse(e) { let t = !this.state.bCollapsed; this.setState({ bCollapsed: t }), h.Ul.ChatStore.EmbedStore.SetCollapsedState(this.props.unAccountIDSender, this.props.msgUniqueKey, t); } render() { let e = this.state.bCollapsed, t = "BBCodeResizableComponent"; this.props.className && (t += " " + this.props.className), e && (t += " Minimized"); let n = this.props.titleInfo ? this.props.titleInfo : "", i = e ? (0, L.Xx)(`#bbcode_${this.props.strMediaType}_tooltip_uncollapse`) : (0, L.Xx)(`#bbcode_${this.props.strMediaType}_tooltip_collapse`); return T.createElement(O.v$, { style: this.props["data-copystyle"], text: this.props["data-copytext"] }, T.createElement("div", { className: t }, T.createElement("div", { className: "BBCodeCollapsed", onClick: this.OnToggleCollapse, title: n }, (0, L.Xx)(`#bbcode_${this.props.strMediaType}_minimized`)), !this.state.bCollapsed && this.props.children, T.createElement(Je, { onClick: this.OnToggleCollapse, title: i }))); } } function Je(e) { return T.createElement("div", { className: "BBCodeCollapseControl", onClick: e.onClick, title: e.title }, T.createElement(B.X, null)); } function et(e) { let t = e.titleInfo ? e.titleInfo : "", n = (0, L.Xx)(`#bbcode_${e.mediaType}_minimized`); (0, L.Xx)(`#bbcode_${e.mediaType}_tooltip_restore`); return T.createElement("div", { className: "BBCodeAlreadyCollapsed Minimized" }, T.createElement("div", { className: "BBCodeAlreadyCollapsedText", onClick: e.onClick, title: t }, n), T.createElement("div", { className: "BBCodeCollapseControl", onClick: e.onClick, title: e.titleInfo }, T.createElement(B.X, null))); } (0, i.gn)([s.ak], Ye.prototype, "OnToggleCollapse", null); let tt = class extends ce.fb { GetVideoID() { return this.GetArgument("v").replace(/^[^a-z0-9\-_]*([a-z0-9\-_]+).*$/gi, "$1"); } render() { return h.Ul.SettingsStore.FriendsSettings.bDisableEmbedInlining ? this.renderNoEmbed() : T.createElement(We, { preference: "youtube", fallbackRender: () => this.renderNoEmbed() }, T.createElement(nt, { videoId: this.GetVideoID(), t: this.GetArgument("t"), context: this.props.context })); } renderNoEmbed() { let e = this.GetArgument("t"), t = "https://www.youtube.com/watch?v=" + encodeURIComponent(this.GetVideoID()); return e && (t += "&t=" + encodeURIComponent(e)), T.createElement(He, { href: t }, T.createElement(B._F3, null), t); } }; tt = (0, i.gn)([k.Pi], tt); class nt extends T.Component { constructor(e) { super(e), (this.state = { strTitle: "", strAuthor: "", strVideoID: "" }); } OnVideoInfoChanged(e) { let { strTitle: t, strAuthor: n, strVideoID: i } = e; this.setState({ strTitle: t, strAuthor: n, strVideoID: i }); } OnPlayerReady() { this.props.context.onLoad && this.props.context.onLoad("BBCodeYouTubeComponent " + this.state.strVideoID); } OnPlaceholderImageLoad() { this.props.context.onLoad && this.props.context.onLoad("BBCodeYouTubeComponent " + this.state.strVideoID); } componentDidMount() { me.findDOMNode(this).ownerDocument.defaultView.setTimeout(() => { this.props.context.onLoad && this.props.context.onLoad("BBCodeYouTubeComponent " + this.state.strVideoID); }, 250); } render() { let e = this.state.strAuthor, t = this.state.strTitle, n = "https://www.youtube.com/watch?v=" + this.state.strVideoID; const { videoId: i, t: r } = this.props; r && (n += "&t=" + encodeURIComponent(r)); const a = he(r); return T.createElement( O.v$, { style: "block", text: [t, n] }, T.createElement( $e, { className: "BBCodeYouTubeComponent", unAccountIDSender: this.props.context.unAccountIDSender, msgUniqueKey: this.props.context.key, strMediaType: "video", titleInfo: t, onSizeChanged: this.props.context.onLoad }, T.createElement("div", { className: "BBCodeYouTubeComponent_Sizer BBCodeResizableElement" }, T.createElement(Se.e, { video: i, startSeconds: a, width: 640, height: 385, autoplay: !1, controls: !0, showFullscreenBtn: !0, onVideoInfoChanged: this.OnVideoInfoChanged, onPlayerReady: this.OnPlayerReady }), T.createElement(O.v$, { style: "block", text: [t, n] }, T.createElement("img", { src: o.De.PUBLIC_SHARED_URL + "images/responsive/youtube_16x9_placeholder.gif", width: "100%", onLoad: this.OnPlaceholderImageLoad }))), t.length > 0 && T.createElement(G.ns, { className: "test HideWhenMinimized", href: n }, T.createElement("div", { className: "BBCodeTitle" }, t)), e.length > 0 && T.createElement("div", { className: "BBCodeDetails HideWhenMinimized" }, (0, L.Xx)("#bbcode_youtube_author", e)), ), ); } } var it; (0, i.gn)([s.ak], nt.prototype, "OnVideoInfoChanged", null), (0, i.gn)([s.ak], nt.prototype, "OnPlayerReady", null), (0, i.gn)([s.ak], nt.prototype, "OnPlaceholderImageLoad", null), (function (e) { (e[(e.Loading = 1)] = "Loading"), (e[(e.Loaded = 2)] = "Loaded"), (e[(e.Error = 3)] = "Error"); })(it || (it = {})); let ot = class extends ce.fb { constructor(e) { super(e), (this.k_nUnknownImageWidth = 300), (this.k_nUnknownImageHeight = 300), (this.k_nMaxImageWidth = 315); let t = h.Ul.ChatStore.EmbedStore.GetCollapsedState(this.props.context.unAccountIDSender, this.props.context.key), n = parseInt(this.GetArgument("width")), i = parseInt(this.GetArgument("height")); this.state = { eLoadingState: it.Loading, bCollapsed: t, nMediaWidth: n, nMediaHeight: i }; } OnToggleCollapse(e) { let t = !this.state.bCollapsed; this.setState({ bCollapsed: t }), h.Ul.ChatStore.EmbedStore.SetCollapsedState(this.props.context.unAccountIDSender, this.props.context.key, t); } IsEmbeddedInOtherTag() { for (let e of this.props.parentTags) if ("tweet" == e) return !0; return !1; } IsGiphy() { return void 0 !== this.GetArgument("giphy_search"); } IsImgur() { return this.GetArgument("src").startsWith("https://imgur.com"); } OnImageLoad(e) { let t = e.currentTarget; this.setState({ eLoadingState: it.Loaded, nMediaWidth: t.naturalWidth, nMediaHeight: t.naturalHeight }), this.props.context.onLoad && this.props.context.onLoad("BBCodeImage " + this.props.args.src); } OnImageError() { this.setState({ eLoadingState: it.Error }); } ShowModal(e, t) { let n = parseInt(this.GetArgument("width")), i = parseInt(this.GetArgument("height")), o = n / i; const r = e.currentTarget.ownerDocument.defaultView; let a = 0.85 * r.screen.height, s = ye.Lh(n || 600, 0.5 * r.screen.width, 0.85 * r.screen.width), l = ye.Lh(i || 800, 0.5 * r.screen.height, a); o >= 1 ? ((l = (s - 50) / o + 50), l > a && ((l = a), (s = (l - 50) * o + 50))) : (s = (l - 50) * o + 50), (0, q.BR)(T.createElement(st, { imageUrl: t, ownerWin: r, fullImageUrl: this.GetArgument("src") }), r, "ImageModal", { strTitle: (0, L.Xx)("#bbcode_image_popout"), popupHeight: l, popupWidth: s }, mn(r)); } OnContextMenu(e) { (0, G.VK)(e, this.GetArgument("src")); } OnClick(e) { let t = this.GetArgument("src"), n = this.GetArgument("thumbnail_src"); this.IsGiphy() ? (t = n) : this.IsImgur() && (t = n.replace("?fb", "")), this.ShowModal(e, t); } render() { let e, t = this.GetArgument("thumbnail_src"), n = this.GetArgument("srcset", !0), i = this.GetArgument("src"), o = this.GetArgument("title"), r = this.state.eLoadingState, a = this.IsGiphy(), s = r == it.Error; if ((a && (e = `/giphy ${this.GetArgument("giphy_search")}`), s || h.Ul.SettingsStore.FriendsSettings.bDisableEmbedInlining)) { if (a) return T.createElement(He, { href: i, copyText: [e, i], loadFailed: s }, T.createElement("div", { className: "NonInlinedEmbedLogo NonInlinedEmbedLogo_Giphy" }), T.createElement("span", { style: { fontWeight: "bold" } }, " ", (0, L.kQ)("#bbcode_image_link_giphy", T.createElement("span", { className: "giphySearch" }, this.GetArgument("giphy_search"))))); let t = i; return o && (t = (0, L.Xx)("#bbcode_disable_embed_inlining_parenthetical", o, De.XW(i))), T.createElement(He, { href: i, copyText: [o, i], loadFailed: s }, T.createElement(B.Eep, null), t); } if (this.IsEmbeddedInOtherTag()) return T.createElement(ct, { className: "embeddedImg", context: this.props.context, src: t, onContextMenu: G.mO, onError: this.OnImageError }); if (this.state.bCollapsed) return T.createElement(et, { onClick: this.OnToggleCollapse, mediaType: "image" }); let l = this.state.nMediaWidth, c = this.state.nMediaHeight; (l && c) || ((l = this.k_nUnknownImageWidth), (c = this.k_nUnknownImageHeight)), "true" == this.GetArgument("proxied") && (t += "?s=652x652"); let m = "chatImageContainer"; a && (m += " giphyImg"); let d = a ? (0, L.Xx)("#bbcode_image_link_giphy", this.GetArgument("giphy_search")) : i; return T.createElement(T.Fragment, null, a && T.createElement(O.v$, null, T.createElement("div", null, e)), T.createElement(O.v$, { style: "block", text: [o, i] }, T.createElement("div", { className: m }, T.createElement(rt, { className: "BBCodeImageWrapper", width: l, height: c, maxHeight: Math.min(c, this.k_nMaxImageWidth) }, T.createElement("img", { className: "chatImageFull BBCodeResizableElement", src: t, srcSet: n, onLoad: this.OnImageLoad, onError: this.OnImageError, onContextMenu: this.OnContextMenu, onClick: this.OnClick }), a && T.createElement(at, { strLink: i, searchText: this.GetArgument("giphy_search") }), T.createElement(Je, { onClick: this.OnToggleCollapse, title: d }))))); } }; function rt(e) { let t = e.height / e.width, n = { height: 0, overflow: "hidden", paddingTop: `calc( ${t} * 100% )`, position: "relative" }, i = {}; return e.maxHeight && (i.maxWidth = e.maxHeight / t), T.createElement("div", { style: i, className: e.className }, T.createElement("div", { style: n, className: "PreserveAspect" }, e.children)); } function at(e) { let t = (0, L.Xx)("#bbcode_image_tooltip_link_giphy", e.searchText); return T.createElement(T.Fragment, null, T.createElement(G.ns, { className: "chatImageURL", href: e.strLink, title: t }, T.createElement("div", { className: "giphyTag" }, (0, L.kQ)("#bbcode_image_link_giphy", T.createElement("span", { className: "giphySearch" }, e.searchText))))); } function st(e) { const { closeModal: t, ownerWin: n, imageUrl: i, fullImageUrl: o } = e, r = T.useCallback( (e) => { (0, G.VK)(e, o); }, [o], ); return T.createElement(q.e1, { onEscKeypress: t, hideTopBar: !0 }, T.createElement("div", { className: Me().ImageModalBackground }, T.createElement("img", { className: Me().ImageModalContent, src: i, onContextMenu: r }))); } (0, i.gn)([s.ak], ot.prototype, "OnToggleCollapse", null), (0, i.gn)([s.ak], ot.prototype, "OnImageLoad", null), (0, i.gn)([s.ak], ot.prototype, "OnImageError", null), (0, i.gn)([s.ak], ot.prototype, "ShowModal", null), (0, i.gn)([s.ak], ot.prototype, "OnContextMenu", null), (0, i.gn)([s.ak], ot.prototype, "OnClick", null), (ot = (0, i.gn)([k.Pi], ot)); let lt = class extends ce.fb { constructor(e) { super(e), (this.state = { bSeeking: !1, bPlay: !1, bError: !1 }); } StartVideo() { this.m_elVideo && this.m_elVideo.play(); } BindVideo(e) { this.m_elVideo = e; } OnVideoPlay() { this.setState({ bPlay: !0 }); } OnVideoPause() { this.state.bPlay || this.state.bSeeking || this.setState({ bPlay: !1 }); } OnVideoError(e) { this.setState({ bError: !0 }); } OnVideoLoaded() { this.props.context.onLoad && this.props.context.onLoad("CBBCodeVideo " + this.props.context.key); } render() { return h.Ul.SettingsStore.FriendsSettings.bDisableEmbedInlining ? this.renderNoEmbed() : T.createElement(We, { preference: "generic", render: () => this.renderEmbedded(), fallbackRender: () => this.renderNoEmbed() }); } renderNoEmbed() { const e = this.GetArgument("src"), t = this.GetArgument("title"); let n = e; return t && (n = (0, L.Xx)("#bbcode_disable_embed_inlining_parenthetical", t, De.XW(e))), T.createElement(He, { href: e }, T.createElement(B.nkn, null), n); } renderEmbedded() { this.GetArgument("simple"); const e = this.GetArgument("src"), t = this.GetArgument("title"); let n, i = this.state.bError, o = { controls: this.state.bPlay, autoPlay: !1, loop: !1, muted: !1 }; return ( i && (n = T.createElement(G.ns, { className: "failedVideoURL", href: e, title: (0, L.Xx)("#bbcode_video_tooltip_link") }, T.createElement("span", { className: "failedVideoSpan" }, e))), i ? T.createElement("div", { className: "ChatMessageErrorSendingAlert VideoFailed" }, (0, L.kQ)("#Chat_VideoLoadError", n)) : T.createElement( O.v$, { style: "block", text: [t, e] }, T.createElement( $e, { className: "chatVideoContainer", strMediaType: "video", unAccountIDSender: this.props.context.unAccountIDSender, msgUniqueKey: this.props.context.key, titleInfo: e, onSizeChanged: this.props.context.onLoad }, T.createElement("video", Object.assign({ className: "BBCodeResizableElement" }, o, { ref: this.BindVideo, onPause: this.OnVideoPause, onPlay: this.OnVideoPlay, controlsList: "nodownload", onError: this.OnVideoError, onLoadedData: this.OnVideoLoaded }), T.createElement("source", { src: e, type: this.GetArgument("type", !0), onError: this.OnVideoError, onLoad: this.OnVideoLoaded })), !this.state.bPlay && T.createElement("div", { className: "chatVideoPlayControl HideWhenMinimized", onClick: this.StartVideo }, T.createElement("div", { className: "playButtonContainer" }, T.createElement(B.shV, null))), T.createElement(G.ns, { className: "chatImageURL", href: e, title: (0, L.Xx)("#bbcode_video_tooltip_link") }, T.createElement(B.yRy, null)), ), ) ); } }; (0, i.gn)([s.ak], lt.prototype, "StartVideo", null), (0, i.gn)([s.ak], lt.prototype, "BindVideo", null), (0, i.gn)([s.ak], lt.prototype, "OnVideoPlay", null), (0, i.gn)([s.ak], lt.prototype, "OnVideoPause", null), (0, i.gn)([s.ak], lt.prototype, "OnVideoError", null), (0, i.gn)([s.ak], lt.prototype, "OnVideoLoaded", null), (lt = (0, i.gn)([k.Pi], lt)); class ct extends T.Component { OnLoad() { this.props.context.onLoad && this.props.context.onLoad("ImgNotifyChatOnLoad " + this.props.src); } render() { let e = this.props, { context: t } = e, n = (0, i._T)(e, ["context"]); return T.createElement("img", Object.assign({}, n, { onLoad: this.OnLoad })); } } function mt(e) { const { context: t, width: n, height: o, src: r } = e, a = (0, i._T)(e, ["context", "width", "height", "src"]), s = `${r}?s=${n}x${o}`, l = s + "dpx2x"; return T.createElement(ct, Object.assign({ context: t }, a, { src: s, srcSet: `${s} 1x, ${l} 2x` })); } (0, i.gn)([s.ak], ct.prototype, "OnLoad", null); let dt = class extends ce.fb { CopyToClipboard() { let e = this.GetArgument("url"); e && 0 != e.length && X.J$(e); } HandleFocus(e) { e.target.select(); } OnLoad() { this.props.context.onLoad && this.props.context.onLoad(`CBBCodeOpenGraph.OnLoad ${this.GetArgument("url")}`); } render() { let e = this.GetArgument("img"), t = this.GetArgument("title"), n = this.GetArgument("desc"), i = this.GetArgument("url"), o = De.XW(i); if (h.Ul.SettingsStore.FriendsSettings.bDisableEmbedInlining) { let e = i; return t && (e = (0, L.Xx)("#bbcode_disable_embed_inlining_parenthetical", t, o)), T.createElement(He, { href: i, copyText: [e, i] }, T.createElement(B.nWq, null), e); } return T.createElement( O.v$, { style: "block", text: [t, n, i] }, T.createElement( F.s, { className: "ChatMessageOpenGraph", focusable: h.Ul.IsGamepadUIActive(), onActivate: () => { if (!h.Ul.IsGamepadUIActive()) return; let e = (0, je.A)(i) ? (0, je.d)(i) : i; h.Ul.OpenURLInBrowser(e, h.D); }, onOKActionDescription: (0, L.Xx)("#Chat_Visit_Link"), }, T.createElement( "div", { className: "OpenGraphContent" }, e && e.length > 0 && T.createElement("div", { className: "OpenGraphImgBackground" }, T.createElement("img", { className: "ChatMessageOpenGraph_Image", src: e, onLoad: this.OnLoad })), e && e.length > 0 && T.createElement( G.ns, { className: "OpenGraphImgContainer", href: i }, T.createElement(mt, { width: 256, height: 140, context: this.props.context, className: "ChatMessageOpenGraph_Image", src: e, onContextMenu: (e) => { (0, G.mO)(e, i); }, }), ), T.createElement("div", { className: "ChatMessageOpenGraph_Body" }, t && t.length > 0 && T.createElement(G.ns, { className: "ChatMessageOpenGraph_Title", href: i }, t), n && n.length > 0 && T.createElement("div", { className: "ChatMessageOpenGraph_Description" }, n)), T.createElement("div", { style: { clear: "left" } }), ), T.createElement("div", { className: "OpenGraphFooter" }, T.createElement("div", { className: "OpenGraphMessageURL" }, T.createElement("span", { className: "OpenGraphMessageURLPosition", onFocus: this.HandleFocus, onClick: this.HandleFocus }, T.createElement("span", { className: "OpenGraphMessageURL_short" }, o), T.createElement("input", { className: "OpenGraphMessageURL_full", value: i, onFocus: this.HandleFocus, onClick: this.HandleFocus, readOnly: !0 }))), T.createElement("div", { className: "OpenGraphURLButton CopyToClipboard", onClick: this.CopyToClipboard, title: (0, L.Xx)("#Chat_Copy_Link_Clipboard") }, T.createElement(B.h9, null))), ), ); } }; (0, i.gn)([s.ak], dt.prototype, "CopyToClipboard", null), (0, i.gn)([s.ak], dt.prototype, "HandleFocus", null), (0, i.gn)([s.ak], dt.prototype, "OnLoad", null), (dt = (0, i.gn)([k.Pi], dt)); let ht = class extends ce.fb { FormatCreatedDate(e) { let t = new Date(e), n = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][t.getMonth()]; return `${t.getDate()} ${n} ${t.getFullYear()}`; } OpenTweet(e) { let t = !1, n = e.target, i = e.currentTarget; for (; n && n != i; ) { if ("A" == n.nodeName || n.classList.contains("chatVideoContainer")) { t = !0; break; } n = n.parentElement; } t || X.p8(i) || (0, G.b8)(e, this.GetArgument("url")); } OnImageLoaded() { this.props.context.onLoad && this.props.context.onLoad("CBBCodeTweet " + this.GetArgument("url")); } render() { let e = this.GetArgument("created"), t = this.GetArgument("profile_name"), n = this.GetArgument("profile_screen_name"), i = this.GetArgument("profile_image"), o = this.GetArgument("profile_verified"), r = this.GetArgument("url"), a = `http://twitter.com/${n}`, s = "true" == o; if (((e = this.FormatCreatedDate(e)), h.Ul.SettingsStore.FriendsSettings.bDisableEmbedInlining)) { let n, i = { year: "numeric", month: "long", day: "numeric" }, o = new Date(e).toLocaleDateString(L.Yt.GetPreferredLocales(), i); if ("string" == typeof this.props.children) n = this.props.children; else if (this.props.children instanceof Array) for (let e of this.props.children) if ("string" == typeof e) { n = e; break; } return T.createElement(He, { href: r, copyText: [n, r] }, T.createElement("div", { className: "NonInlinedEmbedLogo NonInlinedEmbedLogo_Twitter" }), (0, L.Xx)("#bbcode_disable_embed_inlining_tweet", t, o), T.createElement("br", null), T.createElement("div", { className: "NonInlinedEmbedSingleLine" }, n)); } return T.createElement( "div", { className: Me().ChatMessageTweet, onClick: this.OpenTweet }, T.createElement(O.v$, { style: "block", text: `${t} (@${n})` }, T.createElement("div", { className: Me().ChatMessageTweet_Header }, T.createElement(G.ns, { className: Me().ChatMessageTweet_ProfileImage, href: a }, T.createElement("img", { src: i, onLoad: this.OnImageLoaded })), T.createElement("div", { className: Me().ChatMessageTweet_NameSection }, T.createElement("div", { className: Me().ChatMessageTweet_NameGroup }, T.createElement(G.ns, { className: Me().ChatMessageTweet_Name, href: a }, t), s && T.createElement("div", { className: Me().ChatMessageTweet_Verified })), T.createElement(G.ns, { className: Me().ChatMessageTweet_ScreenName, href: a }, "@", n)), T.createElement(G.ns, { className: Me().ChatMessageTweet_Logo, href: r }))), T.createElement(O.v$, { style: "block-continue prepend-innertext-with-newline", text: r }, T.createElement("div", { className: Me().ChatMessageTweet_Body }, this.props.children)), T.createElement("div", { className: Me().ChatMessageTweet_Footer }, T.createElement("div", { className: Me().ChatMessageTweet_Created }, e)), ); } }; (0, i.gn)([s.ak], ht.prototype, "OpenTweet", null), (0, i.gn)([s.ak], ht.prototype, "OnImageLoaded", null), (ht = (0, i.gn)([k.Pi], ht)); let ut = class extends ce.fb { constructor(e) { super(e), (this.state = { bActivated: !1 }); } Activate() { this.setState({ bActivated: !0 }); } OnImageLoaded() { this.props.context.onLoad && this.props.context.onLoad("CBBCodeOEmbed " + this.props.context.key); } render() { let e = this.GetArgument("url"), t = this.GetArgument("title"), n = this.GetArgument("author"), i = this.GetArgument("provider_name"), o = this.GetArgument("preview_image"); if (h.Ul.SettingsStore.FriendsSettings.bDisableEmbedInlining) { let n = e; return t && (n = (0, L.Xx)("#bbcode_disable_embed_inlining_parenthetical", t, e)), T.createElement(He, { href: e, copyText: [t, e] }, T.createElement(B.nWq, null), n); } let r, a = !this.state.bActivated; if ((("SoundCloud" != i && "Spotify" != i) || (a = !1), a)) r = T.createElement("div", { className: "OEmbedPreview", onClick: this.Activate }, T.createElement("div", { className: "oembedImgContainer" }, T.createElement(O.v$, { style: "block", text: [t, e] }, T.createElement("img", { src: o, onLoad: this.OnImageLoaded })), T.createElement("div", { className: "oembedHint" }, (0, L.Xx)("#bbcode_oembed_preview_hint"))), T.createElement("div", { className: "oembedProvider" }, i), T.createElement("div", { className: "oembedTitle" }, t)); else { const { src: o, width: a, height: s } = JSON.parse(this.GetArgument("iframe_attrs")); r = T.createElement(G.ns, { className: "OpenGraphImgContainer", href: e, style: { display: "flex", flexDirection: "column" } }, T.createElement(pt, { width: a, height: s, src: o, strProviderName: i }), i && i.length && T.createElement("div", { className: "oembedProvider" }, i), t && t.length > 0 && T.createElement("div", { className: "oembedTitle" }, t), n && n.length > 0 && T.createElement("div", { className: "oembedAuthor" }, (0, L.Xx)("#bbcode_oembed_author", n))); } let s = "generic"; return "Vimeo" == i ? (s = "vimeo") : "Sketchfab" == i && (s = "sketchfab"), T.createElement(We, { fallbackHref: e, preference: s }, T.createElement(O.v$, { style: "block", text: [t, e] }, T.createElement("div", { className: "BBCodeOEmbedComponent " + i }, r))); } }; function pt(e) { const t = e.strProviderName; let { src: n, width: i, height: o } = e; if (!n || !n.startsWith("http")) return null; "SoundCloud" == t && (n = n.replace("visual=true", "visual=false")); const r = 640; let a = "number" == typeof i ? i : parseInt(i), s = "number" == typeof o ? o : parseInt(o); !isNaN(a) && !isNaN(s) && a > r && ((s *= r / a), (a = r)); const l = { flex: isNaN(s) ? void 0 : `1 1 ${s}px`, maxWidth: r }; return T.createElement("iframe", { height: isNaN(s) ? void 0 : `${s}px`, style: l, src: n, scrolling: "no", frameBorder: 0, sandbox: "allow-scripts allow-same-origin", allowFullScreen: "Vimeo" === t || void 0 }); } (0, i.gn)([s.ak], ut.prototype, "Activate", null), (0, i.gn)([s.ak], ut.prototype, "OnImageLoaded", null), (ut = (0, i.gn)([k.Pi], ut)); class _t extends ce.fb { render() { return T.createElement(le, null, this.props.children); } } class gt extends ce.fb { render() { const { context: { bAnimate: e, onAnimationStart: t, onAnimationEnd: n }, } = this.props; return T.createElement("div", { className: (0, ne.Z)(Me().plusOne, e && Me().MsgAnimating), onAnimationStart: t, onAnimationEnd: n }, "+1"); } } class Ct extends ce.fb { render() { const { context: { bAnimate: e, onAnimationStart: t, onAnimationEnd: n }, } = this.props, i = this.props.children, o = this.GetArgument("result"), r = (0, ne.Z)(Me().flipCoinAndResult, e && Me().MsgAnimating), a = (0, ne.Z)(Me().flipCoinContainer, o); return T.createElement(O.v$, { text: i }, T.createElement("div", { className: r, onAnimationStart: t, onAnimationEnd: n }, T.createElement("div", null, "/flip:"), T.createElement("div", { className: a }, T.createElement("div", { className: Me().coin }, T.createElement("div", { className: Me().front }), T.createElement("div", { className: Me().front_b }), T.createElement("div", { className: Me().mid }), T.createElement("div", { className: Me().back }), T.createElement("div", { className: Me().back_b }))), T.createElement("div", { className: Me().resultLabel }, (0, L.Xx)("#SlashCommandCoinFlip_Result_" + o)))); } } class ft extends ce.fb { Pad(e, t) { let n = e + ""; for (; n.length < t; ) n = "0" + n; return n; } GetLastNumber(e) { if (e < 10) return e; let t = Math.pow(10, Math.floor(Math.log(e) / Math.log(10)) - 1), n = Math.floor(e / t); return n - 10 * Math.floor(n / 10); } render() { let e = this.props.children, t = this.GetArgument("min"), n = this.GetArgument("max"), i = this.Pad(this.GetArgument("result"), n.length), o = [], r = !0; for (let e = 0; e < n.length; e++) { "0" != i[e] && (r = !1); let t = ((n.length - e) * Math.max(0.5 * n.length, 2)) / n.length, a = 10 - e; o.push( T.createElement( "div", { key: "random" + e, className: Me().numberCounterContainer }, T.createElement( "div", { className: Me().numberColumn + (r ? " " + Me().startingZero : ""), style: { animationDuration: t + "s", animationName: Me()["randomNumbers" + a] } }, T.createElement("div", { className: `${Me().randomNumberLabel} ${Me().randomActual}` }, i[e]), T.createElement("div", { className: Me().randomNumberLabel }, this.GetLastNumber(parseInt(i[e]) + 1)), T.createElement("div", { className: Me().randomNumberLabel }, this.GetLastNumber(parseInt(i[e]) + 2)), T.createElement("div", { className: Me().randomNumberLabel }, this.GetLastNumber(parseInt(i[e]) + 3)), T.createElement("div", { className: Me().randomNumberLabel }, this.GetLastNumber(parseInt(i[e]) + 4)), T.createElement("div", { className: Me().randomNumberLabel }, this.GetLastNumber(parseInt(i[e]) + 5)), T.createElement("div", { className: Me().randomNumberLabel }, this.GetLastNumber(parseInt(i[e]) + 6)), T.createElement("div", { className: Me().randomNumberLabel }, this.GetLastNumber(parseInt(i[e]) + 7)), T.createElement("div", { className: Me().randomNumberLabel }, this.GetLastNumber(parseInt(i[e]) + 8)), T.createElement("div", { className: Me().randomNumberLabel }, this.GetLastNumber(parseInt(i[e]) + 9)), T.createElement("div", { className: Me().randomNumberLabel }, i[e]), ), T.createElement("div", { className: Me().randomNumberShadow }), ), ); } const { context: { bAnimate: a, onAnimationStart: s, onAnimationEnd: l }, } = this.props; return T.createElement(O.v$, { text: e }, T.createElement("div", { className: (0, ne.Z)(Me().randomMsg, a && Me().MsgAnimating), onAnimationStart: s, onAnimationEnd: l }, T.createElement("span", null, "/random "), T.createElement("span", { className: Me().randomValues }, t, "-", n), " : ", o)); } } class vt extends ce.fb { render() { return T.createElement(se, null, this.props.children); } } class St extends ce.fb { render() { return T.createElement(ae, null, this.props.children); } } class bt extends ce.fb { render() { return T.createElement(re, null, this.props.children); } } class It extends ce.fb { constructor(e) { super(e), (this.state = { invite: void 0 }); } static getDerivedStateFromProps(e, t) { let n = e.args.invitecode; return { invite: e.context.chat.ChatStore.InviteStore.GetInviteFromCode(n) }; } render() { let e = this.props.context.chat.GetMember(this.props.context.unAccountIDSender); return T.createElement(Y, { invite: this.state.invite, inviter: e }); } } class yt extends ce.fb { constructor(e) { super(e), (this.state = { invite: void 0, inviter: void 0, invitee: void 0 }); } static getDerivedStateFromProps(e, t) { let n, i, o, r = e.args.chatgroupid, a = e.args.chatid, s = e.context.chat; return s.self.accountid == e.context.unAccountIDSender ? ((i = s.self), (o = s.chat_partner), (n = s.accountid_partner)) : ((i = s.chat_partner), (o = s.self), (n = s.self.accountid)), { invite: e.context.chat.ChatStore.InviteStore.GetDirectInviteInfo(r, a, n), inviter: i, invitee: o }; } render() { return T.createElement(Y, { invite: this.state.invite, inviter: this.state.inviter, invitee: this.state.invitee }); } } class Et extends ce.fb { constructor(e) { super(e), (this.state = { inviter: void 0, inviteTarget: void 0, gameInvite: void 0 }); } static getDerivedStateFromProps(e, t) { let n, i, o = e.args.appid, r = e.args.connect, a = e.args.remoteplay, s = e.context.chat; return s.self.accountid == e.context.unAccountIDSender ? ((n = s.self), (i = s.chat_partner)) : ((n = s.chat_partner), (i = s.self)), { inviter: n, inviteTarget: i, gameInvite: e.context.chat.ChatStore.GameInviteStore.RegisterGameInvite(e.context.unAccountIDSender, e.context.rtTimestamp, parseInt(o), r, a, void 0) }; } render() { return T.createElement(W, { inviter: this.state.inviter, inviteTarget: this.state.inviteTarget, gameInvite: this.state.gameInvite }); } } class Dt extends ce.fb { constructor(e) { super(e), (this.state = { inviter: void 0, inviteTarget: void 0, gameInvite: void 0 }); } static getDerivedStateFromProps(e, t) { let n, i, o = e.args.appid, r = e.args.lobbyid, a = e.context.chat; return a.self.accountid == e.context.unAccountIDSender ? ((n = a.self), (i = a.chat_partner)) : ((n = a.chat_partner), (i = a.self)), { inviter: n, inviteTarget: i, gameInvite: e.context.chat.ChatStore.GameInviteStore.RegisterGameInvite(e.context.unAccountIDSender, e.context.rtTimestamp, parseInt(o), "", "", r) }; } render() { return T.createElement(W, { inviter: this.state.inviter, inviteTarget: this.state.inviteTarget, gameInvite: this.state.gameInvite }); } } class wt extends ce.fb { constructor(e) { super(e), (this.state = { broadcastid: "", broadcaster: void 0, viewer: void 0, appid: 0 }); } static getDerivedStateFromProps(e, t) { let n, i, o = e.args.broadcastid, r = Number(e.args.appid), a = e.context.chat; return a.self.accountid == e.context.unAccountIDSender ? ((n = a.self), (i = a.chat_partner)) : ((n = a.chat_partner), (i = a.self)), { broadcastid: o, broadcaster: n, viewer: i, appid: r }; } render() { return T.createElement(x, { broadcastid: this.state.broadcastid, appid: this.state.appid, broadcaster: this.state.broadcaster, viewer: this.state.viewer }); } } class Rt extends ce.fb { constructor(e) { super(e), (this.state = { broadcaster: void 0, viewer: void 0, requestid: 0, appid: 0 }); } static getDerivedStateFromProps(e, t) { let n, i, o = Number(e.args.requestid), r = e.context.chat, a = h.Ul.FriendStore.self.persona.m_unGamePlayedAppID; return r.self.accountid != e.context.unAccountIDSender ? ((n = r.self), (i = r.chat_partner)) : ((n = r.chat_partner), (i = r.self)), { requestid: o, appid: a, broadcaster: n, viewer: i }; } render() { return T.createElement(P, { requestid: this.state.requestid, appid: this.state.appid, broadcaster: this.state.broadcaster, viewer: this.state.viewer }); } } let At = class extends ce.fb { constructor(e) { super(e), (this.m_bMounted = !1), (this.state = { bHaveVoteData: !1, bLocalVoteDown: !1, bLocalVoteUp: !1, nCommentCount: parseInt(this.GetArgument("num_comments_public")) }); } componentWillUnmount() { this.m_bMounted = !1; } componentDidMount() { this.m_bMounted = !0; let e = h.Ul.CMInterface; if (e) { let t = this.GetArgument("fileid"), n = I.gA.Init(_e.Zc, 8509); n.Body().add_published_file_ids().set_published_file_id(t), e.SendMsgAndAwaitResponse(n, _e.tj).then((e) => { if (1 == e.Body().eresult() && 1 == e.Body().user_item_vote_details().length) { let t = e.Body().user_item_vote_details()[0].vote(); this.m_bMounted && this.setState({ bHaveVoteData: !0, bLocalVoteUp: 1 == t, bLocalVoteDown: 2 == t }); } }); } } VoteItem(e, t) { let n = h.Ul.CMInterface; if (n) { let i = I.gA.Init(_e.RI, 8507); i.Body().set_published_file_id(t), i.Body().set_vote_up(e), n.SendMsgAndAwaitResponse(i, _e.ep).then((t) => { 1 == t.Body().eresult() && this.m_bMounted && this.setState({ bLocalVoteUp: e, bLocalVoteDown: !e }); }); } } render() { let e, t = this.GetArgument("fileid"), n = this.GetArgument("url"), i = this.GetArgument("title"), o = this.GetArgument("description"), r = this.GetArgument("preview_url"), a = parseInt(this.GetArgument("file_type")), s = ["SteamPublishedFile"]; switch (a) { case 16: s.push("clip"), (e = T.createElement(Ke, { previewURL: r, clipID: this.GetArgument("external_asset_id") })), (r = void 0); break; case 4: s.push("video"); break; case 3: case 5: s.push("image"); } if (h.Ul.SettingsStore.FriendsSettings.bDisableEmbedInlining) { let e = n; i && (e = (0, L.Xx)("#bbcode_disable_embed_inlining_steam_workshop", i)); let t = T.createElement(B.nWq, null); switch (a) { case 4: t = T.createElement(B.nkn, null); break; case 3: case 5: t = T.createElement(B.Eep, null); } return T.createElement(He, { href: n, copyText: [e, n] }, t, e); } let l, c = parseInt(this.GetArgument("num_comments_public")), m = parseInt(this.GetArgument("votes_up")); return ( this.state.bLocalVoteUp && m++, (i || o) && (l = T.createElement(O.v$, { text: [i, o, n] }, T.createElement("div", { className: "ChatLargeImageContainer_Description" }, i && T.createElement(G.ns, { className: "ChatMessageOpenGraph_Title", href: n }, i), o && T.createElement("div", { className: "ChatMessageOpenGraph_Description" }, o)))), T.createElement( "div", { className: s.join(" ") }, r && r.length > 0 && T.createElement( G.ns, { className: "ChatLargeImageContainer", href: n }, T.createElement(ct, { context: this.props.context, className: "ChatLargeImageContainer_Image", src: r, onContextMenu: (e) => { (0, G.VK)(e, n); }, }), ), e, l, T.createElement(G.ns, { className: "SteamPublishedFile_Logo", href: n }), this.state.bHaveVoteData && T.createElement( "div", null, T.createElement( "div", { className: "workshopItemControls" }, T.createElement( "div", { className: "workshopItemControlCtn" }, m >= 0 && T.createElement("span", { className: "upvoteCount" }, m), c >= 0 && T.createElement("span", { className: "commentCount" }, c), T.createElement( "span", { className: this.state.bLocalVoteUp ? "general_btn voteUp toggled" : "general_btn voteUp", onClick: () => { this.VoteItem(!0, t); }, }, (0, L.Xx)("#bbcode_community_publishedfile_vote_up"), ), T.createElement("span", { className: this.state.bLocalVoteDown ? "general_btn voteDown toggled" : "general_btn voteDown", onClick: () => { this.VoteItem(!1, t); }, }), ), ), ), ) ); } }; At = (0, i.gn)([k.Pi], At); class Mt extends ce.fb { OnCreateOfferClick(e) { let t = "NewTradeOffer" + parseInt(this.GetArgument("partner")); X.RA(e).open(this.GetArgument("url"), t, "height=1120,width=1028,resize=yes,scrollbars=yes").focus(); } render() { let e = this.GetArgument("url"), t = parseInt(this.GetArgument("partner")); if (t && t == this.props.context.unAccountIDSender) { let n = this.props.context.chat.GetMember(t); if (n) { let t = (0, L.Xx)("#TradeOfferLink_Label"); return T.createElement(O.v$, { style: "block", text: [t, e] }, T.createElement("div", { className: "ChatMessageInvite NoBGSplitInvite TradeOfferInvite" }, T.createElement("div", { className: "leftInviteContainer" }, T.createElement(V.o2, { friend: n, context: { chat: this.props.context.chat }, bLarge: !0 })), T.createElement("div", { className: "rightInviteContainer rightInvite_Horizontal" }, T.createElement("div", { className: "rightInviteContainerContent" }, T.createElement("div", { className: "inviteLabel TradeOfferInvite_Title" }, (0, L.kQ)("#TradeOfferLink_SharedTradeLink", n.display_name)), T.createElement(te, { url: e, strLabel: t })), T.createElement("button", { className: "inviteButton inviteButtonJoinChat", type: "button", onClick: this.OnCreateOfferClick }, (0, L.kQ)("#TradeOfferLink_SendUserOffer"))), T.createElement("div", { style: { clear: "left" } }))); } } return T.createElement(G.ns, { href: e }, e); } } (0, i.gn)([s.ak], Mt.prototype, "OnCreateOfferClick", null); class kt extends ce.fb { ViewOfferClick(e) { let t = this.GetArgument("id"), n = o.De.COMMUNITY_BASE_URL + "tradeoffer/" + t + "/", i = "ViewTradeOffer" + t; X.RA(e).open(n, i, "height=1120,width=1028,resize=yes,scrollbars=yes").focus(); } ViewMyOffersClick(e) { let t = this.props.context.chat.self.steamid64, n = this.GetArgument("id"), i = `${o.De.COMMUNITY_BASE_URL}profiles/${t}/tradeoffers/sent/#tradeofferid_${n}`; (0, G.b8)(e, i); } render() { let e = this.GetArgument("id"), t = parseInt(this.GetArgument("sender")); if (!e && this.GetArgument("url")) return T.createElement(Mt, Object.assign({}, this.props)); let n = this.props.context.chat, i = n.self.accountid == t, o = T.createElement("span", { className: "inviteeNameLabel" }, n.chat_partner.display_name); return T.createElement( "div", { className: "ChatMessageInvite TradeOfferInvite" }, T.createElement("div", { className: "leftInviteContainer" }, T.createElement(V.o2, { friend: i ? n.self : n.chat_partner, context: { chat: n }, bLarge: !0 }), T.createElement(B.hoX, null)), T.createElement("div", { className: "rightInviteContainer" + (i ? " rightInvite_Horizontal" : "") }, T.createElement("div", { className: "rightInviteContainerContent" }, T.createElement(O.v$, null, T.createElement("div", { className: "inviteLabel TradeOfferInvite_Title" }, (0, L.kQ)(i ? "#TradeOffer_YouSentFriend" : "#TradeOffer_FriendSentYou", o)), T.Children.count(this.props.children) > 0 && T.createElement("div", { className: "TradeOffer_NoteFromFriendCtn" }, T.createElement("div", { className: "TradeOffer_NoteFromFriend_QuoteArrow" }), T.createElement("div", { className: "inviteLabel TradeOffer_NoteFromFriend" }, this.props.children)))), T.createElement("button", { className: "DialogButton Primary", type: "button", onClick: i ? this.ViewMyOffersClick : this.ViewOfferClick }, (0, L.kQ)("#TradeOffer_ViewTradeOffer"))), T.createElement("div", { style: { clear: "left" } }), ); } } (0, i.gn)([s.ak], kt.prototype, "ViewOfferClick", null), (0, i.gn)([s.ak], kt.prototype, "ViewMyOffersClick", null); class Tt extends ce.fb { constructor(e) { super(e), (this.state = { broadcaster: void 0 }); } static getDerivedStateFromProps(e, t) { let n = new ue.K(e.args.broadcaster); return { broadcaster: h.Ul.FriendStore.GetPlayer(n.GetAccountID()) }; } render() { return T.createElement(U, { broadcaster: this.state.broadcaster }); } } let Lt = class extends ce.fb { CopyToClipboard() { let e = this.GetArgument("url"); e && 0 != e.length && X.J$(e); } constructor(e) { super(e), (this.m_bMounted = !1), (this.state = { bLoading: !0, bStillLoading: !1, bLoadFail: !1, bLoadSuccess: !1, description: null }); } componentWillUnmount() { this.m_bMounted = !1; } componentDidMount() { this.m_bMounted = !0; let e = h.Ul.CMInterface; if (e) { let t = parseInt(this.GetArgument("appid")), n = this.GetArgument("classid"), i = this.GetArgument("instanceid"), r = I.gA.Init(ge.T4); r.Body().set_language(o.De.LANGUAGE), r.Body().set_appid(t); let a = r.Body().add_classes(); a.set_classid(n), a.set_instanceid(i), ge.$n.GetAssetClassInfo(e.GetServiceTransport(), r).then((e) => { this.m_bMounted && (1 == e.GetEResult() ? this.setState({ bLoading: !1, bLoadFail: !1, bLoadSuccess: !0, description: e.Body().descriptions()[0] }) : this.setState({ bLoading: !1, bLoadFail: !0, bLoadSuccess: !1 })); }); } me.findDOMNode(this).ownerDocument.defaultView.setTimeout(() => { this.m_bMounted && this.setState((e) => (e.bLoading ? { bStillLoading: !0 } : null)); }, 500); } OnImageLoaded() { this.props.context.onLoad && this.props.context.onLoad("CBBCodeEconItem " + this.GetArgument("url")); } render() { let e = this.GetArgument("image"), t = this.GetArgument("url"), n = parseInt(this.GetArgument("appid")), i = this.GetArgument("contextid"), r = this.GetArgument("assetid"), a = this.GetArgument("market_hash_name"), s = parseInt(this.GetArgument("owner")), l = h.Ul.AppInfoStore.GetAppInfo(n); if (s && t) { let c = this.props.context.chat.GetMember(s), m = c ? c.display_name : this.GetArgument("persona"), d = De.XW(t), u = `${o.De.COMMUNITY_BASE_URL}economy/image/${e}/512x512`, p = { color: "" }, _ = `${o.De.COMMUNITY_BASE_URL}market/listings/${n}/${a}`, g = `${o.De.COMMUNITY_BASE_URL}tradeoffer/new/?partner=${s}&for_items[]=${n}_${i}_${r}`; return ( this.state.bLoadSuccess && (this.state.description.name_color() && (p.color = "#" + this.state.description.name_color()), this.state.description.icon_url_large() ? (u = `${o.De.COMMUNITY_BASE_URL}economy/image/${this.state.description.icon_url_large()}/512x512`) : this.state.description.icon_url() && (u = `${o.De.COMMUNITY_BASE_URL}economy/image/${this.state.description.icon_url()}/512x512`)), T.createElement( O.v$, { text: t }, T.createElement( "div", { className: "ChatMessageOpenGraph" }, T.createElement( "div", { className: "OpenGraphContent ClientFetchesData" }, T.createElement("div", { className: "OpenGraphImgBackground" }, T.createElement("img", { className: "ChatMessageOpenGraph_Image", src: u, onLoad: this.OnImageLoaded })), T.createElement( G.ns, { className: "OpenGraphImgContainer", href: t }, T.createElement(ct, { context: this.props.context, className: "ChatMessageOpenGraph_Image", src: u, onContextMenu: (e) => { (0, G.mO)(e, t); }, }), ), T.createElement( "div", { className: "ChatMessageOpenGraph_Body" }, this.state.bStillLoading && T.createElement(Z.V, { size: "medium", position: "center" }), this.state.bLoadSuccess && T.createElement( O.v$, { text: [(0, L.Xx)("#bbcode_econ_ItemTitle", m, this.state.description.name()), t] }, T.createElement( "div", null, T.createElement(G.ns, { className: "ChatMessageOpenGraph_Title", href: t, style: p }, (0, L.Xx)("#bbcode_econ_ItemTitle", m, this.state.description.name())), T.createElement("div", { className: "ChatMessageOpenGraph_Description" }, T.createElement("div", { className: "EconItemOpenGraph_GameInfo" }, T.createElement("img", { src: l.icon_url, onLoad: this.OnImageLoaded }), T.createElement("div", null, T.createElement("div", null, l.name), T.createElement("div", null, this.state.description.type())))), T.createElement("div", { style: { marginTop: "1em" } }, this.state.description.tradable() && h.Ul.CMInterface && s != h.Ul.CMInterface.steamid.GetAccountID() && T.createElement(G.ns, { className: "general_btn inline", href: g }, (0, L.Xx)("#bbcode_econ_TradeWithOwner", m)), this.state.description.marketable() && T.createElement(G.ns, { className: "general_btn inline", href: _ }, (0, L.Xx)("#bbcode_econ_ViewInMarket"))), ), ), this.state.bLoadFail && T.createElement("div", null, T.createElement(G.ns, { className: "ChatMessageOpenGraph_Title", href: t }, (0, L.Xx)("#bbcode_econ_UnknownItem")), T.createElement("div", { className: "ChatMessageOpenGraph_Description" }, (0, L.Xx)("#bbcode_econ_LoadFail"))), ), ), T.createElement("div", { className: "OpenGraphFooter" }, T.createElement(G.ns, { className: "OpenGraphMessageURL", href: t }, T.createElement("span", { className: "OpenGraphMessageURLPosition" }, T.createElement("span", { className: "OpenGraphMessageURL_short" }, d), T.createElement("span", { className: "OpenGraphMessageURL_full" }, t))), T.createElement("div", { className: "OpenGraphURLButton CopyToClipboard", onClick: this.CopyToClipboard }, T.createElement(B.h9, null))), ), ) ); } return T.createElement(G.ns, { href: t }, t); } }; (0, i.gn)([s.ak], Lt.prototype, "CopyToClipboard", null), (0, i.gn)([s.ak], Lt.prototype, "OnImageLoaded", null), (Lt = (0, i.gn)([k.Pi], Lt)); class Gt extends ce.fb { render() { let e = this.props.children ? this.props.args[""] : ""; return T.createElement(O.v$, { text: (0, L.Xx)("#bbcode_linkremoved") }, T.createElement("span", { className: "filteredURL bb_removedlink", title: (0, L.Xx)("#Community_RemoveLink_Tooltip") }, T.createElement(B.ge, null), T.createElement("span", { className: "threatURLDesc" }, (0, L.Xx)("#bbcode_linkremoved_desc")), T.createElement("span", { className: "threatURL" }, e))); } } let Ot = class extends ce.fb { render() { let e = this.GetArgument(); if (e) { if (("here" == e && (e = "online"), "all" == e || "online" == e)) return T.createElement("span", { className: "mention me" }, T.createElement("span", { className: "MentionAtSymbol" }, "@"), e); { let t = parseInt(e), n = t && this.props.context.chat.GetMember(t); if ((n || (n = t && h.Ul.FriendStore.GetPlayer(t)), n)) { let e = n.accountid == this.props.context.chat.self.accountid; return T.createElement(V.yd, { friend: n, context: { chat: this.props.context.chat } }, T.createElement("span", { className: "mention" + (e ? " me" : "") }, T.createElement("span", { className: "MentionAtSymbol" }, "@"), n.display_name)); } } } return T.createElement("span", null, "@" + e); } }; Ot = (0, i.gn)([k.Pi], Ot); class Ft extends ce.fb { render() { let e = ""; return ( "string" == typeof this.props.children ? (e = this.props.children) : T.Children.forEach(this.props.children, (t) => { if (("string" == typeof t && (e += t), "object" == typeof t && t.props)) { let n = t.props["bbcode-text"]; n && (e += n); } }), e ? T.createElement(ve.tk, { emoticon: e, emoticonHoverStore: Ce.$, large: this.props.context.bUseLargeEmoticons }) : null ); } } var Bt; !(function (e) { (e[(e.Large = 3)] = "Large"), (e[(e.Medium = 2)] = "Medium"), (e[(e.Small = 1)] = "Small"), (e[(e.Tiny = 0)] = "Tiny"); })(Bt || (Bt = {})); let xt = class extends ce.fb { constructor() { super(...arguments), (this.state = { SteamStoreItem: null, bStoreRequestFailed: !1, bPlayVideo: !1, nThumbnailHovered: -1, nContentSize: Bt.Large }), (this.m_contentRef = T.createRef()), (this.m_storePreferences = h.Ul.SettingsStore.StorePreferences), (this.m_resizeObserver = null); } componentDidMount() { return (0, i.mG)(this, void 0, void 0, function* () { const e = this.GetArgument("app"), t = o.De.COUNTRY || "US", n = yield M().get(`${o.De.STORE_BASE_URL}api/appdetails?appids=${e}&cc=${t}&language=${o.De.LANGUAGE}&filters=basic,price_overview,developers,screenshots,movies,release_date,content_descriptors&client=${o.De.IN_CLIENT}&origin=${(0, o.Kc)()}`); let i = null; if (n && n.data) { const e = this.GetArgument("app"); i = n.data[e]; } i && i.success ? this.setState({ SteamStoreItem: this.ExtractGameData(i.data), bStoreRequestFailed: !1 }, this.OnFrameLoaded) : this.setState({ bStoreRequestFailed: !0 }); let r = this.m_contentRef.current; r && (this.m_resizeObserver = (0, s.it)(r, this.OnResize)); }); } componentWillUnmount() { this.m_resizeObserver && this.m_resizeObserver.disconnect(); } OnResize() { var e, t; let n = null === (t = null === (e = this.m_contentRef.current) || void 0 === e ? void 0 : e.getClientRects()[0]) || void 0 === t ? void 0 : t.width; n && (n < 288 ? this.setState({ nContentSize: Bt.Tiny }) : n < 348 ? this.setState({ nContentSize: Bt.Small }) : n < 484 ? this.setState({ nContentSize: Bt.Medium }) : this.setState({ nContentSize: Bt.Large })); } ExtractGameData(e) { const { name: t, is_free: n, short_description: i, header_image: o, developers: r, screenshots: a, movies: s, release_date: l, price_overview: c, content_descriptors: m, steam_appid: d } = e; return { name: t, is_free: n, description: (0, Ee.HA)(i), header_image: o, developer: r && r[0], screenshot: a && a[0] && a[0].path_thumbnail, screenshots: a && a, movie: s && s[0] && s[0].webm && s[0].webm[480] && s[0].webm[480].replace("http://", "https://"), thumbnail: s && s[0] && s[0].thumbnail, release_date: l && l.date, url: (0, pe.FG)(d, "chatlink"), price: c && c.final_formatted, initial_price: c && c.initial_formatted, discount: c && c.discount_percent && c.discount_percent, content_descriptor_ids: m && m.ids }; } OnFrameLoaded() { this.props.context.onLoad && this.props.context.onLoad("CBBCodeSteamStore " + this.GetArgument("app")); } OpenStoreLink(e) { let t = X.RA(e); (0, G.b8)(t, this.state.SteamStoreItem.url); } PlayVideoClicked() { this.setState({ bPlayVideo: !this.state.bPlayVideo }); } OnThumbnailOver(e) { this.setState({ nThumbnailHovered: e }); } OnThumbnailLeave() { this.setState({ nThumbnailHovered: -1 }); } CopyToClipboard() { let e = this.props.children; e && 0 != e.length && X.J$(e); } render() { if (h.Ul.SettingsStore.FriendsSettings.bDisableEmbedInlining) { let e = Ze(this.props.children); return T.createElement(He, { href: e }, T.createElement(B.nWq, null), e); } const e = () => {}; if (this.state.bStoreRequestFailed) { let t = h.Ul.FriendStore.GetPlayer(this.props.context.unAccountIDSender).display_name, n = Ze(this.props.children), i = T.createElement("span", { className: Me().senderName }, t), o = T.createElement("span", { className: Me().URLSent }, n), r = T.createElement(G.ns, { className: Me().SteamURL, href: "https://store.steampowered.com/" }, (0, L.Xx)("#bbcode_steam_store_embed_Failed_Steam_Store")); return T.createElement(F.s, { className: Me().ChatMessageSteamStore_Failed, onActivate: e, onOKActionDescription: (0, L.Xx)("#bbcode_steam_store_embed_ViewStorePage_Filtered") }, T.createElement("span", null, (0, L.kQ)("#bbcode_steam_store_embed_Failed", i, r, o))); } let t = this.state.SteamStoreItem; if (!t) return T.createElement("div", { className: Me().ChatMessageSteamStore, style: { width: 640, height: 208 } }, T.createElement("div", { className: Me().ChatMessageSteamStore_Header, style: { height: 70 } }, T.createElement("div", { className: Me().ChatMessageSteamStore_HeaderImage })), T.createElement(Z.V, null)); const { name: n, price: i, description: o, header_image: r, developer: a, movie: s, thumbnail: l, release_date: c, screenshots: m, is_free: d, initial_price: u, discount: p, content_descriptor_ids: _ } = t; let g = !1; const C = this.m_storePreferences && this.m_storePreferences.content_descriptor_preferences() && this.m_storePreferences.content_descriptor_preferences().content_descriptors_to_exclude() && this.m_storePreferences .content_descriptor_preferences() .content_descriptors_to_exclude() .map((e) => e.content_descriptorid()); _ && C && _.some((e) => -1 !== C.indexOf(e)) && (g = !0); let f = [], v = !0; if (g) v = !1; else for (let e = 0; e < m.length; e++) { let t = e; if ((s || (t = e + 1), (s && t > 2) || (!s && t > 3))) break; let n = ""; m && m[t] && "undefined" !== m[t].path_thumbnail ? (n = `${m[t].path_thumbnail}`) : (v = !1), f.push(T.createElement("div", { key: "screenshot" + t, className: Me().ChatMessageSteamStore_Screenshot }, T.createElement("img", { className: Me().ChatMessageSteamStore_ScreenshotThumbnail, src: n, onMouseEnter: () => this.OnThumbnailOver(t) }))); } let S = Me().Large, b = !("0" == p || null == p), I = this.state.nThumbnailHovered, y = this.state.bPlayVideo, E = T.createElement("div", { className: Me().ChatMessageSteamStore_FilteredDescription }, (0, L.Xx)("#bbcode_steam_store_embed_Filtered"), " "); switch (this.state.nContentSize) { case Bt.Tiny: S = Me().TinyContent; break; case Bt.Small: S = Me().SmallContent; break; case Bt.Medium: S = Me().MediumContent; break; case Bt.Large: S = Me().LargeContent; } return T.createElement( F.s, { ref: this.m_contentRef, className: (0, ne.Z)(Me().ChatMessageSteamStore, g ? Me().ChatMessagesSteamStore_FilteredContent : null, S), onActivate: this.OpenStoreLink, onOKActionDescription: (0, L.Xx)(g ? "#bbcode_steam_store_embed_ViewStorePage_Filtered" : "#bbcode_steam_store_embed_ViewStorePage") }, T.createElement( "div", { className: Me().ChatMessageSteamStore_Header }, r && T.createElement(T.Fragment, null, T.createElement("img", { className: Me().ChatMessageSteamStore_HeaderImage, src: r, onClick: g ? null : this.OpenStoreLink }), g && T.createElement("div", { className: Me().ChatMessageSteamStore_HeaderImageFiltered }, (0, L.Xx)("#bbcode_steam_store_embed_Image_Filtered")), T.createElement("img", { className: (0, ne.Z)(Me().ChatMessageSteamStore_HeaderImage, Me().Blurred), src: r })), T.createElement("div", { className: Me().ChatMessageSteamStore_GameDetails }, T.createElement("div", { className: Me().ChatMessageSteamStore_GameNameAndIcon, onClick: g ? null : this.OpenStoreLink }, T.createElement("div", { className: Me().ChatMessageSteamStore_Name }, n)), T.createElement("div", null, (0, L.Xx)("#bbcode_steam_store_embed_From"), T.createElement("span", { style: { color: "#fffc" } }, `${a}`)), T.createElement("div", { style: { fontSize: 12 } }, (0, L.Xx)("#bbcode_steam_store_embed_ReleaseDate"), T.createElement("span", { style: { color: "#fffc" } }, `${c}`))), ), T.createElement( "div", { className: Me().ChatMessageSteamStore_Body }, T.createElement( "div", { className: Me().ChatMessageSteamStore_DetailsContainer }, T.createElement( "div", { className: Me().ChatMessageTweet_NameSection }, T.createElement("div", { className: Me().ChatMessageSteamStore_Description }, g ? E : o, " "), T.createElement( "div", { className: Me().ChatMessageSteamStore_Footer }, T.createElement("div", { className: Me().ChatMessageSteamStore_PricingContainer }, T.createElement("div", { className: Me().ChatMessageSteamStore_Pricing }, b && T.createElement("div", { className: Me().ChatMessageSteamStore_Pricing_Discount }, "-" + p + "%"), T.createElement("div", { className: Me().ChatMessageSteamStore_Pricing_FinalContainer }, b && u && T.createElement("div", { className: Me().ChatMessageSteamStore_Pricing_Initial }, `${u}`), i && T.createElement("div", { className: (0, ne.Z)(Me().ChatMessageSteamStore_Pricing_Final, b ? Me().hasDiscount : null) }, `${i}`)), d && !i && T.createElement("span", { className: Me().ChatMessageSteamStore_Free }, (0, L.Xx)("#bbcode_steam_store_embed_FreeToPlay"))), T.createElement("div", { className: Me().ChatMessageSteamStore_ViewStore, onClick: this.OpenStoreLink }, (0, L.Xx)(g ? "#bbcode_steam_store_embed_ViewStorePage_Filtered" : "#bbcode_steam_store_embed_ViewStorePage"))), T.createElement("div", { className: Me().ChatMessageSteamStore_CopyURL, onClick: this.CopyToClipboard, title: (0, L.Xx)("#Chat_Copy_Link_Clipboard") }, T.createElement(B.h9, null)), ), ), ), !g && T.createElement("div", { className: Me().ChatMessageSteamStore_MediaContainer }, T.createElement("div", { className: Me().ChatMessageSteamStore_MainMedia }, s && T.createElement("div", { className: (0, ne.Z)(Me().ChatMessageSteamStore_VideoThumbnail, y ? Me().videoPlaying : null), onClick: this.PlayVideoClicked }, I < 0 || null == I ? T.createElement(T.Fragment, null, T.createElement("img", { src: l }), T.createElement("div", { className: Me().ChatMessageSteamStore_VideoPlayButton }, T.createElement(B.shV, null))) : T.createElement("img", { src: `${m[I].path_thumbnail}`, style: { width: "100%" } })), !s && m && T.createElement("img", { src: `${m[Math.max(I, 0)].path_thumbnail}`, style: { width: "100%" } })), v && m && T.createElement("div", { className: Me().ChatMessageSteamStore_ThumbnailsContainer, onMouseLeave: this.OnThumbnailLeave }, f)), T.createElement("div", { className: (0, ne.Z)(Me().ChatMessageSteamStore_VideoLargeContainer, y ? Me().videoPlaying : null), onClick: this.PlayVideoClicked }, y && T.createElement("video", { className: Me().ChatMessageSteamStore_VideoLarge, src: s, controls: !0, autoPlay: !0 }), T.createElement("div", { onClick: this.PlayVideoClicked }, T.createElement(B.pVO, null))), ), ); } }; (0, i.gn)([s.ak, (0, Ie.D)(100)], xt.prototype, "OnResize", null), (0, i.gn)([s.ak], xt.prototype, "ExtractGameData", null), (0, i.gn)([s.ak], xt.prototype, "OnFrameLoaded", null), (0, i.gn)([s.ak], xt.prototype, "OpenStoreLink", null), (0, i.gn)([s.ak], xt.prototype, "PlayVideoClicked", null), (0, i.gn)([s.ak], xt.prototype, "OnThumbnailOver", null), (0, i.gn)([s.ak], xt.prototype, "OnThumbnailLeave", null), (0, i.gn)([s.ak], xt.prototype, "CopyToClipboard", null), (xt = (0, i.gn)([k.Pi], xt)); let Nt = (Xe = class extends ce.fb { constructor() { super(...arguments), (this.state = { bDisabled: !1 }); } OnReplayAnimation() { const e = this.props.args.type; this.props.context.chat.RoomEffectManager().ActivateRoomEffect(e); const t = window.setTimeout(() => { this.setState({ bDisabled: !1, iTimerID: void 0 }); }, Xe.k_iCooldownMs); this.setState({ bDisabled: !0, iTimerID: t }); } componentWillUnmount() { this.state.iTimerID && window.clearTimeout(this.state.iTimerID); } render() { const e = h.Ul.FriendStore.GetPlayer(this.props.context.unAccountIDSender), t = this.props.args.type, n = Re.F[t]; if (!n) return console.log("Attempt to render unknown room effect " + t), null; const i = n.locToken; return T.createElement("div", { className: Me().RoomEffectContainer }, T.createElement("span", { className: Me().RoomEffectIcon }, n.renderEffectIcon()), (0, L.kQ)(i, e.display_name), T.createElement("div", { style: { marginLeft: "auto", marginRight: "16px" } }, T.createElement(fe.KM, { disabled: this.state.bDisabled, style: { padding: "0px 8px" }, onClick: this.state.bDisabled ? void 0 : this.OnReplayAnimation }, (0, L.Xx)("#ChatRoom_ReplayRoomEffect")))); } }); (Nt.k_iCooldownMs = 5e3), (0, i.gn)([s.ak], Nt.prototype, "OnReplayAnimation", null), (Nt = Xe = (0, i.gn)([k.Pi], Nt)); class Pt extends ce.fb { constructor() { super(...arguments), (this.m_imageRef = T.createRef()), (this.state = { bIsHovered: !1 }); } OnMouseOver() { this.setState({ bIsHovered: !0 }); } OnMouseOut() { this.setState({ bIsHovered: !1 }); } render() { const e = this.GetArgument("type"), t = (0, we.a)(o.De.COMMUNITY_CDN_URL, e); return T.createElement("div", { style: { cursor: "pointer", position: "relative", width: "150px", height: "150px" }, onMouseOver: this.OnMouseOver, onMouseOut: this.OnMouseOut, onFocus: this.OnMouseOver, onBlur: this.OnMouseOut }, T.createElement("img", { ref: this.m_imageRef, style: { display: "block", zIndex: 1 }, src: t }), this.state.bIsHovered && T.createElement(Ut, { target: this.m_imageRef.current, sticker: e })); } } function Ut(e) { const { target: t, sticker: n } = e, i = (function (e) { const [t, n] = T.useState(null); return ( T.useEffect(() => { let t = !0; return ( M() .get(`${o.De.COMMUNITY_CDN_URL}economy/stickerjson/${encodeURIComponent(e)}?l=${encodeURIComponent(o.De.LANGUAGE)}&origin=${(0, o.Kc)()}`) .then((e) => t && n(e.data)) .catch((e) => console.error(`Failed to load stickerJSON: ${e}`)), () => { t = !1; } ); }, [e]), t ); })(n); if (!i) return null; const { appid: r } = i; return T.createElement(ve.Nr, { target: t, sticker: { appid: r, name: n } }); } (0, i.gn)([s.ak], Pt.prototype, "OnMouseOver", null), (0, i.gn)([s.ak], Pt.prototype, "OnMouseOut", null); var Vt = n(15152), Ht = n(69807), Wt = n(13106), Xt = n(63036), jt = n(37634), zt = n(78654), Kt = n(54054), qt = n(77385); const Zt = n.p + "javascript/webui/noisegate-audio-worklet.js?contenthash=ef007c9e0249549f997c", Qt = new qt.sO("AudioPlaybackManager"); class $t { constructor() { (this.m_mapPlaybackObjs = new Map()), (this.m_bVoiceActive = !1), (this.m_hCloseContextTimeout = void 0), (this.m_voiceStore = void 0), (this.m_nLastObservedSampleRate = 0), (this.m_bSupportsAudioWorkletProcessors = !1), (this.m_MediaStreamDestination = void 0), (this.m_MediaStreamAudioElem = void 0), (0, y.rC)(this), ($t.sm_instance = this); } static Get() { return $t.sm_instance; } get context() { return this.m_Context; } get supports_audio_worklets() { return this.m_bSupportsAudioWorkletProcessors; } SetVoiceStore(e) { this.m_voiceStore = e; } GetActiveDestination() { if ((this.CreateContextIfNeeded(), this.m_voiceStore && this.m_voiceStore.IsAnyVoiceActive() && "default" != this.m_voiceStore.GetSelectedOutputDevice())) { if (null == this.m_MediaStreamDestination) { let e = this.m_Context; (this.m_MediaStreamDestination = e.createMediaStreamDestination()), (this.m_MediaStreamAudioElem = document.createElement("audio")), (this.m_MediaStreamAudioElem.srcObject = this.m_MediaStreamDestination.stream), this.m_MediaStreamAudioElem.play(); try { this.m_MediaStreamAudioElem.setSinkId(this.m_voiceStore.GetSelectedOutputDevice()); } catch (e) { Qt.Error("Failed setting audio output device to " + this.m_voiceStore.GetSelectedOutputDevice() + ": " + e); } } return this.m_MediaStreamDestination; } return this.m_Context.destination; } PlayAudioURL(e, t = 1) { return this.PlayAudioURLWithRepeats(e); } PlayAudioURLWithRepeats(e, t = 0) { Qt.Debug("web audio playback requested: " + e), this.CreateContextIfNeeded(); let n = new Yt(this, e, t); return this.m_mapPlaybackObjs.set(n, !0), n; } PlaybackFinished(e) { this.m_mapPlaybackObjs.delete(e), this.CleanupContextIfUneeded(!1); } SetVoiceActive(e) { (this.m_bVoiceActive = !0), this.CreateContextIfNeeded(e); } SetVoiceNotActive() { (this.m_bVoiceActive = !1), this.CleanupContextIfUneeded(!0); } GetLastObservedSampleRate() { return this.m_nLastObservedSampleRate; } CreateContextIfNeeded(e = void 0) { if (null == this.m_Context) { Qt.Debug("new context"); let t = window, n = t.AudioContext || t.webkitAudioContext || !1; (this.m_Context = new n()), (this.m_Context.onstatechange = this.OnAudioContextStateChange), Qt.Debug("sample rate " + this.m_Context.sampleRate), (this.m_nLastObservedSampleRate = this.m_Context.sampleRate); let i = this.m_Context; null != i.audioWorklet ? ((this.m_bSupportsAudioWorkletProcessors = !0), i.audioWorklet .addModule(Zt) .then(() => { Qt.Debug("noisegate-audio-worklet.js worklet processor loaded"), e && e(); }) .catch((t) => { Qt.Error("Failed to load noisegate-audio-worklet.js worklet processor"), e && e(); })) : e && e(); } else e && e(); } DelayedCleanupContextIfInactive() { (this.m_hCloseContextTimeout = void 0), 0 == this.m_mapPlaybackObjs.size && 0 == this.m_bVoiceActive && (Qt.Debug("close context"), null != this.m_MediaStreamAudioElem && (this.m_MediaStreamAudioElem.pause(), (this.m_MediaStreamAudioElem.src = void 0), (this.m_MediaStreamAudioElem.srcObject = void 0)), (this.m_MediaStreamAudioElem = void 0), (this.m_MediaStreamDestination = void 0), this.m_Context.close(), (this.m_Context = void 0)); } CleanupContextIfUneeded(e) { if (0 == this.m_mapPlaybackObjs.size && 0 == this.m_bVoiceActive) { if ((null != this.m_hCloseContextTimeout && (clearTimeout(this.m_hCloseContextTimeout), (this.m_hCloseContextTimeout = void 0)), e)) return void this.DelayedCleanupContextIfInactive(); this.m_hCloseContextTimeout = SetBackgroundTimeout(this.DelayedCleanupContextIfInactive, 1e4); } } OnAudioContextStateChange() { null != this.m_Context && Qt.Debug("web audio context state changed: " + this.m_Context.state); } } ($t.sm_instance = null), (0, i.gn)([y.LO], $t.prototype, "m_nLastObservedSampleRate", void 0), (0, i.gn)([y.LO], $t.prototype, "m_bSupportsAudioWorkletProcessors", void 0), (0, i.gn)([s.ak], $t.prototype, "DelayedCleanupContextIfInactive", null), (0, i.gn)([y.aD.bound], $t.prototype, "OnAudioContextStateChange", null); class Yt { constructor(e, t, n) { (this.m_Source = void 0), (this.m_RepeatCount = 0), (this.m_TimesPlayed = 0), (this.m_Cancelled = !1), (this.m_cbPlaybackFinished = null), (0, y.rC)(this), (this.m_Manager = e), (this.m_URL = t), (this.m_RepeatCount = n), M() .get(t, { responseType: "arraybuffer" }) .then((t) => { e.context .decodeAudioData(t.data) .then((t) => { if (this.m_Cancelled) this.NotifyPlaybackFinished(); else { let n = e.context.createBufferSource(); (n.buffer = t), n.connect(e.GetActiveDestination()), n.start(0), (n.onended = this.OnPlaybackEnded), (this.m_Source = n); } }) .catch((e) => { this.OnFailure(); }); }) .catch((e) => { this.OnFailure(); }); } StopPlayback() { (this.m_Cancelled = !0), this.m_Source && (this.m_Source.stop(0), this.m_Source.disconnect(), (this.m_Source = void 0), this.NotifyPlaybackFinished()); } get url() { return this.m_URL; } OnFailure() { SetBackgroundTimeout(() => this.m_Manager.PlaybackFinished(this), 1); } OnPlaybackEnded() { if (((this.m_TimesPlayed += 1), !this.m_Cancelled && this.m_TimesPlayed <= this.m_RepeatCount)) { let e = this.m_Manager.context.createBufferSource(); return (e.buffer = this.m_Source.buffer), e.connect(this.m_Manager.GetActiveDestination()), e.start(0), (e.onended = this.OnPlaybackEnded), this.m_Source.disconnect(), (this.m_Source = void 0), void (this.m_Source = e); } this.m_Source && (this.m_Source.disconnect(), (this.m_Source = void 0)), this.NotifyPlaybackFinished(); } NotifyPlaybackFinished() { this.m_cbPlaybackFinished && this.m_cbPlaybackFinished(), this.m_Manager.PlaybackFinished(this); } RegisterOnPlaybackFinished(e) { this.m_cbPlaybackFinished = e; } } (0, i.gn)([y.aD.bound], Yt.prototype, "OnFailure", null), (0, i.gn)([y.aD.bound], Yt.prototype, "OnPlaybackEnded", null); var Jt = n(24110); class en extends Jt.L { GetString(e) { return (0, i.mG)(this, void 0, void 0, function* () { try { return yield SteamClient.Storage.GetString(e).then((t) => { if (t) return t; let n = localStorage.getItem(e); return n && SteamClient.Storage.SetString(e, n), n; }); } catch (e) { return null; } }); } StoreString(e, t) { return SteamClient.Storage.SetString(e, t), Promise.resolve(); } RemoveObject(e) { return SteamClient.Storage.DeleteKey(e), Promise.resolve(); } } var tn = n(99627), nn = n(82909), on = (n(20646), n(82398), n(95967)), rn = n(57476), an = n(76135), sn = n(33082); function ln(e, t) { let n = (0, X.RA)(t); if (!n && e) { let t = me.findDOMNode(e); t && t.ownerDocument && (n = t.ownerDocument.defaultView); } return (0, v.X)(n, "Couldn't find owning window to determine browser context"), cn(n); } function cn(e) { let t = sn.D; return e && ((0, v.X)(e.__FriendsUIBrowserContext, "FriendsUI Browser context missing from owner window"), e.__FriendsUIBrowserContext && (t = e.__FriendsUIBrowserContext)), t; } function mn(e) { let t = cn(e); return t && t.m_unPID != sn.D.m_unPID && t.m_nBrowserID != sn.D.m_nBrowserID ? t : null; } var dn = n(37232); class hn extends C.K3 { constructor(e, t, n) { super("InvisiblePopup", { title: "", bIgnoreSavedDimensions: !0, dimensions: { width: 1, height: 1, left: e, top: t }, eCreationFlags: C.eL.AlwaysOnTop | C.eL.NoTaskbarIcon | C.eL.NotFocusable | C.eL.OverrideRedirect }), (this.m_fnOnRender = n); } OnClose() { this.m_reactRoot.unmount(); } OnLoad() {} OnResize() {} Render(e, t) { this.m_reactRoot = this.m_fnOnRender(e, t); } } class un extends h.cX { constructor(e) { super(), (this.m_window = e); } BringToFront() { null != this.m_window.SteamClient && null != this.m_window.SteamClient.Window && null != this.m_window.SteamClient.Window.BringToFront ? this.m_window.SteamClient.Window.BringToFront() : this.m_window.focus(); } FlashWindow(e) { null != this.m_window.SteamClient && null != this.m_window.SteamClient.Window && (e && null != this.m_window.SteamClient.Window.FlashWindow ? this.m_window.SteamClient.Window.FlashWindow() : null != this.m_window.SteamClient.Window.StopFlashWindow && this.m_window.SteamClient.Window.StopFlashWindow()); } Close() { this.m_window && this.m_window.close(); } get title() { return this.m_window.document.title; } set title(e) { this.m_window.document.title = e; } BIsClosed() { return this.m_window.closed; } BIsVisible() { return "visible" == this.m_window.document.visibilityState; } BIsFocused() { return this.m_window.document.hasFocus(); } IsMinimized() { return (0, rn.w3)(this.m_window, "Window.IsWindowMinimized") ? this.m_window.SteamClient.Window.IsWindowMinimized() : Promise.resolve(!1); } OnFocus(e) { let t = () => { e(); }; return ( this.m_window.addEventListener("focus", t), { unregister: () => { this.m_window.removeEventListener("focus", t); }, } ); } GetWindow() { return this.m_window; } } class pn extends h.i9 { constructor(e) { super(), (this.m_popup = e); } get container() { return !this.m_container && this.m_popup.window && (this.m_container = new un(this.m_popup.window)), this.m_container; } Show(e) { h.Ul.ParentalStore.BIsFriendsBlocked() || h.Ul.SettingsStore.IsSteamInTournamentMode() ? console.log("Blocked popup due to parental controls or tournament mode") : this.m_popup.Show(e); } Close() { this.m_popup.Close(); } GetWindowRestoreDetails() { return this.m_popup.GetWindowRestoreDetails(); } IsMinimized() { return this.m_popup.IsMinimized(); } GetBrowserContext() { return this.m_popup.browser_info; } GetWindow() { return this.m_popup.window; } } const _n = { nChatRoomListHeightPx: 224, bChatRoomListCollapsed: !1, bDontShowVoiceAlert: !1, nFriendsListSingleWindowWidthPx: 300, bFavoritesHintDismissed: !1, bRemotePlayLinkHintDismissed: !1, nChangeLogDismissed: 0 }, gn = "UIDisplayPrefs"; class Cn { constructor(e, t) { (this.m_FriendHoverStore = new D.x5()), (this.m_DragDropManager = new S()), (this.m_OverlayStore = new w()), (this.m_FocusNavController = new on.ZT()), (this.m_mapFriendsListPopups = new y.vP()), (this.m_UIDisplayPrefs = _n), (this.m_bUpdatedBuildAvailable = !1), (this.m_nSecondsOutOfDate = 0), (this.m_strLoaderWindowRestoreDetails = void 0), (this.m_bShowFriendsListOnLoadFromLoader = void 0), (this.m_eUIMode = -1), (this.m_setSteamClientListeners = new Set()), (0, y.rC)(this), (this.m_FriendsUIApp = e), (this.m_bEmbeddedApp = t), this.IsEmbeddedApp() || (this.RegisterListeners(), In(window, sn.D), this.InstrumentWindow(window), C.AN.AddPopupCreatedCallback((e) => { this.InstrumentWindow(e.window); })); } RegisterListeners() { "undefined" != typeof SteamClient && SteamClient.WebChat && SteamClient.WebChat.RegisterForFriendPostMessage ? (this.m_setSteamClientListeners.add(SteamClient.WebChat.RegisterForFriendPostMessage(this.HandlePostMessage)), window.addEventListener("message", this.HandleWebLoaderPostMessage)) : ((0, v.X)(!o.De.IN_CLIENT, "Config.IN_CLIENT set but SteamClient globals not available"), window.addEventListener("message", this.HandlePostMessage)), (0, rn.U5)("Messaging.RegisterForMessages") && (this.m_setSteamClientListeners.add(SteamClient.Messaging.RegisterForMessages("LibraryCommands", this.HandleLibraryCommandMessage)), this.m_setSteamClientListeners.add(SteamClient.Messaging.RegisterForMessages("ContextMenus", this.HandleContextMenuMessage)), this.m_setSteamClientListeners.add(SteamClient.Messaging.RegisterForMessages("PersonaState", this.HandlePersonaStateMessage))), (0, rn.U5)("WebChat.RegisterForUIModeChange") && this.m_setSteamClientListeners.add(SteamClient.WebChat.RegisterForUIModeChange(this.HandleUIModeChange)); } RemoveListeners() { this.m_setSteamClientListeners.forEach((e) => e.unregister()), this.m_setSteamClientListeners.clear(); } IsGamepadUIActive() { return 4 == this.m_eUIMode; } IsDesktopUIActive() { return 7 == this.m_eUIMode; } IsEmbeddedApp() { return this.m_bEmbeddedApp; } OverlayStore() { return this.m_OverlayStore; } FriendGroupStore() { return this.m_FriendsUIApp.FriendStore.FriendGroupStore; } ChatStore() { return this.m_FriendsUIApp.ChatStore; } UIStore() { return this.m_FriendsUIApp.UIStore; } FocusNavController() { return this.m_FocusNavController; } BNeedsUpdate() { return this.m_bUpdatedBuildAvailable; } GetSecondsOutOfDate() { return this.m_nSecondsOutOfDate; } GetFriendsListPopup(e) { var t; return null !== (t = this.m_mapFriendsListPopups.get(e.m_unPID)) && void 0 !== t ? t : null; } SetVisibilityForDesktopUIOverlay(e, t) { const n = this.GetFriendsListPopup(e); t ? (n ? n.window.SteamClient.Window.ShowWindow() : this.ShowPopupFriendsList(e)) : n && n.window.SteamClient.Window.HideWindow(); } SetChatWindowsVisibilityForDesktopUIOverlay(e, t) { let n = this.m_FriendsUIApp.UIStore.GetPerContextChatData(e); for (let e of Array.from(n.popup_list)) { let n = e.popup.GetWindow(); t ? n.SteamClient.Window.ShowWindow() : n.SteamClient.Window.HideWindow(); } } InstrumentWindow(e) { this.m_FriendsUIApp.IdleTracker.AddTrackedWindow(e); } HandlePostMessage(e) { let t = e.data; if (!t || !t.command) return; let n = this.m_FriendsUIApp.GetDefaultBrowserContext(); void 0 !== e.data.pid && (n = { m_unPID: e.data.pid, m_nBrowserID: e.data.browserid, m_eUIMode: this.m_eUIMode }), this.ExecuteCommand(n, e.data); } HandleUIModeChange(e) { this.m_eUIMode = e; } SetShouldChangePersonaStatusOnDisconnect(e) { this.m_FriendsUIApp.CMInterface.SetShouldChangePersonaStatusOnDisconnect(e); } HandleLibraryCommandMessage(e, t, n) { let i = this.m_FriendsUIApp.GetDefaultBrowserContext(), o = JSON.parse(n); (o.command = t), this.ExecuteCommand(i, o); } OnCloseFakeContextMenu(e) { SteamClient.Messaging.PostMessage("ContextMenus", "OnFriendContextMenuClosed", ""), (this.m_LibraryFriendContextMenu = void 0); } HandleContextMenuMessage(e, t, n) { if ("ShowFriendContextMenu" == t) { let e = JSON.parse(n), t = new ue.K(e.steamid); if (t.GetAccountID() == this.m_FriendsUIApp.FriendStore.self.steamid.GetAccountID()) return void this.OnCloseFakeContextMenu(e.steamid); let i = new hn(e.x, e.y, (n, o) => { const r = jt.s(o); r.render(T.createElement(C.Rt, { ownerWindow: n, children: [T.createElement(an.Y0, { browserInfo: sn.D, children: null })] })); let a = h.Ul.FriendStore.GetFriend(t.GetAccountID()); return a ? ((this.m_LibraryFriendContextMenu = (0, nn.Xh)((0, Wt.wd)(this.m_FriendsUIApp.GetDefaultBrowserContext(), { chatContext: "friendslist" }, a, n), o, e.x, e.y)), this.m_LibraryFriendContextMenu.SetOnHideCallback(() => { this.OnCloseFakeContextMenu(e.steamid), i.Close(); }), SteamClient.Messaging.PostMessage("ContextMenus", "OnFriendContextMenuShown", ""), r) : (this.OnCloseFakeContextMenu(e.steamid), r); }); i.Show(); } else "CloseFriendContextMenu" == t && this.m_LibraryFriendContextMenu && this.m_LibraryFriendContextMenu.Hide(); } SendPersonaUpdateToLibrary(e) { (0, rn.U5)("Messaging.PostMessage") && SteamClient.Messaging.PostMessage("PersonaState", "PersonaUpdate", JSON.stringify(e)); } HandlePersonaStateMessage(e, t, n) { var i; "RequestPersonaState" == t && (null === (i = null === h.Ul || void 0 === h.Ul ? void 0 : h.Ul.FriendStore) || void 0 === i ? void 0 : i.self) && this.SendPersonaUpdateToLibrary(h.Ul.FriendStore.self.persona.m_ePersonaState); } PerformFriendsUIUpdate() { let e = this.m_FriendsUIApp.UIStore.SerializePopupStateToObject(!0); window.parent.postMessage({ message: "ChatReloadRequest", state: e }, "https://steamloopback.host"); } HandleWebLoaderPostMessage(e) { null != e.data.message && ("UpdatedBuildAvailable" == e.data.message ? (console.log("There is an updated friendsui build available, we are " + (e.data.bVeryOutOfDate ? "" : "NOT ") + "very out of date. We are " + (e.data.bForce ? "" : "NOT ") + "forcing an update."), (this.m_bUpdatedBuildAvailable = !0), void 0 !== e.data.nSecondsOutOfDate && (this.m_nSecondsOutOfDate = e.data.nSecondsOutOfDate), (this.m_FriendsUIApp.IdleTracker.GetUserIdleTime() > 7200 || (void 0 !== e.data.bForce && 1 == e.data.bForce)) && this.PerformFriendsUIUpdate()) : "ReloadSerializedChatState" == e.data.message && void 0 !== e.data.state ? (console.log("Asked by loader to reload serialized chat state"), this.m_FriendsUIApp.UIStore.SetStateToRestoreFrom(e.data.state)) : "LoaderWindowRestoreDetails" == e.data.message ? ((this.m_bShowFriendsListOnLoadFromLoader = e.data.bVisible), (this.m_strLoaderWindowRestoreDetails = e.data.data)) : "SetPersonaState" == e.data.message && this.SetUserPersonaStateWhenReady(e.data.persona_state)); } SetUserPersonaStateWhenReady(e) { this.m_FriendsUIApp.FriendStore.SetUserPersonaState(e); } ExecuteCommand(e, t) { switch (t.command) { case "ShowPopupFriendsList": this.ShowPopupFriendsList(e, !1, !0); break; case "ShowFriendChatDialog": { let n = new ue.K(t.steamid), i = 0 != t.btakefocus; n.BIsValid() ? (n.BIsIndividualAccount() ? this.m_FriendsUIApp.UIStore.ShowFriendChatDialogWhenReady(e, n.GetAccountID(), !0, i) : n.BIsClanAccount() && this.m_FriendsUIApp.FriendStore.ClanStore.JoinClanChatRoom(e, n)) : this.ShowChatUnreadMessages(e); } break; case "CloseChatDialog": { let e = new ue.K(t.steamid); if (e.BIsIndividualAccount()) { let t = this.m_FriendsUIApp.ChatStore.GetFriendChat(e.GetAccountID(), !1); t && this.m_FriendsUIApp.UIStore.CloseTabByID(t.unique_id); } else if (e.BIsClanAccount()) { let t = this.m_FriendsUIApp.FriendStore.ClanStore.GetClan(e); if (t && t.GetChatGroupIDIfLoaded()) { let e = this.m_FriendsUIApp.ChatStore.GetChatRoomGroup(t.GetChatGroupIDIfLoaded()); e && this.m_FriendsUIApp.UIStore.CloseTabByID(e.unique_id); } } } break; case "ShowChatRoomGroupDialog": { let n = t.chat_group_id, i = t.chat_room_id; this.ShowChatRoomGroupDialog(e, n, i); } break; case "ShowChatRoomGroupInvite": if (this.m_FriendsUIApp.ready_to_render) { let n = t.invite_code, i = this.m_FriendsUIApp.ChatStore.InviteStore.GetInviteFromCode(n); $({ invite: i, inviter: null }, e, window); } break; case "SetPersonaState": this.m_FriendsUIApp.FriendStore.SetUserPersonaState(t.persona_state); break; case "ShowWatchBroadcast": let n = new ue.K(t.steamid); this.m_FriendsUIApp.UIStore.ShowOrActivateBroadcast(e, n.GetAccountID(), !0).ShowWatchPromptDialog(); break; case "ToggleDockedMode": this.ToggleSingleWindowMode(t.checked); } } Init(e, t, n) { let i = []; return ( i.push([ "Load Preferences", () => this.m_FriendsUIApp.SettingsStore.GetObjectFromLocalStorageWhenReady(gn, _n).then((e) => { (0, y.z)(() => { this.m_UIDisplayPrefs = e; }); }), ]), e.RunWhenLoggedOn(() => { C.AN.SetCurrentLoggedInAccountID(e.steamid.GetAccountID()); }), (this.m_WebLogonManager = n), (this.m_UsabilityMetricsStore = new E(this.FillInChatUsabilityMetrics.bind(this), e)), t && this.m_OverlayStore.Init(e), window.addEventListener( "dragover", (e) => { e.preventDefault(); }, !1, ), window.addEventListener( "dragenter", (e) => { e.preventDefault(); }, !1, ), window.addEventListener( "drop", (e) => { e.preventDefault(); }, !1, ), o.De.IN_CLIENT && !this.m_FriendsUIApp.IsLoadedInClientSharedJSContext() && void 0 !== SteamClient.FriendSettings.GetEnabledFeatures && i.push([ "SteamClient.FriendSettings.GetEnabledFeatures", () => SteamClient.FriendSettings.GetEnabledFeatures().then((e) => { let t = !1; for (let n of e) if ("LoaderWindowSynchronization" == n.feature) { t = n.bEnabled; break; } return t ? (0, y.gx)(() => void 0 !== this.m_strLoaderWindowRestoreDetails) : Promise.resolve(); }), ]), t || i.push(["GRS", () => (0, dn.Vj)(void 0)]), i ); } get FriendHoverStore() { return this.m_FriendHoverStore; } get WebLogonManager() { return this.m_WebLogonManager; } get DragDropManager() { return this.m_DragDropManager; } get UIDisplayPrefs() { return this.m_UIDisplayPrefs; } SetUIDisplayPref(e, t) { this.m_UIDisplayPrefs[e] != t && ((this.m_UIDisplayPrefs[e] = t), this.m_iTimeoutSaveUIDisplayPrefs && window.clearTimeout(this.m_iTimeoutSaveUIDisplayPrefs), (this.m_iTimeoutSaveUIDisplayPrefs = window.setTimeout(() => { this.m_FriendsUIApp && this.m_FriendsUIApp.SettingsStore && this.m_FriendsUIApp.SettingsStore.StoreObjectInLocalStorage(gn, this.m_UIDisplayPrefs), (this.m_iTimeoutSaveUIDisplayPrefs = void 0); }, 1e3))); } ShowPopupFriendsList(e, t, n, i) { if (this.m_FriendsUIApp.ParentalStore.BIsFriendsBlocked() || this.m_FriendsUIApp.SettingsStore.IsSteamInTournamentMode()) return void console.log("Blocked friends list popup due to parental controls or tournament mode"); const o = !t && n ? zt.IF.k_EWindowBringToFrontAndForceOS : zt.IF.k_EWindowBringToFrontInvalid; let r = this.m_mapFriendsListPopups.get(e.m_unPID); if (r) return void r.Focus(o); if (this.m_FriendsUIApp.UIStore.BIsFriendsListEmbedded(e)) return; (r = new Xt.wV(this.m_FriendsUIApp.FriendStore, this.m_FriendsUIApp.ChatStore, e, t, i)), this.m_mapFriendsListPopups.set(e.m_unPID, r), r.Show(o); let a = new pn(r); this.m_FriendsUIApp.UIStore.GetPerContextChatData(e).SetFriendsListWindow(a.container), this.m_FriendsUIApp.UIStore.SerializePopupState(); } ShowChatRoomGroupDialog(e, t, n) { let i = this.m_FriendsUIApp.ChatStore.GetChatRoomGroup(t), o = i && n ? i.GetChatRoom(n) : null; if (!i || !i.BIsCurrentUserAMember() || (o && o.BVoiceActive())) { let i = this.m_FriendsUIApp.ChatStore.InviteStore.GetDirectInviteInfo(t, n, this.m_FriendsUIApp.FriendStore.self.accountid); $({ invite: i, inviter: null }, e, window); } else o ? this.m_FriendsUIApp.UIStore.ShowAndOrActivateChat(e, o, !0) : this.m_FriendsUIApp.UIStore.ShowAndOrActivateChatRoomGroupWhenReady(e, i, !0); } OnFriendsListClosed(e) { this.m_mapFriendsListPopups.delete(e.m_unPID), this.m_FriendsUIApp.UIStore.GetPerContextChatData(e).SetFriendsListWindow(void 0), this.m_FriendsUIApp.UIStore.SerializePopupState(); } ToggleSingleWindowMode(e) { if (h.Ul.SettingsStore.BSingleWindowModeEnabled() != e) { h.Ul.SettingsStore.SetSingleWindowMode(e); for (let t of this.m_FriendsUIApp.UIStore.GetAllBrowserContexts()) this.ToggleSingleWindowModeForContext(e, t); } } ToggleSingleWindowModeForContext(e, t) { const n = this.m_FriendsUIApp.UIStore.GetPerContextChatData(t); if (n.IsFriendsListSingleWindow() != e && (n.SetFriendsListSingleWindowMode(e), n.IsFriendsListSingleWindow() == e)) if (e) { this.m_FriendsUIApp.UIStore.ConvertDefaultTabSetToEmbedded(t), this.m_FriendsUIApp.UIStore.MergeTabSets(t); const e = n.friends_list_window; if (e) { if (e instanceof un) { const t = e.GetWindow(); t.SteamClient.Window.SetMinSize && t.SteamClient.Window.SetMinSize(Xt.o2, Xt.wE), t.SteamClient.Window.ResizeTo(1280, t.innerHeight, !1); } } else this.ShowPopupFriendsList(t, !1, !0, { width: 1280 }); } else { this.m_FriendsUIApp.UIStore.ConvertDefaultTabSetToPopup(t); const e = n.friends_list_window; if (e) { if (e instanceof un) { const t = e.GetWindow(); t.SteamClient.Window.SetMinSize && t.SteamClient.Window.SetMinSize(Xt.Cs, Xt.wE), t.SteamClient.Window.ResizeTo(yn.UIDisplayPrefs.nFriendsListSingleWindowWidthPx, t.innerHeight, !1); } } else { const e = yn.UIDisplayPrefs.nFriendsListSingleWindowWidthPx; this.ShowPopupFriendsList(t, !1, !0, { width: e }); } } } FillInChatUsabilityMetrics(e) { e.ui_state().set_friends_list_group_chats_height(this.UIDisplayPrefs.nChatRoomListHeightPx); let t, n = this.m_FriendsUIApp.UIStore.GetPerContextChatData(sn.D), i = n.friends_list_window; i && i instanceof un && (e.ui_state().set_friends_list_width(i.GetWindow().outerWidth), e.ui_state().set_friends_list_height(i.GetWindow().outerHeight)); for (let e of Array.from(n.popup_list)) if (((t = e), e.tab_set === n.default_tabset && !n.IsFriendsListSingleWindow())) break; t && t.popup.GetWindow() && (e.ui_state().set_friends_list_width(t.popup.GetWindow().outerWidth), e.ui_state().set_friends_list_height(t.popup.GetWindow().outerHeight)); } ShowChatUnreadMessages(e) { if (this.m_FriendsUIApp.ParentalStore.BIsFriendsBlocked() || this.m_FriendsUIApp.SettingsStore.IsSteamInTournamentMode) return void console.log("Blocked friends list popup due to parental controls or tournament mode"); let t = this.m_FriendsUIApp.ChatStore.GetChatToActivateForOldestUnread(e); return t ? (console.log("ShowChatUnreadMessages - showing chat " + t.unique_id), void this.m_FriendsUIApp.UIStore.ShowAndOrActivateChat(e, t, !0)) : this.ShowPopupFriendsList(e, !1, !0); } CreateRemotePlayDialogs(e, t, n) { if (4 == this.m_eUIMode) return; let i = null; n && (i = h.Ul.RemotePlayStore.dialog_context), i || (i = h.Ul.UIStore.GetAllBrowserContexts().find((e) => !(0, sn.n)(e, sn.D))), i || (i = sn.D), (0, Ht.Q$)(i, e, this.m_eUIMode, t, n); } } (0, i.gn)([y.LO], Cn.prototype, "m_UIDisplayPrefs", void 0), (0, i.gn)([y.LO], Cn.prototype, "m_bUpdatedBuildAvailable", void 0), (0, i.gn)([y.LO], Cn.prototype, "m_nSecondsOutOfDate", void 0), (0, i.gn)([y.LO], Cn.prototype, "m_strLoaderWindowRestoreDetails", void 0), (0, i.gn)([y.LO], Cn.prototype, "m_bShowFriendsListOnLoadFromLoader", void 0), (0, i.gn)([y.LO], Cn.prototype, "m_eUIMode", void 0), (0, i.gn)([s.ak], Cn.prototype, "HandlePostMessage", null), (0, i.gn)([s.ak], Cn.prototype, "HandleUIModeChange", null), (0, i.gn)([s.ak], Cn.prototype, "HandleLibraryCommandMessage", null), (0, i.gn)([s.ak], Cn.prototype, "OnCloseFakeContextMenu", null), (0, i.gn)([s.ak], Cn.prototype, "HandleContextMenuMessage", null), (0, i.gn)([s.ak], Cn.prototype, "HandlePersonaStateMessage", null), (0, i.gn)([s.ak], Cn.prototype, "HandleWebLoaderPostMessage", null), (0, i.gn)([h.IN], Cn.prototype, "SetUserPersonaStateWhenReady", null), (0, i.gn)([y.Fl], Cn.prototype, "UIDisplayPrefs", null), (0, i.gn)([y.aD], Cn.prototype, "SetUIDisplayPref", null), (0, i.gn)([h.IN], Cn.prototype, "ShowPopupFriendsList", null), (0, i.gn)([h.IN], Cn.prototype, "ShowChatUnreadMessages", null); class fn extends h.wZ { constructor(e) { super(o.De.IN_CLIENT && void 0 !== SteamClient.Storage ? new en() : new tn.Z()), (this.m_AudioPlaybackManager = new $t()), (this.m_bLoadedInClientSharedJSContext = e), e && this.VoiceStore.RegisterForVoiceChatActiveStateChange(this.OnVoiceChatActiveStateChange), (this.m_IdleTracker = o.De.IN_CLIENT ? new m() : new c()), (this.m_DesktopApp = ((yn = new Cn(this, !1)), yn)), (this.m_ChatRoomBBCodeParser = new ce.AZ(Object.assign(qe(), { mention: Ot }), ce.So)), (this.m_FriendChatBBCodeParser = new ce.AZ(Object.assign(qe(), { invite: yt, gameinvite: Et, lobbyinvite: Dt, tradeoffer: kt, broadcastinvite: wt, broadcastviewrequest: Rt }), ce.So)), (this.m_NotificationBBCodeParser = new ce.YO({ gameinvite: Le, lobbyinvite: Ge, invite: Oe, tradeoffer: Fe, spoiler: Be, roomeffect: xe, sticker: Ne })), (this.m_ChatRoomEffectSettings = Re.F), (yn = this.m_DesktopApp), this.m_AudioPlaybackManager.SetVoiceStore(this.m_VoiceChatStore), (0, v.X)(!o.De.IN_MOBILE, "DesktopApp initialized in mobile context"); } Init(e, t, n) { let i = t ? new p(this.m_FriendStore) : new _(this.m_FriendStore), o = this.m_DesktopApp.Init(e, t, n); super.InitInternal(e, i, o); } OnReadyToRender() { return (0, i.mG)(this, void 0, void 0, function* () { o.De.IN_CLIENT && ((0, rn.U5)("RemotePlay.RegisterForRemoteClientStarted") && SteamClient.RemotePlay.RegisterForRemoteClientStarted(this.RemoteClientStarted), (0, rn.U5)("RemotePlay.RegisterForInviteResult") ? SteamClient.RemotePlay.RegisterForInviteResult(this.RemoteClientInviteResult) : (0, rn.U5)("RemotePlay.RegisterForRemoteClientLaunchResult") && SteamClient.RemotePlay.RegisterForRemoteClientLaunchResult(this.RemoteClientLaunchResult), (0, rn.U5)("RemotePlay.RegisterForRemoteClientLaunchFailed") && SteamClient.RemotePlay.RegisterForRemoteClientLaunchFailed(this.RemoteClientLaunchFailed), (0, rn.U5)("RemotePlay.RegisterForGroupCreated") && SteamClient.RemotePlay.RegisterForGroupCreated(this.RemotePlayGroupCreated)), yield this.UIStore.RestorePopupState(); let e = C.AN.GetRestoreDetails("PopupFriendsListDimensions"); e && window.parent.postMessage({ message: "FriendsListRestoreDetailsChanged", data: e }, "https://steamloopback.host"); try { let e = window.sessionStorage.getItem(fn.k_pchStartupParamKey); if (e) { let t = JSON.parse(e); t && t.command && this.m_DesktopApp.ExecuteCommand(sn.D, t.command); } window.sessionStorage.removeItem(fn.k_pchStartupParamKey); } catch (e) {} if ((this.m_IdleTracker.Init(), window.opener)) { let e = [o.De.COMMUNITY_BASE_URL, o.De.STORE_BASE_URL, o.De.CHAT_BASE_URL]; for (let t of e) window.opener.postMessage("FriendsUIReady", t.replace(/\/$/, "")); } }); } IsGamepadUIActive() { return this.m_DesktopApp.IsGamepadUIActive(); } IsDesktopUIActive() { return this.m_DesktopApp.IsDesktopUIActive(); } IsLoadedInClientSharedJSContext() { return this.m_bLoadedInClientSharedJSContext; } get AudioPlaybackManager() { return this.m_AudioPlaybackManager; } get IdleTracker() { return this.m_IdleTracker; } AddPopupManagerShutdownCallback(e) { C.AN.AddShutdownCallback(e); } CreateChatPopup(e, t, n, i, o, r) { let a = new Xt.a1(e, t, n, this.m_ChatStore, i, o, r), s = new pn(a); return new R.r0(s, a); } ShowPopupFriendsListAtStartup(e) { let t = e; if ((void 0 !== yn.m_bShowFriendsListOnLoadFromLoader && (t = yn.m_bShowFriendsListOnLoadFromLoader), this.ChatStore.FriendChatStore.GetUnreadFriendMessageCount() > 0 && this.SettingsStore.FriendsSettings.bSignIntoFriends && (t = !0), t)) { let e = !0 === yn.m_bShowFriendsListOnLoadFromLoader; (0, sn.n)(h.Ul.GetDefaultBrowserContext(), sn.D) || (console.log("Blocked taking focus in root context during ShowPopupFriendsList, because other context is primary"), (e = !1)), h.Ul.ShowPopupFriendsList(sn.D, !1, e); } } ShowPopupFriendsList(e, t, n) { this.m_DesktopApp.ShowPopupFriendsList(e, t, n); } OnFriendsListClosed(e) { this.m_DesktopApp.OnFriendsListClosed(e); } RemotePlayGroupCreated(e, t) { let n = new ue.K(e).GetAccountID(); if (0 == n) return; let i = h.Ul.FriendStore.GetPlayer(n); const o = e === h.Ul.FriendStore.self.steamid64; h.Ul.RemotePlayStore.OnGroupCreated(i, o, t), o && this.m_DesktopApp.CreateRemotePlayDialogs(i, window, o); } RemoteClientStarted(e, t) { let n = new ue.K(e).GetAccountID(); if (0 == n) return; if (n == h.Ul.FriendStore.self.accountid) return; let i = h.Ul.FriendStore.GetPlayer(n); h.Ul.RemotePlayStore.RemoteClientStarted(i, !1, t); const o = h.Ul.UIStore.RegisterForOverlayCreated(() => { o(), this.m_DesktopApp.CreateRemotePlayDialogs(i, window, !1); }); setTimeout(() => { o(), this.m_DesktopApp.CreateRemotePlayDialogs(i, window, !1); }, 3e3); } RemoteClientInviteResult(e, t, n, i, o) { this.RemoteClientLaunchResult(e, t, n, i, o); } RemoteClientLaunchResult(e, t, n, i, o) { let r = new ue.K(e).GetAccountID(), a = h.Ul.FriendStore.GetPlayer(r); if (n === Kt.u.k_ERemoteClientLaunchOK) { if (0 !== r) { let e = 2 == a.efriendrelationship, t = 4 == a.efriendrelationship, n = a.persona.is_online && !e && !t && !a.is_blocked; (n = !1), !h.Ul.VoiceStore.IsAnyVoiceActive() && n && i ? h.Ul.UIStore.ShowFriendChatDialogAndStartVoice(h.Ul.GetDefaultBrowserContext(), a.accountid) : h.Ul.UIStore.ShowFriendChatDialog(h.Ul.GetDefaultBrowserContext(), a.accountid, !0, !1); } this.m_DesktopApp.CreateRemotePlayDialogs(h.Ul.FriendStore.self, window, !0); } else { let e = ""; switch (n) { case Kt.u.k_ERemoteClientLaunchParentalUnlockFailed: e = "#RemotePlay_ErrorInviteFailed_ParentalUnlockFailed"; break; case Kt.u.k_ERemoteClientLaunchScreenLocked: e = "#RemotePlay_ErrorInviteFailed_ScreenLocked"; break; case Kt.u.k_ERemoteClientLaunchDriversNotInstalled: e = "#RemotePlay_ErrorInviteFailed_DriversNotInstalled"; break; case Kt.u.k_ERemoteClientLaunchDisabledRemote: e = "#RemotePlay_ErrorInviteFailed_Disabled"; break; case Kt.u.k_ERemoteClientLaunchBroadcasting: e = "#RemotePlay_ErrorInviteFailed_BroadcastingActive"; break; case Kt.u.k_ERemoteClientLaunchTransportUnavailable: e = "#RemotePlay_ErrorInviteFailed_TransportUnavailable"; break; case Kt.u.k_ERemoteClientLaunchInvisible: e = "#RemotePlay_ErrorInviteFailed_Invisible"; break; case Kt.u.k_ERemoteClientLaunchRestrictedCountry: e = "#RemotePlay_ErrorInviteFailed_RestrictedCountry"; break; default: e = "#RemotePlay_ErrorInviteFailed_Failed"; } this.ShowAlert((0, L.Xx)("#RemotePlay_Error"), (0, L.Xx)(e)); } } RemoteClientLaunchFailed(e) { if (e === Kt.u.k_ERemoteClientLaunchOK); else { let t = ""; switch (e) { case Kt.u.k_ERemoteClientLaunchParentalUnlockFailed: t = "#RemotePlay_ErrorInviteFailed_ParentalUnlockFailed"; break; case Kt.u.k_ERemoteClientLaunchScreenLocked: t = "#RemotePlay_ErrorInviteFailed_ScreenLocked"; break; case Kt.u.k_ERemoteClientLaunchDriversNotInstalled: t = "#RemotePlay_ErrorInviteFailed_DriversNotInstalled"; break; case Kt.u.k_ERemoteClientLaunchDisabledRemote: t = "#RemotePlay_ErrorInviteFailed_Disabled"; break; case Kt.u.k_ERemoteClientLaunchBroadcasting: t = "#RemotePlay_ErrorInviteFailed_BroadcastingActive"; break; case Kt.u.k_ERemoteClientLaunchTransportUnavailable: t = "#RemotePlay_ErrorInviteFailed_TransportUnavailable"; break; case Kt.u.k_ERemoteClientLaunchInvisible: t = "#RemotePlay_ErrorInviteFailed_Invisible"; break; case Kt.u.k_ERemoteClientLaunchRestrictedCountry: t = "#RemotePlay_ErrorInviteFailed_RestrictedCountry"; break; default: t = "#RemotePlay_ErrorInviteFailed_Failed"; } this.ShowAlert((0, L.Xx)("#RemotePlay_Error"), (0, L.Xx)(t)); } } ShowAlert(e, t, n) { return (0, K.kQ)(e, t, n); } OpenURLInBrowser(e, t) { o.De.IN_CLIENT ? SteamClient.WebChat.OpenURLInClient(e, t.m_unPID, !1) : (0, G.b8)(window, e); } BIsValidBrowserContext(e) { return super.BIsValidBrowserContext(e) || this.m_DesktopApp.OverlayStore().HasOverlayInstance(e.m_unPID); } ShowCloseActiveVoiceConfirmation(e, t) { if (!this.m_DesktopApp.UIDisplayPrefs.bDontShowVoiceAlert) { let e = t.popup; (0, Vt.Ez)(e.GetWindow()); } } OnVoiceChatActiveStateChange(e) { (0, rn.U5)("Browser.SetBackgroundThrottlingDisabled") && SteamClient.Browser.SetBackgroundThrottlingDisabled(e); } SignOutOfFriends(e) { var t, n; if (null === (n = (t = this.m_CMInterface).GetShouldChangePersonaStatusOnDisconnect) || void 0 === n ? void 0 : n.call(t)) { this.m_DesktopApp.SendPersonaUpdateToLibrary(0); let t = h.Ul.UIStore.GetRootChatPerContextData().friends_list_window && h.Ul.UIStore.GetRootChatPerContextData().friends_list_window.BIsVisible(); window.parent.postMessage({ message: "SignOutRequest", bShowLoaderWindow: t, browserContext: e }, "https://steamloopback.host"); } this.UIStore.SerializePopupState(), this.UIStore.ResetHasRestoredPopupState(); for (const e of C.AN.GetPopups()) e.GetName().startsWith("chat_") && e.Close(); this.CMInterface.ForceDisconnect(); } UpdatePersonaState(e) { this.m_DesktopApp.SendPersonaUpdateToLibrary(e); } CreateNewTabFromUniqueID(e, t, n, i) { let o = t.match(/^br(\d+)$/); if (o && o[1]) { let t = parseInt(o[1]); return new g.v(e, t); } return super.CreateNewTabFromUniqueID(e, t, n, i); } BShowIncomingChatMessages() { return !!this.IsLoadedInClientSharedJSContext() || 0 == this.m_DesktopApp.m_eUIMode; } StopListening() { this.m_DesktopApp.RemoveListeners(); const e = this.m_CMInterface.GetShouldChangePersonaStatusOnDisconnect(); this.m_DesktopApp.SetShouldChangePersonaStatusOnDisconnect(!1), this.SignOutOfFriends(void 0), this.m_DesktopApp.SetShouldChangePersonaStatusOnDisconnect(e); } Reconnect() { return (0, i.mG)(this, void 0, void 0, function* () { this.m_DesktopApp.RemoveListeners(), this.m_DesktopApp.RegisterListeners(), yield Promise.all([this.CMInterface.Connect(), this.UIStore.RestorePopupState()]); }); } GetDefaultBrowserContext() { const e = this.m_BrowserContextDefaultTarget; return void 0 === e.m_eUIMode || -1 === e.m_eUIMode ? Object.assign(Object.assign({}, e), { m_eUIMode: this.m_DesktopApp.m_eUIMode }) : e; } } (fn.k_pchStartupParamKey = "oFriendsUIStartupParam"), (0, i.gn)([s.ak], fn.prototype, "RemotePlayGroupCreated", null), (0, i.gn)([s.ak], fn.prototype, "RemoteClientStarted", null), (0, i.gn)([s.ak], fn.prototype, "RemoteClientInviteResult", null), (0, i.gn)([s.ak], fn.prototype, "RemoteClientLaunchResult", null), (0, i.gn)([s.ak], fn.prototype, "RemoteClientLaunchFailed", null), (0, i.gn)([s.ak], fn.prototype, "OnVoiceChatActiveStateChange", null); function vn() { return (yn = new Cn(new fn(!1), !1)), yn; } function Sn(e) { const t = fn.k_pchStartupParamKey; window.sessionStorage.setItem(t, JSON.stringify({ command: { command: "ShowWatchBroadcast", steamid: e } })); } function bn(e) { const t = (0, T.useState)(0)[1]; return [ yn.UIDisplayPrefs[e], (n) => { yn.SetUIDisplayPref(e, n), t((e) => e + 1); }, ]; } function In(e, t) { let n = t; void 0 === n.m_eUIMode && void 0 !== (null == yn ? void 0 : yn.m_eUIMode) && (n = Object.assign(Object.assign({}, n), { m_eUIMode: yn.m_eUIMode })), (e.__FriendsUIBrowserContext = n); } let yn; C.AN.AddPopupCreatedCallback((e) => { var t; In(e.window, null !== (t = e.browser_info) && void 0 !== t ? t : sn.D); }); }, 72746: (e, t, n) => { "use strict"; n.d(t, { D: () => j.D, ns: () => j.n, cX: () => ce, wZ: () => de, i9: () => me, Ul: () => ne, IN: () => se, R6: () => le, oR: () => ue, E2: () => he }); var i = n(85556), o = n(19953), r = n(79588), a = n(49367), s = n(1736), l = n(88991), c = n(59208); class m { constructor() { (this.m_status = a.m$), (this.m_mapPendingRequests = new r.vP()), (this.m_nRequestID = 1), (this.m_BroadcastDetails = {}), (0, r.rC)(this); } Init(e) { (this.m_CMInterface = e), this.m_CMInterface.RunWhenLoggedOn(() => { o.De.IN_CLIENT && (SteamClient && SteamClient.Broadcast && SteamClient.Broadcast.RegisterForBroadcastStatus && SteamClient.Broadcast.RegisterForBroadcastStatus(this.OnBroadcastStatus), SteamClient && SteamClient.Broadcast && SteamClient.Broadcast.RegisterForViewerRequests && SteamClient.Broadcast.RegisterForViewerRequests(this.OnViewerRequest)); }); } MakeKey(e, t) { return e + "_" + t; } get status() { return this.m_status; } get is_broadcasting() { return this.m_status.bIsBroadcasting; } get broadcastid() { return this.m_status.broadcastid; } get is_broadcast_capable() { return this.m_status.bBroadcastCapable; } OnBroadcastStatus(e) { ((this.m_status.bIsBroadcasting && !e.bIsBroadcasting) || ("0" != this.m_status.broadcastid && "0" == e.broadcastid)) && this.m_mapPendingRequests.forEach((e, t, n) => { e == a.c$.k_EPending && n.delete(t); }), (this.m_status = e); } OnViewerRequest(e, t, n) { if (n == a.c$.k_EPending) { let t = this.m_nRequestID++; this.m_mapPendingRequests.set(this.MakeKey(e, t), n); let i = ne.GetDefaultBrowserContext(), o = ne.ShowFriendChatDialog(i, e); o && o.ViewerNeedsApproval(t); } else this.m_mapPendingRequests.set(this.MakeKey(e, t), n); } ApproveViewerRequest(e, t) { let n = l.K.InitFromAccountID(e); SteamClient.Broadcast.ApproveViewerRequest(n.ConvertTo64BitString(), Number(t)); } RejectViewerRequest(e, t) { let n = l.K.InitFromAccountID(e); SteamClient.Broadcast.RejectViewerRequest(n.ConvertTo64BitString(), Number(t)); } GetRequestState(e, t) { return this.m_mapPendingRequests.get(this.MakeKey(e, t)); } InviteToWatch(e) { let t = l.K.InitFromAccountID(e); return SteamClient.Broadcast.InviteToWatch(t.ConvertTo64BitString()); } SubscribeToBroadcastDetails(e, t) { if (this.m_BroadcastDetails[e]) 0 === this.m_BroadcastDetails[e].refCount && this.m_BroadcastDetails[e].details.Subscribe(), this.m_BroadcastDetails[e].refCount++; else { const n = new d(e, t, this.m_CMInterface.GetServiceTransport()); n.Subscribe(), (this.m_BroadcastDetails[e] = { details: n, refCount: 1 }); } } UnsubscribeFromBroadcastDetails(e, t) { const n = this.m_BroadcastDetails[e]; n && (n.refCount > 1 ? n.refCount-- : (n.details.Unsubscribe(), delete this.m_BroadcastDetails[e])); } GetBroadcastDetails(e, t) { let n = this.m_BroadcastDetails[e]; return n || ((n = { details: new d(e, t, this.m_CMInterface.GetServiceTransport()), refCount: 0 }), (this.m_BroadcastDetails[e] = n)), n.details; } } (0, i.gn)([r.LO], m.prototype, "m_status", void 0), (0, i.gn)([r.LO], m.prototype, "m_mapPendingRequests", void 0), (0, i.gn)([r.Fl], m.prototype, "status", null), (0, i.gn)([r.Fl], m.prototype, "is_broadcasting", null), (0, i.gn)([r.Fl], m.prototype, "broadcastid", null), (0, i.gn)([r.Fl], m.prototype, "is_broadcast_capable", null), (0, i.gn)([r.aD.bound], m.prototype, "OnBroadcastStatus", null), (0, i.gn)([r.aD.bound], m.prototype, "OnViewerRequest", null), (0, i.gn)([r.aD], m.prototype, "ApproveViewerRequest", null), (0, i.gn)([r.aD], m.prototype, "RejectViewerRequest", null), (0, i.gn)([r.aD], m.prototype, "InviteToWatch", null); class d { get strThumbnail() { return this.m_strThumbnail ? `${this.m_strThumbnail}?n=${this.m_nThumbnailCount}` : null; } get bExpired() { return this.m_bExpired; } constructor(e, t, n) { (this.m_bExpired = !1), (this.m_strThumbnail = ""), (this.m_nThumbnailCount = 0), (this.m_nTimeout = 10), (this.m_bSubscribed = !1), (0, r.rC)(this), (this.m_strBroadcastID = e), (this.m_strBroadcasterID = t), (this.m_ServiceTransport = n); } Subscribe() { this.m_bSubscribed || ((this.m_bSubscribed = !0), this.PollForDetails()); } SchedulePollForDetails() { const e = this.m_strThumbnail ? this.m_nTimeout : 10; this.m_nTimer = window.setTimeout(() => { (this.m_nTimer = void 0), this.m_bSubscribed && this.PollForDetails(); }, 1e3 * e); } PollForDetails() { return (0, i.mG)(this, void 0, void 0, function* () { if (!this.m_nTimer && !this.m_bExpired) { if (1 != (yield this.FetchBroadcastStatus()).GetEResult()) this.m_bExpired = !0; else { if (this.m_strThumbnail) this.m_nThumbnailCount++; else { const e = yield this.FetchBroadcastThumbnail(); 1 === e.GetEResult() && ((this.m_strThumbnail = e.Body().thumbnail_url()), (this.m_nTimeout = e.Body().update_interval())); } this.SchedulePollForDetails(); } } }); } FetchBroadcastStatus() { let e = s.gA.Init(c.o7); return e.Body().set_steamid(this.m_strBroadcasterID), e.Body().set_broadcast_id(this.m_strBroadcastID), c.Mr.GetBroadcastStatus(this.m_ServiceTransport, e); } FetchBroadcastThumbnail() { let e = s.gA.Init(c.qZ); return e.Body().set_steamid(this.m_strBroadcasterID), e.Body().set_broadcast_id(this.m_strBroadcastID), c.Mr.GetBroadcastThumbnail(this.m_ServiceTransport, e); } Unsubscribe() { (this.m_bSubscribed = !1), this.m_nTimer && (clearTimeout(this.m_nTimer), (this.m_nTimer = void 0)); } } (0, i.gn)([r.LO], d.prototype, "m_bExpired", void 0), (0, i.gn)([r.LO], d.prototype, "m_strThumbnail", void 0), (0, i.gn)([r.LO], d.prototype, "m_nThumbnailCount", void 0); var h = n(67915), u = n(71240), p = n(26671); class _ { Init(e) { this.m_CMInterface = e; } GetTradeOfferURL() { if (this.m_strTradeOfferToken) return Promise.resolve(this.GetConstructedTradeOfferURL()); { let e = s.gA.Init(p.OE); return p.$n.GetTradeOfferAccessToken(this.m_CMInterface.GetServiceTransport(), e).then((e) => { if (1 == e.GetEResult()) return (this.m_strTradeOfferToken = e.Body().trade_offer_access_token()), this.GetConstructedTradeOfferURL(); throw new Error("Error getting Trade Offer token"); }); } } GetDefaultTradeOfferURLForFriend(e) { return `${o.De.COMMUNITY_BASE_URL}tradeoffer/new/?partner=${e}`; } GetConstructedTradeOfferURL() { let e = this.m_CMInterface.steamid.GetAccountID(); return `${o.De.COMMUNITY_BASE_URL}tradeoffer/new/?partner=${e}&token=${encodeURIComponent(this.m_strTradeOfferToken)}`; } } var g = n(23346), C = n(37035), f = n(69087), v = n(78654); const S = { locked: !1 }; var b = n(58227); class I { constructor() { (this.m_ParentalSettings = { is_enabled: !1 }), (this.m_ParentalState = S), (0, r.rC)(this); } SetLockState(e) { this.m_ParentalState.locked = e; } Init(e) { (this.m_CMInterface = e), this.m_CMInterface.RunWhenLoggedOn(() => { let e = s.gA.Init(f.RR); e.Body().set_steamid(this.m_CMInterface.steamid.ConvertTo64BitString()), o.De.IN_CLIENT ? SteamClient.Parental.RegisterForParentalSettingsChanges((e) => this.UpdateParentalState(e)) : f.pR.GetParentalSettings(this.m_CMInterface.GetServiceTransport(), e).then((e) => { (this.m_ParentalSettings = e.Body().settings().toObject()), this.m_ParentalSettings.is_enabled ? this.ValidateWebToken().then((e) => { this.m_ParentalState = { locked: e }; }) : (this.m_ParentalState = { locked: !1 }); }); }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(f.NW.NotifyLockHandler, (e) => (o.De.SESSIONID == e.Body().sessionid() && this.SetLockState(!0), 1)), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(f.NW.NotifyUnlockHandler, (e) => (o.De.SESSIONID == e.Body().sessionid() && this.SetLockState(!1), 1)), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(f.NW.NotifySettingsChangeHandler, (e) => 1); } UpdateParentalState(e) { (this.m_ParentalSettings = b.gA.deserializeBinary(e.settings).toObject()), (this.m_ParentalState = e); } BIsFeatureBlocked(e) { return this.m_ParentalState.locked && 0 != e && 0 == (this.m_ParentalSettings.enabled_features & (1 << e)); } BIsAppBlocked(e) { if (!this.isLocked) return !1; if (0 == this.m_ParentalSettings.applist_base_id) return !1; if (0 == e) return !1; if (e >= v.RI && e <= v.pv) return !1; return -1 === [v.p6, v.Mq, v.xM, v.jA, v.us].indexOf(e) && (this.m_ParentalSettings.applist_custom.find((t) => t.appid == e) ? !this.m_ParentalSettings.applist_custom.find((e) => e.appid).is_allowed : !this.m_ParentalSettings.applist_base.find((t) => t.appid == e) || !this.m_ParentalSettings.applist_base.find((t) => t.appid == e).is_allowed); } get isEnabled() { return !!this.m_ParentalSettings.is_enabled; } get isLocked() { return this.m_ParentalState.locked; } ValidateWebToken() { let e = o.De.SESSIONID, t = document.cookie.match("(^|; )steamparental=([^;]*)"); if (!t || !t[2]) return Promise.resolve(!1); let n = t[2], i = n.split("||"); n = 2 == i.length ? i[1] : i[0]; let r = s.gA.Init(f.LD); return ( r.Body().set_unlock_token(e + "||" + n), new Promise((e, t) => { f.pR.ValidateToken(this.m_CMInterface.GetServiceTransport(), r).then((t) => { 1 == t.GetEResult() ? e(!0) : e(!1); }); }) ); } get locked() { return console.log("ParentalState.locked", this.m_ParentalState.locked), this.m_ParentalState.locked; } BIsFriendsBlocked() { return this.BIsFeatureBlocked(4); } Unlock(e) { if (o.De.IN_CLIENT) return new Promise((t, n) => { SteamClient.Parental.UnlockParentalLock(e, !1).then((e) => { t(e); }); }); { let t = s.gA.Init(f.DB); return ( t.Body().set_password(e), t.Body().set_session(o.De.SESSIONID), t.Body().set_send_unlock_on_success(!0), new Promise((e, n) => { f.pR.ValidatePassword(this.m_CMInterface.GetServiceTransport(), t).then((t) => { if (1 == t.GetEResult()) { let e = Date.now().toString() + "||" + t.Body().token(); document.cookie = "steamparental=" + encodeURIComponent(e) + "; path=/"; } e(t.GetEResult()); }); }) ); } } } (0, i.gn)([r.LO], I.prototype, "m_ParentalSettings", void 0), (0, i.gn)([r.LO], I.prototype, "m_ParentalState", void 0), (0, i.gn)([r.aD], I.prototype, "UpdateParentalState", null), (0, i.gn)([r.Fl], I.prototype, "isEnabled", null), (0, i.gn)([r.Fl], I.prototype, "isLocked", null), (0, i.gn)([r.Fl], I.prototype, "locked", null); var y = n(39827), E = n(54054), D = n(57476), w = n(2049), R = n(88669); const A = new (n(77385).sO)("FriendsUI/RemotePlay"); class M { constructor() { (this.m_bEnabled = !1), (this.m_canCreateInviteForGame = r.LO.map()), (this.m_nonGuestSessions = r.LO.map()), (this.m_guestSessions = r.LO.map()), (this.m_controllerSlotPlayers = []), (this.m_bIsShowingPlaceholder = !1), (this.m_unGuestLinkCopied = 0), (this.m_nGameVolume = -1), (this.m_bAllowDesktopStream = !1), (this.m_nHostStreamingQualityOverride = -1), (this.m_nClientStreamingQuality = 2), (this.m_nClientStreamingBitrate = -1), (this.m_bIsHost = !1), (this.m_sessionHost = null), (this.m_strGameID = ""), (this.m_rgDialogCloseHandles = []), (this.m_dialogContext = null), (this.m_unNextGuestID = 1), (this.m_bRegisteredForNetworkUtilizationUpdates = !1), (0, r.rC)(this); } Init(e) { A.Debug("RemotePlayStore Init"), (this.m_controllerSlotPlayers = new Array(20)), this.ClearControllerSlotPlayers(), (this.m_CMInterface = e), (0, D.U5)("RemotePlay.RegisterForSessionStarted") && SteamClient.RemotePlay.RegisterForSessionStarted((e, t, n) => this.SessionStarted({ steamid: e, guestid: n }, t)), (0, D.U5)("RemotePlay.RegisterForSessionStopped") && SteamClient.RemotePlay.RegisterForSessionStopped((e, t) => this.SessionStopped({ steamid: e, guestid: t })), (0, D.U5)("RemotePlay.RegisterForSessionJoined") && SteamClient.RemotePlay.RegisterForSessionJoined((e, t, n) => this.SessionJoined({ steamid: e, guestid: t }, n)), (0, D.U5)("RemotePlay.RegisterForInputUsed") && SteamClient.RemotePlay.RegisterForInputUsed((e, t, n) => { this.PlayerUsedInput({ steamid: e, guestid: n }, t); }), (0, D.U5)("RemotePlay.RegisterForPlayerInputSettingsChanged") && SteamClient.RemotePlay.RegisterForPlayerInputSettingsChanged((e, t, n) => { this.PlayerInputSettingsChanged({ steamid: e, guestid: n }, t); }), (0, D.U5)("RemotePlay.RegisterForPlaceholderStateChanged") && SteamClient.RemotePlay.RegisterForPlaceholderStateChanged((e) => { this.m_bIsShowingPlaceholder = e; }), (0, D.U5)("RemotePlay.RegisterForClearControllers") && SteamClient.RemotePlay.RegisterForClearControllers(() => { this.ClearControllerSlotPlayers(); }), (0, D.U5)("RemotePlay.RegisterForControllerIndexSet") && SteamClient.RemotePlay.RegisterForControllerIndexSet((e, t, n) => { this.ControllerIndexSet({ steamid: e, guestid: n }, t); }), (0, D.U5)("RemotePlay.RegisterForQualityOverride") && SteamClient.RemotePlay.RegisterForQualityOverride((e) => (this.m_nHostStreamingQualityOverride = e)), (0, D.U5)("RemotePlay.BEnabled") && SteamClient.RemotePlay.BEnabled() .then((e) => { this.m_bEnabled = e; }) .catch(), (0, D.U5)("RemotePlay.RegisterForInviteResult") ? SteamClient.RemotePlay.RegisterForInviteResult(this.HandleLaunchResult) : (0, D.U5)("RemotePlay.RegisterForRemoteClientLaunchResult") && SteamClient.RemotePlay.RegisterForRemoteClientLaunchResult(this.HandleLaunchResult), (0, D.U5)("RemotePlay.RegisterForGroupDisbanded") && SteamClient.RemotePlay.RegisterForGroupDisbanded(this.HandleGroupDisbanded), (0, D.U5)("RemotePlay.RegisterForRemoteClientStopped") && SteamClient.RemotePlay.RegisterForRemoteClientStopped(this.HandleRemoteClientStopped), (0, r.EH)(() => { var e, t; const n = null === (t = null === (e = ne.FriendStore.self) || void 0 === e ? void 0 : e.persona) || void 0 === t ? void 0 : t.m_gameid; null != n && (this.m_canCreateInviteForGame.has(n) || this.BCanCreateInviteForGame(n).then((e) => { this.m_canCreateInviteForGame.set(n, e); })); }); } BEnabled() { return this.m_bEnabled; } BRemotePlayTogetherEnabled() { return !0; } BCanCreateInviteForGame(e) { return (0, i.mG)(this, void 0, void 0, function* () { return !!(0, D.U5)("RemotePlay.BCanCreateInviteForGame") && SteamClient.RemotePlay.BCanCreateInviteForGame(e); }); } BCanAcceptInviteForGame(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return (0, D.U5)("RemotePlay.BCanAcceptInviteForGame") ? SteamClient.RemotePlay.BCanAcceptInviteForGame(e, t) : !o.De.COUNTRY || -1 === t.indexOf(o.De.COUNTRY); }); } BCanCreateInviteForCurrentGame() { var e, t; const n = null === (t = null === (e = ne.FriendStore.self) || void 0 === e ? void 0 : e.persona) || void 0 === t ? void 0 : t.m_gameid; return this.m_canCreateInviteForGame.get(n); } BShowQuickAccessControls() { return this.BCanCreateInviteForCurrentGame() || this.in_session; } BCanHostIsolatedGameAudio() { return (0, i.mG)(this, void 0, void 0, function* () { return !!(0, D.U5)("RemotePlay.BCanHostIsolatedGameAudio") && SteamClient.RemotePlay.BCanHostIsolatedGameAudio(); }); } HasInviteAndSession(e) { let t = l.K.InitFromAccountID(e).ConvertTo64BitString(); if (this.m_nonGuestSessions.has(t) && this.m_nonGuestSessions.get(t).bSession) return !0; let n = !1; return this.m_guestSessions.forEach(({ playerID: { steamid: e } }) => (n = n || t === e)), n; } HasInviteAndSessionForGameIDOtherThan(e) { let t = !1; return ( this.GetAllSessions().forEach((n) => { n.bSession && n.gameID !== e && void 0 !== n.gameID && (t = !0); }), t ); } GetPlayerPropsIndexOf(e) { return this.GetAllSessions().findIndex((t) => k(e, t.playerID)); } GetPlayerPropsByIndex(e) { return this.GetAllSessions()[e]; } get player_props_count() { return this.m_nonGuestSessions.size + this.m_guestSessions.size; } ClearControllerSlotPlayers() { for (let e = 0; e < this.m_controllerSlotPlayers.length; ++e) this.m_controllerSlotPlayers[e] = null; } ClearControllerSlotsWithPlayer(e) { for (let t = 0; t < this.m_controllerSlotPlayers.length; ++t) k(e, this.m_controllerSlotPlayers[t]) && (this.m_controllerSlotPlayers[t] = null); } SetPlayerInControllerSlot(e, t) { e < 0 || e >= this.m_controllerSlotPlayers.length || (this.m_controllerSlotPlayers[e] = t); } GetPlayerInControllerSlot(e) { return e < 0 || e >= this.m_controllerSlotPlayers.length ? null : this.m_controllerSlotPlayers[e]; } GetControllerSlotsForPlayer(e) { return this.m_controllerSlotPlayers.map((t, n) => (k(t, e) ? n : null)).filter((e) => null !== e); } GetControllerType(e) { return (0, i.mG)(this, void 0, void 0, function* () { return (0, D.U5)("RemotePlay.GetControllerType") ? SteamClient.RemotePlay.GetControllerType(e) : 0; }); } RemoveControllerFromPrioritySlot(e) { const t = this.m_controllerSlotPlayers.slice(this.priority_controller_slot_count).findIndex((e) => null === e) + this.priority_controller_slot_count; -1 === t ? (A.Error("[RPT] No empty controller slots found in RemoveControllerFromPrioritySlot. Swapping with another non-priority controller."), this.SwapControllerSlots(e, this.priority_controller_slot_count)) : this.SwapControllerSlots(e, t); } SwapControllerSlots(e, t, n = !0) { return !(e == t || t < 0 || t > this.m_controllerSlotPlayers.length - 1) && ((0, D.U5)("RemotePlay.MoveControllerToSlot") && SteamClient.RemotePlay.MoveControllerToSlot(e, t), n && (this.TriggerControllerRumble(e), this.TriggerControllerRumble(t)), !0); } TriggerControllerRumble(e) { (0, D.U5)("RemotePlay.IdentifyController") && SteamClient.RemotePlay.IdentifyController(e); } get priority_controller_slot_count() { return 4; } get bIsShowingPlaceholder() { return this.m_bIsShowingPlaceholder; } CreateInviteAndSession(e, t, n) { if ((A.Debug(`CreateInviteAndSession for accountid ${e}`), (this.m_dialogContext = n), !e)) return A.Error("RemotePlayStore.CreateInviteAndSession called with invalid accountid. Did you mean to call CreateGuestInviteAndSession?"), this.CreateGuestInviteAndSession(t, n); const i = l.K.InitFromAccountID(e); return SteamClient.RemotePlay.CreateInviteAndSession(i.ConvertTo64BitString(), t); } GetNextGuestID() { return this.m_unNextGuestID++; } CreateGroup(e, t) { return (0, D.U5)("RemotePlay.CreateGroup") ? (A.Debug("CreateGroup(", e, ",", t, ")"), (this.m_dialogContext = t), SteamClient.RemotePlay.CreateGroup(e)) : (A.Error("CreateGroup not present on this client. Falling back to CreateGuestInviteAndSession"), this.CreateGuestInviteAndSession(e, t)); } CreateGuestInviteAndSession(e, t) { A.Debug("CreateGuestInviteAndSession"), (this.m_dialogContext = t); const n = l.K.InitFromAccountID(0); return SteamClient.RemotePlay.CreateInviteAndSessionWithGuestID(n.ConvertTo64BitString(), this.GetNextGuestID(), e); } CreateGuestInviteAndCopyLink(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { A.Debug("CreateGuestInviteAndCopyLink"), (this.m_dialogContext = t); const n = l.K.InitFromAccountID(0), i = this.GetNextGuestID(), o = yield SteamClient.RemotePlay.CreateInviteAndSessionWithGuestID(n.ConvertTo64BitString(), i, e); return 0 != o ? (A.Error(`Failed to create guest invite: ${o}`), o) : (yield (0, r.gx)(() => { const e = this.m_guestSessions.get(i); return e && !!e.strConnectUrl; }), this.CopyLink(i), o); }); } CancelInviteAndSession(e) { A.Debug(`CancelInviteAndSession for accountid ${e}`), e || A.Error("RemotePlayStore.CancelInviteAndSession called with invalid accountid. Did you mean to call CancelGuestInviteAndSession()?"); const t = l.K.InitFromAccountID(e); return (0, D.U5)("RemotePlay.CancelInviteAndSessionWithGuestID") ? SteamClient.RemotePlay.CancelInviteAndSessionWithGuestID(t.ConvertTo64BitString(), 0) : SteamClient.RemotePlay.CancelInviteAndSession(t.ConvertTo64BitString()); } CancelGuestInviteAndSession(e, t) { return A.Debug(`CancelGuestInviteAndSession for guestid ${t}`), SteamClient.RemotePlay.CancelInviteAndSessionWithGuestID(e, t); } CancelAllInvitesAndSessions() { A.Debug("CancelAllInvitesAndSessions"), (0, D.U5)("RemotePlay.CancelInviteAndSessionWithGuestID") ? this.GetAllSessions().forEach((e) => SteamClient.RemotePlay.CancelInviteAndSessionWithGuestID(e.playerID.steamid, e.playerID.guestid)) : this.GetAllSessions().forEach((e) => SteamClient.RemotePlay.CancelInviteAndSession(e.playerID.steamid)); } StopStreamingClient() { (0, D.U5)("RemotePlay.StopStreamingClient") && SteamClient.RemotePlay.StopStreamingClient(); } SetStreamingDesktopToRemotePlayTogetherEnabled(e) { return (this.m_bAllowDesktopStream = e), SteamClient.RemotePlay.SetStreamingDesktopToRemotePlayTogetherEnabled(e); } SetPerUserKeyboardInputEnabled(e, t) { return (0, D.U5)("RemotePlay.SetPerUserKeyboardInputEnabledWithGuestID") ? SteamClient.RemotePlay.SetPerUserKeyboardInputEnabledWithGuestID(e.steamid, e.guestid, t) : SteamClient.RemotePlay.SetPerUserKeyboardInputEnabled(e.steamid, t); } SetPerUserMouseInputEnabled(e, t) { return (0, D.U5)("RemotePlay.SetPerUserMouseInputEnabledWithGuestID") ? SteamClient.RemotePlay.SetPerUserMouseInputEnabledWithGuestID(e.steamid, e.guestid, t) : SteamClient.RemotePlay.SetPerUserMouseInputEnabled(e.steamid, t); } SetPerUserControllerInputEnabled(e, t) { return (0, D.U5)("RemotePlay.SetPerUserControllerInputEnabledWithGuestID") ? SteamClient.RemotePlay.SetPerUserControllerInputEnabledWithGuestID(e.steamid, e.guestid, t) : SteamClient.RemotePlay.SetPerUserControllerInputEnabled(e.steamid, t); } GetPerUserInputSettings(e) { return (0, i.mG)(this, void 0, void 0, function* () { return (0, D.U5)("RemotePlay.GetPerUserInputSettingsWithGuestID") ? SteamClient.RemotePlay.GetPerUserInputSettingsWithGuestID(e.steamid, e.guestid) : SteamClient.RemotePlay.GetPerUserInputSettings(e.steamid); }); } BHasGuestPlayer() { if (0 === this.m_guestSessions.size) return !1; let e = !1; return this.m_guestSessions.forEach(({ bSession: t }) => (e = e || t)), e; } BHasPlayer() { if (0 === this.m_nonGuestSessions.size && 0 === this.m_guestSessions.size) return !1; let e = !1; return this.m_nonGuestSessions.forEach(({ bSession: t }) => (e = e || t)), this.m_guestSessions.forEach(({ bSession: t }) => (e = e || t)), e; } BHasJoinedPlayer() { if (0 === this.m_nonGuestSessions.size && 0 === this.m_guestSessions.size) return !1; let e = !1; return this.m_nonGuestSessions.forEach((t) => (e = e || (null == t ? void 0 : t.bJoined))), this.m_guestSessions.forEach((t) => (e = e || (null == t ? void 0 : t.bJoined))), e; } OnGroupCreated(e, t, n) { A.Debug(`OnGroupCreated - ${e.steamid64} - ${n}`), (this.m_sessionHost = e), (this.m_bIsHost = t), (this.m_strGameID = n); } SessionStarted(e, t) { A.Debug(`SessionStarted: ${JSON.stringify(e)}`), "number" == typeof e.guestid && (this.m_unNextGuestID = Math.max(this.m_unNextGuestID, e.guestid + 1)); let n = this.GetSessionForPlayer(e); if (void 0 === n) { let i = new l.K(e.steamid).GetAccountID(); const o = !!e.guestid; (n = { playerID: e, friend: ne.FriendStore.GetPlayer(i), gameID: t, bSession: !0, bJoined: !1, bMobile: !1, bKeyboardEnabled: !0, bMouseEnabled: !0, bControllerEnabled: !0, nKeyboardUsedTime: 0, nMouseUsedTime: 0, nControllerUsedTime: 0, bGuest: o, strConnectUrl: o ? "" : void 0 }), this.GetPerUserInputSettings(e) .then((t) => { this.PlayerInputSettingsChanged(e, t); }) .catch(), n.friend.LoadIfNecessary(), e.guestid ? this.m_guestSessions.set(e.guestid, n) : this.m_nonGuestSessions.set(e.steamid, n); } else n.bSession = !0; } GetSessionForPlayer(e) { return e.guestid ? this.m_guestSessions.get(e.guestid) : this.m_nonGuestSessions.get(e.steamid); } ClearSessionForPlayer(e) { e.guestid ? this.m_guestSessions.delete(e.guestid) : this.m_nonGuestSessions.delete(e.steamid); } GetAllSessions() { return [...Array.from(this.m_nonGuestSessions.values()), ...Array.from(this.m_guestSessions.values())]; } SessionStopped(e) { A.Debug(`SessionStopped: ${JSON.stringify(e)}`), this.GetSessionForPlayer(e) && (this.ClearSessionForPlayer(e), ne.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_rpt_leave.m4a")), this.ClearControllerSlotsWithPlayer(e); } SessionJoined(e, t) { A.Debug(`SessionJoined: ${JSON.stringify(e)} - ${t}`); let n = this.GetSessionForPlayer(e); if (void 0 === n) return; if (!0 === n.bJoined) return; (n.bJoined = !0), (n.rtJoined = Date.now() / 1e3), (n.strAvatarHash = t), (0, D.U5)("RemotePlay.BRemotePlayTogetherGuestOnPhoneOrTablet") && SteamClient.RemotePlay.BRemotePlayTogetherGuestOnPhoneOrTablet(e.steamid, e.guestid).then((e) => (n.bMobile = e)); let i = new l.K(e.steamid).GetAccountID(); 0 != i && (e.guestid && n.playerID.steamid !== e.steamid && ((n.playerID = e), (n.friend = ne.FriendStore.GetPlayer(i))), i !== ne.FriendStore.self.accountid && ne.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_rpt_join.m4a")); } PlayerUsedInput(e, t) { let n = this.GetSessionForPlayer(e); if (void 0 !== n) switch (t) { case y.w8.k_EClientUsedInputTypeKeyboard: n.nKeyboardUsedTime = Date.now(); break; case y.w8.k_EClientUsedInputTypeMouse: n.nMouseUsedTime = Date.now(); break; case y.w8.k_EClientUsedInputTypeController: n.nControllerUsedTime = Date.now(); } } PlayerInputSettingsChanged(e, t) { let n = this.GetSessionForPlayer(e); void 0 !== n && ((n.bKeyboardEnabled = t.bKeyboardEnabled), (n.bMouseEnabled = t.bMouseEnabled), (n.bControllerEnabled = t.bControllerEnabled)); } ControllerIndexSet(e, t) { A.Debug(`ControllerIndexSet: ${t} - ${JSON.stringify(e)}`), this.SetPlayerInControllerSlot(t, e); } HandleLaunchResult(e, t, n, i, o, r) { this.m_strGameID = t; const a = { steamid: e, guestid: r }; if ((A.Debug(`HandleLaunchResult: ${JSON.stringify(a)}`), n === E.u.k_ERemoteClientLaunchOK)) { if ((this.GetSessionSettings(), a.guestid)) { const e = this.GetSessionForPlayer(a); e && e.bGuest ? (e.strConnectUrl = o) : A.Error("Got remote play launch result for unknown guest session!"); } this.RegisterForNetworkUtilizationUpdates(); } else this.m_unGuestLinkCopied = 0; } RegisterForNetworkUtilizationUpdates() { !this.m_bRegisteredForNetworkUtilizationUpdates && (0, D.U5)("RemotePlay.RegisterForNetworkUtilizationUpdate") && (SteamClient.RemotePlay.RegisterForNetworkUtilizationUpdate(this.OnNetworkUtilizationUpdate), (this.m_bRegisteredForNetworkUtilizationUpdates = !0)); } OnNetworkUtilizationUpdate(e, t, n, i) { const o = this.GetSessionForPlayer({ steamid: e, guestid: t }); o && ((o.flNetworkUtilization = n), (o.flNetworkDuration = i)); } HandleGroupDisbanded() { A.Debug("HandleGroupDisbanded"), this.Reset(); } Reset() { A.Debug("Resetting."), this.CloseRemotePlayTogetherDialogs(), this.m_guestSessions.clear(), this.m_nonGuestSessions.clear(), (this.m_unGuestLinkCopied = 0), (this.m_strGameID = ""), (this.m_sessionHost = null), (this.m_bIsHost = !1), (this.m_unNextGuestID = 1), (this.m_dialogContext = null), (this.m_rgDialogCloseHandles = []); } HandleRemoteClientStopped(e, t) { this.Reset(); } CloseRemotePlayTogetherDialogs() { if ((A.Debug("CloseRemotePlayTogetherDialogs. Have any dialog close handles? " + (this.m_rgDialogCloseHandles.length > 0 ? "Yes" : "No")), this.m_rgDialogCloseHandles.length > 0)) { const e = this.m_rgDialogCloseHandles; (this.m_rgDialogCloseHandles = []), e.forEach(([e, t]) => t()); } } StopRemotePlay() { return (0, i.mG)(this, void 0, void 0, function* () { A.Debug("StopRemotePlay"), (0, D.U5)("RemotePlay.CloseGroup") ? yield SteamClient.RemotePlay.CloseGroup() : this.m_bIsHost ? this.CancelAllInvitesAndSessions() : this.StopStreamingClient(), this.Reset(); }); } CopyLink(e) { const t = this.m_guestSessions.get(e); t && t.bGuest ? (R.J$(t.strConnectUrl), (this.m_unGuestLinkCopied = e)) : A.Error("Cannot find guest session for copying link"); } get link_copied_for_guest() { return this.m_unGuestLinkCopied; } get game_volume() { return this.m_nGameVolume; } SetGameVolume(e) { (0, D.U5)("RemotePlay.SetGameSystemVolume") && SteamClient.RemotePlay.SetGameSystemVolume(e), (this.m_nGameVolume = e); } get client_streaming_quality() { return this.m_nClientStreamingQuality; } get host_streaming_quality_override() { return this.m_nHostStreamingQualityOverride; } SetClientStreamingQuality(e) { (0, D.U5)("RemotePlay.SetClientStreamingQuality") && SteamClient.RemotePlay.SetClientStreamingQuality(e), (this.m_nClientStreamingQuality = e); } get client_streaming_bitrate() { return this.m_nClientStreamingBitrate; } SetClientStreamingBitrate(e) { (0, D.U5)("RemotePlay.SetClientStreamingBitrate") && SteamClient.RemotePlay.SetClientStreamingBitrate(e), (this.m_nClientStreamingBitrate = e); } get allow_desktop_stream() { return this.m_bAllowDesktopStream; } get is_host() { return this.m_bIsHost; } get host() { return this.m_sessionHost; } get in_session() { return null != this.m_sessionHost; } DialogOpened(e, t, n) { this.m_rgDialogCloseHandles.push([e, t, n]); } DialogClosed(e, t) { this.m_rgDialogCloseHandles = this.m_rgDialogCloseHandles.filter(([n, i, o]) => !(0, j.n)(n, e) || o != t); } BDialogOpenInContext(e, t) { return this.m_rgDialogCloseHandles.some(([n, i, o]) => (0, j.n)(n, e) && (null == t || o == t)); } get dialog_context() { return this.m_dialogContext; } get game_id() { return this.m_strGameID; } RemoteClientStarted(e, t, n) { (this.m_sessionHost = e), (this.m_bIsHost = t), (this.m_strGameID = n), this.GetSessionSettings(), this.RegisterForNetworkUtilizationUpdates(); } GetSessionSettings() { (0, D.U5)("RemotePlay.GetGameSystemVolume") && SteamClient.RemotePlay.GetGameSystemVolume().then((e) => (this.m_nGameVolume = e)), (0, D.U5)("RemotePlay.GetClientStreamingQuality") && SteamClient.RemotePlay.GetClientStreamingQuality().then((e) => (this.m_nClientStreamingQuality = e)), (0, D.U5)("RemotePlay.GetClientStreamingBitrate") && SteamClient.RemotePlay.GetClientStreamingBitrate().then((e) => (this.m_nClientStreamingBitrate = e)); } } function k(e, t) { return (null == e ? void 0 : e.steamid) === (null == t ? void 0 : t.steamid) && (null == e ? void 0 : e.guestid) === (null == t ? void 0 : t.guestid); } (0, i.gn)([r.LO], M.prototype, "m_controllerSlotPlayers", void 0), (0, i.gn)([r.LO], M.prototype, "m_bIsShowingPlaceholder", void 0), (0, i.gn)([r.LO], M.prototype, "m_unGuestLinkCopied", void 0), (0, i.gn)([r.LO], M.prototype, "m_nGameVolume", void 0), (0, i.gn)([r.LO], M.prototype, "m_bAllowDesktopStream", void 0), (0, i.gn)([r.LO], M.prototype, "m_nHostStreamingQualityOverride", void 0), (0, i.gn)([r.LO], M.prototype, "m_nClientStreamingQuality", void 0), (0, i.gn)([r.LO], M.prototype, "m_nClientStreamingBitrate", void 0), (0, i.gn)([r.LO], M.prototype, "m_bIsHost", void 0), (0, i.gn)([r.LO], M.prototype, "m_sessionHost", void 0), (0, i.gn)([r.LO], M.prototype, "m_strGameID", void 0), (0, i.gn)([r.aD], M.prototype, "Init", null), (0, i.gn)([r.Fl], M.prototype, "player_props_count", null), (0, i.gn)([r.Fl], M.prototype, "bIsShowingPlaceholder", null), (0, i.gn)([r.aD], M.prototype, "SessionStopped", null), (0, i.gn)([r.aD], M.prototype, "SessionJoined", null), (0, i.gn)([r.aD], M.prototype, "PlayerInputSettingsChanged", null), (0, i.gn)([w.ak], M.prototype, "HandleLaunchResult", null), (0, i.gn)([w.ak], M.prototype, "OnNetworkUtilizationUpdate", null), (0, i.gn)([w.ak], M.prototype, "HandleGroupDisbanded", null), (0, i.gn)([r.aD], M.prototype, "Reset", null), (0, i.gn)([w.ak], M.prototype, "HandleRemoteClientStopped", null), (0, i.gn)([w.ak], M.prototype, "SetClientStreamingQuality", null); var T = n(53971), L = n(58594), G = n(3519), O = n(93635); class F { constructor(e) { (this.m_bReady = !1), (this.m_FriendsSettings = void 0), (this.m_CommunityPreferences = void 0), (this.m_StorePreferences = void 0), (this.m_bSteamIsInTournamentMode = !1), (this.m_unTimerUploadCommunityPreferences = void 0), (this.m_rgOnReadyCallbacks = []), (this.m_bFriendSettingsReady = !1), (0, r.rC)(this), (this.m_Storage = e), o.De.IN_CLIENT ? (this.m_iFriendSettingsStore = new x(this, this.OnFriendSettingsChanged.bind(this))) : (this.m_iFriendSettingsStore = new N(this, this.OnFriendSettingsChanged.bind(this))), (this.m_bSteamIsInTournamentMode = !1), o.De.IN_CLIENT && SteamClient.System.IsSteamInTournamentMode().then((e) => (this.m_bSteamIsInTournamentMode = e)); { let e = new L.n8(); this.m_CommunityPreferences = { bParenthesizeNicknames: e.parenthesize_nicknames(), eTextFilterSetting: e.text_filter_setting(), bTextFilterIgnoreFriends: e.text_filter_ignore_friends(), content_descriptor_preferences: { content_descriptors_to_exclude: [] } }; } this.m_ServerCommunityPreferences = void 0; } Init(e) { (this.m_CM = e), this.m_CM.AddOnLogonCallback(() => { this.m_bReady || (this.m_iFriendSettingsStore.InternalInit(), this.SetReady()); let e = s.gA.Init(G.Ug); G.d6.GetStorePreferences(this.m_CM.GetServiceTransport(), e).then((e) => { this.m_StorePreferences = e.Body(); }); let t = s.gA.Init(L.AP); return L.lk.GetCommunityPreferences(this.m_CM.GetServiceTransport(), t).then((e) => this.UpdateCommunityPreferences(e.Body().preferences())); }), this.m_CM.messageHandlers.RegisterServiceNotificationHandlerAction(L.jj.NotifyCommunityPreferencesChangedHandler, (e) => (this.UpdateCommunityPreferences(e.Body().preferences()), 1)); } BReady() { return this.m_bReady; } get FriendsSettings() { return this.m_FriendsSettings; } BUpdateFriendsSettings(e) { return !!this.m_iFriendSettingsStore.BUpdateSettings(e) && ((this.m_FriendsSettings = e), !0); } BClientHasFeatureOrOnWeb(e) { return !o.De.IN_CLIENT || (!!this.BReady() && "object" == typeof this.m_FriendsSettings.featuresEnabled && !!this.m_FriendsSettings.featuresEnabled.hasOwnProperty(e) && this.m_FriendsSettings.featuresEnabled[e]); } IsSteamInTournamentMode() { return this.m_bSteamIsInTournamentMode; } BAlwaysShowChatsInNewWindow() { return this.m_FriendsSettings.bAlwaysNewChatWindow; } BSingleWindowModeEnabled() { return !!this.m_FriendsSettings.bSingleWindowMode; } BackfillSingleWindowMode(e) { void 0 === this.m_FriendsSettings.bSingleWindowMode && (console.log("Performing single window mode backfill", e), this.SetSingleWindowMode(e)); } SetSingleWindowMode(e) { (this.m_FriendsSettings.bSingleWindowMode = e), this.BUpdateFriendsSettings(this.m_FriendsSettings); } BForceAlphabeticFriendSorting() { return this.m_FriendsSettings.bForceAlphabeticFriendSorting; } RunOnReady(e) { this.m_bReady ? e() : this.m_rgOnReadyCallbacks.push(e); } GetAccountSpecificLocalStorageKey(e) { return this.m_CM && this.m_CM.steamid && this.m_CM.steamid.BIsValid() ? e + "_" + this.m_CM.steamid.GetAccountID() : null; } GetObjectFromLocalStorageWhenReady(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return yield this.WhenReady(), this.GetObjectFromLocalStorage(e, t); }); } GetObjectFromLocalStorage(e, t) { let n = this.GetAccountSpecificLocalStorageKey(e); return n ? this.m_Storage.GetObject(n).then((e) => { let n = Object.assign({}, t, e); if (t && "object" == typeof t) for (let i in t) "object" == typeof t[i] && e && (n[i] = Object.assign({}, t[i], e[i])); return n; }) : Promise.reject("Storage not ready"); } StoreObjectInLocalStorage(e, t) { let n = this.GetAccountSpecificLocalStorageKey(e); return !!n && (this.m_Storage.StoreObject(n, t), !0); } GetFlagFromLocalStorageWhenReady(e) { return (0, i.mG)(this, void 0, void 0, function* () { return yield this.WhenReady(), this.GetFlagFromLocalStorage(e); }); } GetFlagFromLocalStorage(e) { let t = this.GetAccountSpecificLocalStorageKey(e); return t ? this.m_Storage.GetString(t).then((e) => "true" === e) : Promise.reject("Storage not ready"); } SetFlagInLocalStorage(e, t) { let n = this.GetAccountSpecificLocalStorageKey(e); return !!n && (t ? this.m_Storage.StoreString(n, "true") : this.m_Storage.RemoveObject(n), !0); } BFlagExistsInLocalStorage(e) { const t = this.GetAccountSpecificLocalStorageKey(e); return t ? this.m_Storage.GetString(t).then((e) => null !== e) : Promise.reject("Storage not ready"); } WhenReady() { return this.m_bReady ? Promise.resolve() : new Promise((e) => this.RunOnReady(e)); } SetReady() { if (this.m_bFriendSettingsReady && this.m_CM && this.m_CM.steamid.BIsValid()) { this.m_bReady = !0; for (let e of this.m_rgOnReadyCallbacks) e(); this.m_rgOnReadyCallbacks = []; } } OnFriendSettingsChanged(e) { (this.m_FriendsSettings = e), (this.m_bFriendSettingsReady = !0), this.SetReady(); } get CommunityPreferences() { return this.m_CommunityPreferences; } UpdateCommunityPreferences(e) { let t = Object.assign({}, this.m_CommunityPreferences); void 0 !== e.parenthesize_nicknames() && (t.bParenthesizeNicknames = e.parenthesize_nicknames()), (this.m_ServerCommunityPreferences = Object.assign({}, t)), (this.m_CommunityPreferences = t); } CommunityPreferencesToMessage(e) { let t = new L.n8(); return t.set_parenthesize_nicknames(e.bParenthesizeNicknames), t; } SetCommunityPreferences(e) { (this.m_CommunityPreferences = e), (0, D.U5)("Messaging.PostMessage") && SteamClient.Messaging.PostMessage("Settings", "CommunityPreferences", JSON.stringify(e)), this.m_unTimerUploadCommunityPreferences && clearTimeout(this.m_unTimerUploadCommunityPreferences), (this.m_unTimerUploadCommunityPreferences = SetBackgroundTimeout(() => { (this.m_unTimerUploadCommunityPreferences = void 0), this.UploadCommunityPreferences(); }, 5e3)); } UploadCommunityPreferences() { let e = !1; if (void 0 === this.m_ServerCommunityPreferences) e = !0; else for (let t of Object.keys(this.m_ServerCommunityPreferences)) if (this.m_ServerCommunityPreferences[t] !== this.CommunityPreferences[t]) { e = !0; break; } if (!e) return; let t = s.gA.Init(L.FO); t.Body().set_preferences(this.CommunityPreferencesToMessage(this.CommunityPreferences)), L.lk.SetCommunityPreferences(this.m_CM.GetServiceTransport(), t).then((e) => {}); } get StorePreferences() { return this.m_StorePreferences; } FillInChatUsabilityMetrics(e) { let t = e.settings(), n = this.FriendsSettings; t.set_notifications_show_ingame(n.bNotifications_ShowIngame), t.set_notifications_show_online(n.bNotifications_ShowOnline), t.set_notifications_show_message(n.bNotifications_ShowMessage), t.set_notifications_events_and_announcements(n.bNotifications_EventsAndAnnouncements), t.set_sounds_play_ingame(n.bSounds_PlayIngame), t.set_sounds_play_online(n.bSounds_PlayOnline), t.set_sounds_play_message(n.bSounds_PlayMessage), t.set_sounds_events_and_announcements(n.bSounds_EventsAndAnnouncements), t.set_always_new_chat_window(n.bAlwaysNewChatWindow), t.set_force_alphabetic_friend_sorting(n.bForceAlphabeticFriendSorting), t.set_chat_flash_mode(n.nChatFlashMode), t.set_remember_open_chats(n.bRememberOpenChats), t.set_compact_quick_access(n.bCompactQuickAccess), t.set_compact_friends_list(n.bCompactFriendsList), t.set_notifications_show_chat_room_notification(n.bNotifications_ShowChatRoomNotification), t.set_sounds_play_chat_room_notification(n.bSounds_PlayChatRoomNotification), t.set_hide_offline_friends_in_tag_groups(n.bHideOfflineFriendsInTagGroups), t.set_hide_categorized_friends(n.bHideCategorizedFriends), t.set_categorize_in_game_friends_by_game(n.bCategorizeInGameFriendsByGame), t.set_chat_font_size(n.nChatFontSize), t.set_use24hour_clock(n.b24HourClock), t.set_do_not_disturb_mode(n.bDoNotDisturbMode), t.set_disable_embed_inlining(n.bDisableEmbedInlining), t.set_sign_into_friends(n.bSignIntoFriends), t.set_animated_avatars(n.bAnimatedAvatars); } } (0, i.gn)([r.LO], F.prototype, "m_bReady", void 0), (0, i.gn)([r.LO], F.prototype, "m_FriendsSettings", void 0), (0, i.gn)([r.LO], F.prototype, "m_CommunityPreferences", void 0), (0, i.gn)([r.LO], F.prototype, "m_StorePreferences", void 0), (0, i.gn)([r.LO], F.prototype, "m_bSteamIsInTournamentMode", void 0), (0, i.gn)([r.aD], F.prototype, "BUpdateFriendsSettings", null), (0, i.gn)([r.aD], F.prototype, "UpdateCommunityPreferences", null), (0, i.gn)([r.aD], F.prototype, "SetCommunityPreferences", null); class B { constructor(e, t) { (this.m_SettingsStore = e), (this.m_fnFriendSettingsChanged = t); } } class x extends B { constructor(e, t) { super(e, t), (this.m_bClientInitComplete = !1), this.InternalInit(); } InternalInit() { this.m_bClientInitComplete || (SteamClient && SteamClient.FriendSettings && SteamClient.FriendSettings.RegisterForSettingsChanges ? (SteamClient.FriendSettings.RegisterForSettingsChanges(this.OnClientSettingsChange.bind(this)), (this.m_bClientInitComplete = !0)) : (0, O.X)(!1, "Can't initialize settings from client")); } OnClientSettingsChange(e) { let t, n = T.k(); if ("string" != typeof e) { if (((t = e.FriendsSettings), SteamClient.FriendSettings && SteamClient.FriendSettings.SetFriendSettings)) return void this.BUpdateSettings(t); } else t = JSON.parse(e, (e, t) => ("b" == e.substring(0, 1) && "number" == typeof t ? 0 != t : t)); Object.assign(n, t), this.m_fnFriendSettingsChanged(n); } BUpdateSettings(e) { let t = JSON.stringify(e); return SteamClient.FriendSettings.SetFriendSettings(t), !0; } } class N extends B { InternalInit() { this.m_SettingsStore.GetObjectFromLocalStorage(N.k_strLocalStorageKeyPrefix, this.GetDefaultSettings()).then((e) => { this.m_fnFriendSettingsChanged(e.friendsSettings); }); } GetDefaultSettings() { return { friendsSettings: T.k() }; } BUpdateSettings(e) { let t = { friendsSettings: e }; return this.m_SettingsStore.StoreObjectInLocalStorage(N.k_strLocalStorageKeyPrefix, t); } } N.k_strLocalStorageKeyPrefix = "LocalStorageFriendsSettings"; var P = n(96119); class U { constructor() { (this.m_PrivacySettings = { privacy_state: 0, privacy_state_inventory: 0, privacy_state_gifts: 0, privacy_state_ownedgames: 0, privacy_state_playtime: 0, privacy_state_friendslist: 0 }), (0, r.rC)(this); } Init(e) { (this.m_CMInterface = e), this.m_CMInterface.RunWhenLoggedOn(() => (0, i.mG)(this, void 0, void 0, function* () { let e = s.gA.Init(L.g_), t = yield L.lk.GetPrivacySettings(this.m_CMInterface.GetServiceTransport(), e); 1 == t.GetEResult() && this.ReadPrivacySettings(t.Body().privacy_settings()); }), ), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandlerAction(L.jj.NotifyPrivacyPrivacySettingsChangedHandler, (e) => (this.ReadPrivacySettings(e.Body().privacy_settings()), 1)); } get PrivacySettings() { return this.m_PrivacySettings; } ReadPrivacySettings(e) { Object.assign(this.m_PrivacySettings, e.toObject()); } } (0, i.gn)([r.LO], U.prototype, "m_PrivacySettings", void 0); var V = n(38461), H = n(50913), W = n(93354), X = n(73085), j = n(33082); function z(e, t) { return `${e} - ${(performance.now() - t).toLocaleString()}ms`; } var K = n(41370), q = n(50649), Z = n(27378), Q = n(37634), $ = n(34294), Y = n(33690), J = n(24424), ee = n(31542); class te { constructor(e) { this.m_VoiceChatStore = e; } Init(e) { (this.m_CMInterface = e), o.De.IN_CLIENT && ((this.m_RootElement = document.createElement("div")), document.body.appendChild(this.m_RootElement), Q.s(this.m_RootElement).render(Z.createElement(ie, { voiceChat: this.m_VoiceChatStore }))); } } let ne, ie = (0, q.Pi)((e) => { const t = e.voiceChat.video_streams; return Z.createElement( Z.Fragment, null, t.map((e) => Z.createElement(oe, { key: e.unique_id, video: e })), ); }); function oe(e) { const t = (0, J.B)("RemoteVideo-" + e.video.unique_id, { browserType: $.i_.EBrowserType_OpenVROverlay, eCreationFlags: Y.eL.None, strVROverlayKey: "valve.steam.friendsui.remotevideo_" + e.video.accountid, title: "FriendsUI - Remote Video - " + e.video.unique_id, dimensions: { width: 1920, height: 1080, left: 0, top: 0 }, replace_existing_popup: !0 }), { element: n } = t; return n ? (0, ee.createPortal)(Z.createElement(re, Object.assign({}, e)), n) : null; } function re(e) { const { video: t } = e, n = Z.useRef(); return ( Z.useLayoutEffect(() => { n.current && (n.current.srcObject = t.stream); }), Z.createElement("div", null, Z.createElement("video", { className: "remoteVideo", ref: n, autoPlay: !0, playsInline: !0, muted: !0 })) ); } function ae(e, t) { return function (...t) { ne.ready_to_render ? e.apply(this, t) : (0, r.gx)( () => ne.ready_to_render, () => { e.apply(this, t); }, ); }; } function se(e, t, n) { return { value: ae(n.value) }; } function le(e) { return ae(e, e.name); } class ce {} class me {} class de { constructor(e, t = {}) { (this.m_BrowserContextDefaultTarget = j.D), (this.m_AppInfoStore = H.Q8), (this.m_EconomyStore = new _()), (this.m_UserStore = new U()), (this.m_ParentalStore = new I()), (this.m_BroadcastStore = new m()), (this.m_GroupMemberStore = new C.r$()), (this.m_RemotePlayStore = new M()), (this.m_bReadyToRender = !1), (this.m_bShuttingDown = !1), (this.m_exportsVoiceInterface = null), (0, r.rC)(this), (0, O.X)(!ne, "FriendsUIApp already initialized"), (ne = this), (window.g_FriendsUIApp = this), (this.m_Storage = e), (this.m_SettingsStore = t.SettingsStore || new F(e)), (this.m_FriendStore = t.FriendStore || new g.Yp()), (this.m_ChatStore = t.ChatStore || new h.ic(this.m_FriendStore)), (this.m_UIStore = t.UIStore || new P.lV(this.m_ChatStore)), (this.m_VoiceChatStore = new V.Ys(this.m_SettingsStore)), (this.m_VRPopupManager = new te(this.m_VoiceChatStore)), (this.m_exportsCurrentUserStatus = { GetPersonaState: () => (this.FriendStore.self ? this.FriendStore.self.persona.m_ePersonaState : 0), SetUserOnline: () => this.FriendStore.SetUserPersonaState(1), SetUserInvisible: () => this.FriendStore.SetUserPersonaState(7), SetUserAway: () => this.FriendStore.SetUserPersonaState(3), SetUserOffline: () => { this.SignOutOfFriends(j.D), this.FriendStore.SetUserPersonaState(0); }, GetUserDoNotDisturb: () => this.FriendStore.GetUserDoNotDisturb(), SetUserDoNotDisturb: (e) => this.FriendStore.SetUserDoNotDisturb(e), }), (this.m_exportsVoiceInterface = { IsAnyVoiceActive: () => this.VoiceStore.IsAnyVoiceActive(), IsMicMuted: () => this.VoiceStore.IsMicMuted(), IsOutputMuted: () => this.VoiceStore.IsOutputMuted(), ToggleMicMuting: () => this.VoiceStore.ToggleMicMuting(), ToggleOutputMuting: () => this.VoiceStore.ToggleOutputMuting(), EndVoiceChat: () => this.VoiceStore.OnUserEndVoiceChat(), RegisterForPendingOneOnOneVoiceChatRequests: (e) => this.VoiceStore.RegisterForPendingOneOnOneVoiceChatRequests(e), RegisterForCurrentUserVoiceLevel: (e) => this.VoiceStore.RegisterForCurrentUserVoiceLevel(e), IsLocalMicTestActive: () => this.VoiceStore.IsLocalMicTestActive(), InitiateLocalMicTest: () => this.VoiceStore.InitiateLocalMicTest(), EndLocalMicTest: () => this.VoiceStore.EndLocalMicTest(), GetSelectedMic: () => this.VoiceStore.GetSelectedMic(), GetSelectedOutputDevice: () => this.VoiceStore.GetSelectedOutputDevice(), SetSelectedMic: (e) => this.VoiceStore.SetSelectedMic(e), SetSelectedOutput: (e) => this.VoiceStore.SetSelectedOutput(e), ConvertGainValueToSliderValue: (e, t) => this.VoiceStore.ConvertGainValueToSliderValue(e, t), ConvertSliderToGainValue: (e, t) => this.VoiceStore.ConvertSliderToGainValue(e, t), GetVoiceInputGain: () => this.VoiceStore.GetVoiceInputGain(), GetVoiceOutputGain: () => this.VoiceStore.GetVoiceOutputGain(), GetMaxInputOutputGain: () => V.Ys.k_MaxInputOutputGainValue, SetVoiceInputGain: (e) => this.VoiceStore.SetVoiceInputGain(e), SetVoiceOutputGain: (e) => this.VoiceStore.SetVoiceOutputGain(e), GetPushToTalkEnabled: () => this.VoiceStore.GetPushToTalkEnabled(), GetPushToMuteEnabled: () => this.VoiceStore.GetPushToMuteEnabled(), SetPushToTalkEnabled: (e) => this.VoiceStore.SetPushToTalkEnabled(e), SetPushToMuteEnabled: (e) => this.VoiceStore.SetPushToMuteEnabled(e), GetPushToTalkHotKeyDisplayString: () => this.VoiceStore.GetPushToTalkHotKeyDisplayString(), GetPushToTalkOrMuteSoundsEnabled: () => this.VoiceStore.GetPushToTalkOrMuteSoundsEnabled(), SetPushToTalkOrMuteSoundsEnabled: (e) => this.VoiceStore.SetPushToTalkOrMuteSoundsEnabled(e), RefreshPushToTalkKeySettings: () => this.VoiceStore.RefreshPushToTalkKeySettings(), GetUseNoiseGateLevel: () => this.VoiceStore.GetUseNoiseGateLevel(), SetUseNoiseGateLevel: (e) => this.VoiceStore.SetUseNoiseGateLevel(e), GetUseEchoCancellation: () => this.VoiceStore.GetUseEchoCancellation(), SetUseEchoCancellation: (e) => this.VoiceStore.SetUseEchoCancellation(e), GetUseNoiseCancellation: () => this.VoiceStore.GetUseNoiseCancellation(), SetUseNoiseCancellation: (e) => this.VoiceStore.SetUseNoiseCancellation(e), GetUseAutoGainControl: () => this.VoiceStore.GetUseAutoGainControl(), SetUseAutoGainControl: (e) => this.VoiceStore.SetUseAutoGainControl(e), GetVoiceLogs: () => this.VoiceStore.GetVoiceLogs(), }); } InitInternal(e, t, n = []) { (this.m_CMInterface = e), (this.m_NotificationManager = t); (function (e, t, n = !0) { return (0, i.mG)(this, void 0, void 0, function* () { const i = performance.now(), o = []; yield Promise.all( t.map(([t, r]) => { const a = performance.now(); try { const l = r(); if ((s = l) && "object" == typeof s && "then" in s && "function" == typeof s.then) return l.then( () => n && o.push(z(`async ${t}`, i)), (n) => console.error(`${e} - ${t} - ERROR`, n), ); n && o.push(z(t, a)); } catch (n) { console.error(`${e} - ${t} - ERROR`, n); } var s; return null; }), ), n && (console.groupCollapsed(z(e, i)), o.forEach((e) => console.log(e)), console.groupEnd()); }); })("FriendsUI ReadyToRender", [["FriendStore", () => this.m_FriendStore.Init(e)], ["ChatStore", () => this.m_ChatStore.Init(e, this.m_VoiceChatStore)], ["Clock Drift", () => this.InitAdjustClockDriftFromServer()], ["VoiceChatStore", () => this.m_VoiceChatStore.Init(e)], ["VRPopupManager", () => this.m_VRPopupManager.Init(e)], ["SettingsStore", () => this.m_SettingsStore.Init(e)], ["AppInfoStore", () => this.m_AppInfoStore.Init(e)], ["UIStore", () => this.m_UIStore.Init()], ["EconomyStore", () => this.m_EconomyStore.Init(e)], ["ParentalStore", () => this.m_ParentalStore.Init(e)], ["BroadcastStore", () => this.m_BroadcastStore.Init(e)], ["RemotePlayStore", () => this.m_RemotePlayStore.Init(e)], ["GroupMemberStore", () => this.m_GroupMemberStore.Init()], ["UserStore", () => this.m_UserStore.Init(e)], ["CookiePreferenceStore", () => (this.m_CookiePreferenceStore = new X._(e))], ...n]).then( () => { console.log("Ready To Render promises succeeded"), this.SetReadyToRender(); }, (e) => { console.error("Ready To Render promise failed: ", e), this.SetReadyToRender(); }, ); } GetChatRoomBBCodeParser() { return this.m_ChatRoomBBCodeParser; } GetFriendChatBBCodeParser() { return this.m_FriendChatBBCodeParser; } GetNotificationBBCodeParser() { return this.m_NotificationBBCodeParser; } GetChatRoomEffectSettings() { return this.m_ChatRoomEffectSettings; } get CMInterface() { return this.m_CMInterface; } get FriendStore() { return this.m_FriendStore; } get ChatStore() { return this.m_ChatStore; } get VoiceStore() { return this.m_VoiceChatStore; } get VRPopupManager() { return this.m_VRPopupManager; } get UIStore() { return this.m_UIStore; } get SettingsStore() { return this.m_SettingsStore; } get AppInfoStore() { return this.m_AppInfoStore; } get Storage() { return this.m_Storage; } get NotificationManager() { return this.m_NotificationManager; } get EconomyStore() { return this.m_EconomyStore; } get UserStore() { return this.m_UserStore; } get ParentalStore() { return this.m_ParentalStore; } get BroadcastStore() { return this.m_BroadcastStore; } get RemotePlayStore() { return this.m_RemotePlayStore; } get GroupMemberStore() { return this.m_GroupMemberStore; } get CookiePreferenceStore() { return this.m_CookiePreferenceStore; } SetReadyToRender() { return (0, i.mG)(this, void 0, void 0, function* () { if (!this.m_bReadyToRender && (console.log(`FriendsUI ready to render after ${performance.now() - de.sm_msStartup}ms`), (this.m_bReadyToRender = !0), yield this.OnReadyToRender(), this.IsLoadedInClientSharedJSContext())) { let e = { message: "FriendsUIReady", data: o.De.BUILD_TIMESTAMP }; window.parent.postMessage(e, "https://steamloopback.host"); } }); } get ready_to_render() { return this.m_bReadyToRender; } GetStartupTime() { return de.sm_msStartup; } ShowFriendChatDialog(e, t, n = !0) { return this.UIStore.ShowFriendChatDialog(e, t, n, n); } GetDefaultBrowserContext() { return this.m_BrowserContextDefaultTarget; } SetDefaultPopupContext(e) { console.log("Set default popup context: " + e.m_unPID), (this.m_BrowserContextDefaultTarget = e); } CreateNewTabFromUniqueID(e, t, n, i) { let o = t.match(/^f(\d+)$/); if (o && o[1]) { let t = parseInt(o[1]), n = ne.FriendStore.GetPlayer(t); if (n && !n.is_blocked) { let o = this.m_ChatStore.GetFriendChat(t); if (o) { const r = new u.ub(e, o); return !i || n.is_friend || ne.FriendStore.BApprovedNonFriendMessages(t) || o.SetShowNonFriendWarning(!0), r; } } } let r = t.match(/^cg(\d+)$/); if (r && r[1]) { let t = this.m_ChatStore.GetChatRoomGroup(r[1]); if (t) return this.m_ChatStore.IncRefActiveChatRoomGroup(t.GetGroupID(), !n), new W.we(e, t); } return null; } InitAdjustClockDriftFromServer() { return (0, i.mG)(this, void 0, void 0, function* () { return new Promise((e, t) => { this.m_CMInterface.RunWhenLoggedOn(() => (0, i.mG)(this, void 0, void 0, function* () { try { yield (0, r.gx)(() => this.m_CMInterface.BPerformedInitialClockAdjustment(), { timeout: 1e3 }), e(); } catch (e) { console.warn("Timed out waiting for initial server clock drift adjustment"), t(); } }), ); }); }); } GetServerTimeMS() { return this.m_CMInterface.GetServerTimeMS(); } GetServerRTime32() { return this.m_CMInterface.GetServerRTime32(); } RTime32ToDate(e) { return this.m_CMInterface.RTime32ToDate(e); } GetLocalMidnightInRTime32(e) { void 0 === de.sm_tzOffset && ((de.sm_tzOffset = 60 * new Date().getTimezoneOffset()), (0, O.X)(de.sm_tzOffset || 0 === de.sm_tzOffset, `Computed invalid timezone offset ${de.sm_tzOffset}`)); let t = de.sm_tzOffset || 0, n = (e || this.m_CMInterface.GetServerRTime32()) - t; return 86400 * Math.floor(n / 86400) + t; } IsInBeta() { return o.De.FRIENDSUI_BETA; } BIsValidBrowserContext(e) { return (0, j.n)(e, j.D); } ShowCloseActiveVoiceConfirmation(e, t) {} UpdatePersonaState(e) {} BShowChatRoomNotification() { return !!this.IsGamepadUIActive() || this.SettingsStore.FriendsSettings.bNotifications_ShowChatRoomNotification; } BPlayChatRoomNotificationSound() { return !this.IsGamepadUIActive() && this.SettingsStore.FriendsSettings.bSounds_PlayChatRoomNotification; } BShowDirectChatNotification() { return this.SettingsStore.FriendsSettings.bNotifications_ShowMessage; } GetCurrentUserStatusInterface() { return this.m_exportsCurrentUserStatus; } GetVoiceInterface() { return this.m_exportsVoiceInterface; } SetEmoticonTrackerCallback(e) { this.m_ChatStore.EmoticonStore.SetEmoticonTrackerCallback(e); } SetStickerTrackerCallback(e) { this.m_ChatStore.EmoticonStore.SetStickerTrackerCallback(e); } StopListening() {} Reconnect() { return (0, i.mG)(this, void 0, void 0, function* () { yield Promise.all([this.CMInterface.Connect(), this.UIStore.RestorePopupState()]); }); } } function he() { return (0, K.SZ)(() => ne.RemotePlayStore.host); } function ue() { return ( "0" != (0, K.SZ)(() => { var e, t, n; return null !== (n = null === (t = null === (e = ne.FriendStore.self) || void 0 === e ? void 0 : e.persona) || void 0 === t ? void 0 : t.m_gameid) && void 0 !== n ? n : "0"; }) ); } (de.sm_msStartup = performance.now()), (0, i.gn)([r.LO], de.prototype, "m_bReadyToRender", void 0), (0, i.gn)([r.Fl], de.prototype, "ready_to_render", null); }, 37035: (e, t, n) => { "use strict"; n.d(t, { $x: () => _, TN: () => u, r$: () => C }); var i = n(85556), o = n(9824), r = n(2049), a = n(23346), s = n(72746), l = n(84290), c = n(77385), m = n(10167), d = n(79588), h = n(93635); const u = -1, p = -2; class _ { constructor(e, t, n) { (this.m_id = e), (this.m_rgMembers = []), (this.m_fnSort = t), (this.m_fnOnUpdate = n); } get id() { return this.m_id; } get name() { return this.m_id == p ? (1 == this.m_rgMembers.length ? (0, l.Xx)("#FriendGroup_InGame") : (0, l.Xx)("#FriendGroup_InGame_Others")) : 0 == this.m_id ? (0, l.Xx)("#Chat_MemberGroup_Online") : this.m_id == u ? (0, l.Xx)("#Chat_MemberGroup_PartyBeacon") : this.m_strName ? this.m_strName : s.Ul.AppInfoStore.GetAppInfo(this.m_id).is_initialized ? ((this.m_strName = s.Ul.AppInfoStore.GetAppInfo(this.m_id).name), this.m_strName) : (s.Ul.AppInfoStore.RegisterCallbackOnLoad(this.OnAppInfoLoaded), ""); } OnAppInfoLoaded() { (this.m_strName = s.Ul.AppInfoStore.GetAppInfo(this.m_id).name), this.m_fnOnUpdate(); } get member_list() { return this.m_rgMembers; } BReadyToDisplay() { return !this.BIsGameGroup() || !!this.name; } BIsGameGroup() { return this.m_id > 0; } ClearMemberList() { this.m_rgMembers = []; } BHasMember(e) { return this.m_rgMembers.findIndex((t) => t.accountid === e) >= 0; } SetMembers(e) { (this.m_rgMembers = e), this.Sort(); } SortedInsert(e) { (0, h.X)(!this.BHasMember(e.accountid), "Double insert into bucket for accountid", e.accountid), o.DG(this.m_rgMembers, e, this.m_fnSort); } Remove(e) { return o.Qf(this.m_rgMembers, (t) => t.accountid === e); } Sort() { this.m_rgMembers.sort(this.m_fnSort); } } (0, i.gn)([r.ak], _.prototype, "OnAppInfoLoaded", null); class g { constructor(e, t) { (this.rgRegistered = []), (this.bFlatList = void 0), (this.mapBuckets = new Map()), (this.nLastUpdate = 0), (this.msSpentSorting = 0), (this.groupSingletons = new _(p, e, t)); } } class C { constructor() { (this.m_mapGroupBuckets = new Map()), (this.m_mapGroupBeacons = new Map()), (this.m_bShowMembersInGameGroups = void 0), (this.LOG = new c.sO("GroupMemberStore").Debug); } Init() { (this.m_disposePersonaStateChanged = s.Ul.FriendStore.AddPersonaStateChangedCallback(this.OnPersonaStateChanged)), (this.m_disposePlayerGameChanged = s.Ul.FriendStore.AddPlayerGameChangedCallback(this.OnPlayerGameChanged)), s.Ul.SettingsStore.RunOnReady(this.ListenForSettingsChanges), s.Ul.CMInterface.AddOnDisconnectCallback(() => { this.Reset(); }, 102); } ListenForSettingsChanges() { (this.m_bShowMembersInGameGroups = s.Ul.SettingsStore.FriendsSettings.bCategorizeInGameFriendsByGame), (0, d.gx)( () => s.Ul.SettingsStore.FriendsSettings.bCategorizeInGameFriendsByGame !== this.m_bShowMembersInGameGroups, () => { this.Reset(), this.ListenForSettingsChanges(); }, ); } Reset() { this.m_mapGroupBuckets.forEach((e, t) => { (e.bFlatList = void 0), this.PerformInitialPopulate(t), this.FireMemberListChanged(e); }); } RegisterForGroupMemberList(e, t) { return ( this.m_mapGroupBuckets.has(t) || (this.m_mapGroupBuckets.set( t, new g(this.FriendSortFunc, () => { this.OnGroupUpdate(t); }), ), this.PerformInitialPopulate(t)), this.m_mapGroupBuckets.get(t).rgRegistered.push(e), { unregister: () => this.UnregisterForGroupMemberList(e, t) } ); } OnGroupUpdate(e) { let t = this.m_mapGroupBuckets.get(e); t && this.FireMemberListChanged(t); } UnregisterForGroupMemberList(e, t) { let n = this.m_mapGroupBuckets.get(t); n && (o.Zf(n.rgRegistered, e), 0 == n.rgRegistered.length && this.m_mapGroupBuckets.delete(t)); } GroupSortFunc(e, t) { return t.id == u && e.id != u ? 1 : e.id == u && t.id != u ? -1 : e.id <= 0 && t.id <= 0 ? e.id - t.id : e.id <= 0 && t.id > 0 ? 1 : t.id <= 0 && e.id > 0 ? -1 : t.member_list.length == e.member_list.length && t.name && e.name ? t.name.localeCompare(e.name) : t.member_list.length - e.member_list.length; } GetGroupMemberList(e) { let t = this.m_mapGroupBuckets.get(e); if (t.bFlatList) return (0, h.X)(1 == t.mapBuckets.size, "Flat list has too many buckets"), [t.mapBuckets.get(0)]; { let e = []; return ( t.mapBuckets.forEach((t) => { t.BReadyToDisplay() && (t.member_list.length > 1 || !this.BucketCanBeSingleton(t)) && e.push(t); }), t.groupSingletons.member_list.length > 0 && (t.groupSingletons.Sort(), e.push(t.groupSingletons)), e.sort(this.GroupSortFunc) ); } } SetGroupListFlat(e, t) { let n = this.m_mapGroupBuckets.get(e); n && n.bFlatList != t && ((n.bFlatList = t), this.PerformInitialPopulate(e), this.FireMemberListChanged(n)); } ScheduledFireMemberListChanged(e) { (e.hDelayUpdate = void 0), this.FireMemberListChanged(e); } FireMemberListChanged(e) { if (e.hDelayUpdate) return; let t = performance.now(); if (t - e.nLastUpdate < 1e3) return (e.hDelayUpdate = SetBackgroundTimeout(() => this.ScheduledFireMemberListChanged(e), 1e3)), void this.LOG("DELAY UPDATE"); e.nLastUpdate = t; for (let t of e.rgRegistered) t(); } OnPlayerGameChanged(e, t, n) { this.m_mapGroupBuckets.forEach((i, o) => { let r = s.Ul.ChatStore.GetChatRoomGroup(o); if (!r.GetMemberPartyBeacon(e) && r.BHasMember(e)) { let r = s.Ul.FriendStore.GetPlayer(e); if ((r.is_appinfo_ready(), this.LOG("OnPlayerGameChanged", r.display_name, t, n), i.bFlatList)) return i.mapBuckets.get(0).Remove(e), i.mapBuckets.get(0).SortedInsert(s.Ul.FriendStore.GetPlayer(e)), void this.FireMemberListChanged(i); if (t == n) { let t = n == m.v5 ? i.groupSingletons : i.mapBuckets.get(n); if (t && t.BHasMember(e)) return void this.UpdatePersonaForGroup(o, r); } this.RemoveMemberFromBucket(i, t, e), this.AddMemberToBucketID(i, n, s.Ul.FriendStore.GetPlayer(e)), this.FireMemberListChanged(i); } }); } OnPersonaStateChanged(e) { this.m_mapGroupBuckets.forEach((t, n) => { let i = s.Ul.ChatStore.GetChatRoomGroup(n); if (i.BHasMember(e.accountid)) { if ((this.LOG("CGroupMemberStore - persona state", n, e.display_name), t.bReSortPending)) return this.LOG(e.display_name, "not ready"), void e.is_appinfo_ready(); e.is_appinfo_ready() ? this.UpdatePersonaForGroup(i.GetGroupID(), e) : (this.LOG(`Delay sorting player ${e.accountid}`), s.Ul.AppInfoStore.RegisterCallbackOnLoad(this.UpdatePersonaForGroup.bind(this, n, e))); } }); } UpdatePersonaForGroup(e, t) { let n = this.m_mapGroupBuckets.get(e); if (!n) return; let i = performance.now(), o = !1; if (n.bFlatList) (0, h.X)(1 == n.mapBuckets.size, "Flat map is too large"), n.mapBuckets.get(0).Remove(t.accountid), n.mapBuckets.get(0).SortedInsert(t), (o = !0); else { let e = this.FindCurrentBucketForMember(n, t.accountid); if (void 0 !== e) { let i; e == p ? (i = n.groupSingletons) : ((i = n.mapBuckets.get(e)), 1 == i.member_list.length && this.BucketCanBeSingleton(i) && (i = n.groupSingletons)), (i.member_list.length > 1 || !this.BucketCanBeSingleton(i)) && (this.LOG("Resorting user", t.display_name, "in bucket", e), i.Remove(t.accountid), i.SortedInsert(t), (o = !0)); } } let r = performance.now(); (n.msSpentSorting += r - i), this.LOG(`${e}: Resort user ${t.display_name} took ${r - i}ms (total ${n.msSpentSorting}ms)`), o && this.FireMemberListChanged(n); } OnPartyBeaconsUpdated(e, t) { this.m_mapGroupBeacons.set(e, t); let n = this.m_mapGroupBuckets.get(e), i = [], o = !1; if (!n) return; for (let e of t) { i.push(e.account_id); let t = this.FindCurrentBucketForMember(n, e.account_id); if (t == u) continue; let r = s.Ul.FriendStore.GetPlayer(e.account_id); r.is_appinfo_ready(), (o = !0), this.RemoveMemberFromBucket(n, t, e.account_id), this.AddMemberToBucketID(n, u, r); } let r = n.mapBuckets.get(u); if (r) for (let t of r.member_list) if (-1 == i.indexOf(t.accountid)) { o = !0; let i = this.GetBucketIdForPlayer(n, t, e); this.RemoveMemberFromBucket(n, u, t.accountid), this.AddMemberToBucketID(n, i, t); } o && this.ReSortGroup(e); } ReSortGroup(e) { let t = this.m_mapGroupBuckets.get(e); if (t) { if (t.bFlatList) { (0, h.X)(1 == t.mapBuckets.size, "Flat list has too many buckets"); let n = performance.now(), i = t.mapBuckets.get(0); i.Sort(); let o = performance.now(); (t.msSpentSorting += o - n), this.LOG(`${e}: List ReSort took ${o - n}ms (total ${t.msSpentSorting}ms) for ${i.member_list.length} members`); } else t.mapBuckets.get(0).Sort(), t.groupSingletons.Sort(); (t.bReSortPending = !1), this.FireMemberListChanged(t); } } FriendSortFunc(e, t) { let n = a.Xp.FriendSortStatusComparator(e, t); if (0 != n) return n; if (e.persona.is_ingame && t.persona.is_ingame) { if (e.persona.is_in_nonsteam_game) { if (!t.persona.is_in_nonsteam_game) return 1; } else if (t.persona.is_in_nonsteam_game) return -1; const n = e.current_game_name, i = t.current_game_name; if (n) { if (!i) return -1; if (n != i) return n < i ? -1 : 1; } else if (i) return 1; } return e.display_name.localeCompare(t.display_name); } PerformInitialPopulate(e) { let t = this.m_mapGroupBuckets.get(e); t.mapBuckets.clear(), t.groupSingletons.ClearMemberList(), (0, h.X)(t, "PerformInitialPopulate didn't find group"); let n = performance.now(), i = s.Ul.ChatStore.GetChatRoomGroup(e).memberList.member_list_unsorted.slice(); if ((void 0 === t.bFlatList && (t.bFlatList = i.length > 100 || !s.Ul.SettingsStore.FriendsSettings.bCategorizeInGameFriendsByGame), t.bFlatList)) { i.forEach((e) => { e.is_appinfo_ready(); }); let e = new _(0, this.FriendSortFunc, () => { this.FireMemberListChanged(t); }); e.SetMembers(i), t.mapBuckets.set(0, e); } else for (let n of i) { let i = this.GetBucketIdForPlayer(t, n, e); this.AddMemberToBucketID(t, i, n); } s.Ul.AppInfoStore.BHavePendingAppInfoRequests() && ((t.bReSortPending = !0), s.Ul.AppInfoStore.RegisterCallbackOnLoad(this.ReSortGroup.bind(this, e))); let o = performance.now(); (t.msSpentSorting += o - n), this.LOG(`List sort took ${o - n} ms for ${i.length} members of group ${e}`); } FindCurrentBucketForMember(e, t) { let n; return ( e.mapBuckets.forEach((e) => { e.BHasMember(t) && (n = e.id); }), void 0 !== n ? n : e.groupSingletons.BHasMember(t) ? p : void 0 ); } BIsMemberInAnyBucket(e, t) { return void 0 !== this.FindCurrentBucketForMember(e, t); } AddMemberToBucketID(e, t, n) { if (((0, h.X)(!this.BIsMemberInAnyBucket(e, n.accountid), "Trying to double add accountid", n.accountid, "which is already in bucket", this.FindCurrentBucketForMember(e, n.accountid)), (0, h.X)(!e.bFlatList || 0 == t, "Trying to add to non-default bucket in flat list"), t != p)) if (e.mapBuckets.has(t)) { if (!e.bFlatList) { let n = e.mapBuckets.get(t); 1 == n.member_list.length && this.BucketCanBeSingleton(n) && this.RemoveFromSingletons(e, n.member_list[0].accountid); } e.mapBuckets.get(t).SortedInsert(n); } else { let i = new _(t, this.FriendSortFunc, () => { this.FireMemberListChanged(e); }); i.SortedInsert(n), e.mapBuckets.set(t, i), !e.bFlatList && this.BucketCanBeSingleton(i) && this.AddToSingletons(e, n); } else this.AddToSingletons(e, n); } BucketCanBeSingleton(e) { return e.id != u && 0 != e.id; } AddToSingletons(e, t) { (0, h.X)(!e.bFlatList, "Adding to singletons in flat list"), e.groupSingletons.SortedInsert(t); } RemoveFromSingletons(e, t) { return (0, h.X)(!e.bFlatList, "Removing from singletons in flat list"), e.groupSingletons.Remove(t); } GetBucketIdForPlayer(e, t, n) { if (e.bFlatList) return 0; let i = this.m_mapGroupBeacons.get(n); if (i) { if ( i.find(function (e) { return e.account_id == t.accountid; }) ) return u; } if (t.persona.is_ingame) { if (t.persona.is_in_nonsteam_game) return p; return t.persona.m_unGamePlayedAppID; } return t.persona.m_broadcastAppId ? t.persona.m_broadcastAppId : 0; } RemoveMemberFromBucket(e, t, n) { if (t == p) return this.RemoveFromSingletons(e, n), !0; let i = e.mapBuckets.get(t); return !(!i || !i.Remove(n)) && (0 == i.member_list.length ? (this.RemoveFromSingletons(e, n), this.LOG("Deleting bucket", t), e.mapBuckets.delete(t)) : 1 == i.member_list.length && !e.bFlatList && this.BucketCanBeSingleton(i) && (this.LOG("Removing member, adding", i.member_list[0].accountid, "to singletons"), this.AddToSingletons(e, i.member_list[0])), !0); } AddUserAndFireCallback(e, t, n) { let i = s.Ul.FriendStore.GetPlayer(t), o = this.GetBucketIdForPlayer(e, i, n); this.AddMemberToBucketID(e, o, i), this.FireMemberListChanged(e); } OnMemberAdded(e, t) { let n = this.m_mapGroupBuckets.get(e); n && this.AddUserAndFireCallback(n, t, e); } OnMemberRemoved(e, t) { let n = this.m_mapGroupBuckets.get(e); if (n) { for (let e of Array.from(n.mapBuckets.keys())) if (this.RemoveMemberFromBucket(n, e, t)) return void this.FireMemberListChanged(n); this.RemoveMemberFromBucket(n, p, t) && this.FireMemberListChanged(n); } } } (0, i.gn)([r.ak], C.prototype, "ListenForSettingsChanges", null), (0, i.gn)([r.ak], C.prototype, "OnPlayerGameChanged", null), (0, i.gn)([r.ak], C.prototype, "OnPersonaStateChanged", null), (0, i.gn)([r.ak], C.prototype, "OnPartyBeaconsUpdated", null); }, 24292: (e, t, n) => { "use strict"; n.d(t, { NX: () => _, rO: () => g, x5: () => p }); var i = n(85556), o = n(19411), r = n(27378), a = n(79588), s = n(19953), l = n(90729), c = n(2049), m = n(13106), d = n(9824), h = n(37234), u = n(72746); class p { constructor() { this.m_mapHovers = new WeakMap(); } GetHover(e) { let t = this.m_mapHovers.get(e); return t || ((t = new g(e)), this.m_mapHovers.set(e, t)), t; } } class _ { constructor() { (this.visible = void 0), (0, a.rC)(this); } } (0, i.gn)([a.LO], _.prototype, "visible", void 0); class g { constructor(e) { this.m_friend = e; } get friend() { return this.m_friend; } get persona() { return this.m_friend.persona; } GetInstance(e, t = !1) { if (this.m_rgInstances) for (let t of this.m_rgInstances) if (t.m_OwningElement == e) return t; if (t) { let t = new _(); return (t.m_OwningElement = e), (t.visible = !1), (t.hover = this), this.m_rgInstances ? this.m_rgInstances.push(t) : (this.m_rgInstances = [t]), t; } return null; } ShowPopup(e, t, n) { (t.visible = !0), t.m_OwningElement.ownerDocument.defaultView.setTimeout(() => { t.visible && (t.popupWindow || (t.popupWindow = new o.zd(e, t, n)), t.popupWindow.Show()); }, 250), (t.m_BlurHandler = () => { this.HideByElement(t.m_OwningElement); }), t.m_OwningElement.ownerDocument.defaultView.addEventListener("blur", t.m_BlurHandler), (t.m_VisibilityHandler = (e) => { "hidden" === e.target.visibilityState && this.HideByElement(t.m_OwningElement); }), t.m_OwningElement.ownerDocument.addEventListener("visibilitychange", t.m_VisibilityHandler); } Show(e, t, n) { let i = e.currentTarget.ownerDocument.defaultView.innerWidth < 500; if (i && !s.De.IN_CLIENT) return; if (h.g_FriendsUIDesktopApp.DragDropManager.BInDrag()) return; this.friend.miniProfileData.EnsureCommunityDataLoaded(); let a = e.currentTarget, l = (0, h.Um)(null, e), c = this.GetInstance(a, !0); c.context = t; let m = !1; if (s.De.IN_CLIENT) { let e = u.Ul.UIStore.GetPerContextChatData(l); m = e.BUsePopups(); } if (i && m) this.ShowPopup(a, c, l); else { let e = r.createElement(o.yd, { hoverInstance: c, target: a, direction: n, onNoSpace: () => { m && this.ShowPopup(a, c, l); }, }); g.m_embeddedElements.ShowElementDelayed(a.ownerDocument, 250, e, c).then(() => { c.visible = !0; }); } } Hide(e) { this.HideByElement(e.currentTarget); } HideByElement(e) { let t = this.GetInstance(e); if (t) { if (((t.visible = !1), t.m_BlurHandler && (e.ownerDocument.defaultView.removeEventListener("blur", t.m_BlurHandler), (t.m_BlurHandler = null)), t.m_VisibilityHandler && (e.ownerDocument.removeEventListener("visibilitychange", t.m_VisibilityHandler), (t.m_VisibilityHandler = null)), t.popupWindow && !t.popupWindow.BIsClosed())) { let n = t.popupWindow, i = () => { n.BIsClosed() || n.Close(); }; e.ownerDocument.defaultView.addEventListener("unload", i), e.ownerDocument.defaultView.setTimeout(() => { e.ownerDocument.defaultView.removeEventListener("unload", i), i(); }, 100); } else g.m_embeddedElements.HideElement(t.m_OwningElement.ownerDocument, t, 500); d.Zf(this.m_rgInstances, t); } } OnContextMenu(e, t) { let n = (0, m.$W)((0, h.Um)(null, t), e, this.m_friend, t); return this.Hide(t), n; } HideAllInstances() { if (this.m_rgInstances) for (let e of this.m_rgInstances.slice()) this.HideByElement(e.m_OwningElement); } get data_loader() { return this.m_friend.miniProfileData; } } (g.m_embeddedElements = new l.AN("CFriendHoverContainer")), (0, i.gn)([c.ak], g.prototype, "Show", null), (0, i.gn)([c.ak], g.prototype, "Hide", null), (0, i.gn)([c.ak], g.prototype, "OnContextMenu", null); }, 96119: (e, t, n) => { "use strict"; n.d(t, { r0: () => I, lV: () => b, ou: () => v, yf: () => S }); var i = n(85556), o = n(19953), r = n(72746), a = n(79588), s = n(57476), l = n(9824), c = n(84290); let m = 0; class d { constructor(e) { (this.m_id = void 0), (this.m_vecTabs = a.LO.array(null, { deep: !1 })), (this.m_activeTab = void 0), (0, a.rC)(this), (this.m_id = m++), (this.m_browserContext = e), (this.m_activeTab = void 0); } GetBrowserContext() { return this.m_browserContext; } GetTitle() { return this.m_activeTab ? (2 == this.tabCount ? (0, c.Xx)("#WindowTitle_ChatTabTitle", this.m_activeTab.GetTabName()) : this.tabCount > 2 ? (0, c.Xx)("#WindowTitle_ChatTabTitlePlural", this.m_activeTab.GetTabName(), this.tabCount - 1) : this.m_activeTab.GetTabName()) : ""; } OnWindowFocus() { this.m_activeTab && this.m_activeTab.OnTabFocus(); } FocusActiveTab() { this.m_activeTab && this.m_activeTab.OnTabFocus(); } get tabs() { return this.m_vecTabs; } get tabCount() { return this.m_vecTabs.length; } get activeTab() { return this.m_activeTab; } GetTabSetIdentifier() { return this.m_vecTabs.map((e) => e.GetUniqueID()).join("_"); } GetTabForChat(e) { for (let t of this.m_vecTabs) if (t.IsTabForChat(e)) return t; return null; } GetTabByUniqueID(e) { for (let t of this.m_vecTabs) if (t.GetUniqueID() == e) return t; return null; } BHasTab(e) { return -1 !== this.m_vecTabs.indexOf(e); } AddTab(e) { -1 == this.m_vecTabs.indexOf(e) && (this.m_vecTabs.push(e), !this.m_activeTab && this.m_vecTabs.length > 0 && (this.m_activeTab = this.m_vecTabs[0])); } ActivateTab(e) { -1 != this.m_vecTabs.indexOf(e) ? (this.activeTab && this.activeTab != e && this.activeTab.OnTabDeactivate(), (this.m_activeTab = e), e.OnTabActivate(), this.Focus(), (0, s.U5)("Messaging.RegisterForMessages") && SteamClient.Messaging.PostMessage("FriendsUI", "ChatTabActivated", JSON.stringify({ id: e.GetUniqueID() }))) : console.log("Tab not found"); } ActivateNextTab() { let e = this.m_vecTabs.indexOf(this.m_activeTab); (e = (e + 1) % this.m_vecTabs.length), this.ActivateTab(this.m_vecTabs[e]); } ActivatePreviousTab() { let e = this.m_vecTabs.indexOf(this.m_activeTab); (e = (e + this.m_vecTabs.length - 1) % this.m_vecTabs.length), this.ActivateTab(this.m_vecTabs[e]); } DeactivateTab(e) { -1 !== this.m_vecTabs.indexOf(e) ? this.activeTab && this.activeTab === e && (e.OnTabDeactivate(), (this.m_activeTab = void 0)) : console.log("Tab not found"); } RemoveTab(e) { let t = this.m_vecTabs.indexOf(e); if (-1 == t) return !1; let n = e && e == this.m_activeTab; if ((this.m_vecTabs.splice(t, 1), n)) if (this.m_vecTabs.length) { let e; for (let t of this.m_vecTabs) (!e || t.GetTimeLastActivate() > e.GetTimeLastActivate()) && (e = t); this.m_activeTab = e || this.m_vecTabs[Math.max(t - 1, 0)]; } else this.m_activeTab = void 0; return 0 == this.m_vecTabs.length && r.Ul.UIStore.CloseTabSet(this), !0; } MoveTabAfter(e, t) { let n = this.m_vecTabs.indexOf(t); -1 != n && this.MoveTabToIndex(e, n + 1); } MoveTabToIndex(e, t) { let n = this.m_vecTabs.indexOf(e); -1 != n && l.hV(this.m_vecTabs, n, Math.min(t, this.m_vecTabs.length - 1)); } Focus() { r.Ul.UIStore.FocusTabSet(this); } OnPopupClosed(e) { e && r.Ul.UIStore.SetSuppressBrowserContextBroadcasting(!0), this.CloseAllTabs(), r.Ul.UIStore.OnTabSetClosed(this), e && r.Ul.UIStore.SetSuppressBrowserContextBroadcasting(!1); } CloseAllTabs() { this.m_activeTab = void 0; for (let e of this.m_vecTabs) r.Ul.UIStore.CloseTab(this.m_browserContext, e, !0); this.m_vecTabs.clear(); } get is_popup_active() { return r.Ul.UIStore.BIsTabSetActive(this); } get is_popup_visible() { return r.Ul.UIStore.BIsTabSetVisible(this); } get is_popup_focused() { return r.Ul.UIStore.BIsTabSetFocused(this); } Serialize() { let e = []; for (let t of this.m_vecTabs) { t.GetUniqueID().startsWith("br") || e.push(t.GetUniqueID()); } return { tabs: e, active_tab: this.activeTab && this.activeTab.GetUniqueID() }; } } (0, i.gn)([a.LO], d.prototype, "m_id", void 0), (0, i.gn)([a.LO], d.prototype, "m_activeTab", void 0), (0, i.gn)([a.aD], d.prototype, "AddTab", null), (0, i.gn)([a.aD], d.prototype, "ActivateTab", null), (0, i.gn)([a.aD], d.prototype, "ActivateNextTab", null), (0, i.gn)([a.aD], d.prototype, "ActivatePreviousTab", null), (0, i.gn)([a.aD], d.prototype, "DeactivateTab", null), (0, i.gn)([a.aD], d.prototype, "RemoveTab", null), (0, i.gn)([a.aD], d.prototype, "OnPopupClosed", null), (0, i.gn)([a.aD], d.prototype, "CloseAllTabs", null); var h = n(84446), u = n(34294), p = n(93635), _ = n(22394), g = n(2049), C = n(10553); const f = "ChatStorePopupState"; var v, S; !(function (e) { (e[(e.Favorites = 0)] = "Favorites"), (e[(e.FriendsList = 1)] = "FriendsList"), (e[(e.GroupChats = 2)] = "GroupChats"), (e[(e.RecentMessages = 3)] = "RecentMessages"), (e[(e.FirstTab = 0)] = "FirstTab"), (e[(e.MaxTab = 3)] = "MaxTab"); })(v || (v = {})); class b { GetRootChatPerContextData() { return this.GetPerContextChatData(r.D); } constructor(e) { (this.m_bRestoredPopupState = !1), (this.m_vecShowGroupsAfterRestorePopup = []), (this.m_iLastChatPopupID = 0), (this.m_mapChatBrowserContexts = new Map()), (this.m_bSuppressBrowserContextBroadcasting = !1), (this.m_bParentalLocked = void 0), (this.m_stateToRestoreFrom = void 0), (this.m_bRestoringPopups = !1), (this.m_bShuttingDown = !1), (this.m_bTheaterMode = !1), (this.m_mapFriendChatBroadcastVisible = new Map()), (this.m_nTabActivationCount = 0), (this.m_bShowWinterSaleUI = !1), (this.m_eFriendsListSteamDeckActiveTab = v.FriendsList), (this.m_FriendsListSteamDeckActiveTabCallbackList = new _.pB()), (this.m_overlayCreatedCallbackList = new _.pB()), (0, a.rC)(this), (this.m_chatStore = e); } Init() { r.Ul.AddPopupManagerShutdownCallback(() => { this.SerializePopupState(), (this.m_bShuttingDown = !0); }), (0, a.EH)(() => { let e = r.Ul.ParentalStore.BIsFriendsBlocked() || r.Ul.SettingsStore.IsSteamInTournamentMode(); this.OnFriendsParentalLockChanged(e); }), this.StartWinterSaleCountdown(); } OnFriendsParentalLockChanged(e) { !1 === this.m_bParentalLocked && e ? (this.SerializePopupState(!0), this.m_mapChatBrowserContexts.forEach((e) => { e.CloseAllPopups(); }), (this.m_bRestoredPopupState = !1)) : !0 !== this.m_bParentalLocked || e || this.RestorePopupState(), (this.m_bParentalLocked = e); } ShowFriendChatDialog(e, t, n = !0, i = !0) { let o = this.m_chatStore.GetFriendChat(t); return n && o && this.ShowAndOrActivateChat(e, o, i), o; } ShowFriendChatDialogWhenReady(e, t, n = !0, i = !0) { this.ShowFriendChatDialog(e, t, n, i); } ShowFriendChatDialogAndStartVoice(e, t) { let n = this.ShowFriendChatDialog(e, t, !0, !0); return n.BVoiceActive() || n.ToggleVoiceChat(), n; } ShowAndOrActivateChat(e, t, n) { if (t instanceof h.K) { let i = this.m_chatStore.GetChatRoomGroup(t.GetParentGroupID()); if (!i) return (0, p.X)(!1, "Can't find group for chat room "), null; let o = this.ShowAndOrActivateChatRoomGroup(e, i, n); return o && o.SelectChat(t.GetRoomID()), o; } let i = this.ShowAndOrActivateTabByID(e, t.unique_id, n); return null == i ? void 0 : i.GetChatView(); } ShowAndOrActivateChatForTabset(e, t, n) { let i = e.GetTabForChat(t); i || this.CreateNewTabFromUniqueID(e, t.unique_id, !1), n && e.ActivateTab(i); } IsChatRoomGroupActive(e, t) { let n = this.GetPerContextChatData(e), i = this.GetTabSetByUniqueID(n, t.unique_id); return !!i && i.tabSet.activeTab == i.tab; } SetTheaterMode(e) { this.m_bTheaterMode = e; } GetTheaterMode() { return this.m_bTheaterMode; } SetFriendBroadcastVisible(e, t) { this.m_mapFriendChatBroadcastVisible.set(e, t); } IsFriendBroadcastVisible(e) { return this.m_mapFriendChatBroadcastVisible.get(e); } ShowAndOrActivateChatRoomGroup(e, t, n) { return t.BIsCurrentUserAMember() ? this.ShowAndOrActivateTabByID(e, t.unique_id, n) : (console.log("Failed to activate", t, "- user is not a member."), null); } ShowAndOrActivateChatRoomGroupWhenReady(e, t, n) { this.ShowAndOrActivateChatRoomGroup(e, t, n); } ShowUnackedGroup(e) { var t; this.m_bRestoredPopupState ? this.ShowAndOrActivateChatRoomGroup(null !== (t = null === r.Ul || void 0 === r.Ul ? void 0 : r.Ul.GetDefaultBrowserContext()) && void 0 !== t ? t : r.D, e, !1) : this.m_vecShowGroupsAfterRestorePopup.push(e); } ShowOrActivateBroadcast(e, t, n) { let i = "br" + t; return this.ShowAndOrActivateTabByID(e, i, n); } CloseTabByID(e, t) { t ? this.CloseTabByIDInContext(t, e) : this.m_mapChatBrowserContexts.forEach((t) => { this.CloseTabByIDInContext(t.browser_context, e); }); } ReplaceFriendChatWithGroup(e, t, n) { let i = this.GetPerContextChatData(e), o = this.GetTabSetByUniqueID(i, n.unique_id); o || (this.ShowAndOrActivateChatRoomGroup(e, n, !0), (o = this.GetTabSetByUniqueID(i, n.unique_id))), (0, p.X)(o, "Failed to find group tab"); let r = this.GetTabSetByUniqueID(i, t.chat.unique_id); if (!r) return; let a = o.tab, s = r.tabSet; o.tabSet != s && (o.tabSet.RemoveTab(a), s.AddTab(a)), s.MoveTabAfter(a, t), this.CloseTab(e, t), this.ShowAndOrActivateChatRoomGroup(e, n, !0); } ForEachTabSet(e, t) { e.IsFriendsListSingleWindow() && e.default_tabset.tabCount > 0 && t(e.default_tabset); for (let n of Array.from(e.popup_list)) t(n.tab_set); } CloseTab(e, t, n = !1) { let i = this.GetPerContextChatData(e); this.ForEachTabSet(i, (o) => { o.BHasTab(t) && (n || o.RemoveTab(t), t.IsVoiceActive() && r.Ul.ShowCloseActiveVoiceConfirmation(e, i.GetPopupForTabSet(o))); }), this.BroadcastCloseTabToAllBrowserContexts(e, t.GetUniqueID()), t.OnTabClosed(), i.IsFriendsListSingleWindow() && 0 == i.default_tabset.tabCount && (i.responsive_window_state.SetActiveView(S.FriendsList), this.SetTheaterMode(!1), i.SetFriendsListCollapsed(!1)), r.Ul.UIStore.SerializePopupState(); } GetResponsiveWindowState(e) { return this.GetPerContextChatData(e).responsive_window_state; } CloseTabByIDInContext(e, t) { let n = this.GetPerContextChatData(e), i = this.GetTabSetByUniqueID(n, t); i && (i.tabSet.RemoveTab(i.tab), i.tab.OnTabClosed(), this.BroadcastCloseTabToAllBrowserContexts(e, t)); } ShowAndOrActivateTabByID(e, t, n = !0) { let i, o = this.GetPerContextChatData(e), a = this.GetTabSetByUniqueID(o, t); if (a) n && a.tabSet.ActivateTab(a.tab), (i = a.tab); else { let a = r.Ul.SettingsStore.BAlwaysShowChatsInNewWindow(); if (!o.BUsePopups() || (!a && o.default_tabset.is_popup_active)) i = this.CreateNewTabFromUniqueID(o.default_tabset, t, n); else { let s; if (((s = a && 0 != o.default_tabset.tabCount ? new d(e) : o.default_tabset), (i = this.CreateNewTabFromUniqueID(s, t, n)), !i)) return null; let l = s == o.default_tabset; if (l && o.IsFriendsListSingleWindow()) r.Ul.ShowPopupFriendsList(e, !n, n); else if (!l || (!o.IsFriendsListSingleWindow() && !s.is_popup_active)) { const t = !(0, C.Uy)() && !n; let i = r.Ul.CreateChatPopup(e, this.GetNextChatPopupID(), s, void 0, void 0, t); i.Show(n), o.AddPopup(s, i), this.SerializePopupState(); } } } return i && n && o.responsive_window_state.SetActiveView(S.Chat), r.Ul.UIStore.SerializePopupState(), n && this.m_nTabActivationCount++, i; } GetTabSetByUniqueID(e, t) { if (!e) return null; let n = e.GetTabSetForId(t); return n ? { tabSet: n, tab: n.GetTabByUniqueID(t) } : null; } BIsTabSetActive(e) { let t = this.GetPerContextChatData(e.GetBrowserContext()); if (t) return t.BIsTabSetActive(e); } BIsTabSetVisible(e) { let t = this.GetPerContextChatData(e.GetBrowserContext()); if (t) return t.BIsTabSetVisible(e); } BIsTabSetFocused(e) { let t = this.GetPerContextChatData(e.GetBrowserContext()); if (t) return t.BIsTabSetFocused(e); } GetAppContainerForChat(e) { let t = this.GetRootChatPerContextData(), n = null; if (e instanceof h.K) { let i = this.m_chatStore.GetChatRoomGroup(e.GetParentGroupID()); i && (n = this.GetTabSetByUniqueID(t, i.unique_id)); } else n = this.GetTabSetByUniqueID(t, e.unique_id); if (!n || !n.tabSet) return null; let i = t.GetPopupForTabSet(n.tabSet); return i ? (i.popup ? i.popup.container : null) : t.IsTabSetInFriendListWindow(n.tabSet) ? t.friends_list_window : null; } FlashChatWindow(e, t) { let n = this.GetAppContainerForChat(e); n && !n.BIsClosed() && n.FlashWindow(t); } IsChatWindowMinimized(e) { let t = this.GetAppContainerForChat(e); return !t || t.BIsClosed() ? Promise.resolve(!1) : t.IsMinimized(); } GetContextKey(e) { return (0, r.ns)(e, r.D) && 4 !== e.m_eUIMode ? "ROOT" : `${e.m_unPID}/${e.m_eUIMode}`; } GetPerContextChatData(e) { (0, p.X)(r.Ul.ready_to_render || this.m_bRestoringPopups, "GetPerContextChatData called before ready", e); const t = this.GetContextKey(e); let n = this.m_mapChatBrowserContexts.get(t); if (!n) { let i = r.Ul.BIsValidBrowserContext(e); (n = new E(e)), i && ((0, p.X)(0 == e.m_unPID || void 0 !== e.m_eUIMode, "GetPerContextChatData - creating context for browser where uimode is undefined! This can cause problems in other places!"), this.m_mapChatBrowserContexts.set(t, n)); } return n; } BHasPerContextChatData(e) { const t = this.GetContextKey(e); return this.m_mapChatBrowserContexts.has(t); } GetAllBrowserContexts() { let e = []; return this.m_mapChatBrowserContexts.forEach((t) => e.push(t.browser_context)), e; } GetDefaultTabSetForContext(e) { return this.GetPerContextChatData(e).default_tabset; } OnOverlayBrowserCreated(e, t, n) { this.m_overlayCreatedCallbackList.Dispatch(e); let i = this.GetPerContextChatData(e); if (!i) return; i.SetScreenInfo(t, n), i.SetFriendsListSingleWindowMode(r.Ul.SettingsStore.BSingleWindowModeEnabled()); let o = this.GetRootChatPerContextData(); o && (i.IsFriendsListSingleWindow() || this.ForEachTabSet(o, (e) => { let t = new d(i.browser_context); e.tabs.forEach((n) => { let i = e.activeTab == n; this.CreateNewTabFromUniqueID(t, n.GetUniqueID(), i); }); let n = r.Ul.CreateChatPopup(i.browser_context, this.GetNextChatPopupID(), t, void 0, void 0, !1); n.Show(!1), i.AddPopup(t, n); })); } RegisterForOverlayCreated(e) { const { Unregister: t } = this.m_overlayCreatedCallbackList.Register(e); return t; } OnOverlayBrowserChanged(e, t, n) { var i; const o = Object.assign(Object.assign({}, e), { m_eUIMode: null !== (i = e.m_eUIMode) && void 0 !== i ? i : r.Ul.IsGamepadUIActive() ? 4 : 0 }); let a = this.GetPerContextChatData(o); a && a.SetScreenInfo(t, n); } OnOverlayBrowserClosed(e) { let t = this.GetPerContextChatData(e); if (!t) return; (0, p.X)(e.m_nBrowserID == t.browser_context.m_nBrowserID, "Mismatch found in OnOverlayBrowserClosed"); const n = this.GetContextKey(e); if ((this.m_mapChatBrowserContexts.delete(n), e.m_unPID)) for (const t of this.m_mapChatBrowserContexts.keys()) t.startsWith(e.m_unPID.toString()) && this.m_mapChatBrowserContexts.delete(t); } BShouldSuppressBrowserContextBroadcasting(e) { return !!o.De.IN_CHROMEOS || !!this.m_bSuppressBrowserContextBroadcasting || !this.BHasPerContextChatData(e); } SetSuppressBrowserContextBroadcasting(e) { this.m_bSuppressBrowserContextBroadcasting = e; } BroadcastNewTabToAllBrowserContexts(e, t) { this.BShouldSuppressBrowserContextBroadcasting(e) || (this.SetSuppressBrowserContextBroadcasting(!0), this.m_mapChatBrowserContexts.forEach((n) => { if ((0, r.ns)(n.browser_context, e)) return; if (4 == e.m_eUIMode && n.browser_context.m_eUIMode !== e.m_eUIMode) return; let i = !(0, r.ns)(n.browser_context, r.D); this.ShowAndOrActivateTabByID(n.browser_context, t, i); }), this.SetSuppressBrowserContextBroadcasting(!1)); } BroadcastCloseTabToAllBrowserContexts(e, t) { if (this.BShouldSuppressBrowserContextBroadcasting(e)) return; if ((0, r.ns)(e, r.D)) return void this.BroadcastCloseTabToAllBrowserContexts_Internal(e, t); let n = this.GetPerContextChatData(e); n && (0, r.ns)(e, n.browser_context) && this.BroadcastCloseTabToAllBrowserContexts_Internal(e, t); } BroadcastCloseTabToAllBrowserContexts_Internal(e, t) { this.BShouldSuppressBrowserContextBroadcasting(e) || (this.SetSuppressBrowserContextBroadcasting(!0), this.m_mapChatBrowserContexts.forEach((n) => { (0, r.ns)(n.browser_context, e) || this.CloseTabByIDInContext(n.browser_context, t); }), this.SetSuppressBrowserContextBroadcasting(!1)); } CreateNewTabFromUniqueID(e, t, n, i = !1) { let o = r.Ul.CreateNewTabFromUniqueID(e, t, this.m_bRestoringPopups, i); return o ? (e.AddTab(o), this.BroadcastNewTabToAllBrowserContexts(e.GetBrowserContext(), t), n && e.ActivateTab(o), o) : null; } GetNextChatPopupID() { return "ChatWindow_" + this.m_iLastChatPopupID++; } BIsFriendsListSingleWindow(e) { let t = this.GetPerContextChatData(e); return !t.BUsePopups() || t.IsFriendsListSingleWindow(); } BIsFriendsListEmbedded(e) { return this.GetPerContextChatData(e).BIsFriendsListEmbedded(); } BIsFriendsListCollapsed(e) { let t = this.GetPerContextChatData(e); return t.IsFriendsListSingleWindow() && t.IsFriendsListCollapsed(); } SetFriendsListCollapsed(e, t) { this.GetPerContextChatData(e).SetFriendsListCollapsed(t); } ConvertDefaultTabSetToPopup(e) { let t = this.GetPerContextChatData(e); if (t.default_tabset.tabCount) { let n = t.GetPopupForTabSet(t.default_tabset); return n || ((n = r.Ul.CreateChatPopup(e, this.GetNextChatPopupID(), t.default_tabset, t.cached_popup_window_restore_details, void 0, !1)), n.Show(!(0, r.ns)(e, r.D)), t.AddPopup(t.default_tabset, n), this.SerializePopupState(), t.friends_list_window && (t.friends_list_window.BringToFront(), (t.friends_list_window.title = (0, c.Xx)("#WindowTitle_FriendsList"))), n); } return null; } ConvertDefaultTabSetToEmbedded(e) { let t = this.GetPerContextChatData(e), n = t.GetPopupForTabSet(t.default_tabset); n && (n.popup.GetWindowRestoreDetails().then((e) => { t.SetCachedDefaultPopupDimensions(e); }), t.RemovePopupForTabSet(t.default_tabset), this.SerializePopupState(), n.ClearTabSet(), n.popup.Close()); } MergeTabSets(e) { const t = this.GetPerContextChatData(e); this.ForEachTabSet(t, (e) => { e !== t.default_tabset && e.tabs.forEach((n) => { e.RemoveTab(n), t.default_tabset.AddTab(n); }); }); } OnTabSetResized(e) { let t = this.GetPerContextChatData(e.GetBrowserContext()); if (e == t.default_tabset && !t.IsFriendsListSingleWindow()) { let n = t.GetPopupForTabSet(e); n && n.popup.GetWindowRestoreDetails().then((e) => { t.SetCachedDefaultPopupDimensions(e); }); } } CloseTabSet(e) { let t = this.GetPerContextChatData(e.GetBrowserContext()), n = t.GetPopupForTabSet(e); n && n.popup.Close(), t.RemovePopupForTabSet(e), this.SerializePopupState(); } OnTabSetClosed(e) { this.GetPerContextChatData(e.GetBrowserContext()).RemovePopupForTabSet(e), this.SerializePopupState(); } FocusTabSet(e) { let t = this.GetPerContextChatData(e.GetBrowserContext()), n = t.GetPopupForTabSet(e); n && n.popup && !n.popup.container.BIsClosed() ? n.popup.container.BringToFront() : t.IsTabSetInFriendListWindow(e) && t.IsFriendsListSingleWindow() && (t.BUsePopups() ? r.Ul.ShowPopupFriendsList(t.browser_context, !1, !0) : t.friends_list_window && t.friends_list_window.BringToFront()); } MoveTabToNewPopup(e, t, n, i) { (0, p.X)(e, "browserContext"); let o = this.GetPerContextChatData(e); this.ForEachTabSet(o, (e) => e.RemoveTab(t)); let a = new d(e); a.AddTab(t); let s = r.Ul.CreateChatPopup(e, this.GetNextChatPopupID(), a, i, n, !1); if ((s.Show(!0), i)) { let e = s.popup.GetWindow(); try { e.SteamClient.Window.PositionWindowRelative(i, n.left, n.top, n.width, n.height); } catch (e) { console.error(e); } } o.AddPopup(a, s), this.SerializePopupState(); } SerializePopupState(e = !1) { if (!this.m_bRestoredPopupState || !r.Ul.SettingsStore.BReady()) return; if (this.m_bShuttingDown) return; let t = this.SerializePopupStateToObject(e); r.Ul.SettingsStore.StoreObjectInLocalStorage(f, t); } SerializePopupStateToObject(e) { let t = this.GetPerContextChatData(r.D), n = { window_restore_details: t.cached_popup_window_restore_details, defaultTabs: void 0, popupTabs: void 0, bFriendsListVisible: !1, always_restore: e, bFriendsListCollapsed: t.IsFriendsListCollapsed() }; t.default_tabset && t.default_tabset.tabCount > 0 && (n.defaultTabs = t.default_tabset.Serialize()); let i = []; for (let e of Array.from(t.popup_list)) e.tab_set != t.default_tabset && i.push(e.tab_set.Serialize()); return i.length > 0 && (n.popupTabs = i), (n.bFriendsListVisible = !!t.friends_list_window), n; } BRestorePopups() { return r.Ul.SettingsStore.BAlwaysShowChatsInNewWindow(); } BRestoreOpenChats() { return r.Ul.SettingsStore.FriendsSettings.bRememberOpenChats; } DeserializeIntoTabSet(e, t) { if (t.tabs && Array.isArray(t.tabs)) for (let n of t.tabs) n.startsWith("br") || this.CreateNewTabFromUniqueID(e, n, n == t.active_tab, !0); } SetStateToRestoreFrom(e) { this.m_stateToRestoreFrom = e; } RestorePopupState() { return (0, i.mG)(this, void 0, void 0, function* () { if (r.Ul.IsGamepadUIActive()) return; if (((0, p.X)(!this.m_bRestoredPopupState, "Second restore popup state"), (0, p.X)(!this.m_bRestoringPopups, "RestorePopupState called while already restoring"), r.Ul.ParentalStore.BIsFriendsBlocked() || r.Ul.SettingsStore.IsSteamInTournamentMode())) return; if (((this.m_bRestoringPopups = !0), this.m_stateToRestoreFrom)) return this.RestoreFromStateObject(this.m_stateToRestoreFrom, !1), (this.m_stateToRestoreFrom = void 0), void (this.m_bRestoringPopups = !1); let e = yield r.Ul.SettingsStore.GetObjectFromLocalStorageWhenReady(f), t = !1; "undefined" != typeof SteamClient && SteamClient.WebChat && SteamClient.WebChat.BSuppressPopupsInRestore && (t = yield SteamClient.WebChat.BSuppressPopupsInRestore()), this.RestoreFromStateObject(e, t), (this.m_bRestoringPopups = !1); }); } RestoreFromStateObject(e, t) { let n = this.GetPerContextChatData(r.D); if (((0, p.X)(n.BIsEmpty(), "Restoring to non-empty context", n), n.BIsEmpty())) { if ((e.window_restore_details && n.SetCachedDefaultPopupDimensions(e.window_restore_details), void 0 !== e.bFriendsListSingleWindow && r.Ul.SettingsStore.BackfillSingleWindowMode(e.bFriendsListSingleWindow), n.SetFriendsListSingleWindowMode(r.Ul.SettingsStore.BSingleWindowModeEnabled()), n.SetFriendsListCollapsed(!!e.bFriendsListCollapsed), !t && (e.always_restore || this.BRestoreOpenChats()))) { if (e.defaultTabs) { let t = n.default_tabset; if ((this.DeserializeIntoTabSet(t, e.defaultTabs), t.tabCount > 0 && !n.IsFriendsListSingleWindow())) { let e = r.Ul.CreateChatPopup(r.Ul.GetDefaultBrowserContext(), this.GetNextChatPopupID(), t, void 0, void 0, !1); n.AddPopup(t, e), e.Show(!1); } } if (e.popupTabs) for (let t of e.popupTabs) { let e = new d(r.D); if ((this.DeserializeIntoTabSet(e, t), e.tabCount > 0)) { let t = r.Ul.CreateChatPopup(r.Ul.GetDefaultBrowserContext(), this.GetNextChatPopupID(), e, void 0, void 0, !1); n.AddPopup(e, t), t.Show(!1); } } } if (!t) { let t = !e || void 0 === e.bFriendsListVisible || e.bFriendsListVisible; n.BUsePopups() && r.Ul.ShowPopupFriendsListAtStartup(t); for (let e of this.m_vecShowGroupsAfterRestorePopup) this.ShowAndOrActivateChatRoomGroup(r.D, e, !1); } (this.m_vecShowGroupsAfterRestorePopup = []), (this.m_bRestoredPopupState = !0), this.m_chatStore.OnRestorePopupsComplete(); } } ResetHasRestoredPopupState() { return (0, i.mG)(this, void 0, void 0, function* () { this.m_bRestoredPopupState = !1; }); } RestorePopupStateForMobile() { this.m_bRestoringPopups = !0; this.GetPerContextChatData(r.D).SetFriendsListSingleWindowMode(!0), (this.m_bRestoringPopups = !1); } FillInChatUsabilityMetrics(e) { let t = this.GetPerContextChatData(r.D); e.ui_state().set_friends_list_docked(t.IsFriendsListSingleWindow()), e.ui_state().set_friends_list_visible(t.friends_list_window && !t.friends_list_window.BIsClosed()), e.ui_state().set_chat_popups_opened(Array.from(t.popup_list).length), e.ui_state().set_friends_list_collapsed(t.IsFriendsListCollapsed()); let n = 0, i = 0; (n += l.W(t.default_tabset.tabs, (e) => e.IsChatRoom())), (i += l.W(t.default_tabset.tabs, (e) => e.IsFriendChat())); for (let e of Array.from(t.popup_list)) e.tab_set != t.default_tabset && ((n += l.W(e.tab_set.tabs, (e) => e.IsChatRoom())), (i += l.W(e.tab_set.tabs, (e) => e.IsFriendChat()))); e.ui_state().set_group_chat_tabs_opened(n), e.ui_state().set_friend_chat_tabs_opened(i); } get show_winter_sale_ui() { return this.m_bShowWinterSaleUI; } StartWinterSaleCountdown() { const e = 15767784e5; Date.now() >= e ? (this.m_bShowWinterSaleUI = !0) : setTimeout(() => this.StartWinterSaleCountdown(), e - Date.now()); } get FriendsListSteamDeckActiveTab() { return this.m_eFriendsListSteamDeckActiveTab; } set FriendsListSteamDeckActiveTab(e) { if (e == this.m_eFriendsListSteamDeckActiveTab) return; let t = this.m_eFriendsListSteamDeckActiveTab; (this.m_eFriendsListSteamDeckActiveTab = e), this.m_FriendsListSteamDeckActiveTabCallbackList.Dispatch(t, e); } SelectFriendsListSteamDeckSiblingTab(e) { let t = this.m_eFriendsListSteamDeckActiveTab + e; t >= 0 && t <= v.MaxTab && (this.FriendsListSteamDeckActiveTab = t); } FriendsListSteamDeckActiveTabCallbackList() { return this.m_FriendsListSteamDeckActiveTabCallbackList; } } (0, i.gn)([a.LO], b.prototype, "m_bTheaterMode", void 0), (0, i.gn)([a.LO], b.prototype, "m_mapFriendChatBroadcastVisible", void 0), (0, i.gn)([a.LO], b.prototype, "m_nTabActivationCount", void 0), (0, i.gn)([a.LO], b.prototype, "m_bShowWinterSaleUI", void 0), (0, i.gn)([a.aD], b.prototype, "OnFriendsParentalLockChanged", null), (0, i.gn)([r.IN], b.prototype, "ShowFriendChatDialogWhenReady", null), (0, i.gn)([r.IN], b.prototype, "ShowAndOrActivateChatRoomGroupWhenReady", null), (0, i.gn)([g.ak], b.prototype, "SerializePopupState", null); class I { constructor(e, t) { (this.m_bShown = !1), (this.m_popup = e), (this.m_chatPopup = t); } Show(e) { this.m_popup.Show(e), this.m_bShown || (this.m_bShown = !0); } get popup() { return this.m_popup; } get tab_set() { return this.m_chatPopup.tab_set; } ClearTabSet() { this.m_chatPopup.ClearTabSet(); } IsSameBrowserContext(e) { let t = this.m_popup.GetBrowserContext() || r.D; return e.m_nBrowserID == t.m_nBrowserID && e.m_unPID == t.m_unPID; } } !(function (e) { (e[(e.FriendsList = 0)] = "FriendsList"), (e[(e.Chat = 1)] = "Chat"); })(S || (S = {})); class y { constructor() { (this.m_eActiveView = S.FriendsList), (0, a.rC)(this); } GetActiveView() { return this.m_eActiveView; } SetActiveView(e) { this.m_eActiveView = e; } } (0, i.gn)([a.LO], y.prototype, "m_eActiveView", void 0); class E { constructor(e) { (this.m_DefaultTabSet = void 0), (this.m_bFriendsListSingleWindow = void 0), (this.m_bFriendsListCollapsed = void 0), (0, a.rC)(this), (this.m_browserContext = e), (this.m_DefaultTabSet = new d(e)), (this.m_FriendsListWindow = void 0), (this.m_PopupWindowRestoreDetails = void 0), (this.m_mapTabSetToPopup = new Map()), (this.m_ResponsiveWindowState = new y()), this.SetFriendsListSingleWindowMode(!1), (this.m_bFriendsListCollapsed = o.De.STEAM_TV); } BIsEmpty() { return 0 == this.m_DefaultTabSet.tabCount && (!o.De.IN_CLIENT || null == this.m_FriendsListWindow || r.Ul.IsLoadedInClientSharedJSContext()) && 0 == this.m_mapTabSetToPopup.size; } BUsePopups() { return o.De.USE_POPUPS && 4 !== this.m_browserContext.m_eUIMode && !(0, u.Su)(this.m_browserContext.m_eBrowserType); } BIsFriendsListEmbedded() { return (0, r.ns)(r.D, this.m_browserContext) ? !this.BUsePopups() : 4 === this.m_browserContext.m_eUIMode; } IsFriendsListSingleWindow() { return this.m_bFriendsListSingleWindow; } SetFriendsListSingleWindowMode(e) { this.BUsePopups() ? (this.m_bFriendsListSingleWindow = e) : (this.m_bFriendsListSingleWindow = !0); } IsFriendsListCollapsed() { return this.m_bFriendsListCollapsed; } SetFriendsListCollapsed(e) { this.m_bFriendsListCollapsed = e; } get browser_context() { return this.m_browserContext; } get default_tabset() { return (0, p.X)(this.m_DefaultTabSet, "Context has no default chat target"), this.m_DefaultTabSet; } get friends_list_window() { return this.m_FriendsListWindow; } SetFriendsListWindow(e) { (this.m_FriendsListWindow = e || void 0), !e && this.IsFriendsListSingleWindow() && this.m_DefaultTabSet.CloseAllTabs(); } get popup_list() { return this.m_mapTabSetToPopup.values(); } get responsive_window_state() { return this.m_ResponsiveWindowState; } get cached_popup_window_restore_details() { return this.m_PopupWindowRestoreDetails; } get screen_info() { return this.m_ScreenInfo; } SetScreenInfo(e, t) { this.m_ScreenInfo = { width: e, height: t }; } SetCachedDefaultPopupDimensions(e) { this.m_PopupWindowRestoreDetails = e; } GetTabSetForId(e) { if (this.m_DefaultTabSet.GetTabByUniqueID(e)) return this.m_DefaultTabSet; for (let t of Array.from(this.m_mapTabSetToPopup.keys())) if (t.GetTabByUniqueID(e)) return t; return null; } RemovePopupForTabSet(e) { this.m_mapTabSetToPopup.delete(e); } AddPopup(e, t) { (0, p.X)(!this.m_mapTabSetToPopup.has(e), "Added popup for tabset twice"), this.m_mapTabSetToPopup.set(e, t); } GetPopupForTabSet(e) { return this.m_mapTabSetToPopup.get(e); } IsTabSetInFriendListWindow(e) { return e == this.default_tabset && this.IsFriendsListSingleWindow(); } BIsTabSetActive(e) { var t; let n = this.GetPopupForTabSet(e); return (null === (t = null == n ? void 0 : n.popup) || void 0 === t ? void 0 : t.container) ? !n.popup.container.BIsClosed() : this.IsTabSetInFriendListWindow(e) && this.friends_list_window && !this.friends_list_window.BIsClosed(); } BIsTabSetVisible(e) { let t = this.GetPopupForTabSet(e); return t ? t.popup.container.BIsVisible() : this.IsTabSetInFriendListWindow(e) && this.friends_list_window && this.friends_list_window.BIsVisible(); } BIsTabSetFocused(e) { let t = this.GetPopupForTabSet(e); return t ? t.popup.container.BIsFocused() : this.IsTabSetInFriendListWindow(e) && this.friends_list_window && this.friends_list_window.BIsFocused(); } CloseAllPopups() { for (let e of Array.from(this.popup_list)) e.popup.Close(); this.m_mapTabSetToPopup.clear(), this.friends_list_window && this.m_FriendsListWindow.Close(), (this.m_DefaultTabSet = new d(this.m_browserContext)); } } (0, i.gn)([a.LO], E.prototype, "m_DefaultTabSet", void 0), (0, i.gn)([a.LO], E.prototype, "m_bFriendsListSingleWindow", void 0), (0, i.gn)([a.LO], E.prototype, "m_bFriendsListCollapsed", void 0); }, 38461: (e, t, n) => { "use strict"; n.d(t, { Ys: () => j, S7: () => G.S7 }); var i = n(85556), o = n(19953), r = n(1736), a = n(70532), s = n(2260), l = n(21701), c = n(23282), m = n(22394); let d = new (class { constructor() { (this.m_bClientConnectionFailed = !1), (this.m_bSecurityException = !1), (this.m_bReady = !1), (this.m_mapCallbacks = new Map()), (this.m_ConnectCallbacks = new m.pB()), (this.m_DisconnectCallbacks = new m.pB()); } IsConnected() { return this.m_bReady && this.m_socket.readyState == WebSocket.OPEN; } WaitUntilConnected() { return this.IsConnected() ? Promise.resolve() : new Promise((e) => { let t = this.m_ConnectCallbacks.Register(() => { e(), t.Unregister(); }); }); } RegisterOnDisconnect(e) { return this.m_DisconnectCallbacks.Register(e); } BSendMsg(e, t, n) { if (!this.IsConnected()) return !1; try { let i = new l._5(); i.set_type(e), null != n && i.set_id(n); let o = i.serializeBinary(); if (o.length > 255) return !1; let r = t.serializeBinary(), a = new Uint8Array(1 + o.length + r.length), s = new c.At(a); return s.PutUint8(o.length), s.PutBytes(o), s.PutBytes(r), this.m_socket.send(a), !0; } catch (e) { return !1; } } RegisterOnMsg(e, t, n) { var i; if (!("SteamClient" in window) || null == SteamClient) return; let o = this.m_mapCallbacks.get(e); o || ((o = { msgClass: t, list: new m.pB() }), this.m_mapCallbacks.set(e, o)); let r = o.list.Register(n); return ( !this.m_RegisterForVRModeChangeHandle && (null === (i = SteamClient.OpenVR) || void 0 === i ? void 0 : i.RegisterForVRModeChange) && (this.m_RegisterForVRModeChangeHandle = SteamClient.OpenVR.RegisterForVRModeChange((e) => { e ? this.Connect() : this.Disconnect(); })), { Unregister: () => { r.Unregister(), this.BHasCallbacks() || (this.Disconnect(), this.m_RegisterForVRModeChangeHandle && (this.m_RegisterForVRModeChangeHandle.unregister(), (this.m_RegisterForVRModeChangeHandle = void 0))); }, } ); } BHasCallbacks() { return [...this.m_mapCallbacks.values()].some((e) => e.list.CountRegistered() > 0); } OnSocketMessage(e) { try { let t = new c.At(e.data), n = t.GetUint8(), i = new l._5(); l._5.deserializeBinaryFromReader(i, new s.BinaryReader(t.GetPacket(), t.TellGet(), n)), t.SeekGetCurrent(n); let o = this.m_mapCallbacks.get(i.type()); if (o) { let e = new o.msgClass(); o.msgClass.deserializeBinaryFromReader(e, new s.BinaryReader(t.GetPacket(), t.TellGet(), t.GetCountBytesRemaining())), o.list.Dispatch(e, i.id()); } } catch (e) { console.error("Exception deserializing protobuf", e); } } Connect() { if ("SteamClient" in window && null != SteamClient) return this.IsConnected() ? Promise.resolve() : (this.m_promiseConnect || ((this.m_promiseConnect = new Promise((e, t) => (0, i.mG)(this, void 0, void 0, function* () { try { this.m_socket = new WebSocket(`ws://localhost:27062?secret=${yield SteamClient.OpenVR.GetWebSecret()}`); } catch (e) { return (this.m_bSecurityException = !0), void t(e); } (this.m_socket.onerror = (e) => { t(); }), (this.m_socket.binaryType = "arraybuffer"), (this.m_socket.onmessage = this.OnSocketMessage.bind(this)), (this.m_socket.onopen = () => { this.m_socket.send("steam_connect"), e(); }), (this.m_socket.onclose = () => { (this.m_bReady = !1), (this.m_socket = void 0), this.m_DisconnectCallbacks.Dispatch(); }); }), )), this.m_promiseConnect .then(() => { (this.m_bReady = !0), this.m_ConnectCallbacks.Dispatch(); }) .catch(() => { this.m_bClientConnectionFailed = !0; }) .finally(() => { this.m_promiseConnect = void 0; })), this.m_promiseConnect); } Disconnect() { this.m_socket && this.m_socket.close(); } })(); var h = n(72746), u = n(88991), p = n(78013), _ = n(2049), g = n(79588); n(10553); class C { constructor() { (this.m_Disposers = []), (this.m_SteamVRMsgHandlers = []), (this.m_EnableLogging = !1), (0, g.rC)(this); } Log(...e) { this.m_EnableLogging && console.log("[VRVoiceChat]", ...e); } SetSession(e) { this.m_Session && h.Ul.ChatStore.DecRefActiveChatRoomGroup(this.m_Session.groupID), (this.m_Session = e), this.m_Session && h.Ul.ChatStore.IncRefActiveChatRoomGroup(this.m_Session.groupID, !0); } SendGroupName(e) { this.Log("Group: ", e); let t = new p.cf(); t.set_name(e), d.BSendMsg(32, t); } RegisterForNewChatMessages() { if (!this.m_Session) return void this.Log("RegisterForNewChatMessages: session not set"); let e = h.Ul.ChatStore.GetChatRoomGroup(this.m_Session.groupID); this.Log("RegisterForNewChatMessages: ", e), (this.m_NewChatMsgAddedHandles = null == e ? void 0 : e.textRoomList.map((e) => e.RegisterOnNewChatMsgAdded(this.OnNewChatMsgAdded))), e && (this.SendGroupName(e.name), (this.m_GroupNameDisposer = (0, g.N7)(e, "name", (e) => this.SendGroupName(e.newValue)))); } UnregisterForNewChatMessages() { var e; this.Log("UnregisterForNewChatMessages: ", this), null === (e = this.m_NewChatMsgAddedHandles) || void 0 === e || e.map((e) => e.Unregister()), (this.m_NewChatMsgAddedHandles = void 0), this.m_GroupNameDisposer && (this.m_GroupNameDisposer(), (this.m_GroupNameDisposer = void 0)); } ClearCurrentSession() { var e; this.Log("ClearCurrentSession: ", this), this.m_Session && (this.SetSession(void 0), null === (e = this.m_Supplier) || void 0 === e || e.OnUserEndVoiceChat()); } OnDisconnect() { var e, t; this.Log("OnDisconnect: ", this), this.ClearCurrentSession(), null === (e = this.m_VoiceChatActiveStateChangedHandle) || void 0 === e || e.Unregister(), (this.m_VoiceChatActiveStateChangedHandle = void 0), null === (t = this.m_ChatGroupAddedHandle) || void 0 === t || t.Unregister(), (this.m_ChatGroupAddedHandle = void 0), this.UnregisterForNewChatMessages(); } OnInitiateRoomChat(e, t) { var n, i; this.ClearCurrentSession(); const o = e.chat_group_id(), r = e.chat_room_id(); this.SetSession({ groupID: o, roomID: r }), this.Log("OnInitiateRoomChat: ", this.m_Session), this.m_VoiceChatActiveStateChangedHandle || (this.m_VoiceChatActiveStateChangedHandle = null === (n = this.m_Supplier) || void 0 === n ? void 0 : n.RegisterForVoiceChatActiveStateChange(this.OnVoiceChatActiveStateChanged)), null === (i = this.m_Supplier) || void 0 === i || i.InitiateRoomChat(o, r); let a = new p.kb(); d.BSendMsg(11, a, t); } OnExitRoomChat(e, t) { var n; this.Log("OnExitRoomChat: ", this), this.m_Session && (this.SetSession(void 0), null === (n = this.m_Supplier) || void 0 === n || n.OnUserEndVoiceChat()); let i = new p.Ix(); d.BSendMsg(13, i, t); } OnChatGroupAdded(e) { this.Log("OnChatGroupAdded: ", e), this.m_Session.groupID == e.GetGroupID() && (this.UnregisterForNewChatMessages(), this.RegisterForNewChatMessages()); } OnVoiceChatActiveStateChanged(e) { var t; if ((this.Log("OnVoiceChatActiveStateChanged: ", e), this.UnregisterForNewChatMessages(), null === (t = this.m_ChatGroupAddedHandle) || void 0 === t || t.Unregister(), (this.m_ChatGroupAddedHandle = void 0), e)) { this.RegisterForNewChatMessages(), (this.m_ChatGroupAddedHandle = h.Ul.ChatStore.RegisterForGroupAdded(this.OnChatGroupAdded)); let e = new p.cz(); d.BSendMsg(21, e); } else { let e = new p.Sh(); d.BSendMsg(22, e); } } OnNewChatMsgAdded(e, t, n, i, o, r) { this.Log("OnNewChatMsgAdded: ", e, t, n, i, o, r); let a = new p.O9(); a.set_chat_group_id(e), a.set_chat_room_id(t), a.set_sender_accountid(n), a.set_timestamp(i), a.set_ordinal(o), a.set_message(r), d.BSendMsg(18, a); } OnGetAvatarUrl(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = e.profile_steamid(), i = yield this.Supplier.GetPersonaState(n), o = ""; switch (e.avatar_type()) { case 0: o = null == i ? void 0 : i.avatar_url; break; case 1: o = null == i ? void 0 : i.avatar_url_medium; break; case 2: o = null == i ? void 0 : i.avatar_url_full; } let r = new p.Wi(); r.set_profile_avatar_url(o), d.BSendMsg(17, r, t); }); } OnSendGroupChatMessage(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_Session) { const t = h.Ul.ChatStore.GetChatRoomGroup(this.m_Session.groupID); if (t) { const n = t.textRoomList; if (n.length > 0) { const t = n[0], i = e.message_with_bbcode(); yield t.SendChatMessage(i); } } } let n = new p.IP(); d.BSendMsg(20, n, t); }); } OnConfigureVideo(e, t) { var n; return (0, i.mG)(this, void 0, void 0, function* () { null === (n = this.m_Supplier) || void 0 === n || n.ConfigureVideo(e.send(), e.receive()); let i = new p.Fv(); d.BSendMsg(24, i, t); }); } OnSetPerUserMuting(e, t) { var n; null === (n = this.m_Supplier) || void 0 === n || n.SetPerUserMuting(e.accountid(), e.muted()); let i = new p.s7(); d.BSendMsg(30, i, t); } OnSetSpatialAudioListener(e) { 0; } OnSetSpatialAudioSource(e) { 0; } OnAddPerUserGainLevel(e, t) { let n = new p.SX(); n.set_accountid(e), n.set_muted(t.muted), n.set_gain(t.gain), d.BSendMsg(28, n), this.m_Disposers.push( (0, g.U5)( () => t.muted, (e) => { n.set_muted(e), d.BSendMsg(28, n); }, ), ), this.m_Disposers.push( (0, g.U5)( () => t.gain, (e) => { n.set_gain(e), d.BSendMsg(28, n); }, ), ); } OnAddPerUserVoiceStatus(e, t) { let n = new p.fU(); n.set_accountid(e), n.set_mic_muted_locally(t.mic_muted_locally), n.set_output_muted_locally(t.output_muted_locally), d.BSendMsg(29, n), this.m_Disposers.push( (0, g.U5)( () => t.mic_muted_locally, (e) => { n.set_mic_muted_locally(e), d.BSendMsg(29, n); }, ), ), this.m_Disposers.push( (0, g.U5)( () => t.output_muted_locally, (e) => { n.set_output_muted_locally(e), d.BSendMsg(29, n); }, ), ); } set Supplier(e) { this.Log("Supplier: ", e, this), this.m_Supplier != e && ((this.m_Supplier = e), this.m_Disposers.forEach((e) => e()), (this.m_Disposers.length = 0), this.m_SteamVRMsgHandlers.forEach((e) => e.Unregister()), (this.m_SteamVRMsgHandlers.length = 0), e && (this.m_Disposers.push( (0, g.N7)(e.GetPerUserGainLevels(), (e) => { "add" === e.type && this.OnAddPerUserGainLevel(e.name, e.newValue); }), ), this.m_Disposers.push( (0, g.N7)(e.GetPerUserVoiceStatus(), (e) => { "add" === e.type && this.OnAddPerUserVoiceStatus(e.name, e.newValue); }), ), e.GetPerUserGainLevels().forEach((e, t) => this.OnAddPerUserGainLevel(t, e)), e.GetPerUserVoiceStatus().forEach((e, t) => this.OnAddPerUserVoiceStatus(t, e)), this.m_SteamVRMsgHandlers.push(d.RegisterOnDisconnect(this.OnDisconnect)), this.m_SteamVRMsgHandlers.push(d.RegisterOnMsg(10, p.Q4, this.OnInitiateRoomChat)), this.m_SteamVRMsgHandlers.push(d.RegisterOnMsg(12, p.Sb, this.OnExitRoomChat)), this.m_SteamVRMsgHandlers.push(d.RegisterOnMsg(16, p.U6, this.OnGetAvatarUrl)), this.m_SteamVRMsgHandlers.push(d.RegisterOnMsg(19, p.$2, this.OnSendGroupChatMessage)), this.m_SteamVRMsgHandlers.push(d.RegisterOnMsg(23, p.$J, this.OnConfigureVideo)), this.m_SteamVRMsgHandlers.push(d.RegisterOnMsg(30, p.Gy, this.OnSetPerUserMuting)))); } get session() { return this.m_Session; } set session(e) { if ((this.Log("session: ", e, this), e || (e = { groupID: "0", roomID: "0" }), this.m_Session && this.m_Session.groupID == e.groupID && this.m_Session.roomID == e.roomID)) return; this.SetSession(e); let t = new p.DX(); t.set_chat_group_id(e.groupID), t.set_chat_room_id(e.roomID), d.BSendMsg(25, t); } } (0, i.gn)([_.ak], C.prototype, "OnDisconnect", null), (0, i.gn)([_.ak], C.prototype, "OnInitiateRoomChat", null), (0, i.gn)([_.ak], C.prototype, "OnExitRoomChat", null), (0, i.gn)([_.ak], C.prototype, "OnChatGroupAdded", null), (0, i.gn)([_.ak], C.prototype, "OnVoiceChatActiveStateChanged", null), (0, i.gn)([_.ak], C.prototype, "OnNewChatMsgAdded", null), (0, i.gn)([_.ak], C.prototype, "OnGetAvatarUrl", null), (0, i.gn)([_.ak], C.prototype, "OnSendGroupChatMessage", null), (0, i.gn)([_.ak], C.prototype, "OnConfigureVideo", null), (0, i.gn)([_.ak], C.prototype, "OnSetPerUserMuting", null), (0, i.gn)([g.aD.bound], C.prototype, "OnSetSpatialAudioListener", null), (0, i.gn)([g.aD.bound], C.prototype, "OnSetSpatialAudioSource", null); let f = new C(); var v = n(90320); class S { constructor() { (this.m_DataChannels = new Array()), (this.m_OpenChannels = new Map()), (this.m_NextChannelId = 0), (this.m_EnableLogging = !1), (0, g.rC)(this); } Log(e) { this.m_EnableLogging && console.log(e); } BSendData(e, t) { let n = new v.j7(); return n.set_channel_id(e), n.set_data(t), d.BSendMsg(9, n); } SetupChannel(e, t, n) { this.Log(`(WebRTC) OnDataChannel[${t}:${null == e ? void 0 : e.label}]: ${n}`), (e.onopen = () => this.OnDataChannelOpen(e, t)), (e.onclose = () => this.OnDataChannelClose(e, t)), (e.onerror = (n) => this.OnDataChannelError(n.error, e, t)), (e.binaryType = "arraybuffer"), (e.onmessage = (e) => this.BSendData(t, e.data)); } OnDataChannel(e) { let t = this.m_NextChannelId++; const n = e.channel; let i, o; this.SetupChannel(n, t, "remote"); let r = n.label.lastIndexOf("["); -1 != r ? ((o = n.label.slice(0, r)), (i = n.label.slice(r))) : (o = n.label); let a = new v.NW(); a.set_channel_id(t), a.set_label(o), a.set_source_steamid(u.K.InitFromString(i).ConvertTo64BitString()), d.BSendMsg(5, a); } OnDataChannelMessage(e) { let t = this.m_OpenChannels.get(e.channel_id()); t && "open" == t.readyState && t.send(e.data()); } OnCloseDataChannel(e, t) { let n = e.channel_id(); this.m_DataChannels = this.m_DataChannels.filter((e) => { var t; return e.id !== n || (null === (t = e.channel) || void 0 === t || t.close(), !1); }); let i = new v.K3(); d.BSendMsg(4, i, t); } OnCreateDataChannel(e, t) { let n = { id: this.m_NextChannelId++, label: e.label(), options: { ordered: e.ordered(), maxRetransmits: e.max_retransmits(), maxPacketLifeTime: e.max_packet_life_time() } }; this.m_DataChannels.push(n), this.m_PeerConnection && (this.m_Supplier.BSupportsDataChannels() ? this.CreateDataChannel(n) : this.m_Supplier.RenegotiateSDP()); let i = new v.TM(); i.set_channel_id(n.id), d.BSendMsg(2, i, t); } OnDataChannelOpen(e, t) { this.Log(`(WebRTC) OnDataChannelOpen[${t}:${null == e ? void 0 : e.label}]`), this.m_OpenChannels.set(t, e), this.m_DataChannelCloseHandle || (this.m_DataChannelCloseHandle = d.RegisterOnMsg(7, v.iO, () => {})); let n = new v.Z5(); n.set_channel_id(t), d.BSendMsg(6, n); } OnDataChannelClose(e, t) { this.Log(`(WebRTC) OnDataChannelClose[${t}:${null == e ? void 0 : e.label}]`), this.m_OpenChannels.delete(t); let n = new v.iO(); n.set_channel_id(t), d.BSendMsg(7, n), 0 == this.m_OpenChannels.size && this.m_DataChannelCloseHandle && (this.m_DataChannelCloseHandle.Unregister(), (this.m_DataChannelCloseHandle = void 0)); } OnDataChannelError(e, t, n) { this.Log(`(WebRTC) OnDataChannelError[${n}:${null == t ? void 0 : t.label}]: ${e}`); const i = `{ message: ${e.message}` + (e.errorDetail ? `, errorDetail: ${e.errorDetail}` : "") + (e.sctpCauseCode ? `, sctpCauseCode: ${e.sctpCauseCode}` : "") + (e.sdpLineNumber ? `, sdpLineNumber: ${e.sdpLineNumber}` : "") + (e.receivedAlert ? `, receivedAlert: ${e.receivedAlert}` : "") + (e.sentAlert ? `, sentAlert: ${e.sentAlert}` : "") + " }"; let o = new v.tV(); o.set_channel_id(n), o.set_reason(i), d.BSendMsg(8, o); } OnDisconnect() { var e; this.m_DataChannels.forEach((e) => { var t; return null === (t = e.channel) || void 0 === t ? void 0 : t.close(); }), (this.m_DataChannels.length = 0), (null === (e = this.m_Supplier) || void 0 === e ? void 0 : e.BSupportsDataChannels()) && this.m_Supplier.RenegotiateSDP(); } CreateDataChannel(e) { try { e.channel = this.m_PeerConnection.createDataChannel(e.label, e.options); } catch (e) {} this.SetupChannel(e.channel, e.id, "local"); } SetPeerConnection(e) { this.m_PeerConnection != e && (e || ((this.m_PeerConnection.ondatachannel = void 0), this.m_DataChannels.forEach((e) => { var t; return null === (t = e.channel) || void 0 === t ? void 0 : t.close(); })), (this.m_PeerConnection = e), this.m_PeerConnection && (this.m_DataChannels.forEach((e) => this.CreateDataChannel(e)), (this.m_PeerConnection.ondatachannel = this.OnDataChannel))); } set ActiveDataChannelSupplier(e) { var t, n, i, o; if (this.m_Supplier != e && (!e || d.IsConnected())) if (((this.m_Supplier = e), this.m_Disposer && (this.m_Disposer(), (this.m_Disposer = void 0)), null === (t = this.m_DisconnectHandle) || void 0 === t || t.Unregister(), null === (n = this.m_CloseDataChannelHandle) || void 0 === n || n.Unregister(), null === (i = this.m_CreateDataChannelHandle) || void 0 === i || i.Unregister(), null === (o = this.m_DataChannelMessageHandle) || void 0 === o || o.Unregister(), e)) { (this.m_Disposer = (0, g.N7)(e, "m_PeerConnection", (e) => this.SetPeerConnection(e.newValue))), (this.m_DisconnectHandle = d.RegisterOnDisconnect(this.OnDisconnect)), (this.m_CloseDataChannelHandle = d.RegisterOnMsg(3, v.Tb, this.OnCloseDataChannel)), (this.m_CreateDataChannelHandle = d.RegisterOnMsg(1, v.KX, this.OnCreateDataChannel)), (this.m_DataChannelMessageHandle = d.RegisterOnMsg(9, v.j7, this.OnDataChannelMessage)); let t = new v.Fy(); d.BSendMsg(14, t); } else { let e = new v.CO(); d.BSendMsg(15, e), this.SetPeerConnection(void 0), (this.m_DataChannels.length = 0), (this.m_CloseDataChannelHandle = void 0), (this.m_CreateDataChannelHandle = void 0), (this.m_DataChannelMessageHandle = void 0); } } BHasDataChannels() { return this.m_DataChannels.length > 0; } } (0, i.gn)([g.aD.bound], S.prototype, "OnDataChannel", null), (0, i.gn)([g.aD.bound], S.prototype, "OnDataChannelMessage", null), (0, i.gn)([g.aD.bound], S.prototype, "OnCloseDataChannel", null), (0, i.gn)([g.aD.bound], S.prototype, "OnCreateDataChannel", null), (0, i.gn)([g.aD.bound], S.prototype, "OnDataChannelOpen", null), (0, i.gn)([g.aD.bound], S.prototype, "OnDataChannelClose", null), (0, i.gn)([g.aD.bound], S.prototype, "OnDataChannelError", null), (0, i.gn)([g.aD.bound], S.prototype, "OnDisconnect", null); let b = new S(); var I = n(4638), y = n(73409), E = n(26731); class D { constructor(e, t) { if (!(e instanceof BaseAudioContext)) throw "Not a valid audio context."; t || (t = {}); const n = t.numberOfChannels || 1; if (n > 2) throw "The maximum supported number of channels is two."; this.context_ = e; const i = t.bufferSize || 0; (this.attack = t.attack || 0), (this.release = t.release || 0); let o = void 0 === t.timeConstant ? 0.0025 : t.timeConstant; (this.threshold = void 0 === t.threshold ? -100 : t.threshold), (this.alpha_ = this.getAlphaFromTimeConstant_(o, this.context_.sampleRate)), (this.noiseGateKernel_ = this.context_.createScriptProcessor(i, n, n)), (this.noiseGateKernel_.onaudioprocess = this.onaudioprocess_.bind(this)), (this.input = new GainNode(this.context_)), (this.output = new GainNode(this.context_)), this.input.connect(this.noiseGateKernel_).connect(this.output), (this.previousLevel_ = 0), (this.previousWeight_ = 1), (this.channel_ = new Float32Array(this.noiseGateKernel_.bufferSize)), (this.envelope_ = new Float32Array(this.noiseGateKernel_.bufferSize)), (this.weights_ = new Float32Array(this.noiseGateKernel_.bufferSize)); } onaudioprocess_(e) { let t = e.inputBuffer, n = t.getChannelData(0); if (2 === t.numberOfChannels) { let e = t.getChannelData(1); for (let t = 0; t < e.length; t++) this.channel_[t] = (n[t] + e[t]) / 2; } else this.channel_ = n; let i = this.detectLevel_(this.channel_), o = this.computeWeights_(i); for (let n = 0; n < t.numberOfChannels; n++) { let i = t.getChannelData(n), r = e.outputBuffer.getChannelData(n); for (let e = 0; e < i.length; e++) r[e] = o[e] * i[e]; } } detectLevel_(e) { this.envelope_[0] = this.alpha_ * this.previousLevel_ + (1 - this.alpha_) * Math.pow(e[0], 2); for (let t = 1; t < e.length; t++) this.envelope_[t] = this.alpha_ * this.envelope_[t - 1] + (1 - this.alpha_) * Math.pow(e[t], 2); return (this.previousLevel_ = this.envelope_[this.envelope_.length - 1]), this.envelope_; } computeWeights_(e) { let t = 1, n = 1, i = 1, o = 1; this.attack > 0 && ((t = Math.ceil(this.context_.sampleRate * this.attack)), (i = 1 / t)), this.release > 0 && ((n = Math.ceil(this.context_.sampleRate * this.release)), (o = 1 / n)); for (let t = 0; t < e.length; t++) { if (D.toDecibel(2 * e[t]) < this.threshold) { const e = this.previousWeight_ - i; this.weights_[t] = Math.max(e, 0); } else { const e = this.previousWeight_ + o; this.weights_[t] = Math.min(e, 1); } this.previousWeight_ = this.weights_[t]; } return this.weights_; } getAlphaFromTimeConstant_(e, t) { return Math.exp(-1 / (t * e)); } static toDecibel(e) { return 10 * Math.log10(e); } } class w { constructor(e, t) { (this.m_Analyser = void 0), (this.m_rgInputNode = []), (this.m_hUpdateInterval = 0), (this.m_buffer = void 0), (this.m_lastTimeNonZero = 0), (this.m_flVolume = 0), (this.m_flRoundedVolume = 0), (this.m_flAveraging = 0.6), (0, g.rC)(this), (this.m_Analyser = t.createAnalyser()), (this.m_Analyser.fftSize = 128), (this.m_buffer = new Float32Array(this.m_Analyser.fftSize)), this.m_rgInputNode.push(e), e.connect(this.m_Analyser), this.StartUpdating(); } GetLastTimeNonZero() { return this.m_lastTimeNonZero; } StartUpdating() { this.StopUpdating(), (this.m_hUpdateInterval = SetBackgroundInterval(this.UpdateVolume, 60)); } StopUpdating() { 0 != this.m_hUpdateInterval && ClearBackgroundInterval(this.m_hUpdateInterval), (this.m_hUpdateInterval = 0); } UpdateVolume() { this.m_Analyser.getFloatTimeDomainData(this.m_buffer); let e = 0; for (let t = 0; t < this.m_buffer.length; ++t) { let n = this.m_buffer[t]; e += n * n; } let t = Math.sqrt(e / this.m_buffer.length); this.m_flVolume = 1.2 * Math.max(t, this.m_flVolume * this.m_flAveraging); let n = Math.round(100 * this.m_flVolume) / 100; n != this.m_flRoundedVolume && (this.m_flRoundedVolume = n), this.m_flRoundedVolume > 0 && (this.m_lastTimeNonZero = performance.now()); } stop() { this.StopUpdating(), this.DisconnectAll(); } Connect(e) { this.m_rgInputNode.push(e), null != this.m_Analyser && e.connect(this.m_Analyser); } DisconnectAll() { for (let e = 0; e < this.m_rgInputNode.length; ++e) { if (this.m_Analyser) try { this.m_rgInputNode[e].disconnect(this.m_Analyser); } catch (e) {} this.m_rgInputNode[e] = void 0; } this.m_rgInputNode = []; } get rounded_volume() { return this.m_flRoundedVolume; } } (0, i.gn)([g.LO], w.prototype, "m_lastTimeNonZero", void 0), (0, i.gn)([g.LO], w.prototype, "m_flVolume", void 0), (0, i.gn)([g.LO], w.prototype, "m_flRoundedVolume", void 0), (0, i.gn)([g.aD.bound], w.prototype, "UpdateVolume", null), (0, i.gn)([g.aD.bound], w.prototype, "stop", null); var R, A, M = n(97063), k = n(84290), T = n(82989), L = n(93635), G = n(91300); !(function (e) { (e[(e.k_EAudioStreamType_Microphone = 1)] = "k_EAudioStreamType_Microphone"), (e[(e.k_EAudioStreamType_IncomingStream = 2)] = "k_EAudioStreamType_IncomingStream"); })(R || (R = {})); class O { constructor() { (this.destination_node = void 0), (this.source_node = void 0), (this.elem = void 0), (this.accountid = void 0), (this.output_gain_node = void 0), (this.muted = !1), (this.volume_meter = void 0), (0, g.rC)(this); } } (0, i.gn)([g.LO], O.prototype, "accountid", void 0), (0, i.gn)([g.LO], O.prototype, "muted", void 0), (0, i.gn)([g.LO], O.prototype, "volume_meter", void 0); class F { constructor() { (this.accountid = void 0), (0, g.rC)(this); } } function B(e) { switch (e) { case A.k_EVoiceCallState_None: return "None"; case A.k_EVoiceCallState_ScheduledInitiate: return "ScheduledInitiate"; case A.k_EVoiceCallState_RequestedMicAccess: return "RequestedMicAccess"; case A.k_EVoiceCallState_LocalMicOnly: return "LocalMicOnly"; case A.k_EVoiceCallState_CreatePeerConnection: return "CreatePeerConnection"; case A.k_EVoiceCallState_InitatedWebRTCSession: return "InitiatedWebRTCSession"; case A.k_EVoiceCallState_WebRTCConnectedWaitingOnIceConnected: return "WaitingOnICEConnected"; case A.k_EVoiceCallState_RequestedPermission: return "RequestedPermission"; case A.k_EVoiceCallState_NotifyingVoiceChatOfWebRTCSession: return "NotifyingVoiceChatOfWebRTCSession"; case A.k_EVoiceCallState_Connected: return "Connected"; } } (0, i.gn)([g.LO], F.prototype, "accountid", void 0), (function (e) { (e[(e.k_EVoiceCallState_None = 0)] = "k_EVoiceCallState_None"), (e[(e.k_EVoiceCallState_ScheduledInitiate = 1)] = "k_EVoiceCallState_ScheduledInitiate"), (e[(e.k_EVoiceCallState_RequestedMicAccess = 2)] = "k_EVoiceCallState_RequestedMicAccess"), (e[(e.k_EVoiceCallState_LocalMicOnly = 3)] = "k_EVoiceCallState_LocalMicOnly"), (e[(e.k_EVoiceCallState_CreatePeerConnection = 4)] = "k_EVoiceCallState_CreatePeerConnection"), (e[(e.k_EVoiceCallState_InitatedWebRTCSession = 5)] = "k_EVoiceCallState_InitatedWebRTCSession"), (e[(e.k_EVoiceCallState_WebRTCConnectedWaitingOnIceConnected = 6)] = "k_EVoiceCallState_WebRTCConnectedWaitingOnIceConnected"), (e[(e.k_EVoiceCallState_RequestedPermission = 7)] = "k_EVoiceCallState_RequestedPermission"), (e[(e.k_EVoiceCallState_NotifyingVoiceChatOfWebRTCSession = 8)] = "k_EVoiceCallState_NotifyingVoiceChatOfWebRTCSession"), (e[(e.k_EVoiceCallState_Connected = 9)] = "k_EVoiceCallState_Connected"); })(A || (A = {})); class x { constructor() { (this.m_eState = A.k_EVoiceCallState_None), (this.m_targetAccountID = 0), (this.m_bInitiatedOneOnOneCall = !1), (this.m_bWaitingOnOneOnOneRejoin = !1), (this.m_bPostedOneOnOneEndedMsg = !1), (this.m_chatRoom = void 0), (this.m_voiceChatID = ""), (this.m_webRTCConnectedNotification = void 0), (this.m_webRTCServerIP = 0), (this.m_webRTCServerPort = 0), (this.m_webRTCClientIP = 0), (this.m_webRTCClientPort = 0), (this.m_nFailuresThisInitiate = 0), (this.m_bOfferUpdateInProgress = !1), (this.m_msgPendingRemoteDescriptionUpdate = void 0), (this.m_bIsConnectionAttemptOverTwoSeconds = !1), (this.m_nMostRecentRemoteDescriptionVersion = "0"), (0, g.rC)(this); } BMatchingCall(e, t) { return (0 != e && this.m_targetAccountID == e) || !(!this.m_chatRoom || !t || this.m_chatRoom.chatID != t.chatID || this.m_chatRoom.groupID != t.groupID); } BCallActiveForGroup(e) { return this.m_chatRoom && this.m_chatRoom.groupID == e; } } (0, i.gn)([g.LO], x.prototype, "m_eState", void 0), (0, i.gn)([g.LO], x.prototype, "m_targetAccountID", void 0), (0, i.gn)([g.LO], x.prototype, "m_bInitiatedOneOnOneCall", void 0), (0, i.gn)([g.LO], x.prototype, "m_bWaitingOnOneOnOneRejoin", void 0), (0, i.gn)([g.LO], x.prototype, "m_bPostedOneOnOneEndedMsg", void 0), (0, i.gn)([g.LO], x.prototype, "m_chatRoom", void 0), (0, i.gn)([g.LO], x.prototype, "m_voiceChatID", void 0), (0, i.gn)([g.LO], x.prototype, "m_nFailuresThisInitiate", void 0), (0, i.gn)([g.LO], x.prototype, "m_bIsConnectionAttemptOverTwoSeconds", void 0); class N { constructor() { (this.m_SSRC = 0), (this.m_MostRecentDelayEstimateMs = 0), (this.m_MostRecentJitterReceivedMs = 0), (this.m_CurrentJitterBufferMs = 0), (this.m_PacketsReceived = 0), (this.m_PacketsLost = 0), (this.m_PacketsSent = 0), (this.m_BytesSent = 0), (this.m_googRTT = 0), (this.m_BytesReceived = 0), (this.m_DecodingThroughNetEQ = 0), (this.m_DecodingPacketLossCorrection = 0), (this.m_DecodingPacketLossFadeNoiseGeneration = 0), (this.m_DecodingComfortNoiseGeneration = 0), (this.m_DecodingNormal = 0), (this.m_DecodingSilenceGenerator = 0), (this.m_DecodingMuted = 0); } } class P { constructor() { (this.m_SSRC = 0), (this.m_MostRecentDelayEstimateMs = 0), (this.m_TargetDelayMs = 0), (this.m_RenderDelayMs = 0), (this.m_MaxInterframeDelay = 0), (this.m_CurrentJitterBufferMs = 0), (this.m_PacketsReceived = 0), (this.m_PacketsLost = 0), (this.m_BytesReceived = 0), (this.m_FramesDecoded = 0), (this.m_DecodeMs = 0), (this.m_MaxDecodeMs = 0), (this.m_FrameWidthReceived = 0), (this.m_FrameHeightRecieved = 0), (this.m_FrameRateReceived = 0), (this.m_FrameRateDecoded = 0), (this.m_FrameRateOutput = 0), (this.m_NacksSent = 0), (this.m_PlisSent = 0); } } const U = "SteamVoiceSettings"; class V { constructor(e) { (this.m_VoiceInputGain = 1), (this.m_VoiceOutputGain = 1), (this.m_NoiseGateLevel = G.S7.k_ENoiseGateLevel_Medium), (this.m_VoiceUseEchoCancellation = !0), (this.m_VoiceUseNoiseCancellation = !0), (this.m_VoiceUseAutoGainControl = !0), (this.m_SelectedMicID = "default"), (this.m_SelectedOutputID = "default"), (this.m_bPlayPTTSounds = !0), (this.m_bSettingsLoaded = !1), (this.m_bHasResetOpenMicHotkey = !1), (0, g.rC)(this), (this.m_SettingsStore = e); } SaveToLocalStorage() { this.m_SettingsStore.StoreObjectInLocalStorage(U, { inputGain: this.m_VoiceInputGain, outputGain: this.m_VoiceOutputGain, noiseGateLevel: this.m_NoiseGateLevel, noiseCancellation: this.m_VoiceUseNoiseCancellation, echoCancellation: this.m_VoiceUseEchoCancellation, autoGainControl: this.m_VoiceUseAutoGainControl, selectedMic: this.m_SelectedMicID, selectedOutput: this.m_SelectedOutputID, pttSoundsEnabled: this.m_bPlayPTTSounds, hasResetOpenMicHotKey: this.m_bHasResetOpenMicHotkey }); } LoadFromLocalStorage(e) { this.m_SettingsStore.GetObjectFromLocalStorageWhenReady(U, void 0).then((t) => { null != t && (null != t.inputGain && (this.m_VoiceInputGain = t.inputGain), null != t.outputGain && (this.m_VoiceOutputGain = t.outputGain), null != t.noiseGateLevel && (this.m_NoiseGateLevel = t.noiseGateLevel), null != t.noiseCancellation && (this.m_VoiceUseNoiseCancellation = t.noiseCancellation), null != t.autoGainControl && (this.m_VoiceUseAutoGainControl = t.autoGainControl), null != t.echoCancellation && (this.m_VoiceUseEchoCancellation = t.echoCancellation), null != t.selectedMic && (this.m_SelectedMicID = t.selectedMic), null != t.selectedOutput && (this.m_SelectedOutputID = t.selectedOutput), null != t.pttSoundsEnabled && (this.m_bPlayPTTSounds = t.pttSoundsEnabled), null != t.hasResetOpenMicHotKey && (this.m_bHasResetOpenMicHotkey = t.hasResetOpenMicHotKey)), (this.m_bSettingsLoaded = !0), e.LogMsg("(VoiceChat) Settings loaded from local storage"), e.RefreshPushToTalkKeySettings(); }); } } (0, i.gn)([g.LO], V.prototype, "m_VoiceInputGain", void 0), (0, i.gn)([g.LO], V.prototype, "m_VoiceOutputGain", void 0), (0, i.gn)([g.LO], V.prototype, "m_NoiseGateLevel", void 0), (0, i.gn)([g.LO], V.prototype, "m_VoiceUseEchoCancellation", void 0), (0, i.gn)([g.LO], V.prototype, "m_VoiceUseNoiseCancellation", void 0), (0, i.gn)([g.LO], V.prototype, "m_VoiceUseAutoGainControl", void 0), (0, i.gn)([g.LO], V.prototype, "m_SelectedMicID", void 0), (0, i.gn)([g.LO], V.prototype, "m_SelectedOutputID", void 0), (0, i.gn)([g.LO], V.prototype, "m_bPlayPTTSounds", void 0), (0, i.gn)([g.LO], V.prototype, "m_bSettingsLoaded", void 0), (0, i.gn)([g.LO], V.prototype, "m_bHasResetOpenMicHotkey", void 0); class H { constructor() { (this.muted = !1), (this.gain = 1), (0, g.rC)(this); } } (0, i.gn)([g.LO], H.prototype, "muted", void 0), (0, i.gn)([g.LO], H.prototype, "gain", void 0); class W { constructor() { (this.mic_muted_locally = !1), (this.output_muted_locally = !1), (this.has_no_mic_for_session = !1), (0, g.rC)(this); } } (0, i.gn)([g.LO], W.prototype, "mic_muted_locally", void 0), (0, i.gn)([g.LO], W.prototype, "output_muted_locally", void 0), (0, i.gn)([g.LO], W.prototype, "has_no_mic_for_session", void 0); class X { constructor() { (this.partner_accountid = 0), (this.voice_chatid = ""), (this.previously_joined = !1), (this.audio_repeat = 0), (this.audio_buffer = void 0), (0, g.rC)(this); } ClearAudioRepeats() { 0 != this.audio_repeat && (ClearBackgroundTimeout(this.audio_repeat), (this.audio_repeat = 0)), null != this.audio_buffer && (this.audio_buffer.StopPlayback(), (this.audio_buffer = void 0)); } } (0, i.gn)([g.LO], X.prototype, "partner_accountid", void 0), (0, i.gn)([g.LO], X.prototype, "voice_chatid", void 0), (0, i.gn)([g.LO], X.prototype, "previously_joined", void 0); class j { constructor(e) { (this.m_VoiceCallState = new x()), (this.m_mapOneOnOneCallsWaitingJoinOrAccept = g.LO.map()), (this.m_hRegisterForPushToTalkStateChange = null), (this.m_VoiceChatActiveStateChangeCallbacks = new m.pB()), (this.m_bPushToTalkEnabled = !1), (this.m_bPushToMuteEnabled = !1), (this.m_bVoicePTTStateEnabled = !1), (this.m_VKPushToTalkHotKey = 0), (this.m_strPushToTalkDisplayString = ""), (this.m_hPushToTalkReleaseTimeout = 0), (this.m_ConnectionCheck = 0), (this.m_ScheduledInitiate = 0), (this.m_ScheduledVoiceLogsUpload = 0), (this.m_bClientSideLogsUploadInProgress = !1), (this.m_nLastLogLineUploaded = 0), (this.m_StatsTimeout = 0), (this.m_bUserHasDeniedMicPermissions = !1), (this.m_bOutputMuted = !1), (this.m_AudioContext = void 0), (this.m_rgAudioStreams = (0, g.LO)([])), (this.m_MicVolumeMeter = void 0), (this.m_MicNoiseGate = void 0), (this.m_MicInputGainNode = void 0), (this.m_rgVideoStreams = (0, g.LO)([])), (this.m_bSendVideo = !1), (this.m_bReceiveVideo = !1), (this.m_rgLogLines = []), (this.m_mapSSRCToAccountID = new Map()), (this.m_mapAccountIDToAudioStats = new Map()), (this.m_mapAccountIDToVideoStats = new Map()), (this.m_mapPerUserOutputGain = g.LO.map()), (this.m_mapUserVoiceStatus = g.LO.map()), (this.m_PeerConnection = void 0), (this.m_Settings = void 0), (this.m_LogVoiceChatDetails = !1), (this.m_VoiceEchoLocalMic = !1), (this.m_bLocalMicEchoStateBeforeMicTest = !1), (this.m_bLocalMicTestActive = !1), (this.m_bForceConnectingStatus = !1), (this.m_bForceReconnectingStatus = !1), (this.m_rgPositions = []), (this.m_rgFreePositionIndices = []), (this.m_localPose = void 0), (this.m_mapRemotePoseForAccountID = new Map()), (this.m_fnPendingOneOnOneVoiceChatRequestsCallback = null), (this.m_pendingOneOnOneVoiceChatRequestsAutorunDisposer = null), (this.m_fnCurrentUserVoiceLevelCallback = null), (this.m_currentUserVoiceLevelAutorunDisposer = null), (0, g.rC)(this), (this.m_Settings = new V(e)), this.m_Settings.LoadFromLocalStorage(this), this.DispatchSetVoiceChatActive(!1), (f.Supplier = this), this.GenerateVoicePositions(); } DispatchSetVoiceChatActive(e) { if ((this.m_VoiceChatActiveStateChangeCallbacks.Dispatch(e), "undefined" != typeof SteamClient && null != SteamClient && null != SteamClient.WebChat && null != SteamClient.WebChat.SetVoiceChatActive)) try { SteamClient.WebChat.SetVoiceChatActive(e); } catch (e) {} } Init(e) { (this.m_CMInterface = e), (window.SetVoiceEchoLocalMic = this.SetVoiceEchoLocalMic), (window.SetVoiceLogDetails = this.SetVoiceLogDetails), (window.SetVoiceForceReconnectingStatus = this.ForceReconnectingStatus), (window.SetVoiceForceConnectingStatus = this.ForceConnectingStatus), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(y.q0.NotifyOneOnOneChatRequestedHandler, (e) => { let t = new u.K(e.Body().steamid_partner()), n = e.Body().voice_chatid(), i = h.Ul.FriendStore.GetFriend(t.GetAccountID()); if (null == i || i.is_blocked || h.Ul.FriendStore.BIsInvisibleMode() || h.Ul.FriendStore.GetUserDoNotDisturb()) return this.LogMsg("(VoiceChat) Rejecting one-on-one voice chat request because partner is not a friend, is blocked, we are invisible, or we are DND"), this.OnRejectOneOnOneVoiceChat(t, e.Body().voice_chatid()), 1; let o = new X(); (o.partner_accountid = this.m_CMInterface.steamid.GetAccountID()), (o.voice_chatid = n), (o.previously_joined = !1); let r = this; if ( ((o.audio_repeat = SetBackgroundTimeout(function () { (o.audio_repeat = 0), r.PlayRingSound(t.GetAccountID()); }, 2e4)), this.m_mapOneOnOneCallsWaitingJoinOrAccept.set(t.GetAccountID(), o), this.LogMsg("(VoiceChat) voice chat request from " + t.GetAccountID()), this.LogMsg("(VoiceChat) current state " + this.m_VoiceCallState.m_eState), this.m_VoiceCallState.m_targetAccountID == t.GetAccountID()) ) return this.LogMsg("(VoiceChat) We are already trying to one on one chat this user, just auto-acceptting to re-sync."), this.OnAcceptOneOnOneVoiceChat(t, n), 1; h.Ul.NotificationManager.DisplayNotificationFromFriend(i, { title: i.display_name, body: (0, k.Xx)("#Friend_RequestingOneOnOneChat", i.display_name), tag: "state_" + i.accountid, steamid: i.persona.m_steamid.ConvertTo64BitString() }); let a = h.Ul.ChatStore.GetFriendChat(t.GetAccountID(), !0); return null != a && (a.AddVoiceChannelInviteMsg(t.GetAccountID(), h.Ul.GetServerRTime32(), (0, k.Xx)("#FriendMsg_VoiceChannelInvite", i.display_name, a.self.display_name)), h.Ul.UIStore.ShowAndOrActivateChat(h.Ul.GetDefaultBrowserContext(), a, !1)), this.PlayRingSound(i.accountid), 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(y.q0.NotifyVoiceChatEndedHandler, (e) => { let t = e.Body().voice_chatid(); for (let e of Array.from(this.m_mapOneOnOneCallsWaitingJoinOrAccept.keys())) { let n = this.m_mapOneOnOneCallsWaitingJoinOrAccept.get(e); if (null != n && n.voice_chatid == t) { this.LogMsg("(VoiceChat) OneOnOne VoiceChat we were invited too with " + e + " has ended and is no longer joinable."), h.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_voice_channel_exit.m4a?v=1"); let t = Number(e); this.DeleteOneOnOneCallWaitingJoinOrAccept(t); let n = h.Ul.ChatStore.GetFriendChat(t, !1), i = h.Ul.FriendStore.GetFriend(t); null != n && (i ? n.AddVoiceChannelInviteMsg(i.accountid, h.Ul.GetServerRTime32(), (0, k.Xx)("#FriendMsg_VoiceChannelEndedExplicit", i.display_name)) : n.AddVoiceChannelInviteMsg(this.m_CMInterface.steamid.GetAccountID(), h.Ul.GetServerRTime32(), (0, k.Xx)("#FriendMsg_VoiceChannelEnded")), this.m_VoiceCallState.m_targetAccountID == Number(e) && (this.m_VoiceCallState.m_bPostedOneOnOneEndedMsg = !0)); } } if (t == this.m_VoiceCallState.m_voiceChatID) { if (0 != this.m_VoiceCallState.m_targetAccountID) { let e = h.Ul.ChatStore.GetFriendChat(this.m_VoiceCallState.m_targetAccountID, !1); null == e || this.m_VoiceCallState.m_bPostedOneOnOneEndedMsg || ((this.m_VoiceCallState.m_bPostedOneOnOneEndedMsg = !0), e.AddVoiceChannelInviteMsg(this.m_CMInterface.steamid.GetAccountID(), h.Ul.GetServerRTime32(), (0, k.Xx)("#FriendMsg_VoiceChannelEnded"))); } 0 != this.m_VoiceCallState.m_targetAccountID && this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_RequestedPermission && h.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_voice_channel_exit.m4a?v=1"), this.LogMsg("(VoiceChat) Got voice chat end notification from server for active chatid"), this.EndVoiceChatInternal(!1); } return 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(y.q0.NotifyUserJoinedVoiceChatHandler, (e) => { if (e.Body().voice_chatid() == this.m_VoiceCallState.m_voiceChatID) { let t = new u.K(e.Body().user_steamid()); this.LogMsg("(VoiceChat) User " + t.Render() + " has just JOINED our active voice chat"), 0 != this.m_VoiceCallState.m_targetAccountID && this.m_VoiceCallState.m_targetAccountID == t.GetAccountID() && (this.m_VoiceCallState.m_bWaitingOnOneOnOneRejoin = !1); } return 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(y.q0.NotifyUserLeftVoiceChatHandler, (e) => { if (e.Body().voice_chatid() == this.m_VoiceCallState.m_voiceChatID) { let t = new u.K(e.Body().user_steamid()); this.LogMsg("(VoiceChat) User " + t.Render() + " has just LEFT our active voice chat"), 0 != this.m_VoiceCallState.m_targetAccountID && this.m_VoiceCallState.m_targetAccountID == t.GetAccountID() && (this.m_VoiceCallState.m_bWaitingOnOneOnOneRejoin = !0); } return 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(I.ej.NotifyShouldRejoinChatRoomVoiceChatHandler, (e) => { let t = { groupID: e.Body().chat_group_id(), chatID: e.Body().chat_id() }; return this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_ScheduledInitiate && this.m_VoiceCallState.BMatchingCall(0, t) && (this.LogMsg("(ChatRoom) Notified that we need to rejoin new voicechat session for chat room... doing so now..."), this.EndVoiceChatInternal(!0), this.InitiateVoiceChat(0, t)), 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(E.dF.NotifyWebRTCUpdateRemoteDescriptionHandler, (e) => (this.m_VoiceCallState.m_eState < A.k_EVoiceCallState_InitatedWebRTCSession ? (this.LogMsg("(WebRTC) Hit NotifyWebRTCUpdateRemoteDescriptionHandler in wrong state " + this.m_VoiceCallState.m_eState), 2) : (this.m_VoiceCallState.m_bOfferUpdateInProgress ? (this.LogMsg("(WebRTC) Hit NotifyWebRTCUpdateRemoteDescriptionHandler while already updating, queing work"), (this.m_VoiceCallState.m_msgPendingRemoteDescriptionUpdate = e.Body())) : this.ProcessUpdatedRemoteDescription(e.Body()), 1))), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(E.dF.NotifyWebRTCSessionConnectedHandler, (e) => this.m_VoiceCallState.m_eState < A.k_EVoiceCallState_InitatedWebRTCSession ? (this.LogMsg("(WebRTC) Hit NotifyWebRTCSessionConnectedHandler in wrong state " + this.m_VoiceCallState.m_eState), 2) : ((this.m_VoiceCallState.m_webRTCConnectedNotification = e.Body()), (this.m_VoiceCallState.m_webRTCServerIP = this.m_VoiceCallState.m_webRTCConnectedNotification.server_ip()), (this.m_VoiceCallState.m_webRTCServerPort = this.m_VoiceCallState.m_webRTCConnectedNotification.server_port()), (this.m_VoiceCallState.m_webRTCClientIP = this.m_VoiceCallState.m_webRTCConnectedNotification.client_ip()), (this.m_VoiceCallState.m_webRTCClientPort = this.m_VoiceCallState.m_webRTCConnectedNotification.client_port()), "completed" == this.m_PeerConnection.iceConnectionState || "connected" == this.m_PeerConnection.iceConnectionState ? (this.LogMsg("(VoiceChat) ICE state is already connected after successful SetRemoteDescription, joining voice chat immediately"), this.JoinVoiceChatOrAskForOneOnOneChatNow()) : (this.LogMsg("(VoiceChat) ICE state is not connected after successful SetRemoteDescription, waiting for UDP connetivity"), (this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_WebRTCConnectedWaitingOnIceConnected)), 1), ), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(y.q0.NotifyAllUsersVoiceStatusHandler, (e) => { if (this.m_VoiceCallState.m_voiceChatID != e.Body().voice_chatid()) return 1; for (let t = 0; t < e.Body().users().length; ++t) { let n = e.Body().users()[t]; this.UpdateUserVoiceStatus(n); } return 1; }), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(y.q0.NotifyUserVoiceStatusHandler, (e) => (this.UpdateUserVoiceStatus(e.Body()), 1)), this.m_CMInterface.messageHandlers.RegisterServiceNotificationHandler(y.q0.NotifyOneOnOneChatResponseHandler, (e) => { if (this.m_VoiceCallState.m_eState >= A.k_EVoiceCallState_RequestedPermission) { let t = new u.K(e.Body().steamid_partner()); if (e.Body().voicechat_id() != this.m_VoiceCallState.m_voiceChatID) this.LogMsg("(VoiceChat) Got response from " + t.GetAccountID() + " but for different voice chat than we are in, ignoring. "); else if (t.GetAccountID() == this.m_VoiceCallState.m_targetAccountID && 1 == e.Body().accepted_request()) this.LogMsg("(VoiceChat) Got acceptance from " + t.GetAccountID() + " " + e.Hdr().steamid()), h.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_voice_channel_enter.m4a?v=1"), this.OnVoiceChatAccepted(!0); else { this.LogMsg("(VoiceChat) Rejected by " + t.GetAccountID()); let e = h.Ul.ChatStore.GetFriendChat(t.GetAccountID(), !1), n = h.Ul.FriendStore.GetFriend(t.GetAccountID()); null != e && null != n && ((this.m_VoiceCallState.m_bPostedOneOnOneEndedMsg = !0), e.AddVoiceChannelInviteMsg(t.GetAccountID(), h.Ul.GetServerRTime32(), (0, k.Xx)("#FriendMsg_VoiceChannelEndedExplicit", n.display_name))), this.DeleteOneOnOneCallWaitingJoinOrAccept(t.GetAccountID()), h.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_voice_channel_exit.m4a?v=1"), this.OnVoiceChatAccepted(!1); } } return 1; }); } GetLocalAccountID() { return this.m_CMInterface.steamid.GetAccountID(); } RefreshPushToTalkKeySettings() { "undefined" != typeof SteamClient && null != SteamClient.WebChat && null != SteamClient.WebChat.GetPushToTalkEnabled && SteamClient.WebChat.GetPushToTalkEnabled().then((e) => { (this.m_bPushToTalkEnabled = e.bEnabled), (this.m_VKPushToTalkHotKey = e.vkHotKey), e.bPushToMute && ((this.m_bPushToMuteEnabled = e.bEnabled), (this.m_bPushToTalkEnabled = !1)), (this.m_strPushToTalkDisplayString = e.strKeyName || "None"), this.m_bPushToTalkEnabled || this.m_bPushToMuteEnabled || (null != SteamClient.WebChat && null != SteamClient.WebChat.SetPushToTalkHotKey && ((0, L.X)(this.m_Settings.m_bSettingsLoaded, "Settings not loaded but RefreshPushToTalkKeySettings hit"), this.m_Settings.m_bHasResetOpenMicHotkey || ((this.m_Settings.m_bHasResetOpenMicHotkey = !0), this.m_Settings.SaveToLocalStorage(), console.log("Reset Open Mic hotkey to None on first run of new client in open mic mode"), SteamClient.WebChat.SetPushToTalkHotKey(0), this.RefreshPushToTalkKeySettings()))); }), "undefined" != typeof SteamClient && null === this.m_hRegisterForPushToTalkStateChange && null != SteamClient && null != SteamClient.WebChat && null != SteamClient.WebChat.RegisterForPushToTalkStateChange && (this.m_hRegisterForPushToTalkStateChange = SteamClient.WebChat.RegisterForPushToTalkStateChange(this.OnPushToTalkStateChange)); } InitiateFriendChat(e) { this.BPartnerHasRequestedAndIsInOneOnOneChat(e) ? this.AcceptPartnersOneOnOneChatRequest(e) : (this.InitiateVoiceChat(e, null), h.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_phonecall.m4a?v=1")); } InitiateRoomChat(e, t) { this.InitiateVoiceChat(0, { groupID: e, chatID: t }); } RegisterForVoiceChatActiveStateChange(e) { return this.m_VoiceChatActiveStateChangeCallbacks.Register(e); } EndLocalMicTest() { (this.m_bLocalMicTestActive = !1), this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_LocalMicOnly && this.EndVoiceChatInternal(!1), this.SetVoiceEchoLocalMic(this.m_bLocalMicEchoStateBeforeMicTest); } IsLocalMicTestActive() { return this.m_bLocalMicTestActive; } InitiateLocalMicTest() { (this.m_bLocalMicTestActive = !0), (this.m_bLocalMicEchoStateBeforeMicTest = this.m_VoiceEchoLocalMic), this.SetVoiceEchoLocalMic(!0), this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_None && this.InitiateVoiceChat(0, null); } GetOneOnOneCallsWaitingForJoinOrAccept() { return this.m_mapOneOnOneCallsWaitingJoinOrAccept; } AcceptPartnersOneOnOneChatRequest(e) { let t = this.m_mapOneOnOneCallsWaitingJoinOrAccept.get(e); if (null == t) return !1; (this.m_VoiceCallState.m_timeStartedConnecting = void 0), t.ClearAudioRepeats(); let n = u.K.InitFromAccountID(e); return this.OnAcceptOneOnOneVoiceChat(n, t.voice_chatid), !0; } OnRejectOneOnOneVoiceChatForPartner(e) { let t = this.m_mapOneOnOneCallsWaitingJoinOrAccept.get(e); if (null == t) return !1; t.ClearAudioRepeats(); let n = u.K.InitFromAccountID(e); this.OnRejectOneOnOneVoiceChat(n, t.voice_chatid), this.m_mapOneOnOneCallsWaitingJoinOrAccept.delete(e); let i = h.Ul.ChatStore.GetFriendChat(e, !1), o = h.Ul.FriendStore.self; return null != i && null != o && ((this.m_VoiceCallState.m_targetAccountID == e && this.m_VoiceCallState.m_bPostedOneOnOneEndedMsg) || i.AddVoiceChannelInviteMsg(o.accountid, h.Ul.GetServerRTime32(), (0, k.Xx)("#FriendMsg_VoiceChannelEndedExplicit", o.display_name)), this.m_VoiceCallState.m_targetAccountID == e && (this.m_VoiceCallState.m_bPostedOneOnOneEndedMsg = !0)), !0; } OnUserLeaveOneOnOneVoiceChat() { 0 != this.m_VoiceCallState.m_targetAccountID || this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_None ? (this.LogMsg("(VoiceChat) User asking to leave but not end one-on-one chat with: " + this.m_VoiceCallState.m_targetAccountID), this.EndVoiceChatInternal(!1)) : this.LogMsg("(VoiceChat) OnUserLeaveOneOnOneVoiceChat called when in a group not one-on-one chat!"); } OnUserEndVoiceChat() { if (this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_None && 0 != this.m_VoiceCallState.m_targetAccountID) { if (!this.m_VoiceCallState.m_bPostedOneOnOneEndedMsg) { let e = h.Ul.ChatStore.GetFriendChat(this.m_VoiceCallState.m_targetAccountID, !1), t = h.Ul.FriendStore.self; null != e && null != t && ((this.m_VoiceCallState.m_bPostedOneOnOneEndedMsg = !0), e.AddVoiceChannelInviteMsg(h.Ul.CMInterface.steamid.GetAccountID(), h.Ul.GetServerRTime32(), (0, k.Xx)("#FriendMsg_VoiceChannelEndedExplicit", t.display_name))); } let e = this.m_VoiceCallState.m_targetAccountID; this.m_VoiceCallState.m_targetAccountID = 0; let t = r.gA.Init(y.j5); t.Body().set_steamid_partner(u.K.InitFromAccountID(e).ConvertTo64BitString()), this.DeleteOneOnOneCallWaitingJoinOrAccept(e), y.p3.EndOneOnOneChat(this.m_CMInterface.GetServiceTransport(), t).then((t) => { 1 == t.GetEResult() ? this.LogMsg("(VoiceChat) Ended voice chat with " + e) : this.LogMsg("(VoiceChat) Failed ending voice chat with " + e); }); } 0 != this.m_VoiceCallState.m_targetAccountID && this.DeleteOneOnOneCallWaitingJoinOrAccept(this.m_VoiceCallState.m_targetAccountID), this.EndVoiceChatInternal(!1); } RegisterForPendingOneOnOneVoiceChatRequests(e) { (this.m_fnPendingOneOnOneVoiceChatRequestsCallback = e), this.m_pendingOneOnOneVoiceChatRequestsAutorunDisposer && this.m_pendingOneOnOneVoiceChatRequestsAutorunDisposer(), (this.m_pendingOneOnOneVoiceChatRequestsAutorunDisposer = null), this.m_fnPendingOneOnOneVoiceChatRequestsCallback && (this.m_pendingOneOnOneVoiceChatRequestsAutorunDisposer = (0, g.EH)(() => { if (!this.m_fnPendingOneOnOneVoiceChatRequestsCallback) return; let e = Array.from(this.m_mapOneOnOneCallsWaitingJoinOrAccept.keys()).filter((e) => !this.BSelfHadPreviouslyJoinedOneOnOneChat(e) && this.GetActiveOneOnOneVoiceChatAccountID() != e && this.BPartnerHasRequestedAndIsInOneOnOneChat(e)); this.m_fnPendingOneOnOneVoiceChatRequestsCallback(e); })); } RegisterForCurrentUserVoiceLevel(e) { (this.m_fnCurrentUserVoiceLevelCallback = e), this.m_currentUserVoiceLevelAutorunDisposer && this.m_currentUserVoiceLevelAutorunDisposer(), (this.m_currentUserVoiceLevelAutorunDisposer = null), this.m_fnCurrentUserVoiceLevelCallback && (this.m_currentUserVoiceLevelAutorunDisposer = (0, g.EH)(() => { if (!this.m_fnCurrentUserVoiceLevelCallback) return; let e = this.get_volume(this.GetLocalAccountID()); this.m_fnCurrentUserVoiceLevelCallback(e); })); } SetSelectedMic(e) { e != this.m_Settings.m_SelectedMicID && (this.LogMsg("(VoiceChat) Set selected mic " + e), (this.m_Settings.m_SelectedMicID = e), this.m_Settings.SaveToLocalStorage(), this.RestartVoiceChatIfConnected()); } SetSelectedOutput(e) { e != this.m_Settings.m_SelectedOutputID && (this.LogMsg("(VoiceChat) Set selected output " + e), (this.m_Settings.m_SelectedOutputID = e), this.m_Settings.SaveToLocalStorage(), this.RestartVoiceChatIfConnected()); } GetAudioWorkletSupport() { return h.Ul.AudioPlaybackManager.supports_audio_worklets; } GetUserDeniedMicAccess() { return this.m_bUserHasDeniedMicPermissions; } GetSelectedMic() { return this.m_Settings.m_SelectedMicID; } GetSelectedOutputDevice() { return this.m_Settings.m_SelectedOutputID; } SetUseEchoCancellation(e) { e != this.m_Settings.m_VoiceUseEchoCancellation && ((this.m_Settings.m_VoiceUseEchoCancellation = e), this.m_Settings.SaveToLocalStorage(), this.RestartVoiceChatIfConnected()); } GetUseEchoCancellation() { return this.m_Settings.m_VoiceUseEchoCancellation; } SetUseNoiseCancellation(e) { e != this.m_Settings.m_VoiceUseNoiseCancellation && ((this.m_Settings.m_VoiceUseNoiseCancellation = e), this.m_Settings.SaveToLocalStorage(), this.RestartVoiceChatIfConnected()); } GetUseNoiseCancellation() { return this.m_Settings.m_VoiceUseNoiseCancellation; } SetUseAutoGainControl(e) { e != this.m_Settings.m_VoiceUseAutoGainControl && ((this.m_Settings.m_VoiceUseAutoGainControl = e), this.m_Settings.SaveToLocalStorage(), this.RestartVoiceChatIfConnected()); } GetUseAutoGainControl() { return this.m_Settings.m_VoiceUseAutoGainControl; } SetVoiceEchoLocalMic(e) { (this.m_VoiceEchoLocalMic = e), this.UpdateNoiseGateOnActiveMic(); } GetVoiceEchoLocalMic() { return this.m_VoiceEchoLocalMic; } GetPushToTalkOrMuteSoundsEnabled() { return this.m_Settings.m_bPlayPTTSounds; } SetPushToTalkOrMuteSoundsEnabled(e) { this.m_Settings.m_bPlayPTTSounds != e && ((this.m_Settings.m_bPlayPTTSounds = e), this.m_Settings.SaveToLocalStorage()); } SetPushToTalkEnabled(e) { (this.m_bPushToTalkEnabled = e), (this.m_bPushToMuteEnabled = !1); } GetPushToTalkEnabled() { return this.m_bPushToTalkEnabled; } SetPushToMuteEnabled(e) { (this.m_bPushToMuteEnabled = e), (this.m_bPushToTalkEnabled = !1); } GetPushToMuteEnabled() { return this.m_bPushToMuteEnabled; } GetPushToTalkVoiceStateEnabled() { return this.m_bVoicePTTStateEnabled; } GetPushToTalkHotKeyVK() { return this.m_VKPushToTalkHotKey; } GetPushToTalkHotKeyDisplayString() { return this.m_strPushToTalkDisplayString; } ConfigureVideo(e, t) { (this.m_bSendVideo = e), (this.m_bReceiveVideo = t); } GetPerUserGainLevels() { return this.m_mapPerUserOutputGain; } GetPerUserVoiceStatus() { return this.m_mapUserVoiceStatus; } SetVoiceLogDetails(e) { this.m_LogVoiceChatDetails = e; } GetVoiceLogDetails() { return this.m_LogVoiceChatDetails; } SetUseNoiseGateLevel(e) { e != this.m_Settings.m_NoiseGateLevel && (this.LogMsg("(VoiceChat) Nose Gate Level: " + e), (this.m_Settings.m_NoiseGateLevel = e), this.m_Settings.SaveToLocalStorage(), this.UpdateNoiseGateOnActiveMic()); } GetUseNoiseGateLevel() { return this.m_Settings.m_NoiseGateLevel; } SetVoiceInputGain(e) { if (this.m_Settings.m_VoiceInputGain != e) { (this.m_Settings.m_VoiceInputGain = Math.max(0, Math.min(e, j.k_MaxInputOutputGainValue))), this.LogMsg("(VoiceChat) New mic Input Gain value is " + this.m_Settings.m_VoiceInputGain), null != this.m_MicInputGainNode && this.m_MicInputGainNode.gain.setValueAtTime(this.GetCurrentVoiceInputGainTarget(), this.m_AudioContext.currentTime); const t = 0 == this.m_Settings.m_VoiceInputGain && !this.IsMicMuted(), n = 0 != this.m_Settings.m_VoiceInputGain && this.IsMicMuted(); (t || n) && this.ToggleMicMuting(), this.m_Settings.SaveToLocalStorage(); } } GetVoiceInputGain() { return this.m_Settings.m_VoiceInputGain; } SetVoiceOutputGain(e) { if (this.m_Settings.m_VoiceOutputGain != e) { (this.m_Settings.m_VoiceOutputGain = Math.max(0, Math.min(e, j.k_MaxInputOutputGainValue))), this.LogMsg("(VoiceChat) New global OutputGain value is " + this.m_Settings.m_VoiceOutputGain); const t = 0 == this.m_Settings.m_VoiceOutputGain && !this.IsOutputMuted(), n = 0 != this.m_Settings.m_VoiceOutputGain && this.IsOutputMuted(); (t || n) && this.ToggleOutputMuting(), this.m_Settings.SaveToLocalStorage(); for (let e = 0; e < this.m_rgAudioStreams.length; ++e) { let t = this.m_rgAudioStreams[e]; t.output_gain_node && (t.type == R.k_EAudioStreamType_Microphone ? t.output_gain_node.gain.setValueAtTime(this.m_Settings.m_VoiceOutputGain, this.m_AudioContext.currentTime) : t.output_gain_node.gain.setValueAtTime(this.m_Settings.m_VoiceOutputGain * this.GetPerUserGainLevel(t.accountid), this.m_AudioContext.currentTime)); } } } BIsAccountFullyConnectedToActiveVoiceChat(e) { if (e == this.m_CMInterface.steamid.GetAccountID()) return this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_Connected; if (this.m_VoiceCallState.m_eState < A.k_EVoiceCallState_Connected) return !1; for (let t = 0; t < this.m_rgAudioStreams.length; ++t) { let n = this.m_rgAudioStreams[t]; if (n.output_gain_node && n.type == R.k_EAudioStreamType_IncomingStream && n.accountid == e) return !0; } return !1; } GetVoiceOutputGain() { return this.m_Settings.m_VoiceOutputGain; } GetUserMutedRemotely(e) { let t = this.m_mapUserVoiceStatus.get(e); return null == t && ((t = new W()), this.m_mapUserVoiceStatus.set(e, t)), t.mic_muted_locally; } GetOutputMutedRemotely(e) { let t = this.m_mapUserVoiceStatus.get(e); return null == t && ((t = new W()), this.m_mapUserVoiceStatus.set(e, t)), t.output_muted_locally; } GetUserHasNoMicForSession(e) { let t = this.m_mapUserVoiceStatus.get(e); return null == t && ((t = new W()), this.m_mapUserVoiceStatus.set(e, t)), t.has_no_mic_for_session; } ConvertSliderToGainValue(e, t) { return (e = e <= 50 ? (e / 50) * 1 : 1 + ((e - 50) / 50) * (t - 1)); } ConvertGainValueToSliderValue(e, t) { let n = e; return (n = e <= 1 ? 50 * e : 50 + ((e - 1) / (t - 1)) * 50), n; } ForceReconnectingStatus(e) { this.m_bForceReconnectingStatus = !0; } ForceConnectingStatus(e) { this.m_bForceConnectingStatus = !0; } GetActiveChatRoomGroupID() { return this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_None ? "" : this.m_VoiceCallState.m_chatRoom ? this.m_VoiceCallState.m_chatRoom.groupID : ""; } GetActiveVoiceChatID() { return this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_None ? "" : this.m_VoiceCallState.m_chatRoom ? this.m_VoiceCallState.m_chatRoom.chatID : ""; } BInitiatedOneOnOneChat(e) { return this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_None && this.m_VoiceCallState.m_targetAccountID == e && this.m_VoiceCallState.m_bInitiatedOneOnOneCall; } ToggleMicMuting() { for (let e = 0; e < this.m_rgAudioStreams.length; ++e) { let t = this.m_rgAudioStreams[e]; if (t.type == R.k_EAudioStreamType_Microphone) { t.muted = !t.muted; let e = t.stream.getTracks(); for (let n = 0; n < e.length; n++) e[n].enabled = !t.muted; t.muted ? this.m_MicInputGainNode.gain.setValueAtTime(0, this.m_AudioContext.currentTime + 0.2) : this.m_MicInputGainNode.gain.setValueAtTime(this.GetCurrentVoiceInputGainTarget(), this.m_AudioContext.currentTime); } } this.SendVoiceStatusUpdate(); } BHasSampleRateTooHighInBrowser() { return !o.De.IN_CLIENT && h.Ul.AudioPlaybackManager.GetLastObservedSampleRate() > 48e3; } BNoMicAvailableForSession() { if (this.m_VoiceCallState.m_eState <= A.k_EVoiceCallState_RequestedMicAccess) return !1; if (this.BHasSampleRateTooHighInBrowser()) return !0; for (let e = 0; e < this.m_rgAudioStreams.length; ++e) if (this.m_rgAudioStreams[e].type == R.k_EAudioStreamType_Microphone) return !1; return !0; } IsMicMuted() { for (let e = 0; e < this.m_rgAudioStreams.length; ++e) if (this.m_rgAudioStreams[e].type == R.k_EAudioStreamType_Microphone) return this.m_rgAudioStreams[e].muted; return !1; } ToggleOutputMuting() { this.m_bOutputMuted = !this.m_bOutputMuted; for (let e = 0; e < this.m_rgAudioStreams.length; ++e) { let t = this.m_rgAudioStreams[e]; if (t.type == R.k_EAudioStreamType_IncomingStream) { t.muted = this.m_bOutputMuted || this.GetPerUserMuting(t.accountid); let e = t.stream.getTracks(); for (let t = 0; t < e.length; t++) e[t].enabled = !this.m_bOutputMuted; } } this.SendVoiceStatusUpdate(); } IsOutputMuted() { return this.m_bOutputMuted; } GetActiveOneOnOneVoiceChatAccountID() { return this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_None ? 0 : this.m_VoiceCallState.m_targetAccountID; } get audio_streams() { return this.m_rgAudioStreams; } get video_streams() { return this.m_rgVideoStreams; } get mic_volume() { return this.m_MicVolumeMeter; } get_volume(e) { if (e == this.m_CMInterface.steamid.GetAccountID()) { if (this.IsMicMuted() || (this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_Connected && this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_LocalMicOnly)) return 0; } else if (this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_Connected) return 0; let t = 0; for (let n = 0; n < this.m_rgAudioStreams.length; ++n) { let i = this.m_rgAudioStreams[n]; i.accountid == e && null != i.volume_meter && (t = Math.max(t, i.volume_meter.rounded_volume)); } return t; } GetPerUserGainLevel(e) { let t = this.m_mapPerUserOutputGain.get(e); return null == t ? 1 : t.gain; } GetPerUserMuting(e) { let t = this.m_mapPerUserOutputGain.get(e); return null != t && t.muted; } SetPerUserMuting(e, t) { let n = this.m_mapPerUserOutputGain.get(e); null == n && (n = new H()), (n.muted = t || this.m_bOutputMuted), this.m_mapPerUserOutputGain.set(e, n), this.UpdateStreamsForPerUseGainChange(e); } SetPerUserGainLevel(e, t) { let n = Math.max(0, Math.min(4, t)), i = this.m_mapPerUserOutputGain.get(e); null == i && (i = new H()), (i.gain = n), i.gain < 0.001 ? (i.muted = !0) : (i.muted = !1), this.m_mapPerUserOutputGain.set(e, i), this.UpdateStreamsForPerUseGainChange(e); } UpdateStreamsForPerUseGainChange(e) { let t = this.m_mapPerUserOutputGain.get(e); null == t && (t = new H()); for (let n = 0; n < this.m_rgAudioStreams.length; ++n) { let i = this.m_rgAudioStreams[n]; if (i.accountid == e && null != i.output_gain_node) { (i.muted = t.muted), i.output_gain_node.gain.setValueAtTime(this.m_Settings.m_VoiceOutputGain * t.gain, this.m_AudioContext.currentTime); let e = i.stream.getTracks(); for (let t = 0; t < e.length; t++) e[t].enabled = !i.muted; } } } OnUserLeftChatRoomVoiceChat(e, t, n, i) { let o = { groupID: e, chatID: t }; this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_RequestedPermission && this.m_VoiceCallState.BMatchingCall(0, o) && (n != this.m_CMInterface.steamid.GetAccountID() || i || (this.LogMsg("(ChatRoom) We were told that we left chat " + t + " but we hadn't initiated that, trying to reconnect..."), this.RestartVoiceChatIfConnected())); } IsMicTestActive() { return this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_LocalMicOnly; } IsAnyVoiceActive() { return !(this.m_VoiceCallState.m_eState <= A.k_EVoiceCallState_LocalMicOnly && 0 == this.m_VoiceCallState.m_targetAccountID && null == this.m_VoiceCallState.m_chatRoom) && (this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_None || 0 != this.m_ScheduledInitiate); } BSelfHasAcceptedOrInitiatedOneOnOneChat(e) { return this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_None && this.m_VoiceCallState.m_targetAccountID == e && (!!this.m_VoiceCallState.m_bInitiatedOneOnOneCall || this.m_VoiceCallState.m_eState >= A.k_EVoiceCallState_NotifyingVoiceChatOfWebRTCSession); } BSelfHadPreviouslyJoinedOneOnOneChat(e) { let t = this.m_mapOneOnOneCallsWaitingJoinOrAccept.get(e); if (null == t) return !1; if (t.partner_accountid != this.m_CMInterface.steamid.GetAccountID()) return !1; let n = t.voice_chatid; return t.previously_joined && "" != n; } BPartnerHasAcceptedOrInitiatedOneOnOneChat(e) { return !(this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_None || this.m_VoiceCallState.m_bInitiatedOneOnOneCall || !this.BPartnerHasRequestedAndIsInOneOnOneChat(e)) || (this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_RequestedPermission && !this.m_VoiceCallState.m_bWaitingOnOneOnOneRejoin); } BPartnerHasRequestedAndIsInOneOnOneChat(e) { let t = this.m_mapOneOnOneCallsWaitingJoinOrAccept.get(e); return null != t && t.partner_accountid == this.m_CMInterface.steamid.GetAccountID() && "" != t.voice_chatid; } IsAttemptingInitialConnection() { return (0 == this.m_VoiceCallState.m_targetAccountID || this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_RequestedPermission) && this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_LocalMicOnly && this.IsAnyVoiceActive() && 0 == this.m_VoiceCallState.m_nFailuresThisInitiate && this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_Connected; } HasBeenAttemptingOverTwoSeconds() { let e = this.m_VoiceCallState.m_bIsConnectionAttemptOverTwoSeconds, t = this.IsAttemptingInitialConnection(); return !!this.m_bForceConnectingStatus || (e && t); } IsAttemptingReconnect() { let e = this.IsAnyVoiceActive(), t = this.m_VoiceCallState.m_nFailuresThisInitiate, n = this.m_VoiceCallState.m_eState; return !!this.m_bForceReconnectingStatus || (e && t > 0 && n != A.k_EVoiceCallState_Connected); } IsVoiceActiveForFriend(e) { return this.IsVoiceActive(e, null); } IsVoiceActiveForRoom(e, t) { return this.IsVoiceActive(0, { groupID: e, chatID: t }); } IsVoiceActiveForGroup(e) { return !!this.m_VoiceCallState.BCallActiveForGroup(e) && this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_None; } IsVoiceChatActive() { return this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_None; } LogMsg(e) { this.m_rgLogLines.push(e), this.m_LogVoiceChatDetails && console.log(e); } GetVoiceLogs() { return this.m_rgLogLines.join("\r\n"); } OnPushToTalkReleased() { ((this.m_bPushToTalkEnabled && null != this.m_MicInputGainNode && !this.m_bVoicePTTStateEnabled) || (this.m_bPushToMuteEnabled && null != this.m_MicInputGainNode && this.m_bVoicePTTStateEnabled)) && this.m_MicInputGainNode.gain.setValueAtTime(this.GetCurrentVoiceInputGainTarget(), this.m_AudioContext.currentTime + 0.2); } DebouncedToggleMicMuting() { this.ToggleMicMuting(), this.GetPushToTalkOrMuteSoundsEnabled() && (this.IsMicMuted() ? h.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_ui_ptt_short_02_quiet.m4a") : h.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_ui_ptt_short_01_quiet.m4a")); } OnPushToTalkStateChange(e) { let t = e, n = !1; h.Ul.SettingsStore.BClientHasFeatureOrOnWeb("NewVoiceHotKeyState") && ((n = !0), this.m_bPushToMuteEnabled && (t = !e)), !n || this.m_bPushToTalkEnabled || this.m_bPushToMuteEnabled ? t != this.m_bVoicePTTStateEnabled && ((this.m_bVoicePTTStateEnabled = t), (this.m_bPushToTalkEnabled || this.m_bPushToMuteEnabled) && null != this.m_MicInputGainNode && (this.m_bVoicePTTStateEnabled ? (this.GetPushToTalkOrMuteSoundsEnabled() && h.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_ui_ptt_short_01_quiet.m4a"), this.m_bPushToMuteEnabled ? (this.m_hPushToTalkReleaseTimeout = SetBackgroundTimeout(this.OnPushToTalkReleased, 100)) : (this.m_MicInputGainNode.gain.setValueAtTime(this.GetCurrentVoiceInputGainTarget(), this.m_AudioContext.currentTime), 0 != this.m_hPushToTalkReleaseTimeout && ClearBackgroundTimeout(this.m_hPushToTalkReleaseTimeout))) : (this.GetPushToTalkOrMuteSoundsEnabled() && h.Ul.AudioPlaybackManager.PlayAudioURL(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_ui_ptt_short_02_quiet.m4a"), this.m_bPushToMuteEnabled ? (this.m_MicInputGainNode.gain.setValueAtTime(this.GetCurrentVoiceInputGainTarget(), this.m_AudioContext.currentTime), 0 != this.m_hPushToTalkReleaseTimeout && ClearBackgroundTimeout(this.m_hPushToTalkReleaseTimeout)) : (this.m_hPushToTalkReleaseTimeout = SetBackgroundTimeout(this.OnPushToTalkReleased, 100))))) : e && null != this.m_MicInputGainNode && this.DebouncedToggleMicMuting(); } GetCurrentVoiceInputGainTarget() { return (this.m_bPushToTalkEnabled && !this.m_bVoicePTTStateEnabled) || (this.m_bPushToMuteEnabled && !this.m_bVoicePTTStateEnabled) ? 0 : this.m_Settings.m_VoiceInputGain; } RestartVoiceChatIfConnected() { if (this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_ScheduledInitiate) { let e = this.m_VoiceCallState.m_targetAccountID, t = this.m_VoiceCallState.m_chatRoom; this.LogMsg("(WebRTC) Ending then auto-re-initiating voice chat - without leave of chatroom if joined as attempt is quick rejoin"), this.EndVoiceChatInternal(!0), this.InitiateVoiceChat(e, t); } } GetNoiseGateOptions() { let e = { attack: 2, release: 0.01, threshold: -80, bufferSize: 1024 }; switch (this.m_Settings.m_NoiseGateLevel) { case G.S7.k_ENoiseGateLevel_Off: break; case G.S7.k_ENoiseGateLevel_Low: e = { attack: 0.8, release: 0.06, threshold: -48, bufferSize: 1024 }; break; case G.S7.k_ENoiseGateLevel_Medium: e = { attack: 0.8, release: 0.06, threshold: -36, bufferSize: 1024 }; break; case G.S7.k_ENoiseGateLevel_High: e = { attack: 0.8, release: 0.09, threshold: -22, bufferSize: 1024 }; } return e; } DeleteOneOnOneCallWaitingJoinOrAccept(e) { let t = this.m_mapOneOnOneCallsWaitingJoinOrAccept.get(e); null != t && (t.ClearAudioRepeats(), this.m_mapOneOnOneCallsWaitingJoinOrAccept.delete(e)); } UpdateNoiseGateOnActiveMic() { if (null != this.m_MicInputGainNode) { let e; for (let t = 0; t < this.m_rgAudioStreams.length; ++t) { let n = this.m_rgAudioStreams[t]; if (n.type == R.k_EAudioStreamType_Microphone) { e = n; break; } } if (null != e) { if (null != this.m_MicNoiseGate) this.m_MicInputGainNode.disconnect(this.m_MicNoiseGate.input), this.m_MicNoiseGate.input ? (this.m_MicNoiseGate.input.disconnect(), this.m_MicNoiseGate.output.disconnect(), this.m_MicNoiseGate.noiseGateKernel_.disconnect()) : this.m_MicNoiseGate.disconnect(), (this.m_MicNoiseGate = void 0); else { this.m_MicInputGainNode.disconnect(e.destination_node); try { this.m_MicInputGainNode.disconnect(e.output_gain_node); } catch (e) {} } this.m_MicVolumeMeter.stop(), (this.m_MicVolumeMeter = void 0), null != e.volume_meter && (e.volume_meter.stop(), (e.volume_meter = void 0)), this.m_Settings.m_NoiseGateLevel != G.S7.k_ENoiseGateLevel_Off ? this.SetupNoiseGateOnMic(e.destination_node) : this.m_MicInputGainNode.connect(e.destination_node); let t = e.source_node; this.m_MicNoiseGate && (t = this.m_MicNoiseGate.output ? this.m_MicNoiseGate.output : this.m_MicNoiseGate), (this.m_MicVolumeMeter = new w(t, this.m_AudioContext)), (e.volume_meter = this.m_MicVolumeMeter), this.m_VoiceEchoLocalMic && null == this.m_MicNoiseGate ? this.m_MicInputGainNode.connect(e.output_gain_node) : this.m_VoiceEchoLocalMic && (this.m_MicNoiseGate.output ? this.m_MicNoiseGate.output.connect(e.output_gain_node) : this.m_MicNoiseGate.connect(e.output_gain_node)); } } } OnAudioContextStateChange() { null != this.m_AudioContext && this.LogMsg("(WebAudio) Audio context state changed: " + this.m_AudioContext.state); } OnIceCandidate(e) { this.LogMsg("(ICE) Local candidate: " + JSON.stringify(e.candidate)); } AddRemoteIceCandidate(e, t) { let n = this.LogMsg; n("(ICE) Candidate from remote peer: " + JSON.stringify(t)), e .addIceCandidate(t) .then(function () {}) .catch(function (e) { n("addIceCandidate error: " + e + " " + e.name); }); } OnSignalingStateChange(e, t) { this.LogMsg("(WebRTC) OnSignalingStateChange: " + e.signalingState); } OnIceConnectionStateChange(e, t) { this.LogMsg("(ICE) OnIceConnectionStateChange: " + e.iceConnectionState), "failed" == e.iceConnectionState && this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_CreatePeerConnection ? this.BackOffAndRetryInitiateVoiceChat() : ("completed" != e.iceConnectionState && "connected" != e.iceConnectionState) || this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_WebRTCConnectedWaitingOnIceConnected || (this.LogMsg("(VoiceChat) ICE connection state now 'completed' or 'connected', proceeding to join voice chat"), this.JoinVoiceChatOrAskForOneOnOneChatNow()); } OnIceGatheringStateChange(e, t) { this.LogMsg("(ICE) OnIceGatheringStateChange: " + e.iceGatheringState); } RemoveStreamToOutput(e) { this.LogMsg("(WebRTC) RemoveStreamToOutput - " + e.id + " - " + e.getTracks().length); for (let t = 0; t < this.m_rgAudioStreams.length; ++t) { let n = this.m_rgAudioStreams[t]; if (n.unique_id == e.id) { if ((n.elem.pause(), (n.elem.srcObject = void 0), (n.elem.src = void 0), (n.elem = void 0), null != n.volume_meter && (n.volume_meter.stop(), (n.volume_meter = void 0)), null != n.output_gain_node && (n.output_gain_node.disconnect(), (n.output_gain_node = void 0)), null != n.source_node)) { try { n.source_node.disconnect(); } catch (e) {} n.source_node = void 0; } return void this.m_rgAudioStreams.splice(t, 1); } } for (let t = 0; t < this.m_rgVideoStreams.length; ++t) { if (this.m_rgVideoStreams[t].unique_id == e.id) return void this.m_rgVideoStreams.splice(t, 1); } } OnRemoveRemoteStream(e) { this.RemoveStreamToOutput(e.stream); } SetupAudioStreamElementAndCreateSourceNode(e, t) { let n = -1 != this.m_PeerConnection.localDescription.sdp.indexOf("mozilla..."); null != e.source_node && (e.source_node.disconnect(), (e.source_node = void 0)), null == e.elem ? (e.elem = document.createElement("audio")) : (e.elem.srcObject = void 0), (e.elem.srcObject = t), n ? (e.elem.play(), (e.source_node = this.m_AudioContext.createMediaElementSource(e.elem))) : (e.source_node = this.m_AudioContext.createMediaStreamSource(t)); } static DistanceBetween(e, t) { const n = e.x - t.x, i = e.y - t.y, o = e.z - t.z; return Math.sqrt(n * n + i * i + o * o); } GenerateVoicePositions() { const e = []; for (let t = 0; t < j.k_nMaxPositions; ++t) { const n = (2 * Math.PI * t) / j.k_nMaxPositions; e.push({ x: Math.cos(n), y: 0, z: Math.sin(n) }); } const t = [], n = new Set(); for (t.push(0), n.add(0); t.length < e.length; ) { let i = -1, o = -1; for (let r = 0; r < e.length; ++r) { if (n.has(r)) continue; let a = 1e4; for (let n = 0; n < t.length; ++n) a = Math.min(a, j.DistanceBetween(e[t[n]], e[r])); a > o && ((o = a), (i = r)); } t.push(i), n.add(i); } this.m_rgPositions = []; for (let n = 0; n < t.length; ++n) this.m_rgPositions.push(e[t[n]]); for (let e = t.length - 1; e >= 0; --e) this.m_rgFreePositionIndices.push(e); } GetNextVoiceChatPositionIndex() { return this.m_rgFreePositionIndices.pop(); } GetVoiceChatPosition(e) { if (null == e) return { x: 0, y: 0, z: 0 }; const t = Math.min(e, this.m_rgPositions.length - 1); return this.m_rgPositions[t]; } SetLocalHMDPose(e) { (this.m_localPose = e), this.m_AudioContext.listener.positionX.setValueAtTime(e.position[0], this.m_AudioContext.currentTime), this.m_AudioContext.listener.positionY.setValueAtTime(e.position[1], this.m_AudioContext.currentTime), this.m_AudioContext.listener.positionZ.setValueAtTime(e.position[2], this.m_AudioContext.currentTime), this.m_AudioContext.listener.forwardX.setValueAtTime(e.ahead[0], this.m_AudioContext.currentTime), this.m_AudioContext.listener.forwardY.setValueAtTime(e.ahead[1], this.m_AudioContext.currentTime), this.m_AudioContext.listener.forwardZ.setValueAtTime(e.ahead[2], this.m_AudioContext.currentTime), this.m_AudioContext.listener.upX.setValueAtTime(e.up[0], this.m_AudioContext.currentTime), this.m_AudioContext.listener.upY.setValueAtTime(e.up[1], this.m_AudioContext.currentTime), this.m_AudioContext.listener.upZ.setValueAtTime(e.up[2], this.m_AudioContext.currentTime); } SetRemoteHMDPose(e, t) { var n, i, o; this.m_mapRemotePoseForAccountID.set(e, t); for (const r of this.m_rgAudioStreams) if (r.accountid === e) { null === (n = r.spatializer_node) || void 0 === n || n.positionX.setValueAtTime(t.position[0], this.m_AudioContext.currentTime), null === (i = r.spatializer_node) || void 0 === i || i.positionY.setValueAtTime(t.position[1], this.m_AudioContext.currentTime), null === (o = r.spatializer_node) || void 0 === o || o.positionZ.setValueAtTime(t.position[2], this.m_AudioContext.currentTime); break; } } GetLocalHMDPose() { return this.m_localPose; } GetRemoteHMDPose(e) { return this.m_mapRemotePoseForAccountID.get(e); } GetRemoteHMDPoseMap() { return this.m_mapRemotePoseForAccountID; } AddStreamToOutput(e) { let t = e.id.match(/Peer-(\d+)-(\d+)-/), n = t && 3 == t.length ? Number(t[2]) : 0; if (e.getAudioTracks().length > 0) { let t = new O(); if ((this.SetupAudioStreamElementAndCreateSourceNode(t, e), (t.unique_id = e.id), (t.stream = e), (t.type = R.k_EAudioStreamType_IncomingStream), (t.accountid = n), this.LogMsg("(VoiceChat) AddStreamToOutput (audio) " + t.accountid + " " + t.unique_id), (t.muted = this.m_bOutputMuted || this.GetPerUserMuting(t.accountid)), t.muted)) { let e = t.stream.getTracks(); for (let n = 0; n < e.length; n++) e[n].enabled = !t.muted; } this.m_rgAudioStreams.push(t), (t.output_gain_node = this.m_AudioContext.createGain()), t.output_gain_node.gain.setValueAtTime(this.m_Settings.m_VoiceOutputGain * this.GetPerUserGainLevel(t.accountid), this.m_AudioContext.currentTime), t.source_node.connect(t.output_gain_node), t.output_gain_node.connect(h.Ul.AudioPlaybackManager.GetActiveDestination()), (t.volume_meter = new w(t.source_node, this.m_AudioContext)), t.volume_meter.Connect(t.source_node); } if (0 != n && e.getVideoTracks().length > 0) { let t = new F(); (t.unique_id = e.id), (t.stream = e), (t.accountid = n), this.LogMsg("(VoiceChat) AddStreamToOutput (video) " + t.accountid + " " + t.unique_id), this.m_rgVideoStreams.push(t); } } OnAddTrack(e, t) { for (let t = 0; t < this.m_rgAudioStreams.length; ++t) { let n = this.m_rgAudioStreams[t]; if (n.unique_id == e.id && (this.LogMsg("(VoiceChat) OnAddTrack to existing stream " + n.accountid + " " + n.unique_id), n.volume_meter.DisconnectAll(), this.SetupAudioStreamElementAndCreateSourceNode(n, e), n.volume_meter.Connect(n.source_node), n.source_node.connect(n.output_gain_node), n.muted)) { let e = n.stream.getTracks(); for (let t = 0; t < e.length; t++) e[t].enabled = !n.muted; } } } OnAddRemoteStream(e) { if ((this.LogMsg("(WebRTC) OnAddRemoteStream - " + e.stream.id + " - " + e.stream.getTracks().length), null != this.m_AudioContext)) { if (null != e.stream && null != this.m_AudioContext) { this.AddStreamToOutput(e.stream); let t = this; e.stream.onaddtrack = function (e) { t.OnAddTrack(this, e); }; } } else this.LogMsg("(WebRTC)Got OnAddRemoteStream when we don't have audio context... stopped chat?"); } ModifyLocalSDPBeforeSetting(e) { let t = /a=rtpmap:(\d+)\sopus(.*)/, n = /a=fmtp:(\d+)\s(.*)/, i = e.sdp.split("\r\n"), o = -1 != e.sdp.indexOf("mozilla..."), r = !1; for (let e = 0; e < i.length; ++e) { let a = i[e]; if ("m=" == a.substr(0, 2) && e + 1 < i.length) { let s = "0"; for (let n = e + 1; n < i.length; ++n) { if (((a = i[n]), "m=" == a.substr(0, 2))) { e = n - 1; break; } let o = a.match(t); if (o) { s = o[1]; break; } } if ("0" != s) for (let t = e + 1; t < i.length; ++t) { if (((a = i[t]), "m=" == a.substr(0, 2))) { e = t - 1; break; } let l = a.match(n); if (l && l[1] == s) { o || (i[t] = "a=fmtp:" + l[1] + " minptime=10;useinbandfec=1;usedtx=1"), (r = !0); break; } } } } return r && (e.sdp = i.join("\r\n")), e; } OnCreateOfferSuccess(e, t) { if (this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_CreatePeerConnection) return void this.LogMsg("(WebRTC) Hit OnCreateOfferSuccess in wrong state " + this.m_VoiceCallState.m_eState); this.LogMsg("(WebRTC) OnCreateOfferSuccess"); let n = this; (t = this.ModifyLocalSDPBeforeSetting(t)), e .setLocalDescription(t) .then(function () { let e = r.gA.Init(E.Mm); e.Body().set_sdp(JSON.stringify(t)); let i = new T.UAParser(navigator.userAgent).getResult(); e.Body().set_browser_name(i.browser.name), e.Body().set_browser_version(i.browser.version), n.LogMsg("(WebRTC) Offer (Local Description): " + e.Body().sdp()), (n.m_VoiceCallState.m_eState = A.k_EVoiceCallState_InitatedWebRTCSession), E.Kp.InitiateWebRTCConnection(n.m_CMInterface.GetServiceTransport(), e) .then((e) => { if (null == n.m_PeerConnection) n.LogMsg("(WebRTC) Got response to InitiateWebRTCConnection with no local peer connection"), n.EndVoiceChatInternal(!1); else if (1 == e.GetEResult()) { let t = JSON.parse(e.Body().remote_description()); n.m_PeerConnection .setRemoteDescription(new RTCSessionDescription(t)) .then(function () { n.LogMsg("(WebRTC) Remote Description: " + t.sdp), "offer" == t.type ? (n.LogMsg("(WebRTC) !! received 'offer' rather than 'answer' from InitiateWebRTCConnection, unexpected."), n.EndVoiceChatInternal(!1)) : "answer" == t.type && n.LogMsg("(WebRTC) setRemoteDescription success"); }) .catch(function (e) { n.LogMsg("(WebRTC) setRemoteDescription error: " + e), n.LogMsg("(VoiceChat) Fatal error, ending chat"), n.EndVoiceChatInternal(!1); }); } else n.LogMsg("(WebRTC) Got failure (" + e.GetEResult() + ") response from InitiateWebRTCConnection"), n.BackOffAndRetryInitiateVoiceChat(); }) .catch((e) => { n.LogMsg("(WebRTC) Failure in WebRTCClientService.InitiateWebRTCConnection"), n.BackOffAndRetryInitiateVoiceChat(); }); }) .catch(function (e) { n.LogMsg("(WebRTC) setLocalDescription error: " + e), n.LogMsg("(VoiceChat) Fatal error, ending voice chat"), n.EndVoiceChatInternal(!1); }); } OnCreateOfferError(e) { this.LogMsg("(WebRTC) OnCreateOfferError: " + e), this.LogMsg("(VoiceChat) Fatal Error, ending chat attempt"), this.EndVoiceChatInternal(!1); } CreatePeerConnection(e) { let t = new RTCPeerConnection({ sdpSemantics: "plan-b" }); return ( (t.onicecandidate = (e) => { this.OnIceCandidate(e); }), (t.onaddstream = this.OnAddRemoteStream), (t.onremovestream = this.OnRemoveRemoteStream), (t.oniceconnectionstatechange = (e) => { this.OnIceConnectionStateChange(t, e); }), (t.onicegatheringstatechange = (e) => { this.OnIceGatheringStateChange(t, e); }), (t.onsignalingstatechange = (e) => { this.OnSignalingStateChange(t, e); }), null == e || e.getTracks().forEach((n) => t.addTrack(n, e)), (this.m_PeerConnection = t), this.m_PeerConnection ); } OnMicStreamInactive(e, t) { this.LogMsg("(WebRTC) Mic Stream went inactive: " + t.type), this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_RequestedMicAccess && (this.LogMsg("(WebRTC) Ending then auto-re-initiating voice chat without mic"), this.RestartVoiceChatIfConnected()); } OnNoiseGateMessage(e) { this.LogMsg("(VoiceChat) " + e.data); } SetupNoiseGateOnMic(e) { let t = this.GetNoiseGateOptions(), n = h.Ul.AudioPlaybackManager.supports_audio_worklets; if (n) { this.LogMsg("(VoiceChat) Audio Worklets supported - high performance mic noisegate in use!"); try { let n = window; (this.m_MicNoiseGate = new n.AudioWorkletNode(this.m_AudioContext, "noisegate-processor")), (this.m_MicNoiseGate.port.onmessage = this.OnNoiseGateMessage), this.m_MicInputGainNode.connect(this.m_MicNoiseGate).connect(e), this.m_MicNoiseGate.parameters.get("threshold").setValueAtTime(t.threshold, this.m_AudioContext.currentTime), this.m_MicNoiseGate.parameters.get("attack").setValueAtTime(t.attack, this.m_AudioContext.currentTime), this.m_MicNoiseGate.parameters.get("release").setValueAtTime(t.release, this.m_AudioContext.currentTime), this.m_MicNoiseGate.parameters.get("sampleRate").setValueAtTime(this.m_AudioContext.sampleRate, this.m_AudioContext.currentTime); } catch (e) { this.LogMsg("(VoiceChat) creating AudioWorkletNode failed: " + e), (n = !1); } } n || (this.LogMsg("(VoiceChat) Browser doesn't support audio worklets, mic perf will suffer and may stutter/echo during repaint/high CPU usage"), (this.m_MicNoiseGate = new D(this.m_AudioContext, t)), this.m_MicInputGainNode.connect(this.m_MicNoiseGate.input), this.m_MicNoiseGate.output.connect(e)); } OnGetUserMediaSuccess(e) { if (this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_RequestedMicAccess) { if (((this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_CreatePeerConnection), (null == e ? void 0 : e.getAudioTracks().length) > 0)) { e.id; let t = this.m_AudioContext.createMediaStreamSource(e), n = this; (e.oninactive = function (e) { n.OnMicStreamInactive(this, e); }), (this.m_MicInputGainNode = this.m_AudioContext.createGain()), this.m_MicInputGainNode.gain.setValueAtTime(this.GetCurrentVoiceInputGainTarget(), this.m_AudioContext.currentTime), t.connect(this.m_MicInputGainNode); let i = this.m_AudioContext.createMediaStreamDestination(); this.m_Settings.m_NoiseGateLevel != G.S7.k_ENoiseGateLevel_Off ? this.SetupNoiseGateOnMic(i) : this.m_MicInputGainNode.connect(i), e.getVideoTracks().forEach((e) => i.stream.addTrack(e)), (e = i.stream); let o = new O(); (o.unique_id = e.id), (o.destination_node = i), (o.stream = e), (o.source_node = t), (o.type = R.k_EAudioStreamType_Microphone), (o.accountid = this.m_CMInterface.steamid.GetAccountID()), (o.muted = !1), (o.elem = void 0), (o.output_gain_node = this.m_AudioContext.createGain()), o.output_gain_node.gain.setValueAtTime(this.m_Settings.m_VoiceOutputGain, this.m_AudioContext.currentTime), o.output_gain_node.connect(h.Ul.AudioPlaybackManager.GetActiveDestination()), this.m_rgAudioStreams.push(o); let r = t; this.m_MicNoiseGate && (r = null != this.m_MicNoiseGate.output ? this.m_MicNoiseGate.output : this.m_MicNoiseGate), (this.m_MicVolumeMeter = void 0), (this.m_MicVolumeMeter = new w(r, this.m_AudioContext)), (o.volume_meter = this.m_MicVolumeMeter), this.m_VoiceEchoLocalMic && null == this.m_MicNoiseGate ? this.m_MicInputGainNode.connect(o.output_gain_node) : this.m_VoiceEchoLocalMic && (this.m_MicNoiseGate.output ? this.m_MicNoiseGate.output.connect(o.output_gain_node) : this.m_MicNoiseGate.connect(o.output_gain_node)); } if (0 != this.m_VoiceCallState.m_targetAccountID || null != this.m_VoiceCallState.m_chatRoom) { let t = { offerToReceiveAudio: 1, offerToReceiveVideo: this.m_bReceiveVideo ? 1 : 0, voiceActivityDetection: !0 }, n = this.CreatePeerConnection(e), i = this; n.createOffer(t) .then(function (e) { i.OnCreateOfferSuccess(n, e); }) .catch(function (e) { i.OnCreateOfferError(e); }); } else (this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_LocalMicOnly), (this.m_VoiceCallState.m_timeFinishedConnecting = performance.now()); } else { for (let t of e.getTracks()) t.stop(); this.LogMsg("(VoiceChat) Hit OnGetUserMediaSuccess in wrong state " + this.m_VoiceCallState.m_eState); } } OnGetUserMediaFailure(e) { if (this.m_VoiceCallState.m_eState <= A.k_EVoiceCallState_ScheduledInitiate) return; if (this.m_bSendVideo) return this.LogMsg("(VoiceChat) The following error occured getting media stream: " + e.name), this.LogMsg("(VoiceChat) Retrying without video"), (this.m_bSendVideo = !1), (this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_ScheduledInitiate), void this.OnRequestMicrophoneAccess(); let t = this, n = navigator; n.permissions && n.permissions.query({ name: "microphone" }).then(function (e) { "granted" == e.state || ("denied" == e.state ? (t.m_bUserHasDeniedMicPermissions = !0) : e.state); }), this.LogMsg("(WebAudio) The following error occured getting audio stream: " + e.name), this.OnGetUserMediaSuccess(void 0); } InitiateChatRoomVoice() { this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_ScheduledInitiate ? this.LogMsg("(VoiceChat) Hit InitiateChatRoomVoice in wrong state " + this.m_VoiceCallState.m_eState) : h.Ul.AudioPlaybackManager.SetVoiceActive(this.OnRequestMicrophoneAccess); } JoinVoiceChatOrAskForOneOnOneChatNow() { if (0 == this.m_VoiceCallState.m_targetAccountID) { this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_RequestedPermission; let e = r.gA.Init(I.Qg); e.Body().set_chat_group_id(this.m_VoiceCallState.m_chatRoom.groupID), e.Body().set_chat_id(this.m_VoiceCallState.m_chatRoom.chatID), this.LogMsg("(VoiceChat) InitiateChatRoomVoice request to group: " + this.m_VoiceCallState.m_chatRoom.groupID + ", room: " + this.m_VoiceCallState.m_chatRoom.chatID), I.Xn.JoinVoiceChat(this.m_CMInterface.GetServiceTransport(), e) .then((e) => { 1 == e.GetEResult() ? ((this.m_VoiceCallState.m_voiceChatID = e.Body().voice_chatid()), this.OnVoiceChatAccepted(!0)) : 2 == e.GetEResult() ? this.BackOffAndRetryInitiateVoiceChat() : this.OnVoiceChatAccepted(!1); }) .catch((e) => { this.BackOffAndRetryInitiateVoiceChat(); }); } else if (((this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_RequestedPermission), "" == this.m_VoiceCallState.m_voiceChatID)) { let e = r.gA.Init(y.zQ); e.Body().set_steamid_partner(u.K.InitFromAccountID(this.m_VoiceCallState.m_targetAccountID).ConvertTo64BitString()), this.LogMsg("(VoiceChat) InitiateOneOnOneVoiceChat request to " + this.m_VoiceCallState.m_targetAccountID), y.p3.RequestOneOnOneChat(this.m_CMInterface.GetServiceTransport(), e).then((e) => { if (1 == e.GetEResult()) { this.LogMsg("(VoiceChat) Waiting on acceptance from " + this.m_VoiceCallState.m_targetAccountID), (this.m_VoiceCallState.m_voiceChatID = e.Body().voice_chatid()); let t = h.Ul.FriendStore.self, n = h.Ul.ChatStore.GetFriendChat(this.m_VoiceCallState.m_targetAccountID, !1); null != t && null != n && n.AddVoiceChannelInviteMsg(this.m_CMInterface.steamid.GetAccountID(), h.Ul.GetServerRTime32(), (0, k.Xx)("#FriendMsg_VoiceChannelInvite", t.display_name, n.chat_partner.display_name)); } else this.LogMsg("(VoiceChat) Initiating voice chat to " + this.m_VoiceCallState.m_targetAccountID + " has failed."), this.EndVoiceChatInternal(!1); }); } else this.OnVoiceChatAccepted(!0); } OnVoiceChatAccepted(e) { this.m_VoiceCallState.m_eState < A.k_EVoiceCallState_RequestedPermission ? this.LogMsg("(VoiceChat) Hit OnVoiceChatAccepted in wrong state " + this.m_VoiceCallState.m_eState) : null != this.m_VoiceCallState.m_webRTCConnectedNotification ? e ? (this.m_VoiceCallState.m_targetAccountID ? ((this.m_VoiceCallState.m_bIsConnectionAttemptOverTwoSeconds = !1), (this.m_VoiceCallState.m_timeStartedConnecting = performance.now()), this.LogMsg("(VoiceChat) Call accepted to individual " + this.m_VoiceCallState.m_targetAccountID)) : this.m_VoiceCallState.m_chatRoom && this.LogMsg("(VoiceChat) Call accepted to room " + this.m_VoiceCallState.m_chatRoom.chatID), this.OnWebRTCConnectedAndVoiceChatConnected()) : this.m_VoiceCallState.m_targetAccountID ? (this.LogMsg("(VoiceChat) Call rejected to individual " + this.m_VoiceCallState.m_targetAccountID), this.OnUserEndVoiceChat()) : this.m_VoiceCallState.m_chatRoom && (this.LogMsg("(VoiceChat) Call rejected to room " + this.m_VoiceCallState.m_chatRoom.chatID), this.EndVoiceChatInternal(!1)) : this.LogMsg("(VoiceChat) Hit OnVoiceChatAccepted without WebRTC connected"); } InitiateOneOnOneVoiceChat(e) { this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_ScheduledInitiate ? this.LogMsg("(VoiceChat) Hit InitiateOneOnOneVoiceChat in wrong state " + this.m_VoiceCallState.m_eState) : (null == this.m_VoiceCallState.m_timeStartedConnecting && (this.m_VoiceCallState.m_timeStartedConnecting = performance.now()), 0 == this.m_ConnectionCheck && (this.m_ConnectionCheck = SetBackgroundInterval(this.CheckConnection, 2e3)), h.Ul.AudioPlaybackManager.SetVoiceActive(this.OnRequestMicrophoneAccess)); } IPIntToString(e) { return (e >>> 24) + "." + ((e >> 16) & 255) + "." + ((e >> 8) & 255) + "." + (255 & e); } OnSetUpdatedLocalDescriptionSuccess() { this.LogMsg("(WebRTC) OnSetUpdatedLocalDescriptionSuccess"); let e = r.gA.Init(E.VG); e.Body().set_ip_webrtc_server(this.m_VoiceCallState.m_webRTCServerIP), e.Body().set_port_webrtc_server(this.m_VoiceCallState.m_webRTCServerPort), e.Body().set_ip_webrtc_session_client(this.m_VoiceCallState.m_webRTCClientIP), e.Body().set_port_webrtc_session_client(this.m_VoiceCallState.m_webRTCClientPort), e.Body().set_remote_description_version(this.m_VoiceCallState.m_nMostRecentRemoteDescriptionVersion), E.Kp.AcknowledgeUpdatedRemoteDescription(this.m_CMInterface.GetServiceTransport(), e).then((e) => {}); } OnSetUpdatedLocalDescriptionFailure(e) { this.LogMsg("(WebRTC) OnSetUpdatedLocalDescriptionFailure: " + e), this.EndVoiceChatInternal(!1); } OnCreateAnswerSuccess(e) { this.LogMsg("(WebRTC) OnCreateAnswerSuccess: " + JSON.stringify(e)); let t = this; if ( (this.m_PeerConnection .setLocalDescription(e) .then(function () { t.OnSetUpdatedLocalDescriptionSuccess(); }) .catch(function (e) { t.OnSetUpdatedLocalDescriptionFailure(e); }), (this.m_VoiceCallState.m_bOfferUpdateInProgress = !1), null != this.m_VoiceCallState.m_msgPendingRemoteDescriptionUpdate) ) { let e = this.m_VoiceCallState.m_msgPendingRemoteDescriptionUpdate; (this.m_VoiceCallState.m_msgPendingRemoteDescriptionUpdate = void 0), this.ProcessUpdatedRemoteDescription(e); } } OnCreateAnswerError(e) { this.LogMsg("(WebRTC) OnCreateAnswerError: " + e), this.EndVoiceChatInternal(!1); } ProcessUpdatedRemoteDescription(e) { (this.m_VoiceCallState.m_bOfferUpdateInProgress = !0), this.m_mapSSRCToAccountID.clear(); let t = e.ssrcs_to_accountids(); for (let e = 0; e < t.length; ++e) { let n = t[e]; this.m_mapSSRCToAccountID.set(n.ssrc(), n.accountid()); } let n = this, i = JSON.parse(e.remote_description()); return ( this.m_PeerConnection .setRemoteDescription(new RTCSessionDescription(i)) .then(function () { n.LogMsg("(WebRTC) Updated Remote Description: " + i.sdp), "offer" == i.type ? (n.LogMsg("(WebRTC) setRemoteDescription success with new offer"), n.m_PeerConnection .createAnswer() .then(function (e) { n.OnCreateAnswerSuccess(e); }) .catch(function (e) { n.OnCreateAnswerError(e); }), (n.m_VoiceCallState.m_nMostRecentRemoteDescriptionVersion = e.remote_description_version())) : "answer" == i.type && (n.LogMsg("(WebRTC) setRemoteDescription success"), (n.m_VoiceCallState.m_bOfferUpdateInProgress = !1)); }) .catch(function (e) { n.LogMsg("(WebRTC) setRemoteDescription error: " + e), n.LogMsg("(VoiceChat) Fatal error, ending chat"), n.EndVoiceChatInternal(!1); }), 1 ); } SendVoiceStatusUpdate() { let e = this.IsMicMuted(), t = this.IsOutputMuted(), n = r.gA.Init(y.Jv); n.Body().set_user_steamid(this.m_CMInterface.steamid.ConvertTo64BitString()), n.Body().set_voice_chatid(this.m_VoiceCallState.m_voiceChatID), n.Body().set_user_muted_mic_locally(e), n.Body().set_user_muted_output_locally(t), n.Body().set_user_has_no_mic_for_session(this.BNoMicAvailableForSession()), n.Body().set_user_webaudio_sample_rate(h.Ul.AudioPlaybackManager.GetLastObservedSampleRate()), y.p3.NotifyUserVoiceStatus(this.m_CMInterface.GetServiceTransport(), n), "undefined" != typeof SteamClient && null != SteamClient.WebChat && null != SteamClient.WebChat.SetVoiceChatStatus && SteamClient.WebChat.SetVoiceChatStatus(e, t); } UpdateUserVoiceStatus(e) { if (this.m_VoiceCallState.m_voiceChatID != e.voice_chatid()) return; let t = new u.K(e.user_steamid()), n = this.m_mapUserVoiceStatus.get(t.GetAccountID()); null == n && (n = new W()), (n.mic_muted_locally = e.user_muted_mic_locally()), (n.output_muted_locally = e.user_muted_output_locally()), (n.has_no_mic_for_session = e.user_has_no_mic_for_session()); let i = h.Ul.FriendStore.GetPlayerIfCached(t.GetAccountID()), o = "[U:1:" + t.GetAccountID() + "]", r = ""; null != i && (r = i.display_name + " "); let a = ""; (a = n.has_no_mic_for_session ? "nomic" : n.mic_muted_locally ? "muted" : "on"), this.LogMsg("(VoiceChat) User " + r + o + " status now: mic(" + a + ") output(" + (n.output_muted_locally ? "muted" : "on") + ")"), this.m_mapUserVoiceStatus.set(t.GetAccountID(), n); } OnWebRTCConnectedAndVoiceChatConnected() { let e = this.m_VoiceCallState.m_webRTCConnectedNotification; (this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_NotifyingVoiceChatOfWebRTCSession), this.LogMsg("(WebRTC) WebRTC session connected " + this.IPIntToString(e.client_ip()) + ":" + e.client_port() + " => " + this.IPIntToString(e.server_ip()) + ":" + e.server_port()), "" == this.m_VoiceCallState.m_voiceChatID && (this.LogMsg("(VoiceChat) Reached OnWebRTCConnectedAndVoiceChatConnected without voice chat id? Failing."), this.EndVoiceChatInternal(!1)); let t = r.gA.Init(y.tF); t.Body().set_voice_chatid(this.m_VoiceCallState.m_voiceChatID), t.Body().set_ssrc_my_sending_stream(e.ssrc()), t.Body().set_ip_webrtc_client(e.client_ip()), t.Body().set_port_webrtc_client(e.client_port()), t.Body().set_ip_webrtc_server(e.server_ip()), t.Body().set_port_webrtc_server(e.server_port()), t.Body().set_has_webrtc_data_channel(this.BSupportsDataChannels()), t.Body().set_has_audio_worklets_support(h.Ul.AudioPlaybackManager.supports_audio_worklets), t.Body().set_user_agent(navigator.userAgent), y.p3 .UpdateVoiceChatWebRTCData(this.m_CMInterface.GetServiceTransport(), t) .then((e) => { 1 == e.GetEResult() ? ((this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_Connected), (this.m_VoiceCallState.m_timeFinishedConnecting = performance.now()), this.SendVoiceStatusUpdate(), this.LogMsg("(WebRTC) Updated voice session with WebRTC session data " + this.m_VoiceCallState.m_voiceChatID), e.Body().send_client_voice_logs() && this.ScheduleClientVoiceLogsUpload(2), this.CheckConnection(), this.BSupportsDataChannels() != b.BHasDataChannels() && this.RenegotiateSDP()) : (this.LogMsg("(WebRTC) Error updating voice session with WebRTC session data " + this.m_VoiceCallState.m_voiceChatID), this.BackOffAndRetryInitiateVoiceChat()); }) .catch((e) => { this.LogMsg("(WebRTC) Error updating voice session with WebRTC session data " + this.m_VoiceCallState.m_voiceChatID), this.BackOffAndRetryInitiateVoiceChat(); }); } OnAcceptOneOnOneVoiceChat(e, t) { this.m_VoiceCallState.m_targetAccountID != e.GetAccountID() && this.EndVoiceChatInternal(!1), (this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_None), (this.m_VoiceCallState.m_targetAccountID = e.GetAccountID()), (this.m_VoiceCallState.m_bInitiatedOneOnOneCall = !1), (this.m_VoiceCallState.m_bWaitingOnOneOnOneRejoin = !1), (this.m_VoiceCallState.m_bPostedOneOnOneEndedMsg = !1), (this.m_VoiceCallState.m_chatRoom = null), (this.m_VoiceCallState.m_voiceChatID = t); let n = r.gA.Init(y.MY); n.Body().set_steamid_partner(e.ConvertTo64BitString()), n.Body().set_accepted_request(!0), n.Body().set_voice_chatid(t), y.p3.AnswerOneOnOneChat(this.m_CMInterface.GetServiceTransport(), n).then((t) => { 1 == t.GetEResult() ? (e.GetAccountID() && this.DispatchSetVoiceChatActive(!0), this.InitiateOneOnOneVoiceChat(e.GetAccountID())) : (this.LogMsg("(VoiceChat) Failed responding to voice chat from " + e.GetAccountID()), this.EndVoiceChatInternal(!1)); }); } OnRejectOneOnOneVoiceChat(e, t) { let n = r.gA.Init(y.MY); n.Body().set_steamid_partner(e.ConvertTo64BitString()), n.Body().set_accepted_request(!1), n.Body().set_voice_chatid(t), y.p3.AnswerOneOnOneChat(this.m_CMInterface.GetServiceTransport(), n).then((t) => { 1 == t.GetEResult() || this.LogMsg("(VoiceChat) Failed responding to voice chat from " + e.GetAccountID()); }); } PlayRingSound(e) { this.m_mapOneOnOneCallsWaitingJoinOrAccept.get(e).audio_buffer = h.Ul.AudioPlaybackManager.PlayAudioURLWithRepeats(o.De.COMMUNITY_CDN_URL + "public/sounds/webui/steam_phonecall.m4a?v=1", 1); } IsVoiceActive(e, t) { return !!this.m_VoiceCallState.BMatchingCall(e, t) && this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_None; } CheckVoiceSnoozeTiemout() { if (h.Ul.IdleTracker.GetUserIdleTime() > 3600) { let e = this.m_MicVolumeMeter.GetLastTimeNonZero(); performance.now() - e > 36e5 && (this.OnUserEndVoiceChat(), h.Ul.ShowAlert((0, k.Xx)("#Voice_LeftIdleVoiceChat_Title"), (0, k.Xx)("#Voice_LeftIdleVoiceChat_Body"), (0, k.Xx)("#Voice_LeftIdleVoiceChat_OK")) .then(() => {}) .catch(() => !0)); } } ProcessStatsReport() { if ((this.CheckVoiceSnoozeTiemout(), null == this.m_PeerConnection)) return; if (((this.m_StatsTimeout = SetBackgroundTimeout(this.ProcessStatsReport, 1e4)), o.De.IN_CLIENT && a.F.BClientConnected().then(() => {}), -1 != this.m_PeerConnection.localDescription.sdp.indexOf("mozilla..."))) return; let e = new Date(), t = this, n = this.m_PeerConnection; t.LogMsg("-----------------------------------------------------------"), t.LogMsg(" Voice Report: " + e.toUTCString()), t.LogMsg("-----------------------------------------------------------"); let i = n.getSenders(); if (i.length > 0) { this.LogMsg("(WebRTC) " + this.PadOutput("(Sender SSRC)", 40) + " " + this.PadOutput("Packets Sent", 20) + " " + this.PadOutput("Connection State", 20) + " " + this.PadOutput("Writable", 20) + " " + this.PadOutput("Track State", 20) + " " + this.PadOutput("Round Trip MS", 20) + " " + this.PadOutput("Transport Bytes Sent", 24) + " " + this.PadOutput("Transport Bytes Received", 24) + " "); try { for (let e = 0; e < i.length; ++e) i[e].getStats().then(function (e) { e.forEach((n) => { if ("outbound-rtp" == n.type) { let i = n.ssrc, o = n.packetsSent, r = "", a = "", s = 0, l = 0, c = 0, m = "", d = e.get(n.trackId); null != d && "track" == d.type && (m = d.ended && d.detached ? "ended+detached" : d.ended ? "ended" : d.detached ? "detached" : "active"); let h = e.get(n.transportId); if (null != h && "transport" == h.type) { let t = e.get(h.selectedCandidatePairId); null != t && "candidate-pair" == t.type && ((r = t.state), (a = t.writable ? "writable" : "not-writable"), (s = 1e3 * t.currentRoundTripTime)), (l = h.bytesSent), (c = h.bytesReceived); } t.LogMsg("(WebRTC) " + t.PadOutput(n.kind + " " + String(i), 40) + " " + t.PadOutput(String(o), 20) + " " + t.PadOutput(r, 20) + " " + t.PadOutput(a, 20) + " " + t.PadOutput(m, 20) + " " + t.PadOutput(String(s), 20) + " " + t.PadOutput(String(l), 24) + " " + t.PadOutput(String(c), 24)); } }); }); } catch (e) { t.LogMsg("(WebRTC) Can't log sender stats on this browser"); } } SetBackgroundTimeout(this.ProcessReceiverStatsReport, 100); } ProcessReceiverStatsReport() { if (-1 != this.m_PeerConnection.localDescription.sdp.indexOf("mozilla...")) return; let e = this, t = this.m_PeerConnection; try { t.getStats(function (t) { t.result().forEach(function (t) { if ("ssrc" == t.type) { let n = t.names(), i = n.indexOf("mediaType"), o = -1 != i ? t.stat(n[i]) : "unknown"; if ("audio" == o) { let i = new N(); n.forEach((e) => { "ssrc" == e ? (i.m_SSRC = Number(t.stat(e))) : "googCurrentDelayMs" == e ? (i.m_MostRecentDelayEstimateMs = Number(t.stat(e))) : "packetsLost" == e ? (i.m_PacketsLost = Number(t.stat(e))) : "packetsReceived" == e ? (i.m_PacketsReceived = Number(t.stat(e))) : "googJitterReceived" == e ? (i.m_MostRecentJitterReceivedMs = Number(t.stat(e))) : "googJitterBufferMs" == e ? (i.m_CurrentJitterBufferMs = Number(t.stat(e))) : "bytesReceived" == e ? (i.m_BytesReceived = Number(t.stat(e))) : "googDecodingCTN" == e ? (i.m_DecodingThroughNetEQ = Number(t.stat(e))) : "googDecodingPLC" == e ? (i.m_DecodingPacketLossCorrection = Number(t.stat(e))) : "googDecodingCNG" == e ? (i.m_DecodingComfortNoiseGeneration = Number(t.stat(e))) : "googDecodingPLCCNG" == e ? (i.m_DecodingPacketLossFadeNoiseGeneration = Number(t.stat(e))) : "googDecodingNormal" == e ? (i.m_DecodingNormal = Number(t.stat(e))) : "googDecodingCTSG" == e ? (i.m_DecodingSilenceGenerator = Number(t.stat(e))) : "googDecodingMuted" == e && (i.m_DecodingMuted = Number(t.stat(e))); }); let o = e.m_mapSSRCToAccountID.get(i.m_SSRC); null != o && e.m_mapAccountIDToAudioStats.set(o, i); } else if ("video" == o) { let i = new P(); n.forEach((e) => { "ssrc" == e ? (i.m_SSRC = Number(t.stat(e))) : "googCurrentDelayMs" == e ? (i.m_MostRecentDelayEstimateMs = Number(t.stat(e))) : "googTargetDelayMs" == e ? (i.m_TargetDelayMs = Number(t.stat(e))) : "googRenderDelayMs" == e ? (i.m_RenderDelayMs = Number(t.stat(e))) : "googInterframeDelayMax" == e ? (i.m_MaxInterframeDelay = Number(t.stat(e))) : "googJitterBufferMs" == e ? (i.m_CurrentJitterBufferMs = Number(t.stat(e))) : "packetsReceived" == e ? (i.m_PacketsReceived = Number(t.stat(e))) : "packetsLost" == e ? (i.m_PacketsLost = Number(t.stat(e))) : "bytesReceived" == e ? (i.m_BytesReceived = Number(t.stat(e))) : "framesDecoded" == e ? (i.m_FramesDecoded = Number(t.stat(e))) : "googDecodeMs" == e ? (i.m_DecodeMs = Number(t.stat(e))) : "googMaxDecodeMs" == e ? (i.m_MaxDecodeMs = Number(t.stat(e))) : "googFrameWidthReceived" == e ? (i.m_FrameWidthReceived = Number(t.stat(e))) : "googFrameHeightReceived" == e ? (i.m_FrameHeightRecieved = Number(t.stat(e))) : "googFrameRateReceived" == e ? (i.m_FrameRateReceived = Number(t.stat(e))) : "googFrameRateDecoded" == e ? (i.m_FrameRateDecoded = Number(t.stat(e))) : "googFrameRateOutput" == e ? (i.m_FrameRateOutput = Number(t.stat(e))) : "googNacksSent" == e ? (i.m_NacksSent = Number(t.stat(e))) : "googPlisSent" == e && (i.m_PlisSent = Number(t.stat(e))); }); let o = e.m_mapSSRCToAccountID.get(i.m_SSRC); null != o && e.m_mapAccountIDToVideoStats.set(o, i); } } }); }), e.LogMsg("-----------------------------------------------------------"), e.LogMsg("(WebRTC) " + e.PadOutput("(Receiving SSRC)", 40) + " " + e.PadOutput("Packets Received", 20) + " " + e.PadOutput("Est. Delay MS", 20) + " " + e.PadOutput("Packets Lost", 20) + " " + e.PadOutput("Last Jitter MS", 20) + " " + e.PadOutput("Jitter Buffer MS", 20) + " " + e.PadOutput("Decoding Successes", 20) + " " + e.PadOutput("Decoding Errors", 20)), e.m_mapAccountIDToAudioStats.forEach((t, n) => { let i = h.Ul.FriendStore.GetPlayerIfCached(n), o = "[unknown]"; null != i && (o = i.display_name); let r = String(t.m_SSRC); (o = o.substring(0, 39 - r.length) + " " + r), e.LogMsg("(WebRTC) " + e.PadOutput(o, 40) + " " + e.PadOutput(String(t.m_PacketsReceived), 20) + " " + e.PadOutput(String(t.m_MostRecentDelayEstimateMs), 20) + " " + e.PadOutput(String(t.m_PacketsLost), 20) + " " + e.PadOutput(String(t.m_MostRecentJitterReceivedMs), 20) + " " + e.PadOutput(String(t.m_CurrentJitterBufferMs), 20) + " " + e.PadOutput(String(t.m_DecodingNormal + t.m_DecodingComfortNoiseGeneration), 20) + " " + e.PadOutput(String(t.m_DecodingPacketLossCorrection + t.m_DecodingPacketLossFadeNoiseGeneration + t.m_DecodingSilenceGenerator), 20)); }), e.m_mapAccountIDToVideoStats.size > 0 && (e.LogMsg("-----------------------------------------------------------"), e.LogMsg("(WebRTC) " + e.PadOutput("(Receiving SSRC)", 40) + " " + e.PadOutput("Packets Received", 20) + " " + e.PadOutput("Est. Delay MS", 20) + " " + e.PadOutput("Packets Lost", 20) + " " + e.PadOutput("Frame Metrics", 20) + " " + e.PadOutput("FPS Decoded", 20) + " " + e.PadOutput("FPS Output", 20) + " " + e.PadOutput("Decode MS (Max)", 20) + " " + e.PadOutput("NACKs / PLIs Sent", 20)), e.m_mapAccountIDToVideoStats.forEach((t, n) => { let i = h.Ul.FriendStore.GetPlayerIfCached(n), o = "[unknown]"; null != i && (o = i.display_name); let r = String(t.m_SSRC); (o = o.substring(0, 39 - r.length) + " " + r), e.LogMsg("(WebRTC) " + e.PadOutput(o, 40) + " " + e.PadOutput(String(t.m_PacketsReceived), 20) + " " + e.PadOutput(String(t.m_MostRecentDelayEstimateMs), 20) + " " + e.PadOutput(String(t.m_PacketsLost), 20) + " " + e.PadOutput(`${t.m_FrameWidthReceived} x ${t.m_FrameHeightRecieved} @ ${t.m_FrameRateReceived}`, 20) + " " + e.PadOutput(String(t.m_FrameRateDecoded), 20) + " " + e.PadOutput(String(t.m_FrameRateOutput), 20) + " " + e.PadOutput(`${t.m_DecodeMs} (${t.m_MaxDecodeMs})`, 20) + " " + e.PadOutput(`${t.m_NacksSent} / ${t.m_PlisSent}`, 20)); })), e.LogMsg("-----------------------------------------------------------"); } catch (e) {} } PadOutput(e, t, n = void 0) { if (Math.abs(t) <= e.length) return e; let i = Math.max(Math.abs(t) - e.length || 0, 0), o = Array(i + 1).join(String(n || " ").charAt(0)); return t < 0 ? o + e : e + o; } CheckConnection() { if (this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_Connected || this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_LocalMicOnly) this.LogMsg("(VoiceChat) Succcess! Voice is fully connected took " + (this.m_VoiceCallState.m_timeFinishedConnecting - this.m_VoiceCallState.m_timeStartedConnecting).toFixed(0) + "ms to complete, " + (this.m_VoiceCallState.m_nFailuresThisInitiate + 1) + " attempts made before success."), ClearBackgroundInterval(this.m_ConnectionCheck), (this.m_ConnectionCheck = 0), (this.m_VoiceCallState.m_nFailuresThisInitiate = 0), (this.m_VoiceCallState.m_bIsConnectionAttemptOverTwoSeconds = !1), (this.m_StatsTimeout = SetBackgroundTimeout(this.ProcessStatsReport, 1e4)); else { let e = performance.now() - this.m_VoiceCallState.m_timeStartedConnecting; this.m_VoiceCallState.m_bIsConnectionAttemptOverTwoSeconds = e > 2e3; let t = 6e4; 0 != this.m_VoiceCallState.m_targetAccountID && this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_RequestedPermission && (t = 3e5), e > t && (this.LogMsg("(VoiceChat) Failure! Gave up after more than one minute trying to connect, last state was " + B(this.m_VoiceCallState.m_eState) + "(" + this.m_VoiceCallState.m_eState + ")"), this.EndVoiceChatInternal(!1)), this.LogMsg("(VoiceChat) Still trying to connect to voice chat/webrtc " + B(this.m_VoiceCallState.m_eState) + "(" + this.m_VoiceCallState.m_eState + ") " + (performance.now() - this.m_VoiceCallState.m_timeStartedConnecting).toFixed(0) + "ms elapsed..."); } } BSupportsDataChannels() { var e; return -1 != (null === (e = this.m_PeerConnection) || void 0 === e ? void 0 : e.localDescription.sdp.indexOf("webrtc-datachannel")); } RenegotiateSDP() { this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_Connected && this.BackOffAndRetryInitiateVoiceChat(); } BackOffAndRetryInitiateVoiceChat() { if (this.m_VoiceCallState.m_eState != A.k_EVoiceCallState_None) { let e = this.m_VoiceCallState.m_nFailuresThisInitiate, t = this.m_VoiceCallState.m_targetAccountID, n = this.m_VoiceCallState.m_chatRoom; this.EndVoiceChatInternal(!0), (this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_ScheduledInitiate), (this.m_VoiceCallState.m_targetAccountID = t), (this.m_VoiceCallState.m_chatRoom = n), (this.m_VoiceCallState.m_nFailuresThisInitiate = e + 1); let i = 250; (i = e < 1 ? 250 : e < 3 ? 1e3 : e < 5 ? 5e3 : e < 10 ? 1e4 : e < 15 ? 3e4 : 6e4), this.LogMsg("(VoiceChat) Retrying InitiateVoiceChat in " + i.toFixed(0) + " milliseconds..."), this.m_VoiceCallState.m_bInitiatedOneOnOneCall || 0 == this.m_VoiceCallState.m_targetAccountID ? (this.m_ScheduledInitiate = SetBackgroundTimeout(() => { this.ScheduledInitiate(t, n); }, i)) : (this.m_ScheduledInitiate = SetBackgroundTimeout(() => { this.ScheduledAcceptOneOnOne(t); }, i)); } } ScheduledAcceptOneOnOne(e) { (this.m_ScheduledInitiate = 0), this.AcceptPartnersOneOnOneChatRequest(e); } ScheduledInitiate(e, t) { (this.m_ScheduledInitiate = 0), this.InitiateVoiceChat(e, t); } InitiateVoiceChat(e, t) { a.F.BClientConnected().then(() => {}), t && ((b.ActiveDataChannelSupplier = this), (f.session = { groupID: t.groupID, roomID: t.chatID })); let n = new T.UAParser(navigator.userAgent).getResult(), i = "Chrome" == n.browser.name, r = "Edge" == n.browser.name && "Blink" == n.engine.name; if (!i && !r) { this.LogMsg("(VoiceChat) Voice chat not supported in browser: " + n.browser.name); const e = (0, k.Xx)(o.De.IN_MOBILE ? "#VoiceChat_Unavailable_NotSupported" : "#Voice_VoiceUnavailableInBrowser_Title"), t = o.De.IN_MOBILE ? (0, k.Xx)("#VoiceChat_Unavailable_MobileChat") : (0, k.Xx)("#Voice_VoiceUnavailableInBrowser_Body", n.browser.name); return void h.Ul.ShowAlert(e, t, (0, k.Xx)("#Voice_VoiceUnavailableInBrowser_OK")) .then(() => {}) .catch(() => !0); } if (0 != e && t) return void this.LogMsg("Cant initiate voice chat for both friend & group"); let s = this.m_VoiceCallState.BMatchingCall(e, t); !this.m_VoiceCallState.BMatchingCall(e, t) && this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_ScheduledInitiate && (this.LogMsg("(VoiceChat) InitiateVoiceChat called for new target account/room while already connected, ending prior session first"), this.EndVoiceChatInternal(!1)), this.m_ScheduledInitiate && (ClearBackgroundTimeout(this.m_ScheduledInitiate), (this.m_ScheduledInitiate = 0)); let l = performance.now(); if (this.m_VoiceCallState.m_eState <= A.k_EVoiceCallState_ScheduledInitiate && 0 != this.m_VoiceCallState.m_timeEndedVoiceChat && l - this.m_VoiceCallState.m_timeEndedVoiceChat < 100) { (this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_ScheduledInitiate), (this.m_VoiceCallState.m_targetAccountID = e), (this.m_VoiceCallState.m_bInitiatedOneOnOneCall = !0), (this.m_VoiceCallState.m_chatRoom = t); let n = 100 - (l - this.m_VoiceCallState.m_timeEndedVoiceChat); return ( this.LogMsg("(VoiceChat) Delaying requested InitiateChat for " + n.toFixed(0) + " milliseconds to let prior EndVoiceChat finish..."), void (this.m_ScheduledInitiate = SetBackgroundTimeout(() => { this.ScheduledInitiate(e, t); }, n)) ); } (!s || this.m_VoiceCallState.m_eState <= A.k_EVoiceCallState_ScheduledInitiate) && (e ? this.LogMsg("Resetting voice chat state and initiating to individual " + e) : t ? this.LogMsg("Resetting voice chat state and initiating to room " + t.chatID) : ((0, L.X)(this.m_VoiceEchoLocalMic, "Shouldn't hit local mic access only without echo local mic on"), this.LogMsg("Resetting voice chat state and initiating local mic access only")), this.m_VoiceCallState.m_eState <= A.k_EVoiceCallState_ScheduledInitiate && ((0 == e && null == t) || this.DispatchSetVoiceChatActive(!0), (this.m_VoiceCallState.m_targetAccountID = e), (this.m_VoiceCallState.m_bInitiatedOneOnOneCall = !0), (this.m_VoiceCallState.m_chatRoom = t), (this.m_VoiceCallState.m_timeStartedConnecting = performance.now()), (this.m_VoiceCallState.m_nMostRecentRemoteDescriptionVersion = "0"), (this.m_VoiceCallState.m_bIsConnectionAttemptOverTwoSeconds = !1), (this.m_ConnectionCheck = SetBackgroundInterval(this.CheckConnection, 2e3)), 0 != e ? this.InitiateOneOnOneVoiceChat(e) : this.InitiateChatRoomVoice())); } OnRequestMicrophoneAccess() { if (this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_ScheduledInitiate) return this.LogMsg("(VoiceChat) Hit OnRequestMicrophoneAccess in wrong state " + this.m_VoiceCallState.m_eState), void this.EndVoiceChatInternal(!1); null == this.m_AudioContext && (this.m_AudioContext = h.Ul.AudioPlaybackManager.context); let e = { optional: [{ echoCancellation: this.m_Settings.m_VoiceUseEchoCancellation }, { googEchoCancellation: this.m_Settings.m_VoiceUseEchoCancellation }, { googEchoCancellation2: this.m_Settings.m_VoiceUseEchoCancellation }, { googNoiseSupression: this.m_Settings.m_VoiceUseNoiseCancellation }, { googNoiseSupression2: this.m_Settings.m_VoiceUseNoiseCancellation }, { mozNoiseSuppression: this.m_Settings.m_VoiceUseNoiseCancellation }, { googAutoGainControl: this.m_Settings.m_VoiceUseAutoGainControl }, { googAutoGainControl2: this.m_Settings.m_VoiceUseAutoGainControl }, { mozAutoGainControl: this.m_Settings.m_VoiceUseAutoGainControl }, { googHighpassFilter: !0 }, { googAudioMirroring: !1 }] }; "default" != this.m_Settings.m_SelectedMicID && e.optional.push({ sourceId: this.m_Settings.m_SelectedMicID }), this.m_VoiceCallState.m_targetAccountID ? this.LogMsg("(VoiceChat) Call to individual " + this.m_VoiceCallState.m_targetAccountID + " now initating getUserMedia/WebRTC") : this.m_VoiceCallState.m_chatRoom && this.LogMsg("(VoiceChat) Call to room " + this.m_VoiceCallState.m_chatRoom.chatID + " now initating getUserMedia/WebRTC"), (this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_RequestedMicAccess); let t = navigator; (this.m_bUserHasDeniedMicPermissions = !1), (t.getUserMedia = t.getUserMedia || t.webkitGetUserMedia || t.mozGetUserMedia || t.msGetUserMedia), t.getUserMedia( { audio: e, video: this.m_bSendVideo }, (e) => { this.OnGetUserMediaSuccess(e); }, this.OnGetUserMediaFailure, ); } ScheduleClientVoiceLogsUpload(e) { if ("" == this.m_VoiceCallState.m_voiceChatID) return; this.m_ScheduledVoiceLogsUpload && (ClearBackgroundTimeout(this.m_ScheduledVoiceLogsUpload), (this.m_ScheduledVoiceLogsUpload = 0)); this.m_ScheduledVoiceLogsUpload = SetBackgroundTimeout(this.UploadClientSideVoiceLogs, 1e3 * e); } UploadClientSideVoiceLogs() { if ("" == this.m_VoiceCallState.m_voiceChatID) return; if (this.m_bClientSideLogsUploadInProgress) return void this.ScheduleClientVoiceLogsUpload(2); this.m_bClientSideLogsUploadInProgress = !0; let e = r.gA.Init(y.R_); e.Body().set_voice_chatid(this.m_VoiceCallState.m_voiceChatID); let t = this.m_rgLogLines.slice(this.m_nLastLogLineUploaded); e.Body().set_client_voice_logs_new_lines(t.join("\r\n")); let n = t.length; y.p3 .UploadClientVoiceChatLogs(this.m_CMInterface.GetServiceTransport(), e) .then((e) => { 1 == e.GetEResult() ? ((this.m_nLastLogLineUploaded += n), this.LogMsg("(VoiceChat) Uploaded " + n + " new lines of voice chat log info to server"), this.ScheduleClientVoiceLogsUpload(20)) : (this.LogMsg("(VoiceChat) Error uploading client side logs to voice chat session, will retry soon"), this.ScheduleClientVoiceLogsUpload(10 + 10 * Math.random())), (this.m_bClientSideLogsUploadInProgress = !1); }) .catch((e) => { this.LogMsg("(VoiceChat) Error uploading client side logs to voice chat session, will retry soon"), this.ScheduleClientVoiceLogsUpload(10 + 10 * Math.random()), (this.m_bClientSideLogsUploadInProgress = !1); }); } EndVoiceChatInternal(e) { if ((this.m_ScheduledVoiceLogsUpload && this.UploadClientSideVoiceLogs(), this.m_ScheduledInitiate && (ClearBackgroundTimeout(this.m_ScheduledInitiate), (this.m_ScheduledInitiate = 0)), this.m_StatsTimeout && (ClearBackgroundTimeout(this.m_StatsTimeout), (this.m_StatsTimeout = 0)), this.DispatchSetVoiceChatActive(!1), this.m_VoiceCallState.m_eState == A.k_EVoiceCallState_None)) return; if (!e) { if (this.m_VoiceCallState.m_targetAccountID) { let e = this.m_VoiceCallState.m_targetAccountID; this.m_VoiceCallState.m_targetAccountID = 0; let t = this.m_VoiceCallState.m_voiceChatID, n = r.gA.Init(y.Ky); n.Body().set_steamid_partner(u.K.InitFromAccountID(e).ConvertTo64BitString()), n.Body().set_voice_chatid(this.m_VoiceCallState.m_voiceChatID); let i = this.m_VoiceCallState.m_eState; y.p3.LeaveOneOnOneChat(this.m_CMInterface.GetServiceTransport(), n).then((n) => { if (1 == n.GetEResult()) if ((this.LogMsg("(VoiceChat) Left voice chat with " + e), i == A.k_EVoiceCallState_Connected)) { let n = new X(); (n.partner_accountid = this.m_CMInterface.steamid.GetAccountID()), (n.voice_chatid = t), (n.previously_joined = !0), this.m_mapOneOnOneCallsWaitingJoinOrAccept.set(e, n); } else { let t = h.Ul.FriendStore.self, n = h.Ul.ChatStore.GetFriendChat(e, !1); n && t && n.AddVoiceChannelInviteMsg(h.Ul.CMInterface.steamid.GetAccountID(), h.Ul.GetServerRTime32(), (0, k.Xx)("#FriendMsg_VoiceChannelEndedExplicit", t.display_name)); } else this.LogMsg("(VoiceChat) Failed leaving voice chat with " + e); }); } else if (this.m_VoiceCallState.m_chatRoom) { let e = r.gA.Init(I.zw); e.Body().set_chat_group_id(this.m_VoiceCallState.m_chatRoom.groupID), e.Body().set_chat_id(this.m_VoiceCallState.m_chatRoom.chatID); let t = this.m_VoiceCallState.m_chatRoom.chatID; I.Xn.LeaveVoiceChat(this.m_CMInterface.GetServiceTransport(), e).then((e) => { 1 == e.GetEResult() ? this.LogMsg("(VoiceChat) Left chat room (" + t + ") voice chat") : this.LogMsg("(VoiceChat) Failed leaving chat room (" + t + ") voice chat"); }); } (b.ActiveDataChannelSupplier = void 0), this.m_mapUserVoiceStatus.clear(); } this.m_mapSSRCToAccountID.clear(), this.m_mapAccountIDToAudioStats.clear(), this.m_mapAccountIDToVideoStats.clear(); let t = this.m_VoiceCallState.m_eState > A.k_EVoiceCallState_RequestedPermission; (this.m_VoiceCallState.m_eState = A.k_EVoiceCallState_None), (this.m_VoiceCallState.m_targetAccountID = 0), (this.m_VoiceCallState.m_bInitiatedOneOnOneCall = !1), (this.m_VoiceCallState.m_bPostedOneOnOneEndedMsg = !1), (this.m_VoiceCallState.m_bWaitingOnOneOnOneRejoin = !1), (this.m_VoiceCallState.m_chatRoom = null), (e && t) || (this.m_VoiceCallState.m_voiceChatID = ""), (this.m_VoiceCallState.m_nMostRecentRemoteDescriptionVersion = "0"), (this.m_VoiceCallState.m_nFailuresThisInitiate = 0), (this.m_VoiceCallState.m_timeEndedVoiceChat = performance.now()), (this.m_VoiceCallState.m_webRTCConnectedNotification = void 0), (this.m_VoiceCallState.m_bOfferUpdateInProgress = !1), (this.m_VoiceCallState.m_msgPendingRemoteDescriptionUpdate = void 0), this.m_ConnectionCheck && (ClearBackgroundInterval(this.m_ConnectionCheck), (this.m_ConnectionCheck = 0)); let n = this.m_rgVideoStreams.pop(); for (; null != n; ) n = this.m_rgVideoStreams.pop(); let i = this.m_rgAudioStreams.pop(); for (; null != i; ) { null != i.elem && (i.elem.pause(), (i.elem.src = void 0), (i.elem.srcObject = void 0), (i.elem = void 0)), null != i.volume_meter && (i.volume_meter.stop(), (i.volume_meter = void 0)), (i.stream.oninactive = void 0); for (let e of i.stream.getTracks()) e.stop(); if (null != this.m_AudioContext && i.source_node) try { if ((i.source_node.disconnect(), i.type == R.k_EAudioStreamType_Microphone && i.source_node instanceof MediaStreamAudioSourceNode)) for (let e of i.source_node.mediaStream.getTracks()) e.stop(); } catch (e) {} i.output_gain_node && (i.output_gain_node.disconnect(), (i.output_gain_node = void 0)), (i = this.m_rgAudioStreams.pop()); } null != this.m_MicVolumeMeter && (this.m_MicVolumeMeter.stop(), (this.m_MicVolumeMeter = void 0)), null != this.m_MicNoiseGate && (this.m_MicNoiseGate.input ? (this.m_MicNoiseGate.input.disconnect(), this.m_MicNoiseGate.output.disconnect(), this.m_MicNoiseGate.noiseGateKernel_.disconnect()) : this.m_MicNoiseGate.disconnect(), (this.m_MicNoiseGate = void 0)), null != this.m_MicInputGainNode && (this.m_MicInputGainNode.disconnect(), (this.m_MicInputGainNode = void 0)), null != this.m_AudioContext && (h.Ul.AudioPlaybackManager.SetVoiceNotActive(), (this.m_AudioContext = void 0)), this.m_PeerConnection && ((this.m_PeerConnection.oniceconnectionstatechange = void 0), (this.m_PeerConnection.onicegatheringstatechange = void 0), (this.m_PeerConnection.onsignalingstatechange = void 0), this.m_PeerConnection.close(), (this.m_PeerConnection = void 0)); } GetPersonaState(e) { const t = new u.K(e), n = h.Ul.FriendStore.GetFriend(t.GetAccountID()); return (0, g.gx)(() => n.is_ready, { timeout: 5e3 }).then(() => n.persona); } FillInChatUsabilityMetrics(e) { let t = e.voice_settings(); t.set_voice_input_gain(this.m_Settings.m_VoiceInputGain), t.set_voice_output_gain(this.m_Settings.m_VoiceOutputGain), t.set_noise_gate_level(Math.round(this.m_Settings.m_NoiseGateLevel)), t.set_voice_use_echo_cancellation(this.m_Settings.m_VoiceUseEchoCancellation), t.set_voice_use_noise_cancellation(this.m_Settings.m_VoiceUseNoiseCancellation), t.set_voice_use_auto_gain_control(this.m_Settings.m_VoiceUseAutoGainControl), t.set_selected_non_default_mic("default" !== this.m_Settings.m_SelectedMicID), t.set_selected_non_default_output("default" !== this.m_Settings.m_SelectedOutputID), t.set_push_to_talk_enabled(this.GetPushToTalkEnabled()), t.set_push_to_mute_enabled(this.GetPushToMuteEnabled()), t.set_play_ptt_sounds(this.m_Settings.m_bPlayPTTSounds), this.IsAnyVoiceActive() && (this.m_VoiceCallState.m_targetAccountID ? e.ui_state().set_in_one_on_one_voice_chat(!0) : this.m_VoiceCallState.m_chatRoom && e.ui_state().set_in_group_voice_chat(!0)); } } (j.k_MaxPerUserGainMultiplier = 2), (j.k_MaxInputOutputGainValue = 4), (j.k_nMaxPositions = 32), (0, i.gn)([g.LO], j.prototype, "m_VoiceCallState", void 0), (0, i.gn)([g.LO], j.prototype, "m_bPushToTalkEnabled", void 0), (0, i.gn)([g.LO], j.prototype, "m_bPushToMuteEnabled", void 0), (0, i.gn)([g.LO], j.prototype, "m_bVoicePTTStateEnabled", void 0), (0, i.gn)([g.LO], j.prototype, "m_VKPushToTalkHotKey", void 0), (0, i.gn)([g.LO], j.prototype, "m_strPushToTalkDisplayString", void 0), (0, i.gn)([g.LO], j.prototype, "m_bUserHasDeniedMicPermissions", void 0), (0, i.gn)([g.LO], j.prototype, "m_bOutputMuted", void 0), (0, i.gn)([g.LO], j.prototype, "m_AudioContext", void 0), (0, i.gn)([g.LO], j.prototype, "m_rgAudioStreams", void 0), (0, i.gn)([g.LO], j.prototype, "m_MicVolumeMeter", void 0), (0, i.gn)([g.LO], j.prototype, "m_MicNoiseGate", void 0), (0, i.gn)([g.LO], j.prototype, "m_MicInputGainNode", void 0), (0, i.gn)([g.LO], j.prototype, "m_rgVideoStreams", void 0), (0, i.gn)([g.LO], j.prototype, "m_bSendVideo", void 0), (0, i.gn)([g.LO], j.prototype, "m_bReceiveVideo", void 0), (0, i.gn)([g.LO], j.prototype, "m_PeerConnection", void 0), (0, i.gn)([g.LO], j.prototype, "m_Settings", void 0), (0, i.gn)([g.LO], j.prototype, "m_bLocalMicTestActive", void 0), (0, i.gn)([g.LO], j.prototype, "m_bForceConnectingStatus", void 0), (0, i.gn)([g.LO], j.prototype, "m_bForceReconnectingStatus", void 0), (0, i.gn)([g.LO], j.prototype, "m_localPose", void 0), (0, i.gn)([g.LO], j.prototype, "m_mapRemotePoseForAccountID", void 0), (0, i.gn)([g.aD.bound], j.prototype, "SetSelectedMic", null), (0, i.gn)([g.aD.bound], j.prototype, "SetSelectedOutput", null), (0, i.gn)([g.aD.bound], j.prototype, "SetUseEchoCancellation", null), (0, i.gn)([g.aD.bound], j.prototype, "SetUseNoiseCancellation", null), (0, i.gn)([g.aD.bound], j.prototype, "SetUseAutoGainControl", null), (0, i.gn)([g.aD.bound], j.prototype, "SetVoiceEchoLocalMic", null), (0, i.gn)([g.aD.bound], j.prototype, "SetVoiceLogDetails", null), (0, i.gn)([g.aD.bound], j.prototype, "GetVoiceLogDetails", null), (0, i.gn)([g.aD.bound], j.prototype, "SetUseNoiseGateLevel", null), (0, i.gn)([g.aD.bound], j.prototype, "SetVoiceInputGain", null), (0, i.gn)([g.aD.bound], j.prototype, "SetVoiceOutputGain", null), (0, i.gn)([g.aD.bound], j.prototype, "ForceReconnectingStatus", null), (0, i.gn)([g.aD.bound], j.prototype, "ForceConnectingStatus", null), (0, i.gn)([g.aD.bound], j.prototype, "LogMsg", null), (0, i.gn)([g.aD.bound], j.prototype, "GetVoiceLogs", null), (0, i.gn)([g.aD.bound], j.prototype, "OnPushToTalkReleased", null), (0, i.gn)([g.aD.bound, (0, M.D)(150)], j.prototype, "DebouncedToggleMicMuting", null), (0, i.gn)([g.aD.bound], j.prototype, "OnPushToTalkStateChange", null), (0, i.gn)([g.aD.bound], j.prototype, "UpdateNoiseGateOnActiveMic", null), (0, i.gn)([g.aD.bound], j.prototype, "OnAudioContextStateChange", null), (0, i.gn)([g.aD.bound], j.prototype, "OnIceCandidate", null), (0, i.gn)([g.aD.bound], j.prototype, "AddRemoteIceCandidate", null), (0, i.gn)([g.aD.bound], j.prototype, "OnSignalingStateChange", null), (0, i.gn)([g.aD.bound], j.prototype, "OnIceConnectionStateChange", null), (0, i.gn)([g.aD.bound], j.prototype, "OnIceGatheringStateChange", null), (0, i.gn)([g.aD.bound], j.prototype, "OnRemoveRemoteStream", null), (0, i.gn)([g.aD], j.prototype, "SetLocalHMDPose", null), (0, i.gn)([g.aD], j.prototype, "SetRemoteHMDPose", null), (0, i.gn)([g.aD.bound], j.prototype, "OnAddRemoteStream", null), (0, i.gn)([g.aD.bound], j.prototype, "ModifyLocalSDPBeforeSetting", null), (0, i.gn)([g.aD.bound], j.prototype, "OnCreateOfferSuccess", null), (0, i.gn)([g.aD.bound], j.prototype, "OnCreateOfferError", null), (0, i.gn)([g.aD.bound], j.prototype, "OnNoiseGateMessage", null), (0, i.gn)([g.aD.bound], j.prototype, "SetupNoiseGateOnMic", null), (0, i.gn)([g.aD.bound], j.prototype, "OnGetUserMediaSuccess", null), (0, i.gn)([g.aD.bound], j.prototype, "OnGetUserMediaFailure", null), (0, i.gn)([g.aD.bound], j.prototype, "OnSetUpdatedLocalDescriptionSuccess", null), (0, i.gn)([g.aD.bound], j.prototype, "OnSetUpdatedLocalDescriptionFailure", null), (0, i.gn)([g.aD.bound], j.prototype, "OnCreateAnswerSuccess", null), (0, i.gn)([g.aD.bound], j.prototype, "OnCreateAnswerError", null), (0, i.gn)([g.aD.bound], j.prototype, "OnAcceptOneOnOneVoiceChat", null), (0, i.gn)([g.aD.bound], j.prototype, "OnRejectOneOnOneVoiceChat", null), (0, i.gn)([g.aD.bound], j.prototype, "PlayRingSound", null), (0, i.gn)([g.aD.bound], j.prototype, "ProcessStatsReport", null), (0, i.gn)([g.aD.bound], j.prototype, "ProcessReceiverStatsReport", null), (0, i.gn)([g.aD.bound], j.prototype, "CheckConnection", null), (0, i.gn)([g.aD.bound], j.prototype, "ScheduledAcceptOneOnOne", null), (0, i.gn)([g.aD.bound], j.prototype, "ScheduledInitiate", null), (0, i.gn)([g.aD.bound], j.prototype, "OnRequestMicrophoneAccess", null), (0, i.gn)([g.aD.bound], j.prototype, "UploadClientSideVoiceLogs", null); }, 23133: (e, t, n) => { "use strict"; n.d(t, { G: () => l, R: () => c }); var i = n(85556), o = n(37234), r = n(27378), a = n(83817), s = n(88669); const l = r.forwardRef(function (e, t) { const { rgAcceptedTypes: n, bAcceptsFiles: o, fnDragEnter: a, fnDragLeave: s, fnDragOver: l, fnDrop: c } = e, d = (0, i._T)(e, ["rgAcceptedTypes", "bAcceptsFiles", "fnDragEnter", "fnDragLeave", "fnDragOver", "fnDrop"]), h = m({ rgAcceptedTypes: n, bAcceptsFiles: o, fnDragEnter: a, fnDragLeave: s, fnDragOver: l, fnDrop: c }); return r.createElement("div", Object.assign({}, d, h, { className: "DropTarget " + d.className, ref: t })); }), c = r.forwardRef(function (e, t) { const { rgAcceptedTypes: n, bAcceptsFiles: o, fnDragEnter: s, fnDragLeave: l, fnDragOver: c, fnDrop: d } = e, h = (0, i._T)(e, ["rgAcceptedTypes", "bAcceptsFiles", "fnDragEnter", "fnDragLeave", "fnDragOver", "fnDrop"]), u = m({ rgAcceptedTypes: n, bAcceptsFiles: o, fnDragEnter: s, fnDragLeave: l, fnDragOver: c, fnDrop: d }); return r.createElement(a.s, Object.assign({}, h, u, { className: "DropTarget " + h.className, ref: t })); }); function m(e) { const { rgAcceptedTypes: t, bAcceptsFiles: n, fnDragEnter: i, fnDragLeave: a, fnDragOver: l, fnDrop: c } = e, m = r.useRef(null), d = r.useRef(!1), h = r.useRef([]), u = r.useCallback(() => { let e = o.g_FriendsUIDesktopApp.DragDropManager.GetDragData(); if (!e && h.current) { const t = new Map(); for (const e of h.current) t.set(e, ""); e = { type: "html", mapData: t }; } return i(e, m.current.bFiles); }, [i]); return { onDragEnter: r.useCallback( (e) => { if (!d.current) { h.current = []; let r = o.g_FriendsUIDesktopApp.DragDropManager.GetDragData(), a = n && -1 != e.dataTransfer.types.indexOf("Files"); (r && -1 != t.indexOf(r.type)) || a ? (d.current = !0) : t.filter((t) => e.dataTransfer.types.includes(t)).length > 0 ? ((h.current = t.filter((t) => e.dataTransfer.types.includes(t))), (d.current = !0)) : (d.current = !1), d.current && i && (m.current = { bFiles: a }), d.current && (e.preventDefault(), e.stopPropagation()); } }, [n, t, i], ), onDragLeave: r.useCallback( (e) => { if (d.current) { if (!(0, s.H0)(e)) return; (d.current = !1), e.preventDefault(), e.stopPropagation(), a && a(); } }, [a], ), onDragOver: r.useCallback( (e) => { if (d.current) { if (m.current) { let e = u(); if (((m.current = null), !e)) return void (d.current = !1); } e.preventDefault(), e.stopPropagation(), l && l(e); } }, [l, u], ), onDrop: r.useCallback( (e) => { if (d.current) { (d.current = !1), e.preventDefault(), e.stopPropagation(); let i = o.g_FriendsUIDesktopApp.DragDropManager.GetDragData(); if (i && -1 != t.indexOf(i.type)) c && c(i, e); else if (n && 0 != e.dataTransfer.files.length) c && c(null, e); else if (!i && h.current.length > 0 && c) { const t = new Map(); for (const n of h.current) t.set(n, e.dataTransfer.getData(n)); c({ type: "html", mapData: t }, e); } } }, [t, n, c], ), }; } }, 60176: (e, t, n) => { "use strict"; n.d(t, { tD: () => he, NS: () => ge, RQ: () => _e, NL: () => Ce, Lx: () => de, ar: () => ae, CT: () => se, uW: () => pe, JS: () => le, R5: () => ue, cl: () => ce }); var i = n(85556), o = n(19953), r = n(84446), a = n(93354), s = n(23346), l = n(19339), c = n(72746), m = n(37234), d = n(23133), h = n(27378), u = n(29512), p = n(64179), _ = n.n(p); const g = (e) => { var { message: t, name: n, renderImage: o } = e, r = (0, i._T)(e, ["message", "name", "renderImage"]); return h.createElement(u.Z, Object.assign({ key: "inviteDrop", classNames: Object.assign({}, _()), timeout: 300 }, r), h.createElement("div", { className: _().ChatModalCover }, h.createElement("div", { className: _().InviteDropContainer }, h.createElement("span", { className: _().InviteDropImage }, o()), h.createElement("span", { className: _().InviteDropName }, n), h.createElement("span", { className: _().InviteDropMessage }, t), h.createElement("span", { className: _().InviteDropBackground })))); }; var C = n(618), f = n(41111), v = n(97720), S = n(71357), b = n(14341), I = n(50649), y = n(31542), E = n(56320), D = n(29205), w = n(41758), R = n(11259), A = n(38571), M = n(68816), k = n(16518), T = n(93635), L = n(87018), G = n(88669), O = n(84290), F = n(2049), B = n(83817), x = n(31360), N = n(15152), P = n(3276), U = n(13106), V = n(31695), H = n(58908), W = n(88991), X = n(59702), j = n(74915), z = n(97224), K = n(90406), q = n(62902), Z = n(62860), Q = n(33690); const $ = h.lazy(() => Promise.all([n.e(5140), n.e(4679)]).then(n.bind(n, 35299))); let Y = class extends h.Component { constructor(e) { super(e), (this.m_fnUnregisterDropComplete = void 0), (this.m_bChatHidden = !1), (this.m_refBroadcastContainer = h.createRef()), (this.state = { dropToInviteFriend: void 0, dropGroupToInviteFriend: void 0, dropClanToInvite: void 0, speakerLabelWidth: 0 }), (this.m_friendSteamId = W.K.InitFromAccountID(e.chatView.chat.accountid_partner).ConvertTo64BitString()); } OnDragEnter(e, t) { if ((e ? (0, T.X)("friend" == e.type || "chatroomgroup" == e.type || "clan" == e.type || "html" == e.type, "Invalid data type passed to FriendChatDialog.OnDrop") : (0, T.X)(t, "Invalid data type passed to FriendChatDialog.OnDrop"), !e)) return !0; let n = "friend" == e.type ? e.friend : void 0; if (n && n.accountid !== this.props.chatView.chat.accountid_partner) return this.m_fnUnregisterDropComplete || (this.m_fnUnregisterDropComplete = m.g_FriendsUIDesktopApp.DragDropManager.RegisterForDropComplete(this.OnDropComplete)), this.setState({ dropToInviteFriend: n }), !0; let i = "chatroomgroup" == e.type ? e.group : void 0; if (i) return this.m_fnUnregisterDropComplete || (this.m_fnUnregisterDropComplete = m.g_FriendsUIDesktopApp.DragDropManager.RegisterForDropComplete(this.OnDropComplete)), this.setState({ dropGroupToInviteFriend: i }), !0; let o = "clan" == e.type ? e.clan : void 0; return !o || (this.m_fnUnregisterDropComplete || (this.m_fnUnregisterDropComplete = m.g_FriendsUIDesktopApp.DragDropManager.RegisterForDropComplete(this.OnDropComplete)), this.setState({ dropClanToInvite: o }), !0); } OnDragLeave() { (this.state.dropToInviteFriend || this.state.dropGroupToInviteFriend || this.state.dropClanToInvite) && (this.m_fnUnregisterDropComplete.Unregister(), (this.m_fnUnregisterDropComplete = void 0), this.setState({ dropToInviteFriend: void 0, dropGroupToInviteFriend: void 0, dropClanToInvite: void 0 })); } OnDragOver(e) { e.dataTransfer.dropEffect = "move"; } OnDrop(e, t) { e ? (0, T.X)("friend" == e.type || "chatroomgroup" == e.type || "clan" == e.type || "html" == e.type, "Invalid data type passed to FriendChatDialog.OnDrop") : (0, T.X)(0 != t.dataTransfer.files.length, "Invalid data type passed to FriendChatDialog.OnDrop"); let n = this.props.chatView; if (e) { let i = t.currentTarget.ownerDocument.defaultView, o = n.chat.chat_partner, r = "friend" == e.type ? e.friend : void 0, a = "chatroomgroup" == e.type ? e.group : void 0, s = "clan" == e.type ? e.clan : void 0, l = "html" == e.type ? e.mapData : void 0; if (r) { if (o == r) return; this.state.dropToInviteFriend && (this.m_fnUnregisterDropComplete.Unregister(), (this.m_fnUnregisterDropComplete = void 0), this.setState({ dropToInviteFriend: void 0 })), m.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed(), ce({ invitee: r, chatview: n, invitedto: o }, (0, m.Um)(this, t), i); } else a || s ? ((this.state.dropGroupToInviteFriend || this.state.dropClanToInvite) && (this.m_fnUnregisterDropComplete.Unregister(), (this.m_fnUnregisterDropComplete = void 0), this.setState({ dropGroupToInviteFriend: void 0, dropClanToInvite: void 0 })), m.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed(), s && (a = c.Ul.ChatStore.GetChatRoomGroup(s.GetChatGroupIDIfLoaded())), ce({ invitee: o, invitedto: a }, (0, m.Um)(this, t), i)) : l && l.has("text/plain") && n.SendChatMessage(l.get("text/plain")); } else if (0 != t.dataTransfer.files.length) { let e = t.dataTransfer.files[0]; n.SetFileToUpload(e); } } OnDropComplete(e) { !e && this.state.dropToInviteFriend && ((this.m_fnUnregisterDropComplete = void 0), this.setState({ dropToInviteFriend: void 0 })); } OnNameWidthChanged(e) { this.setState({ speakerLabelWidth: e }); } componentDidMount() { window.addEventListener("resize", this.OnLayoutChange); } componentWillUnmount() { window.removeEventListener("resize", this.OnLayoutChange); } CalculateBroadcastSectionStyles(e) { if (this.m_bChatHidden) return { width: "100%", height: "100%" }; const { nWatchPartyBroadcastHeightPercentage: t, nWatchPartyBroadcastWidthPercentage: n } = m.g_FriendsUIDesktopApp.UIDisplayPrefs, i = {}; if (e) { const e = t || 66; if (((i.height = `${e}%`), this.m_elMainContent)) { const { clientWidth: t, clientHeight: n } = this.m_elMainContent, o = (9 / 16) * t + 50, r = (0, X.Lh)(e, 1, (o / n) * 100); i.height = `${r}%`; } } else (i.width = n ? `${n}%` : "66%"), (i.overflowY = "auto"); return i; } ShouldShowVerticalBroadcastChat() { return void 0 !== this.m_bShowVerticalBroadcastChat ? this.m_bShowVerticalBroadcastChat : !!this.m_elMainContent && this.m_elMainContent.clientHeight / this.m_elMainContent.clientWidth > 5 / 7; } OnLayoutChange() { this.forceUpdate(); } OnGrabberMouseDown(e) { let t = e.currentTarget.ownerDocument.defaultView; t.addEventListener("mousemove", this.HandleMouseMove), t.addEventListener("mouseup", this.UnregisterDragEvents); } HandleMouseMove(e) { e.preventDefault(), e.stopPropagation(); let t = this.m_refBroadcastContainer.current.getBoundingClientRect(), n = this.m_refBroadcastContainer.current.parentElement.getBoundingClientRect(); const i = this.ShouldShowVerticalBroadcastChat(), o = i ? t.top : t.left, r = i ? e.clientY : e.clientX, a = i ? n.height : n.width, s = (0, X.Lh)(((r - o) / a) * 100, 1, 100), l = i ? "nWatchPartyBroadcastHeightPercentage" : "nWatchPartyBroadcastWidthPercentage"; m.g_FriendsUIDesktopApp.SetUIDisplayPref(l, s); } UnregisterDragEvents(e) { e.view.removeEventListener("mousemove", this.HandleMouseMove), e.view.removeEventListener("mouseup", this.UnregisterDragEvents); } HideChat() { this.SetChatHidden(!0); } ShowChat() { this.SetChatHidden(!1); } SetChatHidden(e) { (this.m_bChatHidden = e), this.forceUpdate(); } ShowBroadcast() { c.Ul.UIStore.SetFriendBroadcastVisible(this.m_friendSteamId, !0), SetBackgroundTimeout(() => { this.props.chatView.OnChatFrameChanged(); }, 30); } HideBroadcast() { c.Ul.UIStore.SetFriendBroadcastVisible(this.m_friendSteamId, !1), c.Ul.UIStore.SetTheaterMode(!1), SetBackgroundTimeout(() => { this.props.chatView.OnChatFrameChanged(); }, 30); } ToggleVerticalBroadcastChat() { this.SetVerticalBroadcastChat(!this.ShouldShowVerticalBroadcastChat()), this.SetChatHidden(!1); } ToggleTheaterModeBroadcastChat() { c.Ul.UIStore.SetTheaterMode(!c.Ul.UIStore.GetTheaterMode()); } SetVerticalBroadcastChat(e) { this.m_bShowVerticalBroadcastChat = e; } SetLocalBroadcastId(e) { this.m_strLocalBroadcastId = e; } SetMainContentRef(e) { (this.m_elMainContent = e), this.OnLayoutChange(); } GetTitleBarDragDropProps() { let e = { rgAcceptedTypes: [], bAcceptsFiles: !0 }; return (e.fnDrop = this.OnDrop), e; } GetChatBodyDragDropProps() { let e = { rgAcceptedTypes: ["friend", "chatroomgroup", "clan", "text/plain"], bAcceptsFiles: !0 }; return (e.fnDragEnter = this.OnDragEnter), (e.fnDragLeave = this.OnDragLeave), (e.fnDragOver = this.OnDragOver), (e.fnDrop = this.OnDrop), e; } RenderInnerChatTabs() { return h.createElement("div", { className: "ChatBodyControls" }, h.createElement("div", { className: "Close", onClick: this.HideChat, title: (0, O.Xx)("#Broadcast_View_HideChat") }, h.createElement(k.QlI, { showChat: !1 })), h.createElement(de, { chatView: this.props.chatView, additionalClasses: "broadcastVisible" })); } render() { var e, t, n, i; if (!this.props.chatView) return null; let o = this.props.chatView.chat, r = c.Ul.VoiceStore.BPartnerHasRequestedAndIsInOneOnOneChat(o.accountid_partner), a = this.props.chatView.BVoiceActive(), s = c.Ul.UIStore.IsFriendBroadcastVisible(this.m_friendSteamId), l = o.GetShowNonFriendWarning(); const { dropToInviteFriend: m, dropGroupToInviteFriend: p, dropClanToInvite: _ } = this.state; let g; m ? (g = h.createElement(_e, { chatView: this.props.chatView, friend: this.state.dropToInviteFriend })) : (p || _) && (g = h.createElement(ge, { chatView: this.props.chatView, group: this.state.dropGroupToInviteFriend, clan: this.state.dropClanToInvite })); let C = !1, f = null, v = this.ShouldShowVerticalBroadcastChat(), S = this.m_bChatHidden; if (s) { const e = this.CalculateBroadcastSectionStyles(v); (f = h.createElement(h.Suspense, { fallback: null }, h.createElement(te, { ref: this.m_refBroadcastContainer, steamID: W.K.InitFromAccountID(o.accountid_partner).ConvertTo64BitString(), localSteamID: this.m_strLocalBroadcastId, watchLocation: 12, bWebRTC: !0, onRequestClose: this.HideBroadcast, actions: [h.createElement("div", { key: "ChatPosToggle", onClick: this.ToggleVerticalBroadcastChat, title: `${v ? (0, O.Xx)("#Broadcast_View_Stack_H") : (0, O.Xx)("#Broadcast_View_Stack_V")}`, className: "BroadcastChatPositionToggle " + (v ? "right" : "bottom") })], style: e, onTheaterMode: this.ToggleTheaterModeBroadcastChat }), !S && h.createElement("div", { className: "BroadcastChatDivider " + (v ? "vertical" : "horizontal"), onMouseDown: this.OnGrabberMouseDown }), S && h.createElement(he, { onClick: this.ShowChat, edge: v ? "bottom" : "right" }))), (C = !0); } else C = !1; let b = {}; this.props.isActive || (b.display = "none"); const I = (0, L.Z)("chatWindow", "MultiUserChat", a && "VoiceActive", a && c.Ul.ChatStore.VoiceChat.IsMicMuted() && "MicMuted", r && "VoiceRequested", l && "NotAFriendOrApproved", c.Ul.SettingsStore.FriendsSettings.bCompactFriendsList && "compactView", C && "broadcastVisible"), y = (0, L.Z)("chatBody", (m || p || _) && "chatRoomActiveDrop"), E = this.m_bChatHidden && s ? null : h.createElement(Q._9.Consumer, null, (e) => h.createElement(P.$, { key: o.unique_id, chatView: this.props.chatView, isActive: this.props.isActive, disabled: !1, ownerWindow: e.ownerWindow })); let D = h.createElement( d.G, Object.assign({ style: b, className: "chatHistoryAndMembers" }, this.GetChatBodyDragDropProps()), h.createElement(H.Z, null, g), h.createElement( "div", { className: "displayColumn fullWidth" }, h.createElement( B.s, { className: "displayRow minHeightZero", "flow-children": "row", navEntryPreferPosition: Z.c4.PREFERRED_CHILD }, l && h.createElement(pe, { chatView: this.props.chatView, friend: o.chat_partner }), h.createElement("div", { className: "ChatRoomGroupDialog_history" }, c.Ul.UIStore.show_winter_sale_ui && !c.Ul.SettingsStore.FriendsSettings.bDisableRoomEffects && h.createElement(K.x, { effectManager: o.RoomEffectManager() }), h.createElement(j.w, { chatView: this.props.chatView, isActive: this.props.isActive, speakerLabelWidth: this.state.speakerLabelWidth, blockInteraction: l })), !s && !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && h.createElement(de, { chatView: this.props.chatView, additionalClasses: void 0 }), (null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) && h.createElement(B.s, { className: "RightSideButtonContainer", "flow-children": "column" }, h.createElement(le, { chatView: this.props.chatView, bSteamDeck: !0 }), !o.chat_partner.is_friend && h.createElement(J, { friend: o.chat_partner }), h.createElement(de, { chatView: this.props.chatView, additionalClasses: void 0 })), h.createElement("div", { className: "dropTargetBox" }), ), E, ), ), w = "chatStack " + (v ? "displayRow" : "displayColumn") + " GroupChatVisible", R = {}; return ( a && ((R.onSecondaryButton = () => o.ToggleVoiceChat()), (R.onSecondaryActionDescription = (0, O.Xx)("#Friend_Menu_StopVoiceChat"))), h.createElement( d.R, Object.assign({ fnCanTakeFocus: () => this.props.isActive, "data-activechat": this.props.isActive, style: b, className: I }, this.GetTitleBarDragDropProps(), R), h.createElement("div", { className: "chatHeader" }), this.props.isActive && h.createElement(ee, { chatView: this.props.chatView, onNameWidthChanged: this.OnNameWidthChanged }), h.createElement(H.Z, null, (a || r) && !(null === (n = this.context) || void 0 === n ? void 0 : n.IN_GAMEPADUI) && h.createElement(u.Z, { key: "OneOnOneVoiceHeader", classNames: "OneOnOneVoice-anim", timeout: 300 }, h.createElement("div", null, h.createElement(le, { chatView: this.props.chatView })))), h.createElement("div", { className: "ChatRoomGroupDialog_contents" }, h.createElement("div", { className: "ChatRoomGroup_MainAndChatEntry displayColumn", ref: this.SetMainContentRef }, h.createElement("div", { className: "ChatRoomGroup_Main_ContentAndMembers displayRow" }, h.createElement("div", { className: `ChatRoomGroup_Main_Content ${v ? "Vertical" : "Horizontal"} ${S ? "chatHidden" : ""}` }, f, (!this.m_bChatHidden || !s) && h.createElement("div", { className: y }, (null === (i = this.context) || void 0 === i ? void 0 : i.IN_GAMEPADUI) && h.createElement(V.R, null), s && this.RenderInnerChatTabs(), h.createElement("div", { className: w }, D)))))), ) ); } }; function J(e) { let { friend: t } = e; const n = h.useCallback( (e) => { let n = (0, G.RA)(e); c.Ul.FriendStore.SendFriendInvite(t).then((e) => { let { eResult: i, eFriendRelationship: o } = e; 4 == o ? (0, S.zp)(n, (0, O.Xx)("#Friend_Menu_AddToFriendsList"), (0, O.Xx)("#Friend_InviteSent")) : 3 == o ? (0, S.zp)(n, (0, O.Xx)("#Friend_Menu_AddToFriendsList"), (0, O.Xx)("#Friend_MutualInviteSent", t.display_name)) : (0, U.u8)(n, i, o, t.display_name); }); }, [t], ); return h.createElement(B.s, { focusable: !0, className: "AddFriendButton", onActivate: n, onOKActionDescription: (0, O.Xx)("#Friend_Menu_AddToFriendsList") }, h.createElement(k.yBp, null)); } (Y.contextType = o.E_), (0, i.gn)([F.ak], Y.prototype, "OnDragEnter", null), (0, i.gn)([F.ak], Y.prototype, "OnDragLeave", null), (0, i.gn)([F.ak], Y.prototype, "OnDragOver", null), (0, i.gn)([F.ak], Y.prototype, "OnDrop", null), (0, i.gn)([F.ak], Y.prototype, "OnDropComplete", null), (0, i.gn)([F.ak], Y.prototype, "OnNameWidthChanged", null), (0, i.gn)([F.ak], Y.prototype, "ShouldShowVerticalBroadcastChat", null), (0, i.gn)([F.ak], Y.prototype, "OnLayoutChange", null), (0, i.gn)([F.ak], Y.prototype, "OnGrabberMouseDown", null), (0, i.gn)([F.ak], Y.prototype, "HandleMouseMove", null), (0, i.gn)([F.ak], Y.prototype, "UnregisterDragEvents", null), (0, i.gn)([F.ak], Y.prototype, "HideChat", null), (0, i.gn)([F.ak], Y.prototype, "ShowChat", null), (0, i.gn)([F.ak], Y.prototype, "SetChatHidden", null), (0, i.gn)([F.ak], Y.prototype, "ShowBroadcast", null), (0, i.gn)([F.ak], Y.prototype, "HideBroadcast", null), (0, i.gn)([F.ak], Y.prototype, "ToggleVerticalBroadcastChat", null), (0, i.gn)([F.ak], Y.prototype, "ToggleTheaterModeBroadcastChat", null), (0, i.gn)([F.ak], Y.prototype, "SetVerticalBroadcastChat", null), (0, i.gn)([F.ak], Y.prototype, "SetLocalBroadcastId", null), (0, i.gn)([F.ak], Y.prototype, "SetMainContentRef", null), (Y = (0, i.gn)([I.Pi], Y)); let ee = class extends h.Component { SpeakerLabel(e) { e && this.props.onNameWidthChanged(e.clientWidth); } render() { let e = this.props.chatView.chat, t = c.Ul.SettingsStore.FriendsSettings.nChatFontSize, n = "speakerLabelWidthContainer"; return t == z.Ao.k_EChatFontSizeSmall ? (n += " smallChatFont") : t == z.Ao.k_EChatFontSizeLarge && (n += " largeChatFont"), e.chat_partner.is_ready && e.self.is_ready ? h.createElement("div", { className: n, ref: this.SpeakerLabel }, h.createElement("div", { className: "nameWidthLabel" }, e.self.display_name + ":"), h.createElement("div", { className: "nameWidthLabel" }, e.chat_partner.display_name + ":")) : null; } }; (0, i.gn)([F.ak], ee.prototype, "SpeakerLabel", null), (ee = (0, i.gn)([I.Pi], ee)); const te = h.forwardRef(function ({ steamID: e, localSteamID: t, watchLocation: n, bWebRTC: i, style: o, onRequestClose: r, actions: a, onTheaterMode: s }, l) { const c = t || e; return h.createElement("div", { ref: l, style: Object.assign({ display: "flex", flexDirection: "column" }, o) }, h.createElement("div", { className: "BroadcastSection" }, h.createElement($, { key: c, steamIDBroadcast: c, watchLocation: n, bWebRTC: i, onRequestClose: r, actions: a, onTheaterMode: s, onOpenLinkInNewWindow: b.b8 }), h.createElement("div", { className: "videoContainerSizer" })), h.createElement(ne, { steamID: e })); }); let ne = class extends h.Component { OnClick(e, t) { let n = (0, q.FG)(t, "friendbroadcast"); (0, b.b8)(e, n), e.stopPropagation(); } render() { let e = new W.K(this.props.steamID), t = c.Ul.FriendStore.GetPlayer(e.GetAccountID()), n = t.persona.GetCurrentGameIconURL(), i = t.persona.GetCurrentGameName(), o = t.persona.m_unGamePlayedAppID; return i || n ? h.createElement("div", { className: "FriendChatBroadcastDetails" }, h.createElement("div", { className: "FriendChatBroadcastDetails_PlayingText" }, (0, O.Xx)("#broadcastDetails_Playing")), n && h.createElement("img", { className: "FriendChatBroadcastDetails_Icon", src: n }), h.createElement("div", { className: "FriendChatBroadcastDetails_GameName", onClick: (e) => this.OnClick(e, o) }, i)) : null; } }; (0, i.gn)([F.ak], ne.prototype, "OnClick", null), (ne = (0, i.gn)([I.Pi], ne)); var ie = n(46057), oe = n(7098); const re = h.lazy(() => Promise.all([n.e(5140), n.e(4679)]).then(n.bind(n, 38096))); let ae = class extends h.Component { constructor(e) { super(e), (this.m_keyEventListener = "keydown"), (this.macUserAgentStrings = /(MacIntel|Macintosh|Mac OS X)/), (this.linuxUserAgentStrings = /(Linux|X11)/), (-1 == navigator.userAgent.search(this.macUserAgentStrings) && -1 == navigator.userAgent.search(this.linuxUserAgentStrings)) || (this.m_keyEventListener = "keyup"), this.props.popup && this.props.popup.addEventListener(this.m_keyEventListener, this.OnHTMLKeyEvent); } componentWillUnmount() { this.props.popup && this.props.popup.removeEventListener(this.m_keyEventListener, this.OnHTMLKeyEvent); } OnCopy(e) { let t = this.props.popup || window; if (!t) return; let n = t.getSelection(); if (0 == n.rangeCount) return; let i = (0, w.bv)(n.getRangeAt(0)); void 0 !== i && ("Win32" == t.navigator.platform && (i = i.replace(/\n/g, "\r\n")), e.clipboardData.setData("text", i), e.preventDefault()); } OnChatTabRef(e) { this.m_refChatTabs = e; } OnDragEnter(e) { if (((0, T.X)(e && ("chattab" == e.type || "friend" == e.type || "chatroomgroup" == e.type || "html" == e.type), "Invalid data type passed to MultiChatDialog.OnDragEnter", e.type), "chattab" == e.type)) { let t = this.props.tabs, n = e; (n.tabSet != t || t.tabCount > 1) && (t.Focus(), this.m_refChatTabs && this.m_refChatTabs.GetDragTab() != n.tab && this.m_refChatTabs.SetDragTab(n.tab)); } return !0; } OnDragLeave() { this.m_refChatTabs && this.m_refChatTabs.SetDragTab(void 0); } OnDragOver(e) { this.m_refChatTabs && this.m_refChatTabs.UpdateDragOffset(e); } OnDrop(e, t) { if (((0, T.X)(e && ("chattab" == e.type || "friend" == e.type || "chatroomgroup" == e.type || "html" == e.type), "Invalid data type passed to MultiChatDialog.OnDrop", e.type), "chattab" == e.type)) { let t = e, n = -1; this.m_refChatTabs && (n = this.m_refChatTabs.state.iDragIndex), m.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed(), t.tabSet != this.props.tabs && (t.tabSet.RemoveTab(t.tab), this.props.tabs.AddTab(t.tab), m.g_FriendsUIDesktopApp.DragDropManager.EndDrag()), -1 != n && this.props.tabs.MoveTabToIndex(t.tab, n), this.props.tabs.ActivateTab(t.tab), this.setState({ tabDrag: void 0 }); } else if ("friend" == e.type) { m.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed(), e.friend.OpenChatDialog((0, m.Um)(this, t)); } else if ("chatroomgroup" == e.type) { m.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed(); let t = e; c.Ul.UIStore.ShowAndOrActivateChatRoomGroup((0, m.Um)(this), t.group, !0); } else "html" == e.type && e.mapData.has("text/plain") && this.props.tabs.activeTab.GetChatView().SendChatMessage(e.mapData.get("text/plain")); } OnHTMLKeyEvent(e) { if (o.De.IN_CLIENT && e.ctrlKey && !e.altKey) { if ((!e.shiftKey && 9 == e.keyCode) || 34 == e.keyCode) this.props.tabs.ActivateNextTab(); else if (9 == e.keyCode || 33 == e.keyCode) this.props.tabs.ActivatePreviousTab(); else { if ("W" != e.key && "w" != e.key) return; this.props.tabs.RemoveTab(this.props.tabs.activeTab); } return e.preventDefault(), void e.stopPropagation(); } } OnKeyDown(e) { let t = this.props.tabs.activeTab; if (!t) return; if (e.ctrlKey || e.altKey || e.metaKey || e.key.length > 1) return; let n = e.target, i = n && n.tagName ? n.tagName.toLowerCase() : ""; "input" != i && "select" != i && "textarea" != i && t.GetChatView().FocusTextInput(); } render() { var e; let t = this.props.tabs.activeTab; const n = null === (e = this.m_refChatTabs) || void 0 === e ? void 0 : e.GetDragTab(); n && (t = n); let i = this.props.tabs.tabs.slice(); n && -1 == i.indexOf(n) && i.push(n), i.sort((e, t) => (e.GetUniqueID() < t.GetUniqueID() ? 1 : -1)); let o = i.map((e) => { let n = null, i = e instanceof a.we && e, o = e.IsBroadcast(); return (n = i ? h.createElement(x.lp, { groupView: i, isActive: e == t, popup: this.props.popup }) : o ? h.createElement(re, { broadcastView: e, isActive: e == t, popup: this.props.popup }) : h.createElement(Y, { chatView: e.GetChatView(), isActive: e == t })), h.createElement(A.SV, { key: e.GetUniqueID() }, h.createElement(h.Suspense, { fallback: null }, n)); }); return h.createElement(d.R, { className: "multiChatDialog", rgAcceptedTypes: ["chattab", "friend", "chatroomgroup", "text/plain"], fnDragEnter: this.OnDragEnter, fnDragOver: this.OnDragOver, fnDragLeave: this.OnDragLeave, fnDrop: this.OnDrop, onKeyDown: this.OnKeyDown, onCopy: this.OnCopy }, h.createElement(N.Le, { tabSet: this.props.tabs, popup: this.props.popup, activeTab: t, ref: this.OnChatTabRef, ResponsiveWindowState: this.props.ResponsiveWindowState, showOpenFriendsList: this.props.showOpenFriendsList }), h.createElement(B.s, { className: "chatDialogs", onMoveUp: () => this.m_refChatTabs.FocusActiveTab() }, 0 == o.length && h.createElement("div", { className: "emptyChatDialogs" }, (0, O.Xx)("#Chat_EmptyDialogsWindowMsg")), o)); } }; (0, i.gn)([F.ak], ae.prototype, "OnCopy", null), (0, i.gn)([F.ak], ae.prototype, "OnChatTabRef", null), (0, i.gn)([F.ak], ae.prototype, "OnDragEnter", null), (0, i.gn)([F.ak], ae.prototype, "OnDragLeave", null), (0, i.gn)([F.ak], ae.prototype, "OnDragOver", null), (0, i.gn)([F.ak], ae.prototype, "OnDrop", null), (0, i.gn)([F.ak], ae.prototype, "OnHTMLKeyEvent", null), (0, i.gn)([F.ak], ae.prototype, "OnKeyDown", null), (ae = (0, i.gn)([I.Pi], ae)); let se = class extends h.Component { constructor(e) { super(e); } OnChatTabRef(e) { this.m_refChatTabs = e; } render() { var e; let t = this.props.tabs.activeTab; const n = null === (e = this.m_refChatTabs) || void 0 === e ? void 0 : e.GetDragTab(); n && (t = n); let i = this.props.tabs.tabs.slice(); n && -1 == i.indexOf(n) && i.push(n), i.sort((e, t) => (e.GetUniqueID() < t.GetUniqueID() ? 1 : -1)); let o = i.map((e) => { let n = null, i = e instanceof a.we && e, o = e.IsBroadcast(); return (n = i ? h.createElement(x.lp, { groupView: i, isActive: e == t, popup: this.props.popup, bSteamDeck: !0 }) : o ? h.createElement(re, { broadcastView: e, isActive: e == t, popup: this.props.popup }) : h.createElement(Y, { chatView: e.GetChatView(), isActive: e == t })), h.createElement(A.SV, { key: e.GetUniqueID() }, h.createElement(h.Suspense, { fallback: null }, n)); }); return h.createElement(B.s, { className: "multiChatDialog GamepadMode" }, t && t.IsFriendChat() && h.createElement(N.lR, { tab: t, active: !0, selectTab: () => {} }), h.createElement(B.s, { className: "chatDialogs" }, 0 == o.length && h.createElement("div", { className: "emptyChatDialogs" }, (0, O.Xx)("#Chat_EmptyDialogsWindowGamePadUIMsg")), o)); } }; (0, i.gn)([F.ak], se.prototype, "OnChatTabRef", null), (se = (0, i.gn)([I.Pi], se)); let le = class extends h.Component { constructor(e) { super(e); } InitiateVoiceChat() { let e = this.props.chatView.chat.accountid_partner; c.Ul.VoiceStore.InitiateFriendChat(e); } VoidOnClick() {} EndVoiceChat() { c.Ul.VoiceStore.GetActiveOneOnOneVoiceChatAccountID() == this.props.chatView.chat.accountid_partner && c.Ul.VoiceStore.OnUserEndVoiceChat(); } OnCloseClick() { c.Ul.VoiceStore.GetActiveOneOnOneVoiceChatAccountID() == this.props.chatView.chat.accountid_partner ? c.Ul.VoiceStore.OnUserEndVoiceChat() : c.Ul.VoiceStore.OnRejectOneOnOneVoiceChatForPartner(this.props.chatView.chat.accountid_partner); } RejectVoiceChatRequest() { c.Ul.VoiceStore.OnRejectOneOnOneVoiceChatForPartner(this.props.chatView.chat.accountid_partner); } OnSettingsClick(e) { c.Ul.IsDesktopUIActive() ? SteamClient.URL.ExecuteSteamURL("steam://open/settings/voice") : (0, oe.L)((0, m.Um)(this, e), e.currentTarget.ownerDocument.defaultView, "voice"); } render() { if (this.props.bSteamDeck) return this.renderSteamDeck(); let e, t = c.Ul.VoiceStore.BInitiatedOneOnOneChat(this.props.chatView.chat.accountid_partner), n = c.Ul.CMInterface.steamid.GetAccountID(), i = this.props.chatView.chat.accountid_partner, o = c.Ul.FriendStore.GetPlayer(n), r = c.Ul.VoiceStore.BSelfHasAcceptedOrInitiatedOneOnOneChat(i), a = c.Ul.VoiceStore.BSelfHadPreviouslyJoinedOneOnOneChat(i), s = this.props.chatView.chat.chat_partner, l = c.Ul.VoiceStore.BPartnerHasAcceptedOrInitiatedOneOnOneChat(i), m = !r && c.Ul.VoiceStore.BPartnerHasRequestedAndIsInOneOnOneChat(s.accountid), d = !1, p = !1, _ = !1; c.Ul.VoiceStore.GetActiveOneOnOneVoiceChatAccountID() == i && ((d = c.Ul.VoiceStore.HasBeenAttemptingOverTwoSeconds() || c.Ul.VoiceStore.IsAttemptingReconnect()), (p = !c.Ul.VoiceStore.BIsAccountFullyConnectedToActiveVoiceChat(n) || c.Ul.VoiceStore.IsAttemptingReconnect()), (_ = !c.Ul.VoiceStore.BIsAccountFullyConnectedToActiveVoiceChat(i))), (e = t || r ? h.createElement(u.Z, { key: n, classNames: "friend-anim", timeout: 320 }, h.createElement(ie.mo, { friend: o, key: n, showVoiceLevel: !0, context: { chat: this.props.chatView.chat }, listStatusIndicator: h.createElement("div", { className: "connectionSpinner" }) })) : h.createElement(u.Z, { key: n, classNames: "friend-anim", timeout: 320 }, h.createElement("div", { className: "friend emptyFriend", onClick: !r && this.InitiateVoiceChat }, h.createElement("div", { className: "avatarHolder" }, h.createElement("img", { className: "avatar", src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA", draggable: !1 }))))); let g, C = []; t && C.push(e), l || m ? C.push(h.createElement(u.Z, { key: i, classNames: "friend-anim", timeout: 320 }, h.createElement(ie.mo, { friend: s, key: i, showVoiceLevel: !0, context: { chat: this.props.chatView.chat }, listStatusIndicator: h.createElement("div", { className: "connectionSpinner" }) }))) : C.push(h.createElement(u.Z, { key: i, classNames: "friend-anim", timeout: 320 }, h.createElement("div", { className: "friend emptyFriend", onClick: r ? this.VoidOnClick : this.InitiateVoiceChat }, h.createElement("div", { className: "avatarHolder " }, h.createElement("img", { className: "avatar", src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA", draggable: !1 }))))), t || C.push(e), (g = r && l ? h.createElement(E.wl, { className: "inviteButton inviteButtonJoinVoice", onClick: this.EndVoiceChat, onOKActionDescription: (0, O.Xx)("#Voice_StopTalking") }, (0, O.Xx)("#Voice_StopTalking")) : r && !l ? h.createElement(E.wl, { className: "inviteButton inviteButtonJoinVoice", onClick: this.EndVoiceChat, onOKActionDescription: (0, O.Xx)("#Voice_EndVoice") }, (0, O.Xx)("#Voice_EndVoice")) : h.createElement(E.wl, { className: "inviteButton inviteButtonJoinVoice", onClick: this.InitiateVoiceChat, onOKActionDescription: (0, O.Xx)("#Voice_StartTalking") }, (0, O.Xx)("#Voice_StartTalking"))); let f = "", v = "OneOnOneVoiceRoomControls", S = !1; r && !l ? ((f = (0, O.Xx)("#Voice_WaitingForFriendToJoin", s.display_name)), (v += " WaitingForPartner")) : l && !r ? (a ? (f = (0, O.Xx)("#Voice_ChannelRejoinAvailable", s.display_name)) : ((f = (0, O.Xx)("#Voice_ChannelAvailable", s.display_name)), (v += " WaitingForYouFirstTime")), (v += " WaitingForYou")) : ((f = p ? (d ? h.createElement("a", { title: (0, O.Xx)("#VoiceChatConnectingHelp"), className: "connectionStatus", target: "_blank", href: "https://support.steampowered.com/kb_article.php?ref=2598-RTZB-6114" }, (0, O.Xx)("#VoiceChatConnecting")) : "") : !p && _ ? h.createElement("a", { title: (0, O.Xx)("#VoiceChatConnectingHelp"), className: "connectionStatus", target: "_blank", href: "https://support.steampowered.com/kb_article.php?ref=2598-RTZB-6114" }, (0, O.Xx)("#VoiceChatParterConnecting", s.display_name)) : (0, O.Xx)("#Voice_ChannelActive", s.display_name)), (v += " OneOnOneVoiceActive"), (S = !0)); let b = h.createElement("div", { className: "OneOnOneVoiceStatusLabel" }, f), I = r ? (0, O.Xx)("#Voice_EndVoice") : (0, O.Xx)("#Voice_Decline"); return h.createElement(B.s, { className: v, "flow-children": "row", focusable: !1 }, h.createElement("div", { className: "VoiceToggleIconCtn friendSettingsButton no-drag", onClick: this.OnSettingsClick, title: (0, O.Xx)("#Tooltip_VoiceSettings") }, h.createElement(k.Zrf, null)), h.createElement("div", { className: "OneOnOneVoiceMembers" }, g, !S && !r && h.createElement(E.wl, { className: "inviteButton inviteButtonDeclineVoice", onClick: this.OnCloseClick, onOKActionDescription: I }, I), h.createElement(B.s, { fnCanTakeFocus: () => !1, style: { display: "flex" } }, C), b), !S && h.createElement(B.s, { className: "OneOnOneVoiceClose", focusable: !0, onActivate: this.OnCloseClick, onOKActionDescription: I, title: I }, h.createElement(k.pVO, null))); } renderSteamDeck() { let e = this.props.chatView.chat.accountid_partner, t = c.Ul.VoiceStore.BSelfHasAcceptedOrInitiatedOneOnOneChat(e), n = c.Ul.VoiceStore.BSelfHadPreviouslyJoinedOneOnOneChat(e), i = c.Ul.VoiceStore.BPartnerHasRequestedAndIsInOneOnOneChat(e), o = this.props.chatView.chat.BIsVoiceAllowed(), r = "oneOnOneVoiceChatButton", a = null, s = { onSecondaryButton: null, onSecondaryActionDescription: null }; if (t && i) (a = h.createElement(k.eNM, null)), (s.onActivate = this.EndVoiceChat), (s.onOKActionDescription = (0, O.Xx)("#Voice_StopTalking")); else if (t && !i) (a = h.createElement(k.eNM, null)), (s.onActivate = this.EndVoiceChat), (s.onOKActionDescription = (0, O.Xx)("#Voice_EndVoice")); else if (i && !t && n) (a = h.createElement(k.Yx0, null)), (s.onActivate = this.InitiateVoiceChat), (s.onOKActionDescription = (0, O.Xx)("#Voice_StartTalking")), (s.onSecondaryButton = this.RejectVoiceChatRequest), (s.onSecondaryActionDescription = (0, O.Xx)("#Voice_DeclineVoiceChat")); else if (i) (a = h.createElement("div", { className: "WaitingForYouFirstTime" }, h.createElement(k.NBO, null), h.createElement("div", { className: "Sonar" }, h.createElement("div", { className: "SonarCircle" })))), (s.onActivate = this.InitiateVoiceChat), (s.onOKActionDescription = (0, O.Xx)("#Voice_StartTalking")), (s.onSecondaryButton = this.RejectVoiceChatRequest), (s.onSecondaryActionDescription = (0, O.Xx)("#Voice_DeclineVoiceChat")); else { if (!o) return null; (r += " NotInVoiceChat"), (a = h.createElement(k.Cq4, null)), (s.onActivate = this.InitiateVoiceChat), (s.onOKActionDescription = (0, O.Xx)("#Voice_StartChat")); } return h.createElement(B.s, Object.assign({ className: r, focusable: !0 }, s), a); } }; function ce(e, t, n) { let i, o = !1, l = !0; if (e.invitedto instanceof s.Xp) i = 300; else if (e.invitedto instanceof a.PR) { i = 340; let t = e.invitedto; t.BCanInvite() || t.BHasMember(e.invitee.accountid) || (l = !1); } else if (e.invitedto instanceof r.K) { (o = !0), (i = 340); let t = e.invitedto.GetGroup(); t.BCanInvite() || t.BHasMember(e.invitee.accountid) || (l = !1); } l ? (0, M.BR)(h.createElement(me, Object.assign({}, e)), n, "InviteDialog", { strTitle: o ? (0, O.Xx)("#Chat_Actions_InviteFriend_VoiceChat") : (0, O.Xx)("#Chat_Actions_DropGroupInvite_Title"), popupWidth: 650, popupHeight: i }, (0, m.Og)(n)) : (0, S.zp)(n, (0, O.Xx)("#Chat_Actions_DropGroupInvite_Denied"), (0, O.Xx)("#Chat_Actions_DropGroupInvite_Denied_Description")); } (0, i.gn)([F.ak], le.prototype, "InitiateVoiceChat", null), (0, i.gn)([F.ak], le.prototype, "VoidOnClick", null), (0, i.gn)([F.ak], le.prototype, "EndVoiceChat", null), (0, i.gn)([F.ak], le.prototype, "OnCloseClick", null), (0, i.gn)([F.ak], le.prototype, "RejectVoiceChatRequest", null), (0, i.gn)([F.ak], le.prototype, "OnSettingsClick", null), (le = (0, i.gn)([I.Pi], le)); let me = class extends h.Component { constructor(e) { super(e), (this.invitee = this.props.invitee); } AddMoreFriends(e) { let t = [], n = e.currentTarget.ownerDocument.defaultView; t.push(this.invitee.accountid), this.props.invitedto instanceof s.Xp ? (0, v.bI)((0, m.Um)(this, e), n, this.props.chatview, !0, t) : this.props.invitedto instanceof a.PR ? (0, f.oC)((0, m.Um)(this, e), n, this.props.invitedto, void 0, !0, t) : this.props.invitedto instanceof r.K && (0, f.hg)((0, m.Um)(this, e), n, this.props.invitedto.GetGroup(), this.props.invitedto, t), this.props.closeModal(); } Cancel() { this.props.closeModal(); } componentDidMount() { let e = y.findDOMNode(this); if (e) { let t = e.querySelector("button[type=submit]"); t && t.focus(); } } OnInviteClicked(e) { let t = e.currentTarget.ownerDocument.defaultView; if (this.props.invitedto instanceof s.Xp) { this.invitedToPlayer = this.props.invitedto; let e = []; e.push(this.invitedToPlayer.persona.m_steamid.ConvertTo64BitString()), e.push(this.invitee.persona.m_steamid.ConvertTo64BitString()), (0, v.l8)(t, this.props.chatview, e); } else if (this.props.invitedto instanceof a.PR) (this.invitedToGroup = this.props.invitedto), this.invitedToGroup.InviteFriend(this.invitee.accountid); else if (this.props.invitedto instanceof r.K) { [].push(this.invitee.accountid), (this.invitedToChatRoom = this.props.invitedto), this.invitedToChatRoom.GetGroup().InviteFriend(this.invitee.accountid, this.invitedToChatRoom); } this.props.closeModal(); } render() { let e, t, n, i = this.props.invitee, o = c.Ul.FriendStore.self, l = !1; this.props.invitedto instanceof s.Xp ? (e = this.props.invitedto) : this.props.invitedto instanceof a.PR ? (t = this.props.invitedto) : this.props.invitedto instanceof r.K && (n = this.props.invitedto); let m, d, u = "#Chat_Actions_DropGroupInvite_Confirm", p = !1; return ( t ? (t.BIsUserGroupMember(i) && (u = "#Chat_Actions_DropGroupInvite_Member_Confirm"), (l = !!t.BIsClanChatRoom() && c.Ul.FriendStore.ClanStore.GetClan(t.GetClanID()).BIsOGG()), (m = t.name), (d = h.createElement(C._P, { group: t, name: t.name })), (p = t.BIsUserGroupMember(i))) : e ? ((u = "#Chat_Actions_DropGroupInvite_1v2_Confirm"), (m = e.display_name), (d = h.createElement("div", { className: "displayRow" }, h.createElement("div", { className: "dropGroupInviteDialog_Friend" }, h.createElement("img", { src: o.persona.avatar_url_medium })), h.createElement("div", { className: "dropGroupInviteDialog_Friend" }, h.createElement("img", { src: e.persona.avatar_url_medium }))))) : n && ((u = "#Chat_Actions_DropVoiceInvite_Confirm"), (m = n.name), (d = h.createElement("div", { className: "displayRow" }, h.createElement(k.Cq4, null)))), h.createElement( M.e1, { onEscKeypress: this.Cancel }, h.createElement( R.oX, { classNameContent: "GenericConfirmDialog", onSubmit: this.OnInviteClicked, bCenterVertically: !0 }, h.createElement(R.h4, null, n ? (0, O.Xx)("#Chat_Actions_InviteFriend_VoiceChat") : (0, O.Xx)("#Chat_Actions_DropGroupInvite_Title")), h.createElement( R.uT, null, h.createElement("div", { className: "dropGroupInviteDialog displayColumn" + (t || n ? " groupInviteHeight" : "") }, h.createElement("span", { className: "dropGroupInviteDialog_Desc" }, (0, O.kQ)(u, h.createElement("span", { className: "highlight" }, i.display_name), h.createElement("span", { className: "highlight" }, m), e && h.createElement("span", { className: "highlight" }, (0, O.Xx)("#Chat_You")))), h.createElement("div", { className: "dropGroupInviteDialog_Graphic" + (l ? " isOGGGroup" : "") }, h.createElement("div", { className: "dropGroupInviteDialog_Friend" }, h.createElement("img", { src: i.persona.avatar_url_medium })), h.createElement("div", { className: "movingArrow" }, h.createElement(k.Ehc, { angle: 90 })), d, h.createElement("div", { className: "addMoreFriendsButton", onClick: this.AddMoreFriends }, h.createElement("div", null, (0, O.Xx)("#Chat_Actions_AddMoreFriends")), h.createElement("div", { className: "ExpandArrow" })))), ), h.createElement(R.$_, null, h.createElement(R.Uq, null, h.createElement(R.KM, { onClick: this.OnInviteClicked }, p ? (0, O.Xx)("#Chat_SendLink") : (0, O.Xx)("#Chat_Invite"), " "), h.createElement(R.zx, { onClick: this.Cancel }, (0, O.Xx)("#Button_Cancel")))), ), ) ); } }; (0, i.gn)([F.ak], me.prototype, "AddMoreFriends", null), (0, i.gn)([F.ak], me.prototype, "Cancel", null), (0, i.gn)([F.ak], me.prototype, "OnInviteClicked", null), (me = (0, i.gn)([I.Pi], me)); let de = class extends h.Component { AddFriendClick(e) { this.ContinueCreateChat((0, m.Um)(this, e), (0, G.RA)(e)); } ContinueCreateChat(e, t) { (0, v.bI)(e, t, this.props.chatView, !0); } render() { this.props.chatView.chat.chat_partner; let e = "inviteAnotherFriendButton"; return this.props.additionalClasses && (e += " " + this.props.additionalClasses), h.createElement(B.s, { title: (0, O.Xx)("#Chat_AddFriend_Hint"), className: e, onActivate: this.AddFriendClick, onOKActionDescription: (0, O.Xx)("#Chat_CreateChatRoom_InviteFriendsToChat") }, h.createElement(k.Kon, null)); } }; (0, i.gn)([F.ak], de.prototype, "AddFriendClick", null), (de = (0, i.gn)([I.Pi], de)); const he = ({ onClick: e, edge: t }) => h.createElement("div", { className: (0, L.Z)("BroadcastChatExpander", t), onClick: e, title: (0, O.Xx)("#Broadcast_View_ShowChat") }, h.createElement(k.QlI, { showChat: !0 })); let ue = class extends h.Component { OnTextChannelCloseClick(e) { this.props.groupView.ClosePopoverChat(); } OnChatHistoryRef(e) { e && e.Focus(); } render() { let e = this.props.groupView.GetPopoverChatView(); return e ? h.createElement(u.Z, { key: "quickChat", classNames: "chatWindow-anim", timeout: 320 }, h.createElement("div", { className: "VoiceRoomChatHistory" }, h.createElement("div", { className: "VoiceRoomChatWindow" }, h.createElement("div", { className: "VoiceRoomChatTitle" }, h.createElement("div", { className: "VoiceRoomTitleLabels" }, h.createElement("div", { className: "VoiceChatTextChannelName" }, (0, O.Xx)("#Chat_Scratch_Pad"))), h.createElement("div", { className: "MinimizeTextChat", onClick: this.OnTextChannelCloseClick }, h.createElement(k.pVO, null))), h.createElement("div", { className: "VoiceChatTextChannelDesc" }, (0, O.Xx)("#Chat_Scratch_Pad_Desc")), h.createElement(j.w, { chatView: e, isActive: !0, ref: this.OnChatHistoryRef })))) : null; } }; (0, i.gn)([F.ak], ue.prototype, "OnTextChannelCloseClick", null), (0, i.gn)([F.ak], ue.prototype, "OnChatHistoryRef", null), (ue = (0, i.gn)([I.Pi], ue)); let pe = class extends h.Component { constructor(e) { super(e); } OnBlock() { c.Ul.FriendStore.BlockPlayer(this.props.friend, !1), c.Ul.UIStore.CloseTabByID(this.props.chatView.GetUniqueID()); } OnAllow() { c.Ul.FriendStore.SetApprovedNonFriendMessages(this.props.friend.accountid); } render() { return h.createElement("div", { className: "NotAFriendMessage" }, h.createElement("div", { className: "NotAFriendBody" }, h.createElement("div", { className: "Exclamation" }, h.createElement(k.ge, null)), h.createElement("div", { className: "Explanation" }, h.createElement("div", { className: "ExplanationHeader" }, (0, O.Xx)("#DirectMessageFromNonFriend")), h.createElement("div", { className: "ExplanationBody" }, (0, O.Xx)("#DirectMessageFromNonFriendNote")), h.createElement(b.ns, { href: "https://support.steampowered.com/kb_article.php?ref=1266-OAFV-8478", className: "ExplanationMoreInfo" }, (0, O.Xx)("#Generic_More_Info"))), h.createElement("div", { className: "Buttons" }, h.createElement("button", { className: "NotAFriendActionButton", onClick: this.OnBlock }, (0, O.Xx)("#NonFriendAction_Block")), h.createElement("button", { className: "NotAFriendActionButton", onClick: this.OnAllow }, (0, O.Xx)("#NonFriendAction_Allow"))))); } }; (0, i.gn)([F.ak], pe.prototype, "OnBlock", null), (0, i.gn)([F.ak], pe.prototype, "OnAllow", null), (pe = (0, i.gn)([I.Pi], pe)); let _e = class extends h.Component { render() { const e = this.props, { chatView: t, friend: n } = e, o = (0, i._T)(e, ["chatView", "friend"]), a = t.chat instanceof r.K; return h.createElement(g, Object.assign({ message: a ? (0, O.Xx)("#Chat_DropToInviteGroup") : (0, O.Xx)("#Chat_DropToInvite"), name: n.display_name, renderImage: () => h.createElement(D.vV, { size: "Large", persona: n.persona }) }, o)); } }; _e = (0, i.gn)([I.Pi], _e); let ge = class extends h.Component { render() { const e = this.props, { chatView: t, group: n, clan: o } = e, r = (0, i._T)(e, ["chatView", "group", "clan"]); if (!n && !o) return (0, T.X)(!1, "Either a group or clan must be passed to DropGroupToInviteFriendMessage."), null; const a = (n || o).name; return h.createElement(g, Object.assign({ message: (0, O.Xx)("#Chat_DropGroupToInviteFriend"), name: a, renderImage: () => (o ? h.createElement(C.hV, { clan: o, size: "large" }) : h.createElement(C._P, { group: n, large: !0 })) }, r)); } }; ge = (0, i.gn)([I.Pi], ge); let Ce = class extends h.Component { render() { let e = !1; if (!(this.props.chatView.chat instanceof l.a)) return null; let t = this.props.chatView.chat; return t.is_friend_typing && (e = !0), h.createElement("div", { className: "FriendChatTypingNotification" + (e ? " FriendIsTyping" : "") }, (0, O.Xx)("#Friend_Chat_Typing", t.chat_partner.display_name)); } }; Ce = (0, i.gn)([I.Pi], Ce); }, 3276: (e, t, n) => { "use strict"; n.d(t, { $: () => ne }); var i = n(85556), o = n(14206), r = n.n(o), a = n(19953), s = n(46962), l = n(84446), c = n(23346), m = n(19339), d = n(72746), h = n(37234), u = n(50649), p = n(27378), _ = n(2049), g = n(16518), C = n(11259), f = n(84290); let v = class extends p.Component { render() { const { fileUploadManager: e } = this.props; let t = e.file_upload_props.eUploadState; return 1 == t ? p.createElement(S, { fileUploadManager: e }) : 3 == t || 5 == t || 4 == t ? p.createElement(I, { fileUploadManager: e }) : 0 != t ? p.createElement(b, { fileUploadManager: e }) : null; } }; v = (0, i.gn)([u.Pi], v); class S extends p.Component { constructor(e) { super(e), (this.state = { bSpoilerChecked: !1 }); } OnCancelClick(e) { this.props.fileUploadManager.Reset(); } OnUploadClick() { return (0, i.mG)(this, void 0, void 0, function* () { yield this.props.fileUploadManager.BeginFileUpload({ bSpoiler: this.state.bSpoilerChecked }), this.props.fileUploadManager.Reset(); }); } OnDialogChecked() { this.setState({ bSpoilerChecked: !this.state.bSpoilerChecked }); } render() { let e, t = this.props.fileUploadManager.file; return -1 != t.type.indexOf("image") ? (e = p.createElement("img", { className: "chatFileUploadPreview", src: this.props.fileUploadManager.file_upload_data_url })) : -1 != t.type.indexOf("video") && (e = p.createElement(g.nkn, null)), p.createElement("div", { className: "chatFileUploadPreviewContainer" }, e, p.createElement("div", { className: "chatFileUploadFileName" }, "'", t.name, "'"), p.createElement("div", { className: "chatFileUploadCancel", onClick: this.OnCancelClick }, p.createElement(g.pVO, null)), p.createElement("button", { className: "DialogButton Primary chatFileUploadBtn", type: "button", onClick: this.OnUploadClick }, (0, f.Xx)("#Chat_Upload")), p.createElement(C.ji, { className: "spoilerCheckBox", label: (0, f.Xx)("#ChatEntry_TagAsSpoiler"), checked: this.state.bSpoilerChecked, onChange: this.OnDialogChecked })); } } (0, i.gn)([_.ak], S.prototype, "OnCancelClick", null), (0, i.gn)([_.ak], S.prototype, "OnUploadClick", null), (0, i.gn)([_.ak], S.prototype, "OnDialogChecked", null); let b = class extends p.Component { render() { let e = this.props.fileUploadManager.file_upload_props, t = e.file ? (0, f.Xx)("#Chat_Uploading", e.displayFileName) : "", n = { width: e.uploadProgress + "%" }; return p.createElement("div", { className: "chatFileUploadProgressContainer" }, p.createElement("div", { className: "chatFileUploadProgressName" }, t), p.createElement("div", { className: "chatFileUploadProgressBarContainer DialogProgressBar_ProgressBarContainer" }, p.createElement("div", { className: "DialogProgressBar_Value", style: n }))); } }; b = (0, i.gn)([u.Pi], b); let I = class extends p.Component { ClearErrorState() { this.props.fileUploadManager.ClearFileUploadError(); } OnRetryClick() { return (0, i.mG)(this, void 0, void 0, function* () { yield this.props.fileUploadManager.RetryFileUpload(), this.props.fileUploadManager.Reset(); }); } render() { let e, t = this.props.fileUploadManager.file_upload_props, n = t.displayFileName ? (0, f.Xx)("#Chat_Uploading", t.displayFileName) : "", i = t.strErrorDescription || (0, f.Xx)("#Chat_Settings_Error_Unknown"); return 3 == t.eUploadState && (e = p.createElement(C.KM, { onClick: this.OnRetryClick }, (0, f.Xx)("#Chat_Upload_ErrorAction_Retry"))), p.createElement("div", { className: "chatFileUploadProgressContainer" }, p.createElement("div", { className: "chatFileUploadProgressName" }, n), p.createElement("div", { className: "chatFileUploadErrorDescription" }, i), p.createElement("div", { className: "chatFileUploadActions" }, p.createElement(C.Uq, { className: "DialogLayout_NoMinWidth" }, e, p.createElement(C.zx, { onClick: this.ClearErrorState }, (0, f.Xx)("#Chat_Upload_ErrorAction_Close"))))); } }; (0, i.gn)([_.ak], I.prototype, "ClearErrorState", null), (0, i.gn)([_.ak], I.prototype, "OnRetryClick", null), (I = (0, i.gn)([u.Pi], I)); var y = n(97224), E = n(31542), D = n(11612), w = n(82909), R = n(56320), A = n(83817), M = n(37153), k = n(2204), T = n.n(k), L = n(61963), G = n(40643), O = n(51579), F = n(79588), B = n(87805), x = n.n(B), N = n(87018); class P extends p.Component { constructor(e) { super(e), (this.m_rgCurrentMatches = []), (this.m_mapMatchByKey = new Map()), (this.m_hMobxSearchDisposer = (0, F.EH)(() => (0, i.mG)(this, void 0, void 0, function* () { yield this.UpdateSearchResults(this.props.strSearch), this.forceUpdate(); }), )), (this.state = { selectedIndex: void 0 }); } OnKeyDown(e) { this.BHandleKeyPress(e.keyCode) && e.preventDefault(); } BHandleKeyPress(e) { switch (e) { case 38: this.SetSelectedIndexDelta(-1); break; case 40: this.SetSelectedIndexDelta(1); break; case 36: this.SetSelectedIndex(0); break; case 33: this.SetSelectedIndexDelta(-this.GetPageSize()); break; case 35: this.SetSelectedIndex(-1); break; case 34: this.SetSelectedIndexDelta(this.GetPageSize()); break; case 13: case 9: if (void 0 === this.state.selectedIndex) return this.props.onSuggestionSelected(this.props.strSearch), !1; this.ChooseSuggestion(this.m_rgCurrentMatches[this.state.selectedIndex]); break; case 27: this.props.onSuggestionSelected(this.props.strSearch); break; default: return !1; } return !0; } GetPageSize() { let e = E.findDOMNode(this), t = e && e.firstElementChild, n = this.m_rgCurrentMatches.length; if ((n > this.getMaxMatches() && (n = this.getMaxMatches()), t && n)) { let e = t.scrollHeight / n, i = t.clientHeight / e; return Math.max(1, Math.floor(i)); } return 5; } ChooseSuggestion(e) { this.props.onSuggestionSelected(this.props.strSearch, e ? this.getSelection(e) : void 0); } SetSelectedIndexDelta(e) { void 0 !== this.state.selectedIndex ? this.SetSelectedIndex(this.state.selectedIndex + e) : this.SetSelectedIndex(1 === e ? 0 : e); } SetSelectedIndex(e) { if (!this.m_rgCurrentMatches.length) return; let t = this.m_rgCurrentMatches.length; t > this.getMaxMatches() && (t = this.getMaxMatches()), (e %= t) < 0 && (e += t), this.setState({ selectedIndex: e }); } FindKeyIndex(e) { if (!this.m_mapMatchByKey.size && this.m_rgCurrentMatches.length) for (let e = 0; e < this.m_rgCurrentMatches.length; e++) this.m_mapMatchByKey.set(this.getKey(this.m_rgCurrentMatches[e]), e); return this.m_mapMatchByKey.get(e); } OnClickSuggestion(e) { let t = this.FindKeyIndex(e); void 0 !== t && this.ChooseSuggestion(this.m_rgCurrentMatches[t]); } OnMouseOverSuggestion(e) { let t = this.FindKeyIndex(e); void 0 !== t && this.SetSelectedIndex(t); } BindSelectedElement(e) { let t = E.findDOMNode(this), n = E.findDOMNode(e), i = t && t.firstElementChild; n && i && (i.scrollTop + i.clientHeight < n.offsetTop || n.offsetTop < i.scrollTop) && n.scrollIntoView(); } UpdateSearchResults(e) { return (0, i.mG)(this, void 0, void 0, function* () { (this.m_rgCurrentMatches = yield this.performSearch(e)), (this.m_strLastSearch = e), this.m_mapMatchByKey.clear(), this.m_rgCurrentMatches.length ? (this.state && void 0 !== this.state.selectedIndex ? this.state.selectedIndex >= this.m_rgCurrentMatches.length && this.setState({ selectedIndex: 0 }) : (void 0 === this.props.nMinimumSearchLengthBeforeAutoSelection || e.length >= this.props.nMinimumSearchLengthBeforeAutoSelection) && this.setState({ selectedIndex: 0 })) : this.state && void 0 !== this.state.selectedIndex && this.setState({ selectedIndex: void 0 }); }); } componentWillUnmount() { this.m_hMobxSearchDisposer && (this.m_hMobxSearchDisposer(), (this.m_hMobxSearchDisposer = void 0)); } componentDidUpdate(e) { return (0, i.mG)(this, void 0, void 0, function* () { this.m_strLastSearch != this.props.strSearch && (yield this.UpdateSearchResults(this.props.strSearch), this.forceUpdate()); }); } render() { let e = []; if (this.m_rgCurrentMatches.length) { let t = this.getMaxMatches(); for (let n = 0; n < Math.min(t, this.m_rgCurrentMatches.length); n++) { let t = this.m_rgCurrentMatches[n], i = this.getKey(t), o = n === this.state.selectedIndex; e.push(p.createElement(U, { key: i, matchKey: i, fnOnClick: this.OnClickSuggestion, fnOnMouseOver: this.OnMouseOverSuggestion, bIsSelected: o, ref: o ? this.BindSelectedElement : void 0 }, this.renderMatch(t))); } this.m_rgCurrentMatches.length > t && e.push(this.renderTooManyMatchesMessage(this.m_rgCurrentMatches.length - t)); } else { let t = this.renderNoMatchMessage(); if (!t) return null; e.push(t); } return p.createElement("div", { className: x().mentionDialogPosition }, p.createElement("div", { className: x().mentionDialog, tabIndex: 0, onKeyDown: this.OnKeyDown }, this.renderHeader(), e)); } } (0, i.gn)([_.ak], P.prototype, "OnKeyDown", null), (0, i.gn)([_.ak], P.prototype, "OnClickSuggestion", null), (0, i.gn)([_.ak], P.prototype, "OnMouseOverSuggestion", null), (0, i.gn)([_.ak], P.prototype, "BindSelectedElement", null); class U extends p.PureComponent { OnMouseOver(e) { this.props.fnOnMouseOver(this.props.matchKey); } OnClick(e) { this.props.fnOnClick(this.props.matchKey); } render() { return p.createElement("div", { className: (0, N.Z)(x().suggestOption, x().mentionSearchOption, this.props.bIsSelected ? x().selected : ""), onMouseEnter: this.OnMouseOver, onClick: this.OnClick }, this.props.children); } } (0, i.gn)([_.ak], U.prototype, "OnMouseOver", null), (0, i.gn)([_.ak], U.prototype, "OnClick", null); const V = P; var H = n(95762), W = n.n(H); const X = class extends V { performSearch(e) { return this.props.emoticonStore.SearchEmoticons(e, 10, !1); } getSelection(e) { return e.name; } getKey(e) { return e.name; } renderMatch(e) { return p.createElement("div", { className: (0, N.Z)(W().EmoticonSuggestion, e.recent ? "Recent" : "") }, p.createElement("div", { className: W().Emoticon }, p.createElement(O.tk, { emoticon: e.name, emoticonHoverStore: this.props.emoticonHoverStore }), e.new && p.createElement(O.D3, null)), ":", e.name, ":"); } renderNoMatchMessage() { return null; } renderTooManyMatchesMessage(e) { return null; } renderHeader() { return null; } getMaxMatches() { return Number.MAX_VALUE; } }; var j = n(88669), z = n(21298), K = n(7098), q = n(46057), Z = n(68816), Q = n(31360), $ = n(10553), Y = n(37232), J = n(62860); const ee = function (e) { return p.createElement(p.Fragment, null); }; function te(e) { return p.createElement(p.Suspense, { fallback: null }, p.createElement(ee, Object.assign({}, e))); } let ne = class extends p.Component { constructor() { super(...arguments), (this.m_navRef = (0, R.Hy)()), (this.m_refTextInput = p.createRef()), (this.m_refFileInput = p.createRef()), (this.m_textFocusCallback = null), (this.m_nChatEntryInitialHeight = void 0), (this.m_iSizeChatEntryInterval = void 0), (this.state = { messageInput: "", submitEnabled: !1, mentionSearch: void 0, activeSuggestSearchType: void 0 }); } BindMentionDialog(e) { this.m_MentionDialog = e; } SetMessageInput(e, t) { this.setState({ messageInput: e, submitEnabled: e.trim().length > 0 }, t), (this.props.chatView.text_entry = e), e && e.length && this.props.chatView.chat.OnTyping(); } OnSubmit(e) { e && e.preventDefault(), this.props.chatView && this.props.chatView.file_upload_manager.file && this.props.chatView.UploadFile(), this.state.messageInput.trim().length && this.props.chatView && (this.props.chatView.SendChatMessage(this.state.messageInput), (this.m_iMentionSearchCancelledOffset = void 0), this.ClearMentionSearchState(), this.setState({ submitEnabled: !1 }), this.SetMessageInput(""), (this.props.chatView.is_scrolled_to_bottom = !0), this.FocusTextInput()), this.SizeChatEntry(this.m_refTextInput.current, !0); } OnTextAreaChange(e) { e.persist(), this.m_iSizeChatEntryInterval || (this.m_iSizeChatEntryInterval = window.setTimeout(() => { (this.m_iSizeChatEntryInterval = 0), this.SizeChatEntry(e.currentTarget); }, 1e3)), this.SetMessageInput(e.target.value); } SizeChatEntry(e, t) { if (!e) return; let n = d.Ul.SettingsStore.FriendsSettings.bCompactFriendsList ? 12 : 0; e.style.height = "inherit"; let i = window.getComputedStyle(e), o = parseInt(i.getPropertyValue("border-top-width"), 10) + parseInt(i.getPropertyValue("padding-top"), 10) + parseInt(i.getPropertyValue("padding-bottom"), 10) + parseInt(i.getPropertyValue("border-bottom-width"), 10); null == this.m_nChatEntryInitialHeight && (this.m_nChatEntryInitialHeight = e.clientHeight - o - n + "px"); let r = e.scrollHeight - o - n; t ? ((e.style.height = this.m_nChatEntryInitialHeight), (this.m_nChatEntryInitialHeight = void 0)) : (e.style.height = Math.min(120, r) + "px"); } OnFocus(e) { this.UpdateMentionSearchState(); } OnBlur(e) { if (!e.relatedTarget || !j.ni(E.findDOMNode(this), e.relatedTarget)) { if ((0, L.BY)()) return; (this.m_iMentionSearchCancelledOffset = void 0), this.ClearMentionSearchState(); } } OnKeyDown(e) { if (this.state.activeSuggestSearchType && this.m_MentionDialog && !e.shiftKey && !e.ctrlKey && this.m_MentionDialog.BHandleKeyPress(e.keyCode)) return e.preventDefault(), void e.stopPropagation(); 8 == e.keyCode || 46 == e.keyCode ? (this.m_iMentionSearchCancelledOffset = void 0) : 13 != e.keyCode || e.shiftKey || e.ctrlKey ? 13 == e.keyCode && e.ctrlKey && (e.preventDefault(), e.stopPropagation(), this.InsertAtCursor("\n")) : (e.preventDefault(), e.stopPropagation(), this.OnSubmit()); } OnPaste(e) { let t = j.bI(e); t && (this.props.chatView.SetFileToUpload(t), e.preventDefault(), e.stopPropagation()); } OnFileInputChange(e) { let t = e.currentTarget; t.files.length && (this.props.chatView.SetFileToUpload(t.files[0]), (t.value = "")); } OnEmbedClick(e) { (0, w.yV)(p.createElement(se, { chatView: this.props.chatView, refFileInput: this.m_refFileInput.current, fnInsertText: this.InsertAtCursor.bind(this) }), e.currentTarget, { bOverlapHorizontal: !0, bPreferPopLeft: !0, bPreferPopTop: !0 }); } OnEmoticonSelected(e, t = !1) { t || this.FocusTextInput(), this.InsertAtCursor(`:${e}:`); } InsertAtCursor(e) { let t = this.m_refTextInput.current, n = t.value, i = n.substr(0, t.selectionStart) + e + n.substr(t.selectionEnd), o = t.selectionStart + e.length; this.SetMessageInput(i, () => { t.selectionStart = t.selectionEnd = o; }); } OnKeyPress(e) { this.UpdateMentionSearchState(); } OnKeyboardFullyVisible() { this.props.chatView.OnScrollBottomRequest(); } OnClick(e) { this.UpdateMentionSearchState(); } OnContextMenu(e) { a.De.IN_CLIENT || e.stopPropagation(); } ClearMentionSearchState() { (this.m_iMentionSearchStartOffset = void 0), this.state.activeSuggestSearchType && this.setState({ activeSuggestSearchType: void 0, mentionSearch: void 0 }); } FindMatchOpener(e, t, n) { for (let i = n - 1; i >= 0; i--) { if (t[i] == e) return i; if (" " == t[i]) break; } } UpdateMentionSearchState() { let e = this.m_refTextInput.current; if (!e) return; let t = (this.props.chatView && this.props.chatView.chat) instanceof l.K; if (e.selectionStart != e.selectionEnd || !e.selectionStart) return void this.ClearMentionSearchState(); let n, i, o = e.selectionStart, r = e.value; for (let e = o - 1; e >= 0; e--) { let s = e > 0 ? r[e - 1] : void 0; if (("@" == r[e] || "@" == r[e]) && t) { (s && " " != s && "\n" != s) || ((n = e), (i = "Mention")); break; } if (":" == r[e] && o - e > 2) { (s && " " != s && "\n" != s && ":" != s) || ((n = e), (i = "Emoticon")); break; } if (a.De.EREALM != D.IN.k_ESteamRealmChina && r.startsWith("/store ")) { (n = 6), (i = "Store"); break; } if ("/" == r[e] && 0 == e) { (n = e), (i = "SlashCommand"); break; } if (" " == r[e] || "\n" == r[e]) break; } if (void 0 === n || n === this.m_iMentionSearchCancelledOffset) return void this.ClearMentionSearchState(); let s = r.substr(n + 1, o - n - 1); (this.m_iMentionSearchStartOffset = n), this.setState({ activeSuggestSearchType: i, mentionSearch: s }); } ReplaceSuggestedText(e, t, n) { let i = this.m_refTextInput.current.selectionStart, o = this.m_refTextInput.current.value, r = this.FindMatchOpener(e, o, i); if ((void 0 === r && "@" == e && (r = this.FindMatchOpener("@", o, i)), void 0 !== r)) { let e = o.substr(0, r); (e += t), (i >= o.length || " " != o[i]) && (e += " "); let a = e.length; (e += o.substr(i)), this.SetMessageInput(e, n), (this.m_refTextInput.current.value = e), (this.m_refTextInput.current.selectionStart = this.m_refTextInput.current.selectionEnd = a), this.FocusTextInput(); } } OnMentionSuggestionSelected(e, t) { let n; if ((t instanceof c.Xp ? (n = t.persona.m_strPlayerName) : t && (n = t), !n)) return (this.m_iMentionSearchCancelledOffset = this.m_iMentionSearchStartOffset), void this.ClearMentionSearchState(); { let e = n; -1 !== e.lastIndexOf("#") && (e = e.substr(0, e.lastIndexOf("#"))), this.props.chatView.BIsMemberNameAmbiguous(e) && (t instanceof c.Xp ? (n += "#" + t.accountid.toString(36)) : (n += "#0")); } this.ReplaceSuggestedText("@", "@" + n), this.ClearMentionSearchState(); } OnEmoticonSuggestionSelected(e, t) { if (!t) return (this.m_iMentionSearchCancelledOffset = this.m_iMentionSearchStartOffset), void this.ClearMentionSearchState(); this.ReplaceSuggestedText(":", ":" + t + ":"), this.ClearMentionSearchState(); } OnSlashCommandSuggestionSelected(e, t) { if (!t) return (this.m_iMentionSearchCancelledOffset = this.m_iMentionSearchStartOffset), void this.ClearMentionSearchState(); this.ReplaceSuggestedText("/", t, () => { 0 === (0, s.oT)(t).unExpectedArguments && this.OnSubmit(); }), this.ClearMentionSearchState(); } OnStoreSuggestionSelected(e, t) { if (!t) return (this.m_iMentionSearchCancelledOffset = this.m_iMentionSearchStartOffset), void this.ClearMentionSearchState(); this.SetMessageInput(t, () => { this.OnSubmit(); }), this.ClearMentionSearchState(); } FocusTextInput() { var e, t; (null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) ? setTimeout(() => { var e; null === (e = this.m_navRef.current) || void 0 === e || e.TakeFocus(); }, 0) : null === (t = this.m_refTextInput.current) || void 0 === t || t.focus(); } InitForChatView(e) { this.m_textFocusCallback && (this.m_textFocusCallback.Unregister(), (this.m_textFocusCallback = null)); let t = e.text_entry; t != this.state.messageInput && this.setState({ messageInput: t }), (this.m_textFocusCallback = e.RegisterForTextEntryFocus(this.FocusTextInput)); } componentDidMount() { this.InitForChatView(this.props.chatView), this.FocusTextInput(); } componentDidUpdate(e) { this.props.chatView !== e.chatView && this.InitForChatView(this.props.chatView), this.props.isActive && !e.isActive && setTimeout(() => this.FocusTextInput(), 0); } componentWillUnmount() { this.m_textFocusCallback && this.m_textFocusCallback.Unregister(), (this.m_textFocusCallback = null); } OnRoomEffectSelected(e) { this.props.chatView && this.props.chatView.SendChatMessage(`/roomeffect ${e}`), this.FocusTextInput(); } OnStickerSelected(e) { this.props.chatView && this.props.chatView.SendChatMessage(`/sticker ${e}`).then(() => d.Ul.ChatStore.EmoticonStore.TrackStickerUsage(e, Date.now() / 1e3)), this.FocusTextInput(); } render() { var e, t; const { chatView: n, disabled: i, ownerWindow: o } = this.props; let r, a = n && n.chat; switch (this.state.activeSuggestSearchType) { case "Mention": r = p.createElement(oe, { chatView: n, strSearch: this.state.mentionSearch, onSuggestionSelected: this.OnMentionSuggestionSelected, ref: this.BindMentionDialog }); break; case "Emoticon": r = p.createElement(X, { emoticonStore: d.Ul.ChatStore.EmoticonStore, emoticonHoverStore: M.$, strSearch: this.state.mentionSearch, nMinimumSearchLengthBeforeAutoSelection: 2, onSuggestionSelected: this.OnEmoticonSuggestionSelected, ref: this.BindMentionDialog }); break; case "SlashCommand": r = p.createElement(re, { strSearch: this.state.mentionSearch, onSuggestionSelected: this.OnSlashCommandSuggestionSelected, ref: this.BindMentionDialog }); break; case "Store": r = p.createElement(ae, { strSearch: this.state.mentionSearch, onSuggestionSelected: this.OnStoreSuggestionSelected, ref: this.BindMentionDialog }); } let s = d.Ul.SettingsStore.FriendsSettings.bCompactFriendsList, c = d.Ul.SettingsStore.FriendsSettings.nChatFontSize, u = ""; c == y.Ao.k_EChatFontSizeSmall ? (u = " smallChatFont") : c == y.Ao.k_EChatFontSizeLarge && (u = " largeChatFont"); let _ = {}; if ( (this.state.submitEnabled && ((_.onSecondaryButton = () => { this.SetMessageInput(""); }), (_.onSecondaryActionDescription = (0, f.Xx)("#ChatEntryButton_Clear"))), a.BIsVoiceAllowed()) ) if (a instanceof m.a) { if (!n.BVoiceActive()) { _.onOptionsButton = () => a.ToggleVoiceChat(); let e = a.accountid_partner, t = d.Ul.VoiceStore.BPartnerHasRequestedAndIsInOneOnOneChat(e); _.onOptionsActionDescription = (0, f.Xx)(t ? "#Voice_StartTalking" : "#Friend_Menu_StartVoiceChat"); } } else if (a instanceof l.K) { let e = n.GetParentGroupView(), t = e.GetGroup(); if (t.voiceRoomList.length > 1) { const t = () => { (0, Z.AM)(p.createElement(Q.zb, { groupView: e }), o); }; (_.onOptionsButton = t), (_.onOptionsActionDescription = (0, f.Xx)("#Chat_ChatRoomGroup_ViewVoiceChats")); } else if (1 != t.voiceRoomList.length || d.Ul.VoiceStore.IsVoiceActiveForGroup(t.GetGroupID())) 0 != t.voiceRoomList.length || d.Ul.VoiceStore.IsVoiceChatActive() || ((_.onOptionsButton = () => { t.CreateAndJoinTempVoiceRoom(); }), (_.onOptionsActionDescription = (0, f.Xx)("#Chat_ChatRoomGroup_StartVoiceChat"))); else { const e = () => { var e; null === (e = t.voiceRoomList[0]) || void 0 === e || e.StartVoiceChat(); }; (_.onOptionsButton = e), (_.onOptionsActionDescription = (0, f.Xx)("#Chat_ChatRoomGroup_JoinVoiceChat")); } } return p.createElement( A.s, Object.assign({ className: "chatEntry" + (s ? " compactView" : "") + u, "flow-children": "row" }, _, { navEntryPreferPosition: J.c4.PREFERRED_CHILD }), p.createElement(v, { fileUploadManager: n.file_upload_manager }), p.createElement(te, { clipToUpload: n.clip_to_upload, finishUpload: (e) => { n.SetClipToUpload(void 0), e && n.SendChatMessage(e); }, }), p.createElement( "form", { className: `${T().chatEntryControls}`, onSubmit: this.OnSubmit, onBlur: this.OnBlur }, r, p.createElement(R.DP, { className: T().chatTextarea, value: this.state.messageInput, preferredFocus: !0, onKeyboardFullyVisible: this.OnKeyboardFullyVisible, onPaste: this.OnPaste, onContextMenu: this.OnContextMenu, ref: this.m_refTextInput, onChange: this.OnTextAreaChange, navRef: this.m_navRef, onKeyDown: this.OnKeyDown, onKeyUp: this.OnKeyPress, onClick: this.OnClick, onFocus: this.OnFocus, disabled: i || d.Ul.CMInterface.BDisconnected(), maxLength: 5e3, spellCheck: !d.Ul.SettingsStore.FriendsSettings.bDisableSpellcheck }), p.createElement(R.wl, { className: T().chatSubmitButton + (this.state.submitEnabled ? "" : ` ${T().disabled}`), type: "submit", disabled: !this.state.submitEnabled, title: (0, f.Xx)("#ChatEntryButton_Submit"), onOKActionDescription: (0, f.Xx)("#ChatEntryButton_Submit") }, p.createElement(g.k4K, null)), p.createElement("input", { type: "file", accept: ".jpg,.jpeg,.png,.gif,.webm,.mpg,.mpeg,.ogv", style: { display: "none" }, name: "fileupload", ref: this.m_refFileInput, onChange: this.OnFileInputChange }), ), p.createElement( "div", { className: `${T().chatEntryActionsContainer} compactableHeight` }, !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && p.createElement("div", { className: T().chatEntryActionsGroup }, p.createElement(G.Z, { disabled: i, OnEmoticonSelected: this.OnEmoticonSelected, onRoomEffectSelected: this.OnRoomEffectSelected, roomEffectSettings: d.Ul.GetChatRoomEffectSettings(), onStickerSelected: this.OnStickerSelected, rtLastAckedNewEmoticons: h.g_FriendsUIDesktopApp.UIDisplayPrefs.rtLastAckedNewEmoticons, SetUIDisplayPref: h.g_FriendsUIDesktopApp.SetUIDisplayPref.bind(h.g_FriendsUIDesktopApp), emoticonHoverStore: M.$, emoticonStore: d.Ul.ChatStore.EmoticonStore, bShowChatAddons: !0 }), p.createElement(R.wl, { className: `${T().chatSubmitButton} ${T().EmbedButton}` + (i ? ` ${T().disabled}` : ""), type: "button", onClick: this.OnEmbedClick, title: (0, f.Xx)("#ChatEntryButton_SendEmbed"), disabled: i, onOKActionDescription: (0, f.Xx)("#ChatEntryButton_SendEmbed") }, p.createElement(g.TCU, null))), !(null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) && p.createElement(ie, { chat: a }), ), p.createElement("div", { className: "disconnectBlocker compactableHeight" }), ); } }; (ne.contextType = $.E_), (0, i.gn)([_.ak], ne.prototype, "BindMentionDialog", null), (0, i.gn)([_.ak], ne.prototype, "OnSubmit", null), (0, i.gn)([_.ak], ne.prototype, "OnTextAreaChange", null), (0, i.gn)([_.ak], ne.prototype, "SizeChatEntry", null), (0, i.gn)([_.ak], ne.prototype, "OnFocus", null), (0, i.gn)([_.ak], ne.prototype, "OnBlur", null), (0, i.gn)([_.ak], ne.prototype, "OnKeyDown", null), (0, i.gn)([_.ak], ne.prototype, "OnPaste", null), (0, i.gn)([_.ak], ne.prototype, "OnFileInputChange", null), (0, i.gn)([_.ak], ne.prototype, "OnEmbedClick", null), (0, i.gn)([_.ak], ne.prototype, "OnEmoticonSelected", null), (0, i.gn)([_.ak], ne.prototype, "OnKeyPress", null), (0, i.gn)([_.ak], ne.prototype, "OnKeyboardFullyVisible", null), (0, i.gn)([_.ak], ne.prototype, "OnClick", null), (0, i.gn)([_.ak], ne.prototype, "OnContextMenu", null), (0, i.gn)([_.ak], ne.prototype, "OnMentionSuggestionSelected", null), (0, i.gn)([_.ak], ne.prototype, "OnEmoticonSuggestionSelected", null), (0, i.gn)([_.ak], ne.prototype, "OnSlashCommandSuggestionSelected", null), (0, i.gn)([_.ak], ne.prototype, "OnStoreSuggestionSelected", null), (0, i.gn)([_.ak], ne.prototype, "FocusTextInput", null), (0, i.gn)([_.ak], ne.prototype, "OnRoomEffectSelected", null), (0, i.gn)([_.ak], ne.prototype, "OnStickerSelected", null), (ne = (0, i.gn)([u.Pi], ne)); let ie = class extends p.Component { HandleStartVoice(e) { let t = this.props.chat; if (t instanceof m.a) return void t.ToggleVoiceChat(); if (this.IsVoiceActiveForButton()) return void d.Ul.VoiceStore.OnUserEndVoiceChat(); if (!(t instanceof l.K)) return; let n = t.GetGroup(); if (!n) return; let i = n.voiceRoomList; if (0 == i.length) return void n.CreateAndJoinTempVoiceRoom(); if (1 == i.length) { let e = i[0]; return void d.Ul.VoiceStore.InitiateRoomChat(n.GetGroupID(), e.GetRoomID()); } let o = p.createElement(le, { group: n }); (0, w.yV)(o, e.currentTarget, { bOverlapHorizontal: !0, bPreferPopLeft: !0, bPreferPopTop: !0 }); } IsVoiceActiveForButton() { let e = this.props.chat, t = !1; if (e instanceof m.a) t = e.BVoiceActive(); else if (e instanceof l.K) { let n = e.GetGroup(); t = d.Ul.VoiceStore.IsVoiceActiveForGroup(n.GetGroupID()); } return t; } OnSettingsClick(e) { (0, K.L)((0, h.Um)(this, e), e.currentTarget.ownerDocument.defaultView, "voice"); } render() { let e = this.IsVoiceActiveForButton(), t = ["VoiceToggle"], n = "", i = this.props.chat; e ? (t.push("Active"), d.Ul.VoiceStore.BNoMicAvailableForSession() && t.push("NoMicrophone"), d.Ul.VoiceStore.IsMicMuted() && t.push("MicMuted")) : t.push(" Inactive"); let o = !i.BIsVoiceAllowed(); if (o) t.push(" Disabled"), (n = i.GetVoiceNotAllowedReason()); else if (i instanceof m.a) n = e ? "#Tooltip_VoiceControlButton_1v1_active" : "#Tooltip_VoiceControlButton_1v1_inactive"; else if (i instanceof l.K) if (this.IsVoiceActiveForButton()) n = "#Tooltip_VoiceControlButton_group_leave"; else { let e = i.GetGroup(); e && 0 == e.voiceRoomList.length ? (n = "#Tooltip_VoiceControlButton_group_create") : e && 1 == e.voiceRoomList.length ? (n = "#Tooltip_VoiceControlButton_group_joinsingle") : e && (n = "#Tooltip_VoiceControlButton_group_joinmultiple"); } let r = d.Ul.VoiceStore.GetPushToTalkEnabled(), a = d.Ul.VoiceStore.GetPushToMuteEnabled(), s = d.Ul.VoiceStore.GetPushToTalkVoiceStateEnabled(), c = d.Ul.VoiceStore.GetPushToTalkHotKeyDisplayString(), h = ""; return ( (r || a) && (h += " pushToTalkEnabled"), s && (h += " pushToTalkKeyDown"), p.createElement("div", { className: "ChatMessageEntryVoice" + h + (e ? " Active" : " Inactive") + (o ? " Disabled" : "") }, p.createElement("div", { className: "buttonsContainer" }, p.createElement(R.wl, { disabled: o, className: t.join(" "), onClick: this.HandleStartVoice, onOKActionDescription: (0, f.Xx)(n), title: (0, f.Xx)(n) }, p.createElement("div", { className: "VoiceToggleIconCtn" }, e ? p.createElement(g.xsH, null) : p.createElement(g.Cq4, null))), e && p.createElement("div", { className: "activeVoiceControls" }, p.createElement("div", { className: "activeVoiceFlexBox" }, p.createElement("div", { className: "activeVoiceButtons" }, p.createElement(q.SR, null), p.createElement(q.$J, null))))), (r || a) && this.IsVoiceActiveForButton() && p.createElement("div", { className: "activeVoicePushToTalk" + h, title: (0, f.Xx)(a ? "#ActiveVoicePushToMute" : "#ActiveVoicePushToTalk", c) }, c)) ); } }; (0, i.gn)([_.ak], ie.prototype, "HandleStartVoice", null), (0, i.gn)([_.ak], ie.prototype, "OnSettingsClick", null), (ie = (0, i.gn)([u.Pi], ie)); class oe extends V { performSearch(e) { return (0, i.mG)(this, void 0, void 0, function* () { return this.props.chatView.SearchMembersForMention(e, Number.MAX_VALUE); }); } ChooseSuggestion(e) { (e && e.strNotSelectable) || super.ChooseSuggestion(e); } getSelection(e) { return e.friend ? e.friend : e.meta_mention; } getKey(e) { return "" + (e.friend ? e.friend.accountid : e.meta_mention); } renderMatch(e) { let t, n, { friend: i, iMatchOffset: o, bNicknameMatch: r } = e, a = this.props.strSearch.length, s = null; return ( i ? ((t = i.persona.m_strPlayerName), (n = i.has_nickname && i.nickname), i.persona.avatar_url_medium && (s = i.persona.avatar_url_medium)) : ((t = "@" + e.meta_mention), (n = null), o++), r ? p.createElement("span", { className: "mentionSuggestion" }, s && p.createElement("img", { className: "mentionAvatar", src: i.persona.avatar_url_medium, draggable: !1 }), t, p.createElement("span", { className: "nickname" }, " (", n.substr(0, o).replace(/ /g, " "), p.createElement("span", { className: "mentionSearchMatch" }, n.substr(o, a).replace(/ /g, " ")), n.substr(o + a).replace(/ /g, " "), ")")) : p.createElement("span", { className: "mentionSuggestion" }, t.substr(0, o).replace(/ /g, " "), s && p.createElement("img", { className: "mentionAvatar", src: i.persona.avatar_url_medium, draggable: !1 }), p.createElement("span", { className: "mentionSearchMatch" }, t.substr(o, a).replace(/ /g, " ")), t.substr(o + a).replace(/ /g, " "), e.strNotSelectable && p.createElement("span", { className: "notSelectable" }, " ", ": " + e.strNotSelectable, " "), n && p.createElement("span", { className: "nickname" }, " (", n, ")")) ); } renderNoMatchMessage() { return p.createElement("div", { key: "nomatches", className: "suggestOption mentionSearchOption noMatches" }, (0, f.Xx)("#ChatMentionSuggest_NoMatches")); } renderTooManyMatchesMessage(e) { let t = e <= 1 ? "#ChatMentionSuggest_ManyMatches" : "#ChatMentionSuggest_ManyMatchesPlural"; return p.createElement("div", { key: "manymatches", className: "suggestOption mentionSearchOption manyMatches" }, (0, f.Xx)(t, e)); } renderHeader() { return p.createElement("div", { className: "mentionSearchText" }, (0, f.Xx)("#ChatMentionSuggest_MembersMatching", this.props.strSearch)); } getMaxMatches() { var e; return (null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) ? 6 : oe.nMaxMatches; } } (oe.contextType = $.E_), (oe.nMaxMatches = 12); class re extends V { performSearch(e) { const t = "/" + e; return (0, s.VO)().filter((e) => e.startsWith(t)); } getSelection(e) { return e; } getKey(e) { return e; } renderMatch(e) { const t = (0, s.oT)(e); if (!t) return null; const n = (0, f.Xx)(t.strDescriptionToken); return p.createElement("span", { className: "SlashCommandSuggestion" }, p.createElement("span", { className: "SlashCommandSuggestion_SlashCommand" }, e), ": ", p.createElement("span", { className: "SlashCommandSuggestion_SlashCommandDescription" }, n)); } renderNoMatchMessage() { return null; } renderTooManyMatchesMessage(e) { return null; } renderHeader() { return null; } getMaxMatches() { return Number.MAX_VALUE; } } class ae extends V { performSearch(e) { return (0, i.mG)(this, void 0, void 0, function* () { this.m_mapSuggestions || (this.m_mapSuggestions = new Map()); let t = e.trim(); return this.m_mapSuggestions.has(t) || this.m_mapSuggestions.set(t, this.loadSearchFromStore(t)), this.m_mapSuggestions.get(t); }); } loadSearchFromStore(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = { term: e, f: "json", cc: a.De.COUNTRY, l: a.De.LANGUAGE, origin: self.origin }; return (yield r().get(`${a.De.STORE_BASE_URL}search/suggest`, { params: t })).data.filter((e) => "game" === e.type || "software" === e.type) || []; }); } getSelection(e) { return `${a.De.STORE_BASE_URL}app/${e.id}`; } getKey(e) { return String(e.id); } renderMatch(e) { return p.createElement("span", { className: "SlashCommandSuggestion" }, p.createElement("span", { className: "SlashCommandSuggestion_SlashCommand" }, e.name)); } renderNoMatchMessage() { return null; } renderTooManyMatchesMessage(e) { return null; } renderHeader() { return null; } getMaxMatches() { return Number.MAX_VALUE; } } function se(e) { let t = [], n = "undefined" != typeof SteamClient && void 0 !== SteamClient.Screenshots, o = (function () { let e = "undefined" != typeof SteamClient && void 0 !== SteamClient.Screenshots; const [t, n] = p.useState(null); return ( p.useEffect(() => { if (!e) return; let t = !1; return ( SteamClient.Screenshots.GetLastScreenshotTaken().then((e) => { t || n(e); }), () => { t = !0; } ); }, [e]), e ? t : null ); })(); (0, Y.xB)(); if ( (e.refFileInput && t.push( p.createElement( L.Zo, { key: "upload", onSelected: () => { e.refFileInput.click(); }, }, (0, f.Xx)("#ChatEntry_UploadImage"), ), ), n) ) { let n = null == o || void 0 === o, a = null; !n && o && (a = () => (function (e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = "https://steamloopback.host/" + t, i = yield r()({ url: n, method: "GET", responseType: "blob" }), o = z.hj(n, "/"), a = j.Lh(i.data, o); e.SetFileToUpload(a); }); })(e.chatView, o.strUrl)), t.push(p.createElement(L.Zo, { key: "lastscreenshot", disabled: n, onSelected: a }, (0, f.Xx)("#ChatEntry_UploadLastScreenshot"))); } return ( t.push( p.createElement( L.Zo, { key: "tradeoffer", onSelected: () => { d.Ul.EconomyStore.GetTradeOfferURL().then((t) => { e.fnInsertText(t); }); }, }, (0, f.Xx)("#ChatEntry_SendTradeURL"), ), ), p.createElement(L.xV, null, t) ); } function le(e) { let t = e.group.GetGroupID(), n = e.group.voiceRoomList.map((e) => p.createElement( L.Zo, { key: e.GetRoomID(), onSelected: () => { d.Ul.VoiceStore.InitiateRoomChat(t, e.GetRoomID()); }, }, e.name, ), ); return p.createElement(L.xV, null, n); } }, 618: (e, t, n) => { "use strict"; n.d(t, { UZ: () => G, _P: () => V, hV: () => U, oY: () => T, vT: () => H }); var i = n(85556), o = n(10237), r = n.n(o), a = n(37234), s = n(88669), l = n(72746), c = n(51997), m = n(34268), d = n(85516), h = n(71357), u = n(50649), p = n(27378), _ = n(16518), g = n(84290), C = n(2049), f = n(21298), v = n(41111), S = n(90656), b = n(66156), I = n(87018), y = n(88991), E = n(61963), D = n(82909), w = n(83817), R = n(68816), A = n(31360), M = n(14341); const k = ["148618792083695825", "76561197960266962"]; let T = class extends p.Component { InviteFriend(e) { (0, v.hg)((0, a.Um)(this, e), (0, s.RA)(e), this.props.groupView.GetGroup()); } OpenSettings(e) { (0, m.n)((0, s.RA)(e), this.props.groupView); } OpenNotificationPreferences(e) { (0, d.Uu)((0, s.RA)(e), this.props.groupView); } OnContextMenu(e) { (0, c.bU)(e, this.props.groupView.GetGroup(), { is_chat_window: !0 }); } render() { let e = this.props.groupView, t = e.GetGroup(), n = t.name, i = t.tagline, o = !1; t.readyToRender && (o = t.BCanInvite()); const r = e.GetGroup().watching_broadcast_steamid; return p.createElement( "div", { className: "chatRoomHeader" }, p.createElement( w.s, { "flow-children": "row", className: "chatRoomGroupHeader" + (r ? " notifyBroadcast" : ""), onContextMenu: this.OnContextMenu, onMenuButton: this.OnContextMenu }, p.createElement(V, { group: t }), p.createElement("div", { className: "chatRoomGroupHeaderNameandTag" }, p.createElement("div", { className: "chatRoomGroupHeaderName" }, n), p.createElement(L, { strTagline: i })), p.createElement("div", { className: "chatRoomGroupSpacer" }), t.readyToRender && p.createElement( p.Fragment, null, r && p.createElement(O, { groupView: e }), p.createElement( "div", { className: "chatRoomGroupControls" }, p.createElement("div", { className: "chatRoomOptions" }, p.createElement(w.s, { className: "chatRoomButton ManageNotifications", onActivate: this.OpenNotificationPreferences, title: (0, g.Xx)("#Tooltip_NotificationSettings") }, p.createElement(_.Uos, null)), o && p.createElement(w.s, { className: "chatRoomButton InviteToGroupChat", onActivate: this.InviteFriend, title: (0, g.Xx)("#Tooltip_InviteToGroup") }, p.createElement(_.Kon, null)), !o && p.createElement("div", { className: "chatRoomButton InviteToGroupChat Disabled", onClick: (e) => {}, title: (0, g.Xx)("#Tooltip_InviteToGroup_Denied") }, p.createElement(_.Kon, null)), p.createElement(w.s, { className: "chatRoomButton GroupChatSettings", onActivate: this.OpenSettings, title: (0, g.Xx)("#Tooltip_GroupChatSettings") }, p.createElement(_.lVV, null))), p.createElement("div", { className: "chatRoomGroupStats" }, p.createElement(x, { groupView: e }), p.createElement(P, { groupView: e }), p.createElement(N, { groupView: e })), ), ), ), ); } }; function L(e) { const { strTagline: t } = e, n = t.toLowerCase(); return (!n.startsWith("https://") && !n.startsWith("http://")) || t.includes(" ") ? p.createElement("div", { className: "chatRoomGroupHeaderTagline" }, e.strTagline) : p.createElement(M.ns, { href: t, className: "chatRoomGroupHeaderTagline", bUseLinkFilter: !0 }, t); } (0, i.gn)([C.ak], T.prototype, "InviteFriend", null), (0, i.gn)([C.ak], T.prototype, "OpenSettings", null), (0, i.gn)([C.ak], T.prototype, "OpenNotificationPreferences", null), (0, i.gn)([C.ak], T.prototype, "OnContextMenu", null), (T = (0, i.gn)([u.Pi], T)); let G = class extends p.Component { fnShowTextChannelsDialog(e) { (0, R.AM)(p.createElement(A.Yq, { groupView: this.props.groupView }), (0, s.RA)(e)); } render() { var e, t; let n = this.props.groupView, i = n.GetGroup(), o = i.name, r = i.tagline, a = !1; i.readyToRender && (a = i.BCanInvite()); const s = n.GetGroup().watching_broadcast_steamid, l = null === (e = n.GetActiveChatView()) || void 0 === e ? void 0 : e.chat.GetVoiceAllowed(); let c = null === (t = n.GetActiveChatView()) || void 0 === t ? void 0 : t.GetTabName(); return ( l && (c = (0, g.Xx)("#GroupSettings_Channels_VoiceQuickChatRoom", c)), p.createElement( "div", { className: "chatRoomHeader" }, p.createElement( w.s, { focusable: !1, fnCanTakeFocus: () => !0, "flow-children": "row", className: "chatRoomGroupHeader" + (s ? " notifyBroadcast" : "") }, p.createElement(V, { group: i }), p.createElement("div", { className: "chatRoomGroupHeaderNameandTag" }, p.createElement("div", { className: "chatRoomGroupHeaderName" }, o, p.createElement(L, { strTagline: r })), p.createElement(w.s, { className: "chatRoomGroupActiveChat " + (l ? "voiceRoom" : ""), focusable: !0, fnCanTakeFocus: () => !0, onActivate: this.fnShowTextChannelsDialog, onOKActionDescription: (0, g.Xx)("#GroupSettings_Channels_TextChannels") }, p.createElement(_.MFo, null), c)), p.createElement("div", { className: "chatRoomGroupSpacer" }), i.readyToRender && p.createElement(p.Fragment, null, s && p.createElement(O, { groupView: n }), p.createElement("div", { className: "chatRoomGroupControls" }, p.createElement("div", { className: "chatRoomGroupStats" }, p.createElement(x, { groupView: n }), p.createElement(P, { groupView: n }), p.createElement(N, { groupView: n })))), ), ) ); } }; (0, i.gn)([C.ak], G.prototype, "fnShowTextChannelsDialog", null), (G = (0, i.gn)([u.Pi], G)); let O = class extends p.Component { constructor(e) { super(e); let t = this.GetBroadcastID(e.groupView); this.state = { info: S.BroadcastWatchStore.StartInfo(t) }; } GetBroadcastID(e) { return e.GetGroup().watching_broadcast_steamid.ConvertTo64BitString(); } componentWillUnmount() { S.BroadcastWatchStore.StopInfo(this.state.info); } OnRemoveBroadcast(e) { e.stopPropagation(); const t = this.props.groupView.GetGroup(); if (!t.BCanIAssociateBroadcast()) return; const n = (0, s.RA)(e); (0, h.p3)(n, (0, g.Xx)("#Broadcast_EndWatchParty"), (0, g.Xx)("#Broadcast_EndWatchPartyPrompt"), (0, g.Xx)("#Broadcast_EndWatchParty")).then(() => t.SetChatRoomGroupWatchingBroadcast(void 0)); } OnToggleBroadcast(e) { let t = this.props.groupView; t.isBroadcastShown ? t.HideBroadcast() : t.ShowBroadcast(); } render() { const { info: { m_strAppTitle: e, m_strThumbnailUrl: t, m_strTitle: n }, } = this.state, i = this.props.groupView, o = i.GetGroup(), r = this.GetBroadcastID(this.props.groupView), a = i.isBroadcastShown; if (k.indexOf(r) >= 0) return p.createElement(F, { groupView: i, onClick: this.OnToggleBroadcast, onRemoveBroadcast: this.OnRemoveBroadcast, watchingBroadcast: a }); if (a) return null; let s = new y.K(r), c = n; return n || (c = (0, g.Xx)("#PersonaStateWatchingBroadcast_Player", l.Ul.FriendStore.GetPlayer(s.GetAccountID()).display_name)), p.createElement("div", { className: "broadcastInfoContainer", onClick: this.OnToggleBroadcast }, p.createElement("div", { className: "broadcastDetails" }, p.createElement("div", { className: "nowWatching" }, (0, g.Xx)("#Broadcast_NowWatching")), p.createElement("div", { className: "gameTitle" }, e), p.createElement("div", { className: "broadcastTitle" }, c)), p.createElement("div", { className: "thumbnail" }, t && p.createElement(b.m, { className: "thumbnailImg", src: t, duration: 2500 })), o.BCanIAssociateBroadcast() && p.createElement("div", { className: "actions", onClick: this.OnRemoveBroadcast }, p.createElement(_.X, null))); } }; (0, i.gn)([C.ak], O.prototype, "OnRemoveBroadcast", null), (0, i.gn)([C.ak], O.prototype, "OnToggleBroadcast", null), (O = (0, i.gn)([u.Pi], O)); class F extends p.Component { OnContextMenu(e) { this.props.groupView.GetGroup().BCanIAssociateBroadcast() && (function (e, t) { (0, D.yV)(p.createElement(B, { onRemoveBroadcast: t }), e); })(e, this.props.onRemoveBroadcast); } render() { let e = this.props.watchingBroadcast, t = (0, I.Z)(r().YuleLog, e && r().Watching); return p.createElement("div", { className: t, onClick: this.props.onClick, onContextMenu: this.OnContextMenu }); } } (0, i.gn)([C.ak], F.prototype, "OnContextMenu", null); class B extends p.Component { render() { return p.createElement(E.xV, { className: "chatRoomListItemContextMenu" }, p.createElement(E.Zo, { key: "removebroadcast", onSelected: this.props.onRemoveBroadcast }, (0, g.Xx)("#Chat_Actions_RemoveRoom_Action"))); } } let x = (0, u.Pi)((e) => { const { groupView: t } = e; return p.createElement("div", { className: "statMemberStat statMembersTotal" }, p.createElement("div", { className: "statCircle" }), (0, g.kb)("#Chat_Members", t.GetMemberCountTotal())); }), N = (0, u.Pi)((e) => { const { groupView: t } = e; let n = t.GetMemberCountInGame(); return 0 == n ? null : p.createElement("div", { className: "statMemberStat statMembersInGame", title: (0, g.kb)("#Chat_Members_InGame_Tooltip", n) }, p.createElement("div", { className: "statCircle" }), n); }), P = (0, u.Pi)((e) => { const { groupView: t } = e; let n = t.GetMemberCountOnline(); return 0 == n ? null : p.createElement("div", { className: "statMemberStat statMembersOnline", title: (0, g.kb)("#Chat_Members_Online_Tooltip", n) }, p.createElement("div", { className: "statCircle" }), n); }), U = (0, u.Pi)((e) => { let t = e.size; if (("large" == t || "medium" == t) && e.clan.BIsOGG() && e.clan.GetOGGAppID()) { let t = l.Ul.AppInfoStore.GetAppInfo(e.clan.GetOGGAppID()); return p.createElement("div", { className: "ChatRoomGroupOGGAvatar Large" }, p.createElement("img", { className: "OGGAvatar", src: t.header_image_url })); } let n = ""; "micro" == t ? (n = "Micro") : "smallish" == t ? (n = "Small Smallish") : "smaller" == t ? (n = "Smaller") : "small" == t ? (n = "Small") : "large" == t && (n = "Large"); let i = "large" == t ? e.clan.avatar_url_full : e.clan.avatar_url_medium; return p.createElement("div", { className: "ChatRoomGroupAvatar " + n }, p.createElement("img", { className: "ChatRoomGroupAvatar_Avatar", src: i })); }), V = class extends p.Component { render() { let e = this.props.group; if (e && e.BIsClanChatRoom()) { let t = l.Ul.FriendStore.ClanStore.GetClan(e.GetClanID()), n = "medium"; return this.props.micro ? (n = "micro") : this.props.small ? (n = "small") : this.props.smallish ? (n = "smallish") : this.props.smaller ? (n = "smaller") : this.props.large && (n = "large"), p.createElement(U, { clan: t, size: n }); } let t = ""; if ((this.props.micro ? (t = "Micro") : this.props.small ? (t = "Small") : this.props.smallish ? (t = "Small Smallish") : this.props.smaller ? (t = "Smaller") : this.props.large && (t = "Large"), e && !e.IsNamedGroupChat())) { let n = e.members_to_highlight, i = n.members, o = n.remaining_count; if (i.length) { let e = i.length + (o ? 1 : 0); return p.createElement( "div", { className: "ChatRoomMultiFriendAvatar With" + e + "Items " + t }, i.map((e, t) => p.createElement("img", { src: this.props.large ? e.persona.avatar_url_medium : e.persona.avatar_url, key: t, className: "MultiAvatar Index" + t })), o > 0 && p.createElement("div", { className: "ChatRoomMultiFriendMore MultiAvatar Index3" }, "+", o), ); } } if (e && e.hasIcon) return p.createElement("div", { className: "ChatRoomGroupAvatar HasAvatar " + t }, p.createElement("img", { className: "ChatRoomGroupAvatar_Avatar", src: e.avatar_url_full })); { let n = ""; e ? (n = e.name) : this.props.name && (n = this.props.name); let i = (0, f.Gt)(n), o = "ChatRoomGroupAvatar " + t; return f.CR(i) && (o += " EmojiInitials"), p.createElement("div", { className: o }, p.createElement("div", { className: "ChatRoomGroupAvatar_initials" }, i)); } } }; function H(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = (0, a.rb)(e), i = t.BIsClanChatRoom() ? "#Chat_Actions_LeaveChatRoomGroup_ClanConfirm" : t.BIsAccountIDOwner(l.Ul.CMInterface.steamid.GetAccountID()) ? "#Chat_Actions_OwnerLeaveChatRoomGroup_Confirm" : "#Chat_Actions_LeaveChatRoomGroup_Confirm"; (yield (0, h.V3)(e, (0, g.Xx)("#Chat_Actions_LeaveChatRoomGroup"), (0, g.Xx)(i, t.name), (0, g.Xx)("#Chat_Actions_LeaveChatRoomGroup"))) && t.LeaveChatRoomGroup(n); }); } V = (0, i.gn)([u.Pi], V); }, 31360: (e, t, n) => { "use strict"; n.d(t, { lp: () => _e, Yq: () => Ce, zb: () => fe }); var i = n(85556), o = n(11259), r = n(68816), a = n(65204), s = n(99165), l = n(19953), c = n(84446), m = n(72746), d = n(37234), h = n(23133), u = n(27378), p = n(16518), _ = n(50649), g = n(23346), C = n(2049), f = n(46057), v = n(70008), S = n(7597), b = n(37035); class I extends u.Component { constructor(e) { super(e), (this.m_elContainer = null), (this.m_resizeObserver = null), (this.state = { nWidth: 0, nHeight: 0 }); } componentWillUnmount() { this.m_resizeObserver && this.m_resizeObserver.disconnect(); } BindContainerRef(e) { this.m_resizeObserver && (this.m_resizeObserver.disconnect(), (this.m_resizeObserver = null)), (this.m_elContainer = e), this.m_elContainer && ((this.m_resizeObserver = (0, C.it)(this.m_elContainer, this.OnResize)), this.UpdateDimensions(this.m_elContainer.clientWidth, this.m_elContainer.clientHeight)), this.props.refToDiv && this.props.refToDiv(e); } UpdateDimensions(e, t) { (this.state.nWidth == e && this.state.nHeight == t) || this.setState({ nWidth: e, nHeight: t }); } OnResize(e, t) { let n = 0, i = 0; if (e.length > 0) { let t = e[0].contentRect; (n = t.width), (i = t.height); } this.UpdateDimensions(n, i); } render() { const e = this.props, { bUseRelativePosition: t, className: n, refToDiv: o } = e, r = (0, i._T)(e, ["bUseRelativePosition", "className", "refToDiv"]), a = t ? { position: "relative" } : { position: "absolute", top: 0, right: 0, bottom: 0, left: 0 }, s = { width: this.state.nWidth, height: this.state.nHeight }, l = this.props.children(s); return u.createElement("div", Object.assign({ className: n, style: a, ref: this.BindContainerRef }, r), l); } } (0, i.gn)([C.ak], I.prototype, "BindContainerRef", null), (0, i.gn)([C.ak], I.prototype, "OnResize", null); var y = n(84290), E = n(87018), D = n(83817), w = n(56320), R = n(8070); const A = (e) => (l.De.IN_CLIENT ? u.createElement(I, Object.assign({}, e)) : u.createElement(v.ZP, Object.assign({}, e))); let M = class extends u.Component { GetFriendRenderContext() { let e = this.props.groupView.GetGroup(); return (this.m_renderContext && this.m_renderContext.group == e) || (this.m_renderContext = { group: e, chatContext: "chatmemberlist" }), this.m_renderContext; } GetMembersMatchingSearch(e) { let t = N(this.props.groupView.GetGroup().memberList.member_list, e); return t.sort(g.Xp.DefaultFriendSortComparator), t; } OnMemberListToggleViewClick() { this.props.groupView.SetMemberListCollapsed(this.props.groupView.isMemberListExpanded); } OnSearchInput(e) { this.props.groupView.UpdateMemberSearch(e.currentTarget.value); } OnSearchSubmit(e) { e.preventDefault(); let t = this.props.groupView, n = t.normalizedMemberSearch; if (n && n.length) { let t = this.GetMembersMatchingSearch(n); t.length && t[0].OpenChatDialog((0, d.Um)(this, e)); } t.ClearMemberSearch(); } OnSearchKeyDown(e) { 27 == e.keyCode && (e.preventDefault(), e.currentTarget.blur(), this.props.groupView.ClearMemberSearch()); } OnClearSearch() { this.props.groupView.ClearMemberSearch(); } OnSearchFocus() { this.props.groupView.UpdateMemberSearch(this.props.groupView.GetMemberSearch()); } OnSearchBlur() { 0 == this.props.groupView.GetMemberSearch().length && this.props.groupView.ClearMemberSearch(); } render() { let e = this.props.groupView, t = e.isMemberListExpanded, n = e.GetMemberSearch(), i = "MemberListColumn", o = (0, y.Xx)("#Tooltip_MemberCollapse"); t || ((i += " MemberListViewCompact"), (o = (0, y.Xx)("#Tooltip_MemberExpand"))); let r = "MemberListOptionsContainer"; return ( e.IsMemberSearchActive() && (r += " SearchActive"), u.createElement( D.s, { className: i }, u.createElement( "div", { className: r }, u.createElement("div", { className: "MemberListOption ToggleMemberListView" + (n.length > 0 ? " SearchActive" : ""), onClick: this.OnMemberListToggleViewClick, title: o }, u.createElement(p.NP6, null)), u.createElement("form", { className: "socialInputContainer", name: "friendSearchForm", onSubmit: this.OnSearchSubmit }, u.createElement("div", { className: "inputContainer no-drag" }, u.createElement("input", { className: "friendSearchInput", type: "text", name: "memberlistSearch", placeholder: (0, y.Xx)("#SearchByName"), value: n, onChange: this.OnSearchInput, onKeyDown: this.OnSearchKeyDown, onFocus: this.OnSearchFocus, onBlur: this.OnSearchBlur, autoComplete: "off" }), e.has_search_error ? u.createElement("div", { className: "friendSearchError", title: (0, y.Xx)("#SearchError") }, u.createElement(p.ge, { color: "red" })) : u.createElement("div", { className: "friendSearchClear", onClick: this.OnClearSearch }, u.createElement(p.pVO, null)))), ), u.createElement(D.s, { style: { display: "flex", flex: 1, position: "relative" }, "flow-children": "column" }, e.GetGroup().BIsMemberListVirtualized() ? u.createElement(G, { groupView: this.props.groupView, inactive: this.props.inactive, context: this.GetFriendRenderContext() }) : u.createElement(P, { groupView: this.props.groupView, inactive: this.props.inactive, context: this.GetFriendRenderContext() })), u.createElement("div", { className: "disconnectBlocker" }), ) ); } }; (0, i.gn)([C.ak], M.prototype, "OnMemberListToggleViewClick", null), (0, i.gn)([C.ak], M.prototype, "OnSearchInput", null), (0, i.gn)([C.ak], M.prototype, "OnSearchSubmit", null), (0, i.gn)([C.ak], M.prototype, "OnSearchKeyDown", null), (0, i.gn)([C.ak], M.prototype, "OnClearSearch", null), (0, i.gn)([C.ak], M.prototype, "OnSearchFocus", null), (0, i.gn)([C.ak], M.prototype, "OnSearchBlur", null), (M = (0, i.gn)([_.Pi], M)); let k = class extends u.Component { GetFriendRenderContext() { let e = this.props.groupView.GetGroup(); return (this.m_renderContext && this.m_renderContext.group == e) || (this.m_renderContext = { group: e, chatContext: "chatmemberlistselection" }), this.m_renderContext; } GetMembersMatchingSearch(e) { let t = N(this.props.groupView.GetGroup().memberList.member_list, e); return t.sort(g.Xp.DefaultFriendSortComparator), t; } OnSearchInput(e) { this.props.groupView.UpdateMemberSearch(e.currentTarget.value); } OnSearchSubmit(e) { e.preventDefault(); let t = this.props.groupView, n = t.normalizedMemberSearch; if (n && n.length) { let t = this.GetMembersMatchingSearch(n); t.length && t[0].OpenChatDialog((0, d.Um)(this, e)); } t.ClearMemberSearch(); } OnSearchKeyDown(e) { 27 == e.keyCode && (e.preventDefault(), e.currentTarget.blur(), this.props.groupView.ClearMemberSearch()); } OnClearSearch() { this.props.groupView.ClearMemberSearch(); } OnSearchFocus() { this.props.groupView.UpdateMemberSearch(this.props.groupView.GetMemberSearch()); } OnSearchBlur() { 0 == this.props.groupView.GetMemberSearch().length && this.props.groupView.ClearMemberSearch(); } render() { let e = this.props.groupView, t = e.GetMemberSearch(), n = "MemberListOptionsContainer"; e.IsMemberSearchActive() && (n += " SearchActive"); const i = (e) => ({ onActivate: (t) => { e.OpenChatDialog((0, d.Um)(null, t)), this.props.onAction(); }, onOKActionDescription: (0, y.Xx)("#Friend_Menu_SendMessage"), }); return u.createElement( D.s, { className: "GamepadMode MemberListColumn", "flow-children": "column" }, u.createElement( R.e, null, u.createElement("div", { className: n }, u.createElement("form", { className: "socialInputContainer", name: "friendSearchForm", onSubmit: this.OnSearchSubmit }, u.createElement(D.s, { className: "inputContainer no-drag", "flow-children": "row" }, u.createElement(w.bX, { className: "friendSearchInput", type: "text", name: "memberlistSearch", placeholder: (0, y.Xx)("#SearchByName"), value: t, onChange: this.OnSearchInput, onKeyDown: this.OnSearchKeyDown, onFocus: this.OnSearchFocus, onBlur: this.OnSearchBlur, autoComplete: "off" }), e.has_search_error ? u.createElement("div", { className: "friendSearchError", title: (0, y.Xx)("#SearchError") }, u.createElement(p.ge, { color: "red" })) : u.createElement(D.s, { className: "friendSearchClear", onActivate: this.OnClearSearch }, u.createElement(p.pVO, null))))), u.createElement(D.s, { style: { display: "flex", flex: 1, position: "relative", minHeight: "300px" }, "flow-children": "column" }, e.GetGroup().BIsMemberListVirtualized() ? u.createElement(G, { groupView: this.props.groupView, inactive: this.props.inactive, context: this.GetFriendRenderContext(), fnGetPanelProps: i }) : u.createElement(P, { groupView: this.props.groupView, inactive: this.props.inactive, context: this.GetFriendRenderContext(), fnGetPanelProps: i })), u.createElement("div", { className: "disconnectBlocker" }), ), ); } }; function T(e) { return e ? 36 : 28; } function L(e) { return e ? 44 : 36; } (0, i.gn)([C.ak], k.prototype, "OnSearchInput", null), (0, i.gn)([C.ak], k.prototype, "OnSearchSubmit", null), (0, i.gn)([C.ak], k.prototype, "OnSearchKeyDown", null), (0, i.gn)([C.ak], k.prototype, "OnClearSearch", null), (0, i.gn)([C.ak], k.prototype, "OnSearchFocus", null), (0, i.gn)([C.ak], k.prototype, "OnSearchBlur", null), (k = (0, i.gn)([_.Pi], k)); let G = class extends u.Component { render() { const { groupView: e } = this.props, t = e.IsMemberSearchActive() && void 0 !== e.search_results; return u.createElement(A, null, ({ height: e, width: n }) => (t ? u.createElement(F, Object.assign({}, this.props, { width: n, height: e })) : u.createElement(O, Object.assign({}, this.props, { width: n, height: e })))); } }; G = (0, i.gn)([_.Pi], G); let O = class extends u.Component { render() { var e; const { width: t, height: n, groupView: i, context: o, fnGetPanelProps: r } = this.props, a = i.GetGroup().memberCountTotal; let s = this.props.groupView.GetVirtualizedMemberListView(); return s.GetViewChangenumber(), u.createElement(S.t7, { width: t, height: n, itemCount: a, itemSize: L(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI), overscanCount: 10, onItemsRendered: this.OnItemsRendered, itemKey: (e) => s.GetAccountIDAt(e) || e, style: { overflowX: "hidden" } }, (e) => u.createElement(B, Object.assign({}, e, { virtualizer: s, groupView: i, context: o, fnGetPanelProps: r }))); } OnItemsRendered(e) { this.props.groupView.GetVirtualizedMemberListView().SetViewExtents(e.visibleStartIndex, e.visibleStopIndex); } }; (O.contextType = l.E_), (0, i.gn)([C.ak], O.prototype, "OnItemsRendered", null), (O = (0, i.gn)([_.Pi], O)); let F = class extends u.Component { render() { var e; const { width: t, height: n, groupView: i, context: o, fnGetPanelProps: r } = this.props, a = i.search_results.length; return u.createElement(S.t7, { width: t, height: n, itemCount: a, itemSize: L(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI), overscanCount: 10, itemKey: (e) => i.search_results[e].friend.accountid, style: { overflowX: "hidden" } }, (e) => u.createElement(x, Object.assign({}, e, { player: i.search_results[e.index].friend, groupView: i, context: o, fnGetPanelProps: r }))); } }; (F.contextType = l.E_), (F = (0, i.gn)([_.Pi], F)); class B extends u.Component { render() { const { index: e, style: t, virtualizer: n, groupView: i, context: o, fnGetPanelProps: r } = this.props, a = n.GetAccountIDAt(e); if (!a) return null; const s = n.GetMember(a); return s ? u.createElement(x, { player: s, groupView: i, style: t, context: o, fnGetPanelProps: r }) : null; } } const x = ({ style: e, player: t, groupView: n, className: i, bHideGameName: o, context: r, fnGetPanelProps: a }) => { let s = (0, l.id)(), c = a ? a(t) : {}; return u.createElement(D.s, Object.assign({ style: Object.assign(Object.assign({}, e), { height: `${L(s)}px` }) }, c, { className: i }), u.createElement(V, { friend: t, bHideGameName: o, groupView: n, context: r })); }; function N(e, t) { return e.filter((e) => e.BMatchesSearchString(t, !1)); } let P = class extends u.Component { constructor(e) { super(e), (this.state = { collapsedBuckets: {} }), (this.m_disposeGetMemberList = m.Ul.GroupMemberStore.RegisterForGroupMemberList(this.OnMemberListChanged, e.groupView.GetGroup().GetGroupID())); } OnMemberListChanged() { this.forceUpdate(); } componentWillUnmount() { this.m_disposeGetMemberList.unregister(); } SortedPlayerSortFunc(e, t) { return e.display_name.localeCompare(t.display_name); } BuildFilteredBuckets(e, t) { let n = []; for (let i of e) { let e = N(i.member_list, t); if (e.length > 0) { let t = new b.$x(i.id, this.SortedPlayerSortFunc, () => {}); t.SetMembers(e), n.push(t); } } return n; } render() { var e; const { inactive: t, groupView: n, context: i, fnGetPanelProps: o } = this.props, { collapsedBuckets: r } = this.state; if (t) return null; let a = m.Ul.GroupMemberStore.GetGroupMemberList(n.GetGroup().GetGroupID()); if (0 == a.length) return null; let s = n.normalizedMemberSearch; s.length > 0 && (a = this.BuildFilteredBuckets(a, s)); const l = (e, t, r) => { const s = a[e], l = s.id === b.TN ? "partybeacon" : "regular"; return u.createElement(x, { style: r, className: `chatroomBucket_${l}`, bHideGameName: s.BIsGameGroup(), groupView: n, player: s.member_list[t], context: i, fnGetPanelProps: o }); }, c = (e, t) => { const n = a[e], i = r[n.id]; return u.createElement(U, { collapsible: a.length > 1, collapsed: i, memberCount: n.member_list.length, name: n.name, onCollapseChanged: () => this.setState({ collapsedBuckets: Object.assign(Object.assign({}, r), { [n.id]: !i }) }), style: t }); }, d = null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI; return u.createElement( "div", { className: (0, E.Z)(!d && "CompactFriendsList", "chatRoomMembers", "groupMemberList") }, u.createElement( "div", { className: "friendGroup", style: { width: "100%", height: "100%" } }, u.createElement( "div", { className: "ChatRoomMemberScrollList_List", style: { width: "100%", height: "100%", boxSizing: "border-box" } }, u.createElement(A, null, ({ width: e, height: t }) => u.createElement(H, { width: e, height: t, buckets: a.map((e) => (r[e.id] ? [] : e.member_list)), itemSize: L(d), estimatedItemSize: L(d), renderBucketHeader: c, bucketHeaderSize: T(d), itemKey: (e, t) => a[e].member_list[t].accountid }, l)), ), ), ); } }; (P.contextType = l.E_), (0, i.gn)([C.ak], P.prototype, "OnMemberListChanged", null), (P = (0, i.gn)([_.Pi], P)); class U extends u.PureComponent { render() { const { collapsed: e, collapsible: t, onCollapseChanged: n, style: i, memberCount: o, name: r } = this.props; return u.createElement("div", { className: (0, E.Z)("groupName", e && "Collapsed"), onClick: () => t && n(), style: i }, u.createElement("div", { className: "groupIcon" }, u.createElement(p.ZAu, null)), t && u.createElement("div", { className: "ExpandPlusMinus" }, u.createElement(p.FUf, null)), u.createElement("span", { className: "groupCountCollapsed" }, o), u.createElement("div", { className: "groupLabelsContainer" }, u.createElement("span", { className: "groupNameLabel" }, r), u.createElement("span", { className: "groupCount" }, "(", o, ")"))); } } let V = class extends u.Component { OnFriendSelected(e, t) { this.props.friend.OpenChatDialog((0, d.Um)(null, t)), this.props.groupView.ClearMemberSearch(); } render() { const { friend: e, groupView: t, context: n, bHideGameName: i } = this.props; let o = [], r = "", a = t.GetGroup(), s = t.isMemberListExpanded, c = a.GetMemberRank(e.accountid), m = e.efriendrelationship; switch (c) { default: break; case 30: r = "Moderator"; break; case 40: r = "Officer"; break; case 50: (r = "Owner"), a.BIsClanChatRoom() || o.push(u.createElement("div", { key: "rankIcon", className: "rankIcon rankOwner" + (e.is_friend ? " isFriend" : "") }, u.createElement(p._OD, null))); } switch ((a.BIsClanChatRoom() && (c >= 40 ? o.push(u.createElement("div", { key: "rankIcon", className: "rankIcon rankOwner" }, u.createElement("img", { src: l.De.COMMUNITY_CDN_URL + "public/images/skin_1/comment_modindicator_officer.png" }))) : c >= 30 && o.push(u.createElement("div", { key: "rankIcon", className: "rankIcon rankOwner" }, u.createElement("img", { src: l.De.COMMUNITY_CDN_URL + "public/images/skin_1/comment_modindicator_moderator.png" })))), m)) { case 3: case 6: o.push(u.createElement("div", { key: "friendIcon", className: "chatMemberFriendIcon" }, u.createElement(p.Fsn, null))); break; case 2: o.push(u.createElement("div", { key: "friendIcon", className: "chatMemberFriendIcon" }, u.createElement(p.Fsn, { bPending: !0 }))); } a.GetMemberPartyBeacon(e.accountid) && o.push(u.createElement("div", { key: "playIcon", className: "chatMemberPartyBeaconIcon" }, u.createElement(p.shV, null))); let d = { friend: e, context: n, className: r, action: this.OnFriendSelected, bHideGameName: i, noActions: "chatmemberlistselection" == n.chatContext }; return s ? u.createElement(f.mo, Object.assign({}, d, { listStatusIndicatorLeft: o })) : u.createElement(f.o2, Object.assign({}, d), o); } }; (0, i.gn)([C.ak], V.prototype, "OnFriendSelected", null), (V = (0, i.gn)([_.Pi], V)); class H extends u.Component { constructor() { super(...arguments), (this.m_memoizedIndices = {}), (this.m_ref = u.createRef()); } componentDidUpdate(e) { var t; const { renderBucketFooter: n, renderBucketHeader: i } = this.props, o = n || i; e.buckets.length != this.props.buckets.length && (null === (t = this.m_ref) || void 0 === t ? void 0 : t.current) && o && this.m_ref.current.resetAfterIndex(0, !0); } render() { this.m_memoizedIndices = {}; const { width: e, height: t, children: n, renderBucketFooter: i, renderBucketHeader: o, buckets: r } = this.props; let a = r.reduce((e, t) => e + t.length, 0); return ( o && (a += r.length), i && (a += r.length), u.createElement(S.S_, { width: e, height: t, itemCount: a, itemSize: this.CalculateItemHeight, itemKey: this.ItemKey, ref: this.m_ref, style: { overflowX: "hidden" } }, (e) => { const { bucket: t, item: r } = this.RawToRelativeIndex(e.index); return "header" === r ? o(t, e.style) : "footer" === r ? i(t, e.style) : n(t, r, e.style); }) ); } ItemKey(e) { const { itemKey: t } = this.props, { bucket: n, item: i } = this.RawToRelativeIndex(e); return "header" === i || "footer" === i ? `${n}_${i}_${e}` : t(n, i); } CalculateItemHeight(e) { const { bucket: t, item: n } = this.RawToRelativeIndex(e), { bucketHeaderSize: i, bucketFooterSize: o, itemSize: r } = this.props; return "header" === n ? ("function" == typeof i ? i(t) : "number" == typeof i ? i : (console.warn("[VirtualizedBucketList]: Header found but no header size provided!"), 0)) : "footer" === n ? ("function" == typeof o ? o(t) : "number" == typeof o ? o : (console.warn("[VirtualizedBucketList]: Footer found but no footer size provided!"), 0)) : "function" == typeof r ? r(t, n) : r; } RawToRelativeIndex(e) { if (this.m_memoizedIndices[e]) return this.m_memoizedIndices[e]; if (this.m_memoizedIndices[e - 1]) { const t = this.CalculateNextRelativeIndex(this.m_memoizedIndices[e - 1]); return (this.m_memoizedIndices[e] = t), t; } return (this.m_memoizedIndices[e] = this.InternalRawToRelativeIndex(e)), this.m_memoizedIndices[e]; } InternalRawToRelativeIndex(e) { const { buckets: t, renderBucketHeader: n, renderBucketFooter: i } = this.props; let o = 0, r = n ? -1 : 0; for (; e > 0; ) { if (!(e > t[o].length + (i ? 1 : 0))) { r += e; break; } (e -= t[o].length + (i ? 1 : 0) + (n ? 1 : 0)), o++; } return -1 === r ? { bucket: o, item: "header" } : r === t[o].length ? { bucket: o, item: "footer" } : { bucket: o, item: r }; } CalculateNextRelativeIndex(e) { const { buckets: t, renderBucketFooter: n, renderBucketHeader: i } = this.props, { bucket: o, item: r } = e, a = !!i, s = !!n; return "header" === r ? (t[o].length ? { bucket: o, item: 0 } : s ? { bucket: o, item: "footer" } : { bucket: o + 1, item: "header" }) : "footer" === r ? { bucket: o + 1, item: a ? "header" : 0 } : r < t[o].length - 1 ? { bucket: o, item: r + 1 } : s ? { bucket: o, item: "footer" } : { bucket: o + 1, item: a ? "header" : 0 }; } } (0, i.gn)([C.ak], H.prototype, "ItemKey", null), (0, i.gn)([C.ak], H.prototype, "CalculateItemHeight", null); var W = n(3276), X = n(31695), j = n(618), z = n(71061), K = n(41370), q = n(58908), Z = n(46421), Q = n(88669), $ = n(93635), Y = n(59702), J = n(90406), ee = n(60176), te = n(68730), ne = n(74915), ie = n(41111), oe = n(34268), re = n(85516), ae = n(10237), se = n.n(ae), le = n(31075), ce = n(62860), me = n(10553), de = n(33690); const he = u.lazy(() => Promise.all([n.e(5140), n.e(4679)]).then(n.bind(n, 32611))), ue = 1e4, pe = 6e4; let _e = class extends u.Component { constructor(e) { super(e), (this.m_msWentInactive = 0), (this.m_bShownTabIsGroupChat = !0), (this.m_keyEventListener = "keydown"), (this.m_refBroadcastContainer = u.createRef()), (this.state = { dropToInviteFriend: void 0, bShowBothChats: !1 }), this.props.popup && this.props.popup.addEventListener(this.m_keyEventListener, this.OnHTMLKeyEvent); } OnDragEnter(e, t) { if (((0, $.X)((e && "friend" == e.type) || t, "Invalid data type passed to ChatRoomGroupDialog.OnDragEnter"), e)) { let t = e; t.friend && t.sourceContext.group != this.props.groupView.GetGroup() && this.setState({ dropToInviteFriend: t.friend }); } return !0; } OnDragLeave() { this.state.dropToInviteFriend && this.setState({ dropToInviteFriend: void 0 }); } OnDragOver(e) { e.dataTransfer.dropEffect = "move"; } OnDrop(e, t) { (0, $.X)((e && "friend" == e.type) || 0 != t.dataTransfer.files.length, "Invalid data type passed to ChatRoomGroupDialog.OnDrop"); let n = this.props.groupView.GetChatView(); if (e && "friend" == e.type) { let n = e; if (n.friend) { this.state.dropToInviteFriend && this.setState({ dropToInviteFriend: void 0 }), d.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed(); let e = t.currentTarget.ownerDocument.defaultView; n.sourceContext.group != this.props.groupView.GetGroup() && (0, ee.cl)({ invitee: n.friend, chatview: null, invitedto: this.props.groupView.GetGroup() }, (0, d.Um)(this, t), e); } } else if (0 != t.dataTransfer.files.length) { let e = t.dataTransfer.files[0]; n.SetFileToUpload(e); } } componentDidUpdate(e) { e.isActive && !this.props.isActive ? this.OnBecameInactive() : this.props.isActive && this.OnBecameActive(); } OnBecameInactive() { (this.m_msWentInactive = performance.now()), (this.m_iIntervalInactive = SetBackgroundTimeout(this.forceUpdate.bind(this), 10100)), (this.m_iIntervalVeryInactive = SetBackgroundTimeout(this.forceUpdate.bind(this), 60100)); } OnBecameActive() { (this.m_msWentInactive = 0), this.ClearIntervals(); } GetTitleBarDragDropProps() { let e = { rgAcceptedTypes: [], bAcceptsFiles: !0 }; return (e.fnDrop = this.OnDrop), e; } GetChatBodyDragDropProps() { let e = { rgAcceptedTypes: ["friend"], bAcceptsFiles: !0 }; return (e.fnDragEnter = this.OnDragEnter), (e.fnDragLeave = this.OnDragLeave), (e.fnDragOver = this.OnDragOver), (e.fnDrop = this.OnDrop), e; } ClearIntervals() { this.m_iIntervalInactive && (ClearBackgroundTimeout(this.m_iIntervalInactive), (this.m_iIntervalInactive = void 0)), this.m_iIntervalVeryInactive && (ClearBackgroundTimeout(this.m_iIntervalVeryInactive), (this.m_iIntervalVeryInactive = void 0)); } OnHTMLKeyEvent(e) { if (l.De.IN_CLIENT && this.props.isActive && e.altKey && !e.ctrlKey && !e.shiftKey) { const { groupView: t } = this.props; if (!t) return; 38 === e.keyCode && t.SelectPreviousChannel(), 40 === e.keyCode && t.SelectNextChannel(); } } componentDidMount() { (this.props.popup ? this.props.popup : window).addEventListener("resize", this.OnLayoutChange); } componentWillUnmount() { this.ClearIntervals(), this.props.popup && this.props.popup.removeEventListener(this.m_keyEventListener, this.OnHTMLKeyEvent); (this.props.popup ? this.props.popup : window).removeEventListener("resize", this.OnLayoutChange); } CalculateBroadcastSectionStyles(e) { if (this.props.groupView.m_bChatHidden) return { width: "100%", height: "100%" }; const { nWatchPartyBroadcastHeightPercentage: t, nWatchPartyBroadcastWidthPercentage: n } = d.g_FriendsUIDesktopApp.UIDisplayPrefs, i = {}; if (e) { const e = t || 66; if (((i.height = `${e}%`), this.m_elMainContent)) { const { clientWidth: t, clientHeight: n } = this.m_elMainContent, o = (9 / 16) * t + 50, r = (0, Y.Lh)(e, 1, (o / n) * 100); i.height = `${r}%`; } } else (i.width = n ? `${n}%` : "66%"), (i.overflowY = "auto"); return i; } ShouldShowVerticalBroadcastChat() { return void 0 !== this.props.groupView.m_bShowVerticalBroadcastChat ? this.props.groupView.m_bShowVerticalBroadcastChat : !!this.m_elMainContent && this.m_elMainContent.clientHeight / this.m_elMainContent.clientWidth > 5 / 7; } OnLayoutChange() { this.forceUpdate(); } OnGrabberMouseDown(e) { let t = e.currentTarget.ownerDocument.defaultView; t.addEventListener("mousemove", this.HandleMouseMove), t.addEventListener("mouseup", this.UnregisterDragEvents), this.setState({ bDraggingChatGrabber: !0 }); } HandleMouseMove(e) { e.preventDefault(), e.stopPropagation(); let t = this.m_refBroadcastContainer.current.getBoundingClientRect(), n = this.m_refBroadcastContainer.current.parentElement.getBoundingClientRect(); const i = this.ShouldShowVerticalBroadcastChat(), o = i ? t.top : t.left, r = i ? e.clientY : e.clientX, a = i ? n.height : n.width, s = (0, Y.Lh)(((r - o) / a) * 100, 1, 100), l = i ? "nWatchPartyBroadcastHeightPercentage" : "nWatchPartyBroadcastWidthPercentage"; d.g_FriendsUIDesktopApp.SetUIDisplayPref(l, s); } UnregisterDragEvents(e) { e.view.removeEventListener("mousemove", this.HandleMouseMove), e.view.removeEventListener("mouseup", this.UnregisterDragEvents), this.setState({ bDraggingChatGrabber: !1 }); } OnLocalStreamChange(e) { this.props.groupView.SetLocalBroadcastId(e); } HideChat() { this.props.groupView.SetChatHidden(!0); } ShowChat() { this.props.groupView.SetChatHidden(!1); } ToggleVerticalBroadcastChat() { this.props.groupView.SetVerticalBroadcastChat(!this.ShouldShowVerticalBroadcastChat()), this.props.groupView.SetChatHidden(!1); } SetMainContentRef(e) { (this.m_elMainContent = e), this.OnLayoutChange(); } ToggleShowBothChats() { this.state.bShowBothChats ? this.m_bShownTabIsGroupChat && this.state.bShowBothChats && this.props.groupView.SetGlobalBroadcastChatShown(!1) : ((this.m_bShownTabIsGroupChat = !this.props.groupView.m_bShowGlobalChat), this.props.groupView.SetGlobalBroadcastChatShown(!0)), this.setState({ bShowBothChats: !this.state.bShowBothChats }); } ToggleVoiceChat() { let e = this.props.groupView, t = e.GetGroup(), n = e.GetSelectedChatView().chat; m.Ul.VoiceStore.IsVoiceActiveForGroup(t.GetGroupID()) ? m.Ul.VoiceStore.OnUserEndVoiceChat() : n.BIsVoiceAllowed() && (0, r.AM)(u.createElement(fe, { groupView: e }), this.props.popup); } RenderInnerChatTabs() { const e = this.props.groupView, t = e.GetGroup(); return u.createElement( "div", { className: "ChatBodyControls" }, u.createElement("div", { className: "Close", onClick: this.HideChat, title: (0, y.Xx)("#Broadcast_View_HideChat") }, u.createElement(p.QlI, { showChat: !1 })), u.createElement("div", { className: "InnerChatTabs" }, u.createElement("div", { className: (0, E.Z)("InnerChatTab", !e.m_bShowGlobalChat && "Active"), onClick: () => e.SetGlobalBroadcastChatShown(!1) }, u.createElement(z.TJ, { group: t }), u.createElement(j._P, { group: t, micro: !0 }), u.createElement("span", { className: "InnerChatTabLabel" }, (0, y.Xx)("#Broadcast_Chat_GroupChatTab", t.name))), (!this.state.bShowBothChats || (this.state.bShowBothChats && this.ShouldShowVerticalBroadcastChat())) && u.createElement("div", { className: (0, E.Z)("InnerChatTab", e.m_bShowGlobalChat && "Active"), onClick: () => e.SetGlobalBroadcastChatShown(!0) }, u.createElement(p.THo, null), u.createElement("span", { className: "InnerChatTabLabel" }, (0, y.Xx)("#Broadcast_Chat_PublicChatTab")))), u.createElement("div", { className: "showBothTabs", onClick: this.ToggleShowBothChats, title: (0, y.Xx)(this.state.bShowBothChats ? "#Broadcast_View_ShowSingleChats" : "#Broadcast_View_ShowBothChats") }, u.createElement(p.chI, null)), ); } render() { var e; if (this.props.bSteamDeck) return this.renderSteamDeck(); if (!this.props.groupView || !this.props.groupView.GetChatView()) return null; let t = this.props.groupView.GetGroup(), n = this.props.groupView, i = n.GetSelectedChatView(), o = n.GetPopoverChatView(), r = i.chat, a = this.state.bShowBothChats && n.isBroadcastShown, s = n.m_bShowGlobalChat, c = (s && a) || (!s && !a), d = (a && n.isBroadcastShown) || (!a && s), _ = this.state.dropToInviteFriend ? u.createElement(ee.RQ, { chatView: i, friend: this.state.dropToInviteFriend }) : null, g = !1, C = null, f = this.ShouldShowVerticalBroadcastChat(), v = n.m_bChatHidden, S = 4; if ((l.De.STEAM_TV && (S = 2), t.watching_broadcast_steamid && n.isBroadcastShown)) { const e = this.CalculateBroadcastSectionStyles(f), i = u.createElement(he, { ref: this.m_refBroadcastContainer, steamID: t.watching_broadcast_steamid.ConvertTo64BitString(), localSteamID: n.m_strLocalBroadcastId, watchLocation: S, bWebRTC: !1, onRequestClose: n.HideBroadcast, onLocalStreamChange: this.OnLocalStreamChange, actions: [u.createElement("div", { key: "ChatPosToggle", onClick: this.ToggleVerticalBroadcastChat, title: `${f ? (0, y.Xx)("#Broadcast_View_Stack_H") : (0, y.Xx)("#Broadcast_View_Stack_V")}`, className: "BroadcastChatPositionToggle " + (f ? "right" : "bottom") })], style: e, onTheaterMode: n.ToggleTheaterModeBroadcastChat, bVerticalBroadcastChat: !f }); (C = u.createElement(u.Fragment, null, i, !v && u.createElement("div", { className: "BroadcastChatDivider " + (f ? "vertical" : "horizontal"), onMouseDown: this.OnGrabberMouseDown }), v && u.createElement(ee.tD, { onClick: this.ShowChat, edge: f ? "bottom" : "right" }))), (g = !0); } else g = !1; let b = !1, I = !1, E = {}; if (!this.props.isActive) { E.display = "none"; let e = this.m_msWentInactive ? performance.now() - this.m_msWentInactive : pe; e >= ue && (b = !0), e >= pe && !C && (I = !0); } let w = "chatWindow MultiUserChat", R = "ChatRoomGroupDialog_contents"; o && (R += " InsetWindowOpen"), a && (R += " BothChatsDisplayed"), t.IsNamedGroupChat() && (w += " namedGroup"); let A = "chatBody"; this.state.dropToInviteFriend && (A = "chatBody chatRoomActiveDrop"), m.Ul.SettingsStore.FriendsSettings.bCompactFriendsList && (w += " compactView"), g && (w += " broadcastVisible"); let k = null; this.props.bHideMemberList || (k = u.createElement(M, { groupView: this.props.groupView, inactive: b })); const T = this.props.bHideMessageInput || (n.isBroadcastShown && ((!a && n.m_bShowGlobalChat) || v)) ? null : u.createElement(de._9.Consumer, null, (e) => u.createElement(W.$, { key: r.unique_id, chatView: n.GetActiveChatView(), isActive: this.props.isActive, disabled: !1, ownerWindow: e.ownerWindow })); let L, G = u.createElement(h.R, Object.assign({ "flow-children": "column", style: E, className: "chatHistoryAndMembers" }, this.GetChatBodyDragDropProps()), u.createElement(q.Z, null, _), u.createElement("div", { className: "displayColumn fullWidth" }, u.createElement(D.s, { "flow-children": "row", className: "displayRow minHeightZero", navEntryPreferPosition: ce.c4.PREFERRED_CHILD }, u.createElement("div", { className: "ChatRoomGroupDialog_history" }, m.Ul.UIStore.show_winter_sale_ui && !m.Ul.SettingsStore.FriendsSettings.bDisableRoomEffects && u.createElement(J.x, { effectManager: r.RoomEffectManager() }), u.createElement(ne.w, { chatView: i, isActive: this.props.isActive }), u.createElement(q.Z, null, u.createElement(ee.R5, { groupView: n }))), u.createElement("div", { className: "dropTargetBox" }), k), T)); if (t.watching_broadcast_steamid && n.isBroadcastShown) { const e = u.createElement(Z.c, { emoticonStore: m.Ul.ChatStore.EmoticonStore, steamID: t.watching_broadcast_steamid.ConvertTo64BitString(), broadcastID: "0", watchLocation: S, hidden: !n.m_bShowGlobalChat, className: this.state.bDraggingChatGrabber ? "avoidEvents" : void 0 }); L = u.createElement(u.Fragment, null, e); } let O = "chatStack " + (f ? "displayRow" : "displayColumn"); return ( d && (O += " GlobalChatVisible"), c && (O += " GroupChatVisible"), u.createElement( h.R, Object.assign({ fnCanTakeFocus: () => this.props.isActive, "flow-children": "column", "data-activechat": this.props.isActive, style: E, className: w }, this.GetTitleBarDragDropProps()), !I && !this.props.bHideHeader && !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && u.createElement("div", { className: "chatHeader titleBarContainer" }, u.createElement("div", { className: "chatHeaderGradient" }), u.createElement(j.oY, { groupView: n }), u.createElement("div", { className: "disconnectBlocker" })), !I && u.createElement( Se, { className: R, readyToRender: t.readyToRender }, u.createElement(te.T, { groupView: n, inactive: b }), u.createElement("div", { className: "ChatRoomGroup_MainAndChatEntry displayColumn", ref: this.SetMainContentRef }, u.createElement("div", { className: "ChatRoomGroup_Main_ContentAndMembers displayRow" }, u.createElement("div", { className: `ChatRoomGroup_Main_Content ${f ? "Vertical" : "Horizontal"} ${v ? "chatHidden" : ""}` }, C, (!n.m_bChatHidden || !n.isBroadcastShown) && u.createElement("div", { className: A }, n.isBroadcastShown && this.RenderInnerChatTabs(), u.createElement("div", { className: O }, G, a && u.createElement("div", { className: "BothChatsSeperator" }), a && !this.ShouldShowVerticalBroadcastChat() && u.createElement("div", { className: "InnerChatTab", onClick: () => n.SetGlobalBroadcastChatShown(!0) }, u.createElement(p.THo, null), u.createElement("span", { className: "InnerChatTabLabel" }, (0, y.Xx)("#Broadcast_Chat_PublicChatTab"))), L), !c && n.isBroadcastShown && T)))), ), ) ); } renderSteamDeck() { var e; if (!this.props.groupView || !this.props.groupView.GetChatView()) return null; let t = this.props.groupView.GetGroup(), n = this.props.groupView, i = n.GetSelectedChatView(), o = n.GetPopoverChatView(), r = i.chat, a = this.state.bShowBothChats && n.isBroadcastShown, s = n.m_bShowGlobalChat, c = (s && a) || (!s && !a), d = (a && n.isBroadcastShown) || (!a && s), _ = this.state.dropToInviteFriend ? u.createElement(ee.RQ, { chatView: i, friend: this.state.dropToInviteFriend }) : null, g = !1, C = null, f = this.ShouldShowVerticalBroadcastChat(), v = n.m_bChatHidden, S = 4; if ((l.De.STEAM_TV && (S = 2), t.watching_broadcast_steamid && n.isBroadcastShown)) { const e = this.CalculateBroadcastSectionStyles(f), i = u.createElement(he, { ref: this.m_refBroadcastContainer, steamID: t.watching_broadcast_steamid.ConvertTo64BitString(), localSteamID: n.m_strLocalBroadcastId, watchLocation: S, bWebRTC: !1, onRequestClose: n.HideBroadcast, onLocalStreamChange: this.OnLocalStreamChange, actions: [u.createElement("div", { key: "ChatPosToggle", onClick: this.ToggleVerticalBroadcastChat, title: `${f ? (0, y.Xx)("#Broadcast_View_Stack_H") : (0, y.Xx)("#Broadcast_View_Stack_V")}`, className: "BroadcastChatPositionToggle " + (f ? "right" : "bottom") })], style: e, onTheaterMode: n.ToggleTheaterModeBroadcastChat, bVerticalBroadcastChat: !f }); (C = u.createElement(u.Fragment, null, i, !v && u.createElement("div", { className: "BroadcastChatDivider " + (f ? "vertical" : "horizontal"), onMouseDown: this.OnGrabberMouseDown }), v && u.createElement(ee.tD, { onClick: this.ShowChat, edge: f ? "bottom" : "right" }))), (g = !0); } else g = !1; let b = !1, I = !1, E = {}; if (!this.props.isActive) { E.display = "none"; let e = this.m_msWentInactive ? performance.now() - this.m_msWentInactive : pe; e >= ue && (b = !0), e >= pe && !C && (I = !0); } let w = "chatWindow MultiUserChat"; i.IsFriendChat() || (w += " GroupChat"); let R = "ChatRoomGroupDialog_contents"; o && (R += " InsetWindowOpen"), a && (R += " BothChatsDisplayed"), t.IsNamedGroupChat() && (w += " namedGroup"); let A = "chatBody"; this.state.dropToInviteFriend && (A = "chatBody chatRoomActiveDrop"), m.Ul.SettingsStore.FriendsSettings.bCompactFriendsList && (w += " compactView"), g && (w += " broadcastVisible"); const M = this.props.bHideMessageInput || (n.isBroadcastShown && ((!a && n.m_bShowGlobalChat) || v)) ? null : u.createElement(de._9.Consumer, null, (e) => u.createElement(W.$, { key: r.unique_id, chatView: n.GetActiveChatView(), isActive: this.props.isActive, disabled: !1, ownerWindow: e.ownerWindow })); let k, T = u.createElement(D.s, { "flow-children": "column", style: E, className: "chatHistoryAndMembers" }, u.createElement(q.Z, null, _), u.createElement("div", { className: "displayColumn fullWidth" }, u.createElement(D.s, { "flow-children": "row", className: "displayRow minHeightZero", navEntryPreferPosition: ce.c4.PREFERRED_CHILD }, u.createElement("div", { className: "ChatRoomGroupDialog_history " + (r.GetVoiceAllowed() ? "voiceRoom" : "") }, m.Ul.UIStore.show_winter_sale_ui && !m.Ul.SettingsStore.FriendsSettings.bDisableRoomEffects && u.createElement(J.x, { effectManager: r.RoomEffectManager() }), u.createElement(ne.w, { chatView: i, isActive: this.props.isActive }), u.createElement(q.Z, null, u.createElement(ee.R5, { groupView: n }))), u.createElement(ve, { groupView: n })), M)); if (t.watching_broadcast_steamid && n.isBroadcastShown) { const e = u.createElement(Z.c, { emoticonStore: m.Ul.ChatStore.EmoticonStore, steamID: t.watching_broadcast_steamid.ConvertTo64BitString(), broadcastID: "0", watchLocation: S, hidden: !n.m_bShowGlobalChat, className: this.state.bDraggingChatGrabber ? "avoidEvents" : void 0 }); k = u.createElement(u.Fragment, null, e); } let L = "chatStack " + (f ? "displayRow" : "displayColumn"); d && (L += " GlobalChatVisible"), c && (L += " GroupChatVisible"); let G = {}; m.Ul.VoiceStore.IsVoiceActiveForGroup(t.GetGroupID()) && ((G.onSecondaryButton = () => this.ToggleVoiceChat()), (G.onSecondaryActionDescription = (0, y.Xx)("#Chat_ChatRoomGroup_EndVoiceChat"))); return u.createElement( h.R, Object.assign({ fnCanTakeFocus: () => this.props.isActive, "flow-children": "row", "data-activechat": this.props.isActive, style: E, className: w }, this.GetTitleBarDragDropProps(), G), u.createElement( D.s, { "flow-children": "column", style: { display: "flex", flexDirection: "column", flex: 1 } }, !I && u.createElement("div", { className: "chatHeader titleBarContainer" }, u.createElement("div", { className: "chatHeaderGradient" }), u.createElement(j.UZ, { groupView: n }), u.createElement("div", { className: "disconnectBlocker" })), !I && u.createElement( Se, { className: R, readyToRender: t.readyToRender }, !1, u.createElement( "div", { className: "ChatRoomGroup_MainAndChatEntry displayColumn", ref: this.SetMainContentRef }, u.createElement("div", { className: "ChatRoomGroup_Main_ContentAndMembers displayRow" }, u.createElement(D.s, { className: `ChatRoomGroup_Main_Content ${f ? "Vertical" : "Horizontal"} ${v ? "chatHidden" : ""}`, "flow-children": "row" }, C, (!n.m_bChatHidden || !n.isBroadcastShown) && u.createElement("div", { className: A }, (null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && u.createElement(X.R, null), n.isBroadcastShown && this.RenderInnerChatTabs(), u.createElement("div", { className: L }, T, a && u.createElement("div", { className: "BothChatsSeperator" }), a && !this.ShouldShowVerticalBroadcastChat() && u.createElement("div", { className: "InnerChatTab", onClick: () => n.SetGlobalBroadcastChatShown(!0) }, u.createElement(p.THo, null), u.createElement("span", { className: "InnerChatTabLabel" }, (0, y.Xx)("#Broadcast_Chat_PublicChatTab"))), k), !c && n.isBroadcastShown && M))), ), ), ), ); } }; (_e.contextType = me.E_), (0, i.gn)([C.ak], _e.prototype, "OnDragEnter", null), (0, i.gn)([C.ak], _e.prototype, "OnDragLeave", null), (0, i.gn)([C.ak], _e.prototype, "OnDragOver", null), (0, i.gn)([C.ak], _e.prototype, "OnDrop", null), (0, i.gn)([C.ak], _e.prototype, "OnHTMLKeyEvent", null), (0, i.gn)([C.ak], _e.prototype, "ShouldShowVerticalBroadcastChat", null), (0, i.gn)([C.ak], _e.prototype, "OnLayoutChange", null), (0, i.gn)([C.ak], _e.prototype, "OnGrabberMouseDown", null), (0, i.gn)([C.ak], _e.prototype, "HandleMouseMove", null), (0, i.gn)([C.ak], _e.prototype, "UnregisterDragEvents", null), (0, i.gn)([C.ak], _e.prototype, "OnLocalStreamChange", null), (0, i.gn)([C.ak], _e.prototype, "HideChat", null), (0, i.gn)([C.ak], _e.prototype, "ShowChat", null), (0, i.gn)([C.ak], _e.prototype, "ToggleVerticalBroadcastChat", null), (0, i.gn)([C.ak], _e.prototype, "SetMainContentRef", null), (0, i.gn)([C.ak], _e.prototype, "ToggleShowBothChats", null), (0, i.gn)([C.ak], _e.prototype, "ToggleVoiceChat", null), (_e = (0, i.gn)([_.Pi], _e)); const ge = (e) => { let { groupView: t, className: n } = e, r = (0, i._T)(e, ["groupView", "className"]); u.useEffect(() => { t.SetMemberListCollapsed(!1, !1); }); let s = u.createElement(k, { groupView: t, inactive: !1, onAction: e.closeModal }); return u.createElement(a.RG, Object.assign({ className: se().GroupMemberListDialog }, r), u.createElement(o.h4, null, (0, y.Xx)("#Chat_MemberGroup_Online")), s, u.createElement(be, { closeModal: e.closeModal })); }, Ce = (e) => { let t, { groupView: n } = e, r = (0, i._T)(e, ["groupView"]), s = n.GetGroup(), l = (s.IsNamedGroupChat(), n.GetGroup().textRoomList), d = n.GetGroup().BCanAdminChannel(), [h, p] = u.useState(n.GetActiveChatView().chat.GetRoomID()), _ = m.Ul.ChatStore.GetActiveVoiceChat(); if (_ && _ instanceof c.K) { let e = _; e.GetParentGroupID() == s.GetGroupID() && (t = u.createElement(D.s, { className: se().VoiceChatQuickChatChannelOption }, (0, y.Xx)("#Chat_Scratch_Pad"), ":", u.createElement(te.MF, { key: _.unique_id, chat: _, bRenameActive: !1, bActiveChat: _ == n.GetActiveChatView().chat, bDefaultRoom: _ == n.GetGroup().GetDefaultChatRoom(), onFocus: () => p(e.GetRoomID()) }))); } let g = l.map((e) => u.createElement(te.MF, { key: e.unique_id, chat: e, bRenameActive: n.IsRoomRenameActive(e.GetRoomID()), bActiveChat: e == n.GetActiveChatView().chat, bDefaultRoom: e == n.GetGroup().GetDefaultChatRoom(), onFocus: () => p(e.GetRoomID()) })); const C = () => { n.SelectChat(h), e.closeModal(); }; let f = { onOKButton: C }; return ( d && ((f.onOptionsButton = (t) => { (0, te.aP)((0, Q.RA)(t), n, !1), e.closeModal(); }), (f.onOptionsActionDescription = (0, y.Xx)("#Chat_AddTextChat"))), u.createElement(a.RG, Object.assign({ className: (0, E.Z)(se().ManageTextChannelsModal, "friendsui-container") }, r, { onOK: C }), u.createElement(R.e, null, u.createElement(o.h4, null, (0, y.Xx)("#GroupSettings_Channels_TextChannels")), u.createElement(D.s, Object.assign({ focusable: !1 }, f), t, g), u.createElement(be, { closeModal: e.closeModal }))) ); }, fe = (e) => { let { groupView: t } = e, n = (0, i._T)(e, ["groupView"]), r = t.GetGroup(), s = t.GetGroup().voiceRoomList, l = (0, me.id)(), [c, d] = u.useState(t.GetActiveChatView().chat), h = s.filter((e) => 0 != e.voice_active_member_list.member_count), _ = s.filter((e) => 0 == e.voice_active_member_list.member_count); const g = null != m.Ul.ChatStore.GetActiveVoiceChat(), C = (0, K.SZ)(() => m.Ul.ChatStore.VoiceChat.GetActiveVoiceChatID()), f = () => { C == c.GetRoomID() || (t.ClosePopoverChat(), c.StartVoiceChat()), l || e.closeModal(); }; let v = h.map((n) => { const i = C == c.GetRoomID(), o = (t) => { e.closeModal(), (0, ie.oC)(m.D, t.currentTarget.ownerDocument.defaultView, r, n, !1); }; let a; return g && !i ? (a = (0, y.Xx)("#VoiceChat_Switch")) : i || (a = (0, y.Xx)("#VoiceChat_Join")), l ? u.createElement(le.J, { key: n.unique_id, context: m.D, chatRoom: n, fnOKButton: i ? void 0 : f, fnSecondaryButton: i ? () => m.Ul.ChatStore.VoiceChat.OnUserEndVoiceChat() : void 0, fnOptionsButton: i ? o : void 0, fnOnFocus: () => d(n), fnCloseModal: e.closeModal, strOKActionDescription: a, strSecondaryActionDescription: i ? (0, y.Xx)("#VoiceChat_Leave") : void 0, strOptionsActionDescription: i ? (0, y.Xx)("#VoiceChat_InviteOthers") : void 0 }) : u.createElement(te.Cq, { key: n.unique_id, chat: n, bRenameActive: t.IsRoomRenameActive(n.GetRoomID()), onSelect: f, onFocus: () => d(n) }); }), S = _.map((e) => (l ? u.createElement(le.J, { key: e.unique_id, context: m.D, chatRoom: e, fnOKButton: f, fnOnFocus: () => d(e), strOKActionDescription: (0, y.Xx)("#VoiceChat_Join") }) : u.createElement(te.Cq, { key: e.unique_id, chat: e, bRenameActive: t.IsRoomRenameActive(e.GetRoomID()), onSelect: f, onFocus: () => d(e) }))), b = null; if (!m.Ul.VoiceStore.IsVoiceActiveForGroup(r.GetGroupID())) { const t = () => { r.CreateAndJoinTempVoiceRoom(), l || e.closeModal(); }; b = u.createElement(u.Fragment, null, 0 == s.length && u.createElement(D.s, null, (0, y.Xx)("#GroupSettings_Channels_NoVoiceChannels")), u.createElement(D.s, { className: se().AddVoiceChannelBtn, onActivate: t }, u.createElement(p.hxK, null), (0, y.Xx)("#Chat_AddVoiceChat"))); } return u.createElement(a.RG, Object.assign({ className: (0, E.Z)(se().ManageVoiceChannelsModal, "friendsui-container") }, n, { onOK: f }), u.createElement(R.e, null, u.createElement(o.h4, null, (0, y.Xx)("#GroupSettings_Channels_VoiceChannels")), u.createElement(D.s, { className: se().ManageVoiceChannels, focusable: !1, onOKButton: f }, b, 0 != v.length && u.createElement("div", { className: se().ChannelStatusLabel }, (0, y.Xx)("#GroupSettings_Channels_ActiveVoiceChannels")), 0 != v.length && u.createElement(D.s, { className: se().VoiceChannels }, v), 0 != S.length && u.createElement("div", { className: se().ChannelStatusLabel }, (0, y.Xx)("#GroupSettings_Channels_InactiveVoiceChannels")), 0 != S.length && u.createElement(D.s, { className: se().VoiceChannels }, S)), u.createElement(be, { closeModal: e.closeModal }))); }, ve = (0, _.Pi)((e) => { let { groupView: t } = e; const n = (0, de.Wy)(); let i = 0, o = !1; for (let e of t.GetGroup().voiceRoomList) 0 != e.voice_active_member_list.member_count && i++, e.BVoiceActive() && (o = !0); let a = !1; for (let e of t.GetGroup().textRoomList) if (e.has_any_unread_messages) { a = !0; break; } return u.createElement( D.s, { className: se().ChatRoomGroupControlsSteamDeck, "flow-children": "column" }, u.createElement( D.s, { focusable: !0, onActivate: (e) => { (0, r.AM)(u.createElement(ge, { groupView: t }), (0, Q.RA)(e)); }, onOKActionDescription: (0, y.Xx)("#Chat_MemberGroup_Online"), }, u.createElement(p.ZAu, null), ), u.createElement( D.s, { focusable: !0, onActivate: (e) => { (0, r.AM)(u.createElement(Ce, { groupView: t }), (0, Q.RA)(e)); }, onOKActionDescription: (0, y.Xx)("#GroupSettings_Channels_TextChannels"), }, u.createElement(p.xg, { className: "SVGIcon_Button SVGIcon_CommentThread" }), u.createElement("div", { className: se().TextChannelCount }, t.GetGroup().textRoomList.length), u.createElement(z.TJ, { className: a && se().UnreadTextChannel }), ), u.createElement( D.s, { focusable: !0, className: o && se().currentUserInVoiceChannel, onActivate: () => { (0, r.AM)(u.createElement(fe, { groupView: t }), n.ownerWindow); }, onOKActionDescription: (0, y.Xx)("#GroupSettings_Channels_VoiceChannels"), }, u.createElement(p.Cq4, null), u.createElement("div", { className: se().VoiceChannelCount }, u.createElement("span", { className: i > 0 ? se().HasActiveVoiceRoom : se().NoActiveVoiceRoom }, i), " / ", t.GetGroup().voiceRoomList.length), ), u.createElement( D.s, { focusable: !0, onActivate: (t) => { let n = (0, Q.RA)(t), i = (0, d.rb)(n); (0, ie.hg)(i, n, e.groupView.GetGroup()); }, onOKActionDescription: (0, y.Xx)("#Chat_Actions_InviteFriendtoGroupChat"), }, u.createElement(p.Kon, null), ), u.createElement( D.s, { focusable: !0, onActivate: (t) => { (0, re.Uu)((0, Q.RA)(t), e.groupView); }, onOKActionDescription: (0, y.Xx)("#NotificationSettings_Title"), }, u.createElement(p.Uos, null), ), u.createElement( D.s, { focusable: !0, onActivate: (t) => { (0, oe.n)((0, Q.RA)(t), e.groupView); }, onOKActionDescription: (0, y.Xx)("#GroupSettings"), }, u.createElement(p.lVV, null), ), ); }), Se = ({ className: e, readyToRender: t, children: n }) => { const i = u.createElement(s.V, { position: "center", string: (0, y.Xx)("#Chat_ChatRoomGroup_Requesting") }); return u.createElement(D.s, { className: e }, u.createElement(u.Suspense, { fallback: i }, t ? n : i)); }, be = (e) => u.createElement(o.$_, null, u.createElement(D.s, { className: "_DialogColLayout", "flow-children": "row" }, u.createElement(o.KM, { onClick: e.closeModal }, (0, y.Xx)("#Button_Close")))); }, 68730: (e, t, n) => { "use strict"; n.d(t, { Cq: () => B, MF: () => O, Pd: () => T, T: () => k, aP: () => L }); var i = n(85556), o = n(27378), r = n(29512), a = n(58908), s = n(11259), l = n(16518), c = n(37234), m = n(72746), d = n(23133), h = n(51997), u = n(71357), p = n(68816), _ = n(83817), g = n(79588), C = n(50649), f = n(82909), v = n(61963), S = n(84290), b = n(2049), I = n(46057), y = n(71061), E = n(60176), D = n(88669), w = n(41111), R = n(93635), A = n(22394), M = n(10553); let k = class extends o.Component { constructor(e) { super(e), (this.m_schHoverDelay = new A.Ar()), (this.state = { bCollapsed: !1, bMouseHover: !1 }); } OnRoomsContextMenu(e) { if (this.props.groupView.GetGroup().BCanAdminChannel()) { let t = e.currentTarget.ownerDocument.defaultView; (0, f.yV)( o.createElement( v.xV, null, o.createElement( v.Zo, { onSelected: () => { this.CreateTextChannel(t); }, }, (0, S.Xx)("#GroupSettings_Channels_CreateText"), ), o.createElement( v.Zo, { onSelected: () => { this.CreateVoiceChannel(t); }, }, (0, S.Xx)("#GroupSettings_Channels_CreateVoice"), ), ), e, ); } } CreateTextChannel(e) { (0, p.BR)(o.createElement(T, { ownerWin: e, groupView: this.props.groupView, bVoiceChannel: !1, bJoinChannel: !0 }), e); } CreateVoiceChannel(e) { (0, p.BR)(o.createElement(T, { ownerWin: e, groupView: this.props.groupView, bVoiceChannel: !0, bJoinChannel: !0 }), e); } OnMouseEnter(e) { this.m_schHoverDelay.Schedule(400, () => { this.setState({ bMouseHover: !0 }); }); } OnMouseLeave(e) { this.setState({ bMouseHover: !1 }), this.m_schHoverDelay.Cancel(); } ToggleCollapseExpand() { const { groupView: e } = this.props; e.SetChannelListCollapsed(!e.isChannelListCollapsed); } render() { let e = this.props.groupView.GetGroup(), t = e.IsNamedGroupChat(), n = !1, i = "chatRoomGroupNavColumn", r = this.props.groupView.isChannelListCollapsed; return 0 != e.voiceRoomList.length || t ? r && !this.state.bMouseHover && (i += " chatRoomGroupNavCollapsed") : ((n = !0), (i += " defaultChatOnly")), this.props.inactive || n ? o.createElement("div", { className: i }) : o.createElement("div", { className: i, onMouseEnter: this.OnMouseEnter, onMouseLeave: this.OnMouseLeave }, o.createElement("div", { className: "chatRoomChannelGroups", onContextMenu: this.OnRoomsContextMenu }, t && o.createElement(G, { groupView: this.props.groupView }), o.createElement(F, { groupView: this.props.groupView }), (!r || this.state.bMouseHover) && o.createElement("div", { className: "chatRoomGroupNavCollapseExpand", title: (0, S.Xx)(r ? "#Tooltip_PinChannelList" : "#Tooltip_UnpinChannelList"), onClick: this.ToggleCollapseExpand }, o.createElement(l.lO8, { bPinned: !r }))), o.createElement("div", { className: "disconnectBlocker" })); } }; (0, i.gn)([b.ak], k.prototype, "OnRoomsContextMenu", null), (0, i.gn)([b.ak], k.prototype, "OnMouseEnter", null), (0, i.gn)([b.ak], k.prototype, "OnMouseLeave", null), (0, i.gn)([b.ak], k.prototype, "ToggleCollapseExpand", null), (k = (0, i.gn)([C.Pi], k)); class T extends o.Component { OnSubmit() { let e = this.m_refInput && this.m_refInput.value; e && this.props.groupView .GetGroup() .CreateChatRoom(e, this.props.bVoiceChannel) .then((e) => { e && (this.props.closeModal(), this.props.bJoinChannel && (this.props.bVoiceChannel ? e.StartVoiceChat() : this.props.groupView.SelectChat(e.GetRoomID()))); }) .catch((e) => { (0, u.zp)(this.props.ownerWin, (0, S.Xx)("#Generic_Error"), (0, S.Xx)("#Chat_CreateChatRoom_GenericError")), this.props.closeModal(); }); } render() { return o.createElement( p.e1, { onEscKeypress: this.props.closeModal }, o.createElement( s.oX, { classNameContent: "CreateChatChannelDialog", onSubmit: this.OnSubmit }, o.createElement(s.h4, null, (0, S.Xx)(this.props.bVoiceChannel ? "#GroupSettings_Channels_CreateVoice" : "#GroupSettings_Channels_CreateText")), o.createElement( s.uT, null, o.createElement(s.II, { ref: (e) => { this.m_refInput = e; }, autoFocus: !0, label: (0, S.Xx)("#Chat_SaveVoiceRoom_Name"), }), ), o.createElement(s.$_, null, o.createElement(s.o9, { onCancel: this.props.closeModal })), ), ); } } function L(e, t, n) { (0, p.BR)(o.createElement(T, { ownerWin: e, groupView: t, bVoiceChannel: n, bJoinChannel: !0 }), e, "CreateChatChannelDialog", { strTitle: (0, S.Xx)("#GroupSettings_Channels_CreateText"), popupWidth: 800, popupHeight: 400 }, (0, c.Og)(e)); } (0, i.gn)([b.ak], T.prototype, "OnSubmit", null); let G = class extends o.Component { OnCreateNewTextChannel(e) { let t = (0, D.RA)(e); this.props.groupView.GetGroup().BCanAdminChannel() && L(t, this.props.groupView, !1); } OnStartChannelRename(e) { this.props.groupView.StartRoomRename(e); } OnChannelRename(e, t) { this.props.groupView.GetGroup().RenameRoom(e, t); } OnEndChannelRename() { this.props.groupView.EndRoomRename(); } render() { let e = this.props.groupView, t = e.GetGroup().textRoomList, n = e.GetGroup().BCanAdminChannel(); e.isChannelListCollapsed; return o.createElement( "div", { className: "chatRoomTextChannelsGroup" }, o.createElement("div", { className: "ChannelTypeTitle", title: (0, S.Xx)("#Tooltip_TextChannel"), onClick: this.OnCreateNewTextChannel }, o.createElement("div", { className: "ChannelTypeLabel" + (n ? "" : " NoPermission"), title: n ? (0, S.Xx)("#Tooltip_TextChannelCreate") : (0, S.Xx)("#Tooltip_NoPermissionChannelCreate") }, n ? (0, S.Xx)("#Chat_AddTextChat") : (0, S.Xx)("#Chat_CreateTextChannel_DefaultName")), o.createElement("div", { className: "ChatRoomAddRoomBtn", title: (0, S.Xx)("#Tooltip_TextChannelCreate") }, o.createElement(l.FUf, null))), t.map((t) => o.createElement(O, { key: t.unique_id, chat: t, bRenameActive: e.IsRoomRenameActive(t.GetRoomID()), bActiveChat: t == e.GetActiveChatView().chat, bDefaultRoom: t == e.GetGroup().GetDefaultChatRoom(), onStartRename: this.OnStartChannelRename, onRename: this.OnChannelRename, onEndRename: this.OnEndChannelRename })), ); } }; (0, i.gn)([b.ak], G.prototype, "OnCreateNewTextChannel", null), (0, i.gn)([b.ak], G.prototype, "OnStartChannelRename", null), (0, i.gn)([b.ak], G.prototype, "OnChannelRename", null), (0, i.gn)([b.ak], G.prototype, "OnEndChannelRename", null), (G = (0, i.gn)([C.Pi], G)); let O = class extends o.Component { ToggleTextChat() { if (this.props.bRenameActive) return; let e = m.Ul.UIStore.IsChatRoomGroupActive((0, c.Um)(this), this.props.chat.GetGroup()), t = m.Ul.UIStore.ShowAndOrActivateChatRoomGroup((0, c.Um)(this), this.props.chat.GetGroup(), !1), n = t.GetPopoverChatView(); e && n && n.chat && n.chat == this.props.chat ? t.ClosePopoverChat() : t.SelectChat(this.props.chat.GetRoomID()); } OnContextMenu(e) { this.props.bRenameActive || (0, h._k)((0, c.Um)(this, e), this.props.chat.GetGroup(), this.props.chat.GetRoomID(), e, this.props.onStartRename); } render() { let e = this.props.chat, t = "chatRoomTextChannel"; this.props.bActiveChat && (t += " ActiveTextChannel"); let n = "chatRoomTextChannelName"; this.props.bDefaultRoom && (n += " IsCommonsChannel"); let i = this.props.bRenameActive && !this.props.chat.GetVoiceAllowed(), r = e.GetGroup().GetDefaultChatID() != e.GetRoomID(), a = m.Ul.ChatStore.VoiceChat.GetActiveVoiceChatID() == this.props.chat.GetRoomID(); return o.createElement(_.s, { focusable: !0, className: t, onClick: this.ToggleTextChat, onGamepadFocus: this.props.onFocus, onMenuButton: r ? this.OnContextMenu : void 0, onMenuActionDescription: r ? (0, S.Xx)("#Chat_ChatRoomGroup_Options") : void 0, onContextMenu: this.OnContextMenu }, o.createElement(y.TJ, { chat: e }), o.createElement("div", { className: "chatRoomTextChannelIcon" }, a ? o.createElement(l.M9_, null) : o.createElement(l.MFo, null)), !i && o.createElement("div", { className: n }, e.BIsDefaultRoom() ? (0, S.Xx)("#Chat_DefaultChannelName") : e.name), !this.props.bDefaultRoom && i && o.createElement(x, { chat: this.props.chat, onRename: this.props.onRename, onEndRename: this.props.onEndRename })); } }; (0, i.gn)([b.ak], O.prototype, "ToggleTextChat", null), (0, i.gn)([b.ak], O.prototype, "OnContextMenu", null), (O = (0, i.gn)([C.Pi], O)); let F = class extends o.Component { CreateVoiceRoom() { this.props.groupView.GetGroup().CreateAndJoinTempVoiceRoom(); } OnVoiceRoomSelected(e) { if (!(this.props.groupView.GetRenameRoomID() == e.GetRoomID())) { m.Ul.ChatStore.VoiceChat.GetActiveVoiceChatID() == e.GetRoomID() || (this.props.groupView.ClosePopoverChat(), e.StartVoiceChat()); } } OnStartChannelRename(e) { this.props.groupView.StartRoomRename(e); } OnChannelRename(e, t) { this.props.groupView.GetGroup().RenameRoom(e, t); } OnEndChannelRename() { this.props.groupView.EndRoomRename(); } render() { let e = this.props.groupView, t = e.GetGroup().voiceRoomList; return o.createElement( "div", { className: "chatRoomVoiceChannelsGroup" }, o.createElement("div", { className: "ChannelTypeTitle", title: (0, S.Xx)("#Tooltip_VoiceChannelCreate"), onClick: this.CreateVoiceRoom }, o.createElement("div", { className: "ChannelTypeLabel" }, (0, S.Xx)("#Chat_AddVoiceChat")), o.createElement("div", { className: "ChatRoomAddRoomBtn", title: (0, S.Xx)("#Tooltip_VoiceChannelCreate") }, o.createElement(l.FUf, null))), t.map((t) => o.createElement(B, { key: t.unique_id, context: "VoiceRoomsGroup", chat: t, bRenameActive: e.GetRenameRoomID() == t.GetRoomID(), onSelect: () => { this.OnVoiceRoomSelected(t); }, onStartRename: this.OnStartChannelRename, onRename: this.OnChannelRename, onEndRename: this.OnEndChannelRename, }), ), ); } }; (0, i.gn)([b.ak], F.prototype, "CreateVoiceRoom", null), (0, i.gn)([b.ak], F.prototype, "OnVoiceRoomSelected", null), (0, i.gn)([b.ak], F.prototype, "OnStartChannelRename", null), (0, i.gn)([b.ak], F.prototype, "OnChannelRename", null), (0, i.gn)([b.ak], F.prototype, "OnEndChannelRename", null), (F = (0, i.gn)([C.Pi], F)); let B = class extends o.Component { constructor(e) { super(e), (this.state = { dropToInviteFriend: void 0, bDropConfirmationNotice: !1 }); } OnContextMenu(e) { this.props.bRenameActive || (0, h._k)((0, c.Um)(this, e), this.props.chat.GetGroup(), this.props.chat.GetRoomID(), e, this.props.onStartRename), e.preventDefault(), e.stopPropagation(); } InviteToChat(e) { (0, w.hg)((0, c.Um)(this, e), e.currentTarget.ownerDocument.defaultView, this.props.chat.GetGroup(), this.props.chat), e.stopPropagation(); } OnDragEnter(e, t) { if (((0, R.X)(e && "friend" == e.type, "Invalid type passed to VoiceRoom.OnDragEnter"), e)) { let t = e; t.friend && this.setState({ dropToInviteFriend: t.friend }); } return !0; } OnDragLeave() { this.state.dropToInviteFriend && this.setState({ dropToInviteFriend: void 0 }); } OnDragOver(e) { e.dataTransfer.dropEffect = "move"; } OnDrop(e, t) { if (((0, R.X)(e && "friend" == e.type, "Invalid data type passed to ChatRoomGroupDialog.OnDrop"), e && "friend" == e.type)) { let n = e; if (n.friend && n.friend != m.Ul.FriendStore.self) { this.state.dropToInviteFriend && this.setState({ dropToInviteFriend: void 0 }), c.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed(); let e = t.currentTarget.ownerDocument.defaultView; this.props.chat.GetGroup().BIsUserGroupMember(n.friend) ? (this.props.chat.GetGroup().InviteFriend(n.friend.accountid, this.props.chat), this.setState({ bDropConfirmationNotice: !0 }), (this.m_dropInviteInvitee = n.friend), (this.m_dropConfirmationInterval = window.setInterval(() => { this.setState({ bDropConfirmationNotice: !1 }), window.clearInterval(this.m_dropConfirmationInterval); }, 1200))) : (0, E.cl)({ invitee: n.friend, chatview: null, invitedto: this.props.chat }, (0, c.Um)(this, t), e); } } } GetDragDropProps() { let e = { rgAcceptedTypes: ["friend"] }; return (e.fnDragEnter = this.OnDragEnter), (e.fnDragOver = this.OnDragOver), (e.fnDragLeave = this.OnDragLeave), (e.fnDrop = this.OnDrop), e; } GetFriendContext() { let e = this.props.chat && this.props.chat.GetGroup().readyToRender ? this.props.chat : null; return (this.m_FriendContext && this.m_FriendContext.chat == e) || (this.m_FriendContext = { chat: e }), this.m_FriendContext; } render() { var e, t; let n = this.props.chat.GetGroup(), i = this.props.chat == n.GetDefaultChatRoom(), s = m.Ul.ChatStore.VoiceChat.GetActiveVoiceChatID() == this.props.chat.GetRoomID(), c = m.Ul.CMInterface.steamid.GetAccountID(), h = m.Ul.FriendStore.GetPlayer(c), u = this.props.chat.voice_active_contains_only_self, p = "emptyChannelNotice", _ = this.props.chat.voice_active_member_list.member_list.map((e) => o.createElement(r.Z, { key: e.accountid, classNames: "friend-anim", timeout: 320 }, o.createElement(I.mo, { friend: e, key: e.accountid, context: this.GetFriendContext(), showVoiceLevel: !0, bInVoiceList: !0 }))), g = this.props.chat.voice_active_contains_friends; s && !this.props.chat.voice_active_contains_self && (0 == _.length && (u = !0), (g = !0), _.push(o.createElement(r.Z, { key: c, classNames: "friend-anim", timeout: 320 }, o.createElement(I.mo, { friend: h, key: c, context: this.GetFriendContext(), showVoiceLevel: !0 })))); let C = ["chatRoomVoiceChannel"]; s && C.push("ActiveVoiceChannel"), g || "ChatRoomList" != this.props.context || C.push("MinimizeMemberList"), this.state.dropToInviteFriend && C.push("voiceRoomActiveDrop"), s && u && (p += " Visible"); let f = this.props.chat.IsUnsavedVoiceChannel(), v = this.props.chat.name; return o.createElement( d.R, Object.assign({ focusable: !0, className: C.join(" "), onClick: this.props.onSelect, onGamepadFocus: this.props.onFocus }, this.GetDragDropProps()), o.createElement("div", { className: "chatRoomVoiceChannelIconGlow" }), o.createElement("div", { className: "chatRoomVoiceChannelNameContainer", onContextMenu: this.OnContextMenu }, o.createElement("div", { className: "chatRoomVoiceChannelIcon" }, o.createElement(l.Cq4, null)), !this.props.bRenameActive && o.createElement("div", { className: "chatRoomVoiceChannelName" + (f ? " unsavedVoiceChannel" : "") }, v), this.props.bRenameActive && o.createElement(x, { chat: this.props.chat, onRename: this.props.onRename, onEndRename: this.props.onEndRename }), !this.props.bRenameActive && !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && o.createElement(o.Fragment, null, o.createElement("div", { onContextMenu: this.OnContextMenu, onClick: this.OnContextMenu, className: "VoiceControlPanelButton chatPinRoom", title: (0, S.Xx)("#Chat_ChannelOptions") }, o.createElement(l.$gZ, null)))), o.createElement("div", { className: "VoiceChannelParticipants CompactFriendsList" }, !g && _, g && o.createElement(a.Z, { enter: !0, exit: !0 }, _)), o.createElement("div", { className: p }, (0, S.Xx)("#Chat_VoiceEmptyChannel")), !(null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) && o.createElement(I.qe, { name: v, chat: this.props.chat, nostatus: !0 }), !i && o.createElement(O, { chat: this.props.chat, bRenameActive: !1, bActiveChat: !1, bDefaultRoom: !1 }), o.createElement("div", { className: "ScratchPadConnect" }), this.state.bDropConfirmationNotice && o.createElement("div", { className: "dropConfirmationNotice" + (this.state.bDropConfirmationNotice ? " Active" : "") }, o.createElement("div", { className: "dropConfirmationLabel" }, o.createElement("img", { className: "avatar", src: this.m_dropInviteInvitee.persona.avatar_url_medium }))), o.createElement("div", { className: "dropTargetBox" }), ); } }; (B.contextType = M.E_), (0, i.gn)([b.ak], B.prototype, "OnContextMenu", null), (0, i.gn)([b.ak], B.prototype, "InviteToChat", null), (0, i.gn)([b.ak], B.prototype, "OnDragEnter", null), (0, i.gn)([b.ak], B.prototype, "OnDragLeave", null), (0, i.gn)([b.ak], B.prototype, "OnDragOver", null), (0, i.gn)([b.ak], B.prototype, "OnDrop", null), (B = (0, i.gn)([C.Pi], B)); let x = class extends o.Component { constructor(e) { super(e), (this.m_strValue = ""), (0, g.rC)(this), (this.m_strValue = this.props.chat.name); } componentDidUpdate(e) { e.chat !== this.props.chat && (this.m_strValue = this.props.chat.name); } componentDidMount() { window.addEventListener("keydown", this.OnGlobalKeyDown, !1); } componentWillUnmount() { window.removeEventListener("keydown", this.OnGlobalKeyDown, !1); } BindInputRef(e) { e && e.focus(); } OnChange(e) { this.m_strValue = e.target.value; } OnSubmit(e) { this.SubmitAndClose(), e.preventDefault(); } OnGlobalKeyDown(e) { 27 == e.keyCode && this.Close(); } OnBlur(e) { this.SubmitAndClose(); } SubmitAndClose() { this.props.onRename(this.props.chat.GetRoomID(), this.m_strValue), this.Close(); } Close() { this.props.onEndRename(); } render() { return o.createElement("form", { className: "RenameChatRoomInline", onSubmit: this.OnSubmit }, o.createElement("input", { ref: this.BindInputRef, type: "text", value: this.m_strValue, onChange: this.OnChange, onBlur: this.OnBlur })); } }; (0, i.gn)([g.LO], x.prototype, "m_strValue", void 0), (0, i.gn)([b.ak], x.prototype, "BindInputRef", null), (0, i.gn)([b.ak], x.prototype, "OnChange", null), (0, i.gn)([b.ak], x.prototype, "OnSubmit", null), (0, i.gn)([b.ak], x.prototype, "OnGlobalKeyDown", null), (0, i.gn)([b.ak], x.prototype, "OnBlur", null), (x = (0, i.gn)([C.Pi], x)); }, 71061: (e, t, n) => { "use strict"; n.d(t, { FL: () => T, TJ: () => F, wm: () => L }); var i = n(85556), o = n(11612), r = n(19953), a = n(23346), s = n(37234), l = n(72746), c = n(618), m = n(68730), d = n(51997), h = n(14341), u = n(92883), p = n(50649), _ = n(27378), g = n(29512), C = n(58908), f = n(70756), v = n(83817), S = n(88991), b = n(90656), I = n(11259), y = n(16518), E = n(87018), D = n(88669), w = n(84290), R = n(2049), A = n(10553), M = n(97720), k = n(46057); let T = class extends _.Component { constructor(e) { super(e), (this.state = { ulSelectedGroupID: "" }); } BindDiv(e) { this.m_elDiv = e; } get div() { return this.m_elDiv; } get recommendedHeight() { return this.m_elDiv.clientHeight; } get maximumHeight() { return this.recommendedHeight; } get minimumHeight() { return 0; } OnGroupSelected(e) { e == this.state.ulSelectedGroupID ? this.setState({ ulSelectedGroupID: "" }) : this.setState({ ulSelectedGroupID: e }); } render() { var e, t; let n = this.props.chats.currentChatRoomGroups.sort((e, t) => t.time_last_activity - e.time_last_activity); const i = (0, o.e7)(r.De.EREALM); return _.createElement( "div", { className: "ChatRoomList CompactFriendsList", ref: this.BindDiv }, 0 == n.length && _.createElement( "div", { className: "ChatRoomList_Empty" }, (0, w.Xx)("#Chat_ChatRoomList_Empty"), _.createElement("br", null), _.createElement("br", null), !i && !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && (0, w.kQ)("#Chat_ChatRoomList_Empty_How", _.createElement(h.ns, { href: r.De.COMMUNITY_BASE_URL + "my/groups/" }, (0, w.Xx)("#Chat_ChatRoomList_Empty_HowLink"))), !i && (null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) && _.createElement( _.Fragment, null, _.createElement("div", { className: "ChatRoomList_Empty_Description" }, (0, w.Xx)("#Chat_ChatRoomList_Empty_SteamDeck")), _.createElement( I.zx, { onClick: (e) => { let t = (0, D.RA)(e); (0, M.bI)((0, s.rb)(t), t); }, }, (0, w.Xx)("#Chat_ChatRoomList_Empty_StartNew_SteamDeck"), ), ), ), n.map((e) => _.createElement(L, { key: e.GetGroupID(), group: e })), _.createElement("div", { className: "disconnectBlocker" }), ); } }; (T.contextType = A.E_), (0, i.gn)([R.ak], T.prototype, "BindDiv", null), (0, i.gn)([R.ak], T.prototype, "OnGroupSelected", null), (T = (0, i.gn)([p.Pi], T)); const L = (0, p.Pi)(function (e) { const { group: t, bShowLastChat: n, bHideUnreadMention: i, additionalElements: o } = e, r = (0, A.id)(), [a, m] = _.useState(!1), [h, u] = _.useState(!1), [p, g] = _.useState(!1), C = _.useCallback(() => g(!0), []), S = _.useCallback(() => g(!1), []), b = _.useCallback( (e) => { const i = t.room_with_last_message; if (n && i) { l.Ul.UIStore.ShowAndOrActivateChatRoomGroup((0, s.Um)(null, e), t, !0).SelectChat(i.GetRoomID()); } else l.Ul.UIStore.ShowAndOrActivateChatRoomGroup((0, s.Um)(null, e), t, !0); }, [n, t], ), I = _.useCallback((e) => { m((e) => !e), e.stopPropagation(); }, []), R = _.useCallback( (e) => { (0, d.bU)(e, t); }, [t], ), M = _.useCallback(() => u(!0), []), k = _.useCallback(() => u(!1), []); const T = (function (e, t = !0) { const [n, i] = _.useState(void 0), o = _.useRef(!1), r = _.useCallback( (t) => { if (e.BIsClanChatRoom()) { let t = l.Ul.FriendStore.ClanStore.GetClan(e.GetClanID()); s.g_FriendsUIDesktopApp.DragDropManager.StartDrag({ type: "clan", clan: t }); } else s.g_FriendsUIDesktopApp.DragDropManager.StartDrag({ type: "chatroomgroup", group: e }); }, [e], ), a = _.useCallback((e) => { s.g_FriendsUIDesktopApp.DragDropManager.EndDrag(); }, []), c = _.useCallback((e) => { let t = s.g_FriendsUIDesktopApp.DragDropManager.GetDragData(); if (t && "friend" == t.type) { let n = t.friend; (o.current = !0), e.preventDefault(), i(n); } else o.current = !1; e && (e.preventDefault(), o.current && e.stopPropagation()); }, []), m = _.useCallback((e) => { o.current && (e.preventDefault(), e.stopPropagation()); }, []), d = _.useCallback((e) => { (0, D.H0)(e) && ((o.current = !1), i(void 0)); }, []), h = _.useCallback( (t) => { let n = s.g_FriendsUIDesktopApp.DragDropManager.GetDragData(); if (n && "friend" == n.type) { t.preventDefault(), t.stopPropagation(); let o = e.memberList.member_list.slice(), r = n; if (null != r.friend && -1 != o.indexOf(r.friend)) return; s.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed(), e.InviteFriend(r.friend.accountid), i(void 0); } }, [e], ); let u = {}; return t && ((u.onDragEnter = c), (u.onDragOver = m), (u.onDragLeave = d), (u.onDrop = h)), (u.draggable = !0), (u.onDragStart = r), (u.onDragEnd = a), u; })(t, !0); let L = null !== t.watching_broadcast_steamid, P = t.hasVoiceRoom; const U = (0, E.Z)(e.className, "ChatRoomListGroupItem", !t.hasVoiceRoom && "NoChannels", a && "ShowAllChannels", h && "NonGroupHovered", L && "HasLinkedBroadcast"); return _.createElement( f.h, { onEnter: C, onLeave: S, topOffset: "-300px", bottomOffset: "-200px" }, _.createElement( v.s, Object.assign({ className: U }, T, { focusable: !0, onOKButton: b, onMenuButton: R, onMenuActionDescription: (0, w.Xx)("#Chat_ChatRoomGroup_Options") }), _.createElement("div", { className: "ChatRoomListGroupItem_header", onClick: b, onContextMenu: R }, _.createElement(c._P, { group: p ? t : void 0, small: !0 }), p && _.createElement(_.Fragment, null, !r && L && _.createElement(G, { group: t }), _.createElement("div", { className: "groupNameStatusContainer" }, _.createElement("div", { className: "displayRow" }, _.createElement("div", { className: "chatRoomName" }, t.name), !r && _.createElement("div", { className: "ContextMenuButton", onClick: R, onMouseEnter: M, onMouseLeave: k }, _.createElement(y.$gZ, null))), !r && !a && P && _.createElement(N, { group: t }), n && _.createElement(O, { group: t })), !i && _.createElement(F, { group: t })), !r && P && _.createElement("div", { onMouseEnter: M, onMouseLeave: k }, _.createElement(B, { expanded: a, onClick: I })), o), !r && P && _.createElement("div", { className: "detailsView" }, _.createElement("div", { className: "ChatRoomListGroupItemChatRooms" }, _.createElement(x, { group: t, expanded: a }))), ), ); }), G = (0, p.Pi)(function (e) { const { group: t } = e; let n = new S.K(t.watching_broadcast_steamid); const i = (function (e) { const [t, n] = _.useState(); return ( _.useEffect(() => { if (!e) return void n(void 0); const t = b.BroadcastWatchStore.StartInfo(e); return n(t), () => b.BroadcastWatchStore.StopInfo(t); }, [e]), t && t.m_steamIDBroadcast === e ? t : null ); })(n && n.ConvertTo64BitString()); let o = (null == i ? void 0 : i.m_bInitialized) ? i.m_strTitle || i.m_strAppTitle || (0, w.Xx)("#PersonaStateWatchingBroadcast_Player", l.Ul.FriendStore.GetPlayer(n.GetAccountID()).display_name) : void 0; return _.createElement("div", { className: "steamTVSubtitle" }, _.createElement(y.hLd, null), ": ", o, " "); }), O = (0, p.Pi)(function (e) { const { group: t } = e, n = t.room_with_last_message; if (!n) return null; const i = l.Ul.ChatStore.NotificationBBCodeParser.ParseBBCode(n.GetLastMessage(), { chat: n, unAccountIDSender: n.accountid_last_message, key: n.GetLastMessage(), rtTimestamp: n.time_last_message, onLoad: () => {} }), o = l.Ul.FriendStore.GetPlayer(n.accountid_last_message), r = (i && i.body) || (0, u.p8)(n.GetLastMessage()); return _.createElement("div", { className: "lastChatMessage" }, _.createElement("div", null, o.display_name + " : ", r)); }); let F = class extends _.Component { render() { let e = this.props.group, t = this.props.chat; if ((e && !e.hasUnreadChatMessage) || (t && !t.has_any_unread_messages)) return null; let n = (this.props.className || "") + " ChatUnreadMessageIndicator"; return ((e && e.HasUnreadMention) || (t && t.has_unread_mention)) && (n += " UnreadMention"), _.createElement("div", { className: n }, _.createElement("div", { className: "chatUnreadCircle" }, "@")); } }; function B(e) { let t = e.expanded ? (0, w.Xx)("#Chat_ChatRoomListO_OpenGroupCollapse") : (0, w.Xx)("#Chat_ChatRoomListO_OpenGroupExpand"); return _.createElement("div", { className: "openGroupButton", title: t, onClick: e.onClick }, _.createElement(y.NP6, null)); } F = (0, i.gn)([p.Pi], F); let x = (0, p.Pi)((e) => { let t = []; for (let n of e.group.voiceRoomList) (e.expanded || n.voice_active_contains_self) && t.push(n); let n = null; return t && (n = t.map((e) => _.createElement(g.Z, { classNames: "heightcollapseandfade-anim", timeout: 300, key: e.unique_id }, _.createElement(m.Cq, { key: e.unique_id, chat: e, bRenameActive: !1, context: "ChatRoomList", onSelect: e.StartVoiceChat })))), _.createElement(C.Z, null, n); }), N = (0, p.Pi)((e) => { let t = []; for (let n of e.group.voiceRoomList) { if (n.voice_active_contains_self) continue; let e = n.voice_active_member_list; if (0 == e.member_count) continue; let i = e.member_list.filter((e) => e.is_friend); 0 != i.length && ((i = e.member_list.slice()), i.sort(a.Xp.FriendSortByFriendOrNotComparator), t.push({ ulRoomID: n.unique_id, rgFriends: i })); } return t && 0 != t.length ? _.createElement( "div", { className: "membersInVoice" }, _.createElement("div", { className: "voiceChannelIcon" }, _.createElement(y.Cq4, null)), t.map((e) => _.createElement(P, { key: e.ulRoomID, friendsInRoom: e })), ) : null; }), P = class extends _.Component { render() { let e = this.props.friendsInRoom; return _.createElement( "span", { className: "voiceChatGroup" }, e.rgFriends.map((e) => _.createElement(k.yd, { key: e.accountid, friend: e, context: {}, disableContextMenu: !1 }, _.createElement("img", { className: "voiceFriendAvatar" + (e.is_friend ? "" : " isNotFriend"), src: e.persona.avatar_url, draggable: !1 }))), ); } }; P = (0, i.gn)([p.Pi], P); }, 51997: (e, t, n) => { "use strict"; n.d(t, { _k: () => T, bU: () => w, ip: () => R }); var i = n(85556), o = n(19953), r = n(37234), a = n(88669), s = n(72746), l = n(618), c = n(71357), m = n(13106), d = n(68816), h = n(14341), u = n(50649), p = n(27378), _ = n(82909), g = n(61963), C = n(11259), f = n(84290), v = n(2049), S = n(16518), b = n(41111), I = n(47109), y = n.n(I), E = n(14593), D = n(10553); function w(e, t, n) { let i, o = (0, r.Um)(null, e); return t.BIsClanChatRoom() && (i = s.Ul.FriendStore.ClanStore.GetClan(t.GetClanID())), (0, _.yV)(p.createElement(k, { browserContext: o, group: t, clan: i, context: n, ownerWindow: (0, a.RA)(e) }), e); } function R(e, t, n) { let i, o = (0, r.Um)(null, e); return t.GetChatGroupIDIfLoaded() && (i = s.Ul.ChatStore.GetChatRoomGroup(t.GetChatGroupIDIfLoaded())), (0, _.yV)(p.createElement(k, { browserContext: o, group: i, clan: t, context: n, ownerWindow: (0, a.RA)(e) }), e); } function A(e, t) { (0, E.I)("FindGamesToPlayWithFriends/ChatRoom"), e.stopPropagation(), (0, m.D4)(t, (0, r.Um)(null, e)); } function M(e, t, n, i, r) { if (o.De.IN_CLIENT && s.Ul.SettingsStore.BClientHasFeatureOrOnWeb("FriendsFilter")) { let o = e < 2 || e > 8; return p.createElement(g.Zo, { disabled: o, key: i, onSelected: r, className: y().ChatroomContextMenuDisableableItem }, t, o && p.createElement("div", { className: y().DisabledDescriptor }, (0, f.Xx)(n, 2, 8))); } return null; } class k extends p.Component { OpenChatWindow(e) { this.props.group ? s.Ul.UIStore.ShowAndOrActivateChatRoomGroup(this.props.browserContext, this.props.group, !0) : this.props.clan.OpenChatDialog(this.props.browserContext, !0); } ShowClanProfile(e) { let t; if (this.props.clan.BIsOGG()) t = `${o.De.COMMUNITY_BASE_URL}app/${this.props.clan.GetOGGAppID()}`; else { let e = this.props.clan.steamid; t = `${o.De.COMMUNITY_BASE_URL}gid/${e.ConvertTo64BitString()}`; } (0, h.b8)(e, t), e.stopPropagation(); } FindGamesToPlay(e) { A( e, this.props.group.memberList.member_list.map((e) => e.accountid), ); } LeaveChatRoomGroup(e) { (0, l.vT)(e.currentTarget.ownerDocument.defaultView, this.props.group); } render() { var e; let t = [], n = this.props.group, i = this.props.clan, o = this.props.context || {}, r = s.Ul.FriendStore.FavoritesStore, a = this.props.group.memberList.member_list.length; if ( (o.tab ? t.push( p.createElement( g.Zo, { key: "closetab", onSelected: () => { s.Ul.UIStore.CloseTab(this.props.browserContext, o.tab); }, }, (0, f.Xx)((null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) ? "#Chat_CloseTabAction_SteamDeck" : "#Chat_CloseTabAction"), ), ) : o.is_chat_window || t.push(p.createElement(g.Zo, { key: "opentab", onSelected: this.OpenChatWindow }, (0, f.Xx)("#Chat_Actions_OpenChat"))), i && !i.BIsOGG() && t.push(p.createElement(g.Zo, { key: "viewprofile", onSelected: this.ShowClanProfile }, (0, f.Xx)("#Friend_Menu_ViewProfile"))), this.props.group.readyToRender) ) { const e = M(a, (0, f.Xx)("#Chat_Actions_FindGamesToPlay"), "#Chat_Tooltip_FindGamesToPlay_UserCountRestriction_ChatGroup", "findgamestoplay", this.FindGamesToPlay); e && t.push(e); } t.push(p.createElement(g.Zo, { key: "leavechatroom", onSelected: this.LeaveChatRoomGroup }, (0, f.Xx)(i ? "#Chat_Actions_LeaveChatRoom" : "#Chat_Actions_LeaveChatRoomGroup"))); let l = i ? { clan: i } : { chat: n }; return ( s.Ul.FriendStore.FavoritesStore.BIsFavorited(l) ? o.is_favorites && t.push( p.createElement( g.Zo, { key: "quickaccess", onSelected: () => { r.RemoveFromFavorites(l); }, }, (0, f.Xx)("#Friend_Menu_RemoveFromQuickAccess"), ), ) : t.push( p.createElement( g.Zo, { key: "quickaccess", onSelected: () => { r.AddToFavorites(l); }, }, (0, f.Xx)("#Friend_Menu_AddToQuickAccess"), ), ), i && i.BIsOGG() && t.push(p.createElement(m.rb, { unAppID: i.GetOGGAppID(), strGameName: i.name })), p.createElement(g.xV, { className: "chatRoomListItemContextMenu", label: n.name }, t) ); } } function T(e, t, n, i, o) { if (t.GetDefaultChatID() == n) return null; if (L.BIsMenuEmpty(t, n, !!o)) return null; let r = (0, a.RA)(i); return (0, _.yV)(p.createElement(L, { browserContext: e, group: t, roomID: n, ownerWindow: r, onStartRoomRename: o }), i); } (k.contextType = D.E_), (0, i.gn)([v.ak], k.prototype, "OpenChatWindow", null), (0, i.gn)([v.ak], k.prototype, "ShowClanProfile", null), (0, i.gn)([v.ak], k.prototype, "FindGamesToPlay", null), (0, i.gn)([v.ak], k.prototype, "LeaveChatRoomGroup", null); class L extends p.PureComponent { ShowInviteDialog() { let e = this.props.group.GetChatRoom(this.props.roomID); (0, b.hg)(this.props.browserContext, this.props.ownerWindow, this.props.group, e); } FindGamesToPlayInChannel(e) { A( e, this.props.group.GetChatRoom(this.props.roomID).voice_active_member_list.member_list.map((e) => e.accountid), ); } SaveVoiceRoom(e) { let t = (0, a.RA)(e); var n, i, o; (n = t), (i = this.props.group), (o = this.props.roomID), (0, d.BR)(p.createElement(G, { group: i, roomID: o }), n, "SaveVoiceRoomDialog", { strTitle: (0, f.Xx)("#Chat_SaveVoiceRoom"), popupWidth: 664, popupHeight: 380 }, (0, r.Og)(n)); } RemoveRoom() { (0, c.p3)(this.props.ownerWindow, (0, f.Xx)("#Chat_Actions_RemoveRoom"), (0, f.Xx)("#Chat_Actions_RemoveRoom_Confirm"), (0, f.Xx)("#Chat_Actions_RemoveRoom_Action")) .then(() => { let e = this.props.group, t = this.props.roomID; e.DeleteChatRoom(t); }) .catch(() => {}); } ChangeRoomName() { this.props.onStartRoomRename(this.props.roomID); } static BIsMenuEmpty(e, t, n) { let i = e.GetDefaultChatID() == t, o = e.BIsTempVoiceChannel(t), r = e.BCanAdminChannel(); return !e.BIsVoiceChannel(t) && (!o || !r) && !(n && !i && !o && r) && !(!i && r); } render() { let e = [], t = this.props.group, n = this.props.roomID, i = this.props.group.GetChatRoom(this.props.roomID), o = t.GetDefaultChatID() == n, r = t.BIsTempVoiceChannel(n), a = t.BCanAdminChannel(), s = (t.BCanInvite(), i.voice_active_member_list.member_count); e.push(p.createElement(g.Zo, { key: "invitefriend", onSelected: this.ShowInviteDialog }, (0, f.Xx)("#Chat_Actions_InviteFriendtoVoice"))); const l = M(s, (0, f.Xx)("#Chat_Actions_FindGamesToPlay"), "#Chat_Tooltip_FindGamesToPlay_UserCountRestriction_Channel", "findgamestoplayinchannel", this.FindGamesToPlayInChannel); return l && e.push(l), r && e.push(p.createElement(g.Zo, { key: "savechannel", className: a ? "" : y().ChatRoomContextNoPermission, onSelected: this.SaveVoiceRoom }, !a && p.createElement(S.HEZ, null), (0, f.Xx)("#Chat_Actions_SaveChannel"))), this.props.onStartRoomRename && !o && !r && a && e.push(p.createElement(g.Zo, { key: "renameroom", onSelected: this.ChangeRoomName }, (0, f.Xx)("#Chat_Actions_ChangeRoomName"))), !o && a && e.push(p.createElement(g.Zo, { key: "removeroom", onSelected: this.RemoveRoom }, (0, f.Xx)("#Chat_Actions_RemoveRoom"))), e.length < 1 ? (console.log("warning: empty context menu. Did someone not update BIsMenuEmpty?"), null) : p.createElement(g.xV, { className: "friendsContextMenu", label: t.name }, e); } } (0, i.gn)([v.ak], L.prototype, "ShowInviteDialog", null), (0, i.gn)([v.ak], L.prototype, "FindGamesToPlayInChannel", null), (0, i.gn)([v.ak], L.prototype, "SaveVoiceRoom", null), (0, i.gn)([v.ak], L.prototype, "RemoveRoom", null), (0, i.gn)([v.ak], L.prototype, "ChangeRoomName", null); let G = class extends p.Component { constructor(e) { super(e), (this.state = { strName: "", strError: void 0 }); } HandleTextEntry(e) { this.setState({ strName: e.target.value }); } HandleSubmit(e) { e && e.preventDefault(); let t = this.state.strName; 0 != t.length ? (this.props.group.RenameRoom(this.props.roomID, t), this.props.closeModal()) : this.setState({ strError: (0, f.Xx)("#Chat_SaveVoiceRoom_Error_EmptyName") }); } render() { return p.createElement(d.e1, { onEscKeypress: this.props.closeModal }, p.createElement(C.oX, { classNameContent: "SaveVoiceRoomDialog", onSubmit: this.HandleSubmit }, p.createElement(C.h4, null, (0, f.Xx)("#Chat_SaveVoiceRoom")), p.createElement(C.uT, null, this.state.strError && p.createElement(C.Ac, { className: "nicknameError" }, this.state.strError), p.createElement(C.Ac, null, (0, f.Xx)("#Chat_SaveVoiceRoom_Description")), p.createElement(C.II, { type: "text", label: (0, f.Xx)("#Chat_SaveVoiceRoom_Name"), className: "nicknameInput", value: this.state.strName, onChange: this.HandleTextEntry, autoFocus: !0 })), p.createElement(C.$_, null, p.createElement(C.o9, { onCancel: this.props.closeModal })))); } }; (0, i.gn)([v.ak], G.prototype, "HandleTextEntry", null), (0, i.gn)([v.ak], G.prototype, "HandleSubmit", null), (G = (0, i.gn)([u.Pi], G)); }, 15152: (e, t, n) => { "use strict"; n.d(t, { lR: () => U, Le: () => N, Ez: () => j }); var i = n(85556), o = n(19953), r = n(84446), a = n(93354), s = n(19339), l = n(72746), c = n(37234), m = n(96119), d = n(618), h = n(51997), u = n(13106), p = n(79588), _ = n(50649), g = n(27378), C = n(58908), f = n(29512), v = n(66035), S = n(82909), b = n(83817), I = n(61963), y = n(11259), E = n(38571), D = n(2049), w = n(54530); class R extends g.Component { constructor(e) { super(e), (this.state = { nCalculatedHeightPx: void 0, bLeftSliderVisible: !1, bRightSliderVisible: !1 }); } OnRef(e) { this.UnbindWindowHandlers(), e && ((this.m_elScroll = e), e.ownerDocument.defaultView && this.m_elScroll.ownerDocument.defaultView.addEventListener("resize", this.CheckScrollPosition), this.CheckScrollPosition()); } CheckScrollPosition() { if (!this.m_elScroll || (this.m_animation && this.m_animation.BIsActive())) return; let e = 0; for (let t = this.m_elScroll.firstElementChild; t; t = t.nextElementSibling) e = Math.max(e, t.getBoundingClientRect().height); e != this.state.nCalculatedHeightPx && this.setState({ nCalculatedHeightPx: e }), this.UpdateSliderControlsForScrollOffset(this.m_elScroll.scrollLeft); } UpdateSliderControlsForScrollOffset(e) { let t = e > 1, n = e + this.m_elScroll.getBoundingClientRect().width < this.m_elScroll.scrollWidth - 1; t != this.state.bLeftSliderVisible && this.setState({ bLeftSliderVisible: t }), n != this.state.bRightSliderVisible && this.setState({ bRightSliderVisible: n }); } AnimateScrollLeftTo(e) { this.m_animation && this.m_animation.Cancel(), (this.m_animation = new w.jg(this.m_elScroll, { scrollLeft: e }, { msDuration: 500, onComplete: this.CheckScrollPosition, timing: "cubic-in-out" })), this.m_animation.Start(), this.UpdateSliderControlsForScrollOffset(e); } OnSlideLeftClick() { (this.m_animation && this.m_animation.BIsActive()) || (this.m_elScroll && this.AnimateScrollLeftTo(Math.max(0, this.m_elScroll.scrollLeft - this.m_elScroll.getBoundingClientRect().width))); } OnSlideRightClick() { (this.m_animation && this.m_animation.BIsActive()) || (this.m_elScroll && this.AnimateScrollLeftTo(Math.min(this.m_elScroll.scrollWidth - this.m_elScroll.getBoundingClientRect().width, this.m_elScroll.scrollLeft + this.m_elScroll.getBoundingClientRect().width))); } OnWheel(e) { e && e.nativeEvent && (e.nativeEvent.deltaY < 0 ? this.OnSlideLeftClick() : this.OnSlideRightClick()); } GetScrollRef() { return this.m_elScroll; } componentWillUnmount() { this.UnbindWindowHandlers(), this.m_animation && this.m_animation.Cancel(); } componentDidUpdate() { this.CheckScrollPosition(); } UnbindWindowHandlers() { this.m_elScroll && (this.m_elScroll.ownerDocument.defaultView && this.m_elScroll.ownerDocument.defaultView.removeEventListener("resize", this.CheckScrollPosition), (this.m_elScroll = void 0)); } render() { let e = "auto"; return this.state.nCalculatedHeightPx && (e = this.state.nCalculatedHeightPx + "px"), g.createElement("div", { onWheel: this.OnWheel, className: "HorizontalMiniSlider", style: { height: e } }, g.createElement("div", { className: "HorizontalMiniSliderScroll " + this.props.className, onScroll: this.CheckScrollPosition, ref: this.OnRef }, this.props.children)); } } (0, i.gn)([D.ak], R.prototype, "OnRef", null), (0, i.gn)([D.ak], R.prototype, "CheckScrollPosition", null), (0, i.gn)([D.ak], R.prototype, "OnSlideLeftClick", null), (0, i.gn)([D.ak], R.prototype, "OnSlideRightClick", null), (0, i.gn)([D.ak], R.prototype, "OnWheel", null); var A = n(68816), M = n(16518), k = n(55948), T = n(9824), L = n(87018), G = n(84290), O = n(89911), F = n.n(O), B = n(46057), x = n(10553); let N = class extends g.Component { constructor(e) { super(e), (this.m_mapTabs = new Map()), (this.m_rgOrderedRenderedTabs = []), (this.m_bUsePopups = !1), (this.m_nInitialTabDragOffset = -1), (this.m_nTheaterTopHoverHeight = 12), (this.m_fnUnregisterDropComplete = void 0), (this.m_tabDrag = void 0), (0, p.rC)(this), (this.state = { iDragIndex: 0, windowWidth: 0, bTheaterModeTopHovered: !1 }); } componentDidUpdate() { this.FixScrollLocation(); } componentDidMount() { let e = this.props.popup ? this.props.popup.window : window; e && e.addEventListener("resize", this.OnWindowResizeEvent), this.m_elchatTabDiv && (this.setState({ windowWidth: this.m_elchatTabDiv.clientWidth }), this.UpdateWindowIcon()); } componentWillUnmount() { let e = this.props.popup ? this.props.popup.window : window; e && e.removeEventListener("resize", this.OnWindowResizeEvent); } OnWindowResizeEvent() { this.m_elchatTabDiv && this.setState({ windowWidth: this.m_elchatTabDiv.clientWidth }); } FocusActiveTab() { let e = this.m_mapTabs.get(this.props.activeTab.GetUniqueID()); if (!e) return !1; let t = e.GetChatTabRef(); return !!t && (t.focus(), !0); } SetDragTab(e) { void 0 !== e ? (this.m_fnUnregisterDropComplete = c.g_FriendsUIDesktopApp.DragDropManager.RegisterForDropComplete(this.HandleDropComplete)) : this.m_fnUnregisterDropComplete && (this.m_fnUnregisterDropComplete.Unregister(), (this.m_fnUnregisterDropComplete = void 0)), (this.m_tabDrag = e), (this.m_nInitialTabDragOffset = -1); } GetDragTab() { return this.m_tabDrag; } HandleDropComplete(e) { (this.m_fnUnregisterDropComplete = void 0), (this.m_tabDrag = void 0); } FixScrollLocation() { if (!this.m_elScroll) return; if (!this.props.activeTab) return; let e = this.m_mapTabs.get(this.props.activeTab.GetUniqueID()); if (!e) return; let t = e.GetChatTabRef(); if (!t) return; let n = t.offsetLeft, i = t.offsetLeft + t.offsetWidth, o = Math.ceil(this.m_elScroll.scrollLeft + this.m_elScroll.clientWidth); if (n < o && i > o) { let e = i - Math.floor(this.m_elScroll.clientWidth) + 40; this.SetScrollLeft(e); } else if (n < this.m_elScroll.scrollLeft + 40 || i > o) { let e = n; 0 != e && (e -= 40), this.SetScrollLeft(e); } } SetScrollLeft(e) { this.m_elScroll.scrollLeft != e && (this.m_animation && this.m_animation.Cancel(), (this.m_animation = new w.jg(this.m_elScroll, { scrollLeft: e }, { msDuration: 300, timing: "sine", onComplete: () => {} })), this.m_animation.Start()); } UpdateDragOffset(e) { let t, n = e.clientX; for (t = 0; t < this.m_rgOrderedRenderedTabs.length; t++) { let e = this.m_rgOrderedRenderedTabs[t], i = this.m_mapTabs.get(e.GetUniqueID()), o = i && i.GetBoundingClientRect(); if (i && o && n - o.left < o.width && (this.m_nInitialTabDragOffset < 0 && (this.m_nInitialTabDragOffset = n - o.left), n - this.m_nInitialTabDragOffset < o.left + o.width / 2)) break; } this.state.iDragIndex != t && this.setState({ iDragIndex: t }); } OnTabRef(e, t) { t ? this.m_mapTabs.set(e, t) : this.m_mapTabs.delete(e), this.UpdateWindowIcon(); } OnScrollRef(e) { this.m_elScroll = e ? e.GetScrollRef() : null; } SelectTab(e) { this.props.tabSet.ActivateTab(e); } OnDragStart(e) { let t = c.g_FriendsUIDesktopApp.DragDropManager.GetDragData(); t && "chattab" == t.type && (t.tabSet = this.props.tabSet); } OnChatTabContianerRef(e) { this.m_elchatTabDiv = e; } OnDragEnd() { this.m_tabDrag = void 0; } OnBackClick(e) { this.props.ResponsiveWindowState.SetActiveView(m.yf.FriendsList); } ShowFriendsList(e) { l.Ul.UIStore.SetTheaterMode(!1), l.Ul.UIStore.SetFriendsListCollapsed((0, c.Um)(this, e), !1); } StartTopbarEventListener() { this.m_elchatTabDiv.ownerDocument.defaultView.addEventListener("mousemove", this.OnTopbarHovered); } OnTopbarHovered(e) { let t = e.clientY; l.Ul.UIStore.GetTheaterMode() || this.m_elchatTabDiv.ownerDocument.defaultView.removeEventListener("mousemove", this.OnTopbarHovered), t > this.m_nTheaterTopHoverHeight ? this.state.bTheaterModeTopHovered && (this.setState({ bTheaterModeTopHovered: !1 }), (this.m_nTheaterTopHoverHeight = 12)) : this.state.bTheaterModeTopHovered || ((this.m_nTheaterTopHoverHeight = 50), this.setState({ bTheaterModeTopHovered: !0 })); } OnTabSelectorClick(e) { let t = 33 * this.m_mapTabs.size + (e.currentTarget.offsetTop + e.currentTarget.clientHeight) + 16 > e.currentTarget.ownerDocument.defaultView.innerHeight; (0, S.yV)(g.createElement(P, { tabSet: this.props.tabSet }), e.currentTarget, { bOverlapHorizontal: !0, bPreferPopLeft: !1, bPreferPopTop: !1, bForcePopup: t }); } UpdateWindowIcon() { try { if (this.props.popup && this.props.popup.window && void 0 !== this.props.popup.window.SteamClient) { let e = !1, t = !1, n = this.props.tabSet.tabs; for (let i of n) i.GetUnreadMessageCount() > 0 && (e = !0), i.IsVoiceActive() && (t = !0); t ? this.props.popup.window.SteamClient.Window.SetWindowIcon("voice") : e ? this.props.popup.window.SteamClient.Window.SetWindowIcon("messages") : this.props.popup.window.SteamClient.Window.SetWindowIcon("steam"); } } catch (e) {} } render() { var e, t; let n = l.Ul.UIStore.GetTheaterMode(); if ((this.UpdateWindowIcon(), this.props.tabSet.tabCount <= 0 && !this.props.popup)) return null; let i, r = this.props.tabSet.tabs, s = this.props.activeTab, m = !1, d = !1; if (s instanceof a.we) { m = s.isBroadcastShown; } else s && s.IsBroadcast && s.IsBroadcast() && (m = !0); for (let e of r) if (e.GetUnreadMessageCount() > 0) { d = !0; break; } if (this.m_tabDrag) { let e = r.indexOf(this.m_tabDrag); -1 != e ? e != this.state.iDragIndex && ((i = r.slice()), (0, T.hV)(i, e, Math.min(this.state.iDragIndex, r.length - 1))) : this.state.iDragIndex < r.length ? ((i = r.slice()), i.splice(this.state.iDragIndex, 0, this.m_tabDrag)) : (i = r.concat(this.m_tabDrag)); } (r = i || r), (this.m_rgOrderedRenderedTabs = r); let h, u = "ChatTabs titleBarContainer"; this.props.popup && (u += " HasWindowControls"), 1 == r.length ? (u += " OneTab") : this.state.windowWidth < 180 * r.length + 180 && (u += " HasTabs"), l.Ul.SettingsStore.FriendsSettings.bCompactFriendsList && (u += " compactView"), this.state.bTheaterModeTopHovered && (u += " TheaterTopHovered"), (0, x.Uy)() && (u += " OSX"), this.props.ResponsiveWindowState && (h = g.createElement("div", { className: "ChatTabsBackButton", onClick: this.OnBackClick }, "<<")), m && (u += " activeTabHasBroadcast"); let p, _ = !1, v = !0; this.props.popup && ((p = (0, c.rb)(this.props.popup)), (v = l.Ul.UIStore.BIsFriendsListSingleWindow(p)), (_ = !(0, l.ns)(p, l.D))), n && this.m_elchatTabDiv && this.StartTopbarEventListener(); const S = (this.m_elchatTabDiv && 180 * this.props.tabSet.tabCount + (o.De.IN_CLIENT ? 168 : 48) > this.m_elchatTabDiv.clientWidth) || !1, I = _; return g.createElement( b.s, { "flow-children": "row", className: (0, L.Z)(u, this.props.showOpenFriendsList && "friendsListCollapsed"), onDragStart: this.OnDragStart, ref: this.OnChatTabContianerRef }, this.props.popup && g.createElement(k.T, { hideMin: I, hideMax: I, popup: this.props.popup, className: "chatTitleBar" }), h, ((n && v) || this.props.showOpenFriendsList) && g.createElement("div", { className: "chatTabOpenFriendsList", onClick: this.ShowFriendsList }, g.createElement(M.ZAu, null), (0, G.Xx)("#FriendsList_ExpandButton")), this.props.tabSet.tabCount > 0 && g.createElement( "div", { className: (0, L.Z)("chatTabSetContainer", (null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && "gamepadui", o.De.IN_CLIENT && "inclient") }, g.createElement( R, { className: "chatTabList", ref: this.OnScrollRef }, g.createElement( C.Z, { className: F().ChatTabTransitionGroup }, r.map((e, t) => { let n = this.props.activeTab == e, i = { enter: F().ChatTabTransition_Enter, enterActive: F().ChatTabTransition_EnterActive, exit: F().ChatTabTransition_Exit, exitActive: F().ChatTabTransition_ExitActive }; return g.createElement(f.Z, { className: "ChatTabTranstionContainer", classNames: i, key: e.GetUniqueID(), timeout: 350 }, g.createElement(U, { tab: e, active: n, selectTab: this.SelectTab, ref: (t) => this.OnTabRef(e.GetUniqueID(), t), fnOnDragEnd: this.OnDragEnd })); }), ), ), S && !(null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) && g.createElement("div", { className: "chatTabSelector" + (d ? " UnreadMessages" : ""), onClick: this.OnTabSelectorClick }, g.createElement(M.$gZ, null), d && g.createElement("div", { className: "ChatUnreadMessageIndicator" })), ), g.createElement("div", { className: "dropTargetBox" }), n && g.createElement("div", { className: "theaterModeHoverSpace" + (d ? " hasUnreadMessages" : "") }, d && g.createElement("div", { className: "ChatUnreadMessageIndicator" }, g.createElement("div", { className: "chatUnreadCircle" }))), ); } }; (N.contextType = x.E_), (0, i.gn)([p.LO], N.prototype, "m_nTheaterTopHoverHeight", void 0), (0, i.gn)([p.LO], N.prototype, "m_tabDrag", void 0), (0, i.gn)([D.ak], N.prototype, "OnWindowResizeEvent", null), (0, i.gn)([D.ak], N.prototype, "HandleDropComplete", null), (0, i.gn)([D.ak], N.prototype, "OnTabRef", null), (0, i.gn)([D.ak], N.prototype, "OnScrollRef", null), (0, i.gn)([D.ak], N.prototype, "SelectTab", null), (0, i.gn)([D.ak], N.prototype, "OnDragStart", null), (0, i.gn)([D.ak], N.prototype, "OnChatTabContianerRef", null), (0, i.gn)([D.ak], N.prototype, "OnDragEnd", null), (0, i.gn)([D.ak], N.prototype, "OnBackClick", null), (0, i.gn)([D.ak], N.prototype, "ShowFriendsList", null), (0, i.gn)([D.ak], N.prototype, "StartTopbarEventListener", null), (0, i.gn)([D.ak], N.prototype, "OnTopbarHovered", null), (0, i.gn)([D.ak], N.prototype, "OnTabSelectorClick", null), (N = (0, i.gn)([_.Pi], N)); let P = class extends g.Component { SelectTab(e) { this.props.tabSet.ActivateTab(e); } render() { let e = [], t = this.props.tabSet.tabs; for (let n of t) { let t = g.createElement(U, { tab: n, active: !0, selectTab: this.SelectTab, fnOnDragEnd: null, bDisableContextMenu: !0 }); e.push(g.createElement(I.Zo, { key: n.GetUniqueID(), className: "ChatTabContextMenuItem", onSelected: null }, t)); } return g.createElement(I.xV, { className: "ChatTabs ChatTabsContextMenu compactView CompactFriendsList" }, e); } }; (0, i.gn)([D.ak], P.prototype, "SelectTab", null), (P = (0, i.gn)([_.Pi], P)); let U = class extends g.Component { constructor() { super(...arguments), (this.m_bMiddleMouseDown = !1); } BindChatTab(e) { this.m_elChatTab = e; } GetBoundingClientRect() { return this.m_elChatTab ? this.m_elChatTab.getBoundingClientRect() : void 0; } GetChatTabRef() { return this.m_elChatTab; } OnDragStart(e) { let t = e.clientX - e.currentTarget.getBoundingClientRect().left, n = e.clientY - e.currentTarget.getBoundingClientRect().top; c.g_FriendsUIDesktopApp.DragDropManager.StartDrag({ type: "chattab", tab: this.props.tab, offsetX: t, offsetY: n }); } OnDragEnd(e) { let t = c.g_FriendsUIDesktopApp.DragDropManager.GetDragData(); if (t && "chattab" == t.type) { let n = t, i = !1; if (n.tabSet) { i = l.Ul.UIStore.GetPerContextChatData(n.tabSet.GetBrowserContext()).BUsePopups(); } if (!c.g_FriendsUIDesktopApp.DragDropManager.BWasDropConsumed() && n.tabSet && n.tabSet.tabCount > 1 && i) { let t = e.currentTarget.getBoundingClientRect(); const o = 100; let r = t.left - e.clientX, a = t.top - e.clientY; if (r * r + a * a > o * o) { let t = e.currentTarget.ownerDocument.defaultView, o = { left: Math.max(0, e.screenX - n.offsetX), top: Math.max(0, e.screenY - n.offsetY), width: t.innerWidth, height: t.innerHeight }; if ((this.props.fnOnDragEnd(), i)) { let t = (0, c.Um)(this, e); e.currentTarget.ownerDocument.defaultView.SteamClient.Window.GetMousePositionDetails().then((e) => { e && ((o.left = -n.offsetX), (o.top = -n.offsetY)), l.Ul.UIStore.MoveTabToNewPopup(t, n.tab, o, e); }); } else l.Ul.UIStore.MoveTabToNewPopup((0, c.Um)(this, e), n.tab, o); } } } c.g_FriendsUIDesktopApp.DragDropManager.EndDrag(); } OnMouseDown(e) { 0 == e.button ? this.props.selectTab(this.props.tab) : 1 == e.button && (e.preventDefault(), (this.m_bMiddleMouseDown = !0)); } OnOKButton(e) { this.props.selectTab(this.props.tab); } OnMouseUp(e) { 1 == e.button && this.m_bMiddleMouseDown && (l.Ul.UIStore.CloseTab((0, c.Um)(this, e), this.props.tab), e.preventDefault(), (this.m_bMiddleMouseDown = !1)); } OnMouseLeave(e) { this.m_bMiddleMouseDown = !1; } OnCloseMouseDown(e) { e.stopPropagation(); } OnCloseClick(e) { l.Ul.UIStore.CloseTab((0, c.Um)(this, e), this.props.tab), e.stopPropagation(); } OnContextMenu(e) { if (this.props.bDisableContextMenu) return; let t = this.props.tab; if (t.IsChatRoom()) { if (t instanceof a.we) { let n = t; (0, h.bU)(e, n.GetGroup(), { tab: t }); } } else { let t = this.props.tab.GetChatView(); (0, u.$W)((0, c.Um)(this, e), { tab: this.props.tab }, t.chat.chat_partner, e); } } render() { var e, t, n; let i, o; (null === (e = this.props.tab.GetChatView()) || void 0 === e ? void 0 : e.IsFriendChat()) && ((i = this.props.tab.GetChatView()), (o = i.chat.accountid_partner)); let r = null != o && l.Ul.VoiceStore.BSelfHasAcceptedOrInitiatedOneOnOneChat(o), a = null != o && l.Ul.VoiceStore.BPartnerHasAcceptedOrInitiatedOneOnOneChat(o), s = r && !a, c = l.Ul.ChatStore.VoiceChat.IsMicMuted(), m = this.props.tab, d = m.IsVoiceActive(), h = (0, L.Z)(F().ChatTab, "no-drag", this.props.active && F().Active, d && F().VoiceActive, d && c && F().MicMuted); return g.createElement( b.s, { className: h, ref: this.BindChatTab, focusable: null != this.props.selectTab, draggable: !0, onSecondaryButton: this.OnCloseClick, onSecondaryActionDescription: (0, G.Xx)("#Chat_CloseTabAction_SteamDeck"), onOKButton: this.OnOKButton, onMenuButton: this.OnContextMenu, onMouseDown: this.OnMouseDown, onMouseUp: this.OnMouseUp, onMouseLeave: this.OnMouseLeave, onDragStart: this.OnDragStart, onDragEnd: this.OnDragEnd, onContextMenu: this.OnContextMenu, onOKActionDescription: null, onMenuActionDescription: (0, G.Xx)("#Chat_Tab_ContextMenu") }, g.createElement( H, { tab: this.props.tab, active: this.props.active }, g.createElement( "div", { className: F().ChatTabRow }, m.IsVoiceActive() && g.createElement("div", { className: F().MicStatus, title: c ? (0, G.Xx)("#Tooltip_MicStatus_Muted") : (0, G.Xx)("#Tooltip_MicStatus_Active") }, (null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) ? (s ? g.createElement(M.NN7, null) : g.createElement(M.Cq4, null)) : g.createElement(M.JgI, { off: c })), g.createElement(E.SV, null, g.createElement(X, { tab: this.props.tab })), g.createElement( E.SV, null, (null === (n = this.context) || void 0 === n ? void 0 : n.IN_GAMEPADUI) && (function (e) { if (!e) return null; let t = e.chat.accountid_partner, n = l.Ul.VoiceStore.BSelfHasAcceptedOrInitiatedOneOnOneChat(t), i = l.Ul.VoiceStore.BPartnerHasAcceptedOrInitiatedOneOnOneChat(t); if (!i && !n) return null; let o = "", r = l.Ul.VoiceStore.BSelfHadPreviouslyJoinedOneOnOneChat(t), a = e.chat.chat_partner, s = l.Ul.CMInterface.steamid.GetAccountID(), c = !1, m = !1, d = !1; l.Ul.VoiceStore.GetActiveOneOnOneVoiceChatAccountID() == t && ((c = l.Ul.VoiceStore.HasBeenAttemptingOverTwoSeconds() || l.Ul.VoiceStore.IsAttemptingReconnect()), (m = !l.Ul.VoiceStore.BIsAccountFullyConnectedToActiveVoiceChat(s) || l.Ul.VoiceStore.IsAttemptingReconnect()), (d = !l.Ul.VoiceStore.BIsAccountFullyConnectedToActiveVoiceChat(t))); o = n && !i ? (0, G.Xx)("#Voice_WaitingForFriendToJoin", a.display_name) : i && !n ? (r ? (0, G.Xx)("#Voice_ChannelRejoinAvailable", a.display_name) : (0, G.Xx)("#Voice_ChannelAvailable", a.display_name)) : m ? (c ? (0, G.Xx)("#VoiceChatConnecting") : "") : !m && d ? (0, G.Xx)("#VoiceChatParterConnecting", a.display_name) : (0, G.Xx)("#Voice_ChannelActive", a.display_name); return g.createElement("div", { className: F().VoiceStatusMessage }, o); })(i), ), g.createElement(V, { onClick: this.OnCloseClick, onMouseDown: this.OnCloseMouseDown }), g.createElement(W, { tab: this.props.tab }), ), ), ); } }; function V(e) { return g.createElement("div", { title: (0, G.Xx)("#Chat_CloseTooltip"), className: F().CloseButton, onClick: e.onClick, onMouseDown: e.onMouseDown }, g.createElement(M.pVO, null)); } (U.contextType = x.E_), (0, i.gn)([D.ak], U.prototype, "BindChatTab", null), (0, i.gn)([D.ak], U.prototype, "OnDragStart", null), (0, i.gn)([D.ak], U.prototype, "OnDragEnd", null), (0, i.gn)([D.ak], U.prototype, "OnMouseDown", null), (0, i.gn)([D.ak], U.prototype, "OnOKButton", null), (0, i.gn)([D.ak], U.prototype, "OnMouseUp", null), (0, i.gn)([D.ak], U.prototype, "OnMouseLeave", null), (0, i.gn)([D.ak], U.prototype, "OnCloseMouseDown", null), (0, i.gn)([D.ak], U.prototype, "OnCloseClick", null), (0, i.gn)([D.ak], U.prototype, "OnContextMenu", null), (U = (0, i.gn)([_.Pi], U)); class H extends g.Component { constructor() { super(...arguments), (this.m_refFriendHover = g.createRef()); } componentDidUpdate(e) { !e.active && this.props.active && this.m_refFriendHover.current && this.m_refFriendHover.current.Hide(); } render() { let e = this.props, t = e.tab.GetChatView(); if (t && t.chat instanceof s.a) { let n = t.chat.chat_partner; return g.createElement(B.yd, { key: n.accountid, ref: this.m_refFriendHover, friend: n, context: {}, disableContextMenu: !0, direction: "bottom" }, e.children); } return e.children; } } let W = class extends g.Component { render() { const { tab: e } = this.props; if (e.IsChatRoom() && e instanceof a.we) { if (!e.GetGroup().hasUnreadChatMessage) return null; } else if (!e.GetUnreadMessageCount()) return null; return g.createElement("div", { className: F().UnreadGlow }, g.createElement("div", { className: F().UnreadCircle })); } }; W = (0, i.gn)([_.Pi], W); let X = class extends g.Component { render() { var e, t, n, i; let o = this.props.tab.GetChatView(); if (o && o.chat instanceof s.a) { let r = o.chat.chat_partner, a = r.persona.is_ingame || (null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI), s = (null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) ? "Medium" : "X-Small"; return g.createElement("div", { className: F().ChatTabContent_Friend }, g.createElement(B.mo, { friend: o.chat.chat_partner, noActions: !0, context: { chat: o.chat }, bHideGameName: !a, bHideEnhancedRichPresenceLabel: !(null === (n = this.context) || void 0 === n ? void 0 : n.IN_GAMEPADUI), bHidePersona: !a, bHideSnooze: !1, avatarSize: s }), (null === (i = this.context) || void 0 === i ? void 0 : i.IN_GAMEPADUI) && !r.is_friend && g.createElement("div", { className: F().IsNotFriendLabel }, (0, G.Xx)("#Friend_Menu_NotAFriendLabel"), " ")); } if (o && o.chat instanceof r.K) { let e = this.props.tab.GetGroup(), t = !0; return g.createElement("div", { className: F().ChatTabContent_ChatRoom }, g.createElement(d._P, { group: e, smaller: t, smallish: !t }), g.createElement("div", { className: F().ChatTabContent_ChatRoomName }, this.props.tab.GetTabName())); } if (this.props.tab.IsBroadcast()) { let e = this.props.tab.GetTabName(); return g.createElement("div", { className: F().ChatTabContent_ChatRoom }, g.createElement("div", { className: "ChatRoomGroupAvatar HasAvatar Smaller" }, g.createElement("img", { className: "ChatRoomGroupAvatar_Avatar", src: v.rr.tabIcon })), g.createElement("div", { className: F().ChatTabContent_ChatRoomName }, e)); } return null; } }; function j(e) { c.g_FriendsUIDesktopApp.UIDisplayPrefs.bDontShowVoiceAlert || (e && (0, A.BR)(g.createElement(z, null), e, "ActiveVoiceAlert", { strTitle: (0, G.Xx)("#Chat_StillInVoiceDialog_Title"), popupWidth: 650, popupHeight: 340 }, (0, c.Og)(e))); } (X.contextType = x.E_), (X = (0, i.gn)([_.Pi], X)); let z = class extends g.Component { constructor(e) { super(e), (this.state = { bDontShowChecked: !1, strChatName: "" }), (this.m_strChannelName = ""); } DismissDialog() { this.props.closeModal(); } OnSubmit() { c.g_FriendsUIDesktopApp.SetUIDisplayPref("bDontShowVoiceAlert", this.state.bDontShowChecked), this.props.closeModal(); } OnDialogChecked() { this.setState({ bDontShowChecked: !this.state.bDontShowChecked }); } OnManualVoiceChatExit() { l.Ul.VoiceStore.OnUserEndVoiceChat(), this.OnSubmit(); } componentDidMount() { this.setState({ strChatName: l.Ul.ChatStore.GetActiveVoiceChat().name }); } render() { return g.createElement( A.e1, { onEscKeypress: this.DismissDialog }, g.createElement( y.oX, { classNameContent: "CloseActiveVoiceWindowConfirmation", onSubmit: this.OnSubmit }, g.createElement(y.h4, null, g.createElement("div", null, (0, G.Xx)("#Chat_StillInVoiceDialog_Title"))), g.createElement(y.uT, null, g.createElement("div", { className: "activeVoiceDetails" }, (0, G.Xx)("#Chat_StillInVoiceDialog_Desc1")), g.createElement("div", { className: "activeVoiceDetails" }, (0, G.Xx)("#Chat_StillInVoiceDialog_Desc2")), g.createElement("div", { className: "voiceControlsExample" }, g.createElement(B.qe, { name: this.state.strChatName, chat: l.Ul.ChatStore.GetActiveVoiceChat(), nostatus: !0 }), g.createElement("div", { className: "circleHighlight voiceExit" })), !1), g.createElement(y.$_, null, g.createElement("div", { className: "_DialogColLayout" }, g.createElement(y.KM, { onClick: this.OnSubmit }, (0, G.Xx)("#Chat_StillInVoiceDialog_KeepChatting"))), g.createElement("div", { className: "dontShowConfirmation", onClick: this.OnDialogChecked }, g.createElement(y.ji, { checked: this.state.bDontShowChecked, onChange: this.OnDialogChecked }), (0, G.Xx)("#Dialog_DontShowMeAgain"))), ), ); } }; (0, i.gn)([D.ak], z.prototype, "DismissDialog", null), (0, i.gn)([D.ak], z.prototype, "OnSubmit", null), (0, i.gn)([D.ak], z.prototype, "OnDialogChecked", null), (0, i.gn)([D.ak], z.prototype, "OnManualVoiceChatExit", null), (z = (0, i.gn)([_.Pi], z)); }, 41111: (e, t, n) => { "use strict"; n.d(t, { hg: () => b, oC: () => I, t4: () => y }); var i = n(85556), o = n(10553), r = n(37234), a = n(72746), s = n(23133), l = n(618), c = n(94623), m = n(46057), d = n(68816), h = n(50649), u = n(27378), p = n(11259), _ = n(16518), g = n(84290), C = n(2049), f = n(93635), v = n(83817), S = n(8070); function b(e, t, n, i, o) { I(e, t, n, i, !1, o); } function I(e, t, n, i, o, a) { (0, d.BR)(u.createElement(D, { browserContext: e, chatRoomGroup: n, chatRoom: i, bIsDropInvite: o, vecInvitePlayers: a }), t, "ChatRoomGroupInviteDialog", { strTitle: (0, g.Xx)("#Chat_CreateChatRoom"), popupWidth: 664, popupHeight: 680 }, (0, r.Og)(t)); } let y = class extends u.Component { constructor(e) { super(e); } componentDidMount() { let e = this.props.chat.lastChatLinkInfo; (!e || Date.now() >= e.rtExpires) && this.GenerateLink(86400); } GenerateLink(e) { this.props.chat.CreateInviteLink(e); } OnFocus(e) { e.target.select(); } render() { let e = this.props.chat.lastChatLinkInfo, t = (0, g.Xx)("#Chat_Invite_Loading"); return this.props.disabled && ((e = void 0), (t = "")), u.createElement(u.Fragment, null, u.createElement(p.II, { label: (0, g.Xx)("#Chat_Invite_Linkheader"), className: "InviteFriendToChatDialog_LinkInput", type: "text", value: e ? e.strInviteURL : t, readOnly: !0, bShowCopyAction: !!e, onFocus: this.OnFocus, onClick: this.OnFocus }), !this.props.disabled && u.createElement(E, { onGenerate: this.GenerateLink, chat: this.props.chat })); } }; (0, i.gn)([C.ak], y.prototype, "GenerateLink", null), (0, i.gn)([C.ak], y.prototype, "OnFocus", null), (y = (0, i.gn)([h.Pi], y)); let E = class extends u.Component { constructor(e) { super(e); } OnDropDownChange(e, t) { this.props.onGenerate(e.data), t.SetSelectedOption(void 0); } CreateExpiresText(e) { if (0 == e) return (0, g.Xx)("#InviteLink_ExpiresNever_Short"); return e - a.Ul.GetServerRTime32() > 3600 ? (0, g.Xx)("#InviteLink_ExpiresDay_Short") : (0, g.Xx)("#InviteLink_ExpiresHour_Short"); } render() { let e = this.props.chat.lastChatLinkInfo, t = [ { label: (0, g.Xx)("#InviteLink_ExpiresHour_Short"), data: 3600 }, { label: (0, g.Xx)("#InviteLink_ExpiresDay_Short"), data: 86400 }, { label: (0, g.Xx)("#InviteLink_ExpiresNever_Short"), data: 0 }, ]; return u.createElement("div", { className: "expireLinkInContainer" }, u.createElement(p.__, null, (0, g.Xx)("#InviteLink_ExpireDropDownLabel")), u.createElement(p.ry, { strClassName: "inviteLinkDropDown", rgOptions: t, strDefaultLabel: e ? this.CreateExpiresText(e.rtExpires) : u.createElement("span", null, " "), onChange: this.OnDropDownChange, selectedOption: void 0 })); } }; (0, i.gn)([C.ak], E.prototype, "OnDropDownChange", null), (E = (0, i.gn)([h.Pi], E)); class D extends u.PureComponent { constructor(e) { super(e), (this.state = { dropToInviteFriend: void 0, rgPickedFriends: [] }), this.BuildMemberOfGroupSet(e); } componentDidUpdate(e) { e.chatRoomGroup !== this.props.chatRoomGroup && this.BuildMemberOfGroupSet(this.props); } BuildMemberOfGroupSet(e) { let t = e.chatRoomGroup; (this.m_setMembersOfGroup = t.memberList.GetCurrentMemberSet()), this.forceUpdate(); } DismissDialog() { this.props.closeModal(); } OnSubmit() { for (let e of this.state.rgPickedFriends) this.props.chatRoomGroup.InviteFriend(e.accountid, this.props.chatRoom); this.props.closeModal(); } OnDragEnter(e, t) { if (((0, f.X)((e && "friend" == e.type) || t, "Invalid data type passed to ChatRoomGroupDialog.OnDragEnter"), e)) { let t = e; t.friend && this.setState({ rgPickedFriends: this.state.rgPickedFriends.concat(t.friend) }); } return !0; } OnDragLeave() { const { dropToInviteFriend: e, rgPickedFriends: t } = this.state; if (e) { const n = t.findIndex((t) => t.accountid === e.accountid); this.setState({ dropToInviteFriend: void 0, rgPickedFriends: t.slice(0, n).concat(t.slice(n + 1)) }); } } OnDrop(e, t) { if (((0, f.X)(e && "friend" == e.type, "Invalid data type passed to ChatRoomGroupDialog.OnDrop"), e && "friend" == e.type)) { let t = e; if (t.friend) { r.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed(); this.state.rgPickedFriends.findIndex((e) => e.accountid === t.friend.accountid) > -1 ? this.setState({ dropToInviteFriend: void 0, rgPickedFriends: this.state.rgPickedFriends.concat(t.friend) }) : this.state.dropToInviteFriend && this.setState({ dropToInviteFriend: void 0 }); } } } GetDragDropProps() { let e = { rgAcceptedTypes: ["friend"] }; return (e.fnDragEnter = this.OnDragEnter), (e.fnDragLeave = this.OnDragLeave), (e.fnDrop = this.OnDrop), e; } render() { var e, t; let n = this.props.chatRoomGroup.GetDefaultChatRoom(); this.props.chatRoom && (n = this.props.chatRoom); let i, o = this.props.chatRoomGroup.name, r = null != this.props.chatRoom, m = new Set([]), h = this.props.chatRoomGroup.BCanInvite(); h ? this.props.chatRoom || (m = this.m_setMembersOfGroup) : this.props.chatRoom ? a.Ul.FriendStore.all_friends.forEach((e) => { this.props.chatRoomGroup.BHasMember(e.accountid) || m.add(e.accountid); }) : (0, f.X)(!1, "User should not be able to invite to the group"), (i = this.props.bIsDropInvite ? (0, g.Xx)("#Chat_InviteFriends_DropInvite_Pre") : h ? (0, g.Xx)("#Chat_InviteFriends") : (0, g.Xx)("#Chat_InviteGroupMembers")); let _ = "ChatRoomGroupInviteDialog" + (this.props.bIsDropInvite ? " IsDropInvite" : ""); (null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && (_ += " GamepadMode"); return u.createElement( d.e1, { onEscKeypress: this.DismissDialog }, u.createElement( p.oX, { classNameContent: _, onSubmit: this.OnSubmit }, u.createElement(p.h4, null, r ? u.createElement("div", { className: "InviteToVoiceHeader" }, (0, g.Xx)("#Chat_Actions_InviteFriend_VoiceChat"), u.createElement("div", { className: "DialogHeaderSubtitle DialogHighlight" }, '"', this.props.chatRoom.name, '"')) : (0, g.Xx)("#Chat_Actions_InviteFriend"), u.createElement("div", { className: "displayRow" }, u.createElement(l._P, { group: this.props.chatRoomGroup, small: !0 }), u.createElement("div", { className: "DialogHeaderSubtitle DialogHighlight" }, o))), u.createElement(p.uT, null, u.createElement(S.e, null, !this.props.bIsDropInvite && h && !(null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) && u.createElement(u.Fragment, null, u.createElement("div", { className: "inviteLinkContainer" }, u.createElement(y, { chat: n, disabled: !1 })), u.createElement("div", { className: "OrSeparator" }, u.createElement("div", { className: "HBar" }), u.createElement("div", { className: "OrSeparatorLabel" }, (0, g.Xx)("#Chat_InviteFriends_OR_Separator")), u.createElement("div", { className: "HBar" }))), u.createElement(s.G, Object.assign({ className: "" }, this.GetDragDropProps()), u.createElement(c.B, { label: i, eSort: 0, rgPickedFriends: this.state.rgPickedFriends, bDropInvite: this.props.bIsDropInvite, renderChosenFriend: w, onChange: (e) => this.setState({ rgPickedFriends: e }), excludeFriend: (e) => m.has(e.accountid) })))), u.createElement(p.$_, null, u.createElement(v.s, { className: "DialogTwoColLayout _DialogColLayout", "flow-children": "row" }, u.createElement(p.KM, { disabled: 0 === this.state.rgPickedFriends.length }, (0, g.Xx)("#Chat_Invite")), u.createElement(p.zx, { onClick: this.DismissDialog }, (0, g.Xx)("#Button_Close")))), ), ); } } (D.contextType = o.E_), (0, i.gn)([C.ak], D.prototype, "DismissDialog", null), (0, i.gn)([C.ak], D.prototype, "OnSubmit", null), (0, i.gn)([C.ak], D.prototype, "OnDragEnter", null), (0, i.gn)([C.ak], D.prototype, "OnDragLeave", null), (0, i.gn)([C.ak], D.prototype, "OnDrop", null); let w = (0, h.Pi)((e) => u.createElement( u.Fragment, null, u.createElement( m.yd, { friend: e.friend, context: null }, u.createElement( v.s, { className: "FriendPicker_ChosenFriend", onActivate: () => { e.onClick(e.friend); }, }, u.createElement("span", null, e.friend.display_name), u.createElement(_.pVO, null), ), ), ), ); }, 34268: (e, t, n) => { "use strict"; n.d(t, { n: () => H }); var i = n(85556), o = n(14206), r = n.n(o), a = n(19953), s = n(93354), l = n(37234), c = n(72746), m = n(68730), d = n(41111), h = n(71357), u = n(46057), p = n(68816), _ = n(83817), g = n(79588), C = n(50649), f = n(27378), v = n(11259), S = n(16518), b = n(99165), I = n(88669), y = n(9824), E = n(84290), D = n(2049), w = n(51075), R = n(14341), A = n(88991), M = n(93635), k = n(51630), T = n.n(k), L = n(87018); function G(e) { const { title: t, pages: n, children: i, initialActivePage: o, renderNavFooter: r } = e, [a, s] = (0, f.useState)(o || n[0]); return f.createElement( _.s, { className: T().Container, "flow-children": "row" }, f.createElement( _.s, { className: T().Nav, "flow-children": "column" }, f.createElement("span", { className: T().NavTitle }, t), f.createElement( _.s, { className: T().NavItems, "flow-children": "column" }, n.map((e) => f.createElement(O, { key: e, active: e === a, onClick: () => s(e) }, e)), ), r && r(), ), f.createElement("div", { className: T().Content }, i(a)), ); } const O = (e) => { const { active: t, onClick: n } = e, o = (0, i._T)(e, ["active", "onClick"]); return f.createElement(_.s, Object.assign({}, o, { focusable: !0, onActivate: n, className: (0, L.Z)(T().NavItem, t && T().Active) })); }; var F = n(98865), B = n.n(F); const x = (e) => { const { className: t } = e, n = (0, i._T)(e, ["className"]); return f.createElement("div", Object.assign({ className: (0, L.Z)(B().DialogTitle, t) }, n)); }, N = (e) => { const { className: t } = e, n = (0, i._T)(e, ["className"]); return f.createElement("div", Object.assign({ className: (0, L.Z)(B().DialogContent, t) }, n)); }; var P = n(21658), U = n.n(P), V = n(10553); function H(e, t) { (0, p.BR)(f.createElement(W, { groupView: t }), e, "ChatRoomGroupSettings", { strTitle: (0, E.Xx)("#GroupSettings"), popupWidth: 842, popupHeight: 600 }, (0, l.Og)(e), { nDragAreaHeight: 32 }); } let W = class extends f.Component { constructor(e) { super(e), (this.m_inviteLinks = { loadingState: "pending", rgInviteLinks: null }), (this.m_bans = new s.Xc()), (this.m_invitedUsers = { loadingState: "pending", rgInvitedUsers: null }), (0, g.rC)(this), (this.state = { strRoomName: this.props.groupView.GetGroup().name }); } DismissDialog() { this.props.closeModal(); } CloseDialog() { this.props.closeModal(); } OnLeave(e) { let t = (0, I.RA)(e), n = (0, l.Um)(null, e), i = this.props.groupView.GetGroup(), o = i.BIsClanChatRoom() ? "#Chat_Actions_LeaveChatRoomGroup_ClanConfirm" : i.BIsAccountIDOwner(c.Ul.CMInterface.steamid.GetAccountID()) ? "#Chat_Actions_OwnerLeaveChatRoomGroup_Confirm" : "#Chat_Actions_LeaveChatRoomGroup_Confirm"; (0, h.p3)(t, (0, E.Xx)("#GroupSettings_Leave_Section"), (0, E.Xx)(o, i.name), (0, E.Xx)("#GroupSettings_Leave_Button")) .then(() => { i.LeaveChatRoomGroup(n); }) .then(() => { this.props.closeModal(); }) .catch(() => {}); } GetNamedGroupPageList() { var e; const t = this.props.groupView.GetGroup(); return (null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) ? [ { title: (0, E.Xx)("#GroupSettings_General_Section"), render: () => f.createElement(z, { group: t }) }, { title: (0, E.Xx)("#GroupSettings_InvitedUsers_Section"), render: () => f.createElement(te, { group: t, invitedUsers: this.m_invitedUsers }) }, { title: (0, E.Xx)("#GroupSettings_Bans_Section"), render: () => f.createElement(ne, { group: t, bans: this.m_bans }) }, ] : [ { title: (0, E.Xx)("#GroupSettings_General_Section"), render: () => f.createElement(z, { group: t }) }, { title: (0, E.Xx)("#GroupSettings_Channels_Section"), render: () => f.createElement(Z, { groupView: this.props.groupView }) }, { title: (0, E.Xx)("#GroupSettings_Permissions_Section"), render: () => f.createElement($, { group: t }) }, { title: (0, E.Xx)("#GroupSettings_Invite_Section"), render: () => f.createElement(ee, { group: t, inviteLinks: this.m_inviteLinks }) }, { title: (0, E.Xx)("#GroupSettings_InvitedUsers_Section"), render: () => f.createElement(te, { group: t, invitedUsers: this.m_invitedUsers }) }, { title: (0, E.Xx)("#GroupSettings_Bans_Section"), render: () => f.createElement(ne, { group: t, bans: this.m_bans }) }, ]; } GetNonNamedGroupPageList() { var e; const t = this.props.groupView.GetGroup(); return (null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) ? [ { title: (0, E.Xx)("#GroupSettings_Save_Section"), render: () => f.createElement(j, { group: t }) }, { title: (0, E.Xx)("#GroupSettings_Leave_Section"), render: () => f.createElement(K, { group: t }) }, ] : [ { title: (0, E.Xx)("#GroupSettings_Save_Section"), render: () => f.createElement(j, { group: t }) }, { title: (0, E.Xx)("#GroupSettings_Invite_Section"), render: () => f.createElement(ee, { group: t, inviteLinks: this.m_inviteLinks }) }, { title: (0, E.Xx)("#GroupSettings_Leave_Section"), render: () => f.createElement(K, { group: t }) }, ]; } GetPageList() { return this.props.groupView.GetGroup().IsNamedGroupChat() ? this.GetNamedGroupPageList() : this.GetNonNamedGroupPageList(); } render() { let e = this.GetPageList(); const { groupView: t } = this.props, n = t.GetGroup(), i = `${n.unique_id}_${n.IsNamedGroupChat()}`; return f.createElement( p.e1, { onEscKeypress: this.DismissDialog }, f.createElement(G, { title: (0, E.Xx)("#GroupSettings"), pages: e.map(({ title: e }) => e), renderNavFooter: () => f.createElement(X, { onActivate: this.OnLeave }), key: i }, (t) => { const n = e.find((e) => e.title === t), i = n ? n.render() : null; return f.createElement(N, { style: { flexDirection: "column" }, key: t }, i); }), ); } }; (W.contextType = V.E_), (0, i.gn)([g.LO], W.prototype, "m_inviteLinks", void 0), (0, i.gn)([g.LO], W.prototype, "m_invitedUsers", void 0), (0, i.gn)([D.ak], W.prototype, "DismissDialog", null), (0, i.gn)([D.ak], W.prototype, "CloseDialog", null), (0, i.gn)([D.ak], W.prototype, "OnLeave", null), (W = (0, i.gn)([C.Pi], W)); const X = (e) => f.createElement(_.s, Object.assign({ className: U().LeaveButton }, e), f.createElement(S.iz5, null), (0, E.Xx)("#GroupSettings_Leave_Section")); let j = class extends f.Component { constructor(e) { super(e), (this.m_bSaving = !1), (this.m_strError = ""), (0, g.rC)(this); } BindInputRef(e) { this.m_refInput = e; } AnimateUpgrade_In() { document.getElementById("animUp"); } AnimateUpgrade_Out() { document.getElementById("animDown"); } SaveGroup() { let e = this.props.group; (this.m_bSaving = !1), (this.m_strError = ""), e.SaveChatRoomGroup(this.m_refInput.value).catch((e) => { (this.m_bSaving = !1), (this.m_strError = 12 == e ? (0, E.Xx)("#GroupSettings_Save_NameError") : (0, E.Xx)("#GroupSettings_Save_GenericError")); }); } render() { let e = this.m_bSaving, t = this.m_strError; return f.createElement(v.l0, { className: "DialogBody", onSubmit: this.SaveGroup }, f.createElement(v.Ac, null, (0, E.Xx)("#GroupSettings_Save_Desc"), f.createElement("div", null, f.createElement("ul", null, f.createElement("li", null, (0, E.Xx)("#GroupSettings_Save_Feature_1")), f.createElement("li", null, (0, E.Xx)("#GroupSettings_Save_Feature_2")), f.createElement("li", null, (0, E.Xx)("#GroupSettings_Save_Feature_3")), f.createElement("li", null, (0, E.Xx)("#GroupSettings_Save_Feature_4"))))), f.createElement(v.II, { ref: this.BindInputRef, autoFocus: !0, label: (0, E.Xx)("#GroupSettings_Save_NameGroup"), disabled: e }), !e && f.createElement(f.Fragment, null, t.length > 0 && f.createElement("div", { className: "ErrorWhileSaving" }, t), f.createElement(v.KM, { className: "_FixedHeight" }, (0, E.Xx)("#GroupSettings_Save_Section"))), e && f.createElement(b.V, null)); } }; (0, i.gn)([g.LO], j.prototype, "m_bSaving", void 0), (0, i.gn)([g.LO], j.prototype, "m_strError", void 0), (0, i.gn)([D.ak], j.prototype, "BindInputRef", null), (0, i.gn)([D.ak], j.prototype, "AnimateUpgrade_In", null), (0, i.gn)([D.ak], j.prototype, "AnimateUpgrade_Out", null), (0, i.gn)([D.ak], j.prototype, "SaveGroup", null), (j = (0, i.gn)([C.Pi], j)); let z = class extends f.Component { constructor(e) { super(e), (this.m_strRoomName = void 0), (this.m_strTagLine = void 0), (0, g.rC)(this), (this.m_strRoomName = this.props.group.IsNamedGroupChat() ? this.props.group.name : ""), (this.m_strTagLine = this.props.group.tagline), (this.state = { bNameSubmitted: !1, bTaglineSubmitted: !1 }); } AvatarUploadEResultToString(e) { let t = "#Chat_Settings_Error_Unknown"; switch (e) { case 21: t = "#Chat_Settings_Error_NotLoggedOn"; break; case 112: t = "#Chat_Settings_Error_LimitedUser"; break; case 15: t = "#Chat_Settings_Error_AccessDenied"; break; case 2: t = "#Chat_Settings_Error_FailedToUpload"; break; case 25: t = "#Chat_Settings_Error_FileTooLarge"; break; case 8: t = "#Chat_Settings_Error_InvalidImage"; break; case 37: t = "#Chat_Settings_Error_ServerError"; } return (0, E.Xx)(t); } SetChatRoomGroupAvatarEResultToString(e) { let t = "#Chat_Settings_Error_Unknown"; switch (e) { case 10: case 8: case 32: t = "#Chat_Settings_Error_ServerError"; break; case 15: t = "#Chat_Settings_Error_NotAdmin"; } return (0, E.Xx)(t); } OnFileChange(e) { let t = e.target.files[0], n = this.props.group; e.preventDefault(); let i = new FormData(); i.set("sessionid", a.De.SESSIONID), i.set("avatar", t); r() .post(a.De.CHAT_BASE_URL + "chat/avatarfileupload/", i, { headers: { "content-type": "multipart/form-data" } }) .then((e) => { 1 == e.data.success && n.SetChatRoomGroupAvatar(e.data.sha).catch((e) => { let t = this.SetChatRoomGroupAvatarEResultToString(e); (0, h.kQ)((0, E.Xx)("#Generic_Error"), t); }); }) .catch((e) => { let t = this.AvatarUploadEResultToString(e.response.data.success); (0, h.kQ)((0, E.Xx)("#Generic_Error"), t), console.log(e.response); }); } bindFileUploadControl(e) { this.m_fileInput = e; } OnNameChange(e) { (this.m_strRoomName = e.target.value), this.setState({ bNameSubmitted: !1 }); } OnAvatarChange() { this.m_fileInput.click(); } OnTagLineChange(e) { (this.m_strTagLine = e.target.value), this.setState({ bTaglineSubmitted: !1 }); } OnNameBlur() { let e = this.props.group; if (!e.IsNamedGroupChat() && !this.m_strRoomName) return; if (e.IsNamedGroupChat() && e.name === this.m_strRoomName) return; const t = () => (this.m_strRoomName = this.props.group.name); e.RenameChatRoomGroup(this.m_strRoomName).then(t, t); let n = document.getElementById("b1"); n && n.blur(), this.setState({ bNameSubmitted: !0 }); } OnTagLineBlur() { let e = this.props.group; if (e.tagline != this.m_strTagLine) { e.SetChatRoomGroupTagline(this.m_strTagLine), this.setState({ bTaglineSubmitted: !0 }); let t = document.getElementById("b2"); t && t.blur(); } } OnSubmitSent() { this.OnTagLineBlur(), this.OnNameBlur(); } render() { var e; const { group: t } = this.props, n = t.BCanAdminGroup(); let i; if (t.BIsClanChatRoom()) i = f.createElement("div", null); else { if (null == t.GetOwnerAccountID()) i = f.createElement("div", null, " ", (0, E.Xx)("#Chat_Settings_No_Owner"), " "); else { let e = c.Ul.FriendStore.GetPlayer(t.GetOwnerAccountID()); i = f.createElement(_.s, { focusable: !1, fnCanTakeFocus: () => !1 }, f.createElement(v.__, null, " ", (0, E.Xx)("#Chat_Settings_General_Owner")), f.createElement(u.mo, { className: "groupOwnerFriend", friend: e, context: null })); } } return f.createElement( f.Fragment, null, f.createElement(x, null, (0, E.Xx)("#GroupSettings_General_Section")), !n && f.createElement(ie, null), f.createElement( v.l0, { onSubmit: this.OnSubmitSent, className: (0, L.Z)("DialogBody", U().General) }, f.createElement( v.Uq, null, f.createElement("div", { className: U().AvatarAndUser }, f.createElement(v.__, null, (0, E.Xx)("#Chat_Settings_General_Icon")), f.createElement("img", { className: (0, L.Z)(U().Avatar, "no-drag"), src: t.hasIcon ? t.avatar_url_full : "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" }), !t.hasIcon && f.createElement("div", { className: U().NoIconLabel }, (0, E.Xx)("#Chat_Settings_General_NoIcon")), f.createElement("input", { type: "file", style: { display: "none" }, name: "fileupload", accept: ".png, .jpg, .jpeg, .gif", ref: this.bindFileUploadControl, onChange: this.OnFileChange }), !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && f.createElement(v.zx, { onClick: this.OnAvatarChange, disabled: !n }, (0, E.Xx)(t.hasIcon ? "#Chat_Settings_General_ChangeIcon" : "#Chat_Settings_General_AddIcon"))), f.createElement("div", { className: "GeneralChatSettings" }, f.createElement(v.II, { autoComplete: "off", id: "b1", className: "groupChatName", label: (0, E.Xx)("#Chat_Settings_General_Chat_Name"), type: "text", value: this.m_strRoomName, onChange: this.OnNameChange, onBlur: this.OnNameBlur, autoFocus: !0, disabled: !n }), f.createElement("input", { type: "submit", style: { display: "none" } }), f.createElement(v.II, { autoComplete: "off", id: "b2", className: "groupChatTag", label: (0, E.Xx)("#Chat_Settings_General_Tagline"), type: "text", value: this.m_strTagLine, onChange: this.OnTagLineChange, onBlur: this.OnTagLineBlur, disabled: !n }), i), ), ), ); } }; (z.contextType = V.E_), (0, i.gn)([g.LO], z.prototype, "m_strRoomName", void 0), (0, i.gn)([g.LO], z.prototype, "m_strTagLine", void 0), (0, i.gn)([D.ak], z.prototype, "OnFileChange", null), (0, i.gn)([D.ak], z.prototype, "bindFileUploadControl", null), (0, i.gn)([D.ak], z.prototype, "OnNameChange", null), (0, i.gn)([D.ak], z.prototype, "OnAvatarChange", null), (0, i.gn)([D.ak], z.prototype, "OnTagLineChange", null), (0, i.gn)([D.ak], z.prototype, "OnNameBlur", null), (0, i.gn)([D.ak], z.prototype, "OnTagLineBlur", null), (0, i.gn)([D.ak], z.prototype, "OnSubmitSent", null), (z = (0, i.gn)([C.Pi], z)); let K = class extends f.Component { OnLeave(e) { let t = e.currentTarget.ownerDocument.defaultView, n = (0, l.Um)(null, e), i = this.props.group.BIsClanChatRoom() ? "#Chat_Actions_LeaveChatRoomGroup_ClanConfirm" : this.props.group.BIsAccountIDOwner(c.Ul.CMInterface.steamid.GetAccountID()) ? "#Chat_Actions_OwnerLeaveChatRoomGroup_Confirm" : "#Chat_Actions_LeaveChatRoomGroup_Confirm"; (0, h.p3)(t, (0, E.Xx)("#GroupSettings_Leave_Section"), (0, E.Xx)(i, this.props.group.name), (0, E.Xx)("#GroupSettings_Leave_Button")) .then(() => { this.props.group.LeaveChatRoomGroup(n); }) .catch(() => {}); } render() { return f.createElement("div", null, (0, E.Xx)("#GroupSettings_Leave_Confirm"), f.createElement(v.zx, { onClick: this.OnLeave }, (0, E.Xx)("#GroupSettings_Leave_Button"))); } }; (0, i.gn)([D.ak], K.prototype, "OnLeave", null), (K = (0, i.gn)([C.Pi], K)); let q = class extends f.Component { render() { let e = this.props.roomList.indexOf(this.props.room); (0, M.X)(-1 !== e, "Couldn't find CChatRoom inside of its list?"); let t = e - 1, n = () => { this.props.room.GetGroup().ReorderRoom(this.props.roomList[t].GetRoomID(), this.props.room.GetRoomID()); }, i = e + 1, o = () => { this.props.room.GetGroup().ReorderRoom(this.props.room.GetRoomID(), this.props.roomList[i].GetRoomID()); }; return (t < 0 || this.props.roomList[t].BIsDefaultRoom()) && (n = void 0), i >= this.props.roomList.length && (o = void 0), this.props.room.BIsDefaultRoom() && ((n = void 0), (o = void 0)), this.props.enabled || ((n = void 0), (o = void 0)), void 0 === n && void 0 === o ? null : f.createElement("div", { className: "rolePriorityContainer" }, f.createElement("div", { className: "rolePriorityButton roleUp" + (void 0 === n ? " Disabled" : ""), onClick: n }, f.createElement(S.V7n, { angle: 0 })), f.createElement("div", { className: "rolePriorityButton roleDown" + (void 0 === o ? " Disabled" : ""), onClick: o }, f.createElement(S.V7n, { angle: 180 }))); } }; q = (0, i.gn)([C.Pi], q); let Z = class extends f.Component { OnCreateNewTextChannel(e) { let t = e.currentTarget.ownerDocument.defaultView; (0, p.BR)(f.createElement(m.Pd, { ownerWin: t, groupView: this.props.groupView, bVoiceChannel: !1, bJoinChannel: !1 }), t); } OnCreateNewVoiceChannel(e) { let t = e.currentTarget.ownerDocument.defaultView; (0, p.BR)(f.createElement(m.Pd, { ownerWin: t, groupView: this.props.groupView, bVoiceChannel: !0, bJoinChannel: !1 }), t); } OnDeleteChannel(e, t) { let n = e.currentTarget.ownerDocument.defaultView; (0, h.p3)(n, (0, E.Xx)("#GroupSettings_Channels_DeleteChannel"), (0, E.Xx)("#GroupSettings_Channels_DeleteConfirm"), (0, E.Xx)("#GroupSettings_Channels_DeleteButtonLabel"), (0, E.Xx)("#Button_Cancel"), !0) .then(() => { let e = t.GetGroup(), n = t.GetRoomID(); e.DeleteChatRoom(n); }) .catch(() => {}); } render() { const { groupView: e } = this.props; let t = e.GetGroup().BCanAdminChannel(); const n = e.GetGroup().textRoomList, i = e.GetGroup().voiceRoomList; let o = (e, o, r) => f.createElement("div", { key: e.GetRoomID(), className: "ChatGroupSettingsChannels_Row" }, f.createElement("div", { className: "_DialogRow _DialogRowBackground" }, f.createElement("div", { className: "_DialogRowLabel" }, r ? f.createElement(S.Cq4, null) : f.createElement(S.MFo, null), f.createElement("div", { className: e.IsDefaultRoomForGroup() ? "HomeChannel" : "", style: { alignSelf: "center" } }, e.BIsDefaultRoom() ? (0, E.Xx)("#Chat_DefaultChannelName") : e.name)), e.IsDefaultRoomForGroup() && f.createElement("div", { className: "_DialogRowSecondaryLabel" }, (0, E.Xx)("#GroupSettings_Channels_HomeChannelDeleteLabel")), !e.IsDefaultRoomForGroup() && t && f.createElement("div", { className: "ChannelDeleteButton", onClick: (t) => this.OnDeleteChannel(t, e) }, (0, E.Xx)("#GroupSettings_Channels_Delete"))), f.createElement(q, { room: e, roomList: r ? i : n, enabled: t })), r = n.map((e) => o(e, 0, !1)), a = i.map((e) => o(e, 0, !0)); return f.createElement( f.Fragment, null, f.createElement(x, null, (0, E.Xx)("#GroupSettings_Channels_Section")), !t && f.createElement(ie, null), f.createElement(v.l0, { className: "DialogBody" }, f.createElement(v.Uq, { className: U().ChannelsButtons }, f.createElement(v.zx, { className: "DialogButtonTall", svgicon: S.MFo, onClick: this.OnCreateNewTextChannel, disabled: !t }, " ", (0, E.Xx)("#GroupSettings_Channels_CreateText"), " "), f.createElement(v.zx, { className: "DialogButtonTall", svgicon: () => S.Cq4({}), onClick: this.OnCreateNewVoiceChannel, disabled: !t }, " ", (0, E.Xx)("#GroupSettings_Channels_CreateVoice"), " ")), f.createElement(v.HV, null, 0 != r.length && f.createElement("div", { className: "displayColumn flexShrinkNone", style: { marginBottom: "32px" } }, f.createElement(v.__, null, (0, E.Xx)("#GroupSettings_Channels_TextChannels")), f.createElement(v.tr, null), r), 0 != a.length && f.createElement("div", { className: "displayColumn flexShrinkNone" }, f.createElement(v.__, null, (0, E.Xx)("#GroupSettings_Channels_VoiceChannels")), f.createElement(v.tr, null), a))), ); } }; (0, i.gn)([D.ak], Z.prototype, "OnCreateNewTextChannel", null), (0, i.gn)([D.ak], Z.prototype, "OnCreateNewVoiceChannel", null), (0, i.gn)([D.ak], Z.prototype, "OnDeleteChannel", null), (Z = (0, i.gn)([C.Pi], Z)); class Q extends f.Component { constructor() { super(...arguments), (this.state = { strRoleName: "" }); } OnSubmit() { let e = this.m_refInput && this.m_refInput.value.trim(); e && 0 != e.length && (this.props.closeModal(), this.props.group.CreateRole(e).catch(() => { (0, h.zp)(this.props.ownerWin, (0, E.Xx)("#Generic_Error"), (0, E.Xx)("#GroupSettings_CreateRole_GenericError")), this.props.closeModal(); })); } HandleTextEntry(e) { this.setState({ strRoleName: e.target.value }); } render() { let e = this.state.strRoleName.length > 0; return f.createElement( p.e1, { onEscKeypress: this.props.closeModal }, f.createElement( v.oX, { classNameContent: "CreateChatChannelDialog", onSubmit: this.OnSubmit }, f.createElement(v.h4, null, (0, E.Xx)("#GroupSettings_CreateRole_Title")), f.createElement( v.uT, null, f.createElement(v.II, { ref: (e) => { this.m_refInput = e; }, autoFocus: !0, label: (0, E.Xx)("#GroupSettings_CreateRole_Description"), value: this.state.strRoleName, onChange: this.HandleTextEntry, }), ), f.createElement(v.$_, null, f.createElement(v.o9, { onCancel: this.props.closeModal, bOKDisabled: !e })), ), ); } } (0, i.gn)([D.ak], Q.prototype, "OnSubmit", null), (0, i.gn)([D.ak], Q.prototype, "HandleTextEntry", null); let $ = class extends f.Component { constructor() { super(...arguments), (this.state = {}), (this.m_topRef = f.createRef()); } OnCreateRole(e) { let t = e.currentTarget.ownerDocument.defaultView; (0, p.BR)(f.createElement(Q, { ownerWin: t, group: this.props.group }), t); } BCanLocalUserEditRole(e) { return this.props.group.BCanIModifyRole(e); } BCanLocalUserAssignRole() { return this.props.group.BCanIAssignRoles(); } EditRole(e) { let t = this.props.group.GetRoleName(e), n = this.props.group.GetRoleActions(e); t && n && this.setState({ editRoleID: e, editRoleName: t, editRoleActions: n }); } DoesRoleGrantPermission(e, t) { return !0; } OnSettingToggled(e, t) { this.props.group.SetRoleAction(this.state.editRoleID, e, t); } MoveRoleUp(e) { let t = this.props.group.GetRoleOrdinal(e), n = Math.max(0, t - 1); this.props.group.ReorderRole(e, n).then((e) => { this.forceUpdate(); }); } MoveRoleDown(e) { let t = this.props.group.GetRoleOrdinal(e) + 1; this.props.group.ReorderRole(e, t).then((e) => { this.forceUpdate(); }); } componentDidUpdate(e, t) { if (this.state.editRoleID !== t.editRoleID && this.m_topRef && this.m_topRef.current) { let e = this.m_topRef.current.parentElement; for (; e; ) { if (e.scrollHeight > e.clientHeight) return void (e.scrollTop = 0); e = e.parentElement; } } } render() { const { group: e } = this.props, { editRoleID: t } = this.state, n = e.BIsAccountIDOwner(c.Ul.CMInterface.steamid.GetAccountID()); let i = e.BIsClanChatRoom(); if (t) return f.createElement("div", { ref: this.m_topRef }, f.createElement(J, { group: e, roleID: t, onRequestClose: () => this.setState({ editRoleID: void 0 }) })); let o = e.DefaultRoleID(), r = e .GetRoles() .slice() .sort((e, t) => (e.role_id == o ? 1 : t.role_id == o ? -1 : e.ordinal - t.ordinal)), s = e.GetHighestRankRoleIDForPermission(c.Ul.FriendStore.self.accountid, 8), l = s ? e.GetRoleOrdinal(s) : Number.MAX_VALUE - 1, m = e.BIsAccountIDOwner(c.Ul.FriendStore.self.accountid), d = !1, h = this.BCanLocalUserAssignRole(), u = r.map((t, n) => { let a = !1, s = this.BCanLocalUserEditRole(t.role_id), h = s && (m || t.ordinal > l + 1) && t.ordinal > 0, u = s && n < r.length - 2; return ( s && (d = !0), t.role_id == o ? ((a = !0), (h = !1), (u = !1)) : e.BMemberHasRole(c.Ul.FriendStore.self.accountid, t.role_id) && (a = !0), f.createElement( "div", { className: "roleRow", key: t.role_id }, f.createElement( v.zx, { className: "roleButton" + (a && !m ? " currentUserRole" : ""), onClick: (e) => { this.EditRole(t.role_id); }, }, f.createElement(S.mKE, null), (0, E.Xx)(t.name), f.createElement("span", { className: "roleSubtitle" }, s ? (0, E.Xx)("#Generic_Edit") : (0, E.Xx)("#Generic_View")), ), !i && d && r.length > 2 && (h || u) && f.createElement( "div", { className: "rolePriorityContainer" }, f.createElement( "div", { className: "rolePriorityButton roleUp" + (h ? "" : " Disabled"), onClick: (e) => { this.MoveRoleUp(t.role_id), e.stopPropagation(); }, }, f.createElement(S.V7n, { angle: 0 }), ), f.createElement( "div", { className: "rolePriorityButton roleDown" + (u ? "" : " Disabled"), onClick: (e) => { this.MoveRoleDown(t.role_id), e.stopPropagation(); }, }, f.createElement(S.V7n, { angle: 180 }), ), ), ) ); }), p = (0, E.Xx)("#ChatRoomRole_Description_NoEdit"); if (i) { let t = A.K.InitFromClanID(e.GetClanID()), n = `${a.De.COMMUNITY_BASE_URL}gid/${t.ConvertTo64BitString()}/membersManage`; p = (0, E.kQ)("#ChatRoomRole_Description_Clan", f.createElement(R.ns, { href: n }, (0, E.Xx)("#ChatRoomRole_Description_ClanLink"))); } else d && !m ? (p = (0, E.Xx)("#ChatRoomRole_Description")) : (h || m) && (p = (0, E.Xx)("#ChatRoomRole_Description_NoEditCanAssign")); return f.createElement( f.Fragment, null, f.createElement("div", { ref: this.m_topRef }), f.createElement(x, null, (0, E.Xx)("#GroupSettings_Permissions_Section")), !n && !d && f.createElement(ie, null, (0, E.Xx)("#Chat_Settings_Permission_Denied_Permissions")), f.createElement( "div", { className: "roleList" }, f.createElement(v.Ac, { className: U().PermissionsDescription }, p), f.createElement("div", { className: U().RoleNameHeader }, f.createElement(v.__, null, (0, E.Xx)("#GroupSettings_Permissions_RolesTitle"), " "), !m && f.createElement(v.__, { className: "meKey" }, f.createElement(S.mKE, null), (0, E.Xx)("#GroupSettings_meKey_Desc")), m && f.createElement(v.__, { className: "meKey" }, f.createElement(S._OD, null), (0, E.Xx)("#GroupSettings_meKey_Desc_Owner"))), f.createElement(v.l0, { className: "DialogBody" }, f.createElement(v.zx, { disabled: !0, className: "roleButton owner", svgicon: S._OD, onClick: () => {} }, (0, E.Xx)("#ChatRoomRole_Owner"), f.createElement("span", { className: "roleSubtitle" }, (0, E.Xx)("#ChatRoomRole_OwnerSubtitle"))), u), !i && f.createElement(v.KM, { className: "createNewRoleButton", svgicon: () => S.FUf({ minus: !1, nocircle: !1 }), onClick: this.OnCreateRole, disabled: !e.BCanICreateRoles() }, (0, E.Xx)("#GroupSettings_Permissions_CreateNew")), ), ); } }; (0, i.gn)([D.ak], $.prototype, "OnCreateRole", null), (0, i.gn)([D.ak], $.prototype, "EditRole", null), (0, i.gn)([D.ak], $.prototype, "OnSettingToggled", null), (0, i.gn)([D.ak], $.prototype, "MoveRoleUp", null), (0, i.gn)([D.ak], $.prototype, "MoveRoleDown", null), ($ = (0, i.gn)([C.Pi], $)); const Y = (e) => { const { eAction: t, strLabel: n, disabled: i, group: o, roleID: r } = e, a = o.GetRoleActions(r), s = a && a.BCanPerformAction(t), [l, c] = f.useState(0); return f.createElement(v.nf, { onChange: (e) => { o.SetRoleAction(r, t, e), c(l + 1); }, label: n, value: s, disabled: i, className: U().PermissionToggle, }); }; let J = class extends f.Component { constructor(e) { super(e), (this.state = { editRoleName: e.group.GetRoleName(e.roleID) }); } OnEditRoleNameChange(e) { this.setState({ editRoleName: e.target.value }); } OnEditRoleNameBlur() { this.RenameRole(); let e = document.getElementById("b1"); e && e.blur(); } RenameRole() { const { roleID: e } = this.props, t = this.state.editRoleName; this.props.group.RenameRole(e, t).catch(() => { this.setState({ editRoleName: this.props.group.GetRoleName(e) }); }); } DeleteRole(e, t) { let n = e.currentTarget.ownerDocument.defaultView; if (t == this.props.group.DefaultRoleID()) return; let i = this.props.group.GetRoleName(t), o = f.createElement("div", { style: { marginTop: "8px", color: "white" } }, i); (0, h.p3)(n, (0, E.Xx)("#GroupSettings_Permissions_ConfirmDeleteTitle"), (0, E.Xx)("#GroupSettings_Permissions_ConfirmDelete"), (0, E.Xx)("#GroupSettings_Permissions_ConfirmDeleteButton"), (0, E.Xx)("#Button_Cancel"), !0, o) .then(() => this.props.group.DeleteRole(t)) .then(() => this.props.onRequestClose()) .catch((e) => { null != e && (0, h.zp)(n, (0, E.Xx)("#Generic_Error"), (0, E.Xx)("#GroupSettings_DeleteRole_GenericError")); }); } render() { const { group: e, roleID: t, onRequestClose: n } = this.props; if (!e.GetRoleActions(t)) return null; let i = e.BIsClanChatRoom(), o = t == e.DefaultRoleID(), r = o && !i ? (0, E.Xx)("#ChatRoomRole_Member") : this.state.editRoleName, a = e.BCanIModifyRole(t); const s = { disabled: !a, group: e, roleID: t }, l = i || !a ? f.createElement("div", { className: (0, L.Z)(U().RoleNameHeader, U().FixedRoleName) }, (0, E.Xx)(r)) : f.createElement("div", { className: U().RoleNameHeader }, f.createElement(v.II, { autoComplete: "off", id: "b1", className: "editRoleName", label: (0, E.Xx)("#GroupSettings_Permissions_RoleName"), type: "text", value: r, disabled: o || !a, onChange: this.OnEditRoleNameChange, onBlur: this.OnEditRoleNameBlur })); return f.createElement( v.l0, { onSubmit: this.OnEditRoleNameBlur, className: U().PermissionsEdit }, f.createElement("div", { className: U().Back, onClick: () => n() }, f.createElement(S.G$j, null), (0, E.Xx)("#GroupSettings_Permissions_BackButton")), !a && f.createElement(ie, null, (0, E.Xx)("#Chat_Settings_Permission_Denied")), l, f.createElement( v.uT, null, f.createElement("div", { className: (0, L.Z)("SettingsGroup", U().PermissionsGroup) }, f.createElement(v.__, { className: "PermissionsSectionHeader" }, (0, E.Xx)("#GroupSettings_Permissions_Heading_General")), f.createElement(Y, Object.assign({}, s, { eAction: 6, strLabel: (0, E.Xx)("#GroupSettings_Permissions_Chat") })), f.createElement(Y, Object.assign({}, s, { eAction: 10, strLabel: (0, E.Xx)("#GroupSettings_Permissions_MentionAll") })), f.createElement(Y, Object.assign({}, s, { eAction: 11, strLabel: (0, E.Xx)("#GroupSettings_Permissions_SetWatchingBroadcast") }))), f.createElement("div", { className: (0, L.Z)("SettingsGroup", U().PermissionsGroup) }, f.createElement(v.__, { className: "PermissionsSectionHeader" }, (0, E.Xx)("#GroupSettings_Permissions_Heading_MembersAndRoles")), f.createElement(Y, Object.assign({}, s, { eAction: 2, strLabel: (0, E.Xx)("#GroupSettings_Permissions_Kick") })), f.createElement(Y, Object.assign({}, s, { eAction: 3, strLabel: (0, E.Xx)("#GroupSettings_Permissions_Ban") })), f.createElement(Y, Object.assign({}, s, { eAction: 4, strLabel: (0, E.Xx)("#GroupSettings_Permissions_Invite") })), f.createElement(Y, Object.assign({}, s, { eAction: 8, strLabel: (0, E.Xx)("#GroupSettings_Permissions_ChangeGroupRoles"), disabled: s.disabled || o })), !i && f.createElement(Y, Object.assign({}, s, { eAction: 9, strLabel: (0, E.Xx)("#GroupSettings_Permissions_ChangeUserRoles"), disabled: s.disabled || o }))), f.createElement("div", { className: (0, L.Z)("SettingsGroup", U().PermissionsGroup) }, f.createElement(v.__, { className: "PermissionsSectionHeader" }, (0, E.Xx)("#GroupSettings_Permissions_Heading_RoomManagement")), f.createElement(Y, Object.assign({}, s, { eAction: 5, strLabel: (0, E.Xx)("#GroupSettings_Permissions_ChangeTaglineAvatarName") })), f.createElement(Y, Object.assign({}, s, { eAction: 1, strLabel: (0, E.Xx)("#GroupSettings_Permissions_CreateRenameDeleteChannel") }))), ), f.createElement( v.$_, null, !i && !o && a && f.createElement( v.zx, { className: "deleteButton", onClick: (e) => { this.DeleteRole(e, t); }, }, (0, E.Xx)("#GroupSettings_Permissions_DeleteRoleButton"), ), ), ); } }; (0, i.gn)([D.ak], J.prototype, "OnEditRoleNameChange", null), (0, i.gn)([D.ak], J.prototype, "OnEditRoleNameBlur", null), (0, i.gn)([D.ak], J.prototype, "RenameRole", null), (0, i.gn)([D.ak], J.prototype, "DeleteRole", null), (J = (0, i.gn)([C.Pi], J)); let ee = class extends f.Component { componentDidMount() { const { group: e, inviteLinks: t } = this.props; if ("loaded" == t.loadingState) return; e.BCanInvite() && "pending" == t.loadingState ? e.GetInviteLinksForGroup().then((e) => { setTimeout(() => { "loaded" == e.loadingState && (t.rgInviteLinks = e.rgInviteLinks.sort((e, t) => e.time_expires() - t.time_expires())), (t.loadingState = e.loadingState); }, 500); }) : (t.loadingState = "denied"); } OnDeleteLink(e) { let t = this.props.inviteLinks, n = f.createElement("div", { style: { marginTop: "5px", color: "#dee2e5" } }, (0, w.V)(e.invite_code())); (0, h.MS)((0, E.Xx)("#GroupSettings_Invite_ConfirmDeleteTitle"), (0, E.Xx)("#GroupSettings_Invite_ConfirmDelete"), (0, E.Xx)("#GroupSettings_Invite_ConfirmDeleteButton"), (0, E.Xx)("#Button_Cancel"), !0, n) .then(() => { this.props.group.DeleteInviteLink(e.invite_code()).then((n) => { (0, M.X)("loaded" == t.loadingState, "somehow got a valid link to delete without links being loaded"); let i = t.rgInviteLinks.findIndex((t) => t.invite_code() == e.invite_code()); i >= 0 && (t.rgInviteLinks.splice(i, 1), console.log("removed link", t.rgInviteLinks)); }); }) .then(() => {}) .catch(() => {}); } FormatExpires(e) { if (e > 2145916800) return (0, E.Xx)("#GroupSettings_Invite_NeverExpires"); return c.Ul.RTime32ToDate(e).toLocaleString([], { year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric" }); } HandleFocus(e) { e.target.select(); } render() { const { inviteLinks: e, group: t } = this.props; let n; const i = t.BCanInvite(); if ("pending" == e.loadingState) n = f.createElement("div", null, f.createElement(b.V, null)); else if ("denied" == e.loadingState) n = f.createElement("div", null, (0, E.Xx)("#GroupSettings_Invite_Denied")); else if ("failed" == e.loadingState) n = f.createElement("div", null, (0, E.Xx)("#GroupSettings_Invite_Failed")); else if ("loaded" == e.loadingState) { let t = []; (t = e.rgInviteLinks.map((e) => f.createElement("tr", { key: e.invite_code() }, f.createElement("td", null, " ", f.createElement(v.II, { className: "inviteURLLink", value: (0, w.V)(e.invite_code()), readOnly: !0, onClick: this.HandleFocus, onFocus: this.HandleFocus }), " "), f.createElement("td", { className: "dateCell allCaps" }, " ", this.FormatExpires(e.time_expires()), " "), f.createElement("td", { className: "buttonCell" }, f.createElement(v.zx, { onClick: (t) => this.OnDeleteLink(e), disabled: !i }, (0, E.Xx)("#GroupSettings_Invite_Delete")))))), (n = 0 == t.length ? f.createElement("div", null, (0, E.Xx)("#GroupSettings_Invite_NoInvites")) : f.createElement("table", { className: "DialogSpanningTable InviteLinksTable" }, f.createElement("thead", null, f.createElement("tr", null, f.createElement("th", { className: "inviteCodeColumn" }, " ", (0, E.Xx)("#GroupSettings_Invite_Code"), " "), f.createElement("th", { className: "dateColumn" }, " ", (0, E.Xx)("#GroupSettings_Invite_Expiration"), " "), f.createElement("th", { className: "buttonColumn" }, " "))), f.createElement("tbody", null, t))); } return f.createElement(f.Fragment, null, f.createElement(x, null, (0, E.Xx)("#GroupSettings_Invite_Section")), !i && f.createElement(ie, null), f.createElement(v.l0, { className: "DialogBody" }, i && f.createElement("div", { className: "inviteLinkContainer" }, f.createElement(d.t4, { chat: t.GetDefaultChatRoom(), disabled: !i })), i && f.createElement("div", { className: "OrSeparator" }, f.createElement(v.tr, null)), n)); } }; (0, i.gn)([D.ak], ee.prototype, "OnDeleteLink", null), (0, i.gn)([D.ak], ee.prototype, "HandleFocus", null), (ee = (0, i.gn)([C.Pi], ee)); let te = class extends f.Component { componentDidMount() { let e = this.props.invitedUsers; if ("loaded" == e.loadingState) return; let t = this.props.group; "pending" == e.loadingState && t.GetInvitedUsersForGroup().then((t) => { setTimeout(() => { "loaded" == t.loadingState && (e.rgInvitedUsers = t.rgInvitedUsers.sort((e, t) => e.time_invited() - t.time_invited())), (e.loadingState = t.loadingState); }, 500); }); } RevokeInvite(e, t) { let n = c.Ul.FriendStore.GetPlayer(t), i = e.currentTarget.ownerDocument.defaultView, o = f.createElement(u.mo, { className: "friend", friend: n, context: null, disableContextMenu: !0 }); (0, h.p3)(i, (0, E.Xx)("#GroupSettings_InvitedUsers_RevokeTitle"), (0, E.Xx)("#GroupSettings_InvitedUsers_RevokeBody"), (0, E.Xx)("#GroupSettings_InvitedUsers_RevokeConfirm"), (0, E.Xx)("#Button_Cancel"), !0, o) .then(() => { this.props.group .RevokeInvite(t) .then(() => { y.Qf(this.props.invitedUsers.rgInvitedUsers, (e) => e.accountid() === t); }) .catch((e) => { (0, h.zp)(i, (0, E.Xx)("#Generic_Error"), (0, E.Xx)("#GroupSettings_InvitedUsers_RevokeGenericError")); }); }) .catch(() => {}); } FormatDate(e) { return c.Ul.RTime32ToDate(e).toLocaleString([], { year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric" }); } RenderContent() { const { invitedUsers: e, group: t } = this.props, n = t.BCanInvite(); if ("loaded" == e.loadingState) { if (!e.rgInvitedUsers || 0 == e.rgInvitedUsers.length) return f.createElement(v.l0, null, (0, E.Xx)("#GroupSettings_InvitedUsers_Noone")); let t = e.rgInvitedUsers.map((e) => { var t; let i = { friend: c.Ul.FriendStore.GetPlayer(e.accountid()), bHideGameName: !0, bHidePersona: !0, noActions: null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI, context: null }; return f.createElement("tr", { className: "hoverRow", key: e.accountid() }, f.createElement("td", { className: "friendCell" }, " ", f.createElement(u.mo, Object.assign({}, i)), " "), f.createElement("td", { className: "dateCell" }, " ", this.FormatDate(e.time_invited()), " "), f.createElement("td", { className: "buttonCell" }, f.createElement(v.zx, { onClick: (t) => this.RevokeInvite(t, e.accountid()), disabled: !n }, (0, E.Xx)("#GroupSettings_InvitedUsers_RevokeInvite")))); }); return f.createElement(v.l0, { className: "DialogBody" }, f.createElement(_.s, { "flow-children": "grid" }, f.createElement("table", { className: "DialogSpanningTable InvitedUsersTable" }, f.createElement("thead", null, f.createElement("tr", { className: "headerRow" }, f.createElement("th", { className: "friendColumn" }, (0, E.Xx)("#GroupSettings_InvitedUsers_InvitedHeader"), " "), f.createElement("th", { className: "dateColumn" }, " ", (0, E.Xx)("#GroupSettings_InvitedUsers_InvitedDate"), " "), f.createElement("th", { className: "buttonColumn" }, " "))), f.createElement("tbody", null, t)))); } return f.createElement(v.l0, null, "pending" == e.loadingState ? f.createElement(b.V, { size: "medium" }) : (0, E.Xx)("#GroupSettings_InvitedUsers_Failed")); } render() { const { group: e } = this.props, t = e.BCanInvite(); return f.createElement(f.Fragment, null, f.createElement(x, null, (0, E.Xx)("#GroupSettings_InvitedUsers_Section")), !t && f.createElement(ie, null), this.RenderContent()); } }; (te.contextType = V.E_), (0, i.gn)([D.ak], te.prototype, "RevokeInvite", null), (te = (0, i.gn)([C.Pi], te)); let ne = class extends f.Component { componentDidMount() { let e = this.props.group, t = this.props.bans; "pending" == t.loadingState && e.GetBanList().then((e) => { setTimeout(() => { (t.rgBans = e.rgBans), (t.loadingState = e.loadingState); }, 500); }); } OnClickUnban(e, t) { let n = c.Ul.FriendStore.GetPlayer(t), i = e.currentTarget.ownerDocument.defaultView, o = f.createElement(u.mo, { className: "friend", friend: n, context: null, disableContextMenu: !0 }); (0, h.p3)(i, (0, E.Xx)("#GroupSettings_Bans_UnbanTitle"), (0, E.Xx)("#GroupSettings_Bans_UnbanBody", n.display_name), (0, E.Xx)("#GroupSettings_Bans_UnbanConfirm"), (0, E.Xx)("#Button_Cancel"), !0, o) .then(() => { this.props.group .SetUserBanState(t, !1) .then(() => { y.Qf(this.props.bans.rgBans, (e) => e.accountid() === t); }) .catch((e) => { (0, h.zp)(i, (0, E.Xx)("#Generic_Error"), (0, E.Xx)("#GroupSettings_Bans_UnbanGenericError")); }); }) .catch(() => {}); } FormatDate(e) { return c.Ul.RTime32ToDate(e).toLocaleString([], { year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric" }); } RenderContent() { const { bans: e } = this.props; let t; if ("loaded" == e.loadingState) return 0 == e.rgBans.length ? f.createElement(v.l0, null, (0, E.Xx)("#GroupSettings_Bans_NoOneBanned")) : ((t = e.rgBans.map((e) => { var t; let n = { friend: c.Ul.FriendStore.GetPlayer(e.accountid()), noActions: null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI, context: null }; return f.createElement("tr", { className: "hoverRow", key: e.accountid() }, f.createElement("td", { className: "friendCell" }, " ", f.createElement(u.mo, Object.assign({}, n)), " "), f.createElement("td", { className: "dateCell" }, " ", this.FormatDate(e.time_banned()), " "), f.createElement("td", { className: "buttonCell" }, " ", f.createElement(v.zx, { onClick: (t) => this.OnClickUnban(t, e.accountid()) }, (0, E.Xx)("#GroupSettings_Bans_RevokeBan")))); })), f.createElement(v.l0, { className: "DialogBody" }, f.createElement("table", { className: "DialogSpanningTable BannedUsersTable" }, f.createElement("thead", null, f.createElement("tr", { className: "headerRow" }, f.createElement("th", { className: "friendColumn" }, (0, E.Xx)("#GroupSettings_Bans_InvitedHeader"), " "), f.createElement("th", { className: "dateColumn" }, " ", (0, E.Xx)("#GroupSettings_Bans_BannedDate"), " "), f.createElement("th", { className: "buttonColumn" }, " "))), f.createElement("tbody", null, t)))); { let t; return (t = "pending" == e.loadingState ? f.createElement(b.V, { size: "medium" }) : "denied" == e.loadingState ? (0, E.Xx)("#GroupSettings_Bans_AccessDenied") : (0, E.Xx)("#GroupSettings_Bans_Failed")), f.createElement(v.l0, { className: "DialogBody" }, t); } } render() { const { group: e } = this.props, t = e.BCanBan(); return f.createElement(f.Fragment, null, f.createElement(x, null, (0, E.Xx)("#GroupSettings_Bans_Section")), !t && f.createElement(ie, null), this.RenderContent()); } }; (ne.contextType = V.E_), (0, i.gn)([D.ak], ne.prototype, "OnClickUnban", null), (ne = (0, i.gn)([C.Pi], ne)); const ie = (e) => f.createElement("div", { className: U().Notification }, f.createElement(S.HEZ, null), e.children || (0, E.Xx)("#Chat_Settings_Permission_Denied")); }, 85516: (e, t, n) => { "use strict"; n.d(t, { Uu: () => f, nP: () => v }); var i = n(85556), o = n(27378), r = n(19953), a = n(11259), s = n(37234), l = n(68816), c = n(83817), m = n(84290), d = n(2049), h = n(72746), u = n(50649), p = n(7098), _ = n(93635), g = n(65040), C = n.n(g); function f(e, t) { let n = t.GetGroup().textRoomList.length; n > 7 && (n = 7); let i = 60 * n; n < 2 && (i -= 32), (0, l.BR)(o.createElement(S, { group: t.GetGroup() }), e, "ChatRoomGroupNotificationSettings", { strTitle: (0, m.Xx)("#NotificationSettings_Title"), popupWidth: 600, popupHeight: 348 + i }, (0, s.Og)(e)); } function v(e = !0) { let t = []; return ( e && (t = t.concat([{ label: o.createElement("span", { className: "ChannelSpecificNotificationSettings_Inherit" }, (0, m.Xx)("#NotificationSetting_Inherit")), data: 0 }])), (t = t.concat([ { label: (0, m.Xx)("#NotificationSetting_AllMessages"), data: 4 }, { label: (0, m.Xx)("#NotificationSetting_AnyMention", h.Ul.FriendStore.self.display_name), data: 3 }, { label: (0, m.Xx)("#NotificationSetting_DirectMention", h.Ul.FriendStore.self.display_name), data: 2 }, { label: (0, m.Xx)("#NotificationSetting_None"), data: 1 }, ])), t ); } let S = class extends o.Component { constructor(e) { super(e), (this.m_rgSelectOptions = v(!1)), (this.state = { cSavesInFlight: 0 }); } IncrementSavesInFlight() { this.setState((e) => ({ cSavesInFlight: e.cSavesInFlight + 1 })); } DecrementSavesInFlight() { this.setState((e) => ((0, _.X)(e.cSavesInFlight > 0, `expected ${e.cSavesInFlight} > 0`), { cSavesInFlight: e.cSavesInFlight - 1 })); } WrapSavePromise(e) { this.IncrementSavesInFlight(), e.then(this.DecrementSavesInFlight, this.DecrementSavesInFlight); } OnGroupNotificationLevelChanged(e) { this.WrapSavePromise(this.props.group.SetNotificationPreferences(e)); } OnShowUnreadIndicatorChanged(e) { this.WrapSavePromise(this.props.group.SetNotificationPreferences(void 0, void 0, e)); } DismissDialog() { this.props.closeModal(); } OnFriendsSettingsClicked(e) { (0, p.L)((0, s.Um)(this, e), e.currentTarget.ownerDocument.defaultView); } render() { var e; let t, n = this.props.group, i = n.chatRoomList.filter((e) => e.BShouldTrackUnreadMessages()), r = i.length > 0; if ((1 == i.length && 0 == i[0].GetDesktopNotificationLevelSetting() && 0 == i[0].GetMobileNotificationLevelsetting() && (r = !1), r)) { let e = i.map((e) => o.createElement(b, { fnHandleSave: this.WrapSavePromise, group: n, chat: e, key: e.unique_id })); t = o.createElement(o.Fragment, null, o.createElement("div", { className: "notificationsChannelListContainer" }, e)); } return o.createElement( l.e1, { onEscKeypress: this.DismissDialog }, o.createElement( a.oX, { classNameContent: "ChatRoomNotificationSettingsDialog" }, o.createElement(a.h4, null, (0, m.Xx)("#NotificationSettings_Title")), o.createElement(a.__, null, (0, m.kQ)("#NotificationSettings_SubTitle", o.createElement("span", { className: "whiteText" }, n.name))), o.createElement(a.uT, null, o.createElement(a.__, { className: "NotificationSettingsSavingIndicator " + (this.state.cSavesInFlight ? "Saving" : "") }, (0, m.Xx)("#GroupSettings_Permissions_Saving"), "..."), o.createElement(I, { drop_down_options: this.m_rgSelectOptions, get_notification_level: (e) => n.GetDesktopNotificationLevel(e), set_notification_level: this.OnGroupNotificationLevelChanged, get_muted: () => n.BIsUnreadIndicatorMuted(), set_muted: this.OnShowUnreadIndicatorChanged }), r && o.createElement(o.Fragment, null, o.createElement(a.tr, null), o.createElement(a.Uq, { className: "notificationsChannelHeader" }, o.createElement(a.__, { className: "NotificationChannelNameLabel" }, (0, m.Xx)("#GroupSettings_Channels_TextChannels")), o.createElement(a.__, { className: "OverrideChannelLabel" }, (0, m.Xx)("#NotificationSetting_ShortLabel"))), o.createElement(a.HV, { className: C().scrollMaskVertical }, t))), o.createElement(a.$_, null, !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && (0, m.kQ)("#NotificationSetting_Footer_Desc2", o.createElement("span", { className: "textLink", onClick: this.OnFriendsSettingsClicked }, (0, m.Xx)("#Settings"))), o.createElement(c.s, { className: "_DialogColLayout", "flow-children": "row" }, o.createElement(a.KM, { onClick: this.props.closeModal }, (0, m.Xx)("#Button_Close")))), ), ); } }; (S.contextType = r.E_), (0, i.gn)([d.ak], S.prototype, "IncrementSavesInFlight", null), (0, i.gn)([d.ak], S.prototype, "DecrementSavesInFlight", null), (0, i.gn)([d.ak], S.prototype, "WrapSavePromise", null), (0, i.gn)([d.ak], S.prototype, "OnGroupNotificationLevelChanged", null), (0, i.gn)([d.ak], S.prototype, "OnShowUnreadIndicatorChanged", null), (0, i.gn)([d.ak], S.prototype, "DismissDialog", null), (0, i.gn)([d.ak], S.prototype, "OnFriendsSettingsClicked", null), (S = (0, i.gn)([u.Pi], S)); let b = class extends o.Component { constructor() { super(...arguments), (this.m_rgSelectOptions = v()); } OnChatNotificationLevelChanged(e) { this.props.fnHandleSave(this.props.chat.SetNotificationPreferences(e.data)); } render() { var e; let t = this.props.chat; t.GetDesktopNotificationLevelSetting(); return (null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) ? o.createElement(c.s, { className: "notificationsChannel", "flow-children": "column" }, o.createElement(a.ry, { layout: "inline", label: t.name, rgOptions: this.m_rgSelectOptions, selectedOption: t.GetDesktopNotificationLevelSetting(), onChange: this.OnChatNotificationLevelChanged })) : o.createElement(a.Uq, { className: "notificationsChannel" }, o.createElement("div", { className: "NotificationChannelName" }, t.name), o.createElement(a.ry, { rgOptions: this.m_rgSelectOptions, selectedOption: t.GetDesktopNotificationLevelSetting(), onChange: this.OnChatNotificationLevelChanged })); } }; (b.contextType = r.E_), (0, i.gn)([d.ak], b.prototype, "OnChatNotificationLevelChanged", null), (b = (0, i.gn)([u.Pi], b)); let I = class extends o.Component { OnNotificationLevelChanged(e) { this.props.set_notification_level(e.data); } OnShowUnreadIndicatorChanged(e) { this.props.set_muted(!e); } render() { let e = this.props.get_notification_level(!0); this.props.bIsDefault && 0 == e && (e = 4); let t = this.props.get_notification_level(); return ( this.props.bIsDefault && 0 == t && (t = 4), o.createElement( "div", { className: "ChatRoomNotificationSettingsDialog" }, o.createElement("div", { className: "notificationGeneralHeader" + (this.props.bIsDefault ? " isDefault" : "") }, o.createElement(a.__, null, this.props.bIsDefault ? (0, m.Xx)("#NotificationSetting_DefaultLabel") : (0, m.Xx)("#NotificationSetting_Label"))), o.createElement("div", { style: { marginBottom: 16 } }, o.createElement("div", { className: "notificationRow" }, o.createElement(a.ry, { rgOptions: this.props.drop_down_options, selectedOption: e, onChange: this.OnNotificationLevelChanged })), 4 != t && o.createElement("div", { className: "indicatorOptionContainer" }, o.createElement(a.gE, { className: "indicatorOption", label: (0, m.Xx)("#NotificationSetting_Indicator"), onChange: this.OnShowUnreadIndicatorChanged, checked: !this.props.get_muted() }), o.createElement("div", { className: "ChatUnreadMessageIndicator" + (this.props.get_muted() ? " Hidden" : "") }, o.createElement("div", { className: "chatUnreadCircle" })))), ) ); } }; (0, i.gn)([d.ak], I.prototype, "OnNotificationLevelChanged", null), (0, i.gn)([d.ak], I.prototype, "OnShowUnreadIndicatorChanged", null), (I = (0, i.gn)([u.Pi], I)); }, 97720: (e, t, n) => { "use strict"; n.d(t, { KG: () => b, bI: () => v, l8: () => S }); var i = n(85556), o = n(72746), r = n(50649), a = n(68816), s = n(27378), l = n(23346), c = n(2049), m = n(84290), d = n(11259), h = n(83817), u = n(94623), p = n(37234), _ = n(88669), g = n(46057), C = n(16518), f = n(71357); function v(e, t, n, i = !1, o) { (0, a.BR)(s.createElement(b, { browserContext: e, chatViewToReplace: n, bHideChatNameEntry: i, vecInvitePlayers: o }), t, "CreateChatDialog", { strTitle: (0, m.Xx)("#Chat_CreateChatRoom"), popupWidth: 664, popupHeight: 580 }, (0, p.Og)(t)); } function S(e, t, n, i) { let r = (0, p.rb)(e), a = o.Ul.ChatStore.FindNamelessChatGroupWithFriends(n); a ? o.Ul.UIStore.ReplaceFriendChatWithGroup(r, t, a) : o.Ul.ChatStore.CreateChatRoomGroup(r, "", n, i) .then((e) => { o.Ul.UIStore.GetPerContextChatData(r); let n = o.Ul.ChatStore.GetChatRoomGroup(e); n && o.Ul.UIStore.ReplaceFriendChatWithGroup(r, t, n); }) .catch(() => { (0, f.zp)(e, (0, m.Xx)("#Generic_Error"), (0, m.Xx)("#Chat_CreateChatRoom_GenericError")); }); } let b = class extends s.Component { constructor(e) { super(e); const t = e.vecInvitePlayers ? e.vecInvitePlayers.map((e) => o.Ul.FriendStore.GetPlayer(e)) : []; this.state = { strCurrentNameEntry: "", strError: void 0, bCreateInFlight: !1, rgSelectedFriends: t }; } HandleTextEntry(e) { this.setState({ strCurrentNameEntry: e.target.value }); } HandleSubmit(e) { if ((e && e.preventDefault(), this.state.bCreateInFlight)) return; let t = (0, _.RA)(e); this.setState((e) => (e.bCreateInFlight || this.InternalDoSubmit(t), { bCreateInFlight: !0 })); } InternalDoSubmit(e) { const t = this.state.rgSelectedFriends.map((e) => e.persona.m_steamid.ConvertTo64BitString()); let n = this.props.chatViewToReplace; if (n) { let i = new l.Xp(this.props.chatViewToReplace.chat.accountid_partner); return t.push(i.persona.m_steamid.ConvertTo64BitString()), S(e, n, t), void this.props.closeModal(); } let i = this.props.bHideChatNameEntry ? "" : this.state.strCurrentNameEntry; o.Ul.ChatStore.CreateChatRoomGroup(this.props.browserContext, i, t, this.props.creationOptions) .then((e) => { this.props.closeModal(); }) .catch(() => { this.setState({ strError: (0, m.Xx)("#Chat_CreateChatRoom_GenericError"), bCreateInFlight: !1 }); }); } IsChatRoomNameValid() { return this.state.strCurrentNameEntry.length > 0; } render() { let e = this.props.chatViewToReplace ? this.props.chatViewToReplace.chat.chat_partner : null, t = (0, m.Xx)("#Chat_CreateChatRoom_Button"); const n = this.state.rgSelectedFriends.length > 0; let i = new Set(); this.props.chatViewToReplace && i.add(this.props.chatViewToReplace.chat.accountid_partner); let o = !1; this.state.bCreateInFlight ? ((o = !1), (t = (0, m.Xx)("#GroupSettings_Permissions_Saving"))) : e ? (o = this.state.rgSelectedFriends.length > 0) : ((o = this.IsChatRoomNameValid() || n), this.IsChatRoomNameValid() && !n ? (t = (0, m.Xx)("#Chat_CreateChatRoom_Button")) : n && !this.IsChatRoomNameValid() ? (t = (0, m.Xx)("#Chat_CreateChatRoom_InviteFriends")) : n && this.IsChatRoomNameValid() && (t = (0, m.Xx)("#Chat_CreateChatRoom_Button_wFriends"))); const r = this.props.strTitle || (e ? (0, m.Xx)("#Chat_CreateChatRoom_InviteFriends") : (0, m.Xx)("#Chat_CreateChatRoom")); return s.createElement( a.e1, { onEscKeypress: this.props.closeModal }, s.createElement( d.oX, { classNameContent: "CreateChatDialog", onSubmit: this.HandleSubmit }, s.createElement(d.h4, null, r), s.createElement( d.uT, null, e && s.createElement(d.Ac, null, s.createElement("span", null, (0, m.Xx)("#Chat_CreateChatRoom_With"), s.createElement("span", { className: "DialogHighlight" }, (0, m.Xx)("#Chat_CreateChatRoom_You")), (0, m.Xx)("#Chat_CreateChatRoom_And"), s.createElement("span", { className: "DialogHighlight" }, e.display_name))), this.state.strError && s.createElement(d.Ac, { className: "nicknameError" }, this.state.strError), !this.props.bHideChatNameEntry && s.createElement(d.II, { type: "text", label: (0, m.Xx)("#Chat_Settings_Room_Name"), className: "nicknameInput", value: this.state.strCurrentNameEntry, onChange: this.HandleTextEntry, autoFocus: !0 }), s.createElement(u.B, { label: (0, m.Xx)("#Chat_DropToInviteGroup"), eSort: 1, autoFocus: this.props.bHideChatNameEntry, renderChosenFriend: I, excludeFriend: (e) => i.has(e.accountid), onChange: (e) => this.setState({ rgSelectedFriends: e }), rgPickedFriends: this.state.rgSelectedFriends }), ), s.createElement(d.$_, null, s.createElement(d.o9, { strOKText: t, onCancel: this.props.closeModal, bOKDisabled: !o })), ), ); } }; (0, i.gn)([c.ak], b.prototype, "HandleTextEntry", null), (0, i.gn)([c.ak], b.prototype, "HandleSubmit", null), (b = (0, i.gn)([r.Pi], b)); let I = (0, r.Pi)((e) => s.createElement( s.Fragment, null, s.createElement( g.yd, { friend: e.friend, context: null }, s.createElement( h.s, { className: "FriendPicker_ChosenFriend", onClick: () => { e.onClick(e.friend); }, }, s.createElement("span", null, e.friend.display_name), s.createElement(C.pVO, null), ), ), ), ); }, 94623: (e, t, n) => { "use strict"; n.d(t, { B: () => S }); var i = n(27378), o = n(83817), r = n(56666), a = n(23346), s = n(72746), l = n(46057), c = n(11259), m = n(84290), d = n(16518), h = n(87018), u = n(5651), p = n(8070), _ = n(10553), g = n(2049), C = n(62860), f = n(52112), v = n.n(f); const S = (e) => { const { label: t, eSort: n, onChange: d, rgPickedFriends: f, excludeFriend: S, autoFocus: I, bDropInvite: y, renderChosenFriend: E } = e, D = (0, _.id)(), [w, R] = (0, i.useState)(""), [A, M] = (0, i.useState)(null), k = (t) => { e.onFriendPicked && e.onFriendPicked(t), d && d(f.concat(t)), R(""); }, T = (t) => { if ((e.onFriendUnpicked && e.onFriendUnpicked(t), d)) { const e = f.findIndex((e) => e.accountid === t.accountid); -1 !== e && d(f.slice(0, e).concat(f.slice(e + 1))); } }, L = (0, i.useMemo)(() => { const e = s.Ul.FriendStore.all_friends.filter((e) => (!S || !S(e)) && !f.some((t) => t.accountid === e.accountid)), t = s.Ul.ChatStore.FriendChatStore; if (0 === n) e.sort((e, n) => { let i = t.GetFriendLastChatTime(n.accountid) - t.GetFriendLastChatTime(e.accountid); return 0 !== i ? i : a.Xp.DefaultFriendSortComparator(e, n); }); else e.sort((e, t) => e.display_name.localeCompare(t.display_name)); return e; }, [S, n, f]), G = (0, i.useMemo)(() => { const e = w && w.trim().toLocaleLowerCase(), t = []; for (let n = 0; n < L.length && t.length < 500; n++) { const i = L[n]; (e && !i.BMatchesSearchString(e, !1)) || t.push(i); } return t; }, [w, L]); i.useEffect(() => { M(G.length > 0 && w.length > 0 ? G[0] : null); }, [G]); const O = (0, i.useCallback)( (e) => { e && !D && e.scrollIntoView({ behavior: "auto", block: "nearest" }); }, [D], ), F = () => { const e = f[f.length - 1]; e && T(e); }, B = f.length > 0, [x, N] = i.useState(!1), P = (0, h.Z)("FriendPicker", B && "FriendPicker_FriendsChosen", x && "FriendPicker_Focus"), U = E || b, V = f.map((e) => i.createElement(U, { friend: e, key: e.accountid, onClick: () => T(e) })), H = i.useRef(), W = G.map((e, t) => { const n = !D && e == A, r = (0, h.Z)("FriendPicker_SuggestedFriend", n && "Focus"); return i.createElement( o.s, { className: r, onActivate: () => k(e), onMouseUp: () => { var t; M(e), null === (t = H.current) || void 0 === t || t.Focus(); }, key: e.accountid, "data-index": t, ref: n ? O : void 0, }, i.createElement(l.mo, { noActions: !0, friend: e, context: null }), ); }), X = i.useRef(); i.useLayoutEffect(() => { var e; null === (e = X.current) || void 0 === e || e.scrollTo({ top: 0, behavior: "auto" }); }, [G]); const j = (function () { const e = i.useRef(), [t, n] = i.useState(!0), [o, r] = i.useState(!1), a = () => { const i = e.current, a = null == i || i.scrollTop <= 1; a != t && n(a); const s = null == i || i.scrollHeight - i.scrollTop <= i.clientHeight + 1; s != o && r(s); }, s = (0, h.Z)(v().ScrollFade, t && v().ScrolledToTop, o && v().ScrolledToBottom); return i.useLayoutEffect(a), { refForScrollable: e, strClassNamesForScrollable: s, fnOnScroll: a }; })(), { strMinHeightStyle: z, refForResizeObserver: K } = (0, g.$T)(), q = (0, g.BE)(X, j.refForScrollable); return i.createElement( o.s, { className: P, onSecondaryButton: F }, i.createElement( c.Uo, { onChange: ({ currentTarget: { value: e } }) => R(e), onKeyDown: (e) => { if (13 === e.keyCode) ((!D && e.currentTarget.value.trim().length) || null != A) && (e.preventDefault(), A && k(A)); else if (8 === e.keyCode && 0 === e.currentTarget.selectionEnd && f.length > 0) e.preventDefault(), F(); else if (!D && (38 == e.keyCode || 40 == e.keyCode || 34 == e.keyCode || 33 == e.keyCode) && G.length > 0) { e.preventDefault(); const t = G.findIndex((e) => e == A); let n; 38 == e.keyCode ? (n = t - 1) : 33 == e.keyCode ? (n = Math.max(0, t - 5)) : 34 == e.keyCode ? (n = Math.min(G.length - 1, t + 5)) : 40 == e.keyCode && (n = t + 1), n < 0 ? (n = 0) : n > G.length - 1 && (n = G.length - 1), M(G[n]); } }, onFocus: () => N(!0), onBlur: () => N(!1), label: t, value: w, placeholder: B ? "" : (0, m.Xx)("#FriendPicker_StartTyping"), autoFocus: I, focusOnMount: !D && I, ref: H, }, V, ), y && i.createElement("div", { className: "DialogLabel" }, (0, m.Xx)("#Chat_InviteFriends_DropInvite")), i.createElement(r.eh, { className: "FriendPickerFriendList", style: { minHeight: D ? void 0 : z }, ref: K }, i.createElement("div", { className: "insetShadow verticalInsetShadow" }), i.createElement(u.P8, { ref: q, onGamepadDirection: (e) => e.detail.is_repeat, onScroll: j.fnOnScroll, className: (0, h.Z)("FriendPickerScrollPanel", j.strClassNamesForScrollable), scrollIntoViewType: C.mz.NoTransform }, i.createElement(p.e, null, W))), ); }, b = (e) => i.createElement( l.yd, { friend: e.friend, context: null }, i.createElement( o.s, { className: "FriendPicker_ChosenFriend", onActivate: () => { e.onClick(e.friend); }, }, i.createElement("span", null, e.friend.display_name), i.createElement(d.pVO, null), ), ); }, 97224: (e, t, n) => { "use strict"; n.d(t, { Ao: () => i, UD: () => b, a$: () => I, fR: () => S, gy: () => f }); var i, o = n(85556), r = n(27378), a = n(11259), s = n(19953), l = n(50649), c = n(2049), m = n(84290), d = n(70215), h = n(29205), u = n(3571), p = n(88991), _ = n(37234), g = n(72746), C = n(14341); class f extends r.Component { constructor(e) { super(e), (this.m_bSettingsChanged = !1), (this.m_bCommunityPreferencesChanged = !1), (this.state = { friendSettings: Object.assign({}, e.friendsSettingsInitial), communityPreferences: Object.assign({}, e.communityPreferencesInitial) }); } componentDidUpdate(e) { let t = {}; const { friendsSettingsInitial: n, communityPreferencesInitial: i } = this.props; for (let i of Object.keys(n)) n[i] != e.friendsSettingsInitial[i] && (t[i] = n[i]); let o = {}; for (let t of Object.keys(i)) i[t] != e.communityPreferencesInitial[t] && (o[t] = i[t]); Object.keys(t).length && this.setState({ friendSettings: Object.assign(Object.assign({}, this.state.friendSettings), t) }), Object.keys(o).length && this.setState({ communityPreferences: Object.assign(Object.assign({}, this.state.communityPreferences), o) }), this.props.bSubmitImmediate && (this.m_bSettingsChanged || this.m_bCommunityPreferencesChanged) && this.props.onSubmit(this.state.friendSettings, this.state.communityPreferences), (this.m_bSettingsChanged = !1), (this.m_bCommunityPreferencesChanged = !1); } OnSubmit() { this.props.onSubmit(this.state.friendSettings, this.state.communityPreferences), (this.m_bSettingsChanged = !1), (this.m_bCommunityPreferencesChanged = !1); } HandleRadioChange(e) { this.setState({ friendSettings: Object.assign(Object.assign({}, this.state.friendSettings), { nChatFlashMode: parseInt(e.currentTarget.value) }) }), (this.m_bSettingsChanged = !0); } OnSettingToggled(e, t) { this.setState({ friendSettings: Object.assign(Object.assign({}, this.state.friendSettings), { [e]: t }) }), (this.m_bSettingsChanged = !0); } OnCommunityPreferenceToggled(e, t) { this.setState({ communityPreferences: Object.assign(Object.assign({}, this.state.communityPreferences), { [e]: t }) }), (this.m_bCommunityPreferencesChanged = !0); } FriendsSettingsToggleRow(e) { return r.createElement(a.gE, { key: e.strName, onChange: (t) => { this.OnSettingToggled(e.strName, t); }, label: e.strLabel, checked: !!this.state.friendSettings[e.strName], description: e.strDesc ? e.strDesc : "", }); } FriendsSettingsCheckbox(e) { return r.createElement(a.ji, { key: e.strName, onChange: (t) => { this.OnSettingToggled(e.strName, t); }, checked: !!this.state.friendSettings[e.strName], }); } FriendsSettingsCommunityPreferenceToggleRow(e) { return r.createElement( a.gE, { key: "CommunityPreference" + e.strName, onChange: (t) => { this.OnCommunityPreferenceToggled(e.strName, t); }, label: e.strLabel, checked: !!this.state.communityPreferences[e.strName], description: e.strDesc ? e.strDesc : "", }, e.children, ); } SettingLink(e) { return r.createElement("div", { className: "_DialogInputContainer _DialogLayout" }, r.createElement("div", { className: "displayColumn alignSelfCenter" }, r.createElement("div", { className: "DialogToggle_Label" }, r.createElement(C.ns, { href: e.strLink }, e.strLabel)), e.strDesc && r.createElement("div", { className: "DialogToggle_Description" }, e.strDesc), this.props.children)); } } (0, o.gn)([c.ak], f.prototype, "OnSubmit", null), (0, o.gn)([c.ak], f.prototype, "HandleRadioChange", null), (0, o.gn)([c.ak], f.prototype, "OnSettingToggled", null), (0, o.gn)([c.ak], f.prototype, "OnCommunityPreferenceToggled", null), (0, o.gn)([c.ak], f.prototype, "FriendsSettingsToggleRow", null), (0, o.gn)([c.ak], f.prototype, "FriendsSettingsCheckbox", null), (0, o.gn)([c.ak], f.prototype, "FriendsSettingsCommunityPreferenceToggleRow", null), (0, o.gn)([c.ak], f.prototype, "SettingLink", null), (function (e) { (e[(e.k_EChatFontSizeSmall = 1)] = "k_EChatFontSizeSmall"), (e[(e.k_EChatFontSizeDefault = 2)] = "k_EChatFontSizeDefault"), (e[(e.k_EChatFontSizeLarge = 3)] = "k_EChatFontSizeLarge"); })(i || (i = {})); class v extends r.Component { render() { let e = this.props.bParenthesizeNicknames, t = (0, m.Xx)("#FriendSettings_ExampleFriend"), n = (0, m.Xx)("#FriendSettings_ExampleNickname"), i = new d.Pv(new p.K()); return (i.m_strPlayerName = t), (i.m_ePersonaState = 1), (i.m_strAvatarHash = d.WV), r.createElement("div", { className: "friend online friendSettingsFakeFriend" }, r.createElement(h.vV, { className: "fakeFriendAvatar", persona: i, statusPosition: "right" }), r.createElement(u.o, { className: "labelHolder", persona: i, eFriendRelationship: 3, bIsSelf: !1, strNickname: n, bParenthesizeNicknames: e, bCompactView: !1 })); } } let S = class extends f { constructor(e) { super(e); } SetChatFontSize(e) { this.setState({ friendSettings: Object.assign(Object.assign({}, this.state.friendSettings), { nChatFontSize: e }) }), (this.m_bSettingsChanged = !0); } render() { let e = this.FriendsSettingsToggleRow, t = this.state.friendSettings.nChatFontSize; return r.createElement( a.l0, { className: "DialogBody", onSubmit: this.OnSubmit }, r.createElement( "div", { className: "SettingsGroup" }, r.createElement(e, { strName: "bCompactFriendsList", strLabel: (0, m.Xx)("#FriendSettings_CompactFriendsAndChat") }), r.createElement(e, { strName: "bCompactQuickAccess", strLabel: (0, m.Xx)("#FriendSettings_CompactQuickAccess") }), r.createElement(a.__, { className: "friendSettingsSubheader" }, (0, m.Xx)("#FriendSettings_ChatFontSize")), r.createElement(a.FT, { className: "FriendsSettingsChatFontSizeSection_ButtonRow" }, r.createElement(a.zx, { className: "smallFontSetting " + (t == i.k_EChatFontSizeSmall ? "Primary" : "Off"), onClick: () => this.SetChatFontSize(i.k_EChatFontSizeSmall) }, (0, m.Xx)("#FriendSetting_ChatFontSmall")), r.createElement(a.zx, { className: "defaultFontSetting " + (t == i.k_EChatFontSizeDefault ? "Primary" : "Off"), onClick: () => this.SetChatFontSize(i.k_EChatFontSizeDefault) }, (0, m.Xx)("#FriendSetting_ChatFontDefault")), r.createElement(a.zx, { className: "largeFontSetting " + (t == i.k_EChatFontSizeLarge ? "Primary" : "Off"), onClick: () => this.SetChatFontSize(i.k_EChatFontSizeLarge) }, (0, m.Xx)("#FriendSetting_ChatFontLarge"))), ), !this.props.bSubmitImmediate && r.createElement(a.o9, { onCancel: this.props.onCancel }), ); } }; (0, o.gn)([c.ak], S.prototype, "SetChatFontSize", null), (S = (0, o.gn)([l.Pi], S)); let b = class extends f { render() { let e = this.FriendsSettingsToggleRow, t = s.De.IN_CLIENT ? "#FriendSettings_RememberOpenChats_DescClient" : "#FriendSettings_RememberOpenChats_Desc", n = this.SettingLink; return r.createElement( a.l0, { className: "DialogBody", onSubmit: this.OnSubmit }, r.createElement( "div", { className: "SettingsGroup" }, this.props.bShowPopupOpts && r.createElement(r.Fragment, null, r.createElement(a.gE, { onChange: (e) => _.g_FriendsUIDesktopApp.ToggleSingleWindowMode(e), label: (0, m.Xx)("#FriendSettings_DockChats"), checked: g.Ul.SettingsStore.BSingleWindowModeEnabled() }), r.createElement(e, { strName: "bAlwaysNewChatWindow", strLabel: (0, m.Xx)("#FriendSettings_AlwaysNewChatWindow") })), r.createElement(e, { strName: "bDisableEmbedInlining", strLabel: (0, m.Xx)("#FriendSettings_DisableEmbedInlining") }), r.createElement(e, { strName: "bRememberOpenChats", strLabel: (0, m.Xx)("#FriendSettings_RememberOpenChats"), strDesc: (0, m.Xx)(t) }), r.createElement(e, { strName: "b24HourClock", strLabel: (0, m.Xx)("#FriendSettings_AlwaysUse24HourClock") }), r.createElement(e, { strName: "bDisableSpellcheck", strLabel: (0, m.Xx)("#FriendSettings_DisableSpellcheck") }), g.Ul.UIStore.show_winter_sale_ui && r.createElement(e, { strName: "bDisableRoomEffects", strLabel: (0, m.Xx)("#FriendSettings_DisableRoomEffects") }), r.createElement(n, { strLabel: (0, m.Xx)("#TextFilterStatus_ChangeSettings"), strLink: g.Ul.ChatStore.GetTextFilterSettingsURL(), strDesc: g.Ul.ChatStore.GetTextFilterStatus() }), ), ); } }; b = (0, o.gn)([l.Pi], b); let I = class extends f { constructor(e) { super(e); } render() { let e = this.FriendsSettingsToggleRow, t = this.FriendsSettingsCommunityPreferenceToggleRow; return r.createElement( a.l0, { className: "DialogBody", onSubmit: this.OnSubmit }, r.createElement( "div", { className: "SettingsGroup" }, r.createElement(t, { strName: "bParenthesizeNicknames", strLabel: (0, m.Xx)("#FriendSettings_ParenthesizeNicknames") }, r.createElement(v, { bParenthesizeNicknames: this.state.communityPreferences.bParenthesizeNicknames })), r.createElement(e, { strName: "bCategorizeInGameFriendsByGame", strLabel: (0, m.Xx)("#FriendSettings_CategorizeInGameFriendsByGame") }), r.createElement(e, { strName: "bHideOfflineFriendsInTagGroups", strLabel: (0, m.Xx)("#FriendSettings_HideOfflineFriendsInCategories") }), r.createElement(e, { strName: "bHideCategorizedFriends", strLabel: (0, m.Xx)("#FriendSettings_HideCategorizedFriends") }), r.createElement(e, { strName: "bForceAlphabeticFriendSorting", strLabel: (0, m.Xx)("#FriendSettings_SortFriendsByStatus") }), this.props.bDoNotDisturbSupported && r.createElement(e, { strName: "bSignIntoFriends", strLabel: (0, m.Xx)("#FriendSettings_SignInToFriends") }), r.createElement(e, { strName: "bAnimatedAvatars", strLabel: (0, m.Xx)("#FriendSettings_AnimatedAvatars") }), ), ); } }; I = (0, o.gn)([l.Pi], I); }, 69807: (e, t, n) => { "use strict"; n.d(t, { aO: () => it, Gs: () => q, Q$: () => j }); var i = n(85556), o = n(27378), r = n(41370), a = n(50649), s = n(72746), l = n(11259), c = n(83666), m = n(68816), d = n(87018), h = n(84290), u = n(49269), p = n.n(u), _ = n(37091); function g(e) { const { title: t, children: n } = e; return o.createElement("div", { className: p().PanelSection }, t && o.createElement("div", { className: p().PanelSectionTitle }, o.createElement("div", { className: p().Text }, t), e.spinner && o.createElement(c.$jN, null)), n); } (0, a.Pi)((e) => { const { checked: t, onChange: n, icon: i, children: r } = e; return o.createElement(l.fp, { label: r, onChange: n, checked: t instanceof Function ? t() : t, padding: "compact", icon: i }); }), (0, a.Pi)((e) => { const t = e.value; return o.createElement(l.z2, Object.assign({ layout: "inline" }, e, { value: t instanceof Function ? t() : t })); }); const C = (0, _.Sb)(p().PanelSectionRow); var f = n(36226), v = n(38461), S = n(16518), b = n(37234), I = n(70215), y = n(23133), E = n(10553), D = n(50913), w = n(14341), R = n(5651), A = n(82909), M = n(61963), k = n(2049), T = n(65204), L = n(83817), G = n(55981), O = n(22820), F = n.n(O), B = n(62860), x = n(70283), N = n(71224); function P(e) { var t; const [n, i] = o.useState(void 0), r = (function () { const e = o.useRef(new Map()); return o.useCallback((t) => (e.current.has(t) || e.current.set(t, o.createRef()), e.current.get(t)), []); })(), a = null != n, s = (e) => { i(null == e ? void 0 : e.key); }, l = (t) => { if (a) { let i; switch (t.detail.button) { case G.eV.DIR_UP: i = -1; break; case G.eV.DIR_DOWN: i = 1; break; default: return !1; } return ( ((t) => { const i = e.items.find((e) => e.key == n); try { return null != e.onMoveRelative && null != i && e.onMoveRelative(i.index, t); } catch (e) { return console.error("Failed to reorder item:", e), !1; } })(i) ? x.LT.PlayNavSound(i > 0 ? x.qr.SliderUp : x.qr.SliderDown) : x.LT.PlayNavSound(x.qr.FailedNav), !0 ); } return !1; }, c = [{ name: void 0, label: void 0 }, ...(null !== (t = e.sections) && void 0 !== t ? t : [])].map((t, i) => { var a; return { strLabel: t.label, key: null !== (a = t.label) && void 0 !== a ? a : i, rgItems: e.items.filter((e) => e.sectionName == t.name).map((t, i) => o.createElement(U, { key: t.key, detail: t, onSelect: () => s(t), onDone: () => s(void 0), selected: n == t.key, navRef: r(t.key), bottomSeparator: i < e.items.length - 1, onGamepadDirection: l, onReorderActionDescription: e.onReorderActionDescription, onStopReorderActionDescription: e.onStopReorderActionDescription })) }; }), m = o.useRef(); return ( o.useEffect(() => { var e, t; if (a && (null === (e = m.current) || void 0 === e ? void 0 : e.BFocusWithin())) { const e = r(n).current; e && !e.BHasFocus() && e.TakeFocus(); } else 0 == (null === (t = m.current) || void 0 === t ? void 0 : t.BFocusWithin()) && m.current.TakeFocus(); }), o.createElement( L.s, { retainFocus: !0, navRef: m, navEntryPreferPosition: a ? B.c4.PREFERRED_CHILD : B.c4.MAINTAIN_Y }, c.map(({ strLabel: e, key: t, rgItems: n }) => (0 == n.length ? null : o.createElement(o.Fragment, { key: t }, e && o.createElement(N.dQ, null, e), n))), ) ); } function U(e) { var t, n, i; const r = null !== (t = e.onReorderActionDescription) && void 0 !== t ? t : (0, h.Xx)("#ActionButtonLabelReorder"), a = null !== (n = e.onStopReorderActionDescription) && void 0 !== n ? n : (0, h.Xx)("#ActionButtonLabelDone"), s = null !== (i = e.detail.disabled) && void 0 !== i && i, m = void 0 === e.detail.displayedIndex ? e.detail.index : e.detail.displayedIndex; return o.createElement(l.gN, { focusable: !s, icon: o.createElement("div", { className: F().ReorderableListIconIndexCtr }, o.createElement("div", { className: (0, d.Z)(F().ReorderableListIndexCtr, e.selected && F().Selected) }, o.createElement(c.$nC, { direction: "up", className: F().ReorderArrow }), o.createElement("div", { className: F().ReorderableListIndex, style: { backgroundColor: e.detail.indexColor } }, m), o.createElement(c.$nC, { direction: "down", className: F().ReorderArrow })), e.detail.icon), label: o.createElement("div", { className: F().ReorderableListItemLabel }, e.detail.label), className: (0, d.Z)(F().ReorderableListItem, e.selected && F().Selected, s && F().Disabled), disabled: s, highlightOnFocus: !e.selected, bottomSeparator: e.bottomSeparator && !e.selected ? "standard" : "none", onClick: e.detail.disabled ? null : e.selected ? e.onDone : e.onSelect, onCancel: e.selected ? e.onDone : void 0, onOKActionDescription: e.selected ? a : r, onCancelActionDescription: e.selected ? null : void 0, onOptionsButton: e.detail.onOptionsButton, onOptionsActionDescription: e.detail.onOptionsActionDescription, onSecondaryButton: e.detail.onSecondaryButton, onSecondaryActionDescription: e.detail.onSecondaryActionDescription, onGamepadDirection: e.onGamepadDirection, navRef: e.navRef, navKey: e.detail.key, preferredFocus: e.selected, }); } function V(e) { const { closeModal: t, title: n, className: r } = e, a = (0, i._T)(e, ["closeModal", "title", "className"]); return o.createElement(T.RG, { className: (0, d.Z)(F().ReorderableListDialog, r), onCancel: t }, o.createElement(L.s, { onCancel: t }, o.createElement("div", { className: F().ModalHeader }, o.createElement(l.h4, null, n), o.createElement(L.s, { focusable: !0, className: F().CloseButtonContainer, onActivate: t }, o.createElement(c.x8P, { className: F().CloseButton }))), o.createElement(l.uT, null, o.createElement(l.Ac, null, o.createElement(P, Object.assign({}, a)))))); } var H = n(57476), W = n(94623), X = n(88669); function j(e, t, n, r, a) { return (0, i.mG)(this, void 0, void 0, function* () { if (!s.Ul.RemotePlayStore.BDialogOpenInContext(e, "rpt")) { const i = () => s.Ul.RemotePlayStore.StopRemotePlay(), a = yield (0, m.BR)(o.createElement(z, { streamHost: t, uiMode: n }), r, (0, h.Xx)("#Friend_Menu_RemotePlay"), { strTitle: (0, h.Xx)("#Friend_Menu_RemotePlay"), popupWidth: 512, popupHeight: 834, fnOnClose: i }, e, { bHideActions: !0 }); s.Ul.RemotePlayStore.DialogOpened(e, () => a.Close(), "rpt"); } }); } function z(e) { const { streamHost: t, uiMode: n } = e; return o.createElement(Ze.Provider, { value: { streamHost: t } }, o.createElement(E.fI, { IN_DESKTOPUI: 7 == n, IN_GAMEPADUI: 4 == n, IN_VR: !1 }, o.createElement(m.e1, { className: (0, d.Z)(f.ModalPosition), bHideCloseIcon: !0 }, o.createElement(Z, null)))); } function K(e) { (0, s.E2)(); const { hostPlayer: t, bAmHost: n, rgPlayers: i } = Qe(), a = null != t, c = (0, s.oR)(), m = (0, r.SZ)(() => { var e; return null === (e = s.Ul.FriendStore.self) || void 0 === e ? void 0 : e.current_game_name; }), d = (0, o.useContext)(Ze), u = (0, o.useContext)(E.E_); return c ? o.createElement( o.Fragment, null, o.createElement(g, { title: m }, o.createElement(ce, { browserContext: e.browserContext })), a && o.createElement( g, { title: (0, h.Xx)("#RemotePlay_Players") }, [t, ...i].filter((e) => e.bSession).map((e) => o.createElement(ee, { player: e, key: `${e.playerID.steamid}_${e.playerID.guestid}`, quickaccess: !0 })), n && o.createElement(C, null, o.createElement(l.gN, { childrenLayout: "below" }, o.createElement(L.s, { className: f.InviteFriendGuestButtons }, o.createElement(l.zx, { className: f.InlineInviteButton, onClick: (e) => gt(d, u, (0, X.RA)(e)) }, (0, h.Xx)("#RemotePlay_InviteFriend")), o.createElement(l.zx, { className: f.InlineInviteButton, onClick: () => we(e.browserContext) }, (0, h.Xx)("#RemotePlay_InviteGuest"))))), ), a && o.createElement(g, null, o.createElement(Fe, null), o.createElement(he, null)), ) : o.createElement(g, { title: (0, h.Xx)("#RemotePlay_NoGameRunning") }); } function q(e) { const t = (0, s.E2)(); return o.createElement(Ze.Provider, { value: { streamHost: t } }, o.createElement("div", { className: f.QuickAccessContainer }, o.createElement("div", { className: f.QuickAccessTitle }, (0, h.Xx)("#RemotePlayTogether_QuickAccessTitle")), o.createElement(R.P8, { className: f.QuickAccessScrollPanel }, o.createElement(K, { browserContext: e.browserContext })))); } const Z = () => o.createElement(l.oX, { classNameContent: f.ContentForm }, o.createElement(Q, null), o.createElement($, null), o.createElement(Ge, { showVolume: !0 })), Q = (0, a.Pi)(function () { const e = s.Ul.RemotePlayStore.bIsShowingPlaceholder, t = parseInt(s.Ul.RemotePlayStore.game_id); let n = null; if (!isNaN(t)) { const e = D.Q8.GetAppInfo(t).name; n = o.createElement("div", { className: f.GameName, onClick: (e) => (0, w.b8)(e, `${E.De.STORE_BASE_URL}app/${t}`) }, e); } return o.createElement(l.h4, { className: f.DialogHeader }, (0, h.Xx)("#Friend_Menu_RemotePlay"), o.createElement("div", { className: f.StreamPausedNote, style: e ? void 0 : { visibility: "hidden" } }, (0, h.Xx)("#RemotePlay_StreamPaused")), o.createElement("div", { className: f.HeaderActions }, o.createElement("div", { className: f.GameInfo }, n), o.createElement("div", { className: f.HeaderActionsButtons }, o.createElement(de, null), o.createElement(le, null)))); }), $ = () => o.createElement(l.uT, { className: f.MediaBoxBody }, o.createElement(Y, null), o.createElement(J, null)), Y = () => { const { hostPlayer: e } = Qe(); return o.createElement(He, { title: (0, h.Xx)("#RemotePlay_Host") }, o.createElement(ee, { player: e, quickaccess: !1 })); }, J = (0, a.Pi)(function () { const { bAmHost: e, rgPlayers: t } = Qe(); (0, o.useContext)(Ze); return o.createElement( He, { title: (0, h.Xx)("#RemotePlay_Players") }, t.map((e, t) => (e.bSession ? o.createElement(ee, { player: e, key: `${e.playerID.steamid}_${e.playerID.guestid}`, quickaccess: !1 }) : null)), e && o.createElement(Re, null), e && o.createElement(Ae, null), ); }), ee = (0, a.Pi)(function (e) { const { player: t } = e; return t.playerID.guestid && !t.friend.accountid ? (t.bJoined ? o.createElement(re, Object.assign({}, e)) : o.createElement(ae, Object.assign({}, e))) : o.createElement(oe, Object.assign({}, e)); }); function te(e) { var t; return (null === (t = e.friend) || void 0 === t ? void 0 : t.accountid) ? e.friend.display_name : (0, h.Xx)("#RemotePlay_NumberedGuest", e.playerID.guestid); } function ne(e) { const { bAmHost: t } = Qe(), n = s.Ul.RemotePlayStore.GetControllerSlotsForPlayer(e.playerID), i = !(e.bKeyboardEnabled || e.bMouseEnabled || (e.bControllerEnabled && 0 !== n.length)), o = e.rtJoined + 5, r = t && i && e.bJoined && o < Date.now() / 1e3; return ue(1e3 * o), r; } function ie(e, t) { const n = ne(e); return e.bJoined ? (t && n ? (0, h.Xx)("#RemotePlay_PlayerNoInputWarning_Concise") : void 0) : (0, h.Xx)("#RemotePlay_Player_Invited"); } const oe = (0, a.Pi)(function (e) { const { player: t, quickaccess: n } = e, { friend: i } = t, { bAmHost: r } = Qe(), a = i.persona.avatar_url_full, l = i.accountid === s.Ul.FriendStore.self.accountid, c = r && !l, m = r && !l && void 0 !== t.flNetworkDuration, u = () => (t.playerID.guestid ? s.Ul.RemotePlayStore.CancelGuestInviteAndSession(t.playerID.steamid, t.playerID.guestid) : s.Ul.RemotePlayStore.CancelInviteAndSession(i.accountid)), p = (e) => (0, w.b8)(e, i.GetCommunityProfileURL()), _ = n ? (0, h.Xx)("#RemotePlay_CancelInvite") : (0, h.Xx)("#Button_Cancel"), g = t.bJoined ? (0, h.Xx)("#RemotePlay_Kick") : _, C = te(t), v = ie(t, n), S = _e(t); return o.createElement(ze, { quickaccess: n, icon: o.createElement(Le, { src: a, onClick: n ? void 0 : p, className: f.PersonaAvatar }), statusIcon: m && o.createElement("div", { title: (0, h.Xx)("#Tooltip_RemotePlay_ConnectionQuality"), style: { display: "flex" } }, o.createElement(at, { className: (0, d.Z)(f.PlayerBitRate, n && f.QuickAccess), quality: st(t.flNetworkDuration) })), title: o.createElement("div", { className: f.PersonaName }, o.createElement("span", { onClick: n ? void 0 : p, className: f.PersonaNameName }, C), t.bMobile && o.createElement(rt, null)), volumeControls: o.createElement(ye, { player: t }), statusText: v, desktopButtons: c && o.createElement(qe, { onClick: u }, g), onSecondaryButton: c ? u : void 0, onSecondaryActionDescription: c ? g : void 0, playerControls: (!n || l || t.bJoined) && o.createElement(ge, { player: t, quickaccess: n }), contextMenu: o.createElement(M.xV, { label: C }, o.createElement(M.Zo, { onSelected: p }, (0, h.Xx)("#RemotePlay_ShowProfile")), c && o.createElement(M.Zo, { onSelected: u }, g), S.length > 0 && o.createElement(M.uP, null), S), }); }), re = (0, a.Pi)(function (e) { const { player: t, quickaccess: n } = e, { bAmHost: i } = Qe(), r = (0, I.U0)(t.strAvatarHash, "full"), a = i, l = i && void 0 !== t.flNetworkDuration, c = () => s.Ul.RemotePlayStore.CancelGuestInviteAndSession(t.playerID.steamid, t.playerID.guestid), m = te(t), d = o.createElement("div", { className: f.GuestTitle }, m, t.bMobile && o.createElement(rt, null)), u = ie(t, n), p = _e(t); return o.createElement(ze, { quickaccess: n, icon: o.createElement(Le, { src: r }), statusIcon: l && o.createElement("div", { title: n ? void 0 : (0, h.Xx)("#Tooltip_RemotePlay_ConnectionQuality"), style: { display: "flex" } }, o.createElement(at, { className: f.PlayerBitRate, quality: st(t.flNetworkDuration) })), statusText: u, title: d, desktopButtons: a && o.createElement(qe, { onClick: c }, (0, h.Xx)("#RemotePlay_Kick")), onSecondaryButton: a ? c : void 0, onSecondaryActionDescription: (0, h.Xx)("#RemotePlay_Kick"), playerControls: (!n || t.bJoined) && o.createElement(ge, { player: t, quickaccess: n }), contextMenu: (a || p.length > 0) && o.createElement(M.xV, { label: m }, a && o.createElement(M.Zo, { onSelected: c }, (0, h.Xx)("#RemotePlay_Kick")), p.length > 0 && o.createElement(M.uP, null), p) }); }), ae = (0, a.Pi)(function (e) { const { player: t, quickaccess: n } = e, [i, r] = $e(), a = () => { s.Ul.RemotePlayStore.CopyLink(t.playerID.guestid), r(); }, l = () => { s.Ul.RemotePlayStore.CancelGuestInviteAndSession(t.playerID.steamid, t.playerID.guestid); }, m = te(t); return o.createElement(ze, { quickaccess: n, icon: n ? o.createElement(c.n5m, null) : o.createElement(se, null), title: m, clipboardStatus: (0, h.Xx)(i ? "#RemotePlay_Guest_CopyHint_Copied" : "#RemotePlay_Guest_CopyHint"), desktopButtons: o.createElement( qe, { onClick: (e) => { e.stopPropagation(), l(); }, }, (0, h.Xx)("#Button_Cancel"), ), className: f.InvitedGuestBox, onClick: a, onClickDescription: (0, h.Xx)("#RemotePlay_LinkCopy_Button"), contextMenu: o.createElement(M.xV, { label: m }, o.createElement(M.Zo, { onSelected: a }, (0, h.Xx)("#RemotePlay_LinkCopy_Button")), o.createElement(M.Zo, { onSelected: l }, (0, h.Xx)("#RemotePlay_CancelInvite"))), connectURL: t.strConnectUrl, }); }); function se() { return o.createElement(Te, { label: (0, h.Xx)("#RemotePlay_CopyLink_ButtonText") }, o.createElement(nt, { color: "white" })); } const le = (e) => { const { bAmHost: t } = Qe(); return o.createElement(qe, { style: "dark", onClick: () => s.Ul.RemotePlayStore.StopRemotePlay(), className: f.HeaderButton }, (0, h.Xx)(t ? "#RemotePlay_EndStream" : "#RemotePlay_LeaveStream")); }, ce = (e) => { const { hostPlayer: t, bAmHost: n } = Qe(), a = (0, r.SZ)(() => s.Ul.RemotePlayStore.BCanCreateInviteForCurrentGame()); let c, m; if (t) (c = () => s.Ul.RemotePlayStore.StopRemotePlay()), (m = (0, h.Xx)(n ? "#RemotePlay_EndSession" : "#RemotePlay_LeaveStream")); else { if (!a) return null; (c = () => { s.Ul.RemotePlayStore.StopRemotePlay(), (function (e) { (0, i.mG)(this, void 0, void 0, function* () { try { return s.Ul.RemotePlayStore.CreateGroup(s.Ul.FriendStore.self.persona.m_gameid, e); } catch (e) { throw (console.error(`RemotePlayStore.CreateGroup caught: ${e}`), e); } }); })(e.browserContext); }), (m = (0, h.Xx)("#RemotePlay_CreateSession")); } return o.createElement(C, null, o.createElement(l.sT, { layout: "below", onClick: c, onOKActionDescription: m, bottomSeparator: "none" }, m)); }; function me(e) { switch (e) { case 3: return (0, h.Xx)("#RemotePlay_ClientQualityName_Beautiful"); case 2: return (0, h.Xx)("#RemotePlay_ClientQualityName_Balanced"); case 1: return (0, h.Xx)("#RemotePlay_ClientQualityName_Fast"); default: return (0, h.Xx)("#RemotePlay_ClientQualityName_Automatic"); } } const de = (0, a.Pi)(function () { const e = s.Ul.RemotePlayStore.client_streaming_quality, t = (0, h.Xx)("#RemotePlay_ClientQuality_WithValue", me(e)), n = s.Ul.RemotePlayStore.GetSessionForPlayer({ steamid: s.Ul.FriendStore.self.steamid64, guestid: 0 }), i = n && void 0 !== n.flNetworkDuration, { hostPlayer: r } = Qe(); return r ? o.createElement( "div", { className: f.ClientQualityContainer }, i && o.createElement(at, { className: f.HeaderBitrate, quality: st(n.flNetworkDuration) }), o.createElement( qe, { onClick: () => { let e = s.Ul.RemotePlayStore.client_streaming_quality; (e += 1), 0 == e && (e = 1), e > 3 && (e = s.Ul.RemotePlayStore.is_host ? -1 : 1), s.Ul.RemotePlayStore.SetClientStreamingQuality(e); }, style: "dark", className: f.HeaderButton, }, t, ), ) : null; }), he = (0, a.Pi)(function (e) { const t = s.Ul.RemotePlayStore.client_streaming_quality, { bAmHost: n } = Qe(), i = [ { data: 1, label: me(1) }, { data: 2, label: me(2) }, { data: 3, label: me(3) }, ]; n && i.unshift({ data: -1, label: me(-1) }); const r = s.Ul.RemotePlayStore.GetSessionForPlayer({ steamid: s.Ul.FriendStore.self.steamid64, guestid: 0 }), a = r && void 0 !== r.flNetworkDuration, c = s.Ul.RemotePlayStore.host_streaming_quality_override, m = !n && -1 != c, d = s.Ul.RemotePlayStore.in_session && s.Ul.RemotePlayStore.BHasJoinedPlayer() && !m; return o.createElement( C, null, o.createElement( l.gN, { label: (0, h.Xx)("#RemotePlay_ClientQuality"), icon: a && o.createElement(at, { className: f.HeaderBitrate, quality: st(r.flNetworkDuration) }), childrenLayout: "inline", bottomSeparator: e.bottomSeparator, description: m ? (0, h.Xx)("#RemotePlay_ClientQuality_HostOverride") : void 0 }, o.createElement(l.TW, { rgOptions: i, selectedOption: m ? c : t, onChange: (e) => { s.Ul.RemotePlayStore.SetClientStreamingQuality(e.data); }, disabled: !d, }), ), ); }); function ue(e) { const [t, n] = (0, o.useState)(0), i = () => n((e) => e + 1); (0, o.useEffect)(() => { const t = Date.now(); if (t < e) { const n = window.setTimeout(i, e - t); return () => window.clearTimeout(n); } return () => {}; }, [e]); } function pe(e) { const { bAmHost: t } = Qe(), n = e.playerID.steamid === s.Ul.FriendStore.self.steamid64, i = t && !n, r = e.playerID.steamid === s.Ul.FriendStore.self.steamid64, a = s.Ul.RemotePlayStore.GetControllerSlotsForPlayer(e.playerID); return { fnToggleKeyboard: o.useCallback(() => { i && s.Ul.RemotePlayStore.SetPerUserKeyboardInputEnabled(e.playerID, !e.bKeyboardEnabled); }, [i, e]), fnToggleMouse: o.useCallback(() => { i && s.Ul.RemotePlayStore.SetPerUserMouseInputEnabled(e.playerID, !e.bMouseEnabled); }, [i, e]), fnTogglePlayersControllers: o.useCallback(() => { i && (a.forEach((e) => s.Ul.RemotePlayStore.TriggerControllerRumble(e)), s.Ul.RemotePlayStore.SetPerUserControllerInputEnabled(e.playerID, !e.bControllerEnabled)); }, [i, e.bControllerEnabled, e.playerID, a]), fnIdentifyController: o.useCallback( (e) => { r && s.Ul.RemotePlayStore.TriggerControllerRumble(e); }, [r], ), }; } function _e(e) { var t; const { fnToggleKeyboard: n, fnToggleMouse: i, fnTogglePlayersControllers: r } = pe(e), { bAmHost: a } = Qe(), l = (null === (t = e.friend) || void 0 === t ? void 0 : t.accountid) === s.Ul.FriendStore.self.accountid; if (!a || l || !e.bJoined) return []; const c = []; return null != n && c.push(o.createElement(M.Zo, { key: "kb", onSelected: n }, e.bKeyboardEnabled ? (0, h.Xx)("#Tooltip_RemotePlay_DisableKeyboard") : (0, h.Xx)("#Tooltip_RemotePlay_EnableKeyboard"))), null != i && c.push(o.createElement(M.Zo, { key: "mouse", onSelected: i }, e.bMouseEnabled ? (0, h.Xx)("#Tooltip_RemotePlay_DisableMouse") : (0, h.Xx)("#Tooltip_RemotePlay_EnableMouse"))), null != r && c.push(o.createElement(M.Zo, { key: "controllers", onSelected: r }, e.bControllerEnabled ? (0, h.Xx)("#Tooltip_RemotePlay_DisableControllers_Standalone") : (0, h.Xx)("#Tooltip_RemotePlay_EnableControllers_Standalone"))), c; } const ge = (0, a.Pi)(function (e) { const { player: t, quickaccess: n } = e, { fnToggleKeyboard: i, fnToggleMouse: r, fnTogglePlayersControllers: a, fnIdentifyController: l } = pe(t), m = ne(t), u = s.Ul.RemotePlayStore.GetControllerSlotsForPlayer(t.playerID), p = null != a ? a : l; return o.createElement( "div", { className: (0, d.Z)(n && f.QuickAccessPlayerControlsContainer, f.PlayerControlsContainer) }, o.createElement( "div", { className: f.PlayerControls }, o.createElement(Ie, { enabled: t.bKeyboardEnabled, onClick: i, icon: n ? c.N1d : et, title: n ? void 0 : fe(t.bKeyboardEnabled, null != i), lastUsedTime: t.nKeyboardUsedTime, quickaccess: n, className: f.Keyboard }), o.createElement(Ie, { enabled: t.bMouseEnabled, onClick: r, icon: n ? c.TKz : Je, title: n ? void 0 : Ce(t.bMouseEnabled, null != r), lastUsedTime: t.nMouseUsedTime, quickaccess: n, className: f.Mouse }), u.map((e, i) => o.createElement(be, { key: `${e}_${i}`, enabled: t.bControllerEnabled, onClick: () => p(e), slot: e, title: n ? void 0 : ve(t.bControllerEnabled, null != a), interactable: null != p, lastUsedTime: t.nControllerUsedTime, quickaccess: n })), m && !n && o.createElement("div", { className: f.NoInputWarning, title: (0, h.Xx)("#RemotePlay_PlayerNoInputWarning") }, o.createElement(ot, { className: f.WarningIcon })), ), ); }); function Ce(e, t) { return t ? (e ? (0, h.Xx)("#Tooltip_RemotePlay_DisableMouse") : (0, h.Xx)("#Tooltip_RemotePlay_EnableMouse")) : e ? (0, h.Xx)("#Tooltip_RemotePlay_MouseEnabled") : (0, h.Xx)("#Tooltip_RemotePlay_MouseDisabled"); } function fe(e, t) { return t ? (e ? (0, h.Xx)("#Tooltip_RemotePlay_DisableKeyboard") : (0, h.Xx)("#Tooltip_RemotePlay_EnableKeyboard")) : e ? (0, h.Xx)("#Tooltip_RemotePlay_KeyboardEnabled") : (0, h.Xx)("#Tooltip_RemotePlay_KeyboardDisabled"); } function ve(e, t) { return t ? (e ? (0, h.Xx)("#Tooltip_RemotePlay_DisableControllers") : (0, h.Xx)("#Tooltip_RemotePlay_EnableControllers")) : e ? (0, h.Xx)("#Tooltip_RemotePlay_ControllersEnabled") : (0, h.Xx)("#Tooltip_RemotePlay_ControllersDisabled"); } function Se(e) { const { controllerType: t, mobile: n, className: i } = e; return n ? o.createElement(c.ij_, { className: i }) : o.createElement(c.CtA, { controllerType: t, className: i }); } function be(e) { const { slot: t, enabled: n, onClick: i, title: r, interactable: a, lastUsedTime: l, quickaccess: m } = e, h = t < s.Ul.RemotePlayStore.priority_controller_slot_count, u = l + 1e3, p = u > Date.now(); ue(u); const _ = Pe(t), { bAmHost: g } = Qe(), C = !m && g, v = (0, k.fJ)(() => s.Ul.RemotePlayStore.GetControllerType(t), [t], 0), S = o.createElement("div", { className: (0, d.Z)(f.PlayerController, m && f.QuickAccessPlayerController, n && f.Enabled, !m && a && f.InteractableController, C && f.Grabbable), onClick: i, title: m ? void 0 : r }, o.createElement("div", { className: (0, d.Z)(f.PlayerControllerNumber, !h && f.Hidden), style: { backgroundColor: ct(t) } }, t + 1), o.createElement(c.CtA, { className: (0, d.Z)(f.PlayerControllerIcon, p && f.Wiggle), controllerType: v })); return !g || m ? S : o.createElement(y.G, Object.assign({}, _), S); } function Ie(e) { const { enabled: t, onClick: n, icon: i, title: r, lastUsedTime: a, className: s, quickaccess: l } = e, c = a + 1e3, m = c > Date.now(); ue(c); const h = i, u = o.createElement(h, { className: (0, d.Z)(f.PlayerControl, l && f.QuickAccess, t ? f.ControlEnabled : f.ControlDisabled, m && f.Wiggle) }), p = !l && null != n; return o.createElement("div", { onClick: p ? n : void 0, className: (0, d.Z)(s, p && f.InteractableControl, l && f.QuickAccessControlIcon), title: l ? void 0 : r }, u); } const ye = (0, a.Pi)(function (e) { return e.player.playerID.steamid === s.Ul.FriendStore.self.steamid64 ? o.createElement(De, Object.assign({}, e)) : o.createElement(Ee, Object.assign({}, e)); }), Ee = (0, a.Pi)(function (e) { var t; const { player: n } = e, i = null === (t = null == n ? void 0 : n.friend) || void 0 === t ? void 0 : t.accountid; if (!s.Ul.VoiceStore.IsAnyVoiceActive() || !i || !s.Ul.VoiceStore.IsVoiceActiveForFriend(i)) return null; let r = s.Ul.VoiceStore.ConvertGainValueToSliderValue(s.Ul.VoiceStore.GetPerUserGainLevel(i), v.Ys.k_MaxPerUserGainMultiplier); s.Ul.VoiceStore.GetPerUserMuting(i); return o.createElement(Ye, { min: 0, max: 100, onChange: (e) => s.Ul.VoiceStore.SetPerUserGainLevel(i, s.Ul.VoiceStore.ConvertSliderToGainValue(e, v.Ys.k_MaxPerUserGainMultiplier)), value: r, icon: tt, onIconClick: () => s.Ul.VoiceStore.SetPerUserMuting(i, !s.Ul.VoiceStore.GetPerUserMuting(i)) }); }), De = (0, a.Pi)(function (e) { if (!s.Ul.VoiceStore.IsAnyVoiceActive()) return null; return o.createElement(Ye, { min: 0, max: 100, onChange: (e) => s.Ul.VoiceStore.SetVoiceInputGain(s.Ul.VoiceStore.ConvertSliderToGainValue(e, v.Ys.k_MaxInputOutputGainValue)), value: s.Ul.VoiceStore.ConvertGainValueToSliderValue(s.Ul.VoiceStore.GetVoiceInputGain(), v.Ys.k_MaxInputOutputGainValue), icon: ({ className: e }) => o.createElement(S.PjE, { className: (0, d.Z)(e, f.MicFillOverride) }), onIconClick: () => { s.Ul.VoiceStore.IsMicMuted() && s.Ul.VoiceStore.IsOutputMuted() && s.Ul.VoiceStore.ToggleOutputMuting(), s.Ul.VoiceStore.ToggleMicMuting(); }, }); }); function we(e) { return (0, i.mG)(this, void 0, void 0, function* () { try { return s.Ul.RemotePlayStore.CreateGuestInviteAndSession(s.Ul.FriendStore.self.persona.m_gameid, e); } catch (e) { throw (console.error(`RemotePlayStore.CreateGuestInviteAndCopyLink caught: ${e}`), e); } }); } function Re(e) { const t = (0, o.useContext)(Ze), n = (0, o.useContext)(E.E_); return o.createElement(ze, { quickaccess: !1, icon: o.createElement(Me, null), title: (0, h.Xx)("#RemotePlay_InviteFriend_Verbose"), description: (0, h.Xx)("#RemotePlay_InviteFriend_ShortDescription"), className: f.AddGuestBox, onClick: (e) => gt(t, n, (0, X.RA)(e)) }); } function Ae(e) { return o.createElement(ze, { quickaccess: !1, icon: o.createElement(ke, null), title: (0, h.Xx)("#RemotePlay_InviteGuest_Verbose"), description: (0, h.Xx)("#RemotePlay_LinkCopy_ShortDescription"), className: f.AddGuestBox, onClick: (e) => we((0, b.Um)(null, e)) }); } function Me() { return o.createElement(Te, { label: (0, h.Xx)("#RemotePlay_AddGuest_ButtonText") }, o.createElement("svg", { width: "19", height: "19", viewBox: "0 0 19 19" }, o.createElement("path", { d: "M15.9747 12.5368H12.5368V15.9976C12.5368 17.6707 11.1846 19.0229 9.51146 19.0229C7.83836 19.0229 6.48613 17.6707 6.48613 15.9976V12.5368H3.02533C1.35223 12.5368 0 11.1846 0 9.51146C0 7.83836 1.35223 6.48613 3.02533 6.48613H6.48613V3.02533C6.48613 1.35223 7.83836 0 9.51146 0C11.1846 0 12.5368 1.35223 12.5368 3.02533V6.48613H15.9976C17.6707 6.48613 19.0229 7.83836 19.0229 9.51146C19 11.1846 17.6478 12.5368 15.9747 12.5368Z", fill: "#F9FDFF" }))); } function ke() { return o.createElement(Te, { label: (0, h.Xx)("#RemotePlay_AddGuest_ButtonText") }, o.createElement(nt, { color: "white" })); } function Te(e) { const { onClick: t, children: n, label: i } = e, [r, a] = $e(); return o.createElement( "div", { className: f.MediaButton, onClick: () => { a(), t && t(); }, }, o.createElement("div", { className: (0, d.Z)(f.ButtonContent, r && f.RecentlyInteracted) }, n, o.createElement("div", { className: f.MediaButtonLabel }, i)), ); } function Le(e) { const { className: t } = e, n = (0, i._T)(e, ["className"]); return o.createElement("img", Object.assign({ className: (0, d.Z)(f.MediaImage, t) }, n)); } const Ge = (0, a.Pi)(function (e) { return o.createElement(l.$_, { className: f.Footer }, o.createElement(He, { title: (0, h.Xx)("#RemotePlay_GameSettings"), className: f.NoMarginTop }, o.createElement(Ke, { className: f.GameSettingsBox }, o.createElement(Oe, null), e.showVolume && o.createElement(Ve, null)))); }), Oe = (0, a.Pi)(function () { const { bAmHost: e, hostPlayer: t } = Qe(), n = []; for (let e = 0; e < s.Ul.RemotePlayStore.priority_controller_slot_count; e++) { const i = mt(e, t); n.push(o.createElement(Be, { index: e, key: e, player: i })); } return o.createElement("div", { className: f.ControllerDropSlotsContainer }, o.createElement("div", { className: f.ControllerDropSlots }, n, e && o.createElement("div", { className: f.HowToHint, title: (0, h.Xx)("#Tooltip_RemotePlayControllerAssignments") }, "?")), e && o.createElement(Ne, null)); }), Fe = (0, a.Pi)(function () { const { bAmHost: e, hostPlayer: t } = Qe(), n = []; for (let e = 0; e < s.Ul.RemotePlayStore.priority_controller_slot_count; e++) { const i = mt(e, t); n.push(o.createElement(xe, { index: e, key: e, player: i })); } const i = (0, o.useContext)(Ze), r = (0, o.useContext)(E.E_); return o.createElement( C, null, o.createElement( l.gN, { label: (0, h.Xx)("#RemotePlay_Controllers"), childrenLayout: "below", focusable: e, onClick: e ? (e) => (function (e, t, n) { const i = o.createElement(pt, { context: e, configContext: t }, (e) => o.createElement(ut, { closeModal: e })); (0, m.AM)(i, n); })(i, r, (0, X.RA)(e)) : void 0, onOKActionDescription: e ? (0, h.Xx)("#RemotePlay_ChangeControllerOrder") : null, }, o.createElement( "div", { className: f.QuickAccessControllerOrderContainer }, n.map((e, t) => o.createElement(o.Fragment, { key: t }, t > 0 && o.createElement("div", { className: f.Divider }), e)), ), ), ); }), Be = (0, a.Pi)(function ({ index: e, player: t }) { const n = !!t; let i; if (n) { const e = t.friend.accountid ? t.friend.display_name : (0, h.Xx)("#RemotePlay_NumberedGuest", t.playerID.guestid); i = (0, h.Xx)("#Tooltip_RemotePlayOtherController", e); } const { bDragHovered: r, dropTargetProps: a } = (function (e, t) { const [n, i] = (0, o.useState)(!1), r = Pe(e); return { bDragHovered: n, dropTargetProps: Object.assign(Object.assign({}, t ? r : {}), { rgAcceptedTypes: ["rptcontroller"], fnDrop: (t) => { i(!1), Ue(t) && t.controllerID !== e && (s.Ul.RemotePlayStore.SwapControllerSlots(t.controllerID, e), b.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed()); }, fnDragEnter: (t) => (Ue(t) ? (t.controllerID !== e && i(!0), !0) : (console.error("Drag event received invalid data type."), !1)), fnDragLeave: () => { i(!1); }, }), }; })(e, n), { bAmHost: l } = Qe(), c = (0, d.Z)(f.ControllerDropSlot, { [f.WithMargin]: e > 0, [f.DragHovered]: r, [f.CanGrab]: l && n, [f.Interactable]: l && n }), m = (0, k.fJ)(() => s.Ul.RemotePlayStore.GetControllerType(e), [e, t], 0), u = o.createElement( "div", { className: c, title: i, onClick: () => { t && (t.playerID.steamid === s.Ul.FriendStore.self.steamid64 || l) && s.Ul.RemotePlayStore.TriggerControllerRumble(e); }, }, o.createElement(Se, { controllerType: m, mobile: null == t ? void 0 : t.bMobile, className: (0, d.Z)(f.Controller, n && f.SlotFilled) }), o.createElement("div", { className: f.DropSlotNumber, style: { backgroundColor: ct(e) } }, e + 1), ); return l ? o.createElement(y.G, Object.assign({}, a), u) : u; }), xe = (0, a.Pi)(function (e) { const { index: t, player: n } = e, i = !!n, r = (0, k.fJ)(() => s.Ul.RemotePlayStore.GetControllerType(t), [t, n], 0); return o.createElement("div", { className: (0, d.Z)(f.QuickAccessControllerOrderSlot, i && f.SlotFilled) }, o.createElement("div", { className: f.DropSlotNumber, style: { backgroundColor: ct(t) } }, t + 1), i && o.createElement(Se, { controllerType: r, mobile: null == n ? void 0 : n.bMobile, className: (0, d.Z)(f.Controller, i && f.SlotFilled) }), !i && o.createElement(c.X7U, { none: !0 })); }), Ne = (0, a.Pi)(function () { const { bDragHovered: e, dropTargetProps: t } = (function () { const [e, t] = (0, o.useState)(!1); return { bDragHovered: e, dropTargetProps: { rgAcceptedTypes: ["rptcontroller"], fnDrop: (e) => { t(!1), Ue(e) && e.controllerID < s.Ul.RemotePlayStore.priority_controller_slot_count && (s.Ul.RemotePlayStore.RemoveControllerFromPrioritySlot(e.controllerID), b.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed()); }, fnDragEnter: (e) => (Ue(e) ? (e.controllerID < s.Ul.RemotePlayStore.priority_controller_slot_count && t(!0), !0) : (console.error("Drag event received invalid data type."), !1)), fnDragLeave: () => { t(!1); }, }, }; })(); return o.createElement(y.G, Object.assign({}, t), o.createElement("div", { className: (0, d.Z)(f.ControllerClearDropSlot, e && f.DragHovered) }, o.createElement(S.X, { className: f.ClearDropSlotIcon }))); }); function Pe(e) { (0, o.useRef)(); return { rgAcceptedTypes: [], onDragStart: (t) => { b.g_FriendsUIDesktopApp.DragDropManager.StartDrag({ type: "rptcontroller", controllerID: e }), t.dataTransfer.setDragImage(t.currentTarget, 0, 0); }, onDragEnd: () => { b.g_FriendsUIDesktopApp.DragDropManager.EndDrag(); }, draggable: !0, }; } function Ue(e) { return e && "rptcontroller" === e.type; } const Ve = (0, a.Pi)(function () { return o.createElement(Ye, { min: 0, max: 100, onChange: (e) => s.Ul.RemotePlayStore.SetGameVolume(e), value: s.Ul.RemotePlayStore.game_volume, icon: tt, title: (0, h.Xx)("#RemotePlay_GameMasterVolume") }); }), He = ((0, a.Pi)(function () { const e = s.Ul.RemotePlayStore.game_volume; return o.createElement(C, null, o.createElement(l.z2, { min: 0, max: 100, onChange: (e) => s.Ul.RemotePlayStore.SetGameVolume(e), value: s.Ul.RemotePlayStore.game_volume, icon: o.createElement(c.A6J, { flVolume: e / 100 }), label: (0, h.Xx)("#RemotePlay_GameMasterVolume"), layout: "inline" })); }), (e) => { const { title: t, children: n, className: i } = e; return o.createElement( "div", { className: (0, d.Z)(f.Section, i) }, o.createElement(We, null, t), o.Children.map(n, (e, t) => o.createElement("div", { className: t > 0 ? f.SectionItemMargin : void 0 }, e)), ); }), We = (e) => o.createElement("div", Object.assign({ className: f.SectionTitle }, e)), Xe = (e) => { const { title: t, description: n, statusText: i, statusIcon: r, clipboardStatus: a, contextMenu: s, onClick: c, onClickDescription: m, onSecondaryButton: u, onSecondaryActionDescription: p, icon: _, connectURL: g, playerControls: v } = e, S = (e) => { s && (0, A.yV)(s, e); }; return o.createElement( C, null, o.createElement( l.gN, { label: o.createElement("div", { className: (0, d.Z)(f.QuickAccessMediaBoxTitleRow, a && f.Wrap) }, o.createElement("div", { className: f.QuickAccessMediaBoxTitle }, t), r && o.createElement("div", null, r), a && o.createElement("div", { className: f.QuickAccessClipboardStatus }, a)), description: n, icon: o.createElement("div", { className: f.QuickAccessIconContainer }, _), focusable: !0, onClick: S, onOKActionDescription: s ? (0, h.Xx)("#RemotePlay_Options") : null, onContextMenu: S, onMenuButton: S, childrenLayout: "inline", verticalAlignment: "top", onSecondaryButton: u, onSecondaryActionDescription: p, onOptionsButton: c, onOptionsActionDescription: m }, o.createElement("div", { className: f.QuickAccessMediaBoxChildrenContainer }, v && o.createElement("div", { className: f.QuickAccessPlayerControlsContainer }, v), g && o.createElement("div", { className: f.QuickAccessConnectURL }, g), i && o.createElement("div", { className: f.QuickAccessStatusText }, i)), ), ); }, je = (e) => { const { title: t, description: n, statusText: i, desktopButtons: r, icon: a, clipboardStatus: s, statusIcon: l, connectURL: c, className: m, onClick: h, contextMenu: u, volumeControls: p, playerControls: _ } = e; return o.createElement( Ke, { className: (0, d.Z)(f.MediaBox, m), onClick: h, interactable: null != h, onContextMenu: (e) => { o.Children.count(u) > 0 && (0, A.yV)(u, e); }, }, o.createElement("div", { className: f.Media }, a), o.createElement("div", { className: f.Content }, o.createElement("div", { className: f.Top }, o.createElement("div", { className: f.MediaBoxTitle }, o.createElement("div", { className: f.TitleText }, t), i && o.createElement(o.Fragment, null, o.createElement("div", { className: f.TitleStatusDivider }), o.createElement("div", { className: f.TitleStatus }, i)), s && o.createElement(o.Fragment, null, o.createElement("div", { className: f.TitleStatusDivider }), o.createElement("div", { className: f.TitleStatus }, s))), o.createElement("div", { className: f.DesktopButtons }, l, r)), o.createElement("div", { className: f.Bottom }, n && o.createElement("div", { className: f.MediaBoxDescription }, n), _ && o.createElement("div", { className: f.MediaBoxPlayerControls }, _), p && o.createElement("div", { className: f.MediaBoxVolumeControls }, p), c && o.createElement("div", { className: f.LinkContainer, onClick: (e) => e.stopPropagation() }, c))), ); }, ze = (e) => { const { quickaccess: t } = e, n = (0, i._T)(e, ["quickaccess"]); return t ? o.createElement(Xe, Object.assign({}, n)) : o.createElement(je, Object.assign({}, n)); }, Ke = (e) => { var { className: t, interactable: n } = e, r = (0, i._T)(e, ["className", "interactable"]); return o.createElement("div", Object.assign({ className: (0, d.Z)(t, f.ContentBox, n && f.Interactable) }, r)); }; function qe(e) { const { children: t, className: n, onClick: i, style: r = "light" } = e; return o.createElement("div", { className: (0, d.Z)(f.BoxButton, "light" === r ? f.Light : f.Dark, n), onClick: i }, t); } const Ze = (0, o.createContext)({ streamHost: null }); function Qe() { const e = s.Ul.RemotePlayStore; let { streamHost: t } = (0, o.useContext)(Ze); return (0, r.SZ)(() => { var n, i; if (!t) return { bAmHost: !1, hostPlayer: null, rgPlayers: [] }; const o = { playerID: { steamid: null !== (n = null == t ? void 0 : t.steamid64) && void 0 !== n ? n : "", guestid: 0 }, friend: s.Ul.FriendStore.GetPlayer(null !== (i = null == t ? void 0 : t.accountid) && void 0 !== i ? i : 0), gameID: "0", bSession: !0, bJoined: !0, bMobile: !1, bKeyboardEnabled: !0, bMouseEnabled: !0, bControllerEnabled: !0, nKeyboardUsedTime: 0, nMouseUsedTime: 0, nControllerUsedTime: 0, bGuest: !1 }, r = e.is_host, a = e.GetAllSessions().filter((e) => r || e.bJoined); return { bAmHost: r, hostPlayer: o, rgPlayers: a }; }); } function $e(e = 2e3) { const [t, n] = (0, o.useState)(!1), i = (0, o.useRef)(null); return [ t, () => { n(!0), clearTimeout(i.current), (i.current = window.setTimeout(() => n(!1), e)); }, ]; } function Ye(e) { const { icon: t, onIconClick: n, value: i, onChange: r, min: a, max: s, title: c } = e, m = t, h = !!n; return o.createElement("div", { className: f.SliderControlContainer, title: c }, o.createElement("div", { className: f.SliderIconContainer, onClick: n }, o.createElement(m, { className: (0, d.Z)(f.SliderIcon, h && 0 == i && f.Disabled) })), o.createElement("div", { className: f.SliderContainer }, o.createElement(l.CB, { min: a, max: s, value: i, onChange: r, className: f.Slider }))); } function Je(e) { const { className: t, color: n } = e; return o.createElement("svg", { x: "0px", y: "0px", viewBox: "0 0 720 720", className: t, style: { fill: "currentcolor", color: n } }, o.createElement("g", null, o.createElement("path", { d: "M443.5,118.5H375v179.6c53.16-2.78,102.48-20.26,144-48.41V194C519,152.3,485.2,118.5,443.5,118.5z" }), o.createElement("path", { d: "M345,118.5h-68.5c-41.7,0-75.5,33.8-75.5,75.5v55.69c41.52,28.16,90.84,45.63,144,48.41V118.5z" }), o.createElement("path", { d: "M201,285.4v157.1c0,87.81,71.19,159,159,159h0c87.81,0,159-71.19,159-159V285.4\n\t\t\t\t\tc-47.69,28.1-102.19,43.1-159,43.1C303.19,328.5,248.69,313.5,201,285.4z" }))); } function et(e) { const { className: t, color: n } = e; return o.createElement( "svg", { x: "0px", y: "0px", viewBox: "0 0 720 720", className: t, style: { fill: "currentcolor", color: n } }, o.createElement( "g", null, o.createElement("path", { d: "M584.73,164.47H121.94c-55.71,0-100.87,45.16-100.87,100.87v146.51c0,55.71,45.16,100.87,100.87,100.87h462.79\n\t\t\t\tc55.71,0,100.87-45.16,100.87-100.87V265.34C685.6,209.63,640.44,164.47,584.73,164.47z M452.42,256.94\n\t\t\t\tc0-18.46,14.97-33.43,33.43-33.43h0c18.46,0,33.43,14.97,33.43,33.43v0c0,18.46-14.97,33.43-33.43,33.43h0\n\t\t\t\tC467.38,290.37,452.42,275.4,452.42,256.94L452.42,256.94z M442.1,305.16c18.46,0,33.43,14.97,33.43,33.43v0\n\t\t\t\tc0,18.46-14.97,33.43-33.43,33.43h0c-18.46,0-33.43-14.97-33.43-33.43v0C408.67,320.13,423.63,305.16,442.1,305.16L442.1,305.16z\n\t\t\t\tM364.92,256.94c0-18.46,14.97-33.43,33.43-33.43h0c18.46,0,33.43,14.97,33.43,33.43v0c0,18.46-14.97,33.43-33.43,33.43h0\n\t\t\t\tC379.88,290.37,364.92,275.4,364.92,256.94L364.92,256.94z M354.45,305.16c18.46,0,33.43,14.97,33.43,33.43v0\n\t\t\t\tc0,18.46-14.97,33.43-33.43,33.43h0c-18.46,0-33.43-14.97-33.43-33.43v0C321.02,320.13,335.99,305.16,354.45,305.16L354.45,305.16z\n\t\t\t\tM277.42,256.94c0-18.46,14.97-33.43,33.43-33.43h0c18.46,0,33.43,14.97,33.43,33.43v0c0,18.46-14.97,33.43-33.43,33.43h0\n\t\t\t\tC292.38,290.37,277.42,275.4,277.42,256.94L277.42,256.94z M266.81,305.16c18.46,0,33.43,14.97,33.43,33.43v0\n\t\t\t\tc0,18.46-14.97,33.43-33.43,33.43h0c-18.46,0-33.43-14.97-33.43-33.43v0C233.38,320.13,248.34,305.16,266.81,305.16L266.81,305.16z\n\t\t\t\tM189.92,256.94c0-18.46,14.97-33.43,33.43-33.43h0c18.46,0,33.43,14.97,33.43,33.43v0c0,18.46-14.97,33.43-33.43,33.43h0\n\t\t\t\tC204.88,290.37,189.92,275.4,189.92,256.94L189.92,256.94z M102.42,256.94c0-18.46,14.97-33.43,33.43-33.43h0\n\t\t\t\tc18.46,0,33.43,14.97,33.43,33.43v0c0,18.46-14.97,33.43-33.43,33.43h0C117.38,290.37,102.42,275.4,102.42,256.94L102.42,256.94z\n\t\t\t\tM166.76,420.25c0,18.46-14.97,33.43-33.43,33.43h0c-18.46,0-33.43-14.97-33.43-33.43v0c0-18.46,14.97-33.43,33.43-33.43h0\n\t\t\t\tC151.79,386.82,166.76,401.78,166.76,420.25L166.76,420.25z M212.59,338.59c0,18.46-14.97,33.43-33.43,33.43h0\n\t\t\t\tc-18.46,0-33.43-14.97-33.43-33.43v0c0-18.46,14.97-33.43,33.43-33.43h0C197.62,305.16,212.59,320.13,212.59,338.59L212.59,338.59z\n\t\t\t\tM498.64,420.25c0,18.46-14.97,33.43-33.43,33.43H250.09c-18.46,0-33.43-14.97-33.43-33.43v0c0-18.46,14.97-33.43,33.43-33.43\n\t\t\t\th215.12C483.67,386.82,498.64,401.78,498.64,420.25L498.64,420.25z M529.74,372.02c-18.46,0-33.43-14.97-33.43-33.43v0\n\t\t\t\tc0-18.46,14.97-33.43,33.43-33.43h0c18.46,0,33.43,14.97,33.43,33.43v0C563.17,357.06,548.21,372.02,529.74,372.02L529.74,372.02z\n\t\t\t\tM606.78,420.25c0,18.46-14.97,33.43-33.43,33.43h0c-18.46,0-33.43-14.97-33.43-33.43v0c0-18.46,14.97-33.43,33.43-33.43h0\n\t\t\t\tC591.81,386.82,606.78,401.78,606.78,420.25L606.78,420.25z M606.78,256.94c0,18.46-14.97,33.43-33.43,33.43h0\n\t\t\t\tc-18.46,0-33.43-14.97-33.43-33.43v0c0-18.46,14.97-33.43,33.43-33.43h0C591.81,223.51,606.78,238.48,606.78,256.94L606.78,256.94z", }), ), ); } function tt(e) { const { className: t, color: n } = e; return o.createElement( "svg", { x: "0px", y: "0px", viewBox: "0 0 720 720", className: t, style: { fill: "currentcolor", color: n } }, o.createElement("path", { d: "M189.54,272.79h-64.83c-21.35,0-38.66,17.31-38.66,38.66v97.09c0,21.35,17.31,38.66,38.66,38.66h64.83\n\t\t\t\tl137.79,77.33V195.46L189.54,272.79z" }), o.createElement( "g", null, o.createElement("path", { d: "M515.5,606.28c-5.35,0-10.69-2.14-14.63-6.36c-7.53-8.08-7.09-20.74,0.99-28.27\n\t\t\t\t\tc58.53-54.56,92.1-131.7,92.1-211.65s-33.57-157.09-92.1-211.65c-8.08-7.53-8.52-20.19-0.99-28.27\n\t\t\t\t\tc7.53-8.08,20.19-8.52,28.27-0.99c32.72,30.5,58.49,66.61,76.58,107.32c18.74,42.16,28.24,87.1,28.24,133.59\n\t\t\t\t\ts-9.5,91.43-28.24,133.59c-18.09,40.71-43.86,76.81-76.58,107.32C525.27,604.5,520.38,606.28,515.5,606.28z" }), o.createElement("path", { d: "M449.63,538.52c-5.42,0-10.82-2.19-14.76-6.5c-7.46-8.15-6.9-20.8,1.25-28.26\n\t\t\t\t\tc40.26-36.84,63.35-89.24,63.35-143.77c0-54.52-23.09-106.93-63.35-143.77c-8.15-7.46-8.71-20.11-1.25-28.26\n\t\t\t\t\tc7.46-8.15,20.11-8.71,28.26-1.25c23.8,21.78,42.56,47.69,55.76,77c13.66,30.35,20.59,62.75,20.59,96.28\n\t\t\t\t\tc0,33.53-6.93,65.92-20.59,96.28c-13.19,29.31-31.95,55.21-55.76,77C459.29,536.79,454.46,538.52,449.63,538.52z" }), o.createElement("path", { d: "M383.73,470.72c-5.58,0-11.13-2.32-15.08-6.85c-7.26-8.32-6.4-20.96,1.92-28.22\n\t\t\t\t\tC392.45,416.57,405,388.99,405,360c0-28.99-12.55-56.57-34.42-75.65c-8.32-7.26-9.18-19.9-1.92-28.22\n\t\t\t\t\tc7.26-8.32,19.9-9.19,28.22-1.92C427.46,280.89,445,319.45,445,360c0,40.55-17.54,79.11-48.13,105.79\n\t\t\t\t\tC393.08,469.1,388.4,470.72,383.73,470.72z" }), ), ); } function nt(e) { const { className: t, color: n } = e; return o.createElement( "svg", { width: "19", height: "19", viewBox: "0 0 19 19", className: t, style: { fill: "currentcolor", color: n } }, o.createElement("path", { d: "M14.8406 11.2028L17.5123 8.53059C19.4614 6.58196 19.4614 3.41057 17.5123 1.46194C15.5635 -0.487315 12.3923 -0.487315 10.4435 1.46194L6.58776 5.31766C4.63871 7.26629 4.63871 10.4377 6.58776 12.3863C6.87553 12.6743 7.1905 12.9184 7.52381 13.1212L9.58797 11.0569C9.19479 10.9628 8.82184 10.7645 8.51573 10.4586C7.62985 9.57268 7.62985 8.13108 8.51573 7.24542L12.3714 3.3897C13.2573 2.50383 14.6989 2.50383 15.5846 3.3897C16.4705 4.27557 16.4705 5.71696 15.5846 6.60283L14.4518 7.73579C14.9186 8.83438 15.0476 10.0426 14.8406 11.2028Z" }), o.createElement("path", { d: "M4.13369 7.77151L1.46194 10.4435C-0.487315 12.3923 -0.487315 15.5635 1.46194 17.5123C3.41057 19.4614 6.58196 19.4614 8.5308 17.5123L12.3863 13.6566C14.3354 11.7078 14.3351 8.53658 12.3863 6.58795C12.0987 6.29997 11.7838 6.05584 11.4505 5.85303L9.38632 7.91739C9.77929 8.01163 10.1522 8.20959 10.4586 8.51571C11.3444 9.40158 11.3444 10.843 10.4586 11.7288L6.60262 15.5846C5.71675 16.4704 4.27536 16.4704 3.38949 15.5846C2.50361 14.6987 2.50361 13.2573 3.38949 12.3714L4.52244 11.2387C4.05547 10.1401 3.92645 8.93166 4.13369 7.77151Z" }), ); } function it(e) { const { className: t, color: n } = e; return o.createElement( "svg", { viewBox: "0 0 24 14", className: t, style: { fill: "currentcolor", color: n } }, o.createElement("path", { d: "M4.10365 8.93815C4.15279 8.97501 4.20193 9.00572 4.24494 9.04258C4.20193 9.00572 4.15279 8.96886 4.10365 8.93815Z" }), o.createElement("path", { d: "M5.52267 10.5845L5.52837 10.5902C5.52267 10.5902 5.52267 10.5845 5.52267 10.5845Z" }), o.createElement("path", { d: "M23.5218 9.9886L21.4209 2.00264C21.169 0.608173 19.492 -0.251853 17.6675 0.0737279C16.8443 0.221161 16.1379 0.589744 15.628 1.0689H9.95182C9.44194 0.583601 8.73549 0.221161 7.91233 0.0737279C6.09398 -0.251853 4.41079 0.608173 4.15893 2.00264L3.19447 5.6639C4.93295 6.19834 6.44414 7.26109 7.42703 8.74156L7.43317 8.74771C8.87678 9.27601 10.7381 9.59545 12.7653 9.59545C14.811 9.59545 16.6846 9.26987 18.1344 8.72928L19.2401 10.5783C19.9466 11.6902 20.6837 12.0711 21.7895 11.8684C22.8952 11.6779 23.6692 10.8302 23.5218 9.9886ZM9.56481 5.55947H8.63721V6.48707C8.63721 6.93551 8.27477 7.29795 7.82632 7.29795C7.37788 7.29795 7.01544 6.93551 7.01544 6.48707V5.55947H6.09398C5.64554 5.55947 5.2831 5.19703 5.2831 4.74859C5.2831 4.30014 5.64554 3.9377 6.09398 3.9377H7.02158V3.01625C7.02158 2.5678 7.38402 2.20536 7.83247 2.20536C8.28091 2.20536 8.64335 2.5678 8.64335 3.01625V3.94385H9.57095C10.0194 3.94385 10.3818 4.30629 10.3818 4.75473C10.3757 5.19703 10.0132 5.55947 9.56481 5.55947ZM15.8799 6.54235C15.327 6.54235 14.8724 6.09391 14.8785 5.54104C14.8785 4.98816 15.327 4.53358 15.8799 4.53358C16.4327 4.53358 16.8873 4.98202 16.8873 5.54104C16.8873 6.09391 16.4327 6.54235 15.8799 6.54235ZM17.7781 4.19571C17.2252 4.19571 16.7706 3.74727 16.7706 3.19439C16.7706 2.64152 17.219 2.18694 17.7781 2.18694C18.3309 2.18694 18.7855 2.63538 18.7855 3.19439C18.7855 3.74727 18.3309 4.19571 17.7781 4.19571ZM19.1725 6.88636C18.6197 6.85565 18.1958 6.37649 18.2265 5.82362C18.2572 5.27074 18.7364 4.84687 19.2892 4.87759C19.8421 4.9083 20.266 5.38746 20.2353 5.94034C20.2046 6.49321 19.7315 6.91708 19.1725 6.88636Z", }), o.createElement("path", { d: "M1.81836 12.7038C1.77536 12.5933 1.70164 12.4827 1.6095 12.3905C1.51735 12.2984 1.41292 12.2308 1.2962 12.1817C1.2532 12.1633 1.20406 12.1633 1.16105 12.1571C1.08734 12.1387 1.01976 12.1141 0.946047 12.1141C0.866188 12.1141 0.792471 12.1387 0.712611 12.1571C0.66961 12.1694 0.626609 12.1633 0.589751 12.1817C0.516034 12.2124 0.448461 12.2677 0.380887 12.3168C0.350172 12.3414 0.307171 12.3537 0.276455 12.3844C0.18431 12.4765 0.116736 12.581 0.0675918 12.6977C-0.0675552 13.0356 1.83284e-05 13.441 0.276455 13.7174C0.368601 13.8096 0.473033 13.8772 0.589751 13.9263C0.638895 13.9447 0.694182 13.9447 0.743327 13.957C0.8109 13.9693 0.872331 13.9939 0.939904 13.9939C1.17948 13.9939 1.41906 13.9017 1.60335 13.7174C1.6955 13.6253 1.76307 13.5209 1.81222 13.4041C1.91051 13.1891 1.91051 12.9311 1.81836 12.7038Z" }), o.createElement("path", { d: "M4.52137 12.4151C4.49065 12.2492 4.44151 12.0834 4.38622 11.9237C4.36165 11.8561 4.34322 11.7885 4.3125 11.7209C4.17121 11.3831 3.98692 11.0698 3.74734 10.7872C3.66749 10.6889 3.58763 10.6029 3.49548 10.5108C3.14533 10.1606 2.73374 9.88417 2.2853 9.69987C2.2423 9.68144 2.19315 9.66916 2.14401 9.65073C1.84914 9.54016 1.54199 9.46644 1.22255 9.43572C1.09969 9.42344 0.976832 9.41729 0.853971 9.41729C0.700395 9.41729 0.552962 9.47872 0.442387 9.5893C0.331812 9.69987 0.276524 9.84731 0.270381 10.0009C0.270381 10.1606 0.331812 10.3019 0.442387 10.4125C0.552962 10.523 0.700395 10.5845 0.853971 10.5845H0.860114C0.958402 10.5845 1.05055 10.6029 1.14884 10.6152C1.22255 10.6213 1.29013 10.6213 1.36384 10.6336C1.46828 10.652 1.56656 10.695 1.66485 10.7258C1.72014 10.7442 1.78157 10.7565 1.843 10.781C1.94129 10.8241 2.03344 10.8793 2.13172 10.9346C2.18087 10.9653 2.23616 10.9838 2.2853 11.0206C2.31602 11.0391 2.34059 11.0698 2.3713 11.0882C2.47573 11.1681 2.58631 11.2479 2.67846 11.3401C2.72146 11.3831 2.75831 11.4384 2.80132 11.4875C3.20676 11.9544 3.43405 12.538 3.43405 13.1584C3.43405 13.3181 3.50162 13.4656 3.60605 13.57C3.61834 13.5823 3.63677 13.5884 3.64906 13.6007C3.69206 13.6376 3.73506 13.6744 3.79035 13.6929C3.80263 13.699 3.81492 13.699 3.8272 13.699C3.88863 13.7236 3.95007 13.7359 4.01764 13.7359C4.07907 13.7359 4.13436 13.7174 4.1835 13.7051C4.20193 13.699 4.22036 13.699 4.23879 13.6929C4.30636 13.6621 4.37394 13.6191 4.42922 13.57C4.5398 13.4594 4.60123 13.3181 4.59509 13.1584C4.59509 12.8943 4.57051 12.6547 4.52137 12.4151Z", }), o.createElement("path", { d: "M7.40247 12.3107C7.36561 12.0281 7.31032 11.7455 7.24275 11.4752C7.11374 10.9592 6.92331 10.4739 6.67759 10.0132C6.08786 8.91358 5.19706 8.0044 4.10974 7.39623C4.07903 7.3778 4.05446 7.35938 4.02374 7.34095C3.69202 7.1628 3.34191 7.01538 2.97948 6.89252C2.94262 6.88023 2.9119 6.86795 2.87504 6.85566C2.86276 6.84952 2.85661 6.84952 2.84433 6.84338C2.50646 6.73894 2.16245 6.66523 1.80615 6.61608C1.72629 6.6038 1.65258 6.58537 1.57272 6.57922C1.49286 6.57308 1.40686 6.57308 1.32085 6.56694C1.17956 6.5608 1.04442 6.54851 0.903126 6.54851C0.817124 6.54851 0.731121 6.56694 0.651261 6.59765C0.595974 6.62223 0.540687 6.65294 0.491542 6.69594C0.393254 6.7758 0.32568 6.88023 0.282679 7.00309C0.26425 7.06453 0.251964 7.12596 0.251964 7.19353C0.251964 7.28567 0.270393 7.36553 0.301108 7.44539C0.313394 7.46997 0.331823 7.49454 0.350252 7.51911C0.380968 7.56825 0.40554 7.6174 0.442398 7.65426C0.460827 7.67269 0.491542 7.68497 0.516114 7.7034C0.559116 7.73412 0.602117 7.77098 0.651261 7.79555C0.675834 7.80783 0.706549 7.80783 0.737264 7.81398C0.792552 7.82626 0.841696 7.84469 0.903126 7.84469C1.26557 7.84469 1.61572 7.88155 1.95973 7.94912C2.02116 7.96141 2.08259 7.97984 2.14402 7.99827C2.2546 8.02284 2.35903 8.04741 2.46346 8.07813C2.49417 8.08427 2.51875 8.09656 2.54332 8.10884C2.57403 8.12113 2.60475 8.13342 2.63546 8.1457C2.7399 8.18256 2.83819 8.21327 2.94262 8.25628C3.02248 8.29313 3.09619 8.32999 3.17605 8.36685C3.24977 8.40371 3.32963 8.43442 3.40335 8.47743C3.47706 8.52043 3.54464 8.56343 3.61835 8.60643C3.69207 8.64943 3.76578 8.69243 3.83336 8.74158C3.9255 8.80301 4.01151 8.87058 4.09751 8.93815C4.14665 8.97501 4.1958 9.00573 4.2388 9.04259C4.75482 9.46646 5.19097 9.99476 5.51041 10.5845L5.51655 10.5906C5.63327 10.7995 5.72542 11.0268 5.81142 11.2541C5.88514 11.4445 5.94657 11.6411 5.99571 11.8438C6.04485 12.0465 6.08171 12.2493 6.10628 12.4643C6.13086 12.6731 6.14929 12.882 6.14929 13.097C6.14929 13.2751 6.223 13.4349 6.33972 13.5516C6.45644 13.6683 6.61616 13.742 6.80045 13.742C6.88645 13.742 6.97245 13.7236 7.05231 13.6929C7.20589 13.6253 7.32875 13.5024 7.39632 13.3489C7.42704 13.269 7.44547 13.1891 7.44547 13.097C7.45161 12.8267 7.43318 12.5687 7.40247 12.3107Z", }), ); } function ot(e) { const { className: t } = e; return o.createElement("svg", { width: "16", height: "16", viewBox: "0 0 23 24", fill: "none", className: t }, o.createElement("circle", { cx: "11.3115", cy: "12.247", r: "11.3115", fill: "#FFC82C" }), o.createElement("path", { d: "M9.61534 5.7H13.0733L12.5223 14.649H10.1473L9.61534 5.7ZM11.3253 15.96C11.8067 15.96 12.193 16.1057 12.4843 16.397C12.7883 16.6883 12.9403 17.081 12.9403 17.575C12.9403 18.069 12.7883 18.468 12.4843 18.772C12.193 19.076 11.8067 19.228 11.3253 19.228C10.8567 19.228 10.4767 19.076 10.1853 18.772C9.89401 18.468 9.74834 18.069 9.74834 17.575C9.74834 17.081 9.88768 16.6883 10.1663 16.397C10.4577 16.1057 10.844 15.96 11.3253 15.96Z", fill: "#1E2834" })); } function rt() { return o.createElement(S.MrB, { className: f.IconMobile }); } function at(e) { const { className: t, quality: n = 4 } = e; return o.createElement("svg", { width: "64", height: "64", viewBox: "0 0 64 64", fill: "none", className: (0, d.Z)(t, f[`BitRateQuality_${n}`]) }, o.createElement("g", null, o.createElement("rect", { x: "0", y: "49", width: "13", height: "15", fill: "currentColor" }), o.createElement("rect", { x: "18.5", y: "36", width: "10", height: "26.5", fill: n >= 2 ? "currentColor" : "transparent", strokeWidth: "3", stroke: "currentColor" }), o.createElement("rect", { x: "35.5", y: "22", width: "10", height: "40.5", fill: n >= 3 ? "currentColor" : "transparent", strokeWidth: "3", stroke: "currentColor" }), o.createElement("rect", { x: "52.5", y: "1.5", width: "10", height: "61", fill: 4 == n ? "currentColor" : "transparent", strokeWidth: "3", stroke: "currentColor" }))); } function st(e) { return e > 200 ? 1 : e > 66 ? 2 : e > 33 ? 3 : 4; } const lt = { 0: "#0056D6", 1: "#236C39", 2: "#B72828", 3: "#D0722D" }; function ct(e) { return lt[e]; } function mt(e, t) { const n = s.Ul.RemotePlayStore.GetPlayerInControllerSlot(e); let i = n ? s.Ul.RemotePlayStore.GetSessionForPlayer(n) : void 0; return !i && n && t && n.steamid === t.playerID.steamid && (i = t), i; } function dt() { const { hostPlayer: e, rgPlayers: t } = Qe(), n = new Map(), i = (function () { const [e, t] = o.useState([]); return o.useEffect(() => ((0, H.U5)("Input.RegisterForControllerListChanges") ? SteamClient.Input.RegisterForControllerListChanges(t).unregister : () => {}), []), e; })(); for (const e of i) { const t = e.nXInputIndex; n.has(t) || n.set(t, { nSlot: t }), (n.get(t).details = e); } const r = [e, ...t]; for (const e of r) { const t = s.Ul.RemotePlayStore.GetControllerSlotsForPlayer(e.playerID); for (const i of t) n.has(i) || n.set(i, { nSlot: i }), (n.get(i).player = e); } const a = Array.from(n.values()), l = o.useRef([]); return !a.some((e) => null == e.details || null == e.player) && (l.current = a), l.current; } function ht(e) { return { nSlot: e.nSlot, details: null == e.details ? void 0 : Object.assign({}, e.details), player: null == e.player ? void 0 : Object.assign({}, e.player) }; } const ut = (0, a.Pi)(function (e) { var t, n, i, r, a; const l = dt(), [m, d] = (0, k.rA)(l, null, 400); let u = null; const p = []; for (let e = 0; e < s.Ul.RemotePlayStore.priority_controller_slot_count; e++) m.find((t) => t.nSlot == e) || (null === u && (u = e), p.push({ label: (0, h.Xx)("#RemotePlay_ControllerSlot_Empty"), icon: o.createElement(c.X7U, { none: !0 }), key: `empty-${e}`, index: e, displayedIndex: e + 1, indexColor: ct(e), disabled: !0 })); for (const e of m) { const l = e.nSlot >= s.Ul.RemotePlayStore.priority_controller_slot_count, c = (null === (t = e.player) || void 0 === t ? void 0 : t.bGuest) ? (0, I.U0)(null === (n = e.player) || void 0 === n ? void 0 : n.strAvatarHash, "full") : null === (r = null === (i = e.player) || void 0 === i ? void 0 : i.friend) || void 0 === r ? void 0 : r.persona.avatar_url_full, d = 4 != e.details.eControllerType, _ = !l && m.length > 1, g = l && null !== u; let C, v; _ ? ((C = () => s.Ul.RemotePlayStore.RemoveControllerFromPrioritySlot(e.nSlot)), (v = (0, h.Xx)("#RemotePlay_DeactivateController"))) : g && ((C = () => s.Ul.RemotePlayStore.SwapControllerSlots(e.nSlot, u, !1)), (v = (0, h.Xx)("#RemotePlay_ReactivateController"))), p.push({ label: o.createElement(o.Fragment, null, o.createElement("div", { className: f.ReorderLabelName }, te(e.player)), c && o.createElement(Le, { src: c, className: f.ReorderLabelPersonaAvatar })), icon: o.createElement(Se, { controllerType: e.details.eControllerType, mobile: null === (a = e.player) || void 0 === a ? void 0 : a.bMobile }), key: e.details.nControllerIndex.toString(), index: e.nSlot, displayedIndex: e.details.nXInputIndex + 1, indexColor: l ? void 0 : ct(e.details.nXInputIndex), sectionName: l ? "inactive" : void 0, onOptionsButton: d ? () => s.Ul.RemotePlayStore.TriggerControllerRumble(e.nSlot) : void 0, onOptionsActionDescription: d ? (0, h.Xx)("#RemotePlay_IdentifyController") : void 0, onSecondaryButton: C, onSecondaryActionDescription: v }); } p.sort((e, t) => e.index - t.index); return o.createElement(V, { title: (0, h.Xx)("#RemotePlay_ControllerOrder"), items: p, sections: [{ name: "inactive", label: (0, h.Xx)("#RemotePlay_InactiveControllers") }], onMoveRelative: (e, t) => { const n = e + t, i = s.Ul.RemotePlayStore.SwapControllerSlots(e, n, !1); return ( i && d( (function (e, t, n) { const i = e.map(ht), o = i.find((e) => e.nSlot == t), r = i.find((e) => e.nSlot == n); if (o && r) { const e = o.nSlot; (o.nSlot = r.nSlot), (r.nSlot = e); } else o && (o.nSlot = n); return (null == o ? void 0 : o.details) && (o.details.nXInputIndex = o.nSlot), (null == r ? void 0 : r.details) && (r.details.nXInputIndex = r.nSlot), i; })(m, e, n), ), i ); }, closeModal: e.closeModal, }); }); function pt(e) { return o.createElement(Ze.Provider, { value: e.context }, o.createElement(E.fI, Object.assign({}, e.configContext), e.children(e.closeModal))); } function _t(e) { const [t, n] = o.useState([]); return o.createElement( m.e1, { onEscKeypress: e.closeModal }, o.createElement( l.oX, { onSubmit: () => { for (const n of t) { if (s.Ul.FriendStore.self === n) return; s.Ul.RemotePlayStore.CreateInviteAndSession(n.accountid, s.Ul.FriendStore.self.persona.m_gameid, e.browserContext); } e.closeModal && e.closeModal(); }, className: "friendsui-container", }, o.createElement(l.h4, null, (0, h.Xx)("#RemotePlay_InviteFriend_Verbose")), o.createElement(l.uT, null, o.createElement(W.B, { label: (0, h.Xx)("#RemotePlay_FriendsToInvite"), eSort: 2, rgPickedFriends: t, onChange: n, autoFocus: !0 })), o.createElement(l.$_, null, o.createElement(l.o9, { onCancel: e.closeModal })), ), ); } function gt(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { n = null != n ? n : window; const i = (0, b.rb)(n), r = "addfriend"; if (!s.Ul.RemotePlayStore.BDialogOpenInContext(i, r)) { const a = o.createElement(pt, { context: e, configContext: t }, (e) => o.createElement(_t, { closeModal: e, browserContext: i })), l = () => { s.Ul.RemotePlayStore.DialogClosed(i, r); }, c = s.Ul.IsGamepadUIActive() ? void 0 : 664, d = s.Ul.IsGamepadUIActive() ? void 0 : 580, u = yield (0, m.AM)(a, n, { fnOnClose: l, popupWidth: c, popupHeight: d, strTitle: (0, h.Xx)("#RemotePlay_InviteFriend_Verbose"), bHideMainWindowForPopouts: !1, browserContext: i }); s.Ul.RemotePlayStore.DialogOpened(i, () => u.Close(), r); } }); } }, 7098: (e, t, n) => { "use strict"; n.d(t, { L: () => E }); var i = n(85556), o = n(72746), r = n(37234), a = n(19953), s = n(68816), l = n(27378), c = n(50649), m = n(97224), d = n(2049), h = n(84290), u = n(11259), p = n(38461), _ = n(46057), g = n(16518), C = n(43965), f = n.n(C), v = n(87018); let S = class extends l.Component { constructor(e) { super(e), (this.m_rgMicOptions = [{ label: "Default", data: "default" }]), (this.m_rgOutputOptions = [{ label: "Default", data: "default" }]), (this.state = { showAdvanced: !1, micOptionsReady: !1, outputOptionsReady: !1, hotkeyCapturing: !1 }), navigator.mediaDevices.enumerateDevices().then(this.gotMediaDevices).catch(this.gotMediaDevicesError); } gotMediaDevices(e) { for (let t = 0; t < e.length; ++t) { let n = e[t]; if ("audioinput" == n.kind) { if ("default" != n.deviceId) { let e = n.label; "communications" == n.deviceId && (e = (0, h.Xx)("#Voice_DefaultCommunicationsDefault")), this.m_rgMicOptions.push({ label: e, data: n.deviceId }); } } else if ("audiooutput" == n.kind && "default" != n.deviceId) { let e = n.label; "communications" == n.deviceId && (e = (0, h.Xx)("#Voice_DefaultCommunicationsDefault")), this.m_rgOutputOptions.push({ label: e, data: n.deviceId }); } } this.setState({ micOptionsReady: !0 }), this.setState({ outputOptionsReady: !0 }); } gotMediaDevicesError() { this.setState({ micOptionsReady: !0 }), this.setState({ outputOptionsReady: !0 }); } onSubmit() { return !1; } VoiceSettingsRefMarker(e) { e && e.ownerDocument && ((this.m_elVoiceSettingsMarkerScroll = e), (this.m_window = e.ownerDocument.defaultView)); } OnShowAdvancedSettings() { this.setState({ showAdvanced: !this.state.showAdvanced }), (this.m_iTimeOutVoiceSettingsScroll = this.m_window.setTimeout(() => { this.m_elVoiceSettingsMarkerScroll && this.state.showAdvanced && this.m_elVoiceSettingsMarkerScroll.scrollIntoView({ behavior: "smooth" }), this.m_window.clearTimeout(this.m_iTimeOutVoiceSettingsScroll); }, 200)); } OnMicDropdownChanged(e) { this.props.voiceStore.SetSelectedMic(e.data); } OnOutputDeviceDropdownChanged(e) { this.props.voiceStore.SetSelectedOutput(e.data); } OnInputGainChanged(e) { this.props.voiceStore.SetVoiceInputGain(this.props.voiceStore.ConvertSliderToGainValue(e, p.Ys.k_MaxInputOutputGainValue)); } OnOutputGainChanged(e) { this.props.voiceStore.SetVoiceOutputGain(this.props.voiceStore.ConvertSliderToGainValue(e, p.Ys.k_MaxInputOutputGainValue)); } SetHotKeyCaptureState(e) { 0 == e ? (null != SteamClient.WebChat && null != SteamClient.WebChat.UnregisterForMouseXButtonDown && SteamClient.WebChat.UnregisterForMouseXButtonDown(), this.setState({ hotkeyCapturing: !1 })) : (this.setState({ hotkeyCapturing: !0 }), null != SteamClient.WebChat && null != SteamClient.WebChat.RegisterForMouseXButtonDown && SteamClient.WebChat.RegisterForMouseXButtonDown(this.OnXButtonDown)); } OnXButtonDown(e) { e > 0 && this.state.hotkeyCapturing && (null != SteamClient.WebChat && null != SteamClient.WebChat.SetPushToTalkMouseButton && (SteamClient.WebChat.SetPushToTalkMouseButton(e), o.Ul.VoiceStore.RefreshPushToTalkKeySettings()), this.SetHotKeyCaptureState(!1)); } OnTogglePushToTalk() { if ("undefined" != typeof SteamClient && null != SteamClient.WebChat && null != SteamClient.WebChat.SetPushToTalkEnabled) { let e = o.Ul.VoiceStore.GetPushToTalkEnabled(); SteamClient.WebChat.SetPushToTalkEnabled(!e), o.Ul.VoiceStore.SetPushToTalkEnabled(!e); } } AssignHotkey() { 0 == this.state.hotkeyCapturing && this.SetHotKeyCaptureState(!0); } ClearHotKey() { "undefined" != typeof SteamClient && null != SteamClient.WebChat && null != SteamClient.WebChat.SetPushToTalkHotKey && (SteamClient.WebChat.SetPushToTalkHotKey(0), o.Ul.VoiceStore.RefreshPushToTalkKeySettings()); } OnTransmissionTypeChange(e) { if ("undefined" != typeof SteamClient && SteamClient.WebChat) if ("pushtomute" === e) SteamClient.WebChat.SetPushToMuteEnabled && (SteamClient.WebChat.SetPushToMuteEnabled(!0), o.Ul.VoiceStore.SetPushToMuteEnabled(!0)); else if ("openmic" === e || "pushtotalk" === e) { const t = "pushtotalk" === e; SteamClient.WebChat.SetPushToTalkEnabled && (SteamClient.WebChat.SetPushToTalkEnabled(t), o.Ul.VoiceStore.SetPushToTalkEnabled(t)); } } onMouseDown(e) { 0 != this.state.hotkeyCapturing && 0 != e.button && this.onClick(e); } onClick(e) { 0 != this.state.hotkeyCapturing && (null != SteamClient.WebChat && null != SteamClient.WebChat.SetPushToTalkMouseButton && (SteamClient.WebChat.SetPushToTalkMouseButton(e.button), o.Ul.VoiceStore.RefreshPushToTalkKeySettings()), this.SetHotKeyCaptureState(!1), e.preventDefault(), e.stopPropagation()); } onContextMenu(e) { e.preventDefault(), e.stopPropagation(); } onKeyDown(e) { 0 != this.state.hotkeyCapturing && (null != SteamClient.WebChat && null != SteamClient.WebChat.SetPushToTalkHotKey && (SteamClient.WebChat.SetPushToTalkHotKey(e.keyCode), o.Ul.VoiceStore.RefreshPushToTalkKeySettings()), this.SetHotKeyCaptureState(!1), e.preventDefault(), e.stopPropagation()); } OnPPTSoundChecked(e) { o.Ul.VoiceStore.SetPushToTalkOrMuteSoundsEnabled(e); } componentWillUnmount() { o.Ul.VoiceStore.IsLocalMicTestActive() && o.Ul.VoiceStore.EndLocalMicTest(); } OnStartLocalMicTest() { o.Ul.VoiceStore.InitiateLocalMicTest(); } OnStopLocalMicTest() { o.Ul.VoiceStore.EndLocalMicTest(); } render() { let e = o.Ul.VoiceStore.GetPushToTalkEnabled(), t = o.Ul.VoiceStore.GetPushToMuteEnabled(), n = !1, i = o.Ul.VoiceStore.GetPushToTalkHotKeyDisplayString(), r = (0, h.Xx)("#VoicePushToTalkAssigned"), a = (0, h.Xx)("#VoicePushToMuteAssigned"), s = (0, h.Xx)("#VoiceMuteToggleAssigned"), c = o.Ul.VoiceStore.GetPushToTalkOrMuteSoundsEnabled(), m = (o.Ul.SettingsStore.BClientHasFeatureOrOnWeb("NewVoiceHotKeyState"), o.Ul.VoiceStore.IsLocalMicTestActive()), d = o.Ul.FriendStore.self; "undefined" != typeof SteamClient && null != SteamClient.WebChat && null != SteamClient.WebChat.GetPushToTalkEnabled && (n = !0), this.state.hotkeyCapturing && (r = (0, h.Xx)("#VoicePushToTalkPressHotKey")); const C = t ? "pushtomute" : e ? "pushtotalk" : "openmic"; return l.createElement( u.l0, { className: (0, v.Z)("DialogBody", "VoiceSettings", f().VoiceSettings), onContextMenu: this.onContextMenu, onSubmit: this.onSubmit, onMouseDown: this.onMouseDown, onClick: this.onClick, onKeyDown: this.onKeyDown }, l.createElement( "div", { className: "_FixedHeight" }, l.createElement("div", { className: "voiceSelfHeader" }, l.createElement("div", { className: "DialogLabel" }, (0, h.Xx)("#VoiceSetupHeader")), l.createElement("div", { className: "voiceMicTestContainer" }, l.createElement("div", { className: "voiceSelfDirections", title: (0, h.Xx)("#VoiceWhenMicIsWorking") }, l.createElement(_.mo, { friend: d, key: d.accountid, showVoiceLevel: !0, context: void 0, noActions: !0, listStatusIndicator: l.createElement("div", { className: "connectionSpinner" }) }), l.createElement(u.zx, { className: "LocalMicTestButton " + (m ? "Primary" : "Off"), onClick: m ? this.OnStopLocalMicTest : this.OnStartLocalMicTest }, m ? (0, h.Xx)("#VoiceStopLocalMicTest") : (0, h.Xx)("#VoiceStartLocalMicTest"))))), this.state.micOptionsReady && l.createElement(u.ry, { strClassName: "InputDevice", label: (0, h.Xx)("#VoiceDevice"), rgOptions: this.m_rgMicOptions, strDefaultLabel: (0, h.Xx)("#DefaultMic"), selectedOption: this.props.voiceStore.GetSelectedMic(), onChange: this.OnMicDropdownChanged }), !this.state.micOptionsReady && l.createElement(u.ry, { label: (0, h.Xx)("#VoiceDevice"), rgOptions: this.m_rgMicOptions, strDefaultLabel: (0, h.Xx)("#MicLoading...") }), this.state.outputOptionsReady && l.createElement(u.ry, { label: (0, h.Xx)("#VoiceOutputDevice"), rgOptions: this.m_rgOutputOptions, strDefaultLabel: (0, h.Xx)("#DefaultOutputDevice"), selectedOption: this.props.voiceStore.GetSelectedOutputDevice(), onChange: this.OnOutputDeviceDropdownChanged }), !this.state.outputOptionsReady && l.createElement(u.ry, { label: (0, h.Xx)("#VoiceOutputDevice"), rgOptions: this.m_rgOutputOptions, strDefaultLabel: (0, h.Xx)("#OutputDeviceLoading...") }), l.createElement(u.__, null, (0, h.Xx)("#VoiceVolume")), l.createElement(u.Uq, { className: "DialogLabelStrong" }, l.createElement(u.DS, { min: 0, max: 100, label: (0, h.Xx)("#VoiceInputGain"), description: (0, h.Xx)("#VoiceInputGainExplainer"), value: this.props.voiceStore.ConvertGainValueToSliderValue(this.props.voiceStore.GetVoiceInputGain(), p.Ys.k_MaxInputOutputGainValue), onChange: this.OnInputGainChanged }), l.createElement(u.DS, { min: 0, max: 100, label: (0, h.Xx)("#VoiceOutputGain"), description: (0, h.Xx)("#VoiceOutputGainExplainer"), value: this.props.voiceStore.ConvertGainValueToSliderValue(this.props.voiceStore.GetVoiceOutputGain(), p.Ys.k_MaxInputOutputGainValue), onChange: this.OnOutputGainChanged })), "undefined" != typeof SteamClient && null != SteamClient.WebChat && null != SteamClient.WebChat.SetPushToMuteEnabled ? l.createElement( "div", { className: "_DialogSection pushToTalkSection" + (n ? "" : " disabled") }, l.createElement(u.__, null, (0, h.Xx)("#VoiceTransmissionType_Label"), !n && l.createElement("span", { className: "disabledNotice" }, " (", (0, h.Xx)("#VoiceTransmissionType_Disabled"), ") ")), l.createElement( "div", { className: f().TransmissionTypeSettings }, l.createElement(u.SY, { value: C, onChange: this.OnTransmissionTypeChange }, l.createElement(u.EU, { value: "openmic" }, (0, h.Xx)("#VoiceTransmissionType_OpenMic")), l.createElement(u.EU, { value: "pushtotalk" }, (0, h.Xx)("#VoiceTransmissionType_PushToTalk")), l.createElement(u.EU, { value: "pushtomute" }, (0, h.Xx)("#VoiceTransmissionType_PushToMute"))), l.createElement("div", { className: f().HotkeySettingRow }, l.createElement("div", { className: f().HotkeySettingDescription }, e ? r : t ? a : s), l.createElement(u.zx, { disabled: !n, className: (0, v.Z)(f().HotkeyButton, this.state.hotkeyCapturing && f().Capturing), onClick: this.AssignHotkey }, i), !e && !t && l.createElement(u.zx, { className: f().HotkeyClearButton, onClick: this.ClearHotKey, title: (0, h.Xx)("#VoiceClearHotKeyTooltip") }, l.createElement(g.pVO, null))), l.createElement("div", { className: f().HotkeySettingRow }, l.createElement("span", { className: f().HotkeySettingDescription }, (0, h.Xx)("#VoicePushToSomethingSoundOption")), l.createElement(u.hp, { value: c, onChange: (e) => this.OnPPTSoundChecked(e) })), ), ) : l.createElement("div", { className: "_DialogSection pushToTalkSection" + (n ? "" : " disabled") }, l.createElement(u.__, null, (0, h.Xx)("#VoiceTransmissionType"), !n && l.createElement("span", { className: "disabledNotice" }, " (", (0, h.Xx)("#g_DisabledOnWeb"), ") ")), l.createElement(u.nf, { disabled: !n, label: (0, h.Xx)("#VoiceTransmissionTypeExplainer"), value: e, onChange: this.OnTogglePushToTalk }), e && l.createElement("div", { className: "pushtoTalkKeyAssignContainer displayRow" }, l.createElement(u.__, { className: "DialogLabelExplainer" }, r), l.createElement(u.zx, { disabled: !n, className: this.state.hotkeyCapturing && "capturingKey", onClick: this.AssignHotkey }, i))), l.createElement(b, { voiceStore: this.props.voiceStore }), l.createElement(u.zx, { className: (0, v.Z)("advancedSettingsButton", f().AdvancedSettingsButton), onClick: this.OnShowAdvancedSettings }, this.state.showAdvanced ? (0, h.Xx)("#VoiceHideAdvancedSettings") : (0, h.Xx)("#VoiceShowAdvancedSettings"), l.createElement(g.$gZ, null)), l.createElement(I, { voiceStore: this.props.voiceStore, visible: this.state.showAdvanced }), l.createElement("div", { className: "scrollToRef", ref: this.VoiceSettingsRefMarker }), ), ); } }; (0, i.gn)([d.ak], S.prototype, "gotMediaDevices", null), (0, i.gn)([d.ak], S.prototype, "gotMediaDevicesError", null), (0, i.gn)([d.ak], S.prototype, "onSubmit", null), (0, i.gn)([d.ak], S.prototype, "VoiceSettingsRefMarker", null), (0, i.gn)([d.ak], S.prototype, "OnShowAdvancedSettings", null), (0, i.gn)([d.ak], S.prototype, "OnMicDropdownChanged", null), (0, i.gn)([d.ak], S.prototype, "OnOutputDeviceDropdownChanged", null), (0, i.gn)([d.ak], S.prototype, "OnInputGainChanged", null), (0, i.gn)([d.ak], S.prototype, "OnOutputGainChanged", null), (0, i.gn)([d.ak], S.prototype, "OnXButtonDown", null), (0, i.gn)([d.ak], S.prototype, "OnTogglePushToTalk", null), (0, i.gn)([d.ak], S.prototype, "AssignHotkey", null), (0, i.gn)([d.ak], S.prototype, "ClearHotKey", null), (0, i.gn)([d.ak], S.prototype, "OnTransmissionTypeChange", null), (0, i.gn)([d.ak], S.prototype, "onMouseDown", null), (0, i.gn)([d.ak], S.prototype, "onClick", null), (0, i.gn)([d.ak], S.prototype, "onContextMenu", null), (0, i.gn)([d.ak], S.prototype, "onKeyDown", null), (0, i.gn)([d.ak], S.prototype, "OnPPTSoundChecked", null), (0, i.gn)([d.ak], S.prototype, "OnStartLocalMicTest", null), (0, i.gn)([d.ak], S.prototype, "OnStopLocalMicTest", null), (S = (0, i.gn)([c.Pi], S)); const b = (0, c.Pi)((e) => { const { voiceStore: t } = e, n = t.GetUseNoiseGateLevel(), i = n === p.S7.k_ENoiseGateLevel_Low ? p.S7.k_ENoiseGateLevel_Off : n; return l.createElement("div", { className: "_DialogSection" }, l.createElement(u.__, null, (0, h.Xx)("#VoiceTransmisionThreshold")), l.createElement(u.__, { className: "DialogLabelStrong" }, (0, h.Xx)("#VoiceTransmissionThresholdExplainer")), l.createElement(u.SY, { value: i, onChange: (e) => t.SetUseNoiseGateLevel(e) }, l.createElement(u.EU, { value: p.S7.k_ENoiseGateLevel_Off }, (0, h.Xx)("#VoiceTransmissionThresholdOff")), l.createElement(u.EU, { value: p.S7.k_ENoiseGateLevel_Medium }, (0, h.Xx)("#VoiceTransmissionThresholdMedium"), l.createElement("span", { className: f().RecommendedNote }, (0, h.Xx)("#VoiceTransmissionThresholdRecommended"))), l.createElement(u.EU, { value: p.S7.k_ENoiseGateLevel_High }, (0, h.Xx)("#VoiceTransmissionThresholdHigh")))); }); const I = (0, c.Pi)((e) => { const { voiceStore: t, visible: n } = e; return l.createElement( "div", { className: "advancedSettings" + (n ? " showAdvanced" : "") }, l.createElement(u.__, null, (0, h.Xx)("#VoiceAdvancedSettings")), l.createElement(u.__, { className: "DialogLabelExplainer Left" }, (0, h.Xx)("#VoiceAdvancedSettingsExplainer")), l.createElement(u.nf, { className: f().ToggleRow, label: (0, h.Xx)("#VoiceEchoCancellation"), value: t.GetUseEchoCancellation(), onChange: (e) => t.SetUseEchoCancellation(e) }), l.createElement(u.nf, { className: f().ToggleRow, label: (0, h.Xx)("#VoiceNoiseCancellation"), value: t.GetUseNoiseCancellation(), onChange: (e) => t.SetUseNoiseCancellation(e) }), l.createElement(u.nf, { className: f().ToggleRow, label: (0, h.Xx)("#VoiceAutoGainControl"), value: t.GetUseAutoGainControl(), onChange: (e) => t.SetUseAutoGainControl(e) }), l.createElement( u.zx, { className: "copyVoiceLogsButton", onClick: () => (function (e) { const t = e.GetVoiceLogs(), n = document.createElement("textarea"); (n.textContent = t), (n.style.position = "fixed"), document.body.appendChild(n), n.select(); try { document.execCommand("copy"); } catch (e) { console.warn("Copy voice logs to clipboard failed.", e); } finally { document.body.removeChild(n); } })(t), }, (0, h.Xx)("#CopyVoiceChatLogs"), ), ); }); var y = n(85516); function E(e, t, n) { (0, s.BR)(l.createElement(D, { browserContext: e, startingPage: n }), t, (0, h.Xx)("#FriendSettings_Title"), { strTitle: (0, h.Xx)("#FriendSettings_Title"), popupWidth: 842, popupHeight: 720 }, (0, r.Og)(t)); } let D = class extends l.Component { constructor(e) { super(e, (0, h.Xx)("#Settings")); } SaveFriendSettings(e, t) { o.Ul.SettingsStore.BUpdateFriendsSettings(e), o.Ul.SettingsStore.SetCommunityPreferences(t); } render() { let e = o.Ul.UIStore.GetPerContextChatData(this.props.browserContext), t = { friendsSettingsInitial: o.Ul.SettingsStore.FriendsSettings, communityPreferencesInitial: o.Ul.SettingsStore.CommunityPreferences, onCancel: this.props.closeModal, onSubmit: this.SaveFriendSettings, bShowClientOpts: a.De.IN_CLIENT, bShowPopupOpts: e.BUsePopups(), bShowGroupOpts: !0, bSubmitImmediate: !0, bDoNotDisturbSupported: a.De.IN_CLIENT && o.Ul.SettingsStore.BClientHasFeatureOrOnWeb("DoNotDisturb") }, n = { title: (0, h.Xx)("#FriendSettings_Title"), className: "FriendSettingsContainer", pages: [ { title: (0, h.Xx)("#FriendSettings_Friends"), identifier: "friends", content: l.createElement(m.a$, Object.assign({}, t)) }, { title: (0, h.Xx)("#FriendSettings_Chat"), identifier: "chat", content: l.createElement(m.UD, Object.assign({}, t)) }, { title: (0, h.Xx)("#FriendSettings_SizeAndScaling"), identifier: "sizeAndScaling", content: l.createElement(m.fR, Object.assign({}, t)) }, { title: (0, h.Xx)("#FriendSettings_Notifications"), identifier: "notifications", content: l.createElement(w, Object.assign({}, t)) }, { title: (0, h.Xx)("#FriendSettings_Voice"), identifier: "voice", content: l.createElement(S, { onCancel: this.props.closeModal, voiceStore: o.Ul.ChatStore.VoiceChat }) }, ], startingPage: this.props.startingPage, }; return l.createElement(s.e1, { onEscKeypress: this.props.closeModal }, l.createElement(u.TI, Object.assign({}, n))); } }; D = (0, i.gn)([c.Pi], D); let w = class extends m.gy { constructor(e) { super(e), (this.m_rgOptions = (0, y.nP)(!1)); } FriendsSettingsNotificationRow(e) { let t = this.FriendsSettingsCheckbox; return l.createElement("div", null, l.createElement("div", { className: "FriendsSettingsNotificationRow" }, l.createElement("div", { className: "FriendsSettingsNotificationRow_Label" }, e.strLabel), l.createElement("div", { className: "FriendsSettingsNotificationRow_Checkbox" }, l.createElement(t, { strName: e.strNameShow })), l.createElement("div", { className: "FriendsSettingsNotificationRow_Checkbox" }, l.createElement(t, { strName: e.strNameSound })))); } render() { let e = this.state.friendSettings, t = this.FriendsSettingsNotificationRow; return l.createElement( u.l0, { className: "DialogBody", onSubmit: this.OnSubmit }, l.createElement( "div", { className: "SettingsGroup" }, l.createElement("div", { className: "FriendsSettingsNotificationRow FriendsSettingsNotificationRow_Header" }, l.createElement("div", { className: "FriendsSettingsNotificationRow_Label" }, (0, h.Xx)("#FriendSettings_Notification_Table_Label")), l.createElement("div", { className: "FriendsSettingsNotificationRow_Checkbox" }, (0, h.Xx)("#FriendSettings_Notification_Table_Show")), l.createElement("div", { className: "FriendsSettingsNotificationRow_Checkbox" }, (0, h.Xx)("#FriendSettings_Notification_Table_Play"))), l.createElement(t, { strLabel: (0, h.Xx)("#FriendSettings_Notification_FriendJoins"), strNameShow: "bNotifications_ShowIngame", strNameSound: "bSounds_PlayIngame" }), l.createElement(t, { strLabel: (0, h.Xx)("#FriendSettings_Notification_FriendOnline"), strNameShow: "bNotifications_ShowOnline", strNameSound: "bSounds_PlayOnline" }), l.createElement(t, { strLabel: (0, h.Xx)("#FriendSettings_Notification_ChatMessage"), strNameShow: "bNotifications_ShowMessage", strNameSound: "bSounds_PlayMessage" }), l.createElement(t, { strLabel: (0, h.Xx)("#FriendSettings_Notification_ChatRoomNotification"), strNameShow: "bNotifications_ShowChatRoomNotification", strNameSound: "bSounds_PlayChatRoomNotification" }), this.props.bShowGroupOpts && l.createElement(t, { strLabel: (0, h.Xx)("#FriendSettings_Notification_GroupEvent"), strNameShow: "bNotifications_EventsAndAnnouncements", strNameSound: "bSounds_EventsAndAnnouncements" }), ), this.props.bShowPopupOpts && this.props.bShowClientOpts && l.createElement("div", { className: "SettingsGroup" }, l.createElement("div", { className: "FriendsSettingsFlashSection" }, l.createElement(u.__, { className: "FriendsSettingsFlashSection_Header" }, (0, h.Xx)("#FriendSettings_Flash_Header")), l.createElement(u.FT, { className: "FriendsSettingsFlashSection_ButtonRow" }, l.createElement(u.zx, { className: 0 == e.nChatFlashMode ? "Primary" : "Off", value: 0, onClick: this.HandleRadioChange }, (0, h.Xx)("#FriendSettings_Flash_Always")), l.createElement(u.zx, { className: 1 == e.nChatFlashMode ? "Primary" : "Off", value: 1, onClick: this.HandleRadioChange }, (0, h.Xx)("#FriendSettings_Flash_Minimized")), l.createElement(u.zx, { className: 2 == e.nChatFlashMode ? "Primary" : "Off", value: 2, onClick: this.HandleRadioChange }, (0, h.Xx)("#FriendSettings_Flash_Never"))))), !this.props.bSubmitImmediate && l.createElement(u.o9, { onCancel: this.props.onCancel }), ); } }; (0, i.gn)([d.ak], w.prototype, "FriendsSettingsNotificationRow", null), (w = (0, i.gn)([c.Pi], w)); }, 71357: (e, t, n) => { "use strict"; n.d(t, { MS: () => c, Tt: () => u, V3: () => m, kQ: () => h, p3: () => l, zp: () => d }); var i = n(68816), o = n(37234), r = n(72746), a = n(84290), s = n(65204); function l(e, t, n, r, l = (0, a.Xx)("#Button_Cancel"), c, m, d) { return (0, s.SQ)( (n) => { let r = u(e, t, d); (0, i.BR)(n, e, "alertdialog", r, d || (0, o.Og)(e)); }, t, n, r, l, c, m, ); } function c(e, t, n, i = (0, a.Xx)("#Button_Cancel"), o, s) { const c = r.Ul.GetDefaultBrowserContext(); return l(window, e, t, n, i, o, s, c); } function m(e, t, n, i, o = (0, a.Xx)("#Button_Cancel"), r, s) { return l(e, t, n, i, o, r, s) .then(() => Promise.resolve(!0)) .catch(() => Promise.resolve(!1)); } function d(e, t, n, r = (0, a.Xx)("#Button_OK"), l, c, m) { return (0, s.E_)( (n) => { let r = u(e, t, c, m); (0, i.BR)(n, e, "alertdialog", r, c || (0, o.Og)(e)); }, t, n, r, l, ); } function h(e, t, n = (0, a.Xx)("#Button_OK"), i) { var o, s; const l = r.Ul.GetDefaultBrowserContext(), c = r.Ul.UIStore.GetPerContextChatData(l), m = null !== (s = null === (o = null == c ? void 0 : c.friends_list_window) || void 0 === o ? void 0 : o.GetWindow()) && void 0 !== s ? s : window; return d(window, e, t, n, i, l, m); } function u(e, t, n, i) { return r.Ul.UIStore.GetPerContextChatData(n || (0, o.rb)(e)).BUsePopups() && e.innerWidth < 600 ? { strTitle: t, popupWidth: 638, popupHeight: 300, openerWindow: i } : null; } }, 19411: (e, t, n) => { "use strict"; n.d(t, { zd: () => B, yd: () => T, Q5: () => O }); var i = n(85556), o = n(10167), r = n(50649), a = n(27378), s = n(37634), l = n(33690), c = n(88669), m = n(84290), d = n(2049), h = n(72746), u = n(90656), p = n(88991), _ = n(66156), g = n(66508), C = n(87018), f = n(58046), v = n(49361), S = n.n(v), b = n(70215), I = n(29205); n(38060); let y = class extends a.Component { render() { const { community_data: e } = this.props; let t = e && e.favorite_badge; return t ? a.createElement("div", { className: (0, C.Z)(S().miniProfileFeaturedContainer, this.props.className) }, a.createElement("div", { className: S().favoriteBadgeIcon }, a.createElement("img", { src: t.icon, className: S().badgeIcon })), a.createElement("div", { className: (0, C.Z)(S().featuredLabels, S().favoriteBadgeDescription) }, a.createElement("div", { className: S().featuredTitle }, t.name), a.createElement("div", { className: S().featuredSubTitle }, (0, m.Xx)("#Hover_BadgeXP", t.xp)))) : null; } }; y = (0, i.gn)([r.Pi], y); let E = class extends a.Component { render() { const { community_data: e, className: t } = this.props; return e ? a.createElement("div", { className: (0, C.Z)(S().miniProfileFeaturedContainer, t) }, a.createElement("div", { className: e.level_class }, a.createElement("span", { className: S().friendPlayerLevelNum }, e.level)), a.createElement("div", { className: S().featuredLabels }, a.createElement("div", { className: S().featuredTitle }, (0, m.Xx)("#Hover_SteamLevel") + " "))) : null; } }; E = (0, i.gn)([r.Pi], E); let D = class extends a.Component { render() { let e = this.props.persona; return a.createElement("div", { className: (0, C.Z)(S().miniProfileGameContainer, this.props.className) }, this.props.persona.GetCurrentGameLogoURL() && a.createElement("img", { className: S().gameLogo, src: this.props.persona.GetCurrentGameLogoURL() }), a.createElement("div", { className: (0, C.Z)(S().gameContent, S().persona, S().ingame, S().ellipsis) }, a.createElement("div", { className: S().gameState }, (0, m.Xx)(e.is_in_nonsteam_game ? "#PersonaStateInNonSteamGame" : "#PersonaStateInGame")), this.props.persona.GetCurrentGameName(), this.props.persona.HasCurrentGameRichPresence() && a.createElement("div", { className: S().richPresence }, this.props.persona.GetCurrentGameRichPresence()), this.props.in_game_section_additional)); } }; D = (0, i.gn)([r.Pi], D); let w = class extends a.Component { render() { let e, t, n = this.props.broadcast_description; return n && ((e = (0, m.Xx)("#PersonaStateWatchingBroadcast")), (t = n)), a.createElement("div", { className: (0, C.Z)(S().miniProfileGameContainer, this.props.className) }, this.props.persona.GetBroadcastGameLogoURL() && a.createElement("img", { className: S().gameLogo, src: this.props.persona.GetBroadcastGameLogoURL() }), a.createElement("div", { className: (0, C.Z)(S().gameContent, S().persona, S().watchingbroadcast, S().ellipsis) }, a.createElement("div", { className: S().gameState }, e), t && a.createElement("div", { className: S().richPresence }, t), a.createElement("div", { className: S().watchingbroadcastThumbnail }, this.props.broadcast_thumbnail))); } }; w = (0, i.gn)([r.Pi], w); let R = class extends a.Component { render() { const e = this.props, { className: t, persona: n, data_loader: o, community_data_override: r, nickname: s, is_friend: l, is_blocked: c, friend_relationship: d, broadcast_description: h, broadcast_thumbnail: u, mutual_friends: p, in_game_section_additional: _, bottom_section_additional: v } = e, I = (0, i._T)(e, ["className", "persona", "data_loader", "community_data_override", "nickname", "is_friend", "is_blocked", "friend_relationship", "broadcast_description", "broadcast_thumbnail", "mutual_friends", "in_game_section_additional", "bottom_section_additional"]); let R = o.community_data; r && (R = Object.assign(Object.assign({}, R), r)); const k = Object.keys((R && R.profile_background) || {}).length > 0; let T, L = S().miniProfileContent; n.is_ingame ? (T = a.createElement(D, Object.assign({}, this.props, { className: k ? S().miniProfileBackdropBlur : void 0 }))) : n.is_watchingbroadcast ? (T = a.createElement(w, Object.assign({}, this.props, { className: k ? S().miniProfileBackdropBlur : void 0 }))) : (L += " " + S().notInOrWatchingGame); let G = !0, O = !1, F = !1; l || ((L += " " + S().notFriends), (G = !1)), c && ((L += " " + S().communicationBlocked), (F = !0)); let B, x = void 0 !== s, N = n.is_awayOrSnooze; return ( (B = x ? a.createElement("div", null, a.createElement("div", { className: S().personaAndIcons }, a.createElement("div", { className: (0, C.Z)(S().personaName, S().nickName) }, a.createElement("div", { className: S().personaNameLabel }, this.props.nickname), a.createElement("div", { className: S().playerNicknameBracket, title: (0, m.Xx)("#isNickname") }, "*")), a.createElement(g._, { persona: n })), a.createElement("div", { className: (0, C.Z)(S().personaName, S().hasNickname) }, "(", a.createElement("div", { className: S().personaNameLabel }, n.m_strPlayerName), ")")) : a.createElement("div", { className: S().personaAndIcons }, a.createElement("div", { className: S().personaName }, a.createElement("div", { className: S().personaNameLabel }, n.m_strPlayerName)), a.createElement(g._, { persona: n }))), 2 == this.props.friend_relationship && (O = !0), a.createElement( a.Fragment, null, a.createElement( "div", Object.assign({ key: n.GetAccountID(), className: (0, C.Z)(this.props.className, S().miniProfile) }, I), a.createElement( "div", { className: L }, a.createElement(A, { community_data: R, persona: n }), a.createElement( "div", { className: S().miniProfileHeader }, a.createElement( "div", { className: (0, C.Z)(S().miniProfilePlayer, n.online_state, N && S().isAway, (0, b.sB)(n)) }, a.createElement(M, { persona: this.props.persona, community_data: R }), N && a.createElement(f.a, { persona: n, animating: !0, className: S().SnoozeContainer, size: "large" }), a.createElement("div", { className: S().playerContent }, a.createElement("div", { className: S().playerName }, a.createElement("div", { className: S().persona }, B, N && a.createElement("div", { className: S().awayStatusLabel }, (0, m.Xx)("#PersonaStateAway")), !n.is_online && a.createElement("div", { className: S().awayStatusLabel }, this.props.persona.GetLocalizedOnlineStatus()), "online" == n.online_state && !N && a.createElement("div", { className: S().awayStatusLabel }, (0, m.Xx)("#PersonaStateOnline")), !G && a.createElement("div", { className: S().miniProfileNotFriends }, O ? (0, m.Xx)("#Friend_Menu_NotAFriendRequesting") : (0, m.Xx)("#Friend_Menu_NotAFriendLabel")), F && a.createElement("div", { className: S().miniProfileBlocked }, (0, m.Xx)("#PersonaStateBlocked"))))), ), ), T, a.createElement("div", { className: (0, C.Z)(S().miniProfileBottom, k && S().miniProfileBackdropBlur) }, a.createElement(y, { community_data: R }), a.createElement(E, { community_data: R })), v, a.createElement("div", { className: S().mutualFriends }, this.props.mutual_friends), ), ), ) ); } }; R = (0, i.gn)([r.Pi], R); const A = ({ community_data: e, persona: t }) => { if (e && e.profile_background) { const t = e.profile_background, { image: n } = t, o = (0, i._T)(t, ["image"]); if (Object.keys(o).length) return a.createElement( "div", { className: S().miniProfileVideoBackgroundContainer, key: o["video/webm"] || o["video/mp4"] || "image" }, a.createElement( "video", { className: S().miniProfileVideoBackground, playsInline: !0, muted: !0, autoPlay: !0, loop: !0, poster: n }, Object.keys(o).map((e) => a.createElement("source", { key: e, src: o[e], type: e })), ), ); if (n) return a.createElement("div", { className: S().miniProfileVideoBackgroundContainer }, a.createElement("img", { className: S().miniProfileVideoBackground, src: n })); } return a.createElement("div", { className: S().miniProfileBackground }, a.createElement("img", { className: S().miniProfileBackgroundBlur, src: t.avatar_url })); }, M = (e) => { const { persona: t, community_data: n, size: o } = e, r = (0, i._T)(e, ["persona", "community_data", "size"]), s = n && n.avatar_frame && a.createElement("img", { src: n.avatar_frame, className: S().Frame }), l = n && n.animated_avatar, c = { size: o || "X-Large", statusPosition: "bottom", className: S().playerAvatar }; return l ? a.createElement(I.o, Object.assign({}, r, { strAvatarURL: l }, c), s) : a.createElement(I.vV, Object.assign({ persona: t }, r, c), s); }; var k = n(28413); function T(e) { return a.createElement(k.T, { target: e.target, className: "friendHover miniProfileHover", visibilityObserver: e.hoverInstance, onNoSpace: e.onNoSpace, direction: e.direction }, a.createElement(O, { hoverInstance: e.hoverInstance })); } let L = class extends a.Component { constructor(e) { super(e); const t = this.props.broadcastAccountID && p.K.InitFromAccountID(this.props.broadcastAccountID); this.state = { broadcastInfo: t && u.BroadcastWatchStore.StartInfo(t.ConvertTo64BitString()) }; } componentDidUpdate(e) { if (this.props.broadcastAccountID !== e.broadcastAccountID) { this.state.broadcastInfo && u.BroadcastWatchStore.StopInfo(this.state.broadcastInfo); const e = this.props.broadcastAccountID && p.K.InitFromAccountID(this.props.broadcastAccountID); this.setState({ broadcastInfo: e && u.BroadcastWatchStore.StartInfo(e.ConvertTo64BitString()) }); } } componentWillUnmount() { this.state.broadcastInfo && u.BroadcastWatchStore.StopInfo(this.state.broadcastInfo); } render() { return this.state.broadcastInfo ? a.createElement(_.m, { src: this.state.broadcastInfo.m_strThumbnailUrl }) : null; } }; L = (0, i.gn)([r.Pi], L); class G extends a.Component { render() { let e = h.Ul.FriendStore.FriendGroupStore.incoming_invites_group.map_steamid_to_mutual_friends.get(this.props.friend.steamid64); if (null != e) { let t = 10, n = a.createElement("div", { className: "mutualFriendTitle" }, " ", (0, m.Xx)("#FriendGroup_MutualFriends_Title"), " "), i = [], o = Array.from(e); for (let e = 0; e < o.length && e < t; e++) { let t = h.Ul.FriendStore.GetFriend(o[e]); i.push(a.createElement("div", { className: "mutualFriend", key: t.steamid64 }, a.createElement("img", { className: "mutualFriendAvatar", src: t.persona.avatar_url_medium }), a.createElement("div", { className: "mutualFriendLabel" }, t.display_name))); } return o.length >= t && i.push(a.createElement("div", { className: "mutualFriend" }, a.createElement("div", { className: "mutualFriendLabel plusOthersLabel" }, (0, m.kb)("#FriendGroup_MutualFriends_Others", o.length - t)))), a.createElement("div", { className: "mutualFriendsContainer" }, " ", n, " ", a.createElement("div", null, " ", i, " "), " "); } return a.createElement("div", null); } } let O = class extends a.Component { constructor(e) { super(e); } render() { let e = this.props.hoverInstance.hover, t = e.persona, n = { className: "miniProfileHoverInner", persona: e.persona, data_loader: e.data_loader }; t.is_watchingbroadcast && ((n.broadcast_description = e.friend.GetBroadcastDescription()), (n.broadcast_thumbnail = a.createElement("div", { className: "watchingbroadcastThumbnail" }, a.createElement(L, { broadcastAccountID: t.m_broadcastAccountId })))), e.friend.has_nickname && (n.nickname = e.friend.nickname), (n.is_friend = e.friend.is_friend || e.friend == h.Ul.FriendStore.self), (n.is_blocked = e.friend.is_blocked), (n.friend_relationship = e.friend.efriendrelationship); let i = a.createElement("div", null), r = this.props.hoverInstance.context; return r && r.friendGroup && r.friendGroup.m_eDisplayType == o.h1.eIncomingInvites && (i = a.createElement(G, { friend: e.friend })), (n.mutual_friends = i), a.createElement(R, Object.assign({}, n)); } }; O = (0, i.gn)([r.Pi], O); class F extends l.K3 { constructor(e, t) { var n; super("hoverpopup", { title: "hover", html_class: "friendsui-container HoverPopup client_chat_frame", body_class: "HoverPopupBody Hover" + e.className, replace_existing_popup: !0, target_browser: t, window_opener_id: null === (n = e.target.ownerDocument.defaultView) || void 0 === n ? void 0 : n.SteamClient.Browser.GetBrowserID(), eCreationFlags: (0, l.sB)(l.iJ.Tooltip) }), (this.m_hoverProps = e); } UpdateParamsBeforeShow(e) { let t = c.sH(this.m_hoverProps.target.ownerDocument.defaultView, this.m_hoverProps.target.getBoundingClientRect()); return (e.dimensions = { left: t.right, top: t.top, width: 1, height: 1 }), (e.availscreenwidth = this.m_hoverProps.target.ownerDocument.defaultView.screen.availWidth), (e.availscreenheight = this.m_hoverProps.target.ownerDocument.defaultView.screen.availHeight), e; } Render(e, t) { let n = this.InternalRender(); (this.m_reactRoot = s.s(t)), this.m_reactRoot.render(a.createElement(x, Object.assign({}, this.m_hoverProps, { popup: e }), n)); } OnClose() { this.m_reactRoot.unmount(); } } class B extends F { constructor(e, t, n) { super({ target: e, visibilityObserver: t, className: "friendHover miniProfileHover" }, n), (this.m_instance = t); } OnLoad() {} OnResize() {} InternalRender() { return a.createElement(O, { hoverInstance: this.m_instance }); } } let x = class extends a.Component { constructor() { super(...arguments), (this.m_bNoSpace = !1), (this.state = { x: void 0, y: void 0, width: void 0, height: void 0, hoverPositionReady: !1 }); } bindHover(e) { (this.m_elHover = e || void 0), this.positionHover(); } componentDidUpdate() { this.positionHover(); } render() { return ( void 0 !== this.state.x && this.props.target.ownerDocument.defaultView.SteamClient.Window.GetWindowRestoreDetails().then((e) => { const t = this.state.x - this.props.target.ownerDocument.defaultView.screenX, n = this.state.y - this.props.target.ownerDocument.defaultView.screenY; try { this.props.popup.SteamClient.Window.PositionWindowRelative(e, t, n, this.state.width, this.state.height); } catch (e) { console.error(e); } }), a.createElement("div", { className: "HoverPositionPopup", ref: this.bindHover }, this.props.children) ); } positionHover() { let e = this.m_elHover, t = this.props.target; if (!e || !t) return; if (this.state.hoverPositionReady && this.props.visibilityObserver && !this.props.visibilityObserver.visible) return; let n = this.props.popup, i = t.ownerDocument.defaultView; if (!n || n.closed) return; let o = c.sH(i, t.getBoundingClientRect()), r = c.sH(n, e.getBoundingClientRect()), a = o.left, s = o.top; let l = n.screen, m = 0; l.availLeft && (m = l.availLeft); let d = o.right + c.PT(r) + 2, h = n.screen.availWidth + m - d, u = o.left - c.PT(r) - m; a = h < 2 && u > h ? o.left - c.PT(r) - 3 + 3 : o.left + c.PT(o) - -3; let p = 0; c.BJ(o) < 48 && (p = Math.floor(c.BJ(o) / 2) - 24), (s = o.top - 15 + p); if (o.top + c.BJ(r) + 0 > n.screen.availHeight) { let t = c.BJ(r) + 0 - (n.screen.availHeight - o.top), i = null != e.querySelector(".miniprofile_ingame") ? 78 : 24; (t = Math.min(c.BJ(r) - i, t)), (s = o.top - t); } (a = Math.floor(a)), (s = Math.floor(s)); let _ = Math.ceil(c.PT(r)), g = Math.ceil(c.BJ(r)); a != this.state.x && this.setState({ x: a }), s != this.state.y && this.setState({ y: s }), _ != this.state.width && this.setState({ width: _ }), g != this.state.height && this.setState({ height: g }), this.state.hoverPositionReady || this.setState({ hoverPositionReady: !0 }); } }; (0, i.gn)([d.ak], x.prototype, "bindHover", null), (x = (0, i.gn)([r.Pi], x)); }, 13106: (e, t, n) => { "use strict"; n.d(t, { kR: () => _e, $W: () => $, WK: () => ue, rb: () => ce, wd: () => Y, u8: () => te, D4: () => ne }); var i = n(85556), o = n(72746), r = n(37234), a = n(50649), s = n(68816), l = n(27378), c = n(2049), m = n(84290), d = n(11259); function h(e, t, n) { (0, s.BR)(l.createElement(u, { player: t }), n, "NicknameDialog", { strTitle: (0, m.Xx)("#Friend_Menu_AddNickname"), popupWidth: 640, popupHeight: 400 }, (0, r.Og)(n)); } let u = class extends l.Component { constructor(e) { super(e), (this.state = { strCurrentNameEntry: this.props.player.nickname || "" }); } HandleTextEntry(e) { this.setState({ strCurrentNameEntry: e.currentTarget.value }); } HandleSubmit(e) { o.Ul.FriendStore.SetPlayerNickname(this.props.player, this.state.strCurrentNameEntry).then((e) => { 1 == e && this.props.closeModal && this.props.closeModal(); }); } componentDidUpdate(e) { e.player !== this.props.player && this.setState({ strCurrentNameEntry: this.props.player.nickname }); } render() { let e = "friend editNickname", t = this.props.player.has_nickname; return ( this.props.player.persona.is_ingame ? (e += " ingame") : this.props.player.persona.is_online && (e += " online"), t && (e += " nickNamed"), l.createElement( s.e1, { className: "Dialog_EditNickName", onEscKeypress: this.props.closeModal }, l.createElement( d.oX, { classNameContent: "NicknameDialog", onSubmit: this.HandleSubmit }, l.createElement(d.h4, null, t ? (0, m.Xx)("#Friend_Menu_ChangeNickname") : (0, m.Xx)("#Friend_Menu_AddNickname")), l.createElement(d.uT, null, l.createElement(d.Ac, null, t ? (0, m.Xx)("#Nickname_EditNickname") : (0, m.Xx)("#Nickname_AddANickname")), l.createElement(d.Ac, null, l.createElement("div", { className: e }, l.createElement("img", { className: "avatarMedium", src: this.props.player.persona.avatar_url_full }), l.createElement("div", { className: "labelHolder" }, l.createElement("div", { className: "mediumName" }, this.props.player.secondary_display_name), l.createElement("div", { className: "nickNamedAs" }, (0, m.Xx)("#Nickname_NickNameAsDialog")), l.createElement("div", { className: "mediumName asNickName" }, l.createElement(d.II, { placeholder: t ? (0, m.Xx)("#Nickname_PlaceHolderNickName") : (0, m.Xx)("#Nickname_PlaceHolderNickNameFresh"), className: "nicknameInput", value: this.state.strCurrentNameEntry, onChange: this.HandleTextEntry, autoFocus: !0, bShowClearAction: !0 })))))), l.createElement(d.$_, null, l.createElement(d.o9, { onCancel: this.props.closeModal })), ), ) ); } }; (0, i.gn)([c.ak], u.prototype, "HandleTextEntry", null), (0, i.gn)([c.ak], u.prototype, "HandleSubmit", null), (u = (0, i.gn)([a.Pi], u)); var p = n(94623), _ = n(88991), g = n(88669), C = n(46057), f = n(79588); function v(e, t, n) { let i = n ? [n.accountid] : []; (0, s.BR)(l.createElement(S, { browserContext: e, rgPreSelectedFriends: i }), t, "CreateFriendCategoryDialog", { strTitle: (0, m.Xx)("#FriendGroup_Menu_CreateGroup"), popupWidth: 664, popupHeight: 700 }, (0, r.Og)(t)); } class S extends l.Component { constructor(e) { super(e), (this.state = { strNameEntry: e.group ? e.group.name : "", strError: null, rgPickedFriends: e.rgPreSelectedFriends.map((e) => o.Ul.FriendStore.GetPlayer(e)) }); } HandleTextEntry(e) { this.setState({ strNameEntry: e.target.value, strError: null }); } HandleSubmit() { const e = this.state.rgPickedFriends, t = this.state.strNameEntry; if (this.props.group) { let n = new Set(this.props.group.GetCurrentMemberSet()), i = [], r = []; for (let t of e) { n.has(t.accountid) ? n.delete(t.accountid) : i.push(t.persona.m_steamid.ConvertTo64BitString()); } n.forEach((e) => { r.push(_.K.InitFromAccountID(e).ConvertTo64BitString()); }), o.Ul.FriendStore.FriendGroupStore.ManageGroup(this.props.group, t, i, r).then((e) => { e ? this.props.closeModal && this.props.closeModal() : this.setState({ strError: (0, m.Xx)("#FriendGroup_ManageGroup_ErrorFailed") }); }); } else { if (!t) return void this.setState({ strError: (0, m.Xx)("#FriendGroup_CreateGroup_ErrorNeedName") }); let n = e.map((e) => e.persona.m_steamid.ConvertTo64BitString()); o.Ul.FriendStore.FriendGroupStore.CreateGroup(t, n).then((e) => { e ? this.props.closeModal && this.props.closeModal() : this.setState({ strError: (0, m.Xx)("#FriendGroup_CreateGroup_ErrorFailed") }); }); } } render() { return l.createElement(s.e1, { onEscKeypress: this.props.closeModal }, l.createElement(d.oX, { classNameContent: "ManageGroupDialog", onSubmit: this.HandleSubmit }, l.createElement(d.h4, null, this.props.group ? (0, m.Xx)("#FriendGroup_Menu_Manage") : (0, m.Xx)("#FriendGroup_Menu_CreateGroup")), l.createElement(d.uT, null, this.state.strError && l.createElement(d.Ac, { className: "nicknameError" }, this.state.strError), l.createElement(d.II, { type: "text", label: (0, m.Xx)("#FriendGroup_CategoryName"), className: "nicknameInput", value: this.state.strNameEntry, onChange: this.HandleTextEntry, autoFocus: !0 }), l.createElement(p.B, { label: (0, m.Xx)("#FriendGroup_CategoryMembers"), eSort: 1, rgPickedFriends: this.state.rgPickedFriends, onChange: (e) => this.setState({ rgPickedFriends: e }) })), l.createElement(d.$_, null, l.createElement(d.o9, { onCancel: this.props.closeModal })))); } } (0, i.gn)([c.ak], S.prototype, "HandleTextEntry", null), (0, i.gn)([c.ak], S.prototype, "HandleSubmit", null); class b extends l.Component { constructor() { super(...arguments), (this.m_mapCategoryChecks = f.LO.map()), (this.state = { strError: null }); } componentDidUpdate(e) { e.friend !== this.props.friend && this.m_mapCategoryChecks.clear(); } HandleSubmit() { let e = []; o.Ul.FriendStore.FriendGroupStore.user_groups.forEach((t) => { if (this.m_mapCategoryChecks.has(t.unique_id)) { let n, i; this.m_mapCategoryChecks.get(t.unique_id) ? (i = t) : (n = t), e.push(o.Ul.FriendStore.FriendGroupStore.TransferFriendFromToGroup(this.props.friend, n, i)); } }), Promise.all(e).then((e) => { let t = !1; for (let n of e) for (let e of n) e || (t = !0); t ? this.setState({ strError: (0, m.Xx)("#FriendGroup_ManageGroup_ErrorFailed") }) : this.props.closeModal(); }); } CreateNew(e) { v((0, r.Um)(this, e), (0, g.RA)(e), this.props.friend); } render() { return l.createElement(s.e1, { onEscKeypress: this.props.closeModal }, l.createElement(d.oX, { classNameContent: "AssignCategoriesDialog", onSubmit: this.HandleSubmit }, l.createElement(d.h4, null, (0, m.Xx)("#FriendGroup_Categorize_Title")), l.createElement(d.uT, null, this.state.strError && l.createElement(d.Ac, { className: "nicknameError" }, this.state.strError), l.createElement(d.Uq, null, l.createElement(d.sg, null, l.createElement(C.mo, { friend: this.props.friend, className: "AssignCategoriesDialog_Friend", noActions: !0, context: null }))), l.createElement(I, { friend: this.props.friend, mapChecks: this.m_mapCategoryChecks }), l.createElement(d.Uq, { className: "AssignCategoriesDialog_AddNewButton" }, l.createElement(d.zx, { onClick: this.CreateNew }, (0, m.Xx)("#FriendGroup_Categorize_AddNew")))), l.createElement(d.$_, null, l.createElement(d.o9, { onCancel: this.props.closeModal })))); } } (0, i.gn)([c.ak], b.prototype, "HandleSubmit", null), (0, i.gn)([c.ak], b.prototype, "CreateNew", null); let I = class extends l.Component { render() { let e = o.Ul.FriendStore.FriendGroupStore.user_groups.map((e) => l.createElement(y, { friend: this.props.friend, group: e, key: e.unique_id, mapChecks: this.props.mapChecks })); return l.createElement(l.Fragment, null, l.createElement(d.__, null, (0, m.Xx)("#FriendGroup_Categorize_Categories")), l.createElement("div", { className: "FriendCategoryCheckboxes_List" }, e)); } }; I = (0, i.gn)([a.Pi], I); let y = class extends l.Component { OnToggle(e) { e != this.props.group.HasMember(this.props.friend.accountid) ? this.props.mapChecks.set(this.props.group.unique_id, e) : this.props.mapChecks.delete(this.props.group.unique_id); } OnContextMenu(e) { ue((0, r.Um)(this, e), this.props.group, e); } render() { let e, t = this.props.group, n = this.props.friend; return (e = this.props.mapChecks.has(t.unique_id) ? this.props.mapChecks.get(t.unique_id) : t.HasMember(n.accountid)), l.createElement("div", { onContextMenu: this.OnContextMenu }, l.createElement(d.ji, { label: t.name, checked: e, onChange: this.OnToggle })); } }; (0, i.gn)([c.ak], y.prototype, "OnToggle", null), (0, i.gn)([c.ak], y.prototype, "OnContextMenu", null), (y = (0, i.gn)([a.Pi], y)); var E = n(82909), D = n(61963), w = n(23346), R = n(19339), A = n(84446), M = n(19953), k = n(14341), T = n(11612), L = n(71357), G = n(16518), O = n(38461), F = n(70532), B = n(14206), x = n.n(B); let N = class extends l.Component { constructor(e) { super(e); let t = o.Ul.FriendStore.self; this.state = { strCurrentNameEntry: t.primary_display_name, strError: "" }; } HandleTextEntry(e) { this.setState({ strCurrentNameEntry: e.currentTarget.value, strError: "" }); } HandleSubmit(e) { this.SetPersonaName(this.state.strCurrentNameEntry); } DisplayError(e) { this.setState({ strError: e }); } SetPersonaName(e) { if ((this.setState({ strError: "" }), M.De.IN_CLIENT && null != SteamClient.WebChat.SetPersonaName)) SteamClient.WebChat.SetPersonaName(this.state.strCurrentNameEntry).then((e) => { this.props.eResultCallback && this.props.eResultCallback(e.eResult), 22 === e.eResult ? this.props.closeModal && this.props.closeModal() : e.strMessageToken ? this.DisplayError((0, m.Xx)(e.strMessageToken)) : this.props.closeModal && this.props.closeModal(); }); else { let t = new FormData(); t.append("sessionid", M.De.SESSIONID), t.append("persona", e); let n = o.Ul.FriendStore.self, i = M.De.CHAT_BASE_URL + "profiles/" + n.steamid64 + "/ajaxsetpersonaname/"; x() .post(i, t) .then((e) => { let t = e.data; if (t.success) this.props.closeModal && this.props.closeModal(); else { let e = t.message.replace("
", ""); this.DisplayError(e); } }) .catch((e) => { this.DisplayError((0, m.Xx)("#Friends_NameChangeFailed_Info")); }); } } render() { let e = o.Ul.FriendStore.self, t = "friend changePersonaName"; e.persona.is_ingame ? (t += " ingame") : e.persona.is_online && (t += " online"); let n = !1; return ( this.state.strError && (n = !0), l.createElement( s.e1, { className: "Dialog_ChangePersonaName", onEscKeypress: this.props.closeModal }, l.createElement( d.oX, { classNameContent: "ChangePersonaNameDialog", onSubmit: this.HandleSubmit }, l.createElement(d.h4, null, (0, m.Xx)("#ChangePersona_Title")), l.createElement(d.uT, null, l.createElement(d.Ac, null, (0, m.Xx)("#ChangePersona_Description")), l.createElement(d.Ac, null, l.createElement("div", { className: t }, l.createElement("img", { className: "avatarMedium", src: e.persona.avatar_url_full }), l.createElement("div", { className: "labelHolder" }, n && l.createElement("div", { className: "error" }, this.state.strError), l.createElement("div", null, l.createElement("div", null, (0, m.Xx)("#ChangePersona_Change")), l.createElement("div", { className: "mediumName" }, l.createElement(d.II, { placeholder: (0, m.Xx)("#ChangePersona_PlaceHolder"), className: "changePersonaInput", value: this.state.strCurrentNameEntry, onChange: this.HandleTextEntry, autoFocus: !0 }))))))), l.createElement(d.$_, null, l.createElement(d.o9, { onCancel: this.props.closeModal })), ), ) ); } }; (0, i.gn)([c.ak], N.prototype, "HandleTextEntry", null), (0, i.gn)([c.ak], N.prototype, "HandleSubmit", null), (N = (0, i.gn)([a.Pi], N)); var P = n(60176), U = n(53971), V = n(70215), H = n(29205); let W = class extends l.Component { constructor(e) { super(e), (this.state = this.ComputeStateFromNotificationSettings(this.props.player.notification_settings)); } ConvertENotificationSettingToBoolean(e) { return 1 == e; } ComputeStateFromNotificationSettings(e) { let t, n = !1, i = !1; for (const t in e) { if (0 != e[t]) { i = !0; break; } } return i ? ((t = U.k()), (t.bNotifications_ShowIngame = this.ConvertENotificationSettingToBoolean(e.Notifications_ShowInGame)), (t.bNotifications_ShowMessage = this.ConvertENotificationSettingToBoolean(e.Notifications_ShowMessage)), (t.bNotifications_ShowOnline = this.ConvertENotificationSettingToBoolean(e.Notifications_ShowOnline)), (t.bSounds_PlayIngame = this.ConvertENotificationSettingToBoolean(e.Sounds_PlayInGame)), (t.bSounds_PlayMessage = this.ConvertENotificationSettingToBoolean(e.Sounds_PlayMessage)), (t.bSounds_PlayOnline = this.ConvertENotificationSettingToBoolean(e.Sounds_PlayOnline))) : ((n = !0), (t = o.Ul.SettingsStore.FriendsSettings)), { settings: t, bUseDefaults: n }; } ConvertBooleanToENotificationSetting(e) { return e ? 1 : 2; } FriendSettingsToNotificationSettings(e) { let t = new w.Ev(); return (t.Notifications_SendMobile = this.props.player.notification_settings.Notifications_SendMobile), this.state.bUseDefaults || ((t.Notifications_ShowInGame = this.ConvertBooleanToENotificationSetting(this.state.settings.bNotifications_ShowIngame)), (t.Notifications_ShowMessage = this.ConvertBooleanToENotificationSetting(this.state.settings.bNotifications_ShowMessage)), (t.Notifications_ShowOnline = this.ConvertBooleanToENotificationSetting(this.state.settings.bNotifications_ShowOnline)), (t.Sounds_PlayInGame = this.ConvertBooleanToENotificationSetting(this.state.settings.bSounds_PlayIngame)), (t.Sounds_PlayMessage = this.ConvertBooleanToENotificationSetting(this.state.settings.bSounds_PlayMessage)), (t.Sounds_PlayOnline = this.ConvertBooleanToENotificationSetting(this.state.settings.bSounds_PlayOnline))), t; } HandleSubmit() { o.Ul.FriendStore.SetPlayerNotificationSettings(this.props.player, this.FriendSettingsToNotificationSettings(this.state.settings)).then((e) => { 1 == e && this.props.closeModal && this.props.closeModal(); }); } componentDidUpdate(e) { e.player !== this.props.player && this.setState(this.ComputeStateFromNotificationSettings(this.props.player.notification_settings)); } OnSettingToggled(e, t) { this.setState({ settings: Object.assign(Object.assign({}, this.state.settings), { [e]: t }) }); } FriendsSettingsCheckbox(e) { return l.createElement(d.ji, { key: e.strName, disabled: this.state.bUseDefaults, onChange: (t) => { this.OnSettingToggled(e.strName, t); }, checked: !!this.state.settings[e.strName], }); } NotificationRow(e) { let t = this.FriendsSettingsCheckbox; return l.createElement("div", null, l.createElement("div", { className: "FriendsSettingsNotificationRow" }, l.createElement("div", { className: "FriendsSettingsNotificationRow_Label" }, e.strLabel), l.createElement("div", { className: "FriendsSettingsNotificationRow_Checkbox" }, l.createElement(t, { strName: e.strNameShow })), l.createElement("div", { className: "FriendsSettingsNotificationRow_Checkbox" }, l.createElement(t, { strName: e.strNameSound })))); } OnDefaultToggled(e) { e ? this.setState({ settings: o.Ul.SettingsStore.FriendsSettings, bUseDefaults: !0 }) : this.setState({ bUseDefaults: !1 }); } render() { let e = this.NotificationRow, t = this.state.bUseDefaults, n = "friend editFriendNotifications"; return ( (n += (0, V.sB)(this.props.player.persona)), l.createElement( s.e1, { className: "Dialog_FriendNotifications", onEscKeypress: this.props.closeModal }, l.createElement( d.oX, { classNameContent: "FriendNotificationsDialog", onSubmit: this.HandleSubmit }, l.createElement(d.h4, null, (0, m.Xx)("#Friend_Menu_NotificationsTitle")), l.createElement( d.uT, { className: t ? "useDefaults" : "" }, l.createElement(d.Ac, null, (0, m.Xx)("#FriendNotifications_Instructions", this.props.player.display_name)), l.createElement(d.Ac, null, l.createElement("div", { className: n }, l.createElement(H.vV, { persona: this.props.player.persona, size: "Large" }), l.createElement("div", { className: "labelHolder" }, this.props.player.primary_display_name, !this.props.player.is_display_name_nickname && this.props.player.has_secondary_display_name && l.createElement("span", { className: "playerNickname" }, " (", this.props.player.secondary_display_name, ")"), this.props.player.is_display_name_nickname && l.createElement("span", { className: "playerNicknameBracket", title: (0, m.Xx)("#isNickname") }, "*")))), l.createElement(d.ji, { className: "useDefaultsCheckBox", label: (0, m.Xx)("#FriendNotifications_UseDefaults"), onChange: (e) => { this.OnDefaultToggled(e); }, checked: this.state.bUseDefaults, }), l.createElement( "div", { className: "SettingsGroup" }, l.createElement("div", { className: "FriendsSettingsNotificationRow FriendsSettingsNotificationRow_Header" }, l.createElement("div", { className: "FriendsSettingsNotificationRow_Label" }, (0, m.Xx)("#FriendSettings_Notification_Table_Label")), l.createElement("div", { className: "FriendsSettingsNotificationRow_Checkbox" }, (0, m.Xx)("#FriendSettings_Notification_Table_Show")), l.createElement("div", { className: "FriendsSettingsNotificationRow_Checkbox" }, (0, m.Xx)("#FriendSettings_Notification_Table_Play"))), l.createElement(e, { strLabel: (0, m.Xx)("#FriendSettings_FriendNotification_FriendJoins"), strNameShow: "bNotifications_ShowIngame", strNameSound: "bSounds_PlayIngame" }), l.createElement(e, { strLabel: (0, m.Xx)("#FriendSettings_FriendNotification_FriendOnline"), strNameShow: "bNotifications_ShowOnline", strNameSound: "bSounds_PlayOnline" }), l.createElement(e, { strLabel: (0, m.Xx)("#FriendSettings_Notification_ChatMessage"), strNameShow: "bNotifications_ShowMessage", strNameSound: "bSounds_PlayMessage" }), ), ), l.createElement(d.$_, null, l.createElement(d.o9, { onCancel: this.props.closeModal })), ), ) ); } }; (0, i.gn)([c.ak], W.prototype, "HandleSubmit", null), (0, i.gn)([c.ak], W.prototype, "OnSettingToggled", null), (0, i.gn)([c.ak], W.prototype, "FriendsSettingsCheckbox", null), (0, i.gn)([c.ak], W.prototype, "NotificationRow", null), (0, i.gn)([c.ak], W.prototype, "OnDefaultToggled", null), (W = (0, i.gn)([a.Pi], W)); var X = n(37091), j = n(62902), z = n(14593), K = n(13114), q = n(65204), Z = n(99165), Q = n(57476); function $(e, t, n, i) { return (0, E.yV)(l.createElement(ie, { browserContext: e, context: t, friend: n, ownerWindow: (0, g.RA)(i) }), i, { bForcePopup: M.De.IN_STEAMUI }); } function Y(e, t, n, i) { return l.createElement(ie, { browserContext: e, context: t, friend: n, ownerWindow: i }); } let J = (0, a.Pi)(function (e) { let t = e.friend, n = [], i = t.persona_name_history, o = t.persona_name_history_loaded; if (o && i.length > 0) { let e = 0; for (let t of i) n.push(l.createElement("div", { className: "recentName", key: "name_history_" + e }, t)), e++; } else o ? n.push(l.createElement("div", { className: "recentName", key: "name_history_none" }, (0, m.Xx)("#Friend_Menu_RecentAliases_None"))) : n.push(l.createElement("div", { className: "recentName", key: "name_history_loading" }, (0, m.Xx)("#Friend_Menu_RecentAliases_Loading"))); return l.createElement(l.Fragment, null, l.createElement(D.D1, { label: (0, m.Xx)("#Friend_Menu_RecentAliases") }, n)); }), ee = class extends l.Component { OnToggle(e) { this.props.group.ToggleMemberRoleState(this.props.friend.accountid, e); } render() { let e = this.props.group.DefaultRoleID(), t = this.props.group.GetMemberRoleIDs(this.props.friend.accountid), n = this.props.group.BIsAccountIDOwner(this.props.friend.accountid), i = this.props.group.BCanEditRoles(), o = this.props.group .GetRoles() .slice() .sort((t, n) => (t.role_id == e ? 1 : n.role_id == e ? -1 : parseInt(t.role_id) - parseInt(n.role_id))) .map((n) => { let o = -1 != t.findIndex((e) => e == n.role_id); if (!o && !i) return null; let r = n.name, a = this.props.group.BCanIAssignRole(n.role_id); return n.role_id == e ? (r = (0, m.Xx)("#ChatRoomRole_Member")) : r.startsWith("#ChatRoomRole_") && (r = (0, m.Xx)(r)), l.createElement(re, { key: n.role_id, friend: this.props.friend, group: this.props.group, roleName: r, roleID: n.role_id, bHasRole: o, bEditable: a }); }), r = i && !n ? (0, m.Xx)("#Friend_Menu_EditRoles") : (0, m.Xx)("#Friend_Menu_ViewRoles"); return l.createElement(l.Fragment, null, l.createElement(D.D1, { label: r }, n ? l.createElement(D.Zo, { className: "FriendMenuRoleCheckbox disabled", key: "role", onSelected: () => {}, bInteractableItem: !0 }, l.createElement(G._OD, null), (0, m.Xx)("#ChatRoomRole_Owner")) : o)); } }; function te(e, t, n, i) { let o = (0, w.ji)(t); if (1 != t) if (24 == t) { let t = l.createElement(X.ns, { style: { color: "white" }, href: M.De.HELP_BASE_URL + "wizard/HelpWithLimitedAccount" }, (0, m.Xx)("#Friend_InviteError_VisitSteamSupport")); (0, L.zp)(e, (0, m.Xx)("#Friend_Menu_AddToFriendsList"), (0, m.Xx)("#Friend_Menu_AddToFriendsList"), (0, m.Xx)("#Button_OK"), (0, m.kQ)("#Friend_InviteError_LimitedUserLink", t)); } else (0, L.zp)(e, (0, m.Xx)("#Friend_Menu_AddToFriendsList"), (0, m.Xx)(o, i)); else (0, L.zp)(e, (0, m.Xx)("#Friend_Menu_AddToFriendsList"), (0, m.Xx)("#Friend_InviteError", i)); } function ne(e, t) { const n = "steam://open/library/shared-apps/" + JSON.stringify(e); SteamClient.WebChat.OpenURLInClient(n, t.m_unPID, !1); } (0, i.gn)([c.ak], ee.prototype, "OnToggle", null), (ee = (0, i.gn)([a.Pi], ee)); let ie = class extends l.PureComponent { constructor() { super(...arguments), (this.state = { bCanCreateRemotePlayInvite: !1, strConnectPrivate: "" }); } componentDidMount() { return (0, i.mG)(this, void 0, void 0, function* () { const e = yield o.Ul.RemotePlayStore.BCanCreateInviteForGame(o.Ul.FriendStore.self.persona.m_gameid), t = o.Ul.FriendStore.self.persona.m_unGamePlayedAppID; let n = ""; M.De.IN_CLIENT && t && (0, Q.U5)("WebChat.GetPrivateConnectString") && (n = yield SteamClient.WebChat.GetPrivateConnectString(t)); let i = { bCanCreateRemotePlayInvite: e, strConnectPrivate: n }; (i.bCanCreateRemotePlayInvite == this.state.bCanCreateRemotePlayInvite && i.strConnectPrivate == this.state.strConnectPrivate) || this.setState(i); }); } ShowFriendProfile(e) { let t = this.props.friend.GetCommunityProfileURL(); (0, k.b8)(e, t), e.stopPropagation(); } ShowFriendFiltereredLibrary(e) { const t = [this.props.friend.accountid]; (0, z.I)("FindGamesToPlayWithFriends/FriendsMenu"), e.stopPropagation(); ne(t, (0, r.Um)(this, e)); } InviteFriend() { return (0, i.mG)(this, void 0, void 0, function* () { let { eResult: e, eFriendRelationship: t } = yield o.Ul.FriendStore.SendFriendInvite(this.props.friend); 4 == t ? (0, L.zp)(this.props.ownerWindow, (0, m.Xx)("#Friend_Menu_AddToFriendsList"), (0, m.Xx)("#Friend_InviteSent")) : 3 == t ? (0, L.zp)(this.props.ownerWindow, (0, m.Xx)("#Friend_Menu_AddToFriendsList"), (0, m.Xx)("#Friend_MutualInviteSent", this.props.friend.display_name)) : te(this.props.ownerWindow, e, 0, this.props.friend.display_name); }); } AcceptIncomingInvite() { return (0, i.mG)(this, void 0, void 0, function* () { let { eResult: e, eFriendRelationship: t } = yield o.Ul.FriendStore.SendFriendInvite(this.props.friend); 3 == t ? (0, L.zp)(this.props.ownerWindow, (0, m.Xx)("#Friend_Menu_AddToFriendsList"), (0, m.Xx)("#Friend_MutualInviteSent", this.props.friend.display_name)) : te(this.props.ownerWindow, e, 0, this.props.friend.display_name); }); } IgnoreIncomingInvite() { o.Ul.FriendStore.RemoveFriend(this.props.friend).then((e) => { 1 == e ? (0, L.zp)(this.props.ownerWindow, (0, m.Xx)("#Friend_Menu_IgnoreIncomingInvite"), (0, m.Xx)("#Friend_IgnoreIncomingInvite_Success", this.props.friend.display_name)) : (0, L.zp)(this.props.ownerWindow, (0, m.Xx)("#Friend_Menu_IgnoreIncomingInvite"), (0, m.Xx)("#Friend_IgnoreIncomingInvite_Error", this.props.friend.display_name)); }); } RemoveFriend() { let e = 4 == this.props.friend.efriendrelationship, t = (0, m.Xx)(e ? "#Friend_Menu_CancelInvitation" : "#Friend_Menu_RemoveFromFriendsList"), n = (0, m.Xx)(e ? "#Friend_CancelInvitation_Confirm" : "#Friend_RemoveFromFriendsList_Confirm", this.props.friend.display_name), i = (0, m.Xx)(e ? "#Button_Confirm" : "#Friend_Menu_RemoveFromFriendsList"), r = (0, m.Xx)(e ? "#Friend_CancelInvitation_Error" : "#Friend_RemoveFromFriendsList_Error"); (0, L.p3)(this.props.ownerWindow, t, n, i, (0, m.Xx)("#Button_Cancel"), !0) .then(() => { o.Ul.FriendStore.RemoveFriend(this.props.friend).then((e) => { (3 != e && 6 != e) || (0, L.zp)(this.props.ownerWindow, t, r); }); }) .catch(() => {}); } BlockFriend() { (0, L.p3)(this.props.ownerWindow, (0, m.Xx)("#Friend_Menu_BlockAllCommunication"), (0, m.Xx)("#Friend_Block_Confirm", this.props.friend.display_name), (0, m.Xx)("#Friend_Menu_BlockAllCommunication")) .then(() => { o.Ul.FriendStore.BlockPlayer(this.props.friend); }) .catch(() => {}); } UnblockFriend() { (0, L.p3)(this.props.ownerWindow, (0, m.Xx)("#Friend_Menu_UnblockAllCommunication"), (0, m.Xx)("#Friend_Unblock_Confirm", this.props.friend.display_name), (0, m.Xx)("#Friend_Menu_UnblockAllCommunication")) .then(() => { o.Ul.FriendStore.BlockPlayer(this.props.friend, !0); }) .catch(() => {}); } InviteToGame(e, t) { o.Ul.FriendStore.InviteToGame(this.props.friend, e, t); } InviteToLobby(e, t) { o.Ul.FriendStore.InviteToLobby(this.props.friend, e, t); } InviteToWatch() { o.Ul.FriendStore.InviteToWatch(this.props.friend); } InviteToRemotePlay() { let e = this.props.friend; o.Ul.FriendStore.self !== e && o.Ul.RemotePlayStore.CreateInviteAndSession(e.accountid, o.Ul.FriendStore.self.persona.m_gameid, this.props.browserContext); } CancelRemotePlay() { let e = this.props.friend; o.Ul.RemotePlayStore.CancelInviteAndSession(e.accountid); } CancelAllRemotePlay() { o.Ul.RemotePlayStore.CancelAllInvitesAndSessions(); } InviteToVoice(e, t) { (0, P.cl)({ invitee: this.props.friend, invitedto: e }, null, this.props.ownerWindow); } render() { var e, t, n; let i, a, c = this.props, d = c.context || {}, u = [], p = [], _ = c.friend, g = o.Ul.FriendStore.FavoritesStore, C = o.Ul.FriendStore.self == _, f = "favorites" == d.chatContext, S = d.group; !S && d.chat instanceof A.K && (S = d.chat.GetGroup()); let I = !1, y = _.is_friend, E = 2 == _.efriendrelationship, w = 4 == _.efriendrelationship, k = E || 4 == _.efriendrelationship, L = o.Ul.FriendStore.self.persona.m_unGamePlayedAppID; _.persona.m_unGamePlayedAppID; d.chat && (d.chat instanceof R.a ? ((i = d.chat), i.BVoiceActive() && (I = !0)) : d.chat instanceof A.K && ((a = d.chat), a.BVoiceActive() && (I = !0))), y || E || C || u.push(l.createElement("div", { className: "contextMenuLabel contextMenuNotAFriend", key: "header" }, (0, m.Xx)("#Friend_Menu_NotAFriendLabel"))), !I || C || (null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) || u.push(l.createElement(oe, { friend: this.props.friend })), d.tab && u.push( l.createElement( D.Zo, { key: "closetab", onSelected: () => { o.Ul.UIStore.CloseTab(c.browserContext, d.tab); }, }, (0, m.Xx)((null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) ? "#Chat_CloseTabAction_SteamDeck" : "#Chat_CloseTabAction"), ), ), i || d.tab || E || w || C || _.is_blocked || u.push( l.createElement( D.Zo, { key: "chat", className: y ? "" : "SendMessageContextNotFriends", onSelected: () => { c.friend.OpenChatDialog(c.browserContext); }, }, (0, m.Xx)("#Friend_Menu_SendMessage"), ), ); let O = o.Ul.ChatStore.BIsEligibleForVoiceChat(_, i), F = o.Ul.ChatStore.GetActiveVoiceChat(); F && F instanceof R.a && F.accountid_partner == _.accountid ? u.push( l.createElement( D.Zo, { key: "voicechat", onSelected: () => { F.ToggleVoiceChat(); }, }, (0, m.Xx)("#Friend_Menu_StopVoiceChat"), ), ) : O && (F instanceof A.K ? F.GetMember(_.accountid) || u.push( l.createElement( D.Zo, { key: "voicechat", className: "contextVoiceInvite", onSelected: () => { this.InviteToVoice(F, d); }, }, l.createElement(G.Cq4, null), (0, m.Xx)("#Chat_Actions_InviteFriend_VoiceChat"), ), ) : u.push( l.createElement( D.Zo, { key: "voicechat", onSelected: () => { o.Ul.UIStore.ShowFriendChatDialogAndStartVoice(c.browserContext, _.accountid); }, }, (0, m.Xx)("#Friend_Menu_StartVoiceChat"), ), )), u.length > 0 && u.push(l.createElement(D.uP, { key: "separator" })), u.push(l.createElement(D.Zo, { key: "viewprofile", onSelected: this.ShowFriendProfile }, (0, m.Xx)("#Friend_Menu_ViewProfile"))), M.De.IN_CLIENT && o.Ul.SettingsStore.BClientHasFeatureOrOnWeb("FriendsFilter") && !C && u.push(l.createElement(D.Zo, { key: "findgamestoplay", onSelected: this.ShowFriendFiltereredLibrary }, (0, m.Xx)("#Friend_Menu_GamesToPlayTogether"))), S && u.push(l.createElement(le, { key: "moderationoptions", friend: _, bIsSelf: C, group: S, ownerWindow: c.ownerWindow })); let B = []; const x = !!_.persona.m_unGamePlayedAppID && !C; if (!C) { if (y) { if ( (p.push( l.createElement( D.Zo, { key: "setnickname", onSelected: () => { h(c.browserContext, c.friend, c.ownerWindow); }, }, (0, m.Xx)(c.friend.has_nickname ? "#Friend_Menu_ChangeNickname" : "#Friend_Menu_AddNickname"), ), ), g.BIsFavorited({ friend: _ })) ) { (f ? u : p).push(l.createElement(D.Zo, { key: "quickaccess", onSelected: he.bind(null, _) }, (0, m.Xx)("#Friend_Menu_RemoveFromQuickAccess"))); } else p.push(l.createElement(D.Zo, { key: "quickaccess", onSelected: de.bind(null, _) }, (0, m.Xx)("#Friend_Menu_AddToQuickAccess"))); if ( (p.push( l.createElement( D.Zo, { key: "managecategories", onSelected: () => { !(function (e, t, n) { 0 == o.Ul.FriendStore.FriendGroupStore.user_groups.length ? v(e, t, n) : (0, s.BR)(l.createElement(b, { browserContext: e, friend: n }), t, "AssignFriendCategoryDialog", { strTitle: (0, m.Xx)("#FriendGroup_Menu_CreateGroup"), popupWidth: 664, popupHeight: 580 }, (0, r.Og)(t)); })(c.browserContext, c.ownerWindow, c.friend); }, }, (0, m.Xx)("#FriendGroup_Menu_Categorize"), ), ), p.push( l.createElement( D.Zo, { key: "notifications", onSelected: () => { return c.browserContext, (e = c.friend), (t = c.ownerWindow), void (0, s.BR)(l.createElement(W, { player: e }), t, "FriendNotificationsDialog", { strTitle: (0, m.Xx)("#Friend_Menu_Notifications"), popupWidth: 640, popupHeight: 520 }, (0, r.Og)(t)); var e, t; }, }, (0, m.Xx)("#Friend_Menu_Notifications"), ), ), f || p.push(l.createElement(D.Zo, { key: "removefriend", onSelected: this.RemoveFriend }, (0, m.Xx)("#Friend_Menu_RemoveFromFriendsList"))), p.push(l.createElement(J, { key: "aliases", friend: _ })), o.Ul.FriendStore.self.persona.is_ingame && o.Ul.BroadcastStore.is_broadcast_capable && B.push( l.createElement( D.Zo, { className: "contextMenuGameOptions", key: "invitetowatch", onSelected: () => { this.InviteToWatch(); }, }, (0, m.Xx)("#Friend_Menu_InviteToWatch"), ), ), 0 != L && "0" != o.Ul.FriendStore.self.persona.m_game_lobby_id) ) B.push( l.createElement( D.Zo, { className: "contextMenuGameOptions", key: "lobbyinvite", onSelected: () => { this.InviteToLobby(L, o.Ul.FriendStore.self.persona.m_game_lobby_id); }, }, (0, m.Xx)("#Friend_Menu_InviteToLobby"), ), ); else if (0 != (null === (n = this.state.strConnectPrivate) || void 0 === n ? void 0 : n.length)) { const e = this.state.strConnectPrivate; B.push( l.createElement( D.Zo, { className: "contextMenuGameOptions", key: "gameinvite", onSelected: () => { this.InviteToGame(L, e); }, }, (0, m.Xx)("#Friend_Menu_InviteToGame"), ), ); } else if (o.Ul.FriendStore.self.persona.connect_string) { const e = o.Ul.FriendStore.self.persona.connect_string; B.push( l.createElement( D.Zo, { className: "contextMenuGameOptions", key: "gameinvite", onSelected: () => { this.InviteToGame(L, e); }, }, (0, m.Xx)("#Friend_Menu_InviteToGame"), ), ); } if (o.Ul.RemotePlayStore.BEnabled()) { let e = this.props.friend; o.Ul.RemotePlayStore.HasInviteAndSession(e.accountid) ? B.push( l.createElement( D.Zo, { className: "contextMenuGameOptions", key: "cancelremoteplay", onSelected: () => { this.CancelRemotePlay(); }, }, (0, m.Xx)("#Friend_Menu_CancelRemotePlay"), ), ) : o.Ul.RemotePlayStore.HasInviteAndSessionForGameIDOtherThan(String(L)) ? B.push( l.createElement( D.Zo, { className: "contextMenuGameOptions", key: "cancelallremoteplay", onSelected: () => { this.CancelAllRemotePlay(); }, }, (0, m.Xx)("#Friend_Menu_CancelAllRemotePlay"), ), ) : this.state.bCanCreateRemotePlayInvite && o.Ul.RemotePlayStore.BRemotePlayTogetherEnabled() && B.push( l.createElement( D.Zo, { className: "contextMenuGameOptions", key: "invitetoremoteplay", onSelected: () => { this.InviteToRemotePlay(); }, }, (0, m.Xx)("#Friend_Menu_InviteToRemotePlay"), ), ); } M.De.EREALM !== T.IN.k_ESteamRealmChina && u.push(l.createElement(ae, { key: "trading", friend: _ })); } else E ? (u.push(l.createElement(D.Zo, { key: "acceptincominginvite", onSelected: this.AcceptIncomingInvite }, (0, m.Xx)("#Friend_Menu_AcceptIncomingInvite"))), u.push(l.createElement(D.Zo, { key: "ignoreincominginvite", onSelected: this.IgnoreIncomingInvite }, (0, m.Xx)("#Friend_Menu_IgnoreIncomingInvite"))), u.push(l.createElement(J, { key: "aliases", friend: _ }))) : w ? u.push(l.createElement(D.Zo, { key: "remove", onSelected: this.RemoveFriend }, (0, m.Xx)("#Friend_Menu_CancelInvitation"))) : u.push(l.createElement(D.Zo, { key: "invite", onSelected: this.InviteFriend }, (0, m.Xx)("#Friend_Menu_AddToFriendsList"))); k && u.push( l.createElement( D.Zo, { key: "setnickname", onSelected: () => { h(c.browserContext, c.friend, c.ownerWindow); }, }, (0, m.Xx)(c.friend.has_nickname ? "#Friend_Menu_ChangeNickname" : "#Friend_Menu_AddNickname"), ), ), (f && !_.is_blocked) || p.push(l.createElement(D.Zo, { key: "block", onSelected: _.is_blocked ? this.UnblockFriend : this.BlockFriend }, (0, m.Xx)(_.is_blocked ? "#Friend_Menu_UnblockAllCommunication" : "#Friend_Menu_BlockAllCommunication"))); } if (!u) return null; let N, P; if ((this.props.context && this.props.context.group && (N = this.props.context.group.GetMemberPartyBeacon(this.props.friend.accountid)), B.length > 0 && (!x || _.persona.m_unGamePlayedAppID != L))) { let e; if (0 == L) e = l.createElement("div", { className: "contextMenuGameItem" }, l.createElement("div", { className: "contextMenuGameName" }, o.Ul.FriendStore.self.current_game_name)); else { let t = o.Ul.AppInfoStore.GetAppInfo(L); e = l.createElement("div", { className: "contextMenuGameItem" }, l.createElement("div", { className: "contextMenuGameIcon" }, l.createElement("img", { className: "GameIcon", src: t.icon_url })), l.createElement("div", { className: "contextMenuGameName" }, t.name)); } (P = l.createElement(l.Fragment, { key: "mygame" }, l.createElement(D.Zo, { className: "contextMenuGameTitle contextMenuUnselectable", onSelected: null, disabled: !0 }, l.createElement("div", { className: "contextMenuGameTitleBlurCropContainer" }, e)), l.createElement("div", { className: "contextMenuSectionContent" }, B))), (B = []); } return l.createElement(D.xV, { className: "friendsContextMenu", label: _.display_name }, u, 1 == p.length && p, p.length > 1 && l.createElement(D.D1, { label: (0, m.Xx)("#Friend_Menu_Manage") }, p), !!_.persona.m_broadcastAccountId && !C && l.createElement(me, { friend: _, ownerWindow: c.ownerWindow, browserContext: c.browserContext }), P, !!P && x && l.createElement(D.uP, null), x && l.createElement(ce, { unAppID: _.persona.m_unGamePlayedAppID, strGameName: _.current_game_name, ulGameID: _.persona.m_gameid, friend: _, partyBeacon: N, ownerWindow: c.ownerWindow, browserContext: c.browserContext, extraItems: B, localAppID: L })); } }; (ie.contextType = M.E_), (0, i.gn)([c.ak], ie.prototype, "ShowFriendProfile", null), (0, i.gn)([c.ak], ie.prototype, "ShowFriendFiltereredLibrary", null), (0, i.gn)([c.ak], ie.prototype, "InviteFriend", null), (0, i.gn)([c.ak], ie.prototype, "AcceptIncomingInvite", null), (0, i.gn)([c.ak], ie.prototype, "IgnoreIncomingInvite", null), (0, i.gn)([c.ak], ie.prototype, "RemoveFriend", null), (0, i.gn)([c.ak], ie.prototype, "BlockFriend", null), (0, i.gn)([c.ak], ie.prototype, "UnblockFriend", null), (0, i.gn)([c.ak], ie.prototype, "InviteToGame", null), (0, i.gn)([c.ak], ie.prototype, "InviteToLobby", null), (0, i.gn)([c.ak], ie.prototype, "InviteToWatch", null), (0, i.gn)([c.ak], ie.prototype, "InviteToRemotePlay", null), (0, i.gn)([c.ak], ie.prototype, "CancelRemotePlay", null), (0, i.gn)([c.ak], ie.prototype, "CancelAllRemotePlay", null), (0, i.gn)([c.ak], ie.prototype, "InviteToVoice", null), (ie = (0, i.gn)([a.Pi], ie)); let oe = class extends l.Component { constructor(e) { super(e); let t = o.Ul.VoiceStore.ConvertGainValueToSliderValue(o.Ul.VoiceStore.GetPerUserGainLevel(this.props.friend.accountid), O.Ys.k_MaxPerUserGainMultiplier); this.state = { volumeNumber: t }; } OnFriendVolumeChanged(e) { o.Ul.VoiceStore.SetPerUserGainLevel(this.props.friend.accountid, o.Ul.VoiceStore.ConvertSliderToGainValue(e, O.Ys.k_MaxPerUserGainMultiplier)), this.setState({ volumeNumber: e }); } OnMutingClick(e) { let t = o.Ul.VoiceStore.GetPerUserMuting(this.props.friend.accountid); o.Ul.VoiceStore.SetPerUserMuting(this.props.friend.accountid, !t), this.forceUpdate(); } OnInlineVolumeClick(e) { this.forceUpdate(); } render() { let e = this.state.volumeNumber, t = "VolumeIcon", n = o.Ul.VoiceStore.GetPerUserMuting(this.props.friend.accountid); return e > 65 ? (t += " HighestVolume") : e > 45 ? (t += " HighVolume") : e < 46 && e > 24 ? (t += " MedVolume") : e < 25 && (t += " LowVolume"), l.createElement(D.Zo, { key: "volume", onSelected: () => {}, bInteractableItem: !0 }, l.createElement("div", { className: "InlineVolume" + (n ? " Muted" : ""), onClick: this.OnInlineVolumeClick }, l.createElement("button", { className: t, onClick: this.OnMutingClick }, l.createElement(G.ffh, null)), l.createElement(d.DS, { min: 0, max: 100, label: "", value: e, onChange: this.OnFriendVolumeChanged }), l.createElement("div", { className: "volumePercentage" }, 2 * e, "%"))); } }; (0, i.gn)([c.ak], oe.prototype, "OnFriendVolumeChanged", null), (0, i.gn)([c.ak], oe.prototype, "OnMutingClick", null), (0, i.gn)([c.ak], oe.prototype, "OnInlineVolumeClick", null), (oe = (0, i.gn)([a.Pi], oe)); let re = class extends l.Component { OnChange(e) { this.props.group.SetMemberRoleState(this.props.friend.accountid, this.props.roleID, e); } render() { return l.createElement(D.Zo, { className: "FriendMenuRoleCheckbox" + (this.props.bEditable ? "" : " disabled"), key: "role", onSelected: () => {}, bInteractableItem: !0 }, l.createElement(d.ji, { label: this.props.roleName, checked: this.props.bHasRole, onChange: this.OnChange, disabled: !this.props.bEditable })); } }; (0, i.gn)([c.ak], re.prototype, "OnChange", null), (re = (0, i.gn)([a.Pi], re)); class ae extends l.Component { SendTradeOffer(e) { let t = "NewTradeOffer" + this.props.friend.accountid, n = (0, g.RA)(e).open(o.Ul.EconomyStore.GetDefaultTradeOfferURLForFriend(this.props.friend.accountid), t, "height=1120,width=1028,resize=yes,scrollbars=yes"); n && n.focus(); } render() { let e = this.props.friend; return l.createElement(D.D1, { label: (0, m.Xx)("#FriendMenu_Trading") }, l.createElement(se, { friend: e }), l.createElement(D.Zo, { onSelected: this.SendTradeOffer }, (0, m.Xx)("#FriendMenu_SendTradeOffer"))); } } function se(e) { return l.createElement( D.Zo, { onSelected: (t) => { (0, k.b8)(t, e.friend.GetCommunityProfileURL() + "inventory/"); }, }, (0, m.Xx)("#FriendMenu_ViewInventory"), ); } (0, i.gn)([c.ak], ae.prototype, "SendTradeOffer", null); class le extends l.Component { BanFriend() { return (0, i.mG)(this, void 0, void 0, function* () { (yield (0, L.V3)(this.props.ownerWindow, (0, m.Xx)("#Friend_Ban"), (0, m.Xx)("#Friend_Ban_Confirm", this.props.friend.display_name), (0, m.Xx)("#Friend_Ban_Button"), (0, m.Xx)("#Button_Cancel"), !0)) && this.props.group.SetUserBanState(this.props.friend.accountid, !0); }); } OnKickFriend() { let e = this.props.group, t = Ce, n = this.props.ownerWindow; new Promise((e, i) => { let o = (0, L.Tt)(n, (0, m.Xx)("#Friend_Kick", this.props.friend.display_name)); (0, s.BR)( l.createElement(fe, { OnOK: e, OnCancel: i, OnSet: (e) => { t = e; }, }), n, "alertdialog", o, (0, r.Og)(n), ); }) .then(() => e.KickUser(this.props.friend.accountid, Math.floor(Date.now() / 1e3 + t))) .catch(() => {}); } render() { let e = [], t = this.props.friend, n = this.props.group; return n.BHasMember(t.accountid) ? (!this.props.bIsSelf && n.BCanKick() && e.push(l.createElement(D.Zo, { disabled: !n.BCanKickMember(t.accountid), key: "kick", onSelected: this.OnKickFriend }, (0, m.Xx)("#Friend_Menu_KickFromChatRoom"))), !this.props.bIsSelf && n.BCanBan() && e.push(l.createElement(D.Zo, { disabled: !n.BCanBanMember(t.accountid), key: "ban", onSelected: this.BanFriend }, (0, m.Xx)("#Friend_Menu_Ban"))), n && e.push(l.createElement(ee, { key: "editroles", friend: t, group: n, bEditable: n.BCanEditRoles() }))) : e.push(l.createElement(D.Zo, { disabled: !0, key: "notmember", onSelected: null }, (0, m.Xx)("#Friend_Menu_HasLeftChat"))), e; } } (0, i.gn)([c.ak], le.prototype, "BanFriend", null), (0, i.gn)([c.ak], le.prototype, "OnKickFriend", null); let ce = class extends l.Component { constructor(e) { super(e), (this.state = { bIsSubscribedToApp: void 0 }), F.F.BIsSubscribedApp(this.props.unAppID).then((e) => { this.setState({ bIsSubscribedToApp: e }); }); } ShowStorePage(e) { let t = (0, j.FG)(this.props.unAppID, "friendcontextmenu"); (0, k.b8)(e, t), e.stopPropagation(); } ShowCommunityHub(e) { let t = `${M.De.COMMUNITY_BASE_URL}app/${this.props.unAppID}`; (0, k.b8)(e, t), e.stopPropagation(); } LaunchGame(e) { let t = "steam://rungameid/" + (this.props.ulGameID || this.props.unAppID); (0, k.b8)(e, t), e.stopPropagation(); } WatchGame(e) { o.Ul.UIStore.SetFriendBroadcastVisible(this.props.friend.steamid64, !0), this.props.friend.OpenChatDialog((0, r.Um)(this, e)); } JoinGame(e) { const t = this.props.friend; if (!t.persona.has_joinable_game_flag || (t.persona.connect_string && 0 != t.persona.connect_string.length)) { const n = (0, K.gh)(t.persona.GetAccountID(), t.persona.m_unGamePlayedAppID, t.persona.connect_string, null, t.persona.is_in_valid_lobby && t.persona.m_game_lobby_id); (0, k.b8)(e, n); } else { let e = this.props.ownerWindow; (0, s.AM)(l.createElement(ve, { friend: t, ownerWindow: e }), e, { browserContext: this.props.browserContext }); } e.stopPropagation(); } ViewGameInfo(e) { if (M.De.IN_CLIENT && (0, Q.U5)("ServerBrowser.CreateFriendGameInfoDialog")) { const e = this.props.browserContext.m_unPID; SteamClient.ServerBrowser.CreateFriendGameInfoDialog(e, this.props.friend.steamid64); } else { const t = `steam://viewfriendsgame/${this.props.friend.steamid64}`; (0, k.b8)(e, t); } e.stopPropagation(); } ShowInSteam(e) { let t = `steam://store/${this.props.unAppID}`; (0, k.b8)(e, t), e.stopPropagation(); } JoinPartyBeacon(e) { let t = `steam://joinparty/${this.props.unAppID}/${this.props.partyBeacon.beacon_id}`; (0, k.b8)(e, t), e.stopPropagation(); } render() { var e, t, n, i, r; if (!this.props.unAppID) return null; let a, s = [], c = this.props.friend, d = o.Ul.AppInfoStore.GetAppInfo(this.props.unAppID); if (!d.is_valid) return null; if (d.is_initialized) if (this.props.bShowLargeHeader) a = l.createElement("div", { className: "contextMenuGameHeader" }, l.createElement("img", { className: "GameHeader", src: d.logo_url })); else { let e = l.createElement("span", { className: "contextMenuGameName" }, (0, m.Xx)("#Friend_Menu_ViewGameStorePageGameName", this.props.strGameName || d.name)); a = l.createElement("div", { className: "contextMenuGameItem" }, l.createElement("div", { className: "contextMenuGameIcon" }, l.createElement("img", { className: "GameIcon", src: d.icon_url })), e); } const h = this.props.localAppID == this.props.unAppID; void 0 === this.state.bIsSubscribedToApp ? s.push(l.createElement(D.Zo, { className: "contextMenuGameOptions contextMenuPlayButton", key: "showinsteam", onSelected: this.ShowInSteam }, l.createElement(G.shV, null), (0, m.Xx)("#Friend_Menu_ShowInSteam"))) : this.state.bIsSubscribedToApp && (this.props.partyBeacon ? s.push(l.createElement(D.Zo, { className: "contextMenuGameOptions contextMenuPlayButton contextMenuPartyBeacon", key: "joinparty", onSelected: this.JoinPartyBeacon }, l.createElement(G.shV, null), (0, m.Xx)("#Friend_Menu_JoinFriendPartyBeacon"))) : c && c.persona.is_in_joinable_game && s.push(l.createElement(D.Zo, { className: "contextMenuGameOptions contextMenuPlayButton", key: "joingame", onSelected: this.JoinGame }, l.createElement(G.shV, null), (0, m.Xx)("#Friend_Menu_JoinFriendGame"))), h || s.push(l.createElement(D.Zo, { className: "contextMenuGameOptions contextMenuPlayButton", key: "launchgame", onSelected: this.LaunchGame }, l.createElement(G.shV, null), (0, m.Xx)("#Friend_Menu_LaunchFriendGame")))), c && s.push(l.createElement(D.Zo, { className: "contextMenuGameOptions", key: "watchgame", onSelected: this.WatchGame }, (0, m.Xx)("#Friend_Menu_WatchFriendGame"))); let u = null !== (e = null == c ? void 0 : c.persona.has_server_ip) && void 0 !== e && e, p = null !== (n = null === (t = null == c ? void 0 : c.persona) || void 0 === t ? void 0 : t.HasRichPresenceForViewGameInfo()) && void 0 !== n && n; return ( c && (u || p) && !(null === (i = this.context) || void 0 === i ? void 0 : i.IN_GAMEPADUI) && s.push(l.createElement(D.Zo, { className: "contextMenuGameOptions", key: "viewgameinfo", onSelected: this.ViewGameInfo }, (0, m.Xx)("#Friend_Menu_ViewGameInfo"))), h || s.push(l.createElement(D.Zo, { className: "contextMenuGameOptions", key: "viewstorepage", onSelected: this.ShowStorePage }, (0, m.Xx)("#Friend_Menu_ViewGameStorePage"))), (null === (r = this.context) || void 0 === r ? void 0 : r.IN_GAMEPADUI) || s.push(l.createElement(D.Zo, { className: "contextMenuGameOptions", key: "viewcommunityhub", onSelected: this.ShowCommunityHub }, (0, m.Xx)("#Friend_Menu_ViewCommunityHub"))), l.createElement(l.Fragment, null, l.createElement(D.Zo, { className: "contextMenuGameTitle contextMenuUnselectable", onSelected: null, disabled: !0 }, l.createElement("div", { className: "contextMenuGameTitleBlurCropContainer" }, a)), l.createElement("div", { className: "contextMenuSectionContent" }, s, this.props.extraItems)) ); } }; (ce.contextType = M.E_), (0, i.gn)([c.ak], ce.prototype, "ShowStorePage", null), (0, i.gn)([c.ak], ce.prototype, "ShowCommunityHub", null), (0, i.gn)([c.ak], ce.prototype, "LaunchGame", null), (0, i.gn)([c.ak], ce.prototype, "WatchGame", null), (0, i.gn)([c.ak], ce.prototype, "JoinGame", null), (0, i.gn)([c.ak], ce.prototype, "ViewGameInfo", null), (0, i.gn)([c.ak], ce.prototype, "ShowInSteam", null), (0, i.gn)([c.ak], ce.prototype, "JoinPartyBeacon", null), (ce = (0, i.gn)([a.Pi], ce)); let me = class extends l.Component { WatchStream() { let e = this.props.browserContext, t = this.props.friend; const n = t.persona.m_broadcastAccountId; o.Ul.UIStore.ShowOrActivateBroadcast(e, n, !0).ShowWatchPromptDialog(t); } render() { let e = this.props.friend; return l.createElement(l.Fragment, null, l.createElement(D.Zo, { className: "contextMenuBroadcast contextMenuUnselectable", onSelected: null, disabled: !0 }, l.createElement("div", { className: "contextMenuBroadcastTitle" }, (0, m.Xx)("#Broadcast_Watching")), l.createElement("div", { className: "contextMenuBroadcastSubtitle" }, e.GetBroadcastDescription())), l.createElement("div", { className: "contextMenuSectionContent" }, l.createElement(D.Zo, { className: "contextMenuGameOptions", onSelected: this.WatchStream }, (0, m.Xx)("#Broadcast_WatchStream")))); } }; function de(e) { o.Ul.FriendStore.FavoritesStore.AddToFavorites({ friend: e }); } function he(e) { o.Ul.FriendStore.FavoritesStore.RemoveFromFavorites({ friend: e }); } function ue(e, t, n) { return (0, E.yV)(l.createElement(pe, { browserContext: e, group: t, ownerWindow: (0, g.RA)(n) }), n); } function pe(e) { var t; let n = []; return ( e.group && e.group.modifiable && (n.push( l.createElement( D.Zo, { key: "managegroup", onSelected: () => { var t, n, i; (t = e.browserContext), (n = e.group), (i = e.ownerWindow), (0, s.BR)(l.createElement(S, { browserContext: t, group: n, rgPreSelectedFriends: n.member_accountid_list }), i, "CreateFriendCategoryDialog", { strTitle: (0, m.Xx)("#FriendGroup_Menu_Manage"), popupWidth: 664, popupHeight: 700 }, (0, r.Og)(i)); }, }, (0, m.Xx)("#FriendGroup_Menu_Manage"), ), ), n.push( l.createElement( D.Zo, { key: "removegroup", onSelected: () => { o.Ul.FriendStore.FriendGroupStore.RemoveGroup(e.group); }, }, (0, m.Xx)("#FriendGroup_Menu_Remove"), ), )), l.createElement( D.xV, { className: "friendsContextMenu", label: null === (t = e.group) || void 0 === t ? void 0 : t.name }, n, l.createElement( D.Zo, { key: "creategroup", onSelected: () => { v(e.browserContext, e.ownerWindow); }, }, (0, m.Xx)("#FriendGroup_Menu_CreateGroup"), ), ) ); } function _e(e, t, n) { return (0, E.yV)(l.createElement(ge, { browserContext: e, ownerWindow: t.currentTarget.ownerDocument.defaultView, setPersonaNameEresultCallback: n }), t); } (0, i.gn)([c.ak], me.prototype, "WatchStream", null), (me = (0, i.gn)([a.Pi], me)); class ge extends l.PureComponent { constructor(e) { super(e); } SetUserOnline() { o.Ul.FriendStore.SetUserPersonaState(1); } SetUserInvisible() { o.Ul.FriendStore.SetUserPersonaState(7); } SetUserAway() { o.Ul.FriendStore.SetUserPersonaState(3); } SetUserOffline() { o.Ul.SignOutOfFriends(this.props.browserContext), o.Ul.FriendStore.SetUserPersonaState(0, !1); } ToggleUserDND() { o.Ul.FriendStore.SetUserDoNotDisturb(!o.Ul.FriendStore.GetUserDoNotDisturb()); } ShowUserProfile(e) { let t = o.Ul.FriendStore.self.GetCommunityProfileURL(); (0, k.b8)(e, t), e.stopPropagation(); } EditProfile(e) { let t = `${o.Ul.FriendStore.self.GetCommunityProfileURL()}edit`; (0, k.b8)(e, t), e.stopPropagation(); } EditName(e) { var t, n; this.props.browserContext, (t = this.props.ownerWindow), (n = this.props.setPersonaNameEresultCallback), (0, s.BR)(l.createElement(N, { eResultCallback: n }), t, "ChangePersonaDialog", { strTitle: (0, m.Xx)("#Friend_Menu_AddNickname"), popupWidth: 640, popupHeight: 400 }, (0, r.Og)(t)); } render() { let e = [], t = [], n = 1 == o.Ul.FriendStore.self.persona.m_ePersonaState; e.push(l.createElement(D.Td, { key: "state_online", bChecked: n, onSelected: this.SetUserOnline }, (0, m.Xx)("#PersonaStateOnline"))); let i = 3 == o.Ul.FriendStore.self.persona.m_ePersonaState; e.push(l.createElement(D.Td, { key: "state_away", bChecked: i, onSelected: this.SetUserAway }, (0, m.Xx)("#PersonaStateAway"))); let r = 7 == o.Ul.FriendStore.self.persona.m_ePersonaState; if ((e.push(l.createElement(D.Td, { key: "state_invisible", className: "personaContextMenuItem", bChecked: r, onSelected: this.SetUserInvisible }, (0, m.Xx)("#PersonaStateInvisible"), l.createElement("div", { className: "persona_menu_descriptor" }, (0, m.Xx)("#PersonaStateInvisibleDescriptor")))), M.De.IN_CLIENT && o.Ul.SettingsStore.BClientHasFeatureOrOnWeb("DoNotDisturb"))) { let t = 0 == o.Ul.FriendStore.self.persona.m_ePersonaState; e.push(l.createElement(D.Td, { key: "state_offline", className: "personaContextMenuItem", bChecked: t, onSelected: this.SetUserOffline }, (0, m.Xx)("#PersonaStateOffline"), l.createElement("div", { className: "persona_menu_descriptor" }, (0, m.Xx)("#PersonaStateOfflineDescriptor")))); } if (o.Ul.SettingsStore.BClientHasFeatureOrOnWeb("DoNotDisturb")) { let e = o.Ul.FriendStore.GetUserDoNotDisturb(); t.push(l.createElement(D.Td, { key: "do_not_disturb", className: "personaContextMenuItem", bChecked: !1, onSelected: this.ToggleUserDND }, l.createElement(d.ji, { key: "dnd_checkbox", className: "DNDCheckBox", checked: e, label: (0, m.Xx)("#User_ToggleDoNotDisturb") }), l.createElement("div", { className: "persona_menu_dnd_descriptor" }, (0, m.Xx)("#PersonaStateDoNotDisturbDescriptor")))); } return t.push(l.createElement(D.Zo, { key: "editname", onSelected: this.EditName }, (0, m.Xx)("#Friend_Menu_ChangeMyName"))), t ? l.createElement(D.xV, { className: "friendsContextMenu currentUserContextMenu", label: o.Ul.FriendStore.self.display_name }, l.createElement("div", { className: "contextMenuSectionContent" }, e), t) : null; } } (0, i.gn)([c.ak], ge.prototype, "SetUserOnline", null), (0, i.gn)([c.ak], ge.prototype, "SetUserInvisible", null), (0, i.gn)([c.ak], ge.prototype, "SetUserAway", null), (0, i.gn)([c.ak], ge.prototype, "SetUserOffline", null), (0, i.gn)([c.ak], ge.prototype, "ToggleUserDND", null), (0, i.gn)([c.ak], ge.prototype, "ShowUserProfile", null), (0, i.gn)([c.ak], ge.prototype, "EditProfile", null), (0, i.gn)([c.ak], ge.prototype, "EditName", null); const Ce = 3600; class fe extends l.Component { OnCancel() { this.props.OnCancel(), this.props.closeModal(); } OnOK() { this.props.OnOK(), this.props.closeModal(); } OnDropDownChange(e, t) { this.props.OnSet(e.data); } render() { let e = [ { label: (0, m.Xx)("#Friend_Kick_Hour"), data: Ce }, { label: (0, m.Xx)("#Friend_Kick_Day"), data: 86400 }, { label: (0, m.Xx)("#Friend_Kick_Week"), data: 604800 }, ]; return l.createElement(s.e1, { onEscKeypress: this.OnCancel }, l.createElement(d.oX, { classNameContent: "KickUserDialog", onSubmit: this.OnOK, bCenterVertically: !0 }, l.createElement(d.h4, null, " ", (0, m.Xx)("#Friend_Kick"), " "), l.createElement(d.uT, null, l.createElement(d.Ac, null, (0, m.Xx)("#Friend_Kick_How_Long")), l.createElement(d.ry, { strDefaultLabel: (0, m.Xx)("#Friend_Kick_Hour"), rgOptions: e, onChange: this.OnDropDownChange, selectedOption: void 0 })), l.createElement(d.$_, null, l.createElement(d.o9, { onCancel: this.OnCancel, strOKText: (0, m.Xx)("#Friend_Kick_Button"), strCancelText: (0, m.Xx)("#Button_Cancel") })))); } } (0, i.gn)([c.ak], fe.prototype, "OnCancel", null), (0, i.gn)([c.ak], fe.prototype, "OnOK", null), (0, i.gn)([c.ak], fe.prototype, "OnDropDownChange", null); const ve = (0, a.Pi)((e) => { const { friend: t, ownerWindow: n, closeModal: i } = e, o = t.persona.connect_string; return ( l.useEffect(() => { if (0 != o.length) { const e = (0, K.gh)(t.persona.GetAccountID(), t.persona.m_unGamePlayedAppID, t.persona.connect_string, null, t.persona.is_in_valid_lobby && t.persona.m_game_lobby_id); (0, k.b8)(n, e), i && i(); } }, [o]), l.createElement(q.uH, { bAlertDialog: !0, strTitle: (0, m.Xx)("#Friend_JoinGameWait_Title"), strDescription: (0, m.Xx)("#Friend_JoinGameWait_Desc"), strOKButtonText: (0, m.Xx)("#Friend_JoinGameWait_Cancel"), onOK: i, onCancel: i, closeModal: i }, l.createElement("div", { style: { display: "flex", justifyContent: "center", marginTop: "20px" } }, l.createElement(Z.V, null))) ); }); }, 46057: (e, t, n) => { "use strict"; n.d(t, { qe: () => Pe, HR: () => dt, mo: () => gt, o2: () => bt, yd: () => _t, $g: () => Ye, J9: () => $e, ZY: () => Qe, SR: () => Ue, $J: () => Ve }); var i = n(85556), o = n(19953), r = n(93354), a = n(84446), s = n(23346), l = n(19339), c = n(10167), m = n(37234), d = n(72746), h = n(23133), u = n(71357), p = n(13106), _ = n(32572), g = n(618), C = n(71061), f = n(51997), v = n(79588), S = n(50649), b = n(41370), I = n(27378), y = n(31542), E = n(83817), D = n(58046), w = n(29205), R = n(88669), A = n(84290), M = n(2049), k = n(33690), T = n(33082); let L = class extends I.Component { constructor(e) { super(e), (this.m_rgFavoriteElementRefs = []); } render() { let e = this.props.FavoritesStore.favorites.map((e, t) => { let n; if (e.friend) n = "f" + e.friend.accountid; else if (e.clan) n = "cl" + e.clan.clanid; else { if (!e.chat) return null; n = "cg" + e.chat.GetGroupID(); } return I.createElement(O, { favorite: e, index: t, friendRenderContext: this.GetFriendRenderContext(), key: n, bIsDragGhost: !1, bIsDragOutGhost: !1, ref: this.OnFavoriteElementRef.bind(this, t) }); }); return I.createElement(E.s, { "flow-children": "column" }, e); } OnFavoriteElementRef(e, t) { this.m_rgFavoriteElementRefs[e] = t; } GetFriendRenderContext() { return this.m_FriendRenderContext || (this.m_FriendRenderContext = { chatContext: "friendslist" }), this.m_FriendRenderContext; } }; L = (0, i.gn)([S.Pi], L); let G = class extends I.Component { constructor(e) { super(e), (this.m_iActiveDragIndex = void 0), (this.m_ActiveDrag = void 0), (this.m_ActiveDragOut = void 0), (this.m_bGhostIsDupe = !1), (this.m_rgFavoriteElementRefs = []), (this.m_bAcceptDrag = !1), (0, v.rC)(this), (this.state = { bHintDismissed: m.g_FriendsUIDesktopApp.UIDisplayPrefs.bFavoritesHintDismissed }); } DismissFavoritesHint() { this.setState({ bHintDismissed: !0 }), m.g_FriendsUIDesktopApp.SetUIDisplayPref("bFavoritesHintDismissed", !0); } render() { let e = this.props.FavoritesStore.favorites, t = this.m_ActiveDrag, n = "quickAccessFriends emptyQuickAccess"; if ((this.state.bHintDismissed && (n += " hintDismissed"), e.length || t)) { let n = e, i = d.Ul.SettingsStore.FriendsSettings.bCompactQuickAccess; if (t) { let e; if ((this.m_bGhostIsDupe && (e = n.findIndex((e) => (0, _.j)(e, t))), void 0 === this.m_iActiveDragIndex || this.m_iActiveDragIndex >= n.length)) n = [...n, Object.assign({ isActiveDrag: !0 }, t)]; else { this.m_iActiveDragIndex; n = [...n.slice(0, this.m_iActiveDragIndex), Object.assign({ isActiveDrag: !0 }, t), ...n.slice(this.m_iActiveDragIndex)]; } } let o = n.map((e, n) => { let i; if (e.friend) i = "f" + e.friend.accountid; else if (e.clan) i = "cl" + e.clan.clanid; else { if (!e.chat) return null; i = "cg" + e.chat.GetGroupID(); } let o = this.m_bGhostIsDupe && !e.isActiveDrag && (0, _.j)(t, e), r = e.isActiveDrag; return r && (i += "dragGhost"), I.createElement(O, { favorite: e, index: n, friendRenderContext: this.GetFriendRenderContext(), key: i, bIsDragGhost: r, bIsDragOutGhost: o, ref: this.OnFavoriteElementRef.bind(this, n) }); }), r = "quickAccessFriends"; return i && (r += " compactQuickAccess"), I.createElement(h.R, Object.assign({ className: r }, this.GetDragDropProps(), { "flow-children": "grid" }), o, I.createElement("div", { className: "dropTargetBox" })); } return I.createElement(h.G, Object.assign({ className: n }, this.GetDragDropProps()), I.createElement("div", { className: "quickAccessFriendsMessage" }, (0, A.Xx)("#FriendsList_Favorites_Hint")), !this.state.bHintDismissed && I.createElement("div", { className: "quickAccessFriendsMessageDismiss", onClick: this.DismissFavoritesHint }, (0, A.Xx)("#Generic_Got_It")), I.createElement("div", { className: "dropTargetBox" })); } OnFavoriteElementRef(e, t) { this.m_rgFavoriteElementRefs[e] = t; } GetFriendRenderContext() { return this.m_FriendRenderContext || (this.m_FriendRenderContext = { chatContext: "friendslist" }), this.m_FriendRenderContext; } GetDragDropProps() { let e = { rgAcceptedTypes: ["friend", "chattab", "chatroomgroup", "clan"] }; return (e.fnDragEnter = this.OnDragEnter), (e.fnDragOver = this.OnDragOver), (e.fnDragLeave = this.OnDragLeave), (e.fnDrop = this.OnDrop), (e.onDragStart = this.OnDragStart), (e.onDragEndCapture = this.OnDragEnd), e; } OnDragStart(e) { let t = m.g_FriendsUIDesktopApp.DragDropManager.GetDragData(); !t || ("friend" != t.type && "chatroomgroup" != t.type && "clan" != t.type) || ((t.is_favorite = !0), (this.m_ActiveDragOut = this.FindItemFromDrag(t))); } OnDragEnd(e) { let t = m.g_FriendsUIDesktopApp.DragDropManager.GetDragData(), n = this.FindItemFromDrag(t); if (n && "is_favorite" in t && t.is_favorite && !m.g_FriendsUIDesktopApp.DragDropManager.BWasDropConsumed()) { let t = e.currentTarget.getBoundingClientRect(); const i = 100; (0, R.H2)(t, e.clientX, e.clientY) > i && (this.props.FavoritesStore.RemoveFromFavorites(n), m.g_FriendsUIDesktopApp.DragDropManager.EndDrag()); } this.m_ActiveDragOut = void 0; } FindItemFromDrag(e) { let t, n, i, o; if ("friend" == e.type) n = e.friend; else if ("chattab" == e.type) { let t = e.tab; if (t instanceof r.we) { let e = t.GetGroup(); e.BIsClanChatRoom() && (i = d.Ul.FriendStore.ClanStore.GetClan(e.GetClanID())), (o = e); } else { n = t.GetChatView().chat.chat_partner; } } else "chatroomgroup" == e.type ? (o = e.group) : "clan" == e.type && (i = e.clan); return n ? n.is_friend && (t = { friend: n }) : i ? (t = { clan: i }) : o && (t = { chat: o }), t; } OnDragEnter(e, t) { let n = this.FindItemFromDrag(e); return n && !(0, _.j)(this.m_ActiveDrag, n) && ((this.m_ActiveDrag = n), (this.m_bGhostIsDupe = this.props.FavoritesStore.BIsFavorited(n))), !0; } OnDragOver(e) { let t, n; for (let i of this.m_rgFavoriteElementRefs) { let o = i && i.GetBoundingClientRect(); if (o) { let r = (0, R.H2)(o, e.clientX, e.clientY); (void 0 === n || r < n) && ((n = r), (t = i)); } } t && (this.m_iActiveDragIndex = t.props.index), (e.dataTransfer.dropEffect = "copy"); } ResetDragState() { (this.m_ActiveDrag = void 0), (this.m_ActiveDragOut = void 0), (this.m_iActiveDragIndex = void 0); } OnDragLeave() { this.m_ActiveDrag && this.ResetDragState(); } OnDrop(e, t) { let n = this.FindItemFromDrag(e); this.m_ActiveDrag; n ? (m.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed(), this.props.FavoritesStore.AddToFavorites(n, this.m_iActiveDragIndex), n.friend && n.friend.LoadEquippedProfileItems(), this.ResetDragState()) : this.m_ActiveDrag && this.ResetDragState(); } }; (0, i.gn)([v.LO], G.prototype, "m_iActiveDragIndex", void 0), (0, i.gn)([v.LO], G.prototype, "m_ActiveDrag", void 0), (0, i.gn)([v.LO], G.prototype, "m_ActiveDragOut", void 0), (0, i.gn)([M.ak], G.prototype, "DismissFavoritesHint", null), (0, i.gn)([M.ak], G.prototype, "OnDragStart", null), (0, i.gn)([M.ak], G.prototype, "OnDragEnd", null), (0, i.gn)([M.ak], G.prototype, "OnDragEnter", null), (0, i.gn)([M.ak], G.prototype, "OnDragOver", null), (0, i.gn)([M.ak], G.prototype, "OnDragLeave", null), (0, i.gn)([M.ak], G.prototype, "OnDrop", null), (G = (0, i.gn)([S.Pi], G)); class O extends I.Component { GetBoundingClientRect() { let e = y.findDOMNode(this); return e ? e.getBoundingClientRect() : null; } onFavoriteElementClick(e) { let t = this.props.favorite; if (t.friend) this.props.favorite.friend.OpenChatDialog((0, m.Um)(null, e)); else if (t.clan) t.clan.OpenChatDialog((0, m.Um)(this, e)); else { if (!t.chat) return; d.Ul.UIStore.ShowAndOrActivateChatRoomGroup((0, m.Um)(this, e), t.chat, !0); } e.stopPropagation(); } OnFavoriteElementContextMenu(e) { let t = this.props.favorite; if (t.friend) (0, p.$W)((0, m.Um)(this, e), this.props.friendRenderContext, t.friend, e); else if (t.clan) (0, f.ip)(e, t.clan, { is_favorites: !0 }); else { if (!t.chat) return; (0, f.bU)(e, t.chat, { is_favorites: !0 }); } e.stopPropagation(); } render() { let e, t, n = "quickAccessFriend", i = this.props.favorite; this.props.bIsDragGhost ? (n += " dropGhost") : this.props.bIsDragOutGhost && (n += " dragOriginGhost"), this.props.bIsDragOutGhost && (e = { display: "none" }), (t = i.friend ? I.createElement(F, { key: i.friend.accountid, friend: i.friend, friendRenderContext: this.props.friendRenderContext, className: n }) : i.clan ? I.createElement(B, { key: i.clan.clanid, clan: i.clan, className: n }) : i.chat ? I.createElement(x, { key: i.chat.GetGroupID(), chat: i.chat, className: n }) : null); let o = I.createElement(E.s, { style: e, className: "favoriteElement", onActivate: this.onFavoriteElementClick, onOKActionDescription: (0, A.Xx)("#Friend_Menu_SendMessage"), onMenuActionDescription: (0, A.Xx)("#Friend_Menu_Open"), onContextMenu: this.OnFavoriteElementContextMenu, onMenuButton: this.OnFavoriteElementContextMenu }, t); return i.friend ? I.createElement(_t, { friend: i.friend, context: this.props.friendRenderContext }, o) : o; } } (0, i.gn)([M.ak], O.prototype, "onFavoriteElementClick", null), (0, i.gn)([M.ak], O.prototype, "OnFavoriteElementContextMenu", null); let F = (0, S.Pi)(function (e) { let t = (0, o.id)(), n = e.friend, i = !t && d.Ul.SettingsStore.FriendsSettings.bCompactQuickAccess, r = null; const a = (0, k.Wy)(), s = (0, m.rb)(a.ownerWindow), l = !(0, T.n)(s, T.D); let c, h = d.Ul.CMInterface.logged_on; if ( (I.useEffect(() => { d.Ul.CMInterface.logged_on && n.LoadEquippedProfileItems(); }, [h, n]), n.persona.is_awayOrSnooze && (r = I.createElement(D.a, { persona: n.persona, className: "SnoozeContainer", size: "medium", dim: !0 })), n.persona.is_ingame) ) { let e = n.persona.m_unGamePlayedAppID && d.Ul.AppInfoStore.GetAppInfo(n.persona.m_unGamePlayedAppID); (null == e ? void 0 : e.is_valid) && (c = I.createElement("div", { className: "FavoriteFriend_GameIcon" }, I.createElement("img", { className: "gameIcon", src: e.icon_url, draggable: !1 }))); } let u = d.Ul.ChatStore.FriendChatStore.GetUnfilteredFriendsWithUnreadMessages(), p = !1; for (let e of u) if (e.accountid_partner == n.accountid) { p = !0; break; } let _ = null; p && (_ = I.createElement("div", { className: "ChatUnreadMessageIndicator" }, I.createElement("div", { className: "chatUnreadCircle" }))); let g = null, C = null, f = d.Ul.SettingsStore.FriendsSettings.bAnimatedAvatars && n.persona.is_online; if ((0, b.SZ)(() => n.BLoadedEquippedItems())) { let e = n.GetEquippedProfileItems(); e && ((g = e.animated_avatar), (C = e.avatar_frame)); } return I.createElement(gt, { friend: n, key: n.accountid, className: e.className, context: e.friendRenderContext, bFriendsListEntry: !0, bSingleClickActivate: !0 }, !t && I.createElement("div", null, I.createElement(w._1, { key: `${n.persona.GetAccountID()}_${n.persona.is_online}`, loopDuration: f ? "Medium" : "None", persona: n.persona, animatedAvatar: g, avatarFrame: C, size: "Medium", bLimitProfileFrameAnimationTime: !f || l }, c, r), !i && I.createElement("div", { className: "playerNameQuickAccessContainer" }, I.createElement("div", { className: "playerName" }, n.display_name), n.is_display_name_nickname && I.createElement("span", { className: "playerNicknameBracket", title: (0, A.Xx)("#isNickname") }, "*")), _)); }), B = class extends I.Component { OnDragStart(e) { m.g_FriendsUIDesktopApp.DragDropManager.StartDrag({ type: "clan", clan: this.props.clan }); } OnDragEnd(e) { m.g_FriendsUIDesktopApp.DragDropManager.EndDrag(); } render() { var e; let t = "QuickAccessFriend QuickAccessClan", n = !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && d.Ul.SettingsStore.FriendsSettings.bCompactQuickAccess; this.props.className && (t += " " + this.props.className); let i = null, o = this.props.clan.GetChatGroupIDIfLoaded(); if (o) { let e = d.Ul.ChatStore.GetChatRoomGroup(o); e && (i = I.createElement(C.TJ, { group: e })); } return I.createElement("div", { className: t, draggable: !0, onDragStart: this.OnDragStart, onDragEnd: this.OnDragEnd }, I.createElement(g.hV, { clan: this.props.clan, size: "small" }), !n && I.createElement("div", { className: "clanName" }, this.props.clan.name), i); } }; (B.contextType = o.E_), (0, i.gn)([M.ak], B.prototype, "OnDragStart", null), (0, i.gn)([M.ak], B.prototype, "OnDragEnd", null), (B = (0, i.gn)([S.Pi], B)); let x = class extends I.Component { OnDragStart(e) { m.g_FriendsUIDesktopApp.DragDropManager.StartDrag({ type: "chatroomgroup", group: this.props.chat }); } OnDragEnd(e) { m.g_FriendsUIDesktopApp.DragDropManager.EndDrag(); } render() { var e; let t = "QuickAccessChat", n = null, i = !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && d.Ul.SettingsStore.FriendsSettings.bCompactQuickAccess; return this.props.chat.hasUnreadChatMessage && (n = I.createElement(C.TJ, { group: this.props.chat })), this.props.className && (t += " " + this.props.className), I.createElement("div", { className: t, draggable: !0, onDragStart: this.OnDragStart, onDragEnd: this.OnDragEnd }, I.createElement(g._P, { group: this.props.chat }), !i && I.createElement("div", { className: "clanName" }, this.props.chat.name), n); } }; (x.contextType = o.E_), (0, i.gn)([M.ak], x.prototype, "OnDragStart", null), (0, i.gn)([M.ak], x.prototype, "OnDragEnd", null), (x = (0, i.gn)([S.Pi], x)); var N = n(60176), P = n(14341), U = n(58908), V = n(29512), H = n(82909), W = n(61963), X = n(16518), j = n(83666), z = n(39353), K = n(59702), q = n(97720), Z = n(7098), Q = n(68816), $ = n(11259), Y = n(9824); const J = "DEBUG_LogCMTraffic"; var ee = n(99165), te = n(19411), ne = n(24292), ie = (n(77385), n(65204), n(94729), n(70349)); I.Component; class oe extends I.Component { constructor(e) { super(e), (this.m_rgSelectOptions = [ { label: "Option #1", data: 1 }, { label: "Option #2", data: 2 }, { label: I.createElement("span", null, "Option ", I.createElement("u", null, "#3")), data: 3 }, ]), (this.state = { inputText: "Input text", checkboxChecked: !0, selectedOption: void 0 }); } OnInputChanged(e) { this.setState({ inputText: e.currentTarget.value }); } OnToggled(e) { this.setState({ checkboxChecked: e }); } OnSelectDropDownChanged(e) { this.setState({ selectedOption: e.data }); } OnSubmit() { alert(JSON.stringify(this.state)); } render() { return I.createElement( I.Fragment, null, I.createElement( $.l0, { className: "DialogBody", onSubmit: this.OnSubmit }, I.createElement( "div", { className: "_FixedHeight" }, I.createElement($.Ac, null, "Text input"), I.createElement($.II, { label: "INPUT TITLE", value: this.state.inputText, onChange: this.OnInputChanged }), I.createElement($.II, { label: "READ ONLY", value: "You can't change this", disabled: !0 }), I.createElement($.ry, { label: "Drop down", rgOptions: this.m_rgSelectOptions, strDefaultLabel: "Select one...", selectedOption: this.state.selectedOption, onChange: this.OnSelectDropDownChanged }), I.createElement($.gE, { label: "On Off Toggle", checked: this.state.checkboxChecked, onChange: this.OnToggled }), I.createElement("div", { style: { marginBottom: "20px" } }, I.createElement("span", null, "Checkbox:"), I.createElement("div", { style: { display: "inline-block", marginLeft: "20px", verticalAlign: "middle" } }, I.createElement($.ji, null))), I.createElement("div", { style: { marginBottom: "20px" } }, I.createElement("span", null, "Round checkbox:"), I.createElement("div", { style: { display: "inline-block", marginLeft: "20px", verticalAlign: "middle" } }, I.createElement($.BQ, null))), I.createElement($.DS, { min: 0, max: 100, value: 25 }), I.createElement("div", { style: { marginBottom: "20px" } }, I.createElement($.FT, null, I.createElement($.KM, null, "PrimaryButton"), I.createElement($.Av, null, "TextButton"), I.createElement($.zx, { svgicon: X._OD }, "Button w/ Icon"))), I.createElement($.Uq, null, I.createElement($.II, { label: "Left input", placeholder: "Placeholder" }), I.createElement($.II, { label: "Right input", placeholder: "Placeholder" })), I.createElement($.gE, { label: "Another toggle", description: "This one has a longer description with more details." }), ), ), I.createElement($.$_, null, I.createElement($.o9, { onCancel: this.props.onCancel })), ); } } (0, i.gn)([M.ak], oe.prototype, "OnInputChanged", null), (0, i.gn)([M.ak], oe.prototype, "OnToggled", null), (0, i.gn)([M.ak], oe.prototype, "OnSelectDropDownChanged", null), (0, i.gn)([M.ak], oe.prototype, "OnSubmit", null); class re extends I.Component { constructor() { super(...arguments), (this.rgDragDropOptions = [I.createElement($.HC, { key: "key1", id: "key1" }, I.createElement($.gE, { label: "Draggable toggle #1" })), I.createElement($.HC, { key: "key2", id: "key2" }, I.createElement($.gE, { label: "Draggable toggle #2" })), I.createElement($.HC, { key: "key3", id: "key3" }, I.createElement($.gE, { label: "Draggable toggle #3" })), I.createElement($.HC, { key: "keyz", id: "keyz" }, I.createElement(ae, { ref: this.RefTest })), I.createElement($.HC, { key: "key4", id: "key4" }, I.createElement($.gE, { label: "Draggable toggle #4" }))]); } OnSubmit() { alert(JSON.stringify(this.state)); } RefTest(e) { console.log("Got ref", e); } OnListReordered(e, t) { Y.hV(this.rgDragDropOptions, e, t), this.forceUpdate(); } render() { return I.createElement($.l0, { className: "DialogBody", onSubmit: this.OnSubmit }, I.createElement($.RW, { onReorder: this.OnListReordered }, this.rgDragDropOptions)); } } (0, i.gn)([M.ak], re.prototype, "OnSubmit", null), (0, i.gn)([M.ak], re.prototype, "RefTest", null), (0, i.gn)([M.ak], re.prototype, "OnListReordered", null); class ae extends I.Component { constructor(e) { super(e), (this.state = { cSeconds: 0 }); } componentDidMount() { this.m_iInterval = window.setInterval(() => { this.setState((e) => ({ cSeconds: e.cSeconds + 1 })); }, 1e3); } componentWillUnmount() { window.clearInterval(this.m_iInterval); } render() { return I.createElement($.II, { value: this.state.cSeconds, disabled: !0, label: "COUNTER" }); } } class se extends I.Component { OnCMToggled(e) { e ? window.localStorage.setItem(J, "true") : window.localStorage.removeItem(J), this.forceUpdate(); } OnStickyContextMenuToggle(e) { (0, W.kl)(e), this.forceUpdate(); } render() { return I.createElement(I.Fragment, null, I.createElement($.uT, null, I.createElement($.gE, { label: '"Sticky" Context Menus', description: "Context menus will stay open to allow inspecting CSS", checked: (0, W.BY)(), onChange: this.OnStickyContextMenuToggle }), I.createElement($.gE, { label: "Log all CM Traffic", description: "All messages to and from the steam servers will be logged to the browser console (F12)", checked: window.localStorage && "true" == window.localStorage.getItem(J), onChange: this.OnCMToggled }))); } } (0, i.gn)([M.ak], se.prototype, "OnCMToggled", null), (0, i.gn)([M.ak], se.prototype, "OnStickyContextMenuToggle", null); class le extends I.Component { constructor(e) { super(e), (this.state = { searchString: "" }); } OnSearchInput(e) { e.currentTarget.value != this.state.searchString && this.setState({ searchString: e.currentTarget.value }); } render() { let e, t = new ne.NX(); e = "" == this.state.searchString ? d.Ul.FriendStore.self.steamid.GetAccountID() : this.state.searchString; let n = new ne.rO(d.Ul.FriendStore.GetPlayer(+e)); return ( (t.hover = n), (t.visible = !0), n.data_loader.EnsureCommunityDataLoaded(), I.createElement( $.l0, { className: "DialogBody" }, I.createElement($.Uq, null, I.createElement("div", { style: { flex: 1 } }, I.createElement($.__, null, "Old Throbber"), I.createElement("div", { className: "LoadingWrapper" }, I.createElement("div", { className: "LoadingThrobber" }, I.createElement("div", { className: "Bar Bar1" }), I.createElement("div", { className: "Bar Bar2" }), I.createElement("div", { className: "Bar Bar3" })), I.createElement("div", { className: "LoadingText" }))), I.createElement("div", { style: { flex: 2 } }, I.createElement($.__, null, "New Throbber (W.I.P.)"), I.createElement("div", { className: "displayRow" }, I.createElement(ee.V, { size: "xlarge", string: "X-Large" }), I.createElement(ee.V, { size: "large", string: "Large" }), I.createElement(ee.V, { size: "medium", string: "Medium" }), I.createElement(ee.V, { size: "small", string: "Small" })))), I.createElement($.uT, null, I.createElement($.__, null, "Miniprofile Tester:"), I.createElement("form", null, I.createElement("input", { className: "friendSearchInput", type: "text", name: "memberlistSearch", placeholder: "Enter SteamID", value: this.state.searchString, onInput: this.OnSearchInput, autoComplete: "off" })), I.createElement("div", { className: "fakeMiniProfile", style: { zIndex: 5 } }, I.createElement(te.Q5, { hoverInstance: t })), I.createElement(gt, { friend: d.Ul.FriendStore.GetPlayer(+e), context: null })), ) ); } } (0, i.gn)([M.ak], le.prototype, "OnSearchInput", null); var ce = n(70215), me = n(55948), de = n(88991), he = n(62902); class ue extends I.Component { constructor(e) { super(e); } static Posts() { return [ { date: "2019-05-17", content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.kQ)("#changeLog_UpdateItem77", I.createElement("a", { target: "_blank", href: "https://play.google.com/store/apps/details?id=com.valvesoftware.android.steam.friendsui" }, "Android"), I.createElement("a", { target: "_blank", href: "https://itunes.apple.com/app/steam-chat/id1434890245" }, "iOS")))) }, { date: "2019-05-01", content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem76"))) }, { date: "2019-04-24", content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem75"))) }, { date: "2019-04-17", content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem72")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem73")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem74"))) }, { date: 1532044800, content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.kQ)("#changeLog_UpdateItem71", I.createElement("b", null, (0, A.Xx)("#changeLog_Note"))))) }, { date: 1531443600, content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem68")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem69")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem70"))) }, { date: 1531263600, content: I.createElement( "div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem47")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem58")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem59")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem60")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem48")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem49")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem63")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem50")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem51")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem53")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem52")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem61")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem62")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem64")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem65")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem66")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem67")), ), }, { date: 1531162800, content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem54")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem55"))) }, { date: 1530298800, content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem56")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem57"))) }, { date: 1530126e3, content: I.createElement( "div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItemSubHeader" }, (0, A.Xx)("#changeLog_UpdateItem_Permissions")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem39")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem40")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem41")), I.createElement("div", { className: "changeLogItemSubHeader" }, (0, A.Xx)("#changeLog_UpdateSubHeader_General")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem45")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem30"), I.createElement("div", { style: { marginTop: "4px" } }, I.createElement("span", { style: { fontWeight: "bold", fontStyle: "italic" } }, (0, A.Xx)("#changeLog_Note")), I.createElement("span", { style: { fontStyle: "italic" } }, (0, A.Xx)("#changeLog_UpdateItem30_Note")))), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem29")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem25")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem26")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem38")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem31")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem42")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem28")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem27")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem33")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem32")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem34"), I.createElement("div", { style: { marginTop: "4px" } }, I.createElement("span", { style: { fontWeight: "bold", fontStyle: "italic" } }, (0, A.Xx)("#changeLog_Note")), I.createElement("span", { style: { fontStyle: "italic" } }, (0, A.Xx)("#changeLog_UpdateItem34_Note")))), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem35")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem36")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem37")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem43")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem44")), ), }, { date: 1529528400, content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem20")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem21")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem22")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem23")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem24"))) }, { date: 1529456400, content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem17")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem18")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem15")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem16")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem12")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem13")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem14")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem19"))) }, { date: 1529017200, content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItemSubHeader" }, (0, A.Xx)("#changeLog_UpdateSubHeader_General")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem11")), I.createElement("div", { className: "changeLogItemSubHeader" }, (0, A.Xx)("#changeLog_UpdateSubHeader_Linux")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem10")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem09"))) }, { date: 1528938e3, content: I.createElement("div", null, I.createElement("div", { className: "changeLogExtra" }, (0, A.Xx)("#changeLog_UpdateExtraInfo01")), I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem02")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem03")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem04")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem05")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem06")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem07")), I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem08")))) }, { date: 1528923600, content: I.createElement("div", { className: "changeLogDescription" }, I.createElement("div", { className: "changeLogItem" }, (0, A.Xx)("#changeLog_UpdateItem01"))) }, ]; } PostDate(e) { let t, n; t = "string" == typeof e ? new Date(e) : d.Ul.RTime32ToDate(e); return (n = t.toLocaleDateString(A.Yt.GetPreferredLocales(), { weekday: "long", year: "numeric", month: "long", day: "numeric", hour: "numeric", minute: "numeric" })), n; } render() { return I.createElement( I.Fragment, null, ue.Posts().map((e) => I.createElement("div", { key: e.date }, I.createElement("div", { className: "changeLogTitle" }, (0, A.Xx)("#changeLog_GenericUpdateTitle")), I.createElement("div", { className: "changeLogDate" }, this.PostDate(e.date)), e.content)), ); } } (0, i.gn)([M.ak], ue.prototype, "PostDate", null); class pe extends I.Component { constructor(e) { super(e); } render() { return I.createElement(Q.e1, { onEscKeypress: this.props.closeModal }, I.createElement($.VY, { className: "changeLogPage" }, I.createElement($.h4, null, (0, A.Xx)("#changeLog_Title")), I.createElement($.uT, null, I.createElement($.Ac, null, (0, A.Xx)("#changeLog_SubTitle")), I.createElement($.HV, { className: "changeLogDetails" }, I.createElement(ue, null))), I.createElement($.$_, null, I.createElement($.KM, { onClick: this.props.closeModal }, (0, A.Xx)("#Button_Close"))))); } } var _e = n(93635), ge = n(3571), Ce = n(87018), fe = n(31695), ve = n(94357), Se = n(69807), be = n(70532), Ie = n(56320), ye = n(62860), Ee = n(55981), De = n(46313), we = n(55937), Re = n(96119), Ae = n(6708), Me = n(89554); let ke = class extends I.Component { render() { const e = d.Ul.ChatStore.GetRecentChats(), t = { bGranularToday: !0, bGranularYesterday: !0, bGranularTodayTimeOnly: !0, bGranularWeek: !0, bAbbreviateDayOfWeek: !0, bForce24HourClock: d.Ul.SettingsStore.FriendsSettings.b24HourClock }; return I.createElement( "div", { className: Ae.RecentChatsList }, e.map((e, n) => { if (e instanceof l.a) { const i = e, o = i.GetMember(i.accountid_partner); let r; i.unread_message_count > 0 && (r = I.createElement("div", { key: "FriendMessageCount", className: "FriendMessageCount" }, i.unread_message_count)); let a = I.createElement("div", { key: "RecentTime", className: Ae.Time }, (0, Me.jr)(i.time_last_message, t)); return I.createElement(gt, { friend: o, key: n, className: (0, Ce.Z)(Ae.RecentChatElement, i.unread_message_count > 0 && "unreadFriend"), context: { chat: i, chatContext: "recentchats" }, bHideStatus: !0, bHideGameName: !0, bInGameIcon: !0, lastChat: i, statusPosition: "right", listStatusIndicator: [r, a] }); } { const i = e, o = i.GetRoomWithLastMessageForUser(); let r; i.hasUnreadChatMessage && (r = I.createElement("div", { key: "FriendMessageCount", className: (0, Ce.Z)("FriendMessageCount", i.HasUnreadMention && "HasUnreadMention") }, i.HasUnreadMention ? "@" : "!")); let a = o ? I.createElement("div", { key: "RecentTime", className: Ae.Time }, (0, Me.jr)(o.time_last_message, t)) : void 0; return I.createElement(C.wm, { key: n, className: Ae.RecentChatElement, group: i, bShowLastChat: !0, bHideUnreadMention: !0, additionalElements: [a, r] }); } }), ); } }; ke = (0, i.gn)([S.Pi], ke); var Te = n(92883), Le = n(70756); var Ge, Oe = n(10553), Fe = n(89051), Be = n(99643); let xe = class extends I.Component { constructor(e) { super(e); } render() { let e = this.props.chat.VoiceChatStore.HasBeenAttemptingOverTwoSeconds(), t = this.props.chat.VoiceChatStore.IsAttemptingReconnect(); return I.createElement("div", { className: "connectionStatusLabels" }, e && I.createElement("div", { className: "connectionStatus" }, I.createElement("a", { title: (0, A.Xx)("#VoiceChatConnectingHelp"), className: "connectionStatus", target: "_blank", href: "https://support.steampowered.com/kb_article.php?ref=2598-RTZB-6114" }, (0, A.Xx)("#VoiceChatConnecting"))), t && I.createElement("div", { className: "connectionStatus" }, I.createElement("a", { className: "connectionStatus", target: "_blank", href: "https://support.steampowered.com/kb_article.php?ref=2598-RTZB-6114" }, (0, A.Xx)("#VoiceChatReconnecting")))); } }; xe = (0, i.gn)([S.Pi], xe); let Ne = class extends I.Component { render() { let e = this.props.chats.GetActiveVoiceChat(); return this.props.chats.VoiceChat.IsAnyVoiceActive() && e ? I.createElement(Pe, { chat: e, name: this.props.chats.GetActiveVoiceChannelName(), nostatus: !1 }) : I.createElement("div", { className: "activeVoiceControls" }, I.createElement("div", { className: "buttonsContainer" }, I.createElement("div", { className: "activeVoiceFlexBox" }, I.createElement("div", { className: "activeVoiceLabels" }, I.createElement("div", { className: "activeVoiceHeader" }, (0, A.Xx)("#ActiveVoiceChat")), I.createElement("div", { className: "activeVoiceName" })), I.createElement(E.s, { className: "activeVoiceButtons", "flow-children": "row" }, I.createElement(Ue, null), I.createElement(Ve, null), I.createElement("div", { className: "activeVoiceButtonsSpacer" }), I.createElement(He, null), I.createElement("div", { className: "activeVoiceButtonsSpacerAfter" }))))); } }; Ne = (0, i.gn)([S.Pi], Ne); let Pe = class extends I.Component { constructor(e) { super(e); } ActivateActiveVoiceChat(e) { if (this.props.chat instanceof a.K) { let t = d.Ul.ChatStore.GetChatRoomGroup(this.props.chat.GetParentGroupID()); if (t) return void d.Ul.UIStore.ShowAndOrActivateChatRoomGroup((0, m.Um)(this, e), t, !0); } d.Ul.UIStore.ShowAndOrActivateChat((0, m.Um)(this, e), this.props.chat, !0); } render() { let e = d.Ul.VoiceStore.GetPushToTalkEnabled(), t = d.Ul.VoiceStore.GetPushToMuteEnabled(), n = d.Ul.VoiceStore.GetPushToTalkVoiceStateEnabled(), i = d.Ul.VoiceStore.GetPushToTalkHotKeyDisplayString(), o = ""; return ( (e || t) && (o += " pushToTalkEnabled"), n && (o += " pushToTalkKeyDown"), I.createElement( "div", { className: "activeVoiceControls" + o }, I.createElement("div", { className: "buttonsContainer" }, I.createElement("div", { className: "activeVoiceFlexBox" }, I.createElement("div", { className: "activeVoiceLabels" }, I.createElement("div", { className: "activeVoiceHeader" }, (0, A.Xx)("#ActiveVoiceChat")), I.createElement("div", { className: "activeVoiceName", onClick: this.ActivateActiveVoiceChat }, this.props.name)), I.createElement(E.s, { className: "activeVoiceButtons", "flow-children": "row" }, I.createElement(Ue, null), I.createElement(Ve, null), I.createElement("div", { className: "activeVoiceButtonsSpacer" }), I.createElement(He, null), I.createElement("div", { className: "activeVoiceButtonsSpacerAfter" }))), !this.props.nostatus && I.createElement(xe, { chat: this.props.chat })), (e || t) && I.createElement("div", { className: "activeVoicePushToTalk" + o }, (0, A.Xx)(t ? "#ActiveVoicePushToMute" : "#ActiveVoicePushToTalk", i)), ) ); } }; (0, i.gn)([M.ak], Pe.prototype, "ActivateActiveVoiceChat", null), (Pe = (0, i.gn)([S.Pi], Pe)); let Ue = class extends I.Component { ToggleMicrophone(e) { d.Ul.VoiceStore.IsMicMuted() && d.Ul.VoiceStore.IsOutputMuted() && d.Ul.VoiceStore.ToggleOutputMuting(), d.Ul.VoiceStore.ToggleMicMuting(), e.stopPropagation(); } render() { let e = d.Ul.VoiceStore.BNoMicAvailableForSession(), t = d.Ul.VoiceStore.BHasSampleRateTooHighInBrowser(), n = d.Ul.VoiceStore.IsMicMuted(), i = "VoiceControlPanelButton ToggleMicrophoneButton", o = ""; return (o = n ? (0, A.Xx)("#VoiceChat_UnmuteMic") : (0, A.Xx)("#VoiceChat_MuteMic")), e && ((i += " NoMicrophone"), (o = t ? (0, A.Xx)("#VoiceChat_ChromeSampleRateTooHighMicExplainer") : (0, A.Xx)("#VoiceChat_DeniedMicrophoneAccess"))), n && (i += " disabled"), I.createElement(Ie.wl, { className: i, onClick: this.ToggleMicrophone, onOKActionDescription: o, title: o }, I.createElement("div", { className: "VoiceIconCtn" }, n || e ? I.createElement(X.JgI, { off: !0 }) : I.createElement(X.JgI, null))); } }; (0, i.gn)([M.ak], Ue.prototype, "ToggleMicrophone", null), (Ue = (0, i.gn)([S.Pi], Ue)); let Ve = class extends I.Component { ToggleVoiceOutput(e) { d.Ul.VoiceStore.IsOutputMuted() == d.Ul.VoiceStore.IsMicMuted() && d.Ul.VoiceStore.ToggleMicMuting(), d.Ul.VoiceStore.ToggleOutputMuting(), e.stopPropagation(); } render() { let e = d.Ul.VoiceStore.IsOutputMuted(), t = "VoiceControlPanelButton ToggleVoiceOutputButton"; e && (t += " disabled"); let n = ""; return (n = e ? (0, A.Xx)("#VoiceChat_UnmuteSpeaker") : (0, A.Xx)("#VoiceChat_MuteSpeaker")), I.createElement(Ie.wl, { className: t, onClick: this.ToggleVoiceOutput, onOKActionDescription: n, title: n }, I.createElement("div", { className: "VoiceIconCtn" }, e ? I.createElement(X.bpe, { off: !0 }) : I.createElement(X.bpe, null), " ")); } }; (0, i.gn)([M.ak], Ve.prototype, "ToggleVoiceOutput", null), (Ve = (0, i.gn)([S.Pi], Ve)); let He = class extends I.Component { EndVoiceChat(e) { d.Ul.VoiceStore.OnUserEndVoiceChat(), e.stopPropagation(); } render() { return I.createElement(Ie.wl, { className: "VoiceControlPanelButton chatEndVoiceChat", onClick: this.EndVoiceChat, title: (0, A.Xx)("#VoiceChat_Leave"), onOKActionDescription: (0, A.Xx)("#VoiceChat_Leave") }, I.createElement("div", { className: "VoiceIconCtn" }, I.createElement(X.xsH, null))); } }; (He.contextType = o.E_), (0, i.gn)([M.ak], He.prototype, "EndVoiceChat", null), (He = (0, i.gn)([S.Pi], He)); class We extends I.Component { constructor(e) { super(e); } GetNormalizedSearchString() { return this.state.searchString && this.state.searchString.trim().toLocaleLowerCase(); } } const Xe = (e) => { e.fnOnToggleViewingIncomingInvites; let [t, n] = I.useState(d.Ul.UIStore.FriendsListSteamDeckActiveTab), i = I.useRef(d.Ul.UIStore.FriendsListSteamDeckActiveTab), [o] = I.useState(new Map()); I.useEffect(() => { e.rgTabs.forEach((e) => { o.set(e.eTab, I.createRef()); }); }, [e, o]), I.useEffect(() => { var e; if (t != i.current) { let n = o.get(i.current), r = o.get(t); (null === (e = n.current) || void 0 === e ? void 0 : e.BFocusWithin()) && r.current && r.current.TakeFocus(), (i.current = t); } }, [t, o]); const r = I.useCallback( (e, t) => { n(t), (i.current = e); }, [n, i], ); (0, M.Qg)(d.Ul.UIStore.FriendsListSteamDeckActiveTabCallbackList(), r); const a = I.useCallback((e) => { d.Ul.UIStore.FriendsListSteamDeckActiveTab = e; }, []), s = (e) => { d.Ul.UIStore.SelectFriendsListSteamDeckSiblingTab(e); }; let l = (0, b.SZ)(() => d.Ul.FriendStore.GetPendingInviteCount()); const c = () => { SteamClient.Messaging.PostMessage("FriendsUI", "NavigateToInvites", "{}"); }; return I.createElement( I.Fragment, null, I.createElement( "div", { className: "FriendsListSteamDeckTopSection" }, I.createElement( "div", { className: "TabPanelHeader" }, e.rgTabs[t].strTabContentTitle, t == Re.ou.FriendsList && I.createElement(E.s, { className: "FriendActionsContainer" }, l > 0 && I.createElement(E.s, { onActivate: c, onOKActionDescription: (0, A.Xx)("#Menu_FriendInvites"), focusable: !0, className: "FriendsInvitesButton" }, I.createElement(X.Fsn, { bShowArm: !0 }), I.createElement("div", { className: "PendingInviteCount" }, l)), I.createElement(E.s, { onActivate: c, onOKActionDescription: (0, A.Xx)("#FriendInviteLink_AddFriend"), focusable: !0, className: "friendListButton AddFriendButton" }, I.createElement(X.yBp, null))), t == Re.ou.GroupChats && I.createElement( E.s, { className: "FriendActionsContainer" }, I.createElement( E.s, { onActivate: (e) => { let t = R.RA(e); (0, q.bI)((0, m.rb)(t), t); }, onOKActionDescription: (0, A.Xx)("#Chat_CreateGroupChat"), focusable: !0, className: "NewChatGroupButton", }, I.createElement(X.hxK, null), ), ), ), I.createElement( E.s, { className: "FriendsListSteamDeckTabs", "flow-children": "row", navEntryPreferPosition: ye.c4.PREFERRED_CHILD }, I.createElement(E.s, { className: (0, Ce.Z)(ve.TabBumper, ve.Previous), onActivate: () => s(-1), focusable: !1 }, I.createElement(we.VC, { button: De.FX.LeftBumper, type: we.yV.Dark })), e.rgTabs.map((e, n) => I.createElement(Ke, { key: n, navRef: o.get(e.eTab), tab: e.eTab, activeTab: t, preferredFocus: e.eTab == t, onFocus: () => a(e.eTab), fnSetActiveTab: a }, e.tabElement)), I.createElement(E.s, { className: (0, Ce.Z)(ve.TabBumper, ve.Next), onActivate: () => s(1), focusable: !1 }, I.createElement(we.VC, { button: De.FX.RightBumper, type: we.yV.Dark })), ), ), I.createElement(ze, { rgTabs: e.rgTabs, activeTab: t }), ); }, je = (e, t) => { let n; switch (e) { case Re.ou.Favorites: n = "FavoritesTabList"; break; case Re.ou.FriendsList: n = "FriendsTabList"; break; case Re.ou.GroupChats: n = "GroupsTabList"; break; case Re.ou.RecentMessages: n = "RecentMessagesTabList"; break; default: n = "TabList"; } return (0, Ce.Z)(n, e < t ? "beforeActiveTab" : e == t ? "" : "afterActiveTab"); }; function ze(e) { const { rgTabs: t, activeTab: n } = e, i = I.useRef(n), o = (0, $.Do)().bQuickAccessMenu, r = I.useRef(), a = I.useRef(); return ( (0, I.useEffect)(() => { var e; i.current !== n && (null === (e = r.current) || void 0 === e ? void 0 : e.BFocusWithin()) && a.current && a.current.TakeFocus(), (i.current = n); }, [n]), I.createElement( E.s, { className: (0, Ce.Z)("FriendsListTabPanelContainer", o && "QuickAccess"), fnScrollIntoViewHandler: () => null }, t.map((e) => { const t = e.eTab === n, o = e.eTab === i.current, s = t ? a : o ? r : null; return I.createElement(qe, { className: je(e.eTab, n), key: e.eTab, navRef: s, bActiveTab: t }, e.tabContentElement); }), ) ); } const Ke = I.forwardRef(function (e, t) { let { tab: n, activeTab: o, fnSetActiveTab: r } = e, a = (0, i._T)(e, ["tab", "activeTab", "fnSetActiveTab"]); const s = n == o; return I.createElement( E.s, Object.assign( { focusable: !0, onActivate: () => { s || r(n); }, className: (0, Ce.Z)("FriendsListTab", s && "Active"), }, a, { ref: t }, ), ); }), qe = I.forwardRef(function (e, t) { let { bActiveTab: n, className: o, navRef: r, children: a } = e, s = (0, i._T)(e, ["bActiveTab", "className", "navRef", "children"]); const { refNav: l, bShouldMount: c } = (function (e, t) { const n = I.useRef(), i = I.useRef(), o = I.useRef(), r = I.useRef(), a = (0, ie.B)(e, t); return ( I.useEffect(() => { if (!e && a) n.current && (o.current = { scrollTop: n.current.scrollTop, scrollLeft: n.current.scrollLeft }), i.current && (r.current = i.current.GetFocusSnapshot()); else if (e && !a) { if (n.current && o.current) { const { scrollTop: e, scrollLeft: t } = o.current; (o.current = void 0), window.setTimeout(() => { (n.current.scrollTop = e), (n.current.scrollLeft = t); }, 1); } i.current && r.current && (i.current.RestoreFocusSnapshot(r.current, 2), (r.current = void 0)); } }, [e, a]), { bShouldMount: a || e, refNav: i, refScroll: n } ); })(!0, 3e5), m = (0, M.BE)(l, r); return I.createElement(E.s, Object.assign({ navRef: m, className: (0, Ce.Z)(o, "FriendsListTabPanel", n && "Active"), fnCanTakeFocus: () => n }, s, { ref: t }), c && a); }); function Ze() { let e = !1, t = (0, b.SZ)(() => { let t = 0; const n = d.Ul.ChatStore.GetRecentChats(); for (const i of n) if (i instanceof l.a) { const e = i; e.unread_message_count > 0 && (t += e.unread_message_count); } else if (i instanceof r.PR) { e || (e = i.HasUnreadMention); i.hasUnreadChatMessage && t++; } return t; }), n = 1 == t && e, i = t < 100 && !(e && 1 == t), o = n ? "@" : "!"; return I.createElement("div", { className: (0, Ce.Z)(ve.RecentChatIcon, n && ve.NotificationUnreadMention) }, I.createElement(X.fHW, null), t > 0 && I.createElement("div", { className: ve.UnreadAlert }, i ? t : o)); } let Qe = class extends We { constructor(e) { super(e), (this.m_navRef = null), (this.state = { searchString: "", bFriendTabSearch: !1, bViewingIncomingInvites: !1, tabLabelWidth: 0 }), (this.m_navRef = I.createRef()); } componentDidMount() { const e = this.props.friends.FavoritesStore.favorites; (d.Ul.UIStore.FriendsListSteamDeckActiveTab = e.length ? Re.ou.Favorites : Re.ou.FriendsList), (this.m_fnUnregisterMessages = SteamClient.Messaging.RegisterForMessages("FriendsList", this.OnMessage)); } componentWillUnmount() { this.m_fnUnregisterMessages && this.m_fnUnregisterMessages.unregister(); } OnMessage(e, t, n) { "FriendsList" == e && "ShowInvitesList" == t && ((d.Ul.UIStore.FriendsListSteamDeckActiveTab = Re.ou.FriendsList), this.SetInviteListVisibility(!0)); } OnSearchSelection() { this.setState({ searchString: "" }); } StartSearchOnKeyPress(e) {} SetInviteListVisibility(e) { this.setState({ bViewingIncomingInvites: e }, () => { this.state.bViewingIncomingInvites && (d.Ul.FriendStore.FriendGroupStore.EnsureMutualFriendsForIncomingInvites(), d.Ul.FriendStore.ClanStore.EnsureInitialStateForClanInvites()); }); } ToggleViewingIncomingInvites() { this.SetInviteListVisibility(!this.state.bViewingIncomingInvites); } TakeFocus() { this.m_navRef.current.TakeFocus(); } render() { let e = this.GetNormalizedSearchString(), t = "friendRequestButton"; this.state.bViewingIncomingInvites; let n = "friendTab socialListTab activeTab"; this.state.bFriendTabSearch; this.state.tabLabelWidth > 0 && this.state.tabLabelWidth; let i = !1; if (this.props.popup) { let e = (0, m.rb)(this.props.popup); i = !(0, d.ns)(e, d.D); } let o = !1, r = 0, a = !1, s = "friendListButton friendSettingsButton friendsListNeedsUpdate no-drag"; null != m.g_FriendsUIDesktopApp && ((o = m.g_FriendsUIDesktopApp.BNeedsUpdate()), (r = m.g_FriendsUIDesktopApp.GetSecondsOutOfDate()), r < 432e3 ? (o = !1) : r > 604800 && ((s += " friendsListVeryOutOfDate"), (a = !0))); let l = "friendlist GamepadMode"; this.props.bQuickAccess || (l += " FriendsListAnchored"), this.state.bViewingIncomingInvites && (l += " FriendRequestViewActive"); const c = [ { eTab: Re.ou.Favorites, strTabContentTitle: (0, A.Xx)("#FriendGroup_Favorites"), tabElement: I.createElement(X.Fyr, null), tabContentElement: I.createElement(L, { FavoritesStore: this.props.friends.FavoritesStore }) }, { eTab: Re.ou.FriendsList, strTabContentTitle: (0, A.Xx)("#Label_Friends"), tabElement: I.createElement(X.Fsn, { bShowArm: this.state.bViewingIncomingInvites }), tabContentElement: I.createElement(rt, { friends: this.props.friends, chats: this.props.chats, searchString: e, fnOnSearchSelection: this.OnSearchSelection, onStartSearch: this.StartSearchOnKeyPress, browserContext: this.props.browserContext, bViewingIncomingInvites: this.state.bViewingIncomingInvites, bHideGroupChats: !0, onClose: this.ToggleViewingIncomingInvites }) }, { eTab: Re.ou.GroupChats, strTabContentTitle: (0, A.Xx)("#Label_Groups"), tabElement: I.createElement(X.ZAu, null), tabContentElement: I.createElement(at, { friends: this.props.friends, chats: this.props.chats }) }, { eTab: Re.ou.RecentMessages, strTabContentTitle: (0, A.Xx)("#FriendGroup_Recent"), tabElement: I.createElement(Ze, null), tabContentElement: I.createElement(ke, null) }, ]; return I.createElement( E.s, { className: l, "flow-children": "column", onButtonDown: (e) => { const t = e.detail.button; t == Ee.eV.BUMPER_LEFT ? (d.Ul.UIStore.SelectFriendsListSteamDeckSiblingTab(-1), e.stopPropagation()) : t == Ee.eV.BUMPER_RIGHT && (d.Ul.UIStore.SelectFriendsListSteamDeckSiblingTab(1), e.stopPropagation()); }, navRef: this.m_navRef, }, I.createElement("div", { className: (0, Ce.Z)("friendListHeaderContainer", "titleBarContainer", (0, Oe.Uy)() && "OSX") }, I.createElement("div", { className: "disconnectBlocker" })), I.createElement(Xe, { friends: this.props.friends, rgTabs: c, fnOnToggleViewingIncomingInvites: this.ToggleViewingIncomingInvites }), ); } }; (0, i.gn)([M.ak], Qe.prototype, "OnMessage", null), (0, i.gn)([M.ak], Qe.prototype, "OnSearchSelection", null), (0, i.gn)([M.ak], Qe.prototype, "StartSearchOnKeyPress", null), (0, i.gn)([M.ak], Qe.prototype, "SetInviteListVisibility", null), (0, i.gn)([M.ak], Qe.prototype, "ToggleViewingIncomingInvites", null), (Qe = (0, i.gn)([S.Pi], Qe)); class $e extends I.Component { constructor(e) { super(e), (this.m_friendsListRef = null), (this.m_friendsListRef = I.createRef()); } render() { let e = d.Ul.UIStore.GetDefaultTabSetForContext(this.props.browserContext); return I.createElement( E.s, { className: "FriendsListAndChatsSteamDeck", "flow-children": "row", onButtonDown: (e) => { const t = e.detail.button; t == Ee.eV.BUMPER_LEFT ? (d.Ul.UIStore.SelectFriendsListSteamDeckSiblingTab(-1), e.stopPropagation()) : t == Ee.eV.BUMPER_RIGHT && (d.Ul.UIStore.SelectFriendsListSteamDeckSiblingTab(1), e.stopPropagation()); }, }, I.createElement(Qe, { ref: this.m_friendsListRef, bQuickAccess: !1, friends: this.props.friends, chats: this.props.chats, browserContext: this.props.browserContext, collapsed: !1 }), I.createElement(E.s, { className: "SteamDeckChats" }, I.createElement(N.CT, { tabs: e, ResponsiveWindowState: null })), d.Ul.CMInterface.BDisconnected() && I.createElement("div", { className: "FriendsDataOutofDate" }, I.createElement("div", null, I.createElement(j.$jN, null), (0, A.Xx)("#Friends_Reconnecting_Msg"))), ); } } let Ye = class extends We { constructor(e) { super(e), (this.state = { searchString: "", bFriendTabSearch: !1, bViewingIncomingInvites: !1, tabLabelWidth: 0 }), (this.m_tabLabelWidth = -1); } OnSearchInputRef(e) { this.m_refSearchInput = e; } StartSearchOnKeyPress(e) { let t = this.state.bFriendTabSearch; this.setState({ bFriendTabSearch: !0 }), t && this.m_refSearchInput && this.m_refSearchInput.focus(); } OnSearchInput(e) { e.currentTarget.value != this.state.searchString && this.setState({ searchString: e.currentTarget.value }); } OnSearchSubmit(e) { e.preventDefault(); let t = this.GetNormalizedSearchString(); if (t && t.length) { let n = this.props.friends.FriendGroupStore.all_friends.GetMembersMatchingSearch(t); n.length && n[0].OpenChatDialog((0, m.Um)(this, e)); } this.setState({ searchString: "" }); } OnSearchSelection() { this.setState({ searchString: "" }); } OnSearchKeyDown(e) { 27 == e.keyCode && (this.setState({ searchString: "" }), e.preventDefault(), e.currentTarget.blur(), this.setState({ bFriendTabSearch: !1 }), this.CollapseTabLabel()); } OnClearSearch() { this.setState({ searchString: "" }), this.OnTabSearchClick(); } OnSettingsClick(e) { d.Ul.IsDesktopUIActive() ? SteamClient.URL.ExecuteSteamURL("steam://open/settings/friends") : (0, Z.L)((0, m.Um)(this, e), e.currentTarget.ownerDocument.defaultView); } ToggleCollapseExpand(e) { d.Ul.UIStore.SetFriendsListCollapsed((0, m.Um)(this, e), !this.props.collapsed); } OnDoFriendsListUpdate(e) { let t = e.currentTarget.ownerDocument.defaultView, n = m.g_FriendsUIDesktopApp.GetSecondsOutOfDate(), i = (0, A.yW)(n, !0); (0, u.p3)(t, (0, A.Xx)("#Friends_ConfirmUpdate_Title"), (0, A.Xx)("#Friends_ConfirmUpdate_Body", i), (0, A.Xx)("#Friends_ConfirmUpdate_Ok")) .then(() => { m.g_FriendsUIDesktopApp.PerformFriendsUIUpdate(); }) .catch(() => {}); } BindTabLabel(e) { (this.m_elTabLabel = e), this.UpdateWindowIcon(); } UpdateWindowIcon() { if (this.m_elTabLabel && void 0 !== this.m_elTabLabel.ownerDocument.defaultView.SteamClient) { let e = !1; this.props.chats.VoiceChat.IsAnyVoiceActive() && (e = !0); let t = this.props.chats.FriendChatStore.GetFriendsWithUnreadMessages(this.props.browserContext).length > 0; try { this.m_elTabLabel && null != this.m_elTabLabel.ownerDocument.defaultView.SteamClient.Window.SetWindowIcon && (e ? this.m_elTabLabel.ownerDocument.defaultView.SteamClient.Window.SetWindowIcon("voice") : t ? this.m_elTabLabel.ownerDocument.defaultView.SteamClient.Window.SetWindowIcon("messages") : this.m_elTabLabel.ownerDocument.defaultView.SteamClient.Window.SetWindowIcon("steam")); } catch (e) {} } } CollapseTabLabel() { if ((this.m_animationTabLabelCollapse && this.m_animationTabLabelCollapse.Cancel(), this.state.bFriendTabSearch)) { let e = 1, t = this.m_tabLabelWidth; this.setState({ tabLabelWidth: e }, () => { (this.m_animationTabLabelCollapse = new z.P(this, { tabLabelWidth: t }, { msDuration: 300, timing: "sine" })), this.m_animationTabLabelCollapse.Start(); }); } else { let e = this.m_tabLabelWidth, t = 1; this.setState({ tabLabelWidth: e }, () => { (this.m_animationTabLabelCollapse = new z.P(this, { tabLabelWidth: t }, { msDuration: 300, timing: "sine" })), this.m_animationTabLabelCollapse.Start(); }); } } OnTabSearchClick() { this.m_tabLabelWidth < 0 && (this.m_tabLabelWidth = this.m_elTabLabel.clientWidth), this.setState({ bFriendTabSearch: !this.state.bFriendTabSearch }), this.CollapseTabLabel(); } ToggleViewingIncomingInvites() { this.setState({ bViewingIncomingInvites: !this.state.bViewingIncomingInvites }, () => { this.state.bViewingIncomingInvites && (d.Ul.FriendStore.FriendGroupStore.EnsureMutualFriendsForIncomingInvites(), d.Ul.FriendStore.ClanStore.EnsureInitialStateForClanInvites()); }); } SignIn() { window.parent.postMessage({ message: "SignInRequest", state: void 0 }, "https://steamloopback.host"); } componentDidUpdate() { if (this.state.bViewingIncomingInvites) { let e = d.Ul.FriendStore.GetFriendInviteCount() > 0, t = d.Ul.FriendStore.GetClanInviteCount() > 0, n = d.Ul.FriendStore.GetOutgoingFriendRequestCount() > 0; e || t || n || this.setState({ bViewingIncomingInvites: !1 }); } } render() { let e = this.props.friends.self, t = this.GetNormalizedSearchString(), n = this.state.bFriendTabSearch, i = "friendTab socialListTab activeTab"; n && (i += " TabSearchActive"); let r = {}; this.state.tabLabelWidth > 0 && (r.width = this.state.tabLabelWidth + "px"); let a = !1; if (this.props.popup) { let e = (0, m.rb)(this.props.popup); a = !(0, d.ns)(e, d.D); } let s = !1, l = 0, c = !1, h = "friendListButton friendSettingsButton friendsListNeedsUpdate no-drag"; null != m.g_FriendsUIDesktopApp && ((s = m.g_FriendsUIDesktopApp.BNeedsUpdate()), (l = m.g_FriendsUIDesktopApp.GetSecondsOutOfDate()), l < 432e3 ? (s = !1) : l > 604800 && ((h += " friendsListVeryOutOfDate"), (c = !0))); let u = this.props.chats.GetActiveVoiceChat(), p = !1; (this.props.chats.VoiceChat.IsAnyVoiceActive() || u) && (p = !0), this.UpdateWindowIcon(); let _ = d.Ul.SettingsStore.FriendsSettings.bCompactFriendsList, g = this.props.collapsed, C = "friendlist", f = m.g_FriendsUIDesktopApp && m.g_FriendsUIDesktopApp.IsDesktopUIActive(); _ && (C += " compactView"), s && (C += " needsUpdate"), g && this.props.collapsible && (C += " collapsed"); const v = d.Ul.FriendStore.BIsOfflineMode(), S = a; return I.createElement( "div", { className: C }, I.createElement( "div", { className: (0, Ce.Z)("friendListHeaderContainer", "titleBarContainer", (0, Oe.Uy)() && "OSX") }, this.props.popup && o.De.IN_CLIENT && I.createElement(me.T, { hideMin: S, hideMax: S, popup: this.props.popup, className: "chatTitleBar" }), this.props.collapsible && I.createElement("div", { className: "friendListCollapse no-drag" }, I.createElement("div", { className: "friendListButton friendCollapseButton no-drag " + (g ? "Collapsed" : ""), onClick: this.ToggleCollapseExpand }, I.createElement(X.NP6, null))), I.createElement(ot, { popup: this.props.popup && this.props.popup, currentUser: e }), I.createElement("div", { className: "friendListButtons" }, s && I.createElement("div", { className: h, onClick: this.OnDoFriendsListUpdate, title: c ? (0, A.Xx)("#Tooltip_FriendsListUpdate_VeryOld") : (0, A.Xx)("#Tooltip_FriendsListUpdate") }, I.createElement(X.Lao, null)), !f && I.createElement("div", { className: "friendListButton friendSettingsButton no-drag", onClick: this.OnSettingsClick, title: (0, A.Xx)("#Tooltip_Settings") }, I.createElement(X.Zrf, null))), !v && I.createElement( I.Fragment, null, I.createElement(U.Z, null, p && I.createElement(V.Z, { key: "activeVoiceControls1", classNames: "activevoice-anim", timeout: 500 }, I.createElement(Ne, { chats: this.props.chats }))), I.createElement(it, { browserContext: this.props.browserContext }), I.createElement(G, { FavoritesStore: this.props.friends.FavoritesStore, bInOverlay: a }), I.createElement( "div", { className: "socialTabSearchContainer" }, I.createElement( "div", { className: "socialTabContainer" }, I.createElement( "div", { className: i }, I.createElement("div", { className: "tabLabel", style: r, ref: this.BindTabLabel, onClick: n ? void 0 : this.OnTabSearchClick }, (0, A.Xx)("#tab_friends")), I.createElement( "div", { className: "friendsTabButtonsContainer" }, I.createElement( "div", { className: "TabSearchButton", onClick: n ? null : this.OnTabSearchClick }, I.createElement(U.Z, { className: "tabSearchTransitionGroup" }, n && I.createElement(V.Z, { className: "tabSearchTransition", key: "tabSearch", classNames: "tab-search-anim", timeout: 500 }, I.createElement("div", { className: "socialSearchContainer" }, I.createElement("form", { className: "socialInputContainer" + (n ? " SearchActive" : ""), name: "friendSearchForm", onSubmit: this.OnSearchSubmit }, I.createElement("div", { className: "inputContainer no-drag" }, I.createElement("input", { id: "friendSearchInputID", className: "friendSearchInput", autoFocus: !0, type: "text", name: "friendSearch", placeholder: (0, A.Xx)("#SearchFriends"), value: this.state.searchString, onInput: this.OnSearchInput, onKeyDown: this.OnSearchKeyDown, autoComplete: "off", ref: this.OnSearchInputRef }), I.createElement("div", { className: "friendSearchClear", onClick: this.OnClearSearch }, I.createElement(X.pVO, null))))))), I.createElement("div", { className: "searchIconButton", onClick: this.OnTabSearchClick, title: (0, A.Xx)("#Tooltip_SearchFriends") }, I.createElement(X.YtI, null)), ), I.createElement(Je, { fnToggleViewingIncomingInvites: this.ToggleViewingIncomingInvites, bViewingIncomingInvites: this.state.bViewingIncomingInvites }), I.createElement(P.ns, { href: o.De.COMMUNITY_BASE_URL + "friends/add" }, I.createElement("div", { className: "friendListButton addFriendButton no-drag", title: (0, A.Xx)("#Tooltip_AddFriend") }, I.createElement(X.yBp, null))), ), ), ), ), ), I.createElement("div", { className: "disconnectBlocker" }), ), v ? I.createElement("div", { className: ve.OfflineContainer }, I.createElement("div", { className: ve.OfflineMessage }, I.createElement("div", { className: ve.summaryText }, (0, A.Xx)("#FriendsList_SignedOut")), I.createElement("div", { className: ve.detailText }, (0, A.Xx)("#FriendsList_SignedOut_Detail")), I.createElement("div", null, I.createElement("button", { className: ve.retryButton, onClick: this.SignIn }, (0, A.Xx)("#Friends_SignIn"))))) : I.createElement(rt, { friends: this.props.friends, chats: this.props.chats, searchString: t, fnOnSearchSelection: this.OnSearchSelection, onStartSearch: this.StartSearchOnKeyPress, browserContext: this.props.browserContext, bViewingIncomingInvites: this.state.bViewingIncomingInvites, onClose: this.ToggleViewingIncomingInvites }), I.createElement("div", { className: "friendListFooter" }, I.createElement(nt, null)), ); } }; (0, i.gn)([M.ak], Ye.prototype, "OnSearchInputRef", null), (0, i.gn)([M.ak], Ye.prototype, "StartSearchOnKeyPress", null), (0, i.gn)([M.ak], Ye.prototype, "OnSearchInput", null), (0, i.gn)([M.ak], Ye.prototype, "OnSearchSubmit", null), (0, i.gn)([M.ak], Ye.prototype, "OnSearchSelection", null), (0, i.gn)([M.ak], Ye.prototype, "OnSearchKeyDown", null), (0, i.gn)([M.ak], Ye.prototype, "OnClearSearch", null), (0, i.gn)([M.ak], Ye.prototype, "OnSettingsClick", null), (0, i.gn)([M.ak], Ye.prototype, "ToggleCollapseExpand", null), (0, i.gn)([M.ak], Ye.prototype, "OnDoFriendsListUpdate", null), (0, i.gn)([M.ak], Ye.prototype, "BindTabLabel", null), (0, i.gn)([M.ak], Ye.prototype, "CollapseTabLabel", null), (0, i.gn)([M.ak], Ye.prototype, "OnTabSearchClick", null), (0, i.gn)([M.ak], Ye.prototype, "ToggleViewingIncomingInvites", null), (0, i.gn)([M.ak], Ye.prototype, "SignIn", null), (Ye = (0, i.gn)([S.Pi], Ye)); const Je = (0, S.Pi)(function (e) { const { fnToggleViewingIncomingInvites: t, bViewingIncomingInvites: n } = e, [i, o] = (0, I.useState)(!1); (i || n) && (d.Ul.FriendStore.FriendGroupStore.incoming_invites_group.member_list, d.Ul.FriendStore.ClanStore.clan_invites); const r = d.Ul.FriendStore.GetClanInviteCount(), a = d.Ul.FriendStore.GetFriendInviteCount(); let s = d.Ul.FriendStore.GetOutgoingFriendRequestCount() > 0, l = a + r, c = "friendRequestButton"; return n && (c += " friendRequestViewActive"), s && 0 == l && (c += " friendRequestOutgoingOnly"), a > 0 || r > 0 || s ? I.createElement("div", { className: c, onClick: t, title: (0, A.kb)("#Tooltip_FriendRequest", l), onMouseEnter: () => o(!0), onMouseLeave: () => o(!1) }, I.createElement(X.pUF, null), l > 0 && I.createElement("div", { className: "requestsNumber" }, l)) : null; }); class et extends I.Component { render() { let e = o.De.COMMUNITY_BASE_URL + "groups/SteamClientBeta/discussions/3/"; return d.Ul.IsInBeta() ? I.createElement("div", { className: "betaFeedbackLabel" }, (0, A.kQ)("#GiveFeedbackToSteam_Desc", I.createElement(P.ns, { href: e, className: "betaFeedbackAnchor" }, " ", (0, A.Xx)("#GiveFeedbackToSteam_URL"), " "))) : null; } } class tt extends I.Component { constructor(e) { super(e), (this.state = { bShowChangeLogViolator: m.g_FriendsUIDesktopApp.UIDisplayPrefs.nChangeLogDismissed < ue.Posts().length }); } OpenChangeLog(e) { var t; m.g_FriendsUIDesktopApp.SetUIDisplayPref("nChangeLogDismissed", ue.Posts().length), this.setState({ bShowChangeLogViolator: !1 }), (t = e.currentTarget.ownerDocument.defaultView), (0, Q.BR)(I.createElement(pe, null), t, "ChangeLog", { strTitle: (0, A.Xx)("#changeLog_Title"), popupWidth: 640, popupHeight: 680 }, (0, m.Og)(t)); } render() { let e = this.state.bShowChangeLogViolator, t = 0; return e && (t = ue.Posts().length - (m.g_FriendsUIDesktopApp.UIDisplayPrefs.nChangeLogDismissed || 7)), ue.Posts().length && Date.now() - Number(new Date(ue.Posts()[0].date)) > 36288e5 ? null : I.createElement("div", { className: "changeLog" + (e ? " showViolator" : ""), onClick: this.OpenChangeLog, title: e ? (0, A.Xx)("#changeLog_Value_Button", t) : (0, A.Xx)("#changeLog_Button") }, I.createElement(X.Xsu, null), e && I.createElement("div", { className: "changeLogViolator" }, t)); } } (0, i.gn)([M.ak], tt.prototype, "OpenChangeLog", null); let nt = class extends I.Component { constructor(e) { super(e); } OnSettingsZooClick(e) { 0; } render() { return I.createElement(I.Fragment, null, I.createElement("div", { className: "flexRowCentered" }, !1, I.createElement(et, null), I.createElement(tt, null))); } }; (0, i.gn)([M.ak], nt.prototype, "OnSettingsZooClick", null), (nt = (0, i.gn)([S.Pi], nt)); const it = (0, S.Pi)((e) => { const { browserContext: t } = e, n = (function () { const [e, t] = (0, I.useState)(!1), n = (0, b.SZ)(() => d.Ul.FriendStore.self.persona.m_gameid); return ( (0, I.useEffect)(() => { if (!d.Ul.RemotePlayStore.BEnabled() || !d.Ul.RemotePlayStore.BRemotePlayTogetherEnabled()) return; let e = !0; return ( d.Ul.RemotePlayStore.BCanCreateInviteForGame(n).then((n) => { e && t(n); }), () => { e = !1; } ); }, [n]), e ); })(), [i, o] = (0, m.pF)("bRemotePlayLinkHintDismissed"), [r, a] = (0, Fe.y)(); if (!n) return null; const s = (0, A.Xx)("#RemotePlay_LinkCopyTitle"); return I.createElement( "div", { className: ve.RemotePlayInviteLinkSection }, I.createElement( "div", { className: ve.LinkRow, onClick: () => { d.Ul.RemotePlayStore.CreateGroup(d.Ul.FriendStore.self.persona.m_gameid, t).catch((e) => console.log(`RemotePlayStore.CreateGroup caught: ${e}`)); }, }, I.createElement("div", { className: ve.LinkRowText }, s), I.createElement("div", { title: (0, A.Xx)("#Tooltip_RemotePlay_CreateInvite"), className: ve.LinkRowIconContainer }, I.createElement(Se.aO, { className: ve.LinkRowIcon })), ), !i && I.createElement("div", { className: ve.LinkExplanation }, I.createElement("div", { className: ve.ExplanationText }, (0, A.kQ)("#RemotePlay_LinkCopyExplanation", I.createElement("span", { className: ve.Strong }, (0, A.Xx)("#RemotePlay_LinkCopyExplanation_Anyone")))), I.createElement("div", { className: ve.GotItButton, onClick: () => o(!0) }, (0, A.Xx)("#Generic_Got_It")), I.createElement("svg", { className: ve.AccentChevron, width: "30px", height: "15px", viewBox: "0 0 64 32" }, I.createElement("defs", null, I.createElement("linearGradient", { id: r, x1: "0%", y1: "0%", x2: "0%", y2: "100%" }, I.createElement("stop", { offset: "0%", style: { stopColor: "rgb(24, 92, 108)", stopOpacity: 1 } }), I.createElement("stop", { offset: "100%", style: { stopColor: "rgb(24, 92, 108)", stopOpacity: 1 } }))), I.createElement("path", { d: "M 0 0 L 64 0 L 32 32 z", stroke: "colourname", fill: a }))), ); }), ot = (0, S.Pi)(function (e) { const { currentUser: t, popup: n } = e, i = (0, Oe.id)(), o = (0, Be.CQ)(t.persona.m_unGamePlayedAppID); (0, I.useEffect)(() => { t.LoadEquippedProfileItems(); }); const r = I.useCallback((e) => (0, p.kR)((0, m.Um)(null, e), e), []), a = I.useCallback( (e) => { let n = t.GetCommunityProfileURL(); (0, P.b8)(e, n), e.stopPropagation(); }, [t], ); let s = "currentUserContainer " + (0, ce.sB)(t.persona); 2 == t.persona.m_ePersonaState && (s += " userDoNotDisturb"); let l = null; d.Ul.FriendStore.BIsInvisibleMode() && (l = () => (0, A.Xx)("#PersonaStateInvisible")); let c = null; t.persona.HasCurrentGameRichPresence() ? (c = () => t.persona.GetCurrentGameRichPresence()) : t.persona.m_broadcastAccountId && (c = () => t.GetBroadcastDescription()); let h = t.persona.is_ingame && (1 == d.Ul.UserStore.PrivacySettings.privacy_state_ownedgames || o), u = null, _ = null, g = !i && d.Ul.SettingsStore.FriendsSettings.bAnimatedAvatars; if (t.BLoadedEquippedItems()) { let e = t.GetEquippedProfileItems(); e && ((u = e.animated_avatar), (_ = e.avatar_frame)); } let C = !1; if (n) { let e = (0, m.rb)(n); C = !(0, d.ns)(e, d.D); } const f = C ? "Medium" : "Infinite"; let v = I.createElement("div", { className: "currentUserAvatar" }, I.createElement(w._1, { loopDuration: g ? f : "None", bLimitProfileFrameAnimationTime: !g || C, size: "Medium", persona: t.persona, animatedAvatar: u, avatarFrame: _, onClick: a })); return I.createElement( "div", { className: s }, I.createElement("svg", { className: "statusHeaderGlow", width: "100%", height: "132", xmlns: "http://www.w3.org/2000/svg" }, I.createElement("defs", null, I.createElement("radialGradient", { id: "exampleGradient", cx: "50%", cy: "50%", r: "50%", fx: "35%", fy: "30%" }, I.createElement("stop", { offset: "10%", stopColor: "gold" }), I.createElement("stop", { offset: "95%", stopColor: "green" }))), I.createElement("ellipse", { cx: "5%", cy: "28%", rx: "65%", ry: "60%", fill: "url(#exampleGradient)" })), I.createElement("div", { className: "AvatarAndUser", onContextMenu: r }, I.createElement(_t, { friend: t, context: { chatContext: "friendslist" }, onContextMenu: r }, v), I.createElement(ge.o, { className: "labelHolder", persona: t.persona, bIsSelf: !0, eFriendRelationship: t.efriendrelationship, strNickname: t.nickname, bParenthesizeNicknames: d.Ul.SettingsStore.CommunityPreferences.bParenthesizeNicknames, bCompactView: d.Ul.SettingsStore.FriendsSettings.bCompactFriendsList, bHideSnooze: !0, renderStatus: l, renderRichPresence: c, onContextMenu: r, bDNDSet: d.Ul.FriendStore.GetUserDoNotDisturb(), bHasGamePrivacy: h })), ); }); let rt = class extends I.Component { constructor(e) { super(e), (this.state = { bScrolledFromTop: !1 }); } get frame() { return this.m_elFriendsListContent; } OnContextMenu(e) { let t = this.props.searchString && this.props.searchString.length > 0; this.props.bViewingIncomingInvites || t || (0, p.WK)((0, m.Um)(this, e), null, e); } BindFriendsListContent(e) { this.m_elFriendsListContent = e; } OnFriendsListKeyDown(e) { e.ctrlKey || e.altKey || e.metaKey || e.key.length > 1 || (this.props.onStartSearch && this.props.onStartSearch(e)); } OnFriendsListScrollRef(e) { this.m_elFriendsListScroll = e; } ScrollToTop() { this.m_elFriendsListScroll && (this.m_elFriendsListScroll.scrollTop = 0); } OnScrollFriendsList(e) { let t = e.currentTarget.scrollTop > 10; t != this.state.bScrolledFromTop && this.setState({ bScrolledFromTop: t }); } OnAcceptClanInvite(e, t) { let n = e.currentTarget.ownerDocument.defaultView; d.Ul.FriendStore.ClanStore.RespondToClanInvite(t, !0).then((e) => { e || (0, u.zp)(n, (0, A.Xx)("#Friend_AcceptClanInvite"), (0, A.Xx)("#Friend_AcceptClanInvite_Error")); }); } OnDeclineClanInvite(e, t) { let n = e.currentTarget.ownerDocument.defaultView; d.Ul.FriendStore.ClanStore.RespondToClanInvite(t, !1).then((e) => { e || (0, u.zp)(n, (0, A.Xx)("#Friend_DeclineClanInvite"), (0, A.Xx)("#Friend_DeclineClanInvite_Error")); }); } render() { var e, t; let n, i = this.props.searchString && this.props.searchString.length > 0, { bViewingIncomingInvites: r, bHideGroupChats: a } = this.props; const s = this.props.browserContext.m_unAppID && 0 != this.props.browserContext.m_unAppID; let l = { searchString: this.props.searchString, fnOnSearchSelection: this.props.fnOnSearchSelection }; if (this.props.friends.self.is_ready) if (r) { let e = d.Ul.FriendStore.ClanStore.clan_invites.length, t = (de.K.InitFromAccountID(d.Ul.FriendStore.self.accountid), []); if (e) for (let e of d.Ul.FriendStore.ClanStore.clan_invites) { const n = e.steamid; let i; (i = e.BIsOGG() ? `${o.De.COMMUNITY_BASE_URL}app/${e.GetOGGAppID()}` : `${o.De.COMMUNITY_BASE_URL}gid/${n.ConvertTo64BitString()}`), t.push( I.createElement( "div", { className: "clanInviteContainer", key: "clan_invite_" + n.GetAccountID() }, I.createElement(P.ns, { href: i }, I.createElement("div", { className: "clanAvatar" }, I.createElement("img", { className: "clanAvatarIcon", src: e.avatar_url_medium })), I.createElement("div", { className: "clanName" }, e.name, I.createElement("div", { className: "clanDetails displayRow" }, I.createElement("div", { className: "displayRow statMembersTotal" }, I.createElement("div", { className: "statCircle" }), e.member_count, " Members"), e.users_online > 0 && I.createElement("div", { className: "displayRow statMembersOnline", title: (0, A.kb)("#Chat_Members_Online_Tooltip", e.users_online) }, I.createElement("div", { className: "statCircle" }), e.users_online), e.users_ingame > 0 && I.createElement("div", { className: "displayRow statMembersInGame", title: (0, A.kb)("#Chat_Members_InGame_Tooltip", e.users_ingame) }, I.createElement("div", { className: "statCircle" }), e.users_ingame)))), I.createElement( "div", { className: "clanActionButtons" }, I.createElement( "div", { className: "displayColumn", title: (0, A.Xx)("#FriendGroup_Tip_Accept_Invite") }, I.createElement( $.Av, { onClick: (e) => { this.OnAcceptClanInvite(e, n); }, }, (0, A.Xx)("#Button_Accept"), ), ), I.createElement( "div", { className: "displayColumn", title: (0, A.Xx)("#FriendGroup_Tip_Decline_Invite") }, I.createElement( $.Av, { onClick: (e) => { this.OnDeclineClanInvite(e, n); }, }, (0, A.Xx)("#Button_Decline"), ), ), ), ), ); } n = I.createElement(I.Fragment, null, e > 0 && !i && I.createElement(I.Fragment, null, I.createElement("div", { className: "clanInvitesGroupContainer" }, I.createElement("div", { className: "clanInviteTitle" }, (0, A.Xx)("#Friend_PendingClanInvites")), t)), I.createElement(mt, Object.assign({ group: this.props.friends.FriendGroupStore.incoming_invites_group, collapsed: !1 }, l, { onClose: this.props.onClose, bInOverlay: s })), I.createElement(mt, Object.assign({ group: this.props.friends.FriendGroupStore.outgoing_invites_group, collapsed: !1 }, l, { onClose: this.props.onClose, bInOverlay: s }))); } else if (i) n = I.createElement(mt, Object.assign({ group: this.props.friends.FriendGroupStore.all_friends, collapsed: !1, bInOverlay: s }, l)); else { let t = this.props.friends.FriendGroupStore.user_groups.map((e) => I.createElement(mt, Object.assign({ group: e, key: e.id, groupDisplayPrefs: this.props.friends.FriendGroupStore.groupDisplayPrefs, bInOverlay: s }, l))), i = this.props.friends.FriendGroupStore.default_groups.map((e) => I.createElement(mt, Object.assign({ group: e, key: e.id, groupDisplayPrefs: this.props.friends.FriendGroupStore.groupDisplayPrefs, bInOverlay: s }, l))), o = !1; this.props.chats.FriendChatStore.GetFriendsWithUnreadMessages(this.props.browserContext).length && (o = !0), (n = I.createElement(I.Fragment, null, o && !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && I.createElement("div", { className: "recentChatsGroup unreadChatsGroup" }, I.createElement(yt, { friendChatStore: this.props.chats.FriendChatStore, browserContext: this.props.browserContext })), I.createElement(ct, { bInOverlay: s }), t, i)); } else n = void 0; let c = d.Ul.SettingsStore.FriendsSettings.bCompactFriendsList; return I.createElement( E.s, { className: "FriendsListContent" + (c ? " CompactFriendsList" : ""), ref: this.BindFriendsListContent, retainFocus: !0, "flow-children": "column" }, I.createElement(fe.R, null), !(null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) && I.createElement(It, { browserContext: this.props.browserContext, bScrolledFromTop: this.state.bScrolledFromTop && !i, onClick: this.ScrollToTop }), I.createElement("div", { className: "friendlistListContainer", onContextMenu: this.OnContextMenu, tabIndex: 0, onKeyDown: this.OnFriendsListKeyDown, ref: this.OnFriendsListScrollRef, onScroll: this.OnScrollFriendsList }, I.createElement($.zx, { focusable: r, onClick: this.props.onClose, className: "BackToFriendsListButton" }, (0, A.Xx)("#FriendGroup_CloseGamepadUI")), I.createElement("div", { className: "listContentContainer" }, n, I.createElement("div", { className: "disconnectBlocker" }))), I.createElement(fe.Q, null), !a && I.createElement(st, { friends: this.props.friends, chats: this.props.chats, parent: this }), ); } }; (rt.contextType = o.E_), (0, i.gn)([M.ak], rt.prototype, "OnContextMenu", null), (0, i.gn)([M.ak], rt.prototype, "BindFriendsListContent", null), (0, i.gn)([M.ak], rt.prototype, "OnFriendsListKeyDown", null), (0, i.gn)([M.ak], rt.prototype, "OnFriendsListScrollRef", null), (0, i.gn)([M.ak], rt.prototype, "ScrollToTop", null), (0, i.gn)([M.ak], rt.prototype, "OnScrollFriendsList", null), (rt = (0, i.gn)([S.Pi], rt)); class at extends I.Component { constructor(e) { super(e); } render() { return I.createElement("div", { className: "GroupChats" }, I.createElement(C.FL, { friends: this.props.friends, chats: this.props.chats })); } } let st = (Ge = class extends I.Component { constructor(e) { super(e), (this.m_bMouseOver = !1), (this.state = { nChatRoomListContainerHeight: m.g_FriendsUIDesktopApp.UIDisplayPrefs.nChatRoomListHeightPx, nChatRoomListContainerMaxHeight: m.g_FriendsUIDesktopApp.UIDisplayPrefs.nChatRoomListHeightPx, bChatRoomListCollapsed: m.g_FriendsUIDesktopApp.UIDisplayPrefs.bChatRoomListCollapsed, nChatRoomListPreCollapseHeight: m.g_FriendsUIDesktopApp.UIDisplayPrefs.nChatRoomListHeightPx, bChatRoomListResizing: !1 }); } UpdateChatSectionSize() { if (((0, _e.X)(this.m_elChatSection, "m_elChatRoomListContainer not set"), this.m_bMouseOver)) return ( this.m_iTimeoutUpdateChatSectionSize && this.m_window.clearTimeout(this.m_iTimeoutUpdateChatSectionSize), void (this.m_iTimeoutUpdateChatSectionSize = this.m_window.setTimeout(() => { (this.m_iTimeoutUpdateChatSectionSize = void 0), this.UpdateChatSectionSize(); }, 500)) ); let e = this.m_elChatSection.maximumHeight, t = this.m_elChatSection.minimumHeight; if (((this.m_elChatRoomListContainer.style.minHeight = t + "px"), this.state.nChatRoomListContainerMaxHeight > e)) { this.m_animationChatSectionShrink && this.m_animationChatSectionShrink.Cancel(); let n = this.state.nChatRoomListContainerMaxHeight, i = e; this.setState({ nChatRoomListContainerMaxHeight: n }, () => { (this.m_animationChatSectionShrink = new z.P(this, { nChatRoomListContainerHeight: (0, K.Lh)(this.state.nChatRoomListContainerHeight, t, e), nChatRoomListContainerMaxHeight: i }, { msDuration: 300, timing: "sine" })), this.m_animationChatSectionShrink.Start(); }); } else this.setState({ nChatRoomListContainerMaxHeight: e }); } OnChatSectionMutation(e, t) { this.m_iTimeoutUpdateChatSectionSize && this.m_window.clearTimeout(this.m_iTimeoutUpdateChatSectionSize), (this.m_iTimeoutUpdateChatSectionSize = this.m_window.setTimeout(() => { (this.m_iTimeoutUpdateChatSectionSize = void 0), this.UpdateChatSectionSize(); }, 1e3)); } BindChatRoomTitleContainer(e) { this.m_elChatRoomTitleContainer = e; } BindChatRoomListContainer(e) { e && ((this.m_elChatRoomListContainer = e), this.UpdateChatSectionSize()); } BindChatSection(e) { this.m_observerChatSection && (this.m_observerChatSection.disconnect(), (this.m_observerChatSection = null)), e && ((this.m_elChatSection = e), (this.m_window = e.div.ownerDocument.defaultView), (this.m_observerChatSection = new MutationObserver(this.OnChatSectionMutation)), this.m_observerChatSection.observe(e.div, { childList: !0, subtree: !0 })); } OnGrabberMouseDown(e) { let t = e.currentTarget.ownerDocument.defaultView; (this.m_iGrabberBarInitialGrabOffset = e.clientY - this.m_elChatRoomTitleContainer.getBoundingClientRect().top), this.setState({ nChatRoomListPreCollapseHeight: m.g_FriendsUIDesktopApp.UIDisplayPrefs.nChatRoomListHeightPx }), t.addEventListener("mousemove", this.HandleMouseMove), t.addEventListener("mouseup", this.UnregisterChatRoomListDragEvents); } OnGrabberTouchStart(e) { let t = e.currentTarget.ownerDocument.defaultView; (this.m_iGrabberBarInitialGrabOffset = e.touches[0].clientY - this.m_elChatRoomTitleContainer.getBoundingClientRect().top), t.addEventListener("touchmove", this.HandleTouchMove), t.addEventListener("touchend", this.UnregisterChatRoomListDragEvents); } HandleTouchMove(e) { e.touches.length >= 1 && this.InternalAdjustChatRoomListContainerOnDrag(e.touches[0].clientY); } HandleMouseMove(e) { this.InternalAdjustChatRoomListContainerOnDrag(e.clientY); } OnMouseEnter(e) { this.m_bMouseOver = !0; } OnMouseLeave(e) { this.m_bMouseOver = !1; } InternalAdjustChatRoomListContainerOnDrag(e) { if (!this.props.parent || !this.props.parent.frame) return; let t = this.props.parent.frame.getBoundingClientRect(), n = t.top, i = this.m_iGrabberBarInitialGrabOffset, o = t.height - (this.m_elChatRoomTitleContainer.getBoundingClientRect().height - i), r = e - n; r < 0 ? (r = 0) : r > o && (r = o); let a = o - r; (a = (0, K.Lh)(a, this.m_elChatSection.minimumHeight, this.m_elChatSection.maximumHeight)), this.setState({ nChatRoomListContainerHeight: a }), this.setState({ bChatRoomListCollapsed: !(this.state.nChatRoomListContainerHeight > 0) }), m.g_FriendsUIDesktopApp.SetUIDisplayPref("bChatRoomListCollapsed", !(this.state.nChatRoomListContainerHeight > 0)), this.setState({ bChatRoomListResizing: !0 }); } ToggleChatsList() { this.state.bChatRoomListCollapsed && this.setState({ nChatRoomListContainerHeight: this.state.nChatRoomListPreCollapseHeight }), this.setState({ bChatRoomListCollapsed: !this.state.bChatRoomListCollapsed }), m.g_FriendsUIDesktopApp.SetUIDisplayPref("bChatRoomListCollapsed", !this.state.bChatRoomListCollapsed); } UnregisterChatRoomListDragEvents(e) { e.view.removeEventListener("mousemove", this.HandleMouseMove), e.view.removeEventListener("touchmove", this.HandleTouchMove), e.view.removeEventListener("mouseup", this.UnregisterChatRoomListDragEvents), e.view.removeEventListener("touchend", this.UnregisterChatRoomListDragEvents), this.state.nChatRoomListContainerHeight < Ge.s_pxGroupChatsAutoCollapseThreshold ? (m.g_FriendsUIDesktopApp.SetUIDisplayPref("nChatRoomListHeightPx", this.state.nChatRoomListPreCollapseHeight), this.setState({ bChatRoomListCollapsed: !0 })) : (this.setState({ nChatRoomListPreCollapseHeight: this.state.nChatRoomListContainerHeight }), m.g_FriendsUIDesktopApp.SetUIDisplayPref("nChatRoomListHeightPx", this.state.nChatRoomListContainerHeight)), (this.m_iGrabberBarInitialGrabOffset = null), this.setState({ bChatRoomListResizing: !1 }); } OnCreateChatRoom(e) { (0, q.bI)((0, m.Um)(this, e), e.currentTarget.ownerDocument.defaultView); } render() { let e = { height: this.state.bChatRoomListCollapsed ? 0 : this.state.nChatRoomListContainerHeight + "px", maxHeight: this.state.bChatRoomListCollapsed ? 0 : this.state.nChatRoomListContainerMaxHeight + "px" }, t = this.props.chats.currentChatRoomGroups, n = !1, i = "FriendsListChatSection ChatRoomListContainerParent"; if (this.props.chats.chat_group_list_ready) for (let e of t) e.hasUnreadChatMessage && (n = !0); return ( this.state.bChatRoomListCollapsed && (i += " Collapsed"), this.state.bChatRoomListResizing && (i += " ChatListResizing"), n && (i += " HasUnreadChats"), I.createElement( "div", { className: i, onMouseEnter: this.OnMouseEnter, onMouseLeave: this.OnMouseLeave }, I.createElement("div", { className: "friendsListSectionTitle chatSectionTitle", ref: this.BindChatRoomTitleContainer }, this.state.bChatRoomListCollapsed && n && I.createElement(C.TJ, null), I.createElement("div", { className: "ToggleGroupChatList", onClick: this.ToggleChatsList, title: this.state.bChatRoomListCollapsed ? (0, A.Xx)("#Tooltip_ChatsExpand") : (0, A.Xx)("#Tooltip_ChatsCollapse") }, I.createElement(X.NP6, { angle: -90 })), I.createElement("div", { className: "voiceRoomDragBar", onMouseDown: this.OnGrabberMouseDown, onTouchStart: this.OnGrabberTouchStart }, I.createElement("div", { className: "groupChatSectionTitle" }, (0, A.Xx)("#tab_chats"))), I.createElement("button", { className: "createChatRoomButton", onClick: this.OnCreateChatRoom, title: (0, A.Xx)("#Tooltip_CreateGroupChat") }, I.createElement(X.k4w, null)), I.createElement("div", { className: "disconnectBlocker" })), I.createElement(fe.R, null), I.createElement("div", { className: "chatRoomListContainer", style: e, ref: this.BindChatRoomListContainer }, I.createElement(C.FL, { friends: this.props.friends, chats: this.props.chats, ref: this.BindChatSection })), I.createElement(fe.Q, null), ) ); } }); (st.s_pxGroupChatsAutoCollapseThreshold = 45), (0, i.gn)([M.ak], st.prototype, "UpdateChatSectionSize", null), (0, i.gn)([M.ak], st.prototype, "OnChatSectionMutation", null), (0, i.gn)([M.ak], st.prototype, "BindChatRoomTitleContainer", null), (0, i.gn)([M.ak], st.prototype, "BindChatRoomListContainer", null), (0, i.gn)([M.ak], st.prototype, "BindChatSection", null), (0, i.gn)([M.ak], st.prototype, "OnGrabberMouseDown", null), (0, i.gn)([M.ak], st.prototype, "OnGrabberTouchStart", null), (0, i.gn)([M.ak], st.prototype, "HandleTouchMove", null), (0, i.gn)([M.ak], st.prototype, "HandleMouseMove", null), (0, i.gn)([M.ak], st.prototype, "OnMouseEnter", null), (0, i.gn)([M.ak], st.prototype, "OnMouseLeave", null), (0, i.gn)([M.ak], st.prototype, "ToggleChatsList", null), (0, i.gn)([M.ak], st.prototype, "UnregisterChatRoomListDragEvents", null), (0, i.gn)([M.ak], st.prototype, "OnCreateChatRoom", null), (st = Ge = (0, i.gn)([S.Pi], st)); class lt extends I.Component { GetDragDropProps(e = !0) { let t = { rgAcceptedTypes: [] }; return e && ((t.fnDragEnter = this.OnDragEnter), (t.fnDragLeave = this.OnDragLeave), (t.fnDrop = this.OnDrop), (t.rgAcceptedTypes = ["friend"])), (t.onDragStart = this.OnDragStart), (t.onDragEnd = this.OnDragEnd), t; } OnDragStart(e) { let t = m.g_FriendsUIDesktopApp.DragDropManager.GetDragData(); if (t && "friend" == t.type) { let e = t; (e.group = this.GetGroup()), this.setState({ friendDraggedOut: e.friend }); } } OnDragEnd(e) { this.state.friendDraggedOut && this.setState({ friendDraggedOut: null }); } OnDragEnter(e, t) { (0, _e.X)(e && "friend" == e.type, "Invalid data type passed to FriendGroupDragDrop.OnDragEnter"); let n = e, i = n.friend, o = n.group, r = this.GetGroup(); return (!r || o == r || !this.GetGroup().HasMember(i.accountid) || n.is_favorite || (this.GetGroup().accepts_group_removals && o.modifiable)) && i.is_friend && this.state.friendDrag != i && this.setState({ friendDrag: i }), !0; } ResetDragState() { this.setState({ friendDrag: null }); } OnDragLeave() { this.state.friendDrag && this.ResetDragState(); } OnDrop(e, t) { (0, _e.X)(e && "friend" == e.type, "Invalid data type passed to FriendGroupDragDrop.OnDrop"); let n = e; if (n.group == this.GetGroup()) this.setState({ friendDraggedOut: null }); else { let e = this.state.friendDrag, t = () => { this.state.friendDrag && this.state.friendDrag == e && this.ResetDragState(); }; this.PerformDropAction(n).then(t).catch(t); } } } (0, i.gn)([M.ak], lt.prototype, "OnDragStart", null), (0, i.gn)([M.ak], lt.prototype, "OnDragEnd", null), (0, i.gn)([M.ak], lt.prototype, "OnDragEnter", null), (0, i.gn)([M.ak], lt.prototype, "OnDragLeave", null), (0, i.gn)([M.ak], lt.prototype, "OnDrop", null); const ct = (0, S.Pi)((e) => { if (!d.Ul.SettingsStore.FriendsSettings.bCategorizeInGameFriendsByGame) return null; let t = d.Ul.FriendStore.FriendGroupStore.game_groups, n = t.map((t) => I.createElement(ut, { key: t.id, group: t, bSingletonGroup: !1, bOtherGroups: !0, groupDisplayPrefs: d.Ul.FriendStore.FriendGroupStore.groupDisplayPrefs, bInOverlay: e.bInOverlay })), i = d.Ul.FriendStore.FriendGroupStore.singleton_game_group; return i && n.push(I.createElement(ut, { key: "singleton", group: i, bSingletonGroup: !0, bOtherGroups: t.length > 0, groupDisplayPrefs: d.Ul.FriendStore.FriendGroupStore.groupDisplayPrefs, bInOverlay: e.bInOverlay })), I.createElement(I.Fragment, null, n); }); let mt = class extends lt { constructor(e) { super(e), (this.m_actions = v.LO.map()), (this.state = { bLocalCollapsed: this.props.collapsed, bSortOfflineByRecent: !1 }); } GetGroup() { return this.props.group; } PerformDropAction(e) { let t = e.friend, n = e.group, i = this.props.group; return e.is_favorite || m.g_FriendsUIDesktopApp.DragDropManager.SetDropConsumed(), d.Ul.FriendStore.FriendGroupStore.TransferFriendFromToGroup(t, n, i); } ToggleCollapsed() { this.props.groupDisplayPrefs ? this.props.groupDisplayPrefs.ToggleUserGroupCollapsed(this.props.group.unique_id) : this.setState({ bLocalCollapsed: !this.state.bLocalCollapsed }); } IsCollapsed() { return this.props.groupDisplayPrefs ? this.props.groupDisplayPrefs.GetUserGroupCollapsed(this.props.group.unique_id) : this.state.bLocalCollapsed; } IsInviteGroup() { return this.props.group.m_eDisplayType == c.h1.eIncomingInvites; } IsOutGoingInviteGroup() { return this.props.group.m_eDisplayType == c.h1.eOutgoingInvites; } OnContextMenu(e) { (this.props.group.modifiable || this.props.group.accepts_group_removals) && (0, p.WK)((0, m.Um)(this, e), this.props.group, e); } OnFriendSelected(e) { this.props.friendSelectAction ? this.props.friendSelectAction(e) : (e.OpenChatDialog((0, m.Um)(this)), this.props.fnOnSearchSelection && this.props.fnOnSearchSelection()); } OnAcceptInvite(e) { (0, _e.X)(this.IsInviteGroup(), "accept invite on non-invite group"); let t = this.m_actions.get(e.accountid); t && "accept" == t.action ? this.m_actions.delete(e.accountid) : this.m_actions.set(e.accountid, { friend: e, action: "accept" }); } OnDeclineInvite(e) { (0, _e.X)(this.IsInviteGroup(), "decline invite on non-invite group"); let t = this.m_actions.get(e.accountid); !t || ("decline" != t.action && "block" != t.action) ? this.m_actions.set(e.accountid, { friend: e, action: "decline" }) : this.m_actions.delete(e.accountid); } OnBlockInvite(e, t) { (0, _e.X)(this.IsInviteGroup(), "block invite on non-invite group"), e ? this.m_actions.set(t.accountid, { friend: t, action: "block" }) : this.m_actions.set(t.accountid, { friend: t, action: "decline" }); } AcceptInvite(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let { eResult: n, eFriendRelationship: i } = yield d.Ul.FriendStore.SendFriendInvite(t); 3 != i && (0, p.u8)(e, n, i, t.display_name); }); } DeclineInvite(e, t) { d.Ul.FriendStore.RemoveFriend(t).then((n) => { 1 != n && (0, u.zp)(e, (0, A.Xx)("#Friend_Menu_IgnoreIncomingInvite"), (0, A.Xx)("#Friend_IgnoreIncomingInvite_Error", t.display_name)); }); } BlockInvite(e, t) { d.Ul.FriendStore.BlockPlayer(t).then((n) => { 5 != n && (0, u.zp)(e, (0, A.Xx)("#Friend_Menu_BlockIncomingInvite"), (0, A.Xx)("#Friend_BlockIncomingInvite_Error", t.display_name)); }); } OnConfirmChanges(e) { (0, _e.X)(this.IsInviteGroup(), "confirm changes on non-invite group"); let t = e.currentTarget.ownerDocument.defaultView; this.m_actions.forEach((e) => { "accept" == e.action ? this.AcceptInvite(t, e.friend) : "decline" == e.action ? this.DeclineInvite(t, e.friend) : "block" == e.action ? this.BlockInvite(t, e.friend) : console.log(`unknown action ${e.action}`); }); } OnIgnoreAllInvites(e) { (0, _e.X)(this.IsInviteGroup(), "ignore all invites on non-invite group"); let t = e.currentTarget.ownerDocument.defaultView; (0, u.p3)(t, (0, A.Xx)("#FriendGroup_ConfirmAllIgnore_Title"), (0, A.Xx)("#FriendGroup_ConfirmAllIgnore_Body"), (0, A.Xx)("#FriendGroup_ConfirmAllIgnore_OK")) .then(() => { let e = this.props.group.member_list; for (let n of e) this.DeclineInvite(t, n); }) .catch(() => {}); } OnCloseInvites() { (0, _e.X)(this.IsInviteGroup(), "close invites on non-invite group"), this.props.onClose(); } ToggleOfflineSortMethod() { this.setState({ bSortOfflineByRecent: !this.state.bSortOfflineByRecent }); } GetFriendRenderContext() { return (this.m_FriendRenderContext && this.m_FriendRenderContext.friendGroup == this.props.group) || (this.m_FriendRenderContext = { friendGroup: this.props.group, chatContext: "friendslist" }), this.m_FriendRenderContext; } render() { var e, t, n, i, r, a, l; let m = this.props.searchString && this.props.searchString.length > 0, u = m, p = this.IsCollapsed() && !m && !this.state.friendDrag, _ = [], g = this.IsInviteGroup(), C = this.props.group.m_eDisplayType == c.h1.eOfflineOnly, f = !1; if (!p) { let o, l = !1; if (((o = this.props.searchString && this.props.searchString.length ? this.props.group.GetMembersMatchingSearch(this.props.searchString) : this.props.group.member_list), this.state.friendDrag && (this.props.group.HasMember(this.state.friendDrag.accountid) ? (l = !0) : (o = o.concat(this.state.friendDrag).sort(s.Xp.DefaultFriendSortComparator))), C && this.state.bSortOfflineByRecent && ((o = this.props.group.member_list_unsorted.slice().sort(s.Xp.FriendSortByLastSeenComparator)), (f = !0)), g)) { let e = d.Ul.FriendStore.FriendGroupStore.incoming_invites_group; o = o.slice().sort((t, n) => { let i = e.map_steamid_to_mutual_friends.get(t.steamid64), o = e.map_steamid_to_mutual_friends.get(n.steamid64), r = (i ? i.size : 0) - (o ? o.size : 0); return r > 0 || (0 == r && t.accountid > n.accountid) ? -1 : 1; }); } let c = null; !m && this.props.group.should_filter_categorized_friends && (c = d.Ul.FriendStore.FriendGroupStore.categorized_friend_set); for (let s of o) { if (this.props.setExcludedFriends && this.props.setExcludedFriends.has(s.accountid)) continue; if (c && c.has(s.accountid)) continue; let o, m, d, h = 4 == s.efriendrelationship, u = this.state.friendDrag != s || l ? "" : "dropGhost"; this.state.friendDraggedOut == s && this.state.friendDrag != s && (u += " dragOriginGhost"); let p = null !== (e = this.props.gamepadEventOverrides) && void 0 !== e ? e : {}; if (g) { let e = this.m_actions.get(s.accountid); (o = e && "accept" == e.action ? "bright" : "dim"), (m = !e || ("decline" != e.action && "block" != e.action) ? "dim" : "bright"), (d = !e || ("decline" != e.action && "block" != e.action) ? "" : " declined"), e && "accept" == e.action ? (u += "bright") : !e || ("decline" != e.action && "block" != e.action) || (u += "dim"), (null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) && ((p.onOKButton = (e) => { let t = R.RA(e); this.AcceptInvite(t, s); }), (p.onOKActionDescription = (0, A.Xx)("#FriendGroup_Tip_Accept")), (p.onSecondaryButton = (e) => { let t = R.RA(e); this.BlockInvite(t, s); }), (p.onSecondaryActionDescription = (0, A.Xx)("#Button_Block")), (p.onOptionsButton = (e) => { let t = R.RA(e); this.DeclineInvite(t, s); }), (p.onOptionsActionDescription = (0, A.Xx)("#FriendGroup_Tip_Decline"))); } _.push( I.createElement( V.Z, { className: g ? "friendInviteContainer" + d : "friendCategoryContainer", key: s.accountid, classNames: "friend-anim", timeout: 320 }, I.createElement( "div", null, I.createElement(gt, Object.assign({ friend: s, key: s.accountid, className: u, context: this.GetFriendRenderContext(), bInOverlay: this.props.bInOverlay, noActions: g && (null === (n = this.context) || void 0 === n ? void 0 : n.IN_GAMEPADUI), action: h || (g && (null === (i = this.context) || void 0 === i ? void 0 : i.IN_GAMEPADUI)) ? () => {} : this.OnFriendSelected }, this.props.friendProps, { gamepadEventOverrides: p, bFriendsListEntry: !0 })), g && !(null === (r = this.context) || void 0 === r ? void 0 : r.IN_GAMEPADUI) && I.createElement("div", { className: "friendInviteButtons" }, I.createElement("div", { className: "friendInviteButton acceptFriendInvite " + o, onClick: () => this.OnAcceptInvite(s), title: (0, A.Xx)("#FriendGroup_Tip_Accept") }, I.createElement(X.JrY, null)), I.createElement("div", { className: "friendInviteButton declineFriendInvite " + m, onClick: () => this.OnDeclineInvite(s), title: (0, A.Xx)("#FriendGroup_Tip_Decline") }, I.createElement(X.pVO, null))), g && !(null === (a = this.context) || void 0 === a ? void 0 : a.IN_GAMEPADUI) && I.createElement("div", { className: "friendInviteBlockContainer" }, I.createElement($.ji, { onChange: (e) => this.OnBlockInvite(e, s) }), I.createElement("div", { className: "displayColumn" }, I.createElement("div", { className: "blockCommunicationLabel" }, (0, A.Xx)("#FriendGroup_IncomingInvites_Block")), I.createElement("div", { className: "blockCommunicationLabel subtitle" }, (0, A.Xx)("#FriendGroup_IncomingInvites_Block_desc")))), ), ), ); } } let v = "friendGroup", S = !1, b = !1, y = !1; if ((u && (v += " noTransitions"), this.props.group.modifiable ? ((v += " taggedGroup "), (S = !0)) : this.props.group.m_eDisplayType == c.h1.eOnlineOnlyNotInGame ? ((v += " onlineFriends "), (b = !0)) : this.props.group.m_eDisplayType == c.h1.eOfflineOnly ? ((v += " offlineFriends "), (y = !0)) : this.IsInviteGroup() ? (v += " friendRequests ") : this.IsOutGoingInviteGroup() && (v += " friendOutgoingRequests "), m && (!_ || !_.length))) return I.createElement("div", { className: "friendSearchNoResultsContainer" }, I.createElement("div", null, (0, A.Xx)("#FriendGroup_Search_NoResults", this.props.searchString)), I.createElement("div", { className: "searchSteamSuggestion" }, (0, A.Xx)("#FriendGroup_Search_CantFind")), I.createElement(P.ns, { href: o.De.COMMUNITY_BASE_URL + "search/users" }, (0, A.Xx)("#FriendGroup_Search_Link"))); if (0 == _.length && !this.IsCollapsed()) return null; let D = 0 != this.m_actions.size, w = "SortByRecent"; f && (w += " Recent"), p && (w += " Collapsed"); let M = !this.IsInviteGroup() && !this.IsOutGoingInviteGroup(), k = { onActivate: this.ToggleCollapsed, onOKActionDescription: (0, A.Xx)(p ? "#FriendGroup_Expand" : "#FriendGroup_Collapse"), onContextMenu: this.OnContextMenu, onMenuButton: M && this.OnContextMenu, onMenuActionDescription: M ? (0, A.Xx)("#FriendGroup_Options") : void 0 }; return I.createElement( h.G, Object.assign({ className: v }, this.GetDragDropProps(this.props.group.modifiable || this.props.group.accepts_group_removals)), I.createElement(E.s, { className: "groupHeaderContainer", "flow-children": "row", focusable: !1 }, !m && I.createElement(E.s, Object.assign({ className: "groupName" + (p ? " Collapsed" : "") }, k), I.createElement("div", { className: "ExpandPlusMinus" }, I.createElement(X.FUf, null)), this.props.group.icon_url && I.createElement("img", { className: "groupIcon", src: this.props.group.icon_url }), this.props.group.name, !m && I.createElement("span", { className: this.IsCollapsed() ? "groupCount collapsed" : "groupCount" }, "(", this.props.group.member_count, ")"), S && I.createElement("hr", null)), y && I.createElement(E.s, { className: w, focusable: !0, onActivate: this.ToggleOfflineSortMethod, title: f ? (0, A.Xx)("#FriendGroup_Tip_SortByRecent") : (0, A.Xx)("#FriendGroup_Tip_SortByAlphabet"), onOKActionDescription: (0, A.Xx)("#FriendGroup_ChangeSort") }, I.createElement(X.hnm, null))), I.createElement( U.Z, { className: "groupList", enter: !u, exit: !u }, _, g && !(null === (l = this.context) || void 0 === l ? void 0 : l.IN_GAMEPADUI) && I.createElement(V.Z, { key: "inviteButtons", classNames: "opacityfade-anim", timeout: 320 }, I.createElement("div", { className: "confirmInviteRequestContainer" }, I.createElement("div", { className: "confirmInviteRequestActions" }, D ? I.createElement("div", { className: "confirmInviteButton confirmInvites", onClick: this.OnConfirmChanges }, (0, A.Xx)("#FriendGroup_ConfirmInvites")) : I.createElement("div", { className: "confirmInviteButton confirmInvites dim" }, (0, A.Xx)("#FriendGroup_ConfirmInvites")), I.createElement("div", { className: "confirmInviteButton ignoreAllRequests", onClick: this.OnIgnoreAllInvites }, (0, A.Xx)("#FriendGroup_AllIgnore"))), I.createElement(E.s, { className: "cancelAddFriends", onActivate: this.OnCloseInvites, onOKActionDescription: (0, A.Xx)("#FriendGroup_Close"), title: (0, A.Xx)("#FriendGroup_Close") }, I.createElement(X.Ehc, { angle: -90 })))), ), S && I.createElement("div", { className: "dropTargetBox" }), ); } }; function dt(e, t, n) { return (0, H.yV)(I.createElement(ht, { browserContext: e, appid: t, ownerWindow: n.currentTarget.ownerDocument.defaultView }), n); } (mt.contextType = o.E_), (0, i.gn)([M.ak], mt.prototype, "ToggleCollapsed", null), (0, i.gn)([M.ak], mt.prototype, "OnContextMenu", null), (0, i.gn)([M.ak], mt.prototype, "OnFriendSelected", null), (0, i.gn)([M.ak], mt.prototype, "OnAcceptInvite", null), (0, i.gn)([M.ak], mt.prototype, "OnDeclineInvite", null), (0, i.gn)([M.ak], mt.prototype, "OnBlockInvite", null), (0, i.gn)([M.ak], mt.prototype, "OnConfirmChanges", null), (0, i.gn)([M.ak], mt.prototype, "OnIgnoreAllInvites", null), (0, i.gn)([M.ak], mt.prototype, "OnCloseInvites", null), (0, i.gn)([M.ak], mt.prototype, "ToggleOfflineSortMethod", null), (mt = (0, i.gn)([S.Pi], mt)); class ht extends I.PureComponent { render() { return I.createElement(W.xV, null, I.createElement(p.rb, { unAppID: this.props.appid, bShowLargeHeader: !0 })); } } let ut = class extends lt { constructor(e) { super(e), (this.state = { bLocalCollapsed: this.props.collapsed, bIsSubscribedToApp: !1 }), be.F.BIsSubscribedApp(this.props.group.id).then((e) => { this.setState({ bIsSubscribedToApp: e }); }); } GetGroup() { return this.props.group; } PerformDropAction(e) { return Promise.reject("FriendGameGroups do not accept drops"); } ToggleCollapsed() { this.props.groupDisplayPrefs ? this.props.groupDisplayPrefs.ToggleUserGroupCollapsed(this.props.group.unique_id) : this.setState({ bLocalCollapsed: !this.state.bLocalCollapsed }); } IsCollapsed() { return this.props.groupDisplayPrefs ? this.props.groupDisplayPrefs.GetUserGroupCollapsed(this.props.group.unique_id) : this.state.bLocalCollapsed; } GetFriendRenderContext() { return (this.m_FriendRenderContext && this.m_FriendRenderContext.friendGroup == this.props.group) || (this.m_FriendRenderContext = { friendGroup: this.props.group, chatContext: "friendslist" }), this.m_FriendRenderContext; } OnShowHeaderContextMenu(e) { let t = this.props.group.id; if (t) { d.Ul.AppInfoStore.GetAppInfo(t).is_valid && dt((0, m.Um)(this, e), t, e); } } render() { if (this.props.bSingletonGroup && 0 == this.props.group.unfiltered_count) return null; const e = this.IsCollapsed(); let t = []; if (!e) { let e = this.props.group.member_list, n = new Map(), i = new Map(), o = new Map(); if (!this.props.bSingletonGroup) { let t = "", r = null; for (let a of e) r && a.persona.player_group != t && n.set(r.accountid, "lastInGroup"), a.persona.player_group && (o.set(a.persona.player_group, a.persona.player_group_size), i.has(a.persona.player_group) ? i.set(a.persona.player_group, i.get(a.persona.player_group) + 1) : i.set(a.persona.player_group, 1), a.persona.player_group != t ? (n.set(a.accountid, "firstInGroup"), (t = a.persona.player_group), (r = a)) : (n.set(a.accountid, "inGroup"), (r = a))); r && n.set(r.accountid, "lastInGroup"); } let r = !this.props.bSingletonGroup && this.props.group.id != c.v5, a = null; for (let s of e) { let e = ""; this.state.friendDraggedOut == s && this.state.friendDrag != s && (e += " dragOriginGhost"); let l, c = !1; if (n.has(s.accountid)) { c = !0; let t = n.get(s.accountid); if ("lastInGroup" == t) { let e = i.get(s.persona.player_group), n = o.get(s.persona.player_group); if (n <= 1 && 1 == e) t = ""; else if (n && e < n) { let i = !1; d.Ul.FriendStore.self.persona.player_group == s.persona.player_group && (i = !0); let o = n - e, r = n - e - (i ? 1 : 0), l = "oneDigit"; o >= 10 && o < 100 ? (l = "twoDigits") : o >= 100 && (l = "manyDigits"); let c = 1 == r ? "#FriendGroup_PlayerGroupFooter_Label_Singular" : "#FriendGroup_PlayerGroupFooter_Label"; i && (c = 0 == r ? "#FriendGroup_PlayerGroupFooter_Label_PlusYouOnly" : 1 == r ? "#FriendGroup_PlayerGroupFooter_Label_PlusYou_Singular" : "#FriendGroup_PlayerGroupFooter_Label_PlusYou"), (t = 1 == e ? "firstInGroup" : "inGroup"), (a = I.createElement(V.Z, { key: s.persona.player_group + "_footer", classNames: "friend-anim", timeout: 320 }, I.createElement("div", { className: "SteamPlayerGroupFooter lastInGroup", draggable: !1 }, I.createElement("div", { className: "SteamPlayerGroupLines" }), I.createElement("div", { className: "SteamPlayerGroupFooterCount " + l }, I.createElement("div", { className: "count" }, "+", o)), I.createElement("div", { className: "SteamPlayerGroupFooterLabel" }, (0, A.Xx)(c, r))))); } } e += " " + t; } this.props.bSingletonGroup && (l = I.createElement(pt, { appid: s.persona.m_unGamePlayedAppID })), (e += " " + D.a.hoverClass), t.push(I.createElement(V.Z, { key: s.accountid, classNames: "friend-anim", timeout: 320 }, I.createElement(gt, { friend: s, key: s.accountid, bHideGameName: r, className: e, context: this.GetFriendRenderContext(), bInGroup: c, bFriendsListEntry: !0, listStatusIndicatorLeft: l, bInOverlay: this.props.bInOverlay }))), a && t.push(a); } } let n = "friendGroup gameGroup", i = this.props.group.name, o = null; this.props.bSingletonGroup && ((n += " OtherGamesGroup"), (o = this.props.bOtherGroups ? (0, A.Xx)("#FriendGroup_InGame_Others") : (0, A.Xx)("#FriendGroup_InGame"))); let r = { onActivate: this.ToggleCollapsed, onOKActionDescription: (0, A.Xx)(e ? "#FriendGroup_Expand" : "#FriendGroup_Collapse") }; return ( this.props.bSingletonGroup || this.props.group.id == c.v5 || (this.state.bIsSubscribedToApp ? ((r.onOptionsButton = () => { let e = "steam://open/library/details/" + this.props.group.id; d.Ul.OpenURLInBrowser(e, d.D); }), (r.onOptionsActionDescription = (0, A.Xx)("#Friend_Menu_ViewGameInLibrary"))) : ((r.onOptionsButton = () => { let e = (0, he.FG)(this.props.group.id, "friendcontextmenu"); d.Ul.OpenURLInBrowser(e, d.D); }), (r.onOptionsActionDescription = (0, A.Xx)("#Friend_Menu_ViewGameStorePage")))), I.createElement(h.G, Object.assign({ className: n }, this.GetDragDropProps(this.props.group.modifiable || this.props.group.accepts_group_removals)), I.createElement(E.s, Object.assign({ className: "groupName" + (e ? " Collapsed" : ""), onContextMenu: this.OnShowHeaderContextMenu }, r), I.createElement("div", { className: "gameGroupContainer" }, I.createElement("div", { className: "ExpandPlusMinus" }, I.createElement(X.FUf, null)), o, this.props.group.icon_url && I.createElement("img", { className: "groupIcon", src: this.props.group.icon_url })), i, I.createElement("span", { className: this.IsCollapsed() ? "groupCount collapsed" : "groupCount" }, "(", this.props.group.member_count, ")"), I.createElement("hr", null)), I.createElement(U.Z, { className: this.IsCollapsed() ? "friendsContainer groupCollapsed" : "friendsContainer" }, t)) ); } }; (0, i.gn)([M.ak], ut.prototype, "ToggleCollapsed", null), (0, i.gn)([M.ak], ut.prototype, "OnShowHeaderContextMenu", null), (ut = (0, i.gn)([S.Pi], ut)); let pt = class extends I.Component { OnShowGameIconContextMenu(e) { dt((0, m.Um)(this, e), this.props.appid, e); } render() { let e = 0 != this.props.appid ? d.Ul.AppInfoStore.GetAppInfo(this.props.appid) : null; return e && e.is_valid ? I.createElement("div", { className: "FriendInGameIcon", onContextMenu: this.OnShowGameIconContextMenu }, I.createElement("img", { className: "gameIcon", alt: "", src: e.icon_url })) : I.createElement("div", { className: "FriendInGameIcon" }, I.createElement("div", { className: "FriendInGameIcon_NA" }, "N/A")); } }; (0, i.gn)([M.ak], pt.prototype, "OnShowGameIconContextMenu", null), (pt = (0, i.gn)([S.Pi], pt)); class _t extends I.Component { OnContextMenu(e) { if (this.props.disableContextMenu) return; let t; if (this.props.onContextMenu) t = this.props.onContextMenu(e); else { t = m.g_FriendsUIDesktopApp.FriendHoverStore.GetHover(this.props.friend).OnContextMenu(this.props.context, e); } t && this.props.onContextMenuShown && this.props.onContextMenuShown(t); } componentWillUnmount() { this.Hide(); } Hide() { m.g_FriendsUIDesktopApp.FriendHoverStore.GetHover(this.props.friend).HideByElement(y.findDOMNode(this)); } render() { let e = I.Children.only(this.props.children); if (e) { let t = this.props, n = m.g_FriendsUIDesktopApp.FriendHoverStore.GetHover(t.friend); return I.cloneElement(e, { onMouseEnter: (e) => n.Show(e, t.context, t.direction), onMouseLeave: n.Hide, onContextMenu: this.OnContextMenu }); } return this.props.children; } } (0, i.gn)([M.ak], _t.prototype, "OnContextMenu", null); const gt = (0, S.Pi)((e) => { const t = (0, k.Wy)(), n = (0, m.rb)(t.ownerWindow), i = !(0, d.ns)(n, d.D); return I.createElement(Ct, Object.assign({ bInOverlay: i }, e)); }); let Ct = class extends I.Component { constructor(e) { super(e), (this.state = { bActive: !1, bVisible: !1, bHovered: !1 }); } OnWaypointEnter() { this.setState({ bVisible: !0 }); } OnWaypointLeave() { this.setState({ bVisible: !1 }); } OnMouseEnter() { this.setState({ bHovered: !0 }); } OnMouseLeave() { this.setState({ bHovered: !1 }); } OnDoubleClick(e) { this.RunAction(!0, e); } OnClick(e) { this.RunAction(!1, e); } OnOKButton(e) { this.RunAction(!0, e); } RunAction(e, t) { !this.props.bSingleClickActivate == e && (this.props.action ? this.props.action(this.props.friend, t) : this.props.noActions || this.props.friend.OpenChatDialog((0, m.Um)(this, t))); } OnDragStart(e) { e.dataTransfer.setData("text/plain", this.props.friend.persona.m_strPlayerName), e.dataTransfer.setData("text/steamid", this.props.friend.persona.m_steamid.ConvertTo64BitString()), this.props.friend.is_friend ? m.g_FriendsUIDesktopApp.DragDropManager.StartDrag({ type: "friend", source: this.props.context.chatContext, friend: this.props.friend, sourceContext: this.props.context }) : m.g_FriendsUIDesktopApp.DragDropManager.StartDrag({ type: "nonfriend", source: this.props.context.chatContext, friend: this.props.friend, sourceContext: this.props.context }), m.g_FriendsUIDesktopApp.FriendHoverStore.GetHover(this.props.friend).HideAllInstances(); } OnDragEnd(e) { m.g_FriendsUIDesktopApp.DragDropManager.EndDrag(); } OnShowContextMenu(e) { let t = (0, p.$W)((0, m.Um)(this, e), this.props.context, this.props.friend, e); t && this.OnContextMenuShown(t); } OnContextMenuShown(e) { this.setState({ bActive: !0 }), e.SetOnHideCallback(() => { this.setState({ bActive: !1 }); }); } render() { var e, t, n; const o = this.props, { friend: r, showVoiceLevel: a, bHideGameName: s, bHideEnhancedRichPresenceLabel: l, context: c, action: m, noActions: h, notDraggable: u, disableContextMenu: p, className: _, bInVoiceList: g, listStatusIndicator: C, listStatusIndicatorLeft: f, bInGroup: v, bFriendsListEntry: S, bForcePersonaNameDisplay: b, bSingleClickActivate: y, avatarSize: D = "Medium", bHidePersona: R, bHideSnooze: M, bHideStatus: k, bHideStatusInfo: T, bInGameIcon: L, statusPosition: G, lastChat: O, gamepadEventOverrides: F, children: B, bInOverlay: x } = o, N = (0, i._T)(o, ["friend", "showVoiceLevel", "bHideGameName", "bHideEnhancedRichPresenceLabel", "context", "action", "noActions", "notDraggable", "disableContextMenu", "className", "bInVoiceList", "listStatusIndicator", "listStatusIndicatorLeft", "bInGroup", "bFriendsListEntry", "bForcePersonaNameDisplay", "bSingleClickActivate", "avatarSize", "bHidePersona", "bHideSnooze", "bHideStatus", "bHideStatusInfo", "bInGameIcon", "statusPosition", "lastChat", "gamepadEventOverrides", "children", "bInOverlay"]); if ((r.LoadIfNecessary(), !r.is_ready)) return I.createElement("div", null); let P = d.Ul.CMInterface.steamid.GetAccountID() == r.accountid, U = null, V = 0; this.props.showVoiceLevel && (V = d.Ul.VoiceStore.get_volume(r.accountid)); let H, W = Object.assign(Object.assign({}, N), { className: "friend " + (0, ce.sB)(r.persona) }); if ((_ && (W.className += " " + _), S && (W.className += " friendStatusHover"), P)) { let e = d.Ul.VoiceStore.IsAttemptingInitialConnection(), t = d.Ul.VoiceStore.HasBeenAttemptingOverTwoSeconds(), n = d.Ul.VoiceStore.IsAttemptingReconnect(), i = "https://support.steampowered.com/kb_article.php?ref=2598-RTZB-6114", o = (0, A.Xx)("#VoiceChatConnectingHelp"), r = null; t ? (r = (0, A.Xx)("#VoiceChatConnecting")) : n && (r = (0, A.Xx)("#VoiceChatReconnecting")), r && (U = P ? () => I.createElement("a", { target: "_blank", title: o, href: i }, r) : () => r); let a = ""; e && (a += " connecting"), t && (a += " slowconnecting"), n && (a += " reconnecting"), (W.className += a); } if (((h && !m) || ((W.onDoubleClick = this.OnDoubleClick), (W.onClick = this.OnClick), (W.onOKButton = this.OnOKButton)), h || p || !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) || ((W.onContextMenu = this.OnShowContextMenu), (W.onMenuButton = this.OnShowContextMenu), (W.onOKActionDescription = (0, A.Xx)("#Friend_Menu_SendMessage")), (W.onMenuActionDescription = (0, A.Xx)("#Friend_Menu_Open"))), h || u || ((W.onDragStart = this.OnDragStart), (W.onDragEnd = this.OnDragEnd), (W.draggable = !0)), F && (W = Object.assign(Object.assign({}, W), F)), B)) H = I.createElement(E.s, Object.assign({}, W), B); else { let e, i = 100, o = {}; if (a && 1 != V) { let e = 3.2, t = Math.min(V * e, 1), n = Math.max(0, i * t); (n = Math.round(10 * n) / 10), (o.height = n + "%"), (o.top = "auto"), n > 1 && (W.className += " speaking"); } c && c.group && ((e = c.group.GetMemberPartyBeacon(r.accountid)), e && (W.className += " partyBeacon")), this.state.bActive && (W.className += " Friend_ContextMenuActive"); let m, u = d.Ul.VoiceStore.GetPerUserMuting(r.accountid), _ = null, S = null, b = this.state.bVisible && !(null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) && d.Ul.SettingsStore.FriendsSettings.bAnimatedAvatars && r.persona.is_online; if (r.BLoadedEquippedItems()) { let e = r.GetEquippedProfileItems(); e && ((_ = e.animated_avatar), (S = e.avatar_frame)); } if (L && r.persona.is_ingame) { let e = d.Ul.AppInfoStore.GetAppInfo(r.persona.m_unGamePlayedAppID); e.is_valid && (m = I.createElement("div", { className: "FavoriteFriend_GameIcon" }, I.createElement("img", { className: "gameIcon", src: e.icon_url, draggable: !1 }))); } let y = I.createElement(w._1, { key: `${r.persona.GetAccountID()}_${r.persona.is_online}`, loopDuration: b ? "Medium" : "None", persona: r.persona, animatedAvatar: _, avatarFrame: S, size: D, statusStyle: o, statusPosition: G, bParentHovered: r.persona.is_online && this.state.bHovered, bLimitProfileFrameAnimationTime: !b || x }, g && u && I.createElement(X.ffh, null), m); h || (y = I.createElement(_t, { friend: r, context: c, disableContextMenu: p, onContextMenuShown: this.OnContextMenuShown }, y)); let A = c && "chatmemberlist" == c.chatContext, F = ""; 2 != r.efriendrelationship || A || (void 0 === d.Ul.FriendStore.FriendGroupStore.incoming_invites_group.map_steamid_to_mutual_friends.get(r.steamid64) && (F = "noMutualFriends"), (U = () => I.createElement(ft, { friend: r }))); let B = null; if (O && O.GetLastMessage()) { const e = d.Ul.ChatStore.NotificationBBCodeParser.ParseBBCode(O.GetLastMessage(), { chat: O, unAccountIDSender: O.accountid_last_message, key: O.GetLastMessage(), rtTimestamp: O.time_last_message, onLoad: () => {} }); B = () => I.createElement("div", { className: ve.LastMessage }, `${(e && e.body) || (0, Te.p8)(O.GetLastMessage())}`); } else r.persona.HasCurrentGameRichPresence() ? (B = () => r.persona.GetCurrentGameRichPresence()) : r.persona.m_broadcastAccountId && (B = () => r.GetBroadcastDescription()); H = I.createElement( E.s, Object.assign({ onMouseEnter: this.OnMouseEnter, onMouseLeave: this.OnMouseLeave }, W), I.createElement(Le.h, { onEnter: this.OnWaypointEnter, onLeave: this.OnWaypointLeave }), I.createElement(vt, { friend: r }), v && I.createElement("div", { className: "SteamPlayerGroupLines" }), g && I.createElement(St, { friend: r }), f, y, !T && I.createElement(ge.o, { className: (0, Ce.Z)("labelHolder", F), persona: r.persona, eFriendRelationship: r.efriendrelationship, bIsSelf: d.Ul.FriendStore.self == r, strNickname: r.nickname, bParenthesizeNicknames: d.Ul.SettingsStore.CommunityPreferences.bParenthesizeNicknames, renderStatus: U, renderRichPresence: B, bHideGameName: s, bHideStatus: k, bHideEnhancedRichPresenceLabel: l, bHidePersona: R, bHideSnooze: M, bCompactView: d.Ul.SettingsStore.FriendsSettings.bCompactFriendsList, onContextMenu: (null === (n = this.context) || void 0 === n ? void 0 : n.IN_GAMEPADUI) || h || p ? void 0 : this.OnShowContextMenu, bHasPartyBeacon: void 0 !== e }), C, ); } return H; } }; (Ct.contextType = o.E_), (0, i.gn)([M.ak], Ct.prototype, "OnWaypointEnter", null), (0, i.gn)([M.ak], Ct.prototype, "OnWaypointLeave", null), (0, i.gn)([M.ak], Ct.prototype, "OnMouseEnter", null), (0, i.gn)([M.ak], Ct.prototype, "OnMouseLeave", null), (0, i.gn)([M.ak], Ct.prototype, "OnDoubleClick", null), (0, i.gn)([M.ak], Ct.prototype, "OnClick", null), (0, i.gn)([M.ak], Ct.prototype, "OnOKButton", null), (0, i.gn)([M.ak], Ct.prototype, "OnDragStart", null), (0, i.gn)([M.ak], Ct.prototype, "OnDragEnd", null), (0, i.gn)([M.ak], Ct.prototype, "OnShowContextMenu", null), (0, i.gn)([M.ak], Ct.prototype, "OnContextMenuShown", null), (Ct = (0, i.gn)([S.Pi], Ct)); const ft = (0, S.Pi)(function (e) { const { friend: t } = e; let n, i, o = d.Ul.FriendStore.FriendGroupStore.incoming_invites_group.map_steamid_to_mutual_friends.get(t.steamid64); return ( (0, I.useEffect)(() => { void 0 === o && d.Ul.FriendStore.FriendGroupStore.EnsureMutualFriendsForIncomingInvites(); }, [o]), void 0 === o ? (i = (0, A.Xx)("#FriendGroup_NoMutualFriends")) : ((i = (0, A.kb)("#FriendGroup_YesMutualFriends", o.size)), (n = o.size)), I.createElement("span", { className: "inviteLabel" }, I.createElement("span", { className: "mutualFriendNumber" }, n && n + " "), i) ); }), vt = (0, S.Pi)((e) => { const { friend: t } = e, n = I.useCallback(() => t.LoadEquippedProfileItems(), [t]); return !t.BLoadedEquippedItems() && t.persona.is_online && d.Ul.SettingsStore.FriendsSettings.bAnimatedAvatars ? I.createElement(Le.h, { onEnter: n, topOffset: "-500px" }) : null; }); let St = class extends I.Component { render() { let e = this.props.friend, t = d.Ul.CMInterface.steamid.GetAccountID() == e.accountid, n = "voiceStatusIconsContainer", i = "", o = "", r = !1, a = !1, s = !1, l = d.Ul.VoiceStore.GetPerUserMuting(e.accountid), c = d.Ul.VoiceStore.GetUserMutedRemotely(e.accountid), m = d.Ul.VoiceStore.GetOutputMutedRemotely(e.accountid); return ( t ? ((r = d.Ul.VoiceStore.IsMicMuted()), (a = d.Ul.VoiceStore.IsOutputMuted()), (s = d.Ul.VoiceStore.BNoMicAvailableForSession()), r && (n += " mic_muted_self"), a && (n += " output_muted_self")) : (s = d.Ul.VoiceStore.GetUserHasNoMicForSession(e.accountid)), l && (n += " muted_locally"), c && (n += " mic_muted_remotely"), m && (n += " output_muted_remotely"), s && (n += " no_mic_for_session"), s ? (i = (0, A.Xx)("#Tooltip_MicStatus_NoMic")) : c ? (i = (0, A.Xx)("#Tooltip_RemoteMicStatus_Muted")) : r && (i = (0, A.Xx)("#Tooltip_YourMicStatus_Muted")), m ? (o = (0, A.Xx)("#Tooltip_RemoteOutputStatus_Muted")) : a && (o = (0, A.Xx)("#Tooltip_YourOutputStatus_Muted")), I.createElement("div", { className: n }, I.createElement("div", { className: "voicestatusIcon voiceStatusMic disabled", title: i }, I.createElement(X.JgI, { off: !0 })), I.createElement("div", { className: "voicestatusIcon voiceStatusOutput disabled", title: o }, I.createElement(X.bpe, { off: !0 }))) ); } }; St = (0, i.gn)([S.Pi], St); let bt = class extends I.Component { render() { const { friend: e, bLarge: t, className: n, context: i, children: o } = this.props; return I.createElement(_t, { friend: e, context: i }, I.createElement("div", { className: (0, Ce.Z)("friend", "FriendAvatar", (0, ce.sB)(e.persona), n) }, I.createElement(w.vV, { persona: e.persona, size: t ? "Large" : "Medium", className: n }, o))); } }; bt = (0, i.gn)([S.Pi], bt); let It = class extends I.Component { render() { let e, t = d.Ul.ChatStore.FriendChatStore.GetUnreadFriendMessageCount(this.props.browserContext); return this.props.bScrolledFromTop && t > 0 && (e = I.createElement(V.Z, { classNames: "unread-messages-anim", timeout: 320 }, I.createElement("div", { className: "unreadMessageViolator", onClick: this.props.onClick }, 1 == t && (0, A.Xx)("#FriendGroup_UnreadMessagesViolator"), t > 1 && (0, A.Xx)("#FriendGroup_UnreadMessagesViolatorPlural", t)))), I.createElement(U.Z, null, e); } }; It = (0, i.gn)([S.Pi], It); let yt = class extends I.Component { constructor(e) { super(e), (this.state = { collapsed: !1 }); } OnHeaderClick(e) { this.setState({ collapsed: !this.state.collapsed }); } render() { let e = this.props.friendChatStore.GetFriendsWithUnreadMessages(this.props.browserContext); if (!e.length) return null; let t = this.state.collapsed, n = t ? null : e.map((e) => { let t = e.unread_message_count, n = e.chat_partner, i = I.createElement("div", { className: "FriendMessageCount" }, t); return I.createElement(V.Z, { key: n.accountid, classNames: "friend-anim", timeout: 320 }, I.createElement("div", { className: "unreadFriend" }, I.createElement(gt, { friend: n, key: n.accountid, context: { chat: e }, bFriendsListEntry: !0, listStatusIndicator: i, bInOverlay: this.props.browserContext.m_unAppID && 0 != this.props.browserContext.m_unAppID }))); }); return I.createElement("div", { className: "friendGroup" }, I.createElement("div", { className: "groupName" + (t ? " Collapsed" : ""), onClick: this.OnHeaderClick }, I.createElement("div", { className: "ExpandPlusMinus" }, I.createElement(X.FUf, null)), (0, A.Xx)("#FriendGroup_UnreadMessages"), I.createElement("span", { className: "groupCount" }, "(", e.length, ")"), I.createElement("hr", null)), I.createElement(U.Z, null, n)); } }; (0, i.gn)([M.ak], yt.prototype, "OnHeaderClick", null), (yt = (0, i.gn)([S.Pi], yt)); }, 31075: (e, t, n) => { "use strict"; n.d(t, { J: () => w, m: () => M }); var i = n(85556), o = n(84446), r = n(19339), a = n(50649), s = n(27378), l = n(83817), c = n(87018), m = n(84290), d = n(46057), h = n(20850), u = n.n(h), p = n(16518), _ = n(618), g = n(72746), C = n(37234), f = n(56666), v = n(11259), S = n(2049), b = n(38461), I = n(71357), y = n(88669), E = n(68816); const D = (e) => { const t = s.useRef(); return s.createElement( E.e1, { onEscKeypress: e.closeModal }, s.createElement( v.oX, { classNameContent: "CreateChatChannelDialog", onSubmit: () => { e.onResult(t.current.value), e.closeModal(); }, }, s.createElement(v.h4, null, (0, m.Xx)(e.title)), s.createElement(v.uT, null, s.createElement(v.II, { ref: t, autoFocus: !0 })), s.createElement(v.$_, null, s.createElement(v.o9, { onCancel: e.closeModal })), ), ); }, w = (0, a.Pi)((e) => { var t; const n = null != e.fnOKButton, i = e.chatRoom.GetGroup().BCanAdminChannel(), o = e.chatRoom.IsTempVoiceRoom(); let r = e.chatRoom.BVoiceActive(), a = e.chatRoom.voice_active_member_list.member_list.length > 0; return s.createElement( f.eh, { focusable: !0, className: (0, c.Z)(u().GroupRoomContainer, r && u().UserInRoom, a && u().ActiveVoiceRoom), onOKButton: e.fnOKButton, onOKActionDescription: null !== (t = e.strOKActionDescription) && void 0 !== t ? t : (0, m.Xx)("#VoiceChat_ManageRoom"), onSecondaryButton: e.fnSecondaryButton, onSecondaryActionDescription: e.strSecondaryActionDescription, onOptionsButton: e.fnOptionsButton, onOptionsActionDescription: e.strOptionsActionDescription, onGamepadFocus: e.fnOnFocus }, s.createElement( l.s, { focusable: !n, className: u().RoomHeader, onOKButton: n ? void 0 : () => { g.Ul.UIStore.ShowAndOrActivateChatRoomGroup(e.context, e.chatRoom.GetGroup(), !0).SelectChat(e.chatRoom.GetRoomID()), e.fnCloseModal && e.fnCloseModal(); }, onOKActionDescription: (0, m.Xx)("#VoiceChat_ViewQuickChat"), onSecondaryButton: i ? (t) => { (0, I.p3)((0, y.RA)(t), (0, m.Xx)("#Chat_Actions_RemoveRoom"), (0, m.Xx)("#Chat_Actions_RemoveRoom_Confirm"), (0, m.Xx)("#Chat_Actions_RemoveRoom_Action")).then(() => { e.chatRoom.GetGroup().DeleteChatRoom(e.chatRoom.GetRoomID()); }); } : void 0, onSecondaryActionDescription: i ? (0, m.Xx)("#Chat_Actions_RemoveRoom") : void 0, onOptionsButton: i ? (t) => { (0, E.BR)(s.createElement(D, { title: (0, m.Xx)("#Chat_Actions_ChangeRoomName"), description: void 0, onResult: (t) => e.chatRoom.GetGroup().RenameRoom(e.chatRoom.GetRoomID(), t) }), (0, y.RA)(t)); } : void 0, onOptionsActionDescription: i ? (o ? (0, m.Xx)("#Chat_Actions_SaveChannel") : (0, m.Xx)("#Chat_Actions_ChangeRoomName")) : void 0, }, s.createElement(p.Cq4, null), s.createElement("div", { className: u().RoomTitle }, e.chatRoom.name), ), e.chatRoom.voice_active_member_list.member_list.map((t) => { const i = t.accountid != g.Ul.ChatStore.VoiceChat.GetLocalAccountID(), o = t.accountid != g.Ul.ChatStore.VoiceChat.GetLocalAccountID(), r = g.Ul.ChatStore.VoiceChat.GetPerUserMuting(t.accountid), a = g.Ul.ChatStore.VoiceChat.GetUserMutedRemotely(t.accountid), l = g.Ul.ChatStore.VoiceChat.GetOutputMutedRemotely(t.accountid); let h = []; r && h.push(s.createElement("div", { className: u().MicMutedLocally }, s.createElement(p.ffh, { muted: !0 }))), a && h.push(s.createElement("div", { className: u().MicMutedRemotely }, s.createElement(p.JgI, { off: !0 }))), l && h.push(s.createElement("div", { className: u().OutputMutedRemotely }, s.createElement(p.bpe, { off: !0 }))); const _ = i ? (r ? (0, m.Xx)("#VoiceChat_Unmute") : (0, m.Xx)("#VoiceChat_Mute")) : null; return s.createElement(d.mo, { key: t.accountid, noActions: n, friend: t, className: (0, c.Z)(u().GroupVoiceChatFriend), context: { chat: e.chatRoom, chatContext: "friendslist" }, avatarSize: "Medium", statusPosition: "right", showVoiceLevel: !0, gamepadEventOverrides: n ? void 0 : { onOKButton: () => { o && (t.OpenChatDialog(e.context), e.fnCloseModal && e.fnCloseModal()); }, onOKActionDescription: o ? (0, m.Xx)("#Friend_Menu_SendMessage") : null, onSecondaryButton: () => { i && g.Ul.ChatStore.VoiceChat.SetPerUserMuting(t.accountid, !r); }, onSecondaryActionDescription: _, onOptionsButton: () => {}, onOptionsActionDescription: null, }, listStatusIndicator: h, }); }), ); }); function R(e) { let { chat: t, onHold: n } = e; return s.createElement( l.s, { className: u().PendingVoiceChatRequest }, s.createElement(d.mo, { noActions: !0, friend: t.chat_partner, className: (0, c.Z)(u().FriendVoiceChat, t.unread_message_count > 0 && "unreadFriend"), context: { chat: t, chatContext: "friendslist" }, avatarSize: "Large", statusPosition: "right" }), s.createElement( v.zx, { onClick: () => { g.Ul.VoiceStore.InitiateFriendChat(t.accountid_partner); }, }, n ? (0, m.Xx)("#Voice_Resume") : (0, m.Xx)("#Voice_Accept"), ), s.createElement( v.zx, { onClick: () => { g.Ul.VoiceStore.OnRejectOneOnOneVoiceChatForPartner(t.accountid_partner); }, }, n ? (0, m.Xx)("#Voice_End") : (0, m.Xx)("#Voice_Decline"), ), ); } function A(e) { let { vecPendingChats: t } = e; if (0 == t.length) return null; let n = !1; return ( t.forEach((e) => { n || (n = g.Ul.VoiceStore.BSelfHadPreviouslyJoinedOneOnOneChat(null == e ? void 0 : e.accountid_partner)); }), s.createElement( s.Fragment, null, s.createElement("div", { className: (0, c.Z)(u().Title, u().PendingVoiceChats) }, n ? (0, m.Xx)("#VoiceChat_CallOnHold") : (0, m.Xx)("#VoiceChat_PendingRequests")), s.createElement( l.s, { className: u().PendingVoiceChatsList }, t.map((e) => s.createElement(R, { key: e.unique_id, chat: e, onHold: n })), ), ) ); } let M = class extends s.Component { constructor(e) { super(e); } componentDidMount() { this.m_BrowserContext = (0, C.Um)(this); } OnInputGainChanged(e) { this.props.chats.VoiceChat.IsMicMuted() && this.props.chats.VoiceChat.ToggleMicMuting(), this.props.chats.VoiceChat.SetVoiceInputGain(this.props.chats.VoiceChat.ConvertSliderToGainValue(e, b.Ys.k_MaxInputOutputGainValue)); } OnOutputGainChanged(e) { this.props.chats.VoiceChat.IsOutputMuted() && this.props.chats.VoiceChat.ToggleOutputMuting(), this.props.chats.VoiceChat.SetVoiceOutputGain(this.props.chats.VoiceChat.ConvertSliderToGainValue(e, b.Ys.k_MaxInputOutputGainValue)); } render() { let e = this.props.chats.GetActiveVoiceChat(); const t = e instanceof r.a ? e : void 0, n = e instanceof o.K ? e : void 0, i = this.props.chats.FriendChatStore.GetAllChats().filter((e) => { let n = g.Ul.VoiceStore.BPartnerHasRequestedAndIsInOneOnOneChat(e.accountid_partner); return (null == t ? void 0 : t.accountid_partner) == e.accountid_partner && (n = !1), n; }); if (!this.props.chats.VoiceChat.IsAnyVoiceActive() || !e) return 0 != i.length ? s.createElement(A, { vecPendingChats: i }) : s.createElement("div", { className: u().Title }, (0, m.Xx)("#VoiceChat_NoneActive")); const a = null == t ? void 0 : t.GetMember(t.accountid_partner); let h; (null == t ? void 0 : t.unread_message_count) > 0 && (h = s.createElement("div", { className: "FriendMessageCount" }, t.unread_message_count)); const C = () => { SteamClient.URL.ExecuteSteamURL("steam://open/settings/audio"), window.parent.postMessage({ message: "CloseSideMenus" }, "https://steamloopback.host"); }, f = this.props.chats.VoiceChat.IsOutputMuted() ? 0 : this.props.chats.VoiceChat.ConvertGainValueToSliderValue(this.props.chats.VoiceChat.GetVoiceOutputGain(), b.Ys.k_MaxInputOutputGainValue), S = this.props.chats.VoiceChat.IsMicMuted() ? 0 : this.props.chats.VoiceChat.ConvertGainValueToSliderValue(this.props.chats.VoiceChat.GetVoiceInputGain(), b.Ys.k_MaxInputOutputGainValue), I = this.props.chats.VoiceChat.GetVoiceInputGain() > 0, y = this.props.chats.VoiceChat.GetVoiceOutputGain() > 0; return s.createElement( s.Fragment, null, s.createElement(A, { vecPendingChats: i }), s.createElement("div", { className: u().Title }, (0, m.Xx)("#VoiceChat_InVoiceChat")), s.createElement( "div", { className: u().VoiceChatList }, s.createElement(l.s, { className: (0, c.Z)(u().FriendVoiceChatSliderContainer, 0 == S && "MicMuted"), onOKActionDescription: (0, m.Xx)("#VoiceChat_AdjustMicVolume"), onSecondaryButton: I ? () => this.props.chats.VoiceChat.ToggleMicMuting() : void 0, onSecondaryActionDescription: I ? (this.props.chats.VoiceChat.IsMicMuted() ? (0, m.Xx)("#VoiceChat_UnmuteMic_Deck") : (0, m.Xx)("#VoiceChat_MuteMic_Deck")) : void 0, onMenuButton: C, onMenuActionDescription: (0, m.Xx)("#VoiceChat_GoToAudioSettings") }, s.createElement(v.z2, { min: 0, max: 100, value: S, onChange: this.OnInputGainChanged, icon: s.createElement(p.JgI, { off: 0 == S, onClick: () => this.props.chats.VoiceChat.ToggleMicMuting() }), className: u().SliderPadding })), s.createElement(l.s, { className: u().FriendVoiceChatSliderContainer, onOKActionDescription: (0, m.Xx)("#VoiceChat_AdjustVoiceVolume"), onSecondaryButton: y ? () => this.props.chats.VoiceChat.ToggleOutputMuting() : void 0, onSecondaryActionDescription: y ? (this.props.chats.VoiceChat.IsOutputMuted() ? (0, m.Xx)("#VoiceChat_UnmuteVoice_Deck") : (0, m.Xx)("#VoiceChat_MuteVoice_Deck")) : void 0, onMenuButton: C, onMenuActionDescription: (0, m.Xx)("#VoiceChat_GoToAudioSettings") }, s.createElement(v.z2, { min: 0, max: 100, value: f, onChange: this.OnOutputGainChanged, icon: s.createElement(p.bpe, { off: 0 == f, onClick: () => this.props.chats.VoiceChat.ToggleOutputMuting() }), className: u().SliderPadding })), t && s.createElement(l.s, { className: (0, c.Z)(u().FriendVoiceChatContainer, "FriendVoiceChatContainer") }, s.createElement(d.mo, { friend: a, className: (0, c.Z)(u().FriendVoiceChat, t.unread_message_count > 0 && "unreadFriend"), context: { chat: t, chatContext: "friendslist" }, avatarSize: "Medium", statusPosition: "right", listStatusIndicator: h }), s.createElement(l.s, { focusable: !0, className: u().LeaveVoiceChat, onActivate: () => this.props.chats.VoiceChat.OnUserEndVoiceChat() }, s.createElement(p.eNM, null), (0, m.Xx)("#VoiceChat_Leave"))), n && s.createElement( l.s, { className: u().GroupVoiceChatContainer }, s.createElement( l.s, { focusable: !0, className: u().GroupContainer, onOKButton: () => { g.Ul.UIStore.ShowAndOrActivateChatRoomGroup(this.m_BrowserContext, n.GetGroup(), !0); }, onOKActionDescription: (0, m.Xx)("#ChatRoom_Invite_Accept_Inviter"), }, s.createElement(_._P, { group: n.GetGroup(), small: !0 }), s.createElement("div", { className: u().GroupTitle }, n.GetGroup().name), ), s.createElement(w, { context: this.m_BrowserContext, chatRoom: n }), s.createElement(l.s, { focusable: !0, className: u().LeaveVoiceChat, onActivate: () => this.props.chats.VoiceChat.OnUserEndVoiceChat() }, s.createElement(p.eNM, null), (0, m.Xx)("#VoiceChat_Leave")), ), ), ); } }; (0, i.gn)([S.ak], M.prototype, "OnInputGainChanged", null), (0, i.gn)([S.ak], M.prototype, "OnOutputGainChanged", null), (M = (0, i.gn)([a.Pi], M)); }, 74915: (e, t, n) => { "use strict"; n.d(t, { w: () => Pe }); var i = n(85556), o = n(27378), r = n(2049), a = n(79588), s = n(50649), l = n(77385), c = n(54530), m = n(10553), d = n(72746), h = n(97224), u = n(60176), p = n(16518), _ = n(78654), g = n(84290), C = n(67915), f = n(84446), v = n(46962), S = n(88669), b = n(21298), I = n(83817), y = n(14341), E = n(19953), D = n(92883), w = n(23346), R = n(46057), A = n(41758), M = n(24780); var k = n(87018), T = n(22982), L = n.n(T), G = n(29205), O = n(31542), F = n(41370), B = n(28413), x = n(91867), N = n(82909), P = n(51579), U = n(37153), V = n(94207), H = n(36175); const W = (0, s.Pi)((e) => { const { msg: t, chat: n } = e, { showPicker: i } = Z(n, t); if (0 === t.reactions.length) return null; return o.createElement( "div", { className: V.MessageReactions }, t.reactions.map((e) => o.createElement(X, { key: e.strReaction, chat: n, msg: t, reaction: e, onClick: () => ((e) => n.UpdateMessageReaction(t, e.eReactionType, e.strReaction, !e.bUserReacted))(e) })), o.createElement($, { className: V.OpenPickerButton, onClick: i }), ); }); const X = (0, s.Pi)((e) => { const { onClick: t, reaction: { bUserReacted: n, cReactors: i }, chat: r, msg: a, } = e, [s, l] = (function (e = 400) { const [t, n] = (0, o.useState)(!1), i = (0, o.useRef)(); return ( (0, o.useEffect)(() => () => clearTimeout(i.current), []), [ t, (o) => { o && !t && void 0 === i.current ? (i.current = window.setTimeout(() => { (i.current = void 0), n(!0); }, e)) : o || (window.clearTimeout(i.current), (i.current = void 0), t && n(o)); }, ] ); })(), c = (0, o.useRef)(), m = { borderColor: n ? "#8D8E94" : "#1B1C20" }; return o.createElement("div", { onClick: t, style: m, className: V.MessageReaction, onMouseEnter: () => l(!0), onMouseLeave: () => l(!1), ref: c }, o.createElement(j, { reaction: e.reaction }), o.createElement("div", { className: V.ReactionCount }, i), s && o.createElement(q, { target: c.current, reaction: e.reaction, chat: r, msg: a })); }); function j(e) { switch (e.reaction.eReactionType) { case 1: return o.createElement(z, Object.assign({}, e)); case 2: return o.createElement(K, Object.assign({}, e)); default: return console.error(`Unknown message reaction type: ${e.reaction.eReactionType}`), null; } } function z(e) { const { reaction: t, large: n } = e; return o.createElement("img", { className: (0, k.Z)(V.EmoticonReaction, n && V.Large), src: x.u.GetEmoticonURL(t.strReaction, e.large) }); } function K(e) { const { reaction: { strReaction: t }, large: n, } = e, i = (0, H.a)(E.De.COMMUNITY_CDN_URL, t); return o.createElement("img", { className: (0, k.Z)(V.StickerReaction, n && V.Large), src: i }); } const q = (0, s.Pi)((e) => { const { target: t, reaction: n, chat: i, msg: r } = e, { strReaction: a, cReactors: s } = n, l = i.GetMessageReactionReactors(r, n, 3); let c = (function (e, t, n) { const i = d.Ul.FriendStore.self; if (0 === t.length) return 1 === n ? (0, g.kQ)("#MessageReaction_DescriptionCountOnly", e) : (0, g.kQ)("#MessageReaction_DescriptionCountOnly_Plural", n, e); const r = t.filter((e) => e !== i.accountid), a = r.length != t.length; return t.length < n ? t.length >= 2 ? (0, g.kQ)( "#MessageReaction_DescriptionMany" + (a ? "You" : ""), r.slice(0, a ? 1 : 2).map((e) => o.createElement(Y, { key: e.toString(), accountid: e })), n - 2, e, ) : a ? (0, g.kQ)("#MessageReaction_DescriptionYouAndCount" + (n - 1 == 1 ? "" : "_Plural"), n - 1, e) : 1 === n ? (0, g.kQ)("#MessageReaction_DescriptionCountOnly", e) : (0, g.kQ)("#MessageReaction_DescriptionCountOnly_Plural", n, e) : (0, g.kQ)(`#MessageReaction_Description${n}${a ? "You" : ""}`, ...r.map((e) => o.createElement(Y, { key: e.toString(), accountid: e })), e); })(o.createElement("span", { className: V.ReactionName }, a), l, s); return (0, O.createPortal)(o.createElement(B.T, { direction: "top", target: t, className: V.ReactionHover }, o.createElement(j, { reaction: n, large: !0 }), o.createElement("div", { className: V.HoverDescription }, c)), t.ownerDocument.body); }); function Z(e, t) { const [n, i] = (0, o.useState)(null); return { bOpen: !!n, showPicker: (r) => { if (n) return; const a = { bOverlapHorizontal: !0, strClassName: V.ManageAppFiltersPopupContextMenu }, s = (0, N.yV)(o.createElement(Q, { chat: e, msg: t, onRequestClose: () => s && s.Hide() }), r, a); s.SetOnHideCallback(() => i(null)), i(s); }, }; } function Q(e) { const { msg: t, chat: n, onRequestClose: i } = e, r = (e, o) => { const r = 1 == e ? `:${o}:` : o, a = t.reactions.find((e) => e.strReaction === r), s = !a || !a.bUserReacted; n.UpdateMessageReaction(t, e, r, s), i(); }; return o.createElement(P.jk, { emoticonHoverStore: U.$, emoticonStore: d.Ul.ChatStore.EmoticonStore, onEmoticonSelected: (e) => r(1, e), onStickerSelected: (e) => r(2, e), strFlairGroupID: "" }); } function $(e) { const { className: t } = e, n = (0, i._T)(e, ["className"]); return o.createElement("svg", Object.assign({ width: 30, height: 25, viewBox: "-2 0 30 25", fill: "none", className: (0, k.Z)(t, V.AddReactionIcon) }, n), o.createElement("path", { d: "M24.354 12.427A11.927 11.927 0 1115.571.922M18.431 14.148a6.246 6.246 0 01-11.917.292" }), o.createElement("ellipse", { cx: 8.877, cy: 9.019, rx: 1.065, ry: 1.775, fill: "#8492A4" }), o.createElement("ellipse", { cx: 15.978, cy: 9.018, rx: 1.065, ry: 1.775, fill: "#8492A4" }), o.createElement("path", { fill: "#8492A4", d: "M27.024 3.76v1h-8.522v-1z" }), o.createElement("path", { fill: "#8492A4", d: "M23.264 8.521h-1V-.001h1z" })); } function Y(e) { const t = (0, F.SZ)(() => d.Ul.FriendStore.GetPlayer(e.accountid).display_name); return o.createElement("span", { className: V.ReactorName }, t); } var J = n(71357), ee = n(61963), te = n(33082), ne = n(37234), ie = n(33690); function oe(e) { const { reason: t } = e; let n; return (n = 2 == t ? (0, g.Xx)("#Friend_Chat_CommunityBanned") : (0, g.Xx)("#Friend_Chat_Blocked")), o.createElement("div", { className: "msg" }, o.createElement("div", { className: "msgText MessageFromBlockedUser" }, n)); } let re = (0, s.Pi)((e) => o.createElement(R.yd, { friend: e.player, context: e.context }, o.createElement("span", null, e.player.display_name))), ae = class extends o.Component { render() { let e = this.props.messages, t = this.props.friendRenderContext; if (0 == e.length) return null; let n = [], i = [], r = !0; for (let a of e) { if (-1 != i.indexOf(a.unServerMsgParamAccountID)) continue; n.length > 0 && n.push(", "); let e = d.Ul.FriendStore.GetPlayer(a.unServerMsgParamAccountID); n.push(o.createElement(re, { context: t, player: e })), i.push(a.unServerMsgParamAccountID), e.is_ready || (e.LoadIfNecessary(), (r = !1)); } let a = d.Ul.FriendStore.GetPlayer(e[0].unAccountID); a.is_ready || (a.LoadIfNecessary(), (r = !1)); let s = o.createElement(re, { context: t, player: a }), l = ""; if (n.length > 1) { let e = o.createElement(o.Fragment, null, ...n); l = (0, g.kQ)("#ChatRoom_ServerMessage_Invited_Multiple", e, s); } else l = (0, g.kQ)("#ChatRoom_ServerMessage_Invited", n[0], s); return o.createElement(A.v$, { style: "server" }, o.createElement("div", { className: "msg serverMsg" }, o.createElement("div", { className: "msgText" }, r ? l : " "))); } }; ae = (0, i.gn)([s.Pi], ae); let se = class extends o.Component { render() { let e = this.props.messages, t = this.props.friendRenderContext; if (0 == e.length) return null; let n = [], i = [], r = !0; for (let a of e) { if (-1 != i.indexOf(a.unServerMsgParamAccountID)) continue; n.length > 0 && n.push((0, g.Xx)("#ChatRoom_ServerMessageMultiple_Separator")); let e = d.Ul.FriendStore.GetPlayer(a.unServerMsgParamAccountID); n.push(o.createElement(re, { context: t, player: e })), i.push(a.unServerMsgParamAccountID), e.is_ready || (e.LoadIfNecessary(), (r = !1)); } let a = ""; if (n.length > 1) { let e = n.pop(); 2 == n.length && n.pop(); let t = o.createElement(o.Fragment, null, ...n); a = (0, g.kQ)(this.props.tokenPrefix + "_Multiple", t, e); } else a = (0, g.kQ)(this.props.tokenPrefix, n[0]); return o.createElement(le, null, r ? a : " "); } }; se = (0, i.gn)([s.Pi], se); const le = ({ children: e }) => o.createElement(A.v$, { style: "server" }, o.createElement("div", { className: "msg serverMsg" }, o.createElement("div", { className: "msgText" }, e))); function ce(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { if (0 == n.length) return; const i = n.length > 1; let o = n[0].unAccountID, r = d.Ul.FriendStore.GetPlayer(o).primary_display_name, a = (0, g.Xx)(i ? "#Chat_Actions_DeleteChatMessages" : "#Chat_Actions_DeleteChatMessage"), s = (0, g.Xx)(i ? "#Chat_Actions_DeleteChatMessages_Confirm" : "#Chat_Actions_DeleteChatMessage_Confirm", r), l = (0, g.Xx)("#Chat_Actions_Delete"); if (!(yield (0, J.V3)(e, a, s, l))) return; let c = yield t.DeleteChatMessages(n); if (1 == c) return; let m = 15 == c ? "#Chat_Actions_DeleteChatMessage_FailAccess" : "#Chat_Actions_DeleteChatMessage_Fail"; (s = (0, g.Xx)(m, r)), (0, J.zp)(e, a, s); }); } const me = (0, s.Pi)((e) => { const { msg: t, speakerWidth: n, chatView: i, onUpdate: r, children: a, extraClassName: s } = e, l = (0, E.id)(), c = (0, o.useRef)(0), m = c.current, [h, u] = o.useState(!1), _ = (0, o.useRef)(), C = o.useRef(), { showPicker: w } = Z(i.chat, t), R = (n, i) => { let r, a = e.msg.unAccountID; e.chatView.chat instanceof f.K && (r = e.chatView.chat); const s = [], l = (0, S.RA)(n), c = l.getSelection(), m = c && c.rangeCount > 0 && c.toString().length > 0; let d; (d = document.queryCommandEnabled("copy") || m ? () => { l.document.execCommand("copy"); } : () => (0, A.Em)(_.current)), s.push(o.createElement(ee.Zo, { key: "copy", onSelected: d }, (0, g.Xx)("#ContextMenu_Copy"))), s.push(o.createElement(ee.Zo, { key: "select", onSelected: () => l.getSelection().selectAllChildren(_.current) }, (0, g.Xx)("#Chat_Actions_Select_Message"))), s.push(o.createElement(ee.D1, { key: "react", label: (0, g.Xx)("#Chat_Actions_React") }, o.createElement(Q, { chat: T, msg: t, onRequestClose: () => u && u.Hide() }))), r && r.BCanDeleteMemberMessages(a) && s.push(o.createElement(ee.Zo, { key: "delete", onSelected: () => ce(l, r, [e.msg]) }, (0, g.Xx)("#Chat_Actions_Delete"))); let h = o.createElement(ee.xV, null, " ", s, " "); const u = (0, N.yV)(h, n, i); return u; }; let M = (e) => R(e, { bOverlapHorizontal: !0, bOverlapVertical: !1 }); const T = i.chat; let G = t.strMessage; const O = e.hideTimeStamp || i.IsChatRoom(), F = !O && d.Ul.FriendStore.GetPlayer(t.unAccountID), B = (0, b.hs)(G); let x, P; if (t.eErrorSending != v.p.None) switch (t.eErrorSending) { case v.p.NotFriends: (P = "ChatMessageErrorSending"), (x = o.createElement("div", { className: "ChatMessageErrorSendingAlert" }, (0, g.Xx)("#Chat_ErrorSending_NotFriends"))); break; case v.p.RateLimitExceeded: (P = "ChatMessageErrorSending"), (x = o.createElement("div", { className: "ChatMessageErrorSendingAlert" }, (0, g.Xx)("#Chat_ErrorSending_RateLimitExceeded"))); break; case v.p.NoChatPermissionInGroup: (P = "ChatMessageErrorSendingPermissionDenied"), (x = o.createElement("div", { className: "ChatMessageErrorPermissionDeniedAlert" }, o.createElement(p.HEZ, null), (0, g.Xx)("#Chat_ErrorPermissionDenied"))); break; case v.p.Generic: default: (P = "ChatMessageErrorSending"), (x = o.createElement("div", { className: "ChatMessageErrorSendingAlert" }, (0, g.Xx)("#Chat_ErrorSending"))); } const U = (0, k.Z)("msg", L().MsgWithAddons, s, P, { isCurrentUser: T.self.accountid === t.unAccountID, HasTimeStamp: !O, EmojiOnly: b.CR(G) }, h && "RevealSpoiler"), V = { width: n ? `${n}px` : void 0 }, H = { chat: T, unAccountIDSender: t.unAccountID, rtTimestamp: t.rtTimestamp, key: t.UniqueKey(), onLoad: r, bUseLargeEmoticons: (0, b.hs)(G), bAnimate: t.eAnimationState === v.P9.Animating, onAnimationStart: () => c.current++, onAnimationEnd: () => { m && c.current--, c.current || e.msg.OnAnimationEnd(); }, }; G = T.ChatStore.TextFilterStore.FilterText(t.unAccountID, G); const X = G.includes("[spoiler]"), j = a || o.createElement(D.xU, { bbcode: G, context: H, parser: T.GetBBCodeParser() }), z = (0, k.Z)("msgText", { MsgNoUserContent: !t.HasUserContent(), EmoticonOnly: B }); let K, q = { onMenuButton: (e) => { M(e); }, onMenuActionDescription: (0, g.Xx)("#Chat_MessageContextMenu"), }; return ( l || (q = Object.assign(Object.assign({}, q), { onOKButton: (e) => w(e), onOKActionDescription: (0, g.Xx)("#Chat_Actions_React") })), e.chatView.chat instanceof f.K && (K = e.chatView.chat), K && K.BCanDeleteMemberMessages(e.msg.unAccountID) && ((q.onSecondaryButton = (t) => { ce((0, S.RA)(t), K, [e.msg]); }), (q.onSecondaryActionDescription = (0, g.Xx)("#Chat_Actions_Delete"))), o.createElement(I.s, Object.assign({ className: U, navRef: C, focusableIfNoChildren: !0, onContextMenu: R, onSecondaryButton: X ? () => u(!h) : void 0, onSecondaryActionDescription: X ? (0, g.Xx)(h ? "#Hide_Spoiler" : "#Reveal_Spoiler") : void 0 }, q), !O && o.createElement(pe, { className: "FriendChatTimeStamp", friend: F, style: V }, o.createElement(y.tS, { rtime: t.rtTimestamp, bTimeOnly: !0 })), x, o.createElement(A.v$, null, o.createElement("div", { className: z, ref: _ }, j)), o.createElement(W, { msg: t, chat: T }), o.createElement(de, { msg: t, chat: T, onShowContextMenu: M })) ); }), de = (0, s.Pi)((e) => { const { msg: t, chat: n } = e, { bOpen: i, showPicker: r } = Z(n, t), { bOpen: a, showContextMenu: s } = (function (e) { const [t, n] = (0, o.useState)(null), i = (i) => { if (t) return; let o = e(i); o.SetOnHideCallback(() => n(null)), n(o); }; return { bOpen: !!t, showContextMenu: i }; })(e.onShowContextMenu); let l, c = i || a; n instanceof f.K && (l = n); let m = null; return ( l && l.BCanDeleteMemberMessages(t.unAccountID) && (m = (t) => { ce((0, S.RA)(t), l, [e.msg]); }), o.createElement("div", { className: (0, k.Z)(L().Addons, c && L().Open) }, o.createElement($, { className: L().Emoticon, onClick: r }), m && o.createElement(he, { className: L().Emoticon, onClick: m }), o.createElement(ue, { className: L().Emoticon, onShowContextMenu: s })) ); }); function he(e) { const { className: t, onClick: n } = e; (0, i._T)(e, ["className", "onClick"]); return o.createElement("div", { className: t, onClick: n }, o.createElement(p.ZNm, null)); } function ue(e) { const { className: t } = e; (0, i._T)(e, ["className"]); return o.createElement("div", { className: t, onClick: e.onShowContextMenu }, o.createElement(p.AlT, null)); } let pe = (0, s.Pi)((e) => { const t = e.friend.persona; let n = !1; t.m_broadcastAccountId && (n = !0); const i = (0, k.Z)(e.className, (t.is_ingame ? "ingame" : t.is_online && "online") || "offline", { away: t.is_awayOrSnooze, watchingbroadcast: n }); return o.createElement("div", { className: i, style: e.style }, e.children); }); const _e = (e) => { const t = (0, ie.Wy)(), n = (0, ne.rb)(t.ownerWindow), i = !(0, te.n)(n, te.D); return o.createElement(ge, Object.assign({ bInOverlay: i }, e)); }; let ge = class extends o.Component { GetChatRoomSpeakerClass(e) { let t = e.persona; return t.is_ingame ? L().SpeakerName_InGame : t.m_broadcastAccountId ? L().SpeakerName_WatchingBroadcast : t.is_online ? L().SpeakerName_Online : L().SpeakerName_Default; } render() { let e, t = this.props.friend, n = "", i = ""; if (this.props.chatView.IsChatRoom()) { let i, r = this.props.chatView.chat; switch ((r.GetMember(t.accountid) && (i = r.GetGroup().GetMemberRank(t.accountid)), i)) { default: break; case 30: n = "Moderator"; break; case 40: n = "Officer"; break; case 50: (n = "Owner"), r.GetGroup().BIsClanChatRoom() || (e = o.createElement("div", { className: "rankIcon rankOwner" }, o.createElement(p._OD, null))); } r.GetGroup().BIsClanChatRoom() && (i >= 40 ? (e = o.createElement("div", { className: "rankIcon rankOwner" }, o.createElement("img", { src: E.De.COMMUNITY_CDN_URL + "public/images/skin_1/comment_modindicator_officer.png" }))) : i >= 30 && (e = o.createElement("div", { className: "rankIcon rankOwner" }, o.createElement("img", { src: E.De.COMMUNITY_CDN_URL + "public/images/skin_1/comment_modindicator_moderator.png" })))); } else n = ""; i = "speakerName " + this.GetChatRoomSpeakerClass(t); let r = "avatar speakerAvatar", a = null, s = null; if (t.BLoadedEquippedItems()) { let e = t.GetEquippedProfileItems(); e && ((a = e.animated_avatar), (s = e.avatar_frame), s && s.image_small && s.image_small.length > 0 && (r += " hasAvatarFrame")); } let l = d.Ul.SettingsStore.FriendsSettings.bAnimatedAvatars && t.persona.is_online && !this.props.bInOverlay, c = d.Ul.GetServerRTime32() - this.props.msg.rtTimestamp < 60; return o.createElement( A.v$, { style: "speaker allow-embedded-newlines", text: [`[${(0, M.y)(this.props.msg.rtTimestamp, { bIncludeWeekday: !1 })}]`, `${t.primary_display_name}:`] }, o.createElement( "div", { className: "ChatSpeaker ChatRoomSpeaker SpeakerLineBreak" + (t.accountid == this.props.chatView.chat.self.accountid ? " isCurrentUser" : "") }, o.createElement(pe, { friend: t, className: "speaker" }, o.createElement(R.yd, { friend: t, context: this.props.friendRenderContext }, o.createElement("div", { className: "speakerHoverArea " + n }, e, o.createElement(G._1, { loopDuration: l && c ? "Medium" : "None", className: r, persona: t.persona, animatedAvatar: a, avatarFrame: s, size: "Small", bLimitProfileFrameAnimationTime: !l || !c }), o.createElement("div", { className: "speakerStatus" }), o.createElement("div", { className: i }, t.primary_display_name, !t.is_display_name_nickname && t.has_secondary_display_name && o.createElement("span", { className: "playerNickname" }, " (", t.secondary_display_name, ")"), t.is_display_name_nickname && o.createElement("span", { className: "playerNicknameBracket", title: (0, g.Xx)("#isNickname") }, "*")))), o.createElement("div", { className: "speakerTimeStamp" }, o.createElement(y.tS, { rtime: this.props.msg.rtTimestamp, bTimeOnly: !1 }))), ), ); } }; ge = (0, i.gn)([s.Pi], ge); let Ce = class extends o.Component { OnUpdate() { this.props.onUpdate("ChatMessageSlashEmote " + this.props.msg.UniqueKey()); } render() { let e = this.props.msg, t = this.props.chatView.chat, n = d.Ul.FriendStore.GetPlayer(e.unAccountID); const i = e.strMessage.slice(e.strMessage.search(/\s/g) + 1), r = (0, k.Z)("speaker", n.persona.is_ingame ? "ingame" : n.persona.is_online ? "online" : "offline"), a = { width: this.props.speakerWidth ? `${this.props.speakerWidth}px` : void 0 }, s = (0, k.Z)("msg", "ChatMsgSlashEmote", "ChatRoomSlashEmote", { isCurrentUser: t.self.accountid === e.unAccountID, ChatMessageErrorSending: e.eErrorSending != v.p.None }); return o.createElement( "div", { className: s }, e.eErrorSending != v.p.None && o.createElement("div", { className: "ChatMessageErrorSendingAlert" }, (0, g.Xx)("#Chat_ErrorSending")), o.createElement( "div", { className: "SpeakerLineBreak" + (e.unAccountID == t.self.accountid ? " isCurrentUser" : "") }, o.createElement( "div", { className: r }, o.createElement(R.yd, { friend: n, context: { chat: t, chatContext: "message" } }, o.createElement(A.v$, { style: "speaker allow-embedded-newlines", text: [`[${(0, M.y)(this.props.msg.rtTimestamp, { bIncludeWeekday: !1 })}]`, `${n.display_name}:`] }, o.createElement("div", { className: "speakerHoverArea" }, o.createElement("img", { className: "avatar speakerAvatar", src: n.persona.avatar_url, onLoad: this.OnUpdate }), o.createElement("div", { className: "speakerStatus" }), o.createElement("div", { className: "speakerName", style: a }, n.display_name)))), o.createElement(A.v$, { style: "force-display append-innertext", text: "/me" }, o.createElement("div", { className: "msgText" }, o.createElement(D.xU, { bbcode: i, context: { chat: t, unAccountIDSender: e.unAccountID, rtTimestamp: e.rtTimestamp, onUpdate: this.props.onUpdate }, parser: t.GetBBCodeParser() }))), o.createElement("div", { className: "speakerTimeStamp" }, o.createElement(y.tS, { rtime: e.rtTimestamp, bTimeOnly: !1 })), ), ), ); } }; (0, i.gn)([r.ak], Ce.prototype, "OnUpdate", null), (Ce = (0, i.gn)([s.Pi], Ce)); let fe = class extends o.Component { render() { return o.createElement(me, Object.assign({}, this.props, { extraClassName: "ChatMessageDeleted" }), o.createElement("div", { className: "msgText" }, o.createElement("span", { className: "filteredURL bb_removedlink" }, (0, g.Xx)("#Chat_MessageDeleted")))); } }; fe = (0, i.gn)([s.Pi], fe); let ve = class extends o.Component { render() { let e = this.props.msg, t = this.props.friendRenderContext; if (11 == e.eServerMsgType) { const n = { unAccountIDSender: 0, chat: t.chat, rtTimestamp: e.rtTimestamp, key: e.UniqueKey(), onLoad: void 0 }; return o.createElement(le, null, o.createElement(D.xU, { bbcode: this.props.msg.strServerMsgAppCustomLocalized, context: n, parser: t.chat.GetBBCodeParser() })); } { const n = (function (e) { switch (e.eServerMsgType) { case 1: { let t = d.Ul.FriendStore.GetPlayer(e.unAccountID); return { strToken: "#ChatRoom_ServerMessage_RenameChatRoom", parts: [e.strServerMsgParam, t] }; } case 2: return { strToken: "#ChatRoom_ServerMessage_Joined", parts: [d.Ul.FriendStore.GetPlayer(e.unServerMsgParamAccountID)] }; case 3: return { strToken: "#ChatRoom_ServerMessage_Parted", parts: [d.Ul.FriendStore.GetPlayer(e.unServerMsgParamAccountID)] }; case 4: { let t = d.Ul.FriendStore.GetPlayer(e.unAccountID); return { strToken: "#ChatRoom_ServerMessage_Kicked", parts: [d.Ul.FriendStore.GetPlayer(e.unServerMsgParamAccountID), t] }; } case 9: { let t = d.Ul.FriendStore.GetPlayer(e.unAccountID); return e.strServerMsgParam.length ? { strToken: "#ChatRoom_ServerMessage_ChatRoomTaglineChanged", parts: [e.strServerMsgParam, t] } : { strToken: "#ChatRoom_ServerMessage_ChatRoomTaglineRemoved", parts: [t] }; } case 10: return { strToken: "#ChatRoom_ServerMessage_ChatRoomAvatarChanged", parts: [d.Ul.FriendStore.GetPlayer(e.unAccountID)] }; case 5: return { strToken: "#ChatRoom_ServerMessage_Invited", parts: [d.Ul.FriendStore.GetPlayer(e.unServerMsgParamAccountID), d.Ul.FriendStore.GetPlayer(e.unAccountID)] }; default: return { strToken: "#ChatRoom_ServerMessage_Unhandled", parts: [] }; } })(e), i = n.parts.length ? (function (e, t, ...n) { let i = []; for (let t of n) t instanceof w.Xp ? i.push(o.createElement(re, { context: e, player: t })) : i.push(t); return (0, g.kQ)(t, ...i); })(t, n.strToken, ...n.parts) : (0, g.Xx)(n.strToken); return o.createElement(le, null, i); } } }; ve = (0, i.gn)([s.Pi], ve); let Se = class extends o.Component { render() { let e = this.props.msg, t = this.props.friendRenderContext; const n = { unAccountIDSender: 0, chat: t.chat, rtTimestamp: e.rtTimestamp, key: e.UniqueKey(), onLoad: void 0 }; return o.createElement(le, null, o.createElement(D.xU, { bbcode: e.strMessage, context: n, parser: t.chat.GetBBCodeParser() })); } }; Se = (0, i.gn)([s.Pi], Se); let be = class extends o.Component { render() { return o.createElement(A.v$, { style: "invite", text: this.props.msg.strMessage }, o.createElement("div", { className: "msg" }, o.createElement("div", { className: "msg voiceChannelInvite" }, this.props.msg.strMessage), o.createElement("div", { className: "msg voiceChannelInviteClear" }))); } }; be = (0, i.gn)([s.Pi], be); var Ie = n(93635); let ye = class extends o.Component { componentDidUpdate() { this.props.onUpdate("ChatMessageBlocks " + this.props.chatView.GetUniqueID()); } renderBlock(e) { const t = this.props, { chatView: n } = this.props, i = n.chat.chat_message_blocks, r = !n.IsChatRoom() && i.time_passes_index, a = n.IsChatRoom() ? n.chat.first_unread_msg_time : _.r7, s = i.message_blocks[e], l = 0 == e ? _.r7 : i.message_blocks[e - 1].GetRTimeLastMessage(); if (a && l <= a && s.GetRTimeLastMessage() > a) { let n, i = s; a > s.GetRTimeFirstMessage() && (([n, i] = s.CreateVirtualSplitOnTimestamp(a)), (0, Ie.X)(n.messages.length, "No messages in prefix")); let l = a; return o.createElement(o.Fragment, { key: s.UniqueKey() }, n && o.createElement(Ee, Object.assign({}, t, { block: n, bIsInitialBlock: 0 === e, bShowTimePasses: e === r })), o.createElement(Ae, { rtTimestamp: l, bUnread: !0 }), i.messages.length > 0 && o.createElement(Ee, Object.assign({}, t, { block: i, bIsInitialBlock: !1, bShowTimePasses: !1 }))); } return o.createElement(Ee, Object.assign({}, t, { key: s.UniqueKey(), block: s, bIsInitialBlock: 0 === e, bShowTimePasses: e === r })); } render() { this.props; const { chatView: e } = this.props; return e.chat.chat_message_blocks.message_blocks.map((e, t) => this.renderBlock(t)); } }; ye = (0, i.gn)([s.Pi], ye); let Ee = class extends o.Component { componentDidUpdate() { this.props.block.is_last_block && this.props.onUpdate("ChatMessageBlock " + this.props.block.UniqueKey()); } render() { let e, t, n = this.props, { block: r, bIsInitialBlock: a, bShowTimePasses: s } = n, l = (0, i._T)(n, ["block", "bIsInitialBlock", "bShowTimePasses"]), c = l.friendRenderContext, m = r.messages; if ((r.BIsInvite() ? (e = o.createElement(ae, { messages: m, friendRenderContext: c })) : r.BIsServerMsg() ? (e = o.createElement(Me, { block: r, friendRenderContext: c })) : r.BIsLocalMsg() ? (e = o.createElement(ke, { block: r, friendRenderContext: c })) : m.length && (e = o.createElement(we, Object.assign({}, l, { messages: m, bLastMessageBlock: r.is_last_block }))), r.is_last_block)) { let e = d.Ul.GetLocalMidnightInRTime32(); r.GetRTimeMidnightBeforeBlock() != e && (t = o.createElement(Ae, { rtTimestamp: e })); } else r.GetRTimeMidnightBeforeBlock() != r.GetRTimeMidnightBeforeNextBlock() && (t = o.createElement(Ae, { rtTimestamp: r.GetRTimeMidnightBeforeNextBlock() })); return o.createElement(o.Fragment, null, a && m.length > 0 && o.createElement(De, { msg: m[0] }), s && o.createElement(Ae, { rtTimestamp: m[0].rtTimestamp, bTimePassesLine: !0 }), e, t); } }; function De(e) { return e.msg.rtTimestamp < d.Ul.GetLocalMidnightInRTime32() ? o.createElement(Ae, { rtTimestamp: e.msg.rtTimestamp }) : null; } Ee = (0, i.gn)([s.Pi], Ee); let we = class extends o.Component { constructor(e) { super(e), (this.m_element = o.createRef()), (this.state = { bHoveringDelete: !1 }); } OnHoverDelete(e) { this.setState({ bHoveringDelete: e }); } CopyMessage() { (0, A.Em)(this.m_element.current); } SelectMessage(e) { e.getSelection().selectAllChildren(this.m_element.current); } OnMessageBlockContextMenu(e) { let t, n = this.props.messages[0].unAccountID; this.props.chatView.chat instanceof f.K && (t = this.props.chatView.chat); const i = [], r = (0, S.RA)(e), a = r.getSelection(), s = a && a.rangeCount > 0 && a.toString().length > 0; let l; return ( (l = document.queryCommandEnabled("copy") || s ? () => { r.document.execCommand("copy"); } : this.CopyMessage), i.push(o.createElement(ee.Zo, { key: "copy", onSelected: l }, (0, g.Xx)("#ContextMenu_Copy"))), i.push( o.createElement( ee.Zo, { key: "select", onSelected: () => { this.SelectMessage(r); }, }, (0, g.Xx)("#Chat_Actions_Select_Message"), ), ), t && t.BCanDeleteMemberMessages(n) && i.push( o.createElement( ee.Zo, { key: "delete", onSelected: () => { ce(r, t, this.props.messages); }, }, (0, g.Xx)("#Chat_Actions_Delete"), ), ), i.length ? (0, N.yV)(o.createElement(ee.xV, null, i), e) : null ); } componentDidMount() { const { chatView: e } = this.props, t = this.props.messages[0].unAccountID; e instanceof C.R5 && e.virtualizer && e.virtualizer.SubscribeToPersona(t); } componentDidUpdate(e) { const { chatView: t } = this.props; e.messages[0].unAccountID !== this.props.messages[0].unAccountID && t instanceof C.R5 && t.virtualizer && (t.virtualizer.UnsubscribeFromPersona(e.messages[0].unAccountID), t.virtualizer.SubscribeToPersona(this.props.messages[0].unAccountID)); } componentWillUnmount() { const { chatView: e } = this.props; e instanceof C.R5 && e.virtualizer && e.virtualizer.UnsubscribeFromPersona(this.props.messages[0].unAccountID); } render() { let e = !0, t = !1, n = this.props.bLastMessageBlock, i = this.props.messages[0].unAccountID, r = d.Ul.FriendStore.GetPlayer(i), a = this.props.chatView.IsChatRoom() ? this.props.chatView.chat : null, s = "ChatMessageBlock", l = 0; a && r.is_blocked ? (l = 1) : a && r.persona.m_bCommunityBanned && (l = 2); let c = []; if (0 == l) { this.props.messages.length && "/me" === this.props.messages[0].GetSlashCommand() && (e = !1); let i = 0; for (let r = 0; r < this.props.messages.length; r++) { let s = this.props.messages[r], l = !0; if (!a) { let e = Math.floor(s.rtTimestamp / 60); i && e != i ? ((l = !1), (t = !0)) : n && t && r == this.props.messages.length - 1 && (l = !1), (i = e); } let m = { msg: s, key: s.UniqueKey(), chatView: this.props.chatView, hideTimeStamp: l, onUpdate: this.props.onUpdate }; s.eDeleteState != v.im.Deleting && s.eDeleteState != v.im.Deleted && ("/me" === s.GetSlashCommand() ? c.push(o.createElement(Ce, Object.assign({}, m))) : s instanceof v.Ok ? ((e = !1), c.push(o.createElement(be, Object.assign({}, m)))) : c.push(o.createElement(me, Object.assign({}, m, { speakerWidth: this.props.speakerWidth })))); } } else c.push(o.createElement(oe, { reason: l, key: "blocked" })), (s += " ChatMessageBlock_BlockedSender"); return n && ((s += " LastMessageBlock"), t && (s += " HasInternalTimeStamp")), 1 != c.length || a || (s += " SingletonMsg"), 0 == c.length ? null : o.createElement(A.v$, null, o.createElement("div", { ref: this.m_element, className: s, onContextMenu: this.OnMessageBlockContextMenu }, e && o.createElement(_e, { friend: r, chatView: this.props.chatView, msg: this.props.messages[0], friendRenderContext: this.props.friendRenderContext, key: "speaker", speakerWidth: this.props.speakerWidth, onUpdate: this.props.onUpdate }), false, c)); } }; (0, i.gn)([r.ak], we.prototype, "OnHoverDelete", null), (0, i.gn)([r.ak], we.prototype, "CopyMessage", null), (0, i.gn)([r.ak], we.prototype, "SelectMessage", null), (0, i.gn)([r.ak], we.prototype, "OnMessageBlockContextMenu", null), (we = (0, i.gn)([s.Pi], we)); class Re extends o.Component { OnMouseEnter() { this.props.onHover(!0); } OnMouseLeave() { this.props.onHover(!1); } OnDeleteMessages(e) { ce((0, S.RA)(e), this.props.chatRoom, this.props.messages); } render() { return o.createElement("div", { className: "ChatMessageBlockDelete", onMouseEnter: this.OnMouseEnter, onMouseLeave: this.OnMouseLeave, onClick: this.OnDeleteMessages, title: (0, g.Xx)("#Chat_Actions_Delete") }, o.createElement(p.rFk, null)); } } (0, i.gn)([r.ak], Re.prototype, "OnMouseEnter", null), (0, i.gn)([r.ak], Re.prototype, "OnMouseLeave", null), (0, i.gn)([r.ak], Re.prototype, "OnDeleteMessages", null); class Ae extends o.Component { shouldComponentUpdate(e) { return e.rtTimestamp !== this.props.rtTimestamp || e.bUnread !== this.props.bUnread || e.bTimePassesLine !== this.props.bTimePassesLine; } render() { let e, t = d.Ul.RTime32ToDate(this.props.rtTimestamp), n = ["msg", "timeDivision"]; if (this.props.bUnread) { let i = { weekday: "long", year: "numeric", month: "long", day: "numeric", hour: "numeric", minute: "numeric" }; (e = (0, g.Xx)("#ChatRoom_New_Messages", t.toLocaleDateString(g.Yt.GetPreferredLocales(), i))), n.push("new_messages"); } else if (this.props.bTimePassesLine) (e = ""), n.push("time_passes"); else { let n = { weekday: "long", year: "numeric", month: "long", day: "numeric" }; e = t.toLocaleDateString(g.Yt.GetPreferredLocales(), n); } return o.createElement(A.v$, { style: "timestamp", text: e }, o.createElement("div", { className: n.join(" ") }, o.createElement("div", { className: "preHorizDivider" }), e, o.createElement("div", { className: "horizDivider" }))); } } const Me = (e) => { const { block: t, friendRenderContext: n } = e, i = t.messages.reduce((e, t) => { if (!e.length) return e.push([t]), e; const n = e[e.length - 1], i = n[0], o = Te(i), r = Te(t); return o && r ? (n.push(t), e) : (e.push([t]), e); }, []); return o.createElement( o.Fragment, null, i.map((e) => (Te(e[0]) ? o.createElement(Le, { key: e[0].UniqueKey(), messages: e, friendRenderContext: n }) : e.map((e) => o.createElement(ve, { msg: e, key: e.UniqueKey(), friendRenderContext: n })))), ); }, ke = (e) => { const { block: t, friendRenderContext: n } = e; return o.createElement( o.Fragment, null, t.messages.map((e) => o.createElement(Se, { msg: e, key: e.UniqueKey(), friendRenderContext: n })), ); }, Te = (e) => 2 === e.eServerMsgType || 3 === e.eServerMsgType, Le = (e) => { const { messages: t, friendRenderContext: n } = e, { rgLeavers: i, rgJoiners: r } = t.reduce((e, t) => (2 === t.eServerMsgType && e.rgJoiners.push(t.unAccountID), 3 === t.eServerMsgType && e.rgLeavers.push(t.unAccountID), e), { rgLeavers: [], rgJoiners: [] }); if (!i.length && !r.length) return null; let a; return ( (a = 0 === i.length ? r.length > 2 ? (0, g.kQ)("#ChatRoom_ServerMessage_Joined_Number", o.createElement(Oe, { accountids: r })) : 2 === r.length ? (0, g.kQ)("#ChatRoom_ServerMessage_Joined_Multiple", o.createElement(Ge, { context: n, accountid: r[0] }), o.createElement(Ge, { context: n, accountid: r[1] })) : (0, g.kQ)("#ChatRoom_ServerMessage_Joined", o.createElement(Ge, { context: n, accountid: r[0] })) : 0 === r.length ? i.length > 2 ? (0, g.kQ)("#ChatRoom_ServerMessage_Parted_Number", o.createElement(Oe, { accountids: i })) : 2 === i.length ? (0, g.kQ)("#ChatRoom_ServerMessage_Parted_Multiple", o.createElement(Ge, { context: n, accountid: i[0] }), o.createElement(Ge, { context: n, accountid: i[1] })) : (0, g.kQ)("#ChatRoom_ServerMessage_Parted", o.createElement(Ge, { context: n, accountid: i[0] })) : 1 === i.length && 1 === r.length ? (0, g.kQ)("#ChatRoom_ServerMessage_SingleJoined_SingleParted", o.createElement(Ge, { context: n, accountid: r[0] }), o.createElement(Ge, { context: n, accountid: i[0] })) : 1 === i.length ? (0, g.kQ)("#ChatRoom_ServerMessage_MultipleJoined_SingleParted", o.createElement(Oe, { accountids: r }), o.createElement(Ge, { context: n, accountid: i[0] })) : 1 === r.length ? (0, g.kQ)("#ChatRoom_ServerMessage_SingleJoined_MultipleParted", o.createElement(Ge, { context: n, accountid: r[0] }), o.createElement(Oe, { accountids: i })) : (0, g.kQ)("#ChatRoom_ServerMessage_MultipleJoined_MultipleParted", o.createElement(Oe, { accountids: r }), o.createElement(Oe, { accountids: i }))), o.createElement(le, null, a) ); }, Ge = (0, s.Pi)((e) => { const { context: t, accountid: n } = e, i = d.Ul.FriendStore.GetPlayer(n); return o.createElement(R.yd, { friend: i, context: t }, o.createElement("span", null, i.display_name)); }), Oe = (0, s.Pi)((e) => { const { accountids: t } = e, n = t.map((e) => d.Ul.FriendStore.GetPlayer(e)); return o.createElement("span", { title: n.map((e) => e.display_name).join(", ") }, n.length); }); var Fe = n(31695), Be = n(62860), xe = n(56666), Ne = n(56973); let Pe = class extends o.Component { constructor(e) { super(e), (this.state = { chatSubscribed: null }), (this.LOG = new l.sO("ChatHistory", () => this.props.chatView.GetUniqueID()).Debug), (this.m_bLoadHistoryInProgress = !1), (this.m_bLoadingOperationInProgress = !1), (this.m_bHasPendedLoadOlder = !1), (this.m_nIgnoreScrollUpUntilTime = 0), (0, a.rC)(this); } GetScrollTop() { return this.LOG("scrollTop is", this.m_elHistoryScroll.scrollTop, "returning", Math.ceil(this.m_elHistoryScroll.scrollTop)), Math.ceil(this.m_elHistoryScroll.scrollTop); } GetScrollInfo() { if (this.m_elHistoryScroll) { const { scrollHeight: e, clientHeight: t } = this.m_elHistoryScroll; return { scrollTop: this.GetScrollTop(), scrollHeight: e, clientHeight: t }; } return { scrollTop: 0, scrollHeight: 0, clientHeight: 0 }; } LogScrollInfo(e) { if (!l.cH.Get().IsDebugLogEnabled("ChatHistory")) return; const { scrollTop: t, scrollHeight: n, clientHeight: i } = this.GetScrollInfo(); let { lastScrollTop: o, lastScrollHeight: r, lastClientHeight: a } = this.props.chatView; this.LOG(`${e}: scrolltop ${t} scrollHeight ${n} clientHeight ${i}, was scrollTop ${o} scrollHeight ${r} clientHeight ${a} `); } DumpChildSizes() { if (!l.cH.Get().IsDebugLogEnabled("ChatHistory")) return; let e = this.m_elHistoryScroll.children[0], t = e.children.length; if (t < 0) { let n = 0; this.LOG("History has", t, "children"); for (let i = 0; i < t; i++) { let t = e.children[i]; (n += t.clientHeight), this.LOG("Child", i, "height", t.clientHeight, t); } this.LOG("Total height:", n); } } OnHistoryScrollRef(e) { this.m_elHistoryScroll && this.m_window && this.m_window.removeEventListener("resize", this.OnResize), (this.m_elHistoryScroll = e), e && ((this.m_window = e.ownerDocument.defaultView), this.m_window.addEventListener("resize", this.OnResize)); } OnScrollEvent(e) { this.LogScrollInfo("*** OnScrollEvent"), this.OnScroll(); } OnScroll() { const e = this.props.chatView, { scrollTop: t, scrollHeight: n, clientHeight: i } = this.GetScrollInfo(); let { lastScrollTop: o, lastScrollHeight: r, lastClientHeight: a } = e; if ((this.LogScrollInfo("OnScroll"), 0 == i)) return void this.LOG("Onscroll zero clientHeight, ignoring"); let s = n - t <= i, l = r - o <= a; (0, Ie.X)(l == e.is_scrolled_to_bottom, `${e.GetUniqueID()}: computed and stored at bottom don't match`), this.LOG("bAtBottom", s, "bWasAtBottom", l); let c = t; l && o - c == 1 && (this.LOG("*** Scroll position off by one while pinned, ignoring and setting scrollTop to", o), (c = o)), s || (l && n != r) || (c < o && l && Date.now() < this.m_nIgnoreScrollUpUntilTime) ? (this.LogScrollInfo("At bottom"), c < o && l && Date.now() < this.m_nIgnoreScrollUpUntilTime && this.LOG("**** IGNORING APPARENT SCROLL UP WHILE PINNED TO BOTTOM IN LAYOUT"), (c = n - i), (0, Ie.X)(c >= 0, `${e.GetUniqueID()}: Onscroll client height bigger than scroll height`), (e.is_scrolled_to_bottom = !0), c != t && (this.LOG("Setting scrollTop to", c), (this.m_elHistoryScroll.scrollTop = c))) : i < a && l ? (this.LogScrollInfo("Shrinking window while pinned to bottom"), (c = n - i), (e.is_scrolled_to_bottom = !0), c != t && (this.LOG("Setting scrollTop to", c), (this.m_elHistoryScroll.scrollTop = c))) : c < o ? (this.LogScrollInfo("Detected scroll up"), (e.is_scrolled_to_bottom = s)) : c != o && (this.LogScrollInfo("Detected scroll down but not to bottom"), (e.is_scrolled_to_bottom = !1)), (e.lastScrollTop = c), (e.lastScrollHeight = n), (e.lastClientHeight = i); let m = !(e.is_scrolled_to_bottom == e.lastScrollHeight - e.lastScrollTop <= e.lastClientHeight); m && ((0, Ie.X)(!m, `${e.GetUniqueID()}: setting mismatched computed and stored`), this.LOG(e.lastScrollTop, e.lastScrollHeight, e.lastClientHeight, e.is_scrolled_to_bottom)), c < 10 && this.LoadOlderMessages(); } OnRequestScrollToBottom() { this.ScrollToBottom(); } ScrollToBottom() { const { scrollHeight: e, clientHeight: t } = this.GetScrollInfo(); this.LogScrollInfo("ScrollToBottom"); const n = e - t; (0, Ie.X)(n >= 0, `${this.props.chatView.GetUniqueID()}: ScrollToBottom client height bigger than scroll height`), this.m_animation && this.m_animation.Cancel(), (this.m_animation = new c.jg(this.m_elHistoryScroll, { scrollTop: n }, { msDuration: 300, timing: "sine", onComplete: () => {} })), this.m_animation.Start(); } LoadOlderMessages() { const { chatView: e } = this.props, t = e.chat; if (!t.IsMoreHistoryAvailable()) return; if (this.m_bLoadingOperationInProgress) return this.LOG("noting pended load"), void (this.m_bHasPendedLoadOlder = !0); let n = () => t.LoadMoreHistory().then((t) => { const { scrollHeight: i } = this.GetScrollInfo(), { lastScrollTop: o, lastScrollHeight: r } = e, a = o + i - r; return this.LogScrollInfo("LoadOlderMessags"), (this.m_elHistoryScroll.scrollTop = a), this.m_bHasPendedLoadOlder ? (this.LOG("LoadOlderMessages starting pended"), (this.m_bHasPendedLoadOlder = !1), n()) : ((this.m_bLoadingOperationInProgress = !1), t); }); this.LOG("LoadOlderMessages starting"), (this.m_bLoadHistoryInProgress = !0), (this.m_bLoadingOperationInProgress = !0), this.DoAndDelay(this.m_window, n, 500).then((e) => { this.LOG("loading over"), (this.m_bLoadHistoryInProgress = !1); }); } DoAndDelay(e, t, n) { const i = performance.now(); return t().then((t) => { const o = performance.now() - i; return o < n ? new Promise((i) => e.setTimeout(i.bind(null, t), n - o)) : t; }); } Focus() { this.m_elHistoryScroll && this.m_elHistoryScroll.focus(); } componentDidMount() { if ((this.LOG("ComponentDidMount"), this.UpdateChatViewCallback(), this.m_elHistoryScroll && this.props.chatView.is_scrolled_to_bottom)) { let { chatView: e } = this.props, { scrollHeight: t, clientHeight: n } = this.GetScrollInfo(); (e.lastScrollTop = t - n), (e.lastScrollHeight = t), (e.lastClientHeight = n), (this.m_elHistoryScroll.scrollTop = e.lastScrollTop), (0, Ie.X)(e.is_scrolled_to_bottom == e.lastScrollHeight - e.lastScrollTop <= e.lastClientHeight, `${e.GetUniqueID()}: setting mismatched computed and stored`); } } componentDidUpdate() { const { chatView: e } = this.props; this.UpdateChatViewCallback(); const { scrollTop: t, scrollHeight: n, clientHeight: i } = this.GetScrollInfo(), { lastScrollTop: o, lastScrollHeight: r } = e; if (0 == i) return void this.LOG("componentDidUpdate clientHeight == 0, ignoring"); let a = t; n == r ? (a = o) : n - t <= i && (a = n - i), this.LogScrollInfo("componentDidUpdate"), this.DelayedScrollTo(a); } UpdateChatViewCallback() { let e = this.state.chatSubscribed; this.props.chatView != e && (this.props.chatView.RemoveOnChatFrameChangedCallback(this.OnFrameChanged), this.props.chatView.RemoveOnChatRequestScrollBottomCallback(this.OnRequestScrollToBottom), (e = null)), !e && this.props.isActive && (this.props.chatView.AddOnChatFrameChangedCallback(this.OnFrameChanged), this.props.chatView.AddOnChatRequestScrollBottomCallback(this.OnRequestScrollToBottom), (e = this.props.chatView)), this.state.chatSubscribed != e && this.setState({ chatSubscribed: e }); } componentWillUnmount() { this.m_window && (this.m_window.removeEventListener("resize", this.OnResize), (this.m_window = void 0)), this.props.chatView.RemoveOnChatFrameChangedCallback(this.OnFrameChanged); } GetFriendRenderContext() { return (this.m_FriendRenderContext && this.m_FriendRenderContext.chat == this.props.chatView.chat) || (this.m_FriendRenderContext = { chatContext: "message", chat: this.props.chatView.chat }), this.m_FriendRenderContext; } OnFrameChanged() { const e = this.props.chatView, { scrollHeight: t, clientHeight: n } = this.GetScrollInfo(), { lastScrollTop: i, lastScrollHeight: o, lastClientHeight: r } = e; let a; this.LogScrollInfo("OnFrameChanged"), (this.m_nIgnoreScrollUpUntilTime = Date.now() + 300), e.is_scrolled_to_bottom ? (this.LOG("OnFrameChanged scrolling to bottom"), (a = t - n)) : (this.LOG("OnFrameChanged preserving bottom"), (a = i + r + t - o - n)), this.LOG("OnFrameChanged setting scrollTop to", a), this.DelayedScrollTo(a); } DelayedScrollTo(e) { this.LOG("DelayedScrollTo", e), (this.m_elHistoryScroll.scrollTop = e), this.m_window.setTimeout(() => { this.LOG("DelayedOnScroll firing", e), this.OnScroll(); }, 150); } OnUpdate(e) { const t = this.props.chatView, { scrollHeight: n, clientHeight: i } = this.GetScrollInfo(); if ((this.LogScrollInfo("OnUpdate for " + e), this.LOG("Scrolled to bottom is", t.is_scrolled_to_bottom), 0 == n)) this.LOG("OnUpdate zero scroll height"); else if (t.is_scrolled_to_bottom) { this.LogScrollInfo("OnUpdate currently scrolled to bottom"); const e = n - i; this.DelayedScrollTo(e); } else if (t.chat.BIsPrepend) { t.chat.ResetPrepended(); const { lastScrollTop: e, lastScrollHeight: o, lastClientHeight: r } = t; this.LogScrollInfo("OnUpdate prepended messages"); const a = e + r + n - o - i; this.DelayedScrollTo(a); } else this.LogScrollInfo("OnUpdate content updated, doing nothing"); } OnResize() { const { scrollTop: e, scrollHeight: t, clientHeight: n } = this.GetScrollInfo(); this.LogScrollInfo("OnResize"); let i = e; t - e <= n && (i = t - n), this.DelayedScrollTo(i); } Swallow(e) { e.stopPropagation(), e.preventDefault(); } render() { var e, t, n, i; let { chatView: r, speakerLabelWidth: a, blockInteraction: s } = this.props; if (!r || r != this.state.chatSubscribed) return null; let l = r.chat, c = this.GetFriendRenderContext(), m = a && Math.max(Math.min(a, 120), 50); this.LOG("Render"), l.LoadChatLogs(); let p = d.Ul.SettingsStore.FriendsSettings.nChatFontSize, _ = "ChatHistoryContainer"; return ( p == h.Ao.k_EChatFontSizeSmall ? (_ += " smallChatFont") : p == h.Ao.k_EChatFontSizeLarge && (_ += " largeChatFont"), o.createElement( xe.eh, { className: _, navEntryPreferPosition: Be.c4.LAST, preferredFocus: !0, onGamepadDirection: (0, Ne.oQ)({ bPreventMovementUp: !0 }), onOKActionDescription: (0, g.Xx)("#Chat_SelectChatWindow") }, s && o.createElement("div", { className: "interactionBlocker", onClick: this.Swallow }), !(null === (e = this.context) || void 0 === e ? void 0 : e.IN_GAMEPADUI) && o.createElement(Fe.R, null), (null === (t = this.context) || void 0 === t ? void 0 : t.IN_GAMEPADUI) && o.createElement("div", { className: "ChatHistorySelector" }), o.createElement(Ue, { chatHistory: this, chatView: r }), o.createElement("div", { className: "chatHistoryScroll", ref: this.OnHistoryScrollRef, onScroll: this.OnScrollEvent, tabIndex: 0 }, o.createElement("div", { className: "chatHistory" }, o.createElement(ye, { chatView: r, friendRenderContext: c, onUpdate: this.OnUpdate, speakerWidth: m }), o.createElement("div", { className: "disconnectBlocker" }))), o.createElement(u.NL, { chatView: r }), !(null === (n = this.context) || void 0 === n ? void 0 : n.IN_GAMEPADUI) && o.createElement(Ve, { chatView: r, action: this.ScrollToBottom }), !(null === (i = this.context) || void 0 === i ? void 0 : i.IN_GAMEPADUI) && o.createElement(Fe.Q, null), ) ); } }; (Pe.contextType = m.E_), (0, i.gn)([a.LO], Pe.prototype, "m_bLoadHistoryInProgress", void 0), (0, i.gn)([r.ak], Pe.prototype, "DumpChildSizes", null), (0, i.gn)([r.ak], Pe.prototype, "OnHistoryScrollRef", null), (0, i.gn)([r.ak], Pe.prototype, "OnScrollEvent", null), (0, i.gn)([r.ak], Pe.prototype, "OnScroll", null), (0, i.gn)([r.ak], Pe.prototype, "OnRequestScrollToBottom", null), (0, i.gn)([r.ak], Pe.prototype, "ScrollToBottom", null), (0, i.gn)([r.ak], Pe.prototype, "LoadOlderMessages", null), (0, i.gn)([r.ak], Pe.prototype, "OnFrameChanged", null), (0, i.gn)([r.ak], Pe.prototype, "OnUpdate", null), (0, i.gn)([r.ak], Pe.prototype, "OnResize", null), (0, i.gn)([r.ak], Pe.prototype, "Swallow", null), (Pe = (0, i.gn)([s.Pi], Pe)); let Ue = class extends o.Component { render() { let e = "LoadingOlderMessages"; return this.props.chatHistory.m_bLoadHistoryInProgress || (e += " Hidden"), o.createElement("div", { className: e }, o.createElement("span", null, (0, g.Xx)("#Chat_Loading"))); } }; Ue = (0, i.gn)([s.Pi], Ue); let Ve = class extends o.Component { render() { let { chatView: e, action: t } = this.props, n = "ScrollToBottomButton"; e.is_scrolled_to_bottom && (n += " Hidden"); let i = (0, g.Xx)("#Chat_ScrollToBottom"); return e.chat.unread_message_count > 0 && ((i = (0, g.kb)("#Chat_UnreadMessages", e.chat.unread_message_count)), (n += " UnreadMessages")), o.createElement("div", { className: n, onClick: t }, o.createElement("span", null, i)); } }; Ve = (0, i.gn)([s.Pi], Ve); }, 63036: (e, t, n) => { "use strict"; n.d(t, { a1: () => ct, wV: () => rt, r0: () => je, Sd: () => Ve, IU: () => We, nY: () => Xe, E6: () => He, cc: () => Ke, bI: () => Ue, Li: () => Pe, GR: () => ze, g5: () => Qe, _l: () => qe, dS: () => Ze, wE: () => it, Cs: () => nt, o2: () => ot }); var i = n(85556), o = n(19953), r = n(72746), a = n(37234), s = n(96119), l = n(23133), c = n(60176), m = n(69807), d = n(27378), h = n(50649), u = n(88669), p = n(14206), _ = n.n(p), g = n(79588), C = n(22103), f = n(88991), v = n(93635), S = n(52705), b = n(10553); class I { constructor() { (this.m_mapProfiles = new Map()), (this.m_mapProfilesLoading = new Map()), (0, g.rC)(this); } LoadProfiles(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { (0, v.X)(e.length <= 500, "Check LoadProfiles, requesting too many steam IDs"); let n = e.filter((e) => !this.m_mapProfiles.has(e) && !this.m_mapProfilesLoading.has(e)); if (0 == n.length) return this.m_mapProfilesLoading.get(e[0]); let i = b.De.COMMUNITY_BASE_URL + "actions/ajaxresolveusers", o = _().get(i, { params: { steamids: n.join(",") }, withCredentials: !0, cancelToken: null == t ? void 0 : t.token }); n.forEach((e) => this.m_mapProfilesLoading.set(e, o)); let r = yield o; r.data && 200 == r.status && r.data.forEach((e) => { (e.avatar_hash = e.avatar_url), (e.avatar_url_medium = (0, C.U)(e.avatar_url, "medium")), (e.avatar_url_full = (0, C.U)(e.avatar_url, "full")), (e.avatar_url = (0, C.U)(e.avatar_url)), this.m_mapProfiles.set(e.steamid, e), this.m_mapProfilesLoading.delete(e.steamid); }); }); } GetProfile(e) { return this.m_mapProfiles.get(e); } GetProfileByAccountID(e) { return this.m_mapProfiles.get(f.K.InitFromAccountID(e).ConvertTo64BitString()); } GetProfileBySteamID(e) { return this.m_mapProfiles.get(e.ConvertTo64BitString()); } BHasProfile(e) { return this.m_mapProfiles.has(e); } BHasProfileByAccountID(e) { return this.m_mapProfiles.has(f.K.InitFromAccountID(e).ConvertTo64BitString()); } BHasProfileBySteamID(e) { return this.m_mapProfiles.has(e.ConvertTo64BitString()); } BHasAllProfilesBySteamID(e) { return !e.some((e) => !this.BHasProfileBySteamID(e)); } GetProfileURLBySteamID(e) { const t = this.GetProfileBySteamID(e); return t && t.profile_url ? b.De.COMMUNITY_BASE_URL + "id/" + t.profile_url : b.De.COMMUNITY_BASE_URL + "profiles/" + e.ConvertTo64BitString(); } GetPersonaNameBySteamID(e) { const t = this.GetProfileBySteamID(e); return t && t.persona_name ? t.persona_name : ""; } } (0, i.gn)([g.LO], I.prototype, "m_mapProfiles", void 0); const y = new I(); function E(e) { return (function (e) { const t = d.useMemo(() => (e ? ("string" == typeof e ? new f.K(e) : e) : null), [e]), [n, i] = (0, d.useState)(!!t && !y.BHasProfileBySteamID(t)); return ( (0, d.useEffect)(() => { const e = _().CancelToken.source(); return ( t && !y.BHasProfileBySteamID(t) && y .LoadProfiles([t.ConvertTo64BitString()]) .catch((e) => { const n = (0, S.l)(e); console.error("useUserProfile failed to load profile for " + t.ConvertTo64BitString() + ": " + n.strErrorMsg, n); }) .finally(() => { e.token.reason || i(!1); }), () => e.cancel("unmounting useUserProfile") ); }, [e]), [n, !!t && y.GetProfileBySteamID(t)] ); })(d.useMemo(() => (e ? f.K.InitFromAccountID(e) : null), [e])); } var D = n(2049), w = n(11259), R = n(84290), A = n(3987), M = n.n(A), k = n(16518), T = n(56320); class L extends d.Component { constructor() { super(...arguments), (this.state = { invite_token: "", input_search: "", friend_code_copied: !1, invite_copied: !1 }); } componentDidMount() { return (0, i.mG)(this, void 0, void 0, function* () { const e = yield _().get(b.De.COMMUNITY_BASE_URL + "invites/ajaxgetall", { params: { sessionid: b.De.SESSIONID } }); if (e && e.data && e.data.tokens) { const t = e.data.tokens.filter((e) => e.valid); t.length ? this.setState({ invite_token: t[0].invite_token }) : this.OnCreateInviteLink(); } else this.OnCreateInviteLink(); }); } OnCreateInviteLink() { return (0, i.mG)(this, void 0, void 0, function* () { const e = new FormData(); e.append("sessionid", b.De.SESSIONID), e.append("steamid_user", b.L7.steamid), e.append("duration", (2592e3).toString()); const t = yield _().post(b.De.COMMUNITY_BASE_URL + "invites/ajaxcreate", e); t && t.data && t.data.invite && this.setState({ invite_token: t.data.invite.invite_token }); }); } OnCopy(e, t) { "friend_code" === e && (this.setState({ friend_code_copied: !0 }), setTimeout(() => this.setState({ friend_code_copied: !1 }), 1e3)), "invite" === e && (this.setState({ invite_copied: !0 }), setTimeout(() => this.setState({ invite_copied: !1 }), 1e3)), (0, u.Ei)(t); } OnAddFriend(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = new FormData(); t.append("sessionID", b.De.SESSIONID), t.append("steamid", e), t.append("accept_invite", "0"); try { const e = yield _().post(b.De.COMMUNITY_BASE_URL + "actions/AddFriendAjax", t); return e && e.data && 1 == e.data.success; } catch (e) { return !1; } }); } OnSearchChange(e) { this.setState({ input_search: e.target.value }); } OnSearchKeyDown(e) { 13 === e.keyCode && this.OnSearchSubmit(); } OnSearchSubmit() { window.open(b.De.COMMUNITY_BASE_URL + "search/users/#text=" + encodeURIComponent(this.state.input_search), "_self"); } render() { const e = b.L7.short_url + "/" + this.state.invite_token; return d.createElement( "div", null, d.createElement("div", { className: M().HeaderBlock }, (0, R.Xx)("#ManageFriends_AddAFriend")), d.createElement("div", { className: M().Background }, d.createElement("h1", { className: M().Heading }, (0, R.Xx)("#ManageFriends_YourFriendCode")), d.createElement("div", { className: M().CopyContainer }, d.createElement("h1", { className: M().Text }, b.L7.accountid), d.createElement(w.KM, { autoFocus: !0, className: M().Button, onClick: () => this.OnCopy("friend_code", String(b.L7.accountid)) }, this.state.friend_code_copied ? (0, R.Xx)("#ManageFriends_Copied") : (0, R.Xx)("#ManageFriends_Copy"))), d.createElement("p", { className: M().Body }, (0, R.Xx)("#ManageFriends_EnterFriendCode")), d.createElement(G, { onButtonClick: this.OnAddFriend, buttonText: (0, R.Xx)("#ManageFriends_SendInvite"), bDisableForSelf: !0, bDisableForFriends: !0, bShowStatus: !0 })), d.createElement("div", { className: M().DimBackground }, d.createElement("h1", { className: M().Heading }, (0, R.Xx)("#ManageFriends_OrSendQuickInvite")), d.createElement("p", { className: M().Body }, (0, R.Xx)("#ManageFriends_QuickInviteDescription")), d.createElement("p", { className: M().Body }, (0, R.Xx)("#ManageFriends_QuickInviteNote")), d.createElement("div", { className: M().CopyContainer }, Boolean(this.state.invite_token) && d.createElement("div", { className: M().Link }, e), d.createElement(w.KM, { className: M().Button, onClick: () => this.OnCopy("invite", e) }, this.state.invite_copied ? (0, R.Xx)("#ManageFriends_Copied") : (0, R.Xx)("#ManageFriends_Copy"))), d.createElement(w.zx, { className: M().GenerateLinkButton, onClick: this.OnCreateInviteLink }, (0, R.Xx)("#ManageFriends_CreateInviteLink"))), d.createElement("div", { className: M().Background }, d.createElement("h1", { className: M().Heading }, (0, R.Xx)("#ManageFriends_OrSearch")), d.createElement("br", null), d.createElement("div", { style: { display: "flex", alignItems: "center", maxWidth: "598px", position: "relative" } }, d.createElement("div", { style: { width: "100%" } }, d.createElement(w.II, { className: M().Input, onKeyDown: this.OnSearchKeyDown, value: this.state.input_search, onChange: this.OnSearchChange, placeholder: (0, R.Xx)("#ManageFriends_EnterProfileName") })), d.createElement("div", { id: "searchIcon", style: { position: "absolute", right: "10px", cursor: "pointer" }, onClick: this.OnSearchSubmit }, d.createElement(k.YtI, null)))), ); } } (0, i.gn)([D.ak], L.prototype, "OnCreateInviteLink", null), (0, i.gn)([D.ak], L.prototype, "OnCopy", null), (0, i.gn)([D.ak], L.prototype, "OnAddFriend", null), (0, i.gn)([D.ak], L.prototype, "OnSearchChange", null), (0, i.gn)([D.ak], L.prototype, "OnSearchKeyDown", null), (0, i.gn)([D.ak], L.prototype, "OnSearchSubmit", null); class G extends d.Component { constructor() { super(...arguments), (this.state = { input_friend_code: "", disable_send_invite: !1, searchResult: null, invite_status: "pending" }), (this.m_currentRequest = 0); } OnFriendCodeChange(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = e.target.value.split(",")[0]; this.setState({ input_friend_code: t, invite_status: "pending" }), window.clearTimeout(this.m_currentRequest), (this.m_currentRequest = window.setTimeout(() => this.LoadProfile(t), 500)); }); } LoadProfile(e) { return (0, i.mG)(this, void 0, void 0, function* () { if (e) { const t = f.K.InitFromAccountID(Number(e)); yield y.LoadProfiles([t.ConvertTo64BitString()]); const n = y.GetProfile(t.ConvertTo64BitString()); n ? this.setState({ searchResult: n, disable_send_invite: b.L7.is_limited || (this.props.bDisableForFriends && n.is_friend) || (this.props.bDisableForSelf && n.steamid === b.L7.steamid) }) : this.setState({ searchResult: null }); } else this.setState({ searchResult: null }); }); } OnActionClick(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = new FormData(); t.append("sessionID", b.De.SESSIONID), t.append("steamid", e), t.append("accept_invite", "0"), this.setState({ disable_send_invite: !0 }); (yield this.props.onButtonClick(e)) ? (this.setState({ input_friend_code: "", invite_status: "success" }), setTimeout(() => this.setState({ searchResult: null }), 3e3)) : this.setState({ invite_status: "failure", disable_send_invite: !1 }); }); } render() { return d.createElement("div", { className: M().FriendCodeSelector }, d.createElement(w.II, { className: M().Input, value: this.state.input_friend_code, onChange: this.OnFriendCodeChange, placeholder: (0, R.Xx)("#ManageFriends_EnterFriendCodePlaceholder") }), d.createElement(O, { searchResult: this.state.searchResult, invite_status: this.state.invite_status, bShowStatus: this.props.bShowStatus }, d.createElement(w.KM, { className: M().SendInviteButton, onClick: () => this.OnActionClick(this.state.searchResult.steamid), disabled: this.state.disable_send_invite }, this.props.buttonText))); } } (0, i.gn)([D.ak], G.prototype, "OnFriendCodeChange", null), (0, i.gn)([D.ak], G.prototype, "LoadProfile", null), (0, i.gn)([D.ak], G.prototype, "OnActionClick", null); const O = (e) => { const { searchResult: t, invite_status: n, bShowStatus: i, children: o } = e, r = (0, b.id)(); return Boolean(t) ? d.createElement( "div", { className: M().ProfileCard }, d.createElement("div", { className: M().UserContainer }, d.createElement("div", { className: M().Image }, d.createElement("img", { style: { width: "100%", height: "100%" }, src: t.avatar_url_full })), d.createElement("div", { className: M().ProfileContent }, d.createElement("h1", { className: M().Heading }, t.persona_name), d.createElement("div", { className: M().ProfileLink }, d.createElement(T.IS, { target: r ? void 0 : "_blank", href: b.De.COMMUNITY_BASE_URL + "profiles/" + t.steamid }, (0, R.Xx)("#ManageFriends_ProfileLink")), d.createElement("br", null), d.createElement("span", { className: M().Body }, t.real_name, d.createElement("br", null), `${t.city}${t.city ? "," : ""} ${t.state}${t.state ? "," : ""} ${t.country}`))), o), d.createElement("div", { className: M().ProfileLink }, t.is_friend && d.createElement("div", null, (0, R.Xx)("#ManageFriends_IsFriend")), 0 != t.friends_in_common && d.createElement("div", null, d.createElement(T.IS, { target: r ? void 0 : "_blank", href: b.De.COMMUNITY_BASE_URL + "profiles/" + t.steamid + "/friendscommon" }, 1 === t.friends_in_common ? (0, R.Xx)("#ManageFriends_FriendsInCommonSingular", t.friends_in_common) : (0, R.Xx)("#ManageFriends_FriendsInCommon", t.friends_in_common))), i && "failure" === n && d.createElement("div", { className: M().Failure }, (0, R.Xx)("#ManageFriends_InviteFailure")), i && "success" === n && d.createElement("div", { className: M().Success }, (0, R.Xx)("#ManageFriends_InviteSuccess", t.persona_name))), ) : null; }; var F = n(71357), B = n(13106), x = n(65204), N = n(99165), P = n(83817), U = n(46057), V = n(21298), H = n(68816), W = n(14341), X = n(33613); function j(e, t, n, i) { (0, B.$W)(e, { friendGroup: t }, n, i); } function z(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return 1 == (yield e.RemoveFriend(t)); }); } const K = (e) => { const { friendGroup: t, friend: n } = e; return d.createElement(U.mo, { className: X.InvitesFriend, focusable: !1, childFocusDisabled: !0, friend: n, context: { friendGroup: t } }); }, q = (e) => { const { friends: t, children: n } = e; return d.createElement("div", { className: X.InvitesSectionHeader }, d.createElement("div", { className: X.Text }, t.name, " (", t.member_list.length, ")"), n); }, Z = (e) => { const { friendStore: t, setMutualFriends: n, closeModal: i } = e, o = Array.from(n.values()).map((e) => t.GetFriend(e)), r = d.useCallback( (e, t) => { let n = t.GetCommunityProfileURL(); (0, W.b8)(u.RA(e), n), i(); }, [i], ), a = o.map((e) => d.createElement(P.s, { key: e.accountid, className: X.MutualFriendRow, noFocusRing: !0, onActivate: (t) => r(t, e), onOKActionDescription: (0, R.Xx)("#Friend_Menu_ViewProfile") }, d.createElement(U.mo, { className: X.InvitesFriend, focusable: !1, friend: e, context: {} }))); return d.createElement(x.uH, { className: "friendsui-container", strTitle: (0, R.Xx)("#Friend_Invites_MutualFriends"), onOK: i, onCancel: i, bAlertDialog: !0 }, d.createElement(w.uT, null, a)); }; const Q = (0, h.Pi)((e) => { const { friendStore: t, context: n, friends: o } = e, r = d.useCallback( (e, t) => { var n, i; const r = (null === (n = o.map_steamid_to_mutual_friends.get(e.steamid64)) || void 0 === n ? void 0 : n.size) || 0; return ((null === (i = o.map_steamid_to_mutual_friends.get(t.steamid64)) || void 0 === i ? void 0 : i.size) || 0) - r || (0, V.tN)(e.display_name, t.display_name); }, [o], ); if (0 == o.member_count) return null; const a = o.member_list .slice() .sort(r) .map((e, r) => { (0, v.X)(2 == e.efriendrelationship, "Incorrect friend type in IncomingInvites"); const a = o.map_steamid_to_mutual_friends.get(e.steamid64), s = (null == a ? void 0 : a.size) ? { onOptionsActionDescription: (0, R.Xx)("#Friend_Invites_ViewMutual"), onOptionsButton: (e) => { !(function (e, t, n) { (0, i.mG)(this, void 0, void 0, function* () { const i = u.RA(n); (0, H.AM)(d.createElement(Z, { friendStore: e, setMutualFriends: t }), i); }); })(t, a, e); }, } : void 0; return d.createElement( P.s, Object.assign({ key: e.accountid, className: X.InvitesRow }, s, { onMenuButton: (t) => j(n, o, e, t), onMenuActionDescription: (0, R.Xx)("#Friend_Menu_Open") }), d.createElement(K, { friendGroup: o, friend: e }), d.createElement( w.zx, { onClick: (n) => (function (e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { const i = u.RA(n); (yield (0, F.V3)(i, (0, R.Xx)("#Friend_Menu_BlockAllCommunication"), (0, R.Xx)("#Friend_Block_Confirm", t.display_name), (0, R.Xx)("#Button_Confirm"))) && 5 != (yield e.BlockPlayer(t)) && (0, F.zp)(i, (0, R.Xx)("#Friend_Menu_BlockIncomingInvite"), (0, R.Xx)("#Friend_BlockIncomingInvite_Error", t.display_name)); }); })(t, e, n), }, (0, R.Xx)("#Button_Block"), ), d.createElement( w.zx, { onClick: (n) => (function (e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { let { eResult: i, eFriendRelationship: o } = yield e.SendFriendInvite(t); if (3 != o) { const e = u.RA(n); (0, B.u8)(e, i, o, t.display_name); } }); })(t, e, n), }, (0, R.Xx)("#Button_Accept"), ), d.createElement( w.zx, { onClick: (n) => (function (e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { if (!(yield z(e, t))) { const e = u.RA(n); (0, F.zp)(e, (0, R.Xx)("#Friend_Menu_IgnoreIncomingInvite"), (0, R.Xx)("#Friend_IgnoreIncomingInvite_Error", t.display_name)); } }); })(t, e, n), }, (0, R.Xx)("#Button_Ignore"), ), ); }); return d.createElement( P.s, { className: X.IncomingInvites, "flow-children": "grid", retainFocus: !0 }, d.createElement(w.tr, { className: X.Divider }), d.createElement( q, { friends: o }, o.member_list.length > 1 && d.createElement( w.zx, { onClick: (e) => (function (e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { const i = u.RA(n); if (!(yield (0, F.V3)(i, (0, R.Xx)("#Friend_Invites_IgnoreAllTitle"), (0, R.Xx)("#Friend_Invites_IgnoreAllDescription", t.length), (0, R.Xx)("#Button_Confirm")))) return; const o = t.map((t) => z(e, t)); let r = 0; (yield Promise.all(o)).forEach((e) => { !e && r++; }), r > 0 && (0, F.zp)(i, (0, R.Xx)("#Error_Generic"), (0, R.kb)("#Friend_Invites_FailedToDecline", r)); }); })(t, o.member_list, e), }, (0, R.Xx)("#FriendGroup_AllIgnore"), ), ), a, ); }), $ = (0, h.Pi)((e) => { const { friendStore: t, context: n, friends: o } = e; if (0 == o.member_count) return null; const r = o.member_list.map( (e, r) => ( (0, v.X)(4 == e.efriendrelationship, "Incorrect friend type in OutgoingInvites"), d.createElement( P.s, { key: e.accountid, className: X.InvitesRow, onMenuButton: (t) => j(n, o, e, t), onMenuActionDescription: (0, R.Xx)("#Friend_Menu_Open") }, d.createElement(K, { friendGroup: o, friend: e }), d.createElement( w.zx, { onClick: (n) => (function (e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { const i = u.RA(n); if (!(yield (0, F.V3)(i, (0, R.Xx)("#Friend_Invites_CancelInvite"), (0, R.Xx)("#Friend_CancelInvitation_Confirm", t.display_name), (0, R.Xx)("#Button_Confirm")))) return; const o = yield e.RemoveFriend(t); (3 != o && 6 != o) || (0, F.zp)(i, (0, R.Xx)("#Friend_Menu_CancelInvitation"), (0, R.Xx)("#Friend_CancelInvitation_Error", t.display_name)); }); })(t, e, n), }, (0, R.Xx)("#Friend_Invites_CancelInvite"), ), ) ), ); return d.createElement(P.s, { className: X.OutgoingInvites, "flow-children": "grid", retainFocus: !0 }, d.createElement(w.tr, { className: X.Divider }), d.createElement(q, { friends: o }), r); }), Y = (e) => { const { friendStore: t } = e; return d.createElement("div", { className: X.FriendCodeSection }, d.createElement("div", { className: X.FriendCode }, d.createElement("div", { className: X.Code }, t.self.persona.GetAccountID())), d.createElement("div", { className: X.Caption }, (0, R.Xx)("#FriendInvites_YourFriendCode"))); }, J = (e) => { const { friendStore: t } = e, n = d.useRef(), i = d.useCallback( (e) => { var i; let o = u.RA(e); e.preventDefault(); const r = parseInt(null === (i = n.current) || void 0 === i ? void 0 : i.value); return r && (0, H.AM)(d.createElement(ee, { friendStore: t, accountID: r, ownerWindow: o }), o), !0; }, [t], ); return d.createElement("div", { className: X.AddFriendSection }, d.createElement("div", { className: X.Title }, (0, R.Xx)("#FriendInvites_AddFriend_Title")), d.createElement("div", { className: X.Description }, (0, R.Xx)("#FriendInvites_AddFriend_Description")), d.createElement("form", { className: X.InputForm, onSubmit: i }, d.createElement(w.II, { autoFocus: !0, ref: n, className: X.Input, placeholder: (0, R.Xx)("#FriendInvites_AddFriend_Placeholder") }), d.createElement(w.zx, { className: X.SubmitButton, type: "submit" }, (0, R.Xx)("#Button_OK")))); }, ee = (0, h.Pi)((e) => { const { friendStore: t, accountID: n, ownerWindow: o, closeModal: r } = e, [a, s] = E(n), l = d.useCallback( () => (0, i.mG)(void 0, void 0, void 0, function* () { const { eResult: e, eFriendRelationship: i } = yield t.SendFriendInviteBySteamID(f.K.InitFromAccountID(n)); 1 == e ? (4 == i ? (0, F.zp)(o, (0, R.Xx)("#Friend_Menu_AddToFriendsList"), (0, R.Xx)("#Friend_InviteSent")) : 3 == i && (0, F.zp)(o, (0, R.Xx)("#Friend_Menu_AddToFriendsList"), (0, R.Xx)("#Friend_MutualInviteSent", s.persona_name))) : (0, B.u8)(o, e, i, s.persona_name), r(); }), [n, s, r, o, t], ); let c = d.createElement(N.V, null), m = !1; return a || (s ? ((c = d.createElement(O, { searchResult: s, bShowStatus: !1 })), (m = !s.is_friend && s.accountid != t.self.steamid.GetAccountID())) : (c = d.createElement("div", { className: X.SearchError }, (0, R.Xx)("#Friend_Invites_NotFound")))), d.createElement(x.uH, { className: "friendsui-container", strTitle: (0, R.Xx)("#Friend_Invites_SearchTitle", n), onOK: l, onCancel: r, strOKButtonText: (0, R.Xx)("#ManageFriends_SendInvite"), strCancelButtonText: (0, R.Xx)("#Button_Close"), bOKDisabled: !m }, d.createElement(w.uT, null, c)); }), te = (e) => { const { friendStore: t, scrollableElement: n } = e, i = d.useCallback( (e) => { var t; e && (null === (t = n.current) || void 0 === t || t.scrollTo({ top: 0, behavior: "smooth" })); }, [n], ); return d.createElement(P.s, { className: X.TopSection, onFocusWithin: i }, d.createElement(J, { friendStore: t }), d.createElement(Y, { friendStore: t })); }, ne = (0, h.Pi)((e) => { const { friends: t, browserContext: n } = e, i = d.useRef(), o = t.FriendGroupStore.incoming_invites_group, r = t.FriendGroupStore.outgoing_invites_group; return ( d.useEffect(() => { t.FriendGroupStore.EnsureMutualFriendsForIncomingInvites(), t.ClanStore.EnsureInitialStateForClanInvites(); }, [t]), d.createElement(P.s, { ref: i, className: X.InvitesList, "flow-children": "grid" }, d.createElement(te, { friendStore: t, scrollableElement: i }), d.createElement(Q, { friendStore: t, context: n, friends: o }), d.createElement($, { friendStore: t, context: n, friends: r })) ); }); var ie = n(31075), oe = n(41370), re = n(87018), ae = n(5395), se = n(93354), le = n(19339), ce = n(58118); function me(e) { let { chats: t, onActivate: n } = e, o = (0, i._T)(e, ["chats", "onActivate"]), a = (0, oe.SZ)(() => { let e = 0, t = r.Ul.GetServerRTime32() - 2 * ae._H.PerWeek; const n = r.Ul.ChatStore.GetRecentChats(); for (const i of n) if (i instanceof le.a) { e += i.unread_message_count; } else if (i instanceof se.PR) { i.chatRoomList.forEach((n) => { if (n.has_unread_messages && n.time_last_ack > t) { let t = n.unread_message_count; t > 0 && (e += t); } }); } return e; }); if (0 == a) return null; return d.createElement( P.s, Object.assign( { className: (0, re.Z)(ce.NotificationUnreadMentionContainer, a > 0 && ce.HasMessages), onActivate: (e) => { n && n(e), (r.Ul.UIStore.FriendsListSteamDeckActiveTab = s.ou.RecentMessages); }, }, o, ), d.createElement(k.foH, null), d.createElement("div", { className: ce.Header_NotificationUnreadMention }, a), ); } var de = n(84446), he = n(618), ue = n(43825); function pe(e) { let { chats: t, className: n } = e, o = (0, i._T)(e, ["chats", "className"]), a = (0, oe.SZ)(() => t.GetActiveVoiceChat()); const s = a instanceof le.a ? a : void 0, l = null == s ? void 0 : s.GetMember(s.accountid_partner), c = a instanceof de.K ? a : void 0, m = (0, oe.SZ)(() => t.VoiceChat.IsMicMuted() || 0 == t.VoiceChat.GetVoiceInputGain()), h = (0, oe.SZ)(() => t.VoiceChat.IsOutputMuted() || 0 == t.VoiceChat.GetVoiceOutputGain()), u = (0, oe.SZ)(() => t.FriendChatStore.GetAllChats()); let p = !1; const _ = (0, oe.SZ)(() => u.filter((e) => { let t = r.Ul.VoiceStore.BPartnerHasRequestedAndIsInOneOnOneChat(e.accountid_partner); return (null == s ? void 0 : s.accountid_partner) == e.accountid_partner && (t = !1), t; }), ); if ( (_.forEach((e) => { p || (p = r.Ul.VoiceStore.BSelfHadPreviouslyJoinedOneOnOneChat(null == e ? void 0 : e.accountid_partner)); }), !t.VoiceChat.IsAnyVoiceActive() && !a && 0 == _.length) ) return null; const g = null != s, C = null != c, f = 0 != _.length, v = (0, re.Z)(n, ue.VoiceChatHeader, a && ue.ActiveCall, g && ue.FriendVoice, C && ue.GroupVoice, f && ue.IncomingCall, p && ue.CallOnHold); let S = {}; if (g) (S.onSecondaryButton = () => t.VoiceChat.OnUserEndVoiceChat()), (S.onSecondaryActionDescription = (0, R.Xx)("#VoiceChat_Leave")); else if (C) (S.onSecondaryButton = () => t.VoiceChat.OnUserEndVoiceChat()), (S.onSecondaryActionDescription = (0, R.Xx)("#VoiceChat_LeaveVoiceRoom")); else if (f) { let e = _[0]; (S.onSecondaryButton = () => r.Ul.VoiceStore.OnRejectOneOnOneVoiceChatForPartner(e.accountid_partner)), (S.onSecondaryActionDescription = (0, R.Xx)("#Voice_DeclineVoiceChat")); } return d.createElement( P.s, Object.assign({ className: v }, o, S), d.createElement("div", { className: ue.VoiceChatStatusBackground }), _.map((e) => { let t = e.chat_partner; return d.createElement(U.mo, { key: e.unique_id, noActions: !0, bHideGameName: !0, bHidePersona: !0, bHideStatusInfo: !0, showVoiceLevel: !0, friend: t, context: { chat: e, chatContext: "friendslist" }, avatarSize: "Medium", statusPosition: "right" }); }), 0 != _.length && d.createElement("div", { className: "WaitingForYouFirstTime" }, p ? d.createElement(k.Yx0, null) : d.createElement(k.NBO, null), !p && d.createElement("div", { className: "Sonar" }, d.createElement("div", { className: "SonarCircle" }))), s && d.createElement(U.mo, { noActions: !0, bHideGameName: !0, bHidePersona: !0, bHideStatusInfo: !0, showVoiceLevel: !0, friend: l, context: { chat: s, chatContext: "friendslist" }, avatarSize: "Medium", statusPosition: "right" }), c && d.createElement(he._P, { group: c.GetGroup(), small: !0 }), (s || c) && d.createElement(k.bpe, { off: h, className: h ? "Muted" : void 0 }), (s || c) && d.createElement(k.JgI, { off: m, className: m ? "Muted" : void 0 }), ); } class _e extends d.Component { constructor(e) { super(e), (this.m_refTextInput = null), (this.state = { error: 1, strPIN: "" }); } componentDidMount() { this.m_refTextInput.focus(); } BindTextInput(e) { this.m_refTextInput = e; } OnPINInput(e) { this.setState({ strPIN: e.target.value }); } onOK(e) { return ( e.preventDefault(), r.Ul.ParentalStore.Unlock(this.state.strPIN).then((e) => { 1 != e && this.setState({ error: e }); }), !0 ); } render() { let e = ""; switch (this.state.error) { case 1: break; case 25: e = (0, R.Xx)("#FamilyView_TooManyAttempts"); break; default: e = (0, R.Xx)("#FamilyView_BadPIN"); } return d.createElement("div", null, d.createElement("div", { className: "FamilyViewTitle" }, (0, R.Xx)("#FamilyView_Title")), d.createElement("div", { className: "FamilyViewInstructions" }, (0, R.Xx)("#FamilyView_Unlock_Instructions")), d.createElement("form", { onSubmit: this.onOK }, d.createElement("input", { type: "password", maxLength: 4, className: "pinInput", ref: this.BindTextInput, value: this.state.strPIN, onChange: this.OnPINInput }), d.createElement("button", { type: "submit" }, (0, R.Xx)("#Button_OK"))), e && d.createElement("p", { className: "error_text" }, e)); } } (0, i.gn)([D.ak], _e.prototype, "BindTextInput", null), (0, i.gn)([D.ak], _e.prototype, "OnPINInput", null), (0, i.gn)([D.ak], _e.prototype, "onOK", null); var ge = n(37634), Ce = n(29512), fe = n(58908), ve = n(34294), Se = n(11612), be = n(86374), Ie = n(99627), ye = n(33690), Ee = n(21569), De = n(61963), we = n(38571), Re = n(76135), Ae = n(55948), Me = n(59192), ke = n(59702), Te = n(92117), Le = n(62210), Ge = n.n(Le), Oe = n(96127), Fe = n(56552); var Be = n(99643); const xe = d.memo(function () { const e = (0, Fe.useQueryClient)(); return ( (function (e, t) { const n = (0, be.rK)(); (0, d.useEffect)(() => { if (n) return n.messageHandlers.RegisterServiceNotificationHandler(e, t).unregister; }, [n, e, t]); })( Oe.oD.NotifyPrivateAppListChangedHandler, d.useCallback((t) => ((0, Be.z3)(e, t.Body().private_apps().appids()), 1), [e]), ), null ); }); function Ne() { const e = (0, a.rb)((0, ye.Wy)().ownerWindow); return void 0 === e.m_eUIMode ? Object.assign(Object.assign({}, e), { m_eUIMode: 4 }) : e; } function Pe(e, t, n) { const i = window, o = (0, a.rb)(i); ge.s(n).render(d.createElement($e, { ownerWindow: i }, d.createElement(Ye, null), d.createElement(Je, { friends: e, chats: t, browserContext: o, elTarget: n }))); } function Ue(e, t, n) { const i = window, o = (0, a.rb)(i); ge.s(n).render(d.createElement($e, { ownerWindow: i }, d.createElement(Re.Y0, { browserInfo: o }, " "))); } function Ve(e, t, n) { const i = (0, oe.SZ)(() => r.Ul.ready_to_render), o = Ne(); return d.createElement(b.fI, { IN_GAMEPADUI: !0 }, d.createElement(et, { key: "throbber", fadeOut: i, className: Ge().throbberContainerSteamDeckFriendsQuickAccess }), i ? d.createElement(U.ZY, { bQuickAccess: !0, friends: e, chats: t, browserContext: o, collapsed: !1 }) : null); } function He(e, t) { const n = (0, oe.SZ)(() => r.Ul.ready_to_render), i = Ne(); return d.createElement(b.fI, { IN_GAMEPADUI: !0 }, d.createElement(et, { key: "throbber", fadeOut: n, className: Ge().throbberContainerSteamDeckFriendsQuickAccess }), n ? d.createElement(ne, { friends: e, browserContext: i }) : null); } function We(e, t, n) { const i = (0, oe.SZ)(() => r.Ul.ready_to_render), o = Ne(); return d.createElement(b.fI, { IN_GAMEPADUI: !0 }, d.createElement(et, { key: "throbber", fadeOut: i, className: Ge().throbberContainerSteamDeckFriends }), i ? d.createElement(U.ZY, { bQuickAccess: !1, friends: e, chats: t, browserContext: o, collapsed: !1 }) : null); } function Xe(e, t, n) { const i = (0, oe.SZ)(() => r.Ul.ready_to_render); return d.createElement(b.fI, { IN_GAMEPADUI: !0 }, d.createElement(et, { key: "throbber", fadeOut: i, className: Ge().throbberContainerSteamDeckFriendsQuickAccess }), i ? d.createElement("div", null, "(out of date client)") : null); } function je(e, t, n) { const i = (0, oe.SZ)(() => r.Ul.ready_to_render), o = Ne(); return d.createElement(b.fI, { IN_GAMEPADUI: !0 }, d.createElement(et, { key: "throbber", fadeOut: i, className: Ge().throbberContainerSteamDeckFriends }), i ? d.createElement(U.J9, { children: n.children, friends: e, chats: t, browserContext: o }) : null); } function ze(e) { const t = Ne(); let n = r.Ul.UIStore.GetDefaultTabSetForContext(t); return d.createElement(b.fI, { IN_GAMEPADUI: !0 }, d.createElement(c.ar, { tabs: n, ResponsiveWindowState: null })); } function Ke(e, t) { const n = Ne(); return d.createElement(b.fI, { IN_GAMEPADUI: !0 }, d.createElement(m.Gs, { browserContext: n })); } function qe(e, t) { return d.createElement(b.fI, { IN_GAMEPADUI: !0 }, d.createElement(ie.m, { chats: e })); } function Ze(e, t) { return d.createElement(b.fI, { IN_GAMEPADUI: !0 }, d.createElement(pe, Object.assign({ chats: e }, t))); } function Qe(e, t) { return d.createElement(b.fI, { IN_GAMEPADUI: !0 }, d.createElement(me, Object.assign({ chats: e }, t))); } function $e(e) { const { ownerWindow: t, children: n } = e, i = d.useCallback(() => (null === r.Ul || void 0 === r.Ul ? void 0 : r.Ul.CMInterface), []), o = (0, D.kD)(d.useCallback(() => new Ie.Z(), [])); return d.createElement(Te.R, null, d.createElement(b.fI, { IN_GAMEPADUI: !1 }, d.createElement(ye.Rt, { ownerWindow: t }, d.createElement(Ee.F, { body_class: "friendsui-container" }, d.createElement(be.Ub, { useActiveCMInterface: i, useStorage: o }, n))))); } function Ye() { return d.createElement(we.DT, null, d.createElement(xe, null)); } let Je = class extends d.Component { render() { const { browserContext: e, friends: t, chats: n, elTarget: i } = this.props; let o = new a.i5(i.ownerDocument.defaultView), s = null, l = null, c = r.Ul.ready_to_render; return c && ((s = r.Ul.UIStore.GetDefaultTabSetForContext(e)), (l = r.Ul.UIStore.GetPerContextChatData(e)), l.SetFriendsListWindow(o)), d.createElement(d.Fragment, null, d.createElement(et, { fadeOut: c }), c && d.createElement(at, { friends: t, chats: n, tabset: s, container: o })); } }; function et(e) { const { fadeOut: t, className: n } = e, [i, o] = d.useState(t), r = d.useCallback( (e) => { e.target == e.currentTarget && t && "opacity" == e.propertyName && o(!0); }, [t], ); if (i) return null; let a = Ge().throbberContainer; return t && (a += ` ${Ge()["throbberContainer-exit-active"]}`), d.createElement("div", { className: (0, re.Z)(a, n), onTransitionEnd: r }, d.createElement("div", { className: "WaitingForInterFaceReadyContainer" }, d.createElement("div", { className: "WaitingForInterFaceReadyThrobber" }, d.createElement(N.V, { className: "Throbber_Blur", size: "xlarge" }), d.createElement(N.V, { size: "xlarge" })))); } Je = (0, i.gn)([h.Pi], Je); class tt extends ye.x1 { constructor(e, t, n, i) { super(e, t, n, i); } GetSavedDimensionsKey() { if (this.BIsInOverlay()) { let e = r.Ul.UIStore.GetPerContextChatData(this.m_rgParams.target_browser).screen_info; return "Overlay_" + (e && e.width && e.height ? e.width + "x" + e.height + "_" : "") + this.m_strSavedDimensionsKey; } return this.m_strSavedDimensionsKey; } } const nt = 226, it = 400, ot = 3 * nt; class rt extends tt { constructor(e, t, n, i, o) { let r = ye.eL.Resizable; i && !(0, b.Uy)() && (r |= ye.eL.Minimized); let s = 300, l = 650, c = !1; o && (o.width && ((s = o.width), (c = !0)), o.height && ((l = o.height), (c = !0))), super("friendslist", "PopupFriendsListDimensions", { dimensions: { width: s, height: l }, minWidth: nt, minHeight: it, title: (0, R.Xx)("#WindowTitle_FriendsList"), html_class: "friendsui-container client_chat_frame fullheight SavedDimensionsPopup", body_class: "fullheight", target_browser: n, eCreationFlags: r, bIgnoreSavedDimensions: c }, !1), (this.m_friends = e), (this.m_chats = t), a.g_FriendsUIDesktopApp.m_strLoaderWindowRestoreDetails && (this.SaveWindowPosition(a.g_FriendsUIDesktopApp.m_strLoaderWindowRestoreDetails), (a.g_FriendsUIDesktopApp.m_strLoaderWindowRestoreDetails = void 0)); } Render(e, t) { t.setAttribute("class", "fullheight popup_chat_frame"); let n = new a.i5(e), i = this.browser_info || r.Ul.GetDefaultBrowserContext(), o = r.Ul.UIStore.GetDefaultTabSetForContext(i); (this.m_browserContext = i), r.Ul.UIStore.BIsFriendsListSingleWindow(i) && e.SteamClient.Window.SetMinSize && e.SteamClient.Window.SetMinSize(ot, it), (this.m_reactRoot = ge.s(t)), this.m_reactRoot.render(d.createElement($e, { ownerWindow: this.window }, d.createElement(at, { popup: this, friends: this.m_friends, chats: this.m_chats, tabset: o, container: n }))); } OnResizeComplete(e) { super.OnResizeComplete(e), window.parent.postMessage({ message: "FriendsListRestoreDetailsChanged", data: e }, "https://steamloopback.host"); } OnClose() { super.OnClose(), this.m_reactRoot.unmount(), window.parent.postMessage({ message: "FriendsListRestoreDetailsChanged", data: this.m_rgParams.strRestoreDetails }, "https://steamloopback.host"), this.m_browserContext && r.Ul.OnFriendsListClosed(this.m_browserContext), this.m_fnOnClose && this.m_fnOnClose(); } SetOnClose(e) { this.m_fnOnClose = e; } } let at = class extends d.Component { constructor(e) { super(e), (this.m_bUsePopups = !1), (this.m_nWindowTitleUnreadCycleCount = 0), (this.m_refChatDialog = d.createRef()), (this.m_refRoot = d.createRef()), (this.m_lastFocusElement = null), (0, g.rC)(this); this.m_browserContext = this.props.popup && this.props.popup.browser_info ? this.props.popup.browser_info : r.Ul.GetDefaultBrowserContext(); let t = r.Ul.UIStore.GetPerContextChatData(this.m_browserContext); (this.m_bUsePopups = t.BUsePopups()), this.m_bUsePopups ? (this.m_nInlineChatWidth = 640) : ((this.m_nInlineChatWidth = 530), (this.m_ResponsiveWindowState = r.Ul.UIStore.GetResponsiveWindowState(this.m_browserContext))), (this.state = { bIsResizingWindow: !1 }); } OnCopy(e) { this.m_refChatDialog && this.m_refChatDialog.current && this.m_refChatDialog.current.OnCopy(e); } BindWindowHandlers() { const e = this.props.container, t = this.props.tabset; (this.m_popupActionDisposer = (0, g.EH)(() => { if (!o.De.IN_CLIENT) { let t = r.Ul.ChatStore.FriendChatStore.GetUnfilteredFriendsWithUnreadMessages(); t.length && void 0 === this.m_unTimerWindowTitleUnreadCycle ? (this.m_unTimerWindowTitleUnreadCycle = window.setInterval(() => { this.m_nWindowTitleUnreadCycleCount = (this.m_nWindowTitleUnreadCycleCount + 1) % 1e3; }, 2e3)) : t.length || void 0 === this.m_unTimerWindowTitleUnreadCycle || (window.clearInterval(this.m_unTimerWindowTitleUnreadCycle), (this.m_unTimerWindowTitleUnreadCycle = void 0)); let n = 1 + t.length, i = this.m_nWindowTitleUnreadCycleCount % n; if (i > 0) { let n = t[i - 1]; return void (e.title = (0, R.Xx)("#WindowTitle_UnreadMessage", n.name)); } } r.Ul.UIStore.BIsFriendsListSingleWindow(this.m_browserContext) && t.GetTitle() ? (o.De.IN_CLIENT ? (e.title = (0, R.Xx)("#WindowTitle_FriendsList") + " - " + t.GetTitle()) : (e.title = t.GetTitle())) : (e.title = (0, R.Xx)("#WindowTitle_FriendsList")); })), (this.m_popupFocusDisposer = e.OnFocus(() => { r.Ul.UIStore.BIsFriendsListSingleWindow(this.m_browserContext) && this.props.tabset.OnWindowFocus(); })); } UnbindWindowHandlers() { this.m_popupActionDisposer && (this.m_popupActionDisposer(), (this.m_popupActionDisposer = void 0)), this.m_popupFocusDisposer && (this.m_popupFocusDisposer.unregister(), (this.m_popupFocusDisposer = void 0)); } componentWillUnmount() { this.UnbindWindowHandlers(); } componentDidMount() { this.BindWindowHandlers(), (this.m_browserContext.m_eBrowserType != ve.i_.EBrowserType_OpenVROverlay && this.m_browserContext.m_eBrowserType != ve.i_.EBrowserType_OpenVROverlay_Dashboard) || (this.m_refRoot.current.addEventListener("focusin", this.OnFocusIn), this.m_refRoot.current.addEventListener("focusout", this.OnFocusOut)); } OnFocusIn(e) { let t = !1; switch (e.target.tagName) { case "TEXTAREA": t = !0; break; case "INPUT": t = "text" == e.target.type; } if (t) { e.currentTarget.ownerDocument.defaultView.SteamClient.OpenVR.ShowKeyboard(), console.log("Showing VR Keyboard"), (this.m_lastFocusElement = e.target), this.m_lastFocusElement.addEventListener("click", this.OnTextInputClick); } } OnFocusOut(e) { if (e.target == this.m_lastFocusElement) { e.currentTarget.ownerDocument.defaultView.SteamClient.OpenVR.HideKeyboard(), this.m_lastFocusElement.removeEventListener("click", this.OnTextInputClick), (this.m_lastFocusElement = null), console.log("Hiding VR Keyboard"); } } OnTextInputClick(e) { e.currentTarget.ownerDocument.defaultView.SteamClient.OpenVR.ShowKeyboard(); } BindFriendsListContainer(e) { this.m_elFriendsListContainer = e; } OnGrabberMouseDown(e) { let t = e.currentTarget.ownerDocument.defaultView; this.setState({ bIsResizingWindow: !0 }), t.addEventListener("mousemove", this.HandleMouseMove), t.addEventListener("mouseup", this.UnregisterFriendsListDragEvents); } OnGrabberTouchStart(e) { let t = e.currentTarget.ownerDocument.defaultView; t.addEventListener("touchmove", this.HandleTouchMove), t.addEventListener("touchend", this.UnregisterFriendsListDragEvents); } HandleTouchMove(e) { e.touches.length >= 1 && this.InternalAdjustFriendsListContainerOnDrag(e.touches[0].clientX); } HandleMouseMove(e) { this.InternalAdjustFriendsListContainerOnDrag(e.clientX); } InternalAdjustFriendsListContainerOnDrag(e) { if (!this.m_elFriendsListContainer) return; let t = this.m_elFriendsListContainer.getBoundingClientRect().left; this.SetFriendsListSingleWindowWidth(e - t); } SetFriendsListSingleWindowWidth(e) { let t = (this.props.popup ? this.props.popup.window : window).innerWidth, n = (0, ke.Lh)(t - 400, 200, 440); (e = (0, ke.Lh)(e, 200, n)), a.g_FriendsUIDesktopApp.SetUIDisplayPref("nFriendsListSingleWindowWidthPx", e); } UnregisterFriendsListDragEvents(e) { this.setState({ bIsResizingWindow: !1 }), e.view.removeEventListener("mousemove", this.HandleMouseMove), e.view.removeEventListener("touchmove", this.HandleTouchMove), e.view.removeEventListener("mouseup", this.UnregisterFriendsListDragEvents), e.view.removeEventListener("touchend", this.UnregisterFriendsListDragEvents); } render() { let e = !0, t = !0, n = r.Ul.UIStore.BIsFriendsListSingleWindow(this.m_browserContext), i = r.Ul.UIStore.GetPerContextChatData(this.m_browserContext), m = !1, h = !1; if (!n) if (this.m_ResponsiveWindowState) { let n = this.m_ResponsiveWindowState.GetActiveView(); (e = n == s.yf.FriendsList), (t = n == s.yf.Chat); } else t = !1; let u = r.Ul.UIStore.GetTheaterMode(), p = !(o.De.IN_CLIENT || u || o.De.IN_TENFOOT || window.__bHideHeader), _ = "chat_main fullheight", g = null; e && t ? (this.props.tabset.tabCount > 0 && ((h = !0), (m = r.Ul.UIStore.BIsFriendsListCollapsed(this.m_browserContext))), (_ += " singlewindow"), (g = d.createElement("div", { className: "singleWindowDivider" + (m ? " friendsListCollapsed" : ""), onMouseDown: this.OnGrabberMouseDown, onTouchStart: this.OnGrabberTouchStart }))) : e ? (_ += " responsive_friends") : t && (_ += " responsive_chats"), this.state.bIsResizingWindow && (_ += " resizingSingleWindow"), u && (_ += " TheaterMode"), this.props.popup && this.props.popup.focused && (_ += " focused"), r.Ul.CMInterface.BDisconnected() && !r.Ul.FriendStore.BIsOfflineMode() && (_ += " errorDisconnected"); let C = this.props.popup && this.props.popup.window, f = m ? { width: 0, transition: "width 0.32s ease-in-out, opacity 0.32s ease-in-out" } : { width: a.g_FriendsUIDesktopApp.UIDisplayPrefs.nFriendsListSingleWindowWidthPx + "px" }; return r.Ul.SettingsStore.IsSteamInTournamentMode() ? d.createElement("div", { className: _, ref: this.m_refRoot }, d.createElement(we.SV, null, d.createElement(dt, { popup: this.props.popup ? this.props.popup.window : void 0 }))) : r.Ul.ParentalStore.BIsFriendsBlocked() ? o.De.IN_CLIENT ? d.createElement("div", { className: _ }, d.createElement(_e, null)) : (location.reload(), d.createElement("div", null)) : d.createElement( "div", { className: _, onContextMenu: De.T, ref: this.m_refRoot }, d.createElement(we.SV, null, d.createElement(dt, { popup: this.props.popup ? this.props.popup.window : void 0 })), p && d.createElement(st, { friends: this.props.friends }), d.createElement(P.s, { className: "chat_main_flex displayRow", onCopy: this.OnCopy }, r.Ul.ready_to_render && d.createElement(we.SV, null, d.createElement(Re.Y0, { browserInfo: this.m_browserContext, bUsePopups: i.BUsePopups() }, e && d.createElement(l.R, { className: "friendsListContainer fullheight " + (m ? "collapsed" : ""), style: t ? f : null, ref: this.BindFriendsListContainer, rgAcceptedTypes: [], bAcceptsFiles: !0 }, d.createElement(U.$g, { friends: this.props.friends, chats: this.props.chats, popup: C, browserContext: this.m_browserContext, collapsible: h, collapsed: m })), g, t && d.createElement(c.ar, { tabs: this.props.tabset, popup: C, ref: this.m_refChatDialog, ResponsiveWindowState: e ? null : this.m_ResponsiveWindowState, showOpenFriendsList: h && m }), this.props.popup && o.De.IN_CLIENT && d.createElement(Me.f, { popup: C }), d.createElement("div", { className: "singleWindowFocusBar chatSingleWindowFocusBar" })))), ); } }; (0, i.gn)([g.LO], at.prototype, "m_nWindowTitleUnreadCycleCount", void 0), (0, i.gn)([D.ak], at.prototype, "OnCopy", null), (0, i.gn)([D.ak], at.prototype, "OnFocusIn", null), (0, i.gn)([D.ak], at.prototype, "OnFocusOut", null), (0, i.gn)([D.ak], at.prototype, "OnTextInputClick", null), (0, i.gn)([D.ak], at.prototype, "BindFriendsListContainer", null), (0, i.gn)([D.ak], at.prototype, "OnGrabberMouseDown", null), (0, i.gn)([D.ak], at.prototype, "OnGrabberTouchStart", null), (0, i.gn)([D.ak], at.prototype, "HandleTouchMove", null), (0, i.gn)([D.ak], at.prototype, "HandleMouseMove", null), (0, i.gn)([D.ak], at.prototype, "UnregisterFriendsListDragEvents", null), (at = (0, i.gn)([h.Pi], at)); let st = class extends d.Component { render() { let e = this.props.friends.self, t = o.De.EREALM === Se.IN.k_ESteamRealmChina; return d.createElement("div", { className: Ge().SteamPageHeader }, d.createElement("a", { href: `${o.De.STORE_BASE_URL}` }, d.createElement("div", { className: (0, re.Z)(Ge().SteamPageHeaderShortLogo, o.De.EREALM == Se.IN.k_ESteamRealmChina ? Ge().LogoChina : Ge().LogoGlobal) })), d.createElement(lt, { text: (0, R.Xx)("#StoreLink_Label"), href: `${o.De.STORE_BASE_URL}` }), !t && d.createElement(lt, { text: (0, R.Xx)("#CommunityLink_Label"), href: `${o.De.COMMUNITY_BASE_URL}` }), d.createElement(lt, { text: e.primary_display_name, href: e.GetCommunityProfileURL() }), d.createElement(lt, { text: (0, R.Xx)("#SupportLink_Label"), href: `${o.De.HELP_BASE_URL}` })); } }; function lt(e) { return d.createElement("a", { className: Ge().SteamPageHeaderTopLink, href: e.href }, e.text); } st = (0, i.gn)([h.Pi], st); class ct extends tt { constructor(e, t, n, i, o, r, a) { let s = { title: "", html_class: "friendsui-container client_chat_frame fullheight ChatPopup", body_class: "fullheight", minWidth: 400, minHeight: 400, strRestoreDetails: o, dimensions: { width: 740, height: 650 }, target_browser: e, eCreationFlags: ye.eL.Resizable }; a && (s.eCreationFlags |= ye.eL.Minimized), r && (Object.assign(s.dimensions, r), (s.bIgnoreSavedDimensions = !0)), super("chat_" + t, n.GetTabSetIdentifier(), s, !0), (this.m_tabSet = n), (this.m_chats = i); } SetTitle() { if (this.m_popup && this.m_popup.document && this.m_tabSet) { let e = this.m_tabSet.GetTitle(); this.m_popup.document.title = e; } } OnFocus() { this.m_tabSet.OnWindowFocus(); } BindWindowHandlers() { this.m_popupActionDisposer || (this.m_popupActionDisposer = (0, g.EH)(this.SetTitle)); } UnbindWindowHandlers() { this.m_popupActionDisposer && (this.m_popupActionDisposer(), (this.m_popupActionDisposer = void 0)); } get tab_set() { return this.m_tabSet; } ClearTabSet() { this.m_tabSet = void 0; } OnResize() { r.Ul.UIStore.OnTabSetResized(this.m_tabSet), super.OnResize(); } OnBeforeUnload() { this.m_tabSet && super.SetSavedDimensionsKey(this.m_tabSet.GetTabSetIdentifier()), super.OnBeforeUnload(); } OnClose() { if (this.m_tabSet) { let e = !1; null != this.m_popup.window && this.m_popup.window.SteamClient && this.m_popup.window.SteamClient.Window && this.m_popup.window.SteamClient.Window.ProcessShuttingDown && (e = this.m_popup.window.SteamClient.Window.ProcessShuttingDown()), this.m_tabSet.OnPopupClosed(e); } this.UnbindWindowHandlers(), this.m_reactRoot.unmount(); } Render(e, t) { t.setAttribute("class", "fullheight popup_chat_frame"), this.BindWindowHandlers(), (this.m_reactRoot = ge.s(t)), this.m_reactRoot.render(d.createElement(mt, { popup: this, chatTabs: this.m_tabSet })); } } (0, i.gn)([D.ak], ct.prototype, "SetTitle", null); let mt = class extends d.Component { render() { let e = this.props.popup.window, t = this.props.chatTabs, n = "popup_chat_frame fullheight"; return this.props.popup.focused && (n += " focused"), r.Ul.UIStore.GetTheaterMode() && (n += " TheaterMode"), r.Ul.CMInterface.BDisconnected() && (n += " errorDisconnected"), d.createElement($e, { ownerWindow: e }, d.createElement("div", { className: n, onContextMenu: De.T }, d.createElement(dt, { popup: this.props.popup.window }), d.createElement(Re.Y0, { browserInfo: this.props.popup.browser_info }, d.createElement(c.ar, { tabs: t, popup: e, ResponsiveWindowState: null })), o.De.IN_CLIENT && d.createElement(Me.f, { popup: e }))); } }; mt = (0, i.gn)([h.Pi], mt); let dt = class extends d.Component { OnKeyDown(e) { e.preventDefault(), e.stopPropagation(); } render() { return o.De.IN_CLIENT ? (r.Ul.CMInterface.BDisconnected() && !r.Ul.FriendStore.BIsOfflineMode() ? d.createElement("div", { className: "ConnectionTrouble", tabIndex: 0, onKeyDown: this.OnKeyDown }, d.createElement("div", { className: "ConnectionTroubleContent" }, d.createElement(Ae.T, { hideMin: !0, hideMax: !0, popup: this.props.popup }), d.createElement("div", { className: "ConnectionTroubleMessage" }, (0, R.Xx)("#ConnectionTrouble_CurrentlyDisconnected")))) : null) : d.createElement(ht, null); } }; (0, i.gn)([D.ak], dt.prototype, "OnKeyDown", null), (dt = (0, i.gn)([h.Pi], dt)); let ht = class extends d.Component { constructor(e) { super(e), (this.m_bRequestingNotificationPermission = !1), (this.state = { bShouldRequestNotificationPermission: !0, bShowStartupDelayMessage: !1, bShowReconnectWaitMessage: !1, cReconnectWaitSeconds: 0 }); } componentDidMount() { if (!r.Ul.ready_to_render) { let e = performance.now() - r.Ul.GetStartupTime(); this.m_iIntervalDelayedStartup = window.setTimeout(() => { this.setState({ bShowStartupDelayMessage: !0 }), (this.m_iIntervalDelayedStartup = void 0); }, 1500 - e); } } componentWillUnmount() { this.m_iIntervalDelayedStartup && (window.clearTimeout(this.m_iIntervalDelayedStartup), (this.m_iIntervalDelayedStartup = void 0)), this.m_iIntervalUpdateReconnectStatus && (window.clearInterval(this.m_iIntervalUpdateReconnectStatus), (this.m_iIntervalUpdateReconnectStatus = void 0)); } IntervalUpdateReconnectWaitStatus() { let e = a.g_FriendsUIDesktopApp.WebLogonManager; if (e.BIsWaitingToReconnect()) { let t = Math.ceil(e.GetMSUntilNextReconnectAttempt() / 1e3); t != this.state.cReconnectWaitSeconds && this.setState({ bShowReconnectWaitMessage: !0, cReconnectWaitSeconds: t }); } else window.clearInterval(this.m_iIntervalUpdateReconnectStatus), (this.m_iIntervalUpdateReconnectStatus = void 0), this.setState({ bShowReconnectWaitMessage: !1, cReconnectWaitSeconds: 0 }); } StartReconnectUpdateInterval() { this.m_iIntervalUpdateReconnectStatus || (this.m_iIntervalUpdateReconnectStatus = window.setInterval(this.IntervalUpdateReconnectWaitStatus, 250)); } OnReconnectNowClick() { a.g_FriendsUIDesktopApp.WebLogonManager.ReconnectNow(); } OnLoginClick() { window.location.href = window.location.href; } render() { let e = a.g_FriendsUIDesktopApp.WebLogonManager; if (((0, v.X)(e, "No WebLogonManager in WebConnectionTroubleOverlay"), !e)) return null; let t = null, n = e.web_logon_state, i = !r.Ul.NotificationManager.BNotificationsPermitted() && this.state.bShouldRequestNotificationPermission; if (9 != n || i) { let o, a = "", s = !1, l = !1; if (9 != n) if (r.Ul.ready_to_render || this.state.bShowStartupDelayMessage || !e.BIsInInitialConnect()) switch (n) { case 1: case 3: (o = (0, R.Xx)("#ConnectionTrouble_Connecting")), (l = !0); break; case 5: case 7: (o = (0, R.Xx)("#ConnectionTrouble_LoggingIn")), (l = !0); break; case 11: (o = (0, R.Xx)("#ConnectionTrouble_RetrievingLogin")), (l = !0); break; case 2: case 4: case 12: o = (0, R.Xx)("#ConnectionTrouble_FailedToConnect"); break; case 8: case 6: o = (0, R.Xx)("#ConnectionTrouble_FailedToLogIn"); break; case 10: o = (0, R.Xx)("#ConnectionTrouble_DisconnectedFinal"); break; case 13: (o = (0, R.Xx)("#ConnectionTrouble_LoginLost")), (s = !0); break; case 14: (o = (0, R.Xx)("#ConnectionTrouble_LoginChanged")), (s = !0); break; case 15: o = (0, R.Xx)("#ConnectionTrouble_LoggedOnElsewhere"); break; default: (0, v.X)(!1, `No message for trouble state ${n}`); } else a = "InitialConnect"; else i && (this.m_bRequestingNotificationPermission || (r.Ul.NotificationManager.RequestNotificationPermission().then(() => { (this.m_bRequestingNotificationPermission = !1), this.setState({ bShouldRequestNotificationPermission: !1 }); }), (this.m_bRequestingNotificationPermission = !0)), (a = "NotificationBrowserWarning"), (o = (0, R.Xx)("#NotificationBrowserWarning"))); let c = e.BIsWaitingToReconnect(), m = e.BWillAutoReconnect(); !this.state.bShowReconnectWaitMessage && m && this.StartReconnectUpdateInterval(), (!o && r.Ul.ready_to_render) || (t = d.createElement( Ce.Z, { classNames: "modalbg-anim", timeout: 300 }, d.createElement( "div", { className: "ConnectionTrouble WebConnectionTrouble" + (r.Ul.ready_to_render ? "" : " NotReadyToRender") }, d.createElement("div", { className: "" + a }), d.createElement( "div", { className: "ConnectionTroubleContent" }, d.createElement( "div", { className: "ConnectionTroubleMessage " + a }, d.createElement("div", { className: "errorMessageContainer" }, d.createElement("div", { className: "connectionThrobber" + (l ? " showThrobber" : "") }, l && d.createElement(N.V, { size: "small" }), " "), d.createElement("div", null, r.Ul.ready_to_render ? o : (0, R.Xx)("#ConnectionTrouble_Connecting"))), c && m && d.createElement("div", { className: "ReconnectWaitMessage" }, (0, R.kb)("#ConnectionTrouble_ReconnectingInSeconds", Math.ceil(e.GetMSUntilNextReconnectAttempt() / 1e3))), c && d.createElement("div", { className: "ConnectionTroubleReconnectMessage" }, d.createElement("div", { className: "ReconnectNow" }, d.createElement("button", { type: "button", className: "DialogButton Primary", onClick: this.OnReconnectNowClick }, (0, R.Xx)("#ConnectionTrouble_ReconnectNow")))), s && d.createElement("div", { className: "ConnectionTroubleReconnectMessage" }, d.createElement("div", { className: "ReconnectNow" }, d.createElement("button", { type: "button", className: "DialogButton Primary", onClick: this.OnLoginClick }, (0, R.Xx)(14 != n ? "#ConnectionTrouble_LoginAgain" : "#ConnectionTrouble_LoginChanged_Reload")))), ), ), ), )); } return d.createElement(fe.Z, null, t); } }; (0, i.gn)([D.ak], ht.prototype, "IntervalUpdateReconnectWaitStatus", null), (0, i.gn)([D.ak], ht.prototype, "OnReconnectNowClick", null), (0, i.gn)([D.ak], ht.prototype, "OnLoginClick", null), (ht = (0, i.gn)([h.Pi], ht)); }, 14341: (e, t, n) => { "use strict"; n.d(t, { VK: () => c.VK, b8: () => _, mO: () => p, ns: () => h, tS: () => g }); var i = n(85556), o = n(37234), r = n(24780), a = n(50649), s = n(27378), l = n(5997), c = n(37091); function m(e) { return "currentTarget" in e ? e.currentTarget.ownerDocument.defaultView : e; } function d(e) { if ("undefined" != typeof SteamClient && void 0 !== SteamClient.SharedConnection) { return (0, o.rb)(m(e)).m_unPID; } return 0; } function h(e) { let { bUseLinkFilter: t, href: n, bForceExternal: i } = e; return t && n && ((n = (0, l.d)(n)), (i = !0)), s.createElement(c.ns, Object.assign({}, e, { href: n, bForceExternal: i, bUseLinkFilter: !1, getPIDFromEvent: d, onContextMenu: u })); } function u(e) { let t = (0, o.Um)(null, e); return (0, c.k0)(e, t.m_unPID); } function p(e, t) { let n = (0, o.Um)(null, e); return (0, c.mO)(e, t, n.m_unPID); } function _(e, t, n = !1) { let i = { bForceExternal: n, unPID: d(e) }; return (0, c.b8)(m(e), t, i); } let g = class extends s.Component { render() { return s.createElement(s.Fragment, null, (0, r.y)(this.props.rtime, { bTimeOnly: this.props.bTimeOnly, bIncludeSeconds: this.props.bIncludeSeconds })); } }; g = (0, i.gn)([a.Pi], g); }, 92883: (e, t, n) => { "use strict"; n.d(t, { AZ: () => u, Ao: () => _, So: () => h, YO: () => m, fb: () => r, jr: () => l, p8: () => g, xU: () => a }); var i = n(27378), o = n(93635); class r extends i.Component { GetArgument(e, t = !1) { return !e || (t && void 0 === this.props.args[e]) ? this.props.args[""] : this.props.args[e]; } } class a extends i.PureComponent { constructor(e) { super(e), (this.state = { failedToRender: !1 }); } componentDidCatch(e, t) { this.setState({ failedToRender: !0 }); } render() { if (this.state.failedToRender) return this.props.bbcode; { let e = this.props.bbcode; return !0 !== this.props.bSkipTrimInput && (e = e.trim()), this.props.parser.ParseBBCode(e, this.props.context); } } } function s(e, t, n = 0) { if (2 == t.type) { let e = t.text.indexOf("="), n = t.text.indexOf(" "); if ((-1 != n && (-1 == e || n < e) && (e = n), e > 0)) { t.tag = t.text.substr(0, e); let n = t.text.substr(e); t.args = (function (e) { if (!e || e.length < 1) return {}; let t = {}, n = "", i = "", r = 0, a = 0; "=" == e[0] && (r = 2); let s = !1; for (a++; a < e.length; a++) { let l = e[a], c = !0, m = !1; switch (r) { case 0: if ("=" == l) return {}; if (" " == l) continue; r = 1; break; case 1: ("=" != l && " " != l) || s || ((r = " " == l ? 0 : 2), (c = !1)); break; case 2: " " == l ? ((r = 0), (c = !1), (m = !0)) : '"' == l ? ((r = 4), (c = !1)) : (r = 3); break; case 3: case 4: ((" " == l && 4 != r && !s) || ('"' == l && 4 == r && !s)) && ((r = 0), (c = !1), (m = !0)); } c && ("\\" != l || s ? ((s = !1), 1 == r ? (n += l) : 3 == r || 4 == r ? (i += l) : (0, o.X)(!1, "Not expecting to accumulate buffer in state %u", r)) : (s = !0)), m && ((t[n] = i), (n = ""), (i = "")); } 0 != r && (t[n] = i); return t; })(n); } else (t.args = {}), (t.tag = t.text); } e.push(t); let i = new p(); return (i.type = n), i; } function l(e) { let t = [], n = new p(), i = !1, o = !1; for (let r = 0; r < e.length; r++) { let a = e[r]; switch (n.type) { case 0: "[" == a ? ((n.type = 2), (o = !0)) : ((n.type = 1), "\\" == a ? (i = !i) : (n.text += a)); break; case 2: case 3: "/" == a && o ? ((n.type = 3), (n.text = ""), (o = !1)) : "[" != a || i ? ("]" != a || i ? ("\\" == a ? ((n.text += a), (i = !i), (o = !1)) : ((n.text += a), (i = !1), (o = !1))) : (o && n.ConvertMalformedNodeToText(), (n = s(t, n)), (o = !1))) : (n.ConvertMalformedNodeToText(), (n = s(t, n, 2)), (o = !0)); break; case 1: "[" != a || i ? ("\\" == a ? (i && (n.text += a), (i = !i)) : ((n.text += a), (i = !1))) : ((n = s(t, n, 2)), (o = !0)); } } return 0 != n.type && ((2 != n.type && 3 != n.type) || n.ConvertMalformedNodeToText(), t.push(n)), t; } class c { constructor(e) { this.m_dictComponents = e; } dictComponents() { return this.m_dictComponents; } } class m extends c { constructor(e) { super(e); } ParseBBCode(e, t) { let n = l(e); return this.Parse_NotificationHandlers(n, t); } Parse_NotificationHandlers(e, t) { let n, i, o = this.dictComponents(), r = ""; for (let t of e) if (2 == t.type) n || (n = []), n.push(t); else if (3 == t.type) { const e = n && n.pop(); 0 === n.length && e && e.tag == t.text && o[e.tag] && (i = e); } else 1 == t.type && (r += t.text); if (i) return o[i.tag]({ context: t, tagname: i.tag, args: i.args, text: r }); } } class d { constructor() { this.m_rctElements = []; } AppendText(e, t, n) { e.length && (t ? this.m_rctElements.push(i.createElement("span", { "data-copytext": "", "data-copystyle": "merge-adjacent", "bbcode-text": e }, e)) : this.m_rctElements.push(e)); } AppendNode(e, t) { this.m_rctElements.push(e); } GetElements(e) { return this.m_rctElements; } } class h extends d { AppendText(e, t, n) { let o = e, r = []; for (let e = o.indexOf("\n"); -1 !== e; e = o.indexOf("\n")) r.push(o.substr(0, e)), r.push(i.createElement("br")), (o = o.substr(e + 1)); o.length && r.push(o), t ? this.m_rctElements.push(i.createElement("span", { "data-copytext": "", "data-copystyle": "merge-adjacent", "bbcode-text": e }, ...r)) : this.m_rctElements.push(e); } } class u extends c { constructor(e, t = d) { super(e), (this.m_accumulatorType = t); } ParseBBCode(e, t) { if (e.startsWith("[pre]")) return i.createElement(this.dictComponents().pre, null, g(e)); if (e.startsWith("[code]")) return i.createElement(this.dictComponents().code, null, g(e)); let n = l(e); return this.Parse_BuildReactComponents(n, t); } Parse_BuildReactComponents(e, t) { let n, o = new this.m_accumulatorType(), r = this.dictComponents(); for ( e.forEach((e, a) => { if (1 == e.type) o.AppendText(e.text, !n || 0 == n.length, t); else if (2 == e.type) n || (n = []), n.push({ accumulator: o, node: e }), (o = new this.m_accumulatorType()); else if (3 == e.type) { let s = n && n.pop(); if (s && s.node.tag === e.text && r.hasOwnProperty(s.node.tag) && r[s.node.tag]) { const l = r[s.node.tag], c = n.map((e) => e.node.tag), m = { context: t, parentTags: c, tagname: s.node.tag, args: s.node.args, key: `${e.tag}_${a}` }, d = i.createElement(l, m, ...o.GetElements(e)); (o = s.accumulator), o.AppendNode(d, e); } else if (s) { let n = s.accumulator; n.AppendText("[" + s.node.text + "]", !1, t), o.GetElements(e).forEach((e) => n.AppendNode(e)), n.AppendText("[/" + e.text + "]", !1, t), (o = n); } } }); n && n.length; ) { let e = n.pop(), i = e.accumulator; i.AppendText("[" + e.node.text + "]", !1, t), o.GetElements().forEach((e) => i.AppendNode(e)), (o = i); } let a = o.GetElements(); return a.length > 1 ? i.createElement(i.Fragment, null, ...a) : 1 == a.length ? a[0] : null; } } class p { constructor() { (this.type = 0), (this.text = ""); } ConvertMalformedNodeToText() { 3 == this.type ? (this.text = "[/" + this.text) : 2 == this.type && (this.text = "[" + this.text), (this.type = 1); } } function _(e) { return e.replace(/[\[\\]/g, "\\$&"); } function g(e) { let t = "", n = l(e.trim()); for (let e of n) 1 == e.type && (t += e.text); return t; } }, 24780: (e, t, n) => { "use strict"; n.d(t, { y: () => s }); var i = n(72746), o = n(84290); let r = { TimeOfDay: new Intl.DateTimeFormat(o.Yt.GetPreferredLocales(), { hour: "numeric", minute: "numeric" }), TimeOfDayWithSecs: new Intl.DateTimeFormat(o.Yt.GetPreferredLocales(), { hour: "numeric", minute: "numeric", second: "numeric" }), TimeInWeek: Intl.DateTimeFormat(o.Yt.GetPreferredLocales(), { weekday: "long", hour: "numeric", minute: "numeric" }), FullTimestamp: Intl.DateTimeFormat(o.Yt.GetPreferredLocales(), { weekday: "long", year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric" }), FullTimestampNoWeekday: Intl.DateTimeFormat(o.Yt.GetPreferredLocales(), { year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric" }) }, a = { TimeOfDay: new Intl.DateTimeFormat(o.Yt.GetPreferredLocales(), { hour: "numeric", minute: "numeric", hourCycle: "h23" }), TimeOfDayWithSecs: new Intl.DateTimeFormat(o.Yt.GetPreferredLocales(), { hour: "numeric", minute: "numeric", second: "numeric", hourCycle: "h23" }), TimeInWeek: Intl.DateTimeFormat(o.Yt.GetPreferredLocales(), { weekday: "long", hour: "numeric", minute: "numeric", hourCycle: "h23" }), FullTimestamp: Intl.DateTimeFormat(o.Yt.GetPreferredLocales(), { weekday: "long", year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric", hourCycle: "h23" }), FullTimestampNoWeekday: Intl.DateTimeFormat(o.Yt.GetPreferredLocales(), { year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric", hourCycle: "h23" }) }; function s(e, t) { null == t.bIncludeWeekday && (t.bIncludeWeekday = !0), null == t.bRelativeDate && (t.bRelativeDate = !0); let n, s = i.Ul.RTime32ToDate(e), l = i.Ul.GetLocalMidnightInRTime32(), c = 86400, m = i.Ul.SettingsStore.FriendsSettings.b24HourClock ? a : r, d = t.Format; null == d && (d = t.bTimeOnly || e >= l - c ? (t.bIncludeSeconds ? m.TimeOfDayWithSecs : m.TimeOfDay) : t.bRelativeDate && e >= l - 432e3 ? m.TimeInWeek : t.bIncludeWeekday ? m.FullTimestamp : m.FullTimestampNoWeekday); try { n = d.format(s); } catch (e) { n = (0, o.Xx)("#ChatRoom_Timestamp_InvalidDate"); } return !t.bTimeOnly && t.bRelativeDate && e >= l - c && e < l && (n = (0, o.Xx)("#ChatRoom_Timestamp_Yesterday", n)), n; } }, 11612: (e, t, n) => { "use strict"; var i; function o(e) { return e === i.k_ESteamRealmChina; } n.d(t, { IN: () => i, e7: () => o }), (function (e) { (e[(e.k_ESteamRealmUnknown = 0)] = "k_ESteamRealmUnknown"), (e[(e.k_ESteamRealmGlobal = 1)] = "k_ESteamRealmGlobal"), (e[(e.k_ESteamRealmChina = 2)] = "k_ESteamRealmChina"); })(i || (i = {})); }, 78654: (e, t, n) => { "use strict"; function i(e) { return 3 == e || 6 == e; } function o(e) { return 5 == e || 6 == e; } n.d(t, { IF: () => N, Mq: () => m, QS: () => r, RI: () => l, YO: () => a, Z3: () => p, dt: () => C, eV: () => f, fk: () => o, g1: () => g, gg: () => k, hz: () => b, jA: () => h, jM: () => S, j_: () => v, my: () => i, p6: () => s, pv: () => c, px: () => I, r7: () => _, us: () => u, xM: () => d }); const r = 1, a = 4, s = 7, l = 750, c = 799, m = 250820, d = 330050, h = 358510, u = 366490; const p = "18446744073709551615", _ = 0, g = 2147483647; function C(e, t = "en") { switch (e) { case 0: return "en"; case 1: return "de"; case 2: return "fr"; case 3: return "it"; case 4: return "ko"; case 5: return "es"; case 6: return "zh-cn"; case 7: return "zh-tw"; case 8: return "ru"; case 9: return "th"; case 10: return "ja"; case 11: return "pt"; case 12: return "pl"; case 13: return "da"; case 14: return "nl"; case 15: return "fi"; case 16: return "no"; case 17: return "sv"; case 18: return "hu"; case 19: return "cs"; case 20: return "ro"; case 21: return "tr"; case 25: return "ar"; case 22: return "pt-br"; case 23: return "bg"; case 24: return "el"; case 26: return "uk"; case 27: return "es-419"; case 28: return "vi"; case 29: return "sc-sc"; case 30: return "id"; default: return t; } } const f = (e) => ("koreana" === e ? "korean" : e); function v(e, t = "") { switch (e) { case 0: return "english"; case 1: return "german"; case 2: return "french"; case 3: return "italian"; case 4: return "koreana"; case 5: return "spanish"; case 6: return "schinese"; case 7: return "tchinese"; case 8: return "russian"; case 9: return "thai"; case 10: return "japanese"; case 11: return "portuguese"; case 12: return "polish"; case 13: return "danish"; case 14: return "dutch"; case 15: return "finnish"; case 16: return "norwegian"; case 17: return "swedish"; case 18: return "hungarian"; case 19: return "czech"; case 20: return "romanian"; case 21: return "turkish"; case 25: return "arabic"; case 22: return "brazilian"; case 23: return "bulgarian"; case 24: return "greek"; case 26: return "ukrainian"; case 27: return "latam"; case 28: return "vietnamese"; case 29: return "sc_schinese"; case 30: return "indonesian"; default: return t; } } function S(e, t = 0) { switch (e) { case "english": return 0; case "german": return 1; case "french": return 2; case "italian": return 3; case "korean": case "koreana": return 4; case "spanish": return 5; case "schinese": return 6; case "tchinese": return 7; case "russian": return 8; case "thai": return 9; case "japanese": return 10; case "portuguese": return 11; case "polish": return 12; case "danish": return 13; case "dutch": return 14; case "finnish": return 15; case "norwegian": return 16; case "swedish": return 17; case "hungarian": return 18; case "czech": return 19; case "romanian": return 20; case "turkish": return 21; case "arabic": return 25; case "brazilian": return 22; case "bulgarian": return 23; case "greek": return 24; case "ukrainian": return 26; case "latam": return 27; case "vietnamese": return 28; case "sc_schinese": return 29; case "indonesian": return 30; default: return t; } } function b(e) { switch (e) { default: break; case 4: case 1: case 7: case 8: return !0; } return !1; } function I(e) { switch (e) { default: break; case 4: case 1: case 8: return !0; } return !1; } var y, E, D, w, R, A, M, k, T, L, G, O, F, B, x, N; !(function (e) { (e[(e.k_EConnectivityTestResult_Unknown = 0)] = "k_EConnectivityTestResult_Unknown"), (e[(e.k_EConnectivityTestResult_Connected = 1)] = "k_EConnectivityTestResult_Connected"), (e[(e.k_EConnectivityTestResult_CaptivePortal = 2)] = "k_EConnectivityTestResult_CaptivePortal"), (e[(e.k_EConnectivityTestResult_TimedOut = 3)] = "k_EConnectivityTestResult_TimedOut"), (e[(e.k_EConnectivityTestResult_Failed = 4)] = "k_EConnectivityTestResult_Failed"), (e[(e.k_EConnectivityTestResult_WifiDisabled = 5)] = "k_EConnectivityTestResult_WifiDisabled"), (e[(e.k_EConnectivityTestResult_NoLAN = 6)] = "k_EConnectivityTestResult_NoLAN"); })(y || (y = {})), (function (e) { (e[(e.k_ENetFakeLocalSystemState_Normal = 0)] = "k_ENetFakeLocalSystemState_Normal"), (e[(e.k_ENetFakeLocalSystemState_NoLAN = 1)] = "k_ENetFakeLocalSystemState_NoLAN"), (e[(e.k_ENetFakeLocalSystemState_CaptivePortal_Redirected = 2)] = "k_ENetFakeLocalSystemState_CaptivePortal_Redirected"), (e[(e.k_ENetFakeLocalSystemState_CaptivePortal_InPlace = 3)] = "k_ENetFakeLocalSystemState_CaptivePortal_InPlace"), (e[(e.k_ENetFakeLocalSystemState_NoInternet = 4)] = "k_ENetFakeLocalSystemState_NoInternet"), (e[(e.k_ENetFakeLocalSystemState_NoSteam = 5)] = "k_ENetFakeLocalSystemState_NoSteam"); })(E || (E = {})), (function (e) { (e[(e.k_ESuspendResumeProgressState_Invalid = 0)] = "k_ESuspendResumeProgressState_Invalid"), (e[(e.k_ESuspendResumeProgressState_Complete = 1)] = "k_ESuspendResumeProgressState_Complete"), (e[(e.k_ESuspendResumeProgressState_CloudSync = 2)] = "k_ESuspendResumeProgressState_CloudSync"), (e[(e.k_ESuspendResumeProgressState_LoggingIn = 3)] = "k_ESuspendResumeProgressState_LoggingIn"), (e[(e.k_ESuspendResumeProgressState_WaitingForApp = 4)] = "k_ESuspendResumeProgressState_WaitingForApp"), (e[(e.k_ESuspendResumeProgressState_Working = 5)] = "k_ESuspendResumeProgressState_Working"); })(D || (D = {})), (function (e) { (e[(e.k_EFloatingGamepadTextInputModeModeSingleLine = 0)] = "k_EFloatingGamepadTextInputModeModeSingleLine"), (e[(e.k_EFloatingGamepadTextInputModeModeMultipleLines = 1)] = "k_EFloatingGamepadTextInputModeModeMultipleLines"), (e[(e.k_EFloatingGamepadTextInputModeModeEmail = 2)] = "k_EFloatingGamepadTextInputModeModeEmail"), (e[(e.k_EFloatingGamepadTextInputModeModeNumeric = 3)] = "k_EFloatingGamepadTextInputModeModeNumeric"); })(w || (w = {})), (function (e) { (e[(e.k_EAppUpdateContentType_Content = 0)] = "k_EAppUpdateContentType_Content"), (e[(e.k_EAppUpdateContentType_Workshop = 1)] = "k_EAppUpdateContentType_Workshop"), (e[(e.k_EAppUpdateContentType_Shader = 2)] = "k_EAppUpdateContentType_Shader"), (e[(e.k_EAppUpdateContentType_Max = 3)] = "k_EAppUpdateContentType_Max"); })(R || (R = {})), (function (e) { (e[(e.k_EOverlayToStoreFlag_None = 0)] = "k_EOverlayToStoreFlag_None"), (e[(e.k_EOverlayToStoreFlag_AddToCart = 1)] = "k_EOverlayToStoreFlag_AddToCart"), (e[(e.k_EOverlayToStoreFlag_AddToCartAndShow = 2)] = "k_EOverlayToStoreFlag_AddToCartAndShow"); })(A || (A = {})), (function (e) { (e[(e.k_EActivateGameOverlayToWebPageMode_Default = 0)] = "k_EActivateGameOverlayToWebPageMode_Default"), (e[(e.k_EActivateGameOverlayToWebPageMode_Modal = 1)] = "k_EActivateGameOverlayToWebPageMode_Modal"); })(M || (M = {})), (function (e) { (e[(e.k_EGamingDeviceType_Unknown = 0)] = "k_EGamingDeviceType_Unknown"), (e[(e.k_EGamingDeviceType_StandardPC = 1)] = "k_EGamingDeviceType_StandardPC"), (e[(e.k_EGamingDeviceType_Console = 256)] = "k_EGamingDeviceType_Console"), (e[(e.k_EGamingDeviceType_PS3 = 272)] = "k_EGamingDeviceType_PS3"), (e[(e.k_EGamingDeviceType_Steambox = 288)] = "k_EGamingDeviceType_Steambox"), (e[(e.k_EGamingDeviceType_Handheld = 512)] = "k_EGamingDeviceType_Handheld"), (e[(e.k_EGamingDeviceType_Phone = 528)] = "k_EGamingDeviceType_Phone"), (e[(e.k_EGamingDeviceType_SteamDeck = 544)] = "k_EGamingDeviceType_SteamDeck"); })(k || (k = {})), (function (e) { (e[(e.k_ELoginUIStyleOld = 0)] = "k_ELoginUIStyleOld"), (e[(e.k_ELoginUIStyleNewWithoutQRCode = 1)] = "k_ELoginUIStyleNewWithoutQRCode"), (e[(e.k_ELoginUIStyleNew = 2)] = "k_ELoginUIStyleNew"); })(T || (T = {})), (function (e) { (e[(e.k_ECommunityProfileItemProperty_ImageSmall = 0)] = "k_ECommunityProfileItemProperty_ImageSmall"), (e[(e.k_ECommunityProfileItemProperty_ImageLarge = 1)] = "k_ECommunityProfileItemProperty_ImageLarge"), (e[(e.k_ECommunityProfileItemProperty_InternalName = 2)] = "k_ECommunityProfileItemProperty_InternalName"), (e[(e.k_ECommunityProfileItemProperty_Title = 3)] = "k_ECommunityProfileItemProperty_Title"), (e[(e.k_ECommunityProfileItemProperty_Description = 4)] = "k_ECommunityProfileItemProperty_Description"), (e[(e.k_ECommunityProfileItemProperty_AppID = 5)] = "k_ECommunityProfileItemProperty_AppID"), (e[(e.k_ECommunityProfileItemProperty_TypeID = 6)] = "k_ECommunityProfileItemProperty_TypeID"), (e[(e.k_ECommunityProfileItemProperty_Class = 7)] = "k_ECommunityProfileItemProperty_Class"), (e[(e.k_ECommunityProfileItemProperty_MovieWebM = 8)] = "k_ECommunityProfileItemProperty_MovieWebM"), (e[(e.k_ECommunityProfileItemProperty_MovieMP4 = 9)] = "k_ECommunityProfileItemProperty_MovieMP4"), (e[(e.k_ECommunityProfileItemProperty_MovieWebMSmall = 10)] = "k_ECommunityProfileItemProperty_MovieWebMSmall"), (e[(e.k_ECommunityProfileItemProperty_MovieMP4Small = 11)] = "k_ECommunityProfileItemProperty_MovieMP4Small"); })(L || (L = {})), (function (e) { (e[(e.k_ERaiseGameWindowResult_NotRunning = 1)] = "k_ERaiseGameWindowResult_NotRunning"), (e[(e.k_ERaiseGameWindowResult_Success = 2)] = "k_ERaiseGameWindowResult_Success"), (e[(e.k_ERaiseGameWindowResult_Failure = 3)] = "k_ERaiseGameWindowResult_Failure"); })(G || (G = {})), (function (e) { (e[(e.k_EPositionInvalid = -1)] = "k_EPositionInvalid"), (e[(e.k_EPositionTopLeft = 0)] = "k_EPositionTopLeft"), (e[(e.k_EPositionTopRight = 1)] = "k_EPositionTopRight"), (e[(e.k_EPositionBottomLeft = 2)] = "k_EPositionBottomLeft"), (e[(e.k_EPositionBottomRight = 3)] = "k_EPositionBottomRight"); })(O || (O = {})), (function (e) { (e[(e.k_EAppReleaseState_Unknown = 0)] = "k_EAppReleaseState_Unknown"), (e[(e.k_EAppReleaseState_Unavailable = 1)] = "k_EAppReleaseState_Unavailable"), (e[(e.k_EAppReleaseState_Prerelease = 2)] = "k_EAppReleaseState_Prerelease"), (e[(e.k_EAppReleaseState_PreloadOnly = 3)] = "k_EAppReleaseState_PreloadOnly"), (e[(e.k_EAppReleaseState_Released = 4)] = "k_EAppReleaseState_Released"), (e[(e.k_EAppReleaseState_Disabled = 5)] = "k_EAppReleaseState_Disabled"); })(F || (F = {})), (function (e) { (e[(e.k_EGameIDTypeApp = 0)] = "k_EGameIDTypeApp"), (e[(e.k_EGameIDTypeGameMod = 1)] = "k_EGameIDTypeGameMod"), (e[(e.k_EGameIDTypeShortcut = 2)] = "k_EGameIDTypeShortcut"), (e[(e.k_EGameIDTypeP2P = 3)] = "k_EGameIDTypeP2P"); })(B || (B = {})), (function (e) { (e[(e.k_EInstallMgrStateNone = 0)] = "k_EInstallMgrStateNone"), (e[(e.k_EInstallMgrStateSetup = 1)] = "k_EInstallMgrStateSetup"), (e[(e.k_EInstallMgrStateWaitLicense = 2)] = "k_EInstallMgrStateWaitLicense"), (e[(e.k_EInstallMgrStateFreeLicense = 3)] = "k_EInstallMgrStateFreeLicense"), (e[(e.k_EInstallMgrStateShowCDKey = 4)] = "k_EInstallMgrStateShowCDKey"), (e[(e.k_EInstallMgrStateWaitAppInfo = 5)] = "k_EInstallMgrStateWaitAppInfo"), (e[(e.k_EInstallMgrStateShowPassword = 6)] = "k_EInstallMgrStateShowPassword"), (e[(e.k_EInstallMgrStateShowConfig = 7)] = "k_EInstallMgrStateShowConfig"), (e[(e.k_EInstallMgrStateShowEULAs = 8)] = "k_EInstallMgrStateShowEULAs"), (e[(e.k_EInstallMgrStateCreateApps = 9)] = "k_EInstallMgrStateCreateApps"), (e[(e.k_EInstallMgrStateReadFromMedia = 10)] = "k_EInstallMgrStateReadFromMedia"), (e[(e.k_EInstallMgrStateShowChangeMedia = 11)] = "k_EInstallMgrStateShowChangeMedia"), (e[(e.k_EInstallMgrStateWaitLegacyCDKeys = 12)] = "k_EInstallMgrStateWaitLegacyCDKeys"), (e[(e.k_EInstallMgrStateShowSignup = 13)] = "k_EInstallMgrStateShowSignup"), (e[(e.k_EInstallMgrStateComplete = 14)] = "k_EInstallMgrStateComplete"), (e[(e.k_EInstallMgrStateFailed = 15)] = "k_EInstallMgrStateFailed"), (e[(e.k_EInstallMgrStateCanceled = 16)] = "k_EInstallMgrStateCanceled"); })(x || (x = {})), (function (e) { (e[(e.k_EWindowBringToFrontInvalid = 0)] = "k_EWindowBringToFrontInvalid"), (e[(e.k_EWindowBringToFrontAndForceOS = 1)] = "k_EWindowBringToFrontAndForceOS"), (e[(e.k_EWindowBringToFrontWithoutForcingOS = 2)] = "k_EWindowBringToFrontWithoutForcingOS"); })(N || (N = {})); }, 34294: (e, t, n) => { "use strict"; n.d(t, { Su: () => s, Xg: () => o, i_: () => i }); var i, o, r, a; function s(e) { return e == i.EBrowserType_OpenVROverlay || e == i.EBrowserType_OpenVROverlay_Dashboard || e == i.EBrowserType_OpenVROverlay_Subview; } !(function (e) { (e[(e.EBrowserType_OffScreen = 0)] = "EBrowserType_OffScreen"), (e[(e.EBrowserType_OpenVROverlay = 1)] = "EBrowserType_OpenVROverlay"), (e[(e.EBrowserType_OpenVROverlay_Dashboard = 2)] = "EBrowserType_OpenVROverlay_Dashboard"), (e[(e.EBrowserType_DirectHWND = 3)] = "EBrowserType_DirectHWND"), (e[(e.EBrowserType_DirectHWND_Borderless = 4)] = "EBrowserType_DirectHWND_Borderless"), (e[(e.EBrowserType_DirectHWND_Hidden = 5)] = "EBrowserType_DirectHWND_Hidden"), (e[(e.EBrowserType_ChildHWNDNative = 6)] = "EBrowserType_ChildHWNDNative"), (e[(e.EBrowserType_Transparent_Toplevel = 7)] = "EBrowserType_Transparent_Toplevel"), (e[(e.EBrowserType_OffScreen_SharedTexture = 8)] = "EBrowserType_OffScreen_SharedTexture"), (e[(e.EBrowserType_OffScreen_GameOverlay = 9)] = "EBrowserType_OffScreen_GameOverlay"), (e[(e.EBrowserType_OffScreen_GameOverlay_SharedTexture = 10)] = "EBrowserType_OffScreen_GameOverlay_SharedTexture"), (e[(e.EBrowserType_Offscreen_FriendsUI = 11)] = "EBrowserType_Offscreen_FriendsUI"), (e[(e.EBrowserType_Offscreen_SteamUI = 12)] = "EBrowserType_Offscreen_SteamUI"), (e[(e.EBrowserType_OpenVROverlay_Subview = 13)] = "EBrowserType_OpenVROverlay_Subview"); })(i || (i = {})), (function (e) { (e[(e.SystemKey0 = 0)] = "SystemKey0"), (e[(e.SystemKey1 = 1)] = "SystemKey1"); })(o || (o = {})), (function (e) { (e[(e.Hidden = 0)] = "Hidden"), (e[(e.Notification = 1)] = "Notification"), (e[(e.Overlay = 2)] = "Overlay"), (e[(e.Opaque = 3)] = "Opaque"), (e[(e.OverlayKeyboard = 4)] = "OverlayKeyboard"); })(r || (r = {})), (function (e) { (e[(e.MainGamepadUI = 0)] = "MainGamepadUI"), (e[(e.OverlayGamepadUI = 1)] = "OverlayGamepadUI"), (e[(e.Keyboard = 2)] = "Keyboard"), (e[(e.ControllerConfigurator = 3)] = "ControllerConfigurator"), (e[(e.VR = 4)] = "VR"), (e[(e.MainDesktopUI = 5)] = "MainDesktopUI"), (e[(e.DesktopLogin = 6)] = "DesktopLogin"), (e[(e.OverlayDesktopUI = 7)] = "OverlayDesktopUI"), (e[(e.SteamChinaReviewLauncher = 8)] = "SteamChinaReviewLauncher"); })(a || (a = {})); }, 49367: (e, t, n) => { "use strict"; n.d(t, { c$: () => o, m$: () => i }); const i = { broadcastid: "0", nViewers: 0, nRequests: 0, bIsBroadcasting: !1, bIsRecordingDesktop: !1, bBroadcastCapable: !1 }; var o; !(function (e) { (e[(e.k_EPending = 0)] = "k_EPending"), (e[(e.k_EAccepted = 1)] = "k_EAccepted"), (e[(e.k_ERejected = 2)] = "k_ERejected"); })(o || (o = {})); }, 54054: (e, t, n) => { "use strict"; var i; n.d(t, { u: () => i }), (function (e) { (e[(e.k_ERemoteClientLaunchOK = 1)] = "k_ERemoteClientLaunchOK"), (e[(e.k_ERemoteClientLaunchFail = 2)] = "k_ERemoteClientLaunchFail"), (e[(e.k_ERemoteClientLaunchRequiresUI = 3)] = "k_ERemoteClientLaunchRequiresUI"), (e[(e.k_ERemoteClientLaunchRequiresLaunchOption = 4)] = "k_ERemoteClientLaunchRequiresLaunchOption"), (e[(e.k_ERemoteClientLaunchRequiresEULA = 5)] = "k_ERemoteClientLaunchRequiresEULA"), (e[(e.k_ERemoteClientLaunchTimeout = 6)] = "k_ERemoteClientLaunchTimeout"), (e[(e.k_ERemoteClientLaunchStreamTimeout = 7)] = "k_ERemoteClientLaunchStreamTimeout"), (e[(e.k_ERemoteClientLaunchStreamClientFail = 8)] = "k_ERemoteClientLaunchStreamClientFail"), (e[(e.k_ERemoteClientLaunchOtherGameRunning = 9)] = "k_ERemoteClientLaunchOtherGameRunning"), (e[(e.k_ERemoteClientLaunchDownloadStarted = 10)] = "k_ERemoteClientLaunchDownloadStarted"), (e[(e.k_ERemoteClientLaunchDownloadNoSpace = 11)] = "k_ERemoteClientLaunchDownloadNoSpace"), (e[(e.k_ERemoteClientLaunchDownloadFiltered = 12)] = "k_ERemoteClientLaunchDownloadFiltered"), (e[(e.k_ERemoteClientLaunchDownloadRequiresUI = 13)] = "k_ERemoteClientLaunchDownloadRequiresUI"), (e[(e.k_ERemoteClientLaunchAccessDenied = 14)] = "k_ERemoteClientLaunchAccessDenied"), (e[(e.k_ERemoteClientLaunchNetworkError = 15)] = "k_ERemoteClientLaunchNetworkError"), (e[(e.k_ERemoteClientLaunchProgress = 16)] = "k_ERemoteClientLaunchProgress"), (e[(e.k_ERemoteClientLaunchParentalUnlockFailed = 17)] = "k_ERemoteClientLaunchParentalUnlockFailed"), (e[(e.k_ERemoteClientLaunchScreenLocked = 18)] = "k_ERemoteClientLaunchScreenLocked"), (e[(e.k_ERemoteClientLaunchUnsupported = 19)] = "k_ERemoteClientLaunchUnsupported"), (e[(e.k_ERemoteClientLaunchDisabledLocal = 20)] = "k_ERemoteClientLaunchDisabledLocal"), (e[(e.k_ERemoteClientLaunchDisabledRemote = 21)] = "k_ERemoteClientLaunchDisabledRemote"), (e[(e.k_ERemoteClientLaunchBroadcasting = 22)] = "k_ERemoteClientLaunchBroadcasting"), (e[(e.k_ERemoteClientLaunchBusy = 23)] = "k_ERemoteClientLaunchBusy"), (e[(e.k_ERemoteClientLaunchDriversNotInstalled = 24)] = "k_ERemoteClientLaunchDriversNotInstalled"), (e[(e.k_ERemoteClientLaunchTransportUnavailable = 25)] = "k_ERemoteClientLaunchTransportUnavailable"), (e[(e.k_ERemoteClientLaunchCanceled = 26)] = "k_ERemoteClientLaunchCanceled"), (e[(e.k_ERemoteClientLaunchInvisible = 27)] = "k_ERemoteClientLaunchInvisible"), (e[(e.k_ERemoteClientLaunchRestrictedCountry = 28)] = "k_ERemoteClientLaunchRestrictedCountry"); })(i || (i = {})); }, 53971: (e, t, n) => { "use strict"; n.d(t, { k: () => i }); function i() { return { bNotifications_ShowIngame: !0, bNotifications_ShowOnline: !1, bNotifications_ShowMessage: !0, bNotifications_EventsAndAnnouncements: !0, bSounds_PlayIngame: !1, bSounds_PlayOnline: !1, bSounds_PlayMessage: !0, bSounds_EventsAndAnnouncements: !1, bAlwaysNewChatWindow: !1, bForceAlphabeticFriendSorting: !1, nChatFlashMode: 0, bRememberOpenChats: !0, bCompactQuickAccess: !1, bCompactFriendsList: !1, bNotifications_ShowChatRoomNotification: !0, bSounds_PlayChatRoomNotification: !0, bHideOfflineFriendsInTagGroups: !1, bHideCategorizedFriends: !1, bCategorizeInGameFriendsByGame: !0, nChatFontSize: 2, b24HourClock: !1, bDoNotDisturbMode: !1, bDisableEmbedInlining: !1, bSignIntoFriends: !0, bDisableSpellcheck: !1, bDisableRoomEffects: !1, bAnimatedAvatars: !0, featuresEnabled: {} }; } }, 39827: (e, t, n) => { "use strict"; var i; n.d(t, { c4: () => o, w8: () => r }), (function (e) { (e[(e.k_ELaunchOptionType_None = 0)] = "k_ELaunchOptionType_None"), (e[(e.k_ELaunchOptionType_Default = 1)] = "k_ELaunchOptionType_Default"), (e[(e.k_ELaunchOptionType_SafeMode = 2)] = "k_ELaunchOptionType_SafeMode"), (e[(e.k_ELaunchOptionType_Multiplayer = 3)] = "k_ELaunchOptionType_Multiplayer"), (e[(e.k_ELaunchOptionType_Config = 4)] = "k_ELaunchOptionType_Config"), (e[(e.k_ELaunchOptionType_OpenVR = 5)] = "k_ELaunchOptionType_OpenVR"), (e[(e.k_ELaunchOptionType_Server = 6)] = "k_ELaunchOptionType_Server"), (e[(e.k_ELaunchOptionType_Editor = 7)] = "k_ELaunchOptionType_Editor"), (e[(e.k_ELaunchOptionType_Manual = 8)] = "k_ELaunchOptionType_Manual"), (e[(e.k_ELaunchOptionType_Benchmark = 9)] = "k_ELaunchOptionType_Benchmark"), (e[(e.k_ELaunchOptionType_Option1 = 10)] = "k_ELaunchOptionType_Option1"), (e[(e.k_ELaunchOptionType_Option2 = 11)] = "k_ELaunchOptionType_Option2"), (e[(e.k_ELaunchOptionType_Option3 = 12)] = "k_ELaunchOptionType_Option3"), (e[(e.k_ELaunchOptionType_OculusVR = 13)] = "k_ELaunchOptionType_OculusVR"), (e[(e.k_ELaunchOptionType_OpenVROverlay = 14)] = "k_ELaunchOptionType_OpenVROverlay"), (e[(e.k_ELaunchOptionType_OSVR = 15)] = "k_ELaunchOptionType_OSVR"), (e[(e.k_ELaunchOptionType_OpenXR = 16)] = "k_ELaunchOptionType_OpenXR"), (e[(e.k_ELaunchOptionType_Dialog = 1e3)] = "k_ELaunchOptionType_Dialog"); })(i || (i = {})); var o, r; !(function (e) { (e[(e.k_EComputerActiveStateInvalid = 0)] = "k_EComputerActiveStateInvalid"), (e[(e.k_EComputerActiveStateActive = 1)] = "k_EComputerActiveStateActive"), (e[(e.k_EComputerActiveStateIdle = 2)] = "k_EComputerActiveStateIdle"); })(o || (o = {})), (function (e) { (e[(e.k_EClientUsedInputTypeKeyboard = 0)] = "k_EClientUsedInputTypeKeyboard"), (e[(e.k_EClientUsedInputTypeMouse = 1)] = "k_EClientUsedInputTypeMouse"), (e[(e.k_EClientUsedInputTypeController = 2)] = "k_EClientUsedInputTypeController"), (e[(e.k_EClientUsedInputTypeMax = 3)] = "k_EClientUsedInputTypeMax"); })(r || (r = {})); }, 45193: (e, t, n) => { "use strict"; var i, o, r, a, s, l; n.d(t, { $6: () => s, sH: () => r, vS: () => a }), (function (e) { (e[(e.Invalid = 0)] = "Invalid"), (e[(e.TrackingSystemName_String = 1e3)] = "TrackingSystemName_String"), (e[(e.ModelNumber_String = 1001)] = "ModelNumber_String"), (e[(e.SerialNumber_String = 1002)] = "SerialNumber_String"), (e[(e.RenderModelName_String = 1003)] = "RenderModelName_String"), (e[(e.WillDriftInYaw_Bool = 1004)] = "WillDriftInYaw_Bool"), (e[(e.ManufacturerName_String = 1005)] = "ManufacturerName_String"), (e[(e.TrackingFirmwareVersion_String = 1006)] = "TrackingFirmwareVersion_String"), (e[(e.HardwareRevision_String = 1007)] = "HardwareRevision_String"), (e[(e.AllWirelessDongleDescriptions_String = 1008)] = "AllWirelessDongleDescriptions_String"), (e[(e.ConnectedWirelessDongle_String = 1009)] = "ConnectedWirelessDongle_String"), (e[(e.DeviceIsWireless_Bool = 1010)] = "DeviceIsWireless_Bool"), (e[(e.DeviceIsCharging_Bool = 1011)] = "DeviceIsCharging_Bool"), (e[(e.DeviceBatteryPercentage_Float = 1012)] = "DeviceBatteryPercentage_Float"), (e[(e.StatusDisplayTransform_Matrix34 = 1013)] = "StatusDisplayTransform_Matrix34"), (e[(e.Firmware_UpdateAvailable_Bool = 1014)] = "Firmware_UpdateAvailable_Bool"), (e[(e.Firmware_ManualUpdate_Bool = 1015)] = "Firmware_ManualUpdate_Bool"), (e[(e.Firmware_ManualUpdateURL_String = 1016)] = "Firmware_ManualUpdateURL_String"), (e[(e.HardwareRevision_Uint64 = 1017)] = "HardwareRevision_Uint64"), (e[(e.FirmwareVersion_Uint64 = 1018)] = "FirmwareVersion_Uint64"), (e[(e.FPGAVersion_Uint64 = 1019)] = "FPGAVersion_Uint64"), (e[(e.VRCVersion_Uint64 = 1020)] = "VRCVersion_Uint64"), (e[(e.RadioVersion_Uint64 = 1021)] = "RadioVersion_Uint64"), (e[(e.DongleVersion_Uint64 = 1022)] = "DongleVersion_Uint64"), (e[(e.BlockServerShutdown_Bool = 1023)] = "BlockServerShutdown_Bool"), (e[(e.CanUnifyCoordinateSystemWithHmd_Bool = 1024)] = "CanUnifyCoordinateSystemWithHmd_Bool"), (e[(e.ContainsProximitySensor_Bool = 1025)] = "ContainsProximitySensor_Bool"), (e[(e.DeviceProvidesBatteryStatus_Bool = 1026)] = "DeviceProvidesBatteryStatus_Bool"), (e[(e.DeviceCanPowerOff_Bool = 1027)] = "DeviceCanPowerOff_Bool"), (e[(e.Firmware_ProgrammingTarget_String = 1028)] = "Firmware_ProgrammingTarget_String"), (e[(e.DeviceClass_Int32 = 1029)] = "DeviceClass_Int32"), (e[(e.HasCamera_Bool = 1030)] = "HasCamera_Bool"), (e[(e.DriverVersion_String = 1031)] = "DriverVersion_String"), (e[(e.Firmware_ForceUpdateRequired_Bool = 1032)] = "Firmware_ForceUpdateRequired_Bool"), (e[(e.ViveSystemButtonFixRequired_Bool = 1033)] = "ViveSystemButtonFixRequired_Bool"), (e[(e.ParentDriver_Uint64 = 1034)] = "ParentDriver_Uint64"), (e[(e.ResourceRoot_String = 1035)] = "ResourceRoot_String"), (e[(e.RegisteredDeviceType_String = 1036)] = "RegisteredDeviceType_String"), (e[(e.InputProfilePath_String = 1037)] = "InputProfilePath_String"), (e[(e.NeverTracked_Bool = 1038)] = "NeverTracked_Bool"), (e[(e.NumCameras_Int32 = 1039)] = "NumCameras_Int32"), (e[(e.CameraFrameLayout_Int32 = 1040)] = "CameraFrameLayout_Int32"), (e[(e.CameraStreamFormat_Int32 = 1041)] = "CameraStreamFormat_Int32"), (e[(e.AdditionalDeviceSettingsPath_String = 1042)] = "AdditionalDeviceSettingsPath_String"), (e[(e.DevicePowerUsage_Float = 1052)] = "DevicePowerUsage_Float"), (e[(e.ActualTrackingSystemName_String = 1054)] = "ActualTrackingSystemName_String"), (e[(e.ReportsTimeSinceVSync_Bool = 2e3)] = "ReportsTimeSinceVSync_Bool"), (e[(e.SecondsFromVsyncToPhotons_Float = 2001)] = "SecondsFromVsyncToPhotons_Float"), (e[(e.DisplayFrequency_Float = 2002)] = "DisplayFrequency_Float"), (e[(e.UserIpdMeters_Float = 2003)] = "UserIpdMeters_Float"), (e[(e.CurrentUniverseId_Uint64 = 2004)] = "CurrentUniverseId_Uint64"), (e[(e.PreviousUniverseId_Uint64 = 2005)] = "PreviousUniverseId_Uint64"), (e[(e.DisplayFirmwareVersion_Uint64 = 2006)] = "DisplayFirmwareVersion_Uint64"), (e[(e.IsOnDesktop_Bool = 2007)] = "IsOnDesktop_Bool"), (e[(e.DisplayMCType_Int32 = 2008)] = "DisplayMCType_Int32"), (e[(e.DisplayMCOffset_Float = 2009)] = "DisplayMCOffset_Float"), (e[(e.DisplayMCScale_Float = 2010)] = "DisplayMCScale_Float"), (e[(e.EdidVendorID_Int32 = 2011)] = "EdidVendorID_Int32"), (e[(e.DisplayMCImageLeft_String = 2012)] = "DisplayMCImageLeft_String"), (e[(e.DisplayMCImageRight_String = 2013)] = "DisplayMCImageRight_String"), (e[(e.DisplayGCBlackClamp_Float = 2014)] = "DisplayGCBlackClamp_Float"), (e[(e.EdidProductID_Int32 = 2015)] = "EdidProductID_Int32"), (e[(e.CameraToHeadTransform_Matrix34 = 2016)] = "CameraToHeadTransform_Matrix34"), (e[(e.DisplayGCType_Int32 = 2017)] = "DisplayGCType_Int32"), (e[(e.DisplayGCOffset_Float = 2018)] = "DisplayGCOffset_Float"), (e[(e.DisplayGCScale_Float = 2019)] = "DisplayGCScale_Float"), (e[(e.DisplayGCPrescale_Float = 2020)] = "DisplayGCPrescale_Float"), (e[(e.DisplayGCImage_String = 2021)] = "DisplayGCImage_String"), (e[(e.LensCenterLeftU_Float = 2022)] = "LensCenterLeftU_Float"), (e[(e.LensCenterLeftV_Float = 2023)] = "LensCenterLeftV_Float"), (e[(e.LensCenterRightU_Float = 2024)] = "LensCenterRightU_Float"), (e[(e.LensCenterRightV_Float = 2025)] = "LensCenterRightV_Float"), (e[(e.UserHeadToEyeDepthMeters_Float = 2026)] = "UserHeadToEyeDepthMeters_Float"), (e[(e.CameraFirmwareVersion_Uint64 = 2027)] = "CameraFirmwareVersion_Uint64"), (e[(e.CameraFirmwareDescription_String = 2028)] = "CameraFirmwareDescription_String"), (e[(e.DisplayFPGAVersion_Uint64 = 2029)] = "DisplayFPGAVersion_Uint64"), (e[(e.DisplayBootloaderVersion_Uint64 = 2030)] = "DisplayBootloaderVersion_Uint64"), (e[(e.DisplayHardwareVersion_Uint64 = 2031)] = "DisplayHardwareVersion_Uint64"), (e[(e.AudioFirmwareVersion_Uint64 = 2032)] = "AudioFirmwareVersion_Uint64"), (e[(e.CameraCompatibilityMode_Int32 = 2033)] = "CameraCompatibilityMode_Int32"), (e[(e.ScreenshotHorizontalFieldOfViewDegrees_Float = 2034)] = "ScreenshotHorizontalFieldOfViewDegrees_Float"), (e[(e.ScreenshotVerticalFieldOfViewDegrees_Float = 2035)] = "ScreenshotVerticalFieldOfViewDegrees_Float"), (e[(e.DisplaySuppressed_Bool = 2036)] = "DisplaySuppressed_Bool"), (e[(e.DisplayAllowNightMode_Bool = 2037)] = "DisplayAllowNightMode_Bool"), (e[(e.DisplayMCImageWidth_Int32 = 2038)] = "DisplayMCImageWidth_Int32"), (e[(e.DisplayMCImageHeight_Int32 = 2039)] = "DisplayMCImageHeight_Int32"), (e[(e.DisplayMCImageNumChannels_Int32 = 2040)] = "DisplayMCImageNumChannels_Int32"), (e[(e.DisplayMCImageData_Binary = 2041)] = "DisplayMCImageData_Binary"), (e[(e.SecondsFromPhotonsToVblank_Float = 2042)] = "SecondsFromPhotonsToVblank_Float"), (e[(e.DriverDirectModeSendsVsyncEvents_Bool = 2043)] = "DriverDirectModeSendsVsyncEvents_Bool"), (e[(e.DisplayDebugMode_Bool = 2044)] = "DisplayDebugMode_Bool"), (e[(e.GraphicsAdapterLuid_Uint64 = 2045)] = "GraphicsAdapterLuid_Uint64"), (e[(e.DriverProvidedChaperonePath_String = 2048)] = "DriverProvidedChaperonePath_String"), (e[(e.ExpectedTrackingReferenceCount_Int32 = 2049)] = "ExpectedTrackingReferenceCount_Int32"), (e[(e.ExpectedControllerCount_Int32 = 2050)] = "ExpectedControllerCount_Int32"), (e[(e.NamedIconPathControllerLeftDeviceOff_String = 2051)] = "NamedIconPathControllerLeftDeviceOff_String"), (e[(e.NamedIconPathControllerRightDeviceOff_String = 2052)] = "NamedIconPathControllerRightDeviceOff_String"), (e[(e.NamedIconPathTrackingReferenceDeviceOff_String = 2053)] = "NamedIconPathTrackingReferenceDeviceOff_String"), (e[(e.DoNotApplyPrediction_Bool = 2054)] = "DoNotApplyPrediction_Bool"), (e[(e.CameraToHeadTransforms_Matrix34_Array = 2055)] = "CameraToHeadTransforms_Matrix34_Array"), (e[(e.DistortionMeshResolution_Int32 = 2056)] = "DistortionMeshResolution_Int32"), (e[(e.DriverIsDrawingControllers_Bool = 2057)] = "DriverIsDrawingControllers_Bool"), (e[(e.DriverRequestsApplicationPause_Bool = 2058)] = "DriverRequestsApplicationPause_Bool"), (e[(e.DriverRequestsReducedRendering_Bool = 2059)] = "DriverRequestsReducedRendering_Bool"), (e[(e.MinimumIpdStepMeters_Float = 2060)] = "MinimumIpdStepMeters_Float"), (e[(e.AudioBridgeFirmwareVersion_Uint64 = 2061)] = "AudioBridgeFirmwareVersion_Uint64"), (e[(e.ImageBridgeFirmwareVersion_Uint64 = 2062)] = "ImageBridgeFirmwareVersion_Uint64"), (e[(e.ImuToHeadTransform_Matrix34 = 2063)] = "ImuToHeadTransform_Matrix34"), (e[(e.ImuFactoryGyroBias_Vector3 = 2064)] = "ImuFactoryGyroBias_Vector3"), (e[(e.ImuFactoryGyroScale_Vector3 = 2065)] = "ImuFactoryGyroScale_Vector3"), (e[(e.ImuFactoryAccelerometerBias_Vector3 = 2066)] = "ImuFactoryAccelerometerBias_Vector3"), (e[(e.ImuFactoryAccelerometerScale_Vector3 = 2067)] = "ImuFactoryAccelerometerScale_Vector3"), (e[(e.ConfigurationIncludesLighthouse20Features_Bool = 2069)] = "ConfigurationIncludesLighthouse20Features_Bool"), (e[(e.Prop_AdditionalRadioFeatures_Uint64 = 2070)] = "Prop_AdditionalRadioFeatures_Uint64"), (e[(e.Prop_CameraWhiteBalance_Vector4_Array = 2071)] = "Prop_CameraWhiteBalance_Vector4_Array"), (e[(e.Prop_CameraDistortionFunction_Int32_Array = 2072)] = "Prop_CameraDistortionFunction_Int32_Array"), (e[(e.Prop_CameraDistortionCoefficients_Float_Array = 2073)] = "Prop_CameraDistortionCoefficients_Float_Array"), (e[(e.Prop_ExpectedControllerType_String = 2074)] = "Prop_ExpectedControllerType_String"), (e[(e.HmdTrackingStyle_Int32 = 2075)] = "HmdTrackingStyle_Int32"), (e[(e.DriverProvidedChaperoneVisibility_Bool = 2076)] = "DriverProvidedChaperoneVisibility_Bool"), (e[(e.HmdColumnCorrectionSettingPrefix_String = 2077)] = "HmdColumnCorrectionSettingPrefix_String"), (e[(e.CameraSupportsCompatibilityModes_Bool = 2078)] = "CameraSupportsCompatibilityModes_Bool"), (e[(e.SupportsRoomViewDepthProjection_Bool = 2079)] = "SupportsRoomViewDepthProjection_Bool"), (e[(e.DisplayAvailableFrameRates_Float_Array = 2080)] = "DisplayAvailableFrameRates_Float_Array"), (e[(e.DisplaySupportsRuntimeFramerateChange_Bool = 2084)] = "DisplaySupportsRuntimeFramerateChange_Bool"), (e[(e.DisplaySupportsAnalogGain_Bool = 2085)] = "DisplaySupportsAnalogGain_Bool"), (e[(e.DisplayMinAnalogGain_Float = 2086)] = "DisplayMinAnalogGain_Float"), (e[(e.DisplayMaxAnalogGain_Float = 2087)] = "DisplayMaxAnalogGain_Float"), (e[(e.DashboardScale_Float = 2091)] = "DashboardScale_Float"), (e[(e.PeerButtonInfo_String = 2092)] = "PeerButtonInfo_String"), (e[(e.IpdUIRangeMinMeters_Float = 2100)] = "IpdUIRangeMinMeters_Float"), (e[(e.IpdUIRangeMaxMeters_Float = 2101)] = "IpdUIRangeMaxMeters_Float"), (e[(e.Hmd_SupportsHDCP14LegacyCompat_Bool = 2102)] = "Hmd_SupportsHDCP14LegacyCompat_Bool"), (e[(e.Hmd_SupportsMicMonitoring_Bool = 2103)] = "Hmd_SupportsMicMonitoring_Bool"), (e[(e.Hmd_SupportsDisplayPortTrainingMode_Bool = 2104)] = "Hmd_SupportsDisplayPortTrainingMode_Bool"), (e[(e.Hmd_SupportsRoomViewDirect_Bool = 2105)] = "Hmd_SupportsRoomViewDirect_Bool"), (e[(e.Hmd_SupportsAppThrottling_Bool = 2106)] = "Hmd_SupportsAppThrottling_Bool"), (e[(e.Hmd_SupportsGpuBusMonitoring_Bool = 2107)] = "Hmd_SupportsGpuBusMonitoring_Bool"), (e[(e.DriverProvidedIPDVisibility_Bool = 2108)] = "DriverProvidedIPDVisibility_Bool"), (e[(e.Prop_Driver_Reserved_01 = 2109)] = "Prop_Driver_Reserved_01"), (e[(e.DriverRequestedMuraCorrectionMode_Int32 = 2200)] = "DriverRequestedMuraCorrectionMode_Int32"), (e[(e.DriverRequestedMuraFeather_InnerLeft_Int32 = 2201)] = "DriverRequestedMuraFeather_InnerLeft_Int32"), (e[(e.DriverRequestedMuraFeather_InnerRight_Int32 = 2202)] = "DriverRequestedMuraFeather_InnerRight_Int32"), (e[(e.DriverRequestedMuraFeather_InnerTop_Int32 = 2203)] = "DriverRequestedMuraFeather_InnerTop_Int32"), (e[(e.DriverRequestedMuraFeather_InnerBottom_Int32 = 2204)] = "DriverRequestedMuraFeather_InnerBottom_Int32"), (e[(e.DriverRequestedMuraFeather_OuterLeft_Int32 = 2205)] = "DriverRequestedMuraFeather_OuterLeft_Int32"), (e[(e.DriverRequestedMuraFeather_OuterRight_Int32 = 2206)] = "DriverRequestedMuraFeather_OuterRight_Int32"), (e[(e.DriverRequestedMuraFeather_OuterTop_Int32 = 2207)] = "DriverRequestedMuraFeather_OuterTop_Int32"), (e[(e.DriverRequestedMuraFeather_OuterBottom_Int32 = 2208)] = "DriverRequestedMuraFeather_OuterBottom_Int32"), (e[(e.Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303)] = "Audio_SupportsDualSpeakerAndJackOutput_Bool"), (e[(e.AttachedDeviceId_String = 3e3)] = "AttachedDeviceId_String"), (e[(e.SupportedButtons_Uint64 = 3001)] = "SupportedButtons_Uint64"), (e[(e.Axis0Type_Int32 = 3002)] = "Axis0Type_Int32"), (e[(e.Axis1Type_Int32 = 3003)] = "Axis1Type_Int32"), (e[(e.Axis2Type_Int32 = 3004)] = "Axis2Type_Int32"), (e[(e.Axis3Type_Int32 = 3005)] = "Axis3Type_Int32"), (e[(e.Axis4Type_Int32 = 3006)] = "Axis4Type_Int32"), (e[(e.ControllerRoleHint_Int32 = 3007)] = "ControllerRoleHint_Int32"), (e[(e.FieldOfViewLeftDegrees_Float = 4e3)] = "FieldOfViewLeftDegrees_Float"), (e[(e.FieldOfViewRightDegrees_Float = 4001)] = "FieldOfViewRightDegrees_Float"), (e[(e.FieldOfViewTopDegrees_Float = 4002)] = "FieldOfViewTopDegrees_Float"), (e[(e.FieldOfViewBottomDegrees_Float = 4003)] = "FieldOfViewBottomDegrees_Float"), (e[(e.TrackingRangeMinimumMeters_Float = 4004)] = "TrackingRangeMinimumMeters_Float"), (e[(e.TrackingRangeMaximumMeters_Float = 4005)] = "TrackingRangeMaximumMeters_Float"), (e[(e.ModeLabel_String = 4006)] = "ModeLabel_String"), (e[(e.IconPathName_String = 5e3)] = "IconPathName_String"), (e[(e.NamedIconPathDeviceOff_String = 5001)] = "NamedIconPathDeviceOff_String"), (e[(e.NamedIconPathDeviceSearching_String = 5002)] = "NamedIconPathDeviceSearching_String"), (e[(e.NamedIconPathDeviceSearchingAlert_String = 5003)] = "NamedIconPathDeviceSearchingAlert_String"), (e[(e.NamedIconPathDeviceReady_String = 5004)] = "NamedIconPathDeviceReady_String"), (e[(e.NamedIconPathDeviceReadyAlert_String = 5005)] = "NamedIconPathDeviceReadyAlert_String"), (e[(e.NamedIconPathDeviceNotReady_String = 5006)] = "NamedIconPathDeviceNotReady_String"), (e[(e.NamedIconPathDeviceStandby_String = 5007)] = "NamedIconPathDeviceStandby_String"), (e[(e.NamedIconPathDeviceAlertLow_String = 5008)] = "NamedIconPathDeviceAlertLow_String"), (e[(e.DisplayHiddenArea_Binary_Start = 5100)] = "DisplayHiddenArea_Binary_Start"), (e[(e.DisplayHiddenArea_Binary_End = 5150)] = "DisplayHiddenArea_Binary_End"), (e[(e.ParentContainer = 5151)] = "ParentContainer"), (e[(e.UserConfigPath_String = 6e3)] = "UserConfigPath_String"), (e[(e.InstallPath_String = 6001)] = "InstallPath_String"), (e[(e.HasDisplayComponent_Bool = 6002)] = "HasDisplayComponent_Bool"), (e[(e.HasControllerComponent_Bool = 6003)] = "HasControllerComponent_Bool"), (e[(e.HasCameraComponent_Bool = 6004)] = "HasCameraComponent_Bool"), (e[(e.HasDriverDirectModeComponent_Bool = 6005)] = "HasDriverDirectModeComponent_Bool"), (e[(e.HasVirtualDisplayComponent_Bool = 6006)] = "HasVirtualDisplayComponent_Bool"), (e[(e.HasSpatialAnchorsSupport_Bool = 6007)] = "HasSpatialAnchorsSupport_Bool"), (e[(e.ControllerType_String = 7e3)] = "ControllerType_String"), (e[(e.LegacyInputProfile_String = 7001)] = "LegacyInputProfile_String"), (e[(e.VendorSpecific_Reserved_Start = 1e4)] = "VendorSpecific_Reserved_Start"), (e[(e.VendorSpecific_Reserved_End = 10999)] = "VendorSpecific_Reserved_End"), (e[(e.TrackedDeviceProperty_Max = 1e6)] = "TrackedDeviceProperty_Max"); })(i || (i = {})), (function (e) { (e[(e.k_EButton_System = 0)] = "k_EButton_System"), (e[(e.k_EButton_ApplicationMenu = 1)] = "k_EButton_ApplicationMenu"), (e[(e.k_EButton_Grip = 2)] = "k_EButton_Grip"), (e[(e.k_EButton_DPad_Left = 3)] = "k_EButton_DPad_Left"), (e[(e.k_EButton_DPad_Up = 4)] = "k_EButton_DPad_Up"), (e[(e.k_EButton_DPad_Right = 5)] = "k_EButton_DPad_Right"), (e[(e.k_EButton_DPad_Down = 6)] = "k_EButton_DPad_Down"), (e[(e.k_EButton_A = 7)] = "k_EButton_A"), (e[(e.k_EButton_ProximitySensor = 31)] = "k_EButton_ProximitySensor"), (e[(e.k_EButton_Axis0 = 32)] = "k_EButton_Axis0"), (e[(e.k_EButton_Axis1 = 33)] = "k_EButton_Axis1"), (e[(e.k_EButton_Axis2 = 34)] = "k_EButton_Axis2"), (e[(e.k_EButton_Axis3 = 35)] = "k_EButton_Axis3"), (e[(e.k_EButton_Axis4 = 36)] = "k_EButton_Axis4"), (e[(e.k_EButton_SteamVR_Touchpad = 32)] = "k_EButton_SteamVR_Touchpad"), (e[(e.k_EButton_SteamVR_Trigger = 33)] = "k_EButton_SteamVR_Trigger"), (e[(e.k_EButton_Dashboard_Back = 2)] = "k_EButton_Dashboard_Back"), (e[(e.k_EButton_IndexController_A = 2)] = "k_EButton_IndexController_A"), (e[(e.k_EButton_IndexController_B = 1)] = "k_EButton_IndexController_B"), (e[(e.k_EButton_IndexController_JoyStick = 35)] = "k_EButton_IndexController_JoyStick"), (e[(e.k_EButton_Reserved0 = 50)] = "k_EButton_Reserved0"), (e[(e.k_EButton_Reserved1 = 51)] = "k_EButton_Reserved1"), (e[(e.k_EButton_Max = 64)] = "k_EButton_Max"); })(o || (o = {})), (function (e) { (e[(e.None = 0)] = "None"), (e[(e.ButtonEnter = 1)] = "ButtonEnter"), (e[(e.ButtonLeave = 2)] = "ButtonLeave"), (e[(e.Snap = 3)] = "Snap"), (e[(e.Sliding = 4)] = "Sliding"), (e[(e.SlidingEdge = 5)] = "SlidingEdge"); })(r || (r = {})), (function (e) { (e[(e.Minimal = 1)] = "Minimal"), (e[(e.Modal = 2)] = "Modal"), (e[(e.ShowArrowKeys = 4)] = "ShowArrowKeys"), (e[(e.HideDoneKey = 8)] = "HideDoneKey"); })(a || (a = {})), (function (e) { (e[(e.Unknown = -1)] = "Unknown"), (e[(e.Idle = 0)] = "Idle"), (e[(e.UserInteraction = 1)] = "UserInteraction"), (e[(e.UserInteraction_Timeout = 2)] = "UserInteraction_Timeout"), (e[(e.Standby = 3)] = "Standby"), (e[(e.Idle_Timeout = 4)] = "Idle_Timeout"); })(s || (s = {})), (function (e) { (e[(e.Notification_Shown = 600)] = "Notification_Shown"), (e[(e.Notification_Hidden = 601)] = "Notification_Hidden"), (e[(e.Notification_BeginInteraction = 602)] = "Notification_BeginInteraction"), (e[(e.Notification_Destroyed = 603)] = "Notification_Destroyed"); })(l || (l = {})); }, 37232: (e, t, n) => { "use strict"; n.d(t, { Vj: () => r, xB: () => a }); var i = n(85556), o = (n(27378), n(41370)); function r(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { 0; }); } function a() { return (0, o.SZ)(() => { 0; }); } }, 1736: (e, t, n) => { "use strict"; n.d(t, { MD: () => l, gA: () => s, lq: () => a }); var i = n(2260), o = (n(6181), n(27918)), r = n(23282); n(1687); class a { static InstallErrorReportingStore(e) { this.sm_ErrorReportingStore = e; } static InitHeaderFromPacket(e) { return new a(void 0, e); } constructor(e, t, n, r, a, s) { if (r) (this.m_eMsg = r.m_eMsg), (this.m_bValid = r.m_bValid), this.m_bValid && ((this.m_netPacket = r.m_netPacket), (this.m_cubHeader = r.m_cubHeader), (this.m_header = r.m_header), this.InitForType(n)); else { if (((this.m_header = new o.Cu(null)), (this.m_bValid = !0), t)) if (((this.m_netPacket = t), this.m_netPacket.SeekGetHead(), (this.m_eMsg = this.m_netPacket.GetUint32()), 2147483648 & this.m_eMsg)) { (this.m_eMsg = 2147483647 & this.m_eMsg), (this.m_cubHeader = this.m_netPacket.GetUint32()); try { o.Cu.deserializeBinaryFromReader(this.m_header, new i.BinaryReader(this.m_netPacket.GetPacket(), this.m_netPacket.TellGet(), this.m_cubHeader)), this.m_netPacket.SeekGetCurrent(this.m_cubHeader), n && this.InitForType(n); } catch (e) { console.error("Exception deserializing protobuf", e), (this.m_bValid = !1); } } else this.m_bValid = !1; else e && (this.m_eMsg = e), s && n ? (this.m_body = n.fromObject(s)) : n && (this.m_body = new n()); a && this.m_header.set_jobid_target(a.Hdr().jobid_target()); } } InitForType(e) { (this.m_body = new e()), this.m_netPacket && (this.m_netPacket.SeekGetHead(8 + this.m_cubHeader), this.ReadBodyFromBuffer(e, this.m_netPacket)); } ReadBodyFromBuffer(e, t) { try { e.deserializeBinaryFromReader(this.m_body, new i.BinaryReader(t.GetPacket(), t.TellGet(), t.GetCountBytesRemaining())); } catch (e) { this.m_bValid = !1; const t = a.sm_ErrorReportingStore, n = `Exception parsing protobuf message body of type ${this.m_eMsg}. Definitions may be out of sync with server version.`; t && t.ReportError(new Error(n), { bIncludeMessageInIdentifier: !0 }), console.warn(n), console.log(e.stack || e); } } BIsValid() { return this.m_bValid; } Body() { return this.m_body; } SetBodyJSON(e) { (e.toObject = () => e), (this.m_body = e); } Hdr() { return this.m_header; } GetEMsg() { return this.m_eMsg; } SetEMsg(e) { this.m_eMsg = e; } GetEResult() { return this.Hdr().eresult(); } BSuccess() { return 1 == this.Hdr().eresult(); } GetErrorMessage() { return this.Hdr().error_message() ? this.Hdr().error_message() : `eresult ${this.Hdr().eresult()}`; } Serialize() { const e = this.m_header.serializeBinary(), t = this.m_body.serializeBinary(), n = 2147483648 | this.m_eMsg, i = new Uint8Array(8 + e.length + t.length), o = new r.At(i); return o.PutUint32(n), o.PutUint32(e.length), o.PutBytes(e), o.PutBytes(t), i; } SerializeBody() { const e = this.m_body.serializeBinary(), t = new Uint8Array(e.length); return new r.At(t).PutBytes(e), t; } DEBUG_ToObject() { return {}; } DEBUG_LogToConsole() { 0; } } class s extends a { constructor(e, t = 0, n, i, o) { super(t, n, e, i, void 0, o); } static InitFromPacket(e, t) { return new s(e, 0, t); } static InitFromMsg(e, t) { return new s(e, void 0, void 0, t); } static Init(e, t) { return new s(e, t); } static InitFromObject(e, t) { return new s(e, void 0, void 0, void 0, t); } Body() { return super.Body(); } SetBodyFields(e) { for (const t in e) Array.isArray(e[t]) ? this.Body()[`add_${t}`] && e[t].forEach((e) => { this.Body()[`add_${t}`](e); }) : this.Body()[`set_${t}`] && this.Body()[`set_${t}`](e[t]); } } function l(e, t) { return t instanceof s ? t : s.InitFromObject(e, t); } }, 4073: (e, t, n) => { "use strict"; n.d(t, { Bh: () => a, F: () => c, FE: () => o, TA: () => l, Xc: () => r, aD: () => s, aR: () => d, l2: () => m }); var i = n(2260); const o = i.BinaryReader.prototype, r = i.BinaryWriter.prototype; function a(e) { const t = {}, { fields: n } = e; for (const e in n) { const i = n[e]; t[i.n] = i; } return t; } function s(e, t) { const { proto: n, fields: o } = e, r = new n(); if (null == t) return r; for (const e in o) { const { n, c: a, r: s, d: l, q: c } = o[e]; if (!Object.prototype.hasOwnProperty.call(t, e)) continue; const m = t[e]; a ? (s ? i.Message.setRepeatedWrapperField(r, n, Array.isArray(m) ? m.map((e) => a.fromObject(e)) : []) : i.Message.setWrapperField(r, n, a.fromObject(m))) : i.Message.setField(r, n, m); } return r; } function l(e, t, n) { const { proto: o, fields: r } = e, a = {}; for (const e in r) { const { n: o, c: s, r: l, d: c, q: m } = r[e]; if (s) if (l) a[e] = i.Message.toObjectList(i.Message.getRepeatedWrapperField(n, s, o), s.toObject, t); else { const r = i.Message.getWrapperField(n, s, o, m ? 1 : 0); r && (a[e] = s.toObject(t, r)); } else { const t = i.Message.getFieldWithDefault(n, o, void 0 !== c ? c : null); (null !== t || m) && (a[e] = t); } } return t && (a.$jspbMessageInstance = n), a; } function c(e, t, n) { for (; n.nextField() && !n.isEndGroup(); ) { const o = e[n.getFieldNumber()]; if (o) { const { n: e, c: r, r: a, d: s, q: l, br: c } = o; if (r) { const o = new r(); n.readMessage(o, r.deserializeBinaryFromReader), a ? i.Message.addToRepeatedWrapperField(t, e, o, r) : i.Message.setWrapperField(t, e, o); } else if (c) { const o = c.call(n); a ? i.Message.addToRepeatedField(t, e, o) : i.Message.setField(t, e, o); } else console.assert(!!c, `Reader func not set for field number ${e} in class ${r}`), n.skipField(); } else n.skipField(); } return t; } function m(e, t, n) { const { fields: o } = e; for (const e in o) { const { n: r, c: a, r: s, d: l, q: c, bw: m } = o[e]; if (a) if (s) { const e = i.Message.getRepeatedWrapperField(t, a, r); ((e && e.length) || c) && n.writeRepeatedMessage(r, e, a.serializeBinaryToWriter); } else { const e = i.Message.getWrapperField(t, a, r, c ? 1 : 0); e && n.writeMessage(r, e, a.serializeBinaryToWriter); } else if (m) { const e = i.Message.getField(t, r); void 0 !== e && m.call(n, r, e); } else console.assert(!!m, `Writer func not set for field number ${r} in class ${a}`); } } function d(e) { const t = e.proto; for (const n in e.fields) { const o = e.fields[n], { n: r, c: a, r: s, d: l, q: c } = o; Object.prototype.hasOwnProperty.call(o, "d") ? (t.prototype[n] = h(i.Message.getFieldWithDefault, r, l)) : (t.prototype[n] = a ? (s ? h(i.Message.getRepeatedWrapperField, a, r) : u(a, r)) : h(i.Message.getField, r)), (t.prototype[`set_${n}`] = p(a ? (s ? i.Message.setRepeatedWrapperField : i.Message.setWrapperField) : i.Message.setField, r)), s && (t.prototype[`add_${n}`] = _(r, a)); } } function h(e, ...t) { return function () { return e(this, ...t); }; } function u(e, t) { return function (n = !0) { return i.Message.getWrapperField(this, e, t, n ? 1 : 0); }; } function p(e, t) { return function (n) { return e(this, t, n); }; } function _(e, t) { return t ? function (n, o) { return i.Message.addToRepeatedWrapperField(this, e, n, t, o); } : function (t, n) { i.Message.addToRepeatedField(this, e, t, n); }; } }, 23282: (e, t, n) => { "use strict"; n.d(t, { $x: () => a, At: () => i, BH: () => r }); class i { constructor(e, t = 0, n) { (this.m_nOffset = t || 0), e instanceof Uint8Array || e instanceof DataView ? ((this.m_nLength = n || e.byteLength - this.m_nOffset), (this.m_nOffset += e.byteOffset), (this.m_viewPacket = new DataView(e.buffer, this.m_nOffset, this.m_nLength))) : ((this.m_nLength = n || e.byteLength - this.m_nOffset), (this.m_viewPacket = new DataView(e, this.m_nOffset, this.m_nLength))), (this.m_rgubPacket = new Uint8Array(this.m_viewPacket.buffer, this.m_viewPacket.byteOffset, this.m_viewPacket.byteLength)), (this.m_iGet = 0), (this.m_iPut = 0); } TellGet() { return this.m_iGet + this.m_viewPacket.byteOffset; } GetPacket() { return this.m_viewPacket.buffer; } GetUint8() { return this.m_viewPacket.getUint8(this.m_iGet++); } GetUint32(e = !0) { const t = this.m_viewPacket.getUint32(this.m_iGet, e); return (this.m_iGet += 4), t; } SeekGetHead(e = 0) { this.m_iGet = e || 0; } SeekGetCurrent(e) { this.m_iGet += e; } TellPut() { return this.m_iPut + this.m_viewPacket.byteOffset; } TellMaxPut() { return this.m_viewPacket.byteLength; } PutUint8(e) { this.m_viewPacket.setUint8(this.m_iPut++, e); } PutUint32(e, t = !0) { this.m_viewPacket.setUint32(this.m_iPut, e, t), (this.m_iPut += 4); } PutBytes(e) { this.m_rgubPacket.set(e, this.m_iPut), (this.m_iPut += e.length); } SeekPut(e) { this.m_iPut += e; } GetCountBytesRemaining() { return this.m_viewPacket.byteLength - this.m_iGet; } } const o = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; function r(e) { let t = ""; for (let n = 0; n < e.length; n++) { const i = e[n]; t += o[i >>> 4] + o[15 & i]; } return t; } function a(e) { const t = new Uint8Array(e.length / 2); for (let n = 0; n < e.length - 1; n += 2) t[n / 2] = parseInt(e.substr(n, 2), 16); return t; } }, 72086: (e, t, n) => { "use strict"; n.d(t, { SM: () => o }); const i = new (class { constructor() { (this.m_transport = null), (this.m_registry = null); } SetDefaultTransport(e) { null != this.m_transport && console.error("Multiple attempts to set a default WebUI transport: overriding previous"), (this.m_transport = e); } GetDefaultTransport() { return this.m_transport; } SetDefaultHandlerRegistry(e) { null != this.m_registry && console.error("Multiple attempts to set a default WebUI message handler registry: overriding previous"), (this.m_registry = e); } GetDefaultHandlerRegistry() { return this.m_registry; } })(); function o() { return i; } }, 1687: (e, t, n) => { "use strict"; var i; !(function (e) { (e[(e.k_EAccountFlagNormalUser = 0)] = "k_EAccountFlagNormalUser"), (e[(e.k_EAccountFlagPersonaNameSet = 1)] = "k_EAccountFlagPersonaNameSet"), (e[(e.k_EAccountFlagUnbannable = 2)] = "k_EAccountFlagUnbannable"), (e[(e.k_EAccountFlagPasswordSet = 4)] = "k_EAccountFlagPasswordSet"), (e[(e.k_EAccountFlagSupport = 8)] = "k_EAccountFlagSupport"), (e[(e.k_EAccountFlagAdmin = 16)] = "k_EAccountFlagAdmin"), (e[(e.k_EAccountFlagSupervisor = 32)] = "k_EAccountFlagSupervisor"), (e[(e.k_EAccountFlagAppEditor = 64)] = "k_EAccountFlagAppEditor"), (e[(e.k_EAccountFlagHWIDSet = 128)] = "k_EAccountFlagHWIDSet"), (e[(e.k_EAccountFlagVacBeta = 512)] = "k_EAccountFlagVacBeta"), (e[(e.k_EAccountFlagDebug = 1024)] = "k_EAccountFlagDebug"), (e[(e.k_EAccountFlagDisabled = 2048)] = "k_EAccountFlagDisabled"), (e[(e.k_EAccountFlagLimitedUser = 4096)] = "k_EAccountFlagLimitedUser"), (e[(e.k_EAccountFlagLimitedUserForce = 8192)] = "k_EAccountFlagLimitedUserForce"), (e[(e.k_EAccountFlagEmailValidated = 16384)] = "k_EAccountFlagEmailValidated"), (e[(e.k_EAccountFlagForcePasswordChange = 131072)] = "k_EAccountFlagForcePasswordChange"), (e[(e.k_EAccountFlagLogonExtraSecurity = 524288)] = "k_EAccountFlagLogonExtraSecurity"), (e[(e.k_EAccountFlagLogonExtraSecurityDisabled = 1048576)] = "k_EAccountFlagLogonExtraSecurityDisabled"), (e[(e.k_EAccountFlagSteam2MigrationComplete = 2097152)] = "k_EAccountFlagSteam2MigrationComplete"), (e[(e.k_EAccountFlagNeedLogs = 4194304)] = "k_EAccountFlagNeedLogs"), (e[(e.k_EAccountFlagLockdown = 8388608)] = "k_EAccountFlagLockdown"), (e[(e.k_EAccountFlagMasterAppEditor = 16777216)] = "k_EAccountFlagMasterAppEditor"), (e[(e.k_EAccountFlagBannedFromWebAPI = 33554432)] = "k_EAccountFlagBannedFromWebAPI"), (e[(e.k_EAccountFlagPartnerMember = 67108864)] = "k_EAccountFlagPartnerMember"), (e[(e.k_EAccountFlagGlobalModerator = 134217728)] = "k_EAccountFlagGlobalModerator"), (e[(e.k_EAccountFlagParentalSettings = 268435456)] = "k_EAccountFlagParentalSettings"), (e[(e.k_EAccountFlagThirdPartySupport = 536870912)] = "k_EAccountFlagThirdPartySupport"), (e[(e.k_EAccountFlagNeedsSSANextSteamLogon = 1073741824)] = "k_EAccountFlagNeedsSSANextSteamLogon"); })(i || (i = {})); i.k_EAccountFlagAdmin, i.k_EAccountFlagSupervisor, i.k_EAccountFlagSupport, i.k_EAccountFlagAdmin, i.k_EAccountFlagSupervisor; n(72080); }, 71129: (e, t, n) => { "use strict"; n.d(t, { Z6: () => m, p8: () => _, NO: () => g, UC: () => p, A1: () => u }); var i = n(27378), o = n(78654), r = n(10553), a = n(60439); class s { constructor() { (this.type = 0), (this.text = ""); } ConvertMalformedNodeToText() { 3 == this.type ? (this.text = "[/" + this.text) : 2 == this.type && (this.text = "[" + this.text), (this.type = 1); } } class l { constructor(e, t) { (this.m_dictComponents = void 0), (this.m_dictComponents = e), (this.m_fnAccumulatorFactory = t); } Parse(e, t, n = !1) { const i = (function (e, t) { const n = []; let i = new s(), o = !1, r = !1, a = !1; for (let s = 0; s < e.length; s++) { let l = e[s]; switch (i.type) { case 0: "[" == l ? ((i.type = 2), (r = !0)) : ((i.type = 1), "\\" == l && t ? (o = !o) : (i.text += l)); break; case 2: case 3: if ("/" == l && r) (i.type = 3), (i.text = ""), (r = !1); else if ("[" != l || o) if ("]" != l || o) "\\" == l && t ? ((i.text += l), (o = !o), (r = !1)) : ((i.text += l), (o = !1), (r = !1)); else { const e = 2 == i.type && "noparse" == i.text.toLocaleLowerCase(), t = 3 == i.type && "noparse" == i.text.toLocaleLowerCase(); r || (a && !t) ? (i.ConvertMalformedNodeToText(), (i.text += l)) : e ? (a = !0) : t && (a = !1), (i = c(n, i)), (r = !1); } else i.ConvertMalformedNodeToText(), (i = c(n, i, 2)), (r = !0); break; case 1: "[" != l || o ? ("\\" == l && t ? (o && (i.text += l), (o = !o)) : ((i.text += l), (o = !1))) : ((i = c(n, i, 2)), (r = !0)); } } 0 != i.type && ((2 != i.type && 3 != i.type) || i.ConvertMalformedNodeToText(), n.push(i)); return n; })(e, n); return this.Parse_BuildElements(i, t); } Parse_BuildElements(e, t) { let n = this.m_fnAccumulatorFactory(void 0), i = [], o = function () { return i.length < 1 ? void 0 : i[i.length - 1]; }, r = this.m_dictComponents, a = !1, s = !0, l = function (e, o, l) { if (e && e.node.tag === o.text && (null == r ? void 0 : r.get(e.node.tag))) { const o = r.get(e.node.tag), l = i.map((e) => e.node.tag), c = { parentTags: l, tagname: e.node.tag, args: e.node.args }, m = t(o.Constructor, c, ...n.GetElements()); (n = e.accumulator), n.AppendNode(m), (a = !!o.skipFollowingNewline), (s = e.bWrapTextForCopying); } else if (e) { let t = e.accumulator; t.AppendText("[" + e.node.text + "]", !1), n.GetElements().forEach((e) => t.AppendNode(e)), t.AppendText("[/" + o.text + "]", !1), (n = t), (s = e.bWrapTextForCopying); } }; for ( e.forEach((e, t) => { var c, m, d; if (1 == e.type) { const t = a ? e.text.replace(/^[\t\r ]*\n/g, "") : e.text; n.AppendText(t, s), (a = !1); } else if (2 == e.type) { const t = null == r ? void 0 : r.get(e.tag); if (t) { const m = o(); if (void 0 !== m) { const t = null == r ? void 0 : r.get(m.node.tag); t && t.autocloses && e.tag === m.node.tag && l(i.pop(), m.node); } i.push({ accumulator: n, node: e, bWrapTextForCopying: s }), (n = this.m_fnAccumulatorFactory(e)), (a = !!t.skipInternalNewline), (s = null !== (c = t.allowWrapTextForCopying) && void 0 !== c && c); } else n.AppendText("[" + e.text + "]", 0 == i.length); } else if (3 == e.type) { for (; o() && o().node.tag !== e.text && (null == r ? void 0 : r.get(o().node.tag)) && (null === (m = null == r ? void 0 : r.get(o().node.tag)) || void 0 === m ? void 0 : m.autocloses); ) { const e = i.pop(); l(e, e.node); } if ((null === (d = o()) || void 0 === d ? void 0 : d.node.tag) == e.text) { const t = i.pop(); l(t, e); } else n.AppendText("[/" + e.text + "]", 0 == i.length); } }); i.length > 0; ) { let e = i.pop(), t = e.accumulator; t.AppendText("[" + e.node.text + "]", !1), n.GetElements().forEach((e) => t.AppendNode(e)), (n = t); } return n.GetElements(); } } function c(e, t, n = 0) { if (2 == t.type) { let e = t.text.indexOf("="), n = t.text.indexOf(" "); if ((-1 != n && (-1 == e || n < e) && (e = n), e > 0)) { t.tag = t.text.substr(0, e).toLocaleLowerCase(); let n = t.text.substr(e); t.args = (function (e) { if (!e || e.length < 1) return {}; let t = {}, n = "", i = "", o = 0, r = 0; "=" == e[0] && (o = 2); let a = !1; for (r++; r < e.length; r++) { let s = e[r], l = !0, c = !1; switch (o) { case 0: if ("=" == s) return {}; if (" " == s) continue; o = 1; break; case 1: ("=" != s && " " != s) || a || (" " == s ? ((o = 0), (c = !0)) : (o = 2), (l = !1)); break; case 2: " " == s ? ((o = 0), (l = !1), (c = !0)) : '"' == s ? ((o = 4), (l = !1)) : (o = 3); break; case 3: case 4: ((" " == s && 4 != o && !a) || ('"' == s && 4 == o && !a)) && ((o = 0), (l = !1), (c = !0)); } if (l) if ("\\" != s || a) if (((a = !1), 1 == o)) n += s; else { if (3 != o && 4 != o) throw new Error("Not expecting to accumulate buffer in state " + o); i += s; } else a = !0; c && ((t[n] = i), (n = ""), (i = "")); } 0 != o && (t[n] = i); return t; })(n); } else (t.args = {}), (t.tag = t.text.toLocaleLowerCase()); } e.push(t); let i = new s(); return (i.type = n), i; } class m extends l { constructor(e, t, n) { super(e, null != t ? t : () => new a.LT()), (this.m_renderingLanguage = n || (0, o.jM)(r.De.LANGUAGE)); } UpdateOverrideLanguage(e) { this.m_renderingLanguage = e || (0, o.jM)(r.De.LANGUAGE); } ParseBBCode(e, t, n = !1) { let o = 0; const r = this.Parse(e, (e, n, ...r) => i.createElement(e, Object.assign(Object.assign({}, n), { context: t, language: this.m_renderingLanguage, key: "bbnode_" + o++ }), ...r), n); return r.length > 1 ? i.createElement(i.Fragment, null, ...r) : 1 == r.length ? r[0] : null; } } const d = ["h1", "h2", "h3", "h4", "h5", "smalltext", "b", "u", "hr", "i", "img", "strike", "spoiler", "noparse", "url", "list", "olist", "quote", "pullquote", "code", "table", "tr", "td", "th", "previewyoutube", "looping_media", "roomeffect", "sticker", "price", "pricesavings", "trailer", "speaker", "doclink", "video", "vod", "youtubeorvideo", "giveawayeligible", "claimitem", "packagepurchaseable", "actiondialog", "uploadfilebutton", "docimg"], h = ["img", "previewyoutube", "looping_media", "roomeffect", "video", "vod", "trailer", "youtubeorvideo", "docimg"], u = (d.filter((e) => -1 == h.indexOf(e)), "{STEAM_CLAN_IMAGE}"), p = "{STEAM_CLAN_LOC_IMAGE}"; function _(e, t = null, n = " ") { let i = null == t ? void 0 : t.join("|"); i || (i = d.join("|") + "|\\*"); let o = new RegExp("\\[(" + i + ")\\b[^\\]]*\\].*?\\[/\\1\\]", "gi"); return e.replace(o, n); } function g(e, t = null, n = "") { let i = null == t ? void 0 : t.join("|"); i || (i = d.join("|") + "|\\*"); let o = "\\[\\/?(?:" + i + "){1,}.*?]"; return e.replace(new RegExp(o, "gi"), n); } }, 60439: (e, t, n) => { "use strict"; n.d(t, { LT: () => r, So: () => s }); var i = n(27378), o = n(93635); class r { constructor() { this.reactNodes = []; } AppendText(e, t = !1) { e.length && (t ? this.reactNodes.push(i.createElement("span", { "data-copytext": "", "data-copystyle": "merge-adjacent", "bbcode-text": e }, e)) : this.reactNodes.push(e)); } AppendNode(e) { this.reactNodes.push(e); } GetElements() { return this.reactNodes; } } class a { constructor(e) { (0, o.X)(e, "decorated accumulator cannot be null"), (this.m_decoratedAccumulator = e); } AppendText(e, t = !1) { this.m_decoratedAccumulator.AppendText(e, t); } AppendNode(e) { this.m_decoratedAccumulator.AppendNode(e); } GetElements() { return this.m_decoratedAccumulator.GetElements(); } } class s extends a { constructor(e, t, n) { super(e), (this.m_nStartCursor = 1), (this.m_nStartCursor = void 0 !== t ? t : 1); } AppendText(e) { let t = e, n = []; for (let e = t.indexOf("\n", this.m_nStartCursor); -1 !== e; e = t.indexOf("\n")) n.push(t.substr(0, e)), n.push(i.createElement("br")), (t = t.substr(e + 1)); t.length && n.push(t), n.forEach((e) => { super.AppendNode(e); }); } } }, 46421: (e, t, n) => { "use strict"; n.d(t, { c: () => It }); var i = n(85556), o = n(79588), r = n(50649), a = n(41370), s = n(27378), l = n(82909), c = n(14206), m = n.n(c), d = n(84678), h = n(1736), u = n(99627), p = n(54521), _ = n(88991), g = n(59208), C = n(28428), f = n(8568), v = n(22394), S = n(84290), b = n(10553), I = n(9612); class y { GetChat(e, t) { return this.m_mapChats.get(e) || this.m_mapChats.get(t); } GetOrCreateChat(e, t) { let n = this.GetChat(e, t); return n || ((n = new E()), this.m_mapChats.set(e || t, n)), n; } static Get() { return y.s_Singleton || ((y.s_Singleton = new y()), "dev" == b.De.WEB_UNIVERSE && (window.g_BroadcastChatStore = y.s_Singleton)), y.s_Singleton; } constructor() { (this.m_mapChats = new Map()), (0, o.rC)(this); } } (0, i.gn)([o.LO], y.prototype, "m_mapChats", void 0); class E { constructor() { (this.m_ulBroadcastChannelID = ""), (this.m_ulChatID = ""), (this.m_strFlairGroupID = ""), (this.m_bAutoScroll = !0), (this.m_ulBroadcastID = ""), (this.m_ulBroadcastSteamID = ""), (this.m_tsFirstRequest = null), (this.m_nFromFirstRequestMS = 0), (this.m_nNextChatTS = 0), (this.m_cConsecutiveErrors = 0), (this.m_nNudgeFactorMS = 0), (this.m_nLastSleepMS = 0), (this.m_bReconnecting = !1), (this.m_unInstanceID = Math.floor(4294967296 * Math.random())), (this.m_strUserSteamID = ""), (this.m_regexUserEmoticons = null), (this.m_chatScheduledFunc = null), (this.m_webAPIInterface = null), (this.m_textFilterStore = null), (this.m_bHasAddedWelcomeChat = !1), (this.m_mapMutedUsers = {}), (this.m_mapChannelModeratorUsers = new Map()), (this.m_mapBroadcastModeratorUsers = new Map()), (this.m_nRateLimitSeconds = 0), (this.m_bRateLimited = !1), (this.m_rgChatMessages = []), (this.m_rgAnnouncements = []), (this.m_latestAnnouncement = null), (0, o.rC)(this), (this.m_webAPIInterface = new p.J(b.De.WEBAPI_BASE_URL, b.L7.webapi_token)); } InitTextFilter() { this.m_textFilterStore = new I.l({ BIsFriend: (0, I.V)() }); let e = 0; if ("" !== b.L7.steamid) { e = new _.K(b.L7.steamid).GetAccountID(); } this.m_textFilterStore.Init(e, null, new u.Z()); } get TextFilterStore() { return this.m_textFilterStore; } GetBroadcastSteamID() { return this.m_ulBroadcastSteamID; } GetUserSteamID() { return this.m_strUserSteamID; } StartForSteamID(e, t) { (this.m_webAPIInterface = new p.J(b.De.WEBAPI_BASE_URL, b.L7.webapi_token)), (this.m_ulBroadcastSteamID = e), (this.m_ulBroadcastID = t), this.InitTextFilter(), this.RequestChatInfo(); } StartForChannel(e) { (this.m_webAPIInterface = new p.J(b.De.WEBAPI_BASE_URL, b.L7.webapi_token)), (this.m_ulBroadcastChannelID = e), (this.m_strUserSteamID = b.L7.steamid), this.InitTextFilter(), this.JoinChannelChat(); } Stop() { this.m_chatScheduledFunc && this.m_chatScheduledFunc.Cancel(); } SendMessage(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = e.trim(); if (0 != t.length) try { let e, n, i; if (this.m_webApiToken) { const e = new FormData(); e.append("chat_id", this.m_ulChatID), e.append("message", t), e.append("instance_id", this.m_unInstanceID.toString()), (n = yield m().post(`${b.De.WEBAPI_BASE_URL}IBroadcastService/PostChatMessage/v0001?access_token=${this.m_webApiToken}`, e)), (i = n.data && n.data.response); } else { const n = h.gA.Init(g.Q3); n.SetBodyFields({ chat_id: this.m_ulChatID, message: t, instance_id: this.m_unInstanceID.toString() }), (e = yield g.Mr.PostChatMessage(this.m_webAPIInterface.GetServiceTransport(), n)), (i = { result: e.GetEResult(), cooldown_time_seconds: e.Body().cooldown_time_seconds(), in_game: e.Body().in_game(), persona_name: e.Body().persona_name() }); } if (i && i.result && 1 != i.result) { let e = ""; return (e = 17 == i.result ? (0, S.Xx)("#BroadcastChat_YouMuted") : 84 == i.result ? (0, S.Xx)("#BroadcastChat_Cooldown", i.cooldown_time_seconds) : (0, S.Xx)("#BroadcastChat_FailedToSendMsg", t)), void this.m_rgChatMessages.push({ type: d.gK.Error, msg: e, client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: i.in_game, persona_name: i.persona_name, steamid: "" }); } this.m_nRateLimitSeconds || (this.m_nRateLimitSeconds = i.cooldown_time_seconds), this.m_nRateLimitSeconds && ((this.m_bRateLimited = !0), setTimeout(() => (this.m_bRateLimited = !1), 1e3 * this.m_nRateLimitSeconds)); } catch (e) { this.m_rgChatMessages.push({ type: d.gK.Error, msg: (0, S.Xx)("#BroadcastChat_FailedToSendMsg", t), client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: !1, persona_name: "", steamid: "" }); } }); } RequestChatInfo(e) { return (0, i.mG)(this, void 0, void 0, function* () { (this.m_cConsecutiveErrors = 0), (this.m_bReconnecting = !1); try { const t = { steamid: this.m_ulBroadcastSteamID, broadcastid: this.m_ulBroadcastID, sessionid: b.De.SESSIONID }, n = yield m().get(`${b.De.CHAT_BASE_URL}broadcast/getchatinfo`, { params: t, withCredentials: !0, cancelToken: null == e ? void 0 : e.token }); (e && e.token.reason) || (0, o.z)(() => { const e = n.data; (this.m_strChatURL = e.view_url_template), (this.m_ulChatID = e.chat_id), (this.m_strFlairGroupID = e.flair_group_ids && e.flair_group_ids[0]), e.blocked && console.log("User is blocked from chat"), e.steamid && (this.m_strUserSteamID = e.steamid), e.token && (this.m_webApiToken = e.token), e.emoticons && this.SetOwnedEmoticons(e.emoticons), this.m_bHasAddedWelcomeChat || (this.m_rgChatMessages.push({ type: d.gK.Notification, msg: (0, S.Xx)("#BroadcastChat_DefaultMessage"), client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: !1, persona_name: "", steamid: "" }), (this.m_bHasAddedWelcomeChat = !0)), this.m_mapBroadcastModeratorUsers.clear(), e.moderators_steamid && e.moderators_steamid.forEach((e) => this.m_mapBroadcastModeratorUsers.set(e, !0)), (this.m_chatScheduledFunc = new v.Ar()), this.m_chatScheduledFunc.Schedule(0, this.RequestLoop); }); } catch (e) { console.error(e), console.log("Failed to get chat info!"); } }); } JoinChannelChat() { return (0, i.mG)(this, void 0, void 0, function* () { try { const e = h.gA.Init(C.q5); e.SetBodyFields({ broadcast_channel_id: this.m_ulBroadcastChannelID }); let t = yield C.Ly.JoinChat(this.m_webAPIInterface.GetServiceTransport(), e); if (!t.Body().chat_id || !t.Body().view_url_template) return void console.log("Failed to join channel chat"); (this.m_strChatURL = t.Body().view_url_template()), (this.m_ulChatID = t.Body().chat_id()), (this.m_strFlairGroupID = t.Body().flair_group_ids() && t.Body().flair_group_ids()[0]), this.FetchChatModerators(), (this.m_rgChatMessages = []), this.m_rgChatMessages.push({ type: d.gK.Notification, msg: (0, S.Xx)("#BroadcastChat_DefaultMessage"), client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: !1, persona_name: "", steamid: "" }), (this.m_bHasAddedWelcomeChat = !0), (this.m_chatScheduledFunc = new v.Ar()), this.m_chatScheduledFunc.Schedule(0, this.RequestLoop); } catch (e) { console.error(e), console.log("Failed to join chat!"); } }); } FetchChatModerators() { return (0, i.mG)(this, void 0, void 0, function* () { const e = h.gA.Init(C.kX); e.SetBodyFields({ broadcast_channel_id: this.m_ulBroadcastChannelID }); const t = (yield C.Ly.GetChatModerators(this.m_webAPIInterface.GetServiceTransport(), e)).Body().results(), n = new Map(); t.forEach((e) => { n.set(e.steamid(), !0); }), (this.m_mapChannelModeratorUsers = n); }); } ReplaceChatAnnouncementIfAny(e) { var t; (null === (t = e.announcements) || void 0 === t ? void 0 : t.length) > 0 ? ((this.m_rgAnnouncements = e.announcements.reverse()), (this.m_latestAnnouncement && JSON.stringify(this.m_latestAnnouncement) == JSON.stringify(this.m_rgAnnouncements[this.m_rgAnnouncements.length - 1])) || (this.m_latestAnnouncement = this.m_rgAnnouncements[this.m_rgAnnouncements.length - 1])) : this.m_rgAnnouncements.length > 0 && ((this.m_rgAnnouncements = []), (this.m_latestAnnouncement = null)); } RequestLoop() { return (0, i.mG)(this, void 0, void 0, function* () { const e = {}, t = this.m_strChatURL.replace("{0}", this.m_nNextChatTS.toString()); t == this.m_strChatURL && this.m_nNextChatTS > 0 && (e.t = this.m_nNextChatTS); try { const n = (yield m().get(t, { params: e })).data; this.m_cConsecutiveErrors = 0; const i = n.messages.map((e) => Object.assign(Object.assign({}, e), { type: d.gK.Chat, client_ts: Number(new Date()) })).filter((e) => !this.IsUserMutedLocally(e.steamid)); this.m_rgChatMessages.push(...i), this.ReplaceChatAnnouncementIfAny(n); const o = this.m_bAutoScroll ? 150 : 300; if ((this.m_rgChatMessages.length > o && this.m_rgChatMessages.splice(0, this.m_rgChatMessages.length - o), n.muted)) for (const e of n.muted) { const t = e.muted == this.m_strUserSteamID ? (0, S.Xx)("#BroadcastChat_YouMuted", e.persona_name) : (0, S.Xx)("#BroadcastChat_UserMuted", e.persona_name); this.m_rgChatMessages.push({ type: d.gK.Notification, msg: t, client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: !1, persona_name: "", steamid: "" }); } if (n.remove_msgs) for (const e of n.remove_msgs) this.RemoveUserMessagesLocal(e.steamid); let r = 0; if (null == this.m_tsFirstRequest || 0 == this.m_nNextChatTS || n.initial_delay) { if ("undefined" === n.initial_delay) return void console.log("Need initial_delay to know when to request first chat message"); (this.m_tsFirstRequest = performance.now() + n.initial_delay), (this.m_nFromFirstRequestMS = 0), (this.m_nNextChatTS = n.next_request), (r = n.initial_delay); } else { if (n.next_request < this.m_nNextChatTS) return void console.log("Next request in past"); (this.m_nFromFirstRequestMS += n.next_request - this.m_nNextChatTS), (this.m_nNextChatTS = n.next_request), (r = this.m_tsFirstRequest + this.m_nFromFirstRequestMS - performance.now() + this.m_nNudgeFactorMS); } this.m_bReconnecting && (this.m_bReconnecting = !1), (this.m_nLastSleepMS = r), r < 0 && (r = 0), this.m_chatScheduledFunc.Schedule(r, this.RequestLoop); } catch (e) { if ((console.log("Failed to get chat messages. Previous sleep set to: " + this.m_nLastSleepMS + " firstReq: " + this.m_tsFirstRequest + " firstFromRequest: " + this.m_nFromFirstRequestMS + " nudge: " + this.m_nNudgeFactorMS), this.m_cConsecutiveErrors++, (this.m_nNudgeFactorMS += 10), this.m_cConsecutiveErrors >= 4)) { if (null == this.m_tsFirstRequest) return void this.m_rgChatMessages.push({ type: d.gK.Error, msg: (0, S.Xx)("#BroadcastChat_UnableToJoinChat"), client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: !1, persona_name: "", steamid: "" }); (this.m_cConsecutiveErrors = 0), (this.m_bReconnecting = !0), this.SyncChat(); } this.m_chatScheduledFunc.Schedule(500, this.RequestLoop); } }); } GetUserEmoticons() { return this.m_regexUserEmoticons; } SetOwnedEmoticons(e) { let t = []; for (let n = 0; n < e.length; n++) { let i = e[n]; i.length >= 2 && ":" == i[0] ? t.push(i.substr(1, i.length - 2)) : t.push(i); } let n = ":(" + t.join("|") + "):"; this.m_regexUserEmoticons = new RegExp(n, "g"); } UpdateBroadcastChatModerator(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { { const i = new FormData(); i.append("broadcaststeamid", this.m_ulBroadcastSteamID), i.append("moderatorsteamid", e), i.append("bAdd", t ? "1" : "0"), i.append("sessionid", b.De.SESSIONID); try { yield m().post(`${b.De.CHAT_BASE_URL}broadcast/ajaxupdatechannelmod`, i), this.m_mapBroadcastModeratorUsers.set(e, t); const o = (0, S.Xx)(t ? "#BroadcastChat_AddedModerator" : "#BroadcastChat_RemovedModerator", n); this.m_rgChatMessages.push({ type: d.gK.Notification, msg: o }); } catch (e) { const i = (0, S.Xx)(t ? "#BroadcastChat_AddModeratorFailed" : "#BroadcastChat_RemoveModeratorFailed", n); this.m_rgChatMessages.push({ type: d.gK.Error, msg: i }); } } }); } UpdateUserChatBan(e, t, n, o, r, a) { return (0, i.mG)(this, void 0, void 0, function* () { const i = this.m_ulBroadcastSteamID, s = this.m_strUserSteamID; if (this.m_ulBroadcastChannelID) { const t = h.gA.Init(C.mm); t.SetBodyFields({ broadcast_channel_id: this.m_ulBroadcastChannelID, chatter_steamid: e, duration: 3600 * n, permanent: o, undo: a }), yield C.Ly.AddChatBan(this.m_webAPIInterface.GetServiceTransport(), t); } else { const a = new FormData(); a.append("broadcaststeamid", i), a.append("issuersteamid", s), a.append("chattersteamid", e), a.append("bantype", t), a.append("duration", n.toString()), a.append("perm", o ? "1" : "0"), a.append("sessionid", b.De.SESSIONID); try { yield m().post(`${b.De.CHAT_BASE_URL}broadcast/ajaxupdateusermute`, a), 0 == t ? delete this.m_mapMutedUsers[e] : (this.m_mapMutedUsers[e] = r); } catch (e) { console.log("Failed to update mute for " + r); } } }); } MuteUserForSession(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (e == this.m_strUserSteamID) return; if (this.m_ulBroadcastSteamID == e) return; let n = this.m_ulBroadcastSteamID == this.m_strUserSteamID; if (!this.m_mapMutedUsers[e]) { this.m_mapMutedUsers[e] = t; try { if (this.m_webApiToken) { const t = new FormData(); t.append("chat_id", this.m_ulChatID), t.append("user_steamid", e), t.append("muted", "1"), yield m().post(`${b.De.WEBAPI_BASE_URL}IBroadcastService/MuteBroadcastChatUser/v0001/?access_token=${this.m_webApiToken}`, t); } else { const t = h.gA.Init(g.$m); t.SetBodyFields({ chat_id: this.m_ulChatID, user_steamid: e, muted: !0 }), yield g.Mr.MuteBroadcastChatUser(this.m_webAPIInterface.GetServiceTransport(), t); } } catch (i) { n && (this.m_rgChatMessages.push({ type: d.gK.Error, msg: (0, S.Xx)("#BroadcastChat_UserMuteFailed", t), client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: !1, persona_name: "", steamid: "" }), delete this.m_mapMutedUsers[e]); } } n || this.m_rgChatMessages.push({ type: d.gK.Notification, msg: (0, S.Xx)("#BroadcastChat_UserMutedLocal", t), client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: !1, persona_name: "", steamid: "" }); }); } UnmuteUserForSession(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (e == this.m_strUserSteamID) return; if ((this.m_mapMutedUsers[e] && delete this.m_mapMutedUsers[e], this.m_ulBroadcastSteamID == this.m_strUserSteamID)) try { if (this.m_webApiToken) { const t = new FormData(); t.append("chat_id", this.m_ulChatID), t.append("user_steamid", e), t.append("muted", "0"), yield m().post(`${b.De.WEBAPI_BASE_URL}IBroadcastService/MuteBroadcastChatUser/v0001/?access_token=${this.m_webApiToken}`, t); } else { const t = h.gA.Init(g.$m); t.SetBodyFields({ chat_id: this.m_ulChatID, user_steamid: e, muted: !1 }), yield g.Mr.MuteBroadcastChatUser(this.m_webAPIInterface.GetServiceTransport(), t); } this.m_rgChatMessages.push({ type: d.gK.Notification, msg: (0, S.Xx)("#BroadcastChat_UserUnmutedLocal", t), client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: !1, persona_name: "", steamid: "" }); } catch (e) { this.m_rgChatMessages.push({ type: d.gK.Error, msg: (0, S.Xx)("#BroadcastChat_UserUnmuteFailed", t), client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: !1, persona_name: "", steamid: "" }); } else this.m_rgChatMessages.push({ type: d.gK.Notification, msg: (0, S.Xx)("#BroadcastChat_UserUnmutedLocal", t), client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: !1, persona_name: "", steamid: "" }); }); } RemoveUserMessagesLocal(e) { this.m_rgChatMessages = this.m_rgChatMessages.filter((t) => t.steamid !== e); } RemoveUserMessagesServer(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (e != this.m_strUserSteamID) try { if (this.m_webApiToken) { const t = new FormData(); t.append("chat_id", this.m_ulChatID), t.append("user_steamid", e), yield m().post(`${b.De.WEBAPI_BASE_URL}IBroadcastService/RemoveUserChatText/v0001/?access_token=${this.m_webApiToken}`, t); } else { const t = h.gA.Init(g.mn); t.SetBodyFields({ chat_id: this.m_ulChatID, user_steamid: e }), yield g.Mr.RemoveUserChatText(this.m_webAPIInterface.GetServiceTransport(), t); } } catch (e) { this.m_rgChatMessages.push({ type: d.gK.Error, msg: (0, S.Xx)("#BroadcastChat_RemoveMessagesFailed", t), client_ts: Number(new Date()), instance_id: this.m_unInstanceID, in_game: !1, persona_name: "", steamid: "" }); } }); } UpdateChatMessageFlair(e) { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_webApiToken) { const t = new FormData(); t.append("chat_id", this.m_ulChatID), t.append("flair", `^${this.m_strFlairGroupID}^:${e}:`), yield m().post(`${b.De.WEBAPI_BASE_URL}IBroadcastService/UpdateChatMessageFlair/v0001/?access_token=${this.m_webApiToken}`, t); } else { const t = h.gA.Init(g.kY); t.SetBodyFields({ chat_id: this.m_ulChatID, flair: `^${this.m_strFlairGroupID}^:${e}:` }), yield g.Mr.UpdateChatMessageFlair(this.m_webAPIInterface.GetServiceTransport(), t); } }); } IsUserMutedLocally(e) { return Boolean(this.m_mapMutedUsers[e]); } BIsUserBroadcastModerator(e) { return this.m_mapBroadcastModeratorUsers.has(e); } IsUserBroadcaster(e) { return e === this.m_ulBroadcastSteamID; } SyncChat() { (this.m_tsFirstRequest = null), (this.m_nFromFirstRequestMS = 0), (this.m_nNextChatTS = 0), (this.m_rgChatMessages = []); } } (0, i.gn)([o.LO], E.prototype, "m_mapChannelModeratorUsers", void 0), (0, i.gn)([o.LO], E.prototype, "m_mapBroadcastModeratorUsers", void 0), (0, i.gn)([o.LO], E.prototype, "m_nRateLimitSeconds", void 0), (0, i.gn)([o.LO], E.prototype, "m_bRateLimited", void 0), (0, i.gn)([o.LO], E.prototype, "m_rgChatMessages", void 0), (0, i.gn)([o.LO], E.prototype, "m_latestAnnouncement", void 0), (0, i.gn)([f.a], E.prototype, "FetchChatModerators", null), (0, i.gn)([f.a], E.prototype, "RequestLoop", null), (0, i.gn)([f.a], E.prototype, "MuteUserForSession", null); var D = n(2028), w = n(65213); class R { constructor() { (this.m_mapBroadcasterSteamIDToEvents = new Map()), (this.m_mapBroadcasterSteamIDData = new Map()), (0, o.rC)(this); } static GetBBCodeParam(e, t, n = "") { const i = new RegExp(`\\W${t}\\W*=\\W*\\"(.*?)\\"`, "gmi").exec(e); return i ? i[1] : n; } static ParseCalendarEventPresentersFromText(e) { const t = /\[\W*speaker(\W[\s\S]*?)\]([\s\S]*?)\[\W*\/speaker\W*\]/gi, n = new Array(); for (;;) { const i = t.exec(e); if (null === i) break; const o = i[1], r = i[2], a = R.GetBBCodeParam(o, "steamid"), s = { steamID: a ? new _.K(a) : void 0, name: R.GetBBCodeParam(o, "name"), title: R.GetBBCodeParam(o, "title"), company: R.GetBBCodeParam(o, "company"), photo: R.GetBBCodeParam(o, "photo"), bio: r }; n.push(s); } return n; } static ParseEventModelPresenters(e, t) { const n = e.GetDescriptionWithFallback(t); return R.ParseCalendarEventPresentersFromText(n); } static ParseEventAppReferencesFromText(e) { const t = /\/\/store\.steampowered\.com\/app\/(\d+)/gi, n = new Set(); for (;;) { const i = t.exec(e); if (null === i) break; const o = i[1]; n.add(Number(o)); } return n; } static ParseEventModelAppReferences(e, t) { var n; const i = e.GetDescriptionWithFallback(t), o = R.ParseEventAppReferencesFromText(i); if (null === (n = e.jsondata) || void 0 === n ? void 0 : n.referenced_appids) for (const t of e.jsondata.referenced_appids) o.add(t); return o; } BuildBroadcasterSteamIDToActiveEventMap(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = D.JW.GetTimeNowWithOverride(), n = e.GetCalendarItemsInTimeRange(t - 3600, t); for (const e of n.rgCalendarItems) w.j1.QueueLoadPartnerEvent(e.clanid, e.unique_id); const i = n.rgCalendarItems.map((e) => w.j1.LoadPartnerEventFromClanEventGIDAndClanSteamID(_.K.InitFromClanID(e.clanid), e.unique_id, 0)), o = yield Promise.all(i), r = new Map(); for (const e of o) if (e && !(e.endTime && e.endTime < t)) for (const t of e.GetBroadcastWhitelistAsSteamIDs()) r.has(t) ? r.get(t).push(e) : r.set(t, [e]); return r; }); } IsBroadcasterAlreadyBound(e, t) { const n = this.m_mapBroadcasterSteamIDToEvents.get(e), i = n ? n.length : 0; if ((t ? t.length : 0) != i) return !1; for (let e = 0; e < i; e++) if (n[e] != t[e].GID) return !1; return !0; } static BuildSteamIDToPresenterMapFromEventList(e, t) { let n = new Map(); for (const i of e) { if (!i) continue; const e = R.ParseEventModelPresenters(i, t); for (const t of e) t.steamID && n.set(t.steamID.ConvertTo64BitString(), t); } return n; } RemoveCachedDataIfNotInMap(e) { const t = new Array(); this.m_mapBroadcasterSteamIDToEvents.forEach((n, i) => { e.has(i) || t.push(i); }), t.forEach((e) => { this.m_mapBroadcasterSteamIDData.delete(e), this.m_mapBroadcasterSteamIDToEvents.delete(e); }); } static BuildAppIDRefsForEventList(e, t) { const n = new Set(); for (const i of e) { R.ParseEventModelAppReferences(i, t).forEach((e) => n.add(e)); } return Array.from(n); } UpdateCachedDataFromEvents(e, t) { e.forEach((e, n) => { if (this.IsBroadcasterAlreadyBound(n, e)) return; const i = { m_mapPresenters: R.BuildSteamIDToPresenterMapFromEventList(e, t), m_rgAppIDs: R.BuildAppIDRefsForEventList(e, t) }; this.m_mapBroadcasterSteamIDData.set(n, i), this.m_mapBroadcasterSteamIDToEvents.set( n, e.map((e) => e.GID), ); }); } SynchronizeEventsWithBroadcasts(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { const n = yield this.BuildBroadcasterSteamIDToActiveEventMap(e); this.RemoveCachedDataIfNotInMap(n), this.UpdateCachedDataFromEvents(n, t); }); } GetPresenterMapForBroadcasterSteamID(e) { var t; return null === (t = this.m_mapBroadcasterSteamIDData.get(e)) || void 0 === t ? void 0 : t.m_mapPresenters; } GetAppIDListForBroadcasterSteamID(e) { var t; return null === (t = this.m_mapBroadcasterSteamIDData.get(e)) || void 0 === t ? void 0 : t.m_rgAppIDs; } } (0, i.gn)([o.LO], R.prototype, "m_mapBroadcasterSteamIDData", void 0); const A = new R(); var M = n(37153), k = n(2204), T = n.n(k), L = n(61963), G = n(11259), O = n(51579), F = n(40643), B = n(15293), x = n(78654), N = n(56320), P = n(83817), U = n(62902), V = n(88024), H = n(92324); class W { constructor() { (this.m_mapYouTubeVideo = new Map()), (this.m_mapSharedFile = new Map()), (0, o.rC)(this); } LoadYouTubeDynamicData(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = new Array(), i = ""; if ( (e.forEach((e, t) => { this.m_mapYouTubeVideo.has(e) ? n.push(this.m_mapYouTubeVideo.get(e)) : (i.length > 0 && (i += ","), (i += e)); }), 0 == i.length) ) return n; let r = { youtubevideoids: i }, a = null; return ( (a = yield m().get(b.De.STORE_BASE_URL + "/events/ajaxgetdynamiceventmetadata", { params: r, cancelToken: t.token })), a && a.data && a.data.youtube && (0, o.z)(() => { a.data.youtube.forEach((e, t) => { this.m_mapYouTubeVideo.set(e.videoid, e), n.push(e); }); }), n ); }); } LoadSharedFileDynamicData(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = new Array(), i = ""; if ( (e.forEach((e, t) => { this.m_mapSharedFile.has(e) ? n.push(this.m_mapSharedFile.get(e)) : (i.length > 0 && (i += ","), (i += e)); }), 0 == i.length) ) return n; let r = { sharedfileids: i }, a = null; return ( (a = yield m().get(b.De.STORE_BASE_URL + "/events/ajaxgetdynamiceventmetadata", { params: r, cancelToken: t.token })), a && a.data && a.data.sharedfiles && (0, o.z)(() => { a.data.sharedfiles.forEach((e, t) => { this.m_mapSharedFile.set(e.sharedfileid, e), n.push(e); }); }), n ); }); } } (0, i.gn)([o.LO], W.prototype, "m_mapYouTubeVideo", void 0), (0, i.gn)([o.LO], W.prototype, "m_mapSharedFile", void 0); const X = new W(); var j = n(99165), z = n(54701), K = n(52705), q = n(87018), Z = n(23556), Q = n(18608), $ = n(28464), Y = n.n($); function J(e) { const { videoID: t, bShowVideoImmediately: n, bAutoPlay: i, nStartSeconds: o, classNameSize: r, classNameAlign: a } = e, [l, c] = (0, s.useState)(!n), [m, d] = (0, s.useState)(!1), h = (0, z.T)("YouTubeInlineSnippet"), [u, p] = (0, s.useState)({ title: (0, S.Xx)("#Loading"), description: "", videoid: t, views: "0" }); (0, s.useEffect)(() => { l && X.LoadYouTubeDynamicData([t], h) .then((e) => { !h.token.reason && e.length > 0 && (p(e[0]), d(!0)); }) .catch((e) => console.error("YouTubeInlineSnippet: " + (0, K.l)(e).strErrorMsg)); }, [l, h, t]); const _ = !1; if ( (s.useEffect(() => { n && (0, Q.m)(() => {}); }, [n, _]), l) ) { const e = u.title, n = u.views, i = u.description; return s.createElement("div", { className: Y().DynamicLinkBox, onClick: () => c(!1) }, s.createElement("img", { className: Y().DynamicLink_Preview, src: "https://img.youtube.com/vi/" + t + "/0.jpg" }), s.createElement("div", { className: Y().DynamicLink_Content }, s.createElement("div", { className: Y().DynamicLink_Name }, (0, S.Xx)("#EventEditor_YouTubeVideoTitle", e)), s.createElement("div", { className: Y().DynamicLink_YoutubeViews }, (0, S.Xx)("#EventEditor_YouTubeVideoViews", (0, Z.AV)(Number(n)))), s.createElement("div", { className: Y().Dynamiclink_Content }, m && i, !m && s.createElement(j.V, { size: "medium" })))); } return s.createElement("div", { className: (0, q.Z)(Y().PreviewYouTubeVideo, r, a), id: t }, s.createElement("img", { src: b.De.COMMUNITY_CDN_URL + "public/shared/images/responsive/youtube_16x9_placeholder.gif" }), s.createElement(Q.e, { video: t, autoplay: null != i && i, startSeconds: o, controls: !0, playsInline: !0, autopause: !0, showFullscreenBtn: !0 })); } var ee = n(61320), te = n(582), ne = n(45912), ie = n(66954), oe = n(87634), re = n(85177); class ae { constructor() { (this.m_bValidatedEmail = !1), (this.m_nMobileDeviceCount = 0), (this.m_bIsLoaded = !1), (this.m_bLoadedFromConfig = !1), (0, o.rC)(this); } LazyInit() { if (!this.m_bLoadedFromConfig) { let e = (0, b.ip)("notificationstore", "application_config"); this.ValidateStoreDefault(e) && (0, o.z)(() => { (this.m_bIsLoaded = !0), (this.m_bValidatedEmail = e.email_validated), (this.m_nMobileDeviceCount = e.mobile_device_count); }), (this.m_bLoadedFromConfig = !0); } } ValidateStoreDefault(e) { return e && "object" == typeof e && "number" == typeof e.mobile_device_count; } BIsLoaded() { return this.m_bIsLoaded; } BHasValidatedEmail() { return this.m_bValidatedEmail; } BHasPushNotification() { return this.m_nMobileDeviceCount > 0; } HintLoad() { return (0, i.mG)(this, void 0, void 0, function* () { return this.LazyInit(), this.m_bIsLoaded ? 1 : b.L7.logged_in ? (this.m_promise || (this.m_promise = this.InternalLoad()), this.m_promise) : 1; }); } InternalLoad() { return (0, i.mG)(this, void 0, void 0, function* () { const e = b.De.STORE_BASE_URL + "notification/ajaxusersettings", t = yield m().get(e, { withCredentials: !0 }); return ( 1 == t.data.success && (0, o.z)(() => { (this.m_bIsLoaded = !0), (this.m_bValidatedEmail = t.data.email_validated), (this.m_nMobileDeviceCount = t.data.mobile_device_count); }), t.data.success ); }); } } (0, i.gn)([o.LO], ae.prototype, "m_bValidatedEmail", void 0), (0, i.gn)([o.LO], ae.prototype, "m_nMobileDeviceCount", void 0); let se = new ae(); var le = n(97841), ce = n(45788), me = n(5395), de = n(8314), he = n.n(de); const ue = n(51154); function pe(e, t) { const n = ue.tz.guess(), i = ue.unix(e).tz(n), o = (0, S.CE)(); return o && i.locale(o), s.createElement(s.Fragment, null, i.format("LT"), t ? s.createElement("span", { "data-tooltip-text": i.format("Z") + ", " + n }, " ", i.zoneAbbr()) : null); } const _e = (0, r.Pi)((e) => { const { dateAndTime: t, bSingleLine: n, bOnlyTime: i, bOnlyDate: o } = e, r = !i && Boolean(t), a = !o && Boolean(t), l = r && (0, S.$1)(t), c = e.stylesmodule ? Object.assign(Object.assign({}, he()), e.stylesmodule) : he(); return n ? s.createElement("span", { className: i || o ? c.DateAndTimeInline : c.DateAndTime }, r && l, s.createElement("span", null, " "), Boolean(t && a) && pe(t, !0)) : s.createElement("div", { className: c.DateAndTime }, r && s.createElement(s.Fragment, null, s.createElement("div", { className: c.LocalizedDate }, l), " ", s.createElement("span", { className: c.At }, "@")), s.createElement("div", { className: c.LocalizedTime }, Boolean(t && a) && pe(t, !0))); }), ge = (e) => { const t = s.createElement("div", { className: e.stylesmodule.DateToolTip }, s.createElement(_e, { dateAndTime: e.rtFullDate, bSingleLine: !0, stylesmodule: e.stylesmodule })); return s.createElement(ce.HP, { toolTipContent: t, direction: "top", className: e.className, bTopmost: !0 }, e.children); }; let Ce = class extends s.Component { render() { const { startDateAndTime: e, endDateAndTime: t } = this.props, n = this.props.stylesmodule ? Object.assign(Object.assign({}, he()), this.props.stylesmodule) : he(); let i = this.props.bHideEndTime || null == this.props.endDateAndTime || this.props.endDateAndTime < 1; if (null == e || 0 == e) return s.createElement("div", { className: n.DateAndTime }, s.createElement("span", { className: n.RightSideTitles }, (0, S.Xx)("#EventDisplay_TimeRange")), (0, S.Xx)("#EventDisplay_TimeDisplayNone")); let o = D.JW.GetTimeNowWithOverride(); if (i) return s.createElement("div", { className: n.StartDate }, s.createElement("div", { className: n.RightSideTitles }, (0, S.Xx)(e < o ? "#EventDisplay_TimeInPast" : "#EventDisplay_TimeUpcoming"), " "), s.createElement(_e, { stylesmodule: n, dateAndTime: e })); let r = e <= o && o <= t; const a = (0, me.yK)(new Date(1e3 * e), new Date(1e3 * t)); return s.createElement("div", { className: n.MultiDateAndTime }, s.createElement("div", { className: n.StartDate }, s.createElement("span", { className: n.RightSideTitles }, (0, S.Xx)(e >= o ? "#EventDisplay_TimeBeginsOn" : t >= o ? "#EventDisplay_TimeBeginsOn_Past" : "#EventDisplay_TimeBeginsOn_StartAndEnd_Past")), s.createElement(_e, { stylesmodule: n, bSingleLine: !0, dateAndTime: e })), s.createElement("div", { className: n.EndDate }, s.createElement("span", { className: n.RightSideTitles }, (0, S.Xx)(t < o ? "#EventDisplay_TimeEndsOn_Past" : "#EventDisplay_TimeEndsOn")), s.createElement(_e, { stylesmodule: n, bSingleLine: !0, bOnlyTime: a, dateAndTime: t })), r && s.createElement("span", { className: n.ActiveEvent }, s.createElement("span", { className: (0, q.Z)(n.RightSideTitles, n.ActiveEventCallOut) }, (0, S.Xx)("#Time_Now")))); } }; Ce = (0, i.gn)([r.Pi], Ce); let fe = class extends s.Component { render() { const { startDateAndTime: e, endDateAndTime: t, bHideEndTime: n } = this.props, i = this.props.stylesmodule ? Object.assign(Object.assign({}, he()), this.props.stylesmodule) : he(); if (null == e || 0 == e) return s.createElement("div", { className: i.DateAndTime }, s.createElement("span", { className: i.RightSideTitles }, (0, S.Xx)("#EventDisplay_TimeRange")), (0, S.Xx)("#EventDisplay_TimeDisplayNone")); const o = D.JW.GetTimeNowWithOverrideAsDate(), r = D.JW.GetTimeNowWithOverride(), a = (0, me.U8)(new Date(1e3 * e), o), l = s.createElement("div", { className: i.ShortDateAndTime }, (0, S.$1)(e, a)); let c = s.createElement(ge, { rtFullDate: e, stylesmodule: i }, s.createElement("div", { className: i.RightSideTitles }, (0, S.Xx)(e < r ? "#EventDisplay_TimeInPast" : "#EventDisplay_TimeUpcoming")), l); if ((r < e && e < r + me._H.PerWeek && (c = s.createElement(ge, { rtFullDate: e, stylesmodule: i }, s.createElement("div", { className: i.RightSideTitles }, (0, S.kQ)("#EventDisplay_EventUpcoming_WithDateAndTime", l, s.createElement("div", { className: i.ShortDateAndTime }, pe(e), " "))))), n || null == t || t < 1)) return c; const m = e <= r && r <= t; m && (c = s.createElement(ge, { rtFullDate: e, className: i.ActiveEvent, stylesmodule: i }, s.createElement("span", { className: i.ActiveEventCallOut }, (0, S.Xx)("#Time_Now")))); let d = null; const h = m ? t - r : t - e; if (h <= me._H.PerDay) { const e = s.createElement("div", { className: i.ShortDateAndTime }, (0, S.yW)(h, !0)); d = t < r ? s.createElement("div", { className: i.RightSideTitles }, (0, S.Xx)("#EventDisplay_TimeEndsOn_Ran"), e) : s.createElement("div", { className: i.RightSideTitles }, (0, S.kQ)(m ? "#EventDisplay_TimeLeft" : "#EventDisplay_RunsForDuration", e)); } else { const e = o.getFullYear() == new Date(1e3 * t).getFullYear(); d = s.createElement(s.Fragment, null, s.createElement("div", { className: i.RightSideTitles }, (0, S.Xx)(t < r ? "#EventDisplay_TimeEndsOn_Past" : "#EventDisplay_TimeEndsOn")), s.createElement("div", { className: i.ShortDateAndTime }, (0, S.$1)(t, e))); } const u = s.createElement(ge, { rtFullDate: t, stylesmodule: i }, d); return s.createElement("div", { className: i.ShortDateRange }, c, u); } }; fe = (0, i.gn)([r.Pi], fe); var ve = n(65204), Se = n(68816), be = n(16518), Ie = n(2049), ye = n(61752), Ee = n(29324), De = n.n(Ee), we = n(12086), Re = n(47013), Ae = n(70404), Me = n(71411); let ke = class extends s.Component { constructor() { super(...arguments), (this.m_elDropDownRef = s.createRef()), (this.m_bLoadWasCancelled = !1), (this.state = { bIsOpen: !1, bIsLoadingNotificationSettings: !se.BIsLoaded() }); } componentDidMount() { this.state.bIsLoadingNotificationSettings && se .HintLoad() .catch((e) => (console.error("EventReminderWidget load fail: " + (0, K.l)(e).strErrorMsg), 2)) .then((e) => { 1 != e || this.m_bLoadWasCancelled || this.setState({ bIsLoadingNotificationSettings: !1 }); }), !this.props.eventModel.appid && this.props.eventModel.clanSteamID && ie.sV.LoadClanInfoForClanSteamID(this.props.eventModel.clanSteamID); } componentWillUnmount() { this.m_bLoadWasCancelled = !0; } ToggleMenu(e) { const t = re.cb.Get().BIsUserLoggedIn(); t || b.De.IN_CLIENT ? (!t && b.De.IN_CLIENT && console.log("EventReminderWidget: In Client: Cannot use login widget. We expect to be already logged in."), this.state.bIsOpen ? this.HideMenu() : this.ShowMenu(), e.stopPropagation(), e.preventDefault()) : (0, Se.AM)(s.createElement(ve.uH, { strTitle: (0, S.Xx)("#EventDisplay_Share_NotLoggedIn"), strDescription: (0, S.Xx)("#EventDisplay_Share_NotLoggedIn_Description"), strOKButtonText: (0, S.Xx)("#MobileLogin_SignIn"), onOK: () => (0, B.Xt)() }), window); } ShowMenu() { if (this.m_iMenuInstance) this.m_iMenuInstance.Show(); else { let e = s.createElement(Ge, Object.assign({}, this.props, { fnHasReminderSet: () => this.BHasSomeNotificationSetting(), fnHidePanel: this.HideMenu })), t = { bOverlapHorizontal: !0, bOverlapVertical: !0, bDisablePopTop: !0, bMatchWidth: !0, strClassName: (0, q.Z)(Re.ReminderDialog, Re.ReminderOptions, le.contextMenu) }; (this.m_iMenuInstance = (0, l.yV)(e, this.m_elDropDownRef.current, t)), this.m_iMenuInstance.SetOnHideCallback(this.HideMenu); } this.setState({ bIsOpen: !0 }), oe.Y.RecordAppInteractionEvent(this.props.eventModel.appid, oe.g.k_eReminder_Opened); } HideMenu() { this.m_iMenuInstance && this.m_iMenuInstance.Hide(), this.setState({ bIsOpen: !1 }); } BHasSomeNotificationSetting() { const { eventModel: e } = this.props, t = e.GID; return (se.BHasValidatedEmail() && re.cb.Get().BFollowsEventAndNotifiedBy(e.clanSteamID, t, re.rE.k_ENotifyFlagByEmail)) || (se.BHasPushNotification() && re.cb.Get().BFollowsEventAndNotifiedBy(e.clanSteamID, t, re.rE.k_ENotifyFlagByPush)); } render() { const e = this.props.bOnlyShowIcon && !this.state.bIsOpen, t = this.BHasSomeNotificationSetting(); return s.createElement("div", { className: (0, q.Z)({ [Re.ReminderCheckBox]: !0, [De().ReminderCtn]: !0, [Re.IconMode]: e, [Re.TextMode]: !e, ReminderSet: t, RemindMeWidget: !0 }), onClick: this.ToggleMenu, ref: this.m_elDropDownRef }, t && s.createElement("div", { className: Re.RemindCheck }, s.createElement(be.JrY, null)), e && s.createElement("div", { className: Re.RemindBell }, s.createElement(be.Uos, null)), s.createElement("div", { className: Re.ReminderDefault }, (0, S.Xx)("#EventDisplay_Reminder_SetReminder")), s.createElement("div", { className: Re.ReminderOptions })); } }; function Te(e) { const { bPreviewMode: t, eventGID: n } = e, o = (0, i._T)(e, ["bPreviewMode", "eventGID"]), r = (0, ne.XC)(n); if (!r) return t ? s.createElement("div", { className: Me.ErrorDiv }, (0, S.Xx)("#EventDidplay_Reminder_EventNotVisible", n)) : null; const a = (0, x.jM)(b.De.LANGUAGE); return s.createElement(ke, Object.assign({ lang: a }, o, { eventModel: r })); } function Le(e) { return ee.unix(e).utc().format("YYYYMMDD[T]HHmmss[Z]"); } (0, i.gn)([Ie.ak], ke.prototype, "ToggleMenu", null), (0, i.gn)([Ie.ak], ke.prototype, "ShowMenu", null), (0, i.gn)([Ie.ak], ke.prototype, "HideMenu", null), (ke = (0, i.gn)([r.Pi], ke)); let Ge = class extends s.Component { constructor() { super(...arguments), (this.state = { bIsRequestInFlight: !1 }); } OnChangeFollowOrIgnore(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { const { eventModel: i } = this.props, o = null == i ? void 0 : i.GID; if (o && o != x.Z3) { this.setState({ bIsRequestInFlight: !0 }); try { yield re.cb.Get().SetFollowOrUnfollowEvent(!e, t, i.clanSteamID, o, n), e && (n === re.rE.k_ENotifyFlagByEmail ? this.TrackEventAction(oe.g.k_eReminder_Email) : n === re.rE.k_ENotifyFlagByPush && this.TrackEventAction(oe.g.k_eReminder_MobilePush)); } catch (e) { (0, Se.BR)(s.createElement(ve.JX, { strTitle: (0, S.Xx)(t ? "#EventDisplay_Reminder_IgnoreEvent_Error" : "#EventDisplay_Reminder_FollowEvent_Error"), strDescription: (0, S.Xx)(t ? "#EventDisplay_Reminder_IgnoreEvent_ErrorDesc" : "#EventDisplay_Reminder_FollowEvent_ErrorDesc") }, (0, K.l)(e).strErrorMsg), window); } this.setState({ bIsRequestInFlight: !1 }); } }); } OnChangeFollowByEmail(e) { this.OnChangeFollowOrIgnore(e, !1, re.rE.k_ENotifyFlagByEmail); } OnChangeFollowByPush(e) { this.OnChangeFollowOrIgnore(e, !1, re.rE.k_ENotifyFlagByPush); } GetExternalCalendarEventTitle() { const { eventModel: e, lang: t } = this.props, n = e.GetNameWithFallback(t); if (te.xM.BHasEntityNameForID(e.appid, e.clanSteamID.GetAccountID())) { return `${te.xM.GetEntityNameForID(e.appid, e.clanSteamID.GetAccountID())}: ${n}`; } return n; } TrackEventAction(e) { const { eventModel: t } = this.props; oe.Y.RecordAppInteractionEvent(t.appid, e); } GetExternalCalendarEventBody() { const { eventModel: e, lang: t } = this.props; let n = e.GetSubTitleWithLanguageFallback(t); n = n ? `${n}\n\n\n` : ""; const i = e.GetSummaryWithFallback(t), o = e.jsondata.bSaleEnabled ? we.Ue.k_eStoreSalePage : we.Ue.k_eStoreView; return `${n}${i}\n\n${(0, we.q)(e, o, "forceAbsolute")}`; } GetGoogleCalendarLink() { const { eventModel: e } = this.props, t = encodeURIComponent(this.GetExternalCalendarEventTitle()), n = encodeURIComponent(this.GetExternalCalendarEventBody()), i = e.GetStartTimeAndDateUnixSeconds(), o = Le(i), r = Le(e.GetEndTimeAndDateUnixSeconds() || i + me._H.PerHour), a = (b.De.IN_CLIENT ? "steam://openurl_external/" : "") + `https://calendar.google.com/calendar/r/eventedit?text=${t}&details=${n}&dates=${o}/${r}`; return (0, ye.OL)(a); } GetICSDownloadLink(e) { const { eventModel: t, lang: n } = this.props, i = t.appid ? "app/" + t.appid : "group/" + t.clanSteamID.GetAccountID(), o = "l=" + (0, x.j_)(n); return `${b.De.STORE_BASE_URL}${(0, we.x3)()}/download/${i}/${e}/${t.GID}?${o}`; } render() { const { eventModel: e, bShowStartTime: t, bExpandLeft: n, bOnlyShowIcon: i, fnHasReminderSet: o, fnHidePanel: r } = this.props, a = se.BHasValidatedEmail(), l = se.BHasPushNotification(), c = t && e.GetStartTimeAndDateUnixSeconds(); return s.createElement( "div", null, s.createElement("div", { className: (0, q.Z)(Re.ReminderCheckBox, i ? Re.IconMode : Re.TextMode, "RemindMeWidget"), onClick: r }, o() && s.createElement("div", { className: Re.RemindCheck }, s.createElement(be.JrY, null)), i && s.createElement("div", { className: Re.RemindBell }, s.createElement(be.Uos, null)), s.createElement("div", { className: Re.ReminderDefault }, (0, S.Xx)("#EventDisplay_Reminder_SetReminder")), s.createElement("div", { className: Re.ReminderOpennedOptions })), s.createElement( "div", { className: (0, q.Z)(Re.FlexColumnContainer, Re.ReminderBackground, n && Re.ReminderExpandsLeft) }, this.state.bIsRequestInFlight && s.createElement(j.V, { className: Re.RpcThrobber, size: "xlarge", position: "center" }), c && s.createElement("div", { className: Re.FullStartTime }, (0, S.kQ)("#EventDisplay_EventUpcoming_WithDateAndTime", (0, S.$1)(c, (0, me.U8)(new Date(1e3 * c), D.JW.GetTimeNowWithOverrideAsDate())), pe(c, !0))), s.createElement("div", { className: Re.ReminderOptionsHeader }, (0, S.Xx)("#EventDisplay_Reminder_GetNotification_Via")), s.createElement("div", { className: (0, q.Z)(Re.ReminderOption, !a && Re.Unverified) }, s.createElement(ce.HP, { className: Re.CheckboxWrapper, bTopmost: !0, toolTipContent: (0, S.Xx)(a ? "#EventReminder_NotifyByEmail_ttip" : "#EventReminder_NotifyByEmail_Missing") }, s.createElement(G.ji, { label: (0, S.Xx)("#EventDisplay_Reminder_ViaEmail"), disabled: !a, checked: re.cb.Get().BFollowsEventAndNotifiedBy(e.clanSteamID, e.GID, re.rE.k_ENotifyFlagByEmail), onChange: this.OnChangeFollowByEmail })), !a && s.createElement("div", { className: Ae.FlexColumnContainer }, s.createElement("a", { href: b.De.STORE_BASE_URL + "account/", target: b.De.IN_CLIENT ? void 0 : "_blank", onClick: () => this.TrackEventAction(oe.g.k_eReminder_EmailUnverified) }, (0, S.Xx)("#EventReminder_NotifyByEmail_Missing_Add")))), s.createElement("div", { className: (0, q.Z)(Re.ReminderOption, !l && Re.Unverified) }, s.createElement(ce.HP, { className: Re.CheckboxWrapper, bTopmost: !0, toolTipContent: (0, S.Xx)(l ? "#EventReminder_NotifyByMobile_ttip" : "#EventReminder_NotifyByMobile_Missing") }, s.createElement(G.ji, { label: (0, S.Xx)("#EventDisplay_Reminder_ViaMobileApp"), disabled: !l, checked: re.cb.Get().BFollowsEventAndNotifiedBy(e.clanSteamID, e.GID, re.rE.k_ENotifyFlagByPush), onChange: this.OnChangeFollowByPush })), !l && s.createElement("div", { className: Ae.FlexColumnContainer }, s.createElement("a", { href: b.De.STORE_BASE_URL + "mobile/?show=steamapp", target: b.De.IN_CLIENT ? void 0 : "_blank", onClick: () => this.TrackEventAction(oe.g.k_eReminder_MobilePushMissing) }, (0, S.Xx)("#EventReminder_NotifyByMobile_Install")))), s.createElement(s.Fragment, null, s.createElement("div", { className: Re.ReminderOptionsHeader }, (0, S.Xx)("#EventDisplay_Reminder_AddToCalendar")), s.createElement("div", { className: Re.ReminderCalendarOptions }, s.createElement("a", { className: Re.ReminderOption, href: this.GetICSDownloadLink("ics"), onClick: () => this.TrackEventAction(oe.g.k_eReminder_CalendarApple) }, (0, S.Xx)("#EventDisplay_Reminder_AppleCalendar_Short")), s.createElement("a", { className: Re.ReminderOption, target: b.De.IN_CLIENT ? void 0 : "_blank", href: this.GetGoogleCalendarLink(), onClick: () => this.TrackEventAction(oe.g.k_eReminder_CalendarGoogle) }, (0, S.Xx)("#EventDisplay_Reminder_GoogleCalendar_Short")), s.createElement("a", { className: Re.ReminderOption, href: this.GetICSDownloadLink("outlook"), onClick: () => this.TrackEventAction(oe.g.k_eReminder_CalendarOutlook) }, (0, S.Xx)("#EventDisplay_Reminder_OutlookCalendar_Short")))), !1, ), ); } }; (0, i.gn)([Ie.ak], Ge.prototype, "OnChangeFollowByEmail", null), (0, i.gn)([Ie.ak], Ge.prototype, "OnChangeFollowByPush", null), (0, i.gn)([Ie.ak], Ge.prototype, "TrackEventAction", null), (Ge = (0, i.gn)([r.Pi], Ge)); var Oe = n(11612); class Fe { constructor() { (this.m_bUserHasVolumePreference = !1), (this.m_flVolumePreference = 0); } BUserHasVolumePreference() { return this.m_bUserHasVolumePreference; } SetVolumePreference(e) { (this.m_flVolumePreference = e), (this.m_bUserHasVolumePreference = !0); } GetVolumePreference() { return this.m_flVolumePreference; } BVolumePreferenceMuted() { return this.m_flVolumePreference < 0.001; } static Get() { return Fe.s_Singleton || (Fe.s_Singleton = new Fe()), Fe.s_Singleton; } } (0, i.gn)([Ie.ak], Fe.prototype, "BUserHasVolumePreference", null), (0, i.gn)([Ie.ak], Fe.prototype, "SetVolumePreference", null); const Be = (e) => { const { video: t, bAutoPlay: n, bControls: i, bLoop: o, bMuted: r } = e, a = (0, s.useMemo)(() => { var e; return Boolean(null === (e = t.rgVideoTracks) || void 0 === e ? void 0 : e.some((e) => "subtitles" == e.sKind || "captions" == e.sKind)); }, [t.rgVideoTracks]), [l, c] = s.useState(!1); if (!t.rgVideoSources || !t.rgVideoSources.length) return null; const m = (e) => { const t = new URL(e); return (t.search = (t.search ? t.search + "&" : "?") + "origin=" + (0, b.Kc)()), t.toString(); }, d = t.rgVideoSources.filter((e) => Boolean(e.sURL)).map((e) => s.createElement("source", { key: e.sURL, src: m(e.sURL), type: e.sFormat })), h = t.rgVideoTracks ? t.rgVideoTracks.map((e) => { let n = e.eLanguage; if ((0, b.h4)()) if (S.LJ.IsELanguageValidInRealm(n, Oe.IN.k_ESteamRealmChina)) n = S.LJ.GetELanguageFallback(n); else { if (6 !== n) return null; if (t.rgVideoTracks.find((e) => S.LJ.GetELanguageFallback(e.eLanguage) === n)) return null; } else if (!S.LJ.IsELanguageValidInRealm(n, Oe.IN.k_ESteamRealmGlobal)) return null; return s.createElement("track", { key: e.sURL + n, src: m(e.sURL), kind: e.sKind, default: e.bDefault, srcLang: (0, x.dt)(n), label: (0, S.Xx)("#language_selection_" + (0, x.j_)(n)) }); }) : null, u = (function (e) { return !(!(0, ye.dK)(e.sPoster) || (e.rgVideoSources && e.rgVideoSources.some((e) => !(0, ye.dK)(e.sURL))) || (e.rgVideoTracks && e.rgVideoTracks.some((e) => !(0, ye.dK)(e.sURL)))); })(t); let p; (!u || (a && "public" == b.De.WEB_UNIVERSE)) && (p = "anonymous"); const _ = r || (n && Fe.Get().BVolumePreferenceMuted()), g = t.sPoster ? m(t.sPoster) : ""; return s.createElement( "video", { width: "100%", height: "auto", autoPlay: n, muted: _, playsInline: !0, controls: i, poster: g, loop: o, crossOrigin: p, onVolumeChange: (e) => { const t = e.target, n = t.muted ? 0 : t.volume; l && Fe.Get().SetVolumePreference(n); }, onPlay: (e) => { const t = e.target, i = 0 == t.currentTime, o = Fe.Get().BUserHasVolumePreference(); if ((c(!0), i)) if (o || n) o && ((t.volume = Fe.Get().GetVolumePreference()), (t.muted = Fe.Get().BVolumePreferenceMuted())); else { const e = t.muted ? 0 : t.volume; Fe.Get().SetVolumePreference(e); } }, }, d, h, ); }; var xe = n(60194), Ne = n(71129), Pe = n(57428), Ue = n.n(Pe), Ve = n(5997); const He = new Map([ [ "b", { Constructor: function (e) { return s.createElement("div", { className: Ue().Bold }, e.children); }, autocloses: !1, }, ], [ "i", { Constructor: function (e) { return s.createElement("div", { className: (0, q.Z)(Ue().Italic, "BB_Italic") }, e.children); }, autocloses: !1, }, ], [ "h1", { Constructor: function (e) { return je(e, (0, q.Z)(Ue().Header1, "BB_Header1")); }, autocloses: !1, skipFollowingNewline: !0, }, ], [ "h2", { Constructor: function (e) { return je(e, (0, q.Z)(Ue().Header2, "BB_Header2")); }, autocloses: !1, skipFollowingNewline: !0, }, ], [ "h3", { Constructor: function (e) { return je(e, (0, q.Z)(Ue().Header3, "BB_Header3")); }, autocloses: !1, skipFollowingNewline: !0, }, ], [ "h4", { Constructor: function (e) { return je(e, (0, q.Z)(Ue().Header4, "BB_Header4")); }, autocloses: !1, skipFollowingNewline: !0, }, ], [ "h5", { Constructor: function (e) { return je(e, (0, q.Z)(Ue().Header5, "BB_Header5")); }, autocloses: !1, skipFollowingNewline: !0, }, ], [ "center", { Constructor: function (e) { let t = Xe(e.args, "id"); t && "string" == typeof t && t.length > 0 && "#" === t[0] && (t = t.substring(1)); return s.createElement("span", { id: t || void 0, className: (0, q.Z)(Ue().CenterSpan, "BB_Center") }, e.children); }, autocloses: !1, }, ], [ "smalltext", { Constructor: function (e) { return je(e, (0, q.Z)(Ue().SmallText, "BB_SmallText")); }, autocloses: !1, skipFollowingNewline: !0, }, ], [ "u", { Constructor: function (e) { return s.createElement("div", { className: Ue().Underline }, e.children); }, autocloses: !1, }, ], [ "strike", { Constructor: function (e) { return s.createElement("div", { className: Ue().Strike }, e.children); }, autocloses: !1, }, ], [ "spoiler", { Constructor: function (e) { let [t, n] = s.useState(!1), i = s.useCallback(() => { n(!t); }, [t]); return s.createElement(P.s, { className: (0, q.Z)(Ue().Spoiler, t && Ue().Revealed), focusable: !0, onActivate: i, onOKActionDescription: (0, S.Xx)(t ? "#Bbcode_Spoiler_Hide" : "#Bbcode_Spoiler_Show") }, s.createElement("span", { className: Ue().SpoilerText }, e.children)); }, autocloses: !1, }, ], [ "hr", { Constructor: function (e) { return s.createElement("div", { className: Ue().HR }); }, autocloses: !1, }, ], [ "noparse", { Constructor: function (e) { return e.children; }, autocloses: !1, }, ], [ "url", { Constructor: function (e) { let t = Xe(e.args); if (!t) { const n = e.children; "string" == typeof n && (n.startsWith("http://") || n.startsWith("https://")) && (t = n); } const n = "button" == Xe(e.args, "style") ? Ue().LinkButton : null; let i = Xe(e.args, "id"); i && "string" == typeof i && i.length > 0 && "#" === i[0] && (i = i.substring(1)); if (void 0 === t && !i) return e.children || ""; if (void 0 === t || ("string" == typeof t && t.length > 0 && "#" == t[0])) return s.createElement("a", { href: null != t ? t : null, id: i }, e.children); return s.createElement(ze, { className: n, href: t, id: i }, e.children); }, autocloses: !1, }, ], [ "quote", { Constructor: function (e) { const t = Xe(e.args, "author"); return s.createElement("blockquote", { className: (0, q.Z)(Ue().BlockQuote, e.className) }, !!t && s.createElement("div", { className: Ue().QuoteAuthor }, (0, S.Xx)("#Bbcode_Originally_Posted_By") + " ", " ", s.createElement("b", null, t + ":")), e.children); }, autocloses: !1, }, ], [ "pullquote", { Constructor: function (e) { return s.createElement("div", { className: Ue().PullQuote }, e.children); }, autocloses: !1, }, ], [ "code", { Constructor: function (e) { return s.createElement("div", { className: Ue().CodeBlock }, e.children); }, autocloses: !1, }, ], [ "c", { Constructor: function (e) { return s.createElement("code", { className: Ue().Code }, e.children); }, autocloses: !1, }, ], [ "list", { Constructor: function (e) { return s.createElement("ul", { className: (0, q.Z)(Ue().List, "bullets") }, e.children); }, autocloses: !1, skipInternalNewline: !0, }, ], [ "olist", { Constructor: function (e) { return s.createElement("ol", { className: Ue().OrderedList }, e.children); }, autocloses: !1, skipInternalNewline: !0, }, ], [ "*", { Constructor: function (e) { let t = Xe(e.args, "id"); t && "string" == typeof t && t.length > 0 && "#" === t[0] && (t = t.substring(1)); return s.createElement("li", { className: Ue().ListItem, id: t || void 0 }, e.children); }, autocloses: !0, skipInternalNewline: !0, }, ], [ "table", { Constructor: function (e) { const t = Xe(e.args, "noborder"), n = Xe(e.args, "equalcells"); return s.createElement("div", { className: (0, q.Z)(Ue().Table, "BB_Table", t && Ue().NoBorder, n && Ue().EqualCells) }, e.children); }, autocloses: !1, skipInternalNewline: !0, }, ], [ "tr", { Constructor: function (e) { return s.createElement("div", { className: (0, q.Z)(Ue().TableRow, "BB_TableRow") }, e.children); }, autocloses: !1, skipInternalNewline: !0, skipFollowingNewline: !0, }, ], [ "th", { Constructor: function (e) { return s.createElement("div", { className: Ue().TableHeader }, e.children); }, autocloses: !1, skipInternalNewline: !0, skipFollowingNewline: !0, }, ], [ "td", { Constructor: function (e) { const t = Xe(e.args, "width"); return s.createElement("div", { className: (0, q.Z)(Ue().TableData, "BB_TableData"), style: t && { width: t } }, e.children); }, autocloses: !1, skipInternalNewline: !0, skipFollowingNewline: !0, }, ], [ "expand", { Constructor: function (e) { const t = Boolean(Xe(e.args, "expanded")), [n, i] = s.useState(t), o = (function (e, t) { switch (e) { case "details": return { collapsed: "#Bbcode_Expand_Details_Collapsed", expanded: "#Bbcode_Expand_Details_Expanded", style: Ue().ExpandSection_Details }; case "spoiler": return { collapsed: "#Bbcode_Expand_Spoiler_Collapsed", expanded: "#Bbcode_Expand_Spoiler_Expanded", style: Ue().ExpandSection_Spoiler }; case "title": return { collapsed: t || "#Bbcode_Expand_ShowMore_Collapsed", expanded: t || "#Bbcode_Expand_ShowMore_Expanded", style: Ue().ExpandSection_WithTitle }; default: return { collapsed: "#Bbcode_Expand_ShowMore_Collapsed", expanded: "#Bbcode_Expand_ShowMore_Expanded", style: Ue().ExpandSection_ShowMore }; } })(Xe(e.args, "type"), Xe(e.args, "title")); return s.createElement("div", { className: (0, q.Z)(Ue().ExpandSectionBlock, o.style, n ? Ue().ExpandSectionExpanded : Ue().ExpandSectionCollapsed) }, s.createElement("div", { className: Ue().ExpandSectionHeader, onClick: () => i(!n) }, (0, S.Xx)(n ? o.expanded : o.collapsed), s.createElement("div", { className: Ue().EmbedArrow }, s.createElement(be.ret, { angle: n ? 180 : 0 }))), n && s.createElement("div", { className: Ue().ExpandSectionBody }, e.children)); }, autocloses: !1, skipInternalNewline: !0, allowWrapTextForCopying: !0, }, ], [ "remindme", { Constructor: function (e) { const { event: t, showErrorInfo: n } = e.context, i = Xe(e.args); if (i) return s.createElement(Te, { eventGID: i, bPreviewMode: n }); if (t) { const e = (0, x.jM)(b.De.LANGUAGE); return s.createElement(ke, { eventModel: t, lang: e }); } return null; }, autocloses: !1, }, ], [ "doclink", { Constructor: function (e) { const t = Xe(e.args), n = "button" == Xe(e.args, "style") ? Ue().LinkButton : null; return s.createElement(ze, { className: n, href: `${b.De.PARTNER_BASE_URL}doc/${t}` }, e.children); }, autocloses: !1, }, ], [ "color", { Constructor: function (e) { const t = Xe(e.args); return s.createElement("span", { style: { color: t } }, e.children); }, autocloses: !1, }, ], ]); new Map([ [ "looping_media", { Constructor: function (e) { const t = Ke(e); return s.createElement(Be, { video: t, bAutoPlay: !0, bControls: !1, bLoop: !0 }); }, autocloses: !1, }, ], ["video", { Constructor: qe, autocloses: !1 }], [ "youtubeorvideo", { Constructor: function (e) { if ((0, b.h4)() || "CN" == b.De.COUNTRY.toLocaleUpperCase()) return qe(e); const t = Xe(e.args, "youtubeid"), n = Xe(e.args, "size"), i = Xe(e.args, "seconds"); let o = "full" == n ? $.sizeFull : $.sizeThumb, r = "full" == n ? "" : "leftthumb" == n ? $.floatLeft : $.floatRight; return s.createElement(J, { videoID: t, nStartSeconds: i ? Number.parseInt(i) : void 0, classNameAlign: r, classNameSize: o, bShowVideoImmediately: !0 }); }, autocloses: !1, }, ], [ "previewyoutube", { Constructor: function (e) { if ((0, b.h4)()) return null; let t = Xe(e.args); if (t) { let e = t.split(";"); if (2 == e.length) { let t = e[0], n = e[1].toLocaleLowerCase(), i = "full" == n ? $.sizeFull : $.sizeThumb, o = "full" == n ? "" : "leftthumb" == n ? $.floatLeft : $.floatRight; return s.createElement(J, { videoID: t, classNameAlign: o, classNameSize: i, bShowVideoImmediately: !0 }); } } return s.createElement(s.Fragment, null); }, autocloses: !1, }, ], ]); function We(e, t, n = 0) { if (null == e ? void 0 : e.startsWith(Ne.A1)) return (0, V.pd)(e); if (null == e ? void 0 : e.startsWith(Ne.UC)) { const i = new Array(), o = (0, V.OL)(), r = e.substring(Ne.UC.length + 1), a = H.aN.GetHashFromHashAndExt(r), s = H.aN.GetExtensionStringFromHashAndExt(r); if (null != t) { let e = (0, x.j_)(t); i.push(o + a + "/" + e + s + "?t=" + n), 4 == t && ((e = (0, x.eV)((0, x.j_)(t))), i.push(o + a + "/" + e + s + "?t=" + n)); } return i.push(o + r), i; } return e; } function Xe(e, t) { return void 0 === t ? e[""] : e[t]; } function je(e, t) { let n = Xe(e.args, "id"); return n || (n = Xe(e.args)), n && "string" == typeof n && n.length > 0 && "#" === n[0] && (n = n.substring(1)), s.createElement("div", { id: n || void 0, className: (0, q.Z)(t, e.className) }, e.children); } const ze = (e) => { const { href: t } = e, n = (0, i._T)(e, ["href"]), o = (0, xe.bJ)(); let r, a = (0, U.B1)(t, o); (0, Ve.A)(a) ? ((a = (b.De.IN_CLIENT ? "steam://openurl_external/" : "") + (0, Ve.d)(a)), (r = "noopener nofollow")) : (a = (0, ye.bk)(a)); const l = "string" == typeof e.children && e.children.length > 0 && t && !t.startsWith("steam://") ? (0, ye.XW)(t) : void 0; return s.createElement(N.IS, Object.assign({}, n, { href: a, rel: r }), s.createElement("span", { "data-tooltip-text": l }, e.children)); }; function Ke(e) { let t = Xe(e.args, "poster"); t && (t = (0, ye.et)(t)); const n = new Array(); { const t = Xe(e.args, "mp4"); t && n.push({ sURL: (0, ye.et)(t), sFormat: "video/mp4" }); const i = Xe(e.args, "webm"); i && n.push({ sURL: (0, ye.et)(i), sFormat: "video/webm" }); } const i = (0, x.jM)(b.De.LANGUAGE), o = 0 != i, r = new Array(); for (let t = 0; t < 31; t++) { const n = Xe(e.args, "sub_" + (0, x.dt)(t)); n && r.push({ sURL: (0, ye.et)(n), eLanguage: t, sKind: "subtitles", bDefault: o && t == i }); const a = Xe(e.args, "cap_" + (0, x.dt)(t)); a && r.push({ sURL: (0, ye.et)(a), eLanguage: t, sKind: "captions", bDefault: o && t == i }); } return { sPoster: t, rgVideoSources: n, rgVideoTracks: r }; } function qe(e) { const t = Ke(e), n = e.children ? e.children.toString() : void 0; n && n.startsWith("http") && t.rgVideoSources.push({ sURL: (0, ye.et)(n), sFormat: "video/webm" }); const i = Xe(e.args, "autoplay"), o = "0" !== i && "off" !== i && "false" !== i, r = Xe(e.args, "controls"), a = "0" !== r && "off" !== r && "false" !== r, l = Xe(e.args, "loop"), c = "0" !== r && "off" !== r && "false" !== r; return s.createElement(Be, { video: t, bAutoPlay: o, bControls: a, bLoop: l ? c : o }); } var Ze = n(90729), Qe = n(28413), $e = n(60439); function Ye(e) { return new $e.So(new $e.LT(), 0); } function Je(e) { const { text: t, languageOverride: n } = e, [i] = (0, s.useState)(new Ne.Z6(new Map([...Array.from(He.entries())]), Ye, n)); return s.createElement(s.Fragment, null, i.ParseBBCode(t, {})); } var et = n(44864), tt = n.n(et); const nt = (0, r.Pi)((e) => { const t = e.photo ? We(e.photo, (0, x.jM)(b.De.LANGUAGE)) : null, n = e.photo ? ("string" == typeof t ? t : t[1]) : null, i = Boolean(e.title), o = Boolean(e.company); return s.createElement("div", { className: tt().SpeakerPopup, onMouseLeave: e.fnClose }, s.createElement("div", { className: tt().SpeakerInfoOuter }, e.photo && s.createElement("img", { src: n }), s.createElement("div", { className: tt().SpeakerInfoInner }, s.createElement("div", null, e.name), (i || o) && s.createElement("div", null, i && s.createElement("span", { className: tt().SpeakerTitle }, e.title), i && o && s.createElement("span", null, ", "), o && s.createElement("span", null, e.company)))), e.bio && s.createElement("div", { className: tt().SpeakerBio }, e.bio, e.bioString && s.createElement(Je, { text: e.bioString }))); }); class it extends s.Component { constructor() { super(...arguments), (this.m_refAnchor = s.createRef()); } ClosePopup() { this.m_fnHidePopup && (this.m_fnHidePopup(), (this.m_fnHidePopup = null), window.removeEventListener("scroll", this.OnScroll)); } componentWillUnmount() { this.ClosePopup(); } OnScroll() { Math.abs(window.scrollY - this.m_nScrollPosAtHoverStart) > 50 && this.ClosePopup(); } OnHover(e) { const t = this.m_refAnchor.current; if (!t) return; const n = { direction: "right", bEnablePointerEvents: !0, style: { maxWidth: 640, minHeight: t.clientHeight }, target: t }, i = "presenter-hover-" + Math.floor(1e8 * Math.random()); (this.m_fnHidePopup = () => it.sm_embeddedElements.HideElement(t.ownerDocument, i)), window.addEventListener("scroll", this.OnScroll), (this.m_nScrollPosAtHoverStart = window.scrollY); it.sm_embeddedElements.ShowElementDelayed(t.ownerDocument, 150, s.createElement(Qe.T, Object.assign({}, n), s.createElement(nt, Object.assign({}, this.props, { fnClose: this.OnLeave }))), i); } OnLeave(e) { this.ClosePopup(); } render() { return s.createElement("div", { className: tt().SpeakerHover, ref: this.m_refAnchor, onMouseEnter: this.OnHover, onFocus: this.OnHover, onMouseLeave: this.OnLeave, onBlur: this.OnLeave }, this.props.children); } } (it.sm_embeddedElements = new Ze.AN("presenter-hover-source-elements")), (0, i.gn)([Ie.ak], it.prototype, "ClosePopup", null), (0, i.gn)([Ie.ak], it.prototype, "OnScroll", null), (0, i.gn)([Ie.ak], it.prototype, "OnHover", null), (0, i.gn)([Ie.ak], it.prototype, "OnLeave", null); s.Component; var ot = n(31695), rt = n(20698), at = n.n(rt); n(90656); class st { constructor() { (this.giveaway_id = void 0), (this.seconds_until_drawing = void 0), (this.rtime_start = void 0), (this.rtime_end = void 0), (this.closed = void 0), (this.winner_count = void 0), (0, o.rC)(this); } BIsValid() { return void 0 !== this.giveaway_id && null !== this.giveaway_id; } BStarted() { return this.BIsValid() && (this.seconds_until_drawing >= 0 || this.winner_count > 0); } clone() { const e = new st(); return (e.giveaway_id = this.giveaway_id), (e.seconds_until_drawing = this.seconds_until_drawing), (e.rtime_start = this.rtime_start), (e.rtime_end = this.rtime_end), (e.closed = this.closed), (e.winner_count = this.winner_count), e; } } (0, i.gn)([o.LO], st.prototype, "giveaway_id", void 0), (0, i.gn)([o.LO], st.prototype, "seconds_until_drawing", void 0), (0, i.gn)([o.LO], st.prototype, "rtime_start", void 0), (0, i.gn)([o.LO], st.prototype, "rtime_end", void 0), (0, i.gn)([o.LO], st.prototype, "closed", void 0), (0, i.gn)([o.LO], st.prototype, "winner_count", void 0); class lt { constructor() { (this.m_mapGiveawayIDToNextDrawInfo = new Map()), (this.m_mapGiveawayIDAndInstanceToNextDrawInfo = new Map()), (this.m_bLoadedFromConfig = !1), (this.m_mapNextDrawChangeCallback = new Map()), (0, o.rC)(this); } GetKey(e, t) { return e + "_" + t; } GetInfoByInstance(e, t) { return this.m_mapGiveawayIDAndInstanceToNextDrawInfo.get(this.GetKey(e, t)); } GetNextDrawChangeCallback(e) { return this.m_mapNextDrawChangeCallback.has(e) || this.m_mapNextDrawChangeCallback.set(e, new v.pB()), this.m_mapNextDrawChangeCallback.get(e); } CopyToGiveaway(e, t) { t.closed != e.closed && (t.closed = e.closed), t.giveaway_id != e.giveaway_id && (t.giveaway_id = e.giveaway_id), t.rtime_start != e.rtime_start && (t.rtime_start = e.rtime_start), t.rtime_end != e.rtime_end && (t.rtime_end = e.rtime_end), t.winner_count != e.winner_count && (t.winner_count = e.winner_count), t.seconds_until_drawing != e.seconds_until_drawing && (t.seconds_until_drawing = e.seconds_until_drawing); } ReloadGiveaway(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (!e) return null; let n = b.De.STORE_BASE_URL + "prizes/nextdraw/" + e, i = null, r = { origin: self.origin }; return ( (i = yield m().get(n, { params: r })), (0, o.z)(() => { if ((this.m_mapGiveawayIDToNextDrawInfo.has(e) || this.m_mapGiveawayIDToNextDrawInfo.set(e, new st()), this.CopyToGiveaway(i.data, this.m_mapGiveawayIDToNextDrawInfo.get(e)), void 0 !== t)) { const n = this.GetKey(e, t); this.m_mapGiveawayIDAndInstanceToNextDrawInfo.has(n) || this.m_mapGiveawayIDAndInstanceToNextDrawInfo.set(n, new st()), this.CopyToGiveaway(i.data, this.m_mapGiveawayIDAndInstanceToNextDrawInfo.get(n)); } }), this.GetNextDrawChangeCallback(e).Dispatch(this.m_mapGiveawayIDToNextDrawInfo.get(e)), this.m_mapGiveawayIDToNextDrawInfo.get(e) ); }); } static Get() { return lt.s_Singleton || ((lt.s_Singleton = new lt()), lt.s_Singleton.Init(), "dev" == b.De.WEB_UNIVERSE && (window.g_GiveawayStore = lt.s_Singleton)), lt.s_Singleton; } Init() { if (!this.m_bLoadedFromConfig) { let e = (0, b.kQ)("giveawaynextdraw", "application_config"); if (e && e.giveaway_id) { let t = new st(); this.CopyToGiveaway(e, t), this.m_mapGiveawayIDToNextDrawInfo.set(e.giveaway_id, t); } this.m_bLoadedFromConfig = !0; } } } (0, i.gn)([o.LO], lt.prototype, "m_mapGiveawayIDToNextDrawInfo", void 0), (0, i.gn)([o.aD], lt.prototype, "CopyToGiveaway", null); class ct { constructor() { (this.m_myInstanceNumber = 0), (this.m_myInstanceNumber = ct.s_GlobalInstance), (ct.s_GlobalInstance += 1); } ClearRefreshInterval() { this.m_intervalID && (window.clearInterval(this.m_intervalID), (this.m_intervalID = void 0)); } ClearCountDown() { this.m_intervalCountDownID && (window.clearInterval(this.m_intervalCountDownID), (this.m_intervalCountDownID = void 0)); } SetupRefreshDataInterval(e, t) { if ((this.ClearRefreshInterval(), !e.closed)) { let n = e.seconds_until_drawing <= 0 && 0 == e.winner_count ? 6e4 : 5e3; this.m_intervalID = window.setInterval(t, n); } } SetupCountDown(e, t) { e > 0 && (this.m_intervalCountDownID = window.setInterval(t, 1e3)); } } function mt(e, t) { const n = lt.Get().GetInfoByInstance(e, t.m_myInstanceNumber); (n.seconds_until_drawing -= 1), 0 == n.seconds_until_drawing && t.ClearCountDown(); } function dt(e) { const [t] = (0, s.useState)(new ct()), n = (0, Ie.NW)(); (0, s.useEffect)( () => ( lt .Get() .ReloadGiveaway(e, t.m_myInstanceNumber) .then((i) => { t.SetupRefreshDataInterval(i, () => (function (e, t) { const n = lt.Get().GetInfoByInstance(e, t.m_myInstanceNumber); n && n.BIsValid() && n.seconds_until_drawing <= 0 && !n.closed && (t.ClearCountDown(), lt .Get() .ReloadGiveaway(e, t.m_myInstanceNumber) .then((n) => { t.SetupCountDown(n.seconds_until_drawing, () => mt(e, t)); })); })(e, t), ), t.SetupCountDown(i.seconds_until_drawing, () => mt(e, t)), n(); }), () => { t.ClearRefreshInterval(), t.ClearCountDown(); } ), [t, e, n], ); const i = lt.Get().GetInfoByInstance(e, t.m_myInstanceNumber), [o, r, l] = (0, a.SZ)(() => [null == i ? void 0 : i.winner_count, null == i ? void 0 : i.closed, null == i ? void 0 : i.seconds_until_drawing]); return { bLoadingGiveawayInfo: !i || null == i.giveaway_id || !i.BStarted() || void 0 === o, winner_count: o, closed: r, seconds_until_drawing: l }; } (ct.s_GlobalInstance = 0), (0, i.gn)([f.a], ct.prototype, "ClearRefreshInterval", null), (0, i.gn)([f.a], ct.prototype, "ClearCountDown", null), (0, i.gn)([f.a], ct.prototype, "SetupRefreshDataInterval", null), (0, i.gn)([f.a], ct.prototype, "SetupCountDown", null); class ht { GetRegistration(e) { return this.m_mapRegistrations.get(e); } GetRegistrationChangeCallback(e) { return this.m_listChangeCallback.has(e) || this.m_listChangeCallback.set(e, new v.pB()), this.m_listChangeCallback.get(e); } LoadRegistration(e) { return (0, i.mG)(this, void 0, void 0, function* () { return this.m_mapLoadPromises.has(e) || this.m_mapLoadPromises.set(e, this.InternalLoadRegistration(e)), this.m_mapLoadPromises.get(e); }); } InternalLoadRegistration(e) { var t, n, o, r, a; return (0, i.mG)(this, void 0, void 0, function* () { let i = null; try { const s = b.De.STORE_BASE_URL + "saleaction/ajaxgetusergiveawayregistration", l = { giveaway_name: e, sessionid: b.De.SESSIONID }, c = yield m().get(s, { params: l, withCredentials: !0 }); if (200 == (null == c ? void 0 : c.status) && 1 == (null === (t = null == c ? void 0 : c.data) || void 0 === t ? void 0 : t.success) && (null === (n = null == c ? void 0 : c.data) || void 0 === n ? void 0 : n.registration)) return this.m_mapRegistrations.set(e, null === (o = null == c ? void 0 : c.data) || void 0 === o ? void 0 : o.registration), this.GetRegistrationChangeCallback(e).Dispatch(null === (r = null == c ? void 0 : c.data) || void 0 === r ? void 0 : r.registration), null === (a = null == c ? void 0 : c.data) || void 0 === a ? void 0 : a.registration; i = (0, K.l)(c); } catch (e) { i = (0, K.l)(e); } return console.error("CGiveawayRegistrationStore.InternalLoadRegistration failed: on giveawayName " + e + " error: " + (null == i ? void 0 : i.strErrorMsg), i), { registered: !1 }; }); } CreateRegistration(e) { return this.m_mapCreatePromises.has(e) || this.m_mapCreatePromises.set(e, this.InternalCreateRegistration(e)), this.m_mapCreatePromises.get(e); } InternalCreateRegistration(e) { var t, n, o, r, a; return (0, i.mG)(this, void 0, void 0, function* () { let i = null; try { const s = b.De.STORE_BASE_URL + "saleaction/ajaxupdateusergiveawayregistration", l = { giveaway_name: e, sessionid: b.De.SESSIONID }, c = yield m().get(s, { params: l, withCredentials: !0 }); if (200 == (null == c ? void 0 : c.status) && 1 == (null === (t = null == c ? void 0 : c.data) || void 0 === t ? void 0 : t.success) && (null === (n = null == c ? void 0 : c.data) || void 0 === n ? void 0 : n.registration)) return this.m_mapRegistrations.set(e, null === (o = null == c ? void 0 : c.data) || void 0 === o ? void 0 : o.registration), this.GetRegistrationChangeCallback(e).Dispatch(null === (r = null == c ? void 0 : c.data) || void 0 === r ? void 0 : r.registration), null === (a = null == c ? void 0 : c.data) || void 0 === a ? void 0 : a.registration; i = (0, K.l)(c); } catch (e) { i = (0, K.l)(e); } return console.error("CGiveawayRegistrationStore.InternalCreateRegistration failed: on giveawayName " + e + " error: " + (null == i ? void 0 : i.strErrorMsg), i), { registered: !1 }; }); } static Get() { return ht.s_Singleton || ((ht.s_Singleton = new ht()), ht.s_Singleton.Init(), "dev" == b.De.WEB_UNIVERSE && (window.g_SaleMiniGameItemDefStore = ht.s_Singleton)), ht.s_Singleton; } constructor() { (this.m_mapRegistrations = new Map()), (this.m_mapLoadPromises = new Map()), (this.m_mapCreatePromises = new Map()), (this.m_listChangeCallback = new Map()); } Init() {} } (0, i.gn)([Ie.ak], ht.prototype, "CreateRegistration", null); var ut = n(37091), pt = n(93628), _t = n.n(pt); function gt(e) { const { latestAnnouncement: t } = e; return "giveaway_draw" == (null == t ? void 0 : t.type) ? s.createElement(Ct, { latestWinner: t }) : null; } function Ct(e) { var t, n; const { latestWinner: i, className: o, strActionButton: r, strActionClassname: a } = e, l = (null === (t = i.winners_info) || void 0 === t ? void 0 : t.length) > 0 ? i.winners_info[0].accountid : 0, [c, m] = s.useState(l), d = (0, ye.et)(`${(0, V.OL)()}4/080b1f163b02a9810fa78f0b32b9396fab012aef.gif`), h = (0, ye.et)(`${(0, V.OL)()}4/56521811317a8298a7aff4a914be964b67dd0325.png`), u = dt(i.giveaway_gid); let p = u.bLoadingGiveawayInfo || u.closed ? null : u.seconds_until_drawing; const _ = l === b.L7.accountid; s.useEffect(() => { c != l && setTimeout(() => m(l), 1500); }, [l, c]); const g = (null === (n = i.winners_info) || void 0 === n ? void 0 : n.length) > 0 && Boolean(i.winners_info[0].persona) ? i.winners_info[0].persona : (0, S.Xx)("#GA2022_UnknownPersonaName"); return s.createElement( ut.ns, { href: "https://store.steampowered.com/sale/thegameawardssteamdeckdrop2022", className: o }, s.createElement( "div", { className: (0, q.Z)({ [_t().GiveawayWinnerBox]: !0, [_t().GiveawayWinnerAnnounced]: c === l }) }, s.createElement("div", { className: _t().GiveawayWinnerBoxLeft }, s.createElement("img", { className: _t().GiveawayWinnerArt, src: d })), s.createElement("div", { className: _t().GiveawayWinnerBoxRight }, Boolean(c !== l) && s.createElement("div", { className: (0, q.Z)(_t().GiveawayWinnerText) }, (0, S.kQ)("#GA2022_Congrats_Deck_Unknown", s.createElement("br", null))), Boolean(c === l) && s.createElement("div", { className: (0, q.Z)(_t().GiveawayWinnerText, _t().GiveawayWinnerAnnounced) }, (0, S.kQ)(_ ? "#GA2022_Congrats_Deck_Me" : "#GA2022_Congrats_Deck_OTher", g, s.createElement("br", null))), Boolean(p > 0) && s.createElement("div", { className: _t().GiveawayWinnerCountdown }, (0, S.kQ)("#GA2022_Congrats_NextDraw", p))), s.createElement("img", { className: _t().GiveawayWinnerQuestion, src: h }), Boolean(r) && s.createElement("div", { className: a }, _ ? (0, S.Xx)("#GA2022_YouWonNextSteps") : r), ), ); } const ft = new RegExp("ː([^ː]*)ː", "g"), vt = new RegExp("^https?://(?:[^/?#]+?\\.)?(?:valvesoftware|steamcommunity|steampowered)\\.com(?:/?#|$)", "i"); const St = (e) => { const { userType: t, msg: n, presenterInfo: i } = e; if ("presenter" === t) return s.createElement("span", null, s.createElement(it, { name: i.name, title: i.title, photo: i.photo, company: i.company, bioString: i.bio }, s.createElement("a", { className: (0, q.Z)(at().MessageName, at().MessagePresenter), href: b.De.COMMUNITY_BASE_URL + "profiles/" + n.steamid, target: "_blank", rel: "noopener noreferrer" }, n.persona_name))); { let e = null; return "broadcaster" === t ? (e = at().MessageBroadcaster) : "moderator" === t && (e = at().MessageModerator), s.createElement("span", null, s.createElement("a", { className: (0, q.Z)(at().MessageName, e), href: b.De.COMMUNITY_BASE_URL + "profiles/" + n.steamid, "data-miniprofile": "s" + n.steamid, target: "_blank", rel: "noopener noreferrer" }, n.persona_name)); } }, bt = (e) => { switch (e.userType) { case "presenter": return s.createElement("span", { className: at().RoleFlairContainer, "data-tooltip-text": (0, S.Xx)("#BroadcastChat_Role_Presenter_ttip") }, s.createElement(be.x0L, null)); case "moderator": return s.createElement("span", { className: at().RoleFlairContainer, "data-tooltip-text": (0, S.Xx)("#BroadcastChat_Role_Moderatorr_ttip") }, s.createElement(be.yTr, null)); case "broadcaster": return s.createElement("span", { className: at().RoleFlairContainer, "data-tooltip-text": (0, S.Xx)("#BroadcastChat_Role_Broadcaster_ttip") }, s.createElement(be.miF, null)); default: return null; } }; let It = class extends s.Component { constructor(e) { super(e), (this.m_chat = null), (this.messagesContainer = s.createRef()), (0, o.rC)(this); } componentDidMount() { this.StartChat(); } componentDidUpdate(e) { this.m_chat && this.m_chat.m_bAutoScroll && this.ScrollToNewestMessages(), (this.props.steamID === e.steamID && this.props.broadcastID === e.broadcastID && this.props.broadcastChannelID === e.broadcastChannelID) || this.StartChat(); } componentWillUnmount() { this.m_chat && this.m_chat.Stop(); } StartChat() { if ((this.m_chat && this.m_chat.Stop(), (this.m_chat = y.Get().GetOrCreateChat(this.props.broadcastChannelID, this.props.steamID)), this.props.broadcastChannelID)) this.m_chat.StartForChannel(this.props.broadcastChannelID); else if (this.props.steamID && this.props.steamID && (this.props.broadcastID || this.props.globalChat)) { let e = this.props.broadcastID || "0"; this.m_chat.StartForSteamID(this.props.steamID, e), this.ScrollToNewestMessages(); } } IsTrustedDomain(e) { return !!e.match(vt); } AddLinksEmoticons(e, t) { let n = ft; t && (n = this.m_chat.GetUserEmoticons()); let i = e.split(ft); const o = []; for (let e = 0; e < i.length; e += 1) e % 2 == 1 ? o.push(s.createElement(O.tk, { emoticonHoverStore: M.$, key: e, emoticon: i[e], large: !0 })) : o.push(i[e]); return o; } HandleScroll(e) { const t = this.props.bInvertLayout ? e.currentTarget.scrollTop < 6 : e.currentTarget.scrollTop + e.currentTarget.clientHeight >= e.currentTarget.scrollHeight - 6; this.m_chat && (this.m_chat.m_bAutoScroll = t); } ScrollToNewestMessages() { this.messagesContainer && this.messagesContainer.current && (this.messagesContainer.current.scrollTop = this.props.bInvertLayout ? 0 : this.messagesContainer.current.scrollHeight); } OnContextMenu(e, t) { if (t.type !== d.gK.Chat) return null; const n = [], i = this.m_chat.IsUserBroadcaster(this.m_chat.GetUserSteamID()), o = this.m_chat.BIsUserBroadcastModerator(this.m_chat.GetUserSteamID()); if ( ((b.L7 && b.L7.is_support) || i || o ? n.push( s.createElement(L.Zo, { key: "remove", onSelected: () => this.m_chat.RemoveUserMessagesServer(t.steamid, t.persona_name) }, (0, S.Xx)("#BroadcastChat_RemoveMessages")), s.createElement(L.Zo, { key: "updatebanh", onSelected: () => this.m_chat.UpdateUserChatBan(t.steamid, 1, 12, !1, t.persona_name) }, (0, S.Xx)("#BroadcastChat_half_Mute")), s.createElement(L.Zo, { key: "updateband", onSelected: () => this.m_chat.UpdateUserChatBan(t.steamid, 1, 24, !1, t.persona_name) }, (0, S.Xx)("#BroadcastChat_day_Mute")), s.createElement(L.Zo, { key: "updatebanw", onSelected: () => this.m_chat.UpdateUserChatBan(t.steamid, 1, 168, !1, t.persona_name) }, (0, S.Xx)("#BroadcastChat_week_Mute")), s.createElement(L.Zo, { key: "updatebanp", onSelected: () => this.m_chat.UpdateUserChatBan(t.steamid, 1, 0, !0, t.persona_name) }, (0, S.Xx)("#BroadcastChat_perm_Mute")), s.createElement(L.Zo, { key: "removeban", onSelected: () => this.m_chat.UpdateUserChatBan(t.steamid, 0, 0, !1, t.persona_name, !0) }, (0, S.Xx)("#BroadcastChat_Unmute")), ) : this.m_chat.IsUserMutedLocally(t.steamid) ? n.push(s.createElement(L.Zo, { key: "unmuteuser", onSelected: () => this.m_chat.UnmuteUserForSession(t.steamid, t.persona_name) }, (0, S.Xx)("#BroadcastChat_UnmuteLocal"))) : n.push(s.createElement(L.Zo, { key: "muteuser", onSelected: () => this.m_chat.MuteUserForSession(t.steamid, t.persona_name) }, (0, S.Xx)("#BroadcastChat_MuteLocal"))), ((b.L7 && b.L7.is_support) || this.m_chat.IsUserBroadcaster(this.m_chat.GetUserSteamID())) && t.steamid) ) { this.m_chat.BIsUserBroadcastModerator(t.steamid) ? n.push(s.createElement(L.Zo, { key: "removemod", onSelected: () => this.m_chat.UpdateBroadcastChatModerator(t.steamid, !1, t.persona_name) }, (0, S.Xx)("#BroadcastChat_Remove_Moderator"))) : n.push(s.createElement(L.Zo, { key: "addmod", onSelected: () => this.m_chat.UpdateBroadcastChatModerator(t.steamid, !0, t.persona_name) }, (0, S.Xx)("#BroadcastChat_Add_Moderator"))); } return n.length ? (0, l.yV)(s.createElement(L.xV, null, s.createElement("div", { className: at().SelectedUserNameCtn }, (0, S.Xx)("#BroadcastChat_User"), s.createElement("br", null), s.createElement("span", { className: at().SelectedUserName }, t.persona_name)), n), e) : null; } GetTypeClassName(e) { return e.type === d.gK.Notification ? at().MessageNotification : e.type === d.gK.Error ? at().MessageError : at().MessageChat; } FormatMessage(e, t) { if (e.type === d.gK.Chat) { let n = t ? t.FilterText(e.steamid, e.msg) : e.msg; return this.AddLinksEmoticons(n, !1); } return e.msg; } RenderUserChatLine(e, t, n) { let i = n ? n.get(e.steamid) : void 0; const o = e.type === d.gK.Chat ? (function (e, t, n) { return n ? "presenter" : t.GetBroadcastSteamID() === e ? "broadcaster" : t.BIsUserBroadcastModerator(e) ? "moderator" : ""; })(e.steamid, this.m_chat, i) : ""; return s.createElement( "div", { key: e.instance_id + "_" + e.client_ts + "_" + t, className: this.GetTypeClassName(e), onContextMenu: (t) => this.OnContextMenu(t, e) }, e.type === d.gK.Chat && s.createElement(bt, { userType: o }), e.flair && s.createElement("span", { className: at().FlairContainer }, this.AddLinksEmoticons(e.flair, !1)), e.type === d.gK.Chat && s.createElement(St, { userType: o, msg: e, presenterInfo: i }), e.type === d.gK.Chat && this.m_chat.GetBroadcastSteamID() === e.steamid && s.createElement("span", { className: `${at().MessageNotification} ${at().MessageContents}` }, ` (${(0, S.Xx)("#BroadcastChat_Broadcaster")})`), e.type === d.gK.Chat && this.m_chat.m_mapChannelModeratorUsers.get(e.steamid) && s.createElement("span", { className: `${at().MessageNotification} ${at().MessageContents}` }, ` (${(0, S.Xx)("#BroadcastChat_Moderator")})`), s.createElement("span", { className: `${at().MessageContents} ${this.AddLinksEmoticons(e.msg, !1).filter((e) => e && "string" == typeof e).length ? "" : at().EmoticonsOnly}` }, e.type === d.gK.Chat ? " : " : "", this.FormatMessage(e, this.m_chat.TextFilterStore)), ); } render() { const { hidden: e, bPartnerMemberOnlyChat: t, bInvertLayout: n } = this.props, i = this.m_chat ? this.m_chat.m_rgChatMessages : [], o = n ? i.reverse() : i, r = this.m_chat ? A.GetPresenterMapForBroadcasterSteamID(this.m_chat.GetBroadcastSteamID()) : void 0, a = this.m_chat ? this.m_chat.m_latestAnnouncement : null; return s.createElement( "div", { className: (0, q.Z)(at().ChatPanel, "ChatPanel"), style: e ? { display: "none" } : void 0 }, s.createElement(gt, { latestAnnouncement: a }), n && !!this.m_chat && s.createElement(yt, { oChat: this.m_chat, emoticonStore: this.props.emoticonStore, bPartnerMemberOnlyChat: t }), s.createElement(ot.R, null), s.createElement( "div", { className: (0, q.Z)(`${at().ChatMessages} ${T().minHeightZero}`, "ChatMessages"), onScroll: this.HandleScroll, ref: this.messagesContainer }, o.map((e, t) => this.RenderUserChatLine(e, t, r)), ), s.createElement(ot.Q, null), !n && !!this.m_chat && s.createElement(yt, { oChat: this.m_chat, emoticonStore: this.props.emoticonStore, bPartnerMemberOnlyChat: t }), ); } }; function yt(e) { const { oChat: t, emoticonStore: n, bPartnerMemberOnlyChat: i } = e; return !i || ((null === b.L7 || void 0 === b.L7 ? void 0 : b.L7.logged_in) && (null === b.L7 || void 0 === b.L7 ? void 0 : b.L7.is_partner_member)) ? ((null === b.L7 || void 0 === b.L7 ? void 0 : b.L7.logged_in) ? s.createElement(Et, { oChat: t, emoticonStore: n }) : null) : s.createElement(Rt, null); } function Et(e) { const { oChat: t, emoticonStore: n } = e, [i, o] = s.useState(""), r = s.useRef(), l = (0, a.SZ)(() => t.m_bRateLimited), c = s.useCallback( (e) => { !!e.shiftKey || 13 !== e.charCode || (t.m_bRateLimited || (t.SendMessage(i), o("")), e.preventDefault()); }, [t, i], ), m = s.useCallback( (e, t = !1) => { o(i + `ː${e}ː`), (null == r ? void 0 : r.current) && r.current.focus(); }, [i, r], ); let d = l || 0 == i.trim().length, h = (0, q.Z)(T().chatSubmitButton, 0 == i.length && T().disabled); return s.createElement( "div", { className: (0, q.Z)(at().ChatEntryCtn, "ChatEntryCtn") }, s.createElement( "div", { className: (0, q.Z)(at().ChatEntry, "ChatEntry") }, s.createElement( "form", { className: `${T().chatEntryControls}` }, s.createElement("textarea", { className: T().chatTextarea, placeholder: (0, S.Xx)("#BroadcastChat_EnterResponse"), onKeyPress: c, onChange: (e) => o(e.target.value), value: i, ref: r }), l && s.createElement(wt, { nSeconds: t.m_nRateLimitSeconds, bRateLimited: t.m_bRateLimited }), s.createElement( "button", { className: h, title: (0, S.Xx)("#ChatEntryButton_Submit"), disabled: d, onClick: () => { t.SendMessage(i), o(""); }, }, s.createElement(be.k4K, null), ), ), s.createElement("div", { style: { height: "50px" }, className: `${T().chatEntryActionsContainer}` }, s.createElement("div", { className: T().chatEntryActionsGroup }, s.createElement(F.Z, { disabled: !1, OnEmoticonSelected: m, rtLastAckedNewEmoticons: Number.MAX_VALUE, emoticonStore: n, emoticonHoverStore: M.$ }), s.createElement(Dt, Object.assign({}, e, { textInputRef: r })))), ), ); } function Dt(e) { var t; const { oChat: n, emoticonStore: i, textInputRef: o } = e; return n.m_strFlairGroupID && i.flair_list && (null === (t = i.GetFlairListByGroupID(n.m_strFlairGroupID)) || void 0 === t ? void 0 : t.length) ? s.createElement(F.Z, { disabled: !1, OnEmoticonSelected: (e) => { n.UpdateChatMessageFlair(e), (null == o ? void 0 : o.current) && o.current.focus(); }, rtLastAckedNewEmoticons: Number.MAX_VALUE, emoticonStore: i, emoticonHoverStore: M.$, strFlairGroupID: n.m_strFlairGroupID, title: (0, S.Xx)("#ChatEntryButton_Flair"), buttonIcon: s.createElement(be.yVt, null), }) : null; } (0, i.gn)([o.LO], It.prototype, "m_chat", void 0), (0, i.gn)([Ie.ak], It.prototype, "StartChat", null), (0, i.gn)([Ie.ak], It.prototype, "HandleScroll", null), (0, i.gn)([Ie.ak], It.prototype, "OnContextMenu", null), (0, i.gn)([Ie.ak], It.prototype, "RenderUserChatLine", null), (It = (0, i.gn)([r.Pi], It)); class wt extends s.Component { render() { return s.createElement("div", { className: at().TimedProgressBarContainer }, s.createElement("div", { className: at().wrapper }, s.createElement("div", { className: `${at().spinner} ${at().pie}`, style: { animationDuration: `${this.props.nSeconds || 0}s` } }), s.createElement("div", { className: `${at().filler} ${at().pie}`, style: { animationDuration: `${this.props.nSeconds || 0}s` } }), s.createElement("div", { className: at().mask, style: { animationDuration: `${this.props.nSeconds || 0}s` } }))); } } function Rt(e) { return s.createElement("div", { className: at().Description }, s.createElement("div", { className: at().LogInPrompt }, (0, S.Xx)("#Broadcast_PartnerChat_Login")), !b.L7.logged_in && s.createElement(G.zx, { onClick: B.Xt, className: (0, q.Z)(at().SignInButton) }, (0, S.Xx)("#Login_SignIn"))); } }, 66035: (e, t, n) => { "use strict"; n.d(t, { G$: () => m, rr: () => c }); var i = n(85556), o = n(79588), r = n(10553); const a = r.De.CHAT_BASE_URL + "public/images/broadcast/cs2_major2024_cph_icon.png", s = (r.De.CHAT_BASE_URL, r.De.CHAT_BASE_URL + "public/images/broadcast/yule_30x30.png"); class l { constructor(e) { (this.bValid = !1), (this.stream = { 0: "#Broadcast_EnglishMain" }), (this.name = ""), (this.appName = ""), (this.appID = 0), (this.link = ""), (this.linkName = ""), (this.tabIcon = ""), (this.offlineImage = ""), (this.gidEvent = ""), (0, o.rC)(this), this.init(e); } init(e) { (this.bValid = e.bValid), (this.stream = e.stream), (this.name = e.name), (this.appName = e.appName), (this.appID = e.appID), (this.link = e.link), (this.linkName = e.linkName), (this.tabIcon = e.tabIcon), (this.offlineImage = e.offlineImage), (this.gidEvent = e.gidEvent); } } (0, i.gn)([o.LO], l.prototype, "bValid", void 0), (0, i.gn)([o.LO], l.prototype, "stream", void 0), (0, i.gn)([o.LO], l.prototype, "name", void 0), (0, i.gn)([o.LO], l.prototype, "appName", void 0), (0, i.gn)([o.LO], l.prototype, "appID", void 0), (0, i.gn)([o.LO], l.prototype, "link", void 0), (0, i.gn)([o.LO], l.prototype, "linkName", void 0), (0, i.gn)([o.LO], l.prototype, "tabIcon", void 0), (0, i.gn)([o.LO], l.prototype, "offlineImage", void 0), (0, i.gn)([o.LO], l.prototype, "gidEvent", void 0); let c = new l({ bValid: !1, stream: { 0: "#Broadcast_EnglishMain" }, name: "", appName: "", appID: 0, link: "", linkName: "", tabIcon: "", offlineImage: "" }); function m(e) { ("76561198115731852" != e && "76561198115800463" != e) || c.init({ bValid: !0, stream: { "76561198115731852": "#Broadcast_Stream1", "76561198115800463": "#Broadcast_Stream2" }, name: "Counter-Strike 2 Copenhagen Major 2024", appID: 730, link: "https://store.steampowered.com/app/730/CounterStrike_2/", linkName: "Counter-Strike 2 on Steam", tabIcon: a, offlineImage: "public/images/broadcast/cs2_major2024_cph.png" }), "76561197960266962" == e && c.init({ bValid: !0, stream: {}, appName: "Winter Sale 2019", name: "Yule Log", appID: 0, link: "https://store.steampowered.com/", linkName: "View Sale Info Here!", tabIcon: s, offlineImage: "public/images/broadcast/winter_sale_2019.png" }); } }, 84678: (e, t, n) => { "use strict"; var i, o; n.d(t, { C7: () => r, gK: () => o }), (function (e) { (e[(e.Hover = 0)] = "Hover"), (e[(e.ClickPopup = 1)] = "ClickPopup"), (e[(e.ClickSurroundingRegion = 2)] = "ClickSurroundingRegion"); })(i || (i = {})), (function (e) { (e[(e.Chat = 0)] = "Chat"), (e[(e.Notification = 1)] = "Notification"), (e[(e.Error = 2)] = "Error"); })(o || (o = {})); class r {} }, 84750: (e, t, n) => { "use strict"; n.d(t, { Pw: () => s, c8: () => a, hB: () => o, zB: () => r }); const i = new (n(77385).sO)("video"), o = (i.Info, i.Debug); i.Error, i.Warning; function r(e) { let t = Math.floor(e / 3600), n = Math.floor(e / 60) % 60, i = Math.floor(e) % 60, o = i.toString(); i < 10 && (o = "0" + o); let r = n.toString(); return n < 10 && t > 0 && (r = "0" + r), (t > 0 ? t + ":" : "") + r + ":" + o; } function a() { let e = !1; try { e = MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d4032,mp4a.40.2"'); } catch (e) {} return e; } function s() { let e = document.createElement("video").canPlayType('application/vnd.apple.mpegurl;codecs="avc1.64001f,mp4a.40.02"'); return "probably" === e || "maybe" === e; } }, 86374: (e, t, n) => { "use strict"; n.d(t, { Ub: () => l, bY: () => c, be: () => m, lS: () => h, rK: () => u, y$: () => d }); var i = n(27378), o = n(93635); const r = i.createContext(void 0), a = r.Provider, s = () => { const e = i.useContext(r); if (!e) throw new Error("called useActiveServiceTransportContext outside of ServiceTransportProvider"); return e; }; function l(e) { const { useStorage: t, children: n } = e; let r, s; "useActiveCMInterface" in e ? (s = r = e.useActiveCMInterface) : "useActiveSteamInterface" in e ? (s = e.useActiveSteamInterface) : (0, o.Z)(e, "neither useActiveCMInterface nor useActiveSteamInterface were provided"); const l = i.useMemo(() => ({ useActiveSteamInterface: s, useActiveCMInterface: r, useStorage: t }), [s, r, t]); return i.createElement(a, { value: l }, n); } const c = () => s().useActiveSteamInterface().GetServiceTransport(), m = () => s().useActiveSteamInterface().GetAnonymousServiceTransport(), d = () => s().useStorage(), h = () => s().useActiveSteamInterface(), u = () => { var e, t; const n = null === (t = null === (e = s()) || void 0 === e ? void 0 : e.useActiveCMInterface) || void 0 === t ? void 0 : t.call(e); if (!n) throw new Error("called useActiveCMInterface outside of ServiceTransportRoot"); return n; }; }, 24110: (e, t, n) => { "use strict"; n.d(t, { L: () => o }); var i = n(85556); class o { GetObject(e) { return (0, i.mG)(this, void 0, void 0, function* () { try { const t = yield this.GetString(e); return t ? JSON.parse(t) : null; } catch (e) { return null; } }); } StoreObject(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.StoreString(e, JSON.stringify(t)); }); } } }, 99627: (e, t, n) => { "use strict"; n.d(t, { Z: () => o }); var i = n(24110); class o extends i.L { GetString(e) { return Promise.resolve(localStorage.getItem(e)); } StoreString(e, t) { return localStorage.setItem(e, t), Promise.resolve(); } RemoveObject(e) { return localStorage.removeItem(e), Promise.resolve(); } } }, 82909: (e, t, n) => { "use strict"; n.d(t, { Oo: () => s, Xh: () => c, yV: () => l }); n(95957); var i = n(78482), o = n(91300), r = n(93635); class a { constructor() { this.m_mapManagers = new WeakMap(); } GetContextMenuManagerFromWindow(e) { var t; let n = (null === (t = null == e ? void 0 : e.ownerDocument) || void 0 === t ? void 0 : t.defaultView) || window; return this.GetContextMenuManager(n); } GetContextMenuManager(e) { let t = this.m_mapManagers.get(e); if (!t) { let n = e; for (; !t && n.opener; ) (n = n.opener), (t = this.m_mapManagers.get(n)); } return t || ((t = new i.u()), this.m_mapManagers.set(e, t)), t; } SetMenuManager(e, t) { (0, r.X)(void 0 === this.m_mapManagers.get(e) || !t || e == window, `Stomping CContextMenuManager for ${e.document.title}!`), this.m_mapManagers.set(e, t); } RegisterChildWindow(e, t) { return this.m_mapManagers.set(t, this.GetContextMenuManager(e)), () => this.m_mapManagers.delete(t); } } const s = (0, o.Yt)("ContextMenuFactory", () => new a()); function l(e, t, n) { let i, o, r, a = t; if ((null == a ? void 0 : a.preventDefault) && (null == a ? void 0 : a.stopPropagation)) { if (a.shiftKey || (a.altKey && !(null == n ? void 0 : n.bRootContextMenu))) return null; a.preventDefault(), a.stopPropagation(), (r = a.currentTarget), (i = a.clientX), (o = a.clientY); } else r = t; let l = s.GetContextMenuManagerFromWindow(r).CreateContextMenuInstance(e, r, i, o, n); return l.Show(), (null == n ? void 0 : n.bCreateHidden) && l.Hide(), l; } function c(e, t, n, i) { let o = s.GetContextMenuManagerFromWindow(t).CreateContextMenuInstance(e, t, n, i, { bForcePopup: !0, bScreenCoordinates: !0 }); return o.Show(), o; } }, 95957: (e, t, n) => { "use strict"; n.d(t, { $Y: () => l }); var i = n(85556), o = n(79588), r = n(88669), a = (n(61963), n(78654)); class s { constructor(e, t) { (this.m_nKey = null), (this.m_bVisible = !1), (this.m_rctLabel = void 0), (this.m_timerHideMenu = 0), (this.m_elSubmenuItem = null), (this.m_timerHideSubMenu = 0), (0, o.rC)(this), (this.m_ContextMenuManager = e), (this.m_rctElement = t); } get Manager() { return this.m_ContextMenuManager; } get key() { return null == this.m_nKey && ((this.m_nKey = s.s_nNextKeyValue), s.s_nNextKeyValue++), this.m_nKey; } SetElement(e) { this.m_element = e; } SetPopup(e) { this.m_popupContextMenu = e; } get ReactElement() { return this.m_rctElement; } get label() { return this.m_rctLabel; } get submenu() { return this.m_submenu; } get visible() { return this.m_bVisible; } get options() { return this.m_options; } get position() { return this.m_position; } SetOnHideCallback(e) { this.m_fnOnHideCallback = e; } Show() { this.CancelHideMenuTimer(), (this.m_bVisible = !0), this.m_ContextMenuManager.ShowMenu(this); } OnCancel() { var e; (null === (e = this.options) || void 0 === e ? void 0 : e.onCancel) && this.options.onCancel(), this.Hide(); } Hide(e = 0) { e > 0 ? (this.m_timerHideMenu = window.setTimeout(() => { (this.m_timerHideMenu = 0), this.InternalHide(); }, e)) : this.InternalHide(); } CancelHideMenuTimer() { this.m_timerHideMenu > 0 && (clearTimeout(this.m_timerHideMenu), (this.m_timerHideMenu = 0)); } SetPosition(e, t, n) { (this.m_options = Object.assign(Object.assign({}, this.m_options), n)), (this.m_position.clientX = e), (this.m_position.clientY = t), (this.m_position.options = this.m_options); } ForceHide() { this.InternalHide(); } HideIfNotInFocus() { this.BHasFocus() || this.BIsFocusInChildHierarchy() || this.Hide(); } InternalHide() { this.CancelHideMenuTimer(), this.m_bVisible && ((this.m_bVisible = !1), this.InternalHideSubMenu(), this.m_fnOnHideCallback && this.m_fnOnHideCallback(), this.m_ContextMenuManager.HideMenu(this)); } SetTakeFocus(e) { this.m_fnTakeFocus = e; } ShowSubMenu(e, t) { var n; return this.m_elSubmenuItem == e ? (this.CancelHideSubMenuTimer(), null === (n = this.m_submenu) || void 0 === n || n.TakeFocus(), null) : (this.InternalHideSubMenu(), (this.m_elSubmenuItem = e), (this.m_submenu = new c(this, t(), e, this.m_options.bForcePopup)), this.m_submenu.Show(), this.m_submenu); } CancelHideSubMenuTimer() { this.m_timerHideSubMenu > 0 && (clearTimeout(this.m_timerHideSubMenu), (this.m_timerHideSubMenu = 0)); } HideSubMenu() { if (!this.m_submenu) return void this.CancelHideSubMenuTimer(); if (this.m_timerHideSubMenu > 0) return; this.m_timerHideSubMenu = window.setTimeout(() => { this.InternalHideSubMenu(), (this.m_timerHideSubMenu = 0); }, 150); } OnSubMenuDismissed(e) { this.m_submenu == e && this.InternalHideSubMenu(); } HideSelf() { this.m_parentInstance ? this.m_parentInstance.OnSubMenuDismissed(this) : this.InternalHide(); } InternalHideSubMenu() { this.CancelHideSubMenuTimer(), this.m_submenu && (this.m_submenu.m_element && this.BIsFocusInChildHierarchy() && this.TakeFocus(a.IF.k_EWindowBringToFrontAndForceOS), (this.m_elSubmenuItem = null), this.m_submenu.InternalHide(), (this.m_submenu = void 0)); } TakeFocus(e = a.IF.k_EWindowBringToFrontAndForceOS) { this.m_popupContextMenu && this.m_popupContextMenu.Focus(e), this.m_fnTakeFocus && this.m_fnTakeFocus(); } BInternalElementInParentHierarchy(e) { return null != this.m_parentInstance && (this.m_parentInstance.BIsChildElement(e) || this.m_parentInstance.BInternalElementInParentHierarchy(e)); } BInternalElementInChildHierarchy(e) { return null != this.m_submenu && (this.m_submenu.BIsChildElement(e) || this.m_submenu.BInternalElementInChildHierarchy(e)); } BIsChildElement(e) { var t; return this.m_element ? r.ni(this.m_element, e) : r.ni(null === (t = this.m_popupContextMenu) || void 0 === t ? void 0 : t.root_element, e); } BHasFocus() { var e; return this.m_popupContextMenu ? this.m_popupContextMenu.focused : r.ni(this.m_element, null === (e = this.m_element) || void 0 === e ? void 0 : e.ownerDocument.activeElement); } BIsFocusInChildHierarchy() { return null != this.m_submenu && (this.m_submenu.BHasFocus() || this.m_submenu.BIsFocusInChildHierarchy()); } BIsElementInMenuHierarchy(e) { return this.BInternalElementInParentHierarchy(e) || this.BInternalElementInChildHierarchy(e); } BIsSubMenuVisible() { return !!this.m_submenu; } SetLabel(e) { this.m_rctLabel = e; } } (s.s_nNextKeyValue = 1), (0, i.gn)([o.LO], s.prototype, "m_bVisible", void 0), (0, i.gn)([o.LO.ref], s.prototype, "m_rctLabel", void 0); class l extends s { constructor(e, t, n, i, o, r) { super(e, t), (this.m_options = r || {}), (this.m_position = { element: n, clientX: i, clientY: o, instance: this, options: this.m_options, fnOnMenuItemSelected: () => { this.Hide(); }, }); } Show() { super.Show(); } Hide(e = 0) { super.Hide(e); } ForceHide() { super.ForceHide(); } BIsSubMenu() { return !1; } } class c extends s { constructor(e, t, n, i) { super(e.Manager, t), (this.m_parentInstance = e), (this.m_options = { bOverlapVertical: !0, strClassName: e.options.strClassName, bFitToWindow: e.options.bFitToWindow, bShiftToFitWindow: e.options.bShiftToFitWindow, bForcePopup: i }), (this.m_position = { element: n, clientX: void 0, clientY: void 0, instance: this, options: this.m_options, fnOnMenuItemSelected: () => { this.Hide(); }, bSubmenu: !0, }); } Hide() { var e; this.m_popupContextMenu ? window.setTimeout(() => { var e; null === (e = this.m_parentInstance) || void 0 === e || e.HideIfNotInFocus(); }, 10) : null === (e = this.m_parentInstance) || void 0 === e || e.Hide(); } ForceHide() { var e; null === (e = this.m_parentInstance) || void 0 === e || e.ForceHide(); } BIsSubMenu() { return !0; } } }, 78482: (e, t, n) => { "use strict"; n.d(t, { u: () => s }); var i = n(95957), o = n(93635), r = n(22394), a = n(9824); class s { constructor() { (this.m_callbacksMenusChanged = new r.pB()), (this.m_rgActiveSubmenus = []), (this.m_setHiddenMenus = new Set()); } CreateContextMenuInstance(e, t, n, o, r) { const a = new i.$Y(this, e, t, n, o, r); return (null == r ? void 0 : r.bCreateHidden) && (this.m_setHiddenMenus.add(a), this.m_callbacksMenusChanged.Dispatch()), a; } get OnMenusChanged() { return this.m_callbacksMenusChanged; } HideActiveMenu() { var e; (null === (e = this.m_ActiveMenu) || void 0 === e ? void 0 : e.options.bRetainOnHide) ? this.m_setHiddenMenus.add(this.m_ActiveMenu) : this.m_rgActiveSubmenus.length && (this.m_rgActiveSubmenus = []), (this.m_ActiveMenu = void 0); } get ActiveMenu() { return this.m_ActiveMenu; } GetVisibleMenus() { return this.m_ActiveMenu ? [this.m_ActiveMenu, ...this.m_rgActiveSubmenus] : []; } GetHiddenMenus() { return Array.from(this.m_setHiddenMenus); } GetAllMenus() { let e; return (e = this.m_ActiveMenu ? [this.m_ActiveMenu, ...this.m_rgActiveSubmenus, ...Array.from(this.m_setHiddenMenus)] : [...this.m_rgActiveSubmenus, ...Array.from(this.m_setHiddenMenus)]), e.sort((e, t) => e.key - t.key); } BShouldRenderMouseOverlay() { return this.m_ActiveMenu && !this.m_ActiveMenu.options.bDisableMouseOverlay; } ShowMenu(e) { if (e.BIsSubMenu()) this.m_rgActiveSubmenus.push(e); else { if (e == this.m_ActiveMenu) return; this.m_ActiveMenu && (this.m_ActiveMenu.options.bRetainOnHide && this.m_setHiddenMenus.add(this.m_ActiveMenu), this.m_ActiveMenu.Hide()), (this.m_ActiveMenu = e), this.m_setHiddenMenus.delete(e); } this.m_callbacksMenusChanged.Dispatch(); } HideMenu(e) { e.BIsSubMenu() ? a.Zf(this.m_rgActiveSubmenus, e) && this.m_callbacksMenusChanged.Dispatch() : ((0, o.X)(e == this.m_ActiveMenu, "Call to hide inactive menu"), e == this.m_ActiveMenu && (this.HideActiveMenu(), this.m_callbacksMenusChanged.Dispatch())); } ReleaseHiddenMenu(e) { this.m_setHiddenMenus.delete(e); } } }, 90729: (e, t, n) => { "use strict"; n.d(t, { AN: () => s }); var i = n(37634), o = n(88669); class r { constructor(e) { this.instance = new a(e, !1); } } class a { constructor(e, t = !0) { (this.m_container = null), (this.m_parent = e), (this.m_window = e.ownerDocument.defaultView), (this.m_bRemoveOnHide = t); } Show(e, t) { return ( this.CancelShowInterval(), t ? new Promise((n, i) => { this.iIntervalShow = this.m_window.setTimeout(() => { let t = this.m_parent.ownerDocument; t.defaultView && !t.defaultView.closed && (this.InternalShow(e), n()); }, t); }) : (this.InternalShow(e), Promise.resolve()) ); } InternalShow(e) { this.m_container || ((this.m_container = this.m_parent.ownerDocument.createElement("div")), this.m_parent.appendChild(this.m_container)), this.m_reactRoot || (this.m_reactRoot = i.s(this.m_container)), this.m_reactRoot.render(e); } Hide(e) { this.CancelShowInterval(), e ? (this.iIntervalShow = this.m_window.setTimeout(() => { this.InternalHide(); }, e)) : this.InternalHide(); } InternalHide() { this.m_reactRoot && (this.m_reactRoot.unmount(), (this.m_reactRoot = void 0)), this.m_container && this.m_bRemoveOnHide && (this.m_parent.removeChild(this.m_container), (this.m_container = null)); } CancelShowInterval() { void 0 !== this.iIntervalShow && (this.m_window.clearInterval(this.iIntervalShow), (this.iIntervalShow = void 0)); } BIsChildElement(e) { return this.m_container && o.ni(this.m_container, e); } } class s { constructor(e) { (this.m_mapEmbeddedHovers = new WeakMap()), (this.m_strUniqueID = e); } ShowElementDelayed(e, t, n, i) { let o = this.GetEmbeddedElement(e); return (o.activeObject = i), o.instance.Show(n, t); } ShowElement(e, t, n) { let i = this.GetEmbeddedElement(e); (i.activeObject = n), i.instance.Show(t); } HideElement(e, t, n) { let i = this.GetEmbeddedElement(e); i.activeObject == t && ((i.activeObject = void 0), i.instance.Hide(n)); } GetEmbeddedElement(e) { let t = this.m_mapEmbeddedHovers.get(e); return t || ((t = new r(e.body)), this.m_mapEmbeddedHovers.set(e, t)), t; } } }, 33690: (e, t, n) => { "use strict"; n.d(t, { _9: () => I, Rt: () => E, K3: () => D, x1: () => w, eL: () => g, iJ: () => C, sB: () => b, AN: () => A, Wy: () => y }); var i = n(85556), o = n(79588), r = n(27378), a = n(88669), s = n(97063), l = n(8568), c = n(78654), m = n(34294), d = n(84290), h = n(10553), u = n(93635), p = n(9824); class _ { constructor(e, t, n) { if (((this.m_rgLoadingLinks = []), (this.m_rgLoadingLinks = []), n)) for (let e = 0; e < n.length; e++) this.AddLink(n[e], !0); else { let t = e.getElementsByTagName("link"); for (let e = 0; e < t.length; e++) { let n = t[e]; this.AddLink(n, !1); } } } AddLink(e, t) { if (t) { let t = !1; try { (e.sheet && e.sheet.cssRules && 0 != e.sheet.cssRules.length) || (t = !0); } catch (e) {} t && (e.addEventListener("load", this.OnLinkLoad), this.m_rgLoadingLinks.push(e)); } else e.addEventListener("load", this.OnLinkLoad), this.m_rgLoadingLinks.push(e); } SetTarget(e) { (this.m_fnRender = e), 0 == this.m_rgLoadingLinks.length && (this.m_fnRender(), (this.m_fnRender = void 0)); } OnLinkLoad(e) { var t; e.currentTarget.removeEventListener("load", this.OnLinkLoad), p.Zf(this.m_rgLoadingLinks, e.currentTarget), 0 == this.m_rgLoadingLinks.length && (null === (t = this.m_fnRender) || void 0 === t || t.call(this), (this.m_fnRender = void 0)); } } (0, i.gn)([l.a], _.prototype, "OnLinkLoad", null); var g, C, f = n(91300), v = n(57476); function S() { return (0, h.Me)() ? g.BackgroundTransparent : g.None; } function b(e) { let t = g.None; switch (e) { case C.Overlay: return (t |= g.AlwaysOnTop), (t |= g.NoTaskbarIcon), (t |= g.NotFocusable), t; case C.Notification: return (t |= b(C.Overlay)), (t |= g.NoWindowShadow), (t |= g.NoRoundedCorners), (t |= g.OverrideRedirect), t; case C.Tooltip: return (t |= b(C.Overlay)), (t |= g.NoRoundedCorners), (t |= g.NoWindowShadow), (t |= g.TooltipHint), (t |= S()), t; case C.PopupContextMenu: return (t |= g.NoTaskbarIcon), (t |= g.NoRoundedCorners), (t |= g.NoWindowShadow), (t |= g.PopUpMenuHint), (t |= S()), t; case C.StandaloneContextMenu: return (t = g.NoTaskbarIcon), (t |= g.NoRoundedCorners), (t |= g.NoWindowShadow), (t |= g.OverrideRedirect), (t |= S()), t; } } !(function (e) { (e[(e.None = 0)] = "None"), (e[(e.Minimized = 1)] = "Minimized"), (e[(e.Hidden = 2)] = "Hidden"), (e[(e.TooltipHint = 4)] = "TooltipHint"), (e[(e.NoTaskbarIcon = 8)] = "NoTaskbarIcon"), (e[(e.Resizable = 16)] = "Resizable"), (e[(e.ScalePosition = 32)] = "ScalePosition"), (e[(e.ScaleSize = 64)] = "ScaleSize"), (e[(e.Maximized = 128)] = "Maximized"), (e[(e.BackgroundTransparent = 256)] = "BackgroundTransparent"), (e[(e.NotFocusable = 512)] = "NotFocusable"), (e[(e.FullScreen = 1024)] = "FullScreen"), (e[(e.Fullscreen_Exclusive = 2048)] = "Fullscreen_Exclusive"), (e[(e.ApplyBrowserScaleToDimensions = 4096)] = "ApplyBrowserScaleToDimensions"), (e[(e.AlwaysOnTop = 8192)] = "AlwaysOnTop"), (e[(e.NoWindowShadow = 16384)] = "NoWindowShadow"), (e[(e.NoMinimize = 32768)] = "NoMinimize"), (e[(e.PopUpMenuHint = 65536)] = "PopUpMenuHint"), (e[(e.IgnoreSavedSize = 131072)] = "IgnoreSavedSize"), (e[(e.NoRoundedCorners = 262144)] = "NoRoundedCorners"), (e[(e.ForceRoundedCorners = 524288)] = "ForceRoundedCorners"), (e[(e.OverrideRedirect = 1048576)] = "OverrideRedirect"), (e[(e.IgnoreSteamDisplayScale = 2097152)] = "IgnoreSteamDisplayScale"); })(g || (g = {})), (function (e) { (e[(e.Overlay = 0)] = "Overlay"), (e[(e.Notification = 1)] = "Notification"), (e[(e.Tooltip = 2)] = "Tooltip"), (e[(e.PopupContextMenu = 3)] = "PopupContextMenu"), (e[(e.StandaloneContextMenu = 4)] = "StandaloneContextMenu"); })(C || (C = {})); const I = r.createContext({ ownerWindow: window }), y = () => r.useContext(I); function E(e) { const { ownerWindow: t, children: n } = e, i = r.useMemo(() => ({ ownerWindow: t }), [t]); return r.createElement(I.Provider, { value: i }, n); } class D { constructor(e, t) { (this.m_bCreated = !1), (this.m_onCreateRender = null), (this.m_bFocused = !1), (0, o.rC)(this), (0, u.X)(e, "Name is required. This is an internal name, different from title."), (this.m_strName = e); const { title: n, eCreationFlags: r } = t, a = (0, i._T)(t, ["title", "eCreationFlags"]); (this.m_rgParams = Object.assign(Object.assign({}, a), { eCreationFlags: null != r ? r : 0 })), this.m_rgParams.target_browser && (this.m_strName += "_uid" + this.m_rgParams.target_browser.m_unPID), (this.m_bCreateHidden = !!(this.m_rgParams.eCreationFlags & g.Hidden)), (this.m_strTitle = n); } UpdateParamsBeforeShow(e) { return e; } OnDrop(e) { console.log("Ignoring drop onto toplevel window", e), e.preventDefault(), e.stopPropagation(); } OnDragOver(e) { e.preventDefault(), (e.dataTransfer.dropEffect = "none"), e.stopPropagation(); } OnMessage(e) { "window_moved" == e.data && this.OnResize(), "popup-created" == e.data && this.OnCreateInternal(); } Show(e = c.IF.k_EWindowBringToFrontAndForceOS) { var t, n; let i; (i = "boolean" == typeof e ? (e ? c.IF.k_EWindowBringToFrontAndForceOS : c.IF.k_EWindowBringToFrontInvalid) : e), window.SteamClient && (this.m_rgParams.eCreationFlags |= g.Hidden), this.m_rgParams.eCreationFlags & g.NotFocusable && (i = c.IF.k_EWindowBringToFrontInvalid), this.BIsValid() && (this.BIsClosed() ? ((this.m_popup = void 0), (this.m_element = void 0)) : i != c.IF.k_EWindowBringToFrontInvalid && this.Focus(i)); let o, r, a, s = A.GetExistingPopup(this.m_strName); (s && !this.m_rgParams.replace_existing_popup) || ((this.m_rgParams = this.UpdateParamsBeforeShow(this.m_rgParams)), s ? ((r = s.m_element), (o = s.m_popup), s.ReleasePopup(), (a = s.m_renderWhenReady), A.RemoveTrackedPopup(s), null == o || o.removeEventListener("beforeunload", s.OnBeforeUnloadEvent), null == o || o.removeEventListener("unload", s.OnUnload), null == o || o.removeEventListener("resize", s.OnResizeEvent), null == o || o.removeEventListener("focus", this.OnFocusInternal), null == o || o.removeEventListener("blur", this.OnBlurInternal), null == o || o.removeEventListener("drop", s.OnDrop), null == o || o.removeEventListener("dragover", s.OnDragOver), null == o || o.removeEventListener("message", this.OnMessage)) : (({ popup: o, element: r } = R.CreatePopup(this.m_strName, Object.assign(Object.assign({}, this.m_rgParams), { title: this.m_strTitle }))), (a = new _(o.document, r))), o && r && ((o.document.title = this.m_strTitle), o.addEventListener("beforeunload", this.OnBeforeUnloadEvent), o.addEventListener("unload", this.OnUnload), o.addEventListener("resize", this.OnResizeEvent), o.addEventListener("focus", this.OnFocusInternal), o.addEventListener("blur", this.OnBlurInternal), o.addEventListener("drop", this.OnDrop), o.addEventListener("dragover", this.OnDragOver), o.addEventListener("message", this.OnMessage), h.De.LANGUAGE && o.document.documentElement.setAttribute("lang", null !== (t = (0, d.CE)()) && void 0 !== t ? t : ""), (this.m_popup = o), (this.m_element = r), (this.m_renderWhenReady = a), null === (n = this.m_renderWhenReady) || void 0 === n || n.SetTarget(() => this.RenderInternal(this.m_popup, this.m_element, i))), A.AddTrackedPopup(this), s && (this.OnCreateInternal(), i != c.IF.k_EWindowBringToFrontInvalid && this.Focus(i))); } RemoveEventListeners() { var e, t, n, i, o, r, a, s; null === (e = this.window) || void 0 === e || e.removeEventListener("beforeunload", this.OnBeforeUnloadEvent), null === (t = this.window) || void 0 === t || t.removeEventListener("unload", this.OnUnload), null === (n = this.window) || void 0 === n || n.removeEventListener("resize", this.OnResizeEvent), null === (i = this.window) || void 0 === i || i.removeEventListener("focus", this.OnFocusInternal), null === (o = this.window) || void 0 === o || o.removeEventListener("blur", this.OnBlurInternal), null === (r = this.window) || void 0 === r || r.removeEventListener("drop", this.OnDrop), null === (a = this.window) || void 0 === a || a.removeEventListener("dragover", this.OnDragOver), null === (s = this.window) || void 0 === s || s.removeEventListener("message", this.OnMessage); } RenderInternal(e, t, n) { this.m_bCreated ? (this.browser_info && (0, m.Su)(this.browser_info.m_eBrowserType) && (t.ownerDocument.body.className += " VR"), this.Render(e, t), this.OnLoad(), e.SteamClient && !this.m_bCreateHidden && (n != c.IF.k_EWindowBringToFrontInvalid ? e.SteamClient.Window.BringToFront(n) : e.SteamClient.Window.ShowWindow())) : (this.m_onCreateRender = () => this.RenderInternal(e, t, n)); } OnCreateInternal() { this.m_bCreated || ((this.m_bCreated = !0), this.OnCreate(), this.m_onCreateRender && (this.m_onCreateRender(), (this.m_onCreateRender = null))); } OnCreate() {} OnResizeEvent() { this.OnResize(); } OnBeforeUnloadEvent() { this.OnBeforeUnload(); } OnUnload(e) { this.RemoveEventListeners(), A.RemoveTrackedPopup(this), this.OnClose(), (this.m_popup = void 0); } get browser_info() { return this.m_rgParams.target_browser; } get window() { return this.m_popup; } get root_element() { return this.m_element; } get title() { return this.m_strTitle; } set title(e) { (this.m_strTitle = e), this.m_popup && (this.m_popup.document.title = this.m_strTitle); } get params() { return this.m_rgParams; } Focus(e = c.IF.k_EWindowBringToFrontAndForceOS) { e != c.IF.k_EWindowBringToFrontInvalid && (this.m_popup && void 0 !== this.m_popup.SteamClient && void 0 !== this.m_popup.SteamClient.Window ? this.m_popup.SteamClient.Window.BringToFront(e) : this.m_popup && this.m_popup.focus()); } Close() { this.m_popup && ((0, v.w3)(this.m_popup.window, "Window.Close") ? this.m_popup.window.SteamClient.Window.Close() : this.m_popup.window.close()); } GetName() { return this.m_strName; } BIsValid() { return !!this.m_popup; } BIsClosed() { return !this.m_popup || this.m_popup.closed; } BIsVisible() { return !(!this.m_popup || this.m_popup.closed || "visible" != this.m_popup.document.visibilityState); } BIsFocused() { var e; return this.BIsVisible() && !!(null === (e = this.m_popup) || void 0 === e ? void 0 : e.document.hasFocus()); } OnFocusInternal() { this.m_popup && this.m_popup.document.body.classList.add("WindowFocus"), (this.m_bFocused = !0), this.OnFocus(); } OnBlurInternal() { this.m_popup && this.m_popup.document.body.classList.remove("WindowFocus"), (this.m_bFocused = !1), this.OnBlur(); } get focused() { return this.m_bFocused; } GetWindowRestoreDetails() { return (0, v.w3)(this.m_popup, "Window.GetWindowRestoreDetails") && !this.m_popup.closed ? this.m_popup.SteamClient.Window.GetWindowRestoreDetails() : Promise.resolve(""); } IsMinimized() { return (0, v.w3)(this.m_popup, "Window.IsWindowMinimized") && !this.m_popup.closed ? this.m_popup.SteamClient.Window.IsWindowMinimized() : Promise.resolve(!1); } IsMaximized() { return (0, v.w3)(this.m_popup, "Window.IsWindowMaximized") && !this.m_popup.closed ? this.m_popup.SteamClient.Window.IsWindowMaximized() : Promise.resolve(!1); } ReleasePopup() { this.OnClose(), (this.m_popup = null); } OnResize() { this.IsMaximized().then((e) => { var t, n; e ? null === (t = this.m_popup) || void 0 === t || t.document.body.classList.add("Maximized") : null === (n = this.m_popup) || void 0 === n || n.document.body.classList.remove("Maximized"); }); } OnBeforeUnload() {} OnFocus() {} OnBlur() {} } (0, i.gn)([o.LO], D.prototype, "m_bFocused", void 0), (0, i.gn)([l.a], D.prototype, "OnMessage", null), (0, i.gn)([l.a], D.prototype, "RenderInternal", null), (0, i.gn)([l.a], D.prototype, "OnCreateInternal", null), (0, i.gn)([l.a], D.prototype, "OnResizeEvent", null), (0, i.gn)([l.a], D.prototype, "OnBeforeUnloadEvent", null), (0, i.gn)([l.a], D.prototype, "OnUnload", null), (0, i.gn)([l.a], D.prototype, "OnFocusInternal", null), (0, i.gn)([l.a], D.prototype, "OnBlurInternal", null); class w extends D { constructor(e, t, n, i) { super(e, n), this.SetSavedDimensionsKey(t), (this.m_bExpires = i); } BIsInOverlay() { return this.browser_info && 0 != this.browser_info.m_unPID && -1 != this.browser_info.m_nBrowserID; } SetSavedDimensionsKey(e) { this.m_strSavedDimensionsKey = e; } UpdateParamsBeforeShow(e) { return !this.m_strSavedDimensionsKey || e.bIgnoreSavedDimensions || e.strRestoreDetails ? e.strRestoreDetails && ((this.m_strInitialSavedDimensionsKey = this.GetSavedDimensionsKey()), A.SetRestoreDetails(this.m_strInitialSavedDimensionsKey, e.strRestoreDetails, this.m_bExpires)) : ((this.m_strInitialSavedDimensionsKey = this.GetSavedDimensionsKey()), (e.strRestoreDetails = A.GetRestoreDetails(this.m_strInitialSavedDimensionsKey))), e; } OnLoad() { this.GetWindowRestoreDetails().then((e) => { (this.m_strInitialRestoreDetails = e), this.OnResizeComplete(e); }); } OnResize() { super.OnResize(), this.QueryAndStoreWindowPosition(); } OnResizeComplete(e) {} QueryAndStoreWindowPosition() { var e; if (this.m_strInitialRestoreDetails) { let t = this.GetSavedDimensionsKey(); null === (e = this.m_popup) || void 0 === e || e.setTimeout(() => { this.GetWindowRestoreDetails().then((e) => { let n = this.m_rgParams.strRestoreDetails == e && t == this.m_strInitialSavedDimensionsKey; this.m_popup && this.m_strSavedDimensionsKey && e && !n && (A.SetRestoreDetails(t, e, this.m_bExpires), (this.m_rgParams.strRestoreDetails = e), (this.m_strInitialSavedDimensionsKey = t), this.OnResizeComplete(e)); }); }, 30); } } OnBeforeUnload() { this.QueryAndStoreWindowPosition(), super.OnBeforeUnload(); } OnClose() {} SaveWindowPosition(e) { A.SetRestoreDetails(this.GetSavedDimensionsKey(), e, !1), (this.m_rgParams.strRestoreDetails = e); } } (0, i.gn)([l.a], w.prototype, "QueryAndStoreWindowPosition", null); class R { constructor() { if (((this.m_bShuttingDown = !1), (this.m_mapPopups = o.LO.map([], { deep: !1 })), (this.m_rgShutdownCallbacks = []), (this.m_rgPopupCreatedCallbacks = []), (this.m_unCurrentAccountID = 0), (this.m_mapRestoreDetails = new Map()), (this.m_bSaveRequired = !1), !{ NODE_ENV: "production", STEAM_BUILD: "buildbot", VALVE_BUILD: "false" }.MOBILE_BUILD && "addEventListener" in window)) { window.addEventListener("beforeunload", (e) => { var t, n, i, o; this.m_bShuttingDown = !0; for (let e of this.m_rgShutdownCallbacks) e(); let r = []; this.m_mapPopups.forEach((e) => { e.BIsValid() && !e.BIsClosed() && r.push(e); }); for (let e of r) (null === (n = null === (t = e.window) || void 0 === t ? void 0 : t.SteamClient.Browser) || void 0 === n ? void 0 : n.SetShouldExitSteamOnBrowserClosed) && e.window.SteamClient.Browser.SetShouldExitSteamOnBrowserClosed(!1), (null === (i = e.window) || void 0 === i ? void 0 : i.SteamClient.Window.SetHideOnClose) && (null === (o = e.window) || void 0 === o || o.SteamClient.Window.SetHideOnClose(!1)), e.Close(); this.m_bSaveRequired && this.SaveSavedDimensionStore(), this.m_mapPopups.clear(); }); let e = document.querySelector("head"); (0, u.X)(e, "Couldn't find head element"), e && ((this.m_DynamicCSSObserver = new MutationObserver(() => { const e = a.Mv(); this.m_mapPopups.forEach((t) => { a.b$(t.window.document, e, !1); }); })), this.m_DynamicCSSObserver.observe(e, { childList: !0 })); } } BAnyPopupHasFocus() { for (const e of this.m_mapPopups.values()) if (e.focused) return !0; return !1; } BAnyMenuHasFocus() { var e; for (const t of this.m_mapPopups.values()) if (t.focused && (null !== (e = t.params.eCreationFlags) && void 0 !== e ? e : 0) & g.NoTaskbarIcon) return !0; return !1; } SetCurrentLoggedInAccountID(e) { this.m_unCurrentAccountID != e && ((this.m_unCurrentAccountID = e), e ? this.LoadSavedDimensionStore() : this.ClearSavedDimensionStore()); } AddShutdownCallback(e) { this.m_rgShutdownCallbacks.push(e); } AddPopupCreatedCallback(e) { this.m_rgPopupCreatedCallbacks.push(e); } AddTrackedPopup(e) { this.m_mapPopups.set(e.GetName(), e); for (let t of this.m_rgPopupCreatedCallbacks) t(e); } RemoveTrackedPopup(e) { this.m_mapPopups.delete(e.GetName()); } GetExistingPopup(e) { return this.m_mapPopups.get(e); } GetPopups() { return this.m_mapPopups.values(); } GetPopupForWindow(e) { for (const t of this.m_mapPopups.values()) if (t.window === e) return t; } ClosePopupsOwnedByBrowser(e) { this.m_mapPopups.forEach((t) => { t.browser_info && t.browser_info.m_nBrowserID == e.m_nBrowserID && t.browser_info.m_unPID == e.m_unPID && t.Close(); }); } static CreatePopup(e, t) { let n = t.dimensions || {}, i = n.width || 300, o = n.height || 300, r = t.title, s = "width=" + i + ",height=" + o; void 0 !== n.left && (s += ",left=" + n.left), void 0 !== n.top && (s += ",top=" + n.top), (s += ",resizeable,status=0,toolbar=0,menubar=0,location=0"); let l = "about:blank", c = []; c.push("createflags=" + t.eCreationFlags), t.minWidth && c.push("minwidth=" + t.minWidth), t.minHeight && c.push("minheight=" + t.minHeight), t.maxWidth && t.maxWidth != 1 / 0 && c.push("maxwidth=" + t.maxWidth), t.maxHeight && t.maxHeight != 1 / 0 && c.push("maxheight=" + t.maxHeight), t.target_browser ? (c.push("pid=" + t.target_browser.m_unPID), c.push("browser=" + t.target_browser.m_nBrowserID), t.target_browser.m_eBrowserType ? c.push("browserType=" + t.target_browser.m_eBrowserType) : t.browserType && c.push("browserType=" + t.browserType), t.availscreenwidth && t.availscreenheight && (c.push("screenavailwidth=" + t.availscreenwidth), c.push("screenavailheight=" + t.availscreenheight))) : t.browserType && c.push("browserType=" + t.browserType), t.strVROverlayKey && c.push("vrOverlayKey=" + t.strVROverlayKey), t.strRestoreDetails && c.push("restoredetails=" + t.strRestoreDetails), t.window_opener_id && c.push("openerid=" + t.window_opener_id), t.parent_container_popup_id && c.push("parentcontainerpopupid=" + t.parent_container_popup_id), t.center_on_window && void 0 === n.left && void 0 === n.top && c.push("centerOnBrowserID=" + t.center_on_window.SteamClient.Browser.GetBrowserID()), t.strUserAgent && c.push("useragent=" + t.strUserAgent), t.hwndParent && c.push("hwndParent=" + t.hwndParent), t.bPinned && c.push("pinned=true"), t.bModal && c.push("modal=true"), c && (l += "?" + c.join("&")); let m = (t.owner_window || window).open(l, e, s); if (!m) return console.error(`Failed to create popup, browser/CEF may be blocking popups for "${window.location.origin}"`), {}; let d = ""; t.html_class && (d = `class="${t.html_class}"`); let h = ""; t.body_class && (h = `class="${t.body_class}"`); let u = ""; t.popup_class && (u = `class="${t.popup_class}"`); let p = ``; return m.document.write(p), (m.document.title = r), a.V2(m, a.Mv()), { popup: m, element: m.document.getElementById("popup_target") }; } BShuttingDown() { return this.m_bShuttingDown; } GetLocalStorageKey() { return "PopupSavedDimensions_" + this.m_unCurrentAccountID; } LoadSavedDimensionStore() { if (!this.m_unCurrentAccountID) return; let e = this.GetLocalStorageKey(); this.m_mapRestoreDetails.clear(); let t = window.localStorage.getItem(e); if (t) try { let e = JSON.parse(t); this.m_mapRestoreDetails = new Map(e); } catch (e) {} } SaveSavedDimensionStore() { if (!this.m_unCurrentAccountID || !this.m_bSaveRequired) return; let e = this.GetLocalStorageKey(), t = JSON.stringify(Array.from(this.m_mapRestoreDetails)); try { window.localStorage.setItem(e, t), (this.m_bSaveRequired = !1); } catch (n) { if ("name" in n && "QuotaExceededError" == n.name) { console.log("Quota exceeded"); for (let t of Object.keys(window.localStorage)) t.startsWith("PopupSavedDimensions_") && t != e && window.localStorage.removeItem(t); window.localStorage.setItem(e, t), (this.m_bSaveRequired = !1); } } } DebouncedSaveSavedDimensionStore() { this.SaveSavedDimensionStore(); } ClearSavedDimensionStore() { var e; null === (e = this.m_mapRestoreDetails) || void 0 === e || e.clear(), (this.m_bSaveRequired = !1); } GetRestoreDetails(e) { var t; if (!(null === (t = this.m_mapRestoreDetails) || void 0 === t ? void 0 : t.has(e))) return ""; let n = this.m_mapRestoreDetails.get(e); return (n.last_used = Date.now()), (this.m_bSaveRequired = !0), n.strRestoreDetails; } SetRestoreDetails(e, t, n) { if (e) { if (t) { if (this.m_mapRestoreDetails.size > 50) { let e = null, t = Date.now(); for (let n of Array.from(this.m_mapRestoreDetails.keys())) { let i = this.m_mapRestoreDetails.get(n); i.last_used < t && i.bExpires && ((t = i.last_used), (e = n)); } e && this.m_mapRestoreDetails.delete(e); } let i = { strRestoreDetails: t, last_used: Date.now(), bExpires: n }; this.m_mapRestoreDetails.set(e, i); } else this.m_mapRestoreDetails.delete(e); (this.m_bSaveRequired = !0), this.m_bShuttingDown ? this.SaveSavedDimensionStore() : this.DebouncedSaveSavedDimensionStore(); } } } (0, i.gn)([l.a, (0, s.D)(100)], R.prototype, "DebouncedSaveSavedDimensionStore", null); let A = (0, f.Yt)("PopupManager", () => new R()); window.g_PopupManager = A; }, 21569: (e, t, n) => { "use strict"; n.d(t, { F: () => s, Z: () => a }); var i = n(27378), o = n(9824); const r = i.createContext({ body_class: "" }); function a() { return i.useContext(r); } function s(e) { const { body_class: t, children: n } = e, o = a(), s = i.useMemo(() => ({ body_class: l(o.body_class, t) }), [o, t]); return i.createElement(r.Provider, { value: s }, n); } function l(e, t) { const n = e ? e.split(/\s/) : []; return n.push(...(t ? t.split(/\s/) : [])), o.kp(n).join(" "); } }, 24424: (e, t, n) => { "use strict"; n.d(t, { B: () => c }); var i = n(27378), o = n(33690), r = n(21569), a = n(78654), s = n(87018); const l = (0, i.createContext)(void 0); l.Provider; n(1687); function c(e, t, n) { const o = i.useRef(void 0), [l, c] = i.useState(void 0), d = (0, r.Z)(); return ( o.current || (o.current = new m( e, (function (e, t) { return Object.assign(Object.assign({}, e), { body_class: (0, s.Z)(e.body_class, t.body_class) }); })(t, d), c, )), (o.current.m_callbacks = n), i.useEffect(() => { var e, t, n; if (!(null === (e = o.current) || void 0 === e ? void 0 : e.params.bNoInitialShow)) { let e = (null === (t = o.current) || void 0 === t ? void 0 : t.params.bNoFocusOnShow) ? a.IF.k_EWindowBringToFrontWithoutForcingOS : a.IF.k_EWindowBringToFrontAndForceOS; null === (n = o.current) || void 0 === n || n.Show(e); } return () => { var e, t; (o.current.m_callbacks = void 0), (null === (e = o.current.window) || void 0 === e ? void 0 : e.SteamClient.Window.SetHideOnClose) && (null === (t = o.current.window) || void 0 === t || t.SteamClient.Window.SetHideOnClose(!1)), o.current.Close(); }; }, []), i.useEffect(() => { var e, n; (null === (e = o.current.window) || void 0 === e ? void 0 : e.SteamClient.Window.SetHideOnClose) && (null === (n = o.current.window) || void 0 === n || n.SteamClient.Window.SetHideOnClose(!!t.bHideOnClose)); }, [t.bHideOnClose]), { popup: o.current.window, element: l, popupObj: o.current } ); } class m extends o.K3 { constructor(e, t, n) { super(e, t), (this.m_fnReadyToRender = n); } DoCallback(e) { var t, n; null === (n = null === (t = this.m_callbacks) || void 0 === t ? void 0 : t[e]) || void 0 === n || n.call(t, this.m_popup, this.m_element); } UpdateParamsBeforeShow(e) { var t; return (null === (t = this.m_callbacks) || void 0 === t ? void 0 : t.updateParamsBeforeShow) ? this.m_callbacks.updateParamsBeforeShow(e) : e; } OnCreate() { var e; (null === (e = this.m_callbacks) || void 0 === e ? void 0 : e.onCreate) && this.m_callbacks.onCreate(this.m_popup, this.m_element); } OnBlur() { this.DoCallback("onBlur"); } OnFocus() { this.DoCallback("onFocus"); } OnLoad() { this.DoCallback("onLoad"); } OnResize() { this.DoCallback("onResize"); } OnClose() { this.DoCallback("onClose"); } Render(e, t) { this.m_fnReadyToRender(t); } } }, 99643: (e, t, n) => { "use strict"; n.d(t, { CQ: () => m, z3: () => d }); var i = n(85556), o = n(1736), r = n(96127), a = n(56552), s = n(86374), l = n(57117); function c() { const e = (0, s.bY)(); return (0, a.useQuery)( ["AccountPrivateApps"], () => (0, i.mG)(this, void 0, void 0, function* () { const t = o.gA.Init(r.XR), n = yield r.kk.GetPrivateAppList(e, t); return new Set(n.Body().private_apps(!0).appids()); }), { enabled: !!l.L7.accountid }, ); } function m(e) { const { data: t } = c(); return !!l.L7.accountid && !!e && (t ? t.has(e) : void 0); } function d(e, t) { e.setQueryData(["AccountPrivateApps"], () => new Set(t)); } }, 56320: (e, t, n) => { "use strict"; n.d(t, { DP: () => g, Hy: () => d, IS: () => p, K: () => m, Ks: () => h, bX: () => _, wl: () => u }); var i = n(85556), o = n(27378), r = n(19900), a = n(1093), s = n(2049), l = n(76261); o.forwardRef(function (e, t) { const { NavigationManager: n, onActivated: m, onDeactivated: d, navTreeRef: h, secondary: u, virtualFocus: p, navID: _, children: g, "flow-children": C, parentEmbeddedNavTree: f, focusClassesInDesktop: v } = e, S = (0, i._T)(e, ["NavigationManager", "onActivated", "onDeactivated", "navTreeRef", "secondary", "virtualFocus", "navID", "children", "flow-children", "parentEmbeddedNavTree", "focusClassesInDesktop"]), { elemProps: b, navOptions: I, gamepadEvents: y } = (0, r.QH)(S), E = (null === (D = o.useContext(c)) || void 0 === D ? void 0 : D.focusNavWindow) || n.GetDefaultContext(); var D; let w = o.useRef(null); w.current || (w.current = n.NewGamepadNavigationTree(E, _)); const R = w.current; o.useLayoutEffect(() => { const e = (0, a.t)(C); R.Root.SetProperties(Object.assign(Object.assign({}, I), { layout: e })); }); let A = o.useRef(null); R.SetUseVirtualFocus(p), R.SetParentEmbeddedNavTree(f), R.SetApplyFocusClassesInDesktop(null != v && v), (0, s.Qg)(R.OnActivateCallbacks, m), (0, s.Qg)(R.OnDeactivateCallbacks, d), (0, l.Jd)(y, A, w.current), o.useLayoutEffect(() => R.RegisterNavigationItem(R.Root, A.current), [R, A]), o.useLayoutEffect(() => n.RegisterGamepadNavigationTree(R, A.current.ownerDocument.defaultView, null != u && u), [n, u, R]), o.useLayoutEffect(() => ((0, s.k$)(h, R), () => (0, s.k$)(h, null)), [h, R]); const M = (0, s.BE)(A, t); return o.createElement("div", Object.assign({}, b, { id: _, "data-react-nav-root": _, ref: M }), o.createElement(r.ET.Provider, { value: R.Root }, g)); }); const c = o.createContext({ focusNavWindow: null, bSupportsFocus: !0 }); function m() { var e, t; return null === (t = null === (e = o.useContext(c)) || void 0 === e ? void 0 : e.bSupportsFocus) || void 0 === t || t; } function d() { return o.createRef(); } const h = (0, r.lP)("div"), u = (0, r.lP)("button"), p = (0, r.lP)("a"), _ = (0, r.hi)("input"), g = (0, r.hi)("textarea"); (0, r.lP)("img"); }, 19900: (e, t, n) => { "use strict"; n.d(t, { CO: () => I, QH: () => y, zQ: () => D, Iy: () => S, lP: () => R, hi: () => A, ET: () => v, Pd: () => b }); var i = n(85556), o = n(27378), r = n(56320), a = n(76261), s = n(10680), l = n(95967), c = n(33690), m = n(2049), d = n(10553); const h = o.createContext(function (e, t) { return { ShowVirtualKeyboard: () => {}, ShowModalKeyboard: () => {}, SetAsCurrentVirtualKeyboardTarget: () => {}, HideVirtualKeyboard: () => {}, DelayHideVirtualKeyboard: () => {}, BIsActive: () => !1, BIsElementValidForInput: () => !1 }; }); function u(e, t) { const { onTextEntered: n } = e, r = (0, i._T)(e, ["onTextEntered"]), a = o.useRef(null), l = (0, d.qt)({ bSuppressAssert: !0 }), u = !!o.useContext(v), p = o.useRef({ onTextEntered: () => null }); Object.assign( p.current, Object.assign(Object.assign({}, r), { onTextEntered: n || ((e) => (function (e, t) { var n, i; if (t) { switch (e) { case "Backspace": e = "\b"; break; case "Enter": e = "\n"; break; case "Tab": e = "\t"; break; case "ArrowLeft": e = ""; break; case "ArrowRight": e = ""; break; case "ArrowUp": e = ""; break; case "ArrowDown": e = ""; } "" !== e && (null === (n = SteamClient.OpenVR) || void 0 === n || n.Keyboard.SendText(e)); } else { switch (e) { case "Backspace": e = ""; break; case "Enter": e = ""; break; case "Tab": e = "\t"; break; case "ArrowLeft": e = ""; break; case "ArrowRight": e = ""; break; case "ArrowUp": e = ""; break; case "ArrowDown": e = ""; } null === (i = SteamClient.Input) || void 0 === i || i.ControllerKeyboardSendText(e); } })(e, l.IN_VR)), BIsElementValidForInput: () => a.current && document.activeElement == a.current, }), ); const _ = (function (e, t) { const n = o.useRef(), i = o.useContext(h); n.current || (n.current = i(e, t)); return n.current; })(p.current, () => a.current.ownerDocument.defaultView), g = o.useCallback( (e) => { var t, n; if (!document.hasFocus() && document.activeElement == a.current) return; if (e.currentTarget != a.current) return void console.warn("keyboard got blur event, but it's not the active element"); const i = null !== (n = null === (t = c.AN.GetPopupForWindow(a.current.ownerDocument.defaultView)) || void 0 === t ? void 0 : t.params.bUseVRKeyboard) && void 0 !== n && n; (_.BIsActive() || i) && _.DelayHideVirtualKeyboard(); }, [_], ), C = (0, m.xK)( (e) => { a.current = e; const t = []; return e && (e.addEventListener("focus", _.SetAsCurrentVirtualKeyboardTarget), t.push(() => e.removeEventListener("focus", _.SetAsCurrentVirtualKeyboardTarget)), u && (e.addEventListener("click", _.ShowVirtualKeyboard), t.push(() => e.removeEventListener("click", _.ShowVirtualKeyboard))), t.push((0, s.x)(e, _.ShowVirtualKeyboard)), t.push((0, s.BG)(e, g))), () => t.forEach((e) => e()); }, [g, _, u], ); return ( o.useLayoutEffect( () => ( (0, m.k$)(t, { TakeFocusAndShowKeyboard: () => { const e = a.current; e && (document.activeElement != e && e.focus(), _.ShowVirtualKeyboard()); }, HideVirtualKeyboard: () => { _.HideVirtualKeyboard(); }, }), () => (0, m.k$)(t, null) ), [_, t], ), C ); } var p = n(91300), _ = n(70283), g = n(65640), C = n(87018), f = n(16682); const v = (0, p.Yt)("GamepadNavigationContext", () => o.createContext(null)), S = (0, p.Yt)("FocusRingNavigationContext", () => o.createContext(l.U7)); function b(e) { const { navRef: t } = e, n = (0, i._T)(e, ["navRef"]), r = o.useRef(null), a = (0, o.useContext)(v), s = (0, o.useContext)(S), l = (function (e, t) { let n = o.useRef(null); return !e || (n.current && n.current.m_Parent == e) || (n.current = e.Tree.CreateNode(e, t)), n.current; })(a, s); return ( o.useLayoutEffect(() => { l && l.SetProperties(n); }), o.useLayoutEffect(() => { if (!a) return; const e = a.Tree.RegisterNavigationItem(l, r.current); return () => { e(); }; }, [a, l, r]), o.useLayoutEffect(() => { if (l && t) return (0, m.k$)(t, l.CreateHandle()), () => (0, m.k$)(t, null); }, [l, t]), { ref: r, node: l } ); } function I(e) { const { onButtonDown: t, onButtonUp: n, onOKButton: o, onCancelButton: r, onSecondaryButton: a, onOptionsButton: l, onGamepadDirection: c, onGamepadFocus: m, onGamepadBlur: d, onMenuButton: h, onOKActionDescription: u, onCancelActionDescription: p, onSecondaryActionDescription: _, onOptionsActionDescription: g, onMenuActionDescription: C, actionDescriptionMap: f } = e, v = (0, i._T)(e, ["onButtonDown", "onButtonUp", "onOKButton", "onCancelButton", "onSecondaryButton", "onOptionsButton", "onGamepadDirection", "onGamepadFocus", "onGamepadBlur", "onMenuButton", "onOKActionDescription", "onCancelActionDescription", "onSecondaryActionDescription", "onOptionsActionDescription", "onMenuActionDescription", "actionDescriptionMap"]), S = {}; void 0 !== t && (S.onButtonDown = t), void 0 !== n && (S.onButtonUp = n), void 0 !== o && (S.onOKButton = o), void 0 !== r && (S.onCancelButton = r), void 0 !== a && (S.onSecondaryButton = a), void 0 !== l && (S.onOptionsButton = l), void 0 !== h && (S.onMenuButton = h), void 0 !== c && (S.onGamepadDirection = c), void 0 !== m && (S.onGamepadFocus = m), void 0 !== d && (S.onGamepadBlur = d); return { gamepadEvents: S, actionDescriptions: (0, s.Cj)({ onOKActionDescription: u, onCancelActionDescription: p, onSecondaryActionDescription: _, onOptionsActionDescription: g, onMenuActionDescription: C, actionDescriptionMap: f }), props: v }; } function y(e) { const { autoFocus: t, preferredFocus: n, disableNavSounds: o, fnCanTakeFocus: r, childFocusDisabled: a, retainFocus: s, onFocusWithin: l, navKey: c, noFocusRing: m, focusable: d, focusableIfNoChildren: h, navRef: u, actionDescriptionMap: p, onMoveUp: _, onMoveRight: g, onMoveDown: C, onMoveLeft: f, navEntryPreferPosition: v, scrollIntoViewWhenChildFocused: S, fnScrollIntoViewHandler: b, scrollIntoViewType: y, resetNavOnEntry: E } = e, D = (0, i._T)(e, ["autoFocus", "preferredFocus", "disableNavSounds", "fnCanTakeFocus", "childFocusDisabled", "retainFocus", "onFocusWithin", "navKey", "noFocusRing", "focusable", "focusableIfNoChildren", "navRef", "actionDescriptionMap", "onMoveUp", "onMoveRight", "onMoveDown", "onMoveLeft", "navEntryPreferPosition", "scrollIntoViewWhenChildFocused", "fnScrollIntoViewHandler", "scrollIntoViewType", "resetNavOnEntry"]), { gamepadEvents: w, actionDescriptions: R, props: A } = I(D); return { elemProps: A, navOptions: { autoFocus: t, preferredFocus: n, disableNavSounds: o, fnCanTakeFocus: r, childFocusDisabled: a, retainFocus: s, onFocusWithin: l, navKey: c, noFocusRing: m, focusable: d, focusableIfNoChildren: h, navRef: u, onMoveUp: _, onMoveRight: g, onMoveDown: C, onMoveLeft: f, navEntryPreferPosition: v, scrollIntoViewWhenChildFocused: S, fnScrollIntoViewHandler: b, scrollIntoViewType: y, resetNavOnEntry: E, actionDescriptionMap: Object.assign(Object.assign({}, p), R) }, gamepadEvents: w }; } function E(e) { return function (t) { const { focusClassName: n, focusWithinClassName: a, className: s, divRef: l, node: c, tabIndex: h, children: u } = t, p = (0, i._T)(t, ["focusClassName", "focusWithinClassName", "className", "divRef", "node", "tabIndex", "children"]), _ = (0, m.NW)(), g = (0, d.id)() || c.Tree.GetApplyFocusClassesInDesktop(), f = (0, r.K)(), v = c.BHasFocus() && f, S = c.BFocusWithin() && f, b = c.Tree.BIsActive(); return (0, m.Qg)(c.FocusCallbackList, _), (0, m.Qg)(c.FocusWithinCallbackList, _), (0, m.Qg)(c.Tree.OnActiveStateChangedCallbacks, v || S ? _ : void 0), o.createElement(e, Object.assign(Object.assign({}, p), { className: (0, C.Z)(s, g && v && b && n, g && S && b && a), tabIndex: b ? h : -1, ref: l }), u); }; } const D = E("div"); function w(e, t, n, i) { const { elemProps: r, navOptions: s, gamepadEvents: l } = y(n); void 0 !== s.focusable || r.disabled || (s.focusable = !0); const { ref: c, node: d } = b(Object.assign({}, s)), h = (0, o.useCallback)(() => { var e; return _.LT.PlayNavSound(_.qr.DefaultOk), null === (e = c.current) || void 0 === e || e.click(), !0; }, [c]); l.onOKButton || ((r.onClick || ("button" == e && "submit" == r.type) || "a" == e) && (l.onOKButton = h)), s.focusable && (r.tabIndex = r.tabIndex || 0), (0, a.pD)(l, c); const u = (0, g.Ze)(2, () => "self" == (null == d ? void 0 : d.GetFocusable()) || null != r.onClick), p = (0, f.M)(r); (0, f.B)(r); const S = (0, m.BE)(u, p, i, c), I = r.children; delete r.children; const E = r.focusClassName; return delete r.focusClassName, o.createElement(v.Provider, { value: d }, d ? o.createElement(t, Object.assign(Object.assign({}, r), { divRef: S, node: d, focusClassName: (0, C.Z)(E, "gpfocus"), focusWithinClassName: "gpfocuswithin", className: (0, C.Z)(r.className, "Focusable") }), I) : o.createElement(e, Object.assign(Object.assign({}, r), { ref: S, className: (0, C.Z)(r.className, "Focusable") }), I)); } function R(e) { const t = E(e); return o.forwardRef(function (n, i) { return w(e, t, n, i); }); } function A(e) { const t = E(e); return o.forwardRef(function (n, o) { const r = (function (e) { const { onEnterKeyPress: t, strEnterKeyLabel: n, onKeyboardNavOut: o, onKeyboardShow: r, onKeyboardFullyVisible: a, onTextEntered: s, BIsElementValidForInput: l } = e; return { virtualKeyboardProps: { onEnterKeyPress: t, strEnterKeyLabel: n, onKeyboardNavOut: o, onKeyboardShow: r, onKeyboardFullyVisible: a, onTextEntered: s, BIsElementValidForInput: l }, props: (0, i._T)(e, ["onEnterKeyPress", "strEnterKeyLabel", "onKeyboardNavOut", "onKeyboardShow", "onKeyboardFullyVisible", "onTextEntered", "BIsElementValidForInput"]) }; })(n), { virtualKeyboardProps: a } = r, s = r.props, { refKeyboardHandle: l } = s, c = (0, i._T)(s, ["refKeyboardHandle"]), d = u(a, l), h = (0, m.BE)(o, d); return w(e, t, c, h); }); } }, 8070: (e, t, n) => { "use strict"; n.d(t, { O: () => p, e: () => g }); var i = n(27378), o = n(87018), r = n(77385), a = n(95967), s = n(19900), l = n(14664), c = n.n(l), m = n(2049), d = n(10553), h = n(56320); const u = new r.sO("FocusNavigation").Debug; function p(e) { const { className: t, rootClassName: n, render: r, children: a, NavigationManager: l } = e, u = (0, d.id)(), p = i.useRef(null), [g, C] = i.useState({ bFocusWithin: !1, navTarget: null, prevTarget: null }), f = (0, m.e1)(null == l ? void 0 : l.GetShowDebugFocusRing()), v = i.useRef(null), S = (0, h.K)(), b = i.useMemo( () => ({ OnBlur: (e, t, n) => { C({ bFocusWithin: !1, navTarget: null, prevTarget: null }); }, OnFocus: (e, t, n) => { C({ bFocusWithin: !0, navTarget: t, prevTarget: null }); }, OnFocusChange: (e, t, n) => { C({ bFocusWithin: !0, navTarget: n, prevTarget: t }); }, OnForceMeasureFocusRing: () => { var e; null === (e = v.current) || void 0 === e || e.MeasureElementAndUpdate(); }, }), [C], ), { bFocusWithin: I, navTarget: y } = g; return u ? i.createElement(i.Fragment, null, i.createElement("div", { className: (0, o.Z)(c().FocusRingRoot, n), ref: p }, i.createElement(_, { ref: v, className: (0, o.Z)(t, f && c().DebugFocusRing), render: r, bFocusWithin: I && (S || f), navTarget: y, refContainer: p, bDebug: f })), i.createElement(s.Iy.Provider, { value: b }, a)) : i.createElement(i.Fragment, null, a); } const _ = i.forwardRef(function (e, t) { const { className: n, render: r, bFocusWithin: a, navTarget: s, refContainer: l, bDebug: m } = e, [d, h] = i.useState(s), [p, _] = i.useState(null), [g, f] = i.useState(!1), [v, S] = i.useState(!1), b = i.useRef(performance.now()), I = (0, i.useCallback)(() => { if (!s || !s.BWantsFocusRing()) return null != p && (_(null), !0); let e = s.GetBoundingRect(); const t = l.current.getBoundingClientRect(); if (m) { let t = s.Element; const n = t.ownerDocument.defaultView, i = (t) => "none" == n.getComputedStyle(t).display || (0 == (null == e ? void 0 : e.width) && 0 == e.height && 0 == e.x && 0 == e.y); for (; i(t) && (null == t ? void 0 : t.parentElement); ) (t = t.parentElement), (e = t.getBoundingClientRect()); let o = s.Element != t; o != v && (S(o), o && u("Focused on hidden item: ", s.Element, ". Closest visible ancestor: ", t)); } const n = { left: e.x - t.x, top: e.y - t.y, height: e.height, width: e.width }; return (!p || n.left != p.left || n.top != p.top || n.height != p.height || n.width != p.width) && (_(n), !0); }, [s, l, _, p, v, S, m]); i.useImperativeHandle(t, () => ({ MeasureElementAndUpdate: I }), [I]); let y = a, E = p || {}; s && l.current && (s.BWantsFocusRing() || (y = !1)), s != d && (h(s), (b.current = performance.now()), I(), g && f(!1)), i.useEffect(() => { if (!y || performance.now() - b.current > 500) return; let e; const t = () => { e = requestAnimationFrame(() => { I() ? f(!0) : performance.now() - b.current <= 500 && t(); }); }; return t(), () => cancelAnimationFrame(e); }); const D = r || C; return i.createElement(D, Object.assign({}, E, { visible: y && null !== p, key: b.current, className: (0, o.Z)(n, v && c().FocusRingOnHiddenItem), animationEnabled: !g, target: s })); }); function g(e) { const { NavigationManager: t, children: n } = e; return (0, m.e1)(null == t ? void 0 : t.GetShowDebugFocusRing()) ? i.createElement(p, { NavigationManager: t }, n) : i.createElement(s.Iy.Provider, { value: a.U7 }, n); } function C(e) { const { className: t, visible: n, left: r, top: a, height: s, width: l, target: m, animationEnabled: d } = e; if (!n) return null; const h = { left: (null != r ? r : 0) - 0 + "px", top: (null != a ? a : 0) - 0 + "px", height: s + "px", width: l + "px" }; return i.createElement("div", { className: (0, o.Z)(c().FocusRing, d && c().Animated, t), style: h }); } }, 76261: (e, t, n) => { "use strict"; n.d(t, { Jd: () => m, pD: () => l }); var i = n(85556), o = n(27378), r = n(10680), a = n(77385); n(19900); const s = new a.sO("GamepadEvents").Debug; function l(e, t, n) { void 0 === n && (n = [e.onButtonDown, e.onButtonUp, e.onOKButton, e.onCancelButton, e.onSecondaryButton, e.onOptionsButton, e.onMenuButton, e.onGamepadDirection, e.onGamepadFocus, e.onGamepadBlur]), o.useLayoutEffect(() => { let n = t.current; const i = []; return n && (e.onButtonDown && i.push((0, r.VC)(n, e.onButtonDown)), e.onButtonUp && i.push((0, r.If)(n, e.onButtonUp)), e.onOKButton && i.push((0, r.x)(n, e.onOKButton)), e.onCancelButton && i.push((0, r.R3)(n, e.onCancelButton)), e.onSecondaryButton && i.push((0, r.n2)(n, e.onSecondaryButton)), e.onOptionsButton && i.push((0, r.DX)(n, e.onOptionsButton)), e.onMenuButton && i.push((0, r.WF)(n, e.onMenuButton)), e.onGamepadDirection && i.push((0, r.$G)(n, e.onGamepadDirection)), e.onGamepadFocus && i.push((0, r.mk)(n, e.onGamepadFocus)), e.onGamepadBlur && i.push((0, r.BG)(n, e.onGamepadBlur))), () => i.forEach((e) => e()); }, n); } function c(e) { return e.stopPropagation(), !1; } function m(e, t, n) { const { onButtonDown: r } = e, a = (0, i._T)(e, ["onButtonDown"]), m = o.useCallback( (e) => { r && r(e), s("Gamepad Event fired:", e.detail.button, ", handled:", null != r, ", propagation stopped:", e.cancelBubble), e.cancelBubble || n.HandleButtonDownEventAsLogicalEvent(e); }, [r, n], ); l(a, t); l({ onButtonDown: m, onButtonUp: c, onOKButton: c, onCancelButton: c, onSecondaryButton: c, onOptionsButton: c, onMenuButton: c, onGamepadDirection: c, onGamepadFocus: c, onGamepadBlur: c }, t, [m]); } }, 83817: (e, t, n) => { "use strict"; n.d(t, { s: () => g }); var i = n(85556), o = n(27378), r = n(19900), a = n(87018), s = n(2049), l = n(62860), c = n(56320), m = n(76261), d = n(1093); const h = (0, o.createContext)(null); var u = n(65640), p = n(16682), _ = n(10553); const g = o.forwardRef(function (e, t) { var n; const { "flow-children": h, onActivate: u, onCancel: p, focusClassName: g, focusWithinClassName: f } = e, v = (0, i._T)(e, ["flow-children", "onActivate", "onCancel", "focusClassName", "focusWithinClassName"]), { elemProps: S, navOptions: b, gamepadEvents: I } = (0, r.QH)(v); let y = {}; const E = (0, d.t)(h); E != l.gj.NONE && (y.layout = E), u && ((S.onClick = S.onClick || u), (I.onOKButton = I.onOKButton || u)), I.onOKButton && void 0 === b.focusable && (b.focusable = !0), p && (I.onCancelButton = I.onCancelButton || p); const { ref: D, node: w } = (0, r.Pd)(Object.assign(Object.assign({}, y), b)), R = (0, c.K)(); (S.className = (0, a.Z)(S.className, "Panel", R && "Focusable")), (0, m.pD)(I, D); const A = (0, s.BE)(D, t), M = null === (n = (0, _.qt)({ bSuppressAssert: !0 })) || void 0 === n ? void 0 : n.IN_VR; (!b.focusable && !b.focusableIfNoChildren) || (w && w.Tree.BUseVirtualFocus()) || (S.tabIndex = S.tabIndex || 0); const k = M ? C : r.zQ; return o.createElement(r.ET.Provider, { value: w }, w ? o.createElement(k, Object.assign({}, S, { divRef: A, node: w, focusClassName: (0, a.Z)(g, "gpfocus"), focusWithinClassName: (0, a.Z)(f, "gpfocuswithin") })) : o.createElement("div", Object.assign({}, S, { ref: A }))); }); function C(e) { const { node: t, divRef: n } = e, a = (0, i._T)(e, ["node", "divRef"]), l = (0, o.useContext)(h), c = (0, u.Ze)(2, () => "self" == (null == t ? void 0 : t.GetFocusable()) || null != a.onClick), m = (0, u.Ze)(1, () => (null == l ? void 0 : l.HasContextMenu(t))), d = (0, p.M)(a); (0, p.B)(a), l && (a.onContextMenu = (n) => { var i; l.OnContextMenu(t, n) || null === (i = e.onContextMenu) || void 0 === i || i.call(e, n); }); const _ = (0, s.BE)(c, m, d, n); return o.createElement(r.zQ, Object.assign({}, a, { divRef: _, node: t })); } }, 56666: (e, t, n) => { "use strict"; n.d(t, { eh: () => l }); var i = n(85556), o = n(27378), r = n(2049), a = n(83817), s = n(5651); const l = o.forwardRef(function (e, t) { const { onExplicitFocusLevelChanged: n, onOKButton: s, onCancelButton: l, navRef: m, focusable: d } = e, h = (0, i._T)(e, ["onExplicitFocusLevelChanged", "onOKButton", "onCancelButton", "navRef", "focusable"]), u = o.useRef(null), { fnOnOKButton: p, fnOnCancelButton: _ } = c({ navRefPanel: u, onOKButton: s, onCancelButton: l, onExplicitFocusLevelChanged: n }), g = (0, r.BE)(m, u); return o.createElement(a.s, Object.assign({}, h, { onOKButton: p, onCancelButton: _, navRef: g, ref: t, focusable: !1 !== d })); }); o.forwardRef(function (e, t) { const { onOKButton: n, onCancelButton: a, navRef: l, focusable: m } = e, d = (0, i._T)(e, ["onOKButton", "onCancelButton", "navRef", "focusable"]), h = o.useRef(null), u = o.useRef(null), p = o.useCallback((e, t) => e.FocusVisibleChild(), []), { fnOnOKButton: _, fnOnCancelButton: g } = c({ navRefPanel: h, onOKButton: n, onCancelButton: a, fnFocusChildren: p }), C = (0, r.BE)(u, t), f = (0, r.BE)(l, h); return o.createElement(s.TN, Object.assign({}, d, { onOKButton: (e) => (null == _ ? void 0 : _(e)), onCancelButton: g, navRef: f, ref: C, focusable: !1 !== m })); }); function c(e) { let { navRefPanel: t, onOKButton: n, onCancelButton: i, onExplicitFocusLevelChanged: r, fnFocusChildren: a } = e; a = null != a ? a : m; return { fnOnOKButton: o.useCallback( (e) => { const i = t.current; return (null == i ? void 0 : i.BHasFocus()) && a(i, e.detail.button) ? (r && r(!0), !0) : !!n && n(e); }, [t, n, r, a], ), fnOnCancelButton: o.useCallback( (e) => { const n = t.current; return (null == n ? void 0 : n.BFocusWithin()) && !n.BHasFocus() && n.TakeFocus(e.detail.button) ? (r && r(!1), !0) : !!i && i(e); }, [t, i, r], ), }; } function m(e, t) { return e.ChildTakeFocus(t); } }, 5651: (e, t, n) => { "use strict"; n.d(t, { P8: () => g, TN: () => C }); var i = n(85556), o = n(27378), r = n(636), a = n(93635), s = n(87018), l = n(2049), c = n(19959); function m(e, t, n) { var i; const r = `${e}_HistoryValue`, a = (0, c.k6)(), s = (0, c.TH)(), l = null !== (i = s.state && s.state[r]) && void 0 !== i ? i : n, m = o.useRef(!1), d = o.useRef(), h = o.useRef(), u = o.useCallback( (e) => { if (m.current && ((d.current = e), !h.current)) { const e = a.location.pathname; h.current = window.setTimeout(() => { a.location.pathname != e || (a.location.state && a.location.state[r] == d.current) || a.replace(a.location.pathname, Object.assign(Object.assign({}, a.location.state || {}), { [r]: d.current })), (h.current = void 0); }, t); } }, [a, r, t], ); return ( o.useEffect(() => { m.current = !0; }, []), [l, u] ); } var d = n(62860), h = n(8070), u = n(83817), p = n(88975), _ = n.n(p); const g = o.forwardRef(function (e, t) { var n; const { scrollDirection: a, scrollPaddingTop: c, scrollPaddingRight: m, scrollPaddingBottom: d, scrollPaddingLeft: p, className: g, children: C, style: f } = e, v = (0, i._T)(e, ["scrollDirection", "scrollPaddingTop", "scrollPaddingRight", "scrollPaddingBottom", "scrollPaddingLeft", "className", "children", "style"]); let S; switch (a) { case "x": S = _().ScrollX; break; case "both": S = _().ScrollBoth; break; default: S = _().ScrollY; } let b = Object.assign({}, f); (c || 0 === c) && (b.scrollPaddingTop = c), (m || 0 === m) && (b.scrollPaddingRight = m), (d || 0 === d) && (b.scrollPaddingBottom = d), (p || 0 === p) && (b.scrollPaddingLeft = p); const { ref: I, navRef: y } = (0, r.$1)(), E = (0, l.BE)(y, v.navRef), D = (0, l.BE)(I, t), w = null === (n = null == y ? void 0 : y.current) || void 0 === n ? void 0 : n.Node().Tree.Controller; return o.createElement(u.s, Object.assign({}, v, { style: b, className: (0, s.Z)(g, _().ScrollPanel, S), ref: D, navRef: E }), o.createElement(h.O, { NavigationManager: w }, C)); }), C = o.forwardRef(function (e, t) { const { scrollStepPercent: n, scrollBehavior: a } = e, s = (0, i._T)(e, ["scrollStepPercent", "scrollBehavior"]), c = o.useRef(null), m = o.useCallback((e) => e.currentTarget != e.target, []), h = (0, r.pj)(c, a, n, m), u = (0, l.BE)(c, t); return o.createElement(g, Object.assign({}, s, { onGamepadDirection: h, ref: u, scrollIntoViewType: d.mz.NoTransformSparseContent })); }); o.forwardRef(function (e, t) { const { name: n, msScrollRestoreDelay: r, onScroll: a } = e, s = (0, i._T)(e, ["name", "msScrollRestoreDelay", "onScroll"]); return o.createElement(f, { name: n, msScrollRestoreDelay: r, parentOnScroll: a, refDiv: t }, (e, t) => o.createElement(g, Object.assign({}, s, { onScroll: e, ref: t }))); }), o.forwardRef(function (e, t) { const { name: n, msScrollRestoreDelay: r, onScroll: a } = e, s = (0, i._T)(e, ["name", "msScrollRestoreDelay", "onScroll"]); return o.createElement(f, { name: n, msScrollRestoreDelay: r, parentOnScroll: a, refDiv: t }, (e, t) => o.createElement(C, Object.assign({}, s, { onScroll: e, ref: t }))); }); function f(e) { const { name: t, msScrollRestoreDelay: n, parentOnScroll: i, refDiv: r, children: s } = e, [c, d] = m(`${t}ScrollTop`, 250, 0), [h, u] = m(`${t}ScrollLeft`, 250, 0), p = o.useRef(0), _ = o.useRef(0), g = o.useRef(); let C = o.useCallback( (e) => { const { scrollTop: t, scrollLeft: n } = e.currentTarget; d(t), (p.current = t), u(n), (_.current = n), i && i(e); }, [d, u, i], ); o.useLayoutEffect(() => { const e = function () { g.current && ((0, a.X)(g.current.scrollHeight >= c, `Element is ${g.current.scrollHeight} high but trying to restore scrollTop of ${c}, element may need more time to lay out.`, g.current), (p.current = c), (_.current = h), g.current.scrollTo({ top: c, left: h, behavior: "auto" }), g.current.dispatchEvent(new UIEvent("scroll"))); }; (c == p.current && h == _.current) || (n ? window.setTimeout(e, n) : e()); }, [c, h, n]); const f = (0, l.BE)(g, r); return o.useMemo(() => s(C, f), [C, f, s]); } }, 10680: (e, t, n) => { "use strict"; n.d(t, { $G: () => p, BG: () => g, Cj: () => S, DX: () => h, If: () => l, Jb: () => C, R3: () => m, Ut: () => f, VC: () => s, WF: () => u, mk: () => _, n2: () => d, uS: () => i, x: () => c }); var i, o = n(55981); !(function (e) { (e[(e.GAMEPAD = 0)] = "GAMEPAD"), (e[(e.KEYBOARD = 1)] = "KEYBOARD"), (e[(e.APPLICATION = 2)] = "APPLICATION"), (e[(e.BROWSER = 3)] = "BROWSER"); })(i || (i = {})); let r = { [o.eV.OK]: "vgp_onok", [o.eV.CANCEL]: "vgp_oncancel", [o.eV.SECONDARY]: "vgp_onsecondaryaction", [o.eV.OPTIONS]: "vgp_onoptions", [o.eV.START]: "vgp_onmenu" }; function a(e, t, n) { return ( e.addEventListener(t, n), () => (function (e, t, n) { e.removeEventListener(t, n); })(e, t, n) ); } function s(e, t) { return a(e, "vgp_onbuttondown", t); } function l(e, t) { return a(e, "vgp_onbuttonup", t); } function c(e, t) { return a(e, "vgp_onok", v(t)); } function m(e, t) { return a(e, "vgp_oncancel", v(t)); } function d(e, t) { return a(e, "vgp_onsecondaryaction", v(t)); } function h(e, t) { return a(e, "vgp_onoptions", v(t)); } function u(e, t) { return a(e, "vgp_onmenu", v(t)); } function p(e, t) { return a(e, "vgp_ondirection", v(t)); } function _(e, t) { return a(e, "vgp_onfocus", t); } function g(e, t) { return a(e, "vgp_onblur", t); } function C(e, t, n) { let i = e; if (!i || !i.ownerDocument || !i.ownerDocument.defaultView) return !0; let o = new i.ownerDocument.defaultView.CustomEvent(t, { bubbles: !0, cancelable: !0, detail: n }); return i.dispatchEvent(o); } function f(e) { const t = [o.eV.DIR_UP, o.eV.DIR_DOWN, o.eV.DIR_LEFT, o.eV.DIR_RIGHT]; let n = !0, i = !1, a = r[e.detail.button]; return a ? ((i = !0), (n = C(e.target, a, e.detail))) : -1 !== t.indexOf(e.detail.button) && ((i = !0), (n = C(e.target, "vgp_ondirection", e.detail))), { bUnhandled: n, bHadLogicalEventMapping: i }; } function v(e) { return (t) => { !1 !== e(t) && (t.stopPropagation(), t.preventDefault()); }; } function S(e) { const { onOKActionDescription: t, onCancelActionDescription: n, onSecondaryActionDescription: i, onOptionsActionDescription: r, onMenuActionDescription: a, actionDescriptionMap: s } = e, l = Object.assign({}, s); return void 0 !== t && (l[o.eV.OK] = t), void 0 !== n && (l[o.eV.CANCEL] = n), void 0 !== i && (l[o.eV.SECONDARY] = i), void 0 !== r && (l[o.eV.OPTIONS] = r), void 0 !== a && (l[o.eV.START] = a), l; } }, 20646: (e, t, n) => { "use strict"; var i = n(85556), o = n(55981), r = n(8568); let a = [ { index: 0, type: o.eV.OK, category: "action" }, { index: 1, type: o.eV.CANCEL, category: "action" }, { index: 2, type: o.eV.SECONDARY, category: "action" }, { index: 3, type: o.eV.OPTIONS, category: "action" }, { index: 4, type: o.eV.BUMPER_LEFT, category: "action" }, { index: 5, type: o.eV.BUMPER_RIGHT, category: "action" }, { index: 6, type: o.eV.TRIGGER_LEFT, category: "action" }, { index: 7, type: o.eV.TRIGGER_RIGHT, category: "action" }, { index: 8, type: o.eV.SELECT, category: "action" }, { index: 9, type: o.eV.START, category: "action" }, { index: 10, type: o.eV.LSTICK_CLICK, category: "action" }, { index: 11, type: o.eV.RSTICK_CLICK, category: "action" }, { index: 12, type: o.eV.DIR_UP, category: "navigation" }, { index: 13, type: o.eV.DIR_DOWN, category: "navigation" }, { index: 14, type: o.eV.DIR_LEFT, category: "navigation" }, { index: 15, type: o.eV.DIR_RIGHT, category: "navigation" }, { index: 16, type: o.eV.STEAM_GUIDE, category: "action" }, { index: 17, type: o.eV.SELECT, category: "action" }, ]; class s extends o.oH { constructor() { super(), (this.m_rgGamepadStatus = []), this.SetSourceType(o.Rr.GAMEPAD), window.addEventListener("gamepadconnected", (e) => { this.m_bGamepadDetected || (this.OnGamepadDetected(), this.PollGamepads()); }); } PollGamepads() { let e = navigator.getGamepads(), t = !1; for (let n = 0; n < e.length; n++) { let i = e[n]; if (!i) continue; this.m_rgGamepadStatus[n] || (this.m_rgGamepadStatus[n] = { buttons: [] }); let o = this.m_rgGamepadStatus[n]; for (let e = 0; e < a.length; e++) { let n = a[e], r = n.index; i.buttons[r] && (i.buttons[r].pressed ? ((t = !0), o.buttons[r] || ((o.buttons[r] = !0), this.OnButtonDown(n.type))) : o.buttons[r] && (this.OnButtonUp(n.type), (o.buttons[r] = !1))); } } requestAnimationFrame(this.PollGamepads); } } (0, i.gn)([r.a], s.prototype, "PollGamepads", null); }, 55981: (e, t, n) => { "use strict"; n.d(t, { eV: () => o, Rr: () => r, oH: () => c }); var i, o, r, a = n(22394); class s { constructor(e) { this.m_config = e; } Reset() { (this.m_ActiveInputId = void 0), null != this.m_ActiveInputTimeout && (clearInterval(this.m_ActiveInputTimeout), (this.m_ActiveInputTimeout = void 0)); } HandleInputButtonDown(e, t) { if (this.m_ActiveInputId !== e && null != t) { this.Reset(), (this.m_ActiveInputId = e); const n = () => { this.m_ActiveInputTimeout = window.setInterval(() => { t(); }, this.m_config.repeatInterval_ms); }; null == this.m_config.firstRepeatInterval_ms || this.m_config.firstRepeatInterval_ms === this.m_config.repeatInterval_ms ? n() : (this.m_ActiveInputTimeout = window.setTimeout(() => { t(), n(); }, this.m_config.firstRepeatInterval_ms)); } } } !(function (e) { (e[(e.None = 0)] = "None"), (e[(e.Horizontal = 1)] = "Horizontal"), (e[(e.Vertical = 2)] = "Vertical"); })(i || (i = {})); class l { constructor(e) { (this.m_repeatOnAxis = i.None), (this.m_bRepeatEnabled = !0), (this.m_config = e), (this.m_inputRepeatGenerator = new s(e)); } Reset() { this.m_inputRepeatGenerator.Reset(); } SetEnabled(e) { (this.m_bRepeatEnabled = e), this.m_bRepeatEnabled || this.Reset(); } HandleInputButtonDown(e, t, n) { this.m_bRepeatEnabled && this.m_config.inputsThatRepeat.has(e) ? this.m_repeatOnAxis == i.None && ((e != o.DIR_UP && e != o.DIR_DOWN) || (this.m_repeatOnAxis = i.Vertical), (e != o.DIR_LEFT && e != o.DIR_RIGHT) || (this.m_repeatOnAxis = i.Horizontal), t(), this.m_inputRepeatGenerator.HandleInputButtonDown(e, n)) : (t(), this.m_inputRepeatGenerator.Reset()); } HandleInputButtonUp(e) { if (this.m_config.inputsThatRepeat.has(e) && this.m_repeatOnAxis != i.None) { const t = e == o.DIR_UP || e == o.DIR_DOWN, n = e == o.DIR_LEFT || e == o.DIR_RIGHT; ((this.m_repeatOnAxis == i.Vertical && t) || (this.m_repeatOnAxis == i.Horizontal && n)) && ((this.m_repeatOnAxis = i.None), this.m_inputRepeatGenerator.Reset()); } else this.m_inputRepeatGenerator.Reset(); } } !(function (e) { (e[(e.INVALID = 0)] = "INVALID"), (e[(e.OK = 1)] = "OK"), (e[(e.CANCEL = 2)] = "CANCEL"), (e[(e.SECONDARY = 3)] = "SECONDARY"), (e[(e.OPTIONS = 4)] = "OPTIONS"), (e[(e.BUMPER_LEFT = 5)] = "BUMPER_LEFT"), (e[(e.BUMPER_RIGHT = 6)] = "BUMPER_RIGHT"), (e[(e.TRIGGER_LEFT = 7)] = "TRIGGER_LEFT"), (e[(e.TRIGGER_RIGHT = 8)] = "TRIGGER_RIGHT"), (e[(e.DIR_UP = 9)] = "DIR_UP"), (e[(e.DIR_DOWN = 10)] = "DIR_DOWN"), (e[(e.DIR_LEFT = 11)] = "DIR_LEFT"), (e[(e.DIR_RIGHT = 12)] = "DIR_RIGHT"), (e[(e.SELECT = 13)] = "SELECT"), (e[(e.START = 14)] = "START"), (e[(e.LSTICK_CLICK = 15)] = "LSTICK_CLICK"), (e[(e.RSTICK_CLICK = 16)] = "RSTICK_CLICK"), (e[(e.LSTICK_TOUCH = 17)] = "LSTICK_TOUCH"), (e[(e.RSTICK_TOUCH = 18)] = "RSTICK_TOUCH"), (e[(e.LPAD_TOUCH = 19)] = "LPAD_TOUCH"), (e[(e.LPAD_CLICK = 20)] = "LPAD_CLICK"), (e[(e.RPAD_TOUCH = 21)] = "RPAD_TOUCH"), (e[(e.RPAD_CLICK = 22)] = "RPAD_CLICK"), (e[(e.REAR_LEFT_UPPER = 23)] = "REAR_LEFT_UPPER"), (e[(e.REAR_LEFT_LOWER = 24)] = "REAR_LEFT_LOWER"), (e[(e.REAR_RIGHT_UPPER = 25)] = "REAR_RIGHT_UPPER"), (e[(e.REAR_RIGHT_LOWER = 26)] = "REAR_RIGHT_LOWER"), (e[(e.STEAM_GUIDE = 27)] = "STEAM_GUIDE"), (e[(e.STEAM_QUICK_MENU = 28)] = "STEAM_QUICK_MENU"); })(o || (o = {})), (function (e) { (e[(e.UNKNOWN = 0)] = "UNKNOWN"), (e[(e.GAMEPAD = 1)] = "GAMEPAD"), (e[(e.KEYBOARD = 2)] = "KEYBOARD"), (e[(e.MOUSE = 3)] = "MOUSE"), (e[(e.TOUCH = 4)] = "TOUCH"), (e[(e.LPAD = 5)] = "LPAD"), (e[(e.RPAD = 6)] = "RPAD"); })(r || (r = {})); class c { constructor() { (this.m_OnGamepadDetectedCallbacks = new a.pB()), (this.m_ButtonDownCallbacks = new a.pB()), (this.m_ButtonUpCallbacks = new a.pB()), (this.m_AnalogCallbacks = new a.pB()), (this.m_NavigationTypeChangeCallbacks = new a.pB()), (this.m_nLastActiveControllerIndex = -1), (this.m_ButtonRepeatHandler = new l({ inputsThatRepeat: new Set([o.DIR_UP, o.DIR_DOWN, o.DIR_LEFT, o.DIR_RIGHT]), firstRepeatInterval_ms: 400, repeatInterval_ms: 50 })), (this.m_bGamepadDetected = !1); } RegisterForGamepadDetected(e) { return this.m_OnGamepadDetectedCallbacks.Register(e); } RegisterForGamepadButtonDown(e) { return this.m_ButtonDownCallbacks.Register(e); } RegisterForGamepadButtonUp(e) { return this.m_ButtonUpCallbacks.Register(e); } RegisterForAnalog(e) { return this.m_AnalogCallbacks.Register(e); } RegisterForNavigationTypeChange(e) { return this.m_NavigationTypeChangeCallbacks.Register(e); } SetSourceType(e) { this.m_eNavigationSourceType = e; } GetSourceType() { return this.m_eNavigationSourceType; } SetControllerActive(e) { (this.m_nLastActiveControllerIndex = e), (this.m_fLastActiveTime = Date.now()); } GetActiveControllerIndex() { return this.m_nLastActiveControllerIndex; } GetActiveControllerTime() { return this.m_fLastActiveTime; } SetRepeatAllowed(e) { this.m_ButtonRepeatHandler.SetEnabled(e); } OnGamepadDetected() { console.log("Gamepad detected"), (this.m_bGamepadDetected = !0), this.m_OnGamepadDetectedCallbacks.Dispatch(); } OnButtonDown(e, t) { void 0 === t && (t = -1), this.SetControllerActive(t), this.m_ButtonRepeatHandler.HandleInputButtonDown( e, () => this.DispatchButtonDown(e, !1), () => this.DispatchButtonDown(e, !0), ); } OnButtonUp(e, t) { void 0 === t && (t = -1), this.SetControllerActive(t), this.m_ButtonRepeatHandler.HandleInputButtonUp(e), this.m_ButtonUpCallbacks.Dispatch(e, this.m_eNavigationSourceType, this.m_nLastActiveControllerIndex); } DispatchButtonDown(e, t) { this.m_ButtonDownCallbacks.Dispatch(e, this.m_eNavigationSourceType, this.m_nLastActiveControllerIndex, t); } OnAnalogPad(e, t, n, i) { void 0 === i && (i = -1), this.SetControllerActive(i), this.m_AnalogCallbacks.Dispatch(e, this.m_nLastActiveControllerIndex, t, n); } OnNavigationTypeChanged(e) { this.m_NavigationTypeChangeCallbacks.Dispatch(e); } } }, 82398: (e, t, n) => { "use strict"; var i = n(85556), o = n(8568), r = n(88669), a = n(55981), s = n(57117); class l extends a.oH { constructor(e) { super(), (this.m_lastButtonDown = a.eV.INVALID), this.SetSourceType(a.Rr.KEYBOARD), e.addEventListener("keydown", this.OnKeyDown), e.addEventListener("keyup", this.OnKeyUp), e.addEventListener("blur", this.Reset); } OnKeyDown(e) { const t = this.TranslateKey(e); t != a.eV.INVALID && (e.preventDefault(), t != this.m_lastButtonDown && (this.Reset(), this.OnButtonDown(t), (this.m_lastButtonDown = t))); } OnKeyUp(e) { const t = this.TranslateKey(e); t != a.eV.INVALID && (this.OnButtonUp(t), (this.m_lastButtonDown = a.eV.INVALID), e.preventDefault()); } Reset() { this.m_lastButtonDown != a.eV.INVALID && (this.OnButtonUp(this.m_lastButtonDown), (this.m_lastButtonDown = a.eV.INVALID)); } GetKeycodeFromEvent(e) { return "linux" === s.De.PLATFORM && e.key.length > 1 ? e.key || e.code : e.code || e.key; } BShouldSwallowEventForTextInputWorkaround(e) { var t, n, i, o, a, s, l; if (!(r.GB(e.target) && ("INPUT" === e.target.nodeName || "TEXTAREA" === e.target.nodeName || e.target.hasAttribute("contenteditable")))) return !1; if (e.target.hasAttribute("contenteditable")) return !0; const c = this.GetKeycodeFromEvent(e); let m = e.target; const d = Array.from(m.ownerDocument.getElementsByClassName("gpfocus")).some((e) => Array.from(e.classList).some((e) => e.includes("virtualkeyboard"))); switch (c) { case "ArrowUp": { if (d) return !0; let n = null == m ? void 0 : m.value.indexOf("\n"); return "TEXTAREA" === e.target.nodeName && n >= 0 && n < (null !== (t = null == m ? void 0 : m.selectionStart) && void 0 !== t ? t : 0); } case "ArrowDown": { if (d) return !0; let t = null == m ? void 0 : m.value.lastIndexOf("\n"); return "TEXTAREA" === e.target.nodeName && t >= 0 && t >= (null !== (n = null == m ? void 0 : m.selectionStart) && void 0 !== n ? n : 0) && (null !== (i = null == m ? void 0 : m.selectionEnd) && void 0 !== i ? i : 0) < (null == m ? void 0 : m.value.length); } case "ArrowLeft": return !!d || ((null !== (o = null == m ? void 0 : m.selectionStart) && void 0 !== o ? o : 0) > 0 && (null !== (a = null == m ? void 0 : m.selectionEnd) && void 0 !== a ? a : 0) > 0); case "ArrowRight": return !!d || ((null !== (s = null == m ? void 0 : m.selectionStart) && void 0 !== s ? s : 0) < (null == m ? void 0 : m.value.length) && (null !== (l = null == m ? void 0 : m.selectionEnd) && void 0 !== l ? l : 0) < (null == m ? void 0 : m.value.length)); case "Enter": case "Backspace": return !0; default: return !1; } } TranslateKey(e) { const t = this.GetKeycodeFromEvent(e), n = e.ctrlKey, i = e.shiftKey; if (this.BShouldSwallowEventForTextInputWorkaround(e)) return a.eV.INVALID; if (n && i) switch (t) { case "Digit4": return a.eV.TRIGGER_LEFT; case "Digit5": return a.eV.TRIGGER_RIGHT; default: return a.eV.INVALID; } if (n) switch (t) { case "Digit1": return a.eV.STEAM_GUIDE; case "Digit2": return a.eV.STEAM_QUICK_MENU; case "Digit3": case "Digit9": return a.eV.SELECT; case "Digit4": return a.eV.BUMPER_LEFT; case "Digit5": return a.eV.BUMPER_RIGHT; case "Digit6": return a.eV.LSTICK_CLICK; case "Digit7": return a.eV.RSTICK_CLICK; case "Digit8": return a.eV.OPTIONS; case "Digit0": return a.eV.START; } switch (t) { case "Escape": return a.eV.CANCEL; case "Enter": return a.eV.OK; case "Backspace": return a.eV.SECONDARY; case "ArrowUp": return a.eV.DIR_UP; case "ArrowDown": return a.eV.DIR_DOWN; case "ArrowLeft": return a.eV.DIR_LEFT; case "ArrowRight": return a.eV.DIR_RIGHT; } return a.eV.INVALID; } } (0, i.gn)([o.a], l.prototype, "OnKeyDown", null), (0, i.gn)([o.a], l.prototype, "OnKeyUp", null), (0, i.gn)([o.a], l.prototype, "Reset", null); }, 50397: (e, t, n) => { "use strict"; n.d(t, { Z: () => S }); var i = n(85556), o = n(55981), r = n(57476), a = n(9824), s = n(93635), l = n(8568), c = n(22394), m = n(88669), d = n(77385), h = n(10680), u = n(91108); const p = new d.sO("FocusNavigation").Debug; class _ { constructor(e, t, n) { (this.m_bActive = !1), (this.m_rgGamepadNavigationTrees = []), (this.m_LastActiveNavTree = null), (this.m_LastActiveFocusNavTree = null), (this.m_bMounted = !0), (this.m_schDeferredActivate = new c.Ar()), (this.m_FocusChangedCallbacks = new c.pB()), (this.m_ActiveCallbacks = new c.pB()), (this.m_bIsGamepadInputSuppressed = !1), (this.m_iFocusChangeStack = 0), (this.m_controller = e), (this.m_rootWindow = t), (this.m_activeWindow = t), (this.m_bIsGamepadInputSuppressed = n); } get RootWindow() { return this.m_rootWindow; } get ActiveWindow() { return this.m_activeWindow; } FindNavTreeInFocusedWindow() { var e; for (let t = this.m_rgGamepadNavigationTrees.length - 1; t >= 0; t--) { const n = this.m_rgGamepadNavigationTrees[t]; if (null === (e = n.Window) || void 0 === e ? void 0 : e.document.hasFocus()) return n; } } Destroy(e) { e == this.m_rootWindow ? (p(`${this.LogName(e)} Destroying context for window`), (this.m_bMounted = !1), this.m_schDeferredActivate.Cancel(), this.SetActive(!1, e)) : p(`${this.LogName(e)} Child window destroyed`); } SetActive(e, t, n = void 0) { this.m_controller.BatchedUpdate(() => { var i; const o = this.m_bActive != e; (this.m_bActive = e), e ? ((this.m_activeWindow = t), (this.m_activeBrowserView = n), this.m_controller.OnContextActivated(this)) : ((this.m_activeBrowserView = void 0), this.m_controller.OnContextDeactivated(this, !1)), o && ((this.m_bActive = e), this.m_ActiveCallbacks.Dispatch(e), null === (i = this.m_LastActiveFocusNavTree) || void 0 === i || i.OnActiveStateChangedCallbacks.Dispatch(e, this.m_LastActiveFocusNavTree)); }); } OnActivate(e) { p(`${this.LogName(e)} Activating context, there are ${this.m_rgGamepadNavigationTrees.length} trees in this context`), this.SetActive(!0, e); } OnActivateBrowserView(e, t) { p(`${this.LogName(e)} Browser View "${t}" activated in context`), this.SetActive(!0, e, t); } OnDeactivate(e) { var t; this.m_activeWindow == e ? (p(`${this.LogName(e)} Deactivate context for window`), this.SetActive(!1, e)) : p(`${this.LogName(e)} Blurred, but not deactivating because (${null === (t = this.m_activeWindow) || void 0 === t ? void 0 : t.name}) has focus.`); } OnDeactivateBrowserView(e, t) { p(`${this.LogName(e)} Browser View "${t}" deactivated in context`), this.m_activeBrowserView == t && this.SetActive(!1, e, t); } BIsGamepadInputSuppressed() { return this.m_bIsGamepadInputSuppressed; } BIsActive() { return this.m_bActive; } get ActiveCallbacks() { return this.m_ActiveCallbacks; } AddNavTree(e, t) { t ? this.m_rgGamepadNavigationTrees.unshift(e) : (this.m_rgGamepadNavigationTrees.push(e), this.SetActiveNavTree(e, !0)); } LogName(e = void 0) { return e && this.m_rootWindow != e ? `(${this.m_rootWindow.name}) > (${e.name})` : `(${this.m_rootWindow.name})`; } SetActiveNavTree(e, t = !1) { if (e && this.m_LastActiveNavTree == e) return; const n = this.m_LastActiveNavTree; n && a.Zf(this.m_rgGamepadNavigationTrees, n), e || (this.m_rgGamepadNavigationTrees.length && (e = this.m_rgGamepadNavigationTrees[this.m_rgGamepadNavigationTrees.length - 1])); const i = this.m_LastActiveFocusNavTree == e; e && a.Zf(this.m_rgGamepadNavigationTrees, e), (this.m_LastActiveNavTree = e), (e && e.BUseVirtualFocus()) || (this.m_LastActiveFocusNavTree = e), p(`${this.LogName(null == e ? void 0 : e.Window)} Move from nav tree ${null == n ? void 0 : n.id} to nav tree ${null == e ? void 0 : e.id} ${t ? "taking focus" : "no focus"}`), n && this.m_rgGamepadNavigationTrees.push(n), e && (this.m_rgGamepadNavigationTrees.push(e), i || !t || e.DeferredFocus.BHasQueuedFocusNode() || e.DeferredFocus.RequestFocus(e.Root)), n && n != this.m_LastActiveFocusNavTree && n.OnDeactivate(e), e && !i && e.OnActivate(n); } BlurNavTree(e) { this.m_LastActiveNavTree == e && this.SetActiveNavTree(null, !0), a.Zf(this.m_rgGamepadNavigationTrees, e), this.m_rgGamepadNavigationTrees.unshift(e); } UnregisterGamepadNavigationTree(e) { a.Zf(this.m_rgGamepadNavigationTrees, e), p(`(${this.m_rootWindow.name}) Unregister tree ${null == e ? void 0 : e.id} ${this.m_LastActiveFocusNavTree == e ? "(was active)" : "(inactive)"}`), this.m_LastActiveNavTree == e && ((this.m_LastActiveNavTree = null), this.m_bMounted && this.m_schDeferredActivate.Schedule(1, () => { this.m_LastActiveNavTree || this.SetActiveNavTree(null, !0); })); } get FocusChangedCallbacks() { return this.m_FocusChangedCallbacks; } OnFocusChangeStart(e, t, n, i) { return 0 == this.m_iFocusChangeStack ? (this.m_ActiveFocusChange = { source: e, from: n, to: i }) : this.m_ActiveFocusChange && !this.m_ActiveFocusChange.from && n && (this.m_ActiveFocusChange.from = n), this.m_iFocusChangeStack++; } OnFocusChangeComplete(e) { var t; if ((this.m_iFocusChangeStack--, (0, s.X)(e == this.m_iFocusChangeStack, "out of order focus pop"), 0 == this.m_iFocusChangeStack)) { const { source: e, from: n, to: i } = null !== (t = this.m_ActiveFocusChange) && void 0 !== t ? t : {}; this.m_FocusChangedCallbacks.Dispatch(e, n, i); } } } const g = new d.sO("FocusNavigation").Debug, C = new d.sO("FocusNavigation").Assert, f = "focus-nav-show-debug-focus-ring"; function v(e, t) { return (null == e ? void 0 : e.eActivationSourceType) === (null == t ? void 0 : t.eActivationSourceType) && (null == e ? void 0 : e.nActiveGamepadIndex) === (null == t ? void 0 : t.nActiveGamepadIndex) && (null == e ? void 0 : e.nLastActiveGamepadIndex) === (null == t ? void 0 : t.nLastActiveGamepadIndex); } class S { constructor() { (this.m_rgGamepadInputSources = []), (this.m_rgAllContexts = []), (this.m_bGlobalEventsInitialized = !1), (this.m_fnCatchAllGamepadInput = null), (this.m_UnhandledButtonEventsCallbacks = new c.pB()), (this.m_navigationSource = (0, c.vq)({ eActivationSourceType: o.Rr.UNKNOWN, nActiveGamepadIndex: -1, nLastActiveGamepadIndex: -1 }, v)), (this.m_navigationSourceSupportsFocus = (0, c.km)(this.m_navigationSource, (e) => (null == e ? void 0 : e.eActivationSourceType) === o.Rr.GAMEPAD || (null == e ? void 0 : e.eActivationSourceType) === o.Rr.KEYBOARD || (null == e ? void 0 : e.eActivationSourceType) === o.Rr.UNKNOWN)), (this.m_bShowDebugFocusRing = (0, c.vq)(!1)), (this.m_bRestoringHistory = !1), (this.m_fnGamepadEventUpdateBatcher = (e) => e()), (window.FocusNavController = this), this.m_bShowDebugFocusRing.Set("shown" == sessionStorage.getItem(f)); } CreateContext(e, t) { const n = new _(this, e, t); return this.m_rgAllContexts.push(n), n; } GetDefaultContext() { return this.m_DefaultContext || (this.m_DefaultContext = this.CreateContext(window, !1)), this.m_DefaultContext; } GetActiveContext() { return this.m_ActiveContext; } FindAnActiveContext() { var e; if (!this.m_ActiveContext && 0 != this.m_rgAllContexts.length) { console.warn("No active context; finding one"); for (const e of this.m_rgAllContexts) { const t = e.FindNavTreeInFocusedWindow(); if (t) { g(`${e.LogName(t.Window)} Found a focused window; setting this context as active.`), (this.m_ActiveContext = e), this.m_ActiveContext.OnActivate(t.Window); break; } } } return !this.m_ActiveContext && this.m_LastActiveContext && ((0, s.X)(!1, `Failed to find an active context, will fall back to ${this.m_LastActiveContext.LogName()}`), (this.m_ActiveContext = this.m_LastActiveContext), this.m_ActiveContext.OnActivate(null === (e = this.m_LastActiveContext.m_LastActiveFocusNavTree) || void 0 === e ? void 0 : e.Window)), this.m_ActiveContext; } SetShowDebugFocusRing(e) { this.m_bShowDebugFocusRing.Set(e), (function (e) { e ? sessionStorage.setItem(f, "shown") : sessionStorage.removeItem(f); })(e); } GetShowDebugFocusRing() { return this.m_bShowDebugFocusRing; } RegisterInputSource(e) { let t = new c.Hf(); return this.m_rgGamepadInputSources.push(e), t.PushArrayRemove(this.m_rgGamepadInputSources, e), t.Push(e.RegisterForGamepadButtonDown(this.OnButtonDown).Unregister), t.Push(e.RegisterForGamepadButtonUp(this.OnButtonUp).Unregister), t.Push(e.RegisterForNavigationTypeChange(this.OnNavigationTypeChange).Unregister), t.GetUnregisterFunc(); } SetGamepadEventUpdateBatcher(e) { this.m_fnGamepadEventUpdateBatcher = e; } get NavigationSource() { return this.m_navigationSource; } get NavigationSourceSupportsFocus() { return this.m_navigationSourceSupportsFocus; } DispatchVirtualButtonPress(e) { this.OnButtonDown(e, o.Rr.UNKNOWN, -1); } DispatchVirtualButtonClick(e, t) { var n; let i; t && (i = null !== (n = this.GetActiveContext()) && void 0 !== n ? n : this.FindAnActiveContext()), this.OnButtonDown(e, o.Rr.GAMEPAD, -1, void 0, t, i, !0), this.OnButtonUp(e, o.Rr.GAMEPAD, -1, void 0, t, i, !0); } DispatchVirtualGamepad(e, t) { switch (e) { case "vgp_onbuttondown": this.OnButtonDown(t.button, t.source, -1, t.is_repeat); break; case "vgp_onbuttonup": this.OnButtonUp(t.button, t.source, -1); } } BGlobalGamepadButton(e) { return e === o.eV.STEAM_GUIDE || e === o.eV.STEAM_QUICK_MENU || e === o.eV.CANCEL; } GetEventTarget(e, t = !1) { var n, i, r, a, s; let l = this.GetActiveContext(); !l && t && (l = this.FindAnActiveContext()); let c = null === (n = null == l ? void 0 : l.ActiveWindow) || void 0 === n ? void 0 : n.document.activeElement; if (null == l ? void 0 : l.m_LastActiveNavTree) { let n = null === (r = null === (i = this.m_navigationSource) || void 0 === i ? void 0 : i.Value) || void 0 === r ? void 0 : r.eActivationSourceType; if (!(l.m_LastActiveNavTree.GetLastFocusedNode() || (n != o.Rr.GAMEPAD && n != o.Rr.KEYBOARD) || (t && l.m_LastActiveNavTree.TakeFocus(h.uS.GAMEPAD, !0), this.BGlobalGamepadButton(e)))) return [void 0, l]; l.m_LastActiveNavTree.GetLastFocusedNode() && (c = null === (s = null === (a = l.m_LastActiveNavTree) || void 0 === a ? void 0 : a.GetLastFocusedNode()) || void 0 === s ? void 0 : s.Element); } return [c, l]; } ChangeNavigationSource(e, t) { let n = this.m_navigationSource.Value, i = n.nLastActiveGamepadIndex; n.nActiveGamepadIndex && n.nActiveGamepadIndex >= 0 && (i = n.nActiveGamepadIndex), this.m_navigationSource.Set({ eActivationSourceType: e, nActiveGamepadIndex: t, nLastActiveGamepadIndex: i }), e != o.Rr.MOUSE && (0, r.U5)("Browser.HideCursorUntilMouseEvent") && SteamClient.Browser.HideCursorUntilMouseEvent(); } OnButtonActionInternal(e, t, n, i, r, a, s, l) { var c, m; if (this.m_fnCatchAllGamepadInput && this.m_fnCatchAllGamepadInput(t)) return void (e && g("Ignoring button press - gamepad input is suppressed by parent window")); C(!!a == !!s, "Must set both overrideContext and overrideElement or neither"); let d = a, u = s; (null != d && null != u) || ([d, u] = this.GetEventTarget(t, !0)), !(null == u ? void 0 : u.BIsGamepadInputSuppressed()) || l ? (this.ChangeNavigationSource(n, i), e && g(`Firing ${o.eV[t]} in tree ${null === (m = null == u ? void 0 : u.m_LastActiveNavTree) || void 0 === m ? void 0 : m.id} at `, d), this.BatchedUpdate(() => (0, h.Jb)(d, e ? "vgp_onbuttondown" : "vgp_onbuttonup", { button: t, source: n, is_repeat: r }))) : g(`Suppressing ${o.eV[t]} input on element ${null == d ? void 0 : d.className} because tree ${null === (c = null == u ? void 0 : u.m_LastActiveNavTree) || void 0 === c ? void 0 : c.id} has it disabled`); } OnButtonDown(e, t, n, i, o, r, a) { this.OnButtonActionInternal(!0, e, t, n, i, o, r, a); } OnButtonUp(e, t, n, i, o, r, a) { this.OnButtonActionInternal(!1, e, t, n, !1, o, r, a); } BatchedUpdate(e) { this.m_fnGamepadEventUpdateBatcher(e); } OnNavigationTypeChange(e) { var t, n; if ((this.ChangeNavigationSource(e, -1), document.hasFocus() && (e == o.Rr.MOUSE || e == o.Rr.TOUCH) && (null === (t = this.m_ActiveContext) || void 0 === t ? void 0 : t.m_LastActiveNavTree))) { const e = this.m_ActiveContext.m_LastActiveNavTree.GetLastFocusedNode(), t = (function (e) { if (!(0, m.GB)(e)) return !1; const t = e.tagName, n = (0, m.uk)(e) ? e.type : void 0; return (0, m._J)(t, n); })(null == e ? void 0 : e.Element) ? e : null; null === (n = this.m_ActiveContext.m_LastActiveNavTree) || void 0 === n || n.TransferFocus(h.uS.BROWSER, t); } } NewGamepadNavigationTree(e, t) { return new u.C(this, e, t); } RegisterGamepadNavigationTree(e, t, n) { const i = e.WindowContext; return e.SetIsMounted(t), n || ((this.m_ActiveContext = i), (this.m_LastActiveContext = i)), i.AddNavTree(e, n), this.m_bGlobalEventsInitialized || this.BindGlobalEventHandlers(), () => i.UnregisterGamepadNavigationTree(e); } OnGamepadNavigationTreeActivated(e, t = !1) { e.WindowContext.SetActiveNavTree(e, t); } OnGamepadNavigationTreeFocused(e, t, n = !1) { var i, o; const r = e.WindowContext; r != this.m_ActiveContext && g(`(${r.LogName(e.Window)}) Focus event in inactive window`), e != r.m_LastActiveFocusNavTree && e != r.m_LastActiveNavTree && ((null === (i = r.m_LastActiveFocusNavTree) || void 0 === i ? void 0 : i.GetParentEmbeddedNavTree()) == e || e.GetParentEmbeddedNavTree() == r.m_LastActiveFocusNavTree ? (g(`There was a focus event in ${e.id}, allowing focus transfer to activate nav tree due to parent embedded relationship`), e.Activate()) : g(`There was a focus event in ${e.id}, but the active nav tree is ${null === (o = r.m_LastActiveFocusNavTree) || void 0 === o ? void 0 : o.id} so it is being ignored. Source: ${t && h.uS[t]}.`)); } BlurNavTree(e) { e.WindowContext.BlurNavTree(e); } IsActiveFocusNavTree(e) { var t; return Boolean(e && e == (null === (t = this.m_ActiveContext) || void 0 === t ? void 0 : t.m_LastActiveFocusNavTree)); } IsActiveNavTree(e) { var t; return Boolean(e && e == (null === (t = this.m_ActiveContext) || void 0 === t ? void 0 : t.m_LastActiveNavTree)); } BIsInActiveContext(e) { return Boolean(e && e.WindowContext == this.m_ActiveContext); } BindGlobalEventHandlers() { this.m_bGlobalEventsInitialized || (this.m_bGlobalEventsInitialized = !0); } RegisterForUnhandledButtonDownEvents(e) { return this.m_UnhandledButtonEventsCallbacks.Register(e); } FireUnhandledGamepadEventCallbacks(e) { return !this.m_UnhandledButtonEventsCallbacks.CountRegistered() || (this.m_UnhandledButtonEventsCallbacks.Dispatch(e), !1); } SetSuppressGamepadInput(e) { this.m_fnCatchAllGamepadInput = e ? () => !0 : null; } SetCatchAllGamepadInput(e) { this.m_fnCatchAllGamepadInput = e; } TakeFocusChangingIFrame() { var e, t; window.focus(); let n = (null === (e = this.m_ActiveContext) || void 0 === e ? void 0 : e.m_LastActiveFocusNavTree) || (null === (t = this.m_ActiveContext) || void 0 === t ? void 0 : t.m_LastActiveNavTree); n && n.TakeFocus(h.uS.APPLICATION); } OnContextActivated(e) { (this.m_ActiveContext = e), (this.m_LastActiveContext = e), this.UpdateRepeatAllowed(); } OnContextDeactivated(e, t) { t && (this.m_LastActiveContext == e && (this.m_LastActiveContext = void 0), a.Zf(this.m_rgAllContexts, e)), this.m_ActiveContext == e && (this.m_ActiveContext = void 0), this.UpdateRepeatAllowed(); } BIsRestoringHistory() { return this.m_bRestoringHistory; } RestoreHistoryTransaction(e) { return (0, i.mG)(this, void 0, void 0, function* () { this.m_bRestoringHistory = !0; try { yield e(); } finally { this.m_bRestoringHistory = !1; } }); } UpdateRepeatAllowed() { var e, t; const n = null !== (t = null === (e = this.m_ActiveContext) || void 0 === e ? void 0 : e.BIsActive()) && void 0 !== t && t; for (const e of this.m_rgGamepadInputSources) e.SetRepeatAllowed(n); } } (0, i.gn)([l.a], S.prototype, "OnButtonDown", null), (0, i.gn)([l.a], S.prototype, "OnButtonUp", null), (0, i.gn)([l.a], S.prototype, "OnNavigationTypeChange", null), (0, i.gn)([l.a], S.prototype, "UpdateRepeatAllowed", null); }, 95967: (e, t, n) => { "use strict"; n.d(t, { sA: () => f, lx: () => h, ZT: () => m.Z, TB: () => p, uW: () => d, Ii: () => C, ZR: () => _, U7: () => g, sq: () => u }); var i = n(55981), o = n(93635), r = n(10680); class a { constructor(e) { this.m_root = e; } static SerializeNavState(e, t = !0, n = !0) { return { root: a.SerializeNavNode(e, t, n), bHadFocus: e.BFocusWithin() }; } static SerializeNavNode(e, t = !0, n = !0) { let i = null; const [o, r] = e.GetChildren(); return o.length && -1 != r && t && (i = o.map((e, t) => a.SerializeNavNode(e, t == r || n, n))), { sNavKey: e.NavKey, iActiveChild: r, rgChildren: i }; } static RestoreSerializedNavState(e, t, n = 0) { const { root: i, bHadFocus: o } = t; e.Tree.Controller.RestoreHistoryTransaction(() => { a.RestoreSerializedNavNode(e, i), (1 == n || (0 == n && o)) && e.BTakeFocus(r.uS.APPLICATION); }); } static RestoreSerializedNavNode(e, t) { var n; const { sNavKey: i, iActiveChild: r, rgChildren: s } = t; if ((i && (0, o.X)(i == e.NavKey, "navkey mismatch"), e.SetActiveChild(r), s && s.length)) { const [t] = e.GetChildren(); let i = new Map(); t.forEach((e) => { e.NavKey && i.set(e.NavKey, e); }); for (const e of s) { if (!e.sNavKey) continue; const t = i.get(e.sNavKey); t && a.RestoreSerializedNavNode(t, e); } if (-1 != r && (null === (n = s[r]) || void 0 === n ? void 0 : n.sNavKey)) { const n = i.get(s[r].sNavKey); n && e.SetActiveChild(t.indexOf(n)); } let o = 0, l = 0; for (; o < t.length && l < s.length; ) { for (; o < t.length && t[o].NavKey; ) o++; for (; l < s.length && s[l].sNavKey; ) l++; if (o >= t.length || l >= s.length) break; a.RestoreSerializedNavNode(t[o], s[l]), o++, l++; } } } } class s extends a { constructor() { super(...arguments), (this.m_rgHistory = []); } PushState() { this.m_rgHistory.push(a.SerializeNavState(this.m_root)); } PopState(e = 0) { this.m_rgHistory.length && a.RestoreSerializedNavState(this.m_root, this.m_rgHistory.pop(), e); } } class l extends a { constructor() { super(...arguments), (this.m_mapHistory = new Map()); } SaveState(e) { this.m_mapHistory.set(e, a.SerializeNavState(this.m_root)); } RestoreState(e, t = 0) { const n = this.m_mapHistory.get(e); return !!n && (console.log(`Restoring history for state ${e}`), a.RestoreSerializedNavState(this.m_root, n, t), !0); } } var c = n(62860), m = n(50397); n(91108); class d { constructor(e) { this.m_node = e; } TakeFocus(e) { return this.m_node.BTakeFocus(e ? r.uS.GAMEPAD : r.uS.APPLICATION, e); } ParentTakeFocus(e) { var t; null === (t = this.m_node.Parent) || void 0 === t || t.BTakeFocus(e ? r.uS.GAMEPAD : r.uS.APPLICATION, e); } ChildTakeFocus(e) { return this.m_node.BChildTakeFocus(e ? r.uS.GAMEPAD : r.uS.APPLICATION, e); } FocusVisibleChild(e) { return this.m_node.BVisibleChildTakeFocus(e); } BHasFocus() { return this.m_node.BHasFocus(); } BFocusWithin() { return this.m_node.BFocusWithin(); } get NavKey() { return this.m_node.NavKey; } PushState() { this.m_History || (this.m_History = new s(this.m_node)), this.m_History.PushState(); } PopState(e = 0) { this.m_History && this.m_History.PopState(e); } SaveState(e) { this.m_StateHistory || (this.m_StateHistory = new l(this.m_node)), this.m_StateHistory.SaveState(e); } RestoreState(e, t = 0) { return !!this.m_StateHistory && this.m_StateHistory.RestoreState(e, t); } GetFocusSnapshot() { return (e = this.m_node), a.SerializeNavState(e, !0, !1); var e; } RestoreFocusSnapshot(e, t = 0) { return (function (e, t, n = 0) { return a.RestoreSerializedNavState(e, t, n); })(this.m_node, e, t); } NavTree() { return this.m_node.Tree; } Node() { return this.m_node; } } function h(e, t, n, i = 0.001) { return "x" == e ? t.x + t.width > n.x + i && t.x + i < n.x + n.width : "y" == e ? t.y + t.height > n.y + i && t.y + i < n.y + n.height : ((0, o.X)(!1, `Invalid axis ${e}`), !1); } function u(e, t, n) { let i; return "x" == e ? (i = Math.min(t.x + t.width, n.x + n.width) - Math.max(t.x, n.x)) : "y" == e ? (i = Math.min(t.y + t.height, n.y + n.height) - Math.max(t.y, n.y)) : ((0, o.X)(!1, `Invalid axis ${e}`), (i = 0)), i < 0 ? 0 : i; } function p(e, t, n) { const i = t[e], o = (function (e, t) { return "x" == e ? { min: t.x, max: t.x + t.width } : { min: t.y, max: t.y + t.height }; })(e, n); return i < o.min ? o.min - i : i > o.max ? i - o.max : 0; } function _(e) { return { x: e.x, y: e.y }; } const g = { OnBlur: () => {}, OnFocus: () => {}, OnFocusChange: () => {}, OnForceMeasureFocusRing: () => {} }; function C(e) { if (!e) return c.gj.NONE; const t = e.ownerDocument.defaultView, n = t.getComputedStyle(e); if ("flex" == n.display) switch (n.flexDirection) { case "row": return "wrap" == n.flexWrap ? c.gj.GRID : c.gj.ROW; case "row-reverse": return c.gj.ROW_REVERSE; case "column": return c.gj.COLUMN; case "column-reverse": return c.gj.COLUMN_REVERSE; } else { if ("grid" == n.display) return c.gj.GRID; if (e.childElementCount > 0) { const n = t.getComputedStyle(e.firstElementChild); if ("left" === n.float) return c.gj.ROW; if ("right" === n.float) return c.gj.ROW_REVERSE; if ("inline" === n.display || "inline-block" === n.display) return c.gj.GRID; } } return c.gj.COLUMN; } function f(e) { switch (e) { case i.eV.DIR_UP: case i.eV.DIR_DOWN: return "y"; case i.eV.DIR_LEFT: case i.eV.DIR_RIGHT: return "x"; default: return; } } }, 62860: (e, t, n) => { "use strict"; n.d(t, { Vp: () => P, zE: () => N, gj: () => F, c4: () => B, mz: () => x }); var i = n(85556), o = n(55981), r = n(19939), a = n(93635), s = n(8568), l = n(22394), c = n(77385); var m = n(10680), d = n(95967), h = n(88669); function u(e, t, n) { var i; const o = [], [r, a] = e.GetChildren(), s = e.GetActiveChild(); let l; const c = s ? (null === (i = s.Element) || void 0 === i ? void 0 : i.getBoundingClientRect()) : null; if (s) { const e = g(s, t, n); if (e && !e.offScreen && ((l = p(s, e, e.overlap, n)), l && !l.visibility.offScreen)) return l; e && o.push({ child: s, visibility: e }); } const m = n || c; for (let e = 0; e < r.length; e++) { const n = r[e]; if (n == s) continue; const i = g(n, t, null != m ? m : void 0); i && o.push({ child: n, visibility: i }); } let d; o.sort(_); for (const e of o) { const { child: n, visibility: i } = e; if (i.offScreen && d) { if (!d.visibility.offScreen) break; if (i.distance && i.distance > d.visibility.distance) break; } const o = n == s ? l : p(n, i, i.overlap || t, null != m ? m : void 0); o && (!d || _(o, d) < 0) && (d = o); } return d; } function p(e, t, n, i) { switch (e.GetFocusable()) { case "none": return; case "children": return u(e, t.overlap || n, i); case "self": return { child: e, visibility: t }; } } function _(e, t) { const n = e.visibility, i = t.visibility; return n.offScreen ? (i.offScreen ? n.distance - i.distance : 1) : i.offScreen ? -1 : n.distance - i.distance; } function g(e, t, n) { var i; const o = null === (i = e.Element) || void 0 === i ? void 0 : i.getBoundingClientRect(), r = e.GetFocusable(); let a; if ("none" == r || !o || !t) return null; if ("self" == r) { if (o.top < t.top || o.right > t.right || o.bottom > t.bottom || o.left < t.left) { const e = o.top + o.height / 2, n = o.left + o.width / 2; if (e < t.top) return { offScreen: "top", distance: t.top - e }; if (n > t.right) return { offScreen: "right", distance: n - t.right }; if (e > t.bottom) return { offScreen: "bottom", distance: e - t.bottom }; if (n < t.left) return { offScreen: "left", distance: t.left - n }; } n && (a = (0, h.dw)(o, n)); } else if ("children" == r) { const n = e.Element; if (!n) return null; if (n.scrollHeight > o.height || n.scrollWidth > o.width) { const e = n.ownerDocument.defaultView.getComputedStyle(n); if ("visible" == e.overflowX || "visible" == e.overflowY) return { overlap: t }; } if (o.bottom < t.top) return { offScreen: "top", distance: t.top - o.bottom }; if (o.left > t.right) return { offScreen: "right", distance: o.left - t.right }; if (o.top > t.bottom) return { offScreen: "bottom", distance: o.top - t.bottom }; if (o.right < t.left) return { offScreen: "left", distance: t.left - o.right }; } return { overlap: { top: Math.max(o.top, t.top), right: Math.min(o.right, t.right), bottom: Math.min(o.bottom, t.bottom), left: Math.max(o.left, t.left) }, distance: a }; } var C = n(59702), f = n(54530); const v = new c.sO("ScrollSnap").Debug; let S = !1; let b; function I(e) { if (!e) return { left: 0, top: 0, right: 0, bottom: 0 }; if (!("ownerDocument" in e)) return { left: 0, right: e.innerWidth, top: 0, bottom: e.innerHeight }; let t = 0, n = 0, i = e; for (; i; ) { if (((t += i.offsetTop), (n += i.offsetLeft), "ownerDocument" in i)) { if ("fixed" === window.getComputedStyle(i).position) break; } i = i.offsetParent; } for (i = null == e ? void 0 : e.parentElement; i; ) { const { scrollTop: e, scrollLeft: o } = G(i); if (((t -= e), (n -= o), "ownerDocument" in i)) { if ("fixed" === window.getComputedStyle(i).position) break; } i = i.parentElement; } return { left: n, top: t, right: n + e.offsetWidth, bottom: t + e.offsetHeight }; } function y(e, t) { return "x" == t ? [e.left, e.right, e.right - e.left] : [e.top, e.bottom, e.bottom - e.top]; } function E(e, t, n, i) { let [o, r, a] = y(e, i), [s, l, c] = y(t, i), [m, d] = y(n, i); return o < s && r > l ? 0 : (o < s && a <= c) || (r > l && a > c) ? o - s - m : (o < s && a > c) || (r > l && a <= c) ? r - l + d : 0; } function D(e) { return "auto" == e ? 0 : e.endsWith("px") ? parseInt(e) : (console.log("Unsupported length", e), 0); } function w(e) { if (!("ownerDocument" in e)) return { left: 0, right: 0, top: 0, bottom: 0 }; const t = e.ownerDocument.defaultView.getComputedStyle(e); return { left: D(t.scrollMarginLeft), right: D(t.scrollMarginRight), top: D(t.scrollMarginTop), bottom: D(t.scrollMarginBottom) }; } function R(e, t) { let n = (function (e) { let t; return (t = "ownerDocument" in e ? e.ownerDocument.defaultView.getComputedStyle(e) : e.document.defaultView.getComputedStyle(window.document.documentElement)), { left: D(t.scrollPaddingLeft), right: D(t.scrollPaddingRight), top: D(t.scrollPaddingTop), bottom: D(t.scrollPaddingBottom) }; })(e); return { left: Math.max(0, t.left + n.left), right: Math.max(0, t.right - n.right), top: Math.max(0, t.top + n.top), bottom: Math.max(0, t.bottom - n.bottom) }; } function A(e) { return e > -1 && e < 1; } function M(e, t, n, i, o) { v("----------------------------------------------------------------------------------"), v("Scrolling Into View:", t); let r = [], a = t, s = I(t), l = null != o ? o : Number.MAX_VALUE; for (; a; ) { let e = (0, h.Et)(a); e || (e = (0, h.kR)(a)); let t = w(a), n = R(e, I(e)), c = L(e), m = { element: e, left: 0, top: 0 }; if ((v("Checking scroll div", e, `scroll y:${c.scrollTop} of ${c.MaxScrollTop()}, x:${c.scrollLeft} of ${c.MaxScrollLeft()}, adjusted =>`, n, "target => ", s), (i && "y" != i) || !(0, h.U0)(e, "y") || ((m.top = E(s, n, t, "y")), (m.top = C.Lh(m.top, -c.scrollTop, c.MaxScrollTop() - c.scrollTop)), o && ((m.top = Math.min(l, Math.abs(m.top)) * (m.top < 0 ? -1 : 1)), (l -= Math.abs(m.top))), v(`- checked y: ${m.top}`)), (i && "x" != i) || !(0, h.U0)(e, "x") || ((m.left = E(s, n, t, "x")), (m.left = C.Lh(m.left, -c.scrollLeft, c.MaxScrollLeft() - c.scrollLeft)), o && ((m.left = Math.min(l, Math.abs(m.left)) * (m.left < 0 ? -1 : 1)), (l -= Math.abs(m.left))), v(`- checked x: ${m.left}`)), r.push(m), o && !l)) break; if (!("ownerDocument" in e)) break; const d = window.getComputedStyle(e); if ("fixed" === d.position || "sticky" === d.position) break; (a = e), (s = { top: s.top - m.top, right: s.right - m.left, bottom: s.bottom - m.top, left: s.left - m.left }); } let c = !1; for (let e of r) { if (A(e.left) && A(e.top)) continue; let t = L(e.element), i = t.scrollTop + e.top, o = t.scrollLeft + e.left; (o = C.Lh(o, 0, t.MaxScrollLeft())), (i = C.Lh(i, 0, t.MaxScrollTop())), (A(t.scrollLeft - o) && A(t.scrollTop - i)) || (t.scrollTo({ left: o, top: i, behavior: n }), c || (v("Scrolling:"), (c = !0)), v(`- ${e.top},${e.left} => ${i}, ${o}, behavior: ${n}`, e.element)); } } class k { constructor(e) { (this.m_scrollTopTarget = void 0), (this.m_scrollLeftTarget = void 0), (this.m_animation = void 0), "ownerDocument" in e ? ((this.m_element = e), (this.m_fnOriginalScrollTo = e.scrollTo), (this.m_element.scrollTo = (e, t) => { "number" == typeof e ? this.scrollTo({ left: e, top: t }) : this.scrollTo(e); })) : ((this.m_window = e), (this.m_element = e.document.documentElement)); } ResetScrollState() { (this.m_scrollTopTarget = void 0), (this.m_scrollLeftTarget = void 0), this.m_window || (this.m_element.style.scrollSnapType = ""); } scrollTo(e) { var t, n, i; if ("smooth" != (null == e ? void 0 : e.behavior)) this.m_animation && (this.m_animation.Cancel(), (this.m_animation = void 0)), this.m_window ? this.m_window.scrollTo(e) : null === (t = this.m_fnOriginalScrollTo) || void 0 === t || t.apply(this.m_element, [e]), this.ResetScrollState(); else { const t = null !== (n = e.left) && void 0 !== n ? n : this.scrollLeft, o = null !== (i = e.top) && void 0 !== i ? i : this.scrollTop; let r = "sine"; this.m_animation && (this.m_animation.Cancel(), (r = "linear")); if (Math.max(Math.abs(this.currentScrollTop - o), Math.abs(this.currentScrollLeft - t)) > 0) { const e = { msDuration: 200, timing: r, onComplete: this.ResetScrollState }; if (this.m_window) { const n = this.currentScrollLeft, i = this.currentScrollTop; this.m_animation = new f.sw(this.m_window, e, (e) => { var r; null === (r = this.m_window) || void 0 === r || r.scrollTo({ left: n + (t - n) * e, top: i + (o - i) * e, behavior: "auto" }); }); } else (this.m_element.style.scrollSnapType = "initial"), (this.m_animation = new f.jg(this.m_element, { scrollTop: o, scrollLeft: t }, e)); (this.m_scrollLeftTarget = t), (this.m_scrollTopTarget = o), this.m_animation.Start(); } } } get clientWidth() { return this.m_window ? this.m_window.innerWidth : this.m_element.clientWidth; } get clientHeight() { return this.m_window ? this.m_window.innerHeight : this.m_element.clientHeight; } get currentScrollLeft() { return this.m_window ? this.m_window.scrollX : this.m_element.scrollLeft; } get currentScrollTop() { return this.m_window ? this.m_window.scrollY : this.m_element.scrollTop; } get scrollLeft() { var e; return null !== (e = this.m_scrollLeftTarget) && void 0 !== e ? e : this.currentScrollLeft; } get scrollTop() { var e; return null !== (e = this.m_scrollTopTarget) && void 0 !== e ? e : this.currentScrollTop; } get scrollWidth() { return this.m_element.scrollWidth; } get scrollHeight() { return this.m_element.scrollHeight; } MaxScrollTop() { return this.scrollHeight - this.clientHeight; } MaxScrollLeft() { return this.scrollWidth - this.clientWidth; } } (0, i.gn)([s.a], k.prototype, "ResetScrollState", null); const T = new WeakMap(); function L(e) { let t = T.get(e); return t || ((t = new k(e)), T.set(e, t)), t; } function G(e) { const t = T.get(e); return t ? { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop } : { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } const O = new c.sO("FocusNavigationMovement").Debug; var F, B, x, N; !(function (e) { (e[(e.NONE = 0)] = "NONE"), (e[(e.COLUMN = 1)] = "COLUMN"), (e[(e.ROW = 2)] = "ROW"), (e[(e.COLUMN_REVERSE = 3)] = "COLUMN_REVERSE"), (e[(e.ROW_REVERSE = 4)] = "ROW_REVERSE"), (e[(e.GRID = 5)] = "GRID"), (e[(e.GEOMETRIC = 6)] = "GEOMETRIC"); })(F || (F = {})), (function (e) { (e[(e.FIRST = 0)] = "FIRST"), (e[(e.LAST = 1)] = "LAST"), (e[(e.MAINTAIN_X = 2)] = "MAINTAIN_X"), (e[(e.MAINTAIN_Y = 3)] = "MAINTAIN_Y"), (e[(e.PREFERRED_CHILD = 4)] = "PREFERRED_CHILD"); })(B || (B = {})), (function (e) { (e[(e.Standard = 0)] = "Standard"), (e[(e.NoTransform = 1)] = "NoTransform"), (e[(e.NoTransformSparseContent = 2)] = "NoTransformSparseContent"); })(x || (x = {})), (function (e) { (e[(e.INVALID = 0)] = "INVALID"), (e[(e.FORWARD = 1)] = "FORWARD"), (e[(e.BACKWARD = 2)] = "BACKWARD"); })(N || (N = {})); class P { constructor(e, t, n) { (this.m_rgChildren = []), (this.m_iLastActiveChildIndex = -1), (this.m_bChildrenSorted = !1), (this.m_bAutoFocusChild = !1), (this.m_bMounted = !1), (this.m_bFocused = !1), (this.m_FocusCallbackList = new l.pB()), (this.m_bFocusWithin = !1), (this.m_FocusWithinCallbackList = new l.pB()), (this.m_ActionDescriptionsChangedCallbackList = new l.pB()), (this.m_RetainFocusParent = null), (this.m_rgNavigationHandlers = []), (this.m_rgFocusHandlers = []), (this.m_Tree = e), (this.m_Parent = t), (this.m_FocusRing = n), (this.m_nDepth = t ? t.m_nDepth + 1 : 0); } CreateHandle() { return new d.uW(this); } get Tree() { return this.m_Tree; } get NavKey() { var e, t; return (null === (e = this.m_Properties) || void 0 === e ? void 0 : e.navKey) ? this.m_Properties.navKey : (null === (t = this.m_element) || void 0 === t ? void 0 : t.id) ? this.m_element.id : void 0; } get Element() { return this.m_element; } get Parent() { return this.m_Parent; } SetProperties(e) { var t, n, i, o, r; const a = ((s = null === (t = this.m_Properties) || void 0 === t ? void 0 : t.actionDescriptionMap), (l = null == e ? void 0 : e.actionDescriptionMap), !(null == s || null == l ? s === l : "object" == typeof s && "object" == typeof l && Object.keys(s).length === Object.keys(l).length && Object.keys(s).every((e) => l.hasOwnProperty(e) && s[e] === l[e]))); var s, l; const c = null === (n = this.m_Properties) || void 0 === n ? void 0 : n.retainFocus, d = null === (i = this.m_Properties) || void 0 === i ? void 0 : i.noFocusRing; (this.m_Properties = e || {}), a && this.m_ActionDescriptionsChangedCallbackList.Dispatch(), this.m_Properties.retainFocus && !c ? this.PropagateRetainFocusParentToChildren(this) : !this.m_Properties.retainFocus && c && this.PropagateRetainFocusParentToChildren(this.m_RetainFocusParent), this.m_Properties.noFocusRing && !d && this.BHasFocus() ? null === (o = this.m_FocusRing) || void 0 === o || o.OnBlur(m.uS.APPLICATION, this, this) : !this.m_Properties.noFocusRing && d && this.BHasFocus() && (null === (r = this.m_FocusRing) || void 0 === r || r.OnFocus(m.uS.APPLICATION, this, this)), this.m_element && this.RegisterDOMEvents(); } BWantsAutoFocus() { var e; return (null === (e = this.m_Properties) || void 0 === e ? void 0 : e.autoFocus) || this.m_bAutoFocusChild; } BWantsPreferredFocus() { var e; return null === (e = this.m_Properties) || void 0 === e ? void 0 : e.preferredFocus; } BWantsFocusRing() { var e; return !(null === (e = this.m_Properties) || void 0 === e ? void 0 : e.noFocusRing) || this.m_Tree.Controller.GetShowDebugFocusRing().Value; } GetBoundingRect() { return this.m_element && this.m_element.getBoundingClientRect(); } SetHasFocus(e) { e != this.m_bFocused && ((this.m_bFocused = e), this.m_FocusCallbackList.Dispatch(this.m_bFocused)); } SetFocusWithin(e) { var t; e != this.m_bFocusWithin && ((this.m_bFocusWithin = e), this.m_FocusWithinCallbackList.Dispatch(this.m_bFocusWithin), (null === (t = this.m_Properties) || void 0 === t ? void 0 : t.onFocusWithin) && this.m_Properties.onFocusWithin(this.m_bFocusWithin)); } BHasFocus() { return this.m_bFocused; } BFocusWithin() { return this.m_bFocusWithin; } get FocusCallbackList() { return this.m_FocusCallbackList; } get FocusWithinCallbackList() { return this.m_FocusWithinCallbackList; } ForceMeasureFocusRing() { var e; null === (e = this.m_FocusRing) || void 0 === e || e.OnForceMeasureFocusRing(); } get ActionDescriptionChangedCallbackList() { return this.m_ActionDescriptionsChangedCallbackList; } GetActiveActionDescriptions() { return this.BuildConsolidatedActionDescriptionMap({}); } BuildConsolidatedActionDescriptionMap(e) { var t; const n = null === (t = this.m_Properties) || void 0 === t ? void 0 : t.actionDescriptionMap; if (n) for (const t in n) { const i = t; void 0 === e[i] && (e[i] = n[i]); } return this.m_Parent ? this.m_Parent.BuildConsolidatedActionDescriptionMap(e) : e; } AddChild(e) { var t; this.m_rgChildren.push(e), (this.m_bChildrenSorted = !1), this.m_element && this.RegisterDOMEvents(), (null === (t = this.m_Properties) || void 0 === t ? void 0 : t.retainFocus) ? e.SetRetainFocusParent(this) : this.m_RetainFocusParent && e.SetRetainFocusParent(this.m_RetainFocusParent), this.m_bMounted && e.BFocusWithin() && ((0, a.X)(!this.m_ActiveChild && this.BFocusWithin(), "Invalid focus state in AddChild"), this.SetActiveChild(this.m_rgChildren.length - 1)); } OnMount(e) { var t, n; (this.m_element = e), this.m_Parent ? this.m_Parent.AddChild(this) : (0, a.X)(this == this.m_Tree.Root, "Only root should have no parent"), (this.m_bMounted = !0), this.RegisterDOMEvents(); const i = this.m_RetainFocusParent && this.m_RetainFocusParent.BHasFocus(), o = (null === (t = this.m_Properties) || void 0 === t ? void 0 : t.autoFocus) || i; if (this.BWantsAutoFocus() || o) { let e = -1; this.m_rgChildren.length && (this.EnsureChildrenSorted(), (e = this.m_rgChildren.findIndex((e) => e.BWantsAutoFocus()))), ((null === (n = this.m_Properties) || void 0 === n ? void 0 : n.autoFocus) || o || -1 !== e) && (this.SetActiveChild(e), !this.m_Parent || this.m_Parent.m_element ? (i ? this.m_Tree.DeferredFocus.BHasQueuedFocusNode() || this.m_Tree.DeferredFocus.RequestFocus(this.m_RetainFocusParent, { bFocusDescendant: !0 }) : this.Tree.DeferredFocus.RequestFocus(this)) : (this.m_Parent.m_bAutoFocusChild = !0)); } else if (this.m_rgChildren.length) { const e = this.m_rgChildren.findIndex((e) => e.BFocusWithin()); -1 != e && (this.SetActiveChild(e), (0, a.X)(this.m_bFocusWithin, "Child has focus, we should be m_bFocusWithin")); } } DEV_SetDebugPropsOnElement() {} OnUnmount() { var e; (null === (e = this.m_Properties) || void 0 === e ? void 0 : e.retainFocus) && this.PropagateRetainFocusParentToChildren(this.m_RetainFocusParent), (this.m_bMounted = !1); const t = this.Tree.DeferredFocus.BIsQueuedFocusNode(this); (this.m_bFocused || t) && (O(`The focused node is unmounting, ${this.m_RetainFocusParent ? "will transfer to retain focus ancestor" : "will blur"}.`), t && this.Tree.DeferredFocus.RequestFocus(null), this.m_RetainFocusParent ? this.m_RetainFocusParent.OnFocusedDecendantRemoved(this) : this.m_bFocused && this.m_Tree.TransferFocus(m.uS.APPLICATION, null)), this.UnregisterDOMEvents(), this.m_Parent ? this.m_Parent.RemoveChild(this) : (0, a.X)(this == this.m_Tree.Root, "Only root should have no parent"); } RegisterDOMEvents() { var e, t, n, i; !this.m_rgNavigationHandlers.length && this.m_element && (this.m_rgChildren.length >= 2 || (null === (e = this.m_Properties) || void 0 === e ? void 0 : e.layout) != F.NONE || this.m_Properties.onMoveUp || this.m_Properties.onMoveRight || this.m_Properties.onMoveDown || this.m_Properties.onMoveLeft) && this.m_rgNavigationHandlers.push((0, m.$G)(this.m_element, this.OnNavigationEvent)), ((null === (t = this.m_Properties) || void 0 === t ? void 0 : t.focusable) || 0 == this.m_rgChildren.length) && (this.m_rgFocusHandlers.length || (null === (n = this.m_element) || void 0 === n || n.addEventListener("focus", this.OnDOMFocus), null === (i = this.m_element) || void 0 === i || i.addEventListener("blur", this.OnDOMBlur), this.m_rgFocusHandlers.push(() => { var e, t; null === (e = this.m_element) || void 0 === e || e.removeEventListener("focus", this.OnDOMFocus), null === (t = this.m_element) || void 0 === t || t.removeEventListener("blur", this.OnDOMBlur); }))); } RemoveChild(e) { let t = this.m_rgChildren.indexOf(e); (0, a.X)(-1 !== t, "Child was not found to remove"), -1 !== t && (this.m_ActiveChild == e && (this.m_ActiveChild = void 0), this.m_rgChildren.splice(t, 1)); } UnregisterDOMEvents() { this.m_rgNavigationHandlers.forEach((e) => e()), (this.m_rgNavigationHandlers = []), this.m_rgFocusHandlers.forEach((e) => e()), (this.m_rgFocusHandlers = []); } GetActiveDescendant() { const e = this.GetActiveChild(); return e ? e.GetActiveDescendant() : this; } IsValidChildIndex(e) { return e >= 0 && e < this.m_rgChildren.length; } GetActiveChild() { return this.m_ActiveChild ? this.m_ActiveChild : (this.EnsureChildrenSorted(), this.IsValidChildIndex(this.m_iLastActiveChildIndex) ? this.m_rgChildren[this.m_iLastActiveChildIndex] : null); } GetActiveChildIndex() { if (this.m_ActiveChild) { if (this.IsValidChildIndex(this.m_iLastActiveChildIndex) && this.m_rgChildren[this.m_iLastActiveChildIndex] == this.m_ActiveChild) return this.m_iLastActiveChildIndex; this.m_iLastActiveChildIndex = this.m_rgChildren.indexOf(this.m_ActiveChild); } return this.m_iLastActiveChildIndex; } EnsureChildrenSorted(e = !1) { (this.m_bChildrenSorted && !e) || (this.m_rgChildren.sort((e, t) => { const n = e.m_element, i = t.m_element; if (!n) return i ? 1 : 0; if (!i) return -1; const o = n.compareDocumentPosition(i); return o & Node.DOCUMENT_POSITION_PRECEDING ? 1 : o & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 0; }), this.m_ActiveChild && (this.m_iLastActiveChildIndex = this.m_rgChildren.indexOf(this.m_ActiveChild)), (this.m_bChildrenSorted = !0)); } GetLastFocusElement() { const e = this.GetActiveChild(); return e ? e.GetLastFocusElement() : this.m_element; } OnDOMFocus(e) { this.m_bFocused || this.m_Tree.TransferFocus(m.uS.BROWSER, this); } OnDOMBlur(e) { var t; this.m_bFocused && (null === (t = this.m_element) || void 0 === t ? void 0 : t.ownerDocument.hasFocus()) && this.m_Tree.TransferFocus(m.uS.BROWSER, null); } UpdateParentActiveChild() { this.m_Parent && (this.m_Parent.SetActiveChild(this), this.m_Parent.UpdateParentActiveChild()); } GetFocusable() { const { focusable: e, focusableIfNoChildren: t, childFocusDisabled: n, fnCanTakeFocus: i } = this.m_Properties; return this.m_bMounted ? (i && !i(this) ? "none" : e || (t && (n || 0 == this.m_rgChildren.length)) ? "self" : !n && this.m_rgChildren.length ? "children" : "none") : "none"; } BTakeFocus(e, t) { const n = this.FindFocusableNode(t); return this.InternalFocusDescendant(n, e, t); } FindFocusableNode(e, t) { switch (this.GetFocusable()) { case "none": return null; case "self": return this; case "children": return this.FindFocusableDescendant(e, t); } } BChildTakeFocus(e, t) { const n = this.FindFocusableDescendant(t); return this.InternalFocusDescendant(n, e, t); } BFocusFirstChild(e) { const t = this.FindNextFocusableChildInDirection(-1, N.FORWARD, o.eV.INVALID); return this.InternalFocusDescendant(t, e); } BFocusLastChild(e) { const t = this.FindNextFocusableChildInDirection(this.m_rgChildren.length, N.BACKWARD, o.eV.INVALID); return this.InternalFocusDescendant(t, e); } FindFocusableDescendant(e, t) { var n, i, o, a; const s = (0, d.sA)(e), { focusableIfNoChildren: l, childFocusDisabled: c } = null !== (n = this.m_Properties) && void 0 !== n ? n : {}; if (c) return null; if (this.m_rgChildren.length) { this.EnsureChildrenSorted(); const { navEntryPreferPosition: n, resetNavOnEntry: c } = null !== (i = this.m_Properties) && void 0 !== i ? i : {}; let m, d = this.GetActiveChildIndex(); if ((c && void 0 !== e && (d = -1), !this.IsValidChildIndex(d))) { const e = this.GetLayout(); d = d >= this.m_rgChildren.length || e == F.ROW_REVERSE || e == F.COLUMN_REVERSE || n == B.LAST ? this.m_rgChildren.length - 1 : 0; } if ((n == B.MAINTAIN_X || n == B.MAINTAIN_Y || t) && s) { let i, l; n == B.MAINTAIN_X ? (i = "x") : n == B.MAINTAIN_Y && (i = "y"), i == r.TP[s] && (l = null !== (o = this.m_Tree.GetLastFocusedMovementRect(r.TP[s])) && void 0 !== o ? o : null === (a = this.m_Tree.GetLastFocusedNode()) || void 0 === a ? void 0 : a.GetBoundingRect()), O(`Taking focus while preserving ${n && B[n]} preserved: ${i} movement: ${s}, node:`, l || t); const c = this.ComputeRelativeDirection(e, F.GRID); if (l || t) { const n = c == N.BACKWARD ? this.m_rgChildren.length - 1 : 0; m = this.FindClosestChildInNextAxiallyAlignedSet(i || r.TP[s], c, e, l || t, n, this.m_rgChildren[n].GetBoundingRect()); } else if (i != r.TP[s]) { const t = c == N.BACKWARD ? this.m_rgChildren.length : -1; m = this.FindNextFocusableChildInDirection(t, c, e); } } else if (n == B.PREFERRED_CHILD) { for (const t of this.m_rgChildren) if (((m = t.BWantsPreferredFocus() ? t.FindFocusableNode(e) : void 0), m)) return m; } else n == B.LAST && (m = this.FindNextFocusableChildInDirection(d + 1, N.BACKWARD, e)); return m || (m = this.FindNextFocusableChildInDirection(d - 1, N.FORWARD, e)), m || (m = this.FindNextFocusableChildInDirection(d, N.BACKWARD, e)), m || (l ? this : null); } return null; } BVisibleChildTakeFocus(e) { var t, n, i, o, r; const a = null !== (i = null === (n = null === (t = this.Element) || void 0 === t ? void 0 : t.ownerDocument) || void 0 === n ? void 0 : n.defaultView) && void 0 !== i ? i : window, s = u(this, { top: 0, left: 0, right: a.innerWidth, bottom: a.innerHeight }); return O(`Focusing visible child, best child match is ${null === (r = null === (o = null == s ? void 0 : s.child) || void 0 === o ? void 0 : o.Element) || void 0 === r ? void 0 : r.className} - ${JSON.stringify(null == s ? void 0 : s.visibility)}`), !!s && s.child.BTakeFocus(e); } GetLayout() { var e; if (null === (e = this.m_Properties) || void 0 === e ? void 0 : e.layout) return this.m_Properties.layout; if (this.m_rgChildren.length < 2) return F.NONE; return (0, d.Ii)(this.m_element); } OnNavigationEvent(e) { var t, n; const i = e.detail.button; if (this.BTryInternalNavigation(i, null !== (t = e.detail.is_repeat) && void 0 !== t && t)) return !0; const { onMoveUp: r, onMoveRight: a, onMoveDown: s, onMoveLeft: l } = null !== (n = this.m_Properties) && void 0 !== n ? n : {}; let c = !1; switch (i) { case o.eV.DIR_UP: r && (c = r(e.detail, this)); break; case o.eV.DIR_RIGHT: a && (c = a(e.detail, this)); break; case o.eV.DIR_DOWN: s && (c = s(e.detail, this)); break; case o.eV.DIR_LEFT: l && (c = l(e.detail, this)); } return c; } InternalFocusDescendant(e, t, n) { return !!e && (this.m_Tree.TransferFocus(t, e, (0, d.sA)(n)), !0); } BTryInternalNavigation(e, t) { var n, i; const r = this.GetLayout(); let a, s = this.ComputeRelativeDirection(e, r); if ((O(`Handling navigation event ${o.eV[e]} - ${F[r]} - ${N[s]}`, this.m_element), s == N.INVALID)) return !1; if ((null === (n = this.m_Properties) || void 0 === n ? void 0 : n.focusable) && this.m_bFocused) return O("Skipping navigation within focused element"), !1; if ((this.EnsureChildrenSorted(!0), r == F.GRID)) a = this.FindNextFocusableChildInGrid(this.GetActiveChildIndex(), s, e); else { let t = this.GetActiveChildIndex(); this.IsValidChildIndex(t) || (t = s == N.FORWARD ? -1 : this.m_rgChildren.length), (a = this.FindNextFocusableChildInDirection(t, s, e)); } if (a) { const n = (0, d.sA)(e); if (this.GetScrollIntoViewType() == x.NoTransformSparseContent) { const e = null === (i = a.Element) || void 0 === i ? void 0 : i.ownerDocument.defaultView; if (e) { const i = ("y" == n ? e.innerHeight : e.innerWidth) / (t ? 4.5 : 3.33), o = I(a.Element); if ((o.top > e.innerHeight && o.bottom > e.innerHeight + i) || (o.bottom < 0 && o.top < -i) || (o.left > e.innerWidth && o.right > e.innerWidth + i) || (o.right < 0 && o.left < -i)) return O(`Element too far away, scrolling ${i} on ${n} axis `), M(a.Element, a.Element, "smooth", n, i), !0; } } return this.m_Tree.TransferFocus(m.uS.GAMEPAD, a, n), !0; } return !1; } GetScrollIntoViewType() { var e; return (null === (e = this.m_Properties) || void 0 === e ? void 0 : e.scrollIntoViewType) ? this.m_Properties.scrollIntoViewType : this.m_Parent ? this.m_Parent.GetScrollIntoViewType() : x.Standard; } GetRelativeDirection(e) { return this.ComputeRelativeDirection(e, this.GetLayout()); } ComputeRelativeDirection(e, t) { let n = t == F.ROW_REVERSE || t == F.COLUMN_REVERSE; switch (t) { case F.ROW: case F.ROW_REVERSE: switch (e) { case o.eV.DIR_LEFT: return n ? N.FORWARD : N.BACKWARD; case o.eV.DIR_RIGHT: return n ? N.BACKWARD : N.FORWARD; default: return N.INVALID; } case F.COLUMN: case F.COLUMN_REVERSE: switch (e) { case o.eV.DIR_UP: return n ? N.FORWARD : N.BACKWARD; case o.eV.DIR_DOWN: return n ? N.BACKWARD : N.FORWARD; default: return N.INVALID; } case F.GRID: switch (e) { case o.eV.DIR_LEFT: case o.eV.DIR_UP: return n ? N.FORWARD : N.BACKWARD; case o.eV.DIR_RIGHT: case o.eV.DIR_DOWN: return n ? N.BACKWARD : N.FORWARD; default: return N.INVALID; } default: return N.INVALID; } } AdvanceIndex(e, t) { return e + (t == N.FORWARD ? 1 : -1); } FindNextFocusableChildInDirection(e, t, n) { let i = t == N.FORWARD ? 1 : -1; for (let t = e + i; t >= 0 && t < this.m_rgChildren.length; t += i) { const e = this.m_rgChildren[t].FindFocusableNode(n); if (e) return e; } return null; } ScanChildren(e, t, n) { let i = t == N.FORWARD ? 1 : -1; for (let t = e; t >= 0 && t < this.m_rgChildren.length; t += i) if (n(this.m_rgChildren[t], t)) return t; return -1; } FindNextFocusableChildInGrid(e, t, n) { var i, r; const s = n == o.eV.DIR_UP || n == o.eV.DIR_DOWN, l = this.GetLastFocusElement(); if (!l || l == this.m_element) return (0, a.X)(!1, "No active child for grid navigation", this.m_iLastActiveChildIndex, this.m_rgChildren.length, l), this.FindFocusableDescendant(n); const c = this.GetActiveDescendant().GetBoundingRect(); if (n == o.eV.DIR_UP || n == o.eV.DIR_DOWN) { const e = null !== (i = this.m_Tree.GetLastFocusedMovementRect("x")) && void 0 !== i ? i : null === (r = this.m_Tree.GetLastFocusedNode()) || void 0 === r ? void 0 : r.GetBoundingRect(); e && ((c.x = e.x), (c.width = e.width)); } if (s) { let i = e; for (; -1 != i; ) { const e = this.ScanChildren(this.AdvanceIndex(i, t), t, (e) => !(0, d.lx)("y", c, e.GetBoundingRect())); if (-1 != e) { const i = this.m_rgChildren[e].GetBoundingRect(), o = this.FindClosestChildInNextAxiallyAlignedSet("x", t, n, c, e, i); if (o) return o; } i = e; } } else { let i = t == N.FORWARD ? 1 : -1; for (let o = this.AdvanceIndex(e, t); o >= 0 && o < this.m_rgChildren.length; o += i) { const e = this.m_rgChildren[o]; if (!(0, d.lx)("y", c, e.GetBoundingRect())) return null; let t = e.FindFocusableNode(n); if (t) return t; } } return null; } FindClosestChildInNextAxiallyAlignedSet(e, t, n, i, o, a) { (!o || o < 0) && (o = 0); let s = []; if (!i) return null; const l = (0, d.ZR)(i); this.ScanChildren(o, t, (t) => { const n = t.GetBoundingRect(); return !!n && (!(!a || (0, d.lx)(r.TP[e], a, n)) || (s.push({ child: t, overlap: (0, d.sq)(e, i, n), dist: (0, d.TB)(e, l, n) }), !1)); }), t == N.BACKWARD && s.reverse(), s.sort((e, t) => { const n = t.overlap - e.overlap; return 0 != n ? n : e.dist - t.dist; }); for (const { child: e } of s) { const t = e.FindFocusableNode(n, i); if (t) return t; } return null; } GetChildren() { return this.EnsureChildrenSorted(), [this.m_rgChildren, this.m_iLastActiveChildIndex]; } SetActiveChild(e) { e instanceof P ? (this.EnsureChildrenSorted(), (this.m_ActiveChild = e), (this.m_iLastActiveChildIndex = this.m_rgChildren.indexOf(e))) : (this.IsValidChildIndex(e) && (this.m_ActiveChild = this.m_rgChildren[e]), (this.m_iLastActiveChildIndex = e)); } GetDepth() { return this.m_nDepth; } SetRetainFocusParent(e) { var t; (this.m_RetainFocusParent = e), (null === (t = this.m_Properties) || void 0 === t ? void 0 : t.retainFocus) || this.PropagateRetainFocusParentToChildren(e); } PropagateRetainFocusParentToChildren(e) { for (let t = 0; t < this.m_rgChildren.length; t++) this.m_rgChildren[t].SetRetainFocusParent(e); } OnFocusedDecendantRemoved(e) { this.m_Tree.DeferredFocus.RequestFocus(this, { bFocusDescendant: !0 }); } SetDOMFocusAndScroll(e, t) { var n; this.UpdateParentActiveChild(), this.m_Tree.BIsActiveFocus() ? ((0, a.X)(!this.m_Tree.BUseVirtualFocus(), "Virtual focus tree should not have browser focus"), null === (n = this.m_element) || void 0 === n || n.focus({ preventScroll: !0 })) : this.m_Tree.BUseVirtualFocus() || O(`Didn't move focus to element as tree ${this.m_Tree.id} is not active focus tree`), (function (e, t) { var n, i, o; const r = e.Element; if (!r) return; let a = [e]; for (let t = e.Parent; t; t = t.Parent) (null === (n = t.m_Properties) || void 0 === n ? void 0 : n.scrollIntoViewWhenChildFocused) && a.push(t); for (; a.length; ) { let n = a.pop(), r = 0 == a.length, s = null === (i = null == n ? void 0 : n.m_Properties) || void 0 === i ? void 0 : i.scrollIntoViewType; if ((void 0 === s && (s = S ? x.NoTransform : x.Standard), (null === (o = null == n ? void 0 : n.m_Properties) || void 0 === o ? void 0 : o.fnScrollIntoViewHandler) && !1 !== n.m_Properties.fnScrollIntoViewHandler(e, t, n))) continue; const l = n.m_element, c = s == x.NoTransform || s == x.NoTransformSparseContent || !r; if (t) { const t = c ? I(l) : l.getBoundingClientRect(); let n = !1; const i = Math.max(1.4 * (t.bottom - t.top), 40); ((b && performance.now() - b < 500) || t.bottom < -i || t.top > window.innerHeight + i) && (n = !0); let o = n ? "auto" : "smooth"; n && (b = performance.now()), e.Tree.Controller.BIsRestoringHistory() && (o = "auto"), c ? M(0, l, o) : l.scrollIntoView({ behavior: o, block: "nearest" }); } else c ? M(0, l, "auto") : null == l || l.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" }); } })(this, t), this.m_Tree.OnChildActivated(e); } } (0, i.gn)([s.a], P.prototype, "OnDOMFocus", null), (0, i.gn)([s.a], P.prototype, "OnDOMBlur", null), (0, i.gn)([s.a], P.prototype, "OnNavigationEvent", null); }, 91108: (e, t, n) => { "use strict"; n.d(t, { C: () => m }); var i = n(55981), o = n(22394), r = n(77385), a = n(10680), s = n(62860); const l = new r.sO("FocusNavigation").Debug, c = new r.sO("GamepadEvents").Debug; class m { constructor(e, t, n) { (this.m_onActivateCallbacks = new o.pB()), (this.m_onDeactivateCallbacks = new o.pB()), (this.m_onActiveFocusStateChangedCallbacks = new o.pB()), (this.m_applyFocusClassesInDesktop = !1), (this.m_lastFocusNodeXMovement = new d()), (this.m_lastFocusNodeYMovement = new d()), (this.m_DeferredFocus = new h(this)), (this.m_Controller = e), (this.m_context = t), (this.m_ID = n), (this.m_Root = new s.Vp(this, null, null)), this.m_Root.SetProperties({ layout: s.gj.COLUMN }), (window.GamepadNavTree = this); } SetUseVirtualFocus(e) { this.m_bVirtualFocus = e; } get id() { return this.m_ID; } get Root() { return this.m_Root; } get Controller() { return this.m_Controller; } get WindowContext() { return this.m_context; } get Window() { return this.m_window; } BUseVirtualFocus() { return this.m_bVirtualFocus; } BIsContextActive() { return this.m_Controller.BIsInActiveContext(this); } CreateNode(e, t) { return new s.Vp(this, e, t); } RegisterNavigationItem(e, t) { return e.OnMount(t), () => e.OnUnmount(); } OnChildActivated(e) { this.m_bIsMounted && this.m_Controller.OnGamepadNavigationTreeFocused(this, e); } GetLastFocusedNode() { return this.m_lastFocusNode; } GetLastFocusedMovementRect(e) { return "x" == e ? this.m_lastFocusNodeXMovement.GetRect() : "y" == e ? this.m_lastFocusNodeYMovement.GetRect() : void 0; } get OnActivateCallbacks() { return this.m_onActivateCallbacks; } get OnDeactivateCallbacks() { return this.m_onDeactivateCallbacks; } get OnActiveStateChangedCallbacks() { return this.m_onActiveFocusStateChangedCallbacks; } OnActivate(e) { this.m_onActivateCallbacks.Dispatch(this, e), this.m_onActiveFocusStateChangedCallbacks.Dispatch(!0, this); } OnDeactivate(e) { this.m_onDeactivateCallbacks.Dispatch(this, e), this.m_onActiveFocusStateChangedCallbacks.Dispatch(!1, this), (this.m_bWasActiveForLastFocusChange = !1); } IsActiveFocusNavTree() { return this.m_Controller.IsActiveFocusNavTree(this); } TakeFocus(e, t = !1) { let n = !1; t ? (n = this.Root.BVisibleChildTakeFocus(e)) : this.m_lastFocusNode && (n = this.m_lastFocusNode.BTakeFocus(e)), n || (n = this.Root.BTakeFocus(e)), n || this.TransferFocus(e, this.Root); } Activate(e = !1) { this.m_Controller.OnGamepadNavigationTreeActivated(this, e); } Deactivate() { this.m_Controller.BlurNavTree(this); } BIsActive() { return this.m_bIsMounted && (this.m_Controller.IsActiveNavTree(this) || this.m_Controller.IsActiveFocusNavTree(this)); } BIsActiveFocus() { return this.m_bIsMounted && this.m_Controller.IsActiveFocusNavTree(this); } BIsActiveWithinContext() { return this.m_bIsMounted && (this.m_context.m_LastActiveNavTree == this || this.m_context.m_LastActiveFocusNavTree == this); } SetIsMounted(e) { this.m_window = e; const t = this.m_Root.Element; (t.__nav_tree = this), t.__nav_wrapper && t.__nav_wrapper.BindTree(this), (this.m_bIsMounted = !0); } SetParentEmbeddedNavTree(e) { this.m_ParentEmbeddedNavTree = e; } GetParentEmbeddedNavTree() { return this.m_ParentEmbeddedNavTree; } SetApplyFocusClassesInDesktop(e) { this.m_applyFocusClassesInDesktop = e; } GetApplyFocusClassesInDesktop() { return this.m_applyFocusClassesInDesktop; } SetOnUnhandledButtonCallback(e) { this.m_onUnhandledButton = e; } HandleButtonDownEventAsLogicalEvent(e) { let { bUnhandled: t, bHadLogicalEventMapping: n } = (0, a.Ut)(e); return c(`Logical gamepad Event fired: ${i.eV[e.detail.button]}, had logical event: ${n}, was handled: ${!t}`), t && this.m_onUnhandledButton && (t = this.m_onUnhandledButton(e)), t && (t = this.m_Controller.FireUnhandledGamepadEventCallbacks(e)), e.stopPropagation(), t; } get DeferredFocus() { return this.m_DeferredFocus; } TransferFocus(e, t, n) { this.m_Controller.BatchedUpdate(() => this.TransferFocusInternal(e, t, n)); } TransferFocusInternal(e, t, n) { const i = this.m_lastFocusNode; if (i == t && (this.m_bWasActiveForLastFocusChange || !this.BIsActive())) return; l(`Transfer focus in ${this.id}, source: ${e && a.uS[e]}, from/to:`, null == i ? void 0 : i.m_element, null == t ? void 0 : t.m_element); const o = { blurredNode: i, focusedNode: t, source: e }, r = (function (e, t) { if (!t || !e) return null; let n = t, i = e; for (; n.GetDepth() > i.GetDepth() && n.Parent; ) n = n.Parent; for (; i.GetDepth() > n.GetDepth() && i.Parent; ) i = i.Parent; for (; n != i && n && i; ) (n = n.Parent), (i = i.Parent); return n; })(i, t); if (i) { i.SetHasFocus(!1); for (let e = i; e && e != r; e = e.Parent) e.SetFocusWithin(!1); } if (t) { t.SetHasFocus(!0); for (let e = t; e && e != r; e = e.Parent) e.SetFocusWithin(!0); } let s = this.m_context.OnFocusChangeStart(e, this, i, t); t && t.SetDOMFocusAndScroll(e, i), i && ((0, a.Jb)(i.Element, "vgp_onblur", o), !i.m_FocusRing || (t && i.m_FocusRing == t.m_FocusRing) || i.m_FocusRing.OnBlur(e, i, t)), t && ((0, a.Jb)(t.Element, "vgp_onfocus", o), t.m_FocusRing && (i && t.m_FocusRing == i.m_FocusRing ? t.m_FocusRing.OnFocusChange(e, i, t) : t.m_FocusRing.OnFocus(e, t, i))), (this.m_lastFocusNode = t), (this.m_bWasActiveForLastFocusChange = this.BIsActive()), "x" == n ? this.m_lastFocusNodeXMovement.SetNode(null == t ? void 0 : t.Element) : "y" == n ? this.m_lastFocusNodeYMovement.SetNode(null == t ? void 0 : t.Element) : (this.m_lastFocusNodeXMovement.Reset(), this.m_lastFocusNodeYMovement.Reset()), this.m_context.OnFocusChangeComplete(s); } } class d { SetNode(e) { (this.m_element = e), (this.m_rect = e ? e.getBoundingClientRect() : void 0); } Reset() { this.SetNode(void 0); } GetRect() { var e; return (null === (e = this.m_element) || void 0 === e ? void 0 : e.isConnected) ? this.m_element.getBoundingClientRect() : this.m_rect; } } class h { constructor(e) { (this.m_schExecuteQueuedFocus = new o.Ar()), (this.m_bSuppressed = !1), (this.m_tree = e); } RequestFocus(e, t) { e ? ((this.m_target = Object.assign(Object.assign({}, t), { node: e })), this.m_interval || this.m_bSuppressed || this.m_schExecuteQueuedFocus.Schedule(1, () => { (this.m_interval = void 0), this.ExecuteQueuedFocus(); })) : (this.m_target = void 0); } BHasQueuedFocusNode() { return !!this.m_target; } BIsQueuedFocusNode(e) { return this.m_target && this.m_target.node == e; } SuppressFocus() { (this.m_bSuppressed = !0), this.ClearInterval(); } Reset() { (this.m_bSuppressed = !1), (this.m_target = void 0), this.ClearInterval(); } ClearInterval() { this.m_schExecuteQueuedFocus.Cancel(); } ExecuteQueuedFocus() { if (((this.m_bSuppressed = !1), this.m_target)) { const { node: e, bFocusDescendant: t } = this.m_target; (this.m_target = void 0), l(`DeferredFocus in ${this.m_tree.id} - focusing ${t ? "descendant of" : "node"} ${e.NavKey}`), t ? e.BChildTakeFocus(a.uS.APPLICATION) || this.m_tree.TransferFocus(a.uS.APPLICATION, e) : e.BTakeFocus(a.uS.APPLICATION); } } } }, 1093: (e, t, n) => { "use strict"; n.d(t, { t: () => o }); var i = n(62860); function o(e) { switch (e) { case "column": return i.gj.COLUMN; case "column-reverse": return i.gj.COLUMN_REVERSE; case "row": return i.gj.ROW; case "row-reverse": return i.gj.ROW_REVERSE; case "grid": return i.gj.GRID; default: return i.gj.NONE; } } }, 56973: (e, t, n) => { "use strict"; n.d(t, { Qy: () => s, oQ: () => a }); var i = n(10680), o = n(55981), r = n(62860); function a(e) { return (t) => { if (t.currentTarget == t.target) return !1; switch (t.detail.button) { case o.eV.DIR_UP: return !!e.bPreventMovementUp; case o.eV.DIR_RIGHT: return !!e.bPreventMovementRight; case o.eV.DIR_DOWN: return !!e.bPreventMovementDown; case o.eV.DIR_LEFT: return !!e.bPreventMovementLeft; default: return !1; } }; } const s = Object.seal({ onMoveUp: l, onMoveDown: l }); Object.seal({ onMoveRight: l, onMoveLeft: l }); function l(e, t) { if (e.is_repeat) return !1; const n = t.GetRelativeDirection(e.button); return n == r.zE.FORWARD ? t.BFocusFirstChild(i.uS.GAMEPAD) : n == r.zE.BACKWARD && t.BFocusLastChild(i.uS.GAMEPAD); } }, 636: (e, t, n) => { "use strict"; n.d(t, { $1: () => l, pj: () => s }); var i = n(27378), o = n(54530), r = n(2049), a = n(55981); function s(e, t = "smooth", n, r) { const s = (null != n ? n : 30) / 100, l = i.useRef(void 0), c = i.useRef(void 0), m = i.useCallback(() => { (l.current = void 0), (c.current = void 0); }, []), d = (function (e, t) { const n = i.useRef(); return i.useCallback( (i, r) => { let a = "sine"; if ((n.current && (n.current.Cancel(), (a = "linear")), !e.current)) return; void 0 === i && (i = e.current.scrollTop), void 0 === r && (r = e.current.scrollLeft); let s = Math.max(Math.abs(e.current.scrollTop - i), Math.abs(e.current.scrollLeft - r)); if (s > 0) { let l = Math.max(Math.min((s / 1e3) * 200, 500), 300); (n.current = new o.jg(e.current, { scrollTop: i, scrollLeft: r }, { msDuration: l, timing: a, onComplete: t })), n.current.Start(); } else t && t(); }, [e, t], ); })(e, m); return i.useCallback( (n) => { var i, o; if (r && !r(n)) return !1; if (n.defaultPrevented) return !1; if (!e.current) return !1; const { scrollTop: h, scrollHeight: u, clientHeight: p, scrollLeft: _, scrollWidth: g, clientWidth: C } = e.current, f = null !== (i = l.current) && void 0 !== i ? i : h, v = null !== (o = c.current) && void 0 !== o ? o : _; switch (n.detail.button) { case a.eV.DIR_UP: if (f <= 2) return !1; l.current = Math.max(0, f - p * s); break; case a.eV.DIR_DOWN: if (f >= u - p - 2) return !1; l.current = Math.min(u - p, f + p * s); break; case a.eV.DIR_LEFT: if (v <= 2) return !1; c.current = Math.max(0, v - C * s); break; case a.eV.DIR_RIGHT: if (v >= g - C - 2) return !1; c.current = Math.min(g - C, v + C * s); break; default: return !1; } return t && "smooth" != t ? (e.current.scrollTo({ top: l.current, left: c.current, behavior: "auto" }), m()) : d(l.current, c.current), !0; }, [r, e, t, s, d, m], ); } function l() { const e = i.useRef(null), t = i.useCallback( (t) => { window.requestAnimationFrame(() => { var t, n, i; (null === (t = e.current) || void 0 === t ? void 0 : t.BFocusWithin()) && (null === (i = null === (n = e.current.Node()) || void 0 === n ? void 0 : n.GetLastFocusElement()) || void 0 === i || i.scrollIntoView({ behavior: "auto", block: "nearest" })); }); }, [e], ); return { ref: (0, r.yU)(t), navRef: e }; } }, 582: (e, t, n) => { "use strict"; n.d(t, { Gk: () => c, LH: () => l, ZT: () => i, xM: () => s }); var i, o = n(44420), r = n(66954), a = n(84290); !(function (e) { (e[(e.k_eLibrary = 1)] = "k_eLibrary"), (e[(e.k_eWishlist = 2)] = "k_eWishlist"), (e[(e.k_eFollowing = 4)] = "k_eFollowing"), (e[(e.k_eRecommended = 8)] = "k_eRecommended"), (e[(e.k_eSteam = 16)] = "k_eSteam"), (e[(e.k_eRequired = 32)] = "k_eRequired"), (e[(e.k_eFeatured = 64)] = "k_eFeatured"), (e[(e.k_eCurator = 128)] = "k_eCurator"), (e[(e.k_eReposted = 256)] = "k_eReposted"); })(i || (i = {})); class s { GetSource() { return this.appInfo ? this.appInfo.source : this.clanInfo.source; } static GetEntityNameForID(e, t) { var n; if (e) return null === (n = o.Z.Get().GetApp(e)) || void 0 === n ? void 0 : n.GetName(); if (t) { const e = r.sV.GetClanInfoByClanAccountID(t); if (e) return e.group_name; } return (0, a.Xx)("#EventCalendar_MuteApp_Unknown"); } static BHasEntityNameForID(e, t) { var n, i; return e ? Boolean(null === (n = o.Z.Get().GetApp(e)) || void 0 === n ? void 0 : n.GetName()) : !!t && !!(null === (i = r.sV.GetClanInfoByClanAccountID(t)) || void 0 === i ? void 0 : i.group_name); } GetEntityName() { return s.GetEntityNameForID(this.appid, this.clanid); } GetGameCapsule() { var e, t; if (this.appInfo) return null === (t = null === (e = o.Z.Get().GetApp(this.appInfo.appid)) || void 0 === e ? void 0 : e.GetAssets()) || void 0 === t ? void 0 : t.GetMainCapsuleURL(); if (this.clanInfo) { let e = r.sV.GetClanInfoByClanAccountID(this.clanInfo.clanid); if (e) return e.avatar_full_url; } return (0, a.Xx)("#EventCalendar_MuteApp_Unknown"); } GetGameIcon() { var e, t; if (this.appInfo) return null === (t = null === (e = o.Z.Get().GetApp(this.appInfo.appid)) || void 0 === e ? void 0 : e.GetAssets()) || void 0 === t ? void 0 : t.GetCommunityIconURL(); if (this.clanInfo) { let e = r.sV.GetClanInfoByClanAccountID(this.clanInfo.clanid); if (e) return e.avatar_full_url; } return (0, a.Xx)("#EventCalendar_MuteApp_Unknown"); } } class l {} class c {} }, 45912: (e, t, n) => { "use strict"; n.d(t, { XC: () => a }); var i = n(27378), o = n(65213), r = n(54701); n(88991), n(10553), n(97669); function a(e) { const [t, n] = (0, i.useState)(o.j1.GetClanEventModel(e)), a = (0, r.T)("usePartnerEventByEventGID"); return ( (0, i.useEffect)(() => { (null == t ? void 0 : t.GID) != e && (o.j1.Init(), o.j1.LoadBatchPartnerEventsByEventGIDsOrAnnouncementGIDs([e], [], a).then((t) => { 1 != (null == t ? void 0 : t.length) || t[0].GID != e || a.token.reason || n(t[0]); })); }, [e, t, a]), t ); } }, 54521: (e, t, n) => { "use strict"; n.d(t, { J: () => g }); var i = n(85556), o = n(24782), r = n(2260), a = n(1736), s = n(8568), l = n(14206), c = n.n(l), m = n(23282), d = n(88991), h = n(21298); function u(e) { try { if (!e || "string" != typeof e) return null; const t = e.split("."); if (3 !== t.length) return null; const [n, i] = t, o = (0, h.nh)(n), r = (0, h.nh)(i); return o && r ? { header: JSON.parse(o), body: JSON.parse(r) } : null; } catch (e) { return console.error(`Exception while attempting to decode token: "${e}"`), null; } } function p(e) { return e ? e.body.exp : 0; } var _ = n(99115); class g { constructor(e, t, n = !1, i) { (this.m_webApiAccessToken = ""), (this.m_bJsonMode = !1), (this.m_strSpoofedSteamID = ""), (this.m_bJWTToken = !1), (this.m_dtLastExpireCheck = 0), (this.m_strWebAPIBaseURL = e), (this.m_webApiAccessToken = t), (this.m_bJsonMode = n), (this.m_fnRequestNewAccessToken = i), (this.m_bJWTToken = null != u(t)), (this.m_ServiceTransport = { SendMsg: this.SendMsgAndAwaitResponse.bind(this, { bSendAuth: !0 }), SendNotification: this.SendNotification.bind(this, { bSendAuth: !0 }), MakeReady: this.MakeReady.bind(this) }), (this.m_AnonymousServiceTransport = { SendMsg: this.SendMsgAndAwaitResponse.bind(this, { bSendAuth: !1 }), SendNotification: this.SendNotification.bind(this, { bSendAuth: !1 }), MakeReady: this.MakeReady.bind(this) }); const o = (0, _.bG)("steamLoginSpoofSteamID"); o && /[0-9]+/g.test(o) && (this.m_strSpoofedSteamID = o); } WaitUntilLoggedOn() { return Promise.resolve(); } GetServerRTime32() { return Number(new Date()); } get steamid() { return new d.K(); } RTime32ToDate(e) { return new Date(1e3 * e); } MakeReady() { return Promise.resolve({ result: 1, message: "ready" }); } GetServiceTransport() { return this.m_ServiceTransport; } GetWebAPIAccessToken() { return this.m_webApiAccessToken; } GetAnonymousServiceTransport() { return this.m_AnonymousServiceTransport; } SendMsgAndAwaitResponse(e, t, n, o, s) { var l; return (0, i.mG)(this, void 0, void 0, function* () { let i = null; try { if (this.m_bJWTToken && e.bSendAuth) { const e = Date.now() / 1e3; if (this.m_refreshAccessTokenPromise) yield this.m_refreshAccessTokenPromise; else if (this.m_fnRequestNewAccessToken && e - this.m_dtLastExpireCheck > 60) { this.m_dtLastExpireCheck = e; const t = u(this.m_webApiAccessToken); t && (function (e) { const t = p(e), n = (function (e) { return e ? e.body.nbf || e.body.iat : 0; })(e); let i = 900; const o = t - n; return o < 1350 && (i = o <= 60 ? 0 : 60), p(e) - i < Date.now() / 1e3; })(t) && ((this.m_refreshAccessTokenPromise = this.m_fnRequestNewAccessToken()), (this.m_webApiAccessToken = yield this.m_refreshAccessTokenPromise), (this.m_refreshAccessTokenPromise = void 0)); } } let l = yield this.Send(e, t, n, s); if (200 != l.status || !l.data) throw new Error("Request Error"); if (((i = a.gA.Init(o, 147)), l.headers && (l.headers["x-eresult"] && i.Hdr().set_eresult(parseInt(l.headers["x-eresult"])), l.headers["x-error_message"] && i.Hdr().set_error_message(l.headers["x-error_message"])), this.m_bJsonMode)) i.SetBodyJSON(l.data.response); else { let e = new m.At(l.data), t = new r.BinaryReader(e.GetPacket(), e.TellGet(), e.GetCountBytesRemaining()); o.deserializeBinaryFromReader(i.Body(), t); } 0; } catch (t) { const n = t && "object" == typeof t && "response" in t && 401 === (null === (l = null == t ? void 0 : t.response) || void 0 === l ? void 0 : l.status), r = n ? "Unauthorized" : null; (i = this.CreateFailedMsgProtobuf(o, 3, r)), n && !this.m_refreshAccessTokenPromise && this.m_bJWTToken && e.bSendAuth && this.m_fnRequestNewAccessToken && ((this.m_refreshAccessTokenPromise = this.m_fnRequestNewAccessToken()), (this.m_webApiAccessToken = yield this.m_refreshAccessTokenPromise), (this.m_refreshAccessTokenPromise = void 0)); } return i; }); } SendNotification(e, t, n, i) { return this.Send(e, t, n, i), !0; } Send(e, t, n, i) { let r = this.CreateWebAPIURL(t); if (!r) throw "Couldn't find service name " + t; let a = n.SerializeBody(), s = o.JQ(a); const l = null == i ? void 0 : i.eWebAPIKeyRequirement; let m = 0 == (null == i ? void 0 : i.ePrivilege) && 1 == l, d = { responseType: this.m_bJsonMode ? "json" : "arraybuffer", params: {}, headers: (null == i ? void 0 : i.bConstMethod) ? {} : { "Content-Type": "multipart/form-data" } }; if ((e.bSendAuth || 1 == l || console.error(`Attempting to invoke service ${t} without auth, but auth is required.`), this.m_webApiAccessToken && e.bSendAuth && !m && ((d.params.access_token = this.m_webApiAccessToken), (d.params.spoof_steamid = this.m_strSpoofedSteamID)), null == i ? void 0 : i.bConstMethod)) return (d.params.origin = self.origin), this.m_bJsonMode ? (d.params.input_json = JSON.stringify(n.Body().toObject())) : (d.params.input_protobuf_encoded = s), c().get(r, d); { const e = new FormData(); return this.m_bJsonMode ? e.append("input_json", JSON.stringify(n.Body().toObject())) : e.append("input_protobuf_encoded", s), c().post(r, e, d); } } CreateWebAPIURL(e) { let t = e.match(/([^\.]+)\.(.+)#(\d+)/); return t && 4 == t.length ? `${this.m_strWebAPIBaseURL}I${t[1]}Service/${t[2]}/v${t[3]}` : null; } CreateFailedMsgProtobuf(e, t, n) { let i = a.gA.Init(e); return i.Hdr().set_eresult(2), i.Hdr().set_transport_error(t), n && i.Hdr().set_error_message(n), i; } } (0, i.gn)([s.a], g.prototype, "SendMsgAndAwaitResponse", null), (0, i.gn)([s.a], g.prototype, "SendNotification", null), (0, i.gn)([s.a], g.prototype, "Send", null); }, 97669: (e, t, n) => { "use strict"; n.d(t, { Am: () => c, kI: () => a, x3: () => l }); var i = n(10553), o = n(22103), r = n(93635); const a = 0, s = "061818254b2c99ac49e6626adb128ed1282a392f", l = 120; class c { constructor(e) { (this.m_bInitialized = !1), (this.m_unAppID = e); } get appid() { return this.m_unAppID; } get is_initialized() { return this.m_bInitialized; } get is_valid() { return this.m_bInitialized && !!this.m_strName; } get name() { return this.m_strName; } get header_image_url() { return i.De.MEDIA_CDN_URL + `steam/apps/${this.m_unAppID}/header.jpg`; } get icon_url_no_default() { return this.m_strIconURL && this.BuildAppURL(this.m_strIconURL, s); } get icon_url() { return this.BuildAppURL(this.m_strIconURL, s); } get logo_url() { return i.De.MEDIA_CDN_URL + `steam/apps/${this.m_unAppID}/capsule_231x87.jpg`; } get time_updated_from_server() { return this.m_dtUpdatedFromServer; } get apptype() { return this.m_eAppType; } BIsApplicationOrTool() { return 4 == this.apptype || 2 == this.apptype; } BuildAppURL(e, t) { return e ? i.De.MEDIA_CDN_COMMUNITY_URL + "images/apps/" + this.appid + "/" + e + ".jpg" : (0, o.U)(t); } DeserializeFromMessage(e) { (this.m_bInitialized = !0), (this.m_strName = e.name()), (this.m_strIconURL = e.icon()), (this.m_dtUpdatedFromServer = new Date()), (this.m_eAppType = e.app_type()); } DeserializeFromAppOverview(e) { e.icon_hash() && 1073741824 != e.app_type() ? ((this.m_bInitialized = !0), (this.m_strName = e.display_name()), (this.m_strIconURL = e.icon_hash()), (this.m_dtUpdatedFromServer = new Date()), (this.m_eAppType = e.app_type())) : (this.m_bInitialized = !1); } DeserializeFromCacheObject(e) { try { (this.m_strName = e.strName), (this.m_strIconURL = e.strIconURL), (this.m_dtUpdatedFromServer = new Date(e.strUpdatedFromServer)), (this.m_eAppType = e.eAppType), (this.m_bInitialized = !0); } catch (e) {} } SerializeToCacheObject() { return (0, r.X)(this.m_bInitialized, "Attempting to serialize an uninitialized AppInfo object for caching!"), this.m_bInitialized ? { strName: this.m_strName, strIconURL: this.m_strIconURL, strUpdatedFromServer: this.m_dtUpdatedFromServer.toJSON(), eAppType: this.m_eAppType } : null; } } }, 50913: (e, t, n) => { "use strict"; n.d(t, { Q8: () => C }); var i = n(85556), o = n(79588), r = n(78654), a = n(1736), s = n(97669), l = n(10553); class c { constructor(e) { (this.m_nLastUpdated = 0), (this.m_mapLanguages = o.LO.map()), (this.m_fetching = null), (this.m_appid = e); } GetAppID() { return this.m_appid; } GetTokenList(e) { return this.m_mapLanguages.has(e) ? this.m_mapLanguages.get(e) : null; } Localize(e, t) { let n = l.De.LANGUAGE; return m(e, this.GetTokenList(n), "english" != n ? this.GetTokenList("english") : null, this.m_appid, t); } SubstituteParams(e, t) { let n = l.De.LANGUAGE; return d(e, this.GetTokenList(n), "english" != n ? this.GetTokenList("english") : null, this.m_appid, t); } } function m(e, t, n, i, o) { if (!e.startsWith("#")) return console.log("Token doesn't start with #:", e, "appid", i, "tokens", t), ""; let r = e; e = e.toLowerCase(); let a = ""; if ((t && t.has(e) && (a = t.get(e)), !a && n && n.has(e) && (a = n.get(e)), a)) a = d(a, t, n, i, o); else if (((t || n) && console.log("No loc found for appid", i, r, "Tokens:", t, "Fallback:", n), t && 1 != l.De.EUNIVERSE)) return e; return a; } function d(e, t, n, i, o) { let r = e.match(/{[A-za-z0-9_%#:]+}/g); if (r) for (let a of r) { let r = m(h(a.slice(1, -1), o), t, n, i, o); if (!r) return ""; e = e.replace(a, r); } return (e = h(e, o)); } function h(e, t) { let n = e.match(/%[A-Za-z0-9_:]+%/g); if (n) for (let i of n) { let n = i.slice(1, -1).toLowerCase(), o = t.get(n); null == o ? console.log("No rich presence found for", n) : (e = e.replace(i, o)); } return e; } var u = n(57869), p = n(93635), _ = n(22394); class g { constructor() { (this.m_mapAppInfo = o.LO.map()), (this.m_mapRichPresenceLoc = o.LO.map()), (this.m_cAppInfoRequestsInFlight = 0), (this.m_setPendingAppInfo = new Set()), (this.m_CacheStorage = null), (this.m_fnCallbackOnAppInfoLoaded = new _.pB()), (0, o.rC)(this); } Init(e) { this.m_CMInterface = e; } BHavePendingAppInfoRequests() { return this.m_setPendingAppInfo.size > 0 || this.m_cAppInfoRequestsInFlight > 0; } get CMInterface() { return this.m_CMInterface; } RegisterCallbackOnLoad(e) { if (!this.BHavePendingAppInfoRequests()) return (0, p.X)(!1, "Registering for callback on appinfo load, but nothing queued"), void e(); this.m_fnCallbackOnAppInfoLoaded.Register(e); } IsLoadingAppID(e) { return this.m_setPendingAppInfo.has(e); } GetAppInfo(e) { if (((0, p.X)(this.m_CMInterface, "CAppInfoStore.GetAppInfo called before Init"), !this.m_mapAppInfo.has(e))) { let t = new s.Am(e); this.m_mapAppInfo.set(e, t), this.QueueAppInfoRequest(e); } return this.m_mapAppInfo.get(e); } QueueAppInfoRequest(e) { return e ? (this.m_setPendingAppInfo.size || ((this.m_PendingAppInfoPromise = new Promise((e) => (this.m_PendingAppInfoResolve = e))), window.setTimeout(() => this.FlushPendingAppInfo(), 25)), this.m_setPendingAppInfo.add(e), this.m_PendingAppInfoPromise) : Promise.resolve(); } FlushPendingAppInfo() { return (0, i.mG)(this, void 0, void 0, function* () { const e = this.m_PendingAppInfoResolve, t = Array.from(this.m_setPendingAppInfo); (this.m_PendingAppInfoPromise = void 0), (this.m_PendingAppInfoResolve = void 0), this.m_setPendingAppInfo.clear(), yield this.LoadAppInfoBatch(t), null == e || e(); }); } LoadAppInfoBatch(e) { var t; return (0, i.mG)(this, void 0, void 0, function* () { this.m_cAppInfoRequestsInFlight++; let n = yield this.LoadAppInfoBatchFromLocalCache(e); if (n.length) { console.log("Loading batch of App Info from Steam: ", n), yield null === (t = this.m_CMInterface) || void 0 === t ? void 0 : t.WaitUntilLoggedOn(); let e = a.gA.Init(u.Fi); e.Body().set_language((0, r.jM)(l.De.LANGUAGE)); const i = 50; for (; n.length > 0; ) { const t = Math.min(i, n.length), o = n.slice(0, t); (n = n.slice(t)), e.Body().set_appids(o); const r = yield u.AE.GetApps(this.m_CMInterface.GetServiceTransport(), e); 1 == r.GetEResult() ? this.OnGetAppsResponse(r) : console.error(`Error when calling CommunityService.GetApps: EResult=${r.GetEResult()}, AppIDs:`, o); } } 0 == --this.m_cAppInfoRequestsInFlight && 0 == this.m_setPendingAppInfo.size && (this.m_fnCallbackOnAppInfoLoaded.Dispatch(), this.m_fnCallbackOnAppInfoLoaded.ClearAllCallbacks()); }); } OnGetAppsResponse(e) { let t = []; for (let n of e.Body().apps()) { let e = this.m_mapAppInfo.get(n.appid()); (0, p.X)(e, `Got AppInfo response for unrequested AppID: ${n.appid()}`), e && ((e = new s.Am(n.appid())), e.DeserializeFromMessage(n), this.m_mapAppInfo.set(n.appid(), e), t.push(e)); } this.SaveAppInfoBatchToLocalCache(t); } OnAppOverviewChange(e) { for (let t of e) { const e = new s.Am(t.appid()); e.DeserializeFromAppOverview(t), e.is_initialized && this.m_mapAppInfo.set(t.appid(), e); } } EnsureAppInfoForAppIDs(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = !1; return ( e.forEach((e) => { let n = this.m_mapAppInfo.get(e); n ? n.is_valid || (t = !0) : ((n = new s.Am(e)), this.m_mapAppInfo.set(e, n), this.QueueAppInfoRequest(e), (t = !0)); }), t && void 0 !== this.m_PendingAppInfoPromise ? this.m_PendingAppInfoPromise : Promise.resolve() ); }); } SetCacheStorage(e) { this.m_CacheStorage = e; } GetCacheKeyForAppID(e) { return "APPINFO_" + e; } LoadAppInfoBatchFromLocalCache(e) { return (0, i.mG)(this, void 0, void 0, function* () { if (!this.m_CacheStorage) return e; console.log("Loading batch of App Info from Local Cache: ", e); const t = new Date(new Date().getTime() - 12096e5), n = (e) => (0, i.mG)(this, void 0, void 0, function* () { var n; const i = yield null === (n = this.m_CacheStorage) || void 0 === n ? void 0 : n.GetObject(this.GetCacheKeyForAppID(e)); if (!i) return e; let o = this.m_mapAppInfo.get(e); return (0, p.X)(o, "Didn't find AppInfo in our map when loading from cache but it should've been there?"), o ? ((o = new s.Am(e)), o.DeserializeFromCacheObject(i), o.is_initialized ? (this.m_mapAppInfo.set(e, o), o.time_updated_from_server < t ? e : null) : (console.warn("Failed to deserialize cached App Info: ", e, i), e)) : e; }); let o = e.map((e) => n(e)); return (yield Promise.all(o)).filter((e) => null !== e); }); } SaveAppInfoBatchToLocalCache(e) { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_CacheStorage) { console.log( "Saving batch of App Info to Local Cache: ", e.map((e) => e.appid), ); for (const t of e) { const e = t.SerializeToCacheObject(); e && this.m_CacheStorage.StoreObject(this.GetCacheKeyForAppID(t.appid), e); } } }); } Localize(e, t, n) { const i = this.GetRichPresenceLoc(e); return i ? i.Localize(t, n) : 1 != l.De.EUNIVERSE ? (console.log(`Unable to find app localization information for app ${e} token ${t}, this may not have had a chance to load yet`), t) : ""; } GetRichPresenceLoc(e) { if (this.m_mapRichPresenceLoc.has(e.toString())) { let t = this.m_mapRichPresenceLoc.get(e.toString()); return t.m_nLastUpdated + 6e4 * s.x3 < Date.now() && this.QueueRichPresenceLocRequest(t), t; } let t = new c(e); return this.m_mapRichPresenceLoc.set(e.toString(), t), this.QueueRichPresenceLocRequest(t), t; } GetRichPresenceLocAsync(e) { let t = this.GetRichPresenceLoc(e); return t.m_nLastUpdated ? Promise.resolve(t) : t.m_fetching; } OnRichPresenceLocUpdate(e, t) { e.m_nLastUpdated = Date.now(); for (let n of t) { let t = n.language(), i = e.m_mapLanguages.get(t); i ? i.clear() : (e.m_mapLanguages.set(t, new Map()), (i = e.m_mapLanguages.get(t))); for (let e of n.tokens()) null == i || i.set(e.name().toLowerCase(), e.value()); } } QueueRichPresenceLocRequest(e) { return ( e.m_fetching || ((e.m_fetching = this.m_CMInterface .WaitUntilLoggedOn() .then(() => { let t = a.gA.Init(u.tj); return t.Body().set_appid(e.GetAppID()), t.Body().set_language(l.De.LANGUAGE), u.AE.GetAppRichPresenceLocalization(this.m_CMInterface.GetServiceTransport(), t); }) .then((t) => ((e.m_fetching = null), 1 != t.GetEResult() ? Promise.reject() : (this.OnRichPresenceLocUpdate(e, t.Body().token_lists()), Promise.resolve(e))))), e.m_fetching.catch(() => { e.m_fetching = null; })), e.m_fetching ); } } (0, i.gn)([o.aD], g.prototype, "OnGetAppsResponse", null), (0, i.gn)([o.aD], g.prototype, "OnRichPresenceLocUpdate", null); const C = new g(); }, 73085: (e, t, n) => { "use strict"; n.d(t, { _: () => c, d: () => m }); var i = n(85556), o = n(69903), r = n(1736), a = n(27378), s = n(22394), l = n(2049); class c { constructor(e) { (this.m_CookiePreferencesChangedCallbacks = new s.pB()), (this.m_cm = e); } GetCookiePreferences() { return this.EnsureLoaded(), this.m_CookiePreferences; } get PreferencesChangedCallbacks() { return this.m_CookiePreferencesChangedCallbacks; } CheckThirdPartyCookiePreference(e, t) { var n, i, o; switch (e.preference_state) { case 0: case 1: return !0; case 2: return !1; default: switch (t) { case "youtube": return null === (n = e.third_party_content) || void 0 === n ? void 0 : n.youtube; case "vimeo": return null === (i = e.third_party_content) || void 0 === i ? void 0 : i.vimeo; case "sketchfab": return null === (o = e.third_party_content) || void 0 === o ? void 0 : o.sketchfab; case "generic": return !1; } } } LoadCookiePreferences() { return (0, i.mG)(this, void 0, void 0, function* () { const e = r.gA.Init(o.nS); try { let t = yield o.Lj.GetCookiePreferences(this.m_cm.GetServiceTransport(), e); 1 == t.GetEResult() && (this.m_CookiePreferences = t.Body().preferences().toObject()); } catch (e) {} return (this.m_CookiePreferences && this.m_CookiePreferences.version) || (this.m_CookiePreferences = { version: 1, preference_state: 0 }), this.m_CookiePreferencesChangedCallbacks.Dispatch(this.m_CookiePreferences), this.m_CookiePreferences; }); } EnsureLoaded() { this.m_PromiseLoading || (this.m_PromiseLoading = this.LoadCookiePreferences()); } } function m(e) { let [t, n] = a.useState(e.GetCookiePreferences()); return (0, l.Qg)(e.PreferencesChangedCallbacks, n), t; } }, 58046: (e, t, n) => { "use strict"; n.d(t, { a: () => c }); var i = n(85556), o = n(27378), r = n(50649), a = n(87018), s = n(75377), l = n.n(s); let c = class extends o.Component { static get hoverClass() { return l().hoverParent; } render() { const e = this.props, { persona: t, animating: n, className: r, size: s, dim: c } = e, m = (0, i._T)(e, ["persona", "animating", "className", "size", "dim"]); let d = ""; return "medium" == s ? (d = l().Medium) : "large" == s && (d = l().Large), o.createElement("div", Object.assign({ className: (0, a.Z)(l().SnoozeContainer, t.online_state, r, n && l().animating, d, c && l().Dim) }, m), o.createElement("div", { "data-text": "Z", className: (0, a.Z)(l().SnoozeZ, l().Z1) }, "Z"), o.createElement("div", { "data-text": "Z", className: (0, a.Z)(l().SnoozeZ, l().Z2) }, "Z"), o.createElement("div", { "data-text": "Z", className: (0, a.Z)(l().SnoozeZ, l().Z3) }, "Z")); } }; c = (0, i.gn)([r.Pi], c); }, 91300: (e, t, n) => { "use strict"; n.d(t, { NA: () => r, S7: () => i, Yt: () => a }); var i, o = n(93635); !(function (e) { (e[(e.k_ENoiseGateLevel_Off = 0)] = "k_ENoiseGateLevel_Off"), (e[(e.k_ENoiseGateLevel_Low = 1)] = "k_ENoiseGateLevel_Low"), (e[(e.k_ENoiseGateLevel_Medium = 2)] = "k_ENoiseGateLevel_Medium"), (e[(e.k_ENoiseGateLevel_High = 3)] = "k_ENoiseGateLevel_High"); })(i || (i = {})); const r = 5; function a(e, t) { { try { if (window.parent != window) { const t = window.parent; if (t.__SHARED_FRIENDSUI_GLOBALS && t.__SHARED_FRIENDSUI_GLOBALS[e]) return t.__SHARED_FRIENDSUI_GLOBALS[e]; (0, o.X)(!1, `SharedFriendsUIGlobal "${e}" not initialized by parent, proceeding with local copy`); } } catch (e) {} const n = window; return n.__SHARED_FRIENDSUI_GLOBALS || (n.__SHARED_FRIENDSUI_GLOBALS = {}), (0, o.X)(!n.__SHARED_FRIENDSUI_GLOBALS[e], `Unexpected second call to SharedFriendsUIGlobal for "${e}"`), n.__SHARED_FRIENDSUI_GLOBALS[e] || (n.__SHARED_FRIENDSUI_GLOBALS[e] = t()), n.__SHARED_FRIENDSUI_GLOBALS[e]; } } }, 28413: (e, t, n) => { "use strict"; n.d(t, { T: () => d }); var i = n(85556), o = n(50649), r = n(27378), a = n(22394), s = n(87018), l = n(2049), c = n(61805), m = n.n(c); let d = class extends r.Component { constructor() { super(...arguments), (this.m_listeners = new a.G_()), (this.m_bNoSpace = !1), (this.state = { x: void 0, y: void 0, hoverPositionReady: !1 }); } bindHover(e) { (this.m_elHover = e || void 0), this.positionHover(); } componentDidMount() { this.m_listeners.AddEventListener(window, "blur", this.OnWindowBlur); } componentDidUpdate() { this.positionHover(); } componentWillUnmount() { this.m_listeners.Unregister(); } OnWindowBlur(e) { this.props.onWindowBlur && this.props.onWindowBlur(e); } render() { const e = this.props, { target: t, visibilityObserver: n, className: o, style: a, bEnablePointerEvents: l, direction: c, nBodyAlignment: d, nBodyDistance: h, nAllowOffscreenPx: u, nMaxLateralMoveOnScreen: p, children: _, onNoSpace: g, onWindowBlur: C, bTopmost: f } = e, v = (0, i._T)(e, ["target", "visibilityObserver", "className", "style", "bEnablePointerEvents", "direction", "nBodyAlignment", "nBodyDistance", "nAllowOffscreenPx", "nMaxLateralMoveOnScreen", "children", "onNoSpace", "onWindowBlur", "bTopmost"]); let S = Object.assign({ left: this.state.x, top: this.state.y }, a), b = !n || n.visible; return r.createElement("div", { className: (0, s.Z)(m().HoverPositionOuter, f && m().HoverAboveModal) }, r.createElement("div", Object.assign({}, v, { className: (0, s.Z)(m().HoverPosition, b && this.state.hoverPositionReady && m().Ready, this.m_bNoSpace && m().NoSpace, l && m().EnablePointerEvents, o), style: S, ref: this.bindHover }), _)); } positionHover() { var e, t, n; let i = this.m_elHover, o = this.props.target; if (!i || !o) return; if (this.state.hoverPositionReady && this.props.visibilityObserver && !this.props.visibilityObserver.visible) return; let r = o.ownerDocument.defaultView; if (!r || r.closed) return; const a = i.querySelector(".hover_arrow.left"), s = i.querySelector(".hover_arrow.right"), l = i.querySelector(".hover_arrow.top"), c = i.querySelector(".hover_arrow.bottom"), m = o.getBoundingClientRect(), d = i.getBoundingClientRect(), u = "overlay" == this.props.direction || "overlay-center" == this.props.direction; a && a.setAttribute("style", "display: none;"), s && s.setAttribute("style", "display: none;"), l && l.setAttribute("style", "display: none;"), c && c.setAttribute("style", "display: none;"); let { nBodyDistance: p = 8, direction: _ = "right", nBodyAlignment: g = 0.5 } = this.props, { nLeft: C, nTop: f, nOverflow: v, nLateralOverflow: S } = h(_, g, p, m, d, r.innerWidth, r.innerHeight); if (v > (null !== (e = this.props.nAllowOffscreenPx) && void 0 !== e ? e : 10) && !u) { const e = (function (e) { switch (e) { case "right": return "left"; case "left": return "right"; case "bottom": return "top"; case "top": return "bottom"; case "overlay": return "overlay"; case "overlay-center": return "overlay-center"; } })(null !== (t = this.props.direction) && void 0 !== t ? t : "right"), { nLeft: o, nTop: a, nOverflow: s, nLateralOverflow: l } = h(e, g, p, m, d, r.innerWidth, r.innerHeight); if ((s < v && ((_ = e), (C = o), (f = a), (v = s), (S = l)), v > (null !== (n = this.props.nAllowOffscreenPx) && void 0 !== n ? n : 10))) return console.log("Not showing hover because it didn't fit in the main or alt direction"), i.setAttribute("style", "display: none;"), (this.m_bNoSpace = !0), void (this.props.onNoSpace && this.props.onNoSpace()); } 0 === this.props.nMaxLateralMoveOnScreen || u || ([f, C] = (function (e, t, n, i, o) { let r = Math.max(t[0], t[1]); void 0 !== e && (r = Math.min(e, r)); r = Math.max(0, r); const a = t[0] > t[1] ? r : -r; "left" === n || "right" === n ? (i += a) : (o += a); return [i, o]; })(this.props.nMaxLateralMoveOnScreen, S, null != _ ? _ : "right", f, C)); let b = null; switch (_) { case "left": b = s; break; case "right": b = a; break; case "top": b = c; break; case "bottom": b = l; } b && b.setAttribute("style", ""), C != this.state.x && this.setState({ x: C }), f != this.state.y && this.setState({ y: f }), this.state.hoverPositionReady || this.setState({ hoverPositionReady: !0 }); } }; function h(e, t, n, i, o, r, a) { const s = r, l = a; let c, m, d, h; switch (e) { case "right": (c = i.right + n), (m = u(i.top, i.height, o.height, t)), (d = Math.max(0, c + o.width - s)), (h = [Math.max(0, 0 - m), Math.max(0, m + o.height - l)]); break; case "left": (c = i.left - n - o.width), (m = u(i.top, i.height, o.height, t)), (d = Math.max(0, 0 - c)), (h = [Math.max(0, 0 - m), Math.max(0, m + o.height - l)]); break; case "bottom": (c = u(i.left, i.width, o.width, t)), (m = i.bottom + n), (d = Math.max(0, m + o.height - l)), (h = [Math.max(0, 0 - c), Math.max(0, c + o.width - s)]); break; case "top": (c = u(i.left, i.width, o.width, t)), (m = i.top - n - o.height), (d = Math.max(0, 0 - m)), (h = [Math.max(0, 0 - c), Math.max(0, c + o.width - s)]); break; case "overlay": (c = i.left), (m = i.top), (d = 0), (h = [0, 0]); break; case "overlay-center": (c = i.left + 0.5 * i.width - 0.5 * o.width), (m = i.top + 0.5 * i.height - 0.5 * o.height), (d = 0), (h = [0, 0]); } return { nLeft: c, nTop: m, nOverflow: d, nLateralOverflow: h }; } function u(e, t, n, i) { return Math.max(0, Math.min(1, i)) * (t - n) + e; } (d.defaultProps = { direction: "right", nBodyAlignment: 0.5, nAllowOffscreenPx: 10, nBodyDistance: 8, nMaxLateralMoveOnScreen: void 0 }), (0, i.gn)([l.ak], d.prototype, "bindHover", null), (0, i.gn)([l.ak], d.prototype, "OnWindowBlur", null), (d = (0, i.gn)([o.Pi], d)); }, 77947: (e, t, n) => { "use strict"; n.d(t, { J: () => r }); var i = n(10553), o = n(78654); function r() { return i.De.IN_CLIENT && (0, o.px)(i.De.LAUNCHER_TYPE); } }, 5997: (e, t, n) => { "use strict"; n.d(t, { A: () => r, d: () => o }); var i = n(57117); function o(e) { return i.De.COMMUNITY_BASE_URL + "linkfilter/?u=" + encodeURIComponent(e); } function r(e, t) { if (e.startsWith("steam://")) return !1; if (e.startsWith("/")) return !1; const n = a(e).toLowerCase(), o = a(i.De.COMMUNITY_BASE_URL).toLowerCase(), r = a(i.De.STORE_BASE_URL).toLowerCase(), s = a(i.De.HELP_BASE_URL).toLowerCase(), l = a(i.De.PARTNER_BASE_URL || "").toLowerCase(); return n !== o && n !== r && n !== s && "support.steampowered.com" !== n && n !== l && "www.dota2.com" !== n && (!t || 0 == t.filter((e) => n == e).length); } function a(e) { let t = new RegExp("^(steam://openurl(_external)?/)?((f|ht)tps?://)?([^@/?#]*@)?([^/#?]+)", "im"), n = e.match(t); return n && n.length > 5 ? n[6].toString() : e; } }, 38060: (e, t, n) => { "use strict"; n.d(t, { s: () => m }); var i = n(85556), o = n(14206), r = n.n(o), a = n(79588), s = n(5395), l = n(10553); const c = s._H.PerMinute; class m { constructor(e) { (this.m_bLoadingData = !1), (this.m_rtLastLoad = 0), (this.m_communityData = void 0), (0, a.rC)(this), (this.m_accountid = e); } get community_data() { return this.m_communityData; } get community_data_ready() { return void 0 !== this.m_communityData; } get player_level() { return this.m_communityData && this.m_communityData.level; } get player_level_class() { return this.m_communityData && this.m_communityData.level_class; } get player_badge() { return this.m_communityData && this.m_communityData.favorite_badge; } get profile_background() { return this.m_communityData && this.m_communityData.profile_background; } Reload() { (this.m_rtLastLoad = 0), this.EnsureCommunityDataLoaded(); } EnsureCommunityDataLoaded() { const e = this.m_communityData || this.m_bLoadingData, t = Date.now() > this.m_rtLastLoad + 1e3 * c; (!e || (t && !this.m_bLoadingData)) && ((this.m_bLoadingData = !0), r() .get(l.De.CHAT_BASE_URL + "miniprofile/" + this.m_accountid + "/json/?origin=" + (0, l.Kc)()) .then((e) => { let t = e.data; "number" == typeof t.level && "string" == typeof t.level_class && (this.m_communityData = t), (this.m_bLoadingData = !1), (this.m_rtLastLoad = Date.now()); }) .catch((e) => { this.m_bLoadingData = !1; })); } } (0, i.gn)([a.LO], m.prototype, "m_communityData", void 0); }, 70215: (e, t, n) => { "use strict"; n.d(t, { Pv: () => d, U0: () => c.U, WV: () => c.W, sB: () => m }); var i = n(85556), o = n(79588), r = n(98315), a = n(50913), s = n(84290), l = n(10553), c = n(22103); function m(e) { let t = "offline"; return e && (e.is_ingame ? (t = "ingame") : e.m_broadcastAccountId ? (t = "watchingbroadcast") : e.is_online && (t = "online"), e.is_awayOrSnooze && (t += " awayOrSnooze")), t; } class d { constructor(e) { (this.m_bInitialized = !1), (this.m_ePersonaState = 0), (this.m_unGamePlayedAppID = 0), (this.m_gameid = "0"), (this.m_unPersonaStateFlags = 0), (this.m_strPlayerName = ""), (this.m_strAvatarHash = c.W), (this.m_strAccountName = ""), (this.m_rtLastSeenOnline = 0), (this.m_strGameExtraInfo = ""), (this.m_unGameServerIP = 0), (this.m_unGameServerPort = 0), (this.m_game_lobby_id = ""), (this.m_bPlayerNamePending = !1), (this.m_bAvatarPending = !1), (this.m_broadcastId = void 0), (this.m_broadcastAccountId = void 0), (this.m_broadcastAppId = void 0), (this.m_broadcastViewerCount = void 0), (this.m_strBroadcastTitle = void 0), (this.m_bCommunityBanned = void 0), (this.m_mapRichPresence = o.LO.map()), (this.m_bNameInitialized = !1), (this.m_bStatusInitialized = !1), (this.m_strProfileURL = void 0), (0, o.rC)(this), (this.m_steamid = e); } Reset() { (this.m_ePersonaState = 0), (this.m_unGamePlayedAppID = 0), (this.m_gameid = "0"), (this.m_strGameExtraInfo = ""), (this.m_unGameServerIP = 0), (this.m_unGameServerPort = 0), (this.m_game_lobby_id = ""), this.m_mapRichPresence.clear(), (this.m_broadcastId = void 0), (this.m_broadcastAccountId = void 0), (this.m_broadcastAppId = void 0), (this.m_broadcastViewerCount = void 0), (this.m_strBroadcastTitle = void 0); } GetAccountID() { return this.m_steamid.GetAccountID(); } get is_online() { return 0 != this.m_ePersonaState && 7 != this.m_ePersonaState; } get is_ingame() { return this.is_online && (0 != this.m_unGamePlayedAppID || "0" != this.m_gameid); } get is_watchingbroadcast() { return !!this.m_broadcastAccountId; } get is_in_nonsteam_game() { return 0 == this.m_unGamePlayedAppID && "0" != this.m_gameid; } get is_in_joinable_game() { return this.has_joinable_game_flag || this.is_in_valid_lobby || this.has_server_ip; } get has_joinable_game_flag() { var e; return 0 != (2 & (null !== (e = this.m_unPersonaStateFlags) && void 0 !== e ? e : 0)); } get connect_string() { return this.m_mapRichPresence.get("connect"); } get is_in_valid_lobby() { return null != this.m_game_lobby_id && "0" != this.m_game_lobby_id; } get has_server_ip() { return 0 != this.m_unGameServerIP; } get is_awayOrSnooze() { return 3 == this.m_ePersonaState || 4 == this.m_ePersonaState; } HasStateFlag(e) { var t; return 0 != ((null !== (t = this.m_unPersonaStateFlags) && void 0 !== t ? t : 0) & e); } get last_seen_online() { return this.m_rtLastSeenOnline; } ClearStateOnDisconnect() { 0 != this.m_ePersonaState && this.Reset(); } get is_golden() { return this.HasStateFlag(4); } GetCurrentGameName() { return this.m_strGameExtraInfo ? this.m_strGameExtraInfo : this.m_unGamePlayedAppID ? a.Q8.GetAppInfo(this.m_unGamePlayedAppID).name : ""; } GetCurrentGameIconURL() { return this.m_unGamePlayedAppID ? a.Q8.GetAppInfo(this.m_unGamePlayedAppID).icon_url : ""; } GetCurrentGameLogoURL() { return this.m_unGamePlayedAppID ? a.Q8.GetAppInfo(this.m_unGamePlayedAppID).logo_url : ""; } GetBroadcastGameLogoURL() { return this.m_broadcastAppId ? a.Q8.GetAppInfo(this.m_broadcastAppId).logo_url : ""; } BIsAppInfoReady() { return !this.m_unGamePlayedAppID || a.Q8.GetAppInfo(this.m_unGamePlayedAppID).is_initialized; } HasCurrentGameRichPresence() { return this.m_mapRichPresence.has("steam_display"); } HasRichPresenceForViewGameInfo() { return !!(this.m_mapRichPresence.has("status") || this.m_mapRichPresence.has("connect") || this.m_mapRichPresence.has("connect_private")); } GetCurrentGameRichPresence() { if (this.HasCurrentGameRichPresence()) { let e = a.Q8.GetRichPresenceLoc(this.m_unGamePlayedAppID); if (e) { let t = this.m_mapRichPresence.get("steam_display"); return e.Localize(t, this.m_mapRichPresence); } } else if (this.HasStateFlag(8)) return (0, s.Xx)("#PersonaStateRemotePlayTogether"); return ""; } GetOfflineStatusUpdateRate() { if (0 == this.last_seen_online) return 3e4; const e = 3600; let t = 1e3; const n = a.Q8.CMInterface.GetServerRTime32() - this.last_seen_online; return (t *= n > 86400 ? e : n > 7200 ? 60 : 15), t; } GetOfflineStatusTime() { if (0 == this.last_seen_online) return (0, s.Xx)("#PersonaStateOffline"); let e = this.GetOfflineStatusUpdateRate(); (!l.De.IN_MOBILE || e <= 60) && (0, r.zO)(e); let t = a.Q8.CMInterface.GetServerRTime32() - this.last_seen_online; return t < 60 ? (0, s.Xx)("#PersonaStateLastSeen_JustNow") : (0, s.Xx)("#PersonaStateLastSeen", (0, s.yW)(t)); } GetLocalizedOnlineStatus() { switch (this.m_ePersonaState) { case 0: case 7: return this.GetOfflineStatusTime(); case 1: return (0, s.Xx)("#PersonaStateOnline"); case 2: return (0, s.Xx)("#PersonaStateBusy"); case 3: return (0, s.Xx)("#PersonaStateAway"); case 4: return (0, s.Xx)("#PersonaStateSnooze"); case 5: return (0, s.Xx)("#PersonaStateLookingToTrade"); case 6: return (0, s.Xx)("#PersonaStateLookingToPlay"); default: return ""; } } get has_public_party_beacon() { return this.m_mapRichPresence.has("__beacon") && this.is_ingame; } get player_group() { return this.m_mapRichPresence.has("steam_player_group") ? this.m_mapRichPresence.get("steam_player_group") : ""; } get player_group_size() { return this.m_mapRichPresence.has("steam_player_group_size") ? Number.parseInt(this.m_mapRichPresence.get("steam_player_group_size")) : 0; } get online_state() { return this.is_online ? (this.is_ingame ? "in-game" : this.m_broadcastAccountId ? "watchingbroadcast" : "online") : "offline"; } BHasAvatarSet() { return this.m_strAvatarHash != c.W; } get avatar_url() { return (0, c.U)(this.m_strAvatarHash); } get avatar_url_medium() { return (0, c.U)(this.m_strAvatarHash, "medium"); } get avatar_url_full() { return (0, c.U)(this.m_strAvatarHash, "full"); } static SortStatusComparator(e, t, n) { if (t.has_public_party_beacon) { if (!n.has_public_party_beacon) return -1; } else { if (n.has_public_party_beacon) return 1; if (t.is_ingame) { if (!n.is_ingame) return -1; if (!e) return 0; if (t.is_awayOrSnooze) { if (!n.is_awayOrSnooze) return 1; } else if (n.is_awayOrSnooze) return -1; } else if (n.is_ingame) return 1; } if (t.is_online) { if (!n.is_online) return -1; } else if (n.is_online) return 1; if (e) if (t.is_awayOrSnooze) { if (!n.is_awayOrSnooze) return 1; } else if (n.is_awayOrSnooze) return -1; return 0; } GetCommunityProfileURL() { return this.m_strProfileURL ? `${l.De.COMMUNITY_BASE_URL}id/${this.m_strProfileURL}/` : `${l.De.COMMUNITY_BASE_URL}profiles/${this.m_steamid.ConvertTo64BitString()}/`; } } (0, i.gn)([o.LO], d.prototype, "m_bInitialized", void 0), (0, i.gn)([o.LO], d.prototype, "m_ePersonaState", void 0), (0, i.gn)([o.LO], d.prototype, "m_unGamePlayedAppID", void 0), (0, i.gn)([o.LO], d.prototype, "m_gameid", void 0), (0, i.gn)([o.LO], d.prototype, "m_unPersonaStateFlags", void 0), (0, i.gn)([o.LO], d.prototype, "m_strPlayerName", void 0), (0, i.gn)([o.LO], d.prototype, "m_strAvatarHash", void 0), (0, i.gn)([o.LO], d.prototype, "m_strAccountName", void 0), (0, i.gn)([o.LO], d.prototype, "m_rtLastSeenOnline", void 0), (0, i.gn)([o.LO], d.prototype, "m_strGameExtraInfo", void 0), (0, i.gn)([o.LO], d.prototype, "m_unGameServerIP", void 0), (0, i.gn)([o.LO], d.prototype, "m_unGameServerPort", void 0), (0, i.gn)([o.LO], d.prototype, "m_game_lobby_id", void 0), (0, i.gn)([o.LO], d.prototype, "m_bPlayerNamePending", void 0), (0, i.gn)([o.LO], d.prototype, "m_bAvatarPending", void 0), (0, i.gn)([o.LO], d.prototype, "m_broadcastId", void 0), (0, i.gn)([o.LO], d.prototype, "m_broadcastAccountId", void 0), (0, i.gn)([o.LO], d.prototype, "m_broadcastAppId", void 0), (0, i.gn)([o.LO], d.prototype, "m_broadcastViewerCount", void 0), (0, i.gn)([o.LO], d.prototype, "m_strBroadcastTitle", void 0), (0, i.gn)([o.LO], d.prototype, "m_bCommunityBanned", void 0); }, 3571: (e, t, n) => { "use strict"; n.d(t, { o: () => C }); var i = n(85556), o = n(27378), r = n(50649), a = n(84290), s = n(78654), l = n(70215), c = n(58046), m = n(66508), d = n(16518), h = n(87018), u = n(58557), p = n.n(u), _ = n(10553); function g(e) { return o.createElement(o.Fragment, null, o.createElement("span", { className: p().partyBeaconJoin }, (0, a.Xx)("#User_WantsToPlay")), " – ", e.persona.GetCurrentGameName()); } let C = class extends o.Component { render() { const e = this.props, { className: t, onContextMenu: n, persona: r, eFriendRelationship: u, bIsSelf: C, bParenthesizeNicknames: f, strNickname: v, bCompactView: S, bHideGameName: b, bHideEnhancedRichPresenceLabel: I, bHideSnooze: y, bHideStatus: E, renderStatus: D, renderRichPresence: w, bHidePersona: R, bDNDSet: A, bHasPartyBeacon: M, bHasGamePrivacy: k, bNoMask: T } = e, L = (0, i._T)(e, ["className", "onContextMenu", "persona", "eFriendRelationship", "bIsSelf", "bParenthesizeNicknames", "strNickname", "bCompactView", "bHideGameName", "bHideEnhancedRichPresenceLabel", "bHideSnooze", "bHideStatus", "renderStatus", "renderRichPresence", "bHidePersona", "bDNDSet", "bHasPartyBeacon", "bHasGamePrivacy", "bNoMask"]); let G = null, O = null, F = null, B = [t, p().personaNameAndStatusLabel, (0, l.sB)(r), S && p().compactView, T && p().NoMask]; M || r.has_public_party_beacon ? (O = o.createElement(g, { persona: r })) : (0, s.fk)(u) ? ((O = (0, a.Xx)("#PersonaStateBlocked")), B.push(p().blocked)) : r.is_ingame ? ((O = !r.is_in_nonsteam_game || C || (0, s.my)(u) ? r.GetCurrentGameName() : (0, a.Xx)("#PersonaStateInNonSteamGame")), C || R ? C && r.is_awayOrSnooze && (F = (0, a.Xx)("#PersonaStateAway")) : (F = r.GetCurrentGameRichPresence())) : r.m_broadcastAccountId && (O = (0, a.Xx)("#PersonaStateWatchingBroadcast")), O || (O = r.GetLocalizedOnlineStatus()), D && (O = D()); let x = !R && !y; !1 === y && (x = !0), r.is_awayOrSnooze && x && (G = o.createElement(c.a, { persona: r })); let N = null; n ? (N = o.createElement("div", { className: "ContextMenuButton", onClick: n }, o.createElement(d.$gZ, null))) : B.push(p().noContextMenu), R && B.push(p().hidePersona), w && (F = w()), (!b && F) || B.push(p().twoLine); const P = !r.is_ingame && !E, U = !I && F, V = O && (!b || !U), H = (0, s.hz)(_.De.LAUNCHER_TYPE); let W = v && !f, X = W ? v : r.m_strPlayerName, j = !R && (V || P) && U; return o.createElement( "div", Object.assign({}, L, { className: (0, h.Z)(...B), onContextMenu: n }), o.createElement("div", { className: (0, h.Z)(p().statusAndName, j && p().threeLines) }, o.createElement("div", { className: p().playerName }, X || " ", f && v && o.createElement("span", { className: p().playerNickname }, "(", v, ")")), A && o.createElement("div", { className: p().DNDContainer, title: (0, a.Xx)("#User_ToggleDoNotDisturb") }, o.createElement(d.YVR, null)), W && o.createElement("span", { className: p().playerNicknameBracket, title: (0, a.Xx)("#isNickname") }, " *"), o.createElement(m._, { persona: r }), G, (r.m_bPlayerNamePending || r.m_bAvatarPending) && H && o.createElement("div", { className: p().PendingPersona, title: (0, a.Xx)("#SteamChina_PendingPersonaName") }, o.createElement(d.SUY, null)), N), !R && o.createElement("div", { className: p().richPresenceContainer }, (V || P) && o.createElement("div", { className: (0, h.Z)(p().gameName, j && p().threeLines, p().richPresenceLabel, "no-drag") }, k && o.createElement("div", { className: p().gameIsPrivateIcon, title: (0, a.Xx)("#User_GameInfoHidden") }, o.createElement(d._GE, null)), O), U && o.createElement("div", { className: (0, h.Z)(p().richPresenceLabel, "no-drag") }, F, " ")), ); } }; C = (0, i.gn)([r.Pi], C); (0, r.Pi)((e) => { const { persona: t, bParenthesizeNicknames: n, strNickname: r, bIgnorePersonaStatus: a, className: s } = e, c = (0, i._T)(e, ["persona", "bParenthesizeNicknames", "strNickname", "bIgnorePersonaStatus", "className"]); let m = r && !n ? r : t.m_strPlayerName; return o.createElement("span", Object.assign({}, c, { className: (0, h.Z)(s, !a && (0, l.sB)(t)) }), o.createElement("span", { className: p().playerName }, m || " ", n && r && o.createElement("span", { className: p().playerNickname }, "(", r, ")"))); }); }, 66508: (e, t, n) => { "use strict"; n.d(t, { _: () => u }); var i = n(85556), o = n(27378), r = n(50649), a = n(84290), s = n(70215), l = n(87018), c = n(16518), m = n(30677), d = n.n(m), h = n(41243); const u = (0, r.Pi)((e) => { const { persona: t, className: n } = e, r = (0, i._T)(e, ["persona", "className"]); if (!t) return null; if (!t.is_online) return null; const m = t.HasStateFlag(512), u = t.HasStateFlag(2048), p = !u && t.HasStateFlag(1024); return o.createElement(o.Fragment, null, m && o.createElement("div", Object.assign({ className: (0, l.Z)(n, d().PersonaStatusIcon, d().MobilePhoneIcon, (0, s.sB)(t)), title: (0, a.Xx)("#Platform_Hint_Mobile") }, r), o.createElement(h.Mr, null)), u && o.createElement("div", Object.assign({ className: (0, l.Z)(n, d().PersonaStatusIcon, d().VRIcon, (0, s.sB)(t)), title: (0, a.Xx)("#Platform_Hint_VR") }, r), o.createElement(c.VR, null)), p && o.createElement("div", Object.assign({ className: (0, l.Z)(n, d().PersonaStatusIcon, d().BigPictureIcon, (0, s.sB)(t)), title: (0, a.Xx)("#Platform_Hint_BigPicture") }, r), o.createElement(c.Ucz, null))); }); }, 22103: (e, t, n) => { "use strict"; n.d(t, { U: () => r, W: () => o }); var i = n(10553); const o = "fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb"; function r(e, t) { let n = ".jpg"; (e && "0000000000000000000000000000000000000000" !== e) || (e = o), 44 == e.length && ((n = e.substr(-4)), (e = e.substr(0, 40))); let r = i.De.AVATAR_BASE_URL; return r || ((r = i.De.MEDIA_CDN_COMMUNITY_URL + "images/avatars/"), (r += e.substr(0, 2) + "/")), (r += e), t && "small" != t && (r += "_" + t), (r += n), r; } }, 29205: (e, t, n) => { "use strict"; n.d(t, { o: () => u, _1: () => g, vV: () => p }); var i = n(85556), o = n(27378), r = n(50649), a = n(70215), s = n(87018), l = n(10553), c = n(2049); class m extends o.Component { constructor(e) { super(e), (this.m_refImage = o.createRef()), (this.state = { nImage: 0 }); } componentDidUpdate(e) { JSON.stringify(this.props.rgSources) != JSON.stringify(e.rgSources) && this.setState({ nImage: 0 }); } get src() { let e = ""; return this.props.rgSources && this.props.rgSources.length > this.state.nImage && (e = this.props.rgSources[this.state.nImage]), e || (console.warn("MultiSourceImage created with no image src", this.props, this.state.nImage), (e = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=")), e; } get imgRef() { return this.m_refImage; } OnImageError(e) { this.props.onIncrementalError && this.props.onIncrementalError(e, this.props.rgSources[this.state.nImage], this.state.nImage); let t = this.state.nImage + 1; t >= this.props.rgSources.length && this.props.onError && this.props.onError(e), t < this.props.rgSources.length && this.setState({ nImage: t }); } render() { const e = this.props, { rgSources: t, onIncrementalError: n, onError: r } = e, a = (0, i._T)(e, ["rgSources", "onIncrementalError", "onError"]), s = this.src; return o.createElement("img", Object.assign({ ref: this.m_refImage }, a, { src: s, onError: this.OnImageError })); } } (0, i.gn)([c.ak], m.prototype, "OnImageError", null); var d = n(81376), h = n.n(d); const u = o.memo(function (e) { const { strAvatarURL: t, size: n, className: r, statusStyle: a, statusPosition: l, children: c } = e, d = (0, i._T)(e, ["strAvatarURL", "size", "className", "statusStyle", "statusPosition", "children"]), u = o.useMemo(() => { const e = []; return ( t && e.push(t), e.push( (function (e) { switch (e) { case "X-Small": case "Small": return "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTAK/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCgsLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAIAAgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A/P4mW5nmllmeSR3LMzMSSc1a07R73V72KzsILi9u5TiOC2RpJHPoFGSarQ/ef6n+de4fAn9oaL4D+DfGX9i6Uf8AhO9XSKDT9eZY3WxiDZcBGByTkn0JCZBxQB41qeiX+iXslnqNtdWF3H9+3uo2jkX6q2CKpgy208MsUzxyI4ZWViCDmvsr9rrUdT1j9nb4T6h8RBbH4qXUs0zMsSxXJ04hivnKoAU5MPGBg7uM7q+NpvvJ9R/OgAh+8/1P867T4POI/iz4Mc6U+u7NZtG/suPbuu8TKfKG4hct93njnmuKIltp5opYXjkRyrKykEHNWbDVbvSr63vbKaezvLeRZYbi3ZkkidTlWVhyCCMgjpQB6l+1F411nx58dPFWpa5a3mnXaXP2ZNOvXVpLKNBhYflJUY5PB5JJ6k15LN95PqP51a1PWr7WtQnvtRuLm/vrhzJNc3TtJLIx6lmbJJ9zVQCW5nhiiheSR3CqqqSSc0Af/9k="; case "Medium": case "MediumLarge": return "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gODAK/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAsICMmJykqKRkfLTAtKDAlKCko/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo/8AAEQgAQABAAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A8Inmk8+T94/3j/EfWmedJ/z0f/vo0T/6+T/eP86ZQA/zpP8Ano//AH0aPOk/56P/AN9GmVo6Loeq65M0Wj6ddXrr94QRF9v1I6fjQBR86T/no/8A30aPOk/56P8A99GtHW/Dus6GV/tjS7yyD8K00RVW+h6GsugB/nSf89H/AO+jT4JpPPj/AHj/AHh/EfWoafB/r4/94fzoAJ/9fJ/vH+dMp8/+vk/3j/OmUAXdE099W1mw06Jgsl3PHApPYswUH9a+qPF3iHSPhF4S0+003TxK0hMcEAbZvIA3SO2OvIz6k18nW88ttcRz28jxTRMHSRGKsrA5BBHQg1b1TWdT1fy/7V1G8vfLzs+0TNJtz1xknHQUAfUXw+8c6Z8UdN1HS9V0xIpUTM1s7eYkiE43KcAgg/lxg180+NtEHhzxZqmkqxdLWcojHqUPK598EV9CfBbwpF4G8J3fiLxA4trm5hEsnmceRCOQD/tHqR9B1r568a63/wAJH4r1TVghRLqYuinqE6KD74AoAxafB/r4/wDeH86ZT4P9fH/vD+dABP8A6+T/AHj/ADplPn/18n+8f50ygArt/gtpltq/xK0e2vYxJArPMUYZDFEZhn2yBXEV0/w203VNX8YWdloOoHTtQkWQx3IZl2gISeV55AI/GgD1H9pvxPdi/s/DcDGOz8pbqfHWRizBQfYbc/U+1eD12PxW0fWtE8Tpa+I9UOqXpt0cTl2bCEthctz1B/OuOoAKfB/r4/8AeH86ZT4P9fH/ALw/nQAT/wCvk/3j/OmVNPDJ58n7t/vH+E+tM8mT/nm//fJoAZV7Q9Xv9C1KLUNJuGtryMEJIoBIyCD1BHQmqnkyf883/wC+TR5Mn/PN/wDvk0AaHiHXtT8RX4vdau2u7oIIxIygHaCSBwB6msyn+TJ/zzf/AL5NHkyf883/AO+TQAynwf6+P/eH86PJk/55v/3yafBDJ58f7t/vD+E+tAH/2Q=="; case "Large": case "X-Large": case "FillArea": return "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gODAK/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAsICMmJykqKRkfLTAtKDAlKCko/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo/8AAEQgAuAC4AwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A8V1G9u4dQuYobmeONJWVVWQgAAn3qt/aN9/z+3P/AH9b/GjVv+Qre/8AXZ//AEI1VoAtf2jff8/tz/39b/Gj+0b7/n9uf+/rf41VooAtf2jff8/tz/39b/Gj+0b7/n9uf+/rf41VooAtf2jff8/tz/39b/Gj+0b7/n9uf+/rf41VooAtf2jff8/tz/39b/Gj+0b7/n9uf+/rf41VooAtf2jff8/tz/39b/Gj+0b7/n9uf+/rf41VooAtf2jff8/tz/39b/Gj+0b7/n9uf+/rf41VooAtf2jff8/tz/39b/Gj+0b7/n9uf+/rf41VooAtf2jff8/tz/39b/Gj+0b7/n9uf+/rf41VooAtf2jff8/tz/39b/Gj+0b7/n9uf+/rf41VooAtf2jff8/tz/39b/Gj+0b7/n9uf+/rf41VooA09OvbubULaKa5nkjeVVZWkJBBI96KraT/AMhWy/67J/6EKKADVv8AkK3v/XZ//QjVWrWrf8hW9/67P/6Eaq0AFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAFrSf+QrZf8AXZP/AEIUUaT/AMhWy/67J/6EKKADVv8AkK3v/XZ//QjVWrWrf8hW9/67P/6Eaq0AFFFFABRRRQAUUUUAFFFbXhTwvq/irURZaJaPO4wZHPCRD1Zuw/U9s0AYtFfSHhn4AaZBEkniPUZru4xkxWuI4we43EFm+vFdavwc8CqoB0QsR1Ju58n/AMfoA+QqK+oNc+Avhu8jJ0q5vdOmx8vzCZPxVuT+BFeJ+PfhvrvgxvNvYhc6cThbyDJTPYMMZU/Xj0JoA4uiiigAooooAKKKKACiiigC1pP/ACFbL/rsn/oQoo0n/kK2X/XZP/QhRQAat/yFb3/rs/8A6Eaq1a1b/kK3v/XZ/wD0I1VoAKKKKACiiigAooooA2/Bnhy78V+I7TSbH5XmbLyEZESDlmP0/U8V9leEvDeneFdFh03SYQkSAF3IG+V8YLMe5OP6DivK/wBmHQUt9B1HXJE/f3cv2eMntGgBOPqx/wDHa9toAKK8U+N/xSu/D96dA8OOkd+EDXNyQGMIIyFUf3sHOSOAeOengNx4k1y4nM8+sai8xOd7XLk5+uaAPumo7mCK6t5Le5ijmglUq8cigqwIwQR3FfMvww+Mep6Vfw2Pii5kv9KkIUzyktLAem4t1ZfUHJ9PQ/TqOrorowZSAwKnII65BoA+S/jX8P8A/hDtZS605SdFvWPlA5JhfvGT6dwT2+ma82r7S+Kugp4i8B6tZFd0yRGeA9xIg3Lj0zgj6Gvi2gAooooAKKKKACiiigC1pP8AyFbL/rsn/oQoo0n/AJCtl/12T/0IUUAGrf8AIVvf+uz/APoRqrVrVv8AkK3v/XZ//QjVWgAooooAKKKKACiiigD64+A9xbRfCrRVeaFHJnLAsAc+e/Xn0xXffbbX/n5h/wC+x/jXwTRQBr+ML5tS8V6xeu28z3crg5yMFjgA+mOKyKKKACvtP4UzTz/Djw89znzPsaLk9SoGFP5AV8ofD/wpd+MfEtvplqCsRO+4mA4hjBG5vr2A7mvtSxtYbGyt7S1QJBBGsUaDoqKAAP0oAlZQylWAZWGCDyCK+Aq+5PGurpoXhLV9Sdgpt7Z2UnjL4wg/Fior4boAKKKKACiiigAooooAtaT/AMhWy/67J/6EKKNJ/wCQrZf9dk/9CFFABq3/ACFb3/rs/wD6Eaq1a1b/AJCt7/12f/0I1VoAKKKKACiiigAooooAKKKKACpbW3mu7qG3tY3luJXEccaDJdieAB3OTUVfQ/7O3gHyIl8V6tD+9kUiwjccqveXHqeg9snuKAPQvhR4Jh8FeG0gcI+p3GJLuVecvjhQf7q5x78nvXa0V5r8bfHw8I6H9j0+T/idXyFYsdYU6GQ+/Ye/PY0Aec/tFeOk1K8HhjTJN1taybruRTw8ozhB7Lnn3/3a8RpWYsxZiWZjkk8kn1NJQAUUUUAFFFFABRRRQBa0n/kK2X/XZP8A0IUUaT/yFbL/AK7J/wChCigA1b/kK3v/AF2f/wBCNVatat/yFb3/AK7P/wChGqtABRRRQAUUUUAFFFFABRRRQB0Pw+0NfEnjTSNJkz5NxMPNA6mNQWcA+u1TX23FGkMSRxIEjRQqqowFAGAAOwxXyV+z2P8Ai6Wm/wDXKb/0W1fW9AGN4w8RWfhXw9datqBzFCvyoDgyueFUe5P5DntXxd4n1298Sa5darqUm+4uH3EDOEHQKo7ADivdf2qbt00vw9ZhiElmmmK9iUVQCf8Avs187UAFFFFABRRRQAUUUUAFFFFAFrSf+QrZf9dk/wDQhRRpP/IVsv8Arsn/AKEKKADVv+Qre/8AXZ//AEI1Vq1q3/IVvf8Ars//AKEaq0AFFFFABRRRQAUUUUAFFFFAHdfBTVrHRfiFY3uq3MdtaJHMGlk4AJjIH6mvpX/hZfg3/oYbH/vo/wCFfGFFAHs/7RvibRvEX/CPf2JqMN75H2jzfLJOzd5W3PH+ya8YoooAKKKKACiiigAooooAKKKKALWk/wDIVsv+uyf+hCijSf8AkK2X/XZP/QhRQAat/wAhW9/67P8A+hGqtWtW/wCQre/9dn/9CNVaACiiigAooooAKKKKACiiigD0P4BwQ3PxN0+K5ijljMcxKSKGB/dkjivqv+xdK/6Blj/4Dr/hXyf8DL+z034kWFzqN3b2lsscwaWeQRoCYyACxIA5r6g/4TXwt/0Muif+DCL/AOKoA8Y/aisrSz/4Rn7JbQwbvtW7y0C7v9VjOBz1rwivb/2l9a0rWP8AhHP7I1Oxv/K+0+Z9luFl2Z8rG7aTjOD19K8QoAKKKKACiiigAooooAKKKKALWk/8hWy/67J/6EKKNJ/5Ctl/12T/ANCFFABq3/IVvf8Ars//AKEaq1a1b/kK3v8A12f/ANCNVaACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigC1pP/IVsv+uyf+hCijSf+QrZf9dk/wDQhRQAat/yFb3/AK7P/wChGqtWtW/5Ct7/ANdn/wDQjVWgAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAtaT/yFbL/rsn/oQoo0n/kK2X/XZP8A0IUUAWdRsrubULmWG2nkjeVmVljJBBJ9qrf2dff8+Vz/AN+m/wAKKKAD+zr7/nyuf+/Tf4Uf2dff8+Vz/wB+m/woooAP7Ovv+fK5/wC/Tf4Uf2dff8+Vz/36b/CiigA/s6+/58rn/v03+FH9nX3/AD5XP/fpv8KKKAD+zr7/AJ8rn/v03+FH9nX3/Plc/wDfpv8ACiigA/s6+/58rn/v03+FH9nX3/Plc/8Afpv8KKKAD+zr7/nyuf8Av03+FH9nX3/Plc/9+m/woooAP7Ovv+fK5/79N/hR/Z19/wA+Vz/36b/CiigA/s6+/wCfK5/79N/hR/Z19/z5XP8A36b/AAoooAP7Ovv+fK5/79N/hR/Z19/z5XP/AH6b/CiigA/s6+/58rn/AL9N/hR/Z19/z5XP/fpv8KKKALOnWV3DqFtLNbTxxpKrMzRkAAEe1FFFAH//2Q=="; } })(n), ), e ); }, [t, n]); return o.createElement("div", Object.assign({ className: (0, s.Z)(h().avatarHolder, "avatarHolder", "no-drag", n || "Medium", r) }, d), o.createElement("div", { className: (0, s.Z)(h().avatarStatus, "avatarStatus", l), style: a }), o.createElement(m, { className: (0, s.Z)(h().avatar, "avatar"), rgSources: u, draggable: !1 }), c); }); let p = class extends o.Component { render() { const e = this.props, { persona: t, size: n, animatedAvatar: r, className: c } = e, m = (0, i._T)(e, ["persona", "size", "animatedAvatar", "className"]); let d = ""; return r && r.image_small && 0 != r.image_small.length ? (d = l.De.MEDIA_CDN_COMMUNITY_URL + "images/" + r.image_small) : t && ((d = t.avatar_url_medium), "Small" == n || "X-Small" == n ? (d = t.avatar_url) : ("Large" != n && "X-Large" != n && "FillArea" != n) || (d = t.avatar_url_full)), o.createElement(u, Object.assign({ strAvatarURL: d, size: n, className: (0, s.Z)((0, a.sB)(t), c) }, m)); } }; p = (0, i.gn)([r.Pi], p); const _ = (0, r.Pi)((e) => { const { profileItem: t, className: n, bDisableAnimation: r } = e, a = (0, i._T)(e, ["profileItem", "className", "bDisableAnimation"]); if (!t || !t.image_small || 0 == t.image_small.length) return null; let c = r ? t.image_large : t.image_small; return c || (c = t.image_small), c.startsWith("https://") || (c = l.De.MEDIA_CDN_COMMUNITY_URL + "images/" + c), o.createElement("div", Object.assign({ className: (0, s.Z)(h().avatarFrame, n, "avatarFrame") }, a), o.createElement("img", { className: h().avatarFrameImg, src: c })); }); let g = class extends o.Component { constructor(e) { super(e), (this.state = { bAnimate: "None" != this.props.loopDuration }), (this.m_timer = 0); } componentDidMount() { this.props.bParentHovered || this.SetupAnimationTimer(); } SetupAnimationTimer() { let e = 0; switch (this.props.loopDuration) { case "Short": e = 2500; break; case "Medium": e = 5e3; break; case "Long": e = 1e4; } 0 != e && (this.setState({ bAnimate: "None" != this.props.loopDuration }), (this.m_timer = window.setTimeout(() => this.setState({ bAnimate: !1 }), e))); } StopAnimationTimer() { this.m_timer && (window.clearTimeout(this.m_timer), (this.m_timer = 0)); } onHover() { this.SetupAnimationTimer(); } componentWillUnmount() { this.StopAnimationTimer(); } componentDidUpdate(e) { this.props.loopDuration != e.loopDuration && ("None" == this.props.loopDuration ? (this.setState({ bAnimate: !1 }), this.StopAnimationTimer()) : "Infinite" == this.props.loopDuration ? (this.setState({ bAnimate: !0 }), this.StopAnimationTimer()) : (this.setState({ bAnimate: !0 }), this.SetupAnimationTimer())), this.props.bParentHovered != e.bParentHovered && (this.props.bParentHovered && "None" != this.props.loopDuration && "Infinite" != this.props.loopDuration ? (this.setState({ bAnimate: !0 }), this.StopAnimationTimer()) : this.state.bAnimate && this.SetupAnimationTimer()); } render() { let e = this.props, { loopDuration: t, animatedAvatar: n, avatarFrame: r, children: a, style: s, bLimitProfileFrameAnimationTime: l, bParentHovered: c } = e, m = (0, i._T)(e, ["loopDuration", "animatedAvatar", "avatarFrame", "children", "style", "bLimitProfileFrameAnimationTime", "bParentHovered"]); return m.onClick && (s = Object.assign(Object.assign({}, s), { cursor: "pointer" })), this.state.bAnimate || (n = null), o.createElement("div", { onMouseEnter: () => this.setState({ bAnimate: "None" != this.props.loopDuration }), onMouseLeave: () => this.SetupAnimationTimer() }, o.createElement(p, Object.assign({ animatedAvatar: n }, m), a, o.createElement(_, { profileItem: r, bDisableAnimation: l && !this.state.bAnimate }))); } }; g = (0, i.gn)([r.Pi], g); }, 88991: (e, t, n) => { "use strict"; n.d(t, { K: () => a }); var i = n(72080), o = n(78654), r = n(10553); class a { constructor(e = 0, t, n, o) { e instanceof a ? (this.m_ulSteamID = e.m_ulSteamID) : "string" == typeof e ? (this.m_ulSteamID = i.Z.fromString(e, !0)) : t && n && void 0 !== o ? this.SetFromComponents(null != e ? e : 0, o, n, t) : (this.m_ulSteamID = e ? i.Z.fromNumber(e, !0) : i.Z.UZERO); } static InitFromAccountID(e) { return new a(Number(e), r.De.EUNIVERSE, 1, o.QS); } static InitFromClanID(e) { return new a(Number(e), r.De.EUNIVERSE, 7, 0); } GetAccountID() { return this.m_ulSteamID.getLowBitsUnsigned(); } GetInstance() { return 1048575 & this.m_ulSteamID.getHighBitsUnsigned(); } GetAccountType() { return (this.m_ulSteamID.getHighBitsUnsigned() >> 20) & 15; } GetUniverse() { return (this.m_ulSteamID.getHighBitsUnsigned() >> 24) & 255; } ConvertTo64BitString() { return this.m_ulSteamID.toString(); } Render() { switch (this.GetAccountType()) { case 0: return "[I:" + this.GetUniverse() + ":" + this.GetAccountID() + "]"; case 7: return "[g:" + this.GetUniverse() + ":" + this.GetAccountID() + "]"; case 4: return "[A:" + this.GetUniverse() + ":" + this.GetAccountID() + ":" + this.GetInstance() + "]"; case 3: return "[G:" + this.GetUniverse() + ":" + this.GetAccountID() + "]"; case 2: return "[M:" + this.GetUniverse() + ":" + this.GetAccountID() + ":" + this.GetInstance() + "]"; case 5: return "[P:" + this.GetUniverse() + ":" + this.GetAccountID() + "]"; case 6: return "[C:" + this.GetUniverse() + ":" + this.GetAccountID() + "]"; default: return "[U:" + this.GetUniverse() + ":" + this.GetAccountID() + "]"; } } static InitFromString(e) { let t = new a(); try { let [n, i, o, r, a] = e.match(/\[([I|g|A|G|M|P|C|U]):(\d+):(\d+):?(\d+)?\]/) || [], s = Number(o), l = Number(r), c = a ? Number(a) : 1; switch (i) { case "I": t.SetFromComponents(l, c, 0, s); case "g": t.SetFromComponents(l, 0, 7, s); case "A": t.SetFromComponents(l, c, 4, s); case "G": t.SetFromComponents(l, c, 3, s); case "M": t.SetFromComponents(l, c, 2, s); case "P": t.SetFromComponents(l, c, 5, s); case "C": t.SetFromComponents(l, c, 6, s); case "U": t.SetFromComponents(l, c, 1, s); } } catch (e) {} return t; } BIsValid() { let e = this.GetAccountType(); if (e <= 0 || e >= 11) return !1; let t = this.GetUniverse(); if (t <= 0 || t >= 5) return !1; if (1 == e) { if (0 == this.GetAccountID() || this.GetInstance() > o.YO) return !1; } else if (7 == e) { if (0 == this.GetAccountID() || 0 != this.GetInstance()) return !1; } else if (3 == e && 0 == this.GetAccountID()) return !1; return !0; } BIsIndividualAccount() { return 1 == this.GetAccountType(); } BIsClanAccount() { return 7 == this.GetAccountType(); } SetAccountID(e) { this.m_ulSteamID = new i.Z(e, this.m_ulSteamID.getHighBitsUnsigned(), !0); } SetInstance(e) { this.SetFromComponents(this.GetAccountID(), e, this.GetAccountType(), this.GetUniverse()); } SetAccountType(e) { this.SetFromComponents(this.GetAccountID(), this.GetInstance(), e, this.GetUniverse()); } SetUniverse(e) { this.SetFromComponents(this.GetAccountID(), this.GetInstance(), this.GetAccountType(), e); } SetFromComponents(e, t, n, o) { let r = ((255 & o) << 24) + ((15 & n) << 20) + (1048575 & t), a = 4294967295 & e; this.m_ulSteamID = new i.Z(a, r, !0); } } }, 62902: (e, t, n) => { "use strict"; n.d(t, { B1: () => l, FG: () => d, Hf: () => c, OL: () => s, ZP: () => u, mY: () => m }); var i = n(85556), o = n(93635), r = n(61752), a = n(57117); function s(e, t = "", n = null) { return h.InstrumentLink(e, t, n); } function l(e, t, n = null) { const i = (0, r.FM)(e).toLowerCase(), o = (0, r.FM)(a.De.COMMUNITY_BASE_URL).toLowerCase(), s = (0, r.FM)(a.De.STORE_BASE_URL).toLowerCase(); return i === o || i === s ? c(e, t, n) : e; } function c(e, t, n = null) { const i = m(t, n); return h.AddNavParamToURL(e, i); } function m(e, t = null) { return (null == e ? void 0 : e.domain) ? h.GetLinkParam(e, t) : a.De.SNR; } function d(e, t = "", n = null) { return s(`${a.De.STORE_BASE_URL}app/${e}`, t, n); } class h { static Load() { return (0, i.mG)(this, void 0, void 0, function* () { return ( h.sm_promiseLoading || (h.sm_promiseLoading = (() => (0, i.mG)(this, void 0, void 0, function* () { (h.sm_rgNavEventDictionary = (yield n.e(4103).then(n.t.bind(n, 3086, 19))).default), (h.sm_bIsLoaded = !0); }))()), h.sm_promiseLoading ); }); } static BIsLoaded() { return h.sm_bIsLoaded; } static SetNavEventParams(e, t, n = null, i = null) { (h.sm_strDomain = e), (h.sm_strController = t), (h.sm_strMethod = n), (h.sm_strSubmethod = i), (h.sm_strComputedLinkPrefix = null), h.Load(); } static GetDefaultParams() { let e = { domain: h.sm_strDomain, controller: h.sm_strController }; return h.sm_strMethod && (e.method = h.sm_strMethod), h.sm_strSubmethod && (e.submethod = h.sm_strSubmethod), e; } static ParseSNR(e) { const t = e.split("_") || []; return { domain: h.DecodeEventComponent(t[0]), controller: h.DecodeEventComponent(t[1]), method: h.DecodeEventComponent(t[2]), submethod: h.DecodeEventComponent(t[3]), feature: h.DecodeEventComponent(t[4]), depth: t[5] ? Number(t[5]) : void 0 }; } static InstrumentLink(e, t, n = null) { const i = h.GetLinkParam(t, n); return h.AddNavParamToURL(e, i); } static GetLinkParam(e, t = null) { var n; let i, o; if (("string" == typeof e || e.domain || (e = e.feature || ""), "string" != typeof e && e.domain)) (i = h.ComputeLinkPrefix(e.domain, e.controller, e.method, e.submethod)), (o = e.feature), (t = null !== (n = null != t ? t : e.depth) && void 0 !== n ? n : null); else { if (!h.sm_strComputedLinkPrefix && !h.ComputeStaticLinkPrefix()) return null; (i = h.sm_strComputedLinkPrefix), (o = "string" == typeof e ? e : e.feature); } let r = h.EncodeEventComponent(o); return r && ((i += "_" + r), t && (i += "_" + t)), i; } static AddNavParamToURL(e, t) { try { const n = new URL((0, r.Pm)(e)), i = new URLSearchParams(n.search); return i.set("snr", encodeURIComponent(t)), n.origin + n.pathname + "?" + i.toString() + n.hash; } catch (t) { return console.error(e, t), e; } } static ComputeStaticLinkPrefix() { return h.sm_strDomain ? ((h.sm_strComputedLinkPrefix = h.ComputeLinkPrefix(h.sm_strDomain, h.sm_strController, h.sm_strMethod, h.sm_strSubmethod)), !0) : ((0, o.X)(!1, "CStoreNavEvents::SetNavEventParams was not called before calling InstrumentLink!"), !1); } static ComputeLinkPrefix(e, t, n, i) { let o = ""; return (o += h.EncodeEventComponent(e)), (o += "_"), (o += h.EncodeEventComponent(t)), (o += "_"), (o += h.EncodeEventComponent(n)), (o += "_"), (o += h.EncodeEventComponent(i)), o; } static EncodeEventComponent(e) { if (!e) return ""; h.Load(); let t = h.sm_rgNavEventDictionary || {}; return e in t ? "" + t[e] : (e.match(/^[0-9]+$/) || (e = e.replace(/^[0-9]+/, "")), e.replace(/[^a-zA-Z0-9\- ]+/g, "")); } static DecodeEventComponent(e) { const t = e && parseInt(e); if (t && h.sm_rgNavEventDictionary) for (const e in h.sm_rgNavEventDictionary) if (h.sm_rgNavEventDictionary[e] == t) return e; return h.SanitizeEventComponent(e); } static SanitizeEventComponent(e) { return e && e.match(/^[a-zA-Z0-9\-.]*$/) ? e : ""; } } h.sm_bIsLoaded = !1; const u = h; }, 57476: (e, t, n) => { "use strict"; function i(e, t) { return !!e && "object" == typeof e.SteamClient && t in e.SteamClient; } function o(e, t) { if (!e) return !1; const [n, o] = t.split(".", 2); return n && o && i(e, n) && o in e.SteamClient[n]; } function r(e) { return o(window, e); } n.d(t, { U5: () => r, w3: () => o }); }, 70532: (e, t, n) => { "use strict"; n.d(t, { F: () => a }); var i = n(57117); let o = { success: !0, result: 1 }; class r { constructor() { (this.m_mapWaitingCallbacks = new Map()), (this.m_iCallSeq = 1), (this.m_bReady = !1), (this.m_bClientConnectionFailed = !1), (this.m_bSecurityException = !1), (this.m_ClientInfo = { ulVersion: "", bFriendsUIEnabled: !1, unAccountID: 0, rgSupportedMessages: [] }); } get ClientInfo() { return this.m_ClientInfo; } get ready() { return this.m_bReady; } get browser_supported() { return !this.m_bSecurityException; } get connected_to_client() { return this.m_socket && this.m_socket.readyState == WebSocket.OPEN; } SendMsgAndAwaitResponse(e) { return new Promise((t, n) => { let i = this.m_iCallSeq++; this.BSendMsg(e, i) ? this.m_mapWaitingCallbacks.set(i, { iSeq: i, fnCallback: t, fnError: n }) : n(); }); } BSendMsg(e, t) { if (!this.m_socket || this.m_socket.readyState != WebSocket.OPEN) return !1; let n = Object.assign({}, e, { universe: i.De.EUNIVERSE, accountid: i.L7.accountid }); void 0 !== t && (n.sequenceid = t); try { return this.m_socket.send(JSON.stringify(n)), !0; } catch (e) { return !1; } } OnSocketMessage(e) { try { let t = JSON.parse(e.data); if (t.sequenceid) { let e = this.m_mapWaitingCallbacks.get(t.sequenceid); if (e) return this.m_mapWaitingCallbacks.delete(t.sequenceid), void e.fnCallback(t); } } catch (e) { console.error("exception parsing response", e); } } Connect() { if (this.m_bReady && this.m_socket.readyState == WebSocket.OPEN) return Promise.resolve(); if (this.m_promiseConnect) return this.m_promiseConnect; let e = new Promise((e, t) => { try { this.m_socket = new WebSocket("ws://127.0.0.1:27060/clientsocket/"); } catch (e) { return (this.m_bSecurityException = !0), void t(e); } (this.m_socket.onerror = (e) => { t(); }), (this.m_socket.onmessage = this.OnSocketMessage.bind(this)), (this.m_socket.onopen = () => { this.SendMsgAndAwaitResponse({ message: "GetClientInfo" }) .then((n) => { 1 == n.success ? ((this.m_ClientInfo.ulVersion = n.clientversion), (this.m_ClientInfo.bFriendsUIEnabled = !!n.friendsui), (this.m_ClientInfo.unAccountID = n.accountid), n.supported_messages && (this.m_ClientInfo.rgSupportedMessages = n.supported_messages), e()) : t(); }) .catch(t); }); }); return ( (this.m_promiseConnect = e), this.m_promiseConnect .then(() => { (this.m_bReady = !0), (this.m_promiseConnect = void 0); }) .catch(() => { (this.m_bClientConnectionFailed = !0), (this.m_promiseConnect = void 0); }), this.m_promiseConnect ); } } let a = new (class { constructor() { (this.m_connection = new r()), (this.m_bAllowAccountMismatch = !1), (this.m_mapCacheSubscribedApp = new Map()); } FailureResult(e = 2) { let t = { success: !1, result: e }; return this.m_connection && !this.m_connection.browser_supported && (t.browser_unsupported = !0), this.m_connection && !this.m_connection.connected_to_client && (t.connect_failed = !0), 7 == e && (t.call_unsupported = !0), t; } SetAllowAccountMismatch(e) { this.m_bAllowAccountMismatch = e; } BClientConnected() { return this.m_connection.Connect().then( () => o, () => this.FailureResult(), ); } BClientSupportsMessage(e) { return !(!this.m_connection.connected_to_client || !this.m_connection.ready) && -1 !== this.m_connection.ClientInfo.rgSupportedMessages.indexOf(e); } OpenFriendChatDialog(e) { let t = { message: "ShowFriendChatDialog", steamid: e }; return this.GenericEResultCall(t); } OpenChatRoomGroupDialog(e, t) { let n = { message: "ShowChatRoomGroupDialog", chat_group_id: e }; return t && (n.chat_room_id = t), this.GenericEResultCall(n); } ShowChatRoomGroupInvite(e) { let t = { message: "ShowChatRoomGroupInvite", invite_code: e }; return this.GenericEResultCall(t); } BIsSubscribedApp(e) { if (this.m_mapCacheSubscribedApp.has(e)) return Promise.resolve(this.m_mapCacheSubscribedApp.get(e)); let t = { message: "IsSubscribedApp", appid: e }; return this.GenericEResultCall(t).then((t) => { if (t.connect_failed) return; let n = 1 == t.result; return this.m_mapCacheSubscribedApp.set(e, n), n; }); } OpenFriendsDialog() { return this.GenericEResultCall({ message: "OpenFriendsDialog" }); } BClientAccountMatches() { return !i.L7.logged_in || i.L7.accountid == this.m_connection.ClientInfo.unAccountID; } GenericEResultCall(e) { return this.m_connection .Connect() .then(() => (this.m_bAllowAccountMismatch || this.BClientAccountMatches() ? this.m_connection.SendMsgAndAwaitResponse(e).then((e) => (1 === e.success ? o : this.FailureResult(e.success))) : { success: !1, result: 19, account_mismatch: !0 })) .catch(() => this.FailureResult()); } })(); window.ClientConnectionAPI = a; }, 40786: (e, t, n) => { "use strict"; n.d(t, { N: () => a }); var i = n(85556), o = n(1736), r = (n(6181), n(79588)); class a { constructor() { (this.m_mapCallbacks = new Map()), (this.m_rgRegisteredEMsgs = []), (this.m_mapServiceMethodHandlers = new Map()), (this.m_rgRegisteredServiceMethodHandlers = []), (0, r.rC)(this); } InstallErrorReportingStore(e) { this.m_ErrorReportingStore = e; } DispatchMsgToHandlers(e, t) { let n = e.GetEMsg(); if (146 == n) { let n = e.Hdr().target_job_name(); if (n) { let i = this.m_mapServiceMethodHandlers.get(n); if (i) { this.DEBUG_LogMessageDispatch(e, i[0]); for (let n of i) try { n.invoke(e, t); } catch (e) { e instanceof Error && this.m_ErrorReportingStore ? this.m_ErrorReportingStore.ReportError(e) : console.error("MessageHandlers failed to dispatch message to handler: ", e); } return !0; } } } else { let t = this.m_mapCallbacks.get(n); if (t) { this.DEBUG_LogMessageDispatch(e, t[0]); for (let n of t) try { n.invoke(e); } catch (e) { e instanceof Error && this.m_ErrorReportingStore ? this.m_ErrorReportingStore.ReportError(e) : console.error("MessageHandlers failed to dispatch message to handler: ", e); } return !0; } } return !1; } DEBUG_LogMessageDispatch(e, t) { 0; } get emsg_list() { return this.m_rgRegisteredEMsgs; } get servicemethod_list() { return this.m_rgRegisteredServiceMethodHandlers; } AddCallback(e, t, n) { let i = this.m_mapCallbacks.get(e); return ( i || ((i = []), this.m_mapCallbacks.set(e, i), this.m_rgRegisteredEMsgs.push(e)), i.push({ invoke: n, msgClass: t }), { invoke: n, unregister: () => { let t = this.m_mapCallbacks.get(e); if (t) for (let e = 0; e < t.length; e++) t[e].invoke == n && (t.splice(e, 1), e--); }, } ); } AddServiceMethodHandler(e, t) { let n = (n, i) => { let r = o.gA.InitFromMsg(e.request, n), a = o.gA.Init(e.response, 147), s = t(r, a), l = (e) => { a.Hdr().set_eresult(e), i(a); }; s instanceof Promise ? s.then(l).catch(() => { l(2); }) : l(s); }; return ( this.m_mapServiceMethodHandlers.has(e.name) ? console.error("Duplicate registration for method " + e.name) : (this.m_mapServiceMethodHandlers.set(e.name, [{ invoke: n, msgClass: e.request }]), this.m_rgRegisteredServiceMethodHandlers.push(e.name)), { invoke: n, unregister: () => { let t = this.m_mapServiceMethodHandlers.get(e.name); if (t) for (let e = 0; e < t.length; e++) t[e].invoke == n && (t.splice(e, 1), e--); }, } ); } AddServiceNotificationHandler(e, t) { let n = (n, i) => { let r = o.gA.InitFromMsg(e.request, n); t(r); }, i = this.m_mapServiceMethodHandlers.get(e.name); return ( i || ((i = []), this.m_mapServiceMethodHandlers.set(e.name, i), this.m_rgRegisteredServiceMethodHandlers.push(e.name)), i.push({ invoke: n, msgClass: e.request }), { invoke: n, unregister: () => { let t = this.m_mapServiceMethodHandlers.get(e.name); if (t) for (let e = 0; e < t.length; e++) t[e].invoke == n && (t.splice(e, 1), e--); }, } ); } RegisterBaseEMessageHandler(e, t) { return this.AddCallback(e, void 0, t); } RegisterEMessageHandler(e, t, n) { return this.AddCallback(e, t, (e) => { n(o.gA.InitFromMsg(t, e)); }); } RegisterEMessageAction(e, t, n) { return this.AddCallback(e, t, (e) => { (0, r.z)(() => { n(o.gA.InitFromMsg(t, e)); }); }); } RegisterServiceNotificationHandler(e, t) { return this.AddServiceNotificationHandler(e, t); } RegisterServiceNotificationHandlerAction(e, t) { return this.AddServiceNotificationHandler(e, (e) => { let n; return ( (0, r.z)(() => { n = t(e); }), n ); }); } RegisterServiceMethodHandler(e, t) { return this.AddServiceMethodHandler(e, t); } RegisterServiceMethodHandlerAction(e, t) { return this.AddServiceMethodHandler(e, (e, n) => { let i; return ( (0, r.z)(() => { i = t(e, n); }), i ); }); } } (0, i.gn)([r.LO], a.prototype, "m_rgRegisteredEMsgs", void 0), (0, i.gn)([r.LO], a.prototype, "m_rgRegisteredServiceMethodHandlers", void 0); }, 70283: (e, t, n) => { "use strict"; n.d(t, { LT: () => r, qr: () => i }); var i, o = n(22394); !(function (e) { (e[(e.LaunchGame = 0)] = "LaunchGame"), (e[(e.FriendMessage = 1)] = "FriendMessage"), (e[(e.ChatMention = 2)] = "ChatMention"), (e[(e.ChatMessage = 3)] = "ChatMessage"), (e[(e.ToastMessage = 4)] = "ToastMessage"), (e[(e.ToastAchievement = 5)] = "ToastAchievement"), (e[(e.ToastMisc = 6)] = "ToastMisc"), (e[(e.ToastMiscShort = 7)] = "ToastMiscShort"), (e[(e.FriendOnline = 8)] = "FriendOnline"), (e[(e.FriendInGame = 9)] = "FriendInGame"), (e[(e.VolSound = 10)] = "VolSound"), (e[(e.ShowModal = 11)] = "ShowModal"), (e[(e.HideModal = 12)] = "HideModal"), (e[(e.IntoGameDetail = 13)] = "IntoGameDetail"), (e[(e.OutOfGameDetail = 14)] = "OutOfGameDetail"), (e[(e.PagedNavigation = 15)] = "PagedNavigation"), (e[(e.ToggleOn = 16)] = "ToggleOn"), (e[(e.ToggleOff = 17)] = "ToggleOff"), (e[(e.SliderUp = 18)] = "SliderUp"), (e[(e.SliderDown = 19)] = "SliderDown"), (e[(e.ChangeTabs = 20)] = "ChangeTabs"), (e[(e.DefaultOk = 21)] = "DefaultOk"), (e[(e.OpenSideMenu = 22)] = "OpenSideMenu"), (e[(e.CloseSideMenu = 23)] = "CloseSideMenu"), (e[(e.BasicNav = 24)] = "BasicNav"), (e[(e.FailedNav = 25)] = "FailedNav"), (e[(e.Typing = 26)] = "Typing"), (e[(e.TimerExpired = 27)] = "TimerExpired"), (e[(e.Screenshot = 28)] = "Screenshot"); })(i || (i = {})); const r = new (class { constructor() { this.m_fnCallbackOnPlaySound = new o.pB(); } RegisterCallbackOnPlaySound(e) { return this.m_fnCallbackOnPlaySound.Register(e); } PlayNavSound(e, t) { this.m_fnCallbackOnPlaySound.Dispatch(e, t); } })(); }, 90656: (e, t, n) => { "use strict"; n.r(t), n.d(t, { BroadcastWatchStore: () => ye, CBroadcastInfo: () => Ce, CBroadcastVideo: () => Ie, CBroadcastWatchStore: () => be, EBroadcastWatchState: () => ue, ETimelineRange: () => pe, k_nDefaultBroadcastAppID: () => he }); var i = n(85556), o = n(14206), r = n.n(o), a = n(79588), s = n(66035), l = n(2049), c = n(84678); class m extends Error {} class d extends c.C7 { constructor(e) { super(), (this.m_appid = e || 0); } GetAppID() { return this.m_appid; } parseColor(e) { if ("string" != typeof e || !e.match(/^#[0-9a-fA-F]{6}$/)) throw new m("expected color string"); return [parseInt(e.substring(1, 3), 16), parseInt(e.substring(3, 5), 16), parseInt(e.substring(5, 7), 16)]; } parseString(e) { if ("string" == typeof e) return e; throw new m("expected string"); } parseNumber(e) { if ("number" == typeof e) return e; throw new m("expected number"); } parseDate(e) { if ("number" == typeof e) return new Date(e); throw new m("expected timestamp"); } parseArray(e, t) { let n = []; if ("object" != typeof e || !Array.isArray(e)) throw new m("expected array"); let i = e.length; for (let o = 0; o < i; ++o) try { n.push(t(e[o])); } catch (e) { throw ((e.message += "\n...while parsing array element " + o), e); } return n; } parseDict(e, t) { let n = new Map(); if ("object" != typeof e || Array.isArray(e)) throw new m("expected object"); for (let i in e) try { n.set(i, t(e[i])); } catch (e) { throw ((e.message += "\n...while parsing dictionary element " + i), e); } return n; } parseBracket(e) { let t = { name: this.parseString(e.name), start: this.parseDate(e.start), color: [255, 0, 255] }; return "params" in e && (t.params = this.parseDict(e.params, this.parseString.bind(this))), "end" in e && (t.end = this.parseDate(e.end)), "color" in e && (t.color = this.parseColor(e.color)), t; } parseMarker(e) { let t = { time: this.parseDate(e.time), color: [0, 255, 255] }; return "name" in e && (t.name = this.parseString(e.name)), "params" in e && (t.params = this.parseDict(e.params, this.parseString.bind(this))), "color" in e && (t.color = this.parseColor(e.color)), t; } parseSoundTrack(e) { let t = {}; return "song_title" in e && (t.song_title = this.parseString(e.song_title)), "appid" in e && (t.appid = this.parseNumber(e.appid)), "song_index" in e && (t.song_index = this.parseNumber(e.song_index)), t; } parseBroadcastGameData(e) { let t = { appid: 0, brackets: [], markers: [] }; return "appid" in e && (t.appid = this.parseNumber(e.appid)), "brackets" in e && (t.brackets = this.parseArray(e.brackets, this.parseBracket.bind(this))), "markers" in e && (t.markers = this.parseArray(e.markers, this.parseMarker.bind(this))), "soundtrack" in e && (t.soundtrack = this.parseSoundTrack(e.soundtrack)), t; } convertTime(e, t) { return e - t / 1e3; } UpdateMarkers(e, t) { let n = [], i = []; for (const o of e) o.persistent ? (i.length > 0 && (i[i.length - 1].nTimeEnd = this.convertTime(o.Timestamp, t)), o.name.length > 0 && i.push({ strTemplateName: o.name, nTimeStart: this.convertTime(o.Timestamp, t), nTimeEnd: -1, color: (0, l.B8)(o.color_r, o.color_g, o.color_b) })) : n.push({ strTemplateName: o.name, nTime: this.convertTime(o.Timestamp, t), color: (0, l.B8)(o.color_r, o.color_g, o.color_b) }); return { rgMarkers: n, rgSegments: i }; } UpdateRegions(e) { let t = []; for (const n of e) t.push({ strTemplateName: n.name, min: { x: n.min_x, y: n.min_y }, max: { x: n.max_x, y: n.max_y }, behavior: n.behavior }); return t; } UpdateSoundtrack(e, t) {} } var h = n(84750), u = n(78654), p = n(9824), _ = n(93635), g = n(22394), C = n(84290), f = n(59702), v = n(8568), S = n(5395), b = n(10553), I = n(88991), y = n(23556); const E = 1e6; class D { constructor() { this.playback_speed = 1; } } class w extends D {} class R extends D {} class A { constructor() { (this.m_steamIDBroadcast = ""), (this.m_steamIDViewer = ""), (this.m_broadcastID = ""), (this.m_ulViewerToken = ""), (this.m_strCDNAuthUrlParameters = void 0), (this.m_host = ""), (this.m_strBroadcastOrigin = ""), (this.m_strStatsLink = ""), (this.m_strStalledLink = ""), (this.m_strEventLogLink = ""), (this.m_allTimeSnapshot = new M(0)), (this.m_rgSnapShots = new Array(new M(0))), (this.m_videoResolution = 0), (this.m_audioRate = 0), (this.m_audioChannel = 0), (this.m_frameRate = 0), (this.m_strBufferingVideoResolution = "0x0@0"), (this.m_nPlaybackVideoResolution = 0), (this.m_strPlaybackVideoResolution = "0x0"), (this.m_htmlVideoResolution = 0), (this.m_strHtmlVideoDisplay = ""), (this.m_nAudioBandwidth = 0), (this.m_nVideoBandwidth = 0), (this.m_nBandwidthRequired = 0), (this.m_nCurBandwidthVideo = 0), (this.m_nAudioBufferedMS = 0), (this.m_nVideoBufferedMS = 0), (this.m_nActiveDownloads = 0), (this.m_nVideoDownloadProgress = 0), (this.m_videoBufferedRanges = null), (this.m_audioBufferedRanges = null), (this.m_nSegmentDurationMS = 0), (this.m_nPlaybackRate = 0), (this.m_nTimeToFirstFrameMS = -1), (this.m_fpsMonitor = new T()), (0, a.rC)(this); } GetBytesReceivedToDisplay() { return (0, y.l)(this.m_allTimeSnapshot.m_nBytesReceived, 1); } GetBufferingResolutionToDisplay() { return this.m_strBufferingVideoResolution; } GetPlaybackResolutionToDisplay() { return this.m_strPlaybackVideoResolution; } GetHTMLVideoResolutionToDisplay() { return this.m_strHtmlVideoDisplay; } GetDroppedFramesToDisplay() { return this.m_allTimeSnapshot.m_nFramesDropped + "/" + this.m_allTimeSnapshot.m_nFramesDecoded; } GetStalledEventsToDisplay() { return String(this.m_allTimeSnapshot.m_nStallEvents); } GetFailedDownloadsToDisplay() { return String(this.m_allTimeSnapshot.m_nFailedSegments); } GetNumBufferedVideoRanges() { return this.m_videoBufferedRanges ? this.m_videoBufferedRanges.length : 0; } GetNumBufferedAudioRanges() { return this.m_audioBufferedRanges ? this.m_audioBufferedRanges.length : 0; } GetBufferedVideoSegmentForDisplay(e) { return this.m_videoBufferedRanges && e < this.m_videoBufferedRanges.length ? (0, h.zB)(this.m_videoBufferedRanges.start(e)) + " - " + (0, h.zB)(this.m_videoBufferedRanges.end(e)) : (0, C.Xx)("#DASHPlayerStats_VideoNoRangeInformation"); } GetBufferedAudioSegmentForDisplay(e) { return this.m_audioBufferedRanges && e < this.m_audioBufferedRanges.length ? (0, h.zB)(this.m_audioBufferedRanges.start(e)) + " - " + (0, h.zB)(this.m_audioBufferedRanges.end(e)) : (0, C.Xx)("#DASHPlayerStats_AudioNoRangeInformation"); } GetBandwidthStatsToDisplay() { if (this.m_rgSnapShots.length < 2) return (this.m_allTimeSnapshot.m_nBandwidthMin / E).toFixed(3) + " / " + (this.m_allTimeSnapshot.m_nBandwidthMax / E).toFixed(3) + " / " + (this.m_allTimeSnapshot.GetAverageBandwidth() / E).toFixed(3); { let e = this.m_rgSnapShots[this.m_rgSnapShots.length - 2], t = this.m_rgSnapShots[this.m_rgSnapShots.length - 1]; return ((0 == t.m_nBandwidthMin ? e.m_nBandwidthMin : Math.min(e.m_nBandwidthMin, t.m_nBandwidthMin)) / E).toFixed(3) + " / " + (Math.max(e.m_nBandwidthMax, t.m_nBandwidthMax) / E).toFixed(3) + " / " + (e.GetAverageBandwidthFromTwo(t) / E).toFixed(3); } } GetDownloadTimeStatsToDisplay() { if (this.m_rgSnapShots.length < 2) return (this.m_allTimeSnapshot.m_nSegmentDownloadTimeMinMS / 1e3).toFixed(3) + " / " + (this.m_allTimeSnapshot.m_nSegmentDownloadTimeMaxMS / 1e3).toFixed(3) + " / " + (this.m_allTimeSnapshot.GetAverageDownloadTime() / 1e3).toFixed(3); { let e = this.m_rgSnapShots[this.m_rgSnapShots.length - 2], t = this.m_rgSnapShots[this.m_rgSnapShots.length - 1]; return ((0 == t.m_nSegmentDownloadTimeMinMS ? e.m_nSegmentDownloadTimeMinMS : Math.min(e.m_nSegmentDownloadTimeMinMS, t.m_nSegmentDownloadTimeMinMS)) / 1e3).toFixed(3) + " / " + (Math.max(e.m_nSegmentDownloadTimeMaxMS, t.m_nSegmentDownloadTimeMaxMS) / 1e3).toFixed(3) + " / " + (e.GetAverageDownloadTimeFromTwo(t) / 1e3).toFixed(3); } } BHasFrameInformation() { return this.m_allTimeSnapshot.m_nFramesDecoded > 0; } GetBandwidthRequiredToDisplay() { return (this.m_nBandwidthRequired / E).toFixed(3); } GetBandwithVideoToDisplay() { return (this.m_nCurBandwidthVideo / E).toFixed(3); } GetContentServerToDisplay() { return this.m_host; } GetVideoBufferedToDisplay() { return (this.m_nVideoBufferedMS / 1e3).toFixed(3); } GetAudioBufferedToDisplay() { return (this.m_nAudioBufferedMS / 1e3).toFixed(3); } GetActiveDownloadsToDisplay() { return String(this.m_nActiveDownloads); } GetVideoDownloadProgressToDisplay() { return this.m_nVideoDownloadProgress ? String(Math.round(100 * this.m_nVideoDownloadProgress)) + "%" : "100%"; } GetTimeToFirstFrameToDisplay() { return -1 == this.m_nTimeToFirstFrameMS ? "Unknown" : String(this.m_nTimeToFirstFrameMS); } GetPersistentFrameDropsForDisplay() { return String(this.m_fpsMonitor.BIsDroppingFrames()); } GetCurrentFPSForDisplay() { return this.m_fpsMonitor.BHasCurrentFPS() ? this.m_fpsMonitor.GetCurrentFPS().toFixed(1) : (0, C.Xx)("#DASHPlayerStats_Tracking"); } GetPlaybackRateForDisplay() { return this.m_nPlaybackRate.toFixed(1) + "x"; } GetFPSMonitor() { return this.m_fpsMonitor; } SetHTMLVideoPlayerDisplay(e, t, n, i) { this.m_htmlVideoResolution != i && ((this.m_htmlVideoResolution = i), (this.m_strHtmlVideoDisplay = n + "x" + i)), this.m_nPlaybackVideoResolution != t && ((this.m_nPlaybackVideoResolution = t), (this.m_strPlaybackVideoResolution = e + "x" + t)); } SetVideoPlaybackResolution(e, t, n) { 0 == this.m_videoResolution && ((this.m_allTimeSnapshot.m_nInitialVideoResolution = t), (this.m_rgSnapShots[this.m_rgSnapShots.length - 1].m_nInitialVideoResolution = t)), (this.m_strBufferingVideoResolution = e + "x" + t + "@" + n), (this.m_videoResolution = t), (this.m_frameRate = n); } SetRepresentation(e) { e && (e.nAudioSamplingRate ? ((this.m_audioRate = Math.round(e.nBandwidth / 1e3)), (this.m_audioChannel = e.nAudioChannels), (this.m_nAudioBandwidth = e.nBandwidth)) : e.nFrameRate && (this.SetVideoPlaybackResolution(e.nWidth, e.nHeight, e.nFrameRate), (this.m_nVideoBandwidth = e.nBandwidth)), (this.m_nBandwidthRequired = this.m_nAudioBandwidth + this.m_nVideoBandwidth)); } SetCurrentVideoBandwidth(e) { this.m_nCurBandwidthVideo = e; } SetSegmentDurationMS(e) { this.m_nSegmentDurationMS = e; } SetBroadcasterAndViewerInfo(e, t, n, i, o) { (this.m_steamIDBroadcast = e), (this.m_steamIDViewer = t), (this.m_broadcastID = n), (this.m_ulViewerToken = i), (this.m_strCDNAuthUrlParameters = o); } SetAnalyticLinks(e, t, n) { (this.m_strStatsLink = e), (this.m_strStalledLink = t), (this.m_strEventLogLink = n); } SetVideoInitializationURL(e) { let t = new URL(e); (this.m_host = t.hostname), (this.m_strBroadcastOrigin = t.searchParams.get("broadcast_origin") || ""); let n = this.m_strBroadcastOrigin.indexOf(":"); -1 !== n && (this.m_strBroadcastOrigin = this.m_strBroadcastOrigin.substr(0, n)); } SetAudioRate(e) { this.m_audioRate = e; } CaptureFrequentlyUpdatingInformation(e, t) { let n = this.ExtractFrameInfo(e); this.LogFrameInfo(n), this.LogBufferDuration(t, e); } LogDownload(e, t) { this.m_allTimeSnapshot.SegmentReceived(e, t), this.m_rgSnapShots[this.m_rgSnapShots.length - 1].SegmentReceived(e, t); } LogSegmentDownloadFailure(e, t) { (this.m_allTimeSnapshot.m_nFailedSegments += 1), (this.m_rgSnapShots[this.m_rgSnapShots.length - 1].m_nFailedSegments += 1), (this.m_allTimeSnapshot.m_nLastSegementDownloadStatus = t), (this.m_rgSnapShots[this.m_rgSnapShots.length - 1].m_nLastSegementDownloadStatus = t), this.LogDownload(0, e); } LogVideoError(e) {} LogVideoOnCanPlay(e) { -1 === this.m_nTimeToFirstFrameMS && (this.m_nTimeToFirstFrameMS = Date.now() - this.m_allTimeSnapshot.m_timeMS); } LogErrorEvent(e, t) {} ReportVideoStalled(e, t) { if (0 == this.m_strStalledLink.length) return; let n = this.FindBehindSegmentLoader(e, t); if (!n) return void (0, h.hB)("DASHStats: Did not find any audio or video loaders"); (this.m_allTimeSnapshot.m_nStallEvents += 1), (this.m_rgSnapShots[this.m_rgSnapShots.length - 1].m_nStallEvents += 1); let i = new R(); this.GatherCommonStats(i, t, n.GetBandwidthRequired(), n.GetAvgDownloadRate()), (i.last_segment_response = this.m_rgSnapShots[this.m_rgSnapShots.length - 1].m_nLastSegementDownloadStatus), (i.audio_stalled = n.ContainsAudio()), this.CaptureActiveDownloads(e), (i.active_downloads = this.m_nActiveDownloads), (i.vid_down_progress = this.m_nVideoDownloadProgress); let o = n.GetDownloadHistory(), r = 0; for (let e = o.length - 1; e >= 0 && r < 3; --e) ++r, (i["segment" + r + "_bytes"] = o[e].cubData), (i["segment" + r + "_time"] = Math.round(o[e].nDownloadMS) / 1e3); this.SendReportToServer(i, this.m_strStalledLink); } FindBehindSegmentLoader(e, t) { let n = !1, i = !1, o = t.currentTime, r = null, a = null; for (let t of e) (a = t.ContainsAudio() ? t : a), (r = t.ContainsVideo() ? t : a), t.BHasEnoughBuffered(o) && ((i = i || t.ContainsAudio()), (n = n || t.ContainsVideo())); return (i = i || null == a), !n || (n && i) ? r : a; } ExtractFrameInfo(e) { let t = 0, n = 0; if (e.getVideoPlaybackQuality) try { let i = e.getVideoPlaybackQuality(); (n = i.totalVideoFrames), (t = i.droppedVideoFrames); } catch (e) { (0, h.hB)("Browser does not support HTMLVideoElement.getVideoPlaybackQuality()", e.message); } else e.webkitDecodedFrames ? ((n = e.webkitDecodedFrames), (t = e.webkitDroppedFrames)) : e.webkitDecodedFrameCount && ((n = e.webkitDecodedFrameCount), (t = e.webkitDroppedFrameCount)); return { framesDecoded: n, framesDropped: t }; } LogFrameInfo(e) { (this.m_allTimeSnapshot.m_nFramesDecoded = e.framesDecoded), (this.m_allTimeSnapshot.m_nFramesDropped = e.framesDropped); let t = this.m_rgSnapShots[this.m_rgSnapShots.length - 1]; if (1 == this.m_rgSnapShots.length) (t.m_nFramesDecoded = e.framesDecoded), (t.m_nFramesDropped = e.framesDropped); else { let n = this.m_rgSnapShots[this.m_rgSnapShots.length - 2]; (t.m_nFramesDecoded = e.framesDecoded - n.m_nFramesDecoded), (t.m_nFramesDropped = e.framesDropped - n.m_nFramesDropped); } } LogBufferDuration(e, t) { this.m_nActiveDownloads = 0; for (let n of e) n.ContainsAudio() ? ((this.m_nAudioBufferedMS = n.GetAmountBufferedMS(t.currentTime)), (this.m_audioBufferedRanges = n.GetSourceBufferTimeRanges())) : n.ContainsVideo() && ((this.m_nVideoBufferedMS = n.GetAmountBufferedMS(t.currentTime)), (this.m_videoBufferedRanges = n.GetSourceBufferTimeRanges())), (this.m_nActiveDownloads += n.GetActiveDownloads()), n.ContainsVideo() && (this.m_nVideoDownloadProgress = n.GetActiveDownloadProgress()); this.m_nPlaybackRate = t.playbackRate; } CaptureActiveDownloads(e) { this.m_nActiveDownloads = 0; for (let t of e) (this.m_nActiveDownloads += t.GetActiveDownloads()), t.ContainsVideo() && (this.m_nVideoDownloadProgress = t.GetActiveDownloadProgress()); } ReportPlayerStats(e, t) { if (0 == this.m_strStatsLink.length) return; let n = this.ExtractFrameInfo(t); if (n.framesDecoded == this.m_allTimeSnapshot.m_nFramesDecoded && 0 == this.m_rgSnapShots[this.m_rgSnapShots.length - 1].m_nBytesReceived) return void this.CreateNewEmptySnapshot(t.videoHeight); this.LogFrameInfo(n), this.LogBufferDuration(e, t); let i = new w(), o = this.m_rgSnapShots[this.m_rgSnapShots.length - 1]; (i.frames_decoded = o.m_nFramesDecoded), (i.frames_dropped = o.m_nFramesDropped), (i.bytes_received = o.m_nBytesReceived), (i.seconds_delta = Math.round((Date.now() - o.m_timeMS) / 1e3)), (i.failed_segments = o.m_nFailedSegments), (i.bw_min = o.m_nBandwidthMin), (i.bw_max = o.m_nBandwidthMax), (i.audio_buffer = Math.round(this.m_nAudioBufferedMS / 1e3)), (i.video_buffer = Math.round(this.m_nVideoBufferedMS / 1e3)), (i.seg_time_avg = Math.round(o.GetAverageDownloadTime()) / 1e3), (i.seg_time_min = Math.round(o.m_nSegmentDownloadTimeMinMS) / 1e3), (i.seg_time_max = Math.round(o.m_nSegmentDownloadTimeMaxMS) / 1e3), (i.initial_vid_res = o.m_nInitialVideoResolution), (i.ttff = this.m_nTimeToFirstFrameMS), (i.seg_duration = this.m_nSegmentDurationMS), this.GatherCommonStats(i, t, this.m_nBandwidthRequired, o.GetAverageBandwidth()), this.CreateNewEmptySnapshot(t.videoHeight), this.SendReportToServer(i, this.m_strStatsLink); } SendReportToServer(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = new URL(t), i = new FormData(); for (let t of Object.keys(e)) i.append(t, e[t]); i.append("l", n.searchParams.get("l")), i.append("e", n.searchParams.get("e")), i.append("h", n.searchParams.get("h")), (0, h.hB)("CDASHStats Sending Report to Server", e), r() .post(t, i) .catch((e) => { (0, h.hB)("Failed to upload stats: ", e); }); }); } CreateNewEmptySnapshot(e) { this.m_rgSnapShots.length >= 5 && this.m_rgSnapShots.shift(), this.m_rgSnapShots.push(new M(e)); } GatherCommonStats(e, t, n, i) { (e.steamid = this.m_steamIDViewer), (e.host = this.m_host), (e.playback_position = Math.round(t.currentTime)), (e.video_res = this.m_videoResolution), (e.audio_rate = this.m_audioRate), (e.audio_ch = this.m_audioChannel), (e.bw_required = n), (e.bw_avg = Math.round(i)), (e.broadcast_accountid = this.m_steamIDBroadcast ? new I.K(this.m_steamIDBroadcast).GetAccountID() : 0), (e.useragent = window.navigator.userAgent), (e.sessionid = b.De.SESSIONID), (e.broadcast_origin = this.m_strBroadcastOrigin); } } (0, i.gn)([a.LO], A.prototype, "m_allTimeSnapshot", void 0), (0, i.gn)([a.LO], A.prototype, "m_strBufferingVideoResolution", void 0), (0, i.gn)([a.LO], A.prototype, "m_strPlaybackVideoResolution", void 0), (0, i.gn)([a.LO], A.prototype, "m_strHtmlVideoDisplay", void 0), (0, i.gn)([a.LO], A.prototype, "m_nBandwidthRequired", void 0), (0, i.gn)([a.LO], A.prototype, "m_nCurBandwidthVideo", void 0), (0, i.gn)([a.LO], A.prototype, "m_nAudioBufferedMS", void 0), (0, i.gn)([a.LO], A.prototype, "m_nVideoBufferedMS", void 0), (0, i.gn)([a.LO], A.prototype, "m_nActiveDownloads", void 0), (0, i.gn)([a.LO], A.prototype, "m_nVideoDownloadProgress", void 0), (0, i.gn)([a.LO], A.prototype, "m_videoBufferedRanges", void 0), (0, i.gn)([a.LO], A.prototype, "m_audioBufferedRanges", void 0), (0, i.gn)([a.LO], A.prototype, "m_nPlaybackRate", void 0), (0, i.gn)([a.aD], A.prototype, "SetVideoPlaybackResolution", null), (0, i.gn)([a.aD], A.prototype, "SetRepresentation", null), (0, i.gn)([a.aD], A.prototype, "SetCurrentVideoBandwidth", null), (0, i.gn)([a.aD], A.prototype, "CaptureFrequentlyUpdatingInformation", null), (0, i.gn)([a.aD], A.prototype, "LogDownload", null), (0, i.gn)([a.aD], A.prototype, "LogSegmentDownloadFailure", null), (0, i.gn)([a.aD], A.prototype, "LogFrameInfo", null), (0, i.gn)([a.aD], A.prototype, "LogBufferDuration", null); class M { constructor(e) { (this.m_timeMS = Date.now()), (this.m_nBytesReceived = 0), (this.m_nInitialVideoResolution = 0), (this.m_nFailedSegments = 0), (this.m_nStallEvents = 0), (this.m_nEntries = 0), (this.m_nSegmentDownloadTimeTotalMS = 0), (this.m_nSegmentDownloadTimeMaxMS = 0), (this.m_nSegmentDownloadTimeMinMS = 0), (this.m_nBandwidthTotal = 0), (this.m_nBandwidthMin = 0), (this.m_nBandwidthMax = 0), (this.m_nLastSegementDownloadStatus = 200), (this.m_nFramesDecoded = 0), (this.m_nFramesDropped = 0), (0, a.rC)(this), (this.m_nInitialVideoResolution = e); } GetAverageBandwidth() { return this.m_nBandwidthTotal / Math.max(1, this.m_nEntries); } GetAverageDownloadTime() { return this.m_nSegmentDownloadTimeTotalMS / Math.max(1, this.m_nEntries); } GetAverageBandwidthFromTwo(e) { return (e.m_nBandwidthTotal + this.m_nBandwidthTotal) / Math.max(1, e.m_nEntries + this.m_nEntries); } GetAverageDownloadTimeFromTwo(e) { return (e.m_nSegmentDownloadTimeTotalMS + this.m_nSegmentDownloadTimeTotalMS) / Math.max(1, e.m_nEntries + this.m_nEntries); } SegmentReceived(e, t) { if (((this.m_nBytesReceived += e), e < 1024)) return; let n = Math.round((8 * e * 1e3) / Math.max(t, 1)); 0 == this.m_nEntries ? ((this.m_nSegmentDownloadTimeMinMS = t), (this.m_nBandwidthMin = n)) : ((this.m_nSegmentDownloadTimeMinMS = Math.min(t, this.m_nSegmentDownloadTimeMinMS)), (this.m_nBandwidthMin = Math.min(n, this.m_nBandwidthMin))), (this.m_nBandwidthMax = Math.max(n, this.m_nBandwidthMax)), (this.m_nSegmentDownloadTimeMaxMS = Math.max(t, this.m_nSegmentDownloadTimeMaxMS)), (this.m_nBandwidthTotal += n), (this.m_nSegmentDownloadTimeTotalMS += t), (this.m_nEntries += 1); } } (0, i.gn)([a.LO], M.prototype, "m_nBytesReceived", void 0), (0, i.gn)([a.LO], M.prototype, "m_nFailedSegments", void 0), (0, i.gn)([a.LO], M.prototype, "m_nStallEvents", void 0), (0, i.gn)([a.LO], M.prototype, "m_nSegmentDownloadTimeMaxMS", void 0), (0, i.gn)([a.LO], M.prototype, "m_nSegmentDownloadTimeMinMS", void 0), (0, i.gn)([a.LO], M.prototype, "m_nBandwidthMin", void 0), (0, i.gn)([a.LO], M.prototype, "m_nBandwidthMax", void 0), (0, i.gn)([a.LO], M.prototype, "m_nFramesDecoded", void 0), (0, i.gn)([a.LO], M.prototype, "m_nFramesDropped", void 0), (0, i.gn)([a.aD], M.prototype, "SegmentReceived", null); class k { reset(e, t) { (this.bDropReading = e), (this.nTotalDecodedFrames = t); } } class T { constructor() { (this.k_nTestFrequencyMS = 1e3), (this.k_nSlidingWindow = 6), (this.k_nDroppedFramesThreshold = 1), (this.k_nFailThreshold = 3), (this.k_nIgnoreReadingAroundResizeMS = 2e3), (this.m_schTracker = new g.Ar()), (this.m_rgResultsWindow = []), (this.m_nLastResizeMS = 0), (this.m_bDroppingFrameDetected = !1), (this.m_nCurrentFPS = 0), (0, a.rC)(this); } StartTracking(e) { this.m_schTracker.Schedule(this.k_nTestFrequencyMS, this.TakeReading), (this.m_fnRequestDecoded = e), (this.m_lastFrameInfo = this.m_fnRequestDecoded()), (this.m_bDroppingFrameDetected = !1); } BHasCurrentFPS() { return 0 != this.m_nCurrentFPS; } GetCurrentFPS() { return this.m_nCurrentFPS; } BIsDroppingFrames() { return this.m_bDroppingFrameDetected; } SetWindowResized() { this.m_nLastResizeMS = Date.now(); } BIsInResizeTimeWindow() { return this.m_nLastResizeMS && Date.now() - this.m_nLastResizeMS < this.k_nIgnoreReadingAroundResizeMS; } Close() { this.m_schTracker.Cancel(), (this.m_rgResultsWindow = []), (this.m_bDroppingFrameDetected = !1); } LogResizeAction() { this.m_nLastResizeMS = Date.now(); } TakeReading() { this.m_schTracker.Schedule(this.k_nTestFrequencyMS, this.TakeReading); let e = !1, t = this.m_fnRequestDecoded(); this.BIsInResizeTimeWindow() || (e = this.m_lastFrameInfo.framesDropped > 0 && t.framesDropped - this.m_lastFrameInfo.framesDropped > this.k_nDroppedFramesThreshold), this.AppendReading(e, t.framesDecoded), (this.m_bDroppingFrameDetected = this.ComputeDroppingFrames()), (this.m_nCurrentFPS = t.framesDecoded - this.m_lastFrameInfo.framesDecoded - (t.framesDropped - this.m_lastFrameInfo.framesDropped)), (this.m_lastFrameInfo = t); } ComputeDroppingFrames() { return this.m_rgResultsWindow.length == this.k_nSlidingWindow && this.m_rgResultsWindow.filter((e) => e.bDropReading).length >= this.k_nFailThreshold; } AppendReading(e, t) { let n; (n = this.m_rgResultsWindow.length >= this.k_nSlidingWindow ? this.m_rgResultsWindow.shift() : new k()), n.reset(e, t), this.m_rgResultsWindow.push(n); } } function L(e, t) { let n = e.getElementsByTagName("MPD"); return n && 1 == n.length ? n[0] : null; } function G(e, t) { for (let n = 0; n < e.children.length; n++) { let i = e.children[n]; if (i.tagName == t) return i; } return null; } function O(e, t) { let n = e.getAttribute(t); if (!n) return null; let i = new Date(n); return "[object Date]" === Object.prototype.toString.call(i) ? i : null; } function F(e, t) { let n = e.getAttribute(t); if (!n) return null; let i = 0, o = n.match(/(\d*)H/); return o && (i += 60 * parseFloat(o[1]) * 60), (o = n.match(/(\d*)M/)), o && (i += 60 * parseFloat(o[1])), (o = n.match(/(\d*\.?\d*)S/)), o && (i += parseFloat(o[1])), i; } function B(e, t) { let n = e.getAttribute(t); return n ? ((n = n.toLowerCase()), "true" == n || ("false" != n && null)) : null; } function x(e, t) { let n = e.getAttribute(t); return n ? parseInt(n) : null; } function N(e, t) { let n = e.getAttribute(t); return n || ""; } function P(e, t, n) { let i = { nTimeScale: x(e, "timescale"), nDuration: x(e, "duration"), nStartNumber: x(e, "startNumber"), strMedia: N(e, "media"), strInitialization: "" }; return t.bContainsGame ? (i.strInitialization = i.strMedia) : (i.strInitialization = N(e, "initialization")), i.nTimeScale && i.nDuration && i.nStartNumber && i.strMedia && i.strInitialization ? ((i.strMedia = W(i.strMedia, n)), (i.strInitialization = W(i.strInitialization, n)), i) : null; } function U(e, t, n) { return (e = (e = (e = e.replace("$RepresentationID$", t)).replace("$Number$", n.toString())).replace(/\$Number%(\d+)d\$/g, (e, t) => ((t = Number.parseInt(t)), (Array(t).join("0") + n.toString()).slice(-t)))); } function V(e) { return e.startsWith("http://") || e.startsWith("https://"); } function H(e, t) { let n = e; n.endsWith("/") || (n += "/"); let i = t.startsWith("/") ? 1 : 0; return n + t.substring(i); } function W(e, t) { return V(e) || !V(t) ? e : H(t, e); } function X(e) { return 0 == e.rgRoles.length || e.rgRoles.findIndex((e) => "main" == e) >= 0; } function j(e) { if (!e) return 0; let t = e.segmentTemplate; return 1e3 == t.nTimeScale ? t.nDuration : (t.nDuration / t.nTimeScale) * 1e3; } function z(e, t, n) { let i = j(t), o = n + ((1e3 * e.GetStartTime()) % i); return Math.floor(o / i) + t.segmentTemplate.nStartNumber; } function K(e) { return U(e.segmentTemplate.strInitialization, e.strID, 0); } (0, i.gn)([a.LO], T.prototype, "m_bDroppingFrameDetected", void 0), (0, i.gn)([a.LO], T.prototype, "m_nCurrentFPS", void 0), (0, i.gn)([a.aD.bound], T.prototype, "TakeReading", null); class q { constructor() { (this.m_strType = void 0), (this.m_nMinBufferTime = 0), (this.m_dtAvailabilityStartTime = null), (this.m_dtPublishTime = null), (this.m_nMinimumUpdatePeriod = 0), (this.m_nTimeShiftBufferDepth = 0), (this.m_nMediaPresentationDuration = 0), (this.m_strBaseURL = ""), (this.m_strStatsLink = ""), (this.m_strStalledLink = ""), (this.m_strEventLogLink = ""), (this.m_rgPeriods = null), (this.m_tsLiveContentStart = 0); } GetType() { return this.m_strType; } GetMinimumUpdatePeriod() { return this.m_nMinimumUpdatePeriod; } GetAvailabilityStartTime() { return this.m_dtAvailabilityStartTime; } GetPeriods() { return this.m_rgPeriods; } GetBaseURL() { return this.m_strBaseURL; } GetTimeShiftBufferDepth() { return this.m_nTimeShiftBufferDepth; } GetMinBufferTime() { return this.m_nMinBufferTime; } GetTimedTextAdaptionSet(e) { return e < 0 || e > this.m_rgPeriods.length ? [] : this.m_rgPeriods[e].rgAdaptationSets.filter((e) => e.bIsTimedText); } IsLiveContent() { return "dynamic" == this.GetType(); } GetAdaptationByTrackID(e) { if (!this.m_rgPeriods || 0 == this.m_rgPeriods.length) return null; let t = this.m_rgPeriods[0]; for (let n of t.rgAdaptationSets) if (e == n.strID) return n; return null; } GetVideoAdaption() { let e = this.m_rgPeriods[0]; for (let t of e.rgAdaptationSets) if (t.bContainsVideo) return t; return null; } GetStartTime() { return !this.IsLiveContent() && this.m_rgPeriods.length > 0 ? this.m_rgPeriods[0].nStart : 0; } GetEndTime() { if (!this.IsLiveContent()) { if (this.m_rgPeriods.length > 0 && this.m_rgPeriods[0].nDuration) return this.GetStartTime() + this.m_rgPeriods[0].nDuration; if (this.m_nMediaPresentationDuration > 0) return this.GetStartTime() + this.m_nMediaPresentationDuration; } return Number.MAX_VALUE; } GetLowestRepresentation(e) { let t = this.GetAdaptationByTrackID(e); if (!t) return null; let n = t.rgRepresentations[0]; for (let e of t.rgRepresentations) e.nBandwidth < n.nBandwidth && (n = e); return n; } GetStatsLink() { return this.m_strStatsLink; } GetStalledLink() { return this.m_strStalledLink; } GetEventLink() { return this.m_strEventLogLink; } StartLiveContentNow(e) { this.m_tsLiveContentStart = performance.now() - e; } GetDurationSinceStarted() { return performance.now() - this.m_tsLiveContentStart; } ParseRepresentation(e, t, n, i) { const o = t; let r = { strID: N(e, "id"), strMimeType: N(e, "mimeType"), strCodecs: N(e, "codecs"), nBandwidth: x(e, "bandwidth"), segmentTemplate: null }, a = G(e, "SegmentTemplate"); if (a) { let e = P(a, t, i); e && (r.segmentTemplate = e); } else r.segmentTemplate = Object.assign({}, n); if (!r.segmentTemplate) return (0, h.hB)("MPD - No segment template for representation"), null; if (o.bContainsVideo) { if (((r.nWidth = x(e, "width")), (r.nHeight = x(e, "height")), (r.nFrameRate = x(e, "frameRate")), (0, h.hB)(`representation: ${r.nWidth}w x ${r.nHeight}h x ${r.nFrameRate} fps`), !(r.strID && r.strMimeType && r.strCodecs && r.nBandwidth))) return (0, h.hB)("MPD - Representation Video Data Missing"), null; } else if (o.bContainsAudio) { r.nAudioSamplingRate = x(e, "audioSamplingRate"); let t = G(e, "AudioChannelConfiguration"); if ((t && (r.nAudioChannels = x(t, "value")), r.nAudioChannels || (r.nAudioChannels = 2), !(r.strID && r.strMimeType && r.strCodecs && r.nAudioSamplingRate && r.nAudioChannels))) return (0, h.hB)("MPD - Representation Audio Data Missing"), null; } return r; } BParse(e, t) { let n = new DOMParser().parseFromString(e, "application/xml"), i = L(n); if (!i) return !1; let o = i.getAttribute("type"); if (((this.m_nMinBufferTime = F(i, "minBufferTime")), "dynamic" == o)) { if (((this.m_strType = "dynamic"), (this.m_dtAvailabilityStartTime = O(i, "availabilityStartTime")), (this.m_dtPublishTime = O(i, "publishTime")), (this.m_nMinimumUpdatePeriod = F(i, "minimumUpdatePeriod")), (this.m_nTimeShiftBufferDepth = F(i, "timeShiftBufferDepth") || 0), !this.m_dtAvailabilityStartTime || !this.m_dtPublishTime || !this.m_nMinimumUpdatePeriod || null === this.m_nMinBufferTime)) return !1; } else { if ("static" != o) return (0, h.hB)("MPD - Unknown type"), !1; if (((this.m_strType = "static"), (this.m_nMediaPresentationDuration = F(i, "mediaPresentationDuration")), !this.m_nMinBufferTime || !this.m_nMediaPresentationDuration)) return (0, h.hB)("MPD - Missing Buffer Time or Presentation Duration"), !1; } let r = G(i, "BaseURL"); this.m_strBaseURL = r ? r.textContent : (function (e) { if (!V(e)) return ""; let t = new URL(e), n = t.pathname; return (n.indexOf(".mpd") >= 0 || n.endsWith("/")) && (n = n.substring(0, n.lastIndexOf("/"))), H(t.origin, n) + "/"; })(t); let a = G(i, "Analytics"); a && ((this.m_strStatsLink = N(a, "statslink")), (this.m_strStalledLink = N(a, "stalledlink")), (this.m_strEventLogLink = N(a, "eventlink"))); let s = n.getElementsByTagName("Period"); if (0 == s.length) return !1; let l = s[0], c = { strID: N(l, "id"), nStart: F(l, "start"), nDuration: F(l, "duration"), rgAdaptationSets: [] }; if (!c.strID || null === c.nStart) return (0, h.hB)("MPD - Missing Period Information."), !1; (this.m_rgPeriods = []), this.m_rgPeriods.push(c); let m = l.getElementsByTagName("AdaptationSet"); for (let e = 0; e < m.length; e++) { let t = m[e], n = N(t, "description"), i = N(t, "lang"), o = { bSegmentAlignment: B(t, "segmentAlignment"), bIsTimedText: "text/vtt" == N(t, "mimeType"), strLanguage: N(t, "lang"), bContainsVideo: !1, bContainsAudio: !1, bContainsGame: !1, strDescription: n || i, strForceSub: N(t, "forceSub"), strID: N(t, "id"), rgRoles: [], rgRepresentations: [], thumbnails: null }; if ((c.rgAdaptationSets.push(o), o.bIsTimedText)) { o.rgRoles.push("subtitle"); let e = t.getElementsByTagName("Role"); for (let t = 0; t < e.length; t++) { let n = N(e[t], "value"); n && "subtitle" != n && o.rgRoles.push(n); } let n = t.getElementsByTagName("Representation"); for (let e = 0; e < n.length; e++) { let t = n[e], i = { strID: N(t, "id"), nBandwidth: x(t, "bandwidth"), strClosedCaptionFile: "" }, r = G(t, "BaseURL"), a = r ? r.textContent : ""; if (!a) { (0, h.hB)("Closed Caption File has no BaseURL for (id): " + i.strID); continue; } (i.strClosedCaptionFile = U(a, i.strID, 0)), i.strClosedCaptionFile.startsWith("http") || (i.strClosedCaptionFile = this.m_strBaseURL + i.strClosedCaptionFile); ("store" != (0, b.Zv)() && "dev" != b.De.WEB_UNIVERSE) || (i.strClosedCaptionFile = b.De.STORE_BASE_URL + "vtt/video/" + i.strClosedCaptionFile.substring(40)), o.rgRepresentations.push(i); } continue; } if (!o.bSegmentAlignment) return (0, h.hB)("MPD - Only segment aligned dash manifests is supported"), !1; let r = t.getElementsByTagName("ContentComponent"); for (let e = 0; e < r.length; e++) { let t = N(r[e], "contentType"); "video" == t && (o.bContainsVideo = !0), "audio" == t && (o.bContainsAudio = !0), "game" == t && (o.bContainsGame = !0); } if (0 == r.length) { let e = N(t, "contentType"); "video" == e && (o.bContainsVideo = !0), "audio" == e && (o.bContainsAudio = !0); } if (o.bContainsVideo) { let e = G(t, "Thumbnails"); if (e) { let t = x(e, "sheet"), n = x(e, "period"); o.thumbnails = { nPeriod: n, strTemplate: N(e, "template"), nSheet: t, nSheetSeconds: t * n }; } } let a = t.getElementsByTagName("Role"); for (let e = 0; e < a.length; e++) { let t = N(a[e], "value"); t && o.rgRoles.push(t); } let s = null, l = G(t, "SegmentTemplate"); if (l) { let e = P(l, o, this.m_strBaseURL); if (!e) return (0, h.hB)("MPD - Failed to parse found Adaptation template"), !1; s = e; } let d = t.getElementsByTagName("Representation"); for (let e = 0; e < d.length; e++) { let t = d[e], n = this.ParseRepresentation(t, o, s, this.m_strBaseURL); if (!n) return !1; o.rgRepresentations.push(n); } } return !0; } BUpdate(e) { let t = new DOMParser().parseFromString(e, "application/xml"), n = L(t); if (!n) return !1; if (this.IsLiveContent()) { switch (N(n, "type")) { case "dynamic": break; case "static": (0, h.hB)("Converting MPD from dynamic to static"), (this.m_strType = "static"), (this.m_nMediaPresentationDuration = F(n, "mediaPresentationDuration")), (this.m_nMinBufferTime = F(n, "minBufferTime")), (this.m_dtAvailabilityStartTime = null), (this.m_dtPublishTime = null); } let e = t.getElementsByTagName("Period"); if (0 == e.length) return !1; let i = e[0].getElementsByTagName("AdaptationSet"); for (let e = 0; e < i.length; e++) { let t = i[e], n = N(t, "id"), o = this.GetAdaptationByTrackID(n); if (o) { let e = null, n = G(t, "SegmentTemplate"); if (n) { let t = P(n, o, this.m_strBaseURL); if (!t) return (0, h.hB)("MPD - Failed to parse found Adaptation template"), !1; e = t; } let i = t.getElementsByTagName("Representation"); if (i.length > 1) for (let t = 0; t < i.length; t++) { let n = i[t], r = this.ParseRepresentation(n, o, e, this.m_strBaseURL); if (!r) return (0, h.hB)("MPD - Failed to parse representation"), !1; let a = null; for (let e of o.rgRepresentations) if (r.strID == e.strID) { a = e; break; } a ? (a.segmentTemplate.strMedia = r.segmentTemplate.strMedia) : o.rgRepresentations.push(r); } break; } } } let i = G(n, "Analytics"); return i && ((this.m_strStatsLink = N(i, "statslink")), (this.m_strStalledLink = N(i, "stalledlink")), (this.m_strEventLogLink = N(i, "eventlink"))), !0; } } var Z; !(function (e) { (e[(e.None = 0)] = "None"), (e[(e.Append = 1)] = "Append"), (e[(e.Remove = 2)] = "Remove"); })(Z || (Z = {})); class Q { constructor(e, t, n, i) { (this.m_callbacks = null), (this.m_mpd = null), (this.m_adaptation = null), (this.m_mediaSource = null), (this.m_sourceBuffer = null), (this.m_nTrackBufferMS = 0), (this.m_representation = null), (this.m_eBufferUpdate = Z.None), (this.m_rgBufferedSegments = []), (this.m_bNeedInitSegment = !0), (this.m_nNextSegment = 0), (this.m_bRemoveBufferState = !1), (this.m_bSeekInProgress = !1), (this.m_tsLastBufferRemove = 0), (this.m_schNextDownload = new g.Ar()), (this.m_xhrDownload = null), (this.m_listeners = new g.G_()), (this.m_rgDownloadLog = []), (this.m_nCurDownloadProgress = 0), (this.m_nCurDownloadBitrate = 0), (this.m_nNumConsecutiveDownloadGones = 0), (this.m_rgGameDataFrames = []), (this.m_statsGameData = null), (this.m_callbacks = e), (this.m_mpd = t), (this.m_adaptation = n), (this.m_stats = i); } SetMediaSource(e) { this.m_mediaSource = e; } SetBufferMS(e) { this.m_nTrackBufferMS = e; } GetRepresentationsCount() { return this.m_adaptation.rgRepresentations.length; } GetRepresentationByID(e) { for (let t of this.m_adaptation.rgRepresentations) if (t.strID == e) return t; return null; } GetNumConsecutiveDownloadGones() { return this.m_nNumConsecutiveDownloadGones; } ContainsVideo() { return this.m_adaptation.bContainsVideo; } ContainsAudio() { return this.m_adaptation.bContainsAudio; } ContainsGame() { return this.m_adaptation.bContainsGame; } GetAdaptation() { return this.m_adaptation; } GetBandwidthRequired() { return this.m_representation.nBandwidth; } GetCurrentSegmentDurationMS() { return j(this.m_representation); } GetCurrentSegmentInitializationURL() { return K(this.m_representation); } BIsCurrentRepresentation(e) { return e && e.strID == this.m_representation.strID; } GetSourceBufferTimeRanges() { return this.m_sourceBuffer.buffered; } GetEstimatedAudioRate() { return this.m_representation && this.ContainsAudio() ? this.m_representation.nBandwidth : 0; } GetDebugName() { let e = []; return this.ContainsVideo() ? e.push("Video") : this.ContainsAudio() ? e.push("Audio") : this.ContainsGame() && e.push("Game"), e.join(" & ") + ":" + this.m_callbacks.GetCurrentPlayTime().toFixed(3).toString(); } GetMaxSegment() { if (this.m_mpd.IsLiveContent()) return Number.MAX_VALUE; { let e = this.m_mpd.GetEndTime() - this.m_mpd.GetStartTime(); return z(this.m_mpd, this.m_representation, 1e3 * e); } } GetAmountBufferedInPlayerMS(e) { if (!this.m_sourceBuffer) return 0; let t = this.m_sourceBuffer.buffered; if (0 == t.length) return 0; e < t.start(0) && (e = t.start(0)), e > t.end(0) && (e = t.end(0)); let n = t.end(0) - e; return Math.floor(1e3 * n); } GetAmountBufferedMS(e) { let t = this.GetAmountBufferedInPlayerMS(e); for (let e of this.m_rgBufferedSegments) t += e.nDurationMS; return t; } ChangeRepresentation(e) { if (this.m_adaptation.rgRepresentations.indexOf(e) < 0) return null; if (this.m_representation == e) return null; if ((this.ContainsVideo() && (0, h.hB)(`${this.GetDebugName()} changing representation to ${e.nHeight || 0}p at ${Math.ceil(e.nBandwidth / 1e3)}KB for segment ${this.m_nNextSegment}`), (this.m_representation = e), (this.m_bNeedInitSegment = !this.ContainsGame()), this.m_stats.SetRepresentation(e), this.ContainsGame())) return e; if (!this.m_sourceBuffer) { let t = e.strMimeType + ";codecs=" + e.strCodecs; (this.m_sourceBuffer = this.m_mediaSource.addSourceBuffer(t)), (0, h.hB)(t), this.m_listeners.AddEventListener(this.m_sourceBuffer, "updateend", this.OnSourceBufferUpdateEnd), this.m_listeners.AddEventListener(this.m_sourceBuffer, "error", this.OnSourceBufferError), this.m_listeners.AddEventListener(this.m_sourceBuffer, "abort", this.OnSourceBufferAbort); } return e; } Close() { this.m_listeners.Unregister(), (this.m_sourceBuffer = null), this.ForceStopDownloads(), (this.m_eBufferUpdate = Z.None), (this.m_bRemoveBufferState = !1), (this.m_callbacks = null), (this.m_mpd = null), (this.m_adaptation = null), (this.m_mediaSource = null), (this.m_nTrackBufferMS = 0), (this.m_representation = null), (this.m_rgBufferedSegments = []), (this.m_bNeedInitSegment = !0), (this.m_nNextSegment = 0), (this.m_bSeekInProgress = !1), (this.m_tsLastBufferRemove = 0), (this.m_rgDownloadLog = []), (this.m_stats = null), (this.m_rgGameDataFrames = []), (this.m_statsGameData = null); } GetActiveDownloads() { return this.m_xhrDownload ? 1 : 0; } GetActiveDownloadProgress() { return this.GetActiveDownloads() ? this.m_nCurDownloadProgress : 0; } OnSourceBufferUpdateEnd(e) { let t = this.m_callbacks.GetCurrentPlayTime(), n = this.GetAmountBufferedInPlayerMS(t); (0, h.hB)(`${this.GetDebugName()} OnSourceBufferUpdateEnd: [playback=${t}][buffered=${n}][start=${this.GetBufferedStart()}][end=${this.GetBufferedEnd()}]`); let i = this.m_eBufferUpdate; (this.m_eBufferUpdate = Z.None), i == Z.Append && this.m_callbacks.OnSegmentDownloaded(this), this.m_bSeekInProgress && i == Z.Remove && !this.m_bRemoveBufferState && this.ContinueSeek(), this.UpdateBuffer(); } OnSourceBufferError(e) { console.log("OnSourceBufferError", this.GetDebugName(), e), this.m_callbacks && this.m_callbacks.OnMediaSourceError(this); } OnSourceBufferAbort(e) { console.log("OnSourceBufferAbort", this.GetDebugName(), e); } ScheduleNextDownload() { if (this.m_bNeedInitSegment) return void this.DownloadNextSegment(); if ((this.m_schNextDownload.Cancel(), this.m_xhrDownload)) return void (0, h.hB)(`${this.GetDebugName()} ScheduleNextDownload - download already going`); if (this.m_bSeekInProgress) return void (0, h.hB)(`${this.GetDebugName()} ScheduleNextDownload - seeking`); if (this.m_nNextSegment > this.GetMaxSegment()) return void (0, h.hB)(`${this.GetDebugName()} ScheduleNextDownload - reached max segment`); let e = this.m_callbacks.GetCurrentPlayTime(), t = this.m_callbacks.GetPlaybackRate(), n = (function (e, t, n) { if (!e.IsLiveContent()) return 0; let i = j(t); return (n - t.segmentTemplate.nStartNumber + 1) * i - e.GetDurationSinceStarted(); })(this.m_mpd, this.m_representation, this.m_nNextSegment); if (n > 0) return (0, h.hB)(`${this.GetDebugName()} ScheduleNextDownload - segment in future`), void this.m_schNextDownload.Schedule(n, this.ScheduleNextDownload); let i = this.GetAmountBufferedMS(e); if ((t > 1 && (i /= t), i < 4e4)) return (0, h.hB)(`${this.GetDebugName()} ScheduleNextDownload - have ${i} buffered, desire 40000 - downloading now`), void this.DownloadNextSegment(); let o = 1.1 * j(this.m_representation), r = this.GetAmountBufferedInPlayerMS(this.m_callbacks.GetCurrentPlayTime()); (0, h.hB)(`${this.GetDebugName()} ScheduleNextDownload - buffered, schedule later [sleep=${o}ms][buffer=${r}]`), this.m_schNextDownload.Schedule(o, this.ScheduleNextDownload); } DownloadNextSegment() { this.m_schNextDownload.Cancel(); let e = "", t = 0, n = !1; if (this.m_bNeedInitSegment) (e = K(this.m_representation)), (t = 0), (n = !0); else { if (this.m_nNextSegment < 0) return void console.error("Attempting to download negative segment:", this.m_nNextSegment); (i = this.m_representation), (o = this.m_nNextSegment), (e = U(i.segmentTemplate.strMedia, i.strID, o)), (t = j(this.m_representation)), this.m_nNextSegment++; } var i, o; this.DownloadSegment(this.m_representation.strID, n, e, t); } DownloadSegment(e, t, n, o, a = performance.now()) { return (0, i.mG)(this, void 0, void 0, function* () { (0, _.X)(null === this.m_xhrDownload, "Trying to download another segment while a download is already in flight"), this.m_schNextDownload.Cancel(); const i = this.m_callbacks.GetCDNAuthURLParameter(); i && (n += i), (0, h.hB)(`${this.GetDebugName()} Downloading: ` + n); let s, l = null, c = performance.now(), m = r().CancelToken.source(); try { (this.m_nCurDownloadProgress = 0), (this.m_xhrDownload = m); let e = { cancelToken: this.m_xhrDownload.token, timeout: 15e3, responseType: "arraybuffer", onDownloadProgress: (e) => { (this.m_nCurDownloadProgress = e.loaded / e.total), (this.m_nCurDownloadBitrate = (8 * e.loaded * 1e3) / Math.max(1, performance.now() - c)); }, }; this.ContainsGame() && (e.responseType = "json"), (l = yield r().get(n, e)); } catch (e) { (s = e), (l = e.response); } if (!this.m_xhrDownload || this.m_xhrDownload != m) return void (0, h.hB)(`Throwing away cancelled download: ${n}`); s && (0, h.hB)(`${this.GetDebugName()} Failed to download segment: ${n}`, s); let d = performance.now(), u = Math.floor(performance.now() - c), p = l ? l.status : 0; if (((this.m_xhrDownload = null), this.m_bSeekInProgress)) return (0, h.hB)(`${this.GetDebugName()} Throwing away download due to seek: ${n}`), void this.ContinueSeek(); if (!l || 200 != l.status) return this.ContainsGame() ? void this.ScheduleNextDownload() : (this.m_stats.LogSegmentDownloadFailure(u, l ? l.status : 444), d - a > 9e3 ? ((0, h.hB)(`${this.GetDebugName()} HTTP download failed.. stopping loader: ${d - a}ms`), void this.DownloadFailed()) : 410 == p ? ((this.m_nNumConsecutiveDownloadGones += 1), (0, h.hB)(`${this.GetDebugName()} HTTP download gone.. informing the player: ${d - a}ms`), void this.DownloadGone()) : void this.m_schNextDownload.Schedule(500, () => this.DownloadSegment(e, t, n, o, a))); if (((this.m_nNumConsecutiveDownloadGones = 0), t && (this.m_bNeedInitSegment = !1), this.ContainsGame())) { let e = l.data; this.m_rgGameDataFrames || (this.m_rgGameDataFrames = []); let t = Number.MIN_VALUE, n = Number.MIN_VALUE; this.m_rgGameDataFrames.length > 0 && ((t = this.m_rgGameDataFrames[this.m_rgGameDataFrames.length - 1].pts), (n = this.m_rgGameDataFrames[this.m_rgGameDataFrames.length - 1].gdi)); const i = e.frame; i && (i.pts && i.gamedata && i.gdi ? (i.pts <= t ? (0, h.hB)("Invalid game pts") : i.gdi != n && this.m_rgGameDataFrames.push(i)) : (0, h.hB)("Invalid game data")), this.TrimGameDataIfNecessary(), (this.m_statsGameData = { nAppID: e.appid, ulBroadcastRelayID: e.broadcastrelayid, nSegmentID: e.segmentid }); } else { let t = new Uint8Array(l.data); this.m_rgBufferedSegments.push({ nDurationMS: o, data: t, representationStrID: e }), this.LogDownload(c, t.length), this.UpdateBuffer(), (0, h.hB)(`HTTP ${p} (${u}ms, ${Math.floor(t.length / 1e3)}k): ${n}`); } this.ScheduleNextDownload(); }); } DownloadFailed() { this.m_callbacks.OnSegmentDownloadFailed(this); } DownloadGone() { this.m_callbacks.OnSegmentDownloadGone(this); } TrimGameDataIfNecessary() {} UpdateBuffer() { if (this.m_eBufferUpdate != Z.None) return; if (this.m_bRemoveBufferState) return void this.RemoveAllBuffers(); if (!this.m_sourceBuffer) return void (0, h.hB)("No source buffer?"); if (this.m_rgBufferedSegments.length > 0) { try { this.m_eBufferUpdate = Z.Append; let e = this.m_rgBufferedSegments[0]; this.m_sourceBuffer.appendBuffer(e.data), this.m_rgBufferedSegments.splice(0, 1); } catch (e) { "QuotaExceededError" === e.name ? ((this.m_eBufferUpdate = Z.None), (0, h.hB)(`${this.GetDebugName()} Buffer - QuotaExceededError`)) : (0, h.hB)(`${this.GetDebugName()} Buffer - Exception`, e); } return; } let e = performance.now(); if (!this.m_bSeekInProgress && e - this.m_tsLastBufferRemove > 1e4) { let t = this.GetBufferedStart(), n = this.m_callbacks.GetCurrentPlayTime() - 40; if (t < n) { let i = Math.min(this.GetBufferedEnd(), n); return void (i != t && ((this.m_eBufferUpdate = Z.Remove), this.m_sourceBuffer.remove(t, i), (this.m_tsLastBufferRemove = e))); } } } RemoveAllBuffers() { this.m_rgBufferedSegments = []; let e = 0; if (this.m_sourceBuffer) { let t = this.m_sourceBuffer.buffered; for (let n = 0; n < t.length; n++) e < t.end(n) && (e = t.end(n)); } (this.m_bRemoveBufferState = !1), (this.m_eBufferUpdate = Z.Remove), 0 != e ? this.m_sourceBuffer.remove(0, e + 1) : this.OnSourceBufferUpdateEnd(null); } GetBufferedStart() { return this.m_sourceBuffer && this.m_sourceBuffer.buffered && 0 != this.m_sourceBuffer.buffered.length ? this.m_sourceBuffer.buffered.start(0) : 0; } GetBufferedEnd() { return this.m_sourceBuffer && this.m_sourceBuffer.buffered && 0 != this.m_sourceBuffer.buffered.length ? this.m_sourceBuffer.buffered.end(0) : 0; } ForceStopDownloads() { this.m_schNextDownload.Cancel(), this.m_xhrDownload && (this.m_xhrDownload.cancel(), (this.m_xhrDownload = null)); } ForceRestartDownload() { this.ForceStopDownloads(), this.ScheduleNextDownload(); } Seek(e) { let t = this.GetBufferedStart(), n = this.GetBufferedEnd(), i = e < t || e > n; if ((0 == t && 0 == n && (i = !0), (0, h.hB)(`${this.GetDebugName()} making an ${i ? "unbuffered" : "buffered"} seek to ${e}`), !this.m_bSeekInProgress && !i && !this.m_bNeedInitSegment)) return void this.ScheduleNextDownload(); (this.m_bSeekInProgress = !0), this.ForceStopDownloads(); const o = e - this.m_mpd.GetStartTime(); let r = z(this.m_mpd, this.m_representation, 1e3 * o); if (((this.m_nNextSegment = Math.min(r, this.GetMaxSegment())), (0, h.hB)("Seek To Next Segment: " + this.m_nNextSegment + " at approx. " + (0, h.zB)(((this.m_nNextSegment - 1) * this.GetCurrentSegmentDurationMS()) / 1e3) + " seconds."), this.ContainsGame())) return (this.m_bSeekInProgress = !1), (this.m_rgGameDataFrames = []), void this.ScheduleNextDownload(); (this.m_bRemoveBufferState = !0), this.UpdateBuffer(); } ContinueSeek() { this.m_bSeekInProgress && (this.m_eBufferUpdate == Z.Remove || this.m_bRemoveBufferState || ((this.m_bSeekInProgress = !1), this.ScheduleNextDownload())); } BHasEnoughBuffered(e) { if (this.m_bSeekInProgress) return !1; if (this.ContainsGame()) return !0; let t = !this.m_xhrDownload && !this.m_schNextDownload.IsScheduled() && this.m_nNextSegment > this.GetMaxSegment(); return this.GetAmountBufferedInPlayerMS(e) >= this.m_nTrackBufferMS || t; } LogDownload(e, t) { this.m_rgDownloadLog.length >= 4 && this.m_rgDownloadLog.shift(); let n = performance.now() - e; n <= 0 || (this.m_rgDownloadLog.push({ cubData: t, nDownloadMS: n }), this.m_stats.LogDownload(t, n)); } GetDownloadHistory() { return this.m_rgDownloadLog; } GetAvgDownloadRate() { let e = 0, t = 0; for (let n of this.m_rgDownloadLog) (e += n.nDownloadMS), (t += n.cubData); return e <= 0 ? (this.m_nCurDownloadBitrate && this.GetActiveDownloads() > 0 ? this.m_nCurDownloadBitrate : 0) : (8 * t * 1e3) / e; } GetGameDataFrames() { return this.m_rgGameDataFrames; } GetLatestGameDataFrameAppID() { return this.m_statsGameData && this.m_statsGameData.nAppID ? this.m_statsGameData.nAppID : 0; } } (0, i.gn)([v.a], Q.prototype, "OnSourceBufferUpdateEnd", null), (0, i.gn)([v.a], Q.prototype, "OnSourceBufferError", null), (0, i.gn)([v.a], Q.prototype, "OnSourceBufferAbort", null), (0, i.gn)([v.a], Q.prototype, "ScheduleNextDownload", null), (0, i.gn)([v.a], Q.prototype, "DownloadNextSegment", null), (0, i.gn)([v.a], Q.prototype, "DownloadFailed", null), (0, i.gn)([v.a], Q.prototype, "DownloadGone", null); const $ = "auto"; var Y, J, ee; !(function (e) { (e[(e.HAVE_NOTHING = 0)] = "HAVE_NOTHING"), (e[(e.HAVE_METADATA = 1)] = "HAVE_METADATA"), (e[(e.HAVE_CURRENT_DATA = 2)] = "HAVE_CURRENT_DATA"), (e[(e.HAVE_FUTURE_DATA = 3)] = "HAVE_FUTURE_DATA"), (e[(e.HAVE_ENOUGH_DATA = 4)] = "HAVE_ENOUGH_DATA"); })(Y || (Y = {})), (function (e) { (e[(e.Invalid = 0)] = "Invalid"), (e[(e.StreamGone = 1)] = "StreamGone"); })(J || (J = {})), (function (e) { (e[(e.Absolute = 0)] = "Absolute"), (e[(e.FromAvailableStart = 1)] = "FromAvailableStart"); })(ee || (ee = {})); class te { constructor(e, t = !1) { (this.m_elVideo = null), (this.m_strMPD = ""), (this.m_strHLS = ""), (this.m_strCDNAuthURLParameters = null), (this.m_schUpdateMPD = new g.Ar()), (this.m_bUseHLSManifest = !1), (this.m_strVideoAdaptationID = ""), (this.m_strAudioAdaptationID = ""), (this.m_strGameAdaptationID = ""), (this.m_rgLoaders = []), (this.m_mediaSource = null), (this.m_nTrackBufferMS = 0), (this.m_nLimitFPS = 0), (this.m_bIsBuffering = !0), (this.m_seekingToTime = null), (this.m_listeners = new g.G_()), (this.m_bFirstPlay = !0), (this.m_bPlaybackStarted = !1), (this.m_nTimedText = 0), (this.m_schGameDataEventTrigger = new g.Ar()), (this.m_schReportPlayerTrigger = new g.Ar()), (this.m_nGameDataLastFramePTS = -1), (this.m_bStatsViewVisible = !1), (this.m_schCaptureDisplayStatsTrigger = new g.Ar()), (this.m_videoRepSelected = null), (this.m_nAudioRepresentationIndex = 0), (this.m_timedTextRepSelected = null), (this.m_stats = new A()), (this.m_bClosing = !1), (this.m_hlsTimeOffset = 0), (this.m_bUserPlayChoice = !0), (this.m_bUserLiveEdgeChoice = !0), (this.m_schFirstFrameThrottler = new g.Ar()), (this.m_bookMarkAdapter = null), (this.m_schBookmarkUpdater = new g.Ar()), (0, a.rC)(this), (this.m_elVideo = e), this.m_schReportPlayerTrigger.Schedule(3e4, this.ReportPlayerStats), (this.m_bUseHLSManifest = t); } CalcVideoStartRelativeToSystemClock(e) { let t = (e ? new Date(e).getTime() : Date.now()) - this.m_mpd.GetAvailabilityStartTime().getTime(); this.m_mpd.StartLiveContentNow(t), (0, h.hB)("server time: " + e); } GetMPDURL() { return this.m_strMPD; } PlayMPD(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { (this.m_strMPD = e), (this.m_strHLS = n), (this.m_strCDNAuthURLParameters = t); let i = yield this.DownloadMPD(); if (i) if (((this.m_mpd = new q()), this.m_mpd.BParse(i.data, e))) { if ((this.IsLiveContent() && (this.m_mpd.GetMinimumUpdatePeriod() > 0 && this.m_schUpdateMPD.Schedule(1e3 * this.m_mpd.GetMinimumUpdatePeriod(), this.UpdateMPD), this.CalcVideoStartRelativeToSystemClock(i.headers.date)), this.m_bUseHLSManifest)) return ( (this.m_elVideo.src = this.m_strHLS), this.m_elVideo.addEventListener("loadedmetadata", () => { (this.m_bIsBuffering = !1), this.BeginPlayback(); }), void document.addEventListener("visibilitychange", this.OnVisibilityChange) ); this.BCreateLoaders() ? (this.InitVideoControl(), this.InitTimedText()) : this.CloseWithError("playbackerror", "Failed to create segment loaders"); } else this.CloseWithError("playbackerror", "Failed to parse MPD file", this.m_strMPD); }); } InitTimedText() { let e = !0; (this.m_nTimedText = 0), this.m_mpd.GetTimedTextAdaptionSet(0).forEach((t) => { let n = (0, u.jM)(b.De.LANGUAGE); if (t.rgRepresentations.length > 0 && t.rgRepresentations[0].strClosedCaptionFile && C.is[t.strLanguage]) { const i = document.createElement("track"); (i.kind = "subtitles"), (i.label = (0, C.Xx)("#Language_" + (0, u.j_)(C.is[t.strLanguage]))), (i.srclang = t.strLanguage), (i.src = t.rgRepresentations[0].strClosedCaptionFile), (this.m_nTimedText += 1), 0 != n && C.is[t.strLanguage] == n && ((i.default = !0), (this.m_timedTextRepSelected = t.rgRepresentations[0]), (e = !1)), this.m_elVideo.appendChild(i), e && (i.addEventListener("load", () => { this.m_elVideo.textTracks && this.m_elVideo.textTracks.length > 0 && (this.m_elVideo.textTracks[0].mode = "disabled"); }), (e = !1)); } }); } SetSubtitles(e) { let t = null; for (let n = 0; n < this.m_elVideo.textTracks.length; n++) { const i = this.m_elVideo.textTracks[n]; if (C.is[i.language] == e) { let e = this.GetTimeTextAdaptions(0).filter((e) => e.strLanguage == i.language); e && e.length > 0 && e[0].rgRepresentations && (t = e[0].rgRepresentations[0]), (i.mode = "showing"); } else i.mode = "disabled"; } this.m_timedTextRepSelected = t; } PlayWebRTC(e, t, n, i, o) {} OnVisibilityChange() { "visible" === document.visibilityState && (this.m_elVideo.src = this.m_strHLS); } Close() { if (((this.m_bClosing = !0), this.m_listeners.Unregister(), this.m_bUseHLSManifest && document.removeEventListener("visibilitychange", this.OnVisibilityChange), this.StopDownloads(), this.m_elVideo && this.m_elVideo.pause(), this.m_mediaSource)) { try { "closed" != this.m_mediaSource.readyState && this.m_mediaSource.endOfStream(); } catch (e) {} this.m_mediaSource = null; } (this.m_bIsBuffering = !0), (this.m_elVideo = null), (this.m_strMPD = ""), (this.m_mpd = null), (this.m_bUseHLSManifest = !1), (this.m_strVideoAdaptationID = ""), (this.m_strAudioAdaptationID = ""), (this.m_strGameAdaptationID = ""), (this.m_nTrackBufferMS = 0), (this.m_nLimitFPS = 0), (this.m_seekingToTime = null), (this.m_nGameDataLastFramePTS = -1), (this.m_bStatsViewVisible = !1), (this.m_videoRepSelected = null), (this.m_nAudioRepresentationIndex = 0), this.m_stats && this.m_stats.GetFPSMonitor().Close(), (this.m_stats = null), (this.m_bFirstPlay = !0), (this.m_bPlaybackStarted = !1); } StopDownloads() { this.m_xhrUpdateMPD && (this.m_xhrUpdateMPD.cancel(), (this.m_xhrUpdateMPD = null)), this.m_schUpdateMPD.Cancel(), this.m_schGameDataEventTrigger.Cancel(), this.m_schReportPlayerTrigger.Cancel(), this.m_schCaptureDisplayStatsTrigger.Cancel(), this.m_schFirstFrameThrottler.Cancel(), this.m_schBookmarkUpdater.Cancel(), this.m_elVideo && 1 != this.m_elVideo.playbackRate && (this.m_elVideo.playbackRate = 1); for (let e of this.m_rgLoaders) e.Close(); (this.m_rgLoaders = []), (this.m_bIsBuffering = !0); } IsBuffering() { return this.m_bIsBuffering; } IsLiveContent() { return !!this.m_mpd && this.m_mpd.IsLiveContent(); } DownloadMPD() { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_xhrUpdateMPD) return (0, _.X)(!1, "Multiple MPD download requests"), null; let e = performance.now(); for (; performance.now() - e < 3e4; ) { let e = null; try { this.m_xhrUpdateMPD = r().CancelToken.source(); const t = this.m_strMPD + (this.m_strCDNAuthURLParameters ? this.m_strCDNAuthURLParameters : ""); e = yield r().get(t, { cancelToken: this.m_xhrUpdateMPD.token }); } catch (e) {} if (((this.m_xhrUpdateMPD = null), this.m_bClosing)) return null; if (e && 200 == e.status) return e; if (e && 410 == e.status) return this.CloseWithError("playbackerror", "Failed to download MPD: 410 Gone"), null; (0, h.hB)("Failed to download, will retry: " + this.m_strMPD), yield (0, S._R)(200); } return (0, h.hB)("Failed to download: " + this.m_strMPD), null; }); } UpdateMPD() { return (0, i.mG)(this, void 0, void 0, function* () { (0, h.hB)("Updating MPD in player from: " + this.m_strMPD); let e = yield this.DownloadMPD(); e && (this.m_mpd.BUpdate(e.data) ? (this.IsLiveContent() && this.CalcVideoStartRelativeToSystemClock(e.headers.date), this.m_stats.SetAnalyticLinks(this.m_mpd.GetStatsLink(), this.m_mpd.GetStalledLink(), this.m_mpd.GetEventLink()), this.m_mpd.GetMinimumUpdatePeriod() > 0 && this.m_schUpdateMPD.Schedule(1e3 * this.m_mpd.GetMinimumUpdatePeriod(), this.UpdateMPD)) : this.CloseWithError("playbackerror", "Failed to parse on Update the MPD file")); }); } CloseWithError(e, ...t) { this.Close(), (0, h.hB)(...t); } BCreateLoaders() { let e = this.m_mpd.GetPeriods(); if (0 == e.length) return !1; let t = e[0]; (this.m_strVideoAdaptationID = ""), (this.m_strAudioAdaptationID = ""), (this.m_strGameAdaptationID = ""); for (let e of t.rgAdaptationSets) { let t = null; if ((!this.m_strVideoAdaptationID && e.bContainsVideo && X(e) && ((t = e), (this.m_strVideoAdaptationID = e.strID)), !this.m_strAudioAdaptationID && e.bContainsAudio && X(e) && ((t = e), (this.m_strAudioAdaptationID = e.strID)), !this.m_strGameAdaptationID && e.bContainsGame && ((t = e), (this.m_strGameAdaptationID = e.strID)), t)) { let e = new Q(this, this.m_mpd, t, this.m_stats); this.m_rgLoaders.push(e); } } return this.m_strVideoAdaptationID.length > 0; } InitVideoControl() { let e = new MediaSource(), t = URL.createObjectURL(e); this.m_elVideo.pause(), (this.m_elVideo.srcObject = null), (this.m_elVideo.src = t), (this.m_mediaSource = e), this.m_listeners.AddEventListener(e, "sourceopen", this.OnMediaSourceOpen), this.m_listeners.AddEventListener(e, "sourceended", this.OnMediaSourceEnded), this.m_listeners.AddEventListener(e, "sourceclose", this.OnMediaSourceClose), this.m_listeners.AddEventListener(this.m_elVideo, "waiting", this.OnVideoWaiting), this.m_listeners.AddEventListener(this.m_elVideo, "error", this.OnVideoError), this.m_listeners.AddEventListener(this.m_elVideo, "canplay", this.OnVideoCanPlay), this.m_listeners.AddEventListener(this.m_elVideo, "pause", this.OnVideoPause), this.m_listeners.AddEventListener(this.m_elVideo, "resize", this.OnVideoResize), this.m_listeners.AddEventListener(this.m_elVideo, "valve-bufferupdate", this.OnVideoTimeUpdate), this.m_listeners.AddEventListener(this.m_elVideo, "timeupdate", this.OnVideoTimeUpdate), this.m_listeners.AddEventListener(this.m_elVideo, "play", this.OnPlayAction); } OnMediaSourceOpen(e) { (0, h.hB)("OnMediaSourceOpen"); for (let e of this.m_rgLoaders) e.SetMediaSource(this.m_mediaSource); this.BeginPlayback(); } HandleMediaSourceError(e) { this.m_bClosing || e.target != this.m_mediaSource || this.StopDownloads(); } OnMediaSourceEnded(e) { (0, h.hB)("OnMediaSourceEnded", e), this.HandleMediaSourceError(e); } OnMediaSourceClose(e) { (0, h.hB)("OnMediaSourceClose", e), this.HandleMediaSourceError(e); } OnVideoWaiting(e) { if (!this.IsLiveContent() && this.m_mpd && this.m_mpd.GetEndTime() - this.GetCurrentPlayTime() < 1) return (0, h.hB)(`pausing playback due to OnVideoWaiting (endTime=${this.m_mpd.GetEndTime()}, currentPlaytime=${this.GetCurrentPlayTime()} )`), void this.Pause(); if (!this.BIsPlayerBufferedBetween(this.m_elVideo.currentTime, this.m_elVideo.currentTime + 0.5)) { if (this.m_elVideo && this.m_elVideo.buffered.length > 1) { let e = this.m_elVideo.currentTime, t = this.m_elVideo.buffered; for (let n = 0; n < t.length; ++n) if (((0, h.hB)("OnVideoWaiting buffer " + n + " start:" + t.start(n) + " end: " + t.end(n) + " playerTime: " + e), t.start(n) <= e && e <= t.end(n))) return (0, h.hB)("OnVideoWaiting - time splitting, jumping to buffer " + n), void this.Seek(t.start(n)); } if ((this.m_stats.ReportVideoStalled(this.m_rgLoaders, this.m_elVideo), null === this.m_videoRepSelected)) { let e = !0, t = this.GetVideoLoader(); if (t) { let n = this.m_mpd.GetLowestRepresentation(this.GetCurrentVideoAdaptation().strID); n && !t.BIsCurrentRepresentation(n) && (t.ChangeRepresentation(n), (0, h.hB)("OnVideoWaiting - Stalled, forced restart download at resolution: " + n.nWidth + "x" + n.nHeight + "@" + n.nFrameRate + " instead"), (e = !1)), this.Seek(this.m_elVideo.currentTime); } e && (0, h.hB)("OnVideoWaiting - Stalled, already at lowest resolution. No action taken. BHasLoader: " + (null != t)); } else (0, h.hB)("OnVideoWaiting - Stalled, user explicitly chose a resolution: " + this.m_videoRepSelected.nWidth + "x" + this.m_videoRepSelected.nHeight + "@" + this.m_videoRepSelected.nFrameRate); } } OnVideoPause(e) { this.OnVideoBufferProgress(), this.m_stats.GetFPSMonitor().Close(), this.SendUpdateToBookmarkServiceIfNeeded(); } OnVideoResize(e) { this.m_stats.GetFPSMonitor().SetWindowResized(); } OnDebugPrintEventInfoAndAvailableBuffer(e) { let t = -1, n = this.GetVideoLoader(); this.m_elVideo && n && (t = n.GetAmountBufferedInPlayerMS(this.m_elVideo.currentTime)), (0, h.hB)("DebugMessage - Stats: " + e.type + " BufferedMS: " + t); } OnVideoError(e) { (0, h.hB)("OnVideoError"); } OnVideoCanPlay(e) { this.m_bIsBuffering || (this.m_bUserPlayChoice && this.PlayOnElement(), this.m_stats.LogVideoOnCanPlay(e)); } GetCurrentPlayTime() { if (this.m_seekingToTime) { if (!this.m_bPlaybackStarted && this.m_seekingToTime.eSeekType == ee.FromAvailableStart) return 0; let e = this.m_seekingToTime.eSeekType == ee.FromAvailableStart ? this.GetAvailableVideoStartTime() : 0; return this.m_seekingToTime.nTime + e; } return this.m_bUseHLSManifest && this.m_mpd ? (this.m_elVideo.currentTime > 0 && 0 === this.m_hlsTimeOffset && (this.m_hlsTimeOffset = this.GetBufferedLiveEdgeTime() - this.m_elVideo.currentTime), this.m_elVideo.currentTime + this.m_hlsTimeOffset) : this.m_elVideo.currentTime; } OnVideoTimeUpdate() { if (this.m_bUserLiveEdgeChoice && this.IsLiveContent()) { let e = this.GetBufferedLiveEdgeTime(); if (1 == this.m_elVideo.playbackRate && this.m_elVideo.currentTime <= e - 4.5 && this.BIsPlayerBufferedBetween(this.m_elVideo.currentTime, e)) { let t = e - this.m_elVideo.currentTime; (this.m_elVideo.playbackRate = 1.1), (0, h.hB)("User is behind by " + t.toFixed(2) + " seconds, increasing playback speed to catch-up to live edge."); } else 1.1 == this.m_elVideo.playbackRate && this.m_elVideo.currentTime >= e - 1 && ((this.m_elVideo.playbackRate = 1), (0, h.hB)("User is caught up, returning to normal playrate")); } } SetBookmarkAdapter(e) { this.m_bookMarkAdapter = e; } SendUpdateToBookmarkServiceIfNeeded() { if (this.m_bookMarkAdapter) { let e = this.m_elVideo.currentTime, t = this.GetCurrentVideoAdaptation(), n = t && t.strID ? t.strID : null, i = this.GetCurrentAudioAdaptationfunction(), o = i && i.strID ? i.strID : null, r = this.GetCurrentTimedTextRepresentation(), a = r && r.strID ? r.strID : null; this.m_bookMarkAdapter.SetBookmark(e >= 0 ? e : 0, n, o, a), this.IsPaused() ? this.m_schBookmarkUpdater.Cancel() : this.m_schBookmarkUpdater.Schedule(6e4, this.SendUpdateToBookmarkServiceIfNeeded); } } GetCurrentTimedTextRepresentation() { return this.m_timedTextRepSelected; } OnPlayAction() { this.SendUpdateToBookmarkServiceIfNeeded(); } BIsPlayerBufferedBetween(e, t) { return this.m_elVideo.buffered.length > 0 && e >= this.m_elVideo.buffered.start(0) && t <= this.m_elVideo.buffered.end(0); } GetLiveContentStartTime() { return this.m_mpd.GetAvailabilityStartTime(); } GetTimeTextAdaptions(e) { return this.m_mpd ? this.m_mpd.GetTimedTextAdaptionSet(e) : []; } GetAvailableVideoStartTime() { if (!this.m_mpd) return 0; let e = 0; if (this.IsLiveContent()) { let t = Math.floor(this.m_mpd.GetDurationSinceStarted() / 1e3), n = this.GetBufferedLiveEdgeTime(), i = this.m_mpd.GetTimeShiftBufferDepth(); (e = i ? t - i + 10 : 0), (e = f.Lh(e, 0, n)); } else e = this.m_mpd.GetStartTime(); return e; } GetBufferedLiveEdgeTime() { if (!this.m_mpd) return 0; let e = 0; return (e = this.IsLiveContent() ? Math.floor((this.m_mpd.GetDurationSinceStarted() - this.m_nTrackBufferMS) / 1e3) : this.m_mpd.GetEndTime()), e; } IsPaused() { return !this.m_bUserPlayChoice; } SetUserPlayChoice(e) { (this.m_bUserPlayChoice = e), this.DispatchEvent("valve-userpausechange"); } Play() { this.SetUserPlayChoice(!0), !this.IsLiveContent() && this.m_mpd && this.m_mpd.GetEndTime() - this.GetCurrentPlayTime() < 1 ? this.Seek(this.m_mpd.GetStartTime()) : this.Seek(this.GetCurrentPlayTime()); } Pause() { var e, t; (this.m_bUserLiveEdgeChoice = !1), 1.1 == (null === (e = this.m_elVideo) || void 0 === e ? void 0 : e.playbackRate) && (this.m_elVideo.playbackRate = 1), this.SetUserPlayChoice(!1), null === (t = this.m_elVideo) || void 0 === t || t.pause(); } GetPlaybackRate() { return this.m_elVideo.paused ? 0 : this.m_elVideo.playbackRate; } GetCDNAuthURLParameter() { return this.m_strCDNAuthURLParameters; } OnSegmentDownloaded(e) { (0, h.hB)(e.GetDebugName() + " OnSegmentDownloaded"), this.UpdateVideoRepresentation(this.m_videoRepSelected), this.OnVideoBufferProgress(), e == this.GetVideoLoader() && this.m_stats.SetCurrentVideoBandwidth(e.GetAvgDownloadRate()); } PlayOnElement() { let e = this.m_bFirstPlay; this.m_bFirstPlay = !1; let t = this.m_elVideo.play(); t ? t .then(() => { this.m_stats.GetFPSMonitor().StartTracking(() => this.m_stats.ExtractFrameInfo(this.m_elVideo)); }) .catch((t) => { e && this.DispatchEvent("valve-userinputneeded"); }) : this.m_stats.GetFPSMonitor().StartTracking(() => this.m_stats.ExtractFrameInfo(this.m_elVideo)); } OnVideoBufferProgress() { if (!this.IsBuffering()) return; let e = this.m_rgLoaders.length > 0, t = this.GetPlaybackStartTime(0); for (let n of this.m_rgLoaders) { if (!n.BHasEnoughBuffered(t)) { e = !1; break; } t = Math.max(t, n.GetBufferedStart()); } e && ((this.m_bIsBuffering = !1), (this.m_seekingToTime = null), this.m_elVideo.currentTime != t ? (this.m_elVideo.currentTime = t) : this.m_elVideo.paused && this.m_bUserPlayChoice && this.PlayOnElement(), this.DispatchEvent("valve-bufferupdate")); } OnSegmentDownloadFailed(e, t) { this.StopDownloads(), this.DispatchEvent("valve-downloadfailed", t); } OnSegmentDownloadGone(e) { this.m_bIsBuffering && e.GetNumConsecutiveDownloadGones() <= 3 ? this.Seek(this.GetCurrentPlayTime() + e.GetCurrentSegmentDurationMS() / 1e3) : ((0, h.hB)("OnSegmentDownloadGone: too many consecutive 'gone', erroring the download: " + e.GetNumConsecutiveDownloadGones()), this.OnSegmentDownloadFailed(e, J.StreamGone)); } OnMediaSourceError(e) { this.DispatchEvent("valve-playbackerror"); } GetCurrentAudioAdaptationfunction() { return this.m_mpd ? this.m_mpd.GetAdaptationByTrackID(this.m_strAudioAdaptationID) : null; } GetCurrentVideoAdaptation() { return this.m_mpd ? this.m_mpd.GetAdaptationByTrackID(this.m_strVideoAdaptationID) : null; } GetVideoLoader() { for (let e of this.m_rgLoaders) if (e.ContainsVideo()) return e; return null; } GetAudioLoader() { for (let e of this.m_rgLoaders) if (e.ContainsAudio()) return e; return null; } GetGameLoader() { for (let e of this.m_rgLoaders) if (e.ContainsGame()) return e; return null; } SetTrackBufferMS(e) { this.m_nTrackBufferMS = e; for (let t of this.m_rgLoaders) t.SetBufferMS(e); } BeginPlayback() { if (!this.m_bUseHLSManifest) { let e = this.PickStartingVideoRepresentation(); for (let t of this.m_rgLoaders) if (t.ContainsVideo()) { t.ChangeRepresentation(e); let n = t.GetCurrentSegmentDurationMS(); this.m_schFirstFrameThrottler.Schedule(n / 2, this.VerifyFirstSegmentDownloadProgress); } else if (t.ContainsAudio() || t.ContainsGame()) { let e = t.GetAdaptation().rgRepresentations.length > 0 ? t.GetAdaptation().rgRepresentations[0] : null; t.ChangeRepresentation(e); } } this.m_bPlaybackStarted = !0; let e = 0; if (this.IsLiveContent()) { let t = this.GetVideoLoader().GetCurrentSegmentDurationMS(), n = 1e3 * this.m_mpd.GetMinBufferTime(), i = Math.max(t, n); this.SetTrackBufferMS(i); let o = this.GetBufferedLiveEdgeTime(); (e = this.GetPlaybackStartTime(o)), (0, h.hB)(`Begin playback of live content [this.buffer=${this.m_nTrackBufferMS}][nStartTime=${e}][nLiveEdge=${o}]`); } else this.SetTrackBufferMS(8e3), (e = this.GetPlaybackStartTime(0)), this.m_bookMarkAdapter && ((e = this.m_bookMarkAdapter.GetBeginPlaytime()), this.m_mpd.GetEndTime() - e < 5 && (e = 0)), (0, h.hB)(`Begin playback of non-live content [this.buffer=${this.m_nTrackBufferMS}][nStartTime=${e}]`); (this.m_seekingToTime = null), (0, h.hB)("Starting playback at " + e), this.m_stats.SetSegmentDurationMS(this.GetVideoLoader().GetCurrentSegmentDurationMS()), this.m_stats.SetAnalyticLinks(this.m_mpd.GetStatsLink(), this.m_mpd.GetStalledLink(), this.m_mpd.GetEventLink()), this.m_stats.SetVideoInitializationURL(this.GetVideoLoader().GetCurrentSegmentInitializationURL()), this.Seek(e), this.GetGameLoader() && this.m_schGameDataEventTrigger.Schedule(500, this.GameDataEventTrigger); } VerifyFirstSegmentDownloadProgress() { let e = this.GetVideoLoader(); if (null === this.m_videoRepSelected && e && e.GetDownloadHistory().length <= 1 && e.GetActiveDownloads() > 0 && e.GetActiveDownloadProgress() < 0.55) { let t = this.DetermineBestVideoRepresentation(); t && !e.BIsCurrentRepresentation(t) && (e.ChangeRepresentation(t), e.ForceRestartDownload(), (0, h.hB)("Video download progressing too slowly, choosing " + t.nWidth + "x" + t.nHeight + "@" + t.nFrameRate + " instead")); } } PickStartingVideoRepresentation() { let e = this.GetVideoLoader(); if (!e) return null; let t = e.GetAdaptation(), n = null; for (let i = e.GetRepresentationsCount() - 1; i >= 0; i--) { let e = t.rgRepresentations[i], o = e.nFrameRate ? e.nFrameRate : 0; if (!(this.m_nLimitFPS > 0 && o > this.m_nLimitFPS) && ((n = e), this.GetVideoPlayerHeight() <= e.nHeight)) break; } return n; } DetermineBestVideoRepresentation() { let e = this.GetVideoLoader(), t = this.GetAudioLoader(), n = t && t != e ? t.GetEstimatedAudioRate() : 0, i = this.GetAvgLoaderDownloadRate(), o = e.GetRepresentationsCount() - 1, r = e.GetAdaptation().rgRepresentations[o]; for (let t = o - 1; t >= 0; t--) { let o = e.GetAdaptation().rgRepresentations[t], a = (o.nBandwidth + n) * this.m_elVideo.playbackRate * 1.15; if (i < a) { (0, h.hB)(`Video select: Skipping ${t} due to rate: [avg=${i}][required=${a}]`); continue; } let s = o.nFrameRate || 0; if (this.IsLiveContent() && s > 30) { let e = this.m_stats.GetFPSMonitor(); if (e.BIsDroppingFrames() || (e.BHasCurrentFPS() && Math.ceil(e.GetCurrentFPS()) < 29)) { (0, h.hB)(`Video select: Skipping ${t} due to dropping frames and high FPS representation: [fps:${s}]`); continue; } } if (this.m_nLimitFPS > 0 && s > this.m_nLimitFPS) { (0, h.hB)(`Video select: Skipping ${t} due to frame rate limit`); continue; } let l = r.nHeight || 0, c = o.nHeight || 0, m = this.GetVideoPlayerHeight(); if (m > 0 && l > 0) { if (c > ne(m)) break; } r = o; } return r; } UpdateVideoRepresentation(e) { if (e && this.m_videoRepSelected == e) return null; let t = this.GetVideoLoader(); if (!t) return null; if (this.IsBuffering()) return null; let n = this.DetermineBestVideoRepresentation(); return (this.m_videoRepSelected = null), t.ChangeRepresentation(n); } GetPlaybackStartTime(e) { if (!this.m_seekingToTime) return e; (0, _.X)(this.m_bPlaybackStarted, "Missing mpd info to calculate seek time"); let t = this.m_seekingToTime.eSeekType == ee.FromAvailableStart ? this.GetAvailableVideoStartTime() : 0; return this.m_seekingToTime.nTime + t; } CanSeek() { return !0; } SeekAndPlay(e) { return this.SetUserPlayChoice(!0), this.Seek(e); } Seek(e, t = ee.Absolute) { if (!this.m_bPlaybackStarted) return (this.m_seekingToTime = { nTime: e, eSeekType: t }), e; t == ee.FromAvailableStart && (e += this.GetAvailableVideoStartTime()); let n = this.GetAvailableVideoStartTime(), i = this.GetBufferedLiveEdgeTime(); const o = e; (e = f.Lh(e, n, i)) != o && (0, h.hB)(`Seek time ${o} was clamped to the range ${n} to ${i}`), (this.m_bUserLiveEdgeChoice = e >= i - 5); let r = this.m_elVideo.paused; if ((r || this.m_elVideo.pause(), this.m_bUseHLSManifest)) (this.m_elVideo.currentTime = e - this.m_hlsTimeOffset), this.m_elVideo.play(); else { (this.m_bIsBuffering = !0), (this.m_seekingToTime = { nTime: e, eSeekType: ee.Absolute }); for (let t of this.m_rgLoaders) t.ContainsGame() && (e = this.GetBufferedLiveEdgeTime()), t.Seek(e); this.DispatchEvent("valve-bufferupdate"), r && this.OnVideoBufferProgress(); } return e; } JumpTime(e) { return (e += this.GetCurrentPlayTime()), this.Seek(e); } GetVideoPlayerHeight() { return this.m_elVideo.clientHeight; } GetAvgLoaderDownloadRate() { let e = 0, t = 0, n = [this.GetVideoLoader()]; for (let i of n) i && ((e += i.GetAvgDownloadRate()), t++); return 0 == t ? 0 : e / t; } GameDataEventTrigger() { let e = this.GetGameLoader(); if (!e) return; let t = e.GetGameDataFrames(), n = -1; if (((n = t.length - 1), n >= 0)) { let i = t[n]; i.pts != this.m_nGameDataLastFramePTS && ((this.m_nGameDataLastFramePTS = i.pts), (i.gamedata.appid = e.GetLatestGameDataFrameAppID()), this.DispatchEvent("valve-gamedataupdate", i)); } this.m_schGameDataEventTrigger.Schedule(500, this.GameDataEventTrigger); } DispatchEvent(e, t = null) { let n = new CustomEvent(e, { cancelable: !0, bubbles: !0, detail: t }); this.m_elVideo ? this.m_elVideo.dispatchEvent(n) : console.error(`dashplayer: attempting to fire ${e} when elVideo not set`, t); } IsMuted() { return this.m_elVideo.muted; } SetMuted(e) { this.m_elVideo.muted = e; } SetVolume(e) { (e = f.Lh(e, 0, 1)), (this.m_elVideo.volume = e); } GetVolume() { return this.m_elVideo.volume; } GetDASHPlayerStats() { return this.m_stats; } ReportPlayerStats() { this.m_stats.ReportPlayerStats(this.m_rgLoaders, this.m_elVideo), this.m_schReportPlayerTrigger.Schedule(3e5, this.ReportPlayerStats); } SetStatsViewIsVisible(e) { e && !this.m_bStatsViewVisible ? (this.CaptureStatsForDisplay(), this.m_schCaptureDisplayStatsTrigger.Schedule(250, this.CaptureStatsForDisplay)) : !e && this.m_bStatsViewVisible && this.m_schCaptureDisplayStatsTrigger.Cancel(), (this.m_bStatsViewVisible = e); } CaptureStatsForDisplay() { this.m_stats.SetHTMLVideoPlayerDisplay(this.m_elVideo.videoWidth, this.m_elVideo.videoHeight, this.m_elVideo.clientWidth, this.m_elVideo.clientHeight), this.m_stats.CaptureFrequentlyUpdatingInformation(this.m_elVideo, this.m_rgLoaders), this.m_schCaptureDisplayStatsTrigger.Schedule(250, this.CaptureStatsForDisplay); } GetVideoRepresentations() { let e = []; if ((e.push({ id: $, displayName: "Auto", selected: null === this.m_videoRepSelected }), this.m_bUseHLSManifest)) return e; let t = this.GetCurrentVideoAdaptation(); if (t) for (let n of t.rgRepresentations) { let t = this.m_videoRepSelected && this.m_videoRepSelected.strID == n.strID, i = n.nFrameRate; i > 50 && n.nFrameRate < 70 ? (i = 60) : i > 25 && i < 35 && (i = 30); let o = `${n.nWidth}x${n.nHeight} @ ${i}fps`; e.push({ id: n.strID, displayName: o, selected: t, width: n.nWidth, fps: i }); } return e.sort((e, t) => (e.width === t.width ? t.fps - e.fps : t.width - e.width)), e; } SetVideoRepresentation(e) { let t = !0, n = this.GetVideoLoader(); if (e && e.id != $) { let i = n.GetRepresentationByID(e.id); i && ((t = !1), (null !== this.m_videoRepSelected && this.m_videoRepSelected.strID == i.strID) || ((this.m_videoRepSelected = i), n.ChangeRepresentation(i), this.Seek(this.GetCurrentPlayTime()))); } t && (this.m_videoRepSelected = null); } GetThumbnailForTimestamp(e) { return ""; } BHasTimedText() { return this.m_nTimedText > 0; } } function ne(e) { return e < 360 ? 480 : e < 480 ? 720 : 4320; } (0, i.gn)([a.LO], te.prototype, "m_nTimedText", void 0), (0, i.gn)([a.aD], te.prototype, "InitTimedText", null), (0, i.gn)([v.a], te.prototype, "OnVisibilityChange", null), (0, i.gn)([v.a], te.prototype, "UpdateMPD", null), (0, i.gn)([v.a], te.prototype, "OnMediaSourceOpen", null), (0, i.gn)([v.a], te.prototype, "HandleMediaSourceError", null), (0, i.gn)([v.a], te.prototype, "OnMediaSourceEnded", null), (0, i.gn)([v.a], te.prototype, "OnMediaSourceClose", null), (0, i.gn)([v.a], te.prototype, "OnVideoWaiting", null), (0, i.gn)([v.a], te.prototype, "OnVideoPause", null), (0, i.gn)([v.a], te.prototype, "OnVideoResize", null), (0, i.gn)([v.a], te.prototype, "OnDebugPrintEventInfoAndAvailableBuffer", null), (0, i.gn)([v.a], te.prototype, "OnVideoError", null), (0, i.gn)([v.a], te.prototype, "OnVideoCanPlay", null), (0, i.gn)([v.a], te.prototype, "GetCurrentPlayTime", null), (0, i.gn)([v.a], te.prototype, "OnVideoTimeUpdate", null), (0, i.gn)([v.a], te.prototype, "SendUpdateToBookmarkServiceIfNeeded", null), (0, i.gn)([v.a], te.prototype, "OnPlayAction", null), (0, i.gn)([v.a], te.prototype, "GetPlaybackRate", null), (0, i.gn)([v.a], te.prototype, "GetCDNAuthURLParameter", null), (0, i.gn)([v.a], te.prototype, "OnSegmentDownloaded", null), (0, i.gn)([v.a], te.prototype, "PlayOnElement", null), (0, i.gn)([v.a], te.prototype, "OnSegmentDownloadFailed", null), (0, i.gn)([v.a], te.prototype, "OnSegmentDownloadGone", null), (0, i.gn)([v.a], te.prototype, "OnMediaSourceError", null), (0, i.gn)([v.a], te.prototype, "VerifyFirstSegmentDownloadProgress", null), (0, i.gn)([v.a], te.prototype, "GameDataEventTrigger", null), (0, i.gn)([v.a], te.prototype, "ReportPlayerStats", null), (0, i.gn)([a.aD.bound], te.prototype, "CaptureStatsForDisplay", null); class ie { constructor(e) { (this.m_elVideo = null), (this.m_peerConnection = null), (this.m_strBroadcastSteamID = void 0), (this.m_ulWebRTCSessionID = void 0), (this.m_schCandidateTimer = new g.Ar()), (this.m_nHostCandidateGeneration = void 0), (this.m_nCandidateUpdateIntervalMS = void 0), (this.m_listeners = new g.G_()), (this.m_bFirstPlay = !0), (this.m_bStatsViewVisible = !1), (this.m_schCaptureDisplayStatsTrigger = new g.Ar()), (this.m_stats = new A()), (0, a.rC)(this), (this.m_elVideo = e); } PlayMPD(e) { return (0, i.mG)(this, void 0, void 0, function* () {}); } PlayWebRTC(e, t, n, o, a) { return (0, i.mG)(this, void 0, void 0, function* () { (this.m_strBroadcastSteamID = e), (this.m_ulWebRTCSessionID = n), (this.m_nHostCandidateGeneration = 0), this.m_listeners.AddEventListener(this.m_elVideo, "pause", this.OnVideoPause), this.m_listeners.AddEventListener(this.m_elVideo, "resize", this.OnVideoResize); let s = { iceServers: [{ urls: ["stun:" + o] }, { urls: ["turn:" + o], username: t, credential: n }], iceTransportPolicy: "relay" }; (this.m_peerConnection = new RTCPeerConnection(s)), (this.m_peerConnection.oniceconnectionstatechange = ((e) => { this.m_peerConnection && (console.log("BroadcastWebRTC: ICE connection state changed to " + this.m_peerConnection.iceConnectionState), "failed" === this.m_peerConnection.iceConnectionState ? this.OnWebRTCConnectionFailed() : "disconnected" === this.m_peerConnection.iceConnectionState && this.OnWebRTCConnectionRetry()); }).bind(this)), (this.m_peerConnection.onicecandidate = ((e) => { if (e.candidate) { const t = new FormData(); t.append("broadcaststeamid", this.m_strBroadcastSteamID), t.append("webrtc_session_id", this.m_ulWebRTCSessionID), t.append("sdp_mid", e.candidate.sdpMid), t.append("sdp_mline_index", String(e.candidate.sdpMLineIndex)), t.append("candidate", e.candidate.candidate), r() .post(`${b.De.CHAT_BASE_URL}broadcast/addbroadcastwebrtccandidate`, t) .then((e) => { const t = e.data; (t.success && 1 == t.success) || console.log("Failed to add a WebRTC session ICE candidate: " + String(t.success)); }) .catch((e) => console.log("Failed to add a WebRTC session ICE candidate" + e)); } }).bind(this)), (this.m_peerConnection.ontrack = ((e) => { "video" === e.track.kind && ((this.m_elVideo.src = null), (this.m_elVideo.srcObject = e.streams[0]), this.Play()); }).bind(this)), this.m_peerConnection.setRemoteDescription({ type: "offer", sdp: a }).then(() => (0, i.mG)(this, void 0, void 0, function* () { yield this.m_peerConnection.setLocalDescription(yield this.m_peerConnection.createAnswer()); const e = new FormData(); e.append("broadcaststeamid", this.m_strBroadcastSteamID), e.append("webrtc_session_id", this.m_ulWebRTCSessionID), e.append("answer", this.m_peerConnection.localDescription.sdp); try { yield r() .post(`${b.De.CHAT_BASE_URL}broadcast/setbroadcastwebrtcanswer`, e) .then((e) => { const t = e.data; if (!t.success || 1 != t.success) throw new Error(String(t.success)); }); } catch (e) { return console.log("Failed to set the WebRTC session answer: " + e), void this.OnWebRTCConnectionRetry(); } (this.m_nCandidateUpdateIntervalMS = 250), this.m_schCandidateTimer.Schedule(this.m_nCandidateUpdateIntervalMS, () => this.GetHostCandidates()); }), ); }); } GetHostCandidates() { return (0, i.mG)(this, void 0, void 0, function* () { const e = new FormData(); e.append("broadcaststeamid", this.m_strBroadcastSteamID), e.append("webrtc_session_id", this.m_ulWebRTCSessionID), e.append("candidate_generation", String(this.m_nHostCandidateGeneration)); try { yield r() .post(`${b.De.CHAT_BASE_URL}broadcast/getbroadcastwebrtccandidates`, e) .then((e) => { const t = e.data, n = t.data; if (!t.success || 1 != t.success) throw new Error(String(t.success)); n.candidate_generation > this.m_nHostCandidateGeneration ? (n.candidates.forEach((e) => { const t = new RTCIceCandidate({ sdpMid: e.sdp_mid, sdpMLineIndex: e.sdp_mline_index, candidate: e.candidate }); this.m_peerConnection.addIceCandidate(t).catch((e) => console.error(e)); }), (this.m_nHostCandidateGeneration = n.candidate_generation)) : this.m_nHostCandidateGeneration > 0 && (this.m_nCandidateUpdateIntervalMS *= 2); }); } catch (e) { return console.log("Failed to get WebRTC session ICE candidates" + e), void this.OnWebRTCConnectionRetry(); } this.m_schCandidateTimer.Schedule(this.m_nCandidateUpdateIntervalMS, () => this.GetHostCandidates()); }); } DispatchEvent(e, t = null) { let n = new CustomEvent(e, { cancelable: !0, bubbles: !0, detail: t }); this.m_elVideo.dispatchEvent(n); } OnWebRTCConnectionRetry() { this.DispatchEvent("valve-webrtcretry"); } OnWebRTCConnectionFailed() { this.DispatchEvent("valve-webrtcfailed"); } Close() { this.m_listeners.Unregister(), this.m_schCandidateTimer.Cancel(), this.m_schCaptureDisplayStatsTrigger.Cancel(), this.m_peerConnection && (this.m_peerConnection.close(), (this.m_peerConnection = null)), this.m_elVideo.pause(), (this.m_elVideo.srcObject = null), this.m_stats && (this.m_stats.GetFPSMonitor().Close(), (this.m_stats = null)), (this.m_bFirstPlay = !0); } IsBuffering() { return !1; } GetCurrentPlayTime() { return 0; } GetLiveContentStartTime() { return null; } GetAvailableVideoStartTime() { return 0; } GetBufferedLiveEdgeTime() { return 0; } IsPaused() { return this.m_elVideo.paused; } Play() { let e = this.m_bFirstPlay; this.m_bFirstPlay = !1; let t = this.m_elVideo.play(); t ? t .then(() => { this.m_stats.GetFPSMonitor().StartTracking(() => this.m_stats.ExtractFrameInfo(this.m_elVideo)); }) .catch((t) => { e && this.DispatchEvent("valve-userinputneeded"); }) : this.m_stats.GetFPSMonitor().StartTracking(() => this.m_stats.ExtractFrameInfo(this.m_elVideo)); } Pause() { this.m_elVideo.pause(); } CanSeek() { return !1; } SeekAndPlay(e) { return this.Play(), 0; } Seek(e) { return 0; } JumpTime(e) { return 0; } IsMuted() { return this.m_elVideo.muted; } SetMuted(e) { this.m_elVideo.muted = e; } SetVolume(e) { (e = f.Lh(e, 0, 1)), (this.m_elVideo.volume = e); } GetVolume() { return this.m_elVideo.volume; } GetDASHPlayerStats() { return this.m_stats; } SetStatsViewIsVisible(e) { e && !this.m_bStatsViewVisible ? (this.CaptureStatsForDisplay(), this.m_schCaptureDisplayStatsTrigger.Schedule(250, this.CaptureStatsForDisplay)) : !e && this.m_bStatsViewVisible && this.m_schCaptureDisplayStatsTrigger.Cancel(), (this.m_bStatsViewVisible = e); } CaptureStatsForDisplay() { this.m_stats.SetHTMLVideoPlayerDisplay(this.m_elVideo.videoWidth, this.m_elVideo.videoHeight, this.m_elVideo.clientWidth, this.m_elVideo.clientHeight), this.m_schCaptureDisplayStatsTrigger.Schedule(250, this.CaptureStatsForDisplay); } OnVideoPause(e) { this.m_stats.GetFPSMonitor().Close(); } OnVideoResize(e) { this.m_stats.GetFPSMonitor().SetWindowResized(); } GetVideoRepresentations() { let e = []; return e.push({ id: "auto", displayName: "Auto", selected: !0 }), e; } SetVideoRepresentation(e) {} IsLiveContent() { return !0; } GetThumbnailForTimestamp(e) { return ""; } BHasTimedText() { return !1; } } (0, i.gn)([v.a], ie.prototype, "PlayWebRTC", null), (0, i.gn)([a.aD.bound], ie.prototype, "CaptureStatsForDisplay", null), (0, i.gn)([v.a], ie.prototype, "OnVideoPause", null), (0, i.gn)([v.a], ie.prototype, "OnVideoResize", null); var oe = n(52705), re = n(1736), ae = n(54521), se = n(53901); class le { constructor() { (this.m_LoadingOAuth = null), (this.m_mapBookmarks = new Map()); } SetBookmarkForApp(e, t) { this.ValidateBookmarkData(t) ? this.m_mapBookmarks.set(e, se.Q_.fromObject(t)) : this.InitializeBookmarkForApp(e); } ValidateBookmarkData(e) { const t = e; return "object" == typeof t && Number.isInteger(t.playback_position_in_seconds) && Number.isInteger(t.app_id); } InitializeBookmarkForApp(e) { if (!this.m_mapBookmarks.has(e)) { let t = { app_id: e, playback_position_in_seconds: 0, video_track_id: "0", audio_track_id: "0", timedtext_track_id: "0", hide_from_watch_history: !1, hide_from_library: !1 }; this.m_mapBookmarks.set(e, new se.Q_(t)); } } GetBookmarkPlayTimeInSeconds(e) { if (this.m_mapBookmarks.has(e)) { let t = this.m_mapBookmarks.get(e).playback_position_in_seconds(); if (Number.isInteger(t)) return t; } return 0; } SendBookMarkedTimeToServer(e, t, n, o, r) { return (0, i.mG)(this, void 0, void 0, function* () { if (!b.L7.logged_in) return; if (!this.m_transport && (yield this.m_LoadingOAuth, !this.m_transport)) return void console.warn("CVideoBookmarkStore:SetBookMark no auth token / transport"); const i = re.gA.Init(se.A_); if (this.m_mapBookmarks.has(e)) { let a = this.m_mapBookmarks.get(e), s = !1; a.app_id() != e && ((s = !0), a.set_app_id(e)), a.playback_position_in_seconds() != t && ((s = !0), a.set_playback_position_in_seconds(t)), (n = n || "0"), a.video_track_id() != n && (a.set_video_track_id(n), (s = !0)), (o = o || "0"), a.audio_track_id() != o && (a.set_audio_track_id(o), (s = !0)), (r = r || "0") != a.timedtext_track_id() && (a.set_timedtext_track_id(r), (s = !0)), s && (i.Body().add_bookmarks(a), se.kI.SetVideoBookmark(this.m_transport, i)); } }); } static Get() { return le.s_VODStore || ((le.s_VODStore = new le()), le.s_VODStore.Init()), le.s_VODStore; } Init() { b.L7.logged_in && this.LoadWatchVideoOAuthToken(); } LoadWatchVideoOAuthToken() { return (0, i.mG)(this, void 0, void 0, function* () { const e = "community" == (0, b.Zv)() ? b.De.COMMUNITY_BASE_URL + "actions/ajaxgetwatchvodtoken" : b.De.STORE_BASE_URL + "actions/ajaxgetwatchvodtoken", t = {}; try { let n = yield r().get(e, { params: t, withCredentials: !0 }); if (n && 200 == n.status && n.data && 1 == n.data.success && n.data.webapi_token) return (this.m_transport = new ae.J(b.De.WEBAPI_BASE_URL, n.data.webapi_token).GetServiceTransport()), this.m_transport; } catch (e) { let t = (0, oe.l)(e); console.error("CVideoBookmarkStore:LoadWatchVideoOAuthToken: Failed " + t.strErrorMsg, t); } return null; }); } } class ce { constructor(e) { this.m_appid = e; } SetBookmark(e, t, n, o) { return (0, i.mG)(this, void 0, void 0, function* () { b.L7.logged_in && le.Get().SendBookMarkedTimeToServer(this.m_appid, Math.floor(e), t, n, o); }); } GetBeginPlaytime() { return b.L7.logged_in ? le.Get().GetBookmarkPlayTimeInSeconds(this.m_appid) : 0; } } class me { constructor() { this.m_mapAppToVOD = new Map(); } GetVODForAppID(e) { return this.m_mapAppToVOD.get(e); } LoadVODForAppID(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_mapAppToVOD.has(e)) return this.m_mapAppToVOD.get(e); const n = b.De.STORE_BASE_URL + "video/details/" + e + "/0", i = {}; try { let o = yield r().get(n, { params: i, withCredentials: !0, cancelToken: t ? t.token : void 0 }); if (t && t.token.reason) return null; if (o && 200 == o.status && o.data && (1 == o.data.success || "ready" == o.data.success)) { let t = (0, a.LO)({ appid: e, video_url: o.data.video_url, bookmark: o.data.bookmark }); return o.data.bookmark ? le.Get().SetBookmarkForApp(e, o.data.bookmark) : le.Get().InitializeBookmarkForApp(e), this.m_mapAppToVOD.set(e, t), t; } } catch (e) { let t = (0, oe.l)(e); console.error("CVideoOnDemandStore:LoadVODForAppID: Failed " + t.strErrorMsg, t); } return null; }); } static Get() { return me.s_VODStore || ((me.s_VODStore = new me()), me.s_VODStore.Init()), me.s_VODStore; } Init() {} } var de = n(57476); const he = 7; var ue, pe; !(function (e) { (e[(e.None = 0)] = "None"), (e[(e.Unlocking = 1)] = "Unlocking"), (e[(e.Loading = 2)] = "Loading"), (e[(e.Ready = 3)] = "Ready"), (e[(e.Error = 4)] = "Error"); })(ue || (ue = {})); class _e { constructor() { (this.m_rtUnlockTime = 0), (this.m_schUnlockTimeout = new g.Ar()); } UnlockH264(e, t) { this.BCanUnlockH264() ? (e.SetState(ue.Unlocking, ""), console.log("Unlocking H.264 for broadcast video playback"), this.RequestUnlockH264(), (this.m_broadcast = e), (this.m_video = t), (this.m_rtUnlockTime = Date.now()), this.m_schUnlockTimeout.Schedule(100, () => this.CheckUnlockState())) : e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_MinBrowser")); } BCanUnlockH264() { return (0, de.U5)("RemotePlay.UnlockH264") ? (console.log("Client supports direct H.264 unlock"), !0) : (0, de.U5)("BrowserView.PostMessageToParent") ? (console.log("Client supports browserview H.264 unlock"), !0) : (console.log("Client does not support H.264 unlock"), !1); } RequestUnlockH264() { (0, de.U5)("RemotePlay.UnlockH264") ? (console.log("Requesting direct H.264 unlock"), SteamClient.RemotePlay.UnlockH264()) : (0, de.U5)("BrowserView.PostMessageToParent") ? (console.log("Requesting browserview unlock"), SteamClient.BrowserView.PostMessageToParent("UnlockH264Request", "CUnlockH264Helper")) : console.log("Failed to request H.264 unlock: no method supported"); } CheckUnlockState() { if (this.m_broadcast.m_eWatchState != ue.Unlocking) return; if ((0, h.c8)() || (0, h.Pw)()) return console.log("Unlocking H.264 successful"), this.m_broadcast.SetState(ue.None, ""), void this.m_video.Restart(); Date.now() - this.m_rtUnlockTime > 6e3 ? (console.log("Unlocking H.264 timed out (Steam client or servers offline?)"), this.m_broadcast.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_MinBrowser"))) : this.m_schUnlockTimeout.Schedule(100, () => this.CheckUnlockState()); } } class ge { constructor() { (this.m_steamIDBroadcast = ""), (this.m_ulBroadcastID = ""), (this.m_ulViewerToken = ""), (this.m_strCDNAuthUrlParameters = void 0), (this.m_bWebRTC = !1), (this.m_eWatchState = ue.None), (this.m_strStateDescription = ""), (this.m_rgVideos = []), (this.m_schManifestTimeout = new g.Ar()), (this.m_schHeartbeatTimeout = new g.Ar()), (0, a.rC)(this); } SetState(e, t = "") { (this.m_eWatchState = e), (this.m_strStateDescription = t), e == ue.Error && console.log(this.m_strStateDescription); } } (0, i.gn)([a.LO], ge.prototype, "m_ulBroadcastID", void 0), (0, i.gn)([a.LO], ge.prototype, "m_eWatchState", void 0), (0, i.gn)([a.LO], ge.prototype, "m_strStateDescription", void 0), (0, i.gn)([a.aD], ge.prototype, "SetState", null); class Ce { constructor(e) { (this.m_steamIDBroadcast = ""), (this.m_bInitialized = !1), (this.m_strTitle = ""), (this.m_strAppId = "" + he), (this.m_nAppID = he), (this.m_strAppTitle = ""), (this.m_strThumbnailUrl = ""), (this.m_nViewerCount = 0), (this.m_bIsOnline = !1), (this.m_schUpdateTimeout = new g.Ar()), (this.m_nRefCount = 0), (0, a.rC)(this), (this.m_steamIDBroadcast = e); } } (0, i.gn)([a.LO], Ce.prototype, "m_bInitialized", void 0), (0, i.gn)([a.LO], Ce.prototype, "m_strTitle", void 0), (0, i.gn)([a.LO], Ce.prototype, "m_strAppId", void 0), (0, i.gn)([a.LO], Ce.prototype, "m_nAppID", void 0), (0, i.gn)([a.LO], Ce.prototype, "m_strAppTitle", void 0), (0, i.gn)([a.LO], Ce.prototype, "m_strThumbnailUrl", void 0), (0, i.gn)([a.LO], Ce.prototype, "m_nViewerCount", void 0), (0, i.gn)([a.LO], Ce.prototype, "m_bIsOnline", void 0); class fe { constructor() { (this.m_eWatchState = ue.None), (this.m_strStateDescription = ""), (this.m_rgVideos = []), (0, a.rC)(this); } SetState(e, t = "") { (this.m_eWatchState = e), (this.m_strStateDescription = t), e == ue.Error && console.log(this.m_strStateDescription); } } (0, i.gn)([a.LO], fe.prototype, "m_eWatchState", void 0), (0, i.gn)([a.LO], fe.prototype, "m_strStateDescription", void 0), (0, i.gn)([a.aD], fe.prototype, "SetState", null); class ve extends fe {} class Se extends fe {} class be { constructor() { (this.m_mapBroadcasts = new Map()), (this.m_mapClips = new Map()), (this.m_mapVODs = new Map()), (this.m_activeVideo = null), (this.m_broadcastSettings = { nVolume: 1, bMuted: !1, ulViewerToken: "0" }), (this.m_schSaveSettings = new g.Ar()), (this.m_broadcastInfos = {}), (0, a.rC)(this), this.LoadBroadcastSettings(); } GetBroadcastState(e) { if (e.IsBroadcastClip()) { let t = this.m_mapClips.get(e.GetBroadcastClipID()); return t ? t.m_eWatchState : ue.None; } if (e.IsBroadcastVOD()) { const t = this.m_mapVODs.get(e.GetBroadcastAppIDVOD()); return t ? t.m_eWatchState : ue.None; } { let t = this.m_mapBroadcasts.get(e.GetBroadcastSteamID()); return t ? t.m_eWatchState : ue.None; } } GetBroadcastStateDescription(e) { if (e.IsBroadcastClip()) { let t = this.m_mapClips.get(e.GetBroadcastClipID()); return t ? t.m_strStateDescription : ""; } if (e.IsBroadcastVOD()) { const t = this.m_mapVODs.get(e.GetBroadcastAppIDVOD()); return t ? t.m_strStateDescription : ""; } { let t = this.m_mapBroadcasts.get(e.GetBroadcastSteamID()); return t ? t.m_strStateDescription : ""; } } CreateBroadcastVideo(e, t, n, i) { let o = this.GetOrCreateBroadcast(t), { nVolume: r, bMuted: a } = this.m_broadcastSettings, s = new Ie(e, r, a, n); if ((s.SetBroadcastSteamID(t), o.m_rgVideos.push(s), (o.m_bWebRTC = i), !(0, h.c8)() && !(0, h.Pw)())) { return new _e().UnlockH264(o, s), s; } return s; } CreateClipVideo(e, t, n) { let i = this.GetOrCreateClip(t), { nVolume: o, bMuted: r } = this.m_broadcastSettings, a = new Ie(e, o, r, n); if ((a.SetBroadcastClipID(t), i.m_rgVideos.push(a), !(0, h.c8)() && !(0, h.Pw)())) { return new _e().UnlockH264(i, a), a; } return a; } CreateVODVideo(e, t, n) { let i = this.GetOrCreateVOD(t), { nVolume: o, bMuted: r } = this.m_broadcastSettings, a = new Ie(e, o, r, n); if ((a.SetBroadcastAppIDVOD(t), i.m_rgVideos.push(a), !(0, h.c8)() && !(0, h.Pw)())) { return new _e().UnlockH264(i, a), a; } return a; } StartVideo(e) { if (e.IsBroadcastClip()) { console.log(`Starting clip for ${e.GetBroadcastClipID()}`); let t = this.m_mapClips.get(e.GetBroadcastClipID()); if (!t) return; this.SetActiveVideo(e), t.m_eWatchState == ue.None ? this.GetClipManifest(t, e.GetWatchLocation()) : t.m_eWatchState == ue.Ready && e.StartClip(t); } else if (e.IsBroadcastVOD()) { console.log(`Starting VOD for ${e.GetBroadcastAppIDVOD()}`); let t = this.m_mapVODs.get(e.GetBroadcastAppIDVOD()); if (!t) return; this.SetActiveVideo(e), t.m_eWatchState == ue.None ? this.GetVODManifest(t, e.GetWatchLocation()) : t.m_eWatchState == ue.Ready && e.StartVOD(t); } else { let t = this.m_mapBroadcasts.get(e.GetBroadcastSteamID()); if (!t) return; this.SetActiveVideo(e), t.m_eWatchState == ue.None ? this.GetBroadcastManifest(t, e.GetWatchLocation()) : t.m_eWatchState == ue.Ready && e.StartBroadcast(t); } } SetActiveVideo(e) { this.m_mapBroadcasts.forEach((t) => { for (let n of t.m_rgVideos) n != e && n.StopPlaybackTillUserInput(); }), this.m_mapClips.forEach((t) => { for (let n of t.m_rgVideos) n != e && n.StopPlaybackTillUserInput(); }), (this.m_activeVideo = e); } PauseAllVideo() { this.m_mapBroadcasts.forEach((e) => { for (let t of e.m_rgVideos) t.StopPlaybackTillUserInput(); }); } StopVideo(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = e.GetBroadcastSteamID(), n = this.m_mapBroadcasts.get(t); e.Stop(), n && (n.m_ulBroadcastID && (function (e, t, n) { (0, i.mG)(this, void 0, void 0, function* () { if (!t) return; let i = new FormData(); i.append("steamid", e), i.append("broadcastid", t), i.append("viewertoken", n); try { yield r().post(b.De.CHAT_BASE_URL + "broadcast/stopwatching", i); } catch (e) {} }); })(t, n.m_ulBroadcastID, this.m_broadcastSettings.ulViewerToken), p.Qf(n.m_rgVideos, (t) => t == e), this.RemoveBroadcastIfUnused(n)); }); } StartInfo(e) { const t = this.GetOrCreateBroadcastInfo(e); return t.m_nRefCount++, (t.m_bInitialized && t.m_schUpdateTimeout.IsScheduled()) || this.LoadBroadcastInfo(t), t; } StopInfo(e) { e.m_nRefCount--; } GetOrCreateBroadcastInfo(e) { if (!e) { return new Ce(""); } if (!this.m_broadcastInfos[e]) { const t = (0, a.LO)(new Ce(e)); this.m_broadcastInfos[e] = t; } return this.m_broadcastInfos[e]; } GetOrCreateBroadcast(e) { let t = this.m_mapBroadcasts.get(e); return t || ((t = new ge()), (t.m_steamIDBroadcast = e), (t.m_eWatchState = ue.None), this.m_mapBroadcasts.set(e, t), t); } GetBroadcast(e) { return this.m_mapBroadcasts.get(e); } GetBroadcastClip(e) { return this.m_mapClips.get(e); } GetBroadcastVOD(e) { return this.m_mapVODs.get(e); } RemoveBroadcastIfUnused(e) { e.m_rgVideos.length || (e.m_schHeartbeatTimeout.Cancel(), e.m_schManifestTimeout.Cancel(), this.m_mapBroadcasts.delete(e.m_steamIDBroadcast)); } GetOrCreateClip(e) { let t = this.m_mapClips.get(e); return t || ((t = new ve()), (t.m_clipID = e), (t.m_eWatchState = ue.None), this.m_mapClips.set(e, t), t); } GetOrCreateVOD(e) { let t = this.m_mapVODs.get(e); return t || ((t = new Se()), (t.m_nAppIDVOD = e), (t.m_eWatchState = ue.None), this.m_mapVODs.set(e, t), t); } LoadBroadcastInfo(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = "0", n = this.m_mapBroadcasts.get(e.m_steamIDBroadcast); if ((n && (t = n.m_ulBroadcastID), 0 == e.m_nRefCount)) return; const i = { steamid: e.m_steamIDBroadcast, broadcastid: t, location: n && n.m_rgVideos && n.m_rgVideos[0] && n.m_rgVideos[0].GetWatchLocation() }; try { const t = yield r().get(`${b.De.CHAT_BASE_URL}broadcast/getbroadcastinfo/`, { params: i }); if (!t || !t.data || !t.data.success || 1 != t.data.success) return void (e.m_bInitialized = !0); const n = t.data; (0, a.z)(() => { (e.m_bInitialized = !0), (e.m_strTitle = n.title), (e.m_strAppId = n.appid), (e.m_nAppID = Number.parseInt(n.appid)), (e.m_strAppTitle = n.app_title), (e.m_strThumbnailUrl = n.thumbnail_url), (e.m_nViewerCount = n.viewer_count), (e.m_bIsOnline = n.is_online), !e.m_strTitle && s.rr && ((e.m_strTitle = s.rr.name), (e.m_strAppTitle = s.rr.appName || s.rr.name)); const t = n.update_interval; t && "number" == typeof t && e.m_schUpdateTimeout.Schedule(1e3 * t, () => this.LoadBroadcastInfo(e)); }); } catch (e) { console.error(e); } }); } DelayedGetBroadcastManifest(e, t, n = Date.now()) { e.m_schManifestTimeout.Schedule(5e3, () => this.GetBroadcastManifest(e, t, n)); } GetBroadcastManifest(e, t, n = Date.now()) { return (0, i.mG)(this, void 0, void 0, function* () { e.SetState(ue.Loading, ""); let i = { steamid: e.m_steamIDBroadcast, broadcastid: 0, viewertoken: this.m_broadcastSettings.ulViewerToken, watchlocation: t, sessionid: b.De.SESSIONID, is_webrtc: e.m_bWebRTC }, o = null; try { o = yield r().get(b.De.CHAT_BASE_URL + "broadcast/getbroadcastmpd/", { params: i, withCredentials: !0 }); } catch (e) { let t = (0, oe.l)(e); console.error("Failed to get broadcast manifest!" + t.strErrorMsg, t); } if (!o || 200 != o.status) return void e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_RequestFailed")); let a = o.data; a.viewertoken && this.SetViewerToken(a.viewertoken); let s = a.success; if ("ready" == s) e.SetState(ue.Ready), (e.m_ulBroadcastID = a.broadcastid), (e.m_ulViewerToken = this.m_broadcastSettings.ulViewerToken), (e.m_strCDNAuthUrlParameters = a.cdn_auth_url_parameters), (e.m_bWebRTC = a.is_webrtc), (e.m_data = a), this.LoadBroadcast(e), setTimeout(() => { e.m_schHeartbeatTimeout.Schedule(1e3 * e.m_data.heartbeat_interval, () => this.HeartbeatBroadcast(e)); }, 3e4 * Math.random()); else if ("waiting" == s) { e.SetState(ue.Loading, (0, C.Xx)("#BroadcastWatch_WaitingForResponse")); let i = Date.now() - n; if (i > 6e4) return void e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_NotAvailable")); let o = i > 3e4 ? a.retry : 5e3; e.m_schManifestTimeout.Schedule(o, () => this.GetBroadcastManifest(e, t, n)); } else "waiting_for_start" == s ? (e.SetState(ue.Loading, (0, C.Xx)("#BroadcastWatch_WaitingForStart")), e.m_schManifestTimeout.Schedule(a.retry, () => this.GetBroadcastManifest(e, t, n))) : "waiting_for_reconnect" == s ? (e.SetState(ue.Loading, (0, C.Xx)("#BroadcastWatch_WaitingForReconnect")), e.m_schManifestTimeout.Schedule(a.retry, () => this.GetBroadcastManifest(e, t, n))) : "end" == s ? e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_NotAvailable")) : "too_many_broadcasts" == s ? e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_TooManyBroadcasts")) : "system_not_supported" == s ? e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_SystemNotSupported")) : "user_restricted" == s ? e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_UserRestricted")) : "poor_upload_quality" == s ? e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_PoorUploadQuality")) : "request_failed" == s ? e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_RequestFailed")) : "too_many_viewers" == s ? e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_TooManyViewers")) : e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_NotAvailable")); }); } GetClipManifest(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { e.SetState(ue.Loading, ""); let n = { clipid: e.m_clipID, watchlocation: t, sessionid: b.De.SESSIONID }, i = null; try { i = yield r().get(b.De.CHAT_BASE_URL + "broadcast/getclipdetails", { params: n, withCredentials: !0 }); } catch (e) { console.error(e), console.log("Failed to get clip manifest!"); } if (!i || 200 != i.status) return void e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_RequestFailed")); let o = i.data; 1 == o.success ? (e.SetState(ue.Ready), (e.m_data = o), this.LoadClip(e)) : e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_RequestFailed")); }); } GetVODManifest(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { e.SetState(ue.Loading, ""); let t = yield me.Get().LoadVODForAppID(e.m_nAppIDVOD); t ? (e.SetState(ue.Ready), (e.m_manifestURL = t.video_url), this.LoadVOD(e)) : e.SetState(ue.Error, (0, C.Xx)("#BroadcastWatch_RequestFailed")); }); } HeartbeatBroadcast(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = new FormData(); t.append("steamid", e.m_steamIDBroadcast), t.append("broadcastid", e.m_ulBroadcastID), t.append("viewertoken", this.m_broadcastSettings.ulViewerToken), r().post(b.De.CHAT_BASE_URL + "broadcast/heartbeat/", t), e.m_schHeartbeatTimeout.Schedule(1e3 * e.m_data.heartbeat_interval, () => this.HeartbeatBroadcast(e)); }); } LoadBroadcast(e) { e.m_rgVideos.findIndex((e) => e == this.m_activeVideo) >= 0 && this.m_activeVideo.StartBroadcast(e); } LoadClip(e) { e.m_rgVideos.findIndex((e) => e == this.m_activeVideo) >= 0 && this.m_activeVideo.StartClip(e); } LoadVOD(e) { e.m_rgVideos.findIndex((e) => e == this.m_activeVideo) >= 0 && this.m_activeVideo.StartVOD(e); } BroadcastDownloadFailed(e, t = !0, n = J.Invalid) { e.Stop(); let i = this.m_mapBroadcasts.get(e.GetBroadcastSteamID()); i && i.m_eWatchState != ue.Loading && (i.m_bWebRTC && t && (i.m_bWebRTC = !1), n == J.StreamGone ? this.DelayedGetBroadcastManifest(i, e.GetWatchLocation()) : this.GetBroadcastManifest(i, e.GetWatchLocation())); } UserInputClickVideo(e) { if (this.m_activeVideo != e && (this.PauseAllVideo(), (this.m_activeVideo = e), !e.IsBroadcastClip() && !e.IsBroadcastVOD())) { let t = this.m_mapBroadcasts.get(e.GetBroadcastSteamID()); this.GetBroadcastManifest(t, e.GetWatchLocation()); } e.UserInputClick(); } LoadBroadcastSettings() { if (!window.localStorage) return; let e = window.localStorage.getItem("broadcastSettings"); if (!e) return; let t = JSON.parse(e); if (!t) return; Object.assign(this.m_broadcastSettings, t); let n = this.m_broadcastSettings; (n.bMuted = !!n.bMuted), (n.nVolume = f.Lh(n.nVolume, 0, 1)), "string" != typeof n.ulViewerToken && (n.ulViewerToken = "0"); } SaveBroadcastSettings() { window.localStorage && this.m_schSaveSettings.Schedule(1e3, () => { try { window.localStorage.setItem("broadcastSettings", JSON.stringify(this.m_broadcastSettings)); } catch (e) {} }); } SetViewerToken(e) { this.m_broadcastSettings.ulViewerToken != e && ((this.m_broadcastSettings.ulViewerToken = e), this.SaveBroadcastSettings()); } GetViewerToken() { return this.m_broadcastSettings.ulViewerToken; } SaveVolumeChange(e, t) { (this.m_broadcastSettings.nVolume == e && this.m_broadcastSettings.bMuted == t) || ((this.m_broadcastSettings.nVolume = e), (this.m_broadcastSettings.bMuted = t), this.SaveBroadcastSettings()); } } (0, i.gn)([a.LO], be.prototype, "m_mapBroadcasts", void 0), (function (e) { (e[(e.Timeline = 1)] = "Timeline"), (e[(e.Minimap = 2)] = "Minimap"); })(pe || (pe = {})); class Ie { constructor(e, t, n, i) { (this.m_elVideo = null), (this.m_player = null), (this.m_listeners = new g.G_()), (this.m_gameDataParser = null), (this.m_eWatchLocation = 0), (this.m_rgSubtitles = []), (this.m_steamIDBroadcast = null), (this.m_BroadcastInfo = null), (this.m_broadcastClipID = null), (this.m_nBroadcastAppIDVOD = null), (this.m_bPaused = !1), (this.m_nPlaybackTime = 0), (this.m_bBuffering = !1), (this.m_bOnLiveEdge = !1), (this.m_nVolume = 0), (this.m_bMuted = !1), (this.m_bUserInputNeeded = !1), (this.m_bIsReplay = !1), (this.m_nTimelineDuration = 1800), (this.m_nVideoStartPos = 0), (this.m_nVideoEndPos = 0), (this.m_editorStartTime = 0), (this.m_editorEndTime = 0), (this.m_rgMarkers = a.LO.array()), (this.m_rgSegments = a.LO.array()), (this.m_rgRegions = a.LO.array()), (0, a.rC)(this), (this.m_elVideo = e), (this.m_nVolume = t), (this.m_bMuted = n), (this.m_eWatchLocation = i); } SetBroadcastSteamID(e) { this.m_steamIDBroadcast = e; } GetBroadcastSteamID() { return this.m_steamIDBroadcast; } GetWatchLocation() { return this.m_eWatchLocation; } IsPaused() { return this.m_bPaused; } GetPlaybackTime() { return this.m_nPlaybackTime; } SetStatsViewIsVisible(e) { this.m_player && this.m_player.SetStatsViewIsVisible(e); } GetDASHPlayerStats() { return this.m_player.GetDASHPlayerStats(); } BHasDASHStats() { return null != this.m_player; } IsTimelineMapActive() { return !1; } CanSeek() { return this.m_player && this.m_player.CanSeek(); } IsBuffering() { return this.m_bBuffering; } IsOnLiveEdge() { return this.m_bOnLiveEdge; } GetVideoAvailableStartTime() { return this.m_nVideoStartPos; } GetVolume() { return this.m_nVolume; } GetUserInputNeeded() { return this.m_bUserInputNeeded; } IsReplay() { return this.m_bIsReplay; } IsBroadcastClip() { return null != this.m_broadcastClipID; } SetBroadcastClipID(e) { this.m_broadcastClipID = e; } GetBroadcastClipID() { return this.m_broadcastClipID; } IsBroadcastVOD() { return null != this.m_nBroadcastAppIDVOD; } SetBroadcastAppIDVOD(e) { this.m_nBroadcastAppIDVOD = e; } GetBroadcastAppIDVOD() { return this.m_nBroadcastAppIDVOD; } GetVideoRepresentations() { return this.m_player ? this.m_player.GetVideoRepresentations() : []; } SetVideoRepresentation(e) { this.m_player.SetVideoRepresentation(e); } GetBroadcastInfo() { return this.m_BroadcastInfo; } BHasTimedText() { var e; return null === (e = this.m_player) || void 0 === e ? void 0 : e.BHasTimedText(); } BHasPlayer() { return Boolean(this.m_player); } ListSubtitles() { return this.m_elVideo.textTracks; } GetSubtitles() { for (let e = 0; e < this.m_elVideo.textTracks.length; e++) { const t = this.m_elVideo.textTracks[e]; if ("showing" === t.mode) return t; } return null; } SetSubtitles(e) { let t = e ? C.is[e] : -1; this.m_player.SetSubtitles(t); } GetBroadcastState() { return ye.GetBroadcastState(this); } GetBroadcastStateDescription() { return ye.GetBroadcastStateDescription(this); } SetOnVideoCallback(e) { this.m_fnOnVideoEnd = e; } InitPlayer() { (0, _.X)(!this.m_player, "Initialized twice?"), this.m_listeners.AddEventListener(this.m_elVideo, "playing", this.OnVideoPlaying), this.m_listeners.AddEventListener(this.m_elVideo, "pause", this.OnVideoPause), this.m_listeners.AddEventListener(this.m_elVideo, "timeupdate", this.OnVideoTimeUpdate), this.m_listeners.AddEventListener(this.m_elVideo, "valve-bufferupdate", this.OnVideoTimeUpdate), this.m_listeners.AddEventListener(this.m_elVideo, "valve-gamedataupdate", this.OnGameDataUpdate), this.m_listeners.AddEventListener(this.m_elVideo, "valve-downloadfailed", this.OnDownloadFailed), this.m_listeners.AddEventListener(this.m_elVideo, "valve-webrtcretry", this.OnWebRTCRetry), this.m_listeners.AddEventListener(this.m_elVideo, "valve-webrtcfailed", this.OnWebRTCFailed), this.m_listeners.AddEventListener(this.m_elVideo, "valve-userinputneeded", this.OnUserInputNeeded), (this.m_bPaused = !1), (this.m_nPlaybackTime = 0), (this.m_bBuffering = !1), (this.m_nTimelineDuration = 1800), (this.m_nVideoStartPos = 0), (this.m_nVideoEndPos = 0), this.m_rgMarkers.clear(), this.m_rgSegments.clear(), (this.m_bUserInputNeeded = !1), (this.m_bIsReplay = !1); } Restart() { this.IsMuted() || this.IsPaused() || this.GetUserInputNeeded() || this.Play(); } StartBroadcast(e) { this.InitPlayer(), e.m_data.url ? ((this.m_player = new te(this.m_elVideo, !(0, h.c8)() && (0, h.Pw)())), this.m_player.PlayMPD(e.m_data.url, e.m_strCDNAuthUrlParameters, e.m_data.hls_url)) : ((this.m_player = new ie(this.m_elVideo)), this.m_player.PlayWebRTC(this.m_steamIDBroadcast, e.m_ulViewerToken, e.m_data.webrtc_session_id, e.m_data.webrtc_turn_server, e.m_data.webrtc_offer_sdp)), this.SetVolume(this.m_nVolume), this.m_player.SetMuted(this.m_bMuted); let t = this.m_player.GetDASHPlayerStats(); t && t.SetBroadcasterAndViewerInfo(this.m_steamIDBroadcast, b.L7.steamid, e.m_ulBroadcastID, e.m_ulViewerToken, e.m_strCDNAuthUrlParameters), (this.m_BroadcastInfo = ye.StartInfo(this.m_steamIDBroadcast)); } StartClip(e) { this.InitPlayer(), (this.m_player = new te(this.m_elVideo)), this.m_player.PlayMPD(e.m_data.clip_url, null), this.SetVolume(this.m_nVolume), this.m_player.SetMuted(this.m_bMuted); } StartVOD(e) { this.InitPlayer(); let t = new te(this.m_elVideo); (this.m_player = t), b.L7.logged_in && e.m_nAppIDVOD && t.SetBookmarkAdapter(new ce(e.m_nAppIDVOD)), this.m_player.PlayMPD(e.m_manifestURL, null), this.SetVolume(this.m_nVolume), this.m_player.SetMuted(this.m_bMuted); } Stop() { this.m_listeners.Unregister(), this.m_BroadcastInfo && (ye.StopInfo(this.m_BroadcastInfo), (this.m_BroadcastInfo = null)), (this.m_gameDataParser = null), this.m_player && (this.m_player.Close(), (this.m_player = null)); } TogglePlayPause() { !this.m_player || this.m_player.IsPaused() ? this.Play() : this.Pause(); } Play() { const e = this.GetBroadcastState(); e == ue.None || this.IsBroadcastClip() ? ye.StartVideo(this) : e == ue.Ready && (ye.SetActiveVideo(this), this.m_player ? this.m_player.Play() : this.IsBroadcastVOD() ? this.StartVOD(ye.GetBroadcastVOD(this.m_nBroadcastAppIDVOD)) : this.StartBroadcast(ye.GetBroadcast(this.m_steamIDBroadcast))); } Pause() { console.log("Pause ", this.m_steamIDBroadcast, this.m_nBroadcastAppIDVOD, this.m_broadcastClipID), this.m_player && this.m_player.Pause(); } JumpTime(e) { this.m_player.JumpTime(e); } Seek(e) { this.m_player.Seek(e); } SeekAndPlay(e) { this.m_player.SeekAndPlay(e); } JumpToLiveEdge() { this.m_player.IsLiveContent() ? this.SeekAndPlay(this.m_player.GetBufferedLiveEdgeTime()) : this.SeekAndPlay(this.m_player.GetAvailableVideoStartTime()); } SetVolume(e) { this.m_player && this.m_player.SetVolume(e), (this.m_nVolume = this.m_player.GetVolume()), ye.SaveVolumeChange(e, this.m_bMuted); } SetMute(e) { this.m_player && this.m_player.SetMuted(e), (this.m_bMuted = e), ye.SaveVolumeChange(this.m_nVolume, e); } IsMuted() { return this.m_bMuted; } OnVideoPlaying() { (this.m_bPaused = !1), 0 === this.m_editorStartTime && 0 === this.m_editorEndTime && ((this.m_editorStartTime = this.GetVideoAvailableStartTime()), (this.m_editorEndTime = this.GetVideoAvailableStartTime() + this.GetTimelineDuration())); } OnVideoPause() { this.m_bPaused = !0; } OnVideoTimeUpdate() { if ((window.clearTimeout(this.m_videoEndingTimer), this.IsBroadcastClip())) (this.m_nPlaybackTime = this.m_player.GetCurrentPlayTime()), (this.m_nVideoStartPos = this.m_player.GetAvailableVideoStartTime()), (this.m_nVideoEndPos = this.m_player.GetBufferedLiveEdgeTime()), (this.m_nTimelineDuration = this.m_nVideoEndPos - this.m_nVideoStartPos), (this.m_bOnLiveEdge = !1), (this.m_bBuffering = this.m_player.IsBuffering()); else { if (((this.m_nPlaybackTime = this.m_player.GetCurrentPlayTime()), (this.m_nVideoStartPos = this.m_player.GetAvailableVideoStartTime()), (this.m_nVideoEndPos = Math.max(this.m_player.GetBufferedLiveEdgeTime(), this.m_nPlaybackTime)), this.IsBroadcastVOD() && ((this.m_nTimelineDuration = this.m_nVideoEndPos), this.m_fnOnVideoEnd && this.m_nVideoEndPos - this.m_nPlaybackTime < 5))) { const e = 400; this.m_videoEndingTimer = window.setTimeout(() => { this.m_fnOnVideoEnd(); }, e); } (this.m_bBuffering = this.m_player.IsBuffering()), (this.m_bOnLiveEdge = this.m_nVideoEndPos - this.m_nPlaybackTime < 5), this.m_player.IsPaused() && (this.m_bOnLiveEdge = !1); } } OnGameDataUpdate(e) { let t = e.detail; if (!t || "object" != typeof t.gamedata) return; (this.m_gameDataParser && this.m_gameDataParser.GetAppID() == t.gamedata.__appid) || (this.m_gameDataParser = new d(t.gamedata.__appid)); const n = this.m_player.GetLiveContentStartTime().getTime(); if ("timelinemarkers" in t.gamedata) { const e = this.m_gameDataParser.UpdateMarkers(t.gamedata.__timelinemarkers, n); e && (this.m_rgMarkers.replace(e.rgMarkers || []), this.m_rgSegments.replace(e.rgSegments || [])); const i = this.m_gameDataParser.UpdateRegions(t.gamedata.__regions); i && this.m_rgRegions.replace(i); } else "soundtrack" in t.gamedata && this.m_gameDataParser.UpdateSoundtrack(this.m_steamIDBroadcast, t.gamedata.soundtrack); } OnDownloadFailed(e) { let t = e.detail || J.Invalid; ye.BroadcastDownloadFailed(this, !0, t); } OnWebRTCRetry() { ye.BroadcastDownloadFailed(this, !1); } OnWebRTCFailed() { ye.BroadcastDownloadFailed(this, !0); } OnUserInputNeeded() { this.m_bUserInputNeeded = !0; } UserInputClick() { (this.m_bUserInputNeeded = !1), this.m_player ? this.JumpToLiveEdge() : this.Play(); } StopPlaybackTillUserInput() { this.Stop(), this.OnUserInputNeeded(); } GetTimelineStartPos() { return this.m_nVideoEndPos - this.m_nTimelineDuration; } GetTimelineDuration() { return this.m_nTimelineDuration; } GetTimeAtMousePosition(e, t, n, i) { let o = f.r4(e, t.left, t.right, n, i); return Math.floor(o + 0.5); } GetPercentOffsetFromTime(e, t) { let n = 0, i = 0; return t == pe.Timeline ? ((i = this.m_nVideoEndPos), (n = i - this.m_nTimelineDuration)) : ((n = 0), (i = 0)), f.r4(e, n, i, 0, 100); } GetTimelineMarkers() { return this.m_rgMarkers; } GetTimelineSegments() { return this.m_rgSegments; } GetGameDataRegions() { return this.m_rgRegions; } BHasMarkersOrSegments() { return this.has_segments || this.has_markers; } GetThumbnailForTimestamp(e) { return this.m_player.GetThumbnailForTimestamp(e); } get has_markers() { return this.m_rgMarkers.length > 0; } get has_segments() { return this.m_rgSegments.length > 0; } } (0, i.gn)([a.LO], Ie.prototype, "m_player", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_bPaused", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_nPlaybackTime", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_bBuffering", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_bOnLiveEdge", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_nVolume", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_bMuted", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_bUserInputNeeded", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_bIsReplay", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_nTimelineDuration", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_nVideoStartPos", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_nVideoEndPos", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_editorStartTime", void 0), (0, i.gn)([a.LO], Ie.prototype, "m_editorEndTime", void 0), (0, i.gn)([a.aD.bound], Ie.prototype, "StartBroadcast", null), (0, i.gn)([a.aD.bound], Ie.prototype, "StartClip", null), (0, i.gn)([a.aD.bound], Ie.prototype, "StartVOD", null), (0, i.gn)([v.a], Ie.prototype, "OnVideoPlaying", null), (0, i.gn)([v.a], Ie.prototype, "OnVideoPause", null), (0, i.gn)([a.aD.bound], Ie.prototype, "OnVideoTimeUpdate", null), (0, i.gn)([a.aD.bound], Ie.prototype, "OnGameDataUpdate", null), (0, i.gn)([v.a], Ie.prototype, "OnDownloadFailed", null), (0, i.gn)([v.a], Ie.prototype, "OnWebRTCRetry", null), (0, i.gn)([v.a], Ie.prototype, "OnWebRTCFailed", null), (0, i.gn)([v.a], Ie.prototype, "OnUserInputNeeded", null); const ye = new be(); window.uiBroadcastWatchStore = ye; }, 88024: (e, t, n) => { "use strict"; n.d(t, { HZ: () => s, OL: () => r, pd: () => a }); var i = n(71129), o = n(57117); function r() { return `${o.De.CLAN_CDN_ASSET_URL}images/`; } function a(e) { return (e = e.replace(i.A1, r())).replace("http://", "https://"); } function s(e) { return e.replace(/{STEAM_CLAN_IMAGE}/g, r()); } }, 92324: (e, t, n) => { "use strict"; n.d(t, { aN: () => F, S6: () => O, FN: () => G, U8: () => B }); var i = n(85556), o = n(78654), r = n(14206), a = n.n(r), s = n(79588); n(27378); const l = [1, 3, 2], c = [1, 3], m = { capsule: { width: 800, height: 450, rgAcceptableTypes: c }, spotlight: { width: 2108, height: 460, rgAcceptableTypes: c }, localized_store_app_spotlight: { width: 1100, height: 240, rgAcceptableTypes: c }, localized_store_app_spotlight_mobile: { width: 500, height: 160, rgAcceptableTypes: c }, background: { width: 1920, height: 622, rgAcceptableTypes: c }, hero: { width: 0, height: 0, rgAcceptableTypes: c }, email_full: { width: 800, height: 300, rgAcceptableTypes: c }, email_centered: { width: 644, height: 300, rgAcceptableTypes: c }, broadcast_left: { width: 155, height: 337, rgAcceptableTypes: c }, broadcast_right: { width: 155, height: 337, rgAcceptableTypes: c }, sale_header: { width: 0, height: 0, bDisableEnforceDimensions: !0, rgAcceptableTypes: l }, sale_overlay: { width: 0, height: 0, bDisableEnforceDimensions: !0, rgAcceptableTypes: l }, localized_image_group: { width: 0, height: 0, bDisableEnforceDimensions: !0, rgAcceptableTypes: c }, sale_section_background: { width: 0, height: 0, bDisableEnforceDimensions: !0, rgAcceptableTypes: l }, sale_section_title: { width: 0, height: 0, bDisableEnforceDimensions: !0, rgAcceptableTypes: l }, link_capsule: { width: 0, height: 0, bDisableEnforceDimensions: !0, rgAcceptableTypes: c }, product_banner: { width: 1100, height: 160, rgAcceptableTypes: c }, product_mobile_banner: { width: 500, height: 160, rgAcceptableTypes: c }, product_banner_override: { width: 1100, height: 160, rgAcceptableTypes: c }, product_mobile_banner_override: { width: 500, height: 160, rgAcceptableTypes: c }, schedule_track_art: { width: 196, height: 92, rgAcceptableTypes: c }, tab_bar_background: { width: 1500, height: 100, rgAcceptableTypes: c }, sale_logo: { width: 940, height: 460, rgAcceptableTypes: c }, bestofyear_banner: { width: 1100, height: 160, rgAcceptableTypes: l }, bestofyear_banner_mobile: { width: 500, height: 160, rgAcceptableTypes: l }, localized_marketing_message: { width: 570, height: 600, rgAcceptableTypes: l }, localized_optin_banner: { width: 1e3, height: 150, rgAcceptableTypes: c }, localized_marketingmessage_webm: { width: 570, height: 600, rgAcceptableTypes: [5] }, localized_marketingmessage_mp4: { width: 570, height: 600, rgAcceptableTypes: [4] }, localized_subtitles: { width: 0, height: 0, bDisableEnforceDimensions: !0, rgAcceptableTypes: [6, 7] }, localized_marketingmessage_poster: { width: 528, height: 297, rgAcceptableTypes: [1, 3] }, localized_marketingmessage_background: { width: 570, height: 600, rgAcceptableTypes: c }, spotlight_art: { width: 306, height: 260, rgAcceptableTypes: l }, old_spotlight_art: { width: 306, height: 350, rgAcceptableTypes: l }, marketingmessage_art: { width: 570, height: 600, rgAcceptableTypes: l }, marketingmessage_art_2: { width: 570, height: 600, rgAcceptableTypes: l }, takeover_art: { width: 1850, height: 450, rgAcceptableTypes: l }, takeover_webm_art: { width: 1850, height: 450, rgAcceptableTypes: [5] }, takeover_mp4_art: { width: 1850, height: 450, rgAcceptableTypes: [4] }, takeover_mobile_art: { width: 500, height: 350, rgAcceptableTypes: l }, takeover_webm_mobile_art: { width: 500, height: 350, rgAcceptableTypes: [5] }, takeover_mp4_mobile_art: { width: 500, height: 350, rgAcceptableTypes: [4] }, takeunder_art: { width: 940, height: 150, rgAcceptableTypes: l }, takeunder_mobile_art: { width: 500, height: 160, rgAcceptableTypes: l }, }; function d(e, t, n) { const i = m[n]; return !!i && !i.bDisableEnforceDimensions && e === i.width && t === i.height; } function h(e, t, n) { const i = m[n]; return !!i && (!!i.bDisableEnforceDimensions || !(e < i.width || t < i.height)); } function u(e, t) { return t.filter((t) => (function (e, t) { return m[t].rgAcceptableTypes.includes(e); })(e, t), ); } var p = n(88991), _ = n(11612), g = n(52705), C = n(8568), f = n(22394), v = n(88669), S = n(84290), b = n(10553); class I { constructor(e, t, n, i, o, r) { if (((this.dataUrl = void 0), (this.width = void 0), (this.height = void 0), (this.type = void 0), (this.status = void 0), (this.message = void 0), (this.fileType = 0), (0, s.rC)(this), (this.file = e), (this.fileType = F.GetExtensionTypeFromURL(e.name)), (this.language = t), (this.uploadTime = Date.now()), (this.status = "pending"), n)) { const e = u(this.fileType, n); let t = O(o, r, e, !1); void 0 === t && (t = O(o, r, e, !0)), (this.type = t || n[0]); } (this.height = r), (this.width = o), (this.dataUrl = i); } IsValidAssetType(e, t, n) { let i = 0, o = 0, r = !1, a = !e || 0 === e.length || e.includes(this.type); if (t) (i = t.width), (o = t.height), (r = !0); else if (this.type) { const e = m[this.type]; e && ((i = e.width), (o = e.height), (r = !e.bDisableEnforceDimensions)); } const s = this.width >= i && this.height >= o, l = r ? this.width === i && this.height === o : s, c = n && n != this.fileType, d = !!(e && e.length > 0) && 0 == u(this.fileType, e || []).length, h = Boolean(D(this.fileType)); let p = "", _ = !1; return a ? (d ? (p = (0, S.Xx)("#ImageUpload_InvalidFileType")) : c ? (p = (0, S.Xx)("#ImageUpload_InvalidFormat", F.GetExtensionStringForFileType(n))) : l || h ? (s ? !l && h && ((p = (0, S.Xx)("#ImageUpload_InvalidDimensions", i, o)), (_ = !0)) : (p = (0, S.Xx)("#ImageUpload_TooSmall", i, o))) : (p = (0, S.Xx)("#ImageUpload_InvalidResolution", i, o))) : (p = (0, S.Xx)("#ImageUpload_InvalidFormatSelected")), { error: p, needsCrop: _, match: this.type }; } } (0, i.gn)([s.LO], I.prototype, "dataUrl", void 0), (0, i.gn)([s.LO], I.prototype, "width", void 0), (0, i.gn)([s.LO], I.prototype, "height", void 0), (0, i.gn)([s.LO], I.prototype, "type", void 0), (0, i.gn)([s.LO], I.prototype, "status", void 0), (0, i.gn)([s.LO], I.prototype, "message", void 0); function y(e) { const t = e.split(".").pop().toLocaleLowerCase(); return "webm" == t || "mp4" == t; } class E extends I { constructor(e, t, n, i, o) { super(e, t, i, n.src, y(e.name) ? n.videoWidth : n.width, y(e.name) ? n.videoHeight : n.height), (this.bCropped = !1), (0, s.rC)(this), (this.media = n), (this.localizedImageGroupPrimaryImage = o); } ResetImage() { (this.height = this.media.height), (this.width = this.media.width), (this.dataUrl = this.media.src); } CropImage(e, t, n, o, r, a, s) { return (0, i.mG)(this, void 0, void 0, function* () { return new Promise((i, l) => { const c = D(s); if (!c) return void l("Invalid format provided"); const m = document.createElement("canvas"); (m.width = r), (m.height = a); m.getContext("2d").drawImage(this.media, e, t, n, o, 0, 0, r, a), m.toBlob((e) => { const t = m.toDataURL(c); 3 !== s && t.startsWith("data:image/png") ? l("Unable to encode into the requested file format") : ((this.file = (0, v.Lh)(e, this.file.name)), (this.width = r), (this.height = a), (this.dataUrl = t), (this.uploadTime = Date.now()), (this.bCropped = !0), i()); }); }); }); } BIsOriginalMinimumDimensions(e) { return h(this.media.width, this.media.height, e); } GetResizeDimension() { return (function (e) { if ("background" === e) return [ { width: 960, height: 311 }, { width: 480, height: 156 }, ]; if ("capsule" === e) return [{ width: m[e].width / 2, height: m[e].height / 2 }]; if ("spotlight" === e) return [{ width: m[e].width / 2, height: m[e].height / 2 }]; return; })(this.type); } } function D(e) { switch (e) { case 3: return "image/png"; case 1: return "image/jpeg"; } } function w(e, t, n) { if (((null != e && null != e) || (e = t), !n || 0 === n.length)) return e; for (const t of n) if (S.LJ.IsELanguageValidInRealm(e, t)) return e; for (const e of n) if (S.LJ.IsELanguageValidInRealm(t, e)) return t; return n.includes(_.IN.k_ESteamRealmGlobal) ? 0 : 29; } (0, i.gn)([s.LO], E.prototype, "bCropped", void 0); class R { constructor(e) { (this.m_filesToUpload = s.LO.array()), (this.m_filesCompleted = []), (this.m_allCancelTokens = new Array()), (this.m_lastError = void 0), (this.m_fnSetImageURL = null), (0, s.rC)(this), (this.m_clanSteamID = e); } GetClanSteamID() { return this.m_clanSteamID; } SetImageAllUrlFunction(e) { this.m_fnSetImageURL = e; } AddImage(e, t = 0, n, r) { return (0, i.mG)(this, void 0, void 0, function* () { const i = (function (e, t = 0) { let n = e.lastIndexOf("."); -1 != n && (e = e.slice(0, n).toLowerCase()); let i = null, r = 0; e.endsWith("korean") && ((i = 4), (r = 6)); for (let t = 0; t < 31; ++t) { const n = (0, o.j_)(t); n.length <= r || (e.endsWith(n) && ((i = t), (r = n.length))); } return i || t; })(e.name, t); return this.AddImageForLanguage(e, i, n, r); }); } AddImageForLanguage(e, t, n, o) { return (0, i.mG)(this, void 0, void 0, function* () { let i = !1; return ( yield new Promise((r) => { const a = new FileReader(); (a.onload = () => { const s = e.name.split(".").pop().toLowerCase(); let l = null; !b.L7.is_support || ("webm" != s && "mp4" != s) ? ((l = new Image()), (l.onload = () => { const a = new E(e, t, l, n, o); (this.m_filesToUpload = [...this.m_filesToUpload, a]), (i = !0), r(); })) : ((l = document.createElement("video")), (l.onloadeddata = () => { const a = new E(e, t, l, n, o); (this.m_filesToUpload = [...this.m_filesToUpload, a]), (i = !0), r(); })), (l.onerror = (e) => { console.error("CClanImageUploader failed to load the image, details", e), (i = !1), r(); }), (l.src = a.result.toString()); }), a.readAsDataURL(e); }), i ); }); } AddExistingClanImage(e, t = 0, n, o) { return (0, i.mG)(this, void 0, void 0, function* () { let i = F.GetHashAndExt(e), r = F.GenerateEditableArtworkURLFromHashAndExtension(this.m_clanSteamID, i), s = yield a()({ url: r, method: "GET", responseType: "blob" }), l = (0, v.Lh)(s.data, e.file_name); return yield this.AddImage(l, t, n, o); }); } DeleteUploadImageByIndex(e) { this.m_filesToUpload.splice(e, 1), (this.m_filesToUpload = [...this.m_filesToUpload]); } DeleteUploadImage(e) { let t = this.m_filesToUpload.findIndex((t) => e.file == t.file && e.uploadTime == t.uploadTime); t >= 0 && this.DeleteUploadImageByIndex(t); } ClearImages() { this.m_filesToUpload = s.LO.array(); } GetFilesUploaded() { return this.m_filesCompleted; } GetLastErrorFile() { return this.m_lastError; } GetCompletedFiles() { return this.m_filesCompleted.length; } GetTotalFiles() { return this.m_filesToUpload.length; } GetFilesToUpload() { return this.m_filesToUpload.map((e) => e.file); } GetUploadImages() { return this.m_filesToUpload; } BHasError() { return null != this.m_lastError; } BAllDone() { return this.m_filesCompleted.length > 0 && this.m_filesCompleted.length == this.m_filesToUpload.length; } BIsFileCompleted(e) { return -1 != this.m_filesCompleted.indexOf(e); } UploadAllImages(e, t, n, o, r) { return (0, i.mG)(this, void 0, void 0, function* () { const i = {}; for (let e of this.m_filesToUpload) if (!this.BIsFileCompleted(e.file)) { const t = e.IsValidAssetType(n, o, r); if (t.error || t.needsCrop) t.error && (this.m_lastError = { file: e.file, message: t.error, status: 401 }); else { e.status = "uploading"; i[`${e.uploadTime}/${e.file.name}`] = this.UploadFile({ uploadFile: e.file, filename: e.file.name, artworkType: t.match, resizeRequests: e.GetResizeDimension(), primaryLocalizeImage: e.localizedImageGroupPrimaryImage, lang: e.language, width: e.width, height: e.height }); } } const a = yield (0, f.bX)(i); return ( Object.keys(a).forEach((n) => { const i = a[n], o = this.m_filesToUpload.find((e) => `${e.uploadTime}/${e.file.name}` === n); if (o) if (1 !== i.success) (o.status = "failed"), (o.message = i.message); else if (((o.status = "success"), this.m_fnSetImageURL)) if (i.origimagehash) { const n = w(i.language, t, e); B.AddLocalizeImageUploaded(i.origimagehash, n); } else { const n = B.GetClanImageByImageHash(this.m_clanSteamID, i.image_hash); if (n) { const i = w(o.language, t, e); this.m_fnSetImageURL(o.type, n, i); } } }), a ); }); } CancelAllUploads() { for (let e of this.m_allCancelTokens) e.cancel((0, S.Xx)("#ImageUpload_CancelRequest")); this.m_allCancelTokens = new Array(); } RetryAllFailedUploads() { this.CancelAllUploads(), this.UploadAllImages([_.IN.k_ESteamRealmGlobal], 0); } handleUploadRefresh(e) { return (0, i.mG)(this, void 0, void 0, function* () { yield B.LoadClanImages(this.m_clanSteamID, !0, e); }); } UploadFile(e) { return (0, i.mG)(this, void 0, void 0, function* () { const { uploadFile: t, filename: n, artworkType: i, resizeRequests: o, primaryLocalizeImage: r, lang: s, width: l, height: c } = e; let m = null; const d = new FormData(); d.append("clanimage", t, n), d.append("sessionid", b.De.SESSIONID), i && d.append("arttype", i), o && o.length > 0 && d.append("resize", o.map((e) => e.width + "x" + e.height).join(",")); let h = "/uploadimage/"; r && ((h = "/ajaxuploadlocalizedimage/"), d.append("origimagehash", r.image_hash), d.append("thumbhash", r.thumbnail_hash), d.append("extension", "" + r.file_type), d.append("language", "" + s)); const u = n.split(".").pop().toLocaleLowerCase(); ("webm" != u && "mp4" != u) || (d.append("video_width", "" + l), d.append("video_height", "" + c)); const p = a().CancelToken.source(); this.m_allCancelTokens.push(p); let _ = b.De.COMMUNITY_BASE_URL + "/gid/" + this.m_clanSteamID.ConvertTo64BitString() + h, C = { cancelToken: p.token, withCredentials: !0, headers: { "Content-Type": "multipart/form-data" } }; try { (m = yield a().post(_, d, C)), this.m_filesCompleted.push(t); } catch (e) { (this.m_lastError = { file: t, status: e.response ? e.response.status : 500, message: (0, g.l)(e).strErrorMsg }), (m = e.response); } return r || (yield this.handleUploadRefresh(p)), m.data; }); } static SendResizeRequest(e, t, n, o, r) { return (0, i.mG)(this, void 0, void 0, function* () { let i = b.De.COMMUNITY_BASE_URL + "/gid/" + t.ConvertTo64BitString() + "/resizeimage/", s = new FormData(); return s.append("imagehash", n), s.append("extension", o), s.append("resize", r.map((e) => e.width + "x" + e.height).join(",")), s.append("sessionid", b.De.SESSIONID), (yield a().post(i, s, { cancelToken: e.token })).data.count; }); } } (0, i.gn)([s.LO], R.prototype, "m_filesToUpload", void 0), (0, i.gn)([s.LO], R.prototype, "m_filesCompleted", void 0), (0, i.gn)([s.LO], R.prototype, "m_lastError", void 0), (0, i.gn)([C.a], R.prototype, "AddImage", null), (0, i.gn)([C.a], R.prototype, "AddExistingClanImage", null), (0, i.gn)([C.a], R.prototype, "DeleteUploadImageByIndex", null), (0, i.gn)([C.a], R.prototype, "DeleteUploadImage", null), (0, i.gn)([C.a], R.prototype, "ClearImages", null); n(54701); var A = n(9824), M = n(93635), k = (n(2049), n(5395)), T = n(88024), L = n(87026); var G; function O(e, t, n, i = !1) { if (n) for (let o of n) { if (i ? h(e, t, o) : d(e, t, o)) return o; } } !(function (e) { (e.full = ""), (e.background_main = "_960x311"), (e.background_mini = "_480x156"), (e.capsule_main = "_400x225"), (e.spotlight_main = "_1054x230"); })(G || (G = {})); class F { constructor() { (this.m_mapClanToImages = new Map()), (this.m_mapClanImageLoadPromises = new Map()), (this.m_imageListChangeCallback = new Map()), (this.m_mapClanImageLoadState = new Map()), (this.m_mapImageIDToResolution = new Map()), (this.m_curLocImageGroup = null), (this.m_curLocImageGroupType = null), (this.m_vecClanImageDragListener = new Array()), (0, s.rC)(this); } BHasImageResolution(e) { return this.m_mapImageIDToResolution.has(e.imageid); } GetImageResolution(e) { return this.m_mapImageIDToResolution.get(e.imageid); } SetImageResolution(e, t) { this.m_mapImageIDToResolution.set(e.imageid, t); } GetImageListCallbackForClanAccountID(e) { return this.m_imageListChangeCallback.has(e) || this.m_imageListChangeCallback.set(e, new f.pB()), this.m_imageListChangeCallback.get(e); } static GetExtensionStringForFileType(e) { switch (e) { case 1: return ".jpg"; case 2: return ".gif"; case 3: return ".png"; case 5: return ".webm"; case 4: return ".mp4"; case 7: return ".srt"; case 6: return ".vtt"; } } static GetExtensionString(e) { return F.GetExtensionStringForFileType(e.file_type) || ".jpg"; } static GetExtensionTypeFromURL(e) { return (0, L.qn)(e); } static GetHashAndExt(e) { return e.image_hash + F.GetExtensionString(e); } static GetThumbHashAndExt(e) { return e.thumbnail_hash + F.GetExtensionString(e); } AddClanImageDragListener(e) { -1 == this.m_vecClanImageDragListener.indexOf(e) && this.m_vecClanImageDragListener.push(e); } RemoveClanImageDragListener(e) { let t = this.m_vecClanImageDragListener.indexOf(e); -1 != t && this.m_vecClanImageDragListener.splice(t, 1); } GetClanImageDragListener() { return this.m_vecClanImageDragListener; } BHasLoadedClanImages(e) { return this.m_mapClanToImages.has(e.GetAccountID()); } LoadClanImages(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { const i = e.GetAccountID(); return (!t && this.m_mapClanImageLoadPromises.has(i)) || this.m_mapClanImageLoadPromises.set(i, this.InternalLoadClanImages(e, t, n)), this.m_mapClanImageLoadPromises.get(i); }); } InternalLoadClanImages(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { let i = e.GetAccountID(); if (((0, M.X)(e && 0 != i, "ClanSteamID missing:" + e), e && (!this.m_mapClanToImages.has(i) || t))) { let t = {}, o = null; const r = b.De.COMMUNITY_BASE_URL + "/gid/" + e.ConvertTo64BitString() + "/getimages/"; o = yield a().get(r, { params: t, withCredentials: !0, cancelToken: n ? n.token : null }); for (let e of o.data.images) e.clanAccountID = i; (0, s.z)(() => { this.m_mapClanImageLoadState.set(i, { loaded: !0 }), this.m_mapClanToImages.set(i, o.data.images), this.GetImageListCallbackForClanAccountID(i).Dispatch(o.data.images); }); } return this.m_mapClanToImages.get(i); }); } GetLoadState(e) { return this.m_mapClanImageLoadState.get(e.GetAccountID()); } GetClanImages(e) { return this.GetClanImagesByAccount(e.GetAccountID()); } GetClanImagesByAccount(e) { let t = this.m_mapClanToImages.get(e); return t || new Array(); } GetFilteredClanImages(e, t) { let n = B.GetClanImages(e); return this.GetFilteredClanImagesList(n, t); } GetFilteredClanImagesList(e, t) { if (t && t.trim().length > 0) { t = t.trim().toLowerCase(); let n = new Array(); for (let i of e) i.file_name && i.file_name.toLowerCase().indexOf(t) >= 0 && n.push(i); return n; } return e; } GetClanImageByID(e, t) { let n = e.GetAccountID(), i = this.m_mapClanToImages.get(n); return i ? i.find((e) => e.imageid == t) : null; } GetClanImageByURL(e, t) { let n = e.GetAccountID(), i = this.m_mapClanToImages.get(n); return i ? i.find((e) => e.thumb_url == t || e.url == t) : null; } GetClanImageByFile(e, t) { let n = e.GetAccountID(), i = this.m_mapClanToImages.get(n); return i ? i.find((e) => e.file_name == t.name) : null; } GetClanImageByImageHash(e, t) { let n = e.GetAccountID(), i = this.m_mapClanToImages.get(n); return i ? i.find((e) => e.image_hash == t) : null; } DeleteClanImageByID(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = { sessionid: b.De.SESSIONID, imageid: t }, i = e.GetAccountID(), o = yield a().get(b.De.COMMUNITY_BASE_URL + "/gid/" + e.ConvertTo64BitString() + "/deleteimage/", { params: n }); if (!o || 200 != o.status || 1 != o.data.success) return o.data; let r = this.m_mapClanToImages.get(i), s = r.findIndex((e, n, i) => e.imageid == t); return s >= 0 && (r.splice(s, 1), this.GetImageListCallbackForClanAccountID(i).Dispatch([...r])), o.data; }); } DeleteClanImage(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.DeleteClanImageByID(e, t.imageid); }); } static GetHashFromHashAndExt(e) { let t = e.substring(e.lastIndexOf(".")); return e.substring(0, e.length - t.length); } static GetExtensionStringFromHashAndExt(e) { return e.substring(e.lastIndexOf(".")); } static GenerateArtworkURLFromHashAndExtensions(e, t, n = G.full, i, r) { if (n != G.full || i) { let a = t.substring(t.lastIndexOf(".")), s = t.substring(0, t.length - a.length); return i && "localized_image_group" == r ? (0, T.OL)() + e.GetAccountID() + "/" + s + "/" + (0, o.eV)((0, o.j_)(i)) + a : (0, T.OL)() + e.GetAccountID() + "/" + s + n + a; } return (0, T.OL)() + e.GetAccountID() + "/" + t; } static GenerateEditableArtworkURLFromHashAndExtension(e, t, n) { let i = b.De.COMMUNITY_BASE_URL + "gid/" + e.ConvertTo64BitString() + "/showclanimage/?image_hash_and_ext=" + t; return n && (i += "&lang=" + n), i; } static GetMimeType(e) { let t = e.substr(e.length - 3); switch (t) { case "jpg": return "image/jpeg"; case "gif": return "image/gif"; case "png": return "image/png"; } return "image/" + t; } AsyncGetImageResolution(e, t, n, o, r) { return (0, i.mG)(this, void 0, void 0, function* () { const i = t + F.GetExtensionString({ file_type: n }), a = F.GenerateEditableArtworkURLFromHashAndExtension(e, i); return yield this.AsyncGetImageResolutionInternal(a, o, r); }); } AsyncGetImageResolutionInternal(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { let i = { success: void 0 }, o = new Image(); (o.crossOrigin = "anonymous"), (o.onerror = (t) => { n || ((i.err_msg = "Load fail on url " + e + " with error: " + (0, g.l)(t).strErrorMsg), console.error(i.err_msg)), (i.success = 2); }), (o.onload = () => { (i.width = o.width), (i.height = o.height), (0, M.X)(i.width > 0 && i.height > 0, "unexpected image resolution discovered for strURL: " + e), (i.success = 1); }), (o.src = e), t.token.promise.catch((e) => { (o.onload = () => {}), (i.success = 52); }); let r = 0; for (; void 0 === i.success && r < 100; ) yield (0, k._R)(100), (r += 1); return r >= 100 && ((i.success = 16), (i.err_msg = "We timed out processing images")), i; }); } AsyncOverlay(e, t, n, o, r, a) { return (0, i.mG)(this, void 0, void 0, function* () { let i, s, l = new Image(); (l.crossOrigin = "anonymous"), (l.onerror = (e) => { (i = "Load fail on url " + n + " with error: " + (0, g.l)(e).strErrorMsg), console.error(i); }), (l.onload = () => { let e = new Image(); (e.crossOrigin = "anonymous"), (e.onerror = (e) => { (i = "Load fail on url " + t + " with error: " + (0, g.l)(e).strErrorMsg), console.error(i); }), (e.onload = () => { try { let t = document.createElement("canvas"), n = t.getContext("2d"); (t.width = r), (t.height = a), n.drawImage(e, 0, 0, r, a); let i = (r - l.width) / 2, o = (a - l.height) / 2; n.drawImage(l, i, o), t.toBlob((e) => (s = e), "image/jpeg"); } catch (e) { i = "Failed during image processing for " + o + " with " + e; } }), (e.src = t); }), (l.src = n); let c = 0; for (; void 0 === s && c < 100; ) yield (0, k._R)(100), (c += 1); if ((c >= 100 && void 0 === s && (i = "AsyncOverlay - We timed out processing images"), i)) throw (console.log(i), { success: 2, err_msg: i }); let m = new R(e), d = yield m.UploadFile({ uploadFile: s, filename: o, width: a, height: a }); return d.image_hash + F.GetExtensionString(d); }); } BDoesClanImageFileExistsOnCDNOrOrigin(e, t, n, o) { return (0, i.mG)(this, void 0, void 0, function* () { let i = b.De.COMMUNITY_BASE_URL + "gid/" + t.ConvertTo64BitString() + "/hasclanimagefile", r = { image_hash_and_ext: n, lang: "" + o }; return 1 == (yield a().get(i, { params: r, cancelToken: e && e.token })).data.success; }); } SetPrimaryImageForImageGroup(e, t) { (this.m_curLocImageGroup && this.m_curLocImageGroup.primaryImage.imageid == e.imageid && t == this.m_curLocImageGroupType) || ((this.m_curLocImageGroup = { primaryImage: e, localized_images: [] }), (this.m_curLocImageGroupType = t), (this.m_curLocImageGroup.localized_images = (0, A.LG)(this.m_curLocImageGroup.localized_images, 31, null))); } ClearImageGroup() { (this.m_curLocImageGroup = null), (this.m_curLocImageGroupType = null); } GetLocalizedImageGroupForEdit() { return this.m_curLocImageGroup; } GetLocalizedImageGroupForEditAsURL(e, t) { let n = this.m_curLocImageGroup.primaryImage; return this.m_curLocImageGroup.localized_images[t] ? this.m_curLocImageGroup.localized_images[t] : F.GenerateArtworkURLFromHashAndExtensions(e, F.GetHashAndExt(n)); } GetLocalizedImageGroupForEditAsImgArray(e) { return this.GetAllLocalizedGroupImages(); } DetermineAvailableLocalizationForGroup(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = this.m_curLocImageGroup.primaryImage, n = p.K.InitFromClanID(t.clanAccountID), i = F.GetHashAndExt(t), o = []; for (let t = 0; t < 31; ++t) o.push(this.BDoesClanImageFileExistsOnCDNOrOrigin(e, n, i, t)); let r = yield Promise.all(o); (0, s.z)(() => { for (let e = 0; e < 31; ++e) r[e] && (this.m_curLocImageGroup.localized_images[e] = F.GenerateArtworkURLFromHashAndExtensions(n, i, G.full, e, this.m_curLocImageGroupType)); }); }); } SetLocalizedImageGroupAtLang(e, t, n) { this.m_curLocImageGroup && (this.m_curLocImageGroup.localized_images[e] = n ? F.GenerateArtworkURLFromHashAndExtensions(t, n, G.full, e, this.m_curLocImageGroupType) : null); } AddLocalizeImageUploaded(e, t) { let n = this.m_curLocImageGroup.primaryImage; if (n.image_hash == e) { let e = p.K.InitFromClanID(n.clanAccountID), i = F.GetHashAndExt(n); this.m_curLocImageGroup.localized_images[t] = F.GenerateArtworkURLFromHashAndExtensions(e, i, G.full, t, this.m_curLocImageGroupType); } } GetAllLocalizedGroupImages() { return (this.m_curLocImageGroup && this.m_curLocImageGroup.localized_images) || []; } } (0, i.gn)([s.LO], F.prototype, "m_mapClanToImages", void 0), (0, i.gn)([s.LO], F.prototype, "m_mapClanImageLoadState", void 0), (0, i.gn)([s.LO], F.prototype, "m_curLocImageGroup", void 0); const B = new F(); }, 66954: (e, t, n) => { "use strict"; n.d(t, { KU: () => p, sV: () => u }); var i = n(85556), o = n(14206), r = n.n(o), a = n(79588), s = n(27378), l = n(88991), c = n(93635), m = n(10553), d = n(46096); class h { constructor() { (this.m_mapAppIDToClanInfo = new Map()), (this.m_mapVanityToClanInfo = new Map()), (this.m_mapClanAccountIDToClanInfo = new Map()), (this.m_mapPromisesLoading = new Map()), (this.m_rgQueuedEventsClanIDs = new Array()), (this.m_bLoadedFromConfig = !1), (0, a.rC)(this); } Init() { this.LazyInit(); } LazyInit() { this.m_bLoadedFromConfig || ((0, a.z)(() => { let e = (0, m.ip)("groupvanityinfo", "application_config"); this.ValidateClanConfig(e) && e.forEach((e) => { this.InternalSetupValue(e); }); }), (this.m_bLoadedFromConfig = !0)); } ValidateClanConfig(e) { const t = e; return !!(t && Array.isArray(t) && t.length > 0 && "object" == typeof t[0]) && "number" == typeof t[0].clanAccountID && ("number" == typeof t[0].appid || "string" == typeof t[0].vanity_url); } BHasClanInfoLoaded(e) { return (0, c.X)(e.BIsValid(), "Clan SteamID is not valid when ClanInfo"), (0, c.X)(e.BIsClanAccount(), "Clan SteamID is not a clan account id when requesting clan info "), this.m_mapClanAccountIDToClanInfo.has(e.GetAccountID()); } BHasClanInfoLoadedByAccountID(e) { return this.m_mapClanAccountIDToClanInfo.has(e); } RegisterClanData(e) { for (const t of e) this.InternalSetupValue(t); } InternalSetupValue(e) { const t = { clanAccountID: e.clanAccountID, clanSteamID: new l.K(e.clanSteamIDString), appid: e.appid, vanity_url: e.vanity_url, member_count: e.member_count, is_ogg: e.is_ogg, is_creator_home: e.is_creator_home, is_curator: e.is_curator, has_visible_store_page: e.has_visible_store_page, has_rss_feed: e.has_rss_feed, rss_language: e.rss_language ? e.rss_language : 0, avatar_full_url: e.avatar_full_url, avatar_medium_url: e.avatar_medium_url, group_name: e.group_name, creator_page_bg_url: e.creator_page_bg_url, partner_events_enabled: e.partner_events_enabled }; 0 != e.appid && this.m_mapAppIDToClanInfo.set(e.appid, t), e.vanity_url && e.vanity_url.length > 0 && this.m_mapVanityToClanInfo.set(e.vanity_url.toLocaleLowerCase(), t), this.m_mapClanAccountIDToClanInfo.set(e.clanAccountID, t); } GetRequestParam() { return { origin: self.origin }; } LoadOGGClanInfoForAppID(e) { return (0, i.mG)(this, void 0, void 0, function* () { if ((this.LazyInit(), "string" == typeof e && (e = parseInt(e)), (0, c.X)(0 != e, "LoadOGGClanInfoForAppID called with appid of zero"), 0 == e)) return null; if (this.m_mapAppIDToClanInfo.has(e)) return this.m_mapAppIDToClanInfo.get(e); let t = "appid_" + e; return this.m_mapPromisesLoading.has(t) || this.m_mapPromisesLoading.set(t, this.InternalLoadOGGClanInfoForAppID(e)), this.m_mapPromisesLoading.get(t); }); } InternalLoadOGGClanInfoForAppID(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = m.De.COMMUNITY_BASE_URL + "ogg/" + e + "/ajaxgetvanityandclanid/"; let n = yield r().get(t, { params: this.GetRequestParam() }); return this.InternalSetupValue(n.data), this.m_mapAppIDToClanInfo.get(e); }); } LoadOGGClanInfoForIdentifier(e) { return (0, i.mG)(this, void 0, void 0, function* () { if ((this.LazyInit(), this.m_mapVanityToClanInfo.has(null == e ? void 0 : e.toLocaleLowerCase()))) return this.m_mapVanityToClanInfo.get(null == e ? void 0 : e.toLocaleLowerCase()); let t = "storevanity_" + (null == e ? void 0 : e.toLocaleLowerCase()); return this.m_mapPromisesLoading.has(t) || this.m_mapPromisesLoading.set(t, this.InternalLoadOGGClanInfoForIdentifier(e)), this.m_mapPromisesLoading.get(t); }); } InternalLoadOGGClanInfoForIdentifier(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = m.De.COMMUNITY_BASE_URL + "games/" + e + "/ajaxgetvanityandclanid/"; let n = yield r().get(t, { params: this.GetRequestParam() }); return this.InternalSetupValue(n.data), this.m_mapVanityToClanInfo.get(null == e ? void 0 : e.toLocaleLowerCase()); }); } LoadOGGClanInfoForGroupVanity(e) { return (0, i.mG)(this, void 0, void 0, function* () { if ((this.LazyInit(), this.m_mapVanityToClanInfo.has(null == e ? void 0 : e.toLocaleLowerCase()))) return this.m_mapVanityToClanInfo.get(null == e ? void 0 : e.toLocaleLowerCase()); let t = "community_name_" + e; return this.m_mapPromisesLoading.has(t) || this.m_mapPromisesLoading.set(t, this.InternalLoadOGGClanInfoForGroupVanity(null == e ? void 0 : e.toLocaleLowerCase())), this.m_mapPromisesLoading.get(t); }); } InternalLoadOGGClanInfoForGroupVanity(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = m.De.COMMUNITY_BASE_URL + "groups/" + e + "/ajaxgetvanityandclanid/"; let n = yield r().get(t, { params: this.GetRequestParam() }); return this.InternalSetupValue(n.data), this.m_mapVanityToClanInfo.get(null == e ? void 0 : e.toLocaleLowerCase()); }); } LoadClanInfoForClanSteamID(e) { return (0, i.mG)(this, void 0, void 0, function* () { this.LazyInit(); let t = e.GetAccountID(); if (this.m_mapClanAccountIDToClanInfo.has(t)) return this.m_mapClanAccountIDToClanInfo.get(t); let n = "clanaccountid_" + t; return this.m_mapPromisesLoading.has(n) || this.m_mapPromisesLoading.set(n, this.InternalLoadClanInfoForClanSteamID(e)), this.m_mapPromisesLoading.get(n); }); } LoadClanInfoForClanAccountID(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = l.K.InitFromClanID(e); return this.LoadClanInfoForClanSteamID(t); }); } InternalLoadClanInfoForClanSteamID(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = e.GetAccountID(); const n = m.De.COMMUNITY_BASE_URL + "gid/" + e.ConvertTo64BitString() + "/ajaxgetvanityandclanid/"; let i = yield r().get(n, { params: this.GetRequestParam() }); return this.InternalSetupValue(i.data), this.m_mapClanAccountIDToClanInfo.get(t); }); } GetOGGClanInfo(e) { return "string" == typeof e ? this.m_mapVanityToClanInfo.get(null == e ? void 0 : e.toLocaleLowerCase()) : this.m_mapAppIDToClanInfo.get(e); } GetClanSteamIDForAppID(e) { if ((this.LazyInit(), this.m_mapAppIDToClanInfo.has(e))) return l.K.InitFromClanID(this.m_mapAppIDToClanInfo.get(e).clanAccountID); } GetClanVanityForAppID(e) { if ((this.LazyInit(), this.m_mapAppIDToClanInfo.has(e))) return this.m_mapAppIDToClanInfo.get(e).vanity_url; } GetClanVanityForClanSteamID(e) { if ((this.LazyInit(), this.m_mapClanAccountIDToClanInfo.has(e.GetAccountID()))) return this.m_mapClanAccountIDToClanInfo.get(e.GetAccountID()).vanity_url; } HasLoadedClanAccountID(e) { return this.LazyInit(), this.m_mapClanAccountIDToClanInfo.has(e); } GetClanMemberCount(e) { return this.m_mapAppIDToClanInfo.has(e) ? this.m_mapAppIDToClanInfo.get(e).member_count : 0; } GetClanInfoByClanAccountID(e) { return this.LazyInit(), (0, c.X)(!!e, "Unepxected clanid when requesting information. GetClanInfoByClanAccountID "), this.m_mapClanAccountIDToClanInfo.get(e); } GetCreatorStoreURL(e) { let t = d.bq.GetCreatorHome(e); if (t) return t.GetCreatorHomeURL("developer"); let n = this.GetClanInfoByClanAccountID(e.GetAccountID()); return m.De.COMMUNITY_BASE_URL + (n.vanity_url ? "groups/" + n.vanity_url : "gid/" + e.ConvertTo64BitString()); } } (0, i.gn)([a.LO], h.prototype, "m_mapAppIDToClanInfo", void 0), (0, i.gn)([a.LO], h.prototype, "m_mapVanityToClanInfo", void 0), (0, i.gn)([a.LO], h.prototype, "m_mapClanAccountIDToClanInfo", void 0), (0, i.gn)([a.aD], h.prototype, "RegisterClanData", null), (0, i.gn)([a.aD], h.prototype, "InternalSetupValue", null); const u = new h(); function p(e) { const [t, n] = (0, s.useState)(e ? u.GetClanInfoByClanAccountID(e) : void 0), [i, o] = (0, s.useState)(!!e && !u.BHasClanInfoLoadedByAccountID(e)); return ( (0, s.useEffect)(() => { if (e) if (u.BHasClanInfoLoadedByAccountID(e)) n(u.GetClanInfoByClanAccountID(e)), o(!1); else { o(!0); const t = l.K.InitFromClanID("string" == typeof e ? Number.parseInt(e) : e); u.LoadClanInfoForClanSteamID(t).then((e) => { n(e), o(!1); }); } else n(void 0), o(!1); }, [e]), [i, t] ); } window.g_ClanStore = u; }, 87026: (e, t, n) => { "use strict"; n.d(t, { qn: () => i }); n(27378); function i(e) { return e.indexOf("?") > 0 && (e = e.split("?")[0]), e.endsWith(".jpg") ? 1 : e.endsWith(".png") ? 3 : e.endsWith(".gif") ? 2 : e.endsWith(".mp4") ? 4 : e.endsWith(".webm") ? 5 : e.endsWith(".vtt") ? 6 : e.endsWith(".srt") ? 7 : e.endsWith(".webp") ? 10 : void 0; } }, 35341: (e, t, n) => { "use strict"; n.d(t, { Gg: () => d }); var i = n(85556), o = n(14206), r = n.n(o), a = n(79588), s = n(93635), l = n(84290), c = n(10553); class m { constructor() { (this.file = void 0), (this.dataURL = void 0), (this.timestamp = 0), (this.imageWidth = 0), (this.imageHeight = 0), (this.eUploadState = 0), (this.uploadProgress = 0), (this.strErrorDescription = void 0), (0, a.rC)(this); } } (0, i.gn)([a.LO], m.prototype, "file", void 0), (0, i.gn)([a.LO], m.prototype, "dataURL", void 0), (0, i.gn)([a.LO], m.prototype, "imageWidth", void 0), (0, i.gn)([a.LO], m.prototype, "imageHeight", void 0), (0, i.gn)([a.LO], m.prototype, "eUploadState", void 0), (0, i.gn)([a.LO], m.prototype, "uploadProgress", void 0), (0, i.gn)([a.LO], m.prototype, "strErrorDescription", void 0); class d { constructor(e) { (this.m_fileUploadProps = new m()), (0, a.rC)(this), (this.m_Callbacks = e); } get file_upload_props() { return this.m_fileUploadProps; } get file_upload_data_url() { return this.m_fileUploadProps.dataURL; } get file() { return this.m_fileUploadProps.file; } LogFileUploadMessage(e) { this.m_Callbacks.LogFileUploadMessage && this.m_Callbacks.LogFileUploadMessage(e); } SetUploadFileError(e, t) { (this.m_fileUploadProps.eUploadState = e), (this.m_fileUploadProps.strErrorDescription = t), (this.m_fileUploadProps.displayFileName = null); } SetImageFileToUpload(e, t = h) { var n, o, r; return (0, i.mG)(this, void 0, void 0, function* () { if (!e) return void this.SetFileToUpload(null); const i = null !== (r = null === (o = (n = this.m_Callbacks).GetFileNameOverride) || void 0 === o ? void 0 : o.call(n)) && void 0 !== r ? r : e.name; if (e.size > 1024 * this.m_Callbacks.GetMaxFileSizeMB() * 1024) return void this.SetUploadFileError(4, (0, l.Xx)("#Chat_Settings_Error_ChatFileTooLarge_dynamic", i, this.m_Callbacks.GetMaxFileSizeMB())); let a = e.name.split(".").pop().toLowerCase(); if (-1 == ["jpg", "jpeg", "png", "gif", "webm", "mpg", "mp4", "mpeg", "ogv"].indexOf(a)) return void this.SetUploadFileError(5, (0, l.Xx)("#Chat_Settings_Error_ChatFileTypeNotSupported", i)); const s = yield t(e); this.SetFileToUpload(s.file), (this.m_fileUploadProps.imageHeight = s.height), (this.m_fileUploadProps.imageWidth = s.width); }); } SetOtherFileToUpload(e) { var t, n, o; return (0, i.mG)(this, void 0, void 0, function* () { if (!e) return void this.SetFileToUpload(null); const i = null !== (o = null === (n = (t = this.m_Callbacks).GetFileNameOverride) || void 0 === n ? void 0 : n.call(t)) && void 0 !== o ? o : e.name; if (e.size > 1024 * this.m_Callbacks.GetMaxFileSizeMB() * 1024) return void this.SetUploadFileError(4, (0, l.Xx)("#Chat_Settings_Error_ChatFileTooLarge_dynamic", i, this.m_Callbacks.GetMaxFileSizeMB())); let r = e.name.split(".").pop().toLowerCase(); -1 != ["zip"].indexOf(r) ? this.SetFileToUpload(e) : this.SetUploadFileError(5, (0, l.Xx)("#Chat_Settings_Error_ChatFileTypeNotSupported", i)); }); } SetFileToUpload(e) { if (((this.m_fileUploadProps.file = e), (this.m_fileUploadProps.dataURL = null), (this.m_fileUploadProps.hmac = null), (this.m_fileUploadProps.sha1 = null), (this.m_fileUploadProps.imageWidth = 0), (this.m_fileUploadProps.imageHeight = 0), !e)) return void (this.m_fileUploadProps.eUploadState = 0); this.m_fileUploadProps.eUploadState = 1; let t = ""; for (; t.length < 40; ) t += Math.floor(16 * Math.random()).toString(16); let n = ""; try { n = URL.createObjectURL(e); } catch (e) { console.error(`Failed to created object URL from file: ${e}`); } (this.m_fileUploadProps.dataURL = n), (this.m_fileUploadProps.displayFileName = e.name), (this.m_fileUploadProps.uploadFileName = window.performance.now() + "_" + e.name), (this.m_fileUploadProps.sha1 = t), (this.m_fileUploadProps.hmac = ""), (this.m_fileUploadProps.timestamp = 0); } RetryFileUpload() { return (0, i.mG)(this, void 0, void 0, function* () { return this.BeginFileUpload(this.m_fileUploadProps.additionalProps); }); } BeginFileUpload(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = this.m_fileUploadProps.file; if (!t) throw ((0, s.X)(!1, "Must SetImageFileToUpload before calling BeginFileUpload"), new Error("Invalid State")); (this.m_fileUploadProps.eUploadState = 2), (this.m_fileUploadProps.uploadProgress = 0), (this.m_fileUploadProps.additionalProps = e); let n = new FormData(); n.append("sessionid", c.De.SESSIONID), n.append("l", c.De.LANGUAGE), n.append("file_size", t.size.toString()), n.append("file_name", this.m_fileUploadProps.uploadFileName), n.append("file_sha", this.m_fileUploadProps.sha1), n.append("file_image_width", this.m_fileUploadProps.imageWidth.toString()), n.append("file_image_height", this.m_fileUploadProps.imageHeight.toString()), n.append("file_type", t.type), this.m_Callbacks.PopulateBeginFileUploadFormData && this.m_Callbacks.PopulateBeginFileUploadFormData(n, this.file_upload_props.additionalProps); try { let e, t = yield fetch(this.m_Callbacks.GetBeginFileUploadURL() + `?l=${c.De.LANGUAGE}`, { method: "POST", body: n, credentials: "include" }); try { e = yield t.json(); } catch (e) {} if (!e || !e.result) throw new Error(); if (!t.ok) { let n = null; throw ( ((0, a.z)(() => { (this.m_fileUploadProps.eUploadState = 3), this.LogFileUploadMessage(t), (n = (null == e ? void 0 : e.message) ? (null == e ? void 0 : e.message) : (0, l.Xx)("#Chat_Settings_Error_ServerError")), (this.m_fileUploadProps.strErrorDescription = (0, l.Xx)("#Chat_Upload_ErrorStart", n)); }), n) ); } return (this.m_fileUploadProps.timestamp = e.timestamp), (this.m_fileUploadProps.hmac = e.hmac), this.DoFileUpload(e.result); } catch (e) { let t = e || (0, l.Xx)("#ConnectionTrouble_FailedToConnect"); throw ( ((0, a.z)(() => { (this.m_fileUploadProps.eUploadState = 3), (this.m_fileUploadProps.strErrorDescription = (0, l.Xx)("#Chat_Upload_ErrorStart", t)); }), t) ); } }); } DoFileUpload(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = this.m_fileUploadProps.file, n = e.use_https ? "https://" : "http://"; n += e.url_host + e.url_path; let i = { onUploadProgress: (e) => { let t = (e.loaded / e.total) * 100; t > this.m_fileUploadProps.uploadProgress && (0, a.z)(() => { this.m_fileUploadProps.uploadProgress = t; }); }, headers: {}, transformRequest: [(e) => e], }; for (let t = 0; t < e.request_headers.length; ++t) { let n = e.request_headers[t]; "Content-Length" != n.name && "Host" != n.name && (i.headers[n.name] = n.value); } try { return yield r().put(n, t, i), this.CommitFileUpload(!0, e.ugcid); } catch (t) { throw ( (this.LogFileUploadMessage(t.response), (0, a.z)(() => { (this.m_fileUploadProps.strErrorDescription = (0, l.Xx)("#Chat_Upload_ErrorCloud")), (this.m_fileUploadProps.eUploadState = 3), (this.m_fileUploadProps.uploadProgress = 0); }), this.CommitFileUpload(!1, e.ugcid), this.m_fileUploadProps.strErrorDescription) ); } }); } CommitFileUpload(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = this.m_fileUploadProps.file, i = this.m_fileUploadProps.sha1, o = new FormData(); o.append("sessionid", c.De.SESSIONID), o.append("l", c.De.LANGUAGE), o.append("file_name", this.m_fileUploadProps.uploadFileName), o.append("file_sha", i), o.append("success", e ? "1" : "0"), o.append("ugcid", t), o.append("file_type", n.type), o.append("file_image_width", this.m_fileUploadProps.imageWidth.toString()), o.append("file_image_height", this.m_fileUploadProps.imageHeight.toString()), o.append("timestamp", this.m_fileUploadProps.timestamp.toString()), o.append("hmac", this.m_fileUploadProps.hmac), this.m_Callbacks.PopulateCommitFileUploadFormData(o, this.file_upload_props.additionalProps); try { let t = yield fetch(this.m_Callbacks.GetCommitFileUploadURL(), { method: "POST", body: o }); return e ? ((this.m_fileUploadProps.uploadProgress = 0), (this.m_fileUploadProps.eUploadState = 6)) : (this.m_fileUploadProps.eUploadState = 3), t; } catch (t) { if (!e) return null; let n = null; throw ( ((0, a.z)(() => { if ((this.LogFileUploadMessage(t), (this.m_fileUploadProps.uploadProgress = 0), (this.m_fileUploadProps.eUploadState = 3), t.response)) { let e = t.response.data; t.response.status, e && e.success; n = e.message ? e.message : (0, l.Xx)("#Chat_Settings_Error_ServerError"); } else n = (0, l.Xx)("#ConnectionTrouble_FailedToConnect"); this.m_fileUploadProps.strErrorDescription = `Failed to commit upload: ${n}`; }), n) ); } }); } ClearFileUploadError() { (3 != this.m_fileUploadProps.eUploadState && 4 != this.m_fileUploadProps.eUploadState && 5 != this.m_fileUploadProps.eUploadState) || this.Reset(); } Reset() { this.SetFileToUpload(null); } } function h(e) { return new Promise((t) => { let n = new FileReader(); (n.onload = () => { let i = e, o = (function (e) { let t = new DataView(e), n = 0, i = 0, o = [], r = 0; if (65496 == t.getUint16(n)) { n += 2; let a = t.getUint16(n); for (n += 2; n < t.byteLength && n < 131072; ) { if (65505 == a) (o[r] = { recess: i, offset: n - 2 }), (i = n + t.getUint16(n)), r++; else if (65498 == a) break; (n += t.getUint16(n)), (a = t.getUint16(n)), (n += 2); } let s = e.byteLength - i; if ( (o.forEach((e) => { s += e.offset - e.recess; }), s === e.byteLength) ) return e; const l = new Uint8Array(s); if (o.length > 0) { let t = 0; o.forEach((n) => { let i = n.offset - n.recess; l.set(new Uint8Array(e.slice(n.recess, n.offset)), t), (t += i); }), l.set(new Uint8Array(e.slice(i)), t); } return l.buffer; } return e; })(n.result), r = new Blob([o], { type: e.type }); if (r) { let t = r; (t.lastModifiedDate = new Date(e.lastModified)), (t.name = e.name), (i = t); } if (0 == e.type.indexOf("image")) { let n = new Image(); (n.src = URL.createObjectURL(e)), (n.onload = (e) => { t({ file: i, width: n.width, height: n.height }); }); } else t({ file: i, width: 0, height: 0 }); }), n.readAsArrayBuffer(e); }); } (0, i.gn)([a.aD], d.prototype, "SetUploadFileError", null), (0, i.gn)([a.aD], d.prototype, "SetImageFileToUpload", null), (0, i.gn)([a.aD], d.prototype, "SetOtherFileToUpload", null), (0, i.gn)([a.aD], d.prototype, "SetFileToUpload", null), (0, i.gn)([a.aD], d.prototype, "RetryFileUpload", null), (0, i.gn)([a.aD], d.prototype, "BeginFileUpload", null), (0, i.gn)([a.aD], d.prototype, "DoFileUpload", null), (0, i.gn)([a.aD], d.prototype, "CommitFileUpload", null), (0, i.gn)([a.aD], d.prototype, "ClearFileUploadError", null), (0, i.gn)([a.aD], d.prototype, "Reset", null); }, 46096: (e, t, n) => { "use strict"; n.d(t, { bq: () => u, iG: () => p }); var i = n(85556), o = n(54701), r = n(14206), a = n.n(r), s = n(79588), l = n(27378), c = n(10553); class m { constructor(e) { (this.m_appidList = new Array()), (this.m_socialList = new Array()), (this.m_strName = ""), (this.m_strAvatarURLFullSize = ""), (this.m_strTagLineLoc = ""), (this.m_nFollowers = 0), (this.m_strVanity = ""), (this.m_webLink = void 0), (this.m_bIsLoaded = !1), (this.m_bIsHidden = !1), (this.m_clanAccountFlags = 0), (0, s.rC)(this), (this.m_clanSteamID = e); } Initialize(e) { var t; (this.m_strName = e.name || ""), (this.m_strAvatarURLFullSize = e.avatar_url_full_size || "https://avatars.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_full.jpg"), e.social && e.social.forEach((e) => this.m_socialList.push(e)), (this.m_strTagLineLoc = e.tag_line_localized || ""), (this.m_nFollowers = e.followers || 0), (this.m_strVanity = e.vanity || void 0), (this.m_webLink = e.weblink), (this.m_bIsHidden = e.hidden || !1), (this.m_clanAccountFlags = null !== (t = e.clan_account_flags) && void 0 !== t ? t : 0), e.appids && e.appids.forEach((e) => this.m_appidList.push(e)), (this.m_bIsLoaded = !0); } GetCreatorHomeIdentifier() { return { name: this.m_strName, clan_account_id: this.m_clanSteamID.GetAccountID(), type: "developer", hidden: this.m_bIsHidden }; } BIsPartnerEventEditorEnabled() { return Boolean(8 & this.m_clanAccountFlags); } BHasClanAccountFlagSet(e) { return Boolean(this.m_clanAccountFlags & e); } BIsLoaded() { return this.m_bIsLoaded; } GetClanSteamID() { return this.m_clanSteamID; } GetClanAccountID() { return this.m_clanSteamID.GetAccountID(); } GetAppIDList() { return this.m_appidList; } GetSocialList() { return this.m_socialList; } GetName() { return this.m_strName; } GetAvatarURLFullSize() { return this.m_strAvatarURLFullSize; } GetTagLine() { return this.m_strTagLineLoc; } GetNumFollowers() { return this.m_nFollowers; } BIsHidden() { return this.m_bIsHidden; } GetCreatorHomeURL(e) { if (this.m_strVanity) { switch (e) { case "publisher": return c.De.STORE_BASE_URL + "publisher/" + this.m_strVanity + "/"; case "franchise": return c.De.STORE_BASE_URL + "franchise/" + this.m_strVanity + "/"; } return c.De.STORE_BASE_URL + "developer/" + this.m_strVanity + "/"; } return c.De.STORE_BASE_URL + "curator/" + this.m_clanSteamID.GetAccountID() + "/"; } BHasWebLink() { return void 0 !== this.m_webLink; } GetWebLink() { return this.m_webLink; } GetVanityString() { return this.m_strVanity; } AdjustFollower(e) { this.m_nFollowers += e; } EnablePartnerEventEditorFlag() { return (0, i.mG)(this, void 0, void 0, function* () { this.BIsPartnerEventEditorEnabled() || (yield this.UpdateGroupFlagsFeature([2, 8], !0)); }); } UpdateGroupFlagsFeature(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = c.De.PARTNER_BASE_URL + "sales/ajaxupdateclanaccountflags", i = this.m_clanAccountFlags; if ( (e.forEach((e) => { t ? (i |= e) : (i &= ~e); }), i == this.m_clanAccountFlags) ) return; let o = new Array(); 1 & i && o.push(1), 8 & i && o.push(8), 2 & i && o.push(2), 4 & i && o.push(4), 16 & i && o.push(16), 32 & i && o.push(32), 64 & i && o.push(64); let r = new FormData(); r.append("sessionid", c.De.SESSIONID), r.append("clan_account_id", this.GetClanAccountID().toString()), r.append("accountflags", JSON.stringify(o)); let s = yield a().post(n, r); s && 200 == s.status && 1 == s.data.success && (this.m_clanAccountFlags = i); }); } } (0, i.gn)([s.LO], m.prototype, "m_appidList", void 0), (0, i.gn)([s.LO], m.prototype, "m_nFollowers", void 0), (0, i.gn)([s.LO], m.prototype, "m_clanAccountFlags", void 0); var d = n(88991); class h { constructor() { (this.m_mapClanToCreatorHome = new Map()), (this.m_mapAppToCreatorIDList = new Map()), (this.m_bLoadedFromConfig = !1), (0, s.rC)(this); } LazyInit() { if (!this.m_bLoadedFromConfig) { let e = (0, c.kQ)("creatorhome", "application_config"); this.ValidateStoreDefault(e) && e.forEach((e) => { let t = Number(e.creator_clan_id), n = d.K.InitFromClanID(t), i = new m(n); i.Initialize(e), (i.m_promise = h.GetAsPromise(i)), this.m_mapClanToCreatorHome.set(t, i); }); let t = (0, c.kQ)("creatorhomeforapp", "application_config"); this.ValidateStoreDefaultAppList(t) && t.forEach((e) => { void 0 !== e.appid && (this.m_mapAppToCreatorIDList.has(e.appid) || this.m_mapAppToCreatorIDList.set(e.appid, new Array()), this.m_mapAppToCreatorIDList.get(e.appid).push(e)); }), (this.m_bLoadedFromConfig = !0); } } static GetAsPromise(e) { return (0, i.mG)(this, void 0, void 0, function* () { return e; }); } ValidateStoreDefault(e) { const t = e; return !!(t && Array.isArray(t) && t.length > 0 && "object" == typeof t[0]) && "string" == typeof t[0].name && ("string" == typeof t[0].creator_clan_id || "number" == typeof t[0].creator_clan_id); } ValidateStoreDefaultAppList(e) { const t = e; return !!(t && Array.isArray(t) && t.length > 0 && "object" == typeof t[0]) && "number" == typeof t[0].clan_account_id && t[0].clan_account_id > 0 && "number" == typeof t[0].appid && t[0].appid > 0; } BHasCreatorHomeLoaded(e) { return this.m_mapClanToCreatorHome.has(e.GetAccountID()) && this.m_mapClanToCreatorHome.get(e.GetAccountID()).BIsLoaded(); } GetCreatorHome(e) { return this.m_mapClanToCreatorHome.get(e.GetAccountID()); } GetCreatorHomeByID(e) { return this.m_mapClanToCreatorHome.get(e.clan_account_id); } LoadCreatorHome(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if ((this.LazyInit(), !this.m_mapClanToCreatorHome.has(e.GetAccountID()))) { let n = new m(e); (n.m_promise = this.InternalCreatorHome(n, t)), yield n.m_promise, this.m_mapClanToCreatorHome.set(e.GetAccountID(), n); } return this.m_mapClanToCreatorHome.get(e.GetAccountID()).m_promise; }); } InternalCreatorHome(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = { get_appids: !0, l: c.De.LANGUAGE, origin: self.origin }, i = c.De.STORE_BASE_URL + "curator/" + e.GetClanAccountID() + "/ajaxgetcreatorhomeinfo", o = yield a().get(i, { params: n, cancelToken: t && t.token }); return e.Initialize(o.data), e; }); } LoadCreatorHomeListForAppIncludeHiddden(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if ((this.LazyInit(), !this.m_mapAppToCreatorIDList.has(e))) { let n = { appid: e }, i = c.De.STORE_BASE_URL + "events/ajaxgetcreatorhomeidforapp", o = yield a().get(i, { params: n, cancelToken: t && t.token, withCredentials: !0 }); this.m_mapAppToCreatorIDList.set(e, o.data.creator_list); } return this.m_mapAppToCreatorIDList.get(e); }); } SearchCreatorHomeStore(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { let i = `${c.De.STORE_BASE_URL}curator/0/ajaxsearchcurators`, o = { term: e.replace(" ", "+"), require_creator: t, cc: c.De.COUNTRY, l: c.De.LANGUAGE, origin: self.origin }, r = new Array(); const l = yield a().get(i, { params: o, cancelToken: n.token }); return ( l.data.curators && (0, s.z)(() => { l.data.curators.forEach((e) => { if (!this.m_mapClanToCreatorHome.has(e.creator_clan_id)) { let t = d.K.InitFromClanID(e.creator_clan_id), n = new m(t); n.Initialize(e), this.m_mapClanToCreatorHome.set(e.creator_clan_id, n); } r.push(this.m_mapClanToCreatorHome.get(e.creator_clan_id)); }); }), r ); }); } GetCreatorHomeListForAppIncludeHidden(e) { return this.m_mapAppToCreatorIDList.has(e) ? this.m_mapAppToCreatorIDList.get(e) : []; } } (0, i.gn)([s.LO], h.prototype, "m_mapClanToCreatorHome", void 0), (0, i.gn)([s.LO], h.prototype, "m_mapAppToCreatorIDList", void 0), (0, i.gn)([s.aD], h.prototype, "LazyInit", null); const u = new h(); function p(e) { var t; const n = d.K.InitFromClanID(e), [i, r] = l.useState(u.GetCreatorHome(n)), a = (0, o.T)("useCreatorHome"); return ( l.useEffect(() => { const t = d.K.InitFromClanID(e); u.BHasCreatorHomeLoaded(t) ? i || r(u.GetCreatorHome(t)) : u.LoadCreatorHome(t).then(() => { var e; (null === (e = null == a ? void 0 : a.token) || void 0 === e ? void 0 : e.reason) || r(u.GetCreatorHome(t)); }); }, [null === (t = null == a ? void 0 : a.token) || void 0 === t ? void 0 : t.reason, e, i]), i ); } window.g_CreatorHomeStore = u; }, 91867: (e, t, n) => { "use strict"; n.d(t, { u: () => s }); var i = n(85556), o = n(10553), r = n(79588); const a = 604800; class s { constructor() { (this.m_bEmoticonListRequested = !1), (this.m_bInitialized = !1), (this.m_rtMostRecentEmoticon = void 0), (this.m_rgEmoticons = []), (this.m_rgFlairs = []), (this.m_rgStickers = []), (this.m_rgEffects = []), (this.m_rtLastStickerOrEffect = Number.MIN_SAFE_INTEGER), (this.m_emoticonTrackerCallback = null), (this.m_stickerTrackerCallback = null), (0, r.rC)(this); } static GetEmoticonURL(e, t) { return t ? o.De.COMMUNITY_CDN_URL + "economy/emoticonlarge/" + e : o.De.COMMUNITY_CDN_URL + "economy/emoticon/" + e; } static GetEmoticonReplaceRegex() { return s.sm_EmoticonRegex; } static BEmoticonFilterMatch(e, t) { return -1 !== `:${e.name_normalized || e.name}:`.indexOf(t.toLowerCase()); } static FilterEmoticons(e, t) { return t && ":" !== t ? e.filter((e) => s.BEmoticonFilterMatch(e, t)) : e; } static BStickerFilterMatch(e, t) { return e.name.toLowerCase().indexOf(t.toLowerCase()) > -1; } static FilterStickers(e, t) { return t ? e.filter((e) => s.BStickerFilterMatch(e, t)) : e; } SearchEmoticons(e, t = 25, n = !0) { function i(e) { return e.name_normalized || e.name; } this.UpdateEmoticonList(), (e = e.toLocaleLowerCase()); let o = this.recent_emoticons.filter((t) => !e || i(t).startsWith(e)), r = this.recent_emoticons.filter((t) => !n && -1 !== i(t).indexOf(e)), a = this.m_rgEmoticons.filter((t) => !e || i(t).startsWith(e)), s = this.m_rgEmoticons.filter((t) => !n && -1 !== i(t).indexOf(e)), l = new Set(), c = []; function m(e, n, o) { return !(c.length >= t) && (l.has(e) || (l.add(e), c.push({ name: i(e), recent: n, new: o })), !0); } function d(e, t, n) { for (let i of e) if (!m(i, t, n(i))) break; } return d(o, !0, (e) => !(e.last_used || !e.time_received)), d(a, !1, () => !1), d(r, !0, (e) => !(e.last_used || !e.time_received)), d(s, !1, () => !1), c; } get is_initialized() { return this.m_bInitialized; } GetTimeReceivedNewestEmoticon() { return this.UpdateEmoticonList(), this.m_rtMostRecentEmoticon; } GetTimeReceivedForStickerOrEffect() { return this.m_rtLastStickerOrEffect; } UpdateEmoticonList() { this.m_bInitialized || this.RequestEmoticonList(); } get emoticon_list() { return this.UpdateEmoticonList(), this.m_rgEmoticons; } get flair_list() { return this.UpdateEmoticonList(), this.m_rgFlairs; } GetStickerList() { return this.m_rgStickers; } GetEffectList() { return this.m_rgEffects; } GetFlairListByGroupID(e) { return this.m_rgFlairs.filter((t) => t.flairGroupID === e); } get recent_emoticons() { return this.m_rgRecentEmoticons || this.BuildRecentEmoticonList(), this.m_rgRecentEmoticons; } get recent_stickers() { return this.m_rgRecentStickers || this.BuildRecentStickerList(), this.m_rgRecentStickers; } SetEmoticonTrackerCallback(e) { this.m_emoticonTrackerCallback = e; } SetStickerTrackerCallback(e) { this.m_stickerTrackerCallback = e; } TrackEmoticonUsage(e, t) { if (!this.m_bInitialized) return; this.m_emoticonTrackerCallback && this.m_emoticonTrackerCallback(e, t); let n, i = new Map(), o = /\[emoticon\]([^[]*)/g; for (; (n = o.exec(e)); ) { let e = i.get(n[1]) || 0; i.set(n[1], e + 1); } let r = !1; if (i.size) { if (void 0 !== this.m_rgRecentEmoticons) for (let e of this.m_rgRecentEmoticons) i.has(e.name) && ((e.last_used = t), (e.use_count += i.get(e.name)), i.delete(e.name), e.time_received && ((r = !0), delete e.time_received)); if (i.size) for (let e of this.m_rgEmoticons) i.has(e.name) && ((e.last_used = t), (e.use_count += i.get(e.name)), delete e.time_received, void 0 !== this.m_rgRecentEmoticons && this.m_rgRecentEmoticons.push(e)); if (void 0 !== this.m_rgRecentEmoticons && (this.BuildRecentEmoticonList(), r)) { this.m_rtMostRecentEmoticon = void 0; for (let e of this.m_rgRecentEmoticons) !e.last_used && e.time_received && (!this.m_rtMostRecentEmoticon || e.time_received > this.m_rtMostRecentEmoticon) && (this.m_rtMostRecentEmoticon = e.time_received); } } } TrackStickerUsage(e, t) { if (!this.m_bInitialized) return; this.m_stickerTrackerCallback && this.m_stickerTrackerCallback(e, t); const n = this.m_rgStickers.find(({ name: t }) => t === e); (n.last_used = t), (n.use_count += 1), delete n.time_received, this.BuildRecentStickerList(); } RequestEmoticonList() { !this.m_bEmoticonListRequested && this.BInitialized() && ((this.m_bEmoticonListRequested = !0), this.RequestEmoticonListInternal()); } BuildRecentEmoticonList() { this.m_rgRecentEmoticons = this.BuildRecentList(this.m_rgEmoticons); } BuildRecentStickerList() { this.m_rgRecentStickers = this.BuildRecentList(this.m_rgStickers); } BuildRecentList(e) { const t = this.GetServerTime() - a, n = e.filter(({ last_used: e, time_received: n }) => e || (n && n > t)); return n.sort((e, t) => (t.last_used || t.time_received) - (e.last_used || e.time_received)), n.slice(0, 50); } OnEmoticonListReceived(e) { (this.m_rgFlairs = []), (this.m_rgEmoticons = []), (this.m_rgRecentEmoticons = void 0), (this.m_rtMostRecentEmoticon = void 0); let t = this.GetServerTime() - a; for (let n of e) { let e = n.name; e.startsWith("^") ? this.m_rgFlairs.push({ name: e.match(new RegExp(/:(.*):/))[1], flairGroupID: e.match(new RegExp(/\^(.*)\^/))[1] }) : (!n.last_used && n.time_received > t ? (!this.m_rtMostRecentEmoticon || n.time_received > this.m_rtMostRecentEmoticon) && (this.m_rtMostRecentEmoticon = n.time_received) : delete n.time_received, this.m_rgEmoticons.push(n)); } (this.m_bInitialized = !0), (this.m_bEmoticonListRequested = !1); } } (s.sm_EmoticonRegex = new RegExp("ː([a-zA-Z0-9_\\-]+)ː", "g")), (0, i.gn)([r.LO], s.prototype, "m_bInitialized", void 0), (0, i.gn)([r.LO], s.prototype, "m_rtMostRecentEmoticon", void 0), (0, i.gn)([r.LO], s.prototype, "m_rtLastStickerOrEffect", void 0), (0, i.gn)([r.aD], s.prototype, "TrackEmoticonUsage", null); }, 37153: (e, t, n) => { "use strict"; n.d(t, { $: () => l }); var i = n(85556), o = n(10553), r = n(79588), a = n(14206), s = n.n(a); const l = new (class { constructor() { (this.m_mapEmoticonHovers = r.LO.map()), (this.m_inflightRequests = {}); } Get(e) { return this.m_mapEmoticonHovers.has(e) || this.m_inflightRequests[e] ? this.m_mapEmoticonHovers.get(e) : (this.Load(e), null); } BLoaded(e) { return !!this.m_mapEmoticonHovers.get(e); } Load(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = `${o.De.COMMUNITY_CDN_URL}economy/emoticonhoverjson/${encodeURIComponent(e)}?l=${encodeURIComponent(o.De.LANGUAGE)}&origin=${(0, o.Kc)()}`; this.m_inflightRequests[e] = !0; try { const { data: n } = yield s().get(t); !(function (e) { return e && "object" == typeof e && "number" == typeof e.appid && "string" == typeof e.app_name; })(n) ? this.m_mapEmoticonHovers.set(e, null) : this.m_mapEmoticonHovers.set(e, n); } catch (t) { this.m_mapEmoticonHovers.set(e, null); } finally { this.m_inflightRequests[e] = !1; } }); } })(); }, 87634: (e, t, n) => { "use strict"; n.d(t, { Y: () => c, g: () => i }); var i, o = n(14206), r = n.n(o), a = n(10553), s = n(22394), l = n(18681); !(function (e) { (e[(e.k_eDiscussions = 0)] = "k_eDiscussions"), (e[(e.k_eThumbsUp = 1)] = "k_eThumbsUp"), (e[(e.k_eClickThrough = 2)] = "k_eClickThrough"), (e[(e.k_eMuted = 3)] = "k_eMuted"), (e[(e.k_ePlayedVideo = 4)] = "k_ePlayedVideo"), (e[(e.k_eReminder_Opened = 5)] = "k_eReminder_Opened"), (e[(e.k_eReminder_MobilePush = 6)] = "k_eReminder_MobilePush"), (e[(e.k_eReminder_Email = 7)] = "k_eReminder_Email"), (e[(e.k_eReminder_CalendarApple = 8)] = "k_eReminder_CalendarApple"), (e[(e.k_eReminder_CalendarGoogle = 9)] = "k_eReminder_CalendarGoogle"), (e[(e.k_eReminder_CalendarOutlook = 10)] = "k_eReminder_CalendarOutlook"), (e[(e.k_eReminder_EmailUnverified = 11)] = "k_eReminder_EmailUnverified"), (e[(e.k_eReminder_MobilePushMissing = 12)] = "k_eReminder_MobilePushMissing"); })(i || (i = {})); const c = new (class { constructor() { (this.m_nPastViewedIndex = 0), (this.m_nPastViewedDays = 0), (this.m_nFutureViewedIndex = 0), (this.m_nFutureViewableEvents = 0), (this.m_nLastRecordedFilter = 0), (this.m_sBrowserID = void 0), (this.m_scheduledFilterChange = new s.Ar()), (this.m_scheduledFutureStats = new s.Ar()), (this.m_scheduledPastStats = new s.Ar()); } RecordViewedEvent(e, t) { const n = e.GetStoreInitializationTimestamp().getTime() / 1e3; this.m_nFutureViewableEvents = 0; let i, o = 0, r = null; const a = e.GetCurrentlyLoadedItemsForStats(); for (const e of a) { const a = e.start_time > n; if ((e.unique_id == t && ((i = o), (r = e)), a)) this.m_nFutureViewableEvents++; else if (void 0 !== i) break; o++; } if (void 0 !== i) if (i < this.m_nFutureViewableEvents) { const t = this.m_nFutureViewableEvents - i; if (this.m_nFutureViewedIndex < t) { this.m_nFutureViewedIndex = t; const n = () => { const t = Math.min(this.m_nFutureViewedIndex, 4095) | (Math.min(this.m_nFutureViewableEvents, 255) << 12) | (Math.min(this.GetTimeSpentOnPageS(e), 2047) << 20); c.SendExperimentEventToSteam(18, t); }, i = 500; this.m_scheduledFutureStats.Schedule(i, n); } } else { const t = i - this.m_nFutureViewableEvents; if (this.m_nPastViewedIndex < t) { (this.m_nPastViewedIndex = t), (this.m_nPastViewedDays = Math.floor((n - r.start_time) / 86400)); const i = () => { const t = Math.min(this.m_nPastViewedIndex, 4095) | (Math.min(this.m_nPastViewedDays, 255) << 12) | (Math.min(this.GetTimeSpentOnPageS(e), 2047) << 20); c.SendExperimentEventToSteam(17, t); }, o = 500; this.m_scheduledPastStats.Schedule(o, i); } } } RecordFilterChangeEvent(e) { this.m_scheduledFilterChange.Schedule(1e3, () => { let t = 0; e.BIsGameSourceAllowed(l.Gf.k_ELibrary) && (t |= 1), e.BIsGameSourceAllowed(l.Gf.k_EWishlist) && (t |= 2), e.BIsGameSourceAllowed(l.Gf.k_EFollowing) && (t |= 4), e.BIsGameSourceAllowed(l.Gf.k_ERecommended) && (t |= 8), e.BIsGameSourceAllowed(l.Gf.k_ESteam) && (t |= 16), e.BIsGameSourceAllowed(l.Gf.k_EFeatured) && (t |= 32), e.BIsGameSourceAllowed(l.Gf.k_ERecent) && (t |= 64), e.BIsEventTypeGroupAllowed(l.Ar.k_ENews) && (t |= 1024), e.BIsEventTypeGroupAllowed(l.Ar.k_EEvents) && (t |= 2048), e.BIsEventTypeGroupAllowed(l.Ar.k_EStreaming) && (t |= 4096), e.BIsEventTypeGroupAllowed(l.Ar.k_EUpdates) && (t |= 8192), e.BIsEventTypeGroupAllowed(l.Ar.k_EReleases) && (t |= 16384), e.BIsEventTypeGroupAllowed(l.Ar.k_ESales) && (t |= 32768), t != this.m_nLastRecordedFilter && ((this.m_nLastRecordedFilter = t), this.SendExperimentEventToSteam(16, t)); }); } GetTimeSpentOnPageS(e) { const t = e.GetStoreInitializationTimestamp(), n = new Date(); return Math.max(0, Math.floor((n.getTime() - t.getTime()) / 1e3)); } RecordAppInteractionEvent(e, t) { this.SendExperimentEventToSteam(19, t); } SendExperimentEventToSteam(e, t) { this.InitBrowserID(); const n = a.De.STORE_BASE_URL + "events/ajaxreportnewshubstats/", i = new URLSearchParams(); i.append("page_action", "" + e), i.append("snr", a.De.SNR), i.append("uint_data", "" + t), i.append("str_data", this.m_sBrowserID), r().post(n, i); } InitBrowserID() { if (void 0 === this.m_sBrowserID) if (a.De.IN_CLIENT) this.m_sBrowserID = "steam"; else { const e = navigator.userAgent; /iPhone|iPad|iPod/i.test(e) || (/Macintosh/i.test(e) && /Safari/i.test(e)) ? (this.m_sBrowserID = "ios") : /Android/i.test(e) ? (this.m_sBrowserID = "android") : (this.m_sBrowserID = ""); } } })(); window.g_EventCalendarTrackingStore = c; }, 18681: (e, t, n) => { "use strict"; n.d(t, { Ar: () => p, Gf: () => i, RC: () => f }); var i, o = n(85556), r = n(79588), a = n(582), s = n(93635), l = n(10553), c = n(87634), m = n(2028); !(function (e) { (e.k_ERecent = "recent"), (e.k_ELibrary = "library"), (e.k_EWishlist = "wishlist"), (e.k_EFollowing = "following"), (e.k_ERecommended = "recommended"), (e.k_ESteam = "steam"), (e.k_EFeatured = "featured"), (e.k_ECurator = "curator"); })(i || (i = {})); const d = [i.k_ELibrary, i.k_EWishlist, i.k_EFollowing, i.k_ERecommended, i.k_ESteam, i.k_ECurator], h = [...d, i.k_EFeatured], u = [i.k_EFeatured]; var p; !(function (e) { (e.k_ENews = "news"), (e.k_EEvents = "events"), (e.k_EStreaming = "streaming"), (e.k_EUpdates = "updates"), (e.k_EReleases = "releases"), (e.k_ESales = "sales"); })(p || (p = {})); const _ = [p.k_ENews, p.k_EEvents, p.k_EStreaming, p.k_EUpdates, p.k_EReleases, p.k_ESales], g = new Map([ [p.k_ENews, [28]], [p.k_EEvents, [9, 27, 22, 23, 24, 35, 25, 26]], [p.k_EStreaming, [11]], [p.k_EUpdates, [12, 13, 14]], [p.k_EReleases, [10, 29, 16, 15, 32]], [p.k_ESales, [20, 21, 31, 34]], ]); function C(e) { return new Map(e.map((e) => [e, !0])); } class f { constructor(e) { (this.m_mapEventTypeGroupsAllowed = new Map()), (this.m_mapGameSources = new Map()), (this.m_bCuratorUnhideOnFollowDialogDismissed = !1), (this.m_mapHiddenApps = new Map()), (this.m_mapHiddenClans = new Map()), (this.m_eStorageType = "session"), (0, r.rC)(this), (0, r.z)(() => { (null == e ? void 0 : e.rgHiddenApps) && e.rgHiddenApps.forEach((e) => this.m_mapHiddenApps.set(e, !0)), (null == e ? void 0 : e.rgHiddenClans) && e.rgHiddenClans.forEach((e) => this.m_mapHiddenClans.set(e, !0)); }); } GetGameSources() { return Array.from(this.m_mapGameSources.keys()); } GetStorageObject() { return this.m_strStorageKey ? ("session" === this.m_eStorageType ? window.sessionStorage : window.localStorage) : null; } GetPreferencesStorageKey() { return `${this.m_strStorageKey}-event-calendar-prefs`; } get enabledEventTypeSet() { const e = new Set(); for (const t of Array.from(this.m_mapEventTypeGroupsAllowed.keys())) g.get(t).forEach((t) => e.add(t)); return e; } MapClanEventTypeToGroup(e) { let t = null; return ( g.forEach((n, i) => { -1 !== n.indexOf(e) && (t = i); }), t || p.k_EEvents ); } InitDefaultCheckboxes(e, t, n) { (this.m_bInitializedForUpdatesOnly = t), (this.m_mapEventTypeGroupsAllowed = C(t ? [p.k_EUpdates] : _)); const o = (0, l.h4)() ? h : d; (this.m_mapGameSources = C(e ? o : u)), n && this.m_mapGameSources.set(i.k_EFeatured, !0); } Init(e, t, n, i, o) { (this.m_eStorageType = o), (this.m_strStorageKey = i); const r = this.GetStorageObject(), a = r ? r.getItem(this.GetPreferencesStorageKey()) : null; if (a) { const e = JSON.parse(a); if (e.rgEventTypeGroupsAllowed && e.rgGameSources) { const { rgEventTypeGroupsAllowed: t, rgGameSources: n } = e; return (this.m_mapEventTypeGroupsAllowed = C(t)), (this.m_mapGameSources = C(n)), void (void 0 !== e.bCuratorUnhideOnFollowDismissed && (this.m_bCuratorUnhideOnFollowDialogDismissed = e.bCuratorUnhideOnFollowDismissed)); } } this.InitDefaultCheckboxes(e, t, n); } SaveFilterPreferences() { const e = this.GetStorageObject(); if (!e) return; const t = { rgEventTypeGroupsAllowed: Array.from(this.m_mapEventTypeGroupsAllowed.keys()), rgGameSources: Array.from(this.m_mapGameSources.keys()), bCuratorUnhideOnFollowDismissed: this.m_bCuratorUnhideOnFollowDialogDismissed }; e.setItem(this.GetPreferencesStorageKey(), JSON.stringify(t)); } BCuratorUnhideOnFollowDialogDismissed() { return this.m_bCuratorUnhideOnFollowDialogDismissed; } SetCuratorUnhideOnFollowDialogDismissed(e) { (this.m_bCuratorUnhideOnFollowDialogDismissed = e), this.SaveFilterPreferences(); } BIsEventTypeGroupAllowed(e) { return this.m_mapEventTypeGroupsAllowed.has(e); } BIsGameSourceAllowed(e) { return !(e === i.k_EFollowing && !m.JW.bIsFollowingEnabled) && !(e === i.k_ECurator && !m.JW.bIsCuratorsEnabled) && this.m_mapGameSources.has(e); } SetEventTypeGroupAllowed(e, t) { t ? this.m_mapEventTypeGroupsAllowed.set(e, !0) : this.m_mapEventTypeGroupsAllowed.delete(e), this.SaveFilterPreferences(), c.Y.RecordFilterChangeEvent(this); } SetGameSourceAllowed(e, t) { t ? (this.m_mapGameSources.set(e, !0), e == i.k_ERecent ? this.m_mapGameSources.delete(i.k_ELibrary) : e == i.k_ELibrary && ((0, s.X)(!this.m_mapGameSources.has(i.k_ERecent), "Setting Library although Recent already set - illusion was broken"), this.m_mapGameSources.delete(i.k_ERecent))) : (this.m_mapGameSources.delete(e), e == i.k_ERecent ? this.m_mapGameSources.set(i.k_ELibrary, !0) : e == i.k_ELibrary && this.m_mapGameSources.delete(i.k_ERecent)), this.SaveFilterPreferences(), c.Y.RecordFilterChangeEvent(this); } BShouldDisplayEvent(e) { const t = e.GetSource(), n = Boolean(e.appInfo && e.appInfo.last_played && e.appInfo.last_played + 15552e3 >= m.JW.GetTimeNowWithOverride()); return !!(this.enabledEventTypeSet.has(e.event_type) || (this.m_bInitializedForUpdatesOnly && this.BIsEventTypeGroupAllowed(p.k_EUpdates) && 28 == e.event_type && e.start_time < 1599202800)) && !this.m_mapHiddenApps.has(e.appid) && !this.m_mapHiddenClans.has(e.clanid) && (!!(t & a.ZT.k_eRequired || t & a.ZT.k_eReposted) || Boolean((this.BIsGameSourceAllowed(i.k_ERecent) && n) || (this.BIsGameSourceAllowed(i.k_ELibrary) && t & a.ZT.k_eLibrary) || (this.BIsGameSourceAllowed(i.k_EWishlist) && t & a.ZT.k_eWishlist) || (this.BIsGameSourceAllowed(i.k_EFollowing) && t & a.ZT.k_eFollowing) || (this.BIsGameSourceAllowed(i.k_ERecommended) && t & a.ZT.k_eRecommended) || (this.BIsGameSourceAllowed(i.k_ESteam) && t & a.ZT.k_eSteam) || (this.BIsGameSourceAllowed(i.k_EFeatured) && t & a.ZT.k_eFeatured) || (this.BIsGameSourceAllowed(i.k_ECurator) && t & a.ZT.k_eCurator))); } BAreAllEventsHidden() { return 0 == this.m_mapEventTypeGroupsAllowed.size || 0 == this.m_mapGameSources.size; } BAreAnyEventsFiltered(e) { const t = (0, l.h4)() ? h : d; return (e ? t : u).some((e) => !this.BIsGameSourceAllowed(e)) || _.some((e) => !this.BIsEventTypeGroupAllowed(e)); } BIsClanVisible(e) { return !this.m_mapHiddenClans.has(e); } SetClanVisibility(e, t) { t ? this.m_mapHiddenClans.has(e) && this.m_mapHiddenClans.delete(e) : this.m_mapHiddenClans.has(e) || this.m_mapHiddenClans.set(e, !0); } BIsAppVisible(e) { return !this.m_mapHiddenApps.has(e); } SetAppVisibility(e, t) { t ? this.m_mapHiddenApps.has(e) && this.m_mapHiddenApps.delete(e) : this.m_mapHiddenApps.has(e) || this.m_mapHiddenApps.set(e, !0); } } (0, o.gn)([r.LO], f.prototype, "m_mapEventTypeGroupsAllowed", void 0), (0, o.gn)([r.LO], f.prototype, "m_mapGameSources", void 0), (0, o.gn)([r.LO], f.prototype, "m_bCuratorUnhideOnFollowDialogDismissed", void 0), (0, o.gn)([r.LO], f.prototype, "m_mapHiddenApps", void 0), (0, o.gn)([r.LO], f.prototype, "m_mapHiddenClans", void 0), (0, o.gn)([(0, r.Fl)({ keepAlive: !0, equals: r.p6.structural })], f.prototype, "enabledEventTypeSet", null), (0, o.gn)([r.aD], f.prototype, "SetEventTypeGroupAllowed", null), (0, o.gn)([r.aD], f.prototype, "SetGameSourceAllowed", null); }, 2028: (e, t, n) => { "use strict"; n.d(t, { JW: () => m, zD: () => u }); var i = n(85556), o = n(79588), r = n(61320), a = n.n(r), s = n(27378), l = (n(54701), n(10553)); class c { constructor() { (this.bOpenEventLandingPage = !1), (this.bIncludeFeaturedAsGameSource = !0), (this.nOverrideDateNow = void 0), (0, o.rC)(this); } get bRequireAllEventsLoadedInTimeBlock() { return !1; } get bIsFollowingEnabled() { return !(0, l.h4)(); } get bIsCuratorsEnabled() { return !(0, l.h4)(); } get bIncludeCurators() { return !0; } GetTimeNowWithOverride() { return this.nOverrideDateNow ? this.nOverrideDateNow : Math.floor(Date.now() / 1e3); } GetTimeNowWithOverrideAsDate() { return this.nOverrideDateNow ? new Date(1e3 * this.nOverrideDateNow) : new Date(); } BHasTimeOverride() { return Boolean(this.nOverrideDateNow); } ParseDevOverrides(e) { if (!e || 0 == e.length) return; const t = new URLSearchParams("?" == e[0] ? e.substring(1) : e); if (t.has("t") && ("dev" == l.De.WEB_UNIVERSE || "beta" == l.De.WEB_UNIVERSE)) { const e = t.get("t"); let n = /^\d+$/.test(e) ? a().unix(Number.parseInt(e)) : a()(e); (this.nOverrideDateNow = Math.floor(n.unix())), console.log("CEventCalendarDevFeatures overriding partner event time: " + this.nOverrideDateNow + " " + n.format()); } } } (0, i.gn)([o.LO], c.prototype, "nOverrideDateNow", void 0); const m = new c(); window.g_EventCalendarDevFeatures = m; const d = new Date(), h = Math.floor(d.getTime() / 1e3); function u() { return s.useMemo(() => { return null !== (e = m.nOverrideDateNow) && void 0 !== e ? e : h; var e; }, []); } }, 85177: (e, t, n) => { "use strict"; n.d(t, { cb: () => C, rE: () => p }); var i = n(85556), o = n(14206), r = n.n(o), a = n(79588), s = n(1736), l = n(57869), c = n(22394), m = n(8568), d = n(10553), h = n(52705); class u { constructor(e) { (this.m_setShownEvents = new Set()), (this.m_setReadEvents = new Set()), (this.m_rgPendingUpload = []), (this.m_schUpload = new c.Ar()), (this.m_bUploading = !1), (this.m_CMInterface = e); } MarkEventShown(e, t, n) { let i = this.MakeKey(e, n); if (this.m_setShownEvents.has(i)) return !1; this.m_setShownEvents.add(i); let o = new l.Op(); return o.set_event_gid(e), o.set_clanid(t), o.set_display_location(n), o.set_mark_shown(!0), this.QueueForUpload(o), !0; } MarkEventRead(e, t, n) { let i = this.MakeKey(e, n); if (this.m_setReadEvents.has(i)) return !1; this.m_setReadEvents.add(i); let o = new l.Op(); return o.set_event_gid(e), o.set_clanid(t), o.set_display_location(n), o.set_mark_read(!0), this.QueueForUpload(o), !0; } MakeKey(e, t) { return `${e}_${t}`; } QueueForUpload(e) { this.m_rgPendingUpload.push(e), this.ScheduleUpload(); } ScheduleUpload() { this.m_bUploading || (this.m_rgPendingUpload.length >= 30 ? this.UploadPendingData() : this.m_schUpload.IsScheduled() || this.m_schUpload.Schedule(6e4, this.UploadPendingData)); } Flush() { return (0, i.mG)(this, void 0, void 0, function* () { if (!this.m_bUploading) return this.UploadPendingData(); }); } UploadPendingData() { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_bUploading) return; this.m_schUpload.Cancel(); let e = this.m_rgPendingUpload.splice(0, 30); if (0 == e.length) return; let t = !1; if (this.m_CMInterface) { let n = s.gA.Init(l.DI); for (let t of e) n.Body().add_markings(t); this.m_bUploading = !0; let i = yield l.AE.MarkPartnerEventsForUser(this.m_CMInterface.GetServiceTransport(), n); (this.m_bUploading = !1), (t = 1 == i.GetEResult()); } else { if (!d.L7.logged_in) return; let n = e.map((e) => e.toObject()), i = (0, d.Kc)() + "actions/ajaxmarkpartnerevents"; const o = new FormData(); o.append("sessionid", d.De.SESSIONID), o.append("request", JSON.stringify(n)); try { t = 1 == (yield r().post(i, o, { withCredentials: !0 })).data.success; } catch (e) { let t = (0, h.l)(e); console.error("CPartnerEventUserTracking.UploadPendingData error " + t.strErrorMsg, t); } } t ? this.m_rgPendingUpload.length > 0 && this.ScheduleUpload() : (console.log("Saving news event state failed. Will try again soon!"), (this.m_rgPendingUpload = this.m_rgPendingUpload.concat(e)), this.m_schUpload.Schedule(6e4, this.UploadPendingData)); }); } } (0, i.gn)([m.a], u.prototype, "UploadPendingData", null); n(88991); var p, _ = n(93635); n(27378); class g { constructor(e) { (this.clanid = void 0), (this.appid = 0), (this.can_edit = !1), (this.owns_app = !1), (this.follows_app = !1), (this.support_user = !1), (this.valve_admin = !1), (this.limited_user = !1), (this.event_ignored = new Array()), (this.event_followed = new Array()), (this.event_followed_flags = new Array()), (0, a.rC)(this), (this.clanid = e); } } (0, i.gn)([a.LO], g.prototype, "clanid", void 0), (0, i.gn)([a.LO], g.prototype, "appid", void 0), (0, i.gn)([a.LO], g.prototype, "can_edit", void 0), (0, i.gn)([a.LO], g.prototype, "owns_app", void 0), (0, i.gn)([a.LO], g.prototype, "follows_app", void 0), (0, i.gn)([a.LO], g.prototype, "support_user", void 0), (0, i.gn)([a.LO], g.prototype, "valve_admin", void 0), (0, i.gn)([a.LO], g.prototype, "limited_user", void 0), (0, i.gn)([a.LO], g.prototype, "event_ignored", void 0), (0, i.gn)([a.LO], g.prototype, "event_followed", void 0), (0, i.gn)([a.LO], g.prototype, "event_followed_flags", void 0), (function (e) { (e[(e.k_ENotifyFlagNone = 0)] = "k_ENotifyFlagNone"), (e[(e.k_ENotifyFlagByEmail = 1)] = "k_ENotifyFlagByEmail"), (e[(e.k_ENotifyFlagByPush = 2)] = "k_ENotifyFlagByPush"); })(p || (p = {})); class C { constructor() { (this.m_mapClanToUserPermissions = new Map()), (this.m_mapAnnounceGIDToVote = new Map()), (this.m_setReadEventGIDs = new Set()), (this.m_cm = void 0), (this.m_bIsPresentationMode = (0, d.y9)()), (0, a.rC)(this); } static Get() { return (0, _.X)(!!C.s_EventUserStore, "Have not yet initialized global EventUserStore"), C.s_EventUserStore; } static IsInitialized() { return !!C.s_EventUserStore; } static InitGlobal(e) { return (0, i.mG)(this, void 0, void 0, function* () { if (!C.s_EventUserStore) { const t = new C(); yield t.Init(e), (C.s_EventUserStore = t), "dev" == d.De.WEB_UNIVERSE && (window.g_EventUserStore = t); } }); } Init(e) { return (0, i.mG)(this, void 0, void 0, function* () { (this.m_cm = e), (this.m_tracker = new u(e)); const t = (0, d.ip)("partnereventpermissions", "application_config"); this.ValidateStoreDefault(t) && ((0, a.z)(() => { t.forEach((e) => { let t = new g(e.clanid), n = { result: t, promise: C.RemapToPromise(t) }; this.CopyFromResponseToTrack(n, e), this.m_mapClanToUserPermissions.set(e.clanid, n); }); }), ("dev" != d.De.WEB_UNIVERSE && "beta" != d.De.WEB_UNIVERSE) || console.log("CEventUserStore has loaded", this.m_mapClanToUserPermissions.size, this.m_mapClanToUserPermissions)); let n = (0, d.ip)("uservotes", "application_config"); n && (0, a.z)(() => { n.forEach((e) => { let t = !!e.voted_up || (!e.voted_down && void 0); this.m_mapAnnounceGIDToVote.set(e.clanAnnouncementGID, t); }); }); }); } GetTracker() { return this.m_tracker; } ValidateStoreDefault(e) { const t = e; return !!(t && Array.isArray(t) && t.length > 0 && "object" == typeof t[0]) && "number" == typeof t[0].clanid && "number" == typeof t[0].appid; } RecordEventShown(e, t) { e && !e.bOldAnnouncement && this.m_tracker.MarkEventShown(e.GID, e.clanSteamID.GetAccountID(), t); } RecordEventRead(e, t) { e && !e.bOldAnnouncement && (this.HasEventBeenRead(e.GID) || (this.SetEventAsRead(e.GID), this.m_tracker.MarkEventRead(e.GID, e.clanSteamID.GetAccountID(), t))); } SetEventAsRead(e) { this.m_setReadEventGIDs.add(e); } HasEventBeenRead(e) { return this.m_setReadEventGIDs.has(e); } static RemapToPromise(e) { return (0, i.mG)(this, void 0, void 0, function* () { return e; }); } BIsUserLoggedIn() { return d.L7.logged_in; } BIsPartnerEventPermissionsLoaded(e) { return this.m_mapClanToUserPermissions.has(e); } GetPartnerEventPermissions(e) { if (!e || !e.BIsValid()) return new g(0); const t = e.GetAccountID(); this.m_mapClanToUserPermissions.has(t) || this.LoadSingleAppEventPermissions(e); return this.m_mapClanToUserPermissions.get(t).result; } BFollowsEvent(e, t) { return -1 != this.GetPartnerEventPermissions(e).event_followed.indexOf(t); } BFollowsEventAndNotifiedBy(e, t, n) { let i = this.GetPartnerEventPermissions(e), o = i.event_followed.indexOf(t); return -1 !== o && (i.event_followed_flags[o] & n) == n; } BIgnoresEvent(e, t) { return -1 != this.GetPartnerEventPermissions(e).event_ignored.indexOf(t); } LoadSingleAppEventPermissions(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = e.GetAccountID(), n = this.m_mapClanToUserPermissions.get(t); return n || ((n = { promise: this.InternalLoadSingleAppEventPermissions(e), result: new g(t) }), this.m_mapClanToUserPermissions.set(t, n)), n.promise; }); } CopyFromResponseToTrack(e, t) { (e.result.appid = t.appid), (e.result.can_edit = t.can_edit), (e.result.clanid = t.appid), (e.result.event_followed = t.event_followed), (e.result.event_ignored = t.event_ignored), (e.result.event_followed_flags = t.event_followed_flags), (e.result.follows_app = t.follows_app), (e.result.owns_app = t.owns_app), (e.result.limited_user = t.limited_user), (t.support_user || t.valve_admin) && this.m_bIsPresentationMode ? ((e.result.can_edit = !0), (e.result.support_user = !1), (e.result.valve_admin = !1)) : ((e.result.support_user = t.support_user), (e.result.valve_admin = t.valve_admin)); } InternalLoadSingleAppEventPermissions(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = null, n = e.GetAccountID(), i = !Boolean(d.L7.logged_in); if (!this.m_mapClanToUserPermissions.has(n)) { let t = new g(e.GetAccountID()); this.m_mapClanToUserPermissions.set(n, { result: t, promise: C.RemapToPromise(t) }); } try { if (Boolean(d.L7.logged_in)) { let o = d.De.COMMUNITY_BASE_URL + "gid/" + e.ConvertTo64BitString() + "/ajaxgetpartnereventpermissions/", a = {}; if (("partnerweb" == (0, d.Zv)() && ((o = d.De.PARTNER_BASE_URL + "partnerevents/ajaxgetpartnereventpermissions"), (a = { clanaccountid: e.GetAccountID() })), (t = yield r().get(o, { params: a, withCredentials: !0 })), 1 != t.data.success)) console.error("Partner Events Failed Load:" + (0, h.l)(t.data).strErrorMsg), (i = !0); else { let e = this.m_mapClanToUserPermissions.get(n); this.CopyFromResponseToTrack(e, t.data); } } } catch (e) { if (((t = e.response), (i = !0), e && void 0 !== e.response && void 0 !== e.response.data && void 0 !== e.response.data.success && 21 == e.response.data.success)); else { const t = (0, h.l)(e); console.error("InternalLoadSingleAppEventPermissions account: " + n + ": " + t.strErrorMsg, t); } } finally { i && (0, a.z)(() => { let e = this.m_mapClanToUserPermissions.get(n); (e.result.appid = t && t.data ? t.data.appid : 0), (e.result.can_edit = !1), (e.result.clanid = t && t.data ? t.data.clanid : 0), (e.result.event_followed = new Array()), (e.result.event_ignored = new Array()), (e.result.event_followed_flags = new Array()), (e.result.follows_app = !1), (e.result.owns_app = !1), (e.result.support_user = !1), (e.result.valve_admin = !1), (e.result.limited_user = !1); }); } return this.m_mapClanToUserPermissions.get(n).result; }); } SetFollowOrUnfollowEvent(e, t, n, o, s) { return (0, i.mG)(this, void 0, void 0, function* () { let i = this.GetPartnerEventPermissions(n), l = i.event_followed.indexOf(o), c = 0; -1 !== l && ((c = i.event_followed_flags[l]), e ? (s = c & ~s) : (s |= c)); let m = 0 == s, h = ("store" === (0, d.Zv)() ? d.De.STORE_BASE_URL + "events" : d.De.COMMUNITY_BASE_URL + "/gid/" + n.ConvertTo64BitString()) + (m ? "/unfolloworunignoreevent" : "/followorignoreevent"), u = new URLSearchParams(); u.append("sessionid", d.De.SESSIONID), u.append("ignore", "" + t), u.append("gid", o), u.append("notification_flag", "" + s), u.append("clan_accountid", "" + n.GetAccountID()); yield r().post(h, u, { withCredentials: !0 }); (0, a.z)(() => { let e = this.m_mapClanToUserPermissions.get(n.GetAccountID()), i = null, r = null, a = null, l = null; m ? ((i = t ? e.result.event_ignored : e.result.event_followed), (a = t ? null : e.result.event_followed_flags)) : t ? ((i = e.result.event_followed), (a = e.result.event_followed_flags), (r = e.result.event_ignored)) : ((i = e.result.event_ignored), (r = e.result.event_followed), (l = e.result.event_followed_flags)); let c = i.indexOf(o); if ((c > -1 && (i.splice(c, 1), a && a.splice(c, 1)), r)) { let e = r.indexOf(o); -1 == e ? (r.push(o), l && l.push(s)) : (l[e] = s); } }); }); } Vote(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { if (!e || !e.AnnouncementGID) return !1; const i = this.m_mapAnnounceGIDToVote.get(e.AnnouncementGID); if (i === t) return !0; if ( (this.m_mapAnnounceGIDToVote.set(e.AnnouncementGID, t), (0, a.z)(() => { !0 === i && e.UpdateVoteCount("up", -1), !1 === i && e.UpdateVoteCount("down", -1), !0 === t && e.UpdateVoteCount("up", 1), !1 === t && e.UpdateVoteCount("down", 1); }), this.m_cm) ) { let n = s.gA.Init(l.Y3); return n.Body().set_announcementid(e.AnnouncementGID), n.Body().set_vote_up(!!t), n.Body().set_clan_accountid(e.clanSteamID.GetAccountID()), 1 == (yield l.AE.RateClanAnnouncement(this.m_cm.GetServiceTransport(), n)).GetEResult(); } { const i = (0, d.Zv)(), o = "community" == i || "steamtv" == i ? d.De.COMMUNITY_BASE_URL + "gid/" + e.clanSteamID.ConvertTo64BitString() + "/announcements/rate/" + e.AnnouncementGID : d.De.STORE_BASE_URL + "updated/ajaxrateupdate/" + e.AnnouncementGID, a = new URLSearchParams(); a.append("sessionid", d.De.SESSIONID), a.append("voteup", t ? "1" : "0"), a.append("clanid", "" + e.clanSteamID.GetAccountID()), a.append("ajax", "1"); const s = { withCredentials: !0, cancelToken: n.token }; return 1 == (yield r().post(o, a, s)).data.success; } }); } LoadMyVote(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (null == e ? void 0 : e.AnnouncementGID) { if (this.m_mapAnnounceGIDToVote.has(e.AnnouncementGID)) return this.m_mapAnnounceGIDToVote.get(e.AnnouncementGID); let n; if (this.m_cm) { let t = s.gA.Init(l.n6); t.Body().set_announcementid(e.AnnouncementGID); let i = yield l.AE.GetClanAnnouncementVoteForUser(this.m_cm.GetServiceTransport(), t); 1 == i.GetEResult() && (n = !!i.Body().voted_up() || (!i.Body().voted_down() && void 0)); } else { const i = "store" == (0, d.Zv)(), o = i ? d.De.STORE_BASE_URL + "actions/ajaxgetmyannouncementvote" : d.De.COMMUNITY_BASE_URL + "gid/" + e.clanSteamID.ConvertTo64BitString() + "/announcements/ajaxgetmyvote/" + e.AnnouncementGID, a = { gid: i ? e.AnnouncementGID : void 0 }, s = yield r().get(o, { withCredentials: !0, cancelToken: t.token, params: a }); n = !!s.data.voted_up || (!s.data.voted_down && void 0); } return this.m_mapAnnounceGIDToVote.set(e.AnnouncementGID, n), n; } }); } SetVote(e, t) { this.m_mapAnnounceGIDToVote.set(e, t); } BHasMyVote(e) { return !!e.AnnouncementGID && this.m_mapAnnounceGIDToVote.has(e.AnnouncementGID); } GetPreviouslyLoadedVote(e) { return e.AnnouncementGID ? this.m_mapAnnounceGIDToVote.get(e.AnnouncementGID) : void 0; } BShowEmailEditorTab(e) { if (e.BHasEmailEnabled()) return !0; let t = this.GetPartnerEventPermissions(e.clanSteamID); return (d.JA.IS_OGG || d.JA.IS_VALVE_GROUP) && t.valve_admin; } BShowSaleEditorTab(e) { if (e.BHasSaleEnabled()) return !0; let t = this.GetPartnerEventPermissions(e.clanSteamID); return !d.JA.IS_OGG && (t.valve_admin || (e.jsondata.clone_from_event_gid && e.jsondata.clone_from_sale_enabled)); } } (0, i.gn)([a.LO], C.prototype, "m_mapClanToUserPermissions", void 0), (0, i.gn)([a.LO], C.prototype, "m_mapAnnounceGIDToVote", void 0), (0, i.gn)([a.LO], C.prototype, "m_setReadEventGIDs", void 0), (0, i.gn)([a.aD], C.prototype, "CopyFromResponseToTrack", null); }, 65213: (e, t, n) => { "use strict"; n.d(t, { j1: () => j }); var i = n(85556), o = n(14206), r = n.n(o), a = n(79588), s = n(98315), l = n(78654), c = n(71129), m = n(11612); const d = { bBroadcastEnabled: !1, broadcastChatSetting: "hide", default_broadcast_title: "#Broadcast_default_title_dev", localized_broadcast_title: new Array(31), localized_broadcast_left_image: new Array(31), localized_broadcast_right_image: new Array(31), broadcast_whitelist: [] }; var h = n(88991), u = n(88024), p = n(92324), _ = n(66954), g = n(46096), C = n(2028), f = n(44420), v = n(93635), S = n(84290), b = n(59702); n(27378); var I = n(52705), y = n(10553); var E = n(21298), D = (n(5395), n(8568)); (0, i.gn)( [D.a], class { constructor(e, t) { (this.m_eventModel = e), (this.m_entry = t); } GetEventStartTime() { return this.m_entry.rtime_start_specific ? this.m_entry.rtime_start_specific : this.m_eventModel.startTime + this.m_entry.delta_from_event_start_seconds; } }.prototype, "GetEventStartTime", null, ); new Set([9, 11, 20, 21, 22, 23, 24, 25, 26, 27, 31, 35]); var w; !(function (e) { (e[(e.k_EEventStateUnpublished = 0)] = "k_EEventStateUnpublished"), (e[(e.k_EEventStateStaged = 1)] = "k_EEventStateStaged"), (e[(e.k_EEventStateVisible = 2)] = "k_EEventStateVisible"); })(w || (w = {})); var R, A, M, k, T, L; !(function (e) { (e[(e.k_EStoreFilterClauseTypeOr = 0)] = "k_EStoreFilterClauseTypeOr"), (e[(e.k_EStoreFilterClauseTypeAnd = 1)] = "k_EStoreFilterClauseTypeAnd"), (e[(e.k_EStoreFilterClauseTypeStoreTag = 2)] = "k_EStoreFilterClauseTypeStoreTag"), (e[(e.k_EStoreFilterClauseTypeFeatureTag = 3)] = "k_EStoreFilterClauseTypeFeatureTag"), (e[(e.k_EStoreFilterClauseTypeLanguage = 4)] = "k_EStoreFilterClauseTypeLanguage"), (e[(e.k_EStoreFilterClauseTypeContentDescriptor = 5)] = "k_EStoreFilterClauseTypeContentDescriptor"), (e[(e.k_EStoreFilterClauseTypePrice = 6)] = "k_EStoreFilterClauseTypePrice"), (e[(e.k_EStoreFilterClauseTypeAppType = 7)] = "k_EStoreFilterClauseTypeAppType"); })(R || (R = {})), (function (e) { (e[(e.k_ESaleTagFilter = 0)] = "k_ESaleTagFilter"), (e[(e.k_ELanguage = 1)] = "k_ELanguage"), (e[(e.k_EContentDescriptor = 2)] = "k_EContentDescriptor"), (e[(e.k_EUserPreference = 3)] = "k_EUserPreference"), (e[(e.k_EPrice = 4)] = "k_EPrice"), (e[(e.k_EAppType = 5)] = "k_EAppType"); })(A || (A = {})), (function (e) { (e[(e.k_EHideOwnedItems = 0)] = "k_EHideOwnedItems"), (e[(e.k_EHideWishlistedItems = 1)] = "k_EHideWishlistedItems"), (e[(e.k_EHideIgnoredItems = 2)] = "k_EHideIgnoredItems"); })(M || (M = {})), (function (e) { (e[(e.k_ESortFacetsByName = 0)] = "k_ESortFacetsByName"), (e[(e.k_ESortFacetsByMatchCount = 1)] = "k_ESortFacetsByMatchCount"), (e[(e.k_ESortFacetsManually = 2)] = "k_ESortFacetsManually"); })(k || (k = {})), (function (e) { (e.Steam = "Steam"), (e.Facebook = "Facebook"), (e.Twitter = "Twitter"), (e.Reddit = "Reddit"); })(T || (T = {})), (function (e) { (e.Summary = "summary"), (e.SummaryLargeImage = "summary_large_image"); })(L || (L = {})); const G = { capsules: [], events: [], links: [], localized_label: new Array(31), localized_label_image: new Array(31), default_label: "#Sale_default_label", section_type: "unselected_empty" }; var O; !(function (e) { (e[(e.k_ETaggedItems = 0)] = "k_ETaggedItems"), (e[(e.k_EContentHub = 1)] = "k_EContentHub"); })(O || (O = {})); const F = Object.assign(Object.assign({ localized_subtitle: new Array(31), localized_summary: new Array(31), localized_title_image: new Array(31), localized_capsule_image: new Array(31), bSaleEnabled: !1, sale_show_creator: !1, sale_sections: [], sale_browsemore_text: "", sale_browsemore_url: "", sale_browsemore_color: "", sale_browsemore_bgcolor: "", localized_sale_header: new Array(31), localized_sale_overlay: new Array(31), localized_sale_product_banner: new Array(31), localized_sale_product_mobile_banner: new Array(31), localized_sale_logo: new Array(31), sale_font: "", sale_background_color: "", sale_header_offset: 530, referenced_appids: [] }, d), { bScheduleEnabled: !1, scheduleEntries: [] }), B = "old_announce_", x = ["workshop", "patchnotes", "contenthub", "skip_megaphone", "curator", "curator_group_members", "curator_public", "audience_followers", "enable_steam_china", "disable_steam_global", "adult_only_content"]; class N { constructor() { (this.GID = void 0), (this.AnnouncementGID = void 0), (this.forumTopicGID = void 0), (this.type = 1), (this.appid = 0), (this.name = new Map()), (this.description = new Map()), (this.timestamp_loc_updated = new Map()), (this.startTime = void 0), (this.endTime = void 0), (this.visibilityStartTime = void 0), (this.visibilityEndTime = void 0), (this.m_nBuildID = void 0), (this.m_strBuildBranch = void 0), (this.postTime = void 0), (this.visibility_state = w.k_EEventStateUnpublished), (this.broadcaster = void 0), (this.jsondata = F), (this.nCommentCount = 0), (this.nVotesUp = 0), (this.nVotesDown = 0), (this.bOldAnnouncement = !1), (this.announcementClanSteamID = void 0), (this.loadedAllLanguages = !1), (this.bLoaded = !1), (this.deleteInProgress = !1), (this.vecTags = new Array()), (this.last_update_steamid = void 0), (this.rtime32_last_modified = void 0), (this.rtime32_last_solr_search_col_updated = void 0), (this.rtime32_last_local_modification = void 0), (this.rtime32_moderator_reviewed = void 0), (this.video_preview_type = void 0), (this.video_preview_id = void 0), (this.m_overrideCurrentDay = void 0), (0, a.rC)(this); } BIsPartnerEvent() { return !this.bOldAnnouncement && Boolean(this.GID); } static FromJSON(e) { let t = new N(), n = JSON.parse(e); return Object.assign(t, n), (t.name = new Map(n.name)), (t.description = new Map(n.description)), (t.vecTags = new Array(n.vecTags)), (t.clanSteamID = new h.K(n.clanSteamID)), (0, v.X)(t.clanSteamID && t.clanSteamID.BIsValid(), "Invalid Clan SteamID: " + t.clanSteamID.ConvertTo64BitString()), n.broadcaster && ((t.broadcaster = new h.K(n.broadcaster)), (0, v.X)(t.broadcaster && t.broadcaster.BIsValid(), "Invalid Broadcast SteamID: " + t.broadcaster.ConvertTo64BitString())), t; } toJSON(e) { let t = new Object(); return Object.assign(t, this), (t.name = Array.from(this.name)), (t.description = Array.from(this.description)), (t.tags = Array.from(this.vecTags)), (t.clanSteamID = this.clanSteamID.ConvertTo64BitString()), this.broadcaster && (t.broadcaster = this.broadcaster.ConvertTo64BitString()), t; } clone(e = !1) { let t = new N(); return ( (t.GID = this.GID), (t.AnnouncementGID = this.AnnouncementGID), (t.clanSteamID = this.clanSteamID), (t.bOldAnnouncement = this.bOldAnnouncement), (t.nCommentCount = this.nCommentCount), (t.nVotesUp = this.nVotesUp), (t.nVotesDown = this.nVotesDown), (t.forumTopicGID = this.forumTopicGID), (t.comment_type = this.comment_type), (t.gidfeature = this.gidfeature), (t.gidfeature2 = this.gidfeature2), (t.featured_app_tagid = this.featured_app_tagid), (t.creator_steamid = this.creator_steamid), (t.last_update_steamid = this.last_update_steamid), (t.rtime32_last_modified = this.rtime32_last_modified), (t.rtime32_last_solr_search_col_updated = this.rtime32_last_solr_search_col_updated), (t.rtime32_moderator_reviewed = this.rtime32_moderator_reviewed), (t.type = this.type), (t.appid = this.appid), (t.name = new Map()), this.name.forEach((e, n) => { t.name.set(n, e); }), (t.description = new Map()), this.description.forEach((e, n) => { t.description.set(n, e); }), (t.timestamp_loc_updated = new Map()), this.timestamp_loc_updated.forEach((e, n) => { t.timestamp_loc_updated.set(n, e); }), (t.startTime = this.startTime), (t.endTime = this.endTime), (t.visibilityStartTime = this.visibilityStartTime), (t.visibilityEndTime = this.visibilityEndTime), (t.postTime = this.postTime), (t.visibility_state = this.visibility_state), (t.loadedAllLanguages = this.loadedAllLanguages), (t.bLoaded = this.bLoaded), (t.broadcaster = this.broadcaster ? new h.K(this.broadcaster.ConvertTo64BitString()) : null), (t.jsondata = JSON.parse(JSON.stringify(this.jsondata))), (t.vecTags = new Array()), e ? ((t.m_nBuildID = this.m_nBuildID), (t.m_strBuildBranch = this.m_strBuildBranch), this.vecTags.forEach((e) => t.vecTags.push(e))) : this.vecTags.forEach((e) => { x.includes(e) && t.vecTags.push(e); }), t ); } GetLastReferencedSaleDayFromCapsules(e, t) { let n = t; return ( null == e || e.forEach((e) => { void 0 !== e.visibility_index && (n = void 0 === n ? e.visibility_index : Math.max(n, e.visibility_index)); }), n ); } GetLastReferencedSaleDay() { var e; let t; for (const n of this.GetSaleSections()) if ("tabs" === n.section_type) { if ((null === (e = n.tabs) || void 0 === e ? void 0 : e.length) > 0) for (const e of n.tabs) t = this.GetLastReferencedSaleDayFromCapsules(e.capsules, t); } else t = this.GetLastReferencedSaleDayFromCapsules(n.capsules, t); return this.jsondata.sale_num_headers > 1 && (null == t || t < this.jsondata.sale_num_headers) && (t = this.jsondata.sale_num_headers), t; } GetDayIndexFromEventStart() { let e = 0; const t = C.JW.GetTimeNowWithOverride(); void 0 !== this.startTime && t >= this.startTime && (e = Math.floor((t - this.startTime) / 86400)), void 0 !== this.m_overrideCurrentDay && this.m_overrideCurrentDay >= 0 && (e = this.m_overrideCurrentDay); const n = this.GetLastReferencedSaleDay() || 0; return Math.min(e, n); } GetNameWithFallback(e) { const t = S.LJ.GetELanguageFallback(e); return this.name.get(e) || this.name.get(t); } GetGameTitle(e) { var t; return null === (t = f.Z.Get().GetApp(this.appid)) || void 0 === t ? void 0 : t.GetName(); } BInRealmGlobal() { return !this.BHasTag("disable_steam_global"); } BInRealmChina() { return this.BHasTag("enable_steam_china"); } BIsLanguageValidForRealms(e) { return !(!this.BInRealmGlobal() || !S.LJ.IsELanguageValidInRealm(e, m.IN.k_ESteamRealmGlobal)) || !(!this.BInRealmChina() || !S.LJ.IsELanguageValidInRealm(e, m.IN.k_ESteamRealmChina)); } GetImgArray(e) { let t = []; if (("background" === e && (t = this.jsondata.localized_title_image), "capsule" === e)) t = this.jsondata.localized_capsule_image; else if ("spotlight" === e) t = this.jsondata.localized_spotlight_image; else if ("email_full" === e || "email_centered" === e) t = this.jsondata.email_setting ? this.jsondata.email_setting.sections[0].localized_image : []; else if ("broadcast_left" === e) t = this.jsondata.localized_broadcast_left_image; else if ("broadcast_right" === e) t = this.jsondata.localized_broadcast_right_image; else if ("sale_header" === e) if (this.jsondata.sale_num_headers > 1) { const e = Math.min(this.jsondata.sale_num_headers - 1, this.GetDayIndexFromEventStart()); t = this.jsondata.localized_per_day_sales_header[e]; } else t = this.jsondata.localized_sale_header; else "sale_logo" === e ? (t = this.jsondata.localized_sale_logo) : "sale_overlay" === e ? (t = this.jsondata.localized_sale_overlay) : "localized_image_group" === e || "link_capsule" === e || "product_banner_override" === e || "product_mobile_banner_override" === e || "sale_section_title" === e || "schedule_track_art" === e ? (t = p.U8.GetLocalizedImageGroupForEditAsImgArray(this.clanSteamID)) : "product_banner" === e ? (t = this.jsondata.localized_sale_product_banner) : "product_mobile_banner" === e ? (t = this.jsondata.localized_sale_product_mobile_banner) : "bestofyear_banner" === e ? (t = this.jsondata.localized_bestofyear_banner) : "bestofyear_banner_mobile" === e ? (t = this.jsondata.localized_bestofyear_banner_mobile) : "localized_store_app_spotlight" === e ? (t = this.jsondata.localized_store_app_spotlight) : "localized_store_app_spotlight_mobile" === e && (t = this.jsondata.localized_store_app_spotlight_mobile); return t; } GetImageURL(e, t = 0, n = p.FN.full) { const i = this.GetImgArray(e), o = i && i.length > t && null != i[t]; return o && i[t].startsWith("http") ? i[t] : o ? p.aN.GenerateArtworkURLFromHashAndExtensions(this.clanSteamID, i[t], n) : void 0; } GetImageHash(e, t = 0) { let n = this.GetImgArray(e); return n && n.length > t && null != n[t] ? n[t].substr(0, n[t].length - 4) : null; } BHasSomeImage(e) { let t = this.GetImgArray(e); return t && t.some((e) => null != e && e.length > 0); } BHasImage(e, t) { let n = this.GetImgArray(e); return n && n.length > t && null != n[t]; } BHasAnnouncementGID() { return null !== this.AnnouncementGID && void 0 !== this.AnnouncementGID && this.AnnouncementGID.length > 1; } GetAnnouncementGID() { return this.AnnouncementGID; } BHasForumTopicGID() { return null !== this.forumTopicGID && void 0 !== this.forumTopicGID && this.forumTopicGID.length > 1; } GetForumTopicURL() { if (!this.BHasForumTopicGID()) return ""; if (this.appid) return y.De.COMMUNITY_BASE_URL + "app/" + this.appid + "/eventcomments/" + this.forumTopicGID; { const e = _.sV.GetClanInfoByClanAccountID(this.clanSteamID.GetAccountID()); if (e && e.vanity_url) return y.De.COMMUNITY_BASE_URL + "groups/" + e.vanity_url + "/eventcomments/" + this.forumTopicGID; } return y.De.COMMUNITY_BASE_URL + "gid/" + this.clanSteamID.ConvertTo64BitString() + "/eventcomments/" + this.forumTopicGID; } BIsEventInFuture() { return C.JW.GetTimeNowWithOverride() < this.startTime; } BHasEventEnded() { return this.endTime < C.JW.GetTimeNowWithOverride(); } UpdateVoteCount(e, t) { "up" == e ? (this.nVotesUp = (0, b.Lh)(this.nVotesUp + t, 0, Number.MAX_SAFE_INTEGER)) : "down" == e && (this.nVotesDown = (0, b.Lh)(this.nVotesDown + t, 0, Number.MAX_SAFE_INTEGER)); } GetImageFromBeginningOfDescription(e, t) { let n = this.GetDescriptionWithFallback(e); if (n) { let e = n.indexOf("[img]"); if (-1 !== e && e < t) { e += 5; let t = n.indexOf("[/img]", e); if (-1 != t) { let i = n.substring(e, t).trim(); if (0 != i.length) return (0, u.pd)(i); } } } return null; } GetImageURLWithFallback(e, t, n = p.FN.full) { var i, o; const r = this.GetImageURL(e, t, n); if (r && r.trim().length > 0) return r; const a = S.LJ.GetELanguageFallback(t); if (t != a) { const t = this.GetImageURL(e, a, n); if (t && t.trim().length > 0) return t; } const s = _.sV.GetClanInfoByClanAccountID(this.clanSteamID.GetAccountID()); if ("capsule" == e) { let e = this.GetImageFromBeginningOfDescription(t, Number.MAX_VALUE); if (e) return e; let n = this.appid; if (!n && s && ((s.is_creator_home && !s.is_ogg) || s.is_curator)) { if (!(null === (o = null === (i = this.jsondata) || void 0 === i ? void 0 : i.referenced_appids) || void 0 === o ? void 0 : o.length)) return s.avatar_full_url; n = this.jsondata.referenced_appids[0]; } const r = f.Z.Get().GetApp(n); return r ? r.GetAssets().GetMainCapsuleURL() : y.De.MEDIA_CDN_URL + "steam/apps/" + n + "/header.jpg"; } return "background" == e && s && ((s.is_creator_home && !s.is_ogg) || s.is_curator) ? s.creator_page_bg_url : this.GetFallbackArtworkScreenshot(); } GetFallbackArtworkScreenshot() { var e; if (this.appid) { f.Z.Get().QueueAppRequest(this.appid, { include_screenshots: !0 }); const t = f.Z.Get().GetApp(this.appid); let n = Number(this.bOldAnnouncement ? this.AnnouncementGID : null == this.GID ? 0 : this.GID); return (null == t ? void 0 : t.GetOnlyAllAgesSafeScreenshots().length) > 1 ? ((n %= t.GetOnlyAllAgesSafeScreenshots().length), t.GetOnlyAllAgesSafeScreenshots()[n]) : (null === (e = null == t ? void 0 : t.GetBothAllAgesSafeAndMatureScreenshots()) || void 0 === e ? void 0 : e.length) > 0 ? ((n %= t.GetBothAllAgesSafeAndMatureScreenshots().length), t.GetBothAllAgesSafeAndMatureScreenshots()[n]) : ""; } if (this.clanSteamID) { const e = _.sV.GetClanInfoByClanAccountID(this.clanSteamID.GetAccountID()); if (e && ((e.is_creator_home && !e.is_ogg) || e.is_curator)) return e.avatar_full_url; } return ""; } BImageNeedScreenshotFallback(e, t) { let n = this.GetImageURL(e, t); if (!n || 0 == n.length) { const i = S.LJ.GetELanguageFallback(t); t != i && (n = this.GetImageURL(e, i)); } return !n || 0 == n.length; } GetImageForSizeAsArrayWithFallback(e, t, n, i) { let o = new Array(); this.BImageNeedScreenshotFallback(e, t) || (o.push(this.GetImageURLWithFallback(e, t, n)), n != p.FN.full && o.push(this.GetImageURLWithFallback(e, t, p.FN.full))); const r = this.GetFallbackArtworkScreenshot(); return r && !i && o.push(r), o; } GetDescriptionWithFallback(e) { const t = S.LJ.GetELanguageFallback(e); return this.description.get(e) || this.description.get(t); } BIsImageSafeForAllAges(e, t) { var n; const i = _.sV.GetClanInfoByClanAccountID(this.clanSteamID.GetAccountID()), o = S.LJ.GetELanguageFallback(t); return null != this.GetImageURL(e, t) || (t != o && null != this.GetImageURL(e, o)) || (this.appid && (null === (n = f.Z.Get().GetApp(this.appid)) || void 0 === n ? void 0 : n.BHasAgeSafeScreenshots())) || (!this.appid && i && ((i.is_creator_home && !i.is_ogg) || i.is_curator)); } BIsVisibleEvent() { let e = Math.floor(C.JW.GetTimeNowWithOverride()); return this.visibility_state == w.k_EEventStateVisible && e > this.visibilityStartTime && (this.visibilityEndTime < 10 || e < this.visibilityEndTime); } BIsStagedEvent() { return this.visibility_state == w.k_EEventStateStaged; } GetStartTimeAndDateUnixSeconds() { return this.startTime; } GetEndTimeAndDateUnixSeconds() { return this.endTime; } GetPostTimeAndDateUnixSeconds() { return this.postTime; } GetVisibilityStartTimeAndDateUnixSeconds() { return this.visibilityStartTime; } BIsEventActionEnabled() { return !!this.jsondata.action_end_time && (this.jsondata.action_end_time > C.JW.GetTimeNowWithOverride() || (1575396e3 == this.jsondata.action_end_time && 1606845600 > C.JW.GetTimeNowWithOverride())); } BHasSubTitle(e) { if (!this.jsondata || !this.jsondata.localized_subtitle || e >= this.jsondata.localized_subtitle.length) return !1; let t = this.jsondata.localized_subtitle[e]; return null != t && "" != t; } GetSubTitle(e) { if (!this.jsondata || !this.jsondata.localized_subtitle || e >= this.jsondata.localized_subtitle.length) return ""; let t = this.jsondata.localized_subtitle[e]; return t || ""; } GetSubTitleWithLanguageFallback(e) { return this.jsondata ? S.LZ.GetWithFallback(this.jsondata.localized_subtitle, e) : ""; } GetSubTitleWithSummaryFallback(e) { var t; return S.LZ.GetWithFallback(null === (t = this.jsondata) || void 0 === t ? void 0 : t.localized_subtitle, e) || N.GenerateSummaryFromText(this.GetDescriptionWithFallback(e)); } GetSummaryWithFallback(e, t) { var n; return S.LZ.GetWithFallback(null === (n = this.jsondata) || void 0 === n ? void 0 : n.localized_summary, e) || N.GenerateSummaryFromText(this.GetDescriptionWithFallback(e), t); } GetSummary(e) { var t; return S.LZ.Get(null === (t = this.jsondata) || void 0 === t ? void 0 : t.localized_summary, e); } BHasSummary(e) { return Boolean(this.GetSummary(e)); } static GenerateSummaryFromText(e, t) { return e && 0 != e.trim().length ? ((e = (0, c.p8)(e, ["img", "h1", "h2", "h3", "spoiler", "table", "previewyoutube", "looping_media", "roomeffect", "sticker"])), (e = (0, c.NO)(e)), (e = (0, E.W5)(e)), (0, E.oU)(e, t || 180)) : ""; } BHasTag(e) { return -1 != this.vecTags.indexOf(e); } BHasTagStartingWith(e) { return this.vecTags.some((t) => t.startsWith(e)); } BIsOGGEvent() { return Boolean(this.appid) && this.appid > 0; } BShowLibrarySpotlight() { return Boolean(this.jsondata.library_spotlight); } BShowLibrarySpotlightText() { return Boolean(this.jsondata.library_spotlight_text); } BHasBroadcastEnabled() { return this.jsondata.bBroadcastEnabled; } BEventCanShowBroadcastWidget(e) { if (this.jsondata.bSaleEnabled) return this.BHasBroadcastEnabled(); const t = C.JW.GetTimeNowWithOverride(), n = this.endTime ? this.endTime : t + 3600; return this.BHasBroadcastEnabled() && this.jsondata.broadcast_whitelist && this.jsondata.broadcast_whitelist.length > 0 && (e || (this.startTime - 600 <= t && t < n)); } BHasBroadcastForceBanner() { return this.jsondata.broadcast_force_banner; } BSaleShowBroadcastAtTopOfPage() { return !(this.jsondata.sale_sections && this.jsondata.sale_sections.some((e) => "broadcast" == e.section_type)); } BSaleShowCuratorRecommendationAtBottomOfPage() { return !(this.jsondata.sale_sections && this.jsondata.sale_sections.some((e) => "curator_recommendation" == e.section_type)); } GetBroadcastChatVisibility() { return this.jsondata.broadcastChatSetting || "hide"; } GetBroadcastTitle(e) { var t; return S.LZ.GetWithFallback(this.jsondata.localized_broadcast_title, e) || (0, S.Xx)(null !== (t = this.jsondata.default_broadcast_title) && void 0 !== t ? t : "#Broadcast_default_title_dev"); } GetBroadcastWhitelist() { return this.jsondata.broadcast_whitelist; } GetBroadcastWhitelistAsSteamIDs() { return this.jsondata.broadcast_whitelist.map((e) => h.K.InitFromAccountID(e).ConvertTo64BitString()); } BIsBroadcastAccountIDWhiteListed(e) { return (this.jsondata.broadcast_whitelist || []).includes(Number(e)); } BHasSaleEnabled() { return this.jsondata.bSaleEnabled; } BHasSaleVanity() { return this.jsondata.bSaleEnabled && Boolean(this.jsondata.sale_vanity_id); } GetSaleVanity() { return this.jsondata.sale_vanity_id; } GetSaleURL() { if (!Boolean(this.jsondata.sale_vanity_id)) return y.De.STORE_BASE_URL + "newshub/" + (this.appid ? "app/" + this.appid : "group/" + this.clanSteamID.GetAccountID()) + "/view/" + this.GID; if (this.BUsesContentHubForItemSource()) { const e = this.jsondata.source_content_hub; return e ? ("string" == typeof e ? y.De.STORE_BASE_URL + "category/" + e : "category" == e.type ? y.De.STORE_BASE_URL + "category/" + e.category : "tags" == e.type ? y.De.STORE_BASE_URL + "tags/" + ((0, S.CE)() || "en") + "/" + e.tagid : "freetoplay" == e.type ? y.De.STORE_BASE_URL + "genre/Free%20to%20Play/" : "earlyaccess" == e.type ? y.De.STORE_BASE_URL + "genre/Early%20Access/" : y.De.STATS_BASE_URL + e.type) : y.De.STORE_BASE_URL + "sale/" + this.jsondata.sale_vanity_id; } if (!this.jsondata.sale_vanity_id_valve_approved_for_sale_subpath) { if (g.bq.BHasCreatorHomeLoaded(this.clanSteamID)) { return g.bq.GetCreatorHome(this.clanSteamID).GetCreatorHomeURL("developer") + "sale/" + this.jsondata.sale_vanity_id; } return y.De.STORE_BASE_URL + "curator/" + this.clanSteamID.GetAccountID() + "/sale/" + this.jsondata.sale_vanity_id; } return y.De.STORE_BASE_URL + "sale/" + this.jsondata.sale_vanity_id; } BHasEmailEnabled() { return this.jsondata.email_setting && this.jsondata.email_setting.bEnable; } GetSaleSections() { return this.jsondata.sale_sections; } GetSaleSectionByID(e) { var t; return null === (t = this.jsondata.sale_sections) || void 0 === t ? void 0 : t.find((t) => t.unique_id == e); } GetSaleSectionsByType(e) { var t; return null === (t = this.jsondata.sale_sections) || void 0 === t ? void 0 : t.filter((t) => t.section_type == e); } GetSaleSectionCount() { return this.jsondata.sale_sections.length; } static AccumulateCapsuleListIDs(e, t, n, i) { e && e.forEach((e) => { if (e) { t.has(e.type) && ((i && !i(e.id)) || n.add(e.id)); } }); } GetSaleItemOfType(e, t) { var n; if (!this.jsondata.sale_sections) return new Set(); const i = new Set(e), o = new Set(); if (((0, v.X)(!this.jsondata.bOptimizedForSize, "Cannot find all items in optimized json"), this.jsondata.bOptimizedForSize && "dev" == y.De.WEB_UNIVERSE)) throw new Error("GetSaleOfItemType called on a truncated jsondata."); return ( null === (n = this.jsondata.tagged_items) || void 0 === n || n.forEach((e) => { N.AccumulateCapsuleListIDs([e.capsule], i, o, t); }), this.jsondata.sale_sections.forEach((e) => { if ("items" === e.section_type) N.AccumulateCapsuleListIDs(e.capsules, i, o, t); else if ("tabs" === e.section_type && e.tabs) for (const n of e.tabs) N.AccumulateCapsuleListIDs(n.capsules, i, o, t); }), o ); } GetSaleItemCountOfType(e, t) { return this.GetSaleItemOfType(e, t).size; } GetSaleFeaturedAppsCount(e) { return this.GetSaleItemCountOfType(["game", "application", "software", "dlc", "music"], e); } GetSaleFeaturedAppsAndDemosCount(e) { return this.GetSaleItemCountOfType(["game", "application", "software", "dlc", "music", "demo"], e); } GetSaleFeaturedBundlesCount(e) { return this.GetSaleItemCountOfType(["bundle"], e); } GetSaleFeaturedPackagesCount(e) { return this.GetSaleItemCountOfType(["sub"], e); } GetSaleFeaturedApps(e) { return this.GetSaleItemOfType(["game", "application", "software", "dlc", "music"], e); } GetSaleFeaturedAppsAndDemos(e) { return this.GetSaleItemOfType(["game", "application", "software", "dlc", "music", "demo"], e); } GetSaleFeaturedBundles(e) { return this.GetSaleItemOfType(["bundle"], e); } GetSaleFeaturedPackages(e) { return this.GetSaleItemOfType(["sub"], e); } GetTaggedItems() { return this.jsondata.tagged_items || []; } BHasScheduleEnabled() { return this.jsondata.bScheduleEnabled; } GetEventType() { return this.type; } GetEventTypeAsString() { return (function (e) { let t = "#PartnerEvent_" + e, n = (0, S.Xx)(t); return n != t ? n : (0, S.Xx)("#PartnerEvent_Other"); })(this.type); } GetCategoryAsString() { return this.BHasTag("steam_award_nomination_request") ? (0, S.Xx)("#PartnerEvent_SteamAwardNominations") : this.BHasTag("steam_award_vote_request") ? (0, S.Xx)("#PartnerEvent_SteamAwardVoteRequest") : this.BHasTag("steam_game_festival_artist_statement") ? (0, S.Xx)("#PartnerEvent_SteamGameFestival_ArtistState") : this.BHasTag("steam_game_festival_office_hour") ? (0, S.Xx)("#PartnerEvent_SteamGameFestival_OfficeHour") : this.BHasTag("steam_game_festival_broadcast") || (this.BHasTagStartingWith("sale_nextfest_") && 11 == this.type) ? (0, S.Xx)("#PartnerEvent_SteamGameFestival_Broadcast") : this.GetEventTypeAsString(); } GetAllTags() { return this.vecTags; } BMatchesAllTags(e) { let t = !0; return ( null == e || e.forEach((e) => { this.vecTags.includes(e) || (t = !1); }), t ); } BAllowedSteamStoreSpotlight() { return Boolean(this.jsondata.store_spotlight); } BHasLibaryHomeSpotlight() { return Boolean(this.jsondata.library_home_spotlight); } BHasSaleProductBanners() { return this.jsondata.bSaleEnabled && (this.BHasSomeImage("product_banner") || this.BHasSomeImage("product_banner_override")); } GetSteamAwardCategory() { return this.jsondata.steam_award_category_suggestion; } GetSteamAwardNomineeCategories() { return this.jsondata.steam_award_category_voteids; } BIsLockedToGameOwners() { var e; return Boolean(null === (e = this.jsondata.ownership_requirement_info) || void 0 === e ? void 0 : e.bLockedToAppOwners); } GetRequiredAppIDs() { return this.jsondata.ownership_requirement_info ? this.jsondata.ownership_requirement_info.rgRequiredAppIDs : []; } GetRequiredPackageIDs() { return this.jsondata.ownership_requirement_info ? this.jsondata.ownership_requirement_info.rgRequiredPackageIDs : []; } BUseSubscriptionLayout() { return !!this.jsondata.sale_use_subscription_layout; } BIsLockedToPartnerAppRights() { var e; return Boolean(null === (e = this.jsondata.app_right_requirement_info) || void 0 === e ? void 0 : e.bLockedToPartnerAppRights); } GetRequiredPartnerAppRights() { return this.jsondata.app_right_requirement_info; } GetValveAccessLog() { return Array.isArray(this.jsondata.valve_access_log) ? this.jsondata.valve_access_log : []; } BUsesContentHubForItemSource() { return this.jsondata.item_source_type === O.k_EContentHub && Boolean(this.jsondata.source_content_hub); } GetContentHubType() { return this.BUsesContentHubForItemSource() ? (null == this.jsondata.source_content_hub ? "games" : "string" == typeof this.jsondata.source_content_hub ? "category" : this.jsondata.source_content_hub.type) : void 0; } GetContentHubCategory() { return null == this.jsondata.source_content_hub ? void 0 : "string" == typeof this.jsondata.source_content_hub ? this.jsondata.source_content_hub : this.jsondata.source_content_hub.category; } GetContentHubTag() { return null == this.jsondata.source_content_hub ? void 0 : "string" == typeof this.jsondata.source_content_hub ? 0 : this.jsondata.source_content_hub.tagid; } GetContentHub() { return "string" == typeof this.jsondata.source_content_hub ? { type: "category", category: this.jsondata.source_content_hub } : this.jsondata.source_content_hub; } BContentHubDiscountedOnly() { return this.jsondata.content_hub_discounted_only; } } (0, i.gn)([a.LO], N.prototype, "GID", void 0), (0, i.gn)([a.LO], N.prototype, "AnnouncementGID", void 0), (0, i.gn)([a.LO], N.prototype, "forumTopicGID", void 0), (0, i.gn)([a.LO], N.prototype, "type", void 0), (0, i.gn)([a.LO], N.prototype, "appid", void 0), (0, i.gn)([a.LO], N.prototype, "name", void 0), (0, i.gn)([a.LO], N.prototype, "description", void 0), (0, i.gn)([a.LO], N.prototype, "timestamp_loc_updated", void 0), (0, i.gn)([a.LO], N.prototype, "startTime", void 0), (0, i.gn)([a.LO], N.prototype, "endTime", void 0), (0, i.gn)([a.LO], N.prototype, "visibilityStartTime", void 0), (0, i.gn)([a.LO], N.prototype, "visibilityEndTime", void 0), (0, i.gn)([a.LO], N.prototype, "m_nBuildID", void 0), (0, i.gn)([a.LO], N.prototype, "m_strBuildBranch", void 0), (0, i.gn)([a.LO], N.prototype, "postTime", void 0), (0, i.gn)([a.LO], N.prototype, "visibility_state", void 0), (0, i.gn)([a.LO], N.prototype, "broadcaster", void 0), (0, i.gn)([a.LO], N.prototype, "jsondata", void 0), (0, i.gn)([a.LO], N.prototype, "nCommentCount", void 0), (0, i.gn)([a.LO], N.prototype, "nVotesUp", void 0), (0, i.gn)([a.LO], N.prototype, "nVotesDown", void 0), (0, i.gn)([a.LO], N.prototype, "bOldAnnouncement", void 0), (0, i.gn)([a.LO], N.prototype, "announcementClanSteamID", void 0), (0, i.gn)([a.LO], N.prototype, "loadedAllLanguages", void 0), (0, i.gn)([a.LO], N.prototype, "bLoaded", void 0), (0, i.gn)([a.LO], N.prototype, "deleteInProgress", void 0), (0, i.gn)([a.LO], N.prototype, "vecTags", void 0), (0, i.gn)([a.LO], N.prototype, "last_update_steamid", void 0), (0, i.gn)([a.LO], N.prototype, "rtime32_last_modified", void 0), (0, i.gn)([a.LO], N.prototype, "rtime32_last_solr_search_col_updated", void 0), (0, i.gn)([a.LO], N.prototype, "rtime32_last_local_modification", void 0), (0, i.gn)([a.LO], N.prototype, "rtime32_moderator_reviewed", void 0), (0, i.gn)([a.LO], N.prototype, "video_preview_type", void 0), (0, i.gn)([a.LO], N.prototype, "video_preview_id", void 0), (0, i.gn)([a.LO], N.prototype, "m_overrideCurrentDay", void 0); var P = n(9824), U = n(22394), V = n(2049); class H { constructor(e) { (0, v.X)("number" == typeof e.appid, "AJAX updated app returned a non-numeric AppID! Did the PHP change?"), (this.appid = e.appid), (this.date = e.date), (this.can_play = e.can_play), (this.playtime = e.playtime), (this.announcementid = e.announcementid); } } function W(e) { let t = "" + e; const n = S.LJ.GetELanguageFallback(e); return e != n && (t += "_" + n), t; } class X { constructor() { (this.m_mapExistingEvents = new Map()), (this.m_mapEventUpdateCallback = new Map()), (this.m_mapAnnouncementBodyToEvent = new Map()), (this.m_mapClanToGIDs = new Map()), (this.m_mapAppIDToGIDs = new Map()), (this.m_mapAdjacentAnnouncementGIDs = new Map()), (this.m_mapUpdatedApps = new Map()), (this.m_tsUpdatedAppsQueryTime = 0), (this.m_rgQueuedEventsClanIDs = new Array()), (this.m_rgQueuedEventsUniqueIDs = new Array()), (this.m_rgQueuedEventsForEditFlags = new Array()), (this.m_QueuedEventTimeout = new U.Ar()), (this.m_bLoadedFromConfig = !1), (0, a.rC)(this); } Init() { if (!this.m_bLoadedFromConfig) { let t = ((e = "PartnerEventStore"), window.StoreDefaults ? window.StoreDefaults[e] : void 0); this.ValidateStoreDefault(t) && t.forEach((e) => { if (e) { let t = new h.K(e.clan_steamid); const n = this.InsertEventModelFromClanEventData(t, e); e.announcement_body && this.m_mapExistingEvents.set(B + e.announcement_body.gid, n); } }); let n = (0, y.ip)("partnereventstore", "application_config"); this.ValidateStoreDefault(n) && n.forEach((e) => { if (e) { let t = new h.K(e.clan_steamid); const n = this.InsertEventModelFromClanEventData(t, e); e.announcement_body && !this.m_mapExistingEvents.has(B + e.announcement_body.gid) && this.m_mapExistingEvents.set(B + e.announcement_body.gid, n); } }); let i = (0, y.ip)("partnereventadjacents", "application_config"); this.ValidateAdjacentEvent(i) && (("dev" != y.De.WEB_UNIVERSE && "beta" != y.De.WEB_UNIVERSE) || console.log("DEV_DEBUG: CPartnerEventStore loading adjacents gids payload: " + i.length), i.forEach((e) => { e && this.m_mapAdjacentAnnouncementGIDs.set(e.announcementGID, e.adjacents); })), "dev" == y.De.WEB_UNIVERSE && console.log("PartnerEventStore Loaded events: " + this.m_mapExistingEvents.size + " with adjacent info: " + this.m_mapExistingEvents.size), (this.m_bLoadedFromConfig = !0); } var e; } ValidateStoreDefault(e) { const t = e; return !!(t && Array.isArray(t) && t.length > 0 && "object" == typeof t[0]) && ("string" == typeof t[0].gid || ("object" == typeof t[0].announcement_body && "string" == typeof t[0].announcement_body.gid)); } ValidateAdjacentEvent(e) { const t = e; return !!(t && Array.isArray(t) && t.length > 0 && "object" == typeof t[0]) && "string" == typeof t[0].announcementGID && Array.isArray(t[0].adjacents) && (0 == t[0].adjacents.length || "string" == typeof t[0].adjacents[0]); } GetPartnerEventChangeCallback(e) { return this.m_mapEventUpdateCallback.has(e) || this.m_mapEventUpdateCallback.set(e, new U.pB()), this.m_mapEventUpdateCallback.get(e); } GetClanEventGIDs(e) { let t = this.m_mapClanToGIDs.get(e.GetAccountID()); return t || []; } GetClanEventGIDsForApp(e) { let t = this.m_mapAppIDToGIDs.get(e); return t || []; } GetClanEventModel(e) { return this.m_mapExistingEvents.get(e); } BHasClanEventModel(e) { return this.m_mapExistingEvents.has(e); } BHasClanAnnouncementGID(e) { if (this.m_mapAnnouncementBodyToEvent.has(e)) { let t = this.m_mapAnnouncementBodyToEvent.get(e); return this.BHasClanEventModel(t); } return !1; } GetClanEventGIDFromAnnouncementGID(e) { return this.m_mapAnnouncementBodyToEvent.get(e); } GetClanEventFromAnnouncementGID(e) { return this.m_mapExistingEvents.get(this.m_mapAnnouncementBodyToEvent.get(e)); } DefaultEventSortFunction(e, t) { return e.startTime == t.startTime ? (0, E.eT)(e.GID, t.GID) : t.startTime - e.startTime; } RegisterClanEvents(e) { if (e) for (const t of e) { const e = this.GetEventLookupKey(t); if (!this.m_mapExistingEvents.has(e)) { const e = new h.K(t.clan_steamid); this.InsertEventModelFromClanEventData(e, t); } } } GetRankedClanEvents(e, t) { let n = [], i = e ? this.GetClanEventGIDs(e) : this.GetClanEventGIDsForApp(t); if (!i || 0 == i.length) return n; for (let e of i) { let t = this.GetClanEventModel(e); n.push(t); } return n.sort(this.DefaultEventSortFunction), n; } BIsOldAnnouncement(e) { return (null == e.gid || null == e.gid || "0" == e.gid) && e.announcement_body && "0" != e.announcement_body.gid; } GetEventLookupKey(e) { return this.BIsOldAnnouncement(e) ? B + e.announcement_body.gid : e.gid; } InsertEventModelFromClanEventData(e, t) { let n = new N(); if ( ((n.clanSteamID = e), (0, v.X)(n.clanSteamID && n.clanSteamID.BIsValid(), "Invalid Clan SteamID: " + n.clanSteamID.ConvertTo64BitString() + " " + y.De.EUNIVERSE), (n.GID = this.GetEventLookupKey(t)), (n.bOldAnnouncement = this.BIsOldAnnouncement(t)), (n.appid = t.appid), (n.startTime = t.rtime32_start_time), (n.endTime = t.rtime32_end_time), (n.visibilityStartTime = t.rtime32_visibility_start), (n.visibilityEndTime = t.rtime32_visibility_end), (n.loadedAllLanguages = !1), (n.type = t.event_type), (n.nVotesUp = t.votes_up), (n.nVotesDown = t.votes_down), (n.comment_type = t.comment_type), (n.gidfeature = t.gidfeature), (n.gidfeature2 = t.gidfeature2), (n.featured_app_tagid = t.featured_app_tagid), (n.vecTags = new Array()), (n.creator_steamid = t.creator_steamid), (n.last_update_steamid = t.last_update_steamid), (n.rtime32_last_modified = t.rtime32_last_modified), (n.rtime32_moderator_reviewed = t.rtime_mod_reviewed), (n.video_preview_type = t.video_preview_type), (n.video_preview_id = t.video_preview_id), (n.has_live_stream = t.has_live_stream), (n.live_stream_viewer_count = t.live_stream_viewer_count), (n.m_nBuildID = t.build_id), (n.m_strBuildBranch = t.build_branch), t.announcement_body) ) { let e = t.announcement_body; (n.AnnouncementGID = e.gid), n.name.set(e.language, e.headline), n.description.set(e.language, e.body), n.timestamp_loc_updated.clear(), (n.forumTopicGID = e.forum_topic_id), (n.nCommentCount = e.commentcount), (n.postTime = e.posttime), n.bOldAnnouncement && !e.hidden && (n.startTime = e.posttime), (n.announcementClanSteamID = new h.K(e.clanid)), e.tags && e.tags.length > 0 && e.tags.forEach((e) => n.vecTags.push(e)), !n.rtime32_last_solr_search_col_updated && n.rtime32_last_modified && ((n.rtime32_last_solr_search_col_updated = n.rtime32_last_modified), (n.rtime32_last_modified = e.updatetime)); } else (n.AnnouncementGID = "0"), (n.forumTopicGID = t.forum_topic_id), n.name.clear(), n.description.clear(), n.timestamp_loc_updated.clear(), (n.postTime = t.rtime32_start_time), (n.nCommentCount = t.comment_count), n.name.set(0, t.event_name), n.description.set(0, t.event_notes); t.broadcaster_accountid && (n.broadcaster = new h.K(t.broadcaster_accountid)); const i = F; try { n.jsondata = Object.assign(Object.assign({}, i), t.jsondata ? JSON.parse(t.jsondata) : void 0); } catch (e) { const t = (0, I.l)(e); throw (console.error("PartnerEventStore::InsertEventModelFromClanEventData: failed to parse embedded json model" + t.strErrorMsg, t), e); } if ( ((n.jsondata.localized_capsule_image = (0, P.LG)(n.jsondata.localized_capsule_image || [], 31, null)), (n.jsondata.localized_title_image = (0, P.LG)(n.jsondata.localized_title_image || [], 31, null)), (n.jsondata.localized_subtitle = (0, P.LG)(n.jsondata.localized_subtitle || [], 31, null)), (n.jsondata.localized_summary = (0, P.LG)(n.jsondata.localized_summary || [], 31, null)), (n.jsondata.localized_broadcast_title = (0, P.LG)(n.jsondata.localized_broadcast_title || [], 31, null)), (n.jsondata.localized_broadcast_left_image = (0, P.LG)(n.jsondata.localized_broadcast_left_image || [], 31, null)), (n.jsondata.localized_broadcast_right_image = (0, P.LG)(n.jsondata.localized_broadcast_right_image || [], 31, null)), (n.jsondata.localized_sale_header = (0, P.LG)(n.jsondata.localized_sale_header || [], 31, null)), (n.jsondata.localized_sale_overlay = (0, P.LG)(n.jsondata.localized_sale_overlay || [], 31, null)), (n.jsondata.localized_sale_product_banner = (0, P.LG)(n.jsondata.localized_sale_product_banner || [], 31, null)), (n.jsondata.localized_sale_product_mobile_banner = (0, P.LG)(n.jsondata.localized_sale_product_mobile_banner || [], 31, null)), (n.jsondata.localized_sale_logo = (0, P.LG)(n.jsondata.localized_sale_logo || [], 31, null)), void 0 !== n.jsondata.sale_num_headers) ) for (let e = 0; e < n.jsondata.sale_num_headers; ++e) n.jsondata.localized_per_day_sales_header[e] = (0, P.LG)(n.jsondata.localized_per_day_sales_header[e], 31, null); return ( n.jsondata.sale_sections && n.jsondata.sale_sections.forEach((e, t) => { e.localized_label && (e.localized_label = (0, P.LG)(e.localized_label, 31, null)), (n.jsondata.sale_sections[t] = Object.assign(Object.assign({}, G), e)); }), n.jsondata.email_setting && n.jsondata.email_setting.sections && n.jsondata.email_setting.sections.forEach((e) => { void 0 !== e.localized_headline && null !== e.localized_headline && (e.localized_headline = (0, P.LG)(e.localized_headline, 31, null)), void 0 !== e.localized_body && null !== e.localized_body && (e.localized_body = (0, P.LG)(e.localized_body, 31, null)), void 0 !== e.localized_image && null !== e.localized_image && (e.localized_image = (0, P.LG)(e.localized_image, 31, null)); }), n.jsondata.localized_title_image.forEach((e, t) => { if (null != e && "http" == e.substr(0, 4)) { let i = e.lastIndexOf("/"), o = e.substr(i + 1); n.jsondata.localized_title_image[t] = o; } }), t.published ? (t.hidden ? (n.visibility_state = w.k_EEventStateStaged) : (n.visibility_state = w.k_EEventStateVisible)) : (n.visibility_state = w.k_EEventStateUnpublished), this.InsertUniqueEventGID(e.GetAccountID(), n.appid, n.GID), this.m_mapExistingEvents.set(n.GID, n), n.AnnouncementGID && n.AnnouncementGID.length > 1 && this.m_mapAnnouncementBodyToEvent.set(n.AnnouncementGID, n.GID), (n.bLoaded = !0), n ); } HelperInitializeNumSalesHeaderArray(e) { if (e.jsondata.sale_num_headers > 1) { e.jsondata.localized_per_day_sales_header = []; for (let t = 0; t < e.jsondata.sale_num_headers; ++t) e.jsondata.localized_per_day_sales_header.push((0, P.LG)([], 31, null)); e.m_overrideCurrentDay = 0; } else e.m_overrideCurrentDay = void 0; } GetAllClanEvents(e) { let t = new Array(); return ( this.m_mapClanToGIDs.has(e.GetAccountID()) && this.m_mapClanToGIDs.get(e.GetAccountID()).forEach((e) => { let n = this.m_mapExistingEvents.get(e); n && t.push(n); }), t ); } QueueLoadPartnerEvent(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_mapExistingEvents.has(t)) return; this.m_rgQueuedEventsClanIDs.push(e), this.m_rgQueuedEventsUniqueIDs.push(t), this.m_rgQueuedEventsForEditFlags.push(Boolean(n)), this.m_PendingInfoPromise || (this.m_PendingInfoPromise = new Promise((e) => (this.m_PendingInfoResolve = e))); const i = this.m_PendingInfoPromise, o = () => { const e = this.m_PendingInfoResolve, t = this.m_rgQueuedEventsClanIDs, n = this.m_rgQueuedEventsUniqueIDs, i = this.m_rgQueuedEventsForEditFlags; (this.m_PendingInfoPromise = null), (this.m_rgQueuedEventsClanIDs = new Array()), (this.m_rgQueuedEventsUniqueIDs = new Array()), (this.m_rgQueuedEventsForEditFlags = new Array()), this.InternalLoadPartnerEventList(t, n, i).then(() => e()); }; if (this.m_rgQueuedEventsClanIDs.length >= 30) this.m_QueuedEventTimeout.Cancel(), o(); else if (!this.m_QueuedEventTimeout.IsScheduled()) { const e = 50; this.m_QueuedEventTimeout.Schedule(e, o); } return i; }); } InternalLoadPartnerEventList(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { let i = n.some((e) => e); const o = y.De.STORE_BASE_URL + (i ? "events/ajaxgeteventdetailsforedit/" : "events/ajaxgeteventdetails/"), a = W((0, l.jM)(y.De.LANGUAGE)), s = { clanid_list: e.join(","), uniqueid_list: t.join(","), lang_list: a, origin: self.origin }; try { const e = yield r().get(o, { params: s, withCredentials: i }); this.RegisterClanEvents(e.data.events); } catch (e) { let t = (0, I.l)(e); console.error("GetEventDetails hit error " + t.strErrorMsg, t); } }); } LoadAdjacentPartnerEvents(e, t, n, o, r, a, s) { return (0, i.mG)(this, void 0, void 0, function* () { return this.InternalLoadAdjacentPartnerEvents(e, void 0, t, n, o, r, a, s); }); } LoadAdjacentPartnerEventsByAnnouncement(e, t, n, o, r, a, s) { return (0, i.mG)(this, void 0, void 0, function* () { return this.InternalLoadAdjacentPartnerEvents(void 0, e, t, n, o, r, a, s); }); } LoadAdjacentPartnerEventsByEvent(e, t, n, o, r, a, s) { return (0, i.mG)(this, void 0, void 0, function* () { const i = t || e.clanSteamID; return e.bOldAnnouncement ? this.InternalLoadAdjacentPartnerEvents(void 0, e.AnnouncementGID, i, n, o, r, a, s) : this.InternalLoadAdjacentPartnerEvents(e.GID, e.AnnouncementGID, i, n, o, r, a, s); }); } InternalLoadAdjacentPartnerEvents(e, t, n, o, s, c, m, d) { var u; return (0, i.mG)(this, void 0, void 0, function* () { let i = new Array(); if (this.m_mapAdjacentAnnouncementGIDs.has(t)) { let e = this.m_mapAdjacentAnnouncementGIDs.get(t), n = new Array(); if ( (e.forEach((e) => { if (this.m_mapAnnouncementBodyToEvent.has(e)) { let t = this.m_mapAnnouncementBodyToEvent.get(e); i.push(this.m_mapExistingEvents.get(t)); } else n.push(e); }), n.length > 0) ) { (yield this.LoadBatchPartnerEventsByEventGIDsOrAnnouncementGIDs(null, n, d)).forEach((e) => i.push(e)); } } else { let p = y.De.STORE_BASE_URL + "events/ajaxgetadjacentpartnerevents/"; const _ = W((0, l.jM)(y.De.LANGUAGE)); let g = { clan_accountid: n ? n.GetAccountID() : void 0, appid: o, count_before: s, count_after: c, gidevent: e, gidannouncement: t, lang_list: _, rtime_oldestevent: m ? m.rtime_oldestevent : void 0, require_tags: m && m.require_tags ? m.require_tags.join(",") : void 0, exclude_tags: m && m.exclude_tags ? m.exclude_tags.join(",") : void 0, require_no_tags: m ? m.require_no_tags : void 0, event_type_filter: m && m.event_type_filter ? m.event_type_filter.join(",") : void 0, exclude_event_types: m && m.exclude_event_types ? m.exclude_event_types.join(",") : void 0, origin: self.origin }; try { let s = yield r().get(p, { params: g, cancelToken: null == d ? void 0 : d.token }); if (1 == (null === (u = null == s ? void 0 : s.data) || void 0 === u ? void 0 : u.success)) (0, a.z)(() => { for (let e of s.data.events) { let t = this.GetEventLookupKey(e); if (!this.m_mapExistingEvents.has(t)) { let t = new h.K(e.clan_steamid); this.InsertEventModelFromClanEventData(n || t, e); } i.push(this.m_mapExistingEvents.get(t)); } 0 == i.length && (e && this.BHasClanEventModel(e) ? i.push(this.m_mapExistingEvents.get(e)) : t && this.BHasClanAnnouncementGID(t) && i.push(this.GetClanEventFromAnnouncementGID(t))); }); else { let e = (0, I.l)(null == s ? void 0 : s.data); console.error("LoadAdjacentPartnerEvents Success but empty response:" + o + " clanAccount:" + (n ? n.GetAccountID() : 0) + " " + e.strErrorMsg, e); } } catch (e) { let t = (0, I.l)(e); 52 != t.errorCode && console.error("LoadAdjacentPartnerEvents hit error on appid:" + o + " clanAccount:" + (n ? n.GetAccountID() : 0) + " " + t.strErrorMsg, t); } } return i; }); } LoadPartnerEventsPageable(e, t, n = 0, o = 0) { return (0, i.mG)(this, void 0, void 0, function* () { let i = new Array(), s = y.De.STORE_BASE_URL + "events/ajaxgetpartnereventspageable/", l = { clan_accountid: e ? e.GetAccountID() : void 0, appid: t, offset: n, count: o, l: y.De.LANGUAGE, origin: self.origin }; try { let e = yield r().get(s, { params: l }); (0, a.z)(() => { for (let t of e.data.events) { let e = this.GetEventLookupKey(t); if (!this.m_mapExistingEvents.has(e)) { let e = new h.K(t.clan_steamid); this.InsertEventModelFromClanEventData(e, t); } i.push(this.m_mapExistingEvents.get(e)); } }); } catch (e) { console.error("LoadClanEventInDateRange hit error " + (0, I.l)(e).strErrorMsg); } return i; }); } GetBestEventsForCurrentUser(e, t, n) { var o, s; return (0, i.mG)(this, void 0, void 0, function* () { let i = new Array(), l = { l: y.De.LANGUAGE, include_steam_blog: !0, filter_to_played_within_days: e, include_only_game_updates: t }, c = y.De.STORE_BASE_URL + "events/ajaxgetbesteventsforuser", m = yield r().get(c, { params: l, withCredentials: !0, cancelToken: n ? n.token : void 0 }); if (!(null === (o = m.data) || void 0 === o ? void 0 : o.events)) { let e = (null === (s = m.data) || void 0 === s ? void 0 : s.err_msg) || ""; throw new Error(`GetBestEventsForCurrentUser request failed (${e})`); } return ( (0, a.z)(() => { for (let e of m.data.events) { let t = this.GetEventLookupKey(e); if (!this.m_mapExistingEvents.has(t)) { let t = new h.K(e.clan_steamid); this.InsertEventModelFromClanEventData(t, e); } let n = { nAppPriority: e.nAppPriority, bPossibleTakeOver: e.bPossibleTakeOver, event: this.m_mapExistingEvents.get(t) }; i.push(n); } }), i ); }); } LoadImportantEventsAroundToday(e, t, n, o, s, l) { return (0, i.mG)(this, void 0, void 0, function* () { let i = new Array(), c = new Array(); c.push({ priority: 0, appids: t }), n && c.push({ priority: 1, appids: n }), o && c.push({ priority: 2, appids: o }); let m = { count: e, strAppIDPriority: JSON.stringify({ prioritized_apps: c }), filterToEventTypes: l ? l.toString() : "", l: y.De.LANGUAGE }, d = y.De.STORE_BASE_URL + "events/ajaxgettodayboundedevents", u = yield r().get(d, { params: m, withCredentials: !0, cancelToken: s.token }); return ( (0, a.z)(() => { for (let e of u.data.events) { let t = this.GetEventLookupKey(e); if (!this.m_mapExistingEvents.has(t)) { let t = new h.K(e.clan_steamid); this.InsertEventModelFromClanEventData(t, e); } i.push(this.m_mapExistingEvents.get(t)); } }), i ); }); } InsertUniqueEventGID(e, t, n) { this.m_mapClanToGIDs.has(e) || this.m_mapClanToGIDs.set(e, new Array()), this.m_mapAppIDToGIDs.has(t) || this.m_mapAppIDToGIDs.set(t, new Array()); let i = this.m_mapClanToGIDs.get(e); -1 == i.indexOf(n) && (i.push(n), this.m_mapAppIDToGIDs.get(t).push(n)); } ResetModel() {} DeleteClanEvent(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { this.m_mapExistingEvents.has(t) && (this.m_mapExistingEvents.get(t).deleteInProgress = !0); let n = null, i = new URLSearchParams(); return i.append("sessionid", y.De.SESSIONID), i.append("bDelete", "1"), i.append("gid", t), (n = yield r().post(y.De.COMMUNITY_BASE_URL + "/gid/" + e.ConvertTo64BitString() + "/ajaxcreateupdatedeletepartnerevents/", i)), this.RemoveGIDFromList(e, t), n.data; }); } RemoveGIDFromList(e, t) { if ((this.m_mapExistingEvents.delete(t), this.m_mapClanToGIDs.has(e.GetAccountID()))) { let n = this.m_mapClanToGIDs.get(e.GetAccountID()), i = n.indexOf(t); i >= 0 && n.splice(i, 1); } } FlushEventFromCache(e, t) { if (e && this.m_mapExistingEvents.has(e)) { if (!t) { t = this.m_mapExistingEvents.get(e).AnnouncementGID; } this.m_mapExistingEvents.delete(e); } if (t && (this.m_mapExistingEvents.has(B + t) && this.m_mapExistingEvents.delete(B + t), this.m_mapAnnouncementBodyToEvent.has(t))) { const e = this.m_mapAnnouncementBodyToEvent.get(t); this.m_mapExistingEvents.has(e) && this.m_mapExistingEvents.delete(e), this.m_mapAnnouncementBodyToEvent.delete(t); } } InternalLoadPartnerEventFromClanEventOrClanAnnouncementGID(e, t, n, o, a, s = !1) { return (0, i.mG)(this, void 0, void 0, function* () { let i = W(s ? 0 : (0, l.jM)(y.De.LANGUAGE)), c = { appid: t, clan_accountid: e ? e.GetAccountID() : void 0, announcement_gid: o, event_gid: n, lang_list: i, last_modified_time: a || 0, origin: self.origin, for_edit: s }, m = null, d = null; if (s) { const n = (0, y.Zv)(); "community" === n ? ((d = y.De.COMMUNITY_BASE_URL), (d += e ? "gid/" + e.ConvertTo64BitString() : "ogg/" + t), (d += "/")) : (d = "partnerweb" === n ? y.De.PARTNER_BASE_URL + "sales/" : y.De.STORE_BASE_URL + "events/"), (d += "ajaxgetpartnereventforedit"), (m = { params: c, withCredentials: !0 }); } else (d = y.De.STORE_BASE_URL + "events/ajaxgetpartnerevent"), (m = { params: c, withCredentials: !1 }); let u = (yield r().get(d, m)).data.event, p = this.GetEventLookupKey(u); if (!this.m_mapExistingEvents.has(p) || this.m_mapExistingEvents.get(p).rtime32_last_modified < u.rtime32_last_modified || this.m_mapExistingEvents.get(p).rtime32_moderator_reviewed < u.rtime_mod_reviewed) { (0, v.X)(u.clan_steamid, "ClanSteamID is missing from data we received"); let e = new h.K(u.clan_steamid); this.InsertEventModelFromClanEventData(e, u); } return this.m_mapExistingEvents.get(p); }); } InternalLoadPartnerEventFromClanEventOrClanAnnouncementGIDCached(e, t, n, o, r, a) { return (0, i.mG)(this, void 0, void 0, function* () { if (n && this.m_mapExistingEvents.has(n)) return this.m_mapExistingEvents.get(n); if (o) { if (this.m_mapExistingEvents.has(B + o)) return this.m_mapExistingEvents.get(B + o); if (this.m_mapAnnouncementBodyToEvent.has(o)) { const e = this.m_mapAnnouncementBodyToEvent.get(o); if (this.m_mapExistingEvents.has(e)) return this.m_mapExistingEvents.get(e); } } return this.InternalLoadPartnerEventFromClanEventOrClanAnnouncementGID(e, t, n, o, r, a); }); } LoadPartnerEventFromAnnoucementGID(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { return this.InternalLoadPartnerEventFromClanEventOrClanAnnouncementGIDCached(void 0, e, void 0, t, n); }); } LoadPartnerEventFromAnnoucementGIDAndClanSteamID(e, t, n, o) { return (0, i.mG)(this, void 0, void 0, function* () { return this.InternalLoadPartnerEventFromClanEventOrClanAnnouncementGIDCached(e, void 0, void 0, t, n, o); }); } LoadPartnerEventFromClanEventGID(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { return this.InternalLoadPartnerEventFromClanEventOrClanAnnouncementGIDCached(void 0, e, t, void 0, n); }); } LoadPartnerEventFromClanEventGIDAndClanSteamID(e, t, n, o) { return (0, i.mG)(this, void 0, void 0, function* () { return this.InternalLoadPartnerEventFromClanEventOrClanAnnouncementGIDCached(e, void 0, t, void 0, n, o); }); } LoadPartnerEventGeneric(e, t, n, o, r) { return (0, i.mG)(this, void 0, void 0, function* () { return this.InternalLoadPartnerEventFromClanEventOrClanAnnouncementGIDCached(e, t, n, o, r); }); } LoadHiddenPartnerEvent(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.InternalLoadPartnerEventFromClanEventOrClanAnnouncementGID(e, null, t, null, 0, !0); }); } LoadHiddenPartnerEventByAnnouncementGID(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.InternalLoadPartnerEventFromClanEventOrClanAnnouncementGID(e, null, null, t, 0, !0); }); } HintLoadImportantUpdates() { return (0, i.mG)(this, void 0, void 0, function* () { const e = (0, s.zO)(36e5); if (e != this.m_tsUpdatedAppsQueryTime) { this.m_tsUpdatedAppsQueryTime = e; const t = { page: 1, numPerPage: 500, includeAnnouncements: !1 }, n = y.De.STORE_BASE_URL + "updated/ajaxgetmyappsraw", i = yield r().get(n, { params: t, withCredentials: !0 }); i.data.apps && i.data.apps.length > 0 && (0, a.z)(() => { const e = new Map(i.data.apps.map((e) => [e.appid, new H(e)])); this.m_mapUpdatedApps = e; }); } return this.m_mapUpdatedApps; }); } GetAppImportantUpdate(e) { return ( this.HintLoadImportantUpdates().catch((e) => { console.log("UpdatedApps failed to load: ", e.response.data); }), this.m_mapUpdatedApps && this.m_mapUpdatedApps.get(e) ); } LoadClanEventLocalizationFromAnnouncementGID(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { let n = y.De.COMMUNITY_BASE_URL + "gid/" + e.ConvertTo64BitString() + "/announcements/ajaxgetlocalization/" + t; return (yield r().get(n)).data.localization; }); } LoadBatchPartnerEventsByEventGIDsOrAnnouncementGIDs(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { const i = new Array(), o = y.De.STORE_BASE_URL + "events/ajaxgetbatchedpartnerevent/", s = W((0, l.jM)(y.De.LANGUAGE)); let c = null, m = null; if (e) { let t = new Array(); e.forEach((e) => { this.m_mapExistingEvents.has(e) ? i.push(this.m_mapExistingEvents.get(e)) : t.push(e); }), t.sort(), (c = t); } if (t) { let e = new Array(); t.forEach((t) => { if (this.m_mapAnnouncementBodyToEvent.has(t) && this.m_mapExistingEvents.has(this.m_mapAnnouncementBodyToEvent.get(t))) { let e = this.m_mapAnnouncementBodyToEvent.get(t); i.push(this.m_mapExistingEvents.get(e)); } else e.push(t); }), e.sort(), (m = e); } if (!c && !m) return i; const d = new Array(); for (; (null == c ? void 0 : c.length) > 0 || (null == m ? void 0 : m.length) > 0; ) { let e = { event_gids: (null == c ? void 0 : c.length) > 0 ? (null == c ? void 0 : c.splice(0, 100).join(",")) : void 0, announcement_gids: (null == m ? void 0 : m.length) > 0 ? (null == m ? void 0 : m.splice(0, 100).join(",")) : void 0, lang_list: s, origin: self.origin }; d.push(r().get(o, { params: e, cancelToken: n ? n.token : void 0 })); } try { const e = yield Promise.all([...d]); let t = 0; (0, a.z)(() => e.forEach((e) => { if (e && e.data && e.data.events) for (let t of e.data.events) { let e = this.GetEventLookupKey(t); if (!this.m_mapExistingEvents.has(e)) { let e = new h.K(t.clan_steamid); this.InsertEventModelFromClanEventData(e, t); } i.push(this.m_mapExistingEvents.get(e)); } else { const t = (0, I.l)(e); console.error("LoadBatchPartnerEventsByEventGIDsOrAnnouncementGIDs partial processing hit error " + t.strErrorMsg, t); } t += 1; }), ); } catch (e) { const t = (0, I.l)(e); console.error("LoadBatchPartnerEventsByEventGIDsOrAnnouncementGIDs hit error " + t.strErrorMsg, t); } return i; }); } SavePartnerEventSaleAssets(e, t, n) { var o; return (0, i.mG)(this, void 0, void 0, function* () { let i = null; if (!this.m_mapExistingEvents.has(t)) return !1; try { const a = `${y.De.PARTNER_BASE_URL}promotion/sales/ajaxsaveasset/${e}`, s = new FormData(); s.append("sessionid", y.De.SESSIONID), s.append("gidclanevent", t), s.append("json", JSON.stringify(n)); const l = yield r().post(a, s, { withCredentials: !0 }); if (1 == (null === (o = null == l ? void 0 : l.data) || void 0 === o ? void 0 : o.success)) { const e = this.m_mapExistingEvents.get(t); for (const t in n) n.hasOwnProperty(t) && n[t] && (e.jsondata[t] = n[t]); return this.GetPartnerEventChangeCallback(t).Dispatch(e), !0; } i = (0, I.l)(l); } catch (e) { i = (0, I.l)(e); } return console.error("CPartnerEventStore.SavePartnerEventSaleAssets failed: " + (null == i ? void 0 : i.strErrorMsg), i), !1; }); } } (0, i.gn)([a.LO], X.prototype, "m_mapExistingEvents", void 0), (0, i.gn)([a.LO], X.prototype, "m_mapAnnouncementBodyToEvent", void 0), (0, i.gn)([a.LO], X.prototype, "m_mapClanToGIDs", void 0), (0, i.gn)([a.LO], X.prototype, "m_mapAppIDToGIDs", void 0), (0, i.gn)([a.LO], X.prototype, "m_mapUpdatedApps", void 0), (0, i.gn)([a.aD], X.prototype, "Init", null), (0, i.gn)([V.ak], X.prototype, "GetPartnerEventChangeCallback", null), (0, i.gn)([a.aD], X.prototype, "RegisterClanEvents", null), (0, i.gn)([a.aD], X.prototype, "InsertEventModelFromClanEventData", null), (0, i.gn)([a.aD], X.prototype, "DeleteClanEvent", null), (0, i.gn)([a.aD], X.prototype, "RemoveGIDFromList", null), (0, i.gn)([a.aD], X.prototype, "FlushEventFromCache", null), (0, i.gn)([V.ak], X.prototype, "SavePartnerEventSaleAssets", null); const j = new X(); window.g_PartnerEventStore = j; }, 44420: (e, t, n) => { "use strict"; n.d(t, { Z: () => M }); var i = n(85556), o = n(79588), r = n(1736), a = n(54521), s = n(88598), l = n(85041), c = n(93635), m = n(52705), d = n(10553), h = n(11612); n(34632); function u(e, t) { e.Body().set_context(p(t)); } function p(e) { let t = new l.WJ(); return e || t.set_country_code(d.De.COUNTRY), t.set_language(d.De.LANGUAGE), d.De.EREALM != h.IN.k_ESteamRealmUnknown && t.set_steam_realm(d.De.EREALM), t; } function _(e, t) { e.Body().set_data_request(l.Qn.fromObject(t)); } var g = n(55151), C = n(84290), f = n(89554); function v(e) { return (function (e, t, n) { switch (e) { case "date_full": return (0, C.vX)(t); case "date_month": return (0, f.LO)(new Date(1e3 * t)); case "date_quarter": return (0, f.Kb)(new Date(1e3 * t)); case "date_year": return (0, f.Np)(new Date(1e3 * t)); case "text_comingsoon": return n || (0, C.Xx)("#Store_ComingSoon_ComingSoon"); case "text_tba": return n || (0, C.Xx)("#Store_ComingSoon_TBA"); default: return ""; } })(e.coming_soon_display, e.steam_release_date, e.custom_release_date_message); } class S { constructor(e, t) { var n, i, o; (this.m_bVisible = !1), (this.m_rgStoreTags = []), (this.m_rgStoreTagIDs = []), (this.m_DataRequested = { include_tag_count: 0 }), (this.k_regexSalePage = /^https?:\/\/[^\/]*(?:valvesoftware|steampowered).com\/(?:(curator|dev|developer|pub|publisher|franchise)\/[0-9a-zA-Z\-_]+\/)?sale\//), (this.m_eItemType = e.item_type()), (this.m_unID = e.id()), (this.m_bVisible = !!e.visible()), (this.m_strName = e.name()), (this.m_strStoreURLPath = e.store_url_path()), (this.m_unAppID = e.appid()), (this.m_eAppType = e.type()), (this.m_rgIncludedAppTypes = e.included_types()), (this.m_rgIncludedAppIDs = e.included_appids()), (this.m_bIsFree = e.is_free()), (this.m_bIsEarlyAccess = e.is_early_access()), (this.m_RelatedItems = null === (n = e.related_items()) || void 0 === n ? void 0 : n.toObject()), (this.m_ContentDescriptorIDs = e.content_descriptorids()), (this.m_StoreCategories = e.categories().toObject()), (this.m_BestPurchaseOption = null === (i = e.best_purchase_option()) || void 0 === i ? void 0 : i.toObject()), (this.m_strStoreURLPathOverride = e.store_url_path_override()), (this.m_freeWeekend = null === (o = e.free_weekend()) || void 0 === o ? void 0 : o.toObject()), (this.m_strInternalName = e.internal_name()), this.MergeData(e, t); } MergeData(e, t) { t.include_assets && !this.m_Assets && ((this.m_Assets = new I(e.assets(), e.id())), (this.m_DataRequested.include_assets = !0)), t.include_assets_without_overrides && !this.m_AssetsWithoutOverrides && ((this.m_AssetsWithoutOverrides = new I(e.assets_without_overrides(), e.id())), (this.m_DataRequested.include_assets_without_overrides = !0)), t.include_release && !this.m_ReleaseInfo && ((this.m_ReleaseInfo = e.release().toObject()), (this.m_DataRequested.include_release = !0)), t.include_platforms && !this.m_Platforms && ((this.m_Platforms = e.platforms().toObject()), (this.m_DataRequested.include_platforms = !0)), t.include_all_purchase_options && !this.m_rgPurchaseOptions && ((this.m_rgPurchaseOptions = e.purchase_options().map((e) => e.toObject())), (this.m_DataRequested.include_all_purchase_options = !0)), t.include_screenshots && !this.m_Screenshots && ((this.m_Screenshots = new D(e.screenshots())), (this.m_DataRequested.include_screenshots = !0)), t.include_trailers && !this.m_Trailers && ((this.m_Trailers = new y(e.trailers())), (this.m_DataRequested.include_trailers = !0)), t.include_tag_count && t.include_tag_count > this.m_rgStoreTags.length && this.m_DataRequested.include_tag_count < t.include_tag_count && ((this.m_rgStoreTags = e.tags().map((e) => e.toObject())), (this.m_rgStoreTagIDs = this.m_rgStoreTags.map((e) => e.tagid)), (this.m_DataRequested.include_tag_count = Math.max(t.include_tag_count, this.m_rgStoreTags.length || 0))), t.include_reviews && !this.m_ReviewInfo && ((this.m_ReviewInfo = e.reviews().toObject()), (this.m_DataRequested.include_reviews = !0)), t.include_basic_info && !this.m_BasicInfo && ((this.m_BasicInfo = e.basic_info().toObject()), (this.m_DataRequested.include_basic_info = !0)), t.include_supported_languages && !this.m_rgSupportedLanguages && ((this.m_rgSupportedLanguages = e.supported_languages().map((e) => e.toObject())), (this.m_DataRequested.include_supported_languages = !0)); } static BDataRequestContainsOtherDataRequest(e, t) { return Boolean((!t.include_assets || e.include_assets) && (!t.include_release || e.include_release) && (!t.include_platforms || e.include_platforms) && (!t.include_all_purchase_options || e.include_all_purchase_options) && (!t.include_screenshots || e.include_screenshots) && (!t.include_trailers || e.include_trailers) && (!t.include_ratings || e.include_ratings) && (!t.include_tag_count || (e.include_tag_count || 0) >= t.include_tag_count) && (!t.include_reviews || e.include_reviews) && (!t.include_basic_info || e.include_basic_info) && (!t.include_supported_languages || e.include_supported_languages)); } BContainDataRequest(e) { return S.BDataRequestContainsOtherDataRequest(this.m_DataRequested, e); } BCheckDataRequestIncluded(e) { ("dev" != d.De.WEB_UNIVERSE && "beta" != d.De.WEB_UNIVERSE) || (0, c.X)(this.BContainDataRequest(e), `Requested data without for ${(0, g.qE)(this.m_eItemType)} @ ${this.m_unID}`, (0, o.ZN)(e), (0, o.ZN)(this.m_DataRequested)); } GetStoreItemType() { return this.m_eItemType; } GetID() { return this.m_unID; } GetUniqueID() { return this.m_eItemType + "_" + this.m_unID; } BIsVisible() { return this.m_bVisible; } GetName() { return this.m_strName; } GetStorePageURL() { return d.De.STORE_BASE_URL + this.m_strStoreURLPath; } GetStorePageURLWithOverride() { return this.m_strStoreURLPathOverride && this.m_strStoreURLPathOverride.length > 0 ? this.GetStorePageURLOverride() : this.GetStorePageURL(); } GetStorePageURLOverride() { return this.m_strStoreURLPathOverride; } GetCommunityPageURL() { return this.GetAppID() ? d.De.COMMUNITY_BASE_URL + "app/" + this.GetAppID() : null; } GetCommunityDiscussionForumsURL() { return this.GetAppID() ? d.De.COMMUNITY_BASE_URL + "app/" + this.GetAppID() + "/discussions/" : null; } GetAppID() { return this.m_unAppID; } GetAppIDToRun() { const e = this.GetParentAppID(); return e && 11 != this.m_eAppType ? e : this.GetAppID(); } GetAppType() { return this.m_eAppType; } BIsApplicationOrTool() { return 6 == this.GetAppType() || 13 == this.GetAppType(); } BIsSalePage() { return 0 === this.GetStoreItemType() && this.k_regexSalePage.test(this.GetStorePageURLWithOverride()); } GetSalePageVanityURL() { let e = this.GetStorePageURLWithOverride(); return 0 === this.GetStoreItemType() && ((e = this.GetStorePageURLWithOverride().replace(this.k_regexSalePage, "")), e.endsWith("/") && (e = e.replace("/", ""))), e; } GetIncludedAppTypes() { return this.m_rgIncludedAppTypes; } GetIncludedAppIDs() { return this.m_rgIncludedAppIDs; } GetIncludedAppIDsOrSelf() { return 0 == this.GetStoreItemType() ? [this.GetID()] : this.GetIncludedAppIDs(); } BIsFree() { return this.m_bIsFree; } BIsFreeWeekend() { const e = Date.now() / 1e3; return Boolean(this.m_freeWeekend) && this.m_freeWeekend.start_time <= e && e <= this.m_freeWeekend.end_time; } GetFreeWeekendEnd() { var e; return null === (e = this.m_freeWeekend) || void 0 === e ? void 0 : e.end_time; } GetFreeWeekendPlayTextOverride() { var e; return null === (e = this.m_freeWeekend) || void 0 === e ? void 0 : e.text; } BIsEarlyAccess() { return this.m_bIsEarlyAccess; } GetParentAppID() { var e; return null === (e = this.m_RelatedItems) || void 0 === e ? void 0 : e.parent_appid; } GetContentDescriptorIDs() { return this.m_ContentDescriptorIDs; } HasContentDescriptorID(e) { var t; return null === (t = this.m_ContentDescriptorIDs) || void 0 === t ? void 0 : t.includes(e); } GetStoreCategories_SupportedPlayers() { var e; return (null === (e = this.m_StoreCategories) || void 0 === e ? void 0 : e.supported_player_categoryids) || []; } GetStoreCategories_Features() { var e; return (null === (e = this.m_StoreCategories) || void 0 === e ? void 0 : e.feature_categoryids) || []; } GetStoreCategories_Controller() { var e; return (null === (e = this.m_StoreCategories) || void 0 === e ? void 0 : e.controller_categoryids) || []; } BHasStoreCategory(e) { return Boolean(this.GetStoreCategories_SupportedPlayers().find((t) => e === t) || this.GetStoreCategories_Features().find((t) => e === t) || this.GetStoreCategories_Controller().find((t) => e === t)); } GetFilteredReviewSummary() { var e; return this.BCheckDataRequestIncluded({ include_reviews: !0 }), null === (e = this.m_ReviewInfo) || void 0 === e ? void 0 : e.summary_filtered; } GetUnfilteredReviewSummary() { var e, t; return this.BCheckDataRequestIncluded({ include_reviews: !0 }), (null === (e = this.m_ReviewInfo) || void 0 === e ? void 0 : e.summary_unfiltered) || (null === (t = this.m_ReviewInfo) || void 0 === t ? void 0 : t.summary_filtered); } GetShortDescription() { var e, t; return this.BCheckDataRequestIncluded({ include_basic_info: !0 }), null !== (t = null === (e = this.m_BasicInfo) || void 0 === e ? void 0 : e.short_description) && void 0 !== t ? t : ""; } GetDeveloperNames() { var e, t, n, i; return this.BCheckDataRequestIncluded({ include_basic_info: !0 }), null !== (i = null === (n = null === (t = null === (e = this.m_BasicInfo) || void 0 === e ? void 0 : e.developers) || void 0 === t ? void 0 : t.map((e) => e.name.trim())) || void 0 === n ? void 0 : n.filter((e) => (null == e ? void 0 : e.length) > 0)) && void 0 !== i ? i : []; } GetFranchiseNames() { var e, t, n, i; return this.BCheckDataRequestIncluded({ include_basic_info: !0 }), null !== (i = null === (n = null === (t = null === (e = this.m_BasicInfo) || void 0 === e ? void 0 : e.franchises) || void 0 === t ? void 0 : t.map((e) => e.name.trim())) || void 0 === n ? void 0 : n.filter((e) => (null == e ? void 0 : e.length) > 0)) && void 0 !== i ? i : []; } GetPublisherNames() { var e, t, n, i; this.BCheckDataRequestIncluded({ include_basic_info: !0 }); const o = null !== (i = null === (n = null === (t = null === (e = this.m_BasicInfo) || void 0 === e ? void 0 : e.publishers) || void 0 === t ? void 0 : t.map((e) => e.name.trim())) || void 0 === n ? void 0 : n.filter((e) => (null == e ? void 0 : e.length) > 0)) && void 0 !== i ? i : []; return (null == o ? void 0 : o.length) > 0 ? o : this.GetDeveloperNames(); } GetAllCreatorClanIDs() { return this.BCheckDataRequestIncluded({ include_basic_info: !0 }), this.m_BasicInfo ? b([...this.m_BasicInfo.developers, ...this.m_BasicInfo.publishers, ...this.m_BasicInfo.franchises]) : []; } GetAllPublisherCreatorClans() { return this.BCheckDataRequestIncluded({ include_basic_info: !0 }), this.m_BasicInfo ? b(this.m_BasicInfo.publishers) : []; } GetAllDeveloperCreatorClans() { return this.BCheckDataRequestIncluded({ include_basic_info: !0 }), this.m_BasicInfo ? b(this.m_BasicInfo.developers) : []; } GetAllFranchiseCreatorClans() { return this.BCheckDataRequestIncluded({ include_basic_info: !0 }), this.m_BasicInfo ? b(this.m_BasicInfo.franchises) : []; } GetCapsuleHeadline() { var e; return this.BCheckDataRequestIncluded({ include_basic_info: !0 }), null === (e = this.m_BasicInfo) || void 0 === e ? void 0 : e.capsule_headline; } GetTags() { return this.BCheckDataRequestIncluded({ include_tag_count: 1 }), this.m_rgStoreTags; } GetTagIDs() { return this.BCheckDataRequestIncluded({ include_tag_count: 1 }), this.m_rgStoreTagIDs; } BHasTags() { var e; return this.BCheckDataRequestIncluded({ include_tag_count: 1 }), (null === (e = this.m_rgStoreTagIDs) || void 0 === e ? void 0 : e.length) > 0; } GetAssets() { return this.BCheckDataRequestIncluded({ include_assets: !0 }), this.m_Assets; } GetAssetsWithoutOverrides() { return this.BCheckDataRequestIncluded({ include_assets_without_overrides: !0 }), this.m_AssetsWithoutOverrides; } GetOriginalReleaseDateRTime() { var e; this.BCheckDataRequestIncluded({ include_release: !0 }); let t = null === (e = this.m_ReleaseInfo) || void 0 === e ? void 0 : e.original_steam_release_date; return t || (t = this.GetReleaseDateRTime()), t; } GetReleaseDateRTime() { var e, t, n; if ((this.BCheckDataRequestIncluded({ include_release: !0 }), null === (e = this.m_ReleaseInfo) || void 0 === e ? void 0 : e.is_coming_soon)) return 0; let i = null === (t = this.m_ReleaseInfo) || void 0 === t ? void 0 : t.steam_release_date; return i || (i = null === (n = this.m_ReleaseInfo) || void 0 === n ? void 0 : n.original_release_date), i; } GetFormattedSteamReleaseDate() { var e, t, n, i, o; if ((this.BCheckDataRequestIncluded({ include_release: !0 }), null === (e = this.m_ReleaseInfo) || void 0 === e ? void 0 : e.is_coming_soon)) { if (null === (t = this.m_ReleaseInfo) || void 0 === t ? void 0 : t.coming_soon_display) return v(this.m_ReleaseInfo); if (null === (n = this.m_ReleaseInfo) || void 0 === n ? void 0 : n.custom_release_date_message) return this.m_ReleaseInfo.custom_release_date_message; const e = null === (i = this.m_ReleaseInfo) || void 0 === i ? void 0 : i.steam_release_date; return e ? ((null === (o = this.m_ReleaseInfo) || void 0 === o ? void 0 : o.is_abridged_release_date) ? (0, f.LO)(new Date(1e3 * e)) : (0, C.vX)(e)) : ""; } const r = this.GetReleaseDateRTime(); return r ? (0, C.vX)(r) : ""; } BIsComingSoon() { var e; return this.BCheckDataRequestIncluded({ include_release: !0 }), null === (e = this.m_ReleaseInfo) || void 0 === e ? void 0 : e.is_coming_soon; } BIsCustomComingSoonDisplay() { var e, t; return !!this.BIsComingSoon() && ((null === (e = this.m_ReleaseInfo) || void 0 === e ? void 0 : e.coming_soon_display) ? ["text_tba", "text_comingsoon"].includes(this.m_ReleaseInfo.coming_soon_display) : !!(null === (t = this.m_ReleaseInfo) || void 0 === t ? void 0 : t.custom_release_date_message)); } BIsPrePurchase() { var e; return this.BIsComingSoon() && Boolean(null === (e = this.GetBestPurchaseOption()) || void 0 === e ? void 0 : e.packageid); } BIsReleased() { return !this.BIsComingSoon(); } GetPlatforms() { return this.BCheckDataRequestIncluded({ include_platforms: !0 }), this.m_Platforms; } GetBestPurchaseOption() { return this.m_BestPurchaseOption; } GetBestPurchasePriceInCents() { var e; if (null === (e = this.m_BestPurchaseOption) || void 0 === e ? void 0 : e.final_price_in_cents) return Number.parseInt(this.m_BestPurchaseOption.final_price_in_cents); } GetBestPurchasePriceFormatted() { var e; return null === (e = this.m_BestPurchaseOption) || void 0 === e ? void 0 : e.formatted_final_price; } GetBestPurchaseOriginalPriceInCents() { var e; return (null === (e = this.m_BestPurchaseOption) || void 0 === e ? void 0 : e.original_price_in_cents) ? Number.parseInt(this.m_BestPurchaseOption.final_price_in_cents) : this.GetBestPurchasePriceInCents(); } GetBestPurchaseOriginalPriceFormatted() { var e, t, n; return null !== (t = null === (e = this.m_BestPurchaseOption) || void 0 === e ? void 0 : e.formatted_original_price) && void 0 !== t ? t : null === (n = this.m_BestPurchaseOption) || void 0 === n ? void 0 : n.formatted_final_price; } GetAllPurchaseOptions() { return this.BCheckDataRequestIncluded({ include_all_purchase_options: !0 }), this.m_rgPurchaseOptions; } GetSelfPurchaseOption() { var e; this.BCheckDataRequestIncluded({ include_all_purchase_options: !0 }); const t = 2 === this.m_eItemType ? "bundleid" : "packageid"; return null === (e = this.m_rgPurchaseOptions) || void 0 === e ? void 0 : e.find((e) => e[t] && e[t] === this.m_unID); } BHasAgeSafeScreenshots() { return this.GetOnlyAllAgesSafeScreenshots().length > 0; } GetOnlyAllAgesSafeScreenshots() { var e; return this.BCheckDataRequestIncluded({ include_screenshots: !0 }), (null === (e = this.m_Screenshots) || void 0 === e ? void 0 : e.GetOnlyAllAgesScreenshots()) || []; } GetBothAllAgesSafeAndMatureScreenshots() { var e; return this.BCheckDataRequestIncluded({ include_screenshots: !0 }), (null === (e = this.m_Screenshots) || void 0 === e ? void 0 : e.GetAllAgesAndMatureScreenshots()) || []; } BHasTrailers() { var e; return this.BCheckDataRequestIncluded({ include_trailers: !0 }), null === (e = this.m_Trailers) || void 0 === e ? void 0 : e.BHasTrailers(); } BHasHighlightTrailers() { var e, t, n; return this.BCheckDataRequestIncluded({ include_trailers: !0 }), (null !== (n = null === (t = null === (e = this.m_Trailers) || void 0 === e ? void 0 : e.GetHighlightTrailers()) || void 0 === t ? void 0 : t.length) && void 0 !== n ? n : 0) > 0; } GetAllTrailers() { return this.BCheckDataRequestIncluded({ include_trailers: !0 }), this.m_Trailers; } BHasSomeLanguageSupport(e) { var t; return this.BCheckDataRequestIncluded({ include_supported_languages: !0 }), (null === (t = this.m_rgSupportedLanguages) || void 0 === t ? void 0 : t.some((t) => t.elanguage == e && (t.supported || t.subtitles || t.full_audio))) || !1; } GetAllLanguagesWithSomeSupport() { var e; return this.BCheckDataRequestIncluded({ include_supported_languages: !0 }), (null === (e = this.m_rgSupportedLanguages) || void 0 === e ? void 0 : e.filter((e) => e.supported || e.subtitles || e.full_audio).map((e) => e.elanguage)) || []; } GetDataRequest() { return this.m_DataRequested; } GetMicroTrailer() { this.BCheckDataRequestIncluded({ include_trailers: !0 }); let e = null; return ( this.m_Trailers && (this.m_Trailers.GetHighlightTrailers().forEach((t) => { !e && t.GetMicroTrailer() && (e = t.GetMicroTrailer()); }), e || this.m_Trailers.GetOtherTrailers().forEach((t) => { !e && t.GetMicroTrailer() && (e = t.GetMicroTrailer()); })), e ); } ReplaceBestPurchaseOption(e) { this.m_BestPurchaseOption = e; } GetInternalName() { return this.m_strInternalName; } } function b(e) { if (!(null == e ? void 0 : e.length)) return []; const t = e.map((e) => e.creator_clan_account_id).filter((e) => !!e); return Array.from(new Set(t)); } class I { constructor(e, t) { const n = e.asset_url_format(); n && (e.main_capsule() && (this.m_strMainCapsuleURL = this.ConstructAssetURL(n, e.main_capsule())), e.small_capsule() && (this.m_strSmallCapsuleURL = this.ConstructAssetURL(n, e.small_capsule())), e.header() && (this.m_strHeaderURL = this.ConstructAssetURL(n, e.header())), e.package_header() && (this.m_strPackageHeaderURL = this.ConstructAssetURL(n, e.package_header())), e.page_background() && (this.m_strPageBackgroundURL = this.ConstructAssetURL(n, e.page_background())), e.hero_capsule() && (this.m_strHeroCapsuleURL = this.ConstructAssetURL(n, e.hero_capsule())), e.hero_capsule_2x() && (this.m_strHeroCapsuleURL_2x = this.ConstructAssetURL(n, e.hero_capsule_2x())), e.library_capsule() && (this.m_strLibraryCapsuleURL = this.ConstructAssetURL(n, e.library_capsule())), e.library_capsule_2x() && (this.m_strLibraryCapsuleURL_2x = this.ConstructAssetURL(n, e.library_capsule_2x())), e.library_hero() && (this.m_strLibraryHeroURL = this.ConstructAssetURL(n, e.library_hero())), e.library_hero_2x() && (this.m_strLibraryHeroURL_2x = this.ConstructAssetURL(n, e.library_hero_2x()))), e.community_icon() && (this.m_strCommunityIcon = `${d.De.MEDIA_CDN_COMMUNITY_URL}images/apps/${t}/${e.community_icon()}.jpg`); } GetMainCapsuleURL() { return this.m_strMainCapsuleURL; } GetSmallCapsuleURL() { return this.m_strSmallCapsuleURL; } GetHeaderURL() { return this.m_strHeaderURL; } GetPackageHeaderURL() { return this.m_strPackageHeaderURL; } GetPageBackgroundURL() { return this.m_strPageBackgroundURL; } GetHeroCapsuleURL() { return this.m_strHeroCapsuleURL; } GetHeroCapsuleURL_2x() { return this.m_strHeroCapsuleURL_2x; } GetLibraryCapsuleURL() { return this.m_strLibraryCapsuleURL; } GetLibraryCapsuleURL_2x() { return this.m_strLibraryCapsuleURL_2x; } GetLibraryHeroURL() { return this.m_strLibraryHeroURL; } GetLibraryHeroURL_2x() { return this.m_strLibraryHeroURL_2x; } ConstructAssetURL(e, t) { return d.De.MEDIA_CDN_URL + e.replace("${FILENAME}", t); } GetCommunityIconURL() { return this.m_strCommunityIcon; } } class y { constructor(e) { (this.m_mapTrailer = new Map()), (this.m_higherTrailers = new Array()), (this.m_otherTrailers = new Array()), e.highlights() && e.highlights().forEach((e) => { let t = new E(e); this.m_mapTrailer.set(t.GetTrailerID(), t), this.m_higherTrailers.push(t); }), e.other_trailers() && e.other_trailers().forEach((e) => { let t = new E(e); this.m_mapTrailer.set(t.GetTrailerID(), t), this.m_otherTrailers.push(t); }); } BHasTrailers() { return this.m_higherTrailers.length > 0 || this.m_otherTrailers.length > 0; } GetHighlightTrailers() { return this.m_higherTrailers; } GetOtherTrailers() { return this.m_otherTrailers; } GetTrailerByID(e) { return this.m_mapTrailer.get(e); } } class E { constructor(e) { (this.m_strTrailerName = e.trailer_name()), (this.m_nBaseID = e.trailer_base_id()); const t = e.trailer_url_format(); t && (e.trailer_480p() && (this.m_Trailer480p = this.ExtractTrailerFormats(t, e.trailer_480p())), e.trailer_max() && (this.m_TrailerMax = this.ExtractTrailerFormats(t, e.trailer_max())), e.microtrailer() && (this.m_MicroTrailer = this.ExtractTrailerFormats(t, e.microtrailer())), e.screenshot_medium() && (this.m_strScreenshotMedium = this.ConstructAssetURL(t, e.screenshot_medium())), e.screenshot_full() && (this.m_strScreenshotFull = this.ConstructAssetURL(t, e.screenshot_full()))); } GetName() { return this.m_strTrailerName; } GetTrailerID() { return this.m_nBaseID; } GetTrailer480p() { return this.m_Trailer480p; } GetTrailerMax() { return this.m_TrailerMax; } GetMicroTrailer() { return this.m_MicroTrailer; } GetScreenshot() { return this.m_strScreenshotFull ? this.m_strScreenshotFull : this.m_strScreenshotMedium; } ExtractTrailerFormats(e, t) { let n = {}; return ( t.forEach((t) => { "video/mp4" == t.type() ? (n.strMP4URL = this.ConstructAssetURL(e, t.filename())) : "video/webm" == t.type() && (n.strWebMURL = this.ConstructAssetURL(e, t.filename())); }), n ); } ConstructAssetURL(e, t) { return d.De.MEDIA_CDN_URL + e.replace("${FILENAME}", t); } } class D { constructor(e) { (this.m_rgAllScreenshots = new Array()), (this.m_rgOnlyAllAgesScreenshots = new Array()); let t = 0, n = 0; const i = e.all_ages_screenshots() || [], o = e.mature_content_screenshots() || []; for (; t < i.length || n < o.length; ) { let e = t < i.length; if (t < i.length && n < o.length) { e = i[t].ordinal() < o[n].ordinal(); } if (e) { const e = d.De.MEDIA_CDN_URL + i[t].filename(); this.m_rgAllScreenshots.push(e), this.m_rgOnlyAllAgesScreenshots.push(e), (t += 1); } else { const e = d.De.MEDIA_CDN_URL + o[n].filename(); this.m_rgAllScreenshots.push(e), (n += 1); } } } GetAllAgesAndMatureScreenshots() { return this.m_rgAllScreenshots; } GetOnlyAllAgesScreenshots() { return this.m_rgOnlyAllAgesScreenshots; } } function w(e, t) { if (!e) return t; if (!t) return e; return { include_assets: e.include_assets || t.include_assets, include_release: e.include_release || t.include_release, include_platforms: e.include_platforms || t.include_platforms, include_all_purchase_options: e.include_all_purchase_options || t.include_all_purchase_options, include_screenshots: e.include_screenshots || t.include_screenshots, include_trailers: e.include_trailers || t.include_trailers, include_ratings: e.include_ratings || t.include_ratings, include_tag_count: Math.max(e.include_tag_count || 0, t.include_tag_count || 0) || void 0, include_reviews: e.include_reviews || t.include_reviews, include_basic_info: e.include_basic_info || t.include_basic_info, include_supported_languages: e.include_supported_languages || t.include_supported_languages, include_full_description: e.include_full_description || t.include_full_description, include_included_items: e.include_included_items || t.include_included_items, include_assets_without_overrides: e.include_assets_without_overrides || t.include_assets_without_overrides, apply_user_filters: e.apply_user_filters || t.apply_user_filters, }; } function R(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { const n = yield e, i = yield t; return 1 != n ? n : i; }); } class A { constructor() { (this.k_QueueWaitUntilRequestMS = 5), (this.k_nMaxBatchSize = 250), (this.m_bReturnUnavailableItems = !1), (this.m_mapApps = new Map()), (this.m_mapPackages = new Map()), (this.m_mapBundles = new Map()), (this.m_mapTags = new Map()), (this.m_mapCreators = new Map()), (this.m_mapHubCategories = new Map()), (this.m_setUnavailableApps = new Set()), (this.m_setUnavailablePackages = new Set()), (this.m_setUnavailableBundles = new Set()), (this.m_setUnavailableTags = new Set()), (this.m_setUnavailableCreators = new Set()), (this.m_setUnavailableHubCategories = new Set()), (this.m_setUnavailableDueToCountryRestrictionApps = new Set()), (this.m_setUnavailableDueToCountryRestrictionPackages = new Set()), (this.m_setUnavailableDueToCountryRestrictionBundles = new Set()), (this.m_mapAppsInFlight = new Map()), (this.m_mapPackageInFlight = new Map()), (this.m_mapBundleInFlight = new Map()), (this.m_mapTagsInFlight = new Map()), (this.m_mapCreatorsInFlight = new Map()), (this.m_mapHubCategoriesInFlight = new Map()), (this.m_SteamInterface = null), (this.m_bUsePartnerAPI = !1), (this.m_bInitialized = !1), (this.m_bActivelyResettingCache = !1), (this.m_setPendingAppInfo = new Set()), (this.m_setPendingBundleInfo = new Set()), (this.m_setPendingPackageInfo = new Set()), (this.m_setPendingTagInfo = new Set()), (this.m_setPendingCreatorInfo = new Set()), (this.m_setPendingHubCategoryInfo = new Set()), (this.m_setPendingDataRequest = {}), (this.m_PendingInfoResolve = void 0), (this.m_PendingTimer = void 0), (this.k_AlreadyResolvedOK = Promise.resolve(1)), (this.k_AlreadyResolvedInvalid = Promise.resolve(8)), (this.k_AlreadyResolvedBusy = Promise.resolve(10)); } static Get() { return A.sm_instance || ((A.sm_instance = new A()), (window.StoreItemCache = A.sm_instance)), A.sm_instance; } static Initialize(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { (0, c.X)(!A.Get().m_bInitialized, "CStoreItemCache was already initialized; initialize it only once."), (A.Get().m_SteamInterface = e), (A.Get().m_bUsePartnerAPI = !!t), (A.Get().m_bInitialized = !0); }); } GetSteamInterface() { return this.m_SteamInterface; } SetSteamInterface(e) { this.m_SteamInterface = e; } SetReturnUnavailableItems(e) { this.m_bReturnUnavailableItems = e; } GetReturnUnavailableItems() { return this.m_bReturnUnavailableItems; } ResetCache() { return (0, i.mG)(this, void 0, void 0, function* () { (this.m_bActivelyResettingCache = !0), this.FlushPendingInfo(); let e = []; this.m_mapAppsInFlight.forEach((t) => { e.push(t.promise); }), this.m_mapBundleInFlight.forEach((t) => { e.push(t.promise); }), this.m_mapPackageInFlight.forEach((t) => { e.push(t.promise); }), this.m_mapTagsInFlight.forEach((t) => { e.push(t.promise); }), this.m_mapCreatorsInFlight.forEach((t) => { e.push(t.promise); }), this.m_mapHubCategoriesInFlight.forEach((t) => { e.push(t.promise); }), yield Promise.all(e), this.m_mapApps.clear(), this.m_mapBundles.clear(), this.m_mapPackages.clear(), this.m_mapTagsInFlight.clear(), this.m_mapCreatorsInFlight.clear(), this.m_mapHubCategoriesInFlight.clear(), (this.m_bActivelyResettingCache = !1); }); } static BIsInitialized() { return A.Get().m_bInitialized; } QueueAppRequest(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.QueueStoreItemRequest(e, 0, t); }); } QueuePackageRequest(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.QueueStoreItemRequest(e, 1, t); }); } QueueBundleRequest(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.QueueStoreItemRequest(e, 2, t); }); } QueueTagRequest(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.QueueStoreItemRequest(e, 4, t); }); } QueueCreatorRequest(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.QueueStoreItemRequest(e, 5, t); }); } QueueHubCategoryRequest(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.QueueStoreItemRequest(e, 6, t); }); } static ValidateDataRequest(e) { const t = [e.include_assets, e.include_release, e.include_platforms, e.include_all_purchase_options, e.include_screenshots, e.include_trailers, e.include_ratings, e.include_reviews, e.include_basic_info, e.include_supported_languages]; for (const e of t) if (!0 !== e && void 0 !== e) return !1; return !0; } QueueMultipleAppRequests(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (!e || 0 == e.length) return 1; const n = (yield Promise.all(e.map((e) => this.QueueStoreItemRequest(e, 0, t)))).filter((e) => 1 != e); return n.length > 0 ? n[0] : 1; }); } QueueMultiplePackageRequests(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (!e || 0 == e.length) return 1; const n = (yield Promise.all(e.map((e) => this.QueueStoreItemRequest(e, 1, t)))).filter((e) => 1 != e); return n.length > 0 ? n[0] : 1; }); } QueueMultipleBundleRequests(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (!e || 0 == e.length) return 1; const n = (yield Promise.all(e.map((e) => this.QueueStoreItemRequest(e, 2, t)))).filter((e) => 1 != e); return n.length > 0 ? n[0] : 1; }); } QueueMultipleTagRequests(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (!e || 0 == e.length) return 1; const n = (yield Promise.all(e.map((e) => this.QueueStoreItemRequest(e, 4, t)))).filter((e) => 1 != e); return n.length > 0 ? n[0] : 1; }); } QueueMultipleCreatorRequests(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (!e || 0 == e.length) return 1; const n = (yield Promise.all(e.map((e) => this.QueueStoreItemRequest(e, 5, t)))).filter((e) => 1 != e); return n.length > 0 ? n[0] : 1; }); } QueueMultipleHubCategoryRequests(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (!e || 0 == e.length) return 1; const n = (yield Promise.all(e.map((e) => this.QueueStoreItemRequest(e, 6, t)))).filter((e) => 1 != e); return n.length > 0 ? n[0] : 1; }); } QueueMultipleStoreItemRequests(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { if (!e || 0 == e.length) return 1; const i = (yield Promise.all(e.map((e, i) => this.QueueStoreItemRequest(e, t[i], n)))).filter((e) => 1 != e); return i.length > 0 ? i[0] : 1; }); } QueueStoreItemRequest(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { if (((0, c.X)(A.ValidateDataRequest(n), "Invalid Data Request: " + JSON.stringify(n)), "string" == typeof e && (e = parseInt(e)), this.m_bActivelyResettingCache)) return console.log("Rejecting store item request due to currently clearing the cache"), this.k_AlreadyResolvedBusy; if (!e) return (0, c.X)(!e, `unexpected id ${e} of zero or undefined for type ${t}`), this.k_AlreadyResolvedInvalid; const i = this.GetPreviousSupersetLoadPromise(e, t, n); if (i) return i; switch ((this.m_PendingInfoPromise || ((this.m_PendingInfoPromise = new Promise((e) => (this.m_PendingInfoResolve = e))), (this.m_PendingTimer = window.setTimeout(() => this.FlushPendingInfo(), this.k_QueueWaitUntilRequestMS))), (this.m_setPendingDataRequest = w(this.m_setPendingDataRequest, n)), t)) { case 0: this.m_setPendingAppInfo.add(e); break; case 2: this.m_setPendingBundleInfo.add(e); break; case 1: this.m_setPendingPackageInfo.add(e); break; case 4: this.m_setPendingTagInfo.add(e); break; case 5: this.m_setPendingCreatorInfo.add(e); break; case 6: this.m_setPendingHubCategoryInfo.add(e); break; default: (0, c.X)(!1, `Unexpected Type ${t}`); } const o = this.m_PendingInfoPromise; return this.m_setPendingAppInfo.size + this.m_setPendingPackageInfo.size + this.m_setPendingBundleInfo.size >= this.k_nMaxBatchSize && (this.m_PendingTimer && window.clearTimeout(this.m_PendingTimer), this.FlushPendingInfo()), o; }); } FlushPendingInfo() { return (0, i.mG)(this, void 0, void 0, function* () { if (void 0 === this.m_PendingInfoResolve) return; const e = this.m_PendingInfoResolve, t = Array.from(this.m_setPendingAppInfo), n = Array.from(this.m_setPendingPackageInfo), i = Array.from(this.m_setPendingBundleInfo), o = Array.from(this.m_setPendingTagInfo), r = Array.from(this.m_setPendingCreatorInfo), a = Array.from(this.m_setPendingHubCategoryInfo), s = this.m_setPendingDataRequest; (this.m_PendingInfoPromise = void 0), (this.m_PendingInfoResolve = void 0), this.m_setPendingAppInfo.clear(), this.m_setPendingBundleInfo.clear(), this.m_setPendingPackageInfo.clear(), this.m_setPendingTagInfo.clear(), this.m_setPendingCreatorInfo.clear(), this.m_setPendingHubCategoryInfo.clear(), (this.m_setPendingDataRequest = {}), (this.m_PendingTimer = void 0), this.HintLoadStoreItems(void 0, t, n, i, o, r, a, s).then((t) => e(t)); }); } HintLoadStoreApps(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.HintLoadStoreItems(null, e, null, null, null, null, null, t); }); } HintLoadStorePackages(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.HintLoadStoreItems(null, null, e, null, null, null, null, t); }); } HintLoadStoreBundles(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { return this.HintLoadStoreItems(null, null, null, e, null, null, null, t); }); } GetPreviousSupersetLoadPromise(e, t, n) { if (this.BHasStoreItem(e, t, n) || this.BIsStoreItemMissing(e, t)) return this.k_AlreadyResolvedOK; let i = null; switch (t) { case 0: i = this.m_mapAppsInFlight.get(e); break; case 1: i = this.m_mapPackageInFlight.get(e); break; case 2: i = this.m_mapBundleInFlight.get(e); break; case 4: i = this.m_mapTagsInFlight.get(e); break; case 5: i = this.m_mapCreatorsInFlight.get(e); break; case 6: i = this.m_mapHubCategoriesInFlight.get(e); } return i && S.BDataRequestContainsOtherDataRequest(i.dataRequest, n) ? i.promise : null; } HintLoadStoreItems(e, t, n, o, r, a, s, c) { return (0, i.mG)(this, void 0, void 0, function* () { let i = null; const m = new Promise((e) => (i = e)); let d = [], h = []; (t || []).forEach((e) => { const t = this.GetPreviousSupersetLoadPromise(e, 0, c); if (t) h.push(t); else { d.push(l.oY.fromObject({ appid: e })); let t = w(this.GetStoreItemDataRequest(e, 0), c); const n = this.m_mapAppsInFlight.get(e); (t = w(null == n ? void 0 : n.dataRequest, t)), n && h.push(n.promise), this.m_mapAppsInFlight.set(e, { promise: n ? R(n.promise, m) : m, dataRequest: t }); } }), (n || []).forEach((e) => { const t = this.GetPreviousSupersetLoadPromise(e, 1, c); if (t) h.push(t); else { d.push(l.oY.fromObject({ packageid: e })); let t = w(this.GetStoreItemDataRequest(e, 1), c); const n = this.m_mapPackageInFlight.get(e); (t = w(null == n ? void 0 : n.dataRequest, t)), n && h.push(n.promise), this.m_mapPackageInFlight.set(e, { promise: n ? R(n.promise, m) : m, dataRequest: t }); } }), (o || []).forEach((e) => { const t = this.GetPreviousSupersetLoadPromise(e, 2, c); if (t) h.push(t); else { d.push(l.oY.fromObject({ bundleid: e })); let t = w(this.GetStoreItemDataRequest(e, 2), c); const n = this.m_mapBundleInFlight.get(e); (t = w(null == n ? void 0 : n.dataRequest, t)), n && h.push(n.promise), this.m_mapBundleInFlight.set(e, { promise: n ? R(n.promise, m) : m, dataRequest: t }); } }), (r || []).forEach((e) => { const t = this.GetPreviousSupersetLoadPromise(e, 4, c); if (t) h.push(t); else { d.push(l.oY.fromObject({ tagid: e })); let t = w(this.GetStoreItemDataRequest(e, 4), c); const n = this.m_mapTagsInFlight.get(e); (t = w(null == n ? void 0 : n.dataRequest, t)), n && h.push(n.promise), this.m_mapTagsInFlight.set(e, { promise: n ? R(n.promise, m) : m, dataRequest: t }); } }), (a || []).forEach((e) => { const t = this.GetPreviousSupersetLoadPromise(e, 5, c); if (t) h.push(t); else { d.push(l.oY.fromObject({ creatorid: e })); let t = w(this.GetStoreItemDataRequest(e, 5), c); const n = this.m_mapCreatorsInFlight.get(e); (t = w(null == n ? void 0 : n.dataRequest, t)), n && h.push(n.promise), this.m_mapCreatorsInFlight.set(e, { promise: n ? R(n.promise, m) : m, dataRequest: t }); } }), (s || []).forEach((e) => { const t = this.GetPreviousSupersetLoadPromise(e, 6, c); if (t) h.push(t); else { d.push(l.oY.fromObject({ hubcategoryid: e })); let t = w(this.GetStoreItemDataRequest(e, 6), c); const n = this.m_mapHubCategoriesInFlight.get(e); (t = w(null == n ? void 0 : n.dataRequest, t)), n && h.push(n.promise), this.m_mapHubCategoriesInFlight.set(e, { promise: n ? R(n.promise, m) : m, dataRequest: t }); } }); let u = 1; if ((d.length > 0 && (u = yield this.InternalHandleLoadStoreItems(e, d, c)), i(u), h.length > 0)) { const e = yield Promise.all(h); for (const t of e) 1 != t && 1 == u && (u = t); } return (t || []).forEach((e) => this.m_mapAppsInFlight.delete(e)), (n || []).forEach((e) => this.m_mapPackageInFlight.delete(e)), (o || []).forEach((e) => this.m_mapBundleInFlight.delete(e)), (r || []).forEach((e) => this.m_mapTagsInFlight.delete(e)), (a || []).forEach((e) => this.m_mapCreatorsInFlight.delete(e)), (s || []).forEach((e) => this.m_mapHubCategoriesInFlight.delete(e)), u; }); } MarkStoreItemIDUnavailable(e) { (e || []).forEach((e) => { e.appid() ? (this.m_setUnavailableApps.add(e.appid()), this.m_mapApps.delete(e.appid())) : e.packageid() ? (this.m_setUnavailablePackages.add(e.packageid()), this.m_mapPackages.delete(e.packageid())) : e.bundleid() ? (this.m_setUnavailableBundles.add(e.bundleid()), this.m_mapBundles.delete(e.bundleid())) : e.tagid() ? (this.m_setUnavailableTags.add(e.tagid()), this.m_mapTags.delete(e.tagid())) : e.creatorid() ? (this.m_setUnavailableCreators.add(e.creatorid()), this.m_mapCreators.delete(e.creatorid())) : e.hubcategoryid() && (this.m_setUnavailableHubCategories.add(e.hubcategoryid()), this.m_mapHubCategories.delete(e.hubcategoryid())); }); } SortStoreItems(e) { let t = e.slice(); return ( t.sort((e, t) => { var n, i, o, r, a, s, l, c, m, d, h, u; let p = null !== (n = e.appid()) && void 0 !== n ? n : 0, _ = null !== (i = t.appid()) && void 0 !== i ? i : 0; if (p != _) return p - _; let g = null !== (o = e.packageid()) && void 0 !== o ? o : 0, C = null !== (r = t.packageid()) && void 0 !== r ? r : 0; if (g != C) return g - C; let f = null !== (a = e.bundleid()) && void 0 !== a ? a : 0, v = null !== (s = t.bundleid()) && void 0 !== s ? s : 0; if (f != v) return f - v; let S = null !== (l = e.tagid()) && void 0 !== l ? l : 0, b = null !== (c = t.tagid()) && void 0 !== c ? c : 0; if (S != b) return S - b; let I = null !== (m = e.creatorid()) && void 0 !== m ? m : 0, y = null !== (d = t.creatorid()) && void 0 !== d ? d : 0; if (I != y) return I - y; let E = null !== (h = e.hubcategoryid()) && void 0 !== h ? h : 0, D = null !== (u = t.hubcategoryid()) && void 0 !== u ? u : 0; return E != D ? E - D : 0; }), t ); } InternalHandleLoadStoreItems(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { let i = 1; e || (this.GetSteamInterface() || this.SetSteamInterface(new a.J(d.De.WEBAPI_BASE_URL)), (e = this.GetSteamInterface())), (t = this.SortStoreItems(t)), n.include_included_items && (n = Object.assign(Object.assign({}, n), { included_item_data_request: Object.assign(Object.assign({}, n), { include_included_items: !1 }) })); const c = new Array(); try { const a = []; for (; t.length > 0; ) { const i = t.splice(0, this.k_nMaxBatchSize); if ((c.push(i), this.m_bUsePartnerAPI)) { const t = r.gA.Init(s.z4); t.Body().set_include_unpublished(!1); const o = t.Body().request(!0); o.set_context(p(this.m_bUsePartnerAPI)), o.set_data_request(l.Qn.fromObject(n)), o.set_ids(i), a.push(s.n7.GetItems(e.GetServiceTransport(), t)); } else { const t = r.gA.Init(l.eK); u(t, this.m_bUsePartnerAPI), _(t, n), t.Body().set_ids(i), a.push(l.VJ.GetItems(e.GetAnonymousServiceTransport(), t)); } } (yield Promise.all(a)).forEach((e, r) => { 1 == e.GetEResult() ? e .Body() .store_items() .forEach((i) => { const r = i.id(), a = i.item_type(); let s = this.m_bReturnUnavailableItems && 15 == i.success(), l = 1 == i.success() && !this.BIsStoreItemMissing(r, a); if (s || l) this.ReadItem(i, n); else { switch (("dev" == d.De.WEB_UNIVERSE && console.warn(`Failed to load ${r} type ${a} with error ${i.success()}`, i), a)) { case 0: this.m_setUnavailableApps.add(r), this.m_mapApps.delete(r); break; case 1: this.m_setUnavailablePackages.add(r), this.m_mapPackages.delete(r); break; case 2: this.m_setUnavailableBundles.add(r), this.m_mapBundles.delete(r); break; case 4: this.m_setUnavailableTags.add(r), this.m_mapTags.delete(r); break; case 5: this.m_setUnavailableCreators.add(r), this.m_mapCreators.delete(r); break; case 6: this.m_setUnavailableHubCategories.add(r), this.m_mapHubCategories.delete(r); break; default: console.error("CStoreItemCache.InternalHandleLoadStoreItems unexpected item_type in response " + a + " " + r); } if (i.unvailable_for_country_restriction()) switch (a) { case 0: this.m_setUnavailableDueToCountryRestrictionApps.add(r); break; case 1: this.m_setUnavailableDueToCountryRestrictionPackages.add(r); break; case 2: this.m_setUnavailableDueToCountryRestrictionBundles.add(r); break; case 4: case 5: case 6: console.error("CStoreItemCache::InternalHandleLoadStoreItems - tags, creators or categories don't have country restrictions. eResult: " + e.GetEResult() + " message: " + e.Hdr().error_message(), (0, o.ZN)(t)); } } }) : (console.warn("CStoreItemCache::InternalHandleLoadStoreItems failed with eResult: " + e.GetEResult() + " message: " + e.Hdr().error_message(), (0, o.ZN)(t)), (1 == e.Hdr().transport_error() || d.De.FROM_WEB) && this.MarkStoreItemIDUnavailable(c[r]), 1 == i && (i = e.GetEResult())); }); } catch (e) { const t = (0, m.l)(e); return console.error("CStoreItemCache::InternalHandleLoadStoreItems failed: " + t.strErrorMsg, t), c.forEach((e) => this.MarkStoreItemIDUnavailable(e)), 79; } return i; }); } GetMapForType(e) { let t; switch (e) { case 0: t = this.m_mapApps; break; case 2: t = this.m_mapBundles; break; case 1: t = this.m_mapPackages; break; case 4: t = this.m_mapTags; break; case 5: t = this.m_mapCreators; break; case 6: t = this.m_mapHubCategories; break; default: console.error("Invalid map type requested", e); } return t; } BHasStoreItem(e, t, n) { let i = this.GetMapForType(t); return Boolean(i && i.has(e) && (!n || i.get(e).BContainDataRequest(n))); } GetStoreItem(e, t) { if (-1 == t || 3 == t) return; const n = this.GetMapForType(t); return null == n ? void 0 : n.get(e); } GetStoreItemWithLegacyVisibilityCheck(e, t) { const n = this.GetStoreItem(e, t); return n && (this.m_bReturnUnavailableItems || n.BIsVisible()) ? n : void 0; } GetStoreItemDataRequest(e, t) { var n, i; return (null === (i = null === (n = this.GetMapForType(t)) || void 0 === n ? void 0 : n.get(e)) || void 0 === i ? void 0 : i.GetDataRequest()) || null; } BHasApp(e, t) { return this.BHasStoreItem(e, 0, t); } GetApp(e) { return this.GetStoreItem(e, 0); } BHasPackage(e, t) { return this.BHasStoreItem(e, 1, t); } GetPackage(e) { return this.GetStoreItem(e, 1); } BHasBundle(e, t) { return this.BHasStoreItem(e, 2, t); } GetBundle(e) { return this.GetStoreItem(e, 2); } BHasTag(e, t) { return this.BHasStoreItem(e, 4, t); } GetTag(e) { return this.GetStoreItem(e, 4); } BHasCreator(e, t) { return this.BHasStoreItem(e, 5, t); } GetCreator(e) { return this.GetStoreItem(e, 5); } BHasHubCategory(e, t) { return this.BHasStoreItem(e, 6, t); } GetHubCategory(e) { return this.GetStoreItem(e, 6); } BIsStoreItemMissing(e, t) { switch (t) { case 0: return this.BIsAppMissing(e); case 1: return this.BIsPackageMissing(e); case 2: return this.BIsBundleMissing(e); case 4: return this.BIsTagMissing(e); case 5: return this.BIsCreatorMissing(e); case 6: return this.BIsHubCategoryMissing(e); default: return console.error("BStoreItemMissing invalid type", t), !0; } } BIsAppMissing(e) { return this.m_setUnavailableApps.has(e); } BIsPackageMissing(e) { return this.m_setUnavailablePackages.has(e); } BIsBundleMissing(e) { return this.m_setUnavailableBundles.has(e); } BIsTagMissing(e) { return this.m_setUnavailableTags.has(e); } BIsCreatorMissing(e) { return this.m_setUnavailableCreators.has(e); } BIsHubCategoryMissing(e) { return this.m_setUnavailableHubCategories.has(e); } BIsStoreItemUnavailableDueToCountryRestriction(e, t) { switch (t) { case 0: return this.BIsAppUnavailableDueToCountryRestriction(e); case 1: return this.BIsPackageUnavailableDueToCountryRestriction(e); case 2: return this.BIsBundleUnavailableDueToCountryRestriction(e); case 4: case 5: case 6: return console.error("BIsStoreItemUnavailableDueToCountryRestriction - tags, creators or categories don't have country restrictions. type: ", t), !0; default: return console.error("BStoreItemMissing invalid type", t), !0; } } BIsAppUnavailableDueToCountryRestriction(e) { return this.m_setUnavailableDueToCountryRestrictionApps.has(e); } BIsPackageUnavailableDueToCountryRestriction(e) { return this.m_setUnavailableDueToCountryRestrictionPackages.has(e); } BIsBundleUnavailableDueToCountryRestriction(e) { return this.m_setUnavailableDueToCountryRestrictionBundles.has(e); } ReadResults(e, t) { let n = []; for (const i of e) n.push(this.ReadItem(i, t)); return n; } ReadItem(e, t) { const n = e.item_type(); let i = null; switch (n) { case 0: i = this.m_mapApps; break; case 1: i = this.m_mapPackages; break; case 2: i = this.m_mapBundles; break; case 4: i = this.m_mapTags; break; case 5: i = this.m_mapCreators; break; case 6: i = this.m_mapHubCategories; break; default: return console.error(`Invalid item type: ${n}`), null; } let o = i.get(e.id()); if ((o ? o.MergeData(e, t) : ((o = new S(e, t)), i.set(e.id(), o)), t.include_included_items && e.included_items(!1))) { for (const n of e.included_items().included_apps()) this.ReadItem(n, t.included_item_data_request); for (const n of e.included_items().included_packages()) this.ReadItem(n, t.included_item_data_request); } return o; } } (A.k_DataRequest_CommonOnly = {}), (A.k_DataRequest_BasicInfo = { include_basic_info: !0 }), (A.k_DataRequest_Assets = { include_assets: !0 }), (A.k_DataRequest_IncludeAll = { include_assets: !0, include_release: !0, include_platforms: !0, include_all_purchase_options: !0, include_screenshots: !0, include_trailers: !0, include_ratings: !0, include_tag_count: 20, include_reviews: !0, include_basic_info: !0, include_supported_languages: !0 }); const M = A; }, 55151: (e, t, n) => { "use strict"; var i; function o(e) { switch (e) { case 0: return "app"; case 2: return "bundle"; case 1: return "package"; case 3: return "mtx"; } return "invalid"; } function r(e) { switch (e) { case "sub": return 1; case "bundle": return 2; default: return 0; } } n.d(t, { TM: () => r, qE: () => o }), (function (e) { (e[(e.k_NotRejected = -1)] = "k_NotRejected"), (e[(e.k_RejectNoMainCap = 0)] = "k_RejectNoMainCap"), (e[(e.k_RejectWrongPlatform = 1)] = "k_RejectWrongPlatform"), (e[(e.k_RejectNoComingSoon = 2)] = "k_RejectNoComingSoon"), (e[(e.k_RejectNoVR = 3)] = "k_RejectNoVR"), (e[(e.k_RejectCreatorClan = 4)] = "k_RejectCreatorClan"), (e[(e.k_RejectIgnoredGame = 5)] = "k_RejectIgnoredGame"), (e[(e.k_RejectSupportedLanguage = 6)] = "k_RejectSupportedLanguage"), (e[(e.k_RejectNotLoaded = 7)] = "k_RejectNotLoaded"), (e[(e.k_RejectIgnoreGameTags = 8)] = "k_RejectIgnoreGameTags"), (e[(e.k_RejectIgnoreContentDescriptors = 9)] = "k_RejectIgnoreContentDescriptors"), (e[(e.k_RejectEarlyAccess = 10)] = "k_RejectEarlyAccess"), (e[(e.k_RejectSoftware = 11)] = "k_RejectSoftware"), (e[(e.k_RejectDLC = 12)] = "k_RejectDLC"), (e[(e.k_RejectInLibrary = 13)] = "k_RejectInLibrary"), (e[(e.k_RejectNotInLibrary = 14)] = "k_RejectNotInLibrary"), (e[(e.k_RejectVideo = 15)] = "k_RejectVideo"), (e[(e.k_RejectNoDiscount = 16)] = "k_RejectNoDiscount"), (e[(e.k_RejectAlreadyDisplayed = 17)] = "k_RejectAlreadyDisplayed"); })(i || (i = {})); }, 97970: (e, t, n) => { "use strict"; n.d(t, { Vm: () => m, jk: () => l, vs: () => c }); var i = n(14206), o = n.n(i), r = n(27378), a = (n(71129), n(2049)), s = n(44420); function l(e, t, n, i) { const l = (0, r.useRef)(), c = (0, r.useRef)(void 0), m = (0, a.NW)(); l.current = e; const [d, h] = (0, r.useState)(void 0), { include_assets: u, include_release: p, include_platforms: _, include_all_purchase_options: g, include_screenshots: C, include_trailers: f, include_ratings: v, include_tag_count: S, include_reviews: b, include_basic_info: I, include_supported_languages: y, include_full_description: E, include_included_items: D, include_assets_without_overrides: w, apply_user_filters: R } = n; if ( ((0, r.useEffect)(() => { const n = { include_assets: u, include_release: p, include_platforms: _, include_all_purchase_options: g, include_screenshots: C, include_trailers: f, include_ratings: v, include_tag_count: S, include_reviews: b, include_basic_info: I, include_supported_languages: y, include_full_description: E, include_included_items: D, include_assets_without_overrides: w, apply_user_filters: R }; let r = null; return ( !e || s.Z.Get().BHasStoreItem(e, t, n) || (void 0 !== d && i && i == c.current) || (i !== c.current && (h(void 0), (c.current = i)), (r = o().CancelToken.source()), s.Z.Get() .QueueStoreItemRequest(e, t, n) .then((t) => { (null == r ? void 0 : r.token.reason) || l.current !== e || h(1 == t), m(); })), () => (null == r ? void 0 : r.cancel("useStoreItemCache: unmounting")) ); }, [e, t, i, d, u, p, _, g, C, f, v, S, b, I, y, E, D, w, R, m]), !e) ) return [null, 2]; if (!1 === d) return [void 0, 2]; if (s.Z.Get().BIsStoreItemMissing(e, t)) return [void 0, 2]; if (!s.Z.Get().BHasStoreItem(e, t, n)) return [void 0, 1]; const A = s.Z.Get().GetStoreItemWithLegacyVisibilityCheck(e, t); return A ? [A, 3] : [null, 2]; } function c(e, t, n) { return l(e, 0, t, n); } function m(e, t, n) { const [i, o] = l(e, t, n), [a, s] = (0, r.useState)(null), [m, d] = c(a, n); return ( (0, r.useEffect)(() => { var e; if (1 == (null == i ? void 0 : i.GetStoreItemType()) && !(null === (e = i.GetAssets()) || void 0 === e ? void 0 : e.GetHeaderURL()) && 1 == (null == i ? void 0 : i.GetIncludedAppIDs().length)) { const e = i.GetIncludedAppIDs()[0]; s(e); } }, [i]), a && (null == m ? void 0 : m.BIsVisible()) ? [m, d] : [i, o] ); } }, 9612: (e, t, n) => { "use strict"; n.d(t, { l: () => Q, V: () => Y }); var i = n(85556), o = n(14206), r = n.n(o), a = n(24782), s = n(79588), l = n(78654), c = n(1736), m = n(88991), d = n(58594), h = n(10553), u = n(68146), p = n(38571), _ = n(84290), g = n(2049), C = n(23282), f = n(72086), v = n(77385), S = n(93635), b = n(40786), I = n(70682), y = n(57117), E = n(59702); class D { constructor(e, t) { var n, i, o, r, a, s, l; (this.m_socket = null), (this.Log = new v.sO("CWebSocketConnection", () => this.m_sName)), (this.m_bDisconnectRequested = !1), (this.m_bConnecting = !1), (this.m_sName = e), (this.m_fnOnMessageHandler = t.fnOnMessageHandler), (this.m_fnOnCloseHandler = t.fnOnCloseHandler), (this.m_fnOnReconnectStartHandler = null !== (n = t.fnOnReconnectStartHandler) && void 0 !== n ? n : () => {}), (this.m_fnOnReconnectFinishHandler = null !== (i = t.fnOnReconnectFinishHandler) && void 0 !== i ? i : () => {}), (this.m_nConnectAttemptsMax = null !== (o = t.nConnectAttemptsMax) && void 0 !== o ? o : 8), (this.m_nConnectAttemptTimeoutMs = null !== (r = t.nConnectAttemptTimeoutMs) && void 0 !== r ? r : 1e3), (this.m_bReconnectOnFailure = null !== (a = t.bReconnectOnFailure) && void 0 !== a && a), (this.m_nReconnectAttemptsMax = null !== (s = t.nReconnectAttemptsMax) && void 0 !== s ? s : 3e4), (this.m_nReconnectAttemptTimeoutMs = null !== (l = t.nReconnectAttemptTimeoutMs) && void 0 !== l ? l : 1e4); } get name() { return this.m_sName; } Connect(e) { return (0, i.mG)(this, void 0, void 0, function* () { return (this.m_sURL = e), this.ConnectWithRetry(this.m_sURL, this.m_nConnectAttemptsMax, this.m_nConnectAttemptTimeoutMs); }); } Reconnect() { return (0, i.mG)(this, void 0, void 0, function* () { return this.ConnectWithRetry(this.m_sURL, this.m_nReconnectAttemptsMax, this.m_nReconnectAttemptTimeoutMs); }); } GetInterAttemptBackoffMs(e) { return 1e3 * (0, E.Lh)(e, 1, 5); } ConnectWithRetry(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { this.m_bConnecting = !0; let i = 0; do { try { const t = yield this.ConnectToSocket(e, n); if (1 == t.result) return (this.m_bConnecting = !1), t; this.Log.Warning(`connect attempt failed: ${t.result} - ${t.message}`); } catch (e) { this.Log.Warning(`connect attempt failed: exception ${e.name} - ${e}`); } const o = this.GetInterAttemptBackoffMs(i); this.Log.Info(`connect retry: attempt:${i}/${t} backoff:${o}`), yield new Promise((e) => setTimeout(e, o)), (this.m_socket = null), (i += 1); } while (i < t); return this.Log.Warning(`websocket connect retry: limit exceeeded, bailing - ${this.name}`), (this.m_bConnecting = !1), this.BShouldReconnect() && this.StartReconnect(), { result: 2, message: "not ready, exceeded retry count" }; }); } Disconnect() { this.Log.Info("disconnect requested"), (this.m_bDisconnectRequested = !0), this.m_socket.close(); } PrepareForShutdown() { this.Log.Info("shutdown pending"), (this.m_bDisconnectRequested = !0); } BShouldReconnect() { return !this.m_bConnecting && !!this.m_bReconnectOnFailure && !this.m_bDisconnectRequested; } StartReconnect() { return (0, i.mG)(this, void 0, void 0, function* () { this.Log.Info("start reconnect"), (this.m_socket = null), this.m_fnOnReconnectStartHandler({ connection: this }); if (1 != (yield this.Reconnect()).result) return this.Log.Warning("failed to re-connect to websocket after close"), this.m_fnOnReconnectFinishHandler({ connection: this, eResult: 2 }), void this.m_fnOnCloseHandler({ connection: this, bError: !0, bIsExpectedToReconnect: !1 }); this.Log.Info("reconnect successful"), this.m_fnOnReconnectFinishHandler({ connection: this, eResult: 1 }); }); } ConnectToSocket(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (null != this.m_socket) return this.m_socket.readyState != WebSocket.OPEN ? (this.Log.Error(`websocket in an unexpected state: ${this.m_socket.readyState}`), { result: 2, message: "websocket in an unexpected state" }) : { result: 1, message: "ready" }; try { this.m_socket = new WebSocket(e); } catch (e) { return this.Log.Warning("failed to initialize websocket connection"), { result: 35, message: "Failed to initialize websocket connection" }; } (this.m_socket.binaryType = "arraybuffer"), (this.m_socket.onerror = this.OnSocketError), (this.m_socket.onmessage = this.OnSocketMessage), (this.m_socket.onopen = this.OnSocketOpen), (this.m_socket.onclose = this.OnSocketClose); return (yield this.WaitForSocketOpen(this.m_socket, t)) ? (this.Log.Info("connection ready"), { result: 1, message: "ready" }) : (this.Log.Warning("failed to reach open state"), { result: 2, message: "failed to reach open state" }); }); } WaitForSocketOpen(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (e.readyState != WebSocket.CONNECTING) return e.readyState == WebSocket.OPEN; let n = t / 100; for (; e.readyState == WebSocket.CONNECTING && n > 0; ) n--, yield new Promise((e) => setTimeout(e, 100)); return e.readyState == WebSocket.OPEN; }); } BCanSendMessages() { return null != this.m_socket && this.m_socket.readyState == WebSocket.OPEN; } OnSocketError(e) { this.Log.Warning("websocket error"); } OnSocketOpen(e) { this.Log.Info("websocket open"); } OnSocketClose(e) { if (this.m_bDisconnectRequested) return this.Log.Info("websocket closed"), void this.m_fnOnCloseHandler({ connection: this, bError: !1, bIsExpectedToReconnect: !1 }); if (this.m_bConnecting) return; this.Log.Warning("websocket unexpectedly closed"); const t = this.BShouldReconnect(); this.m_fnOnCloseHandler({ connection: this, bError: !0, bIsExpectedToReconnect: t }), t && this.StartReconnect(); } OnSocketMessage(e) { return (0, i.mG)(this, void 0, void 0, function* () { this.m_fnOnMessageHandler(e.data); }); } SendSerializedMessage(e) { try { return this.m_socket.send(e), 1; } catch (e) { return 2; } } } (0, i.gn)([g.ak], D.prototype, "OnSocketError", null), (0, i.gn)([g.ak], D.prototype, "OnSocketOpen", null), (0, i.gn)([g.ak], D.prototype, "OnSocketClose", null), (0, i.gn)([g.ak], D.prototype, "OnSocketMessage", null); const w = new v.sO("WebUITransport"); class R { constructor() { (this.m_iMsgSeq = 1), (this.m_mapPendingMethodRequests = new Map()), (this.m_messageHandlers = new b.N()), (this.m_mapServiceCallErrorCount = new Map()), (this.m_mapConnectionDetails = new Map()), (this.m_bInitialized = !1); } static InstallErrorReportingStore(e) { this.sm_ErrorReportingStore = e; } BIsValid() { return this.m_bInitialized; } ReportError(e) { w.Warning(e); const t = R.sm_ErrorReportingStore; t && t.ReportError(new Error(e), { bIncludeMessageInIdentifier: !0, cCallsitesToIgnore: 1 }); } Init() { return (0, i.mG)(this, void 0, void 0, function* () { if (!y.De.IN_CLIENT) return; const e = yield SteamClient.WebUITransport.GetTransportInfo(); this.CreateConnection(1, "steamUI", e.portSteamUI, e.authKeySteamUI), this.CreateConnection(2, "clientdll", e.portClientdll, e.authKeyClientdll), (0, f.SM)().SetDefaultTransport(this), (0, f.SM)().SetDefaultHandlerRegistry(this.m_messageHandlers), I.zw.RegisterForNotifyStartShutdown(this.OnStartShutdown); }); } get messageHandlers() { return this.m_messageHandlers; } SetStatusEventHandler(e) { this.m_fnOnStatusEventHandler = e; } SetReconnectErrorHandler(e) { this.m_fnOnReconnectErrorHandler = e; } CreateConnection(e, t, n, i) { const o = { bReconnectOnFailure: !0, fnOnMessageHandler: this.OnWebsocketMessage, fnOnCloseHandler: this.OnWebsocketClose, fnOnReconnectStartHandler: this.OnWebsocketReconnectStart, fnOnReconnectFinishHandler: this.OnWebsocketReconnectFinish, nConnectAttemptsMax: 10, nConnectAttemptTimeoutMs: 1e3, nReconnectAttemptsMax: 20, nReconnectAttemptTimeoutMs: 1e3 }, r = { connection: new D(t, o), sUrl: `ws://localhost:${n}/transportsocket/`, sAuthKey: i, eClientExecutionSite: e }; this.m_mapConnectionDetails.set(e, r); } SendMsg(e, t, n, i) { return new Promise((o, r) => { var a; const s = i.eClientExecutionSite; if (null == s || 0 == s) return w.Error(`SendMsg: Invalid client execution site: ${s}`), void r(`Transport SendMsg: invalid client execution site ${s}`); const l = this.m_mapConnectionDetails.get(s); if (null == l) return w.Error(`SendMsg: could not find connection for execution site: ${s}`), void r(`Transport SendMsg: could not find connection for execution site ${s}`); const c = l.connection; if (!c.BCanSendMessages()) { const t = null !== (a = this.m_mapServiceCallErrorCount.get(e)) && void 0 !== a ? a : 1; this.m_mapServiceCallErrorCount.set(e, t + 1); const n = `SendMsg: Attempt to send message but socket wasn't ready: ${c.name} - ${e}`; return 1 == t && this.ReportError(n), w.Warning(n + ` error count: ${t}`), void r("Transport SendMsg: socket not ready"); } const m = this.m_iMsgSeq++; t.SetEMsg(146), t.Hdr().set_target_job_name(e), t.Hdr().set_jobid_source("" + m); if (1 != c.SendSerializedMessage(t.Serialize())) return w.Error("SendMsg: Failed to send message"), void r("Transport SendMsg: failed to send message"); this.m_mapPendingMethodRequests.set(m, { m_iSeq: m, m_responseClass: n, m_fnCallback: o, m_fnError: r }); }); } SendNotification(e, t, n) { var i; const o = n.eClientExecutionSite; if (null == o || 0 == o) return w.Error(`SendNotification: Invalid client execution site: ${o}`), !1; const r = this.m_mapConnectionDetails.get(o); if (null == r) return w.Error(`SendNotification: could not find connection for execution site: ${o}`), !1; const a = r.connection; if (!a.BCanSendMessages()) { const t = null !== (i = this.m_mapServiceCallErrorCount.get(e)) && void 0 !== i ? i : 1; this.m_mapServiceCallErrorCount.set(e, t + 1); const n = `SendNotification: Attempt to send message but socket wasn't ready: ${a.name} - ${e}`; return 1 == t && this.ReportError(n), w.Warning(n + ` error count: ${t}`), !1; } t.SetEMsg(146), t.Hdr().set_target_job_name(e); return 1 == a.SendSerializedMessage(t.Serialize()); } ConnectToSite(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = e.connection, n = yield t.Connect(e.sUrl); if (1 != n.result) return n; return (yield this.SendAuthMessage(e)).BSuccess() ? { result: 1, message: "connected" } : { result: 2, message: "client auth failed" }; }); } MakeReady() { return (0, i.mG)(this, void 0, void 0, function* () { const e = []; for (const [t, n] of this.m_mapConnectionDetails) e.push(this.ConnectToSite(n)); const t = yield Promise.all(e); (this.m_bInitialized = !0), this.DispatchTransportStatusUpdate(); for (const e of t) if (1 != e.result) return e; return { result: 1, message: "ready" }; }); } GetConnectionDetails(e) { for (const [t, n] of this.m_mapConnectionDetails) if (n.connection === e) return n; return w.Error("GetConnectionDetails: failed to identify connection"), null; } DispatchTransportStatusUpdate() { if (!this.m_fnOnStatusEventHandler) return; let e = !0; for (const [t, n] of this.m_mapConnectionDetails) n.connection.BCanSendMessages() || (e = !1); this.m_fnOnStatusEventHandler({ bConnected: e }); } OnWebsocketReconnectStart(e) { this.DispatchTransportStatusUpdate(); } OnWebsocketReconnectFinish(e) { if ((this.DispatchTransportStatusUpdate(), 1 != e.eResult)) return w.Warning("OnWebsocketReconnect: Failed to reconnect to steam client"), void this.m_fnOnReconnectErrorHandler({}); this.FailAllPendingRequests(); const t = this.GetConnectionDetails(e.connection); this.SendAuthMessage(t); } OnWebsocketClose(e) { e.bIsExpectedToReconnect || this.FailAllPendingRequests(); } OnWebsocketMessage(e) { const t = new C.At(e), n = c.gA.InitHeaderFromPacket(t); n.Hdr().jobid_target() && n.Hdr().jobid_target() !== l.Z3 ? this.DispatchMethodResponse(n) : this.DispatchNotification(n); } DispatchMethodResponse(e) { const t = parseInt(e.Hdr().jobid_target()), n = this.m_mapPendingMethodRequests.get(t); if (null == n) return void (0, S.X)(!1, "Transport Error: no pending callback for request"); (0, S.X)(t == n.m_iSeq, "Transport Error: mistmatched request sequence"), this.m_mapPendingMethodRequests.delete(t); const i = c.gA.InitFromMsg(n.m_responseClass, e); n.m_fnCallback(i); } DispatchNotification(e) { this.m_messageHandlers.DispatchMsgToHandlers(e, (e) => { (0, S.X)(!1, "Transport Error: A notification should not generate a response"); }); } FailAllPendingRequests() { for (const [e, t] of this.m_mapPendingMethodRequests) { this.ReportError(`FailAllPendingRequests: forcing failure for request: ${t.m_responseClass.name}`); let e = c.gA.Init(t.m_responseClass); e.Hdr().set_eresult(2), t.m_fnCallback(e); } this.m_mapPendingMethodRequests.clear(); } SendAuthMessage(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = I.zw.AuthenticateHandler.name, n = { eClientExecutionSite: e.eClientExecutionSite }, i = c.gA.Init(I.np); i.Hdr().set_webui_auth_key(e.sAuthKey); return yield this.SendMsg(t, i, I.zw.AuthenticateHandler.response, n); }); } OnStartShutdown(e) { for (const [e, t] of this.m_mapConnectionDetails) t.connection.PrepareForShutdown(); return 1; } } (0, i.gn)([g.ak], R.prototype, "OnWebsocketReconnectStart", null), (0, i.gn)([g.ak], R.prototype, "OnWebsocketReconnectFinish", null), (0, i.gn)([g.ak], R.prototype, "OnWebsocketClose", null), (0, i.gn)([g.ak], R.prototype, "OnWebsocketMessage", null), (0, i.gn)([g.ak], R.prototype, "OnStartShutdown", null); const A = new R(), M = window.addEventListener || (n.g && n.g.addEventListener) || (() => {}); let k, T = [], L = (e, t) => T.push({ error: e, cCallsitesToIgnore: t }); const G = !0; { const e = console.assert; console.assert = (t, n, ...i) => { t || L(new Error(x(n, ...i)), 2), e.apply(console, [t, n, ...i]); }; const t = console.error; (console.error = (e, ...n) => { L(new Error(x(e, ...n)), 1), t.apply(console, [e, ...n]); }), (console.clogerror = (e, n, ...i) => { L(new Error(x(n, ...i)), e + 1), t.apply(console, [n, ...i]); }), M("error", (e) => { L(e.error, 0); }), (k = window.setTimeout(() => { (T = []), (L = () => {}); }, 3e4)); } const O = { cCallsitesToIgnore: 0, bIncludeMessageInIdentifier: !1 }, F = ["/localhost:1337/"]; class B { constructor(e = !0) { (this.m_transport = null), (this.m_rgErrorQueue = []), (this.m_sendTimer = null), (this.m_bEnabled = !0), (this.m_bInitialized = !1), e ? (T.forEach(({ error: e, cCallsitesToIgnore: t }) => this.ReportError(e, { cCallsitesToIgnore: t })), (L = (e, t) => this.ReportError(e, { cCallsitesToIgnore: t }))) : (L = () => {}), (T = []), clearTimeout(k), window.setTimeout(() => { this.m_bInitialized || ((this.m_bEnabled = !1), (this.m_rgErrorQueue = [])); }, 3e4); } Init(e, t, n) { (this.m_bInitialized = !0), (this.m_strProduct = e), (this.m_strVersion = t), (this.m_transport = n), this.m_bEnabled || (console.error("Error reporting was initialized after being disabled, possibly dropping errors."), (this.m_bEnabled = !0)), this.m_rgErrorQueue.length && (this.SendErrorReports(this.m_rgErrorQueue), (this.m_rgErrorQueue = [])); } ReportError(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { if (!e) return console.warn("Failed to report error: ReportError() was called without an error to report."), null; try { const n = Object.assign(Object.assign({}, O), t); if (!this.m_bEnabled) return null; 0; const o = yield (function (e, t) { try { return e.stack && e.stack.match(N) ? (function (e, t) { return (0, i.mG)(this, void 0, void 0, function* () { const { cCallsitesToIgnore: n, bIncludeMessageInIdentifier: i } = t, o = e.stack.split("\n"); let r = W(o.filter((e) => !!e.match(N))[n]); i && (r = `${r} ${e.message}`); const a = o .map((e) => { const t = e.match(/(.*)\((.*):(\d+):(\d+)\)/); if (!t) return e; if (5 === t.length) { const [e, n, i, o, r] = t, a = parseInt(o), s = parseInt(r); if (!isNaN(a) && !isNaN(s)) return [n, i, a, s]; } return e; }) .filter((e) => !!e); return { identifier: r, identifierHash: yield z(r), message: a }; }); })(e, t) : e.stack && e.stack.match(P) ? (function (e, t) { return (0, i.mG)(this, void 0, void 0, function* () { const { cCallsitesToIgnore: n, bIncludeMessageInIdentifier: i } = t, o = e.stack.split("\n"); let r = W(o.filter((e) => !!e.match(P))[n]); i && (r = `${r} ${e.message}`); const a = o .map((e) => { const t = e.match(/(.*@)?(.*):(\d+):(\d+)/); if (!t) return e; if (5 === t.length) { const [e, n, i, o, r] = t, a = parseInt(o), s = parseInt(r); if (!isNaN(a) && !isNaN(s)) return [n, i, a, s]; } return e; }) .filter((e) => !!e); return { identifier: r, identifierHash: yield z(r), message: [e.message, ...a] }; }); })(e, t) : e.stack && e.stack.match(U) ? (function (e, t) { return (0, i.mG)(this, void 0, void 0, function* () { const { bIncludeMessageInIdentifier: n, cCallsitesToIgnore: i } = t, o = e.stack.split("\n"), r = o[i], a = r.split("/"); let s = a[a.length - 1]; r.indexOf("@") > -1 && (s = r.split("@")[0] + "@" + s), n && (s = `${s} ${e.message}`); const l = o .map((e) => { const t = e.match(/(.*@)?(.*):(\d+):(\d+)/); if (!t) return e; if (5 === t.length) { const [e, n, i, o, r] = t, a = parseInt(o), s = parseInt(r); if (!isNaN(a) && !isNaN(s)) return [n, i, a, s]; } return e; }) .filter((e) => !!e); return { identifier: s, identifierHash: yield z(s), message: [e.message, ...l] }; }); })(e, t) : (H || (console.warn("Error reporter does not know how to parse generated stack:"), console.warn(e.stack), (H = !0)), null); } catch (e) { return console.warn(`Failed to normalize error stack: ${e}`), null; } })(e, n); return o ? (this.SendErrorReport(o), o) : null; } catch (e) { return console.log(`Failed to report error: ${e}`), null; } }); } BIsBlacklisted(e) { for (let t of e.message) { let n = JSON.stringify(t); for (let t of F) { const i = new RegExp(t); if (n.match(i)) return console.warn("Report", e, "matched regex", t), !0; } } return !1; } SendErrorReport(e) { this.BIsBlacklisted(e) || (this.m_transport ? this.QueueSend(e) : this.m_rgErrorQueue.push(e)); } QueueSend(e) { this.m_rgErrorQueue.push(e), this.m_sendTimer || (this.m_sendTimer = window.setTimeout(() => { this.SendErrorReports(this.m_rgErrorQueue), (this.m_rgErrorQueue = []), (this.m_sendTimer = null); }, 1e4)); } SendErrorReports(e) { if (!e || !e.length) return; const t = c.gA.Init(u.$4), n = e.reduce((e, t) => (e[t.identifier] ? e[t.identifier].count++ : (e[t.identifier] = { report: t, count: 1 }), e), {}), i = Object.keys(n).map((e) => { const { report: t, count: i } = n[e], o = new u.kb(); return o.set_count(i), o.set_identifier(t.identifier + " " + t.identifierHash), o.set_message(JSON.stringify(t.message)), o; }); t.Body().set_product(this.m_strProduct), t.Body().set_version(this.m_strVersion), t.Body().set_errors(i), u.TF.ReportClientError(this.m_transport, t); } get version() { return this.m_strVersion; } get product() { return this.m_strProduct; } get reporting_enabled() { return G; } } function x(e, ...t) { if ("string" == typeof e && 0 === t.length) return e; return [e, ...t] .map((e) => { try { return String(e); } catch (e) { return "[Stringify Error]"; } }) .join(", "); } const N = /^\s*at .*(\S+:\d+|\(native\))/m, P = /(^|@)\S+:\d+/, U = /.*\/bundle-[a-zA-Z0-9]+:\d+:\d+/; let V, H = !1; function W(e) { return (function (e) { const t = "https://", n = e.indexOf(t); if (-1 === n) return e; const i = e.indexOf("/", n + t.length); return -1 === i ? e : e.slice(0, n) + e.slice(i); })( (function (e) { const t = e.lastIndexOf("?"); if (-1 === t) return e; const n = e.indexOf(":", t); return -1 === n ? e : e.slice(0, t) + e.slice(n); })(e), ); } const X = () => (V || j(new B()), V), j = (e) => { (V = e), p.SV.InstallErrorReportingStore(V), c.lq.InstallErrorReportingStore(V), _.LJ.InstallErrorReportingStore(V), R.InstallErrorReportingStore(V); }; function z(e) { return (0, i.mG)(this, void 0, void 0, function* () { try { const n = yield window.crypto.subtle.digest( "SHA-256", (function (e) { const t = new ArrayBuffer(2 * e.length), n = new Uint16Array(t); for (let t = 0, i = e.length; t < i; t++) n[t] = e.charCodeAt(t); return t; })(e), ); return ((t = n), Array.prototype.map.call(new Uint8Array(t), (e) => ("00" + e.toString(16)).slice(-2)).join("")).slice(0, 16); } catch (e) { return ""; } var t; }); } var K = n(31171), q = n(8568); const Z = "(1)"; class Q { constructor(e) { (this.m_TextFilterPreferences = void 0), (this.m_mapPlayerCache = new Map()), (this.m_strBannedWords = ""), (this.m_strProfanityWords = ""), (this.m_strCleanWords = ""), (this.m_strBannedPattern = ""), (this.m_strCleanPattern = ""), (this.m_regexBannedWords = null), (this.m_regexCleanWords = null), (this.m_bShownFilterTip = !1), (this.m_nLoadLanguagesRetryTimeout = void 0), (0, s.rC)(this); { let e = new d.n8(); this.m_TextFilterPreferences = { eTextFilterSetting: e.text_filter_setting(), bIgnoreFriends: e.text_filter_ignore_friends() }; } (this.m_TextFilterWords = new d.No()), (this.m_DataAccess = e); } Init(e = 0, t = null, n = null) { return (0, i.mG)(this, void 0, void 0, function* () { (this.m_WebUIServiceTransport = A), (this.m_unAccountID = e), (this.m_Transport = t), (this.m_Storage = n), (this.m_strBannedWords = ""), (this.m_strProfanityWords = ""), (this.m_strCleanWords = ""), this.InitSteamEngineLanguages(), yield this.LoadFilter(), yield this.LoadTextFilterPreferences(), yield this.LoadTextFilterWords(), yield this.RequestUpdatedSettings(), yield this.LoadLanguages(), this.OnFilterDataChanged(); }); } InitSteamEngineLanguages() { this.m_WebUIServiceTransport.BIsValid() && (this.m_WebUIServiceTransport.messageHandlers.RegisterServiceNotificationHandler(K.gi.NotifyTextFilterDictionaryChangedHandler, this.OnTextFilterDictionaryChanged), this.InitSteamEngineLanguage(h.De.LANGUAGE), "english" !== h.De.LANGUAGE && this.InitSteamEngineLanguage("english")); } OnTextFilterDictionaryChanged(e) { return ( this.LoadLanguages().then(() => { this.OnFilterDataChanged(); }), 1 ); } InitSteamEngineLanguage(e) { const t = c.gA.Init(K.iR); t.Body().set_language(e), t.Body().set_type("profanity"), K.gi.SendMsgUpdateTextFilterDictionary(t, this.m_WebUIServiceTransport), t.Body().set_type("banned"), K.gi.SendMsgUpdateTextFilterDictionary(t, this.m_WebUIServiceTransport); } GetSteamEngineTextFilterDictionary(e, t) { const n = c.gA.Init(K.du); return n.Body().set_language(e), n.Body().set_type(t), K.gi.SendMsgGetTextFilterDictionary(n, this.m_WebUIServiceTransport); } LoadTextFilterPreferences() { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_Storage) { let e = yield this.m_Storage.GetObject("CTextFilterStore_TextFilterPreferences"); e && (this.m_TextFilterPreferences = e); } }); } SaveTextFilterPreferences() { this.m_Storage && this.m_Storage.StoreObject("CTextFilterStore_TextFilterPreferences", this.m_TextFilterPreferences); } ObfuscateString(e) { try { const t = new TextEncoder().encode(Z + e); return a.JQ(t); } catch (e) { return ""; } } DeobfuscateString(e) { try { const t = a.b$(e); let n = new TextDecoder().decode(t); return n.startsWith(Z) ? ((n = n.slice(3)), n) : (console.log("DeobfuscateString given invalid base64 data, ignoring: " + e), ""); } catch (e) { return ""; } } LoadObfuscatedString(e) { return (0, i.mG)(this, void 0, void 0, function* () { if (this.m_Storage) { let t = yield this.m_Storage.GetString(e); if (t) return this.DeobfuscateString(t); } return null; }); } SaveObfuscatedString(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { this.m_Storage && this.m_Storage.StoreString(e, this.ObfuscateString(t)); }); } LoadTextFilterWords() { return (0, i.mG)(this, void 0, void 0, function* () { let e = yield this.LoadObfuscatedString("CTextFilterStore_TextFilterWords"); if (e) try { this.m_TextFilterWords = d.No.fromObject(JSON.parse(e)); } catch (t) { console.warn("Error parsing cached text filter word list", e), (this.m_TextFilterWords = new d.No()); } }); } SaveTextFilterWords() { this.SaveObfuscatedString("CTextFilterStore_TextFilterWords", JSON.stringify(this.m_TextFilterWords.toObject())); } LoadFilter() { return (0, i.mG)(this, void 0, void 0, function* () { let e = yield this.LoadObfuscatedString("CTextFilterStore_strBannedPattern"), t = yield this.LoadObfuscatedString("CTextFilterStore_strCleanPattern"); null != e && null != t && this.BRebuildFilter(e, t); }); } SaveFilter() { this.SaveObfuscatedString("CTextFilterStore_strBannedPattern", this.m_strBannedPattern), this.SaveObfuscatedString("CTextFilterStore_strCleanPattern", this.m_strCleanPattern); } RequestUpdatedSettings() { return (0, i.mG)(this, void 0, void 0, function* () { let e = new d.n8(); if (0 !== this.m_unAccountID) try { if (this.m_Transport) { let t = c.gA.Init(d.AP); e = (yield d.lk.GetCommunityPreferences(this.m_Transport, t)).Body().preferences(); } else { let t = { sessionid: h.De.SESSIONID, origin: (0, h.Kc)() }; const n = yield r().get(h.De.COMMUNITY_BASE_URL + "textfilter/ajaxgetcommunitypreferences", { params: t, withCredentials: !0 }); e = d.n8.fromObject(n.data.preferences); } } catch (e) {} if ((this.UpdateCommunityPreferences(e), e.text_filter_words_revision() !== this.m_TextFilterWords.text_filter_words_revision())) { let t = new d.No(); if (0 !== e.text_filter_words_revision()) try { if (this.m_Transport) { let e = c.gA.Init(d.Oz); t = (yield d.lk.GetTextFilterWords(this.m_Transport, e)).Body().words(); } else { let e = { sessionid: h.De.SESSIONID, origin: (0, h.Kc)() }; const n = yield r().get(h.De.COMMUNITY_BASE_URL + "textfilter/ajaxgettextfiltercustomwords", { params: e, withCredentials: !0 }); t = d.No.fromObject(n.data.words); } } catch (e) {} this.UpdateTextFilterWords(t); } }); } UpdateCommunityPreferences(e) { let t = !1; e.text_filter_setting() !== this.m_TextFilterPreferences.eTextFilterSetting && ((this.m_TextFilterPreferences.eTextFilterSetting = e.text_filter_setting()), (t = !0)), e.text_filter_ignore_friends() !== this.m_TextFilterPreferences.bIgnoreFriends && ((this.m_TextFilterPreferences.bIgnoreFriends = e.text_filter_ignore_friends()), (t = !0)), t && this.SaveTextFilterPreferences(); } get TextFilterPreferences() { return this.m_TextFilterPreferences; } UpdateTextFilterWords(e) { (this.m_TextFilterWords = e), this.SaveTextFilterWords(); } LoadLanguages(e = 15) { return (0, i.mG)(this, void 0, void 0, function* () { (this.m_strBannedWords = ""), (this.m_strProfanityWords = ""), (this.m_strCleanWords = ""); try { yield this.LoadLanguage(h.De.LANGUAGE), "english" !== h.De.LANGUAGE && (yield this.LoadLanguage("english")); } catch (t) { this.m_nLoadLanguagesRetryTimeout && ((0, S.X)(!this.m_nLoadLanguagesRetryTimeout, "Got two concurrent calls to TextFilteringStore.LoadLanguages"), window.clearTimeout(this.m_nLoadLanguagesRetryTimeout), (this.m_nLoadLanguagesRetryTimeout = void 0)), (e = Math.min(2 * e, 3600)), console.warn("LoadLanguages caught", t, "retry in", e, "seconds"), (this.m_nLoadLanguagesRetryTimeout = window.setTimeout( () => (0, i.mG)(this, void 0, void 0, function* () { (this.m_nLoadLanguagesRetryTimeout = void 0), yield this.LoadLanguages(e), this.OnFilterDataChanged(); }), 1e3 * e, )); } }); } LoadLanguage(e) { return (0, i.mG)(this, void 0, void 0, function* () { let t = "", n = !1; if (this.m_WebUIServiceTransport.BIsValid()) try { { const t = yield this.GetSteamEngineTextFilterDictionary(e, "banned"); this.m_strBannedWords += t.Body().dictionary(); } { const t = yield this.GetSteamEngineTextFilterDictionary(e, "profanity"); this.m_strProfanityWords += t.Body().dictionary(); } n = !0; } catch (e) { console.warn("LoadLanguage caught while loading from cache:", e); } if (!n) { t = `${h.De.COMMUNITY_CDN_URL}textfilter/gettextfilterdictionary?type=banned&language=${e}&v=1&origin=${(0, h.Kc)()}`; { const e = yield r().get(t); this.m_strBannedWords += e.data; } t = `${h.De.COMMUNITY_CDN_URL}textfilter/gettextfilterdictionary?type=profanity&language=${e}&v=1&origin=${(0, h.Kc)()}`; { const e = yield r().get(t); this.m_strProfanityWords += e.data; } } t = `${h.De.COMMUNITY_CDN_URL}textfilter/gettextfilterdictionary?type=clean_public&language=${e}&v=1&origin=${(0, h.Kc)()}`; { const e = yield r().get(t); this.m_strCleanWords += e.data; } }); } CreatePattern(e) { let t = e.filter(function (e) { return (function (e) { if ("" === e) return !1; try { return new RegExp("\\b(" + e + ")\\b", "ugi"), !0; } catch (t) { return console.log(`'${e}' is an invalid expression, removing from text filter`), !1; } })(e); }); return t.length > 0 ? "\\b(" + t.join("|") + ")\\b" : ""; } OnFilterDataChanged() { let e = new RegExp(/\s*[\r\n]+\s*/g), t = [], n = []; switch (this.m_TextFilterPreferences.eTextFilterSetting) { case 0: case 3: break; case 2: t = t.concat(this.m_strBannedWords.split(e)); break; default: t = t.concat(this.m_strProfanityWords.split(e), this.m_strBannedWords.split(e)); } (t = t.concat(this.m_TextFilterWords.text_filter_custom_banned_words())), (n = this.m_strCleanWords.split(e)), (n = n.concat(this.m_TextFilterWords.text_filter_custom_clean_words())); let i = this.CreatePattern(t), o = this.CreatePattern(n); "" != o && (o = "^(" + o + ")$"), this.BRebuildFilter(i, o) && this.SaveFilter(); } BRebuildFilter(e, t) { if (e === this.m_strBannedPattern && t === this.m_strCleanPattern) return !1; if (((this.m_regexBannedWords = null), (this.m_strBannedPattern = e), "" !== e)) try { this.m_regexBannedWords = new RegExp(e, "ugi"); } catch (e) { console.warn("Couldn't compile textfilter bannedwords regex"), X().ReportError(new Error(`Couldn't compile textfilter bannedwords regex: ${e}`)), (this.m_strBannedPattern = ""); } if (((this.m_regexCleanWords = null), (this.m_strCleanPattern = t), "" !== t)) try { this.m_regexCleanWords = new RegExp(t, "ugi"); } catch (e) { console.warn("Couldn't compile textfilter cleanwords regex"), X().ReportError(new Error(`Couldn't compile textfilter cleanwords regex: ${e}`)), (this.m_strCleanPattern = ""); } return !0; } CreateProfanityReplacement(e) { return "♥".repeat(e); } BHasFilter() { return null != this.m_regexBannedWords; } BShownFilterTip() { return this.m_bShownFilterTip; } SetFilterTipShown(e) { this.m_bShownFilterTip = e; } FilterText(e, t) { if (!this.m_regexBannedWords) return t; let n = 0; if ("string" == typeof e && "" !== e) { n = new m.K(e).GetAccountID(); } else "number" == typeof e && (n = e); return !t || n == this.m_unAccountID || (this.m_TextFilterPreferences.bIgnoreFriends && this.m_DataAccess.BIsFriend(n)) ? t : t.replace(this.m_regexBannedWords, (e) => (this.m_regexCleanWords && 0 == e.search(this.m_regexCleanWords) ? e : this.CreateProfanityReplacement(e.length))); } } let $; function Y() { if (!$) { const e = new Set(); let t = { sessionid: h.De.SESSIONID, origin: (0, h.Kc)() }; r() .get(h.De.COMMUNITY_BASE_URL + "textfilter/ajaxgetfriendslist", { params: t, withCredentials: !0 }) .then((t) => { for (const n of t.data.friendslist.friends) (0, l.my)(n.efriendrelationship) && e.add(new m.K(n.ulfriendid).GetAccountID()); }), ($ = (t) => e.has(t)); } return $; } (0, i.gn)([s.LO], Q.prototype, "m_TextFilterPreferences", void 0), (0, i.gn)([s.LO], Q.prototype, "m_mapPlayerCache", void 0), (0, i.gn)([s.LO], Q.prototype, "m_regexBannedWords", void 0), (0, i.gn)([s.LO], Q.prototype, "m_regexCleanWords", void 0), (0, i.gn)([q.a], Q.prototype, "OnTextFilterDictionaryChanged", null), (0, i.gn)([s.aD], Q.prototype, "UpdateCommunityPreferences", null), (0, i.gn)([s.aD], Q.prototype, "BRebuildFilter", null); }, 65640: (e, t, n) => { "use strict"; n.d(t, { Ze: () => u }); var i, o, r = n(85556), a = n(27378), s = n(79588); !(function (e) { (e[(e.k_EVRError_None = 0)] = "k_EVRError_None"), (e[(e.k_EVRError_VRSkipParam = 1)] = "k_EVRError_VRSkipParam"), (e[(e.k_EVRError_ComponentNotInstalled = 2)] = "k_EVRError_ComponentNotInstalled"), (e[(e.k_EVRError_ComponentBusy = 3)] = "k_EVRError_ComponentBusy"), (e[(e.k_EVRError_CrashProtection = 4)] = "k_EVRError_CrashProtection"), (e[(e.k_EVRError_HmdError = 5)] = "k_EVRError_HmdError"), (e[(e.k_EVRError_PathChanged = 6)] = "k_EVRError_PathChanged"); })(i || (i = {})), (function (e) { (e[(e.VRInitError_None = 0)] = "VRInitError_None"), (e[(e.VRInitError_Unknown = 1)] = "VRInitError_Unknown"), (e[(e.VRInitError_Init_InstallationNotFound = 100)] = "VRInitError_Init_InstallationNotFound"), (e[(e.VRInitError_Init_InstallationCorrupt = 101)] = "VRInitError_Init_InstallationCorrupt"), (e[(e.VRInitError_Init_VRClientDLLNotFound = 102)] = "VRInitError_Init_VRClientDLLNotFound"), (e[(e.VRInitError_Init_FileNotFound = 103)] = "VRInitError_Init_FileNotFound"), (e[(e.VRInitError_Init_FactoryNotFound = 104)] = "VRInitError_Init_FactoryNotFound"), (e[(e.VRInitError_Init_InterfaceNotFound = 105)] = "VRInitError_Init_InterfaceNotFound"), (e[(e.VRInitError_Init_InvalidInterface = 106)] = "VRInitError_Init_InvalidInterface"), (e[(e.VRInitError_Init_UserConfigDirectoryInvalid = 107)] = "VRInitError_Init_UserConfigDirectoryInvalid"), (e[(e.VRInitError_Init_HmdNotFound = 108)] = "VRInitError_Init_HmdNotFound"), (e[(e.VRInitError_Init_NotInitialized = 109)] = "VRInitError_Init_NotInitialized"), (e[(e.VRInitError_Init_PathRegistryNotFound = 110)] = "VRInitError_Init_PathRegistryNotFound"), (e[(e.VRInitError_Init_NoConfigPath = 111)] = "VRInitError_Init_NoConfigPath"), (e[(e.VRInitError_Init_NoLogPath = 112)] = "VRInitError_Init_NoLogPath"), (e[(e.VRInitError_Init_PathRegistryNotWritable = 113)] = "VRInitError_Init_PathRegistryNotWritable"), (e[(e.VRInitError_Init_AppInfoInitFailed = 114)] = "VRInitError_Init_AppInfoInitFailed"), (e[(e.VRInitError_Init_Retry = 115)] = "VRInitError_Init_Retry"), (e[(e.VRInitError_Init_InitCanceledByUser = 116)] = "VRInitError_Init_InitCanceledByUser"), (e[(e.VRInitError_Init_AnotherAppLaunching = 117)] = "VRInitError_Init_AnotherAppLaunching"), (e[(e.VRInitError_Init_SettingsInitFailed = 118)] = "VRInitError_Init_SettingsInitFailed"), (e[(e.VRInitError_Init_ShuttingDown = 119)] = "VRInitError_Init_ShuttingDown"), (e[(e.VRInitError_Init_TooManyObjects = 120)] = "VRInitError_Init_TooManyObjects"), (e[(e.VRInitError_Init_NoServerForBackgroundApp = 121)] = "VRInitError_Init_NoServerForBackgroundApp"), (e[(e.VRInitError_Init_NotSupportedWithCompositor = 122)] = "VRInitError_Init_NotSupportedWithCompositor"), (e[(e.VRInitError_Init_NotAvailableToUtilityApps = 123)] = "VRInitError_Init_NotAvailableToUtilityApps"), (e[(e.VRInitError_Init_Internal = 124)] = "VRInitError_Init_Internal"), (e[(e.VRInitError_Init_HmdDriverIdIsNone = 125)] = "VRInitError_Init_HmdDriverIdIsNone"), (e[(e.VRInitError_Init_HmdNotFoundPresenceFailed = 126)] = "VRInitError_Init_HmdNotFoundPresenceFailed"), (e[(e.VRInitError_Init_VRMonitorNotFound = 127)] = "VRInitError_Init_VRMonitorNotFound"), (e[(e.VRInitError_Init_VRMonitorStartupFailed = 128)] = "VRInitError_Init_VRMonitorStartupFailed"), (e[(e.VRInitError_Init_LowPowerWatchdogNotSupported = 129)] = "VRInitError_Init_LowPowerWatchdogNotSupported"), (e[(e.VRInitError_Init_InvalidApplicationType = 130)] = "VRInitError_Init_InvalidApplicationType"), (e[(e.VRInitError_Init_NotAvailableToWatchdogApps = 131)] = "VRInitError_Init_NotAvailableToWatchdogApps"), (e[(e.VRInitError_Init_WatchdogDisabledInSettings = 132)] = "VRInitError_Init_WatchdogDisabledInSettings"), (e[(e.VRInitError_Init_VRDashboardNotFound = 133)] = "VRInitError_Init_VRDashboardNotFound"), (e[(e.VRInitError_Init_VRDashboardStartupFailed = 134)] = "VRInitError_Init_VRDashboardStartupFailed"), (e[(e.VRInitError_Init_VRHomeNotFound = 135)] = "VRInitError_Init_VRHomeNotFound"), (e[(e.VRInitError_Init_VRHomeStartupFailed = 136)] = "VRInitError_Init_VRHomeStartupFailed"), (e[(e.VRInitError_Init_RebootingBusy = 137)] = "VRInitError_Init_RebootingBusy"), (e[(e.VRInitError_Init_FirmwareUpdateBusy = 138)] = "VRInitError_Init_FirmwareUpdateBusy"), (e[(e.VRInitError_Init_FirmwareRecoveryBusy = 139)] = "VRInitError_Init_FirmwareRecoveryBusy"), (e[(e.VRInitError_Init_USBServiceBusy = 140)] = "VRInitError_Init_USBServiceBusy"), (e[(e.VRInitError_Init_VRWebHelperStartupFailed = 141)] = "VRInitError_Init_VRWebHelperStartupFailed"), (e[(e.VRInitError_Init_TrackerManagerInitFailed = 142)] = "VRInitError_Init_TrackerManagerInitFailed"), (e[(e.VRInitError_Init_AlreadyRunning = 143)] = "VRInitError_Init_AlreadyRunning"), (e[(e.VRInitError_Init_FailedForVrMonitor = 144)] = "VRInitError_Init_FailedForVrMonitor"), (e[(e.VRInitError_Init_PropertyManagerInitFailed = 145)] = "VRInitError_Init_PropertyManagerInitFailed"), (e[(e.VRInitError_Init_WebServerFailed = 146)] = "VRInitError_Init_WebServerFailed"), (e[(e.VRInitError_Init_IllegalTypeTransition = 147)] = "VRInitError_Init_IllegalTypeTransition"), (e[(e.VRInitError_Init_MismatchedRuntimes = 148)] = "VRInitError_Init_MismatchedRuntimes"), (e[(e.VRInitError_Init_InvalidProcessId = 149)] = "VRInitError_Init_InvalidProcessId"), (e[(e.VRInitError_Init_VRServiceStartupFailed = 150)] = "VRInitError_Init_VRServiceStartupFailed"), (e[(e.VRInitError_Init_PrismNeedsNewDrivers = 151)] = "VRInitError_Init_PrismNeedsNewDrivers"), (e[(e.VRInitError_Init_PrismStartupTimedOut = 152)] = "VRInitError_Init_PrismStartupTimedOut"), (e[(e.VRInitError_Init_CouldNotStartPrism = 153)] = "VRInitError_Init_CouldNotStartPrism"), (e[(e.VRInitError_Init_PrismClientInitFailed = 154)] = "VRInitError_Init_PrismClientInitFailed"), (e[(e.VRInitError_Init_PrismClientStartFailed = 155)] = "VRInitError_Init_PrismClientStartFailed"), (e[(e.VRInitError_Init_PrismExitedUnexpectedly = 156)] = "VRInitError_Init_PrismExitedUnexpectedly"), (e[(e.VRInitError_Init_BadLuid = 157)] = "VRInitError_Init_BadLuid"), (e[(e.VRInitError_Init_NoServerForAppContainer = 158)] = "VRInitError_Init_NoServerForAppContainer"), (e[(e.VRInitError_Init_DuplicateBootstrapper = 159)] = "VRInitError_Init_DuplicateBootstrapper"), (e[(e.VRInitError_Init_VRDashboardServicePending = 160)] = "VRInitError_Init_VRDashboardServicePending"), (e[(e.VRInitError_Init_VRDashboardServiceTimeout = 161)] = "VRInitError_Init_VRDashboardServiceTimeout"), (e[(e.VRInitError_Init_VRDashboardServiceStopped = 162)] = "VRInitError_Init_VRDashboardServiceStopped"), (e[(e.VRInitError_Init_VRDashboardAlreadyStarted = 163)] = "VRInitError_Init_VRDashboardAlreadyStarted"), (e[(e.VRInitError_Init_VRDashboardCopyFailed = 164)] = "VRInitError_Init_VRDashboardCopyFailed"), (e[(e.VRInitError_Init_VRDashboardTokenFailure = 165)] = "VRInitError_Init_VRDashboardTokenFailure"), (e[(e.VRInitError_Init_VRDashboardEnvironmentFailure = 166)] = "VRInitError_Init_VRDashboardEnvironmentFailure"), (e[(e.VRInitError_Init_VRDashboardPathFailure = 167)] = "VRInitError_Init_VRDashboardPathFailure"), (e[(e.VRInitError_Driver_Failed = 200)] = "VRInitError_Driver_Failed"), (e[(e.VRInitError_Driver_Unknown = 201)] = "VRInitError_Driver_Unknown"), (e[(e.VRInitError_Driver_HmdUnknown = 202)] = "VRInitError_Driver_HmdUnknown"), (e[(e.VRInitError_Driver_NotLoaded = 203)] = "VRInitError_Driver_NotLoaded"), (e[(e.VRInitError_Driver_RuntimeOutOfDate = 204)] = "VRInitError_Driver_RuntimeOutOfDate"), (e[(e.VRInitError_Driver_HmdInUse = 205)] = "VRInitError_Driver_HmdInUse"), (e[(e.VRInitError_Driver_NotCalibrated = 206)] = "VRInitError_Driver_NotCalibrated"), (e[(e.VRInitError_Driver_CalibrationInvalid = 207)] = "VRInitError_Driver_CalibrationInvalid"), (e[(e.VRInitError_Driver_HmdDisplayNotFound = 208)] = "VRInitError_Driver_HmdDisplayNotFound"), (e[(e.VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209)] = "VRInitError_Driver_TrackedDeviceInterfaceUnknown"), (e[(e.VRInitError_Driver_HmdDriverIdOutOfBounds = 211)] = "VRInitError_Driver_HmdDriverIdOutOfBounds"), (e[(e.VRInitError_Driver_HmdDisplayMirrored = 212)] = "VRInitError_Driver_HmdDisplayMirrored"), (e[(e.VRInitError_Driver_HmdDisplayNotFoundLaptop = 213)] = "VRInitError_Driver_HmdDisplayNotFoundLaptop"), (e[(e.VRInitError_Driver_PeerDriverNotInstalled = 214)] = "VRInitError_Driver_PeerDriverNotInstalled"), (e[(e.VRInitError_Driver_WirelessHmdNotConnected = 215)] = "VRInitError_Driver_WirelessHmdNotConnected"), (e[(e.VRInitError_IPC_ServerInitFailed = 300)] = "VRInitError_IPC_ServerInitFailed"), (e[(e.VRInitError_IPC_ConnectFailed = 301)] = "VRInitError_IPC_ConnectFailed"), (e[(e.VRInitError_IPC_SharedStateInitFailed = 302)] = "VRInitError_IPC_SharedStateInitFailed"), (e[(e.VRInitError_IPC_CompositorInitFailed = 303)] = "VRInitError_IPC_CompositorInitFailed"), (e[(e.VRInitError_IPC_MutexInitFailed = 304)] = "VRInitError_IPC_MutexInitFailed"), (e[(e.VRInitError_IPC_Failed = 305)] = "VRInitError_IPC_Failed"), (e[(e.VRInitError_IPC_CompositorConnectFailed = 306)] = "VRInitError_IPC_CompositorConnectFailed"), (e[(e.VRInitError_IPC_CompositorInvalidConnectResponse = 307)] = "VRInitError_IPC_CompositorInvalidConnectResponse"), (e[(e.VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308)] = "VRInitError_IPC_ConnectFailedAfterMultipleAttempts"), (e[(e.VRInitError_IPC_ConnectFailedAfterTargetExited = 309)] = "VRInitError_IPC_ConnectFailedAfterTargetExited"), (e[(e.VRInitError_IPC_NamespaceUnavailable = 310)] = "VRInitError_IPC_NamespaceUnavailable"), (e[(e.VRInitError_Compositor_Failed = 400)] = "VRInitError_Compositor_Failed"), (e[(e.VRInitError_Compositor_D3D11HardwareRequired = 401)] = "VRInitError_Compositor_D3D11HardwareRequired"), (e[(e.VRInitError_Compositor_FirmwareRequiresUpdate = 402)] = "VRInitError_Compositor_FirmwareRequiresUpdate"), (e[(e.VRInitError_Compositor_OverlayInitFailed = 403)] = "VRInitError_Compositor_OverlayInitFailed"), (e[(e.VRInitError_Compositor_ScreenshotsInitFailed = 404)] = "VRInitError_Compositor_ScreenshotsInitFailed"), (e[(e.VRInitError_Compositor_UnableToCreateDevice = 405)] = "VRInitError_Compositor_UnableToCreateDevice"), (e[(e.VRInitError_Compositor_SharedStateIsNull = 406)] = "VRInitError_Compositor_SharedStateIsNull"), (e[(e.VRInitError_Compositor_NotificationManagerIsNull = 407)] = "VRInitError_Compositor_NotificationManagerIsNull"), (e[(e.VRInitError_Compositor_ResourceManagerClientIsNull = 408)] = "VRInitError_Compositor_ResourceManagerClientIsNull"), (e[(e.VRInitError_Compositor_MessageOverlaySharedStateInitFailure = 409)] = "VRInitError_Compositor_MessageOverlaySharedStateInitFailure"), (e[(e.VRInitError_Compositor_PropertiesInterfaceIsNull = 410)] = "VRInitError_Compositor_PropertiesInterfaceIsNull"), (e[(e.VRInitError_Compositor_CreateFullscreenWindowFailed = 411)] = "VRInitError_Compositor_CreateFullscreenWindowFailed"), (e[(e.VRInitError_Compositor_SettingsInterfaceIsNull = 412)] = "VRInitError_Compositor_SettingsInterfaceIsNull"), (e[(e.VRInitError_Compositor_FailedToShowWindow = 413)] = "VRInitError_Compositor_FailedToShowWindow"), (e[(e.VRInitError_Compositor_DistortInterfaceIsNull = 414)] = "VRInitError_Compositor_DistortInterfaceIsNull"), (e[(e.VRInitError_Compositor_DisplayFrequencyFailure = 415)] = "VRInitError_Compositor_DisplayFrequencyFailure"), (e[(e.VRInitError_Compositor_RendererInitializationFailed = 416)] = "VRInitError_Compositor_RendererInitializationFailed"), (e[(e.VRInitError_Compositor_DXGIFactoryInterfaceIsNull = 417)] = "VRInitError_Compositor_DXGIFactoryInterfaceIsNull"), (e[(e.VRInitError_Compositor_DXGIFactoryCreateFailed = 418)] = "VRInitError_Compositor_DXGIFactoryCreateFailed"), (e[(e.VRInitError_Compositor_DXGIFactoryQueryFailed = 419)] = "VRInitError_Compositor_DXGIFactoryQueryFailed"), (e[(e.VRInitError_Compositor_InvalidAdapterDesktop = 420)] = "VRInitError_Compositor_InvalidAdapterDesktop"), (e[(e.VRInitError_Compositor_InvalidHmdAttachment = 421)] = "VRInitError_Compositor_InvalidHmdAttachment"), (e[(e.VRInitError_Compositor_InvalidOutputDesktop = 422)] = "VRInitError_Compositor_InvalidOutputDesktop"), (e[(e.VRInitError_Compositor_InvalidDeviceProvided = 423)] = "VRInitError_Compositor_InvalidDeviceProvided"), (e[(e.VRInitError_Compositor_D3D11RendererInitializationFailed = 424)] = "VRInitError_Compositor_D3D11RendererInitializationFailed"), (e[(e.VRInitError_Compositor_FailedToFindDisplayMode = 425)] = "VRInitError_Compositor_FailedToFindDisplayMode"), (e[(e.VRInitError_Compositor_FailedToCreateSwapChain = 426)] = "VRInitError_Compositor_FailedToCreateSwapChain"), (e[(e.VRInitError_Compositor_FailedToGetBackBuffer = 427)] = "VRInitError_Compositor_FailedToGetBackBuffer"), (e[(e.VRInitError_Compositor_FailedToCreateRenderTarget = 428)] = "VRInitError_Compositor_FailedToCreateRenderTarget"), (e[(e.VRInitError_Compositor_FailedToCreateDXGI2SwapChain = 429)] = "VRInitError_Compositor_FailedToCreateDXGI2SwapChain"), (e[(e.VRInitError_Compositor_FailedtoGetDXGI2BackBuffer = 430)] = "VRInitError_Compositor_FailedtoGetDXGI2BackBuffer"), (e[(e.VRInitError_Compositor_FailedToCreateDXGI2RenderTarget = 431)] = "VRInitError_Compositor_FailedToCreateDXGI2RenderTarget"), (e[(e.VRInitError_Compositor_FailedToGetDXGIDeviceInterface = 432)] = "VRInitError_Compositor_FailedToGetDXGIDeviceInterface"), (e[(e.VRInitError_Compositor_SelectDisplayMode = 433)] = "VRInitError_Compositor_SelectDisplayMode"), (e[(e.VRInitError_Compositor_FailedToCreateNvAPIRenderTargets = 434)] = "VRInitError_Compositor_FailedToCreateNvAPIRenderTargets"), (e[(e.VRInitError_Compositor_NvAPISetDisplayMode = 435)] = "VRInitError_Compositor_NvAPISetDisplayMode"), (e[(e.VRInitError_Compositor_FailedToCreateDirectModeDisplay = 436)] = "VRInitError_Compositor_FailedToCreateDirectModeDisplay"), (e[(e.VRInitError_Compositor_InvalidHmdPropertyContainer = 437)] = "VRInitError_Compositor_InvalidHmdPropertyContainer"), (e[(e.VRInitError_Compositor_UpdateDisplayFrequency = 438)] = "VRInitError_Compositor_UpdateDisplayFrequency"), (e[(e.VRInitError_Compositor_CreateRasterizerState = 439)] = "VRInitError_Compositor_CreateRasterizerState"), (e[(e.VRInitError_Compositor_CreateWireframeRasterizerState = 440)] = "VRInitError_Compositor_CreateWireframeRasterizerState"), (e[(e.VRInitError_Compositor_CreateSamplerState = 441)] = "VRInitError_Compositor_CreateSamplerState"), (e[(e.VRInitError_Compositor_CreateClampToBorderSamplerState = 442)] = "VRInitError_Compositor_CreateClampToBorderSamplerState"), (e[(e.VRInitError_Compositor_CreateAnisoSamplerState = 443)] = "VRInitError_Compositor_CreateAnisoSamplerState"), (e[(e.VRInitError_Compositor_CreateOverlaySamplerState = 444)] = "VRInitError_Compositor_CreateOverlaySamplerState"), (e[(e.VRInitError_Compositor_CreatePanoramaSamplerState = 445)] = "VRInitError_Compositor_CreatePanoramaSamplerState"), (e[(e.VRInitError_Compositor_CreateFontSamplerState = 446)] = "VRInitError_Compositor_CreateFontSamplerState"), (e[(e.VRInitError_Compositor_CreateNoBlendState = 447)] = "VRInitError_Compositor_CreateNoBlendState"), (e[(e.VRInitError_Compositor_CreateBlendState = 448)] = "VRInitError_Compositor_CreateBlendState"), (e[(e.VRInitError_Compositor_CreateAlphaBlendState = 449)] = "VRInitError_Compositor_CreateAlphaBlendState"), (e[(e.VRInitError_Compositor_CreateBlendStateMaskR = 450)] = "VRInitError_Compositor_CreateBlendStateMaskR"), (e[(e.VRInitError_Compositor_CreateBlendStateMaskG = 451)] = "VRInitError_Compositor_CreateBlendStateMaskG"), (e[(e.VRInitError_Compositor_CreateBlendStateMaskB = 452)] = "VRInitError_Compositor_CreateBlendStateMaskB"), (e[(e.VRInitError_Compositor_CreateDepthStencilState = 453)] = "VRInitError_Compositor_CreateDepthStencilState"), (e[(e.VRInitError_Compositor_CreateDepthStencilStateNoWrite = 454)] = "VRInitError_Compositor_CreateDepthStencilStateNoWrite"), (e[(e.VRInitError_Compositor_CreateDepthStencilStateNoDepth = 455)] = "VRInitError_Compositor_CreateDepthStencilStateNoDepth"), (e[(e.VRInitError_Compositor_CreateFlushTexture = 456)] = "VRInitError_Compositor_CreateFlushTexture"), (e[(e.VRInitError_Compositor_CreateDistortionSurfaces = 457)] = "VRInitError_Compositor_CreateDistortionSurfaces"), (e[(e.VRInitError_Compositor_CreateConstantBuffer = 458)] = "VRInitError_Compositor_CreateConstantBuffer"), (e[(e.VRInitError_Compositor_CreateHmdPoseConstantBuffer = 459)] = "VRInitError_Compositor_CreateHmdPoseConstantBuffer"), (e[(e.VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer = 460)] = "VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer"), (e[(e.VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer = 461)] = "VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer"), (e[(e.VRInitError_Compositor_CreateOverlayConstantBuffer = 462)] = "VRInitError_Compositor_CreateOverlayConstantBuffer"), (e[(e.VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer = 463)] = "VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer"), (e[(e.VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer = 464)] = "VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer"), (e[(e.VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer = 465)] = "VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer"), (e[(e.VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer = 466)] = "VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer"), (e[(e.VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer = 467)] = "VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer"), (e[(e.VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer = 468)] = "VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer"), (e[(e.VRInitError_Compositor_CreateGeomConstantBuffer = 469)] = "VRInitError_Compositor_CreateGeomConstantBuffer"), (e[(e.VRInitError_Compositor_CreatePanelMaskConstantBuffer = 470)] = "VRInitError_Compositor_CreatePanelMaskConstantBuffer"), (e[(e.VRInitError_Compositor_CreatePixelSimUBO = 471)] = "VRInitError_Compositor_CreatePixelSimUBO"), (e[(e.VRInitError_Compositor_CreateMSAARenderTextures = 472)] = "VRInitError_Compositor_CreateMSAARenderTextures"), (e[(e.VRInitError_Compositor_CreateResolveRenderTextures = 473)] = "VRInitError_Compositor_CreateResolveRenderTextures"), (e[(e.VRInitError_Compositor_CreateComputeResolveRenderTextures = 474)] = "VRInitError_Compositor_CreateComputeResolveRenderTextures"), (e[(e.VRInitError_Compositor_CreateDriverDirectModeResolveTextures = 475)] = "VRInitError_Compositor_CreateDriverDirectModeResolveTextures"), (e[(e.VRInitError_Compositor_OpenDriverDirectModeResolveTextures = 476)] = "VRInitError_Compositor_OpenDriverDirectModeResolveTextures"), (e[(e.VRInitError_Compositor_CreateFallbackSyncTexture = 477)] = "VRInitError_Compositor_CreateFallbackSyncTexture"), (e[(e.VRInitError_Compositor_ShareFallbackSyncTexture = 478)] = "VRInitError_Compositor_ShareFallbackSyncTexture"), (e[(e.VRInitError_Compositor_CreateOverlayIndexBuffer = 479)] = "VRInitError_Compositor_CreateOverlayIndexBuffer"), (e[(e.VRInitError_Compositor_CreateOverlayVertexBuffer = 480)] = "VRInitError_Compositor_CreateOverlayVertexBuffer"), (e[(e.VRInitError_Compositor_CreateTextVertexBuffer = 481)] = "VRInitError_Compositor_CreateTextVertexBuffer"), (e[(e.VRInitError_Compositor_CreateTextIndexBuffer = 482)] = "VRInitError_Compositor_CreateTextIndexBuffer"), (e[(e.VRInitError_Compositor_CreateMirrorTextures = 483)] = "VRInitError_Compositor_CreateMirrorTextures"), (e[(e.VRInitError_Compositor_CreateLastFrameRenderTexture = 484)] = "VRInitError_Compositor_CreateLastFrameRenderTexture"), (e[(e.VRInitError_Compositor_CreateMirrorOverlay = 485)] = "VRInitError_Compositor_CreateMirrorOverlay"), (e[(e.VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486)] = "VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer"), (e[(e.VRInitError_Compositor_DisplayModeNotSupported = 487)] = "VRInitError_Compositor_DisplayModeNotSupported"), (e[(e.VRInitError_Compositor_CreateOverlayInvalidCall = 488)] = "VRInitError_Compositor_CreateOverlayInvalidCall"), (e[(e.VRInitError_Compositor_CreateOverlayAlreadyInitialized = 489)] = "VRInitError_Compositor_CreateOverlayAlreadyInitialized"), (e[(e.VRInitError_Compositor_FailedToCreateMailbox = 490)] = "VRInitError_Compositor_FailedToCreateMailbox"), (e[(e.VRInitError_Compositor_WindowInterfaceIsNull = 491)] = "VRInitError_Compositor_WindowInterfaceIsNull"), (e[(e.VRInitError_Compositor_SystemLayerCreateInstance = 492)] = "VRInitError_Compositor_SystemLayerCreateInstance"), (e[(e.VRInitError_Compositor_SystemLayerCreateSession = 493)] = "VRInitError_Compositor_SystemLayerCreateSession"), (e[(e.VRInitError_Compositor_CreateInverseDistortUVs = 494)] = "VRInitError_Compositor_CreateInverseDistortUVs"), (e[(e.VRInitError_Compositor_CreateBackbufferDepth = 495)] = "VRInitError_Compositor_CreateBackbufferDepth"), (e[(e.VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1e3)] = "VRInitError_VendorSpecific_UnableToConnectToOculusRuntime"), (e[(e.VRInitError_VendorSpecific_WindowsNotInDevMode = 1001)] = "VRInitError_VendorSpecific_WindowsNotInDevMode"), (e[(e.VRInitError_VendorSpecific_OculusLinkNotEnabled = 1002)] = "VRInitError_VendorSpecific_OculusLinkNotEnabled"), (e[(e.VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101)] = "VRInitError_VendorSpecific_HmdFound_CantOpenDevice"), (e[(e.VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102)] = "VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart"), (e[(e.VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103)] = "VRInitError_VendorSpecific_HmdFound_NoStoredConfig"), (e[(e.VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104)] = "VRInitError_VendorSpecific_HmdFound_ConfigTooBig"), (e[(e.VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105)] = "VRInitError_VendorSpecific_HmdFound_ConfigTooSmall"), (e[(e.VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106)] = "VRInitError_VendorSpecific_HmdFound_UnableToInitZLib"), (e[(e.VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107)] = "VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion"), (e[(e.VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108)] = "VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart"), (e[(e.VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109)] = "VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart"), (e[(e.VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110)] = "VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext"), (e[(e.VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111)] = "VRInitError_VendorSpecific_HmdFound_UserDataAddressRange"), (e[(e.VRInitError_VendorSpecific_HmdFound_UserDataError = 1112)] = "VRInitError_VendorSpecific_HmdFound_UserDataError"), (e[(e.VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113)] = "VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck"), (e[(e.VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114)] = "VRInitError_VendorSpecific_OculusRuntimeBadInstall"), (e[(e.VRInitError_VendorSpecific_HmdFound_UnexpectedConfiguration_1 = 1115)] = "VRInitError_VendorSpecific_HmdFound_UnexpectedConfiguration_1"), (e[(e.VRInitError_Steam_SteamInstallationNotFound = 2e3)] = "VRInitError_Steam_SteamInstallationNotFound"), (e[(e.VRInitError_LastError = 2001)] = "VRInitError_LastError"); })(o || (o = {})); var l = n(45193), c = n(77385), m = (n(2049), n(97669)); const d = new c.sO("VR"); class h { constructor() { (this.m_rgMutualCapabilities = void 0), (this.m_bHMDPresent = void 0), (this.m_bHMDHardwareDetected = void 0), (this.m_strHMDName = void 0), (this.m_bIsVRRunning = void 0), (this.m_error = void 0), (this.m_eHMDActivityLevel = void 0), (this.m_bVRDeviceSeenRecently = !1), (this.m_bIsKeyboardOpen = void 0), (this.m_eKeyboardFlags = void 0), (this.m_sInitialKeyboardText = void 0), (this.m_unSceneAppID = m.kI), (this.m_bSimulatingVROnDesktop = !1), (this.m_mapAffordanceElems = new Map()), (0, s.rC)(this); } Init() { var e, t, n, i, o, r, a, s, l, c, m, d, h, u; null === (t = null === (e = null === SteamClient || void 0 === SteamClient ? void 0 : SteamClient.OpenVR) || void 0 === e ? void 0 : e.RegisterForVRHardwareDetected) || void 0 === t || t.call(e, this.OnVRHardwareDetected), null === (i = null === (n = null === SteamClient || void 0 === SteamClient ? void 0 : SteamClient.OpenVR) || void 0 === n ? void 0 : n.RegisterForVRModeChange) || void 0 === i || i.call(n, this.OnVRModeChanged), null === (r = null === (o = null === SteamClient || void 0 === SteamClient ? void 0 : SteamClient.OpenVR) || void 0 === o ? void 0 : o.RegisterForStartupErrors) || void 0 === r || r.call(o, this.OnStartupError), null === (s = null === (a = null === SteamClient || void 0 === SteamClient ? void 0 : SteamClient.OpenVR) || void 0 === a ? void 0 : a.RegisterForHMDActivityLevelChanged) || void 0 === s || s.call(a, this.OnHMDActivityLevelChanged), null === (c = null === (l = null === SteamClient || void 0 === SteamClient ? void 0 : SteamClient.OpenVR) || void 0 === l ? void 0 : l.RegisterForVRSceneAppChange) || void 0 === c || c.call(l, this.OnSceneAppChanged), null === (m = null === SteamClient || void 0 === SteamClient ? void 0 : SteamClient.OpenVR) || void 0 === m || m.Device.RegisterForVRDeviceSeenRecently(this.OnVRDeviceSeenRecentlyChanged), null === (u = null === (d = null === SteamClient || void 0 === SteamClient ? void 0 : SteamClient.OpenVR) || void 0 === d ? void 0 : (h = d.Keyboard).RegisterForStatus) || void 0 === u || u.call(h, this.OnKeyboardStatus); } OnVRHardwareDetected(e, t, n) { (this.m_bHMDPresent = e), (this.m_bHMDHardwareDetected = t), (this.m_strHMDName = n); } OnVRModeChanged(e) { (this.m_bIsVRRunning = e), this.UpdateMutualCapabilities(); } OnStartupError(e, t, n) { let o; e != i.k_EVRError_None && (o = { eClient: e, eInit: t, strInit: n }), (this.m_error = o); } OnHMDActivityLevelChanged(e) { this.m_eHMDActivityLevel = e; } OnSceneAppChanged(e) { this.m_unSceneAppID = e; } OnVRDeviceSeenRecentlyChanged(e) { this.m_bVRDeviceSeenRecently = e; } OnKeyboardStatus(e, t, n) { (this.m_bIsKeyboardOpen = e), (this.m_eKeyboardFlags = t), (this.m_sInitialKeyboardText = n); } get IsVRHMDPresent() { return Boolean(this.m_bSimulatingVROnDesktop || this.m_bHMDPresent || this.m_bHMDHardwareDetected); } get CurrentSceneAppID() { return this.m_unSceneAppID; } HasVRHMDBeenSeen() { return !!this.m_bVRDeviceSeenRecently; } get IsSteamVRRunning() { return this.m_bSimulatingVROnDesktop || !!this.m_bIsVRRunning; } get IsSteamVRSimulatedOnDesktop() { return this.m_bSimulatingVROnDesktop; } get IsVRHMDAwake() { return this.m_bSimulatingVROnDesktop || this.m_eHMDActivityLevel == l.$6.UserInteraction; } get VRKeyboardStatus() { const e = 0 != (this.m_eKeyboardFlags & l.vS.Minimal); return { bIsOpen: !!this.m_bIsKeyboardOpen, sInitialText: this.m_sInitialKeyboardText, bMinimal: e, bShowArrowKeys: !e || 0 != (this.m_eKeyboardFlags & l.vS.ShowArrowKeys), bShowDoneKey: 0 == (this.m_eKeyboardFlags & l.vS.HideDoneKey) }; } get VRHMDActivityLevel() { return this.m_bSimulatingVROnDesktop ? l.$6.UserInteraction : this.m_eHMDActivityLevel; } get VRKeyboardDisplayFlags() { return this.m_eKeyboardFlags; } get error() { return this.m_error; } ClearError() { this.m_error = void 0; } SetSimulatingVROnDesktop(e) { this.m_bSimulatingVROnDesktop = e; } SetInteractionAffordance(e, t, n) { var i, o, r; if (null == e) return; this.m_mapAffordanceElems.has(t) || this.m_mapAffordanceElems.set(t, new Set()); const a = this.m_mapAffordanceElems.get(t), s = Array.from(a).filter((t) => t.ownerDocument.defaultView == e.ownerDocument.defaultView).length > 0; n ? a.add(e) : a.delete(e); const l = Array.from(a).filter((t) => t.ownerDocument.defaultView == e.ownerDocument.defaultView).length > 0; l != s && (null === (r = null === (o = null === (i = e.ownerDocument.defaultView) || void 0 === i ? void 0 : i.SteamClient) || void 0 === o ? void 0 : o.OpenVR) || void 0 === r || r.SetOverlayInteractionAffordance(t, l)); } BHasMutualCapabilities() { return null != this.m_rgMutualCapabilities; } BHasMutualCapability(e) { var t; return null === (t = this.m_rgMutualCapabilities) || void 0 === t ? void 0 : t.includes(e); } UpdateMutualCapabilities() { var e; return (0, r.mG)(this, void 0, void 0, function* () { if (this.IsSteamVRRunning) try { this.m_rgMutualCapabilities = yield null === (e = null === SteamClient || void 0 === SteamClient ? void 0 : SteamClient.OpenVR) || void 0 === e ? void 0 : e.GetMutualCapabilities(); } catch (e) { (this.m_rgMutualCapabilities = void 0), d.Error("Failed to fetch Mutual Capabilities:", e); } else this.m_rgMutualCapabilities = void 0; }); } } function u(e, t) { const [n, i] = a.useState(), o = a.useCallback(() => !0, []), r = a.useRef(); return ( (r.current = null != t ? t : o), a.useEffect(() => { const t = () => { var t, i, o, a; const s = !(!r.current || !r.current()); p.SetInteractionAffordance(n, e, s), 2 == e && s && (null === (a = null === (o = null === (i = null === (t = null == n ? void 0 : n.ownerDocument.defaultView) || void 0 === t ? void 0 : t.SteamClient) || void 0 === i ? void 0 : i.OpenVR) || void 0 === o ? void 0 : o.TriggerOverlayHapticEffect) || void 0 === a || a.call(o, l.sH.ButtonEnter, 0)); }, i = () => { var t, i, o, a; p.SetInteractionAffordance(n, e, !1), 2 == e && r.current && r.current() && (null === (a = null === (o = null === (i = null === (t = null == n ? void 0 : n.ownerDocument.defaultView) || void 0 === t ? void 0 : t.SteamClient) || void 0 === i ? void 0 : i.OpenVR) || void 0 === o ? void 0 : o.TriggerOverlayHapticEffect) || void 0 === a || a.call(o, l.sH.ButtonLeave, 0)); }; return ( null == n || n.addEventListener("mouseenter", t), null == n || n.addEventListener("mouseleave", i), () => { null == n || n.removeEventListener("mouseenter", t), null == n || n.removeEventListener("mouseleave", i), p.SetInteractionAffordance(n, e, !1); } ); }, [n, e]), i ); } (0, r.gn)([s.LO], h.prototype, "m_rgMutualCapabilities", void 0), (0, r.gn)([s.LO], h.prototype, "m_bHMDPresent", void 0), (0, r.gn)([s.LO], h.prototype, "m_bHMDHardwareDetected", void 0), (0, r.gn)([s.LO], h.prototype, "m_strHMDName", void 0), (0, r.gn)([s.LO], h.prototype, "m_bIsVRRunning", void 0), (0, r.gn)([s.LO], h.prototype, "m_error", void 0), (0, r.gn)([s.LO], h.prototype, "m_eHMDActivityLevel", void 0), (0, r.gn)([s.LO], h.prototype, "m_bVRDeviceSeenRecently", void 0), (0, r.gn)([s.LO], h.prototype, "m_bIsKeyboardOpen", void 0), (0, r.gn)([s.LO], h.prototype, "m_eKeyboardFlags", void 0), (0, r.gn)([s.LO], h.prototype, "m_sInitialKeyboardText", void 0), (0, r.gn)([s.LO], h.prototype, "m_unSceneAppID", void 0), (0, r.gn)([s.LO], h.prototype, "m_bSimulatingVROnDesktop", void 0), (0, r.gn)([s.aD.bound], h.prototype, "OnVRHardwareDetected", null), (0, r.gn)([s.aD.bound], h.prototype, "OnVRModeChanged", null), (0, r.gn)([s.aD.bound], h.prototype, "OnStartupError", null), (0, r.gn)([s.aD.bound], h.prototype, "OnHMDActivityLevelChanged", null), (0, r.gn)([s.aD.bound], h.prototype, "OnSceneAppChanged", null), (0, r.gn)([s.aD.bound], h.prototype, "OnVRDeviceSeenRecentlyChanged", null), (0, r.gn)([s.aD.bound], h.prototype, "OnKeyboardStatus", null), (0, r.gn)([s.aD.bound], h.prototype, "ClearError", null); const p = new h(); }, 46313: (e, t, n) => { "use strict"; n.d(t, { FX: () => i }); var i, o = n(85556), r = n(55981), a = n(77385), s = n(2049); function l(e) { switch (e) { case r.eV.OK: return i.A; case r.eV.CANCEL: return i.B; case r.eV.SECONDARY: return i.X; case r.eV.OPTIONS: return i.Y; case r.eV.DIR_LEFT: return i.Left; case r.eV.DIR_RIGHT: return i.Right; case r.eV.DIR_UP: return i.Up; case r.eV.DIR_DOWN: return i.Down; case r.eV.STEAM_GUIDE: return i.HomeMenu; case r.eV.STEAM_QUICK_MENU: return i.QuickMenu; case r.eV.SELECT: return i.Select; case r.eV.START: return i.Start; case r.eV.BUMPER_LEFT: return i.LeftBumper; case r.eV.BUMPER_RIGHT: return i.RightBumper; case r.eV.TRIGGER_LEFT: return i.LeftTrigger; case r.eV.TRIGGER_RIGHT: return i.RightTrigger; default: return null; } } !(function (e) { (e[(e.A = 0)] = "A"), (e[(e.B = 1)] = "B"), (e[(e.X = 2)] = "X"), (e[(e.Y = 3)] = "Y"), (e[(e.Left = 4)] = "Left"), (e[(e.Right = 5)] = "Right"), (e[(e.Up = 6)] = "Up"), (e[(e.Down = 7)] = "Down"), (e[(e.HomeMenu = 8)] = "HomeMenu"), (e[(e.QuickMenu = 9)] = "QuickMenu"), (e[(e.Select = 10)] = "Select"), (e[(e.Start = 11)] = "Start"), (e[(e.LeftBumper = 12)] = "LeftBumper"), (e[(e.RightBumper = 13)] = "RightBumper"), (e[(e.LeftTrigger = 14)] = "LeftTrigger"), (e[(e.RightTrigger = 15)] = "RightTrigger"), (e[(e.LeftStick = 16)] = "LeftStick"), (e[(e.LeftStickClick = 17)] = "LeftStickClick"), (e[(e.RightStick = 18)] = "RightStick"), (e[(e.RightStickClick = 19)] = "RightStickClick"), (e[(e.LeftTrackpad = 20)] = "LeftTrackpad"), (e[(e.LeftTrackpadClick = 21)] = "LeftTrackpadClick"), (e[(e.RightTrackpad = 22)] = "RightTrackpad"), (e[(e.RightTrackpadClick = 23)] = "RightTrackpadClick"), (e[(e.RearLeftUpper = 24)] = "RearLeftUpper"), (e[(e.RearLeftLower = 25)] = "RearLeftLower"), (e[(e.RearRightUpper = 26)] = "RearRightUpper"), (e[(e.RearRightLower = 27)] = "RearRightLower"); })(i || (i = {})); class c { constructor() { (this.m_boundActions = new Map()), (this.m_defaultActions = new Map()), (this.m_actionSubscriptions = new Map()), (this.m_actionDescriptionChangedCallbackRegistrations = []); } InitContext(e) { return e.FocusChangedCallbacks.Register(this.OnFocusNavigationChanged).Unregister; } BFromActiveNavTree(e, t) { let n = null == t ? void 0 : t.Tree; return n || (n = null == e ? void 0 : e.Tree), n && n.Controller.IsActiveFocusNavTree(n); } OnFocusNavigationChanged(e, t, n) { if (this.BFromActiveNavTree(t, n)) if ((this.m_actionDescriptionChangedCallbackRegistrations.forEach((e) => e.Unregister()), (this.m_actionDescriptionChangedCallbackRegistrations = []), n)) { const e = () => { var e; return this.SetActionDescriptionsFromMap(null !== (e = n.GetActiveActionDescriptions()) && void 0 !== e ? e : {}); }; e(); for (let t = n; null != t; t = t.Parent) this.m_actionDescriptionChangedCallbackRegistrations.push(t.ActionDescriptionChangedCallbackList.Register(() => e())); } else this.SetActionDescriptionsFromMap({ [r.eV.OK]: null }); } GetActionDescription(e) { let t; return this.m_boundActions.has(e) ? (t = this.m_boundActions.get(e)) : this.m_defaultActions.has(e) && (t = this.m_defaultActions.get(e)), c.Log("GetActionDescription", t), t; } NotifyUpdate(e) { if (this.m_actionSubscriptions.has(e)) { const t = this.GetActionDescription(e); this.m_actionSubscriptions.get(e).forEach((e) => e(t)); } } NotifyAll() { Array.from(this.m_actionSubscriptions.keys()).forEach((e) => { this.NotifyUpdate(e); }); } IsDefaultAction(e) { return this.GetActionDescription(e) === this.m_defaultActions.get(e); } SetDefaultAction(e, t) { void 0 === t ? this.m_defaultActions.delete(e) : this.m_defaultActions.set(e, t), this.m_boundActions.has(e) || this.NotifyUpdate(e); } ClearActions() { c.Log("ClearActionDescriptions"), this.m_boundActions.clear(), this.NotifyAll(); } SetActionsFromMap(e) { const t = Array.from(this.m_boundActions.keys()); for (let n of t) e[n] || this.SetAction(n, void 0); for (let t in e) { const n = parseInt(t); this.SetAction(n, e[n]); } } SetActionDescriptionsFromMap(e) { const t = {}; for (const n in e) { const i = parseInt(n); t[l(i)] = e[i]; } this.SetActionsFromMap(t); } SetAction(e, t) { if ((c.Log("SetActionDescription", e, t), void 0 === t)) { if (!this.m_boundActions.has(e)) return; this.m_boundActions.delete(e); } else { if (this.m_boundActions.get(e) === t) return; this.m_boundActions.set(e, t); } this.NotifyUpdate(e); } SubscribeToActionFunction(e, t) { this.m_actionSubscriptions.has(e) || this.m_actionSubscriptions.set(e, []), this.m_actionSubscriptions.get(e).push(t), this.m_boundActions.has(e) ? t(this.m_boundActions.get(e)) : this.m_defaultActions.has(e) && t(this.m_defaultActions.get(e)); return () => { const n = this.m_actionSubscriptions.get(e), i = n.indexOf(t); i >= 0 ? n.splice(i, 1) : console.error("Unsubscribing an action that was already unsubscribed"); }; } } (c.Log = new a.sO("ActionDescription").Debug), (0, o.gn)([s.ak], c.prototype, "OnFocusNavigationChanged", null), (0, o.gn)([s.ak], c.prototype, "SetActionDescriptionsFromMap", null); }, 41758: (e, t, n) => { "use strict"; n.d(t, { Em: () => s, bv: () => a, v$: () => r }); var i = n(27378), o = n(88669); class r extends i.Component { constructor(e) { super(e); } render() { if (null == this.props.text) return i.createElement(i.Fragment, null, this.props.children); let e; if ( ((e = this.props.text instanceof Array ? this.props.text .map((e) => (e ? e.toString() : "")) .filter((e) => e.length > 0) .join("\n") : this.props.text.toString()), 1 == i.Children.count(this.props.children)) ) { let t = i.Children.only(this.props.children); return i.cloneElement(t, { "data-copystyle": this.props.style, "data-copytext": e }); } return console.log(`Error: CopyableText must be the parent of exactly one child:\n\tcopystyle=${this.props.style} copytext=${e}`), i.createElement(i.Fragment, null, this.props.children); } } function a(e) { let t = e.cloneContents(), n = "", i = "", r = !1, a = (t.querySelector("[data-activechat=true]") || t).querySelectorAll("[data-copytext]"), s = Array.from(a).map((e) => e.getAttribute("data-copystyle") || "msg"); for (let e = 0; e < a.length; ++e) { let t = a[e], l = s[e]; if (e + 1 < a.length && o.fH(t, a[e + 1])) continue; let c = t.tagName.toLowerCase(), m = l.includes("block"), d = l.includes("timestamp"), h = l.includes("server"), u = l.includes("invite"), p = l.includes("emote"), _ = l.includes("no-prefix"), g = l.includes("no-suffix"), C = l.includes("allow-embedded-newlines"), f = l.includes("block-continue"), v = l.includes("merge-adjacent"), S = l.includes("force-display"), b = l.includes("prepend-innertext"), I = l.includes("append-innertext"), y = l.includes("prepend-newline"), E = l.includes("append-newline"), D = l.includes("speaker"); if (!S) { let e = null != c.match(/img|iframe/), n = null != t.querySelector("img,iframe"); if (!t.innerText && !e && !n) continue; } v && (e > 0 && s[e - 1].includes("merge-adjacent") && (_ = !0), e + 1 < s.length && s[e + 1].includes("merge-adjacent") && (g = !0)), D && (r = !0); let w = "", R = "\n"; d || D || h || u || p ? (0 != n.length && (w += "\n"), (h || u) && (w += "\t\t")) : (r && (w += "\t"), i.includes("msg") && m && (y = !0), i.includes("block") && !f && (y = !0)); let A = t.getAttribute("data-copytext"); 0 == A.length ? (A = t.innerText) : b && t.innerText.length > 0 ? (A = `${t.innerText}${l.includes("-with-newline") ? "\n" : " "}${A}`) : I && t.innerText.length > 0 && (A += `${l.includes("-with-newline") ? "\n" : " "}${t.innerText}`), 0 != A.length && (y && (n += "\n"), _ || (n += w), (n += C ? A : A.replace(/\n/g, R + w)), g || (n += R), E && (n += "\n")), (i = l); } if (0 != n.length) return n; } function s(e) { const t = document.createRange(); t.selectNode(e), (function (e) { const t = a(e); o.Ei(t); })(t); } r.defaultProps = { text: "" }; }, 61963: (e, t, n) => { "use strict"; n.d(t, { BY: () => B, D1: () => A, T: () => L, Td: () => w, Vc: () => T, Wn: () => k, Yr: () => y, Zo: () => D, kl: () => x, uP: () => R, xV: () => E }); var i = n(85556), o = n(50649), r = n(27378), a = n(82909), s = n(56320), l = n(83817), c = n(62860), m = n(56973), d = n(91300), h = n(57476), u = n(19285), p = (n(65204), n(68816), n(16518)), _ = n(87018), g = n(97063), C = n(88669), f = n(84290), v = n(2049), S = n(10553), b = n(97841), I = n.n(b); const y = (0, d.Yt)("ContextMenuInstanceContext", () => r.createContext(null)); let E = class extends r.Component { constructor() { super(...arguments), (this.m_navRef = (0, s.Hy)()), (this.m_divRef = r.createRef()); } get instance() { return this.context.instance; } componentDidMount() { var e; this.instance.SetLabel(this.props.label), null === (e = this.m_navRef.current) || void 0 === e || e.TakeFocus(), (0, v.k$)(this.props.refInstance, this.instance); } componentDidUpdate(e) { e.label !== this.props.label && this.context && this.instance.SetLabel(this.props.label); } HideIfSubmenu() { return !!this.instance.BIsSubMenu() && (this.instance.HideSelf(), !0); } HideMenu() { return this.instance.BIsSubMenu() ? this.instance.HideSelf() : this.instance.Hide(), !0; } render() { var e; let t = this.props, { children: n, className: o, label: a, onCancel: s, cancelText: d, refInstance: h, bForceDesktopPresentation: u } = t, p = (0, i._T)(t, ["children", "className", "label", "onCancel", "cancelText", "refInstance", "bForceDesktopPresentation"]); const g = null !== (e = this.context.styles) && void 0 !== e ? e : I(); let C = null != d ? d : "#Button_Cancel"; if (1 != this.context.presentation || u) return r.createElement("div", Object.assign({}, p, { ref: this.m_divRef, className: (0, _.Z)({ [g.contextMenuContents]: !0, [g.hasSubMenu]: this.instance.BIsSubMenuVisible(), [g.ForceDesktop]: u }, o) }), n); { const e = () => { s && s(), this.instance.Hide(); }; return r.createElement(l.s, Object.assign({}, p, { className: (0, _.Z)(g.contextMenuContents, { [g.hasSubMenu]: this.instance.BIsSubMenuVisible() }, o), "flow-children": "column", onMoveLeft: this.HideIfSubmenu, onCancel: this.instance.BIsSubMenu() ? this.HideMenu : e, style: { overflowY: this.instance.BIsSubMenuVisible() ? "hidden" : void 0 }, navEntryPreferPosition: c.c4.PREFERRED_CHILD, navRef: this.m_navRef, ref: this.m_divRef }, m.Qy), n, !this.instance.BIsSubMenu() && r.createElement(r.Fragment, null, r.createElement(R, null), r.createElement(D, { className: g.Cancel, onSelected: e }, (0, f.Xx)(C))), this.instance.BIsSubMenuVisible() && r.createElement("div", { className: g.contextMenuFade, onClick: () => this.instance.HideSubMenu() })); } } }; (E.contextType = y), (0, i.gn)([v.ak], E.prototype, "HideIfSubmenu", null), (0, i.gn)([v.ak], E.prototype, "HideMenu", null), (E = (0, i.gn)([o.Pi], E)); class D extends r.PureComponent { constructor() { super(...arguments), (this.m_ref = r.createRef()), (this.m_refDiv = r.createRef()); } get element() { return this.m_refDiv.current; } get instance() { return this.context.instance; } OnClick(e) { var t; this.props.disabled ? (null === (t = this.context.callbacks) || void 0 === t ? void 0 : t.onDisabledItemSelected) && this.context.callbacks.onDisabledItemSelected() : (this.props.onClick && this.props.onClick(e), this.props.bInteractableItem || (this.props.onSelected && this.props.onSelected(e), this.context && this.instance.ForceHide())); } OnOKButton(e) { var t; null === (t = this.m_refDiv.current) || void 0 === t || t.click(); } OnMouseEnter(e) { 0 == this.context.presentation && this.instance.HideSubMenu(); } Focus() { this.m_ref.current ? this.m_ref.current.TakeFocus() : this.m_refDiv.current && this.m_refDiv.current.focus(); } render() { var e, t; const n = this.props, { onSelected: o, bInteractableItem: a, onMoveRight: s } = n, c = (0, i._T)(n, ["onSelected", "bInteractableItem", "onMoveRight"]), m = null !== (t = null === (e = this.context) || void 0 === e ? void 0 : e.styles) && void 0 !== t ? t : I(); return 1 == this.context.presentation ? r.createElement(l.s, Object.assign({ noFocusRing: !0, preferredFocus: this.props.selected, ref: this.m_refDiv, navRef: this.m_ref, onMouseEnter: this.OnMouseEnter }, c, { className: (0, _.Z)(this.props.className, m.contextMenuItem, "contextMenuItem", this.props.disabled && "disabled", this.props.selected && m.Selected, "positive" == this.props.tone && m.Positive, "emphasis" == this.props.tone && m.Emphasis, "destructive" == this.props.tone && m.Destructive), focusClassName: m.Focused, onClick: this.props.disabled ? void 0 : this.OnClick, focusable: !this.props.disabled, onOKButton: this.OnOKButton, onMoveRight: s, unselectable: this.props.unselectable }), this.props.children) : r.createElement(u.s, Object.assign({ ref: this.m_refDiv, onMouseEnter: this.OnMouseEnter }, c, { onClick: this.OnClick, unselectable: this.props.unselectable, className: this.props.className }), this.props.children); } } (D.contextType = y), (0, i.gn)([v.ak], D.prototype, "OnClick", null), (0, i.gn)([v.ak], D.prototype, "OnOKButton", null), (0, i.gn)([v.ak], D.prototype, "OnMouseEnter", null), (0, i.gn)([v.ak], D.prototype, "Focus", null); class w extends r.PureComponent { render() { const e = this.props, { bChecked: t, children: n, className: o } = e, a = (0, i._T)(e, ["bChecked", "children", "className"]); return r.createElement(D, Object.assign({}, a, { className: (0, _.Z)(o, t && "menuChecked") }), r.createElement("div", { className: "contextMenuCheckMark" }), n); } } r.PureComponent; function R(e) { var t; const n = null !== (t = r.useContext(y).styles) && void 0 !== t ? t : I(); return r.createElement("div", { className: n.ContextMenuSeparator }); } const A = (e) => { const t = (0, S.id)(); return r.createElement(M, Object.assign({}, e, { bInGamepadUI: t })); }; class M extends r.PureComponent { constructor(e) { super(e), (this.m_refItem = r.createRef()), (this.state = { bActive: !1 }); } get instance() { return this.context.instance; } OnSubMenuMouseEnter() { this.instance.CancelHideSubMenuTimer(); } OnSubMenuHidden() { this.setState({ bActive: !1 }), this.props.bInGamepadUI && 1 == this.context.presentation && this.m_refItem.current && this.m_refItem.current.Focus(); } ShowSubMenu(e) { const t = e || this.m_refItem.current.element; let n = this.instance.ShowSubMenu(t, this.RenderSubMenu); return !!n && (this.setState({ bActive: !0 }), n.SetOnHideCallback(this.OnSubMenuHidden), !0); } RenderSubMenu() { return r.createElement(E, { onMouseEnter: this.OnSubMenuMouseEnter, label: this.props.label }, this.props.children); } OnMouseEnter(e) { 0 == this.context.presentation && this.ShowSubMenu(e.currentTarget); } OnClick(e) { this.OnMouseEnter(e), this.props.onClick && this.props.onClick(e), this.props.bInGamepadUI && 1 == this.context.presentation && this.ShowSubMenu(e.currentTarget); } render() { var e; let t = this.props, { label: n, selectedWithin: o, children: a, className: s, bInGamepadUI: l } = t, c = (0, i._T)(t, ["label", "selectedWithin", "children", "className", "bInGamepadUI"]); const m = null !== (e = this.context.styles) && void 0 !== e ? e : I(); return r.createElement(D, Object.assign({}, c, { ref: this.m_refItem, onClick: this.OnClick, selected: o && !this.state.bActive, className: (0, _.Z)(s, m.SubMenu, this.state.bActive && m.active), onMouseEnter: this.OnMouseEnter, bInteractableItem: !0, onMoveRight: () => this.ShowSubMenu() }), r.createElement("div", { className: m.Label }, n), r.createElement("div", { className: m.Arrow }, r.createElement(p.$gZ, null))); } } (M.contextType = y), (0, i.gn)([v.ak], M.prototype, "OnSubMenuMouseEnter", null), (0, i.gn)([v.ak], M.prototype, "OnSubMenuHidden", null), (0, i.gn)([v.ak], M.prototype, "ShowSubMenu", null), (0, i.gn)([v.ak], M.prototype, "RenderSubMenu", null), (0, i.gn)([v.ak], M.prototype, "OnMouseEnter", null), (0, i.gn)([v.ak], M.prototype, "OnClick", null); let k = class extends r.Component { constructor(e) { super(e), (this.m_elMenu = void 0), (this.m_cReenteranceGuard = 1), (this.state = { ready: !1, menuLeft: void 0, menuTop: void 0, menuRight: void 0, menuBottom: void 0, menuWidth: void 0, menuHeight: void 0, menuMinWidth: void 0 }), (this.m_mutationObserver = new MutationObserver(this.OnMenuMutation)); } get parentWin() { var e; return (null === (e = this.props.element) || void 0 === e ? void 0 : e.ownerDocument.defaultView) || this.props.parentWin; } BindMenuElement(e) { var t, n; this.props.instance.SetElement(e), this.m_elMenu && (this.m_mutationObserver.disconnect(), (this.props.popup && !this.props.options.bScreenCoordinates) || null === (t = this.m_elMenu.ownerDocument.defaultView) || void 0 === t || t.removeEventListener("resize", this.OnWindowResize)), e && (this.m_mutationObserver.observe(e, { childList: !0, subtree: !0 }), (this.props.popup && !this.props.options.bScreenCoordinates) || null === (n = e.ownerDocument.defaultView) || void 0 === n || n.addEventListener("resize", this.OnWindowResize)), (this.m_elMenu = e || void 0), S.De.IN_CLIENT && this.props.popup && this.m_elMenu ? this.m_elMenu.ownerDocument.fonts.ready.then(() => { this.PositionMenu(); }) : this.PositionMenu(), this.state.ready || (this.props.instance.SetTakeFocus(this.TakeFocus.bind(this)), this.setState({ ready: !0 }, () => { var e; (null === (e = this.props.options) || void 0 === e ? void 0 : e.bSkipFocusWhenReady) || this.TakeFocus(); })); } OnMenuMutation(e, t) { this.PositionMenu(); } OnWindowResize() { this.PositionMenu(); } OnBlur(e) { if ((!e.relatedTarget || !C.ni(e.currentTarget, e.relatedTarget)) && (!e.relatedTarget || !this.props.instance.BIsElementInMenuHierarchy(e.relatedTarget)) && !this.props.instance.BIsSubMenuVisible() && this.state.ready && this.props.instance.visible) { const e = O() ? 150 : 0; this.props.instance.Hide(e); } } OnKeyDown(e) { 27 == e.keyCode && this.state.ready && (this.props.instance.Hide(), e.preventDefault(), e.stopPropagation()); } componentDidUpdate() { this.m_cReenteranceGuard-- > 0 ? this.PositionMenu() : (this.m_cReenteranceGuard = 2); } TakeFocus() { if (this.m_elMenu && this.state.ready && this.props.instance.visible && (this.props.popup || !C.ni(this.m_elMenu, this.m_elMenu.ownerDocument.activeElement))) { let e = this.m_elMenu.querySelector(".ContextMenuAutoFocus"); e && e.focus ? e.focus() : this.m_elMenu.focus(); } } PositionMenu(e = !1) { const t = this.props.options; let n = this.m_elMenu, i = this.props.element; if (!n) return; let o = null != this.props.popup, r = this.parentWin; if (!r || (i && "none" === r.getComputedStyle(i).display)) return; let a = this.props.clientX, s = this.props.clientY, l = 0, c = 0, m = r.innerWidth, d = r.innerHeight, h = 1, u = null == i ? void 0 : i.getBoundingClientRect(); if (o) if ((t.bScreenCoordinates || void 0 === a || void 0 === s || ((a += r.screenLeft), (s += r.screenTop)), u && (u = C.sH(r, u)), t.targetMonitor)) (h = t.targetMonitor.flMonitorScale), (l = t.targetMonitor.nScreenLeft), (c = t.targetMonitor.nScreenTop), (m = t.targetMonitor.nScreenWidth), (d = t.targetMonitor.nScreenHeight); else { let e = r.screen, t = 0, n = 0; e.availLeft && (t = e.availLeft), e.availTop && (n = e.availTop), (l = t), (c = n), (m = e.availWidth), (d = e.availHeight); } (t.bOverlapHorizontal || t.bOverlapVertical) && (a = s = void 0); let p = n.getBoundingClientRect(); if (t.flGamepadScale && t.flGamepadScale > 0) { const e = t.flGamepadScale; p = new DOMRect(p.x * e, p.y * e, p.width * e, p.height * e); } let _ = { menuLeft: void 0, menuRight: void 0, menuTop: void 0, menuBottom: void 0, menuWidth: void 0, menuHeight: void 0, menuMinWidth: void 0 }, g = null != a ? a : u.left, f = null != a ? a : u.right, v = p.width; t.bMatchWidth && ((v = f - g), (_.menuWidth = v)), t.bGrowToElementWidth && (_.menuMinWidth = Math.max(v, f - g)); let S = (t.bOverlapHorizontal ? f : g) - l - v, b = S > 0, I = l + m - (t.bOverlapHorizontal ? g : f) - v, y = I > 0, E = (t.bPreferPopLeft || !y) && b; b || y || ((E = b > y), t.bFitToWindow && ((v += (E ? S : I) - 8), (_.menuWidth = v))), E ? (_.menuRight = m - (t.bOverlapHorizontal ? f : g)) : (_.menuLeft = t.bOverlapHorizontal ? g : f); let D = null != s ? s : u.top, w = null != s ? s : u.bottom, R = n.scrollHeight; t.bMatchHeight && ((R = w - D), (_.menuHeight = R)); let A = (t.bOverlapVertical ? w : D) - c - R, M = A > 0, k = c + d - (t.bOverlapVertical ? D : w) - R, T = k > 0, L = (t.bPreferPopTop || !T) && M && !t.bDisablePopTop; if (!M && !T) { const e = void 0 !== t.bShiftToFitWindow ? t.bShiftToFitWindow : !!t.bFitToWindow && !t.bOverlapHorizontal; (L = A > k && !t.bDisablePopTop), e && (L ? (_.menuTop = 4) : (_.menuBottom = 4)), t.bFitToWindow && (e ? (R = Math.min(R, d - 8)) : (R += L ? A : k), (_.menuHeight = R - 8)); } void 0 === _.menuBottom && void 0 === _.menuTop && (L ? (_.menuBottom = d - (t.bOverlapVertical ? w : D)) : (_.menuTop = t.bOverlapVertical ? D : w)), o ? (_.menuHeight || (_.menuHeight = p.height), _.menuWidth || (_.menuWidth = p.width), _.menuBottom && !_.menuTop && ((_.menuTop = d - _.menuBottom - _.menuHeight), (_.menuBottom = void 0)), _.menuRight && !_.menuLeft && ((_.menuLeft = m - _.menuRight - _.menuWidth), (_.menuRight = void 0))) : (_.menuLeft && (_.menuLeft += r.scrollX), _.menuTop && (_.menuTop += r.scrollY), _.menuBottom && (_.menuBottom += r.document.body.clientHeight - r.scrollY - r.innerHeight), _.menuRight && (_.menuRight += r.document.body.clientWidth - r.scrollX - r.innerWidth)), (e || _.menuLeft !== this.state.menuLeft || _.menuRight !== this.state.menuRight || _.menuTop !== this.state.menuTop || _.menuBottom !== this.state.menuBottom || _.menuWidth !== this.state.menuWidth || _.menuHeight !== this.state.menuHeight) && this.setState(_); } PositionPopupWindow() { var e, t, n, i; if (!(void 0 !== this.state.menuLeft && void 0 !== this.state.menuTop && void 0 !== this.state.menuWidth && void 0 !== this.state.menuHeight)) return; const o = null === (e = this.props.popup) || void 0 === e ? void 0 : e.window, r = this.props.options; if (r.bScreenCoordinates) { let e = null === (t = this.parentWin) || void 0 === t ? void 0 : t.devicePixelRatio; if (r.targetMonitor) { let t = r.flGamepadScale || 1; e = (null !== (n = r.targetMonitor.flMonitorScale) && void 0 !== n ? n : 1) / t; } return null == o || o.SteamClient.Window.MoveTo(this.state.menuLeft, this.state.menuTop, e), void (null == o || o.SteamClient.Window.ResizeTo(this.state.menuWidth, this.state.menuHeight, e)); } null === (i = this.parentWin) || void 0 === i || i.SteamClient.Window.GetWindowRestoreDetails().then((e) => { const t = this.state.menuLeft - this.parentWin.screenX, n = this.state.menuTop - this.parentWin.screenY; try { null == o || o.SteamClient.Window.PositionWindowRelative(e, t, n, this.state.menuWidth, this.state.menuHeight); } catch (e) { console.error(e); } }); } render() { var e, t, n; let i = { visibility: this.state.ready ? "visible" : "hidden" }; if (this.props.options.flGamepadScale && this.props.options.flGamepadScale > 0) i.zoom = this.props.options.flGamepadScale; else if (this.props.options.bScreenCoordinates && this.props.options.targetMonitor && (null === (t = null === (e = this.m_elMenu) || void 0 === e ? void 0 : e.ownerDocument) || void 0 === t ? void 0 : t.defaultView)) { const e = this.m_elMenu.ownerDocument.defaultView.devicePixelRatio; 1 != e && (i.zoom = (null !== (n = this.props.options.targetMonitor.flMonitorScale) && void 0 !== n ? n : 1) / e); } this.props.popup ? (this.PositionPopupWindow(), void 0 !== this.state.menuMinWidth && (i.minWidth = this.state.menuMinWidth)) : (void 0 !== this.state.menuTop ? (i.top = this.state.menuTop) : void 0 !== this.state.menuBottom && (i.bottom = this.state.menuBottom), void 0 !== this.state.menuLeft ? (i.left = this.state.menuLeft) : void 0 !== this.state.menuRight && (i.right = this.state.menuRight), void 0 !== this.state.menuHeight && (i.height = this.state.menuHeight), void 0 !== this.state.menuWidth && (i.width = this.state.menuWidth), void 0 !== this.state.menuMinWidth && (i.minWidth = this.state.menuMinWidth)); let o = this.props.options.strClassName || I().contextMenu; return (this.props.options.bCreateHidden || (this.props.instance.visible && this.state.ready)) && (o += " visible"), (o += " " + I().ContextMenuFocusContainer), r.createElement("div", { className: o, ref: this.BindMenuElement, style: i, onBlur: this.OnBlur, onKeyDown: this.OnKeyDown, tabIndex: 0 }, this.props.children); } }; function T(e) { return r.createElement("div", { className: I().ContextMenuMouseOverlay }); } function L(e) { let t = [], n = C.RA(e), i = n.getSelection(), o = i && i.rangeCount > 0 && i.toString().length > 0, s = e.target, l = !1; const c = e.clientY, m = e.clientX; if ((s && "tagName" in s && (("INPUT" != s.tagName && "TEXTAREA" != s.tagName) || (l = !0)), S.De.IN_CLIENT && l && (0, h.w3)(n, "Browser.GetSpellingSuggestions"))) { let [e, ...i] = n.SteamClient.Browser.GetSpellingSuggestions(), o = s; if ( (o && i.forEach((e, i) => { t.push( r.createElement( D, { key: `spelling_${i}_${e}`, onSelected: () => { o.setRangeText(e), (function (e, t) { let n = t.createEvent("HTMLEvents"); n.initEvent("change", !0, !1), e.dispatchEvent(n); })(o, n.document), o.setSelectionRange(o.selectionEnd, o.selectionEnd), s.focus(); }, className: I().NoSeparation, }, e, ), ); }), e && (0, h.w3)(n, "Browser.AddWordToDictionary")) ) { const i = 30; (e = e.trim()), t.push(r.createElement(D, { key: `addtodictionary_${e}`, onSelected: () => n.SteamClient.Browser.AddWordToDictionary(e) }, (0, f.Xx)("#ContextMenu_AddToDictionary", e.length < i ? e : e.substring(0, i) + "..."))); } } if ( ((n.document.queryCommandEnabled("cut") || (o && l)) && t.push( r.createElement( D, { key: "cut", onSelected: () => { n.document.execCommand("cut"); }, }, (0, f.Xx)("#ContextMenu_Cut"), ), ), (n.document.queryCommandEnabled("copy") || o) && t.push( r.createElement( D, { key: "copy", onSelected: () => { n.document.execCommand("copy"); }, className: I().NoSeparation, }, (0, f.Xx)("#ContextMenu_Copy"), ), ), S.De.IN_CLIENT && l && (0, h.w3)(n, "Browser.Paste") && t.push( r.createElement( D, { key: "paste", onSelected: () => { s.focus(), n.SteamClient.Browser.Paste(); }, className: I().NoSeparation, }, (0, f.Xx)("#ContextMenu_Paste"), ), ), S.De.IN_CLIENT && S.De.DEV_MODE && (t.length > 0 && ((0, h.U5)("Browser.OpenDevTools") || (0, h.U5)("Browser.InspectElement")) && t.push(r.createElement(R, { key: "devtools-separator" })), (0, h.U5)("Browser.OpenDevTools") && t.push( r.createElement( D, { key: "opendevtools", onSelected: () => { s.focus(), n.SteamClient.Browser.OpenDevTools(); }, }, "Open Dev Tools", ), ), (0, h.U5)("Browser.InspectElement") && t.push( r.createElement( D, { key: "inspectelement", onSelected: () => { s.focus(), n.SteamClient.Browser.InspectElement(c, m); }, className: I().NoSeparation, }, "Inspect Element", ), )), t.length) ) (0, a.yV)(r.createElement(E, null, t), e, { bRootContextMenu: !0 }); else { if (e.shiftKey) return; e.preventDefault(), e.stopPropagation(); } } (0, i.gn)([v.ak], k.prototype, "BindMenuElement", null), (0, i.gn)([v.ak, (0, g.D)(100)], k.prototype, "OnMenuMutation", null), (0, i.gn)([v.ak], k.prototype, "OnWindowResize", null), (0, i.gn)([v.ak], k.prototype, "OnBlur", null), (0, i.gn)([v.ak], k.prototype, "OnKeyDown", null), (k = (0, i.gn)([o.Pi], k)); const G = "EnableContextMenuBlurDelay3"; function O() { return "true" === (window.localStorage && window.localStorage.getItem(G)); } const F = "DEBUG_StickyContextMenus"; function B() { return window.sessionStorage && "true" == window.sessionStorage.getItem(F); } function x(e) { e ? window.sessionStorage.setItem(F, "true") : window.sessionStorage.removeItem(F); } }, 19285: (e, t, n) => { "use strict"; n.d(t, { P: () => c, s: () => l }); var i = n(85556), o = n(27378), r = n(87018), a = n(97841), s = n.n(a); const l = o.forwardRef((e, t) => { const { className: n, contextMenuStyles: a, disabled: l } = e, c = (0, i._T)(e, ["className", "contextMenuStyles", "disabled"]); return o.createElement("div", Object.assign({}, c, { ref: t, className: (0, r.Z)(n, (a || s()).contextMenuItem, "contextMenuItem", l && "disabled") })); }); function c(e) { const { bChecked: t, children: n, className: a } = e, s = (0, i._T)(e, ["bChecked", "children", "className"]); return o.createElement(l, Object.assign({}, s, { className: (0, r.Z)(a, t && "menuChecked") }), o.createElement("div", { className: "contextMenuCheckMark" }), n); } l.displayName = "MenuItem"; }, 66156: (e, t, n) => { "use strict"; n.d(t, { m: () => c }); var i = n(85556), o = n(27378), r = n(58908), a = n(29512), s = n(87018); class l extends o.Component { render() { let e = this.props, { keyExtractor: t, style: n, duration: l, className: c, children: m } = e, d = (0, i._T)(e, ["keyExtractor", "style", "duration", "className", "children"]); const h = Object.assign(Object.assign({}, n || {}), { transitionDuration: l / 1e3 + "s" }); return o.createElement(r.Z, Object.assign({}, d, { className: (0, s.Z)("crossfade", c) }), o.createElement(a.Z, { classNames: "crossfade-anim", timeout: l || 500, key: t(), style: h }, m)); } } class c extends o.Component { render() { const e = this.props, { src: t } = e, n = (0, i._T)(e, ["src"]), r = { backgroundImage: `url(${t})` }; return o.createElement(l, Object.assign({ style: r, keyExtractor: () => t }, n), o.createElement("div", { className: "crossfade-img" })); } } }, 62019: (e, t, n) => { "use strict"; n.d(t, { D: () => r, R: () => o }); var i = n(27378); const o = i.createContext({}), r = () => i.useContext(o); }, 71224: (e, t, n) => { "use strict"; n.d(t, { $0: () => x, $_: () => C, Ac: () => v, Av: () => O, BQ: () => V, FT: () => D, HV: () => I, KM: () => L, Uq: () => E, V5: () => b, VY: () => R, __: () => f, dQ: () => y, gE: () => H, h4: () => g, iN: () => N, ji: () => U, l0: () => M, o9: () => B, oX: () => k, sg: () => w, tr: () => F, uT: () => S, zx: () => G }); var i = n(85556), o = n(27378), r = n(56320), a = n(83817), s = n(16518), l = n(87018), c = n(84290), m = n(8568), d = n(62019), h = n(21561), u = n(10021), p = n(37091); function _(e) { return o.forwardRef(function (t, n) { return o.createElement(a.s, Object.assign({}, t, { className: (0, l.Z)(e, t.className), ref: n })); }); } let g = (0, p.Sb)("DialogHeader"), C = ((0, p.Sb)("DialogSubHeader"), (0, p.Sb)("DialogFooter")), f = (0, p.Sb)("DialogLabel _DialogLayout"), v = (0, p.Sb)("DialogBodyText"), S = (0, p.Sb)("DialogBody"), b = _("DialogBody"), I = (0, p.Sb)("DialogInnerBody"), y = ((0, p.Sb)("DialogControlsSection"), (0, p.Sb)("DialogControlsSectionHeader")), E = _("DialogTwoColLayout _DialogColLayout"), D = _("DialogThreeColLayout _DialogColLayout"), w = (_("DialogTwoThirdColLayout _DialogColLayout"), (0, p.Sb)("DialogColumn _DialogLayout")); function R(e) { const t = (0, d.D)().Content || A; return o.createElement(t, Object.assign({}, e)); } function A(e) { let { children: t, bCenterVertically: n, refElem: r } = e, a = (0, i._T)(e, ["children", "bCenterVertically", "refElem"]), s = "DialogContent _DialogLayout" + (e.className ? " " + e.className : ""); return n && (s += " _DialogCenterVertically"), o.createElement("div", Object.assign({}, a, { ref: r, className: s }), o.createElement("div", { className: "DialogContent_InnerWidth" }, t)); } class M extends o.Component { OnSubmit(e) { e.preventDefault(), this.props.onSubmit && this.props.onSubmit(e); } render() { return o.createElement("form", Object.assign({}, this.props, { onSubmit: this.OnSubmit })); } } function k(e) { const { classNameContent: t, bCenterVertically: n } = e, r = (0, i._T)(e, ["classNameContent", "bCenterVertically"]); return o.createElement(R, { className: t, bCenterVertically: n }, o.createElement(M, Object.assign({}, r))); } (0, i.gn)([m.a], M.prototype, "OnSubmit", null); const T = o.forwardRef(function (e, t) { const n = (0, d.D)(), { svgicon: a } = e, s = (0, i._T)(e, ["svgicon"]), c = (0, l.Z)(e.className, void 0 !== a && "hasSVGIcon", s.disabled && "Disabled", n.strButtonClassName), m = (e) => { if (!s.disabled && e) return (t) => { t.stopPropagation(), e(t); }; }; return o.createElement(r.wl, Object.assign({ ref: t, onOKActionDescription: s.disabled ? null : void 0, noFocusRing: !!n.strButtonClassName }, s, { className: c, disabled: !1, onClick: m(s.onClick), onPointerDown: m(s.onPointerDown), onPointerUp: m(s.onPointerUp), onPointerCancel: m(s.onPointerCancel), onMouseDown: m(s.onMouseDown), onMouseUp: m(s.onMouseUp), onTouchStart: m(s.onTouchStart), onTouchEnd: m(s.onTouchEnd), onTouchCancel: m(s.onTouchCancel), onSubmit: m(s.onSubmit) }), a && a(), e.children); }), L = o.forwardRef(function (e, t) { return o.createElement(T, Object.assign({ preferredFocus: !0, type: e.onClick ? "button" : "submit" }, e, { ref: t, className: (0, l.Z)(e.className, "DialogButton", "_DialogLayout", "Primary") })); }), G = o.forwardRef(function (e, t) { return o.createElement(T, Object.assign({ type: "button" }, e, { ref: t, className: (0, l.Z)(e.className, "DialogButton", "_DialogLayout", "Secondary") })); }), O = (o.forwardRef(function (e, t) { return o.createElement(T, Object.assign({ type: "button" }, e, { ref: t, className: (0, l.Z)(e.className, "DialogButton", "_DialogLayout", "EmptyButton") })); }), o.forwardRef(function (e, t) { return o.createElement(T, Object.assign({ type: "button" }, e, { ref: t, className: (0, l.Z)(e.className, "DialogButton _DialogLayout Small") })); }), o.forwardRef(function (e, t) { return o.createElement(T, Object.assign({ type: "button" }, e, { ref: t, className: (0, l.Z)(e.className, "TextButton") })); })); function F(e) { let t = "DialogHBar" + (e.className ? " " + e.className : ""); return o.createElement("div", Object.assign({}, e, { className: t })); } function B(e) { return o.createElement(E, null, o.createElement(L, { onClick: e.onOK, disabled: e.bOKDisabled, autoFocus: "primary" == e.focusButton }, e.strOKText || (0, c.Xx)("#Button_Confirm"), " "), o.createElement(G, { onClick: e.onCancel, disabled: e.bCancelDisabled, autoFocus: "secondary" == e.focusButton }, e.strCancelText || (0, c.Xx)("#Button_Cancel"))); } function x(e) { const t = e.bOKDisabled ? G : L, n = e.bOKDisabled ? L : G; return o.createElement(D, null, o.createElement(t, { onClick: e.onOK, disabled: e.bOKDisabled }, e.strOKText || (0, c.Xx)("#Button_Confirm"), " "), o.createElement(n, { onClick: e.onUpdate, disabled: e.bUpdateDisabled }, e.strUpdateText || (0, c.Xx)("#Button_Update"), " "), o.createElement(G, { onClick: e.onCancel, disabled: e.bCancelDisabled }, e.strCancelText || (0, c.Xx)("#Button_Cancel"))); } class N extends o.Component { constructor(e) { super(e), (this.state = { checked: e.checked, disabled: e.disabled }); } componentDidUpdate(e) { this.props.controlled || (e.checked != this.props.checked && this.props.checked != this.state.checked && this.setState({ checked: this.props.checked })), e.disabled != this.props.disabled && this.props.disabled != this.state.disabled && this.setState({ disabled: this.props.disabled }); } shouldComponentUpdate(e, t) { return e.label != this.props.label || e.description != this.props.description || e.onChange != this.props.onChange || e.controlled != this.props.controlled || e.disabled != this.props.disabled || t.disabled != this.state.disabled || e.checked != this.checked || t.checked != this.state.checked; } get checked() { return this.props.controlled ? this.props.checked : this.state.checked; } GetPanelElementProps() { const e = this.props, { onChange: t, checked: n, label: o, description: r, tabIndex: a, disabled: s, className: l, tooltip: c, color: m, highlightColor: d, bottomSeparator: h, controlled: u } = e, p = (0, i._T)(e, ["onChange", "checked", "label", "description", "tabIndex", "disabled", "className", "tooltip", "color", "highlightColor", "bottomSeparator", "controlled"]); return Object.assign(Object.assign({}, p), { tabIndex: a || 0, onActivate: this.Toggle, onKeyDown: this.KeyDown }); } Toggle() { if (this.props.disabled) return; let e = !this.checked; this.props.controlled || this.setState({ checked: e }), this.props.onChange && this.props.onChange(e); } KeyDown(e) { 32 == e.keyCode && (this.Toggle(), e.preventDefault(), e.stopPropagation()); } SetChecked(e, t) { this.setState({ checked: e }), t && this.props.onChange && this.props.onChange(e); } } (0, i.gn)([m.a], N.prototype, "Toggle", null), (0, i.gn)([m.a], N.prototype, "KeyDown", null), (0, i.gn)([m.a], N.prototype, "SetChecked", null); class P extends N { render() { let e = "DialogCheckbox" + (this.checked ? " Active" : ""); return ( 1 == this.state.disabled && (e += " Disabled"), this.props.label ? o.createElement(a.s, Object.assign({ className: "DialogCheckbox_Container _DialogLayout " + (this.props.className ? this.props.className : "") }, this.GetPanelElementProps()), o.createElement("div", { className: e }, o.createElement(s.mKE, { color: this.props.color, highlightColor: this.props.highlightColor })), o.createElement("div", { className: "DialogToggle_Label" }, "string" == typeof this.props.label && o.createElement("span", null, this.props.label), "string" != typeof this.props.label && this.props.label, this.props.tooltip && o.createElement("span", { "data-tooltip-text": this.props.tooltip }, " (?)")), o.createElement("div", { style: { clear: "left" } }), this.props.description && o.createElement("div", { className: "DialogToggle_Description" }, this.props.description)) : o.createElement(a.s, Object.assign({ className: e }, this.GetPanelElementProps()), o.createElement(s.mKE, null)) ); } } class U extends N { render() { return o.createElement(h.T, Object.assign({ fallback: P }, this.props)); } } U.contextType = d.R; class V extends N { render() { let e = this.checked ? " Active" : ""; return o.createElement(a.s, Object.assign({ className: (0, l.Z)("DialogRoundCheckboxField_Container", this.props.className, this.props.label ? "WithLabel" : "") }, this.GetPanelElementProps()), o.createElement("div", { className: "DialogRoundCheckboxField" }, o.createElement("div", { className: "DialogRoundCheckboxField_Control" + e }, o.createElement("div", { className: "DialogRoundCheckboxField_OuterCircle" }, o.createElement("div", { className: "DialogRoundCheckboxField_InnerCircle" })))), this.props.label && o.createElement("div", { className: "DialogToggle_Label" }, o.createElement("span", null, this.props.label), this.props.tooltip && o.createElement("span", { "data-tooltip-text": this.props.tooltip }, " (?)"))); } } const H = o.forwardRef(function (e, t) { const n = (0, d.D)(); return o.createElement(h.T, Object.assign({ component: n.ToggleField, fallback: W, componentRef: t }, e)); }); class W extends N { OnOffKeyDown(e) { (37 == e.keyCode && this.checked) || (39 == e.keyCode && !this.checked) ? (this.Toggle(), e.preventDefault(), e.stopPropagation()) : this.KeyDown(e); } OnNewUIToggle(e) { e !== this.checked && this.Toggle(); } render() { let e = "DialogToggleField _DialogInputContainer _DialogLayout " + (this.props.className ? this.props.className : ""); return ( this.props.disabled && (e += " Disabled"), o.createElement( "div", { className: e, tabIndex: this.props.tabIndex || 0, onKeyDown: this.OnOffKeyDown }, o.createElement("div", { className: "displayColumn alignSelfCenter" }, o.createElement("div", { className: "DialogToggle_Label" }, o.createElement("span", null, this.props.label), this.props.tooltip && o.createElement("span", { "data-tooltip-text": this.props.tooltip }, " (?)")), this.props.description && o.createElement("div", { className: "DialogToggle_Description" }, this.props.description), this.props.children), this.props.useToggleRail ? o.createElement("div", { className: "DialogToggleField_NewUIContainer" }, o.createElement(u.hp, { onChange: this.OnNewUIToggle, value: this.checked })) : o.createElement("div", { className: "DialogToggleField_Control", onClick: this.Toggle }, o.createElement(a.s, { className: "DialogToggleField_OptionPanel", onOKButton: this.Toggle }, o.createElement("div", { className: "DialogToggleField_Option Off" + (this.checked ? "" : " Active") }, (0, c.Xx)("#Dialog_Off")), o.createElement("div", { className: "DialogToggleField_Option On" + (this.checked ? " Active" : "") }, (0, c.Xx)("#Dialog_On")))), ) ); } } (0, i.gn)([m.a], W.prototype, "OnOffKeyDown", null), (0, i.gn)([m.a], W.prototype, "OnNewUIToggle", null); }, 11259: (e, t, n) => { "use strict"; n.d(t, { iN: () => i.iN, uT: () => i.uT, V5: () => i.V5, Ac: () => i.Ac, zx: () => i.zx, sT: () => ke, ji: () => i.ji, sg: () => i.sg, VY: () => i.VY, oX: () => i.oX, Vh: () => Se, CB: () => b, TW: () => V, ry: () => x, gN: () => Me, $_: () => i.$_, l0: () => i.l0, z2: () => Ye, fp: () => tt, tr: () => i.tr, h4: () => i.h4, HV: () => i.HV, II: () => C, __: () => i.__, Uo: () => f, HC: () => $, o9: () => i.o9, $0: () => i.$0, TI: () => ve, KM: () => i.KM, EU: () => R, SY: () => w, RW: () => Y, BQ: () => i.BQ, DS: () => S, Av: () => i.Av, FT: () => i.FT, hp: () => I.hp, gE: () => i.gE, nf: () => I.nf, Uq: () => i.Uq, uV: () => v, Do: () => u.D }); var i = n(71224), o = n(85556), r = n(27378), a = n(16518), s = n(2049), l = n(84290), c = n(39353), m = n(93635), d = n(83817), h = n(56320), u = n(62019), p = n(21561), _ = n(87018); const g = r.forwardRef(function (e, t) { const n = (0, u.D)(); return r.createElement(p.T, Object.assign({ component: null == n ? void 0 : n.InputElement, fallback: h.bX }, e, { componentRef: t })); }); class C extends r.PureComponent { constructor(e) { super(e), this.CheckProps(e), (this.state = { m_CopiedYPos: 0, m_bPlayingCopiedAnimation: !1, m_bCompletedCopiedAnimation: !1, m_bNumberBelowMinRange: !1, m_bNumberAboveMaxRange: !1, m_bIsNotNumeric: !1, m_bIsInvalidURL: !1, m_bIsInvalidEmail: !1, m_bAboveMaxChars: !1 }); } componentDidUpdate(e) { this.CheckProps(this.props); } OnInputRef(e) { (this.m_elInput = e), this.m_elInput && this.props.focusOnMount && this.m_elInput.focus(); } get element() { return this.m_elInput; } get value() { return this.m_elInput && this.m_elInput.value; } Focus() { var e; null === (e = this.m_elInput) || void 0 === e || e.focus(); } static validateUrl(e) { return null != e && (/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/i.test(e) || /^steam:\/\/[-a-zA-Z0-9@:%._\+~#=]{2,256}/i.test(e)); } static validateEmail(e) { return null != e && /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e.toLowerCase()); } Validate() { var e, t, n, i, o; this.setState({ m_bNumberBelowMinRange: null !== this.props.rangeMin && void 0 !== this.props.rangeMin && Number(null === (e = this.m_elInput) || void 0 === e ? void 0 : e.value) < this.props.rangeMin, m_bNumberAboveMaxRange: null !== this.props.rangeMax && void 0 !== this.props.rangeMax && Number(null === (t = this.m_elInput) || void 0 === t ? void 0 : t.value) > this.props.rangeMax, m_bIsNotNumeric: 1 == this.props.mustBeNumeric && isNaN(Number(null === (n = this.m_elInput) || void 0 === n ? void 0 : n.value)), m_bIsInvalidURL: 1 == this.props.mustBeURL && !C.validateUrl(null === (i = this.m_elInput) || void 0 === i ? void 0 : i.value), m_bIsInvalidEmail: 1 == this.props.mustBeEmail && !C.validateEmail(null === (o = this.m_elInput) || void 0 === o ? void 0 : o.value), m_bAboveMaxChars: null != this.props.maxChars && null != this.m_elInput && this.m_elInput.value.length > this.props.maxChars }); } OnChanged(e) { this.props.onChange && this.props.onChange(e), this.Validate(); } OnCopyClick(e) { if (!this.m_elInput) return; this.m_elInput.select(); let t = this.m_elInput.ownerDocument; if (t.queryCommandEnabled("copy")) { t.execCommand("copy"), e.currentTarget.focus(), this.m_CopiedAnimation && this.m_CopiedAnimation.Cancel(); let n = -4, i = -24; this.setState({ m_bCompletedCopiedAnimation: !1 }), this.setState({ m_CopiedYPos: n }, () => { (this.m_CopiedAnimation = new c.P(this, { m_CopiedYPos: i }, { msDuration: 300, timing: "sine", setStateOnComplete: { m_bCompletedCopiedAnimation: !0 } })), this.m_CopiedAnimation.Start(); }); } } OnClearClick(e) { if (this.m_elInput && this.m_elInput.value) { Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set.call(this.m_elInput, ""), this.m_elInput.dispatchEvent(new Event("input", { bubbles: !0 })); } } CheckProps(e) { (0, m.X)(!(e.bShowClearAction || e.bAlwaysShowClearAction) || e.onChange, "In order for bShowClearAction to work correctly, you should be handling onChange and passing value to the Dialog.Input."); } render() { const e = this.props, { label: t, description: n, requiredLabel: s, bShowCopyAction: c, bShowClearAction: m, bAlwaysShowClearAction: h, rangeMin: u, rangeMax: p, mustBeNumeric: _, mustBeURL: C, mustBeEmail: f, focusOnMount: v, tooltip: S, inlineControls: b, maxChars: I } = e, y = (0, o._T)(e, ["label", "description", "requiredLabel", "bShowCopyAction", "bShowClearAction", "bAlwaysShowClearAction", "rangeMin", "rangeMax", "mustBeNumeric", "mustBeURL", "mustBeEmail", "focusOnMount", "tooltip", "inlineControls", "maxChars"]); let E = "DialogInput DialogInputPlaceholder DialogTextInputBase" + (y.className ? " " + y.className : ""), D = "copiedAnimation", w = this.state.m_bCompletedCopiedAnimation; this.m_CopiedAnimation && (D = "copiedAnimation animationPlaying"), w && (D = "copiedAnimation animationComplete"); let R = {}; void 0 !== this.state.m_CopiedYPos && (R.transform = "translateY(" + this.state.m_CopiedYPos + "px)"); let A = r.createElement(r.Fragment, null, r.createElement(d.s, { className: "DialogInput_Wrapper _DialogLayout", "flow-children": "row" }, r.createElement(g, Object.assign({ type: "text" }, y, { className: E, ref: this.OnInputRef, onChange: this.OnChanged })), c && r.createElement("div", { className: "displayRow" }, r.createElement(i.zx, { className: "DialogInput_CopyAction Primary", onClick: this.OnCopyClick }, (0, l.Xx)("#Button_Copy")), r.createElement("div", { style: R, className: D }, (0, l.Xx)("#Button_Copied"))), (h || (m && y.value)) && r.createElement("div", { className: "DialogInput_ClearAction", onClick: this.OnClearClick }, r.createElement(a.pVO, null)), b), n && r.createElement("div", { className: "DialogLabelExplainer" }, n)); return t ? r.createElement( "div", { className: "DialogInputLabelGroup _DialogLayout DialogRequirementLabel" }, r.createElement( "label", null, r.createElement("div", { className: "DialogLabel" }, t, " ", this.props.tooltip && r.createElement("span", { "data-tooltip-text": this.props.tooltip }, " (?)"), r.createElement("span", { className: "DialogInputRequirementLabel" }, this.props.requiredLabel), " "), A, this.state.m_bNumberBelowMinRange ? r.createElement("div", null, " ", (0, l.Xx)("#Input_Error_NumberTooSmall"), " ") : null, this.state.m_bNumberAboveMaxRange ? r.createElement("div", null, " ", (0, l.Xx)("#Input_Error_NumberTooLarge"), " ") : null, this.state.m_bIsInvalidURL ? r.createElement("div", null, " ", (0, l.Xx)("#Input_Error_MustBeURL"), " ") : null, this.state.m_bIsInvalidEmail ? r.createElement("div", null, " ", (0, l.Xx)("#Input_Error_MustBeEmail"), " ") : null, this.state.m_bIsNotNumeric ? r.createElement("div", null, " ", (0, l.Xx)("#Input_Error_MustBeNumber"), " ") : null, this.state.m_bAboveMaxChars ? r.createElement("div", null, " ", (0, l.kQ)("#Input_Error_TooManyCharacters", I), " ") : null, ), ) : A; } } (0, o.gn)([s.ak], C.prototype, "OnInputRef", null), (0, o.gn)([s.ak], C.prototype, "OnChanged", null), (0, o.gn)([s.ak], C.prototype, "OnCopyClick", null), (0, o.gn)([s.ak], C.prototype, "OnClearClick", null); class f extends C { constructor() { super(...arguments), (this.m_bFocused = !1); } OnBackgroundClick() { this.m_elInput && this.m_elInput.focus(); } OnInputFocus(e) { this.m_bFocused || ((this.m_bFocused = !0), this.forceUpdate()), this.props.onFocus && this.props.onFocus(e); } OnInputBlur(e) { this.m_bFocused && ((this.m_bFocused = !1), this.forceUpdate()), this.props.onBlur && this.props.onBlur(e); } render() { const e = this.props, { label: t, description: n, requiredLabel: i, bShowCopyAction: a, bShowClearAction: s, bAlwaysShowClearAction: l, rangeMin: c, rangeMax: m, maxChars: u, mustBeNumeric: p, mustBeURL: g, mustBeEmail: C, focusOnMount: f, tooltip: v, inlineControls: S, className: b, children: I } = e, y = (0, o._T)(e, ["label", "description", "requiredLabel", "bShowCopyAction", "bShowClearAction", "bAlwaysShowClearAction", "rangeMin", "rangeMax", "maxChars", "mustBeNumeric", "mustBeURL", "mustBeEmail", "focusOnMount", "tooltip", "inlineControls", "className", "children"]); return r.createElement( "div", { className: "DialogInputLabelGroup _DialogLayout DialogListBuilderInput" }, r.createElement( "label", null, t && r.createElement("div", { className: "DialogLabel" }, t), r.createElement( "div", { className: (0, _.Z)("_DialogInputContainer", "DialogTextInputBase", this.m_bFocused && "Active"), onClick: this.OnBackgroundClick }, r.createElement( d.s, { className: "DialogListBuilderInput_List", "flow-children": "row" }, r.Children.map(I, (e, t) => r.createElement("div", { className: "DialogListBuilderInput_ListItem", key: t }, e)), r.createElement(h.bX, Object.assign({ type: "text" }, y, { className: "DialogListBuilderInput_Input DialogInputPlaceholder", ref: this.OnInputRef, onFocus: this.OnInputFocus, onBlur: this.OnInputBlur, size: 4 })), ), ), n && r.createElement("div", { className: "DialogLabelExplainer" }, n), ), ); } } (0, o.gn)([s.ak], f.prototype, "OnBackgroundClick", null), (0, o.gn)([s.ak], f.prototype, "OnInputFocus", null), (0, o.gn)([s.ak], f.prototype, "OnInputBlur", null); const v = (e, t) => "" + (null != e ? Number.parseFloat(e.toFixed(3)) : null) + (null != t ? t : ""), S = (e) => { const t = (0, u.D)(); return r.createElement(p.T, Object.assign({ component: t.SliderField, fallback: b }, e)); }; class b extends r.Component { constructor(e) { super(e), (this.m_flLastSetValue = null); } ClampValue(e) { return void 0 === e || isNaN(e) || e < this.props.min ? this.props.min : e > this.props.max ? this.props.max : e; } BPropsValid() { return this.props.max > this.props.min; } OnMouseDown(e) { var t, n; (this.m_elSlider = e.currentTarget), (this.m_rectSlider = this.m_elSlider.getBoundingClientRect()), this.props.onChangeStart && this.props.onChangeStart(1), this.AdjustSliderForClientX(e.clientX, 1), null === (t = this.m_elSlider.ownerDocument.defaultView) || void 0 === t || t.addEventListener("mousemove", this.OnMouseMove), null === (n = this.m_elSlider.ownerDocument.defaultView) || void 0 === n || n.addEventListener("mouseup", this.OnMouseUp); } OnMouseMove(e) { this.AdjustSliderForClientX(e.clientX, 1); } OnMouseUp(e) { var t, n, i, o; null === (n = null === (t = this.m_elSlider) || void 0 === t ? void 0 : t.ownerDocument.defaultView) || void 0 === n || n.removeEventListener("mousemove", this.OnMouseMove), null === (o = null === (i = this.m_elSlider) || void 0 === i ? void 0 : i.ownerDocument.defaultView) || void 0 === o || o.removeEventListener("mouseup", this.OnMouseUp), this.CompleteChange(1); } OnTouchStart(e) { var t, n; (this.m_elSlider = e.currentTarget), (this.m_rectSlider = this.m_elSlider.getBoundingClientRect()), this.props.onChangeStart && this.props.onChangeStart(0), this.AdjustSliderForClientX(e.touches[0].clientX, 0), null === (t = this.m_elSlider.ownerDocument.defaultView) || void 0 === t || t.addEventListener("touchmove", this.OnTouchMove), null === (n = this.m_elSlider.ownerDocument.defaultView) || void 0 === n || n.addEventListener("touchend", this.OnTouchEnd); } OnTouchMove(e) { this.AdjustSliderForClientX(e.touches[0].clientX, 0); } OnTouchEnd(e) { var t, n, i, o; null === (n = null === (t = this.m_elSlider) || void 0 === t ? void 0 : t.ownerDocument.defaultView) || void 0 === n || n.removeEventListener("touchmove", this.OnTouchMove), null === (o = null === (i = this.m_elSlider) || void 0 === i ? void 0 : i.ownerDocument.defaultView) || void 0 === o || o.removeEventListener("touchend", this.OnTouchEnd), this.CompleteChange(0); } OnKeyDown(e) { let t = 1; e.ctrlKey && (t = Math.max(1, Math.floor(0.1 * (this.props.max - this.props.min) + 0.5))), 37 == e.keyCode ? (this.IncrementValue(-1 * t), e.preventDefault()) : 39 == e.keyCode && (this.IncrementValue(1 * t), e.preventDefault()), this.CompleteChange(2); } AdjustSliderForClientX(e, t) { let n = ((e - this.m_rectSlider.left) / (this.m_rectSlider.right - this.m_rectSlider.left)) * (this.props.max - this.props.min) + this.props.min; n = Math.floor(n + 0.5); const i = this.ClampValue(n); i != this.props.value && (this.props.onChange && this.props.onChange(i, t), (this.m_flLastSetValue = i)); } CompleteChange(e) { null != this.m_flLastSetValue && (this.props.onChangeComplete && this.props.onChangeComplete(this.m_flLastSetValue, e), (this.m_flLastSetValue = null)); } IncrementValue(e) { let t = this.ClampValue(this.props.value + e); t != this.props.value && (this.props.onChange && this.props.onChange(t, 2), (this.m_flLastSetValue = t)); } render() { var e; let t = {}, n = {}; if (this.BPropsValid()) { let e = (100 * (this.props.value - this.props.min)) / (this.props.max - this.props.min) + "%"; (t.width = e), (n.left = e); } const i = this.props, { label: a, description: s, tooltip: l } = i, c = ((0, o._T)(i, ["label", "description", "tooltip"]), null !== (e = this.props.renderValue) && void 0 !== e ? e : v); return r.createElement("div", { className: "DialogSlider_Container _DialogInputContainer _DialogLayout" + (this.props.className ? " " + this.props.className : ""), onKeyDown: this.OnKeyDown, tabIndex: this.props.tabIndex || 0 }, a && r.createElement("div", { className: "DialogLabel" }, a, Boolean(l) && r.createElement("span", { "data-tooltip-text": l }, " (?)")), r.createElement("div", { className: "DialogSlider_Slider", onMouseDown: this.OnMouseDown, onTouchStart: this.OnTouchStart }, r.createElement("div", { className: "DialogSlider_Value", style: t }), r.createElement("div", { className: "DialogSlider_Grabber", style: n })), this.props.showValue && r.createElement("div", { className: "DialogLabelExplainer" }, c(this.props.value, this.props.valueSuffix)), s && r.createElement("div", { className: "DialogLabelExplainer" }, s)); } } (0, o.gn)([s.ak], b.prototype, "OnMouseDown", null), (0, o.gn)([s.ak], b.prototype, "OnMouseMove", null), (0, o.gn)([s.ak], b.prototype, "OnMouseUp", null), (0, o.gn)([s.ak], b.prototype, "OnTouchStart", null), (0, o.gn)([s.ak], b.prototype, "OnTouchMove", null), (0, o.gn)([s.ak], b.prototype, "OnTouchEnd", null), (0, o.gn)([s.ak], b.prototype, "OnKeyDown", null); var I = n(10021), y = n(66500), E = n.n(y); const D = r.createContext({ setValue: () => {} }); function w(e) { const { value: t, onChange: n, classNames: i, children: o } = e, a = { value: t, setValue: n }; return r.createElement(D.Provider, { value: a }, r.createElement(d.s, { className: (0, _.Z)(E().Group, "Shared_Radio_Group", i, a.bVertical && E().VerticalGrouping) }, o)); } function R(e) { const { value: t } = e, { value: n, setValue: i } = r.useContext(D); let o = i; const a = t === n; return r.createElement(h.Ks, { className: (0, _.Z)(E().Button, "RadioButton", a && E().Active), onClick: () => o(t) }, e.children); } var A = n(82909), M = n(81034), k = n.n(M), T = n(45788); function L(e) { return "object" == typeof e && "data" in e; } function G(e) { return "object" == typeof e && "options" in e; } function O(e, t) { if (e === t) return !0; if (!Array.isArray(e) || !Array.isArray(t)) return !1; if (e.length != t.length) return !1; for (let n = 0; n < e.length; n++) if (!F(e[n], t[n])) return !1; return !0; } function F(e, t) { return null == e || null == t ? e == t : e.label === t.label && e.tooltip === t.tooltip && G(e) == G(t) && !(G(e) && G(t) && !O(e.options, t.options)) && (!L(e) || !L(t) || e.data === t.data); } function B(e, t) { if (null != e) for (let n = 0; n < e.length; n++) { const i = e[n]; if (L(i) && i.data === t) return i; if (G(i)) { const e = B(i.options, t); if (null != e) return e; } } } function x(e) { const t = (0, u.D)(); return r.createElement(p.T, Object.assign({ component: t.DropDownField, fallback: N }, e)); } function N(e) { const { label: t, tooltip: n, strClassName: i, dropDownControlRef: a } = e, s = (0, o._T)(e, ["label", "tooltip", "strClassName", "dropDownControlRef"]); return r.createElement("div", { className: (0, _.Z)("DialogInputLabelGroup", "_DialogLayout", i) }, t && r.createElement("div", { className: "DialogLabel" }, t, n && r.createElement("span", { "data-tooltip-text": n }, " (?)")), r.createElement(V, Object.assign({ menuLabel: t }, s, { ref: a }))); } const P = r.forwardRef(function (e, t) { const n = (0, u.D)(); return r.createElement(p.T, Object.assign({ component: n.DropDownControlButton, fallback: U, componentRef: t }, e)); }), U = r.forwardRef(function (e, t) { return r.createElement(d.s, { focusable: e.focusable, className: (0, _.Z)(e.className, "DialogDropDown", "_DialogInputContainer", { Active: e.opened, Disabled: e.disabled }), tabIndex: e.tabIndex, onActivate: e.onClick, ref: t }, e.children, !e.disabled && r.createElement("div", { className: (0, _.Z)(e.arrowClassName, "DialogDropDown_Arrow") }, r.createElement(a.$gZ, null))); }); class V extends r.Component { constructor(e) { super(e), (this.state = { value: B(e.rgOptions, e.selectedOption), bOpened: !1 }); } SetSelectedOption(e) { const t = B(this.props.rgOptions, e); F(t, this.state.value) || this.setState({ value: t }); } get value() { return this.state.value; } shouldComponentUpdate(e, t, n) { if (e.selectedOption !== this.props.selectedOption) return !0; if (e.disabled != this.props.disabled) return !0; if (t.bOpened !== this.state.bOpened) return !0; if (!O(this.props.rgOptions, e.rgOptions)) return !0; if (!F(t.value, this.state.value)) return !0; let i = ["selectedOption", "tabIndex", "onChange", "strDefaultLabel"]; for (let t of i) if (e[t] !== this.props[t]) return !0; return !1; } componentDidUpdate(e, t) { var n, i; const o = !O(e.rgOptions, this.props.rgOptions), r = e.selectedOption !== this.props.selectedOption, a = this.state.value !== t.value; (o || a || r) && (r || null == this.state.value ? this.SetSelectedOption(this.props.selectedOption) : this.SetSelectedOption(this.state.value.data)), (o || a) && (this.state.bOpened ? (null === (n = this.m_iMenuInstance) || void 0 === n || n.SetOnHideCallback(void 0), null === (i = this.m_iMenuInstance) || void 0 === i || i.Hide(), (this.m_iMenuInstance = void 0), this.BuildMenu()) : this.m_iMenuInstance && (this.m_iMenuInstance.SetOnHideCallback(void 0), (this.m_iMenuInstance = void 0))); } OnInputRef(e) { this.m_elInput = e; } get element() { return this.m_elInput; } ToggleMenu() { if (this.state.bOpened) this.HideMenu(); else { if (this.props.onMenuWillOpen && 0 == this.props.onMenuWillOpen(this.ShowMenu)) return; this.ShowMenu(); } } OnValueSelected(e, t) { this.HideMenu(), this.setState({ value: t }), this.props.onChange && this.props.onChange(t, this, e); } BuildMenu() { var e, t, n; let i = "DialogMenuPosition"; this.props.strDropDownClassName && (i += " " + this.props.strDropDownClassName); let o = Object.assign({ bOverlapHorizontal: !0, bMatchWidth: !0, bFitToWindow: !0, strClassName: i, bDisableMouseOverlay: this.props.bDisableMouseOverlay }, this.props.contextMenuPositionOptions), a = null === (e = this.props.contextMenuPositionOptions) || void 0 === e ? void 0 : e.onCancel; (this.m_iMenuInstance = (0, A.yV)(r.createElement(W, { rgOptions: this.props.rgOptions, onValueSelected: this.OnValueSelected, onCancel: a, selectedValue: null === (t = this.value) || void 0 === t ? void 0 : t.data, strDropDownMenuCtnClass: this.props.strDropDownMenuCtnClass, strDropDownItemClassName: this.props.strDropDownItemClassName }), this.m_elInput, o)), this.m_iMenuInstance.SetLabel(null !== (n = this.props.menuLabel) && void 0 !== n ? n : "string" == typeof this.props.strDefaultLabel && this.props.strDefaultLabel), this.m_iMenuInstance.SetOnHideCallback(this.HideMenu); } ShowMenu() { this.m_iMenuInstance ? this.m_iMenuInstance.Show() : this.BuildMenu(), this.props.onMenuOpened && this.props.onMenuOpened(), this.setState({ bOpened: !0 }); } HideMenu() { this.m_iMenuInstance && this.m_iMenuInstance.Hide(), this.props.onMenuClose && this.props.onMenuClose(), this.setState({ bOpened: !1 }); } render() { var e, t, n, i, o; const a = r.createElement("div", { className: "DialogDropDown_CurrentDisplay" }, null !== (t = null === (e = this.state.value) || void 0 === e ? void 0 : e.label) && void 0 !== t ? t : this.props.strDefaultLabel), s = null != this.props.renderButtonValue ? this.props.renderButtonValue(a) : a, l = null === (n = this.props.focusable) || void 0 === n || n; return r.createElement(p.T, { component: this.props.renderButton, fallback: P, focusable: l, disabled: null !== (i = this.props.disabled) && void 0 !== i && i, opened: this.state.bOpened, onClick: this.props.disabled ? void 0 : this.ToggleMenu, tabIndex: null !== (o = this.props.tabIndex) && void 0 !== o ? o : l ? 0 : void 0, componentRef: this.OnInputRef, className: this.props.strDropDownButtonClassName, arrowClassName: this.props.arrowClassName }, s); } } (V.contextType = u.R), (0, o.gn)([s.ak], V.prototype, "OnInputRef", null), (0, o.gn)([s.ak], V.prototype, "ToggleMenu", null), (0, o.gn)([s.ak], V.prototype, "OnValueSelected", null), (0, o.gn)([s.ak], V.prototype, "ShowMenu", null), (0, o.gn)([s.ak], V.prototype, "HideMenu", null); const H = r.createContext(null); function W(e) { const t = (0, u.D)(); return r.createElement(H.Provider, { value: {} }, r.createElement(p.T, Object.assign({ component: t.DropDownMenu, fallback: X }, e))); } function X(e) { var t; const n = [e.rgOptions], i = []; for (; n.length > 0; ) null === (t = n.shift()) || void 0 === t || t.forEach((t, o) => { L(t) ? i.push(r.createElement("div", { key: o, className: (0, _.Z)(k().DialogDropDownMenu_Item, e.strDropDownItemClassName, t.strOptionClass), "data-dropdown-index": o, onClick: (n) => e.onValueSelected && e.onValueSelected(n, t) }, Boolean(t.tooltip) ? r.createElement(T.HP, { toolTipContent: t.tooltip, bTopmost: !0, className: "TooltipContainer" }, t.label) : r.createElement("div", null, t.label))) : G(t) && n.push(t.options); }); return r.createElement("div", { className: (0, _.Z)(k().DialogDropDownMenu, "_DialogInputContainer", e.strDropDownMenuCtnClass) }, i); } class j extends r.Component { constructor() { super(...arguments), (this.state = { rgOptions: void 0 }); } OnMenuOpened() { return (0, o.mG)(this, void 0, void 0, function* () { if (!this.state.rgOptions) { let e = yield this.props.fnLoadOptions(); this.setState({ rgOptions: e }); } }); } render() { const e = this.props, { fnLoadOptions: t, strInitialDisplay: n, initialValue: i } = e, a = (0, o._T)(e, ["fnLoadOptions", "strInitialDisplay", "initialValue"]); let { rgOptions: s } = this.state; return void 0 === s && (n || i ? ((s = [{ label: n, data: i }]), (a.selectedOption = i)) : (s = [])), r.createElement(x, Object.assign({}, a, { rgOptions: s, onMenuOpened: this.OnMenuOpened })); } } (0, o.gn)([s.ak], j.prototype, "OnMenuOpened", null); n(76362); var z = n(79588), K = n(90729), q = n(9824), Z = n(59702); const Q = new (n(77385).sO)("DragDrop").Debug; function $(e) { return e.children; } class Y extends r.Component { constructor() { super(...arguments), (this.m_coordinator = new ee()); } OnDrop(e, t) { t > e && t--, t != e && this.props.onReorder(e, t); } render() { let e = []; return ( e.push(r.createElement(re, { coordinator: this.m_coordinator, key: "dropregion_top", fnBAcceptDraggable: (e) => 0 != e.props.data, fnOnDrop: (e) => this.OnDrop(e.props.data, 0) })), r.Children.forEach(this.props.children, (t, n) => { const i = t.props.id || "__list_" + n, o = n + 1; e.push(r.createElement(te, { coordinator: this.m_coordinator, data: n, key: i }, t)), e.push(r.createElement(re, { coordinator: this.m_coordinator, key: "dropregion_" + i, fnBAcceptDraggable: (e) => e.props.data != o, fnOnDrop: (e) => this.OnDrop(e.props.data, o) })); }), r.createElement("div", { className: "DialogReorderableList" }, e) ); } } function J(e, t, n, i) { return i ? n && e > n.left && e < n.right && t > n.top && t < n.bottom : n && e >= n.left && e <= n.right && t >= n.top && t <= n.bottom; } (0, o.gn)([s.ak], Y.prototype, "OnDrop", null); class ee { constructor() { (this.m_embeddedElement = new K.AN("DragGhosts")), (this.m_rgDropRegions = []), (this.m_rgActiveDropRegions = []), (this.m_prevClientX = 0), (this.m_prevClientY = 0); } RegisterDropRegion(e) { this.m_rgDropRegions.push(e), this.m_activeDraggable && e.BAcceptDraggable(this.m_activeDraggable) && (e.OnDragStarted(this.m_activeDraggable), this.m_rgActiveDropRegions.push(e)); } UnregisterDropRegion(e) { q.Zf(this.m_rgDropRegions, e), q.Zf(this.m_rgActiveDropRegions, e), this.m_activeDropRegion == e && ((this.m_activeDropRegion = void 0), this.m_activeDraggable && this.ShowDragGhost()); } OnDragGhostRef(e) { this.m_dragGhost = e; } ShowDragGhost() { const e = this.m_activeDraggable.renderDragGhost(), t = (0, _.Z)(e.props.className, !!this.m_activeDropRegion && "DraggedOverActiveDrop"), n = r.cloneElement(e, { ref: this.OnDragGhostRef, className: t }); this.m_embeddedElement.ShowElement(this.m_activeDraggable.GetDragDocument(), n, this.m_activeDraggable); } HideDragGhost() { this.m_embeddedElement.HideElement(this.m_activeDraggable.GetDragDocument(), this.m_activeDraggable); } MakeDragClone(e) { (0, m.X)(!this.m_nodeCloneCopy && !this.m_elCloneOriginal, "Drag already in progress"), (this.m_elCloneOriginal = e.m_divRef.current), (this.m_nodeCloneCopy = this.m_elCloneOriginal.cloneNode(!0)), e.m_divRef.current.replaceWith(this.m_nodeCloneCopy), this.m_elCloneContainer || ((this.m_elCloneContainer = e.GetDragDocument().body.ownerDocument.createElement("div")), e.GetDragDocument().body.appendChild(this.m_elCloneContainer)), this.m_elCloneContainer.appendChild(this.m_elCloneOriginal); } ReverseDragClone() { var e; null === (e = this.m_nodeCloneCopy.parentNode) || void 0 === e || e.replaceChild(this.m_elCloneOriginal, this.m_nodeCloneCopy), (this.m_nodeCloneCopy = void 0), (this.m_elCloneOriginal = void 0); } OnDragStart(e) { (this.m_activeDraggable = e), (this.m_rgActiveDropRegions = []); for (let t of this.m_rgDropRegions) t.BAcceptDraggable(e) && (t.OnDragStarted(e), this.m_rgActiveDropRegions.push(t)); this.MakeDragClone(e), this.ShowDragGhost(); } EndDrag() { if (this.m_activeDraggable) { this.ReverseDragClone(), this.HideDragGhost(), this.m_activeDropRegion && this.m_activeDropRegion.OnDrop(this.m_activeDraggable); for (let e of this.m_rgActiveDropRegions) e.OnDragEnded(this.m_activeDraggable); (this.m_activeDraggable = void 0), (this.m_dropGhost = void 0), (this.m_rgActiveDropRegions = []); } } FindBestActiveDropRegionForPoint(e, t) { const n = this.m_activeDraggable.GetDragDocument(); let i; if (("elementsFromPoint" in n && (i = n.elementsFromPoint(e, t)), i)) { const e = new Map(); this.m_rgActiveDropRegions.forEach((t) => e.set(t.GetElement(), t)); for (const t of i) { const n = e.get(t); if (n) return n; } } else { if (this.m_activeDropRegion && this.m_activeDropRegion.BDraggableInRegion(e, t, this.m_activeDraggable)) return this.m_activeDropRegion; for (let n = this.m_rgActiveDropRegions.length - 1; n >= 0; n--) { const i = this.m_rgActiveDropRegions[n]; if (i.BDraggableInRegion(e, t, this.m_activeDraggable)) return i; } } } OnDrag(e, t, n) { var i, o; const r = this.m_prevClientX || t, a = this.m_prevClientY || n; if ((e.props.bEnableHTMLDrag && this.m_dragOffWindowTimer && window.clearTimeout(this.m_dragOffWindowTimer), this.m_dragGhost)) { const t = void 0 === r ? 0 : r - (null !== (i = this.m_dragGhost.state.clientX) && void 0 !== i ? i : 0), n = void 0 === a ? 0 : a - (null !== (o = this.m_dragGhost.state.clientY) && void 0 !== o ? o : 0); if ((this.m_dragGhost.setState({ clientX: r, clientY: a, clientXDelta: t, clientYDelta: n, bVisible: !0 }), e.props.bEnableHTMLDrag && (t || n))) { const i = r + t, o = a + n, s = e.GetDragDocument().body.getBoundingClientRect(); if (J(r, a, s) && !J(i, o, s, !0)) { const t = Z.r4(i, s.left, s.right, s.left - 200, s.right + 200), n = Z.r4(o, s.top, s.bottom, s.top - 100, s.bottom + 100), r = 50; this.m_dragOffWindowTimer = window.setTimeout(() => { e == this.m_activeDraggable && this.OnDrag(e, t, n); }, r); } } } const s = this.FindBestActiveDropRegionForPoint(r, a); (this.m_prevClientX = t), (this.m_prevClientY = n), !!this.m_activeDropRegion != !!s && (this.ShowDragGhost(), this.m_dropGhost || (this.m_dropGhost = this.m_activeDraggable.renderDropGhost())), this.m_activeDropRegion && this.m_activeDropRegion != s && this.m_activeDropRegion.OnDragLeave(this.m_activeDraggable), s && this.m_activeDropRegion != s && s.OnDragEnter(this.m_activeDraggable, this.m_dropGhost), (this.m_activeDropRegion = s), this.m_activeDropRegion && this.m_activeDropRegion.OnDragMove(r, a, this.m_activeDraggable); } } (0, o.gn)([s.ak], ee.prototype, "OnDragGhostRef", null); class te extends r.Component { constructor(e) { super(e), (this.m_DragInfo = { bStarted: !1, startClientX: void 0, startClientY: void 0, startOffsetX: void 0, startOffsetY: void 0, startWidth: void 0, startHeight: void 0, ownerWin: void 0 }), (this.m_divRef = r.createRef()), (0, z.rC)(this); } GetDragDocument() { var e; return null === (e = this.m_DragInfo.ownerWin) || void 0 === e ? void 0 : e.document; } RecordDragStart(e, t, n) { (this.m_DragInfo.startClientX = t), (this.m_DragInfo.startClientY = n); let i = e.getBoundingClientRect(); (this.m_DragInfo.startOffsetX = t - i.left), (this.m_DragInfo.startOffsetY = n - i.top), (this.m_DragInfo.startWidth = i.width), (this.m_DragInfo.startHeight = i.height), (this.m_DragInfo.ownerWin = e.ownerDocument.defaultView); } ProcessDragMove(e) { var t, n; Q("ProcessDragMove", e, this.props.data); const [i, o] = (function (e) { if ("touches" in e) { let t = e; return [t.touches[0].clientX, t.touches[0].clientY]; } return [e.clientX, e.clientY]; })(e); if (this.m_DragInfo.bStarted) { if (this.props.bEnableHTMLDrag && 0 == i && 0 == o) return; this.props.coordinator.OnDrag(this, i, o); } else Math.pow(i - (null !== (t = this.m_DragInfo.startClientX) && void 0 !== t ? t : 0), 2) + Math.pow(o - (null !== (n = this.m_DragInfo.startClientY) && void 0 !== n ? n : 0), 2) >= 25 && ((this.m_DragInfo.bStarted = !0), this.forceUpdate(), this.props.fnOnDragStart && this.props.fnOnDragStart(), this.props.coordinator.OnDragStart(this), this.props.coordinator.OnDrag(this, i, o)); } OnMouseDown(e) { var t, n; this.m_DragInfo.bStarted || 0 != e.button || (this.RecordDragStart(e.currentTarget, e.clientX, e.clientY), null === (t = this.m_DragInfo.ownerWin) || void 0 === t || t.addEventListener("mousemove", this.ProcessDragMove), null === (n = this.m_DragInfo.ownerWin) || void 0 === n || n.addEventListener("mouseup", this.OnMouseUp)); } OnMouseUp(e) { var t, n; null === (t = this.m_DragInfo.ownerWin) || void 0 === t || t.removeEventListener("mousemove", this.ProcessDragMove), null === (n = this.m_DragInfo.ownerWin) || void 0 === n || n.removeEventListener("mouseup", this.OnMouseUp), this.ResetDragState(); } OnTouchStart(e) { var t, n; this.m_DragInfo.bStarted || (this.RecordDragStart(e.currentTarget, e.touches[0].clientX, e.touches[0].clientY), null === (t = this.m_DragInfo.ownerWin) || void 0 === t || t.addEventListener("touchmove", this.ProcessDragMove), null === (n = this.m_DragInfo.ownerWin) || void 0 === n || n.addEventListener("touchend", this.OnTouchEnd)); } OnTouchEnd(e) { var t, n; null === (t = this.m_DragInfo.ownerWin) || void 0 === t || t.removeEventListener("touchmove", this.ProcessDragMove), null === (n = this.m_DragInfo.ownerWin) || void 0 === n || n.removeEventListener("touchend", this.OnTouchEnd), this.ResetDragState(); } ResetDragState() { Q("ResetDragState", this.props.data), this.m_DragInfo.bStarted && (this.props.coordinator.EndDrag(), this.props.fnOnDragEnd && this.props.fnOnDragEnd()), (this.m_DragInfo.bStarted = !1), (this.m_DragInfo.startClientX = void 0), (this.m_DragInfo.startClientY = void 0), (this.m_DragInfo.startOffsetX = void 0), (this.m_DragInfo.startOffsetY = void 0), (this.m_DragInfo.ownerWin = void 0), this.forceUpdate(); } OnHTMLDragStart(e) { var t, n; Q("HTMLDragStart", e, this.props.data, this.props.strHTMLDragData), (e.dataTransfer.effectAllowed = "copyMove"), this.props.strHTMLDragData && this.props.strHTMLDragData.forEach((t, n) => e.dataTransfer.setData(n, t)), e.dataTransfer.getData("text/plain") || e.dataTransfer.setData("text/plain", this.props.data.toString()); const i = new Image(); e.dataTransfer.setDragImage(i, 0, 0), this.RecordDragStart(e.currentTarget, e.clientX, e.clientY), null === (t = this.m_DragInfo.ownerWin) || void 0 === t || t.addEventListener("drag", this.OnHTMLDrag), null === (n = this.m_DragInfo.ownerWin) || void 0 === n || n.addEventListener("dragend", this.OnHTMLDragEnd); } OnHTMLDrag(e) { var t; Q("HTMLDrag", e, null === (t = e.dataTransfer) || void 0 === t ? void 0 : t.types.length), this.ProcessDragMove(e); } OnHTMLDragEnd(e) { var t, n, i; Q("HTMLDragEnd", e, (null === (t = e.dataTransfer) || void 0 === t ? void 0 : t.getData("text/plain")) || "NOTHING", this.props.data), null === (n = this.m_DragInfo.ownerWin) || void 0 === n || n.removeEventListener("drag", this.OnHTMLDrag), null === (i = this.m_DragInfo.ownerWin) || void 0 === i || i.removeEventListener("dragend", this.OnHTMLDragEnd), this.ResetDragState(); } render() { const e = this.props, { coordinator: t, data: n, bEnableHTMLDrag: i, strHTMLDragData: a, fnOnDragStart: s, fnOnDragEnd: l, fnRenderDragGhost: c, fnRenderDropGhost: m, className: d, strActiveClassName: h, children: u } = e, p = (0, o._T)(e, ["coordinator", "data", "bEnableHTMLDrag", "strHTMLDragData", "fnOnDragStart", "fnOnDragEnd", "fnRenderDragGhost", "fnRenderDropGhost", "className", "strActiveClassName", "children"]); let g = {}, C = d || "DialogDraggable"; return this.m_DragInfo.bStarted ? ((C = (0, _.Z)(C, h || "DraggedOut")), i && (g = { onDragEnd: this.OnHTMLDragEnd })) : (g = i ? { onDragStart: this.OnHTMLDragStart } : { onMouseDown: this.OnMouseDown, onTouchStart: this.OnTouchStart }), r.createElement("div", Object.assign({ ref: this.m_divRef, className: C }, g, p, { draggable: i }), u); } renderDropGhost() { return this.props.fnRenderDropGhost ? this.props.fnRenderDropGhost() : r.createElement(ne, { elContent: this.GetClone() }); } renderDragGhost() { return this.props.fnRenderDragGhost ? this.props.fnRenderDragGhost() : r.createElement(ie, { elContent: this.GetClone(), offsetX: this.m_DragInfo.startOffsetX, offsetY: this.m_DragInfo.startOffsetY, width: this.m_DragInfo.startWidth, height: this.m_DragInfo.startHeight }); } GetClone() { const e = this.m_divRef.current; let t; if (e && e.childElementCount) if (1 == e.childElementCount) t = e.firstElementChild.cloneNode(!0); else { t = document.createElement("div"); for (let n = e.firstChild; n; n = n.nextSibling) t.appendChild(n.cloneNode(!0)); } return t; } } (0, o.gn)([s.ak], te.prototype, "ProcessDragMove", null), (0, o.gn)([s.ak], te.prototype, "OnMouseDown", null), (0, o.gn)([s.ak], te.prototype, "OnMouseUp", null), (0, o.gn)([s.ak], te.prototype, "OnTouchStart", null), (0, o.gn)([s.ak], te.prototype, "OnTouchEnd", null), (0, o.gn)([z.aD], te.prototype, "ResetDragState", null), (0, o.gn)([s.ak], te.prototype, "OnHTMLDragStart", null), (0, o.gn)([s.ak], te.prototype, "OnHTMLDrag", null), (0, o.gn)([s.ak], te.prototype, "OnHTMLDragEnd", null); class ne extends r.Component { OnRef(e) { e && this.props.elContent && e.appendChild(this.props.elContent); } render() { return r.createElement("div", { className: "DialogDraggable_DropGhost", ref: this.OnRef }); } } (0, o.gn)([s.ak], ne.prototype, "OnRef", null); class ie extends r.Component { constructor() { super(...arguments), (this.state = { clientX: void 0, clientY: void 0, bVisible: !0, clientXDelta: void 0, clientYDelta: void 0 }); } OnRef(e) { e && this.props.elContent && e.appendChild(this.props.elContent); } CalculateRotationDegrees(e) { if (!e || Math.abs(e) < 4) return 0; return (e > 0 ? 7.5 : -7.5) * Math.sqrt(Math.abs(e)); } render() { var e; if (!this.state.bVisible || void 0 === this.state.clientX || void 0 === this.state.clientY) return r.createElement("div", null); let t = { left: this.state.clientX - (this.props.offsetX || 0), top: this.state.clientY - (this.props.offsetY || 0), width: this.props.width || "auto", height: this.props.height || "auto", perspective: "600px" }, n = Z.r4(this.CalculateRotationDegrees(this.state.clientYDelta), -90, 90, 2, 0), i = { transform: `rotateX(${this.CalculateRotationDegrees(-1 * (null !== (e = this.state.clientYDelta) && void 0 !== e ? e : 0))}deg) rotateY( ${this.CalculateRotationDegrees(this.state.clientXDelta)}deg)`, transition: "transform .16s ease-out, filter .16s ease-out", filter: "brightness(" + n + ")" }; const o = this.props.className || "DialogDraggable_DragGhost"; return r.createElement("div", { className: o, style: t }, r.createElement("div", { ref: this.OnRef, style: i })); } } (0, o.gn)([s.ak], ie.prototype, "OnRef", null); class oe extends r.Component { constructor(e) { super(e), (this.m_divRef = r.createRef()), (this.state = {}); } componentDidMount() { this.props.coordinator.RegisterDropRegion(this); } componentWillUnmount() { this.props.coordinator.UnregisterDropRegion(this); } OnDragStarted(e) { this.setState({ bDraggableActive: !0 }); } OnDragEnded(e) { this.setState({ bDraggableActive: !1 }); } OnDragEnter(e, t) { this.setState({ dropGhost: t }), this.props.fnOnDragEnter && this.props.fnOnDragEnter(e); } OnDragLeave(e) { this.setState({ dropGhost: void 0 }), this.props.fnOnDragLeave && this.props.fnOnDragLeave(e); } OnDragMove(e, t, n) {} OnDrop(e) { this.setState({ dropGhost: void 0 }), this.props.fnOnDrop(e); } BAcceptDraggable(e) { return !this.props.fnBAcceptDraggable || this.props.fnBAcceptDraggable(e); } BDraggableInRegion(e, t, n) { return J(e, t, this.GetClientRect()); } GetElement() { return this.m_divRef.current; } GetClientRect() { return this.m_divRef.current && this.m_divRef.current.getBoundingClientRect(); } render() { const e = this.props, { coordinator: t, fnBAcceptDraggable: n, fnOnDrop: i, fnOnDragEnter: a, fnOnDragLeave: s, className: l, strActiveClassName: c, children: m, focusable: d } = e, u = (0, o._T)(e, ["coordinator", "fnBAcceptDraggable", "fnOnDrop", "fnOnDragEnter", "fnOnDragLeave", "className", "strActiveClassName", "children", "focusable"]), p = (0, _.Z)(l || "DialogDropRegion", this.state.bDraggableActive && (c || "Active")); return r.createElement(h.Ks, Object.assign({ ref: this.m_divRef, className: p }, u, { focusable: void 0 === d ? !!u.onClick : d }), this.state.dropGhost, m); } } class re extends oe { BDraggableInRegion(e, t, n) { let i = this.GetClientRect(); return !!i && e >= i.left && e <= i.right && t >= i.top - 20 && t <= i.bottom + 20; } } var ae = n(55981), se = n(70283), le = n(38571), ce = n(3067), me = n.n(ce), de = n(62860), he = n(83666); class ue { constructor() { (this.m_flPageListScrollTop = 0), (this.m_flPageScrollTop = 0), (0, z.rC)(this); } } (0, o.gn)([z.LO], ue.prototype, "m_flPageListScrollTop", void 0), (0, o.gn)([z.LO], ue.prototype, "m_flPageScrollTop", void 0); class pe { static Get() { return pe.s_Instance || (pe.s_Instance = new pe()), pe.s_Instance; } constructor() { (this.m_setPagedSettingsInstances = new Set()), (0, z.rC)(this); } } (0, o.gn)([z.LO], pe.prototype, "m_setPagedSettingsInstances", void 0); const _e = r.forwardRef(function (e, t) { return r.createElement(d.s, Object.assign({ ref: t, navEntryPreferPosition: de.c4.PREFERRED_CHILD }, e)); }); function ge(e) { const { title: t, icon: n, active: i, className: a, onClick: s } = e, l = (0, o._T)(e, ["title", "icon", "active", "className", "onClick"]); return r.createElement("div", { className: a, onClick: s }, n ? r.createElement("div", { className: me().PageListItem_Icon }, n) : null, r.createElement("div", Object.assign({ className: me().PageListItem_Title }, l), t)); } function Ce(e) { var t; const n = null !== (t = e.activePage.padding) && void 0 !== t ? t : "standard"; return r.createElement(i.VY, { className: (0, _.Z)(e.stylesheet.PagedSettingsDialog_PageContent, e.activePage.pageClassName, { [e.stylesheet.NoPadding]: "none" == n }), refElem: e.refForScrollingContainer }, e.activePage.header, !e.hideTitle && r.createElement(i.h4, null, e.activePage.title), r.createElement(le.SV, { errorKey: e.activePage.title }, e.activePage.content)); } function fe(e) { return r.createElement("div", { className: (0, _.Z)(me().PageListSeparator, { [me().Transparent]: e.bTransparent }) }); } function ve(e) { const t = (0, u.D)(); return r.createElement(p.T, Object.assign({ component: t.PagedSettings, fallback: Se }, e)); } const Se = r.forwardRef(function (e, t) { var n, i; const o = null !== (n = e.stylesheet) && void 0 !== n ? n : me(), a = e.pages, l = null != e.startingPage ? a.findIndex((t) => "object" == typeof t && t.identifier === e.startingPage) : -1, c = null == e.page, [m, h] = r.useState(l); let u = m; c || (u = a.findIndex((t) => "object" == typeof t && t.identifier === e.page)), (u < 0 || u >= a.length) && (u = 0); let p = null; "object" == typeof a[u] && (p = a[u]); let g = (function (e) { let t = r.useRef(e), n = r.useRef("none"), i = t.current; if (i == e) return n.current; let o = "none"; i < e ? (o = "down") : i > e && (o = "up"); return (t.current = e), (n.current = o), o; })(u); const C = r.useRef(null), f = r.useCallback(() => { var e; return null === (e = C.current) || void 0 === e ? void 0 : e.TakeFocus(); }, [C]), v = (e) => { e && b(!0); }, [S, b] = r.useState(!1), I = a.map((t, n) => { if ("separator" === t) { const t = n === u + 1 || n === u - 1; return r.createElement(r.Fragment, { key: n }, e.renderPageListSeparator ? e.renderPageListSeparator({}) : r.createElement(fe, { bTransparent: t })); } if ("spacer" === t) return r.createElement("div", { key: n, className: me().PageListSpacer }); if (!1 === t.visible) return null; const i = t == p, a = t.identifier || t.title || n.toString(), s = e.renderPageListItem || ge; return r.createElement(s, { className: (0, _.Z)(o.PagedSettingsDialog_PageListItem, { [o.Active]: i }), key: a, onClick: () => { v(!0), se.LT.PlayNavSound(se.qr.PagedNavigation), e.onPageRequested && e.onPageRequested(t.identifier), t.click ? t.click() : c && n != m && h(n); }, title: t.title, icon: t.icon, active: i, }); }), y = r.useRef(null), E = null == p ? void 0 : p.hideTitle, D = null === (i = e.showTitle) || void 0 === i || i, w = (0, _.Z)("DialogContentTransition", o.PagedSettingDialog_ContentColumn); r.useEffect(() => { var t; e.focusChild && (null === (t = y.current) || void 0 === t || t.TakeFocus()); }, []); const R = e.renderPageAnimation && p ? e.renderPageAnimation : Ie, A = r.useMemo(() => new ue(), []); r.useEffect( () => ( pe.Get().m_setPagedSettingsInstances.add(A), () => { pe.Get().m_setPagedSettingsInstances.delete(A); } ), [A], ); const { refForPageList: M, refForPage: k } = (function (e) { const t = r.useCallback((t) => (e.m_flPageListScrollTop = t.currentTarget.scrollTop), [e]), n = r.useCallback((t) => (e.m_flPageScrollTop = t.currentTarget.scrollTop), [e]), i = (0, s.eF)("scroll", t), o = (0, s.eF)("scroll", n), a = r.useCallback( (t) => { var n; return (e.m_flPageListScrollTop = null !== (n = null == t ? void 0 : t.scrollTop) && void 0 !== n ? n : 0); }, [e], ), l = r.useCallback( (t) => { var n; return (e.m_flPageScrollTop = null !== (n = null == t ? void 0 : t.scrollTop) && void 0 !== n ? n : 0); }, [e], ), c = (0, s.BE)(i, a), m = (0, s.BE)(o, l); return { refForPageList: c, refForPage: m }; })(A), T = (function (e, t) { const n = r.useMemo(() => new Map(), []), i = r.useRef(); i.current = e; const o = r.useRef(); o.current = t; const a = r.useCallback( (e) => (t) => { n.set(e, t), e === i.current && (0, s.k$)(o.current, t); }, [n], ); return r.useEffect(() => ((0, s.k$)(t, e && n.get(e)), () => (0, s.k$)(t, void 0)), [n, e, t]), a; })(null == p ? void 0 : p.identifier, k); return r.createElement( d.s, { className: (0, _.Z)(o.PagedSettingsDialog, e.className), ref: t }, r.createElement( d.s, { className: (0, _.Z)(o.PagedSettingsDialog_PageListColumn, e.hideList && me().Hidden, "PageListColumn"), navRef: C, onButtonDown: (e) => { var t; e.detail.button == ae.eV.OK && (null === (t = y.current) || void 0 === t || t.TakeFocus(e.detail.button)); }, onFocusWithin: v, }, D && r.createElement("div", { className: o.PagedSettingsDialog_Title }, e.title), e.topControls && r.createElement("div", null, e.topControls), r.createElement(_e, { className: (0, _.Z)(o.PagedSettingsDialog_PageList, e.disablePageListScrolling && o.PagedSettingsDialog_PageList_DisableScrolling, D && o.PagedSettingsDialog_PageList_ShowTitle, e.bNoHeaderPadding && o.PageSettingsDialog_PageList_NoHeaderPadding), onFocusWithin: v, ref: M }, I), e.bottomControls && r.createElement("div", null, e.bottomControls), ), r.createElement(d.s, { className: w, onCancelButton: S ? f : void 0, navRef: y }, e.toggleHideList && r.createElement(be, { hideList: e.hideList, toggleHideList: e.toggleHideList }), r.createElement(R, { activePage: p, direction: g }, p && r.createElement(Ce, { refForScrollingContainer: T(p.identifier), key: p.identifier, stylesheet: o, hideTitle: E, activePage: p }))), ); }); function be(e) { const { hideList: t, toggleHideList: n } = e; return r.createElement("div", { className: (0, _.Z)(me().HidePageListButton, t && me().ListHidden), onClick: n }, t ? r.createElement(he.vVQ, { direction: "right" }) : r.createElement(he.vVQ, { direction: "left" })); } function Ie(e) { return r.createElement(r.Fragment, null, e.children); } class ye extends r.Component { constructor() { super(...arguments), (this.m_refTextArea = r.createRef()), (this.m_cEntryLength = Number.MAX_VALUE); } get textarea() { return this.m_refTextArea.current; } get value() { var e; return null === (e = this.m_refTextArea.current) || void 0 === e ? void 0 : e.value; } focus() { var e; null === (e = this.m_refTextArea.current) || void 0 === e || e.focus(); } InternalOnInput() { const e = this.m_refTextArea.current, t = this.GetMinHeight(), n = this.GetMaxHeight(); let i, o = e.value.length; if ((void 0 === this.m_nTextAreaPadding && this.CalculatePadding(), o < this.m_cEntryLength && ((i = window.scrollY), (e.style.height = t + "px")), e.scrollHeight > n)) (e.style.height = n + "px"), (e.style.overflow = "auto"); else if (e.scrollHeight != e.clientHeight) { let n = Math.max(e.scrollHeight, t); (e.style.height = n - this.m_nTextAreaPadding + "px"), "auto" == e.style.overflow && (e.style.overflow = "hidden"); } void 0 !== i && window.scrollTo(window.scrollX, i), (this.m_cEntryLength = o); } CalculatePadding() { const e = getComputedStyle(this.m_refTextArea.current); this.m_nTextAreaPadding = parseFloat(e.paddingTop) + parseFloat(e.paddingBottom); } GetMinHeight() { return this.props.nMinHeight || 20; } GetMaxHeight() { return this.props.nMaxHeight || 500; } DeferredInternalOnInput() { window.setTimeout(this.InternalOnInput, 1); } OnKeyUp(e) { this.InternalOnInput(), this.props.onKeyUp && this.props.onKeyUp(e); } OnBlur(e) { this.DeferredInternalOnInput(), this.props.onBlur && this.props.onBlur(e); } OnClick(e) { this.InternalOnInput(), this.props.onClick && this.props.onClick(e); } OnPaste(e) { this.DeferredInternalOnInput(), this.props.onPaste && this.props.onPaste(e); } OnCut(e) { this.InternalOnInput(), this.props.onCut && this.props.onCut(e); } componentDidMount() { (this.m_refTextArea.current.style.overflow = "hidden"), (this.m_refTextArea.current.style.resize = "none"), this.InternalOnInput(); } componentDidUpdate(e) { var t; (e.nMinHeight == this.props.nMinHeight && e.nMaxHeight == this.props.nMaxHeight) || (this.m_cEntryLength = Number.MAX_VALUE), (null === (t = this.m_refTextArea.current) || void 0 === t ? void 0 : t.value.length) != this.m_cEntryLength && this.InternalOnInput(); } render() { const e = this.props, { nMinHeight: t, nMaxHeight: n } = e, i = (0, o._T)(e, ["nMinHeight", "nMaxHeight"]); return r.createElement(h.DP, Object.assign({}, i, { ref: this.m_refTextArea, onKeyUp: this.OnKeyUp, onBlur: this.OnBlur, onClick: this.OnClick, onPaste: this.OnPaste, onCut: this.OnCut })); } } (0, o.gn)([s.ak], ye.prototype, "InternalOnInput", null), (0, o.gn)([s.ak], ye.prototype, "OnKeyUp", null), (0, o.gn)([s.ak], ye.prototype, "OnBlur", null), (0, o.gn)([s.ak], ye.prototype, "OnClick", null), (0, o.gn)([s.ak], ye.prototype, "OnPaste", null), (0, o.gn)([s.ak], ye.prototype, "OnCut", null); var Ee = n(34245), De = n.n(Ee), we = n(10553), Re = n(33690), Ae = n(65204); const Me = r.forwardRef(function (e, t) { const { label: n, description: i, icon: a, children: c, childrenLayout: m, inlineWrap: h, childrenContainerWidth: u, spacingBetweenLabelAndChild: p, padding: g, disabled: C, bottomSeparator: f, className: v, highlightOnFocus: S, indentLevel: b, verticalAlignment: I, iconLocation: y, tooltip: E, explainer: D, explainerTitle: w } = e, R = (0, o._T)(e, ["label", "description", "icon", "children", "childrenLayout", "inlineWrap", "childrenContainerWidth", "spacingBetweenLabelAndChild", "padding", "disabled", "bottomSeparator", "className", "highlightOnFocus", "indentLevel", "verticalAlignment", "iconLocation", "tooltip", "explainer", "explainerTitle"]), A = (0, we.id)(), M = null != m ? m : "inline", k = null != y ? y : "front", T = "front" == k && !!a, L = "before-children" == k && !!a, G = "inline" == M && !!c, O = "below" == M && !!c, F = null != h ? h : A ? "shift-children-below" : "keep-inline", B = !!(R.onClick || R.onActivate || R.focusable), x = (null != a && T) || null != n || (G && null != c), N = null != u ? u : "min", P = null != p ? p : "standard", U = null != g ? g : "standard", V = null != f ? f : "standard", H = null == S || S, W = null != b ? b : 0, X = null != I ? I : "center", j = (function (e, t) { const n = (0, Re.Wy)(), i = r.useCallback(() => { var i; (0, Ae.jF)(e, t, null !== (i = n.ownerWindow) && void 0 !== i ? i : window); }, [n, e, t]); if (null == t) return {}; const o = (0, l.Xx)("#Field_MoreInfo_Action"); return { onOptionsButton: i, onOptionsActionDescription: o }; })(null != w ? w : n, D), z = r.useRef(), K = (0, s.BE)(z, e.navRef), q = r.useCallback( (e) => { var t; null === (t = z.current) || void 0 === t || t.TakeFocus(), e.preventDefault(); }, [z], ); return r.createElement( d.s, Object.assign( { focusable: B, noFocusRing: !0, scrollIntoViewWhenChildFocused: !0, onActivate: (e) => { var t; return null === (t = R.onClick) || void 0 === t ? void 0 : t.call(R, e); }, ref: t, onMouseDown: B ? void 0 : q, }, R, j, { navRef: K, className: (0, _.Z)(v, De().Field, C && De().Disabled, x && De().WithFirstRow, G && De().WithChildrenInline, O && De().WithChildrenBelow, "center" == X && De().VerticalAlignCenter, "shift-children-below" == F && De().InlineWrapShiftsChildrenBelow, !!i && De().WithDescription, "standard" == V && De().WithBottomSeparatorStandard, "thick" == V && De().WithBottomSeparatorThick, "fixed" == N && De().ChildrenWidthFixed, "max" == N && De().ChildrenWidthGrow, "standard" == P && De().ExtraPaddingOnChildrenBelow, "standard" == U && De().StandardPadding, "compact" == U && De().CompactPadding, B && De().Clickable, H && De().HighlightOnFocus), style: { "--indent-level": W } }, ), x && r.createElement("div", { className: De().FieldLabelRow }, r.createElement("div", { className: De().FieldLabel }, T && r.createElement("div", { className: (0, _.Z)(De().FieldIcon, De().Front) }, a), n, E && r.createElement("span", { "data-tooltip-text": E }, " (?)")), G && r.createElement("div", { className: De().FieldChildrenWithIcon }, L && r.createElement("div", { className: (0, _.Z)(De().FieldIcon, De().BeforeChildren) }, a), r.createElement("div", { className: De().FieldChildrenInner }, c))), O && r.createElement("div", { className: De().FieldChildrenWithIcon }, L && r.createElement("div", { className: (0, _.Z)(De().FieldIcon, De().BeforeChildren) }, a), r.createElement("div", { className: De().FieldChildrenInner }, c)), i && r.createElement("div", { className: De().FieldDescription }, i), ); }); const ke = r.forwardRef(function (e, t) { const { label: n, description: a, explainer: l, icon: c, layout: m, bottomSeparator: d, highlightOnFocus: h, childrenContainerWidth: u, padding: p, inlineWrap: _, fieldClassName: g } = e, C = (0, o._T)(e, ["label", "description", "explainer", "icon", "layout", "bottomSeparator", "highlightOnFocus", "childrenContainerWidth", "padding", "inlineWrap", "fieldClassName"]), { refWithValue: f, refForElement: v } = (0, s.ww)(t); return r.createElement( Me, { label: n, description: a, icon: c, bottomSeparator: d, highlightOnFocus: h, childrenLayout: null != m ? m : "inline", childrenContainerWidth: null != u ? u : "min", onMouseDown: (e) => { var t; null === (t = f.current) || void 0 === t || t.focus(), e.preventDefault(); }, padding: p, inlineWrap: _, explainer: l, className: g, }, r.createElement(i.zx, Object.assign({}, C, { ref: v })), ); }), Te = r.forwardRef(function (e, t) { const { label: n, description: i, icon: a, layout: l, bottomSeparator: c, highlightOnFocus: m } = e, d = (0, o._T)(e, ["label", "description", "icon", "layout", "bottomSeparator", "highlightOnFocus"]), { refWithValue: h, refForElement: u } = (0, s.ww)(t); return r.createElement( Me, { label: n, description: i, icon: a, bottomSeparator: c, highlightOnFocus: m, childrenLayout: null != l ? l : "inline", childrenContainerWidth: "fixed", onMouseDown: (e) => { var t, n; null === (n = null === (t = h.current) || void 0 === t ? void 0 : t.element) || void 0 === n || n.focus(), e.preventDefault(); }, }, r.createElement(C, Object.assign({}, d, { ref: u })), ); }); r.forwardRef(function (e, t) { return r.createElement(h.bX, Object.assign({ noFocusRing: !0 }, e, { ref: t, className: (0, _.Z)(De().BasicTextInput, e.className), size: 1 })); }); var Le = n(11808), Ge = n.n(Le), Oe = n(61963), Fe = n(19900); r.forwardRef(function (e, t) { return r.createElement(i.zx, { className: (0, _.Z)(Ge().DropDownControlButton, e.className), focusable: e.focusable, disabled: e.disabled, onClick: e.onClick, tabIndex: e.tabIndex, ref: t }, r.createElement("div", { className: De().DropDownControlButtonContents }, e.children, r.createElement("div", { className: (0, _.Z)(De().Spacer, "Spacer") }), r.createElement(he.$nC, { direction: "down" }))); }); var Be = n(64699); r.forwardRef(function (e, t) { const { className: n } = e, a = (0, o._T)(e, ["className"]); let c = r.useRef(), m = (0, s.BE)(t, c); const [h, u] = r.useState(!1), p = r.useCallback(() => { u((e) => !e), window.setTimeout(() => { var e; return null === (e = c.current) || void 0 === e ? void 0 : e.Focus(); }, 1); }, []); return r.createElement(d.s, { className: n, onOptionsButton: p, onOptionsActionDescription: (0, l.Xx)(h ? "#Login_HidePassword" : "#Login_ShowPassword") }, r.createElement(C, Object.assign({ autoComplete: "off", ref: m, inlineControls: r.createElement(i.zx, { className: Be.TogglePasswordVisibilityBtn, onPointerDown: p, onOKButton: p }, h ? r.createElement(he.Hz5, null) : r.createElement(he.dQJ, null)) }, a, { type: h ? "text" : "password" }))); }); r.forwardRef(function (e, t) { const { className: n, value: i } = e, a = (0, o._T)(e, ["className", "value"]), s = null != i ? i : ""; return r.createElement( Te, Object.assign({ autoComplete: "off", value: s, ref: t, placeholder: " . . . " }, a, { onChange: (e) => { !(function (e) { const t = e.split("."); if (t.length > 4) return !1; for (let e = 0; e < t.length; e++) { const n = t[e]; if ("" == n) { if (e == t.length - 1) continue; return !1; } if (!/^[0-9]*$/.test(n)) return !1; const i = parseInt(n); if (!(i >= 0 && i <= 255)) return !1; } return !0; })(e.target.value) ? (e.target.value = s) : a.onChange && a.onChange(e); }, }), ); }); var xe = n(23773), Ne = n.n(xe), Pe = n(19939), Ue = n(56666), Ve = n(37091), He = n(45193); const We = 1, Xe = (0, Ve.Qc)(Ne()["error-shake-duration"]); function je(e, t) { return t < 0 ? 0 : t > 1 ? 1 : 0 == e ? t : Math.round(t / e) * e; } function ze(e, t, n) { const i = e + n * (t - e); return Number.parseFloat(i.toFixed(10)); } function Ke(e, t, n) { return (n - e) / (t - e); } var qe; !(function (e) { (e[(e.None = 0)] = "None"), (e[(e.MouseDragging = 1)] = "MouseDragging"), (e[(e.TouchStart = 2)] = "TouchStart"), (e[(e.TouchDragging = 3)] = "TouchDragging"); })(qe || (qe = {})); class Ze extends r.Component { get showHandle() { var e; return null === (e = this.props.showHandle) || void 0 === e || e; } get isKeyNavTarget() { var e; return null === (e = this.props.isKeyNavTarget) || void 0 === e || e; } get validRange() { return this.props.min < this.props.max; } get range() { return this.validRange ? this.props.max - this.props.min : 0; } get step() { var e; return Math.abs(null !== (e = this.props.step) && void 0 !== e ? e : We); } get normalizedStep() { return this.step / this.range; } get normalizedDpadStep() { var e; const t = null !== (e = this.props.dpadStep) && void 0 !== e ? e : this.step, n = t > 0 ? t / this.range : 0.01; return Math.max(n, this.normalizedStep); } get normalizedClampedValue() { const e = null == this.props.value || isNaN(this.props.value) ? this.props.min : (0, Z.Lh)(this.props.value, this.props.min, this.props.max); return Ke(this.props.min, this.props.max, e); } get normalizedDefaultValue() { const e = this.props.resetValue; if (!(null == e || isNaN(e) || e < this.props.min || e > this.props.max)) return Ke(this.props.min, this.props.max, e); } get normalizedSliderOrigin() { const e = (0, Z.Lh)(0, this.props.min, this.props.max); return Ke(this.props.min, this.props.max, e); } get CanResetToDefault() { return null != this.props.resetValue && this.props.value != this.props.resetValue; } get SliderChangeSource() { switch (this.m_eDragMode) { case qe.MouseDragging: return 1; case qe.TouchDragging: case qe.TouchStart: return 0; case qe.None: return; } } constructor(e) { super(e), (this.m_refSlider = r.createRef()), (this.m_refHandle = r.createRef()), (this.m_navRefSlider = r.createRef()), (this.m_sliderBounds = void 0), (this.m_handleBounds = void 0), (this.m_fZoom = 1), (this.m_eDragMode = qe.None), (this.m_vTouchStartPosition = (0, Pe.kN)()), (this.m_bInnerSliderHasFocus = !1), (this.m_nRepeatCount = 0), (this.m_fStartValue = this.props.value), (this.m_fLatestUserValue = this.props.value), (this.m_fLatestOnChangeValue = this.props.value); } RecomputeSliderBounds() { var e, t; (this.m_sliderBounds = null === (e = this.m_refSlider.current) || void 0 === e ? void 0 : e.getBoundingClientRect()), (this.m_handleBounds = null === (t = this.m_refHandle.current) || void 0 === t ? void 0 : t.getBoundingClientRect()); } SetDragMode(e) { var t, n, i, o, r, a, s, l; if (e != this.m_eDragMode) { switch (((this.m_eDragMode = e), this.props.onChangeStart && this.props.onChangeStart(this.SliderChangeSource), e)) { case qe.MouseDragging: case qe.TouchDragging: case qe.TouchStart: this.RecomputeSliderBounds(), (this.m_fStartValue = this.props.value), (this.m_fLatestUserValue = this.props.value); case qe.None: } switch (e) { case qe.MouseDragging: null === (n = null === (t = this.m_refSlider.current) || void 0 === t ? void 0 : t.ownerDocument) || void 0 === n || n.addEventListener("mousemove", this.OnWindowMouseMove, { passive: !1 }), null === (o = null === (i = this.m_refSlider.current) || void 0 === i ? void 0 : i.ownerDocument) || void 0 === o || o.addEventListener("mouseup", this.OnWindowMouseUp, { passive: !1 }); break; case qe.TouchStart: case qe.TouchDragging: null === (a = null === (r = this.m_refSlider.current) || void 0 === r ? void 0 : r.ownerDocument) || void 0 === a || a.addEventListener("touchmove", this.OnWindowTouchMove, { passive: !1 }), null === (l = null === (s = this.m_refSlider.current) || void 0 === s ? void 0 : s.ownerDocument) || void 0 === l || l.addEventListener("touchend", this.OnWindowTouchEnd, { passive: !1 }); break; case qe.None: this.RemoveDocumentEventListeners(); } } } OnGamepadDirection(e) { var t, n; if (this.props.disabled) return !1; let i = 0; if (e.detail.button == ae.eV.DIR_LEFT) i = -1; else { if (e.detail.button != ae.eV.DIR_RIGHT) return !1; i = 1; } e.detail.is_repeat ? this.m_nRepeatCount++ : (this.m_nRepeatCount = 0); const o = 1 / this.normalizedDpadStep, r = Math.floor((0, Z.bU)(o, 8, 25, 10, 30)), a = Math.max(1, r / 2), s = (0, Z.Lh)((this.m_nRepeatCount - a) / (r - a), 0, 1), l = s * s * (0.05 - this.normalizedDpadStep) + this.normalizedDpadStep, c = 0 == this.normalizedStep ? Math.round(l / this.normalizedDpadStep) * this.normalizedDpadStep : Math.round(l / this.normalizedStep) * this.normalizedStep, m = Math.max(c, this.normalizedDpadStep) * i, d = je(this.normalizedStep, this.normalizedClampedValue + m); let h = ze(this.props.min, this.props.max, d); if (((h = (0, Z.Lh)(h, null !== (t = this.props.clampMin) && void 0 !== t ? t : this.props.min, null !== (n = this.props.clampMax) && void 0 !== n ? n : this.props.max)), h != this.props.value)) { const e = h > this.m_fLatestUserValue; se.LT.PlayNavSound(e ? se.qr.SliderUp : se.qr.SliderDown), (this.m_fLatestUserValue = h), this.FireOnChange(h, 2); } else se.LT.PlayNavSound(se.qr.FailedNav); return !0; } FireOnChange(e, t) { this.m_fLatestOnChangeValue != e && ((this.m_fLatestOnChangeValue = e), this.props.onChange && this.props.onChange(e, t)); } ComputeNormalizedValueForMousePosition(e) { if (null == this.m_sliderBounds) return 0; const t = e / this.m_fZoom, n = this.m_sliderBounds.right - this.m_sliderBounds.left, i = null == this.m_handleBounds ? 0 : this.m_handleBounds.right - this.m_handleBounds.left, o = n - i; return (t - this.m_sliderBounds.left - i / 2) / o; } BShouldTriggerHapticOnSnap() { const e = this.normalizedStep; return e > 0 && e >= 1 / 40; } PlayHaptic(e) { var t, n, i, o, r; null === (r = null === (o = null === (i = null === (n = null === (t = this.m_refSlider.current) || void 0 === t ? void 0 : t.ownerDocument.defaultView) || void 0 === n ? void 0 : n.SteamClient) || void 0 === i ? void 0 : i.OpenVR) || void 0 === o ? void 0 : o.TriggerOverlayHapticEffect) || void 0 === r || r.call(o, e, 0); } UpdateSliderValueForPosition(e) { var t, n; if (this.props.disabled || !this.m_refSlider.current) return; const i = this.ComputeNormalizedValueForMousePosition(e), o = je(this.normalizedStep, i); let r = ze(this.props.min, this.props.max, o); const a = null !== (t = this.props.clampMin) && void 0 !== t ? t : this.props.min, s = null !== (n = this.props.clampMax) && void 0 !== n ? n : this.props.max; if (((r = (0, Z.Lh)(r, a, s)), r != this.props.value)) { const e = r > this.props.value, t = 0 == this.step; if (((this.m_eDragMode == qe.None || !t) && se.LT.PlayNavSound(e ? se.qr.SliderUp : se.qr.SliderDown), this.m_eDragMode == qe.MouseDragging || this.m_eDragMode == qe.TouchDragging)) { let e = !1; if ((r == a || r == s) && this.m_fLatestUserValue > a && this.m_fLatestUserValue < s && !e) this.PlayHaptic(He.sH.SlidingEdge), (e = !0); else if (!this.BShouldTriggerHapticOnSnap() && this.m_fLatestUserValue >= a && this.m_fLatestUserValue <= s) { const t = 40; Math.floor(((this.m_fLatestUserValue - a) / (s - a)) * t) == Math.floor(((r - a) / (s - a)) * t) || e || (this.PlayHaptic(He.sH.Sliding), (e = !0)); } t || e || (this.PlayHaptic(He.sH.Snap), (e = !0)); } (this.m_fLatestUserValue = r), this.FireOnChange(r, this.SliderChangeSource); } } OnWindowMouseMove(e) { this.UpdateSliderValueForPosition(e.clientX); } OnWindowMouseUp(e) { this.m_eDragMode != qe.None && this.Complete(); } OnMouseDown(e) { 0 == e.button && (this.props.disabled || (e.preventDefault(), this.SetDragMode(qe.MouseDragging), this.UpdateSliderValueForPosition(e.clientX))); } OnTouchStart(e) { if (this.props.disabled || 1 != e.touches.length) return; e.preventDefault(); const t = this.ComputeNormalizedValueForMousePosition(e.touches[0].clientX); t < 0 || t > 1 || (this.SetDragMode(qe.TouchStart), (this.m_vTouchStartPosition = { x: e.touches[0].clientX, y: e.touches[0].clientY })); } OnWindowTouchMove(e) { var t; if (1 == e.touches.length) { switch (this.m_eDragMode) { case qe.TouchStart: const n = { x: e.touches[0].clientX, y: e.touches[0].clientY }; if ((0, Pe.iD)(this.m_vTouchStartPosition, n) >= 10) { const e = (0, Pe.UA)(this.m_vTouchStartPosition, n); Math.abs(e.x) > Math.abs(e.y) ? (this.SetDragMode(qe.TouchDragging), null === (t = this.m_refSlider.current) || void 0 === t || t.focus()) : this.SetDragMode(qe.None); } break; case qe.TouchDragging: this.UpdateSliderValueForPosition(e.touches[0].clientX); } e.preventDefault(); } } OnWindowTouchEnd(e) { this.m_eDragMode != qe.None && this.Complete(); } Complete() { const e = this.m_eDragMode != qe.None; this.FireOnChange(this.m_fLatestUserValue, this.SliderChangeSource), this.props.onChangeComplete && this.props.onChangeComplete(this.m_fLatestUserValue, this.SliderChangeSource), this.SetDragMode(qe.None); const t = 0 == this.step; if (this.m_fLatestUserValue != this.m_fStartValue && t && e) { const e = this.m_fLatestUserValue > this.m_fStartValue; se.LT.PlayNavSound(e ? se.qr.SliderUp : se.qr.SliderDown); } } RemoveDocumentEventListeners() { var e, t, n, i, o, r, a, s; null === (t = null === (e = this.m_refSlider.current) || void 0 === e ? void 0 : e.ownerDocument) || void 0 === t || t.removeEventListener("mousemove", this.OnWindowMouseMove), null === (i = null === (n = this.m_refSlider.current) || void 0 === n ? void 0 : n.ownerDocument) || void 0 === i || i.removeEventListener("touchmove", this.OnWindowTouchMove), null === (r = null === (o = this.m_refSlider.current) || void 0 === o ? void 0 : o.ownerDocument) || void 0 === r || r.removeEventListener("mouseup", this.OnWindowMouseUp), null === (s = null === (a = this.m_refSlider.current) || void 0 === a ? void 0 : a.ownerDocument) || void 0 === s || s.removeEventListener("touchend", this.OnWindowTouchEnd); } componentDidMount() { this.m_fZoom = (0, s.KM)(this.m_refSlider.current); } componentWillUnmount() { this.RemoveDocumentEventListeners(); } BlurInnerSlider() { var e; null === (e = this.m_navRefSlider.current) || void 0 === e || e.ParentTakeFocus(); } OnInnerSliderFocus() { (this.m_bInnerSliderHasFocus = !0), (this.m_fStartValue = this.props.value); } OnInnerSliderBlur() { (this.m_bInnerSliderHasFocus = !1), this.m_fStartValue != this.m_fLatestUserValue && this.Complete(); } ResetToDefault() { if (!this.CanResetToDefault || this.m_eDragMode != qe.None) return; let e; (this.m_fLatestUserValue = this.props.resetValue), this.FireOnChange(this.props.resetValue, 4), this.m_bInnerSliderHasFocus ? (e = this.props.resetValue > this.m_fLatestUserValue) : ((e = this.props.resetValue > this.props.value), this.props.onChangeComplete && this.props.onChangeComplete(this.props.resetValue, 4)), se.LT.PlayNavSound(e ? se.qr.SliderUp : se.qr.SliderDown); } OnContextMenu(e) { if (null != this.props.resetValue) { const t = r.createElement(Oe.xV, null, r.createElement(Oe.Zo, { disabled: !this.CanResetToDefault, onSelected: this.ResetToDefault }, (0, l.Xx)("#ResetToDefault"))); (0, A.yV)(t, e); } } render() { var e, t, n, i; const o = null !== (e = this.props.showBookendLabels) && void 0 !== e && e, a = null !== (t = this.props.notchTicksVisible) && void 0 !== t ? t : !o, c = o ? 2 : this.props.notchCount, m = [ { notchIndex: 0, label: `${this.props.min}` }, { notchIndex: 1, label: `${this.props.max}` }, ], d = o ? m : this.props.notchLabels, u = null === (n = this.props.focusable) || void 0 === n || n, p = this.normalizedDefaultValue, g = this.normalizedSliderOrigin, C = null != p, f = null !== (i = this.props.resetValueAppearance) && void 0 !== i ? i : "top-caret", v = "top-caret" == f, S = !v, b = {}; this.CanResetToDefault && (b[ae.eV.SECONDARY] = (0, l.Xx)("#ResetToDefault")); let I = `${Ne().SliderHandle} SliderHandle`, y = `${Ne().SliderHandleContainer} SliderHandleContainer `; return ( "verticalline" == this.props.handleType ? ((I = `${Ne().VerticalLineSliderHandle} SliderHandle`), (y = `${Ne().VerticalLineSliderHandleContainer} SliderHandleContainer `)) : ("leftparen" != this.props.handleType && "rightparen" != this.props.handleType) || ((I = (0, _.Z)(Ne().ParenSliderHandle, "leftparen" == this.props.handleType ? Ne().Left : Ne().Right, "SliderHandle")), (y = (0, _.Z)(Ne().ParenSliderHandleContainer, "leftparen" == this.props.handleType ? Ne().Left : Ne().Right, "SliderHandleContainer"))), r.createElement( Ue.eh, { noFocusRing: !0, className: (0, _.Z)(Ne().SliderControlPanelGroup, "SliderControlPanelGroup"), navRef: this.props.navRef, onMouseDown: (e) => this.OnMouseDown(e.nativeEvent), onTouchStart: (e) => this.OnTouchStart(e.nativeEvent), onOKActionDescription: this.props.disabled ? null : (0, l.Xx)("#Slider_AdjustSlider"), focusable: u, childFocusDisabled: this.props.disabled || !u, onContextMenu: this.OnContextMenu, onOKButton: this.props.disabled ? () => se.LT.PlayNavSound(se.qr.FailedNav) : void 0, onSecondaryButton: this.CanResetToDefault ? this.ResetToDefault : void 0, onSecondaryActionDescription: this.CanResetToDefault ? (0, l.Xx)("#ResetToDefault") : void 0, actionDescriptionMap: b }, r.createElement( h.Ks, { className: (0, _.Z)(Ne().SliderControlAndNotches, this.props.disabled && Ne().Disabled, C && Ne().WithDefaultValue, C && S && Ne().DefaultValueIsColorRange, C && S && "left" == f.side && Ne().DefaultValueColorLeft, C && S && "left" != f.side && Ne().DefaultValueColorRight), focusable: this.isKeyNavTarget, noFocusRing: !0, onFocus: this.OnInnerSliderFocus, onBlur: this.OnInnerSliderBlur, style: { "--normalized-slider-value": this.normalizedClampedValue, "--normalized-slider-default-value": p, "--normalized-slider-origin": g, "--default-value-track-color": S ? f.trackForegroundColor : void 0 }, ref: (0, s.dn)(this.m_refSlider, this.props.innerRef), navRef: this.m_navRefSlider, onGamepadDirection: this.OnGamepadDirection, onOKButton: this.BlurInnerSlider, onOKActionDescription: null, onCancelButton: this.BlurInnerSlider, onCancelActionDescription: (0, l.Xx)("#ActionButtonLabelDone") }, r.createElement("div", { className: (0, _.Z)(Ne().SliderControl, "SliderControl") }, r.createElement("div", { className: (0, _.Z)(Ne().SliderTrack, null != this.props.notchCount && a && Ne().SliderHasNotches, { [Ne().SliderTrackDark]: "dark" === this.props.trackTone }, "SliderTrack") }), C && v && r.createElement("div", { className: Ne().DefaultValueTickContainer }, r.createElement("div", { className: Ne().DefaultValueTick }, r.createElement(he.$nC, { direction: "down" }))), this.validRange && null != this.props.value && !isNaN(this.props.value) && this.showHandle && r.createElement("div", { className: y }, r.createElement("div", { className: I, ref: this.m_refHandle }, "leftparen" == this.props.handleType && r.createElement(he.Tvf, null), "rightparen" == this.props.handleType && r.createElement(he.RCC, null)))), r.createElement(Qe, { notchCount: c, notchLabels: d, sliderValue: this.normalizedClampedValue, notchTicksVisible: a }), ), ) ); } } function Qe(e) { let { sliderValue: t, notchCount: n, notchLabels: i, notchTicksVisible: o } = e, a = null != i ? i : []; if (!n) return null; let s = !1, l = []; for (let e = 0; e < n; ++e) { let i = a.find((t) => t.notchIndex == e); i && (s = !0), l.push(r.createElement($e, { key: e, notchIndex: e, sliderValue: t, notchLabel: i, notchCount: n, notchTicksVisible: o })); } return r.createElement(d.s, { className: (0, _.Z)(Ne().SliderNotchContainer) }, l); } function $e(e) { var t; const n = e.notchIndex <= (e.notchCount - 1) * e.sliderValue, i = e.notchCount <= 3 && !e.notchTicksVisible, o = i && 0 == e.notchIndex, a = i && e.notchIndex == e.notchCount - 1; return r.createElement("div", { className: (0, _.Z)(Ne().SliderNotch, i && Ne().AlignToEnds) }, e.notchTicksVisible && r.createElement("div", { className: (0, _.Z)(Ne().SliderNotchTick, n && Ne().TickActive) }), e.notchLabel && r.createElement("div", { className: (0, _.Z)(Ne().SliderNotchLabel, o && Ne().AlignToLeft, a && Ne().AlignToRight) }, null === (t = e.notchLabel) || void 0 === t ? void 0 : t.label)); } function Ye(e) { const { label: t, description: n, tabIndex: i, className: a, showValue: c, renderValue: m, valueSuffix: d, tooltip: h, layout: u, padding: p, bottomSeparator: _, notchCount: g, indentLevel: C, editableValue: f, highlightOnFocus: S, parentSliderRef: b, onOptionsButton: I, onOptionsActionDescription: y, iconLocation: E, childrenContainerWidth: D, explainer: w, explainerTitle: R } = e, A = (0, o._T)(e, ["label", "description", "tabIndex", "className", "showValue", "renderValue", "valueSuffix", "tooltip", "layout", "padding", "bottomSeparator", "notchCount", "indentLevel", "editableValue", "highlightOnFocus", "parentSliderRef", "onOptionsButton", "onOptionsActionDescription", "iconLocation", "childrenContainerWidth", "explainer", "explainerTitle"]), { icon: M } = A, k = (0, o._T)(A, ["icon"]), T = r.useRef(null), L = r.useRef(null), G = r.useRef(null), O = (null != m ? m : v)(e.value, e.valueSuffix), F = (function (e) { var t, n; const { min: i, max: o } = e, a = null !== (t = e.validValues) && void 0 !== t ? t : "steps", s = null !== (n = e.step) && void 0 !== n ? n : We, l = r.useCallback((e) => "number" == typeof e && !Number.isNaN(e), []), c = r.useCallback((e) => !!l(e) && e >= i && e <= o, [l, i, o]), m = r.useCallback((e) => !!c(e) && (0 == s || ((e - i) / s) % 1 == 0), [c, i, s]), d = r.useCallback((e) => !(!l(e) || "function" != typeof a) && a(e), [l, a]); switch (a) { case "all": return l; case "range": return c; case "steps": return m; default: return d; } })(e), [B, x] = r.useState(!1), N = () => { e.onChangeStart && e.onChangeStart(3), x(!0); }, P = (t) => { F(t) && (e.onChange && e.onChange(t, 3), e.onChangeComplete && e.onChangeComplete(t, 3)), x(!1); }; r.useLayoutEffect(() => { var e, t; !B && (null === (e = G.current) || void 0 === e ? void 0 : e.BHasFocus()) && (null === (t = L.current) || void 0 === t || t.TakeFocus()); }, [G, L, B]); let U = t; f ? (U = r.createElement(r.Fragment, null, r.createElement("div", { className: Ne().LabelText }, e.label), r.createElement(Je, { navRef: G, editing: B, renderedValue: O, valueSuffix: e.valueSuffix, onClick: N, onChangeComplete: P, validator: F }))) : c && (U = r.createElement(r.Fragment, null, r.createElement("div", { className: Ne().LabelText }, e.label), r.createElement("div", { className: Ne().DescriptionValue }, O))); const V = r.useRef(null), H = r.useCallback( (e) => { var t; null === (t = V.current) || void 0 === t || t.OnTouchStart(e.nativeEvent); }, [V], ), W = r.useCallback( (e) => { var t; null === (t = V.current) || void 0 === t || t.OnContextMenu(e); }, [V], ), X = (0, s.BE)(V, b), j = f ? N : void 0, z = f ? (0, l.Xx)("#Slider_EditValue") : void 0; let K = I || j, q = I ? y : z, Z = I ? j : void 0, Q = I ? z : void 0; return r.createElement(Me, { childrenLayout: null != u ? u : "below", padding: p, bottomSeparator: _, childrenContainerWidth: null != D ? D : "fixed", label: U, description: n, ref: T, className: a, onTouchStart: H, onContextMenu: W, indentLevel: C, onMenuActionDescription: Q, onMenuButton: Z, highlightOnFocus: S, onOptionsButton: K, onOptionsActionDescription: q, icon: M, iconLocation: null != E ? E : "before-children", explainer: w, explainerTitle: R }, r.createElement(Ze, Object.assign({ ref: X, notchCount: g, focusable: !B, navRef: L }, k))); } function Je(e) { const { editing: t, renderedValue: n, valueSuffix: i, onClick: o, onChangeComplete: a, navRef: c, validator: m } = e, d = r.useRef(null), u = r.useRef(null), p = r.useRef(null), g = (0, s.BE)(c, p), { fnTriggerErrorShake: C, bPlayingErrorShake: f } = (function (e) { const [t, n] = r.useState(!1), i = r.useRef(), o = r.useRef(), a = r.useCallback(() => { window.clearTimeout(i.current), (i.current = window.setTimeout(() => { var t, n, i; null === (t = e.current) || void 0 === t || t.classList.remove(Ne().ErrorShake), null === (n = e.current) || void 0 === n || n.getBoundingClientRect(), null === (i = e.current) || void 0 === i || i.classList.add(Ne().ErrorShake); }, 0)), n(!0), window.clearTimeout(o.current), (o.current = window.setTimeout(() => n(!1), Xe)); }, [e]); return ( r.useEffect( () => () => { window.clearTimeout(i.current), window.clearTimeout(o.current); }, [], ), { fnTriggerErrorShake: a, bPlayingErrorShake: t } ); })(d), v = t || f, [S, b] = r.useState(""); r.useEffect(() => { v || b(""); }, [v]); const I = m(Number.parseFloat(S)), y = r.useRef(!1), E = r.useCallback( (e) => { !I && S.length > 0 && C(), y.current || ((I || e) && (a(Number.parseFloat(S)), (y.current = !0))); }, [I, S, C, a], ), D = r.useCallback(() => { var e; return null === (e = u.current) || void 0 === e ? void 0 : e.TakeFocusAndShowKeyboard(); }, [u]), w = r.useRef(!1); r.useLayoutEffect(() => { t && !w.current && D(), (w.current = t); }, [p, t, D]); const R = f || (v && !I && S.length > 0 && "-" != S), A = (0, _.Z)(Ne().DescriptionValue, R && Ne().RedBorder), [M, k] = r.useState(0), [T, L] = r.useState(0), G = r.useRef(), O = r.useCallback(() => { const e = G.current.clientWidth; v ? L(e) : k(e); }, [v]); r.useLayoutEffect(O, [O]); const F = (0, s.yU)(O), B = (0, s.BE)(G, F); r.useLayoutEffect(() => { var e, t; (null === (e = p.current) || void 0 === e ? void 0 : e.BHasFocus()) && (null === (t = p.current) || void 0 === t || t.Node().ForceMeasureFocusRing()); }, [T]); const x = v ? S : n, N = v ? Math.max(M, T) : M; return r.createElement("div", { className: A }, r.createElement("div", { className: Ne().FakeEditableValue, ref: B }, x), r.createElement(h.bX, { refKeyboardHandle: u, navRef: g, ref: d, focusable: t, className: Ne().EditableValue, style: { width: N }, onEnterKeyPress: () => E(!1), strEnterKeyLabel: (0, l.Xx)("#ActionButtonLabelDone"), onClick: o, onFocus: () => (y.current = !1), onBlur: () => E(!0), value: x, placeholder: n, onChange: (e) => b(e.target.value.trim()), onCancelButton: () => E(!0), onCancelActionDescription: (0, l.Xx)("#ActionButtonLabelDone"), onOKButton: D, onOKActionDescription: (0, l.Xx)("#Slider_EditValue"), onOptionsActionDescription: void 0, onOptionsButton: D })); } (0, o.gn)([s.ak], Ze.prototype, "RecomputeSliderBounds", null), (0, o.gn)([s.ak], Ze.prototype, "SetDragMode", null), (0, o.gn)([s.ak], Ze.prototype, "OnGamepadDirection", null), (0, o.gn)([s.ak], Ze.prototype, "UpdateSliderValueForPosition", null), (0, o.gn)([s.ak], Ze.prototype, "OnWindowMouseMove", null), (0, o.gn)([s.ak], Ze.prototype, "OnWindowMouseUp", null), (0, o.gn)([s.ak], Ze.prototype, "OnMouseDown", null), (0, o.gn)([s.ak], Ze.prototype, "OnTouchStart", null), (0, o.gn)([s.ak], Ze.prototype, "OnWindowTouchMove", null), (0, o.gn)([s.ak], Ze.prototype, "OnWindowTouchEnd", null), (0, o.gn)([s.ak], Ze.prototype, "Complete", null), (0, o.gn)([s.ak], Ze.prototype, "BlurInnerSlider", null), (0, o.gn)([s.ak], Ze.prototype, "OnInnerSliderFocus", null), (0, o.gn)([s.ak], Ze.prototype, "OnInnerSliderBlur", null), (0, o.gn)([s.ak], Ze.prototype, "ResetToDefault", null), (0, o.gn)([s.ak], Ze.prototype, "OnContextMenu", null); r.forwardRef(function (e, t) { const { label: n, labelIndex: i, xOffset: o, onResize: a, OnMouseDown: l, OnTouchStart: c } = e; r.useEffect(() => { a(i); }, [a, i]); const m = r.useCallback( (e) => { a(i); }, [a, i], ), d = (0, s.yU)(m), h = (0, s.BE)(d, t); return r.createElement("div", { className: Ne().CompoundSliderSubSliderLabel, ref: h, onMouseDown: l, onTouchStart: c, style: { transform: `translateX(${o}px)` } }, r.createElement("div", { className: Ne().CompoundSliderSubSliderLabelInternal }, n)); }); const et = r.forwardRef(function (e, t) { const { value: n, onChange: i, disabled: o, navRef: a } = e; return r.createElement( h.Ks, { noFocusRing: !0, className: (0, _.Z)(De().Toggle, { [De().Disabled]: !!o, [De().On]: !!n }), onClick: () => { if (!o && i) { const e = !n; i(e), se.LT.PlayNavSound(e ? se.qr.ToggleOn : se.qr.ToggleOff); } }, ref: t, navRef: a, }, r.createElement("div", { className: De().ToggleRail }), r.createElement("div", { className: De().ToggleSwitch }), ); }); class tt extends i.iN { OnToggleChange(e) { this.props.disabled || e === this.checked || this.Toggle(); } render() { const e = !!this.props.disabled, { actionDescriptions: t, gamepadEvents: n } = (0, Fe.CO)(this.props); return r.createElement(Me, Object.assign({ className: this.props.className, disabled: e, label: this.props.label, icon: this.props.icon, description: this.props.description, explainer: this.props.explainer, explainerTitle: this.props.explainerTitle, padding: this.props.padding, bottomSeparator: this.props.bottomSeparator, highlightOnFocus: this.props.highlightOnFocus, inlineWrap: "keep-inline", onContextMenu: this.props.onContextMenu, actionDescriptionMap: t }, n), r.createElement(et, { onChange: this.OnToggleChange, value: this.checked, disabled: e, navRef: this.props.navRef })); } } (0, o.gn)([s.ak], tt.prototype, "OnToggleChange", null); n(636); var nt, it = n(5430), ot = n.n(it), rt = n(58908), at = n(29512); function st(e) { const { childrenKey: t, childrenClasses: n, children: i, directionClass: o, animate: a = !0 } = e, s = (0, _.Z)(ot().TransitionGroup, o); return r.createElement(rt.Z, { className: s, appear: !1, enter: a, exit: a }, r.createElement(lt, { key: t, childrenClasses: n }, i)); } function lt(e) { const { sizeClass: t, children: n, childrenClasses: i } = e, a = (0, o._T)(e, ["sizeClass", "children", "childrenClasses"]), [s, l, c, m] = (function () { let e = r.useRef(null), t = r.useRef(); r.useLayoutEffect(() => { let n = e.current; if (!n || t.current) return; t.current = { element: n, activeProps: new Set(), bExiting: !1, fnDone: null }; let i = t.current, o = (e) => { e.target == n && i.activeProps.add(e.propertyName); }; n.addEventListener("transitionrun", o, !1); let r = (e) => { e.target == n && (i.activeProps.delete(e.propertyName), i.fnDone && 0 == i.activeProps.size && i.bExiting && i.fnDone()); }; n.addEventListener("transitionend", r, !1), n.addEventListener("transitioncancel", r, !1); }, []); let n = r.useCallback( (e) => { t.current ? (t.current.fnDone = e) : e(); }, [t], ), i = r.useCallback(() => { t.current && (t.current.bExiting = !1); }, [t]), o = r.useCallback(() => { t.current && (t.current.bExiting = !0); }, [t]); return [e, n, i, o]; })(), h = r.useRef(!0), u = r.useCallback(() => h.current, [h]), p = r.useCallback(() => { (h.current = !0), c(); }, [c]), g = r.useCallback(() => { (h.current = !1), m(); }, [m]), C = e.childrenClasses, f = { enter: C.enterStart, enterActive: C.enterEnd, exit: C.exitStart, exitActive: C.exitEnd }; return s.current && !s.current.ownerDocument.defaultView ? null : r.createElement(at.Z, Object.assign({ nodeRef: s, classNames: f, in: !0, timeout: 1e4, addEndListener: l, onEntering: p, onExiting: g }, a), r.createElement("div", { ref: s, className: (0, _.Z)(ot().ContentWrapper, t, C.base) }, r.createElement(d.s, { className: t, fnCanTakeFocus: u }, e.children))); } function ct(e, t) { return { base: t, enterStart: e.Enter, enterEnd: e.EnterActive, exitStart: e.Exit, exitEnd: e.ExitActive }; } !(function (e) { (e[(e.None = 0)] = "None"), (e[(e.Left = 1)] = "Left"), (e[(e.Right = 2)] = "Right"), (e[(e.Up = 3)] = "Up"), (e[(e.Down = 4)] = "Down"); })(nt || (nt = {})); var mt = n(51921), dt = n.n(mt); const ht = r.createContext(null); function ut(e) { const t = r.useContext(ht), n = (0, we.qt)().IN_VR, { title: i, icon: a, active: s } = e, l = (0, o._T)(e, ["title", "icon", "active"]); return r.createElement(d.s, Object.assign({ preferredFocus: s, navRef: s && t ? t : void 0, noFocusRing: !0, onActivate: n ? void 0 : l.onClick, onFocus: n ? void 0 : l.onClick }, l), a && r.createElement("div", { className: dt().PageListItem_Icon }, a), r.createElement("div", { className: dt().PageListItem_Title }, i)); } function pt(e) { return r.createElement("div", { className: dt().Separator }); } r.forwardRef(function (e, t) { const n = r.useRef(null), [i, o] = r.useState(!0); r.useEffect(() => { var t; (i && e.bNoInitialLeftColumnFocus) || null === (t = n.current) || void 0 === t || t.TakeFocus(), o(!1); }, [e.page, e.bNoInitialLeftColumnFocus, i]); const a = Boolean(e.showTitle); return r.createElement(ht.Provider, { value: n }, r.createElement(Se, Object.assign({}, e, { stylesheet: dt(), showTitle: a, renderPageListItem: ut, renderPageListSeparator: pt, renderPageAnimation: _t }))); }); function _t(e) { var t; let n = nt.None; "up" == e.direction ? (n = nt.Up) : "down" == e.direction && (n = nt.Down); let i = ((o = dt()), (a = n) == nt.Left ? o.Left : a == nt.Right ? o.Right : a == nt.Up ? o.Up : a == nt.Down ? o.Down : ""); var o, a; return r.createElement(st, { childrenKey: null === (t = e.activePage) || void 0 === t ? void 0 : t.identifier, childrenClasses: ct(dt(), dt().ContentTransition), directionClass: i, animate: n != nt.None }, e.children); } }, 21561: (e, t, n) => { "use strict"; n.d(t, { T: () => r }); var i = n(85556), o = n(27378); function r(e) { const { component: t, fallback: n, componentRef: r } = e, a = (0, i._T)(e, ["component", "fallback", "componentRef"]), [[s, l]] = o.useState([t, n]), c = null != s ? s : l; return o.createElement(c, Object.assign({}, a, { ref: r })); } }, 10021: (e, t, n) => { "use strict"; n.d(t, { hp: () => c, nf: () => d }); var i = n(27378), o = n(87018), r = n(62019), a = n(21561), s = n(63561), l = n.n(s); const c = (e) => { const t = (0, r.D)(); return i.createElement(a.T, Object.assign({ component: null == t ? void 0 : t.ToggleControl, fallback: m }, e)); }, m = (e) => { const { value: t, onChange: n, disabled: r } = e; return i.createElement("div", { className: (0, o.Z)(l().Toggle, r && l().Disabled), onClick: () => !r && n && n(!t) }, i.createElement("div", { className: l().ToggleRail }), i.createElement("div", { className: (0, o.Z)(l().ToggleRail, l().Highlight, t ? l().On : l().Off) }), i.createElement("div", { className: (0, o.Z)(l().ToggleSwitch, t ? l().On : l().Off) })); }, d = (e) => { const { label: t, value: n, onChange: r, disabled: a, className: s } = e; return i.createElement("div", { className: (0, o.Z)(l().ToggleRow, s) }, i.createElement("div", { className: (0, o.Z)(l().Label, a && l().Disabled) }, t), i.createElement(c, { value: n, onChange: r, disabled: a })); }; }, 51579: (e, t, n) => { "use strict"; n.d(t, { hp: () => V, tk: () => F, ag: () => W, uC: () => X, D3: () => ie, jk: () => H, Nr: () => ee }); var i = n(85556), o = n(79588), r = n(50649), a = n(27378), s = n(31542), l = n(28413), c = n(91867), m = n(97970), d = n(41758), h = n(61963), u = n(87018), p = n(84290), _ = n(2049), g = n(36175), C = n(10553), f = n(11259), v = n(83817), S = n(55981), b = n(64627); class I extends a.Component { constructor(e) { super(e), (this.state = { activeIndex: e.initialActiveIndex || 0 }); } render() { const { config: e } = this.props, { activeIndex: t } = this.state, n = e[t] && e[t].renderContent ? e[t].renderContent() : null, i = e.length > 1, o = i ? ({ detail: { button: t } }) => { t === S.eV.BUMPER_LEFT ? this.setState({ activeIndex: Math.max(0, this.state.activeIndex - 1) }) : t === S.eV.BUMPER_RIGHT && this.setState({ activeIndex: Math.min(e.length - 1, this.state.activeIndex + 1) }); } : void 0; return a.createElement(v.s, { className: b.Picker, onButtonDown: o }, i && a.createElement(y, null, this.RenderTabs()), n); } RenderTabs() { return this.props.config.map(({ renderTab: e }, t) => { const n = this.state.activeIndex === t; return a.createElement(D, { key: t, active: n, onClick: () => this.setState({ activeIndex: t }) }, e(n)); }); } } function y(e) { return a.createElement(v.s, { className: b.Tabs, "flow-children": "row" }, e.children); } function E(e) { return a.createElement("div", { className: b.Content }, e.children); } function D(e) { const { active: t, children: n, onClick: i } = e; return a.createElement(v.s, { className: (0, u.Z)(b.Tab, t && b.Active), focusClassName: b.Focus, onActivate: i }, a.createElement("div", { className: (0, u.Z)(b.TabContent, t && b.Active) }, n)); } function w(e) { const { items: t, renderItem: n, onItemSelect: i, keyExtractor: o, renderEmpty: r } = e; let s = t.map((e, r) => a.createElement(v.s, { key: o(e), className: b.Item, onActivate: () => i(t[r]), autoFocus: 0 === r, focusClassName: b.Focus }, n(t[r]))); return 0 === t.length && r && (s = r()), a.createElement(v.s, { "flow-children": "grid", className: b.ItemList }, s); } function R(e) { const { title: t, onFilterChange: n, filter: o, onSubmit: r } = e, s = (0, i._T)(e, ["title", "onFilterChange", "filter", "onSubmit"]); return a.createElement(a.Fragment, null, a.createElement(E, null, a.createElement(M, { title: t }, a.createElement(w, Object.assign({}, s)))), a.createElement(k, { value: o, onChange: n, onSubmit: r })); } function A(e) { const { onFilterChange: t, filter: n, sections: o, title: r } = e; return a.createElement( a.Fragment, null, a.createElement( E, null, r && a.createElement("div", { className: b.SectionedPageTitle }, r), o.map((e) => { var { title: t } = e, n = (0, i._T)(e, ["title"]); return a.createElement(M, { title: t, key: t }, a.createElement(w, Object.assign({}, n))); }), ), a.createElement(k, { value: n, onChange: t }), ); } function M(e) { return a.createElement("div", { className: b.Section }, a.createElement("div", { className: b.SectionTitle }, e.title), a.createElement("div", { className: b.SectionContent }, e.children)); } function k(e) { const { value: t, onChange: n, onSubmit: i } = e; return a.createElement("div", { className: b.FilterInputContainer }, a.createElement(f.II, { type: "text", placeholder: "Search...", className: b.FilterInput, value: t, onChange: (e) => n(e.target.value), onSubmit: i })); } function T(e) { const { className: t } = e, n = (0, i._T)(e, ["className"]); return a.createElement("div", Object.assign({ className: (0, u.Z)(t, b.AddonPickerMessage) }, n)); } var L = n(23663), G = n.n(L), O = n(37091); class F extends a.PureComponent { constructor() { super(...arguments), (this.state = { showHover: !1 }), (this.m_ref = a.createRef()); } OnMouseEnter(e) { this.setState({ showHover: !0 }); } OnMouseLeave(e) { this.setState({ showHover: !1 }); } render() { const { emoticon: e, large: t, emoticonHoverStore: n } = this.props, i = `:${e}:`, o = t && n.BLoaded(e) ? n.Get(e).url : c.u.GetEmoticonURL(e, t); return a.createElement(a.Fragment, null, a.createElement(d.v$, { text: i, style: "merge-adjacent" }, a.createElement("img", { src: o, className: (0, u.Z)(G().emoticon, t ? G().large : void 0), "data-emoticon": e, onMouseEnter: this.OnMouseEnter, onMouseLeave: this.OnMouseLeave, ref: this.m_ref })), this.state.showHover && a.createElement(B, { target: this.m_ref.current, store: n, emoticon: e })); } } (0, i.gn)([_.ak], F.prototype, "OnMouseEnter", null), (0, i.gn)([_.ak], F.prototype, "OnMouseLeave", null); const B = (0, r.Pi)((e) => { const { target: t, store: n, emoticon: i } = e, o = n.Get(i); return a.createElement(x, { target: t, title: `:${i}:`, subtitle: o && o.app_name ? o.app_name : void 0 }, a.createElement(F, { emoticon: i, emoticonHoverStore: n, large: !0 })); }), x = ({ target: e, title: t, subtitle: n, children: i }) => a.createElement(l.T, { target: e, style: { zIndex: 1700 }, className: G().EmoticonHover }, i, a.createElement("div", { className: G().Info }, a.createElement("div", { className: G().Name }, t || a.createElement("span", null, " ")), a.createElement("div", { className: G().AppName }, n || a.createElement("span", null, " ")))); function N(e) { return e.recent_emoticons; } function P(e) { return e.recent_stickers; } function U(e) { return N(e).length + P(e).length > 0; } const V = (0, r.Pi)((e) => { const { emoticonStore: t, emoticonHoverStore: n, roomEffectSettings: i, strFlairGroupID: r, onEmoticonSelected: s, onRoomEffectSelected: l, onStickerSelected: c } = e; !(function (e) { const [t, n] = (0, a.useState)(e.is_initialized); (0, a.useEffect)(() => { if (!e.is_initialized) { e.UpdateEmoticonList(); const t = (0, o.gx)( () => e.is_initialized, () => n(e.is_initialized), ); return () => t(); } return () => {}; }, [e]); })(t); const m = []; return ( U(t) && m.push({ renderTab: (e) => a.createElement("span", { title: (0, p.Xx)("#AddonPicker_RecentlyUsed"), className: (0, u.Z)(G().PickerTab, G().Clock, e && G().ActiveTab) }, a.createElement(le, null)), renderContent: () => a.createElement(j, { store: t, hoverStore: n, onEmoticonSelect: (e) => s(e.name), onStickerSelect: (e) => c(e.name), flairGroupID: r }) }), a.createElement(h.xV, null, a.createElement(I, { config: [...m, { renderTab: (e) => a.createElement("span", { title: (0, p.Xx)("#AddonPicker_Emoticons"), className: (0, u.Z)(G().PickerTab, e && G().ActiveTab) }, a.createElement(ae, null)), renderContent: () => a.createElement(z, { store: t, hoverStore: n, onItemSelect: (e) => s(e.name), flairGroupID: r }) }, { renderTab: (e) => a.createElement("span", { title: (0, p.Xx)("#AddonPicker_Stickers"), className: (0, u.Z)(G().PickerTab, e && G().ActiveTab) }, a.createElement(re, null)), renderContent: () => a.createElement(q, { store: t, onItemSelect: (e) => c(e.name) }) }, { renderTab: (e) => a.createElement("span", { title: (0, p.Xx)("#AddonPicker_RoomEffects"), className: (0, u.Z)(G().PickerTab, e && G().ActiveTab) }, a.createElement(se, null)), renderContent: () => a.createElement(Z, { store: t, effectSettings: i, onItemSelect: (e) => l(e.name) }) }] })) ); }); let H = class extends a.Component { constructor(e) { super(e), (this.state = { strSearchText: "" }); let t = this.props.emoticonStore; t.is_initialized || (t.UpdateEmoticonList(), (this.m_disposeEmoticonStore = (0, o.gx)( () => t.is_initialized, () => this.forceUpdate(), ))); } componentWillUnmount() { this.m_disposeEmoticonStore && this.m_disposeEmoticonStore(); } render() { const { emoticonStore: e, emoticonHoverStore: t, onEmoticonSelected: n, onStickerSelected: i, strFlairGroupID: o } = this.props, r = []; return ( U(e) && r.push({ renderTab: (e) => a.createElement("span", { title: (0, p.Xx)("#AddonPicker_RecentlyUsed"), className: (0, u.Z)(G().PickerTab, G().Clock, e && G().ActiveTab) }, a.createElement(le, null)), renderContent: () => a.createElement(j, { store: e, hoverStore: t, onEmoticonSelect: (e) => n(e.name), onStickerSelect: (e) => i(e.name), flairGroupID: o }) }), a.createElement(h.xV, null, a.createElement(I, { config: [...r, { renderTab: (e) => a.createElement("span", { title: (0, p.Xx)("#AddonPicker_Emoticons"), className: (0, u.Z)(G().PickerTab, e && G().ActiveTab) }, a.createElement(ae, null)), renderContent: () => a.createElement(z, { store: e, hoverStore: t, onItemSelect: (e) => n(e.name), flairGroupID: o }) }, { renderTab: (e) => a.createElement("span", { title: (0, p.Xx)("#AddonPicker_Stickers"), className: (0, u.Z)(G().PickerTab, e && G().ActiveTab) }, a.createElement(re, null)), renderContent: () => a.createElement(q, { store: e, onItemSelect: (e) => i(e.name) }) }] })) ); } }; H = (0, i.gn)([r.Pi], H); class W extends a.Component { constructor(e) { super(e), (this.state = { strSearchText: "" }); let t = this.props.emoticonStore; t.is_initialized || (t.UpdateEmoticonList(), (this.m_disposeEmoticonStore = (0, o.gx)( () => t.is_initialized, () => this.forceUpdate(), ))); } componentWillUnmount() { this.m_disposeEmoticonStore && this.m_disposeEmoticonStore(); } render() { return a.createElement(h.xV, null, a.createElement(I, { config: [{ renderTab: () => a.createElement("span", { title: (0, p.Xx)("#AddonPicker_Emoticons"), className: G().PickerTab }, a.createElement(ae, null)), renderContent: () => a.createElement(Q, { store: this.props.emoticonStore, hoverStore: this.props.emoticonHoverStore, onItemSelect: (e) => this.props.OnSelected(e.name, !1), flairGroupID: this.props.strFlairGroupID }) }] })); } } class X extends a.Component { constructor(e) { super(e), (this.state = { strSearchText: "" }); let t = this.props.emoticonStore; t.is_initialized || (t.UpdateEmoticonList(), (this.m_disposeEmoticonStore = (0, o.gx)( () => t.is_initialized, () => this.forceUpdate(), ))); } componentWillUnmount() { this.m_disposeEmoticonStore && this.m_disposeEmoticonStore(); } render() { return a.createElement(h.xV, null, a.createElement(I, { config: [{ renderTab: () => a.createElement("span", { title: (0, p.Xx)("#AddonPicker_Emoticons"), className: G().PickerTab }, a.createElement(ae, null)), renderContent: () => a.createElement($, { store: this.props.emoticonStore, hoverStore: this.props.emoticonHoverStore, onItemSelect: (e) => this.props.OnSelected(e.name, !1), flairGroupID: this.props.strFlairGroupID }) }] })); } } class j extends a.Component { constructor() { super(...arguments), (this.state = { filter: "" }); } render() { const { store: e, hoverStore: t, onEmoticonSelect: n, onStickerSelect: i } = this.props, { filter: o } = this.state, r = []; return N(e) && r.push({ title: (0, p.Xx)("#AddonPicker_RecentEmoticons"), items: c.u.FilterEmoticons(N(e), o), onItemSelect: n, renderItem: (e) => a.createElement(Y, { emoticon: e, emoticonHoverStore: t }), keyExtractor: (e) => e.name, renderEmpty: () => a.createElement(T, null, o ? (0, p.Xx)("#AddonPicker_NoResults") : (0, p.Xx)("#AddonPicker_NoRecent", (0, p.Xx)("#AddonPicker_Emoticons"))) }), P(e).length && r.push({ title: (0, p.Xx)("#AddonPicker_RecentStickers"), items: c.u.FilterStickers(P(e), o), onItemSelect: i, renderItem: (e) => a.createElement(J, { sticker: e }), keyExtractor: ({ name: e }) => e, renderEmpty: () => a.createElement(T, null, o ? (0, p.Xx)("#AddonPicker_NoResults") : (0, p.Xx)("#AddonPicker_NoRecent", (0, p.Xx)("#AddonPicker_Stickers"))) }), a.createElement(A, { onFilterChange: (e) => this.setState({ filter: e }), filter: o, sections: r }); } } class z extends a.Component { constructor() { super(...arguments), (this.state = { filter: "" }); } render() { const { store: e, hoverStore: t, onItemSelect: n, flairGroupID: i } = this.props, { filter: o } = this.state, r = !o && i ? e.GetFlairListByGroupID(i) : e.emoticon_list, s = c.u.FilterEmoticons(r, o).slice(0, 1e3); return a.createElement(R, { title: (0, p.Xx)("#AddonPicker_Emoticons"), items: s, onItemSelect: n, renderItem: (e) => a.createElement(Y, { emoticon: e, emoticonHoverStore: t }), keyExtractor: (e) => e.name, onFilterChange: (e) => this.setState({ filter: e }), filter: o, onSubmit: () => n(s[0]), renderEmpty: () => (o ? a.createElement(T, null, (0, p.Xx)("#AddonPicker_NoResults")) : a.createElement(K, null)) }); } } function K() { return a.createElement(a.Fragment, null, a.createElement(T, null, (0, p.Xx)("#AddonPicker_NoneOwned", (0, p.Xx)("#AddonPicker_Emoticons"))), a.createElement(T, null, (0, p.kQ)("#AddonPicker_AcquireAtPointsShopOrMarket", a.createElement(O.ns, { href: `${C.De.STORE_BASE_URL}points/shop/c/emoticons` }, (0, p.Xx)("#AddonPicker_AcquireAtPointsShop_Link")), a.createElement(O.ns, { href: `${C.De.COMMUNITY_BASE_URL}market` }, (0, p.Xx)("#AddonPicker_AcquireAtPointsShopOrMarket_Link"))))); } class q extends a.Component { constructor() { super(...arguments), (this.state = { filter: "" }); } render() { const { store: e, onItemSelect: t } = this.props, { filter: n } = this.state, i = c.u.FilterStickers(e.GetStickerList(), n); return a.createElement(R, { title: (0, p.Xx)("#EmoticonPicker_StickerHeading"), items: i, onItemSelect: t, renderItem: (e) => a.createElement(J, { sticker: e }), keyExtractor: ({ name: e }) => e, onFilterChange: (e) => this.setState({ filter: e }), filter: n, onSubmit: () => t(i[0]), renderEmpty: () => (n ? a.createElement(T, null, (0, p.Xx)("#AddonPicker_NoResults")) : a.createElement(a.Fragment, null, a.createElement(T, null, (0, p.Xx)("#AddonPicker_NoneOwned", (0, p.Xx)("#AddonPicker_Stickers"))), a.createElement(T, null, (0, p.kQ)("#AddonPicker_AcquireAtPointsShop", a.createElement(O.ns, { href: `${C.De.STORE_BASE_URL}points/shop/c/stickers` }, (0, p.Xx)("#AddonPicker_AcquireAtPointsShop_Link")))))) }); } } class Z extends a.Component { constructor() { super(...arguments), (this.state = { filter: "" }); } render() { const { store: e, effectSettings: t, onItemSelect: n } = this.props, { filter: i } = this.state, o = e.GetEffectList().filter(({ name: e }) => e.indexOf(i) > -1); return a.createElement(R, { title: (0, p.Xx)("#EmoticonPicker_EffectHeading"), items: o, onItemSelect: n, renderItem: (e) => a.createElement(te, { effect: e, roomEffectSettings: t }), keyExtractor: ({ name: e }) => e, onFilterChange: (e) => this.setState({ filter: e }), filter: i, onSubmit: () => n(o[0]), renderEmpty: () => (i ? a.createElement(T, null, (0, p.Xx)("#AddonPicker_NoResults")) : a.createElement(a.Fragment, null, a.createElement(T, null, (0, p.Xx)("#AddonPicker_NoneOwned", (0, p.Xx)("#AddonPicker_RoomEffects"))), a.createElement(T, null, (0, p.kQ)("#AddonPicker_AcquireAtPointsShop", a.createElement(O.ns, { href: `${C.De.STORE_BASE_URL}points/shop/c/chateffects` }, (0, p.Xx)("#AddonPicker_AcquireAtPointsShop_Link")))))) }); } } let Q = class extends a.Component { constructor() { super(...arguments), (this.state = { filter: "" }); } render() { const { store: e, hoverStore: t, onItemSelect: n, flairGroupID: i } = this.props, { filter: o } = this.state, r = []; return N(e).length && r.push({ title: (0, p.Xx)("#AddonPicker_RecentEmoticons"), items: c.u.FilterEmoticons(N(e), o), onItemSelect: n, renderItem: (e) => a.createElement(Y, { emoticon: e, emoticonHoverStore: t }), keyExtractor: (e) => e.name, renderEmpty: () => a.createElement(T, null, o ? (0, p.Xx)("#AddonPicker_NoResults") : (0, p.Xx)("#AddonPicker_NoRecent", (0, p.Xx)("#AddonPicker_Emoticons"))) }), a.createElement(A, { onFilterChange: (e) => this.setState({ filter: e }), filter: o, sections: [...r, { title: (0, p.Xx)("#AddonPicker_AllEmoticons"), items: c.u.FilterStickers(e.emoticon_list, o).slice(0, 1e3), onItemSelect: n, renderItem: (e) => a.createElement(Y, { emoticon: e, emoticonHoverStore: t }), keyExtractor: (e) => e.name, renderEmpty: () => (o ? a.createElement(T, null, (0, p.Xx)("#AddonPicker_NoResults")) : a.createElement(K, null)) }] }); } }; Q = (0, i.gn)([r.Pi], Q); let $ = class extends a.Component { constructor() { super(...arguments), (this.state = { filter: "" }); } render() { const { store: e, hoverStore: t, onItemSelect: n, flairGroupID: i } = this.props, { filter: o } = this.state; return a.createElement(A, { onFilterChange: (e) => this.setState({ filter: e }), filter: o, sections: [{ title: (0, p.Xx)("#ChatEntryButton_Flair"), items: c.u.FilterStickers(e.GetFlairListByGroupID(i), o), onItemSelect: n, renderItem: (e) => a.createElement(Y, { emoticon: e, emoticonHoverStore: t }), keyExtractor: (e) => e.name, renderEmpty: () => (o ? a.createElement(T, null, (0, p.Xx)("#AddonPicker_NoResults")) : a.createElement(K, null)) }] }); } }; $ = (0, i.gn)([r.Pi], $); const Y = (e) => { const { emoticon: t, emoticonHoverStore: n, large: i } = e, o = !t.last_used && t.time_received; return a.createElement("div", { className: G().EmoticonItem }, a.createElement(F, { emoticon: t.name, emoticonHoverStore: n, large: i }), o && a.createElement(ie, null)); }; class J extends a.Component { constructor() { super(...arguments), (this.state = { showHover: !1 }), (this.m_ref = a.createRef()); } render() { const e = this.props, { sticker: t, className: n } = e, o = (0, i._T)(e, ["sticker", "className"]), r = (0, g.a)(C.De.COMMUNITY_CDN_URL, t.name); return a.createElement("div", Object.assign({ ref: this.m_ref, className: (0, u.Z)(n, G().StickerButton), onMouseOver: () => this.setState({ showHover: !0 }), onFocus: () => this.setState({ showHover: !0 }), onMouseLeave: () => this.setState({ showHover: !1 }), onBlur: () => this.setState({ showHover: !1 }) }, o), a.createElement("img", { style: { width: "100%" }, src: r }), this.state.showHover && a.createElement(ee, { target: this.m_ref.current, sticker: t })); } } const ee = (0, r.Pi)((e) => { const { target: t, sticker: { name: n, appid: i }, } = e, [o] = (0, m.vs)(i, {}); return a.createElement(x, { target: t, title: n, subtitle: null == o ? void 0 : o.GetName() }, a.createElement("img", { src: (0, g.a)(C.De.COMMUNITY_CDN_URL, n), className: G().StickerHoverSticker })); }); class te extends a.Component { constructor() { super(...arguments), (this.state = { showHover: !1 }), (this.m_ref = a.createRef()); } render() { const e = this.props, { effect: t, roomEffectSettings: n, className: o } = e, r = (0, i._T)(e, ["effect", "roomEffectSettings", "className"]), s = n[t.name]; return a.createElement("div", Object.assign({ ref: this.m_ref, onMouseOver: () => this.setState({ showHover: !0 }), onFocus: () => this.setState({ showHover: !0 }), onMouseLeave: () => this.setState({ showHover: !1 }), onBlur: () => this.setState({ showHover: !1 }), className: (0, u.Z)(o, G().EffectButton) }, r), s.renderEffectIcon(), this.state.showHover && a.createElement(ne, { target: this.m_ref.current, effect: t, roomEffectSettings: n })); } } const ne = (0, r.Pi)((e) => { const { target: t, effect: { name: n, appid: i }, roomEffectSettings: o, } = e, r = o[n], [s] = (0, m.vs)(i, {}); return a.createElement(x, { target: t, title: n, subtitle: null == s ? void 0 : s.GetName() }, a.createElement("div", { className: G().EffectHoverEffect }, r.renderEffectIcon())); }); function ie() { return a.createElement("div", { className: G().NewEmoticonIndicator }, a.createElement("div", { className: G().NewEmoticonCircle })); } class oe extends a.Component { constructor(e) { super(e), (this.state = { visible: !1 }); } SetVisible(e) { e && !this.state.visible && this.setState({ visible: !0 }); } componentDidMount() { this.props.coordinator.RegisterChild(s.findDOMNode(this), this.SetVisible); } componentWillUnmount() { this.props.coordinator.UnregisterChild(s.findDOMNode(this)); } render() { let e = this.props.emoticon, t = [G().EmoticonSelector_Item], n = !1; return !e.last_used && e.time_received && (t.push(G().EmoticonSelector_Item_New), (n = !0)), a.createElement("div", { className: (0, u.Z)(...t), "data-emoticon": e.name, onClick: this.props.onClick }, this.state.visible && a.createElement(F, { emoticonHoverStore: this.props.emoticonHoverStore, emoticon: e.name, large: !0 }), n && a.createElement(ie, null)); } } function re(e) { return a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), a.createElement("path", { fill: "currentColor", d: "M8 4C5.79086 4 4 5.79086 4 8V27C4 29.2091 5.79086 31 8 31H13V20C13 16.134 16.134 13 20 13H31V8C31 5.79086 29.2091 4 27 4H8Z" }), a.createElement("path", { fill: "currentColor", d: "M16 20C16 17.7909 17.7909 16 20 16H31L16 31V20Z" }), a.createElement("path", { fill: "currentColor", d: "M29 24.0625V25C29 25.2671 28.9738 25.5282 28.9239 25.7806L30.8858 26.1688C30.9609 25.7892 31 25.3982 31 25V24.0625H29Z" }), a.createElement("path", { fill: "currentColor", d: "M28.3263 27.2225C28.0342 27.6587 27.6587 28.0342 27.2225 28.3263L28.3351 29.9882C28.9885 29.5507 29.5507 28.9885 29.9882 28.3351L28.3263 27.2225Z" }), a.createElement("path", { fill: "currentColor", d: "M21 29H22.1875V31H19L21 29Z" }), a.createElement("path", { fill: "currentColor", d: "M24.0625 29H25C25.2671 29 25.5282 28.9738 25.7806 28.9239L26.1688 30.8858C25.7892 30.9609 25.3982 31 25 31H24.0625V29Z" }), a.createElement("path", { fill: "currentColor", d: "M29 22.1875V21L31 19V22.1875H29Z" }), ); } function ae(e) { return a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 3C15.0333 3 12.1332 3.87973 9.66645 5.52796C7.19972 7.17618 5.27713 9.51886 4.14181 12.2597C3.0065 15.0006 2.70945 18.0166 3.28823 20.9264C3.86701 23.8361 5.29562 26.5088 7.3934 28.6066C9.49119 30.7044 12.1639 32.133 15.0737 32.7118C17.9834 33.2906 20.9994 32.9935 23.7403 31.8582C26.4811 30.7229 28.8238 28.8003 30.472 26.3336C32.1203 23.8668 33 20.9667 33 18C33 16.0302 32.612 14.0796 31.8582 12.2597C31.1044 10.4399 29.9995 8.78628 28.6066 7.3934C27.2137 6.00052 25.5601 4.89563 23.7403 4.14181C21.9204 3.38799 19.9698 3 18 3ZM9.00001 15C9.00001 14.4067 9.17595 13.8266 9.5056 13.3333C9.83524 12.8399 10.3038 12.4554 10.852 12.2284C11.4001 12.0013 12.0033 11.9419 12.5853 12.0576C13.1672 12.1734 13.7018 12.4591 14.1213 12.8787C14.5409 13.2982 14.8266 13.8328 14.9424 14.4147C15.0581 14.9967 14.9987 15.5999 14.7716 16.1481C14.5446 16.6962 14.1601 17.1648 13.6667 17.4944C13.1734 17.8241 12.5934 18 12 18C11.2044 18 10.4413 17.6839 9.87869 17.1213C9.31608 16.5587 9.00001 15.7956 9.00001 15ZM24 18C23.4067 18 22.8266 17.8241 22.3333 17.4944C21.8399 17.1648 21.4554 16.6962 21.2284 16.1481C21.0013 15.5999 20.9419 14.9967 21.0576 14.4147C21.1734 13.8328 21.4591 13.2982 21.8787 12.8787C22.2982 12.4591 22.8328 12.1734 23.4147 12.0576C23.9967 11.9419 24.5999 12.0013 25.1481 12.2284C25.6962 12.4554 26.1648 12.8399 26.4944 13.3333C26.8241 13.8266 27 14.4067 27 15C27 15.7956 26.6839 16.5587 26.1213 17.1213C25.5587 17.6839 24.7957 18 24 18ZM26.3149 23.6788C26.7672 22.8295 27 21.9193 27 21H18H9C9 21.9193 9.23279 22.8295 9.68508 23.6788C10.1374 24.5281 10.8003 25.2997 11.636 25.9497C12.4718 26.5998 13.4639 27.1154 14.5558 27.4672C15.6478 27.8189 16.8181 28 18 28C19.1819 28 20.3522 27.8189 21.4442 27.4672C22.5361 27.1154 23.5282 26.5998 24.364 25.9497C25.1997 25.2997 25.8626 24.5281 26.3149 23.6788Z", }), ); } function se(e) { return a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), a.createElement("path", { fill: "currentColor", d: "M14.7163 7.6875L17.2476 15.5344C17.564 16.6102 18.4499 17.4328 19.5257 17.8125L27.3726 20.3438L19.5257 22.875C18.4499 23.1914 17.6273 24.0773 17.2476 25.1531L14.7163 33L12.1851 25.1531C11.8687 24.0773 10.9827 23.2547 9.90696 22.875L2.06009 20.3438L9.90696 17.8125C10.9827 17.4961 11.8054 16.6102 12.1851 15.5344L14.7163 7.6875Z" }), a.createElement("path", { fill: "currentColor", d: "M24.488 3L25.7861 7.06499C25.9591 7.63321 26.3918 8.07031 26.9543 8.24514L30.9784 9.55643L26.9543 10.8677C26.3918 11.0426 25.9591 11.4796 25.7861 12.0479L24.488 16.1129L23.1899 12.0479C23.0168 11.4796 22.5841 11.0426 22.0216 10.8677L17.9976 9.55643L22.0216 8.24514C22.5841 8.07031 23.0168 7.63321 23.1899 7.06499L24.488 3Z" }), a.createElement("path", { fill: "currentColor", d: "M8.11778 3.9375L8.76682 5.99185C8.85336 6.25411 9.0697 6.47265 9.32932 6.56007L11.363 7.21571L9.32932 7.87136C9.0697 7.95878 8.85336 8.17732 8.76682 8.43958L8.11778 10.4939L7.46874 8.43958C7.3822 8.17732 7.16586 7.95878 6.90624 7.87136L4.87259 7.21571L6.90624 6.56007C7.16586 6.47265 7.3822 6.25411 7.46874 5.99185L8.11778 3.9375Z" }), a.createElement("path", { fill: "currentColor", d: "M30.6178 12.375L31.2668 14.4293C31.3534 14.6916 31.5697 14.9102 31.8293 14.9976L33.863 15.6532L31.8293 16.3089C31.5697 16.3963 31.3534 16.6148 31.2668 16.8771L30.6178 18.9314L29.9687 16.8771C29.8822 16.6148 29.6659 16.3963 29.4062 16.3089L27.3726 15.6532L29.4062 14.9976C29.6659 14.9102 29.8822 14.6916 29.9687 14.4293L30.6178 12.375Z" }), a.createElement("path", { fill: "currentColor", d: "M25.9303 24.5625L26.5793 26.6168C26.6659 26.8791 26.8822 27.0977 27.1418 27.1851L29.1755 27.8407L27.1418 28.4964C26.8822 28.5838 26.6659 28.8023 26.5793 29.0646L25.9303 31.1189L25.2812 29.0646C25.1947 28.8023 24.9784 28.5838 24.7187 28.4964L22.6851 27.8407L24.7187 27.1851C24.9784 27.0977 25.1947 26.8791 25.2812 26.6168L25.9303 24.5625Z" }), ); } function le(e) { const { className: t } = e, n = (0, i._T)(e, ["className"]); return a.createElement("svg", Object.assign({ className: (0, u.Z)("SVGIcon_Button SVGIcon_Clock", t), version: "1.1", x: "0px", y: "0px", width: "20px", height: "20px", viewBox: "0 0 24 24" }, n), a.createElement("path", { d: "M15.999 15c-.15 0-.303-.034-.446-.105l-4-2A1.001 1.001 0 0111 12V5a1 1 0 012 0v6.382l3.447 1.724A1 1 0 0115.999 15zM12 24C5.383 24 0 18.617 0 12S5.383 0 12 0s12 5.383 12 12-5.383 12-12 12zm0-22C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2z" })); } (0, i.gn)([_.ak], oe.prototype, "SetVisible", null); }, 40643: (e, t, n) => { "use strict"; n.d(t, { Z: () => f }); var i = n(85556), o = n(27378), r = n(50649), a = n(2049), s = n(56320), l = n(83817), c = n(82909), m = n(51579), d = n(84290), h = n(87018), u = n(2204), p = n.n(u), _ = n(41243); const g = 1576780700; let C = class extends o.Component { OnEmoticonClick(e) { var t; const { emoticonStore: n, strFlairGroupID: i, SetUIDisplayPref: r, contextOptions: a, bShowChatAddons: s } = this.props; let l = null; if ( ((l = s ? o.createElement(m.hp, { emoticonStore: this.props.emoticonStore, emoticonHoverStore: this.props.emoticonHoverStore, strFlairGroupID: this.props.strFlairGroupID, onEmoticonSelected: (e) => this.props.OnEmoticonSelected(e, !1), roomEffectSettings: this.props.roomEffectSettings, onRoomEffectSelected: this.props.onRoomEffectSelected, onStickerSelected: this.props.onStickerSelected }) : i && n.flair_list && (null === (t = n.GetFlairListByGroupID(i)) || void 0 === t ? void 0 : t.length) > 0 ? o.createElement(m.uC, { emoticonStore: this.props.emoticonStore, emoticonHoverStore: this.props.emoticonHoverStore, strFlairGroupID: this.props.strFlairGroupID, OnSelected: this.props.OnEmoticonSelected }) : o.createElement(m.ag, { emoticonStore: this.props.emoticonStore, emoticonHoverStore: this.props.emoticonHoverStore, strFlairGroupID: this.props.strFlairGroupID, OnSelected: this.props.OnEmoticonSelected })), (0, c.yV)(l, e, a || { bOverlapHorizontal: !0, bPreferPopLeft: !0, bPreferPopTop: !0 }), this.BHaveUnseenEmoticons() && r) ) { let e = this.GetNewestIndicatorTime(); (!e || e < g) && (e = g), r("rtLastAckedNewEmoticons", e); } } GetNewestIndicatorTime() { let e = this.props.emoticonStore, t = Number.MIN_SAFE_INTEGER, n = e.GetTimeReceivedNewestEmoticon(); n && (t = n); let i = e.GetTimeReceivedForStickerOrEffect(); return (t = Math.max(i, t)), t > Number.MIN_SAFE_INTEGER ? t : void 0; } BHaveUnseenEmoticons() { const { rtLastAckedNewEmoticons: e } = this.props; let t = this.GetNewestIndicatorTime(); return !e || e < g || (t && (!e || e < t)); } render() { const { disabled: e, className: t, ttip: n, useImg: i } = this.props; let r = [t], a = !1; return e ? r.push("disabled") : this.BHaveUnseenEmoticons() && (a = !0), n && r.push("ttip"), i ? o.createElement(l.s, { onClick: this.OnEmoticonClick, onOKActionDescription: (0, d.Xx)("#ChatEntryButton_Emoticon"), focusable: !0 }, o.createElement("img", { src: this.props.useImg, className: (0, h.Z)(...r), title: this.props.title || (0, d.Xx)("#ChatEntryButton_Emoticon"), "data-tooltip-text": n })) : (r.push(p().chatSubmitButton, p().EmoticonPickerButton), o.createElement(s.wl, { className: (0, h.Z)(...r), onOKActionDescription: (0, d.Xx)("#ChatEntryButton_Emoticon"), type: "button", onClick: this.OnEmoticonClick, title: this.props.title || (0, d.Xx)("#ChatEntryButton_Emoticon"), disabled: e, "data-tooltip-text": n }, this.props.buttonIcon || o.createElement(_.tk, null), a && o.createElement(m.D3, null))); } }; (0, i.gn)([a.ak], C.prototype, "OnEmoticonClick", null), (C = (0, i.gn)([r.Pi], C)); const f = C; }, 38571: (e, t, n) => { "use strict"; n.d(t, { DT: () => a, SV: () => s }); var i = n(85556), o = n(27378), r = n(2049); function a(e) { return o.createElement( o.Fragment, null, o.Children.map(e.children, (e) => o.createElement(s, null, e)), ); } class s extends o.Component { constructor(e) { super(e), (this.state = {}), (this.state.lastErrorKey = e.errorKey); } static InstallErrorReportingStore(e) { this.sm_ErrorReportingStore = e; } componentDidCatch(e, t) { const n = s.sm_ErrorReportingStore; n ? n.ReportError(e).then((e) => e && this.setState({ identifierHash: e.identifierHash })) : console.warn("No ErrorReportingStore - use ErrorReportingStore().Init() to configure error reporting to server"), this.setState({ error: { error: e, info: t }, lastErrorKey: this.props.errorKey }); } Reset() { this.setState({ error: void 0 }); } render() { const { children: e, fallback: t, errorKey: n } = this.props, { error: i, identifierHash: r, lastErrorKey: a } = this.state; return i && n == a ? (void 0 !== t ? ("function" == typeof t ? t(i.error) : t) : s.sm_ErrorReportingStore && s.sm_ErrorReportingStore.reporting_enabled ? o.createElement(c, { error: i, identifierHash: r, store: s.sm_ErrorReportingStore, onRefresh: this.Reset }) : o.createElement(l, { error: i, onDismiss: this.Reset })) : e || null; } } (0, i.gn)([r.ak], s.prototype, "Reset", null); const l = ({ error: e, onDismiss: t }) => { let n = e.error ? e.error.stack : "Stack missing", i = e.info ? e.info.componentStack : "", r = (e.error && e.error.message) || "unknown error"; return o.createElement(m, null, o.createElement(d, null, 'Error: "', r, '"'), "   ", o.createElement("span", { style: { textDecoration: "underline", cursor: "pointer" }, onClick: t }, "(x) Dismiss"), o.createElement("br", null), o.createElement(h, null, n), o.createElement(h, null, "The error occurred while rendering:", i)); }, c = (e) => { const { error: t, onRefresh: n, identifierHash: i, store: r } = e, a = (t.error && t.error.message) || "unknown error", s = `${r.product}_${r.version}_${i}`; return o.createElement(m, null, o.createElement(d, null, "Something went wrong while displaying this content. ", o.createElement("span", { style: { textDecoration: "underline", cursor: "pointer" }, onClick: n }, "Refresh")), o.createElement(h, null, "Error Reference: ", s), o.createElement(h, null, a)); }, m = ({ children: e }) => o.createElement("div", { style: { overflow: "auto", marginLeft: "15px", color: "white", fontSize: "16px", userSelect: "auto", backgroundColor: "black" }, className: "ErrorBoundary" }, e), d = ({ children: e }) => o.createElement("h1", { style: { fontSize: "20px", display: "inline-block", marginTop: "15px", userSelect: "auto" } }, e), h = ({ children: e }) => o.createElement("pre", { style: { marginTop: "15px", opacity: 0.7, userSelect: "auto" } }, e); }, 12086: (e, t, n) => { "use strict"; n.d(t, { Ue: () => a, q: () => u, x3: () => d }); var i = n(27378), o = (n(56320), n(93635)), r = n(10553); i.createContext({ bCanUseLink: !1 }); var a, s; n(60194), n(62902), n(61752); !(function (e) { (e.k_eView = "view"), (e.k_eViewWebSiteHub = "websitehub"), (e.k_eCommunityView = "communityview"), (e.k_eCommunityEdit = "edit"), (e.k_eCommunityEditBroadcast = "editBroadcast"), (e.k_eCommunityAdminPage = "admin"), (e.k_eCommunityPublish = "publish"), (e.k_eCommunityMigrate = "migrate"), (e.k_eCommunityPreview = "preview"), (e.k_eCommunityPreviewSale = "previewsale"), (e.k_eCommunityAnnouncementHub = "community_announcehub"), (e.k_eStoreView = "storeview"), (e.k_eStoreNewsHub = "newshub"), (e.k_eStoreOwnerPage = "store"), (e.k_eStoreSalePage = "sale"), (e.k_eStoreUsersNewsHub = "usernewshub"); })(a || (a = {})), (function (e) { (e.k_eFacebook = "facebook"), (e.k_eTwitter = "twitter"), (e.k_eReddit = "reddit"); })(s || (s = {})); const l = /(?:steampowered\.com|community\.\S+\.steam\.dev|store\.\S+\.steam\.dev|valve\.org\/store|steam\.dev\/store|\.steamchina\.com|steamcommunity\.com|valve\.org\/community|steam\.dev\/community)\/(\w+)(\/|$)/i; function c(e, t) { const n = "store" === (0, r.Zv)(), i = (function (e) { const t = e.match(l); return null == t ? void 0 : t[1]; })(window.location.href), s = n && "news" == i, c = "community" === (0, r.Zv)(), m = t.appid ? "games" : "groups", d = c && m == i && ((t.appid && t.appid === r.JA.APPID) || (!t.appid && t.clanSteamID.GetAccountID() === r.JA.CLANACCOUNTID)); switch (e) { case a.k_eView: return d || s; case a.k_eCommunityView: case a.k_eCommunityEdit: case a.k_eCommunityEditBroadcast: case a.k_eCommunityAdminPage: case a.k_eCommunityPublish: case a.k_eCommunityMigrate: case a.k_eCommunityPreview: case a.k_eCommunityPreviewSale: case a.k_eCommunityAnnouncementHub: return d; case a.k_eViewWebSiteHub: return d || s; case a.k_eStoreView: case a.k_eStoreNewsHub: case a.k_eStoreOwnerPage: case a.k_eStoreUsersNewsHub: return s; case a.k_eStoreSalePage: return !1; default: return (0, o.X)(!1, "Unknown route specified for link: " + e), !1; } } function m(e, t, n) { if (n) return (e ? "/games/" + r.JA.VANITY_ID : "/groups/" + r.JA.VANITY_ID) + "/"; const i = e ? "ogg/" + e : "gid/" + t.ConvertTo64BitString(); return r.De.COMMUNITY_BASE_URL + i + "/"; } function d() { return "news"; } function h(e, t, n) { const i = "relative" === n, s = "community" === (0, r.Zv)(), l = i ? "/" : r.De.STORE_BASE_URL, c = m(e.appid, e.clanSteamID, i); t === a.k_eView ? (t = s ? a.k_eCommunityView : a.k_eStoreView) : t === a.k_eViewWebSiteHub && (t = s ? a.k_eCommunityAnnouncementHub : a.k_eStoreNewsHub); const d = e.GID ? e.GID : "", h = e.AnnouncementGID ? e.AnnouncementGID : ""; switch (t) { case a.k_eCommunityPublish: return c + (e.bOldAnnouncement ? "partnerevents/migrate_announcement/" + h : "partnerevents/publish/" + d + "?tab=publishing"); case a.k_eCommunityEdit: return c + (e.bOldAnnouncement ? "partnerevents/migrate_announcement/" + h : "partnerevents/edit/" + d); case a.k_eCommunityEditBroadcast: return c + (e.bOldAnnouncement ? "partnerevents/migrate_announcement/" + h : "partnerevents/edit/" + d) + "?tab=broadcast"; case a.k_eCommunityMigrate: return c + "partnerevents/migrate_announcement/" + h; case a.k_eCommunityPreview: return c + (e.bOldAnnouncement ? "partnerevents/preview_old_announcement/" + h : "partnerevents/preview/" + d); case a.k_eCommunityPreviewSale: return c + "partnerevents/previewsale/" + d; case a.k_eCommunityAdminPage: return c + "partnerevents"; case a.k_eCommunityAnnouncementHub: return c + "announcements"; case a.k_eStoreNewsHub: return l + `news/${e.appid ? `app/${e.appid}` : `group/${e.clanSteamID.GetAccountID()}`}`; case a.k_eStoreOwnerPage: return l + (e.appid ? "app/" + e.appid : "curator/" + e.clanSteamID.GetAccountID()); case a.k_eStoreSalePage: return e.jsondata.bSaleEnabled ? l + (e.jsondata.sale_vanity_id_valve_approved_for_sale_subpath ? "sale/" : "curator/" + e.clanSteamID.GetAccountID() + "/sale/") + e.jsondata.sale_vanity_id : l; case a.k_eCommunityView: return c + "announcements/detail/" + h; case a.k_eStoreView: return `${l}news/${e.appid ? `app/${e.appid}` : `group/${e.clanSteamID.GetAccountID()}`}/${e.bOldAnnouncement ? `old_view/${h}` : `view/${d}`}`; case a.k_eStoreUsersNewsHub: return `${l}news/`; default: return (0, o.X)(!1, "Unknown route specified for link"), ""; } } function u(e, t, n) { return h(e, t, "forceAbsolute" === n || !c(t, e) ? "absolute" : "relative"); } }, 15293: (e, t, n) => { "use strict"; n.d(t, { Xt: () => yt }); var i = n(27378), o = n(68816), r = n(84290), a = n(10553), s = n(85556), l = n(87018), c = n(79588), m = n(14206), d = n.n(m), h = n(1736), u = n(8568), p = n(99081), _ = n(24782), g = n(77385); const C = n(59087).Z, f = new g.sO("Login"), v = f.Info, S = (f.Debug, f.Warning), b = f.Error; function I(e, t) { let n = C.getPublicKey(t.publickey_mod, t.publickey_exp), i = C.encrypt(e, n); return !1 === i ? null : i; } var y, E; !(function (e) { (e[(e.None = 0)] = "None"), (e[(e.Generic = 1)] = "Generic"), (e[(e.Expired = 2)] = "Expired"), (e[(e.Network = 3)] = "Network"), (e[(e.MoveAuthenticator = 4)] = "MoveAuthenticator"), (e[(e.RateLimitExceeded = 5)] = "RateLimitExceeded"), (e[(e.AnonymousLogin = 6)] = "AnonymousLogin"); })(y || (y = {})), (function (e) { (e[(e.k_Success = 0)] = "k_Success"), (e[(e.k_PrimaryDomainFail = 1)] = "k_PrimaryDomainFail"), (e[(e.k_SecondaryDomainFail = 2)] = "k_SecondaryDomainFail"); })(E || (E = {})); class D { constructor(e, t, n, i) { (this.m_strChallengeURL = void 0), (this.m_bRemoteInteraction = !1), (this.m_eFailureState = y.None), (this.m_strExtendedErrorMessage = ""), (0, c.rC)(this), (this.m_transport = e), (this.m_onCompleteCallback = t), (this.m_onDeviceDetailsCallback = n), (this.m_onShowAgreement = i); } StartPolling(e = !0) { null != this.m_activeTimerID && this.StopPolling(), e ? this.PollForUpdate() : (this.m_activeTimerID = window.setTimeout(this.PollForUpdate, this.m_msPollInterval)); } StopPolling() { window.clearTimeout(this.m_activeTimerID), (this.m_activeTimerID = void 0); } PollForUpdate() { return (0, s.mG)(this, void 0, void 0, function* () { try { const e = h.gA.Init(p.Uy); e.SetEMsg(9804), e.Body().set_client_id(this.m_strClientID), e.Body().set_request_id(this.m_rgRequestID), this.m_strTokenToRevoke && e.Body().set_token_to_revoke(this.m_strTokenToRevoke); const t = yield p.$h.PollAuthSessionStatus(this.m_transport, e), n = t.GetEResult(); if (1 !== n) { if (2 === n) { const e = t.Hdr().transport_error(); if ((b(`Failed to poll auth session. Result ${n}. Transport Error: ${e}`), 2 === e || 3 === e)) return this.m_transport.MakeReady(), window.setTimeout(this.PollForUpdate, this.m_msPollInterval), 1; } if (9 === n || 27 === n) this.m_eFailureState = y.Expired; else if (84 === n) this.m_eFailureState = y.RateLimitExceeded; else { if (118 == n) { if (this.m_onShowAgreement) this.m_onShowAgreement(t.Body().agreement_session_url()); else { const e = t.Body().agreement_session_url(), n = document.location.href; window.location.href = `${e}&redir=${encodeURIComponent(n)}`; } return this.m_onCompleteCallback({ bSuccess: !1 }), n; } b(`Failed to poll auth session. Result: ${n}`), (this.m_eFailureState = y.Generic); } return this.m_onCompleteCallback({ bSuccess: !1 }), n; } const { new_challenge_url: i, new_client_id: o, refresh_token: r, access_token: a, account_name: s, had_remote_interaction: l, new_guard_data: c } = t.Body().toObject(); return (this.m_bRemoteInteraction = !!l), r ? (this.m_onCompleteCallback({ bSuccess: !0, strRefreshToken: r, strAccessToken: a, strAccountName: s, strNewGuardData: c }), n) : (i && (this.m_strChallengeURL = i), o && (this.m_strClientID = o), (this.m_activeTimerID = window.setTimeout(this.PollForUpdate, this.m_msPollInterval)), n); } catch (e) { return b(`Failed to poll auth session. ${e}`), (this.m_eFailureState = y.Generic), this.m_onCompleteCallback({ bSuccess: !1 }), 2; } }); } SetTokenToRevoke(e) { this.m_strTokenToRevoke = e; } GetFailureState() { return this.m_eFailureState; } GetExtendedErrorMessage() { return this.m_strExtendedErrorMessage; } BHadRemoteInteraction() { return this.m_bRemoteInteraction; } GetDeviceDetails() { return (0, s.mG)(this, void 0, void 0, function* () { const e = yield this.m_onDeviceDetailsCallback(); return p.up.fromObject(e); }); } } function w(e) { const t = new FormData(); t.append("nonce", e), t.append("sessionid", a.De.SESSIONID); let n = new URL(document.location.href); const i = new URLSearchParams(n.search); i.has("need_password") && (i.delete("need_password"), (n.search = i.toString())), t.append("redir", n.toString()); const o = `${a.De.LOGIN_BASE_URL}jwt/finalizelogin`; return d() .post(o, t, { withCredentials: !0 }) .then( (e) => { const { data: t } = e; if (!(t && t.transfer_info && t.steamID && Array.isArray(t.transfer_info))) return b("Result of finalizelogin does not match expectations!"), E.k_PrimaryDomainFail; const { transfer_info: n, steamID: i, primary_domain: o } = t; return Promise.all( n.map(({ url: e, params: t }) => (function (e, t) { return (0, s.mG)(this, void 0, void 0, function* () { const n = new URL(e); let i = !0; try { const o = new FormData(); Object.keys(t).forEach((e) => o.append(e, t[e])); const r = yield d().post(e, o, { withCredentials: !0, timeout: 1e4 }); 200 !== r.status ? (b(`Transfer login to ${n.host} failed with status code: ${r.status}`), (i = !1)) : 1 !== r.data.result && (b(`Transfer login to ${n.host} failed with result: ${r.data.result}`), (i = !1)); } catch (e) { b(`Transfer login to ${n.host} failed: "${e}"`), (i = !1); } return { bSuccess: i, domain: n.host }; }); })(e, Object.assign(Object.assign({}, t), { steamID: i })), ), ).then( (e) => (function (e, t) { let n = E.k_Success; return ( e.forEach((e) => { e.bSuccess || (t && e.domain.toLowerCase() === t.toLowerCase() ? (n = E.k_PrimaryDomainFail) : n == E.k_Success && (n = E.k_SecondaryDomainFail)); }), n ); })(e, o), () => E.k_SecondaryDomainFail, ); }, () => (b("Failed to finalize login. Initial call failed."), E.k_PrimaryDomainFail), ); } (0, s.gn)([c.LO], D.prototype, "m_strChallengeURL", void 0), (0, s.gn)([c.LO], D.prototype, "m_bRemoteInteraction", void 0), (0, s.gn)([c.LO], D.prototype, "m_eFailureState", void 0), (0, s.gn)([c.LO], D.prototype, "m_strExtendedErrorMessage", void 0), (0, s.gn)([u.a], D.prototype, "PollForUpdate", null), (0, s.gn)([u.a], D.prototype, "SetTokenToRevoke", null); var R = n(78654), A = n(41370), M = n(2049), k = n(54521), T = n(11667); class L extends D { constructor(e) { super(e.transport, (e) => this.onAuthComplete(e), e.onDeviceDetails, e.onShowAgreement), (this.m_eStatus = 0), (this.m_strConfirmationAssociatedMessage = ""), (this.m_bUsingCodeOverride = !1), (this.m_strWeakAuthToken = ""), (this.m_strErrorReference = ""), (this.onAuthComplete = (e) => { this.m_eStatus = e.bSuccess ? 14 : 15; const t = e.bSuccess ? Object.assign(Object.assign({}, e), { strAccountName: this.m_strAccountName, steamid: this.m_steamid }) : e; this.m_onLoginComplete && this.m_onLoginComplete(t); }), (0, c.rC)(this), (this.m_onLoginComplete = e.onComplete), (this.m_onGetMachineAuth = e.onGetMachineAuth); } Start(e, t, n) { return (0, s.mG)(this, void 0, void 0, function* () { if (0 !== this.m_eStatus && 2 !== this.m_eStatus) return b("Cannot start an already started auth session. Create a new session instance."), 29; const i = e.replace(/[^\x00-\x7F]/g, ""), o = t.replace(/[^\x00-\x7F]/g, "").slice(0, 64); if (!i.length || !o.length) return 8; if (((this.m_eStatus = 1), (this.m_bUsingCodeOverride = !1), "anonymous" == e)) return this.SetFailureState(y.AnonymousLogin, x.EResult(12)), 12; try { const t = yield (function (e, t) { return (0, s.mG)(this, void 0, void 0, function* () { const n = h.gA.Init(p.kp); n.Body().set_account_name(t), n.SetEMsg(9804); try { yield e.MakeReady(); const t = yield p.$h.GetPasswordRSAPublicKey(e, n); if ((t.DEBUG_LogToConsole(), 1 !== t.GetEResult())) return b(`Failed to get RSA key with EResult: ${t.GetEResult()}`), null; const { publickey_exp: i, publickey_mod: o, timestamp: r } = t.Body().toObject(); return i && o && r ? { publickey_exp: i, publickey_mod: o, timestamp: r } : (b(`Missing expected field in RSA Key: ${JSON.stringify({ publickey_exp: i, publickey_mod: o, timestamp: r })}`), null); } catch (e) { return b(`Failed to get RSA key: ${JSON.stringify(e)}`), null; } }); })(this.m_transport, i); if (!t) return b("Cannot start auth session without a valid RSA key"), this.SetFailureState(y.Network, x.EResult(20)), 20; const r = I(o, t), l = h.gA.Init(p._u); l.SetEMsg(9804), l.Body().set_account_name(i), l.Body().set_encrypted_password(r), l.Body().set_encryption_timestamp(t.timestamp), l.Body().set_remember_login(!!n), l.Body().set_persistence(n ? 1 : 0), l.Body().set_website_id(a.De.WEBSITE_ID); try { l.Body().set_device_details(yield this.GetDeviceDetails()); } catch (e) { b("Failed to GetDeviceDetails"), b(e); } if ((l.Body().set_language((0, R.jM)(a.De.LANGUAGE)), null != this.m_onGetMachineAuth)) { const e = yield this.m_onGetMachineAuth(i); 1 == e.eresult && l.Body().set_guard_data(e.data); } yield this.m_transport.MakeReady(); const u = yield p.$h.BeginAuthSessionViaCredentials(this.m_transport, l); return ( u.DEBUG_LogToConsole(), (0, c.z)(() => (0, s.mG)(this, void 0, void 0, function* () { const t = u.GetEResult(), n = u.Hdr().transport_error(); if (1 !== t) switch (t) { case 5: return (this.m_eStatus = 2), t; case 20: case 3: return this.SetFailureState(y.Network, x.EResult(20)), t; case 84: return this.SetFailureState(y.RateLimitExceeded, x.EResult(t)), t; case 118: if (this.m_onShowAgreement) this.m_onShowAgreement(u.Body().agreement_session_url()); else { const e = u.Body().agreement_session_url(), t = document.location.href; window.location.href = `${e}&redir=${encodeURIComponent(t)}`; } return this.m_onCompleteCallback({ bSuccess: !1 }), t; default: return b(`Failed to start auth session. Result: ${t} Transport: ${n}`), this.SetFailureState(y.Generic, x.EResult(t), u.Body().extended_error_message()), this.m_onCompleteCallback({ bSuccess: !1 }), t; } this.m_strAccountName = e; const { client_id: i, request_id: o, interval: r, allowed_confirmations: s, steamid: l, weak_token: c } = u.Body().toObject(); if (((this.m_msPollInterval = 1e3 * r), (this.m_strClientID = i), (this.m_rgRequestID = o), (this.m_steamid = l), (this.m_strWeakAuthToken = c), s.find(({ confirmation_type: e }) => 6 === e))) { const e = new FormData(); e.append("clientid", i), e.append("steamid", this.m_steamid); const t = `${a.De.LOGIN_BASE_URL}jwt/checkdevice/${this.m_steamid}`; try { if (1 == (yield d().post(t, e, { headers: { "Content-Type": "multipart/form-data" }, withCredentials: !0 })).data.result) return (this.m_eStatus = 4), this.StartPolling(!0), 1; } catch (e) { if ((v(`checkdevice ajax to ${t} failed: ${e.message}`), e instanceof m.AxiosError)) { const t = e; return t.response ? (this.SetFailureState(y.Network, x.AjaxFailureWithCode(t.response.status)), 20) : (this.SetFailureState(y.Network, x.AjaxFailureNoCode()), 20); } return this.SetFailureState(y.Network, x.EResult(79)), 79; } } const h = (function (e) { let t = e[0] || 0; e.length > 1 && (t = e.sort((e, t) => G[e] - G[t])[0]); return t; })(s.map(({ confirmation_type: e }) => e)), p = s.find(({ confirmation_type: e }) => e === h); switch ((p && p.associated_message && (this.m_strConfirmationAssociatedMessage = p.associated_message), h)) { case 1: return (this.m_eStatus = 13), this.StartPolling(), t; case 2: this.m_eStatus = 3; break; case 5: (this.m_eStatus = 4), this.StartPolling(!1); break; case 3: (this.m_eStatus = 5), this.StartPolling(!1); break; case 4: (this.m_eStatus = 6), this.StartPolling(!1); } return t; }), ) ); } catch (e) { return b(`Failed to start auth session. Exception: ${JSON.stringify(e)}`), v(e), this.SetFailureState(y.Generic, x.FailedToStart()), this.m_onCompleteCallback({ bSuccess: !1 }), 2; } }); } Stop() { this.StopPolling(), (this.m_eStatus = 16); } GetStatus() { return this.m_eStatus; } GetConfirmationAssociatedMessage() { return this.m_strConfirmationAssociatedMessage; } GetAccountName() { return this.m_strAccountName; } GetSteamID() { return this.m_steamid; } GetReplacementAuthenticator() { return this.m_replacementAuthenticator; } GetErrorReference() { return this.m_strErrorReference; } SendSteamGuardCode(e, t = !0) { return (0, s.mG)(this, void 0, void 0, function* () { if (0 == e.length) { switch (this.m_eStatus) { case 10: this.m_eStatus = 3; break; case 11: this.m_eStatus = 5; break; case 5: case 3: break; default: throw new Error("Attempted to clear code in invalid state"); } return Promise.resolve(1); } try { yield this.m_transport.MakeReady(); const n = 3 === this.m_eStatus || 10 === this.m_eStatus, i = h.gA.Init(p.Am); i.SetEMsg(9804), i.Body().set_client_id(this.m_strClientID), i.Body().set_steamid(this.m_steamid), i.Body().set_code(e), i.Body().set_code_type(n ? 2 : 3); const o = yield p.$h.UpdateAuthSessionWithSteamGuardCode(this.m_transport, i), r = o.GetEResult(); if (1 !== r) { if (!t) return b(`Failed to automatically update session with local SG info. Result ${r}. Transport ${o.Hdr().transport_error()}`), r; switch (r) { case 65: case 88: return (this.m_eStatus = n ? 10 : 11), r; case 27: return this.SetFailureState(y.Expired, x.EResult(r)), this.m_onCompleteCallback({ bSuccess: !1 }), r; case 84: return this.SetFailureState(y.RateLimitExceeded, x.EResult(r)), this.m_onCompleteCallback({ bSuccess: !1 }), r; case 118: if (this.m_onShowAgreement) this.m_onShowAgreement(o.Body().agreement_session_url()); else { const e = o.Body().agreement_session_url(), t = document.location.href; window.location.href = `${e}&redir=${encodeURIComponent(t)}`; } return this.m_onCompleteCallback({ bSuccess: !1 }), r; default: return b(`Failed to update auth session with SG code. Result: ${r}`), this.SetFailureState(y.Generic, x.EResult(r)), this.m_onCompleteCallback({ bSuccess: !1 }), r; } } return (this.m_eStatus = 13), this.StartPolling(), r; } catch (e) { return b(`Failed to update auth session with SG code. ${e}`), this.SetFailureState(y.Generic, x.FailedToAddCode()), this.m_onCompleteCallback({ bSuccess: !1 }), 2; } }); } UseCodeOverride() { switch (this.m_eStatus) { case 6: return (this.m_bUsingCodeOverride = !0), void (this.m_eStatus = 5); case 4: return (this.m_bUsingCodeOverride = !0), void (this.m_eStatus = 3); default: return void b(`Don't know how to UseCodeOverride from login session status ${this.m_eStatus}`); } } CantAccessCode() { this.m_eStatus = 7; } StartMoveAuthenticator() { return (0, s.mG)(this, void 0, void 0, function* () { this.m_weakAuthWebInterface = new k.J(a.De.WEBAPI_BASE_URL, this.m_strWeakAuthToken); try { const e = h.gA.Init(T._w), t = yield T.Sz.RemoveAuthenticatorViaChallengeStart(this.m_weakAuthWebInterface.GetServiceTransport(), e); 1 != t.GetEResult() ? (t.DEBUG_LogToConsole(), b("An unexpected error occured while adding an authenticator", t.GetEResult()), this.SetFailureState(y.MoveAuthenticator, x.EResult(t.GetEResult()))) : (this.m_eStatus = 8); } catch (e) { b("An unexpected error occured while moving an authenticator", e), this.SetFailureState(y.MoveAuthenticator, x.EResult(2)); } }); } ResendMoveCode() { return (0, s.mG)(this, void 0, void 0, function* () { const e = h.gA.Init(T._w), t = yield T.Sz.RemoveAuthenticatorViaChallengeStart(this.m_weakAuthWebInterface.GetServiceTransport(), e); 1 != t.GetEResult() ? (t.DEBUG_LogToConsole(), b("An unexpected error occured while adding an authenticator", t.GetEResult()), this.SetFailureState(y.MoveAuthenticator, x.EResult(t.GetEResult()))) : (this.m_eStatus = 8); }); } FinishMoveAuthenticator(e) { return (0, s.mG)(this, void 0, void 0, function* () { const t = h.gA.Init(T.AX); t.Body().set_sms_code(e), t.Body().set_generate_new_token(!0), t.Body().set_version(2); const n = yield T.Sz.RemoveAuthenticatorViaChallengeContinue(this.m_weakAuthWebInterface.GetServiceTransport(), t); 94 == n.GetEResult() ? (this.m_eStatus = 12) : n.Body().success() ? (n.DEBUG_LogToConsole(), (this.m_replacementAuthenticator = (function (e) { const { shared_secret: t, identity_secret: n, secret_1: i, status: o, uri: r, server_time: a } = e, l = (0, s._T)(e, ["shared_secret", "identity_secret", "secret_1", "status", "uri", "server_time"]); return Object.assign({ shared_secret: _.JQ(t), identity_secret: _.JQ(n), secret_1: _.JQ(i) }, l); })(n.Body().replacement_token().toObject())), (this.m_eStatus = 9), (this.m_bUsingCodeOverride = !1)) : (n.DEBUG_LogToConsole(), b("Error when calling RemoveAuthenticatorViaChallengeContinue", n.GetEResult()), this.SetFailureState(y.MoveAuthenticator, x.EResult(n.GetEResult()))); }); } FinishMoveRecovery() { this.m_eStatus = 5; } BCanGoBack() { switch (this.m_eStatus) { case 5: case 11: case 3: case 10: case 6: case 4: case 7: case 8: case 12: return !0; default: return !1; } } GoBack() { switch (this.m_eStatus) { case 6: case 4: this.m_eStatus = 0; break; case 5: case 11: this.m_eStatus = this.m_bUsingCodeOverride ? 6 : 0; break; case 7: case 8: case 12: this.m_eStatus = (this.m_bUsingCodeOverride, 5); break; case 3: case 10: this.m_eStatus = this.m_bUsingCodeOverride ? 4 : 0; break; default: return void b(`Don't know how to GoBack from login session status ${this.m_eStatus}`); } } SetFailureState(e, t, n = "") { (this.m_eStatus = 15), (this.m_eFailureState = e), (this.m_strErrorReference = t), (this.m_strExtendedErrorMessage = n); } SetOnLoginComplete(e) { this.m_onLoginComplete = e; } } (0, s.gn)([c.LO], L.prototype, "m_eStatus", void 0), (0, s.gn)([c.LO], L.prototype, "m_strErrorReference", void 0), (0, s.gn)([M.ak], L.prototype, "Start", null), (0, s.gn)([M.ak], L.prototype, "SendSteamGuardCode", null), (0, s.gn)([M.ak], L.prototype, "UseCodeOverride", null), (0, s.gn)([M.ak], L.prototype, "CantAccessCode", null), (0, s.gn)([M.ak], L.prototype, "StartMoveAuthenticator", null), (0, s.gn)([M.ak], L.prototype, "ResendMoveCode", null), (0, s.gn)([M.ak], L.prototype, "FinishMoveAuthenticator", null), (0, s.gn)([M.ak], L.prototype, "FinishMoveRecovery", null), (0, s.gn)([M.ak], L.prototype, "GoBack", null), (0, s.gn)([c.aD], L.prototype, "SetFailureState", null), (0, s.gn)([M.ak], L.prototype, "SetOnLoginComplete", null); const G = [4, 3, 2, 1, 0, 5].reduce((e, t, n) => ((e[t] = n), e), {}); function O(e) { return e ? 7 : 5; } function F(e, t) { return /[23456789BCDFGHJKMNPQRTVWXY]*/g.test(e) && e.length <= O(t); } function B(e, t) { return F(e, t) && e.length === O(t); } const x = { EResult: (e) => `e${e}`, FailedToStart: () => "c-fts", FailedToAddCode: () => "c-ftac", AjaxFailureNoCode: () => "af", AjaxFailureWithCode: (e) => `af-${e}` }; var N, P = n(31721), U = n.n(P), V = n(38215), H = n.n(V), W = n(187), X = n.n(W); function j(e) { let { quality: t = N.M, children: n, className: o, activeBitColor: r = null, inactiveBitColor: a = null, borderWidth: s = 3 } = e; const c = (function (e, t = {}) { const { typeNumber: n, errorCorrectLevel: o } = t, [r, a] = (0, i.useState)(); return ( (0, i.useEffect)(() => { a(H()(e, { typeNumber: n, errorCorrectLevel: o }).modules); }, [e, n, o]), r ); })(n, { typeNumber: 6, errorCorrectLevel: t }); if (!c) return null; let m = []; for (let e = 0; e < s; e++) m.push(Array(c.length + 2 * s).fill(!1)); for (let e = 0; e < c.length; e++) m.push([].concat(Array(s).fill(!1), c[e], Array(s).fill(!1))); for (let e = 0; e < s; e++) m.push(Array(c.length + 2 * s).fill(!1)); const d = [], h = (0, l.Z)(X().Bit), u = (0, l.Z)(X().Bit, X().Active), p = null !== r ? { backgroundColor: r } : {}, _ = null !== a ? { backgroundColor: a } : {}; for (let e = 0; e < m.length; e++) for (let t = 0; t < m.length; t++) { const n = m[e][t]; d.push(i.createElement("div", { key: `${e}_${t}`, className: n ? u : h, style: n ? p : _ })); } let g = m.length; return i.createElement("div", { className: (0, l.Z)(X().QRBits, o), style: { gridTemplateColumns: `repeat( ${g}, 1fr )` } }, d); } !(function (e) { (e[(e.L = 1)] = "L"), (e[(e.M = 0)] = "M"), (e[(e.Q = 3)] = "Q"), (e[(e.H = 2)] = "H"); })(N || (N = {})); class z extends D { constructor(e) { super( e.transport, (t) => { (this.m_eStatus = t.bSuccess ? 3 : 4), e.onComplete(t); }, e.onDeviceDetails, ), (this.m_eStatus = 0), (0, c.rC)(this); } Start() { return (0, s.mG)(this, void 0, void 0, function* () { if (0 !== this.m_eStatus) return console.error("Cannot start an already started auth session. Create a new session instance."), 2; this.m_eStatus = 1; try { yield this.m_transport.MakeReady(); const e = h.gA.Init(p.oZ); e.SetEMsg(9804); try { e.Body().set_device_details(yield this.GetDeviceDetails()); } catch (e) { console.error("Failed to GetDeviceDetails"), console.log(e); } e.Body().set_website_id(a.De.WEBSITE_ID); const t = yield p.$h.BeginAuthSessionViaQR(this.m_transport, e), n = t.GetEResult(), i = t.Hdr().transport_error(); if (1 !== n) return console.error(`Failed to start auth session. Result: ${n} Transport: ${i}`), (this.m_eFailureState = y.Generic), this.m_onCompleteCallback({ bSuccess: !1 }), n; const { client_id: o, challenge_url: r, interval: s, request_id: l } = t.Body().toObject(); return (this.m_strClientID = o), (this.m_strChallengeURL = r), (this.m_msPollInterval = 1e3 * s), (this.m_rgRequestID = l), (this.m_eStatus = 2), this.StartPolling(!1), n; } catch (e) { return console.error(`Failed to start auth session: ${JSON.stringify(e)}`), (this.m_eFailureState = y.Generic), this.m_onCompleteCallback({ bSuccess: !1 }), 2; } }); } Stop() { this.StopPolling(), (this.m_eStatus = 5); } GetChallengeURL() { return this.m_strChallengeURL; } GetStatus() { return this.m_eStatus; } } (0, s.gn)([c.LO], z.prototype, "m_eStatus", void 0); var K = n(10335), q = n.n(K), Z = n(11259); function Q(e) { const { transport: t, onComplete: n, onStatusChange: o, platform: r, deckStyling: s } = e, c = a.De.IN_STEAMUI ? Ee : De, { eStatus: m, strChallengeURL: d, bHadRemoteInteraction: h, reset: u, setTokenToRevoke: p, } = (function (e) { const [t, n] = (0, i.useState)(new z(e)); return ( (0, i.useEffect)( () => ( t.Start(), () => { t.Stop(); } ), [t], ), (0, A.SZ)(() => ({ strChallengeURL: t.GetChallengeURL(), eFailureState: t.GetFailureState(), eStatus: t.GetStatus(), bHadRemoteInteraction: t.BHadRemoteInteraction(), reset: () => n(new z(e)), setTokenToRevoke: t.SetTokenToRevoke })) ); })({ transport: t, onComplete: n, onDeviceDetails: c }); (0, i.useEffect)(() => o && o(m), [o, m]); const _ = 2 === m ? d : a.De.STORE_BASE_URL, g = 0 === m || 1 === m || h, C = 4 === m, f = 3 === m, v = f ? i.createElement(te, null) : C ? i.createElement(J, { reset: u }) : g ? i.createElement(Y, { size: "small" }) : null, S = g || C || f; (0, i.useEffect)(() => { var t; (null === (t = e.refreshInfo) || void 0 === t ? void 0 : t.login_token_id) && p(e.refreshInfo.login_token_id); }, [e.refreshInfo, p]); const b = 1 !== a.De.EUNIVERSE; return i.createElement("div", { className: q().Column }, i.createElement("div", { style: { position: "relative" } }, i.createElement(j, { borderWidth: 0, activeBitColor: "#212328", inactiveBitColor: b ? "magenta" : "white", quality: $(_), className: (0, l.Z)(q().LoginQR, s && q().QRLoginDeck, S && q().Blur, b && q().NonPublic) }, _), S && i.createElement("div", { className: q().Overlay }, i.createElement("div", { className: q().Box }, v)))); } function $(e) { return e.length <= 90 ? N.Q : void 0; } function Y(e) { const { size: t } = e; return i.createElement("div", { className: (0, l.Z)(q().Loading, "small" == t && q().Small, ("medium" == t || !t) && q().Medium, "large" == t && q().Large) }); } function J(e) { return i.createElement(Z.zx, { onClick: e.reset, className: q().QRFailure }, i.createElement(ee, null)); } function ee(e) { return i.createElement("svg", { version: "1.1", id: "Layer_2", xmlns: "http://www.w3.org/2000/svg", style: { width: "40px", height: "40px", cursor: "pointer" }, x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, i.createElement("path", { fill: "none", stroke: "#fff", strokeWidth: "30", strokeLinecap: "round", strokeMiterlimit: "10", d: "M229.809,147.639 c-9.178,47.863-51.27,84.027-101.809,84.027c-57.253,0-103.667-46.412-103.667-103.666S70.747,24.334,128,24.334 c34.107,0,64.368,16.472,83.261,41.895" }), i.createElement("polygon", { points: "147.639,108.361 245.755,10.166 245.834,108.361", fill: "#fff" })); } function te() { return i.createElement("svg", { version: "1.1", id: "base", xmlns: "http://www.w3.org/2000/svg", style: { width: "45px", height: "45px" }, x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, i.createElement("polyline", { fill: "none", stroke: "#fff", strokeWidth: "24", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", points: "49.5,147.75 95,210.75 206.5,45.25 " })); } var ne = n(99165), ie = n(11612), oe = n(16518); const re = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAACICAYAAAButVxcAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAACD+SURBVHgB7V0JkBzVef577tnZ+96V9kAroQOEhAUCBAYJbIEpH7KIbWzHmLgK8JHYpBJwOeXCTijHLhvHVfFFXJVU2ZWy44sjwTGyDSgcCwiEEadOJO3q2PuenWNnpvN/r/v1vO6d6R3NandlPL9o+nhHv/7e//7rvTdLVKIlIa2QTJe/6y+2eoi26rp+Dd92mkeJsjSm6fqxjEYva6Q9/Oxjv35orgKuwANwrvArfLmVSnQGpB/TdM+Pux//1Vfz5cgJ/NatO6qTXu9XdaIvUInmQfox3Z/Z9tyjDx1zpswCXoDu8Tyha9pGq7ieoeT0FKVm4pSemSE9k6ISZUnTPOTxBcjr91OwrJI8Xp+aPMYMfOdzj/36x7Yy6k0u0GcS0xQbHxbgl6gwCoQiFCyvtnWAnta2Pbf7V7vlvUctIMSLAnpscoSmxwZtoFdUVNCyZS3WtXpfIoOS8ShFR/spk85KBs2rP3j5DTs65b1XXkCR8umH8j4+NcbiZWJWpTe+ZzutWb2akskkfe6zt9PRY8eovq6OTp06TW93WrasVZxXrOikq668gianJimVSlNZWZg8Hq91TqVSgllTiRj5g2WkeQR/h7SMp/PE0Td/jhuL403rRVAyNkWJ6HjOl09MTtH+AweptbWVXnhhL508eZobMEVvZ8KIvvTSTfS1e+9hplslvr21tYVWrz6fwQ7Rs888Ti/ueVKcW1qarHLg+NjEsFrVjsu3CgYnIYS2vPtDG/VMZqtMzQc66PHHd896tn//JL2dCeIU9NDDj9BJHtmnXnyJJicm6AU++3w++psv3MVcPkOTzJSnT/fbyqaScaEnwfkgzZP5AJ92C+V6xbU7v8Oq+U5cg9sdvVSieZIvEKJIjTUSxtjBqjFEjcOKKdHZJXC9YqBUb7l2Z4eU8RbwaR4yJTr7BPAlpT36RmloVsuHumICfeu+r9OKVSupLBSiqWiMWhrqqLd/gFZ3tlEmk2EN7rEOkKZp4pAU09nZYlchyEEMjvOIA+nynMnoXFazyqKeobEx2v3cH2n1ee00w86a1+encChAfpalM2wteDjfirZW+r/n91IHK7i+oRGWmxpVlpdT/9AQLWtqojcOH6PWpnp29NJ02cYLrTahzbA4vF6vkM0ChHRatAfP5HcIoPg58h4fm6G6YIbKwyHyeT2inCxz4NBhCofD1NG2XJRBeTzHe6LRKG256l1WfaxDrWsOJ1TbXCyVUMHw6Bhpx3oplsrQ6PgkNdRVs6bO0PrzuwQoaICfvTUJqjxkeZ9mnHUtC6zaMV6v/X2guqoquun6rdlGcn68x1l22xWXijLntS+z8q1b2SmuV3UuF0BKENSOlR0PUEFov+yUeGKGQkE/m8ozNMTf7vd5KeMtZ2/UR0G/Jsogn9dseGV5hMskrDpVxqqsrBTiBV5tLsoLPKiro41WsckUCgQozo2pqogwV40IIJwfILld5X71LMFVG+ekjMoVZn3qKHKWkRwm02S+Y8eOU2dnh60Nat1y5HACg5yiNAMU4A5A7tP9gzQdi1FlbSX5yoIUihFNZ5KkpTUKmDa67Kzm5maaYlNathHvkNcGLvljkK7A48PqqqsMzubeRzWtjfU2IFRRo5IEQnaSMy0XeLIeFUwQOAwfonasBFQdZfJZlIEbHBqmpsYGCwSU8ypDTBU3MzMpGhkbpwSLpmBZgKrqI2KUshtEPr9OM/zKmCdNMUpTKE2WWMI5zFw/mU5QhvOGNS950zzKOH8q5R5icQVez2Q/CL2cNuUeGix7VuV+tUPUZyrwKrc7Od8JYi4xoea1tVV5fzMDfvito+xR19r0kGQUtBl1g/Pj8QQldf6mGnidZl1KvaFA2vaeZIBjMdxBaY3LM9yEAKLXKDHDXaWZ5Vkd2NrkJFfgIZ5UjpUcoyokyEN0hJSpIKcIcIoX9Zm8lwCrQKocinvZFlVZqnXK9NraWmqeioqwRogNA/lutMtQsGkhXtIstzNhPjQ/FUpsJ1Cco7MznvwAambP5QNdYERupGvWkEIl3d3dIjwghyk+1MciKBaP22SoBEQ91GfixQoHS46UoEqQZn20WQfeKw/b6FGUeCIRF+JGrTPBBsFYMkYJLxQkfxcX0GluyjDaJ0aDNB7zSliIqyCPbnSE+AYd1puHzcMA1WohKtddedqd4+MmoGg4rBjEKCrYbBMvh2I1GZJHnU2x5BMzTnJyvOw8pzWijjg5ElSFhmNaS1GKWa2agiJvV9dK6E5LpEAGR31cp487mU8zuGQpguu0Nz8GaJrHA4bRaCLmp6pw2uhgs8cgz4O6h8q1gNClsu0ezVM88D6/T5hLYR6uo2xfl5VFbEAE0+hx/niv0TEYBVJh5QJc5Xw1j+wolHWKI1VsqZaDU1yF+VO4ZcozjAwjr5dHZYLluFeCDMXJZ5/kWt3g4lw0neSoYyBD9RH2KbwGM6CMF51GRt048/gTaZIpBOOg3cXIeC87JgE2JaPTMTp18hRz0YpZ5pv4MFgdPOxxlopLBVW9liJFOmAgaRtb3KKYpPmUr7MzZIen0ilbJ4p8/F9YY9Gop2mKAYJ4AHAzDL4/ZXRGPpETCRqAhs2zZoLuY46GwaF+mxR/8p60Is1JsEaQgYfXtQoebJkRYZOy1eYMCbmapGAwYCkx8dxrH8dOe9dpxcjOk5zuVNgq4CrnwyT0+7MjTn2XZdno4HK2zDyGiJAiQ5XVcxHEE7Kq71HbJL99XhzPn2S47SYYsAaglJxOkmUx6FmA5EdL+1t2QC4Ozsfh6jsk7dt/mJY3N9LRE6eopgKeY4oSyQQ11tfTZHSaVq9oo4HhUQ4dNMyykvAeP7M3u0yWaEnzqwPgen9+cSNpJuGhMtYWHtOOV40HlfOtc7EcD3cXgAFAiJzxiUl2hStYP3lswFkWjW6Yaoi/qFYL0pMcfAv6Axa3q1ZQLhkuSXKQsGb4/PwrbzDYceofHKGp6UoaHB4RnDXMIY09r+6nbZduoIGRUbrphmstRZw2xSAowN8U17PAS84H16ddgId4D5LRZp9DcTo7eC6jQtThlghlJYcqKqquqqRYLE5aKGhzSOTLMPxg14c43SkSEtwpGeZMn5Y1T3PRf71yku7ZfZAm4vmipCzuevrM6yHlOSZvWuj7TwyIu8/u22WltFWF6a4tXfTRjW3MNF7m+pTl9ICgaCG303kMEX/aFDE6WZaL00Bwcv5cNAfH24c/QJbKtjxSZnE7OArPJak6QJYt9wYsjkZ6jN16lEF0Tzo+SLvv8TdoYuzszgn0cnu//JtJunmDEUVkLURJynqkANyf4JHGpqYqbgA0xJAAXDdku2RGmxK18LJj5UZzKFeaFQeBAkuzQJTBIinDZY/DoZJpTnNRNgjHyOg4xWPTwlKSFgjynTi9MLNfE9zR1sgkKNq0pVBTrMdee/0QtXa0UKS+xlK6wRlDxKBjcHjMOI1kMvnN0pKT186QSS5yBT5phn6dNjZECeQ90oLBoE3kGC/P2BQsCBwuORvWUdvyVhoYHKI9e/bQylWr2DGrECapFovTQpFq4QQY9bgpbrz8bWCoyopK8qQMuQ9OR8ck/IapiXvMLcjIJEiKUdWKU3WXG7kCHwz4xYukeSRFC14WYrNxmkFCh6jDyugEw6Haf+AADQ0O8sx7i9FoHg2ty5ZZNnsV64xly9vowIGDdPllm0WHsrtMZ0Joyx3bN9JVa5dRTSREb/WN0bce3kM9QxOu5QLkZe81Zdj0zOJJdhTHxyaotq5GgAwbf0ZBZ5o1b0SfO8DgtG7ykSvwGUU8xHk2CbNAQfKL4BOeVXBIFLa7dB6kFSHiOGxbrl2zhnwXXmgbdnDf0WHowDAD3dHeJjzjvXv30ubNm88I+MqyED345Q/RRZ2N1P1GLw2NTNKWVS304jdvoTt/tIt+uvtVW35VIXpZyVdpQQF+gsVOU1sLTXBsp6GmhpI+ssIhktJou062iRAnOUWLVrQ5qQTyk8yzAY41J1IJW+AMi3gmJqMU4qmxjKlwEsw9qjcpzEkeAeKZ1ydGi+q11tfXCd0ghukZAH/PX11H65bX0y3f+CWtX9FMjTUVdPeu39KnbthE//Txa+g3T71K49FsfWr4wXqGf+xUhThCOcIMJUxNj5eMbMxQcLrY1vQjBEFkM01n4aXZI6fFO1CKnR6Ek0FpAaYzJHDo0EEhMmpYdMBzlQ2D9aNpHMPhe3TOOIdqy7iDpFLGiMJUopetCSizk28dZ+ATVCjddOU6+uUT++jGS1fRzdcZ8/Uf3bae3nfXv9Ou79xOH3nnOvrRQ89a+aUsVoNrwhDg5zW1VTQ9HRX+hjfoo4FJP8dpOHbPsqg2whMp3NamYDYkkAsrebYmXYoPGZCQ1SA4P7LhjzzyCO3YscPKU84ip4U9RShczNOWl5WJCWh0UoRHBBozNHaSjvWcoJHxCTpv+TJ6Yd+r1NnRToePn6Q1PLGNDjt64jSGCxVC67pa+D1B6v7jIbr7k++2ngd45JzfUs2T8uy98ghQ65Ng45ukWAAT4IjOJGiKDYAQ+xtDEwGaSmT11kjUR221cYODKbe1UmhEVpIr8DJcoM6eg9avXy/Ospf7TveL9ZSQ+TjQARpzShnb6IhuIt5zfmc7dSxrEXOdAbYgLn/HerNOjKqMOF996Ua65/4nqRD6x9tvFOfVbfXUc2qI2ppqrLTek4Pi/nQ/m6YsPtTvkaDAJJSjF+0IsniJJWI8CnkU5GDqOM98lPvTNodRpVxizI1cgQcnqF6mBH9gYIDt7y5rGo082QkN5K3heVrE8icnJ4UyDQiuMky2XDauav9uWd9J3S8ddGsWff6W62nrJavF9SfeewXdcvf9tHP7JTw/XE4/efBp+tSOK0Vdv/nDi4x2Fng5UybltC1Ezf9qeOZqkJko0FyLCVc7sJrhQLnZ5oV6raI+t0SICxnqlMMUgPqDxmSDbERHW5uVDzJT2vcQQZh6QzwlaQ5vtZFj4+OsHw6JewCB4+Ef3EkvPXAv3fyezdRSUw42tR3tDVX0D59+n1VPVUWYHv7h37I1UsF6JEbf+8on6f3XvoPu+uf/pN7efltZZwhXfoN8Fg6GqCJSQXWR1Czx7GUF68nQGYUF3MjdnOThL9fNSKUEF38lc7va4HY2CZ0rBCTBgsFCoDR3yBRHD6sqykXe/v5+6uvrow0bNtgcG1Bbax199yu3irp+/j/P0M8efoYOHztNH7zhMrrj49tFCNpJN27dSAeOnKTHn3mFfvrQU9S992Ceb7IH6VQfxM/Pj508Tec3VFNNmZdGo1l4/OxszTDevgIX2uVTwpLmMCfNsxnWlTEKTP85JzrcHAfhcDHnYxQA/NHRURoaGqSLNxqWiKzbGd9AuZvff5U4khxvf+HlQ3T/T35Ld3ziempf1mDlGxwep9v//vv01J43yI3USKca/JNcXFNdQy0cyBsbHKa61iCNTSvAM8djinPGA7M6v0kpScy/uIyOOUSNPVk6D/k0d64ZInEt6+MyCK719/eJOVGstc+YZST4P3tgd04lBYV85aVr6dMM+l9/6Yc0PmkE0h576mW6dueX6MnuV0jHhgCXQw1sSY9cJTBHVWUlDbClheUZABuyHddCPPEUZ8ajFRQWgF9SvAOllMulFJ2TAbPLG/mhXCHj4fmeOHGC6mrrRIgZaRgBUMDViPNz+ufu/h597Ts/o2uuWE9f/PyHqX15o63ONub0Wz98LT2y63nqPTVI3/zXX1ChlGtEqe0UXF9eyQ5dPWV4hIURiU1ognOm4l6qCKXFNGEqmbbWFrlR0RyvkrQ6VFluTXGRfbmGs5PEYX5gU1OTiEjKD8YIqKqoEKu/otwJ2FF48mQ//fRXf6ANV99ON9/2tVlt2ffaEXbWyuiRR7tF/kIP46XGzFoucDRh6vqpLBSm/qO9VBeeEV4rkken/cKkBKU8uivXFxKbn9OBkqCr8lCSc+bFOa1nj1t4aIYnILSAXI+jzo3qFAmHzTrsSunRPzxHTz/3Kj3/0n5WcB4aHZtiO72ftl51Eb325hE6E0J7UrDT+QhpHsscVhkG1NLcLBR/eCZNLZUzNMxKNsETtQPsWJWzC19flhKR1Fyr21SvvuiwMMQAlkH7vXAuEmJ1LJYyYN+P84Xyw9TYPEgqM2Sf1FMiJhIwFZOaF6YrGBFLq530sdvupa/fcxut6GwVltbBw71062e/kTPvXIQpvrDXb9nysg1S8eIMy62zs1MEAxHLSJelOYRgcHuUI2gVIQ6h6Blb3EYd3YU4U67A93O8fHTPS3T9NVvYOzzNHHZQLI+7ZP0amxLNx+0qZ4sGxZNivWHE47fW4WAeNY4YEEsCRAydHA+Cvf+Zv7uPzgapQKsiUaaBpBgREx4MfhlWnmlZIyHGMRws+1C/3Slq5yVqOtqWUWVtg+BWuPvtrU1CZOQLf6ofo3qHIKxVDHIMXE/pFM8YEUM5zIMY9ubqhcwCbmR2ikon8LmegTlCrPyrWLFOMeBlgTSFsYKYY/gB7gqPaZFJ71vWMa+pvwRzYntXq5g0CIdCs2Sh+kEqOaOX0vNFU3wen1Dpuex+XMMTHZs4+9s3O5Y3u3KhOoKdMhoOW4M/RTVBda0ktlPqHM3kULdjEVY+c1sl127xZTQRw5hmzyHlWHSaC3xdscml/JTRTVgLXjNWoi7zdq74/cZXP8MgNQnL42z9q6qM0Be/8Jc2jlTBUUdmLsCEGOF/WJjqZ0wCPBuFJwnWSzofSS1jWwpuYeMi5903JmDCl18iZqK48rTSYKcZplo+6sSvurcIkUm5B0mWUw+U+dhN28WRyzQFJc2IqbAgdGOZYTQa40ho0JpeNESYCYJ4StacsdykIN+fYp2CpSchhQelkpX5xfQmZduAKcEkz35HWfTUImKJhV/YvKFEcs0XUFHAe70Gh3ocVooERPUEVcAlWOp8bK5hLutUTbqcs0SmxYGVYg/t2k2b1q+lQNDPDlQftTTW0wjPlV5+8Xr6/TM8cc6x/jePYJt/DZdJU9/gKF23ZZOwyKTHKgN5YmQybGEyQo9q2GKaJ3GGhodEeGO9OX2p6cZujyg7UxNJg3mGGI7GUEqsTkthRwn55pTvcwIv5tUdHClJ5VxwDZSnX/POWo7nBDztmLN0DnmVw51eMgJu26++XMT34RME2pdTfW01VfDEC0bT5ovWCecHk+1YxVtXU00b1pFYDqwyABgCItCyRPRsJHZiYoJ6T5wUE++w51tbjB/IECPGjLCmsG+ADCsnxZw/mvIx56fEOrMYd0Eo7Z0zljPnotWc3aHbtyd6EcXM4Y47bXphUuZwutTlEfnCEiJOBCXHQFsgVhv5ypoNxV9rhiG6OtvEEpNYIi7KBEMBm1yX7VfFoxy9Ivq6ssvYjOYwAJAX8EaCWJLoscxLL+Zj2d4Uq7j5Idbpu8NeYKzGKSJUJ8HQ+l4biLmAzYKfneRWQ8FOPaEqXGklOWNDzq066juxuBb7c41tlAkrHCDrsYBUdi3Kd6uA25Ql1oRy//h9OoX8GSuEoJsMikVPWOqXptyxq4KBVzlexmVUTndyhK2RRHk+AnpAmwWamtdpOaneoQRLfeZU9LNFlLHoCqFl3Pu89mXVaueqbXeCJ7bggEFQP6wcMztcD1kyba7D1GlewNu3xLgtNlUbm0u5qGvi5b207wEkFsPCecKECTYXRKoqqDpSaZPNqtJWR4dap5u7HhBTj8Y+V4iisLL4VjUOnGvsJfl5tGJFsU+IPWU3SmC205eeL/D4wJGREWpsbMzp5TmVqZpHHaoSpCR/dDQ+TVPsJOnYD5pIiqnEEMd/Muye+4JhBjxCutcwYz2U5XynhaS+R57Tpu3uIZqlO2SZoNdYLp7g9+EeI0J2qDPimutdMLMjLNAROAO+AewomcmI0ZzhwFoK6SzmRC9rxayrIUObJ5Rt4yoHODlbneERC1O5w3w+v1hTb3EUJhgY5Bo+nBSmiLHVBUMXzhuCZp7ZnqQFshkLsnU0mRpO/Y4co1AEw6ADIILQAWwgBALGukg1BOCMQIprmKVwzIJpYeEgFdZaOmFsA8LCLh3z0sXa8UKO8YvB7eMcqKqurs6+PF8ZTsOEOLZg4gMw4S0/XnCSR7PZSmIrDBnmmUdciQsDZE/utSvyWtrkqrwXmwa03GvY1WvZibCywPHogBlztZtf8bClKLTt4+V3pDS22XVdzFLJXX6Q/bpYoOWzVl4UBbxECFG64eFhKqsqp4Bm35mnchI4Bx2Ej6itqbFCA9mdemTtfBacTcaS6VyOVT7PVXy48k51vtYNYBDWbGKvKxwhLiDuKyNl4kOxyyQcDomd3uUs6uCsCc82laba6kqRF3oBS1TgT/i53Wlsy8mIBrHzNCNGDXwIf8g/50/Y+twwf/TRx+j1Nw5asiotetbkWCfXw7HAhoPpaeunpHRS7CJ0AGxlTctu+jKHrVWFallIsKWcFCMgt0dolTPz6RJ4eW3mizKoWGTr93vFj0dAiYPbYQ5Pcbsb2duNxRNC6Z4eGGYnKiCWGDbwcyxHlLIfi7Z0s27dtF+kfEcbvNw5Hr3IiRBU9r+P/p65PUglKo5cJPJcW+qpRPOgTCY/gAVPdpfo7JIL8CV2X0j6s+R4uUN9ocnNsvEUVyw33XDDu8R57drV4uPkIUley+dr1horfrEjxJlH1pMrHUe+Muo7ZFlcb9p0sfV858732+qVZ6ThnQ0N9dTR0Sau15jfIu7XraYzIhcI5/Rcz4TC3MB3Xr1FvHHt2jVsgkVpaNC+fXLv3j+KPHiObTwRBgTv2XTJxSRbuvfFl2hoaJjqGYDrO9p5UmKajh/voZ7jvVz2Sj73CECQB3WgHJ6hHoAGIJGGBVIA/MEH/pvaGTi8GxSdNp4jfwfXj7qQB++56p1cf0+PyIcVZQD9aXpG5EHdb75xgAoltwClq4w/U57Hx0pAAfo0f3hPTy8DWCc+HOCB9r95QKwwBuFjGxrqxE+y9Ahwe2x1Iv1Nzi85GPcggIr6jefGF4Ir0eahwSGRBp9i//4D1nNZ3ujUOusZ2ijrBeibNr2DnnqyWwAdiRjvBSO1t7fTmZA2V9oV191k9c14/3FxhvFfXlElVvgWSgABHyDPkvOcoDllLLgdYAHguepUn8s6wb3oVEzXyTzy3Wob1Pc72yfTbr/jU8zV++mpp7pt73B+QyE0NNhvednhyjoKhM0fWSK61QX4DHug1Ty3+eflQDk7eD40NNAnfukD5ATe1ar5czQozxboglxcV1er5sztmhLZqSjPteRALSSdVTu+RHYq0pws0ULSWXWg5kPNTY20/d3bqL9/kLq6OumZ7j1itwgU1JEjR2nLls0UnYrSkbeO0UUXXUAPPPgI7dzxXjHDte+V10UdKIe8crQirb9/QPzGMOo5zGm4PxfIBXh9UYUNZn1ABjC66ITf/f5x2nDRhcKJQTqOFSvOYzM3YuXv6jqP+rgMfq8dgCO/2FDR18/XF3DZzdwB5dTd/dyig+46RYr/5XOgKiqrFnUiJGKC6SSAqqZJTlafIU8Tjxr5XL3HeYpHi9E5i0fD7EBpeRyognf9LQa5AaOmyWtnfsnR8rm8XzLxUpwdf25ReZ7RUEy5Yus6m1TQrr+Foiu3XEZdKzpZlj8hzpDNzU0NLLMHrWUhGJf9AwN00foLOD1Kr7AijXBasyk+8MxQqETf/ua9rGhfs+r5wf3/IZQy8kIBQ+aDDGWsW0p5oaioyW6jJC0oAbCdH3yvdd9nymPQhg0XshVyjJqbG9gq2cZWzvPi+S2f+AgrTkN0oHMAPj4NFsuRt46yxXMh3fft7wrLB4Tt/+iIlaYS3sj14r1TiyDvi1aulVVV5PcvrHJVFWIukvJapquKVl5juUWfUod87lSw/UrHLobcHx4ayK6vPBPluhjkVIj5KJdylde5lG0+BbuoitZl7WTJc11AcpPU5xTwEAOX8KRIW9sysYAU94YDFaE1a4z5ztraamGV4DnSu9ihsvQCP0O5NvMPYkEHIF2eF5u0os3JJQpQjoyMiTPWbI7ij4DxNTaBSUsH4OLHo5FeLjaVyWfGz2Dhh0oD4jDKi99DXmTnaS4qaNHqYtHIyKg45N7Y3t4TlpKEFYLVwVj7CJqcekucERpAfqT19J4UYvU0Wz044898AnR0iPqj0+cCLblyVUkCrpLKqbnS1TSZrubL9WyxyM2OL62dXEDS3g4hgz9Fctv55w58aRJqXlTi+HOQXIF3W99dogJIL/LXO8bHhgm7TzRr45JaafZeV3+sQjeTlLRZI05tj0bW3iirflm3ns2jfovtPY70XO80ZK3cLajkyVE2V/tt2QqpVzMq8nnz//HG/HugxK5n/BIFqtbnNHA0R64sbsaVbccemX/c0Px6Z14VeGMLJdGsnta0HOXtLbKh5mQctUrznP2GbDuM9zvf7WybyjNmOY/HVcbP+Yd0lc+Yk7S57rXC8xaadiZ5CiGtwGf50gpth/uv8H3gW5RuPMM14YtAnvFTVPGLT4vr2tp6sYn5XCPsEBwa6s+b7v6jzsEKylS20DlHUoSYMhY/aHSuEdaqFuW5WntMz1HC3tZz3+Yq1oE6l2mxl0CcZcoLvFbkh314JS0S6fPGHouhMLfb3NRIi035d3YXIWbaeEpxSzOHc6eIbltnnHFcUEv0+gjRRNK4PsHPKs0orUz79st0hqTNWxKu7OqkXb97gq7fvo22N20Tqw6w2kGEoaeMqCiWEi4EnVVRAxC7+wzwAfI4H1UB4yx+G6HHuO6ZMs4/P2zk6+6jImj+Eh7gXrllM7287zVx3c+xfczJYnkJjsmpeU6euDTxrJoDjyr7xq5vJ9rF91dwJzyrAPsvDs6+82kqmuYralRuxiJYEAAHQQTt4w6ZFxXzWwbzVV27zE54tihuLoS0BTW65g26oCKik3/Kpto5Q8UGyTzHXxC7/0QdNDtGlo+c8S3nda5YWK6YmDOvTIPnKq/j8emC/mbHYhN+5bWond0wJ0Pd/0aZp+VvfGkKOOa9Zu9UZ0RPPKNstC8b25pdPt81Ke+TJH6syG+YRRMTY8oPvrmVyxUlk+2zp+WqJ/uLT8661QCgZmEAtHz+/BPsrhx/LsZAnPSn0MZcVJqBWiIqAb9EVAJ+iagE/BJRCfglohLwS0Ql4JeISsAvEZWAXyIqAb9EVAJ+iagE/BJRCfglohLwS0Ql4JeISsAvEZWAXyIqAb9EVAJ+iagE/BJRCfglohLwS0Ql4JeISsAvEZWAXyL6f7n1lvDzqo4DAAAAAElFTkSuQmCC"; var ae = n(19959), se = n(38571), le = n(33690), ce = n(45788), me = n(56320), de = n(83817), he = n(87149), ue = n.n(he); function pe(e) { const { length: t, value: n, onChange: o, onPaste: r, tone: a, autoFocus: s, disabled: c, loading: m, backupCode: d, allowCharacter: h } = e; (0, i.useEffect)(() => { s && C(); }, []); const u = (0, i.useRef)([]), p = () => o(u.current.map((e) => e.value)), _ = (e) => { const t = e.target.value; if (t && h && !h(t)) return; const n = e.target.nextElementSibling; e.target.value && n && n.focus(), p(); }, g = (e) => { var t; -1 === u.current.findIndex((e) => !!e.value) ? null === (t = u.current[0]) || void 0 === t || t.select() : e.target.select(); }, C = () => { const e = u.current.find((e) => !e.value); e ? e.focus() : u.current[u.current.length - 1].focus(); }, f = (e) => { const t = e.target; if ("Backspace" === e.key || "Delete" === e.key) { const n = "Backspace" === e.key ? t.previousElementSibling : t.nextElementSibling; "" === t.value && n && ((n.value = ""), n.focus(), e.preventDefault(), p()); } else if ("ArrowLeft" === e.key || "ArrowRight" === e.key || "ArrowUp" === e.key || "ArrowDown" === e.key) { const n = "ArrowLeft" === e.key || "ArrowUp" === e.key ? t.previousElementSibling : t.nextElementSibling; n && (n.focus(), e.preventDefault()); } }, v = (e) => { const t = e.clipboardData.getData("Text"); let n = e.target, i = 0; for (; n && i < t.length; ) n.focus(), (n.value = t.charAt(i)), (n = n.nextElementSibling), i++; p(), e.preventDefault(), r && r(); }, S = []; for (let e = 0; e < t; e++) S.push(i.createElement(me.bX, { noFocusRing: !0, type: "text", maxLength: 1, key: e, ref: (t) => (u.current[e] = t), onChange: _, onFocus: g, onClick: (e) => e.stopPropagation(), onKeyDown: f, onPaste: v, value: n[e] ? n[e][0] : "", autoComplete: "none", autoFocus: 0 === e && s, disabled: c || m, className: ue().Input })); return i.createElement(de.s, { className: (0, l.Z)(ue().SegmentedCharacterInput, "danger" === a && ue().Danger, c && ue().Disabled, d && ue().BackupCode), onClick: C }, m && i.createElement("div", { className: ue().Loading }, i.createElement(Qe, { size: "small" })), S); } var _e = n(77947); n(89051); const ge = (0, i.createContext)(!1), Ce = () => (0, i.useContext)(ge); function fe() { return i.createElement("div", { className: U().Login }, i.createElement(Ye, { reset: () => window.location.reload(), failure: y.Generic })); } function ve(e) { return (function (e) { const t = (0, i.useRef)(e); t.current = e; const [n, o] = (0, i.useState)(!0), r = (0, ae.TH)(); return ( (0, i.useEffect)(() => { new URLSearchParams(r.search).get("need_password") ? o(!1) : t.current ? (function (e) { var t; return (0, s.mG)(this, void 0, void 0, function* () { const n = new FormData(); n.append("redir", e); const i = `${a.De.LOGIN_BASE_URL}jwt/ajaxrefresh`, o = yield d().post(i, n, { timeout: 1e4, withCredentials: !0 }); if (200 !== o.status || !(null === (t = null == o ? void 0 : o.data) || void 0 === t ? void 0 : t.success)) return !1; const r = o.data, { success: l, login_url: c, error: m } = r, h = (0, s._T)(r, ["success", "login_url", "error"]), u = new FormData(); Object.keys(h).forEach((e) => u.append(e, h[e])); const p = yield d().post(c, u), _ = 200 === p.status && 1 === p.data.result; return _ && window.location.assign(e), _; }); })(t.current) .then((e) => { o(e); }) .catch((e) => { S("PerformRefresh exception", e), o(!1); }) : o(!1); }, [t, r.search]), n ); })(e.redirectUrl) ? null : i.createElement( Se, Object.assign({}, e, { creationRedirectUrl: e.redirectUrl, onSuccess: (t) => { const { strRefreshToken: n } = t; w(n).then( (t) => e.onComplete(t), () => e.onComplete(E.k_PrimaryDomainFail), ); }, embedded: "modal" === e.theme, }), ); } function Se(e) { const { embedded: t, children: n } = e, o = (0, s._T)(e, ["embedded", "children"]); return i.createElement(se.SV, null, i.createElement(ge.Provider, { value: t }, i.createElement("div", { className: U().Login }, i.createElement(Re, Object.assign({}, o)), n))); } function be(e) { if ((0, _e.J)()) return null; const { variant: t } = e; return "function" == typeof t ? i.createElement(mt, { onClick: t }, (0, r.Xx)("#Login_Help_SignIn")) : i.createElement(mt, { href: `${a.De.HELP_BASE_URL}wizard/HelpWithLogin?redir=${encodeURIComponent(document.location.href)}` }, (0, r.Xx)("#Login_Help_SignIn")); } function Ie(e) { const { variant: t, redirectUrl: n } = e; if ("function" == typeof t) return i.createElement(mt, { inline: !0, onClick: t }, (0, r.Xx)("#Login_CreateAccount")); { const e = n ? `?redir=${encodeURIComponent(n)}` : ""; switch (null != t ? t : "normal") { default: case "normal": return i.createElement(mt, { inline: !0, href: `${a.De.STORE_BASE_URL}join/${e}` }, (0, r.Xx)("#Login_CreateAccount")); case "partner": return i.createElement(mt, { inline: !0, href: `${a.De.PARTNER_BASE_URL}${e}` }, (0, r.Xx)("#Login_CreateSteamworksAccount")); case "none": return null; } } } function ye(e) { const { launcherType: t, variant: n, redirectUrl: o } = e; if (8 === t) return null; if ("none" == n) return null; const a = void 0 !== t; let s; switch (null != n ? n : "normal") { default: case "normal": s = "#Login_NoSteamAccount"; break; case "partner": s = "#Login_NoSteamworksAccount"; } return i.createElement("div", { className: (0, l.Z)(U().AccountCreation, a && U().InClient) }, i.createElement("span", { className: U().AccountCreationPrompt }, (0, r.Xx)(s)), i.createElement(Ie, { variant: n, redirectUrl: o })); } function Ee() { var e, t, n, i, o, r; return (0, s.mG)(this, void 0, void 0, function* () { const [s, l, c] = yield Promise.all([SteamClient.System.GetOSType(), null !== (n = null === (t = null === (e = null === SteamClient || void 0 === SteamClient ? void 0 : SteamClient.Auth) || void 0 === e ? void 0 : e.GetLocalHostname) || void 0 === t ? void 0 : t.call(e)) && void 0 !== n ? n : "", null !== (r = null === (o = null === (i = null === SteamClient || void 0 === SteamClient ? void 0 : SteamClient.Auth) || void 0 === i ? void 0 : i.GetMachineID) || void 0 === o ? void 0 : o.call(i)) && void 0 !== r ? r : void 0]); return { os_type: s, device_friendly_name: l, machine_id: c, platform_type: 1, gaming_device_type: a.De.ON_DECK ? R.gg.k_EGamingDeviceType_SteamDeck : R.gg.k_EGamingDeviceType_StandardPC }; }); } function De() { return (0, s.mG)(this, void 0, void 0, function* () { return { device_friendly_name: window.navigator.userAgent, platform_type: 2 }; }); } function we(e) { var t, n, o; const { onSuccess: r, secureComputer: a = !0, isProbablySharedPC: s = !1 } = e, l = (0, i.useCallback)( ({ bSuccess: e, strRefreshToken: t, strAccessToken: n, strAccountName: i, strNewGuardData: o }) => { e && r({ strRefreshToken: t, strAccessToken: n, strAccountName: i, strNewGuardData: o }); }, [r], ), c = (function (e) { const [t, n] = (0, i.useState)(new L(e)); return ( (0, i.useEffect)(() => { null == t || t.SetOnLoginComplete(e.onComplete); }, [t, e.onComplete]), (0, A.SZ)(() => ({ strAccountName: t.GetAccountName(), steamid: t.GetSteamID(), eFailureState: t.GetFailureState(), strExtendedErrorMessage: t.GetExtendedErrorMessage(), strErrorReference: t.GetErrorReference(), strConfirmationAssociatedMessage: t.GetConfirmationAssociatedMessage(), eStatus: t.GetStatus(), bCanGoBack: t.BCanGoBack(), start: t.Start, addCode: t.SendSteamGuardCode, useCodeOverride: t.UseCodeOverride, cantAccessCode: t.CantAccessCode, startMoveAuthenticator: t.StartMoveAuthenticator, resendMoveCode: t.ResendMoveCode, finishMoveAuthenticator: t.FinishMoveAuthenticator, finishMoveRecovery: t.FinishMoveRecovery, replacementAuthenticator: t.GetReplacementAuthenticator(), reset: () => n(new L(e)), goBack: t.GoBack, setTokenToRevoke: t.SetTokenToRevoke })) ); })({ transport: e.transport, onComplete: l, onDeviceDetails: e.onDeviceDetails, onGetMachineAuth: e.onGetMachineAuth, onShowAgreement: e.onShowAgreement }), [m, d] = (0, i.useState)(0), h = "Login_RememberMeSetting", [u, p] = (0, i.useState)(null !== (o = null !== (n = null === (t = e.refreshInfo) || void 0 === t ? void 0 : t.account_name) && void 0 !== n ? n : e.defaultAccountName) && void 0 !== o ? o : ""), [_, g] = (0, i.useState)(""), [C, f] = (0, i.useState)(a && !s && "0" != (null === localStorage || void 0 === localStorage ? void 0 : localStorage.getItem(h))), S = !(0 === c.eStatus || 1 === c.eStatus || 2 === c.eStatus); (0, i.useEffect)(() => { var t; (null === (t = e.refreshInfo) || void 0 === t ? void 0 : t.login_token_id) && c.setTokenToRevoke(e.refreshInfo.login_token_id); }, [e.refreshInfo, c]); return { password: c, onComplete: l, eQRStatus: m, onQRStatusChange: d, strAccountName: u, onAccountNameChange: p, strPassword: _, onPasswordChange: g, bRememberMe: C, onRememberMeChange: (e) => { f(e), null === localStorage || void 0 === localStorage || localStorage.setItem(h, e ? "1" : "0"); }, onPasswordSubmit: () => (u && _ ? c.start(u, _, C) : Promise.resolve(8)), bInPasswordFlow: S, onTryOffline: () => { v(`Logging in offline with username ${u}`), SteamClient.User.SetLoginCredentials(u, _, C); SteamClient.User.StartOffline(!0); }, }; } function Re(e) { const { transport: t, onSuccess: n, platform: o, autoFocus: s, refreshInfo: c, renderSuccess: m = () => i.createElement(bt, null), lastResult: d, joinLinkVariant: h, defaultAccountName: u, secureComputer: p = !0, isProbablySharedPC: _ = !1, onShowAgreement: g, creationRedirectUrl: C } = e, f = we({ transport: t, platform: o, onSuccess: n, refreshInfo: c, onDeviceDetails: a.De.IN_STEAMUI ? Ee : De, onGetMachineAuth: a.De.IN_STEAMUI ? (e) => SteamClient.Auth.GetSteamGuardData(e) : null, defaultAccountName: u, secureComputer: p, isProbablySharedPC: _, onShowAgreement: g }), v = Ce(); if (null != d && 1 != d) return i.createElement("div", { className: U().Login }, i.createElement(Ye, { reset: () => window.location.reload(), failure: y.Generic, errorReference: d.toString(), extendedErrorMessage: f.password.strExtendedErrorMessage })); const S = !(0, a.h4)(); if (!f.bInPasswordFlow) { const n = i.createElement("div", { className: (0, l.Z)(U().SideBySide, v && U().Embedded) }, i.createElement(Me, { strAccountName: f.strAccountName, onAccountNameChange: f.onAccountNameChange, strPassword: f.strPassword, onPasswordChange: f.onPasswordChange, bRememberMe: f.bRememberMe, onRememberMeChange: f.onRememberMeChange, onSubmit: f.onPasswordSubmit, status: f.password.eStatus, autoFocus: s, secureComputer: p, refreshInfo: e.refreshInfo }), S && i.createElement(Te, { transport: t, onQRStatusChange: f.onQRStatusChange, onComplete: f.onComplete, platform: o, refreshInfo: c })); if (v) { const t = a.De.IN_STEAMUI, o = t ? a.De.LAUNCHER_TYPE : void 0; return i.createElement(ht, { className: (0, l.Z)(U().EmbeddedRoot, t && U().InClient) }, !t && !1, !e.refreshInfo && i.createElement(Ct, { realm: a.De.EREALM, launcherType: o, className: U().HeaderLogo, onBack: e.onBack }), i.createElement(Ae, { refreshInfo: c }), n, i.createElement("div", { className: (0, l.Z)(U().EmbeddedRootFooter, t && U().InClient) }, i.createElement(be, { variant: e.helpLinkVariant }), i.createElement(ye, { launcherType: o, variant: h, redirectUrl: C }))); } const m = i.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "8px", margin: "8px 16px" } }, !1, i.createElement("div", { className: U().PrimaryHeader }, e.refreshInfo ? (0, r.Xx)("#Login_RefreshSignIn") : (0, r.Xx)("#Login_SignIn")), i.createElement(Ae, { refreshInfo: e.refreshInfo })); return i.createElement(gt, { title: m }, n); } const I = f.password.eStatus; switch (I) { case 13: return e.renderLoading ? i.createElement(i.Fragment, null, e.renderLoading()) : i.createElement(Ze, null); case 5: case 11: case 3: case 10: const t = 5 === I || 11 === I; return i.createElement(et, { type: t ? "mobile" : "email", onSubmitCode: f.password.addCode, status: I, associatedLabel: f.password.strConfirmationAssociatedMessage, accountName: f.password.strAccountName, onBack: f.password.goBack, onCodeHelp: e.onCodeHelp }); case 6: case 4: const n = 6 === I; return i.createElement(ct, { type: n ? "mobile" : "email", accountName: f.password.strAccountName, onUseCodeOverride: f.password.useCodeOverride, onCodeHelp: e.onCodeHelp }); case 16: return i.createElement(Je, { reset: f.password.reset }); case 15: return i.createElement(Ye, { reset: f.password.reset, failure: f.password.eFailureState, onRequestOffline: f.onTryOffline, errorReference: f.password.strErrorReference, extendedErrorMessage: f.password.strExtendedErrorMessage }); case 14: return i.createElement(gt, { compact: !0 }, m()); default: return b(`Unknown Phase: ${I}`), i.createElement(Ye, { reset: f.password.reset, failure: y.Generic, onRequestOffline: f.onTryOffline, errorReference: f.password.strErrorReference, extendedErrorMessage: f.password.strExtendedErrorMessage }); } } function Ae(e) { var t, n; if (!e.refreshInfo) return null; let o; switch (null !== (n = null === (t = e.refreshInfo) || void 0 === t ? void 0 : t.reason) && void 0 !== n ? n : 2) { case 2: case 7: default: o = "#Login_RefreshReason_Generic"; break; case 6: o = "#Login_RefreshReason_LoggedInElsewhere"; break; case 34: o = "#Login_RefreshReason_LogonSessionReplaced"; break; case 5: o = "#Login_RefreshReason_InvalidPassword"; break; case 26: o = "#Login_RefreshReason_Revoked"; break; case 27: o = "#Login_RefreshReason_Expired"; break; case 49: o = "#Login_RefreshReason_PasswordRequiredToKickSession"; break; case 43: o = "#Login_RefreshReason_AccountDisabled"; break; case 69: o = "#Login_RefreshReason_ParentalControlRestricted"; break; case 84: o = "#Login_RefreshReason_RateLimitExceeded"; } return i.createElement("div", { className: U().RefreshReasonContainer }, i.createElement("div", { className: U().RefreshTitle }, (0, r.Xx)("#Login_RefreshSignIn")), i.createElement("div", { className: U().RefreshReason }, (0, r.Xx)(o))); } function Me(e) { const { onSubmit: t, status: n, autoFocus: o, refreshInfo: s, strAccountName: l, onAccountNameChange: c, strPassword: m, onPasswordChange: d, bRememberMe: h, onRememberMeChange: u, secureComputer: p = !0 } = e, [_, g] = (0, i.useState)(!1), C = Ce(), f = (function () { const e = (0, i.useRef)(!0); return ( (0, i.useEffect)( () => () => { e.current = !1; }, [e], ), (0, i.useCallback)(() => e.current, [e]) ); })(), v = 1 === n || 13 === n, S = 2 === n && !_, b = S ? i.createElement(qe, null, (0, r.Xx)("#Login_CheckCredentials")) : i.createElement(qe, null, " "), I = o && !l, y = o && !!l, E = !!e.refreshInfo; return i.createElement( dt, { onSubmit: () => { t().then(() => { f() && g(!1); }); }, className: U().LoginForm, }, i.createElement(xe, { tone: S ? "danger" : void 0, label: i.createElement(Ne, { highlight: !0 }, (0, r.Xx)("#Login_SignIn_WithAccountName")), value: l, onChange: (e) => { g(!0), c(e); }, autoFocus: I, disabled: E, }), i.createElement(xe, { tone: S ? "danger" : void 0, label: i.createElement(Ne, null, (0, r.Xx)("#Login_Password")), value: m, onChange: (e) => { g(!0), d(e); }, type: "password", autoFocus: y, }), p ? i.createElement(ce.HP, { toolTipContent: "#Login_RememberMe_Tooltip", direction: "bottom" }, i.createElement(Ve, { label: (0, r.Xx)("#Login_RememberMe_Short"), value: h, onChange: u })) : i.createElement("div", { className: U().InsecureComputer }, (0, r.Xx)("#Login_InsecureComputer")), i.createElement(We, { loading: v, refreshLogin: E }), b, !C && i.createElement(mt, { href: `${a.De.HELP_BASE_URL}wizard/HelpWithLogin?redir=${encodeURIComponent(document.location.href)}`, align: "center" }, (0, r.Xx)("#Login_Help_SignIn")), ); } const ke = 700; function Te(e) { const t = (0, le.Wy)(), n = () => t.ownerWindow.screen.width < ke, [o, r] = (0, i.useState)(n()); return ( (0, M.JI)(t.ownerWindow, "resize", () => { r(n()); }), i.createElement("div", { className: U().QRSection }, o ? i.createElement(Oe, Object.assign({}, e)) : i.createElement(Ge, Object.assign({}, e))) ); } function Le(e) { const t = a.De.STORE_BASE_URL + "join/?guest=1&purchaseType=gift&checkout=1&redir=" + encodeURIComponent(e.redirectURL); a.De.STORE_BASE_URL, encodeURIComponent(e.redirectURL); return i.createElement("div", { className: U().GuestLayout }, i.createElement(gt, { compact: !0 }, i.createElement("div", { className: U().GuestContainer }, i.createElement("div", { className: U().GuestText }, (0, r.yu)("#Login_Guest", i.createElement("a", { href: `${t}`, style: { textDecoration: "underline" } }))), i.createElement("a", { className: U().GuestLink, href: `${t}` }, i.createElement("button", { className: U().GuestButton }, (0, r.Xx)("#Login_GuestContinue")))))); } function Ge(e) { return i.createElement(Be, Object.assign({}, e)); } function Oe(e) { const [t, n] = (0, i.useState)(!1); return t ? i.createElement(Be, Object.assign({}, e, { bShowHideButton: !0, setShowQR: n })) : i.createElement(Fe, { setShowQR: n }); } function Fe(e) { return i.createElement("div", { className: U().MessagingContainer }, i.createElement("div", { className: U().MessagingTag }, (0, r.Xx)("#Login_MobileFlow_New")), i.createElement("div", { className: U().MessagingSubtitle }, i.createElement("div", { className: U().MessagingSubtitle }, (0, r.Xx)("#Login_MobileFlow_SignIn_ScanQR"))), i.createElement("div", { className: U().MessagingButton, onClick: () => e.setShowQR(!0) }, (0, r.Xx)("#Login_MobileFlow_ShowMeQR_Button")), i.createElement("a", { href: `${a.De.STORE_BASE_URL}mobile`, className: U().MessagingLink }, (0, r.Xx)("#Login_JoinBeta_Button"))); } function Be(e) { const { onQRStatusChange: t, transport: n, onComplete: o, platform: s, refreshInfo: l, bShowHideButton: c = !1, setShowQR: m } = e; return i.createElement("div", { className: U().QRCodeContainer }, i.createElement(Ne, { highlight: !0 }, (0, r.Xx)("#Login_SignIn_OrWithQRCode")), i.createElement("div", { className: U().QR }, i.createElement(Q, { onStatusChange: t, transport: n, onComplete: o, platform: s, refreshInfo: l })), c && m && i.createElement("div", { className: U().QRHideLink, onClick: () => m(!1) }, (0, r.Xx)("#Button_Hide")), i.createElement("div", { className: U().UseMobileAppForQR }, (0, r.yu)("#Login_UseMobileAppForQR_Inline", i.createElement(mt, { href: `${a.De.STORE_BASE_URL}mobile`, align: "center" })))); } function xe(e) { const { label: t, error: n, tone: o, autoFocus: r } = e, a = (0, s._T)(e, ["label", "error", "tone", "autoFocus"]), l = null != o ? o : n ? "danger" : void 0; return i.createElement("div", { className: U().TextField }, "string" == typeof t ? i.createElement(Ne, null, t) : t, i.createElement(Ue, { type: "error" }, n), i.createElement(Pe, Object.assign({ autoFocus: r, tone: l }, a))); } function Ne(e) { const { children: t, highlight: n } = e; return i.createElement("div", { className: (0, l.Z)(U().FieldLabel, n && U().Highlight) }, t); } function Pe(e) { const { value: t, onChange: n, type: o = "text", tone: r, className: a, autoFocus: s, disabled: c } = e; return i.createElement("input", { value: t, type: o, autoFocus: s, onChange: (e) => n(e.target.value), className: (0, l.Z)(U().TextInput, "danger" === r && U().Danger, a), disabled: c }); } function Ue(e) { const { children: t, type: n } = e; return i.createElement("div", { className: (0, l.Z)(U().FieldHint, "error" === n && U().Error) }, t); } function Ve(e) { const { label: t, onChange: n, value: o } = e; let r = () => { n && n(!o); }; return i.createElement( "div", { className: U().CheckboxField, onClick: r, onKeyPress: (e) => { " " == e.key && (r(), e.preventDefault()); }, }, i.createElement(He, { value: o }), i.createElement("div", { className: U().CheckboxFieldLabel }, t), ); } function He(e) { const { value: t } = e; return i.createElement("div", { tabIndex: 0, className: U().Checkbox }, t && i.createElement("div", { className: U().Check }, i.createElement(oe.JrY, { strokeWidth: 35 }))); } function We(e) { var t; const { refreshLogin: n } = e, o = (0, s._T)(e, ["refreshLogin"]); return n && (null === (t = SteamClient.User) || void 0 === t ? void 0 : t.StartShutdown) ? i.createElement(je, null) : i.createElement(Xe, Object.assign({}, o)); } function Xe(e) { return i.createElement("div", { className: U().SignInButtonContainer }, i.createElement(ze, Object.assign({}, e), (0, r.Xx)("#Login_SignIn"))); } function je() { return i.createElement("div", { className: U().RefreshButtonContainer }, i.createElement("button", { className: U().SubmitButton, type: "submit" }, (0, r.Xx)("#Login_SignIn")), i.createElement("button", { className: U().RefreshQuitButton, onClick: () => SteamClient.User.StartShutdown(!0) }, (0, r.Xx)("#Login_ExitSteam"))); } function ze(e) { return i.createElement(Ke, Object.assign({ type: "submit" }, e)); } function Ke(e) { const { className: t, loading: n, disabled: o, children: r } = e, a = (0, s._T)(e, ["className", "loading", "disabled", "children"]), c = o || n; return i.createElement("button", Object.assign({ className: (0, l.Z)(U().SubmitButton, n && U().Loading, t), disabled: c }, a), r, n && i.createElement("div", { className: U().LoadingContainer }, i.createElement(Qe, { size: "small" }))); } function qe(e) { const t = e.children || " "; return i.createElement("div", { className: U().FormError }, t); } function Ze() { return i.createElement(gt, { compact: !0 }, i.createElement(ht, { alignItems: "center", className: (0, l.Z)(U().WaitingForTokenContainer, a.De.IN_STEAMUI && U().Client) }, i.createElement(ne.V, { size: "xlarge" }), i.createElement("div", { className: (0, l.Z)(U().Description) }, (0, r.Xx)(a.De.IN_STEAMUI ? "#Login_ConnectingToSteam" : "#Login_LoadingAccountInfo")))); } function Qe(e) { const { size: t } = e; return i.createElement("div", { className: (0, l.Z)(U().LoadingSpinner, "small" == t && U().Small, ("medium" == t || !t) && U().Medium, "large" == t && U().Large) }); } function $e(e) { return i.createElement("div", { className: U().OfferOffline }, i.createElement("button", { className: U().OfferOfflineButton, onClick: e.onRequestOffline }, (0, r.Xx)("#Login_GoOffline_Button"))); } function Ye(e) { const { reset: t, failure: n, onRequestOffline: o, errorReference: s, extendedErrorMessage: l } = e, { title: c, description: m } = (function (e, t = "") { let n = { title: "", description: "" }; switch (e) { case y.None: return { title: "", description: "" }; case y.Expired: n = { title: (0, r.Xx)("#Login_Error_Expired_Title"), description: (0, r.Xx)("#Login_Error_Expired_Description") }; break; case y.Network: n = { title: (0, r.Xx)("#Login_Error_Network_Title"), description: (0, r.Xx)("#Login_Error_Network_Description") }; break; case y.MoveAuthenticator: n = { title: (0, r.Xx)("#Error_Generic"), description: (0, r.Xx)("#Login_Error_MoveAuthenticator_Description") }; break; case y.RateLimitExceeded: n = { title: (0, r.Xx)("#Login_Error_RateLimit_Title"), description: (0, r.Xx)("#Login_Error_RateLimit_Description") }; break; case y.AnonymousLogin: n = { title: (0, r.Xx)("#Login_Error_Anonymous_Title"), description: (0, r.Xx)("#Login_Error_Anonymous_Description") }; break; case y.Generic: default: n = { title: (0, r.Xx)("#Error_Generic"), description: (0, r.Xx)("#Login_Error_Default_Description") }; } t && (n.description = t); return n; })(n, l), d = a.De.IN_STEAMUI && n == y.Network; return i.createElement(gt, { compact: !0 }, i.createElement(ht, { alignItems: "center", gap: 12 }, i.createElement("div", { className: U().FailureTitle }, c), i.createElement("div", { className: U().FailureDescription }, m), d && i.createElement("div", { className: U().FailureDescription }, (0, r.Xx)("#Login_GoOffline_Description")), i.createElement(ut, { className: U().FailureButtons }, i.createElement(Ke, { className: U().TryAgainButton, onClick: t }, (0, r.Xx)("#Button_Retry")), d && i.createElement($e, { onRequestOffline: o }))), s && i.createElement("div", { className: U().MutedErrorReference }, (0, r.Xx)("#Login_Error_Reference", s))); } function Je(e) { const { reset: t } = e; return i.createElement(Ye, { reset: t, failure: y.Generic }); } function et(e) { const { type: t, onSubmitCode: n, status: o, accountName: a, associatedLabel: s, onBack: l } = e, [c, m] = (0, i.useState)([]), [d, h] = (0, i.useState)(!1), [u, p] = (0, i.useState)(!1), [_, g] = (0, i.useState)(!1), [C, f] = (0, i.useState)(0), v = "mobile" === t, S = c.join(""), b = B(S, _), I = (e) => { p(!0), n(e).then(() => { h(!1), p(!1); }); }, y = !d && (11 === o || 10 === o); let E, D; return ( _ ? ("mobile" === t ? ((D = i.createElement(nt, null)), (E = "#Login_UseMobileCode")) : ((D = i.createElement(nt, null)), (E = "#Login_UseEmailCode"))) : ((D = "mobile" === t ? i.createElement(it, null) : i.createElement(ot, { emailAddress: s })), (E = "#Login_UseBackupCode")), i.createElement( gt, { title: i.createElement(Ct, null), compact: !0 }, i.createElement( dt, { onSubmit: () => { b && I(S); }, }, i.createElement( ht, { alignItems: "center", gap: 14 }, i.createElement(rt, { type: t, accountName: a }), i.createElement( "div", { className: U().ConfirmationEntryContainer }, i.createElement( ht, { alignItems: "center", gap: 2 }, y && i.createElement(qe, null, (0, r.Xx)("#Login_IncorrectSteamGuard")), i.createElement(pt, { key: C, value: c, onChange: (e) => { d || h(!0), m(e); const t = e.join(""); B(t, _) && I(t); }, tone: y ? "danger" : void 0, loading: u, backupCode: _, }), ), D, ), v && i.createElement( mt, { onClick: () => { g(!_), m([]), n(""), f(C + 1); }, align: "center", }, (0, r.Xx)(E), ), i.createElement(tt, { type: t, onCodeHelp: e.onCodeHelp }), ), ), ) ); } function tt(e) { if ((0, _e.J)()) return null; let t, n; return "mobile" === e.type ? ((t = `${a.De.HELP_BASE_URL}wizard/HelpWithLoginInfo?lost=8&issueid=402`), (n = (0, r.Xx)("#Login_Help_AccessMobileApp"))) : ((t = `${a.De.HELP_BASE_URL}wizard/HelpWithSteamGuardCode`), (n = (0, r.Xx)("#Login_Help_AccessEmail"))), e.onCodeHelp ? i.createElement(mt, { onClick: () => e.onCodeHelp(t), align: "center" }, n) : i.createElement(mt, { href: t, align: "center" }, n); } function nt() { return i.createElement(ut, { justifyContent: "space-evenly", alignItems: "center", className: U().EnterBackupCodeContainer }, i.createElement(ht, null, i.createElement("div", { className: U().EnterCodeFromMobile }, (0, r.Xx)("#Login_EnterBackupCode")), i.createElement("div", { className: U().Label }, (0, r.Xx)("#Login_EnterBackupCodeDescription")))); } function it() { return i.createElement(ut, { justifyContent: "space-evenly", alignItems: "center", className: U().EnterCodeFromMobileContainer }, i.createElement("div", { className: U().EnterCodeFromMobile }, (0, r.Xx)("#Login_EnterMobileCode")), i.createElement(st, { className: U().AwaitingMobileConfIcon })); } function ot(e) { return i.createElement(ut, { justifyContent: "space-evenly", alignItems: "center", className: U().EnterCodeFromEmailContainer }, i.createElement(_t, { align: "center", spacing: 6 }, i.createElement("div", { className: U().EnterCodeFromEmail }, (0, r.kQ)("#Login_EnterEmailCode", i.createElement("span", { className: U().EnterCodeEmailAddress }, e.emailAddress)))), i.createElement(lt, { className: U().AwaitingEmailConfIcon })); } function rt(e) { const { accountName: t, type: n } = e, o = "mobile" === n ? (0, r.Xx)("#Login_MobileProtectingAccount") : (0, r.Xx)("#Login_EmailProtectingAccount"), a = Ce(); return i.createElement("div", { className: U().ProtectingAccount }, i.createElement("div", { className: U().Label }, (0, r.kQ)("#Login_ActiveAccountName", i.createElement("span", { className: U().AccountName }, t))), !a && i.createElement("div", { className: U().Description }, o)); } function at() { return i.createElement(ht, { alignItems: "center" }, i.createElement("div", { className: U().ConfirmationContainer }, i.createElement("img", { src: re }), i.createElement("div", { className: U().AwaitingMobileConfText }, (0, r.yu)("#Login_AwaitingMobileConfirmation")))); } function st(e) { return i.createElement( "svg", { viewBox: "0 0 33 49", fill: "currentColor", className: e.className }, i.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M28 47.1106C29.1046 47.1106 30 46.2151 30 45.1106L30 3.72705C30 2.62248 29.1046 1.72705 28 1.72705L5 1.72705C3.89544 1.72705 3 2.62248 3 3.72705L3 45.1106C3 46.2151 3.89543 47.1106 5 47.1106L28 47.1106ZM5.68119 5.82741L27.3188 5.82741L27.3188 42.7772H5.68119L5.68119 5.82741ZM20.9999 44.944C20.9999 45.3429 20.6766 45.6662 20.2777 45.6662L12.7221 45.6662C12.3233 45.6662 11.9999 45.3429 11.9999 44.944C11.9999 44.5451 12.3233 44.2218 12.7221 44.2218H20.2777C20.6766 44.2218 20.9999 44.5451 20.9999 44.944ZM17.2778 4.44406C17.6767 4.44406 18 4.12071 18 3.72184C18 3.32296 17.6767 2.99962 17.2778 2.99962L15.7222 2.99962C15.3233 2.99962 15 3.32296 15 3.72184C15 4.12071 15.3233 4.44406 15.7222 4.44406L17.2778 4.44406Z" }), i.createElement("path", { fill: "currentColor", d: "M22.2456 22.4164C22.2456 21.6666 22.8127 21.0002 23.6228 21.0002C24.3519 21.0002 25 21.6666 25 22.4164C25 23.1661 24.3519 23.8325 23.6228 23.8325C22.8937 23.8325 22.2456 23.1661 22.2456 22.4164Z" }), i.createElement("path", { fill: "currentColor", d: "M18.6812 22.4164C18.6812 21.6666 19.2483 21.0002 20.0584 21.0002C20.8685 21.0002 21.5166 21.6666 21.4355 22.4164C21.4355 23.1661 20.8685 23.8325 20.0584 23.8325C19.3293 23.8325 18.6812 23.1661 18.6812 22.4164Z" }), i.createElement("path", { fill: "currentColor", d: "M15.1977 22.4164C15.1977 21.6666 15.7648 21.0002 16.5749 21.0002C17.304 21.0002 17.9521 21.6666 17.9521 22.4164C17.9521 23.1661 17.385 23.8325 16.5749 23.8325C15.8458 23.8325 15.1977 23.1661 15.1977 22.4164Z" }), i.createElement("path", { fill: "currentColor", d: "M11.7143 22.4164C11.7143 21.6666 12.2814 21.0002 13.0915 21.0002C13.8206 21.0002 14.4686 21.6666 14.4686 22.4164C14.4686 23.1661 13.9016 23.8325 13.0915 23.8325C12.3624 23.8325 11.7143 23.1661 11.7143 22.4164Z" }), i.createElement("path", { fill: "currentColor", d: "M8.14983 22.4164C8.14983 21.6666 8.7169 21.0002 9.527 21.0002C10.3371 21.0002 10.9852 21.6666 10.9042 22.4164C10.9042 23.1661 10.3371 23.8325 9.527 23.8325C8.79791 23.8325 8.14983 23.1661 8.14983 22.4164Z" }), ); } function lt(e) { return i.createElement( "svg", { viewBox: "0 0 58 56", fill: "none", className: e.className }, i.createElement("path", { d: "M57.9352 24.5887C57.8463 24.233 57.8463 23.8774 57.6684 23.5217C57.4017 22.8993 57.046 22.4547 56.5125 22.0101L49.577 16.4083V10.9844C49.577 8.85041 47.8876 7.16098 45.7536 7.16098H38.1956L31.5269 1.73706C30.1042 0.581137 28.0591 0.581137 26.6364 1.73706L19.9677 7.16098H12.4097C10.2757 7.16098 8.58631 8.93932 8.58631 10.9844V16.4083L1.56188 22.0101C1.02838 22.3658 0.672713 22.8993 0.405962 23.5217V23.6106C0.228128 24.1441 0.050293 24.5887 0.050293 25.1222V52.1529C0.050293 53.2199 0.494878 54.1091 1.1173 54.8204C1.82863 55.5318 2.80672 55.8874 3.7848 55.8874H54.0228C55.0898 55.8874 55.979 55.4428 56.6903 54.8204C57.4017 54.1091 57.7573 53.131 57.7573 52.1529V25.1222C57.9352 24.8554 57.9352 24.7665 57.9352 24.5887ZM49.577 19.7872L54.7342 23.9663L49.577 28.9456V19.7872ZM28.148 3.60431C28.4148 3.42648 28.6815 3.24864 28.9483 3.24864C29.3039 3.24864 29.5707 3.33756 29.7485 3.60431L34.0165 7.07207H23.9689L28.148 3.60431ZM10.9871 10.9844C10.9871 10.2731 11.5206 9.73958 12.2319 9.73958H45.6646C46.376 9.73958 46.9095 10.362 46.9095 10.9844V31.4353L46.8206 31.5242L40.2407 37.9262H17.6558L11.076 31.5242L10.9871 31.4353V10.9844ZM8.40848 19.7872V28.9456L3.34022 23.9663L8.40848 19.7872ZM2.62888 51.6194V26.9005L15.2551 39.26L2.62888 51.6194ZM4.49614 53.3088L17.6558 40.5048H40.2407L53.4004 53.3088H4.49614ZM55.3566 51.6194L42.6415 39.1711L55.2677 26.8116V51.6194H55.3566ZM29.0372 35.3476C30.5488 35.3476 31.9715 35.0809 33.3941 34.5474C34.0165 34.2806 34.3722 33.4804 34.1055 32.858C33.8387 32.2355 33.0385 31.8799 32.416 32.1466C31.349 32.5912 30.1931 32.769 29.0372 32.769C27.3478 32.769 25.7473 32.3245 24.4135 31.5242C21.746 29.9237 20.0566 27.0784 20.0566 23.7884C20.0566 18.8091 24.0579 14.8078 29.0372 14.8078C34.0165 14.8078 38.0178 18.8091 38.0178 23.7884V24.4109C38.0178 25.4779 37.2175 26.367 36.0616 26.367C34.9946 26.367 34.1055 25.4779 34.1055 24.4109V23.7884C34.1055 20.9431 31.7936 18.6313 28.9483 18.6313C26.1029 18.6313 23.7911 20.9431 23.7911 23.7884C23.7911 26.6338 26.1029 28.9456 28.9483 28.9456C30.3709 28.9456 31.7047 28.3232 32.5939 27.434C33.3941 28.4121 34.639 28.9456 35.9727 28.9456C38.4624 28.9456 40.5075 26.9894 40.5075 24.4109V23.7884C40.5075 17.3864 35.2614 12.2292 28.9483 12.2292C22.6352 12.2292 17.3891 17.4753 17.3891 23.7884C17.3891 26.7227 18.545 29.4791 20.3233 31.5242C22.5463 33.925 25.5694 35.3476 29.0372 35.3476ZM29.0372 26.367C27.6145 26.367 26.4586 25.2111 26.4586 23.7884C26.4586 22.3658 27.6145 21.2098 29.0372 21.2098C30.4599 21.2098 31.6158 22.3658 31.6158 23.7884C31.5269 25.2111 30.371 26.367 29.0372 26.367Z", fill: "#1A99FF", }), ); } function ct(e) { const { type: t, accountName: n, onUseCodeOverride: o } = e, s = Ce(), l = i.createElement(tt, { type: "mobile", onCodeHelp: e.onCodeHelp }), c = s ? i.createElement("div", { style: { paddingBottom: "20px" } }, i.createElement(mt, { align: "center", onClick: o }, (0, r.Xx)("#Login_EnterCodeInstead"))) : i.createElement("div", { className: U().EnterCodeInsteadLink }, i.createElement(mt, { align: "center", onClick: o }, (0, r.Xx)("#Login_EnterCodeInstead"))); return i.createElement(gt, { title: i.createElement(Ct, null), compact: !0 }, i.createElement(ht, { gap: a.De.IN_STEAMUI ? 24 : 40 }, i.createElement(rt, { type: t, accountName: n }), i.createElement(at, null), i.createElement("div", { className: U().LinkContainer }, c, l))); } function mt(e) { const { children: t, align: n, inline: o } = e, r = (0, l.Z)(U().TextLink, "center" === n && U().TextAlignCenter); if ("href" in e) { const n = a.De.IN_STEAMUI ? `steam://openurl_external/${e.href}` : e.href; return i.createElement("a", { className: r, href: n }, t); } { const n = o ? "span" : "div"; return i.createElement(n, { className: r, onClick: e.onClick }, t); } } function dt(e) { const { onSubmit: t, children: n, className: o } = e; return i.createElement("form", { onSubmit: (e) => (e.preventDefault(), t(), !1), className: o }, n); } function ht(e) { const { alignItems: t, justifyContent: n, gap: o, className: r, children: a } = e, s = (0, l.Z)(U().FlexCol, "center" === t && U().AlignItemsCenter, "center" === n && U().JustifyContentCenter, r), c = o ? { gap: "number" == typeof o ? `${o}px` : o } : void 0; return i.createElement("div", { className: s, style: c }, a); } function ut(e) { const { children: t, justifyContent: n, alignItems: o, className: r } = e, a = { display: "flex", flexDirection: "row", justifyContent: n, alignItems: o }; return i.createElement("div", { style: a, className: r }, t); } function pt(e) { const { onChange: t, backupCode: n } = e, o = (0, s._T)(e, ["onChange", "backupCode"]); return i.createElement( pe, Object.assign( { length: O(n), backupCode: n, onChange: (e) => { F((e = e.map((e) => e.toUpperCase())).join("").trim(), n) && t(e); }, autoFocus: !0, }, o, { allowCharacter: (e) => /\w/g.test(e) }, ), ); } function _t(e) { const { children: t, spacing: n = 0, align: o } = e; return i.createElement(ht, { alignItems: o }, i.Children.map(t, (e, t) => (e ? i.createElement("div", { style: t > 0 ? { paddingTop: `${n}px` } : void 0 }, e) : null)).filter(Boolean)); } function gt(e) { const { title: t, children: n, compact: o } = e, r = Ce(); return i.createElement(ht, { gap: a.De.IN_STEAMUI ? 0 : 32, className: (0, l.Z)(U().StandardLayout, r && U().Embedded, o && U().Compact, a.De.IN_STEAMUI && "IN_CLIENT") }, "string" == typeof t ? i.createElement("div", { className: U().PrimaryHeader }, t) : t, i.createElement("div", { className: U().FormContainer }, n)); } function Ct(e) { const { realm: t = a.De.EREALM, launcherType: n = a.De.IN_STEAMUI ? a.De.LAUNCHER_TYPE : void 0, className: o = U().HeaderLogo } = e; return 8 === n ? i.createElement("div", { className: o }) : i.createElement("div", { className: U().LogoContainer }, i.createElement(ft, { onBack: e.onBack }), t !== ie.IN.k_ESteamRealmChina ? i.createElement(vt, { className: o }) : i.createElement(St, { className: o }), " "); } function ft(e) { return e.onBack ? i.createElement("div", { className: U().BackArrowContainer, onClick: e.onBack }, i.createElement(oe.lBf, { className: U().BackArrow })) : null; } function vt(e) { return i.createElement( "svg", { viewBox: "0 0 153 46", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: e.className }, i.createElement("path", { d: "M22.9891 0C10.8429 0 0.93833 9.30396 0 21.1548L12.3547 26.2486C13.3973 25.5209 14.6484 25.1051 16.0037 25.1051C16.108 25.1051 16.2644 25.1051 16.3687 25.1051L21.8944 17.2045C21.8944 17.1525 21.8944 17.1525 21.8944 17.1006C21.8944 12.3186 25.8041 8.42034 30.6 8.42034C35.3959 8.42034 39.3056 12.3186 39.3056 17.1006C39.3056 21.8825 35.3959 25.7808 30.6 25.7808C30.5479 25.7808 30.4436 25.7808 30.3915 25.7808L22.5721 31.3424C22.5721 31.4463 22.5721 31.5503 22.5721 31.6542C22.5721 35.2407 19.6528 38.1514 16.0559 38.1514C12.876 38.1514 10.2695 35.9164 9.64395 32.9017L0.781942 29.2633C3.5448 38.9311 12.4068 46 22.9891 46C35.7087 46 46.0303 35.7085 46.0303 23.026C46.0303 10.2915 35.7087 0 22.9891 0Z", fill: "#E0E1E6" }), i.createElement("path", { d: "M14.44 34.8766L11.625 33.7331C12.1463 34.7726 12.9804 35.6562 14.1272 36.124C16.6294 37.1636 19.4966 35.9681 20.5391 33.4732C21.0604 32.2777 21.0604 30.9263 20.5391 29.7308C20.0178 28.5353 19.0795 27.5997 17.8805 27.08C16.6816 26.5602 15.3783 26.6122 14.2836 27.028L17.2029 28.2235C19.0274 29.0031 19.9136 31.0822 19.1316 32.9014C18.4018 34.7726 16.2645 35.6562 14.44 34.8766Z", fill: "#E0E1E6" }), i.createElement("path", { d: "M36.3857 17.0488C36.3857 13.8782 33.7793 11.2793 30.5994 11.2793C27.4195 11.2793 24.813 13.8782 24.813 17.0488C24.813 20.2194 27.4195 22.8703 30.5994 22.8703C33.7793 22.8703 36.3857 20.2714 36.3857 17.0488ZM26.2205 17.0488C26.2205 14.6578 28.1493 12.6827 30.5994 12.6827C32.9973 12.6827 34.9782 14.6058 34.9782 17.0488C34.9782 19.4397 33.0495 21.3629 30.5994 21.3629C28.2014 21.4149 26.2205 19.4397 26.2205 17.0488Z", fill: "#E0E1E6" }), i.createElement("path", { d: "M70.6879 15.7489L69.1241 18.4517C67.9251 17.6201 66.3091 17.1003 64.9016 17.1003C63.2856 17.1003 62.2951 17.776 62.2951 18.9715C62.2951 20.4269 64.0675 20.7387 66.674 21.6743C69.489 22.6619 71.105 23.8574 71.105 26.4043C71.105 29.9387 68.3421 31.9139 64.3282 31.9139C62.3994 31.9139 60.0014 31.3941 58.229 30.3026L59.3759 27.2879C60.8355 28.0675 62.6079 28.5353 64.1718 28.5353C66.3091 28.5353 67.2995 27.7557 67.2995 26.6122C67.2995 25.3127 65.7878 24.8969 63.2856 24.0653C60.4706 23.1297 58.5418 21.8822 58.5418 19.0235C58.5418 15.8009 61.1483 13.9297 64.8494 13.9297C67.4038 14.0336 69.489 14.8653 70.6879 15.7489Z", fill: "#E0E1E6" }), i.createElement("path", { d: "M82.7305 17.4643V31.6542H79.0815V17.4643H73.8164V14.3457H87.9956V17.4643H82.7305Z", fill: "#E0E1E6" }), i.createElement("path", { d: "M95.6574 17.4124V21.3107H102.643V24.4293H95.6574V28.4836H103.737V31.6022H92.0083V14.3457H103.737V17.4643H95.6574V17.4124Z", fill: "#E0E1E6" }), i.createElement("path", { d: "M111.87 28.2756L110.723 31.6542H106.917L113.434 14.3457H117.083L123.755 31.6542H119.793L118.594 28.2756H111.87ZM115.258 18.4519L112.912 25.3649H117.708L115.258 18.4519Z", fill: "#E0E1E6" }), i.createElement("path", { d: "M142.47 21.0508L137.726 31.1864H135.693L131.001 21.1547V31.7062H127.509V14.3457H131.001L136.84 26.8723L142.47 14.3457H145.963V31.6542H142.47V21.0508Z", fill: "#E0E1E6" }), i.createElement("path", { d: "M153 16.5288C153 18.0361 151.905 18.9197 150.602 18.9197C149.299 18.9197 148.204 17.9841 148.204 16.5288C148.204 15.0214 149.351 14.1378 150.602 14.1378C151.853 14.0858 153 15.0214 153 16.5288ZM148.569 16.5288C148.569 17.7762 149.455 18.5559 150.55 18.5559C151.645 18.5559 152.531 17.7762 152.531 16.5288C152.531 15.2813 151.645 14.5016 150.55 14.5016C149.455 14.5016 148.569 15.2813 148.569 16.5288ZM150.602 15.2813C151.228 15.2813 151.436 15.5932 151.436 15.957C151.436 16.2689 151.228 16.4768 151.019 16.6327L151.593 17.6723H151.123L150.654 16.7367H150.133V17.6723H149.768V15.2813H150.602ZM150.185 16.3728H150.602C150.863 16.3728 151.019 16.2169 151.019 16.009C151.019 15.8011 150.915 15.6451 150.602 15.6451H150.185V16.3728Z", fill: "#E0E1E6" }), ); } function St(e) { return i.createElement( "svg", { viewBox: "0 0 232.73 46.07", xmlns: "http://www.w3.org/2000/svg", className: e.className, fill: "#E0E1E6" }, i.createElement( "g", { stroke: "null", id: "svg_2" }, i.createElement("path", { stroke: "null", id: "svg_3", d: "m21.73862,4.25158c-10.07896,0 -18.33997,7.77507 -19.12529,17.65445l10.28722,4.25199c0.87209,-0.59441 1.92641,-0.94585 3.05883,-0.94585c0.09979,0 0.20392,0.00434 0.30371,0.00868l4.57306,-6.62964c0,-0.03037 0,-0.06074 0,-0.09545c0,-3.99167 3.2454,-7.23707 7.23707,-7.23707c3.99167,0 7.23707,3.2454 7.23707,7.23707c0,3.99167 -3.2454,7.23707 -7.23707,7.23707c-0.0564,0 -0.10847,0 -0.16487,-0.00434l-6.52551,4.65984c0.00434,0.08678 0.00868,0.16921 0.00868,0.25599c0,2.99809 -2.43839,5.43214 -5.43214,5.43214c-2.62929,0 -4.82905,-1.87869 -5.32801,-4.36046l-7.35855,-3.04148c2.27785,8.05709 9.67979,13.96216 18.4658,13.96216c10.59961,0 19.19471,-8.5951 19.19471,-19.19471c0,-10.59527 -8.5951,-19.19037 -19.19471,-19.19037" }), i.createElement("path", { stroke: "null", id: "svg_4", d: "m14.64039,33.37339l-2.35595,-0.97622c0.41652,0.86775 1.1411,1.59667 2.09996,2.00017c2.07393,0.86341 4.46459,-0.12149 5.33235,-2.19542c0.41652,-1.00226 0.42086,-2.11298 0.00434,-3.11957c-0.41652,-1.00659 -1.1975,-1.79191 -2.19976,-2.21277c-0.99792,-0.41652 -2.06525,-0.39917 -3.00677,-0.04773l2.43405,1.00659c1.53159,0.6378 2.25182,2.395 1.61836,3.92659c-0.6378,1.53592 -2.395,2.25616 -3.92659,1.61836" }), i.createElement("path", { stroke: "null", id: "svg_5", d: "m32.89793,18.49576c0,-2.65966 -2.16505,-4.82471 -4.82471,-4.82471c-2.65966,0 -4.82471,2.16505 -4.82471,4.82471c0,2.65966 2.16505,4.82037 4.82471,4.82037c2.65966,0.00434 4.82471,-2.16071 4.82471,-4.82037m-8.4389,-0.00434c0,-2.00017 1.6227,-3.62287 3.62287,-3.62287c2.00017,0 3.62287,1.6227 3.62287,3.62287c0,2.00017 -1.6227,3.62287 -3.62287,3.62287c-2.00017,0 -3.62287,-1.6227 -3.62287,-3.62287" }), ), i.createElement("path", { stroke: "null", id: "svg_6", d: "m46.71333,8.08293c0,2.23529 -1.67014,3.62707 -3.5849,3.62707c-1.91476,0 -3.60177,-1.39178 -3.60177,-3.62707c0,-2.23529 1.68701,-3.6102 3.60177,-3.6102c1.91476,-0.00844 3.5849,1.37491 3.5849,3.6102m-6.64682,0c0,1.90632 1.39178,3.1041 3.05349,3.1041c1.66171,0 3.04505,-1.19778 3.04505,-3.1041c0,-1.91476 -1.38335,-3.09566 -3.04505,-3.09566c-1.65327,0 -3.05349,1.18934 -3.05349,3.09566m3.09566,-1.84728c0.95316,0 1.23152,0.49767 1.23152,1.01221c0,0.48923 -0.29523,0.8182 -0.64106,0.9869l0.83507,1.57736l-0.63263,0l-0.71698,-1.40865l-0.76759,0l0,1.40865l-0.52297,0l0,-3.56803l1.21465,0l0,-0.00844zm-0.69167,1.67858l0.65793,0c0.43019,0 0.70011,-0.27836 0.70011,-0.61576c0,-0.3374 -0.17714,-0.56515 -0.69167,-0.56515l-0.66637,0l0,1.18091z" }), i.createElement( "g", { id: "svg_7" }, i.createElement("path", { id: "svg_8", d: "m77.46999,20.31667c-2.27,6.12 -7.24,10.13 -13.11,12.2c-0.54,-1.12 -1.7,-2.9 -2.65,-3.76c3.6,-1.03 6.95,-3.06 9.14,-5.63l-7.24,0l0,-3.89l10.05,0l0.79,-0.12l3.02,1.2zm-15.02,20.43c1.7,-1.57 3.39,-4.01 4.47,-6l4.22,2.11c-1.2,2.03 -2.73,4.55 -4.34,6.29l-4.35,-2.4zm8.57,-29.9l-8.23,0l0,-4.26l8.23,0l0,-2.28l5.01,0l0,2.28l10.42,0l0,-2.28l5.01,0l0,2.28l8.15,0l0,4.26l-8.15,0l0,2.15l-5.01,0l0,-2.15l-10.42,0l0,2.15l-5.01,0l0,-2.15zm-2.57,19.85l24.53,0l0,4.1l-24.53,0l0,-4.1zm28.71,-9.8c-1.86,1.45 -3.85,2.81 -5.59,3.81c2.52,1.24 5.46,2.19 8.48,2.77c-1.03,0.95 -2.4,2.9 -3.1,4.14c-5.29,-1.41 -10.05,-4.14 -13.44,-7.82l0,1.99c0,2.03 -0.33,2.94 -1.78,3.52c-1.32,0.54 -3.14,0.58 -5.46,0.58c-0.25,-1.2 -0.87,-2.69 -1.41,-3.76c1.37,0.08 2.85,0.08 3.27,0.08c0.46,-0.04 0.62,-0.12 0.62,-0.58l0,-5.83c1.41,-0.62 2.85,-1.45 4.26,-2.32l-14.23,0l0,-3.72l19.28,0l0.99,-0.25l2.98,2.52c-1.9,1.49 -4.18,3.06 -6.58,4.38c0.7,0.79 1.57,1.53 2.52,2.23c1.78,-1.28 3.97,-3.06 5.25,-4.38l3.94,2.64zm-19.11,14.89c0.7,1.99 1.24,4.63 1.28,6.29l-4.88,0.75c0.04,-1.66 -0.37,-4.34 -0.95,-6.41l4.55,-0.63zm8.65,-0.54c1.16,1.86 2.27,4.3 2.61,6l-4.51,1.41c-0.29,-1.65 -1.28,-4.22 -2.36,-6.12l4.26,-1.29zm8.39,-0.54c1.86,1.82 4.05,4.38 5.09,6.21l-4.43,2.07c-0.91,-1.78 -2.98,-4.47 -4.8,-6.37l4.14,-1.91z", }), i.createElement("path", { id: "svg_9", d: "m110.14999,23.78667c-1.57,-1.12 -4.84,-2.9 -7.16,-4.09l2.61,-3.64c2.23,0.91 5.58,2.56 7.32,3.64l-2.77,4.09zm-5.79,15.14c2.03,-3.06 4.92,-8.07 7.16,-12.74l3.72,3.19c-1.94,4.22 -4.34,8.81 -6.58,12.74l-4.3,-3.19zm8.02,-26.02c-1.49,-1.28 -4.67,-3.14 -6.95,-4.38l2.73,-3.56c2.23,1.03 5.46,2.73 7.07,3.93l-2.85,4.01zm7.62,2.15c-0.91,1.32 -1.86,2.48 -2.81,3.52c-0.91,-0.87 -2.85,-2.36 -3.93,-3.02c2.98,-2.69 5.63,-6.99 7.07,-11.34l4.72,1.28c-0.41,0.99 -0.83,2.03 -1.32,3.06l18.08,0l0,4.22l-20.31,0c-0.46,0.74 -0.91,1.45 -1.41,2.15l17.95,0l0,3.97l-18.04,0l0,-3.84zm17.33,6.17c-0.08,10.05 -0.04,17.13 1.41,17.13c0.5,0 0.66,-2.23 0.7,-5.29c0.83,1.08 1.99,2.32 2.9,3.06c-0.33,4.67 -1.12,6.83 -3.97,6.87c-4.96,-0.04 -5.63,-6.87 -5.79,-17.5l-16.59,0l0,-4.3l19.28,0l0,0.04l2.06,0l0,-0.01z" }), i.createElement("path", { id: "svg_10", d: "m182.70999,29.24667l-16.26,0l0,13.65l-5.13,0l0,-13.65l-16.09,0l0,-5.01l16.09,0l0,-12.53l-13.94,0l0,-4.88l32.93,0l0,4.88l-13.86,0l0,12.53l16.26,0l0,5.01zm-28.3,-16.21c1.37,2.65 2.85,6.12 3.31,8.44l-4.8,1.49c-0.41,-2.19 -1.7,-5.83 -3.02,-8.6l4.51,-1.33zm15.35,8.6c1.32,-2.4 2.81,-6.04 3.6,-8.73l5.25,1.32c-1.49,3.19 -3.19,6.54 -4.55,8.65l-4.3,-1.24z" }), i.createElement("path", { id: "svg_11", d: "m212.48999,8.06667c3.81,3.56 8.73,8.65 10.88,12.12l-4.18,3.02c-0.54,-0.91 -1.28,-1.99 -2.15,-3.14c-21.97,1.08 -24.9,1.16 -27.09,1.9c-0.25,-0.99 -1.03,-3.43 -1.61,-4.72c1.08,-0.29 2.07,-1.08 3.43,-2.4c1.45,-1.28 5.96,-6.29 8.77,-11.25l4.96,2.11c-2.61,3.85 -5.87,7.53 -9.02,10.55l16.96,-0.54c-1.61,-1.82 -3.27,-3.56 -4.8,-5.09l3.85,-2.56zm-21.18,16.63l27.88,0l0,18.12l-5.29,0l0,-2.07l-17.54,0l0,2.11l-5.05,0l0,-18.16zm5.04,4.72l0,6.62l17.54,0l0,-6.62l-17.54,0z" }), ), i.createElement("g", { id: "svg_12" }, i.createElement("path", { id: "svg_13", d: "m224.05999,2.64667l-1.2,0l0,-0.43l2.92,0l0,0.43l-1.21,0l0,3.52l-0.52,0l0,-3.52l0.01,0z" }), i.createElement("path", { id: "svg_14", d: "m229.54999,4.42667c-0.03,-0.55 -0.06,-1.21 -0.06,-1.71l-0.02,0c-0.13,0.46 -0.3,0.96 -0.5,1.5l-0.7,1.92l-0.39,0l-0.64,-1.88c-0.19,-0.56 -0.35,-1.07 -0.46,-1.54l-0.01,0c-0.01,0.49 -0.04,1.15 -0.08,1.75l-0.11,1.69l-0.49,0l0.28,-3.95l0.65,0l0.67,1.91c0.16,0.49 0.3,0.92 0.4,1.33l0.02,0c0.1,-0.4 0.24,-0.83 0.42,-1.33l0.7,-1.91l0.65,0l0.25,3.95l-0.5,0l-0.08,-1.73z" })), ); } function bt() { return i.createElement(ht, { alignItems: "center", justifyContent: "center" }, i.createElement(ne.V, null)); } n(65204); function It(e) { return i.createElement(o.e1, { onEscKeypress: e.closeModal, bDisableBackgroundDismiss: !0 }, i.createElement(Et, { redirectURL: e.redirectURL, guestOption: e.guestOption })); } function yt() { (0, o.AM)(i.createElement(It, { ownerWin: window, redirectURL: window.location.href }), window, { strTitle: (0, r.Xx)("#Login_SignIn") }); } function Et(e) { const { redirectURL: t, guestOption: n } = e, [o] = (0, i.useState)(new k.J(a.De.WEBAPI_BASE_URL).GetAnonymousServiceTransport()), [r, s] = (0, i.useState)(!1); return i.createElement( "div", null, r ? i.createElement(fe, null) : i.createElement( ve, { autoFocus: !0, transport: o, platform: 2, onComplete: (e) => { e == E.k_PrimaryDomainFail ? s(!0) : window.location.assign(t); }, redirectUrl: t, theme: "modal", }, n && i.createElement(Le, { redirectURL: t }), ), ); } }, 55937: (e, t, n) => { "use strict"; n.d(t, { VC: () => u, yV: () => i }); var i, o, r = n(85556), a = n(27378), s = n(46313), l = n(40155), c = n.n(l), m = n(87018); function d(e) { switch (e) { case o.Small: return c().SizeSmall; case o.Medium: return c().SizeMedium; case o.Large: return c().SizeLarge; default: return c().SizeMedium; } } function h(e) { switch (e) { case i.Knockout: return c().Knockout; case i.Light: return c().Light; case i.Dark: return c().Dark; default: return c().Light; } } function u(e) { const t = (0, m.Z)(null != e.size ? d(e.size) : d(o.Medium), null != e.type ? h(e.type) : h(i.Light), e.additionalClassName), n = e.type == i.Knockout; switch (e.button) { case s.FX.A: return a.createElement(p, { bIsKnockout: n, className: t }); case s.FX.B: return a.createElement(_, { bIsKnockout: n, className: t }); case s.FX.X: return a.createElement(g, { bIsKnockout: n, className: t }); case s.FX.Y: return a.createElement(C, { bIsKnockout: n, className: t }); case s.FX.Left: return a.createElement(S, { bIsKnockout: n, className: t }); case s.FX.Right: return a.createElement(b, { bIsKnockout: n, className: t }); case s.FX.Up: return a.createElement(f, { bIsKnockout: n, className: t }); case s.FX.Down: return a.createElement(v, { bIsKnockout: n, className: t }); case s.FX.HomeMenu: return a.createElement(I, { bIsKnockout: n, className: t }); case s.FX.QuickMenu: return a.createElement(y, { bIsKnockout: n, className: t }); case s.FX.Select: return a.createElement(E, { bIsKnockout: n, className: t }); case s.FX.Start: return a.createElement(D, { bIsKnockout: n, className: t }); case s.FX.LeftBumper: return a.createElement(w, { bIsKnockout: n, className: t }); case s.FX.RightBumper: return a.createElement(R, { bIsKnockout: n, className: t }); case s.FX.LeftTrigger: return a.createElement(A, { bIsKnockout: n, className: t }); case s.FX.RightTrigger: return a.createElement(M, { bIsKnockout: n, className: t }); case s.FX.LeftStick: return a.createElement(G, { bIsKnockout: n, className: t }); case s.FX.RightStick: return a.createElement(L, { bIsKnockout: n, className: t }); case s.FX.LeftStickClick: return a.createElement(k, { bIsKnockout: n, className: t }); case s.FX.RightStickClick: return a.createElement(T, { bIsKnockout: n, className: t }); case s.FX.LeftTrackpad: return a.createElement(N, { bIsKnockout: n, className: t }); case s.FX.RightTrackpad: return a.createElement(U, { bIsKnockout: n, className: t }); case s.FX.LeftTrackpadClick: return a.createElement(P, { bIsKnockout: n, className: t }); case s.FX.RightTrackpadClick: return a.createElement(V, { bIsKnockout: n, className: t }); case s.FX.RearLeftUpper: return a.createElement(O, { bIsKnockout: n, className: t }); case s.FX.RearRightUpper: return a.createElement(B, { bIsKnockout: n, className: t }); case s.FX.RearLeftLower: return a.createElement(F, { bIsKnockout: n, className: t }); case s.FX.RearRightLower: return a.createElement(x, { bIsKnockout: n, className: t }); default: return a.createElement(H, { bIsKnockout: n, className: t }); } } function p(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 36C27.9411 36 36 27.9411 36 18C36 8.05887 27.9411 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36ZM21.2697 24H24.1317L19.2717 11.4H16.6077L11.8917 24H14.6457L15.4737 21.552H20.4057L21.2697 24ZM16.1937 19.446L17.9217 14.406L19.6857 19.446H16.1937Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("circle", { className: c().Background, cx: "18", cy: "18", r: "18", fill: "currentColor" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M24.1317 24H21.2697L20.4057 21.552H15.4737L14.6457 24H11.8917L16.6077 11.4H19.2717L24.1317 24ZM17.9217 14.406L16.1937 19.446H19.6857L17.9217 14.406Z" })); } function _(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 36C27.9411 36 36 27.9411 36 18C36 8.05887 27.9411 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36ZM23.173 20.382C23.173 18.81 22.369 17.778 20.761 17.286C21.349 16.974 21.775 16.584 22.039 16.116C22.303 15.648 22.435 15.132 22.435 14.568C22.435 13.56 22.081 12.78 21.373 12.228C20.665 11.676 19.573 11.4 18.097 11.4H13.435V24H18.601C19.993 24 21.103 23.682 21.931 23.046C22.759 22.41 23.173 21.522 23.173 20.382ZM16.117 16.674V13.596H17.881C19.165 13.596 19.807 14.082 19.807 15.054C19.807 15.57 19.645 15.972 19.321 16.26C18.997 16.536 18.535 16.674 17.935 16.674H16.117ZM19.843 21.372C19.507 21.672 19.003 21.822 18.331 21.822H16.117V18.582H18.403C19.039 18.582 19.525 18.72 19.861 18.996C20.197 19.26 20.365 19.656 20.365 20.184C20.365 20.676 20.191 21.072 19.843 21.372Z" }), ) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("circle", { className: c().Background, fill: "currentColor", cx: "18", cy: "18", r: "18" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M20.761 17.286C22.369 17.778 23.173 18.81 23.173 20.382C23.173 21.522 22.759 22.41 21.931 23.046C21.103 23.682 19.993 24 18.601 24H13.435V11.4H18.097C19.573 11.4 20.665 11.676 21.373 12.228C22.081 12.78 22.435 13.56 22.435 14.568C22.435 15.132 22.303 15.648 22.039 16.116C21.775 16.584 21.349 16.974 20.761 17.286ZM16.117 13.596V16.674H17.935C18.535 16.674 18.997 16.536 19.321 16.26C19.645 15.972 19.807 15.57 19.807 15.054C19.807 14.082 19.165 13.596 17.881 13.596H16.117ZM18.331 21.822C19.003 21.822 19.507 21.672 19.843 21.372C20.191 21.072 20.365 20.676 20.365 20.184C20.365 19.656 20.197 19.26 19.861 18.996C19.525 18.72 19.039 18.582 18.403 18.582H16.117V21.822H18.331Z" }), ); } function g(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", fill: "currentColor", d: "M18 36C27.9411 36 36 27.9411 36 18C36 8.05887 27.9411 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36ZM23.7101 11.4H20.3621L17.8601 15.45L15.3581 11.4H12.1001L16.4021 17.484L11.9201 24H15.0881L17.9141 19.41L20.8661 24H24.1061L19.2821 17.394L23.7101 11.4Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("circle", { className: c().Background, fill: "currentColor", cx: "18", cy: "18", r: "18" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M20.3621 11.4H23.7101L19.2821 17.394L24.1061 24H20.8661L17.9141 19.41L15.0881 24H11.9201L16.4021 17.484L12.1001 11.4H15.3581L17.8601 15.45L20.3621 11.4Z" })); } function C(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", fill: "currentColor", d: "M18 36C27.9411 36 36 27.9411 36 18C36 8.05887 27.9411 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36ZM16.69 24H19.318V18.996L23.71 11.4H20.848L18.094 16.44L15.358 11.4H12.298L16.69 18.978V24Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("circle", { className: c().Background, cx: "18", cy: "18", r: "18", fill: "currentColor" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M19.318 24H16.69V18.978L12.298 11.4H15.358L18.094 16.44L20.848 11.4H23.71L19.318 18.996V24Z" })); } function f(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 36C27.9411 36 36 27.9411 36 18C36 8.05887 27.9411 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36ZM25 20.1998L19.5555 14.7554V27.1998H16.4444V14.7554L11 20.1998L8.66663 17.8665L18 8.66661L27.3333 17.8665L25 20.1998Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("circle", { className: c().Background, fill: "currentColor", cx: "18", cy: "18", r: "18" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M19.5555 14.7554L25 20.1998L27.3333 17.8665L18 8.66661L8.66663 17.8665L11 20.1998L16.4444 14.7554V27.1998H19.5555V14.7554Z" })); } function v(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 36C27.9411 36 36 27.9411 36 18C36 8.05887 27.9411 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36ZM10.9999 15.6666L16.4444 21.1111L16.4444 8.66663H19.5555L19.5555 21.1111L24.9999 15.6666L27.3333 18L17.9999 27.1998L8.66659 18L10.9999 15.6666Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("circle", { className: c().Background, fill: "currentColor", cx: "18", cy: "18", r: "18" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M16.4444 21.1111L10.9999 15.6666L8.66659 18L17.9999 27.1998L27.3333 18L24.9999 15.6666L19.5555 21.1111L19.5555 8.66663L16.4444 8.66663L16.4444 21.1111Z" })); } function S(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 36C27.9411 36 36 27.9411 36 18C36 8.05887 27.9411 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36ZM20.2664 10.9332L14.8219 16.3777H27.2664V19.4888H14.8219L20.2664 24.9332L17.933 27.2665L8.73314 17.9332L17.933 8.59988L20.2664 10.9332Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("circle", { className: c().Background, fill: "currentColor", cx: "18", cy: "18", r: "18" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M14.8219 16.3777L20.2664 10.9333L17.933 8.59994L8.73314 17.9332L17.933 27.2666L20.2664 24.9333L14.8219 19.4888L27.2664 19.4888L27.2664 16.3777L14.8219 16.3777Z" })); } function b(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 36C27.9411 36 36 27.9411 36 18C36 8.05887 27.9411 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36ZM15.7332 24.9332L21.1776 19.4888H8.73315V16.3777H21.1776L15.7332 10.9332L18.0665 8.59991L27.2664 17.9333L18.0665 27.2666L15.7332 24.9332Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("circle", { className: c().Background, fill: "currentColor", cx: "18", cy: "18", r: "18" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M21.1776 19.4887L15.7332 24.9332L18.0665 27.2665L27.2664 17.9332L18.0665 8.59985L15.7332 10.9332L21.1776 16.3776L8.73315 16.3776L8.73315 19.4887L21.1776 19.4887Z" })); } function I(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 36", fill: "none" }, n), a.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", fill: "currentColor", d: "M18 0C8.05888 0 0 8.05888 0 18C0 27.9411 8.05888 36 18 36H82C91.9411 36 100 27.9411 100 18C100 8.05888 91.9411 0 82 0H18ZM21.8011 11.5C22.6531 11.5 23.4391 11.62 24.1591 11.86C24.8791 12.1 25.4851 12.394 25.9771 12.742L24.8611 14.722C24.4171 14.41 23.9191 14.158 23.3671 13.966C22.8271 13.774 22.3111 13.678 21.8191 13.678C21.2191 13.678 20.7511 13.804 20.4151 14.056C20.0791 14.296 19.9111 14.632 19.9111 15.064C19.9111 15.496 20.1091 15.838 20.5051 16.09C20.9011 16.33 21.5071 16.594 22.3231 16.882C23.1631 17.182 23.8351 17.458 24.3391 17.71C24.8431 17.962 25.2811 18.334 25.6531 18.826C26.0371 19.306 26.2291 19.924 26.2291 20.68C26.2291 21.484 26.0191 22.18 25.5991 22.768C25.1911 23.356 24.6151 23.812 23.8711 24.136C23.1271 24.448 22.2751 24.604 21.3151 24.604C20.5351 24.604 19.7371 24.502 18.9211 24.298C18.1171 24.082 17.4091 23.794 16.7971 23.434L17.6251 21.238C18.2011 21.55 18.8071 21.802 19.4431 21.994C20.0911 22.174 20.7271 22.264 21.3511 22.264C22.0351 22.264 22.5451 22.132 22.8811 21.868C23.2291 21.604 23.4031 21.256 23.4031 20.824C23.4031 20.392 23.2171 20.056 22.8451 19.816C22.4731 19.576 21.9031 19.33 21.1351 19.078C20.2711 18.802 19.5751 18.538 19.0471 18.286C18.5191 18.022 18.0631 17.644 17.6791 17.152C17.3071 16.648 17.1211 15.994 17.1211 15.19C17.1211 14.446 17.3131 13.798 17.6971 13.246C18.0931 12.682 18.6451 12.25 19.3531 11.95C20.0611 11.65 20.8771 11.5 21.8011 11.5ZM35.2486 24.388H32.6026V14.056H28.7866V11.788H39.0646V14.056H35.2486V24.388ZM50.8108 11.788H42.3148V24.388H50.8108V22.102H44.9608V19.15H50.0008V16.882H44.9608V14.038H50.8108V11.788ZM65.8582 24.388H62.9962L62.1322 21.94H57.2002L56.3722 24.388H53.6182L58.3342 11.788H60.9982L65.8582 24.388ZM59.6482 14.794L57.9202 19.834H61.4122L59.6482 14.794ZM79.7729 11.788L75.8489 20.734L71.6009 11.788H69.0629V24.388H71.4749V16.468L74.9309 24.028H76.5329L79.9169 16.378V24.388H82.4549V11.788H79.7729Z", }), ) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 36", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M0 18C0 8.05888 8.05888 0 18 0H82C91.9411 0 100 8.05888 100 18C100 27.9411 91.9411 36 82 36H18C8.05888 36 0 27.9411 0 18Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M21.8011 11.5C22.6531 11.5 23.4391 11.62 24.1591 11.86C24.8791 12.1 25.4851 12.394 25.9771 12.742L24.8611 14.722C24.4171 14.41 23.9191 14.158 23.3671 13.966C22.8271 13.774 22.3111 13.678 21.8191 13.678C21.2191 13.678 20.7511 13.804 20.4151 14.056C20.0791 14.296 19.9111 14.632 19.9111 15.064C19.9111 15.496 20.1091 15.838 20.5051 16.09C20.9011 16.33 21.5071 16.594 22.3231 16.882C23.1631 17.182 23.8351 17.458 24.3391 17.71C24.8431 17.962 25.2811 18.334 25.6531 18.826C26.0371 19.306 26.2291 19.924 26.2291 20.68C26.2291 21.484 26.0191 22.18 25.5991 22.768C25.1911 23.356 24.6151 23.812 23.8711 24.136C23.1271 24.448 22.2751 24.604 21.3151 24.604C20.5351 24.604 19.7371 24.502 18.9211 24.298C18.1171 24.082 17.4091 23.794 16.7971 23.434L17.6251 21.238C18.2011 21.55 18.8071 21.802 19.4431 21.994C20.0911 22.174 20.7271 22.264 21.3511 22.264C22.0351 22.264 22.5451 22.132 22.8811 21.868C23.2291 21.604 23.4031 21.256 23.4031 20.824C23.4031 20.392 23.2171 20.056 22.8451 19.816C22.4731 19.576 21.9031 19.33 21.1351 19.078C20.2711 18.802 19.5751 18.538 19.0471 18.286C18.5191 18.022 18.0631 17.644 17.6791 17.152C17.3071 16.648 17.1211 15.994 17.1211 15.19C17.1211 14.446 17.3131 13.798 17.6971 13.246C18.0931 12.682 18.6451 12.25 19.3531 11.95C20.0611 11.65 20.8771 11.5 21.8011 11.5Z", }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M35.2486 24.388H32.6026V14.056H28.7866V11.788H39.0646V14.056H35.2486V24.388Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M42.3148 11.788H50.8108V14.038H44.9608V16.882H50.0008V19.15H44.9608V22.102H50.8108V24.388H42.3148V11.788Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M65.8582 24.388H62.9962L62.1322 21.94H57.2002L56.3722 24.388H53.6182L58.3342 11.788H60.9982L65.8582 24.388ZM59.6482 14.794L57.9202 19.834H61.4122L59.6482 14.794Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M75.8489 20.734L79.7729 11.788H82.4549V24.388H79.9169V16.378L76.5329 24.028H74.9309L71.4749 16.468V24.388H69.0629V11.788H71.6009L75.8489 20.734Z" }), ); } function y(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 81 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 0C8.05888 0 0 8.05888 0 18C0 27.9411 8.05888 36 18 36H61C70.9411 36 79 27.9411 79 18C79 8.05888 70.9411 0 61 0H18ZM21.5 22.5C23.9853 22.5 26 20.4853 26 18C26 15.5147 23.9853 13.5 21.5 13.5C19.0147 13.5 17 15.5147 17 18C17 20.4853 19.0147 22.5 21.5 22.5ZM44 18C44 20.4853 41.9853 22.5 39.5 22.5C37.0147 22.5 35 20.4853 35 18C35 15.5147 37.0147 13.5 39.5 13.5C41.9853 13.5 44 15.5147 44 18ZM57.5 22.5C59.9853 22.5 62 20.4853 62 18C62 15.5147 59.9853 13.5 57.5 13.5C55.0147 13.5 53 15.5147 53 18C53 20.4853 55.0147 22.5 57.5 22.5Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 81 36", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M0 18C0 8.05888 8.05888 0 18 0H61C70.9411 0 79 8.05888 79 18C79 27.9411 70.9411 36 61 36H18C8.05888 36 0 27.9411 0 18Z" }), a.createElement("circle", { className: c().Foreground, fill: "currentColor", cx: "21.5", cy: "18", r: "4.5" }), a.createElement("circle", { className: c().Foreground, fill: "currentColor", cx: "39.5", cy: "18", r: "4.5" }), a.createElement("circle", { className: c().Foreground, fill: "currentColor", cx: "57.5", cy: "18", r: "4.5" })); } function E(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M12 6C5.37258 6 0 11.3726 0 18C0 24.6274 5.37258 30 12 30H36C42.6274 30 48 24.6274 48 18C48 11.3726 42.6274 6 36 6H12ZM31 11H17V25H31V11Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 36", fill: "none" }, n), a.createElement("rect", { className: c().Background, fill: "currentColor", y: "6", width: "48", height: "24", rx: "12" }), a.createElement("rect", { className: c().Foreground, fill: "currentColor", x: "17", y: "11", width: "14", height: "14" })); } function D(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M12 6C5.37258 6 0 11.3726 0 18C0 24.6274 5.37258 30 12 30H36C42.6274 30 48 24.6274 48 18C48 11.3726 42.6274 6 36 6H12ZM31 11H17V13.8H31V11ZM17 22.2H31V25H17V22.2ZM31 16.6H17V19.4H31V16.6Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 36", fill: "none" }, n), a.createElement("rect", { className: c().Background, fill: "currentColor", y: "6", width: "48", height: "24", rx: "12" }), a.createElement("rect", { className: c().Foreground, fill: "currentColor", x: "17", y: "11", width: "14", height: "2.8" }), a.createElement("rect", { className: c().Foreground, fill: "currentColor", x: "17", y: "22.2", width: "14", height: "2.8" }), a.createElement("rect", { className: c().Foreground, fill: "currentColor", x: "17", y: "16.6", width: "14", height: "2.8" })); } function w(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 32", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M7.5 0C3.35786 0 0 4.47715 0 10V30C0 31.1046 0.671574 32 1.5 32H34.5C35.3284 32 36 31.1046 36 30V2C36 0.895431 35.3284 0 34.5 0H7.5ZM9.36182 23H17.8218V20.624H12.0078V10.4H9.36182V23ZM25.7635 20.714V10.4H23.7296L19.5896 12.452L20.4356 14.432L23.0816 13.316V20.714H20.1115V23H28.1576V20.714H25.7635Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 32", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M0 10C0 4.47715 3.35786 0 7.5 0H34.5C35.3284 0 36 0.895431 36 2V30C36 31.1046 35.3284 32 34.5 32H1.5C0.671574 32 0 31.1046 0 30V10Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M17.8218 23H9.36182V10.4H12.0078V20.624H17.8218V23Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M25.7635 10.4V20.714H28.1576V23H20.1116V20.714H23.0816V13.316L20.4356 14.432L19.5896 12.452L23.7296 10.4H25.7635Z" })); } function R(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 32", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M28.5 0C32.6421 0 36 4.47715 36 10V30C36 31.1046 35.3284 32 34.5 32H1.5C0.671573 32 0 31.1046 0 30V2C0 0.895431 0.671573 0 1.5 0H28.5ZM15.8185 23H18.7525L15.7825 18.23C16.5505 17.894 17.1445 17.402 17.5645 16.754C17.9965 16.106 18.2125 15.296 18.2125 14.324C18.2125 13.088 17.8045 12.128 16.9885 11.444C16.1725 10.748 14.9005 10.4 13.1725 10.4H8.45654V23H11.1025V18.752H12.9745H13.2805L15.8185 23ZM11.1025 16.484V12.65H13.0105C13.8385 12.65 14.4385 12.806 14.8105 13.118C15.1945 13.418 15.3865 13.874 15.3865 14.486C15.3865 15.11 15.1885 15.602 14.7925 15.962C14.4085 16.31 13.8685 16.484 13.1725 16.484H11.1025ZM26.6688 20.714V10.4H24.6348L20.4948 12.452L21.3408 14.432L23.9868 13.316V20.714H21.0168V23H29.0628V20.714H26.6688Z" })) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 32", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M36 10C36 4.47715 32.6421 0 28.5 0H1.5C0.671574 0 0 0.895431 0 2V30C0 31.1046 0.671574 32 1.5 32H34.5C35.3284 32 36 31.1046 36 30V10Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M18.7525 23H15.8185L13.2805 18.752H12.9745H11.1025V23H8.45654V10.4H13.1725C14.9005 10.4 16.1725 10.748 16.9885 11.444C17.8045 12.128 18.2125 13.088 18.2125 14.324C18.2125 15.296 17.9965 16.106 17.5645 16.754C17.1445 17.402 16.5505 17.894 15.7825 18.23L18.7525 23ZM11.1025 12.65V16.484H13.1725C13.8685 16.484 14.4085 16.31 14.7925 15.962C15.1885 15.602 15.3865 15.11 15.3865 14.486C15.3865 13.874 15.1945 13.418 14.8105 13.118C14.4385 12.806 13.8385 12.65 13.0105 12.65H11.1025Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M26.6688 10.4V20.714H29.0628V23H21.0168V20.714H23.9868V13.316L21.3408 14.432L20.4948 12.452L24.6348 10.4H26.6688Z" }), ); } function A(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 32", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M7.5 32C3.35786 32 0 27.5228 0 22V2C0 0.895431 0.671574 0 1.5 0H34.5C35.3284 0 36 0.895431 36 2V30C36 31.1046 35.3284 32 34.5 32H7.5ZM29.0743 20.714H23.0083L25.6183 18.554C26.6623 17.69 27.4363 16.91 27.9403 16.214C28.4443 15.506 28.6963 14.72 28.6963 13.856C28.6963 12.68 28.2583 11.774 27.3823 11.138C26.5063 10.502 25.3423 10.184 23.8903 10.184C23.0743 10.184 22.3063 10.298 21.5863 10.526C20.8783 10.754 20.2483 11.06 19.6963 11.444L20.5963 13.388C20.9683 13.136 21.4003 12.926 21.8923 12.758C22.3963 12.59 22.9123 12.506 23.4403 12.506C24.1483 12.506 24.7243 12.668 25.1683 12.992C25.6243 13.304 25.8523 13.772 25.8523 14.396C25.8523 14.78 25.7623 15.134 25.5823 15.458C25.4023 15.782 25.1623 16.088 24.8623 16.376C24.5743 16.664 24.1543 17.042 23.6023 17.51L23.2963 17.78L19.6603 20.804V23H29.0743V20.714ZM9.32458 23H17.7846V20.624H11.9706V10.4H9.32458V23Z" }), ) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 32", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M0 22C0 27.5228 3.35786 32 7.5 32H34.5C35.3284 32 36 31.1046 36 30V2C36 0.895432 35.3284 0 34.5 0H1.5C0.671574 0 0 0.895432 0 2V22Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M17.7846 23H9.32458V10.4H11.9706V20.624H17.7846V23Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M23.0083 20.714H29.0743V23H19.6603V20.804L23.2963 17.78L23.6023 17.51C24.1543 17.042 24.5743 16.664 24.8623 16.376C25.1623 16.088 25.4023 15.782 25.5823 15.458C25.7623 15.134 25.8523 14.78 25.8523 14.396C25.8523 13.772 25.6243 13.304 25.1683 12.992C24.7243 12.668 24.1483 12.506 23.4403 12.506C22.9123 12.506 22.3963 12.59 21.8923 12.758C21.4003 12.926 20.9683 13.136 20.5963 13.388L19.6963 11.444C20.2483 11.06 20.8783 10.754 21.5863 10.526C22.3063 10.298 23.0743 10.184 23.8903 10.184C25.3423 10.184 26.5063 10.502 27.3823 11.138C28.2583 11.774 28.6963 12.68 28.6963 13.856C28.6963 14.72 28.4443 15.506 27.9403 16.214C27.4363 16.91 26.6623 17.69 25.6183 18.554L23.0083 20.714Z" }), ); } function M(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 32", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M28.5 32C32.6421 32 36 27.5228 36 22V2C36 0.895431 35.3284 0 34.5 0H1.5C0.671573 0 0 0.895431 0 2V30C0 31.1046 0.671573 32 1.5 32H28.5ZM28.9796 20.714H22.9136L25.5236 18.554C26.5676 17.69 27.3416 16.91 27.8456 16.214C28.3496 15.506 28.6016 14.72 28.6016 13.856C28.6016 12.68 28.1636 11.774 27.2876 11.138C26.4116 10.502 25.2476 10.184 23.7956 10.184C22.9796 10.184 22.2116 10.298 21.4916 10.526C20.7836 10.754 20.1536 11.06 19.6016 11.444L20.5016 13.388C20.8736 13.136 21.3056 12.926 21.7976 12.758C22.3016 12.59 22.8176 12.506 23.3456 12.506C24.0536 12.506 24.6296 12.668 25.0736 12.992C25.5296 13.304 25.7576 13.772 25.7576 14.396C25.7576 14.78 25.6676 15.134 25.4876 15.458C25.3076 15.782 25.0676 16.088 24.7676 16.376C24.4796 16.664 24.0596 17.042 23.5076 17.51L23.2016 17.78L19.5656 20.804V23H28.9796V20.714ZM14.7813 23H17.7153L14.7453 18.23C15.5133 17.894 16.1073 17.402 16.5273 16.754C16.9593 16.106 17.1753 15.296 17.1753 14.324C17.1753 13.088 16.7673 12.128 15.9513 11.444C15.1353 10.748 13.8633 10.4 12.1353 10.4H7.41931V23H10.0653V18.752H11.9373H12.2433L14.7813 23ZM10.0653 16.484V12.65H11.9733C12.8013 12.65 13.4013 12.806 13.7733 13.118C14.1573 13.418 14.3493 13.874 14.3493 14.486C14.3493 15.11 14.1513 15.602 13.7553 15.962C13.3713 16.31 12.8313 16.484 12.1353 16.484H10.0653Z", }), ) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 32", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M36 22C36 27.5228 32.6421 32 28.5 32H1.5C0.671574 32 0 31.1046 0 30V2C0 0.895432 0.671574 0 1.5 0H34.5C35.3284 0 36 0.895432 36 2V22Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M17.7153 23H14.7813L12.2433 18.752H11.9373H10.0653V23H7.41931V10.4H12.1353C13.8633 10.4 15.1353 10.748 15.9513 11.444C16.7673 12.128 17.1753 13.088 17.1753 14.324C17.1753 15.296 16.9593 16.106 16.5273 16.754C16.1073 17.402 15.5133 17.894 14.7453 18.23L17.7153 23ZM10.0653 12.65V16.484H12.1353C12.8313 16.484 13.3713 16.31 13.7553 15.962C14.1513 15.602 14.3493 15.11 14.3493 14.486C14.3493 13.874 14.1573 13.418 13.7733 13.118C13.4013 12.806 12.8013 12.65 11.9733 12.65H10.0653Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M22.9136 20.714H28.9796V23H19.5656V20.804L23.2016 17.78L23.5076 17.51C24.0596 17.042 24.4796 16.664 24.7676 16.376C25.0676 16.088 25.3076 15.782 25.4876 15.458C25.6676 15.134 25.7576 14.78 25.7576 14.396C25.7576 13.772 25.5296 13.304 25.0736 12.992C24.6296 12.668 24.0536 12.506 23.3456 12.506C22.8176 12.506 22.3016 12.59 21.7976 12.758C21.3056 12.926 20.8736 13.136 20.5016 13.388L19.6016 11.444C20.1536 11.06 20.7836 10.754 21.4916 10.526C22.2116 10.298 22.9796 10.184 23.7956 10.184C25.2476 10.184 26.4116 10.502 27.2876 11.138C28.1636 11.774 28.6016 12.68 28.6016 13.856C28.6016 14.72 28.3496 15.506 27.8456 16.214C27.3416 16.91 26.5676 17.69 25.5236 18.554L22.9136 20.714Z" }), ); } function k(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", d: "M11 32V33.601C11 34.926 12.0446 36 13.3333 36H22.6667C23.9554 36 25 34.926 25 33.601V32C22.7984 32.523 20.4394 32.8029 18 32.8029C15.5606 32.8029 13.2016 32.523 11 32Z" }), a.createElement("path", { fill: "currentColor", d: "M23.1111 0H12L17.5556 5.625L23.1111 0Z" }), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 30.75C27.9411 30.75 36 25.7132 36 19.5C36 13.2868 27.9411 8.25 18 8.25C8.05887 8.25 0 13.2868 0 19.5C0 25.7132 8.05887 30.75 18 30.75ZM25.4679 14.284C24.7852 13.7613 23.7879 13.5 22.4759 13.5C21.6972 13.5 20.9666 13.6173 20.2839 13.852C19.6119 14.0867 19.0092 14.4227 18.4759 14.86L19.4679 16.364C19.8199 16.0973 20.2146 15.8893 20.6519 15.74C21.0999 15.58 21.5639 15.5 22.0439 15.5C22.6732 15.5 23.1639 15.6227 23.5159 15.868C23.8786 16.1133 24.0599 16.4387 24.0599 16.844C24.0599 17.2813 23.8679 17.6227 23.4839 17.868C23.1106 18.1027 22.6146 18.22 21.9959 18.22H20.6999V19.996H22.1399C23.7079 19.996 24.4919 20.508 24.4919 21.532C24.4919 22.0547 24.2839 22.4653 23.8679 22.764C23.4626 23.0627 22.8972 23.212 22.1719 23.212C21.0306 23.212 20.0439 22.876 19.2119 22.204L18.2039 23.932C18.7052 24.3373 19.3186 24.652 20.0439 24.876C20.7799 25.1 21.5532 25.212 22.3639 25.212C23.2172 25.212 23.9959 25.068 24.6999 24.78C25.4039 24.4813 25.9586 24.0653 26.3639 23.532C26.7692 22.988 26.9719 22.364 26.9719 21.66C26.9719 20.892 26.7479 20.2787 26.2999 19.82C25.8626 19.3507 25.2866 19.0413 24.5719 18.892V18.844C25.1799 18.6093 25.6492 18.2733 25.9799 17.836C26.3212 17.388 26.4919 16.8813 26.4919 16.316C26.4919 15.484 26.1506 14.8067 25.4679 14.284ZM9.48901 24.956H17.009V22.844H11.841V13.756H9.48901V24.956Z", }), ) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("ellipse", { className: c().Background, fill: "currentColor", cx: "18", cy: "19.5", rx: "18", ry: "11.25" }), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M11 32V33.601C11 34.926 12.0446 36 13.3333 36H22.6667C23.9554 36 25 34.926 25 33.601V32C22.7984 32.523 20.4394 32.8029 18 32.8029C15.5606 32.8029 13.2016 32.523 11 32Z" }), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M23.1111 0H12L17.5556 5.625L23.1111 0Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M17.009 24.956H9.48901V13.756H11.841V22.844H17.009V24.956Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M22.4759 13.5C23.7879 13.5 24.7852 13.7613 25.4679 14.284C26.1506 14.8067 26.4919 15.484 26.4919 16.316C26.4919 16.8813 26.3212 17.388 25.9799 17.836C25.6492 18.2733 25.1799 18.6093 24.5719 18.844V18.892C25.2866 19.0413 25.8626 19.3507 26.2999 19.82C26.7479 20.2787 26.9719 20.892 26.9719 21.66C26.9719 22.364 26.7692 22.988 26.3639 23.532C25.9586 24.0653 25.4039 24.4813 24.6999 24.78C23.9959 25.068 23.2172 25.212 22.3639 25.212C21.5532 25.212 20.7799 25.1 20.0439 24.876C19.3186 24.652 18.7052 24.3373 18.2039 23.932L19.2119 22.204C20.0439 22.876 21.0306 23.212 22.1719 23.212C22.8972 23.212 23.4626 23.0627 23.8679 22.764C24.2839 22.4653 24.4919 22.0547 24.4919 21.532C24.4919 20.508 23.7079 19.996 22.1399 19.996H20.6999V18.22H21.9959C22.6146 18.22 23.1106 18.1027 23.4839 17.868C23.8679 17.6227 24.0599 17.2813 24.0599 16.844C24.0599 16.4387 23.8786 16.1133 23.5159 15.868C23.1639 15.6227 22.6732 15.5 22.0439 15.5C21.5639 15.5 21.0999 15.58 20.6519 15.74C20.2146 15.8893 19.8199 16.0973 19.4679 16.364L18.4759 14.86C19.0092 14.4227 19.6119 14.0867 20.2839 13.852C20.9666 13.6173 21.6972 13.5 22.4759 13.5Z", }), ); } function T(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", d: "M11 32V33.601C11 34.926 12.0446 36 13.3333 36H22.6667C23.9554 36 25 34.926 25 33.601V32C22.7984 32.523 20.4394 32.8029 18 32.8029C15.5606 32.8029 13.2016 32.523 11 32Z" }), a.createElement("path", { fill: "currentColor", d: "M23.1111 0H12L17.5556 5.625L23.1111 0Z" }), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 30.75C27.9411 30.75 36 25.7132 36 19.5C36 13.2868 27.9411 8.25 18 8.25C8.05887 8.25 0 13.2868 0 19.5C0 25.7132 8.05887 30.75 18 30.75ZM26.5882 14.284C25.9056 13.7613 24.9082 13.5 23.5962 13.5C22.8176 13.5 22.0869 13.6173 21.4043 13.852C20.7323 14.0867 20.1296 14.4227 19.5963 14.86L20.5882 16.364C20.9403 16.0973 21.3349 15.8893 21.7723 15.74C22.2202 15.58 22.6842 15.5 23.1642 15.5C23.7936 15.5 24.2843 15.6227 24.6362 15.868C24.9989 16.1133 25.1803 16.4387 25.1803 16.844C25.1803 17.2813 24.9883 17.6227 24.6043 17.868C24.2309 18.1027 23.7349 18.22 23.1162 18.22H21.8203V19.996H23.2603C24.8283 19.996 25.6122 20.508 25.6122 21.532C25.6122 22.0547 25.4042 22.4653 24.9883 22.764C24.5829 23.0627 24.0176 23.212 23.2923 23.212C22.1509 23.212 21.1643 22.876 20.3323 22.204L19.3242 23.932C19.8256 24.3373 20.4389 24.652 21.1642 24.876C21.9002 25.1 22.6736 25.212 23.4842 25.212C24.3376 25.212 25.1162 25.068 25.8202 24.78C26.5243 24.4813 27.0789 24.0653 27.4842 23.532C27.8896 22.988 28.0923 22.364 28.0923 21.66C28.0923 20.892 27.8682 20.2787 27.4202 19.82C26.9829 19.3507 26.4069 19.0413 25.6922 18.892V18.844C26.3002 18.6093 26.7696 18.2733 27.1003 17.836C27.4416 17.388 27.6122 16.8813 27.6122 16.316C27.6122 15.484 27.2709 14.8067 26.5882 14.284ZM15.544 24.956H18.152L15.512 20.716C16.1947 20.4173 16.7227 19.98 17.096 19.404C17.48 18.828 17.672 18.108 17.672 17.244C17.672 16.1453 17.3093 15.292 16.584 14.684C15.8587 14.0653 14.728 13.756 13.192 13.756H9V24.956H11.352V21.18H13.016H13.288L15.544 24.956ZM11.352 19.164V15.756H13.048C13.784 15.756 14.3173 15.8947 14.648 16.172C14.9893 16.4387 15.16 16.844 15.16 17.388C15.16 17.9427 14.984 18.38 14.632 18.7C14.2907 19.0093 13.8107 19.164 13.192 19.164H11.352Z", }), ) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("ellipse", { className: c().Background, fill: "currentColor", cx: "18", cy: "19.5", rx: "18", ry: "11.25" }), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M11 32V33.601C11 34.926 12.0446 36 13.3333 36H22.6667C23.9554 36 25 34.926 25 33.601V32C22.7984 32.523 20.4394 32.8029 18 32.8029C15.5606 32.8029 13.2016 32.523 11 32Z" }), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M23.1111 0H12L17.5556 5.625L23.1111 0Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M18.152 24.956H15.544L13.288 21.18H13.016H11.352V24.956H9V13.756H13.192C14.728 13.756 15.8587 14.0653 16.584 14.684C17.3093 15.292 17.672 16.1453 17.672 17.244C17.672 18.108 17.48 18.828 17.096 19.404C16.7227 19.98 16.1947 20.4173 15.512 20.716L18.152 24.956ZM11.352 15.756V19.164H13.192C13.8107 19.164 14.2907 19.0093 14.632 18.7C14.984 18.38 15.16 17.9427 15.16 17.388C15.16 16.844 14.9893 16.4387 14.648 16.172C14.3173 15.8947 13.784 15.756 13.048 15.756H11.352Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M23.5962 13.5C24.9082 13.5 25.9056 13.7613 26.5882 14.284C27.2709 14.8067 27.6122 15.484 27.6122 16.316C27.6122 16.8813 27.4416 17.388 27.1003 17.836C26.7696 18.2733 26.3002 18.6093 25.6922 18.844V18.892C26.4069 19.0413 26.9829 19.3507 27.4202 19.82C27.8682 20.2787 28.0923 20.892 28.0923 21.66C28.0923 22.364 27.8896 22.988 27.4842 23.532C27.0789 24.0653 26.5243 24.4813 25.8202 24.78C25.1162 25.068 24.3376 25.212 23.4843 25.212C22.6736 25.212 21.9003 25.1 21.1643 24.876C20.4389 24.652 19.8256 24.3373 19.3243 23.932L20.3323 22.204C21.1643 22.876 22.1509 23.212 23.2923 23.212C24.0176 23.212 24.5829 23.0627 24.9882 22.764C25.4042 22.4653 25.6122 22.0547 25.6122 21.532C25.6122 20.508 24.8283 19.996 23.2603 19.996H21.8203V18.22H23.1163C23.7349 18.22 24.2309 18.1027 24.6043 17.868C24.9883 17.6227 25.1803 17.2813 25.1803 16.844C25.1803 16.4387 24.9989 16.1133 24.6363 15.868C24.2843 15.6227 23.7936 15.5 23.1643 15.5C22.6842 15.5 22.2203 15.58 21.7723 15.74C21.3349 15.8893 20.9403 16.0973 20.5883 16.364L19.5963 14.86C20.1296 14.4227 20.7323 14.0867 21.4043 13.852C22.0869 13.6173 22.8176 13.5 23.5962 13.5Z", }), ); } function L(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 24.75C27.9411 24.75 36 19.7132 36 13.5C36 7.2868 27.9411 2.25 18 2.25C8.05887 2.25 0 7.2868 0 13.5C0 19.7132 8.05887 24.75 18 24.75ZM20.8833 18.9875H23.6775L20.849 14.4447C21.5804 14.1247 22.1461 13.6561 22.5461 13.039C22.9575 12.4218 23.1633 11.6504 23.1633 10.7247C23.1633 9.54755 22.7747 8.63326 21.9975 7.98183C21.2204 7.31898 20.009 6.98755 18.3633 6.98755H13.8718V18.9875H16.3918V14.9418H18.1747H18.4661L20.8833 18.9875ZM16.3918 12.7818V9.13041H18.209C18.9975 9.13041 19.569 9.27898 19.9233 9.57612C20.289 9.86183 20.4718 10.2961 20.4718 10.879C20.4718 11.4733 20.2833 11.9418 19.9061 12.2847C19.5404 12.6161 19.0261 12.7818 18.3633 12.7818H16.3918Z" }), a.createElement("path", { fill: "currentColor", d: "M11 26V31.601C11 32.926 12.0446 34 13.3333 34H22.6667C23.9554 34 25 32.926 25 31.601V26C22.7984 26.523 20.4394 26.8029 18 26.8029C15.5606 26.8029 13.2016 26.523 11 26Z" }), ) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("ellipse", { className: c().Background, fill: "currentColor", cx: "18", cy: "13.5", rx: "18", ry: "11.25" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M23.6775 18.9875H20.8833L18.4661 14.9418H18.1747H16.3918V18.9875H13.8718V6.98755H18.3633C20.009 6.98755 21.2204 7.31898 21.9975 7.98184C22.7747 8.63326 23.1633 9.54755 23.1633 10.7247C23.1633 11.6504 22.9575 12.4218 22.5461 13.039C22.1461 13.6561 21.5804 14.1247 20.849 14.4447L23.6775 18.9875ZM16.3918 9.13041V12.7818H18.3633C19.0261 12.7818 19.5404 12.6161 19.9061 12.2847C20.2833 11.9418 20.4718 11.4733 20.4718 10.879C20.4718 10.2961 20.289 9.86183 19.9233 9.57612C19.569 9.27898 18.9975 9.13041 18.209 9.13041H16.3918Z" }), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M11 26V31.601C11 32.926 12.0446 34 13.3333 34H22.6667C23.9554 34 25 32.926 25 31.601V26C22.7984 26.523 20.4394 26.8029 18 26.8029C15.5606 26.8029 13.2016 26.523 11 26Z" }), ); } function G(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 24.75C27.9411 24.75 36 19.7132 36 13.5C36 7.2868 27.9411 2.25 18 2.25C8.05887 2.25 0 7.2868 0 13.5C0 19.7132 8.05887 24.75 18 24.75ZM14 19H23V16.7371H16.8149V7H14V19Z" }), a.createElement("path", { fill: "currentColor", d: "M11 26V31.601C11 32.926 12.0446 34 13.3333 34H22.6667C23.9554 34 25 32.926 25 31.601V26C22.7984 26.523 20.4394 26.8029 18 26.8029C15.5606 26.8029 13.2016 26.523 11 26Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("ellipse", { className: c().Background, fill: "currentColor", cx: "18", cy: "13.5", rx: "18", ry: "11.25" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M23 19H14V7H16.8149V16.7371H23V19Z" }), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M11 26V31.601C11 32.926 12.0446 34 13.3333 34H22.6667C23.9554 34 25 32.926 25 31.601V26C22.7984 26.523 20.4394 26.8029 18 26.8029C15.5606 26.8029 13.2016 26.523 11 26Z" })); } function O(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M2 0C0.895431 0 0 0.895431 0 2V34C0 35.1046 0.895431 36 2 36H34C35.1046 36 36 35.1046 36 34V2C36 0.895431 35.1046 0 34 0H2ZM8.62341 24.75H17.0834V22.374H11.2694V12.15H8.62341V24.75ZM27.3111 19.854V12.15H24.8631L18.6891 20.16V21.888H24.6291V24.75H27.3111V21.888H29.1291V19.854H27.3111ZM21.2631 19.854L24.7371 15.3V19.854H21.2631Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M0 2C0 0.895431 0.895431 0 2 0H34C35.1046 0 36 0.895431 36 2V34C36 35.1046 35.1046 36 34 36H2C0.895431 36 0 35.1046 0 34V2Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M17.0834 24.75H8.62341V12.15H11.2694V22.374H17.0834V24.75Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M27.3111 12.15V19.854H29.1291V21.888H27.3111V24.75H24.6291V21.888H18.6891V20.16L24.8631 12.15H27.3111ZM24.7371 15.3L21.2631 19.854H24.7371V15.3Z" })); } function F(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M2 0C0.895431 0 0 0.895431 0 2V34C0 35.1046 0.895431 36 2 36H34C35.1046 36 36 35.1046 36 34V2C36 0.895431 35.1046 0 34 0H2ZM8.23669 24.75H16.6967V22.374H10.8827V12.15H8.23669V24.75ZM27.3744 14.4V12.15H19.3284V18.648L21.0024 19.566C21.3744 19.266 21.7524 19.044 22.1364 18.9C22.5204 18.744 22.9404 18.666 23.3964 18.666C24.0084 18.666 24.4884 18.828 24.8364 19.152C25.1964 19.476 25.3764 19.944 25.3764 20.556C25.3764 21.252 25.1424 21.786 24.6744 22.158C24.2064 22.53 23.5464 22.716 22.6944 22.716C21.5664 22.716 20.5404 22.404 19.6164 21.78L18.6804 23.796C19.1484 24.192 19.7364 24.498 20.4444 24.714C21.1524 24.93 21.9144 25.038 22.7304 25.038C23.8344 25.038 24.7884 24.852 25.5924 24.48C26.4084 24.096 27.0264 23.562 27.4464 22.878C27.8784 22.194 28.0944 21.396 28.0944 20.484C28.0944 19.26 27.7524 18.33 27.0684 17.694C26.3964 17.046 25.4964 16.722 24.3684 16.722C23.9244 16.722 23.4804 16.776 23.0364 16.884C22.6044 16.98 22.2144 17.136 21.8664 17.352V14.4H27.3744Z", }), ) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M0 2C0 0.895431 0.895431 0 2 0H34C35.1046 0 36 0.895431 36 2V34C36 35.1046 35.1046 36 34 36H2C0.895431 36 0 35.1046 0 34V2Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M16.6967 24.75H8.23669V12.15H10.8827V22.374H16.6967V24.75Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M27.3744 12.15V14.4H21.8664V17.352C22.2144 17.136 22.6044 16.98 23.0364 16.884C23.4804 16.776 23.9244 16.722 24.3684 16.722C25.4964 16.722 26.3964 17.046 27.0684 17.694C27.7524 18.33 28.0944 19.26 28.0944 20.484C28.0944 21.396 27.8784 22.194 27.4464 22.878C27.0264 23.562 26.4084 24.096 25.5924 24.48C24.7884 24.852 23.8344 25.038 22.7304 25.038C21.9144 25.038 21.1524 24.93 20.4444 24.714C19.7364 24.498 19.1484 24.192 18.6804 23.796L19.6164 21.78C20.5404 22.404 21.5664 22.716 22.6944 22.716C23.5464 22.716 24.2064 22.53 24.6744 22.158C25.1424 21.786 25.3764 21.252 25.3764 20.556C25.3764 19.944 25.1964 19.476 24.8364 19.152C24.4884 18.828 24.0084 18.666 23.3964 18.666C22.9404 18.666 22.5204 18.744 22.1364 18.9C21.7524 19.044 21.3744 19.266 21.0024 19.566L19.3284 18.648V12.15H27.3744Z" }), ); } function B(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M2 0C0.895431 0 0 0.895431 0 2V34C0 35.1046 0.895431 36 2 36H34C35.1046 36 36 35.1046 36 34V2C36 0.895431 35.1046 0 34 0H2ZM14.5176 24.75H17.4516L14.4816 19.98C15.2496 19.644 15.8436 19.152 16.2636 18.504C16.6956 17.856 16.9116 17.046 16.9116 16.074C16.9116 14.838 16.5036 13.878 15.6876 13.194C14.8716 12.498 13.5996 12.15 11.8716 12.15H7.15564V24.75H9.80164V20.502H11.6736H11.9796L14.5176 24.75ZM9.80164 18.234V14.4H11.7096C12.5376 14.4 13.1376 14.556 13.5096 14.868C13.8936 15.168 14.0856 15.624 14.0856 16.236C14.0856 16.86 13.8876 17.352 13.4916 17.712C13.1076 18.06 12.5676 18.234 11.8716 18.234H9.80164ZM27.6539 19.854V12.15H25.2059L19.0319 20.16V21.888H24.9719V24.75H27.6539V21.888H29.4719V19.854H27.6539ZM21.6059 19.854L25.0799 15.3V19.854H21.6059Z" })) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M0 2C0 0.895431 0.895431 0 2 0H34C35.1046 0 36 0.895431 36 2V34C36 35.1046 35.1046 36 34 36H2C0.895431 36 0 35.1046 0 34V2Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M17.4516 24.75H14.5176L11.9796 20.502H11.6736H9.80164V24.75H7.15564V12.15H11.8716C13.5996 12.15 14.8716 12.498 15.6876 13.194C16.5036 13.878 16.9116 14.838 16.9116 16.074C16.9116 17.046 16.6956 17.856 16.2636 18.504C15.8436 19.152 15.2496 19.644 14.4816 19.98L17.4516 24.75ZM9.80164 14.4V18.234H11.8716C12.5676 18.234 13.1076 18.06 13.4916 17.712C13.8876 17.352 14.0856 16.86 14.0856 16.236C14.0856 15.624 13.8936 15.168 13.5096 14.868C13.1376 14.556 12.5376 14.4 11.7096 14.4H9.80164Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M27.6539 12.15V19.854H29.4719V21.888H27.6539V24.75H24.9719V21.888H19.0319V20.16L25.2059 12.15H27.6539ZM25.0799 15.3L21.6059 19.854H25.0799V15.3Z" }), ); } function x(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M2 0C0.895431 0 0 0.895431 0 2V34C0 35.1046 0.895431 36 2 36H34C35.1046 36 36 35.1046 36 34V2C36 0.895431 35.1046 0 34 0H2ZM14.6934 24.75H17.6274L14.6574 19.98C15.4254 19.644 16.0194 19.152 16.4394 18.504C16.8714 17.856 17.0874 17.046 17.0874 16.074C17.0874 14.838 16.6794 13.878 15.8634 13.194C15.0474 12.498 13.7754 12.15 12.0474 12.15H7.33142V24.75H9.97742V20.502H11.8494H12.1554L14.6934 24.75ZM9.97742 18.234V14.4H11.8854C12.7134 14.4 13.3134 14.556 13.6854 14.868C14.0694 15.168 14.2614 15.624 14.2614 16.236C14.2614 16.86 14.0634 17.352 13.6674 17.712C13.2834 18.06 12.7434 18.234 12.0474 18.234H9.97742ZM28.2797 14.4V12.15H20.2337V18.648L21.9077 19.566C22.2797 19.266 22.6577 19.044 23.0417 18.9C23.4257 18.744 23.8457 18.666 24.3017 18.666C24.9137 18.666 25.3937 18.828 25.7417 19.152C26.1017 19.476 26.2817 19.944 26.2817 20.556C26.2817 21.252 26.0477 21.786 25.5797 22.158C25.1117 22.53 24.4517 22.716 23.5997 22.716C22.4717 22.716 21.4457 22.404 20.5217 21.78L19.5857 23.796C20.0537 24.192 20.6417 24.498 21.3497 24.714C22.0577 24.93 22.8197 25.038 23.6357 25.038C24.7397 25.038 25.6937 24.852 26.4977 24.48C27.3137 24.096 27.9317 23.562 28.3517 22.878C28.7837 22.194 28.9997 21.396 28.9997 20.484C28.9997 19.26 28.6577 18.33 27.9737 17.694C27.3017 17.046 26.4017 16.722 25.2737 16.722C24.8297 16.722 24.3857 16.776 23.9417 16.884C23.5097 16.98 23.1197 17.136 22.7717 17.352V14.4H28.2797Z", }), ) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M0 2C0 0.895431 0.895431 0 2 0H34C35.1046 0 36 0.895431 36 2V34C36 35.1046 35.1046 36 34 36H2C0.895431 36 0 35.1046 0 34V2Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M17.6274 24.75H14.6934L12.1554 20.502H11.8494H9.97742V24.75H7.33142V12.15H12.0474C13.7754 12.15 15.0474 12.498 15.8634 13.194C16.6794 13.878 17.0874 14.838 17.0874 16.074C17.0874 17.046 16.8714 17.856 16.4394 18.504C16.0194 19.152 15.4254 19.644 14.6574 19.98L17.6274 24.75ZM9.97742 14.4V18.234H12.0474C12.7434 18.234 13.2834 18.06 13.6674 17.712C14.0634 17.352 14.2614 16.86 14.2614 16.236C14.2614 15.624 14.0694 15.168 13.6854 14.868C13.3134 14.556 12.7134 14.4 11.8854 14.4H9.97742Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M28.2797 12.15V14.4H22.7717V17.352C23.1197 17.136 23.5097 16.98 23.9417 16.884C24.3857 16.776 24.8297 16.722 25.2737 16.722C26.4017 16.722 27.3017 17.046 27.9737 17.694C28.6577 18.33 28.9997 19.26 28.9997 20.484C28.9997 21.396 28.7837 22.194 28.3517 22.878C27.9317 23.562 27.3137 24.096 26.4977 24.48C25.6937 24.852 24.7397 25.038 23.6357 25.038C22.8197 25.038 22.0577 24.93 21.3497 24.714C20.6417 24.498 20.0537 24.192 19.5857 23.796L20.5217 21.78C21.4457 22.404 22.4717 22.716 23.5997 22.716C24.4517 22.716 25.1117 22.53 25.5797 22.158C26.0477 21.786 26.2817 21.252 26.2817 20.556C26.2817 19.944 26.1017 19.476 25.7417 19.152C25.3937 18.828 24.9137 18.666 24.3017 18.666C23.8457 18.666 23.4257 18.744 23.0417 18.9C22.6577 19.044 22.2797 19.266 21.9077 19.566L20.2337 18.648V12.15H28.2797Z" }), ); } function N(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M5.73583 3C3.6326 3 1.88863 4.6288 1.74515 6.72713L0.292161 27.9771C0.134133 30.2883 1.96629 32.25 4.28284 32.25H31.7172C34.0337 32.25 35.8659 30.2883 35.7078 27.9771L34.2548 6.72713C34.1114 4.6288 32.3674 3 30.2642 3H5.73583ZM14.8236 24.0625H23.2836V21.6865H17.4696V11.4625H14.8236V24.0625Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M1.74515 6.72713C1.88863 4.6288 3.6326 3 5.73584 3H30.2642C32.3674 3 34.1114 4.6288 34.2548 6.72713L35.7078 27.9771C35.8659 30.2883 34.0337 32.25 31.7172 32.25H4.28284C1.96629 32.25 0.134134 30.2883 0.292162 27.9771L1.74515 6.72713Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M23.2836 24.0625H14.8236V11.4625H17.4696V21.6865H23.2836V24.0625Z" })); } function P(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M6.6282 8C4.52356 8 2.77893 9.6309 2.63727 11.7308L1.28806 31.7308C1.13224 34.0406 2.96389 36 5.27899 36H30.7211C33.0362 36 34.8679 34.0406 34.7121 31.7308L33.3629 11.7308C33.2212 9.63091 31.4766 8 29.3719 8H6.6282ZM14.8237 28.0625H23.2837V25.6865H17.4697V15.4625H14.8237V28.0625Z" }), a.createElement("path", { fill: "currentColor", d: "M24 0H12L18 6L24 0Z" })) : a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M2.63721 11.7308C2.77887 9.6309 4.5235 8 6.62814 8H29.3719C31.4765 8 33.2211 9.63091 33.3628 11.7308L34.712 31.7308C34.8678 34.0406 33.0362 36 30.7211 36H5.27893C2.96382 36 1.13218 34.0406 1.288 31.7308L2.63721 11.7308Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M23.2836 28.0625H14.8236V15.4625H17.4696V25.6865H23.2836V28.0625Z" }), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M24 0H12L18 6L24 0Z" })); } function U(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M5.7359 3C3.63266 3 1.88869 4.6288 1.74521 6.72713L0.292222 27.9771C0.134194 30.2883 1.96635 32.25 4.2829 32.25H31.7172C34.0338 32.25 35.8659 30.2883 35.7079 27.9771L34.2549 6.72713C34.1114 4.6288 32.3675 3 30.2642 3H5.7359ZM20.7179 24.0625H23.6519L20.6819 19.2925C21.4499 18.9565 22.0439 18.4645 22.4639 17.8165C22.8959 17.1685 23.1119 16.3585 23.1119 15.3865C23.1119 14.1505 22.7039 13.1905 21.8879 12.5065C21.0719 11.8105 19.7999 11.4625 18.0719 11.4625H13.3559V24.0625H16.0019V19.8145H17.8739H18.1799L20.7179 24.0625ZM16.0019 17.5465V13.7125H17.9099C18.7379 13.7125 19.3379 13.8685 19.7099 14.1805C20.0939 14.4805 20.2859 14.9365 20.2859 15.5485C20.2859 16.1725 20.0879 16.6645 19.6919 17.0245C19.3079 17.3725 18.7679 17.5465 18.0719 17.5465H16.0019Z" })) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M1.74515 6.72713C1.88863 4.6288 3.6326 3 5.73584 3H30.2642C32.3674 3 34.1114 4.6288 34.2548 6.72713L35.7078 27.9771C35.8659 30.2883 34.0337 32.25 31.7172 32.25H4.28284C1.96629 32.25 0.134134 30.2883 0.292162 27.9771L1.74515 6.72713Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M23.6518 24.0625H20.7178L18.1798 19.8145H17.8738H16.0018V24.0625H13.3558V11.4625H18.0718C19.7998 11.4625 21.0718 11.8105 21.8878 12.5065C22.7038 13.1905 23.1118 14.1505 23.1118 15.3865C23.1118 16.3585 22.8958 17.1685 22.4638 17.8165C22.0438 18.4645 21.4498 18.9565 20.6818 19.2925L23.6518 24.0625ZM16.0018 13.7125V17.5465H18.0718C18.7678 17.5465 19.3078 17.3725 19.6918 17.0245C20.0878 16.6645 20.2858 16.1725 20.2858 15.5485C20.2858 14.9365 20.0938 14.4805 19.7098 14.1805C19.3378 13.8685 18.7378 13.7125 17.9098 13.7125H16.0018Z" }), ); } function V(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M6.6282 8C4.52356 8 2.77893 9.6309 2.63727 11.7308L1.28806 31.7308C1.13224 34.0406 2.96389 36 5.27899 36H30.7211C33.0362 36 34.8679 34.0406 34.7121 31.7308L33.3629 11.7308C33.2212 9.63091 31.4766 8 29.3719 8H6.6282ZM20.7179 28.0625H23.6519L20.6819 23.2925C21.4499 22.9565 22.0439 22.4645 22.4639 21.8165C22.8959 21.1685 23.1119 20.3585 23.1119 19.3865C23.1119 18.1505 22.7039 17.1905 21.8879 16.5065C21.0719 15.8105 19.7999 15.4625 18.0719 15.4625H13.3559V28.0625H16.0019V23.8145H17.8739H18.1799L20.7179 28.0625ZM16.0019 21.5465V17.7125H17.9099C18.7379 17.7125 19.3379 17.8685 19.7099 18.1805C20.0939 18.4805 20.2859 18.9365 20.2859 19.5485C20.2859 20.1725 20.0879 20.6645 19.6919 21.0245C19.3079 21.3725 18.7679 21.5465 18.0719 21.5465H16.0019Z" }), a.createElement("path", { fill: "currentColor", d: "M24 0H12L18 6L24 0Z" }), ) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M2.63721 11.7308C2.77887 9.6309 4.5235 8 6.62814 8H29.3719C31.4765 8 33.2211 9.63091 33.3628 11.7308L34.712 31.7308C34.8678 34.0406 33.0362 36 30.7211 36H5.27893C2.96382 36 1.13218 34.0406 1.288 31.7308L2.63721 11.7308Z" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M23.6518 28.0625H20.7178L18.1798 23.8145H17.8738H16.0018V28.0625H13.3558V15.4625H18.0718C19.7998 15.4625 21.0718 15.8105 21.8878 16.5065C22.7038 17.1905 23.1118 18.1505 23.1118 19.3865C23.1118 20.3585 22.8958 21.1685 22.4638 21.8165C22.0438 22.4645 21.4498 22.9565 20.6818 23.2925L23.6518 28.0625ZM16.0018 17.7125V21.5465H18.0718C18.7678 21.5465 19.3078 21.3725 19.6918 21.0245C20.0878 20.6645 20.2858 20.1725 20.2858 19.5485C20.2858 18.9365 20.0938 18.4805 19.7098 18.1805C19.3378 17.8685 18.7378 17.7125 17.9098 17.7125H16.0018Z" }), a.createElement("path", { className: c().Background, fill: "currentColor", d: "M24 0H12L18 6L24 0Z" }), ); } function H(e) { var { bIsKnockout: t } = e, n = (0, r._T)(e, ["bIsKnockout"]); return t ? a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", fill: "currentColor", d: "M18 36C27.9411 36 36 27.9411 36 18C36 8.05887 27.9411 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36ZM20.4999 10.8201C19.7519 10.4974 18.8719 10.3361 17.8599 10.3361C16.9799 10.3361 16.1219 10.4681 15.2859 10.7321C14.4499 10.9961 13.7166 11.3407 13.0859 11.7661L14.0759 13.9881C15.0586 13.2547 16.1073 12.8881 17.2219 12.8881C17.9699 12.8881 18.5493 13.0494 18.9599 13.3721C19.3853 13.6801 19.5979 14.1201 19.5979 14.6921C19.5979 15.1027 19.4953 15.4474 19.2899 15.7261C19.0846 16.0047 18.7693 16.3201 18.3439 16.6721C17.8893 17.0681 17.5153 17.4347 17.2219 17.7721C16.9286 18.1094 16.6793 18.5641 16.4739 19.1361C16.2686 19.7081 16.1659 20.4047 16.1659 21.2261H18.8499C18.8499 20.6541 18.9453 20.1554 19.1359 19.7301C19.3266 19.2901 19.5539 18.9234 19.8179 18.6301C20.0966 18.3221 20.4633 17.9701 20.9179 17.5741C21.3579 17.1781 21.7026 16.8407 21.9519 16.5621C22.2159 16.2834 22.4359 15.9461 22.6119 15.5501C22.7879 15.1541 22.8759 14.6994 22.8759 14.1861C22.8759 13.4234 22.6706 12.7561 22.2599 12.1841C21.8493 11.5974 21.2626 11.1427 20.4999 10.8201ZM18.7839 23.2721C18.4759 22.9494 18.0653 22.7881 17.5519 22.7881C17.0386 22.7881 16.6279 22.9494 16.3199 23.2721C16.0119 23.5801 15.8579 23.9907 15.8579 24.5041C15.8579 25.0467 16.0119 25.4794 16.3199 25.8021C16.6279 26.1101 17.0386 26.2641 17.5519 26.2641C18.0653 26.2641 18.4759 26.1101 18.7839 25.8021C19.0919 25.4794 19.2459 25.0467 19.2459 24.5041C19.2459 23.9907 19.0919 23.5801 18.7839 23.2721Z", }), ) : a.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), a.createElement("circle", { className: c().Background, fill: "currentColor", cx: "18", cy: "18", r: "18" }), a.createElement("path", { className: c().Foreground, fill: "currentColor", d: "M17.8599 10.3361C18.8719 10.3361 19.7519 10.4974 20.4999 10.8201C21.2626 11.1427 21.8493 11.5974 22.2599 12.1841C22.6706 12.7561 22.8759 13.4234 22.8759 14.1861C22.8759 14.6994 22.7879 15.1541 22.6119 15.5501C22.4359 15.9461 22.2159 16.2834 21.9519 16.5621C21.7026 16.8407 21.3579 17.1781 20.9179 17.5741C20.4633 17.9701 20.0966 18.3221 19.8179 18.6301C19.5539 18.9234 19.3266 19.2901 19.1359 19.7301C18.9453 20.1554 18.8499 20.6541 18.8499 21.2261H16.1659C16.1659 20.4047 16.2686 19.7081 16.4739 19.1361C16.6793 18.5641 16.9286 18.1094 17.2219 17.7721C17.5153 17.4347 17.8893 17.0681 18.3439 16.6721C18.7693 16.3201 19.0846 16.0047 19.2899 15.7261C19.4953 15.4474 19.5979 15.1027 19.5979 14.6921C19.5979 14.1201 19.3853 13.6801 18.9599 13.3721C18.5493 13.0494 17.9699 12.8881 17.2219 12.8881C16.1073 12.8881 15.0586 13.2547 14.0759 13.9881L13.0859 11.7661C13.7166 11.3407 14.4499 10.9961 15.2859 10.7321C16.1219 10.4681 16.9799 10.3361 17.8599 10.3361ZM17.5519 22.7881C18.0653 22.7881 18.4759 22.9494 18.7839 23.2721C19.0919 23.5801 19.2459 23.9907 19.2459 24.5041C19.2459 25.0467 19.0919 25.4794 18.7839 25.8021C18.4759 26.1101 18.0653 26.2641 17.5519 26.2641C17.0386 26.2641 16.6279 26.1101 16.3199 25.8021C16.0119 25.4794 15.8579 25.0467 15.8579 24.5041C15.8579 23.9907 16.0119 23.5801 16.3199 23.2721C16.6279 22.9494 17.0386 22.7881 17.5519 22.7881Z", }), ); } !(function (e) { (e[(e.Knockout = 0)] = "Knockout"), (e[(e.Light = 1)] = "Light"), (e[(e.Dark = 2)] = "Dark"); })(i || (i = {})), (function (e) { (e[(e.Small = 0)] = "Small"), (e[(e.Medium = 1)] = "Medium"), (e[(e.Large = 2)] = "Large"); })(o || (o = {})); }, 41243: (e, t, n) => { "use strict"; n.d(t, { Mr: () => s, tk: () => l }); var i = n(27378), o = n(16518), r = n(83666), a = n(10553); function s() { return i.createElement(o.MrB, null); } function l() { return (0, a.id)() ? i.createElement(r.tkI, null) : i.createElement(o.j5H, null); } }, 83666: (e, t, n) => { "use strict"; n.d(t, { $jN: () => E, $nC: () => S, A6J: () => u, CtA: () => d, Hz5: () => R, N1d: () => f, RCC: () => k, TKz: () => v, Tvf: () => M, X7U: () => c, dQJ: () => A, ij_: () => y, n5m: () => D, tkI: () => w, vVQ: () => b, x8P: () => I }); var i = n(85556), o = n(27378), r = n(96139), a = n.n(r), s = n(89051), l = n(87018); function c(e) { const { none: t, partial: n } = e, r = (0, i._T)(e, ["none", "partial"]); return t ? o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, r), o.createElement("path", { d: "M36 24.2C36 27.68 31 30 31 30L25 24H17.36L26.55 14.81C27.0058 14.9963 27.5066 15.0439 27.9893 14.9467C28.4721 14.8494 28.9154 14.6118 29.2636 14.2636C29.6118 13.9154 29.8494 13.4721 29.9466 12.9893C30.0438 12.5066 29.9963 12.0059 29.81 11.55L32.76 8.55002C33.39 10.79 36 20.12 36 24.2ZM33.56 3.56002L2.56 34.56L0.44 32.44L3.65 29.23C2.17 28.28 0 26.49 0 24.2C0 19.56 3.38 8.14002 3.38 8.14002C3.38 8.14002 7.5 4.00002 18 4.00002C21.2151 3.94797 24.4172 4.42085 27.48 5.40002L31.48 1.40002L33.56 3.56002ZM6 16H9V19H12V16H15V13H12V10H9V13H6V16Z", fill: "currentColor" })) : n ? o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "Layer_1", x: "0px", y: "0px", viewBox: "0 0 36 36" }, r), o.createElement("path", { fill: "currentColor", opacity: "0.5", d: "M12.9,6.2c-0.2,0-0.4-0.1-0.5-0.2c-0.2-0.2-0.5-0.4-1.2-0.4c-1.1,0-4.5,1.1-5.1,1.7S5.6,8.4,5.6,8.4v0.1 c-0.4,0.3-0.8,0.7-1.1,1C3.4,10.7,0,20.2,0,25.3s3.4,5.6,3.4,5.6c0.9,0,2.3-1.8,3.7-3.5c1.2-1.5,2.3-3,3.1-3.2 c0.8-0.3,4.4-0.4,7.9-0.4V6.2H12.9z M8.4,14.6c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2s2.2,1,2.2,2.2S9.7,14.6,8.4,14.6z M15.8,18.8 c0,0.3-0.3,0.6-0.6,0.6h-0.8v0.8c0,0.3-0.3,0.6-0.6,0.6h-1.1c-0.3,0-0.6-0.3-0.6-0.6v-0.8h-0.8c-0.3,0-0.6-0.3-0.6-0.6v-1.1 c0-0.3,0.3-0.6,0.6-0.6h0.8v-0.8c0-0.3,0.3-0.6,0.6-0.6h1.1c0.3,0,0.6,0.3,0.6,0.6v0.8h0.8c0.3,0,0.6,0.3,0.6,0.6V18.8z" }), o.createElement("path", { fill: "currentColor", d: "M31.5,9.6c-0.3-0.3-0.7-0.6-1.1-1V8.4c0,0,0-0.6-0.6-1.1s-3.9-1.7-5.1-1.7c-0.7,0-0.9,0.2-1.2,0.4c-0.2,0.1-0.3,0.2-0.5,0.2 H18v17.6c3.5,0,7,0.1,7.9,0.4c0.8,0.3,1.9,1.7,3.1,3.2c1.4,1.7,2.8,3.5,3.7,3.5c0,0,3.4-0.6,3.4-5.6S32.6,10.7,31.5,9.6z M27.6,8.7 c0.8,0,1.4,0.6,1.4,1.4s-0.6,1.4-1.4,1.4s-1.4-0.6-1.4-1.4S26.8,8.7,27.6,8.7z M23.1,20.2c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2 s2.2,1,2.2,2.2S24.3,20.2,23.1,20.2z M25,14.1c-0.8,0-1.4-0.6-1.4-1.4c0-0.8,0.6-1.4,1.4-1.4c0.8,0,1.4,0.6,1.4,1.4 C26.4,13.4,25.8,14.1,25,14.1z M27.6,16.6c-0.8,0-1.4-0.6-1.4-1.4s0.6-1.4,1.4-1.4s1.4,0.6,1.4,1.4S28.3,16.6,27.6,16.6z M30.1,14.1 c-0.8,0-1.4-0.6-1.4-1.4c0-0.8,0.6-1.4,1.4-1.4c0.8,0,1.4,0.6,1.4,1.4C31.5,13.4,30.9,14.1,30.1,14.1z" }), ) : o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "Layer_1", x: "0px", y: "0px", viewBox: "0 0 36 36" }, r), o.createElement("path", { fill: "currentColor", d: "M31.5,9.6c-0.3-0.3-0.7-0.6-1.1-1V8.4c0,0,0-0.6-0.6-1.1s-3.9-1.7-5.1-1.7c-0.7,0-0.9,0.2-1.2,0.4c-0.2,0.1-0.3,0.2-0.5,0.2 H12.9c-0.2,0-0.4-0.1-0.5-0.2c-0.2-0.2-0.5-0.4-1.2-0.4c-1.1,0-4.5,1.1-5.1,1.7S5.6,8.4,5.6,8.4v0.1c-0.4,0.3-0.8,0.7-1.1,1 C3.4,10.7,0,20.2,0,25.3s3.4,5.6,3.4,5.6c0.9,0,2.3-1.8,3.7-3.5c1.2-1.5,2.3-3,3.1-3.2c1.7-0.6,14.1-0.6,15.8,0 c0.8,0.3,1.9,1.7,3.1,3.2c1.4,1.7,2.8,3.5,3.7,3.5c0,0,3.4-0.6,3.4-5.6S32.6,10.7,31.5,9.6z M8.4,14.6c-1.2,0-2.2-1-2.2-2.2 s1-2.2,2.2-2.2s2.2,1,2.2,2.2S9.7,14.6,8.4,14.6z M15.8,18.8c0,0.3-0.3,0.6-0.6,0.6h-0.8v0.8c0,0.3-0.3,0.6-0.6,0.6h-1.1 c-0.3,0-0.6-0.3-0.6-0.6v-0.8h-0.8c-0.3,0-0.6-0.3-0.6-0.6v-1.1c0-0.3,0.3-0.6,0.6-0.6h0.8v-0.8c0-0.3,0.3-0.6,0.6-0.6h1.1 c0.3,0,0.6,0.3,0.6,0.6v0.8h0.8c0.3,0,0.6,0.3,0.6,0.6V18.8z M27.6,8.7c0.8,0,1.4,0.6,1.4,1.4s-0.6,1.4-1.4,1.4s-1.4-0.6-1.4-1.4 S26.8,8.7,27.6,8.7z M23.1,20.2c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2s2.2,1,2.2,2.2S24.3,20.2,23.1,20.2z M25,14.1 c-0.8,0-1.4-0.6-1.4-1.4c0-0.8,0.6-1.4,1.4-1.4s1.4,0.6,1.4,1.4C26.4,13.4,25.8,14.1,25,14.1z M27.6,16.6c-0.8,0-1.4-0.6-1.4-1.4 s0.6-1.4,1.4-1.4s1.4,0.6,1.4,1.4S28.3,16.6,27.6,16.6z M30.1,14.1c-0.8,0-1.4-0.6-1.4-1.4c0-0.8,0.6-1.4,1.4-1.4s1.4,0.6,1.4,1.4 C31.5,13.4,30.9,14.1,30.1,14.1z", }), ); } function m(e) { const { type: t, partial: n } = e, r = (0, i._T)(e, ["type", "partial"]), [a, l] = (0, s.y)(); return "steam" == t ? o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, r), o.createElement( "g", { clipPath: l }, o.createElement("path", { fill: "currentColor", d: "M5.625 31.0429C0.0351562 31.0429 0.0351562 24.75 0.0351562 24.75C0.0351562 23.2708 0.691018 18.9574 1.67867 14.9078C2.09604 21.229 4.23237 26.4107 7.46967 30.1342C6.94663 30.6907 6.34611 31.0429 5.625 31.0429Z" }), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M8.16687 29.2194C4.59849 25.0137 2.43205 18.8213 2.76162 11.0707C3.47054 8.93505 4.26138 7.27235 5.0625 6.76752C8.1706 5.06632 27.6869 4.8903 31.0078 6.76752C31.7909 7.26099 32.5642 8.86083 33.2607 10.9273C33.6225 18.7277 31.4618 24.9603 27.8856 29.1914C27.4035 28.4325 26.984 27.5272 26.5768 26.6483C25.7189 24.7967 24.9154 23.0625 23.6953 23.0625H12.375C11.1549 23.0625 10.3514 24.7967 9.49349 26.6483C9.08125 27.538 8.65647 28.4548 8.16687 29.2194ZM18 12.9375C18.7766 12.9375 19.4062 12.3079 19.4062 11.5312C19.4062 10.7546 18.7766 10.125 18 10.125C17.2234 10.125 16.5938 10.7546 16.5938 11.5312C16.5938 12.3079 17.2234 12.9375 18 12.9375ZM22.5 15.75C22.5 16.3713 21.9963 16.875 21.375 16.875C20.7537 16.875 20.25 16.3713 20.25 15.75C20.25 15.1286 20.7537 14.625 21.375 14.625C21.9963 14.625 22.5 15.1286 22.5 15.75ZM15.75 18.8437C15.75 19.931 14.8686 20.8125 13.7812 20.8125C12.6939 20.8125 11.8125 19.931 11.8125 18.8437C11.8125 17.7564 12.6939 16.875 13.7812 16.875C14.8686 16.875 15.75 17.7564 15.75 18.8437ZM24.75 18C24.75 18.6213 24.2463 19.125 23.625 19.125C23.0037 19.125 22.5 18.6213 22.5 18C22.5 17.3786 23.0037 16.875 23.625 16.875C24.2463 16.875 24.75 17.3786 24.75 18ZM21.375 21.375C21.9963 21.375 22.5 20.8713 22.5 20.25C22.5 19.6286 21.9963 19.125 21.375 19.125C20.7537 19.125 20.25 19.6286 20.25 20.25C20.25 20.8713 20.7537 21.375 21.375 21.375ZM20.25 18C20.25 18.6213 19.7463 19.125 19.125 19.125C18.5037 19.125 18 18.6213 18 18C18 17.3786 18.5037 16.875 19.125 16.875C19.7463 16.875 20.25 17.3786 20.25 18ZM13.5 12.375C13.5 14.8602 11.4853 16.875 9 16.875C6.51472 16.875 4.5 14.8602 4.5 12.375C4.5 9.88969 6.51472 7.87497 9 7.87497C11.4853 7.87497 13.5 9.88969 13.5 12.375ZM27 16.875C29.4853 16.875 31.5 14.8602 31.5 12.375C31.5 9.88969 29.4853 7.87497 27 7.87497C24.5147 7.87497 22.5 9.88969 22.5 12.375C22.5 14.8602 24.5147 16.875 27 16.875Z", }), o.createElement("path", { fill: "currentColor", d: "M28.5791 30.1112C29.1072 30.6809 29.7143 31.0429 30.4453 31.0429C36.0352 31.0429 36.0352 24.75 36.0352 24.75C36.0352 23.2544 35.3647 18.8614 34.3587 14.7732C33.9637 21.1424 31.8281 26.3629 28.5791 30.1112Z" }), ), o.createElement("defs", null, o.createElement("clipPath", { id: a }, o.createElement("rect", { fill: "currentColor", width: "36", height: "36" }))), ) : "xbox" == t ? n ? o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "Layer_1", x: "0px", y: "0px", viewBox: "0 0 36 36" }, r), o.createElement("path", { fill: "currentColor", opacity: "0.5", d: "M12.9,6.2c-0.2,0-0.4-0.1-0.5-0.2c-0.2-0.2-0.5-0.4-1.2-0.4c-1.1,0-4.5,1.1-5.1,1.7S5.6,8.4,5.6,8.4v0.1 c-0.4,0.3-0.8,0.7-1.1,1C3.4,10.7,0,20.2,0,25.3s3.4,5.6,3.4,5.6c0.9,0,2.3-1.8,3.7-3.5c1.2-1.5,2.3-3,3.1-3.2 c0.8-0.3,4.4-0.4,7.9-0.4V6.2H12.9z M8.4,14.6c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2s2.2,1,2.2,2.2S9.7,14.6,8.4,14.6z M15.8,18.8 c0,0.3-0.3,0.6-0.6,0.6h-0.8v0.8c0,0.3-0.3,0.6-0.6,0.6h-1.1c-0.3,0-0.6-0.3-0.6-0.6v-0.8h-0.8c-0.3,0-0.6-0.3-0.6-0.6v-1.1 c0-0.3,0.3-0.6,0.6-0.6h0.8v-0.8c0-0.3,0.3-0.6,0.6-0.6h1.1c0.3,0,0.6,0.3,0.6,0.6v0.8h0.8c0.3,0,0.6,0.3,0.6,0.6V18.8z" }), o.createElement("path", { fill: "currentColor", d: "M31.5,9.6c-0.3-0.3-0.7-0.6-1.1-1V8.4c0,0,0-0.6-0.6-1.1s-3.9-1.7-5.1-1.7c-0.7,0-0.9,0.2-1.2,0.4c-0.2,0.1-0.3,0.2-0.5,0.2 H18v17.6c3.5,0,7,0.1,7.9,0.4c0.8,0.3,1.9,1.7,3.1,3.2c1.4,1.7,2.8,3.5,3.7,3.5c0,0,3.4-0.6,3.4-5.6S32.6,10.7,31.5,9.6z M27.6,8.7 c0.8,0,1.4,0.6,1.4,1.4s-0.6,1.4-1.4,1.4s-1.4-0.6-1.4-1.4S26.8,8.7,27.6,8.7z M23.1,20.2c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2 s2.2,1,2.2,2.2S24.3,20.2,23.1,20.2z M25,14.1c-0.8,0-1.4-0.6-1.4-1.4c0-0.8,0.6-1.4,1.4-1.4c0.8,0,1.4,0.6,1.4,1.4 C26.4,13.4,25.8,14.1,25,14.1z M27.6,16.6c-0.8,0-1.4-0.6-1.4-1.4s0.6-1.4,1.4-1.4s1.4,0.6,1.4,1.4S28.3,16.6,27.6,16.6z M30.1,14.1 c-0.8,0-1.4-0.6-1.4-1.4c0-0.8,0.6-1.4,1.4-1.4c0.8,0,1.4,0.6,1.4,1.4C31.5,13.4,30.9,14.1,30.1,14.1z" }), ) : o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, r), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 5.625C11.909 5.625 12.182 5.81802 12.4081 5.97792C12.568 6.09099 12.7045 6.1875 12.9375 6.1875H23.0625C23.2955 6.1875 23.432 6.09099 23.5919 5.97792C23.818 5.81802 24.091 5.625 24.75 5.625C25.875 5.625 29.25 6.75 29.8125 7.3125C30.375 7.875 30.375 8.4375 30.375 8.4375V8.5803C30.8163 8.91923 31.1986 9.26106 31.5 9.5625C32.625 10.6875 36 20.25 36 25.3125C36 30.375 32.625 30.9375 32.625 30.9375C31.7178 30.9375 30.323 29.1494 28.9649 27.4083C27.7966 25.9106 26.6553 24.4476 25.875 24.1875C24.1875 23.625 11.8125 23.625 10.125 24.1875C9.34465 24.4476 8.20344 25.9106 7.03512 27.4083C5.67696 29.1494 4.28215 30.9375 3.375 30.9375C3.375 30.9375 0 30.375 0 25.3125C0 20.25 3.375 10.6875 4.5 9.5625C4.80144 9.26106 5.18366 8.91923 5.625 8.5803V8.4375C5.625 8.4375 5.625 7.875 6.1875 7.3125C6.75 6.75 10.125 5.625 11.25 5.625ZM27.5625 8.71875C28.3392 8.71875 28.9688 9.34835 28.9688 10.125C28.9688 10.9017 28.3392 11.5312 27.5625 11.5312C26.7858 11.5312 26.1562 10.9017 26.1562 10.125C26.1562 9.34835 26.7858 8.71875 27.5625 8.71875ZM8.4375 14.625C9.68014 14.625 10.6875 13.6176 10.6875 12.375C10.6875 11.1324 9.68014 10.125 8.4375 10.125C7.19486 10.125 6.1875 11.1324 6.1875 12.375C6.1875 13.6176 7.19486 14.625 8.4375 14.625ZM23.0625 20.25C24.3051 20.25 25.3125 19.2426 25.3125 18C25.3125 16.7574 24.3051 15.75 23.0625 15.75C21.8199 15.75 20.8125 16.7574 20.8125 18C20.8125 19.2426 21.8199 20.25 23.0625 20.25ZM12.0938 17.1562V16.3125C12.0938 16.0018 12.3456 15.75 12.6562 15.75H13.7812C14.0919 15.75 14.3438 16.0018 14.3438 16.3125V17.1562H15.1875C15.4982 17.1562 15.75 17.4081 15.75 17.7188V18.8438C15.75 19.1544 15.4982 19.4062 15.1875 19.4062H14.3438V20.25C14.3438 20.5607 14.0919 20.8125 13.7812 20.8125H12.6562C12.3456 20.8125 12.0938 20.5607 12.0938 20.25V19.4062H11.25C10.9393 19.4062 10.6875 19.1544 10.6875 18.8438V17.7188C10.6875 17.4081 10.9393 17.1562 11.25 17.1562H12.0938ZM25.0312 14.0625C25.8079 14.0625 26.4375 13.4329 26.4375 12.6562C26.4375 11.8796 25.8079 11.25 25.0312 11.25C24.2546 11.25 23.625 11.8796 23.625 12.6562C23.625 13.4329 24.2546 14.0625 25.0312 14.0625ZM31.5 12.6562C31.5 13.4329 30.8704 14.0625 30.0938 14.0625C29.3171 14.0625 28.6875 13.4329 28.6875 12.6562C28.6875 11.8796 29.3171 11.25 30.0938 11.25C30.8704 11.25 31.5 11.8796 31.5 12.6562ZM28.9688 15.1875C28.9688 14.4108 28.3392 13.7812 27.5625 13.7812C26.7858 13.7812 26.1562 14.4108 26.1562 15.1875C26.1562 15.9642 26.7858 16.5938 27.5625 16.5938C28.3392 16.5938 28.9688 15.9642 28.9688 15.1875Z", }), ) : "ps4" == t ? n ? o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "Layer_1", x: "0px", y: "0px", viewBox: "0 0 36 36" }, r), o.createElement("path", { fill: "currentColor", opacity: "0.5", d: "M12.9,13.7c-0.6,0-1.1-0.5-1.1-1.1V8l-1.7,0L9.6,7.5c0,0-0.1,0-0.2,0C9.3,7.3,9.2,7.1,9,6.9 C6.7,6.5,5.2,7.1,4.7,7.4c-0.1,0-0.1,0.1-0.2,0.1C3.9,8,2.8,10.3,2.8,10.3C2.2,12,0.6,17,0,23.8c0,0-0.6,5.1,3.4,5.6 c3.5,0.4,4.6-4.1,5.2-6.5c0.2-0.7,0.3-1.2,0.4-1.4c0.3-0.3,0.7-0.5,0.9-0.5c0.6,0.7,1.5,1.1,2.5,1.1c1,0,1.9-0.4,2.5-1.1H18v-7.3 H12.9z M5.6,10.8c0-0.3,0.2-0.5,0.5-0.5h1.2c0.3,0,0.5,0.2,0.5,0.5v1c0,0.1-0.1,0.3-0.1,0.4l-0.6,0.6c-0.2,0.2-0.5,0.2-0.7,0 l-0.6-0.6c-0.1-0.1-0.1-0.2-0.1-0.4V10.8z M5.1,14.5h-1c-0.3,0-0.5-0.2-0.5-0.5v-1.2c0-0.3,0.2-0.5,0.5-0.5h1c0.1,0,0.3,0.1,0.4,0.1 L6.1,13c0.2,0.2,0.2,0.5,0,0.7l-0.6,0.6C5.4,14.4,5.3,14.5,5.1,14.5z M7.9,16c0,0.3-0.2,0.5-0.5,0.5H6.1c-0.3,0-0.5-0.2-0.5-0.5v-1 c0-0.1,0.1-0.3,0.1-0.4L6.4,14c0.2-0.2,0.5-0.2,0.7,0l0.6,0.6c0.1,0.1,0.1,0.2,0.1,0.4V16z M9.8,14c0,0.3-0.2,0.5-0.5,0.5h-1 c-0.1,0-0.3-0.1-0.4-0.1l-0.6-0.6c-0.2-0.2-0.2-0.5,0-0.7L8,12.4c0.1-0.1,0.2-0.1,0.4-0.1h1c0.3,0,0.5,0.2,0.5,0.5V14z M12.1,20.4 c-1.2,0-2.2-1-2.2-2.2c0-1.2,1-2.2,2.2-2.2c1.2,0,2.2,1,2.2,2.2C14.4,19.4,13.4,20.4,12.1,20.4z", }), o.createElement("path", { fill: "currentColor", d: "M36,23.8C35.4,17,33.8,12,33.2,10.3c0,0-1.1-2.2-1.7-2.8c0,0-0.1-0.1-0.2-0.1c-0.5-0.3-2-0.9-4.3-0.5 c-0.2,0.2-0.3,0.4-0.4,0.5c-0.1,0-0.2,0-0.2,0L25.9,8l-1.7,0v4.5c0,0.6-0.5,1.1-1.1,1.1H18V21h3.1c0.6,0.7,1.5,1.1,2.5,1.1 c1,0,1.9-0.4,2.5-1.1c0.2,0.1,0.6,0.2,0.9,0.5c0.1,0.1,0.3,0.7,0.4,1.4c0.6,2.4,1.7,6.9,5.2,6.5C36.6,28.8,36,23.8,36,23.8z M23.6,20.4c-1.2,0-2.2-1-2.2-2.2c0-1.2,1-2.2,2.2-2.2c1.2,0,2.2,1,2.2,2.2C25.9,19.4,24.9,20.4,23.6,20.4z M26.7,14.5 c-0.6,0-1.1-0.5-1.1-1.1c0-0.6,0.5-1.1,1.1-1.1c0.6,0,1.1,0.5,1.1,1.1C27.8,14,27.3,14.5,26.7,14.5z M29.2,17 c-0.6,0-1.1-0.5-1.1-1.1c0-0.6,0.5-1.1,1.1-1.1c0.6,0,1.1,0.5,1.1,1.1C30.4,16.5,29.9,17,29.2,17z M29.2,12c-0.6,0-1.1-0.5-1.1-1.1 c0-0.6,0.5-1.1,1.1-1.1c0.6,0,1.1,0.5,1.1,1.1C30.4,11.5,29.9,12,29.2,12z M31.8,14.5c-0.6,0-1.1-0.5-1.1-1.1c0-0.6,0.5-1.1,1.1-1.1 c0.6,0,1.1,0.5,1.1,1.1C32.9,14,32.4,14.5,31.8,14.5z" }), o.createElement("rect", { fill: "currentColor", opacity: "0.5", x: "12.9", y: "8", width: "5.1", height: "4.5" }), o.createElement("rect", { fill: "currentColor", x: "18", y: "8", width: "5.1", height: "4.5" }), ) : o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, r), o.createElement( "g", { clipPath: l }, o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M4.49995 7.47C3.93745 8.0325 2.81244 10.2825 2.81244 10.2825C2.24993 11.97 0.562445 17.0325 -5.43911e-05 23.7825C-5.43911e-05 23.7825 -0.562553 28.845 3.37495 29.4075C6.832 29.8396 7.9652 25.2921 8.55982 22.9059C8.73921 22.186 8.86958 21.6629 8.99995 21.5325C9.33789 21.1945 9.67584 21.0596 9.89181 21.0058C10.5086 21.6754 11.3928 22.095 12.3749 22.095C13.3745 22.095 14.2726 21.6605 14.8906 20.97H21.1093C21.7273 21.6605 22.6254 22.095 23.6249 22.095C24.6071 22.095 25.4913 21.6754 26.1081 21.0058C26.3241 21.0596 26.662 21.1945 27 21.5325C27.1303 21.6629 27.2607 22.186 27.4401 22.9059C28.0347 25.2921 29.1679 29.8396 32.625 29.4075C36.5625 28.845 36 23.7825 36 23.7825C35.4375 17.0325 33.75 11.97 33.1875 10.2825C33.1875 10.2825 32.0625 8.03251 31.4999 7.47C31.4575 7.42758 31.3927 7.39155 31.3091 7.36121C30.794 7.09333 29.2603 6.45543 26.9999 6.9075C26.8121 7.09539 26.6869 7.28328 26.6036 7.45021C26.4971 7.46255 26.4375 7.47001 26.4375 7.47001L25.875 8.0325L24.1874 8.03251V12.5325C24.1874 13.1538 23.6838 13.6575 23.0624 13.6575H12.9374C12.3161 13.6575 11.8124 13.1538 11.8124 12.5325V8.03251L10.1249 8.03249L9.56245 7.47C9.56245 7.47 9.50277 7.46254 9.39629 7.4502C9.31296 7.28328 9.18783 7.09539 8.99995 6.9075C6.73958 6.45543 5.20586 7.09333 4.6908 7.36121C4.60721 7.39155 4.54237 7.42759 4.49995 7.47ZM14.3999 18.1575C14.3999 19.4002 13.3926 20.4075 12.1499 20.4075C10.9073 20.4075 9.89995 19.4002 9.89995 18.1575C9.89995 16.9149 10.9073 15.9075 12.1499 15.9075C13.3926 15.9075 14.3999 16.9149 14.3999 18.1575ZM23.6249 20.4075C24.8676 20.4075 25.8749 19.4002 25.8749 18.1575C25.8749 16.9149 24.8676 15.9075 23.6249 15.9075C22.3823 15.9075 21.3749 16.9149 21.3749 18.1575C21.3749 19.4002 22.3823 20.4075 23.6249 20.4075ZM30.3749 10.845C30.3749 11.4663 29.8713 11.97 29.2499 11.97C28.6286 11.97 28.1249 11.4663 28.1249 10.845C28.1249 10.2237 28.6286 9.72001 29.2499 9.72001C29.8713 9.72001 30.3749 10.2237 30.3749 10.845ZM29.2499 17.0325C29.8713 17.0325 30.3749 16.5288 30.3749 15.9075C30.3749 15.2862 29.8713 14.7825 29.2499 14.7825C28.6286 14.7825 28.1249 15.2862 28.1249 15.9075C28.1249 16.5288 28.6286 17.0325 29.2499 17.0325ZM26.7187 12.2513C27.34 12.2513 27.8437 12.7549 27.8437 13.3763C27.8437 13.9976 27.34 14.5013 26.7187 14.5013C26.0974 14.5013 25.5937 13.9976 25.5937 13.3763C25.5937 12.7549 26.0974 12.2513 26.7187 12.2513ZM32.9062 13.3763C32.9062 12.7549 32.4025 12.2513 31.7812 12.2513C31.1599 12.2513 30.6562 12.7549 30.6562 13.3763C30.6562 13.9976 31.1599 14.5013 31.7812 14.5013C32.4025 14.5013 32.9062 13.9976 32.9062 13.3763ZM5.62495 10.7825C5.62495 10.5064 5.8488 10.2825 6.12495 10.2825H7.37495C7.65109 10.2825 7.87495 10.5064 7.87495 10.7825V11.7629C7.87495 11.8955 7.82227 12.0227 7.7285 12.1165L7.1035 12.7415C6.90824 12.9367 6.59166 12.9367 6.39639 12.7415L5.77139 12.1165C5.67763 12.0227 5.62495 11.8955 5.62495 11.7629V10.7825ZM6.12495 16.47C5.8488 16.47 5.62495 16.2462 5.62495 15.97V14.9896C5.62495 14.857 5.67763 14.7298 5.77139 14.6361L6.39639 14.0111C6.59166 13.8158 6.90824 13.8158 7.1035 14.0111L7.7285 14.6361C7.82227 14.7298 7.87495 14.857 7.87495 14.9896V15.97C7.87495 16.2462 7.65109 16.47 7.37495 16.47H6.12495ZM4.1562 14.5013C3.88006 14.5013 3.6562 14.2774 3.6562 14.0013V12.7513C3.6562 12.4751 3.88006 12.2513 4.1562 12.2513H5.13659C5.2692 12.2513 5.39638 12.3039 5.49014 12.3977L6.11514 13.0227C6.31041 13.218 6.31041 13.5346 6.11514 13.7298L5.49014 14.3548C5.39638 14.4486 5.2692 14.5013 5.13659 14.5013H4.1562ZM9.8437 14.0013C9.8437 14.2774 9.61984 14.5013 9.3437 14.5013H8.36331C8.2307 14.5013 8.10352 14.4486 8.00975 14.3548L7.38475 13.7298C7.18949 13.5346 7.18949 13.218 7.38475 13.0227L8.00975 12.3977C8.10352 12.3039 8.2307 12.2513 8.36331 12.2513H9.3437C9.61984 12.2513 9.8437 12.4751 9.8437 12.7513V14.0013Z", }), o.createElement("path", { fill: "currentColor", d: "M23.0624 8.03251L12.9374 8.03251V12.5325H23.0624V8.03251Z" }), ), o.createElement("defs", null, o.createElement("clipPath", { id: a }, o.createElement("rect", { fill: "currentColor", width: "36", height: "36" }))), ) : "ps5" == t ? n ? o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "Layer_1", x: "0px", y: "0px", viewBox: "0 0 36 36" }, r), o.createElement("path", { fill: "currentColor", opacity: "0.5", d: "M4.7,25.2c0.5-1.7,1.2-3.4,1.8-4.5c0.9-1.6,2.4-3.3,3.5-4.5c0.9-1,1.4-2.4,1.1-3.8l-0.7-3.8 c-0.1-0.4,0-0.7,0.3-0.9l0,0c-0.4,0-0.8,0.1-1.1,0.1V7.3c0,0,0-0.6-1.7-0.6c-1.3,0-2.6,0.7-3.1,1C4.6,7.8,4.5,8,4.5,8.2v0.6 C4.3,8.9,4.1,8.9,3.9,9C2.8,9.6,0,18,0,23.1c0,2.7,0.5,4.6,0.9,5.8c0.2,0.6,0.7,1.1,1.2,1.4l0.1,0c0.5,0.2,1-0.1,1.1-0.6 C3.7,28.6,4.1,26.9,4.7,25.2z M7.9,16.3c0,0.3-0.3,0.6-0.6,0.6H6.2c-0.3,0-0.6-0.3-0.6-0.6v-0.9c0-0.1,0.1-0.3,0.2-0.4l0.6-0.6 c0.2-0.2,0.6-0.2,0.8,0L7.7,15c0.1,0.1,0.2,0.2,0.2,0.4V16.3z M9,9.1c0.3-0.1,0.6,0,0.8,0.3l0.3,0.6c0.1,0.3,0,0.6-0.3,0.8 c-0.3,0.1-0.6,0-0.8-0.3L8.8,9.8C8.6,9.5,8.8,9.2,9,9.1z M8,12.8c0.1-0.1,0.2-0.2,0.4-0.2h0.9c0.3,0,0.6,0.3,0.6,0.6v1.1 c0,0.3-0.3,0.6-0.6,0.6H8.4c-0.1,0-0.3-0.1-0.4-0.2l-0.6-0.6c-0.2-0.2-0.2-0.6,0-0.8L8,12.8z M5.6,11.2c0-0.3,0.3-0.6,0.6-0.6h1.1 c0.3,0,0.6,0.3,0.6,0.6v0.9c0,0.1-0.1,0.3-0.2,0.4l-0.6,0.6c-0.2,0.2-0.6,0.2-0.8,0l-0.6-0.6c-0.1-0.1-0.2-0.2-0.2-0.4V11.2z M3.7,13.2c0-0.3,0.3-0.6,0.6-0.6h0.9c0.1,0,0.3,0.1,0.4,0.2l0.6,0.6c0.2,0.2,0.2,0.6,0,0.8l-0.6,0.6c-0.1,0.1-0.2,0.2-0.4,0.2H4.2 c-0.3,0-0.6-0.3-0.6-0.6V13.2z", }), o.createElement("path", { fill: "currentColor", d: "M23.8,13.5l0.6-2l0.5-3c0-0.2,0-0.3-0.1-0.4c-0.1-0.1-0.4-0.3-0.7-0.4c-0.1,0-0.2-0.1-0.3-0.1c-1.7-0.1-3.7-0.2-5.9-0.2v7.6 h4C22.8,14.9,23.6,14.3,23.8,13.5z" }), o.createElement("path", { fill: "currentColor", opacity: "0.5", d: "M12,7.5c-0.1,0-0.1,0-0.2,0.1c-0.3,0.1-0.5,0.3-0.7,0.4C11,8.2,11,8.3,11,8.5l0.5,2.9l0.6,2.1 c0.3,0.8,1,1.4,1.9,1.4h4V7.3C15.8,7.3,13.7,7.4,12,7.5z" }), o.createElement("path", { fill: "currentColor", opacity: "0.5", d: "M14,15.5c-1,0-2-0.6-2.4-1.6c-0.2,1-0.6,1.9-1.3,2.7C9.3,17.8,7.9,19.4,7,21c-0.6,1-1.2,2.7-1.8,4.4 c-0.5,1.7-1,3.4-1.3,4.5c-0.1,0.4-0.3,0.7-0.6,0.8l0,0c1,0.2,2-0.4,2.3-1.3l1.9-4.7c0.5-1.3,1.8-2.1,3.1-2.1H18v-7H14z M12.4,21.4 c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2s2.2,1,2.2,2.2S13.6,21.4,12.4,21.4z" }), o.createElement("path", { fill: "currentColor", d: "M32.1,29.8c-0.3-1.1-0.7-2.8-1.3-4.5C30.2,23.6,29.6,22,29,21c-0.9-1.5-2.3-3.2-3.4-4.4c-0.7-0.8-1.1-1.7-1.3-2.7 c-0.4,1-1.3,1.6-2.4,1.6h-4v7h7.3c1.4,0,2.6,0.8,3.1,2.1l1.9,4.7c0.4,0.9,1.3,1.5,2.3,1.3l0,0C32.4,30.5,32.2,30.2,32.1,29.8z M23.6,21.4c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2s2.2,1,2.2,2.2S24.9,21.4,23.6,21.4z" }), o.createElement("path", { fill: "currentColor", d: "M32.1,9c-0.1-0.1-0.3-0.1-0.6-0.2V8.2c0-0.2-0.1-0.4-0.3-0.5c-0.5-0.3-1.8-1-3.1-1c-1.7,0-1.7,0.6-1.7,0.6v0.5 c-0.4,0-0.8-0.1-1.2-0.1l0,0c0.2,0.2,0.3,0.6,0.3,0.9l-0.5,3l0,0l0,0l-0.1,0.7c-0.2,1.4,0.2,2.8,1.1,3.8c1.1,1.2,2.5,3,3.5,4.5 c0.6,1.1,1.3,2.8,1.8,4.5c0.5,1.7,1,3.4,1.3,4.5c0.1,0.5,0.6,0.8,1.1,0.6l0.1,0c0.5-0.3,1-0.8,1.2-1.4c0.4-1.2,0.9-3.1,0.9-5.8 C36,18,33.2,9.6,32.1,9z M29.2,10.1c0.6,0,1.1,0.5,1.1,1.1s-0.5,1.1-1.1,1.1s-1.1-0.5-1.1-1.1S28.6,10.1,29.2,10.1z M25.9,9.9 l0.3-0.6C26.4,9,26.7,8.9,27,9.1c0.3,0.1,0.4,0.5,0.3,0.8l-0.3,0.6c-0.1,0.3-0.5,0.4-0.8,0.3C25.9,10.5,25.8,10.2,25.9,9.9z M27,14.6c-0.6,0-1.1-0.5-1.1-1.1s0.5-1.1,1.1-1.1s1.1,0.5,1.1,1.1S27.6,14.6,27,14.6z M29.2,16.9c-0.6,0-1.1-0.5-1.1-1.1 s0.5-1.1,1.1-1.1s1.1,0.5,1.1,1.1S29.9,16.9,29.2,16.9z M31.5,14.6c-0.6,0-1.1-0.5-1.1-1.1s0.5-1.1,1.1-1.1s1.1,0.5,1.1,1.1 S32.1,14.6,31.5,14.6z" }), ) : o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, r), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M4.5 8.77962V8.17604C4.5 7.98797 4.59324 7.8129 4.75606 7.71875C5.29052 7.40971 6.58276 6.75 7.875 6.75C9.5625 6.75 9.5625 7.3125 9.5625 7.3125V7.79346C9.92732 7.74841 10.3079 7.7053 10.7038 7.66469L10.7001 7.66881C10.4768 7.91891 10.3639 8.22982 10.4289 8.58762L11.114 12.3555C11.3614 13.7163 10.9231 15.1154 9.99052 16.155C8.88458 17.3878 7.44481 19.1078 6.50883 20.6678C5.85918 21.7505 5.21964 23.4605 4.67636 25.1549C4.13086 26.8562 3.67463 28.5672 3.3961 29.6673C3.27268 30.1547 2.76181 30.4366 2.2902 30.2794L2.14425 30.2308C1.59878 29.9208 1.15999 29.4611 0.929107 28.8508C0.480791 27.6656 0 25.7647 0 23.0625C0 18 2.8125 9.5625 3.9375 9C4.07055 8.93348 4.25867 8.85908 4.5 8.77962ZM5.625 11.25C5.625 10.9393 5.87684 10.6875 6.1875 10.6875H7.3125C7.62316 10.6875 7.875 10.9393 7.875 11.25V12.142C7.875 12.2912 7.81574 12.4343 7.71025 12.5398L7.14775 13.1023C6.92808 13.3219 6.57192 13.3219 6.35225 13.1023L5.78975 12.5398C5.68426 12.4343 5.625 12.2912 5.625 12.142V11.25ZM5.625 16.3125C5.625 16.6232 5.87684 16.875 6.1875 16.875H7.3125C7.62316 16.875 7.875 16.6232 7.875 16.3125V15.4205C7.875 15.2713 7.81574 15.1282 7.71025 15.0227L7.14775 14.4602C6.92808 14.2406 6.57192 14.2406 6.35225 14.4602L5.78975 15.0227C5.68426 15.1282 5.625 15.2713 5.625 15.4205V16.3125ZM9.84375 14.3438C9.84375 14.6544 9.59191 14.9062 9.28125 14.9062H8.38924C8.24006 14.9062 8.09699 14.847 7.9915 14.7415L7.429 14.179C7.20933 13.9593 7.20933 13.6032 7.429 13.3835L7.9915 12.821C8.09699 12.7155 8.24006 12.6562 8.38925 12.6562H9.28125C9.59191 12.6562 9.84375 12.9081 9.84375 13.2188V14.3438ZM4.21875 14.9062C3.90809 14.9062 3.65625 14.6544 3.65625 14.3438V13.2188C3.65625 12.9081 3.90809 12.6562 4.21875 12.6562H5.11076C5.25994 12.6562 5.40301 12.7155 5.5085 12.821L6.071 13.3835C6.29067 13.6032 6.29067 13.9593 6.071 14.179L5.5085 14.7415C5.40301 14.847 5.25994 14.9062 5.11076 14.9062H4.21875ZM9.0297 9.05937C9.30756 8.92044 9.64544 9.03307 9.78437 9.31093L10.0656 9.87343C10.2046 10.1513 10.0919 10.4892 9.81406 10.6281C9.5362 10.767 9.19832 10.6544 9.05939 10.3765L8.77814 9.81404C8.63921 9.53618 8.75183 9.1983 9.0297 9.05937Z", }), o.createElement("path", { fill: "currentColor", d: "M18 7.3125C15.7603 7.3125 13.748 7.4035 11.9892 7.54668C11.9209 7.57082 11.8551 7.59586 11.7919 7.62185C11.4768 7.75142 11.2526 7.89452 11.1197 8.04343C10.9961 8.18189 10.9523 8.32182 10.9824 8.48699L11.5138 11.4097L12.1573 13.5129C12.4103 14.3408 13.1744 14.9062 14.0401 14.9062H21.9642C22.8281 14.9062 23.591 14.3431 23.8456 13.5176L24.4729 11.483L25.0176 8.48699C25.0463 8.32909 25.0039 8.1935 24.8798 8.05684C24.7463 7.90988 24.5214 7.76808 24.2057 7.6392C24.1215 7.60486 24.0327 7.57213 23.9398 7.54094C22.1978 7.40107 20.2096 7.3125 18 7.3125Z" }), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M3.37124 30.6556L3.34019 30.6503C3.62833 30.4606 3.84996 30.1665 3.94139 29.8054C4.2185 28.7109 4.67149 27.0124 5.212 25.3266C5.75474 23.6339 6.37801 21.9791 6.99117 20.9572C7.89825 19.4454 9.30802 17.7581 10.4092 16.5306C11.085 15.7773 11.5326 14.8493 11.6859 13.8677C12.0647 14.8275 12.9948 15.4687 14.0401 15.4687H21.9642C23.0065 15.4687 23.9345 14.8312 24.3153 13.8755C24.4698 14.8543 24.9168 15.7794 25.5908 16.5306C26.692 17.7581 28.1017 19.4454 29.0088 20.9572C29.622 21.9791 30.2453 23.6339 30.788 25.3266C31.3285 27.0124 31.7815 28.7109 32.0586 29.8054C32.15 30.1664 32.3717 30.4606 32.6598 30.6503L32.6288 30.6556C31.6413 30.8202 30.6725 30.275 30.3007 29.3455L28.4111 24.6216C27.8986 23.3402 26.6576 22.5 25.2775 22.5H10.7225C9.34243 22.5 8.10142 23.3402 7.58888 24.6216L5.69928 29.3455C5.3275 30.275 4.35868 30.8202 3.37124 30.6556ZM25.875 19.125C25.875 20.3676 24.8676 21.375 23.625 21.375C22.3824 21.375 21.375 20.3676 21.375 19.125C21.375 17.8824 22.3824 16.875 23.625 16.875C24.8676 16.875 25.875 17.8824 25.875 19.125ZM12.375 21.375C13.6176 21.375 14.625 20.3676 14.625 19.125C14.625 17.8824 13.6176 16.875 12.375 16.875C11.1324 16.875 10.125 17.8824 10.125 19.125C10.125 20.3676 11.1324 21.375 12.375 21.375Z", }), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M33.7098 30.2794L33.8557 30.2308C34.4012 29.9208 34.84 29.4611 35.0709 28.8508C35.5192 27.6656 36 25.7647 36 23.0625C36 18 33.1875 9.5625 32.0625 9C31.9295 8.93348 31.7413 8.85908 31.5 8.77962V8.17604C31.5 7.98797 31.4068 7.8129 31.2439 7.71875C30.7095 7.40971 29.4172 6.75 28.125 6.75C26.4375 6.75 26.4375 7.3125 26.4375 7.3125V7.79346C26.0683 7.74787 25.683 7.70427 25.282 7.66324L25.2962 7.67864C25.52 7.92502 25.6356 8.23268 25.5711 8.58762L25.0274 11.5776L25.0319 11.579L25.0203 11.6166L24.886 12.3555C24.6386 13.7163 25.0769 15.1154 26.0095 16.155C27.1154 17.3878 28.5552 19.1078 29.4912 20.6678C30.1408 21.7505 30.7804 23.4605 31.3236 25.1549C31.8691 26.8562 32.3254 28.5672 32.6039 29.6673C32.7273 30.1547 33.2382 30.4366 33.7098 30.2794ZM26.2156 9.31093C26.3546 9.03307 26.6924 8.92044 26.9703 9.05937C27.2482 9.1983 27.3608 9.53618 27.2219 9.81404L26.9406 10.3765C26.8017 10.6544 26.4638 10.767 26.1859 10.6281C25.9081 10.4892 25.7954 10.1513 25.9344 9.87343L26.2156 9.31093ZM30.375 15.75C30.375 16.3713 29.8713 16.875 29.25 16.875C28.6287 16.875 28.125 16.3713 28.125 15.75C28.125 15.1287 28.6287 14.625 29.25 14.625C29.8713 14.625 30.375 15.1287 30.375 15.75ZM31.5 14.625C32.1213 14.625 32.625 14.1213 32.625 13.5C32.625 12.8787 32.1213 12.375 31.5 12.375C30.8787 12.375 30.375 12.8787 30.375 13.5C30.375 14.1213 30.8787 14.625 31.5 14.625ZM30.375 11.25C30.375 11.8713 29.8713 12.375 29.25 12.375C28.6287 12.375 28.125 11.8713 28.125 11.25C28.125 10.6287 28.6287 10.125 29.25 10.125C29.8713 10.125 30.375 10.6287 30.375 11.25ZM27 14.625C27.6213 14.625 28.125 14.1213 28.125 13.5C28.125 12.8787 27.6213 12.375 27 12.375C26.3787 12.375 25.875 12.8787 25.875 13.5C25.875 14.1213 26.3787 14.625 27 14.625Z", }), ) : "switchpro" == t ? o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, r), o.createElement("path", { fill: "currentColor", d: "M3.375 30.375C0 30.375 0 25.875 0 25.875C0 25.875 0.679114 19.5689 1.65511 14.6014C2.11919 15.2235 2.72448 16.0277 3.42078 16.936C4.97674 18.9655 6.99227 21.5211 8.90421 23.7256C8.37233 24.3118 7.95006 25.2335 7.50451 26.2061C6.59778 28.1853 5.59464 30.375 3.375 30.375Z" }), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M9.94135 23.2037C10.5784 23.0625 11.25 23.0625 11.25 23.0625H24.75C24.75 23.0625 25.4216 23.0625 26.0586 23.2037C28.0029 20.9779 30.0841 18.3414 31.6864 16.2515C32.493 15.1994 33.1768 14.2877 33.6589 13.639C33.8038 13.444 33.9305 13.2728 34.0368 13.1288C33.6024 11.1876 33.1223 9.62156 32.625 8.99998C30.9375 6.75 24.75 6.75 24.75 6.75H11.25C11.25 6.75 5.0625 6.75 3.375 8.99998C2.87774 9.62156 2.39764 11.1876 1.96319 13.1288C2.06947 13.2728 2.19616 13.444 2.34111 13.639C2.82318 14.2877 3.50702 15.1994 4.31359 16.2515C5.91589 18.3414 7.99714 20.9779 9.94135 23.2037ZM27.5062 9.11247C28.2829 9.11247 28.9125 9.74207 28.9125 10.5187C28.9125 11.2954 28.2829 11.925 27.5062 11.925C26.7296 11.925 26.1 11.2954 26.1 10.5187C26.1 9.74207 26.7296 9.11247 27.5062 9.11247ZM8.1 15.1875C9.34264 15.1875 10.35 14.1801 10.35 12.9375C10.35 11.6949 9.34264 10.6875 8.1 10.6875C6.85736 10.6875 5.85 11.6949 5.85 12.9375C5.85 14.1801 6.85736 15.1875 8.1 15.1875ZM22.725 20.25C23.9676 20.25 24.975 19.2426 24.975 18C24.975 16.7574 23.9676 15.75 22.725 15.75C21.4824 15.75 20.475 16.7574 20.475 18C20.475 19.2426 21.4824 20.25 22.725 20.25ZM31.725 13.1063C31.725 13.8829 31.0954 14.5125 30.3187 14.5125C29.5421 14.5125 28.9125 13.8829 28.9125 13.1063C28.9125 12.3296 29.5421 11.7 30.3187 11.7C31.0954 11.7 31.725 12.3296 31.725 13.1063ZM24.6937 14.5125C25.4704 14.5125 26.1 13.8829 26.1 13.1063C26.1 12.3296 25.4704 11.7 24.6937 11.7C23.9171 11.7 23.2875 12.3296 23.2875 13.1063C23.2875 13.8829 23.9171 14.5125 24.6937 14.5125ZM28.9125 15.4688C28.9125 14.6921 28.2829 14.0625 27.5062 14.0625C26.7296 14.0625 26.1 14.6921 26.1 15.4688C26.1 16.2454 26.7296 16.875 27.5062 16.875C28.2829 16.875 28.9125 16.2454 28.9125 15.4688ZM11.5312 17.1562V16.3125C11.5312 16.0018 11.7831 15.75 12.0938 15.75H13.2188C13.5294 15.75 13.7812 16.0018 13.7812 16.3125V17.1562H14.625C14.9357 17.1562 15.1875 17.4081 15.1875 17.7188V18.8438C15.1875 19.1544 14.9357 19.4062 14.625 19.4062H13.7812V20.25C13.7812 20.5607 13.5294 20.8125 13.2188 20.8125H12.0938C11.7831 20.8125 11.5312 20.5607 11.5312 20.25V19.4062H10.6875C10.3768 19.4062 10.125 19.1544 10.125 18.8438V17.7188C10.125 17.4081 10.3768 17.1562 10.6875 17.1562H11.5312Z", }), o.createElement("path", { fill: "currentColor", d: "M34.3449 14.6014C33.8808 15.2235 33.2755 16.0277 32.5792 16.936C31.0233 18.9655 29.0077 21.5211 27.0958 23.7256C27.6277 24.3118 28.0499 25.2335 28.4955 26.2061C29.4022 28.1853 30.4054 30.375 32.625 30.375C36 30.375 36 25.875 36 25.875C36 25.875 35.3209 19.5689 34.3449 14.6014Z" }), ) : o.createElement(c, Object.assign({}, r)); } function d(e) { const { controllerType: t } = e, n = (0, i._T)(e, ["controllerType"]); switch (t) { case 4: return o.createElement(h, Object.assign({}, n)); case 34: case 47: return o.createElement(m, Object.assign({ type: "ps4" }, n)); case 45: case 48: return o.createElement(m, Object.assign({ type: "ps5" }, n)); case 2: return o.createElement(m, Object.assign({ type: "steam" }, n)); case 31: case 32: case 46: return o.createElement(m, Object.assign({ type: "xbox" }, n)); case 42: case 39: case 40: case 41: case 38: case 44: return o.createElement(m, Object.assign({ type: "switchpro" }, n)); default: return o.createElement(m, Object.assign({ type: "generic" }, n)); } } function h(e) { const { type: t, partial: n } = e, r = (0, i._T)(e, ["type", "partial"]); return o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, r), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M0 11C0 9.89543 0.895431 9 2 9H34C35.1046 9 36 9.89543 36 11V24C36 25.6569 34.6569 27 33 27H3C1.34315 27 0 25.6569 0 24V11ZM33 16C33 16.5523 32.5523 17 32 17C31.4477 17 31 16.5523 31 16C31 15.4477 31.4477 15 32 15C32.5523 15 33 15.4477 33 16ZM32 13C32.5523 13 33 12.5523 33 12C33 11.4477 32.5523 11 32 11C31.4477 11 31 11.4477 31 12C31 12.5523 31.4477 13 32 13ZM35 14C35 14.5523 34.5523 15 34 15C33.4477 15 33 14.5523 33 14C33 13.4477 33.4477 13 34 13C34.5523 13 35 13.4477 35 14ZM30 15C30.5523 15 31 14.5523 31 14C31 13.4477 30.5523 13 30 13C29.4477 13 29 13.4477 29 14C29 14.5523 29.4477 15 30 15ZM6 14C6 15.1046 5.10457 16 4 16C2.89543 16 2 15.1046 2 14C2 12.8954 2.89543 12 4 12C5.10457 12 6 12.8954 6 14ZM2.5 21C2.22386 21 2 21.2239 2 21.5V24.5C2 24.7761 2.22386 25 2.5 25H5.5C5.77614 25 6 24.7761 6 24.5V21.5C6 21.2239 5.77614 21 5.5 21H2.5ZM30 21.5C30 21.2239 30.2239 21 30.5 21H33.5C33.7761 21 34 21.2239 34 21.5V24.5C34 24.7761 33.7761 25 33.5 25H30.5C30.2239 25 30 24.7761 30 24.5V21.5ZM28 11H8V25H28V11Z", }), ); } function u(e) { return e.flVolume < Number.EPSILON ? o.createElement(C, { color: e.color }) : e.flVolume < 0.3 + Number.EPSILON ? o.createElement(g, { color: e.color }) : e.flVolume < 0.6 + Number.EPSILON ? o.createElement(_, { color: e.color }) : o.createElement(p, { color: e.color }); } function p(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M5.63636 13L10 7H13V29H10L5.63636 23H2V13H5.63636Z", fill: "currentColor" }), o.createElement("path", { d: "M24.7279 30.7279C31.7573 23.6985 31.7573 12.3015 24.7279 5.27209L27.5563 2.44366C36.1479 11.0352 36.1479 24.9648 27.5563 33.5564L24.7279 30.7279Z", fill: "currentColor" }), o.createElement("path", { d: "M20.4853 9.51471C25.1716 14.201 25.1716 21.799 20.4853 26.4853L23.3137 29.3137C29.5621 23.0653 29.5621 12.9347 23.3137 6.68628L20.4853 9.51471Z", fill: "currentColor" }), o.createElement("path", { d: "M16.2426 13.7574C18.5858 16.1005 18.5858 19.8995 16.2426 22.2426L19.071 25.0711C22.9763 21.1658 22.9763 14.8342 19.071 10.9289L16.2426 13.7574Z", fill: "currentColor" })); } function _(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M5.63636 13L10 7H13V29H10L5.63636 23H2V13H5.63636Z", fill: "currentColor" }), o.createElement("path", { opacity: "0.5", d: "M24.7279 30.7279C31.7573 23.6985 31.7573 12.3015 24.7279 5.27209L27.5563 2.44366C36.1479 11.0352 36.1479 24.9648 27.5563 33.5564L24.7279 30.7279Z", fill: "currentColor" }), o.createElement("path", { d: "M20.4853 9.51471C25.1716 14.201 25.1716 21.799 20.4853 26.4853L23.3137 29.3137C29.5621 23.0653 29.5621 12.9347 23.3137 6.68628L20.4853 9.51471Z", fill: "currentColor" }), o.createElement("path", { d: "M16.2426 13.7574C18.5858 16.1005 18.5858 19.8995 16.2426 22.2426L19.071 25.0711C22.9763 21.1658 22.9763 14.8342 19.071 10.9289L16.2426 13.7574Z", fill: "currentColor" })); } function g(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M5.63636 13L10 7H13V29H10L5.63636 23H2V13H5.63636Z", fill: "currentColor" }), o.createElement("path", { opacity: "0.5", d: "M24.7279 30.7279C31.7573 23.6985 31.7573 12.3015 24.7279 5.27209L27.5563 2.44366C36.1479 11.0352 36.1479 24.9648 27.5563 33.5564L24.7279 30.7279Z", fill: "currentColor" }), o.createElement("path", { opacity: "0.5", d: "M20.4853 9.51471C25.1716 14.201 25.1716 21.799 20.4853 26.4853L23.3137 29.3137C29.5621 23.0653 29.5621 12.9347 23.3137 6.68628L20.4853 9.51471Z", fill: "currentColor" }), o.createElement("path", { d: "M16.2426 13.7574C18.5858 16.1005 18.5858 19.8995 16.2426 22.2426L19.071 25.0711C22.9763 21.1658 22.9763 14.8342 19.071 10.9289L16.2426 13.7574Z", fill: "currentColor" })); } function C(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M5.63636 13L10 7H13V29H10L5.63636 23H2V13H5.63636Z", fill: "currentColor" }), o.createElement("path", { d: "M27.8284 18L33.4142 23.5858L30.5858 26.4142L25 20.8285L19.4142 26.4142L16.5858 23.5858L22.1716 18L16.5858 12.4142L19.4142 9.58578L25 15.1716L30.5858 9.58578L33.4142 12.4142L27.8284 18Z", fill: "currentColor" })); } function f(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M2 9H34V27H2V9ZM5 13H7V15H5V13ZM7 21H5V23H7V21ZM5 17H9V19H5V17ZM11 13H9V15H11V13ZM9 21H27V23H9V21ZM15 13H13V15H15V13ZM11 17H13V19H11V17ZM19 13H17V15H19V13ZM15 17H17V19H15V17ZM21 17H19V19H21V17ZM21 13H23V15H21V13ZM25 17H23V19H25V17ZM25 13H27V15H25V13ZM31 13H29V15H31V13ZM29 21H31V23H29V21ZM31 17H27V19H31V17Z" })); } function v(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M14 3C10.6863 3 8 5.68629 8 9V23C8 28.5228 12.4772 33 18 33C23.5228 33 28 28.5228 28 23V9C28 5.68629 25.3137 3 22 3H21V14C21 15.6569 19.6569 17 18 17C16.3431 17 15 15.6569 15 14V3H14Z" }), o.createElement("path", { fill: "currentColor", d: "M17 5H19V11H17V5Z" })); } function S(e) { const { direction: t } = e, n = (0, i._T)(e, ["direction"]); switch (t) { case "up": return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), o.createElement("path", { d: "M17.98 10.23L3.20996 25H32.75L17.98 10.23Z", fill: "currentColor" })); case "down": return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), o.createElement("path", { d: "M17.98 26.54L3.20996 11.77H32.75L17.98 26.54Z", fill: "currentColor" })); case "left": return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), o.createElement("path", { d: "M9.82497 18.385L24.595 3.61499L24.595 33.155L9.82497 18.385Z", fill: "currentColor" })); case "right": return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), o.createElement("path", { d: "M26.135 18.385L11.365 33.155L11.365 3.61503L26.135 18.385Z", fill: "currentColor" })); } } function b(e) { const { direction: t } = e; (0, i._T)(e, ["direction"]); switch (t) { case "up": return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { fill: "currentColor", d: "M31 15.6394L18.0204 3L5 15.6394L8.60376 19.1432L18.0204 10.0076L27.4166 19.1432L31 15.6394ZM27.3962 33L18.0204 23.8644L8.62412 33L5 29.4962L18.0204 16.8568L31 29.4962L27.3962 33Z" })); case "down": return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { fill: "currentColor", d: "M31 20.3606L18.0204 33L5 20.3606L8.60376 16.8568L18.0204 25.9924L27.4166 16.8568L31 20.3606ZM27.3962 3L18.0204 12.1356L8.62412 3L5 6.50379L18.0204 19.1432L31 6.50379L27.3962 3Z" })); case "left": return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M14.23 30.75L1.45996 18L14.23 5.20999L17.77 8.74999L8.53996 18L17.77 27.23L14.23 30.75ZM31.77 27.21L22.54 18L31.77 8.76999L28.23 5.20999L15.46 18L28.23 30.75L31.77 27.21Z", fill: "currentColor" })); case "right": return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M19 30.75L31.77 18L19 5.20999L15.46 8.74999L24.69 18L15.46 27.23L19 30.75ZM1.46002 27.21L10.69 18L1.46002 8.76999L5.00002 5.20999L17.77 18L5.00002 30.75L1.46002 27.21Z", fill: "currentColor" })); } } function I(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M32.12 7.41L28.59 3.88L18 14.46L7.41 3.88L3.88 7.41L14.46 18L3.88 28.59L7.41 32.12L18 21.54L28.59 32.12L32.12 28.59L21.54 18L32.12 7.41Z", fill: "currentColor" })); } function y(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M7 2V34H29V2H7ZM18 32C17.5055 32 17.0222 31.8534 16.6111 31.5787C16.2 31.304 15.8795 30.9135 15.6903 30.4567C15.5011 29.9999 15.4516 29.4972 15.548 29.0123C15.6445 28.5273 15.8826 28.0819 16.2322 27.7322C16.5819 27.3826 17.0273 27.1445 17.5123 27.048C17.9972 26.9516 18.4999 27.0011 18.9567 27.1903C19.4135 27.3795 19.804 27.7 20.0787 28.1111C20.3534 28.5222 20.5 29.0055 20.5 29.5C20.5 29.8283 20.4353 30.1534 20.3097 30.4567C20.1841 30.76 19.9999 31.0356 19.7678 31.2678C19.5356 31.4999 19.26 31.6841 18.9567 31.8097C18.6534 31.9353 18.3283 32 18 32ZM25 25H11V6H25V25Z", fill: "currentColor" })); } function E(e) { return o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e, { className: (0, l.Z)(e.className, a().Spinner) }), o.createElement("path", { d: "M18 10C17.4696 10 16.9609 9.78929 16.5858 9.41421C16.2107 9.03914 16 8.53043 16 8V3H20V8C20 8.53043 19.7893 9.03914 19.4142 9.41421C19.0391 9.78929 18.5304 10 18 10Z", fill: "currentColor" }), o.createElement("path", { d: "M23.66 12.34C23.2875 11.9653 23.0784 11.4584 23.0784 10.93C23.0784 10.4016 23.2875 9.89473 23.66 9.52L27.19 6L30 8.81L26.47 12.34C26.0957 12.7095 25.5909 12.9166 25.065 12.9166C24.5391 12.9166 24.0343 12.7095 23.66 12.34Z", fill: "currentColor" }), o.createElement("path", { d: "M33 20H28C27.4696 20 26.9609 19.7893 26.5858 19.4142C26.2107 19.0391 26 18.5304 26 18C26 17.4696 26.2107 16.9609 26.5858 16.5858C26.9609 16.2107 27.4696 16 28 16H33V20Z", fill: "currentColor" }), o.createElement("path", { d: "M27.19 30L23.66 26.46C23.2875 26.0853 23.0784 25.5783 23.0784 25.05C23.0784 24.5216 23.2875 24.0147 23.66 23.64C23.8458 23.454 24.0663 23.3065 24.3091 23.2059C24.5519 23.1052 24.8122 23.0534 25.075 23.0534C25.3378 23.0534 25.5981 23.1052 25.8409 23.2059C26.0837 23.3065 26.3043 23.454 26.49 23.64L30 27.19L27.19 30Z", fill: "currentColor" }), o.createElement("path", { d: "M20 33H16V28C16 27.4696 16.2107 26.9609 16.5858 26.5858C16.9609 26.2107 17.4696 26 18 26C18.5304 26 19.0391 26.2107 19.4142 26.5858C19.7893 26.9609 20 27.4696 20 28V33Z", fill: "currentColor" }), o.createElement("path", { d: "M8.81 30L6 27.19L9.53 23.66C9.71575 23.474 9.93632 23.3265 10.1791 23.2259C10.4219 23.1252 10.6822 23.0734 10.945 23.0734C11.2078 23.0734 11.4681 23.1252 11.7109 23.2259C11.9537 23.3265 12.1743 23.474 12.36 23.66C12.7325 24.0347 12.9416 24.5416 12.9416 25.07C12.9416 25.5984 12.7325 26.1053 12.36 26.48L8.81 30Z", fill: "currentColor" }), o.createElement("path", { d: "M8 20H3V16H8C8.53043 16 9.03914 16.2107 9.41421 16.5858C9.78929 16.9609 10 17.4696 10 18C10 18.5304 9.78929 19.0391 9.41421 19.4142C9.03914 19.7893 8.53043 20 8 20Z", fill: "currentColor" }), o.createElement("path", { d: "M9.51 12.34L6 8.81L8.81 6L12.34 9.54C12.7125 9.91472 12.9216 10.4216 12.9216 10.95C12.9216 11.4784 12.7125 11.9853 12.34 12.36C12.1529 12.5446 11.9313 12.6906 11.6878 12.7895C11.4443 12.8885 11.1837 12.9385 10.9209 12.9366C10.658 12.9347 10.3981 12.8811 10.156 12.7787C9.91396 12.6764 9.69443 12.5273 9.51 12.34Z", fill: "currentColor" }), ); } function D(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M30 32H6V31C6 27.8174 7.26428 24.7652 9.51472 22.5147C11.7652 20.2643 14.8174 19 18 19C21.1826 19 24.2348 20.2643 26.4853 22.5147C28.7357 24.7652 30 27.8174 30 31V32ZM18 3C16.8133 3 15.6533 3.35189 14.6666 4.01118C13.6799 4.67047 12.9108 5.60754 12.4567 6.7039C12.0026 7.80026 11.8838 9.00666 12.1153 10.1705C12.3468 11.3344 12.9182 12.4035 13.7574 13.2426C14.5965 14.0818 15.6656 14.6532 16.8295 14.8847C17.9933 15.1162 19.1997 14.9974 20.2961 14.5433C21.3925 14.0892 22.3295 13.3201 22.9888 12.3334C23.6481 11.3467 24 10.1867 24 9C24 7.4087 23.3679 5.88258 22.2426 4.75736C21.1174 3.63214 19.5913 3 18 3Z", fill: "currentColor" })); } function w(e) { return o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.66645 5.52796C12.1332 3.87973 15.0333 3 18 3C19.9698 3 21.9204 3.38799 23.7403 4.14181C25.5601 4.89563 27.2137 6.00052 28.6066 7.3934C29.9995 8.78628 31.1044 10.4399 31.8582 12.2597C32.612 14.0796 33 16.0302 33 18C33 20.9667 32.1203 23.8668 30.472 26.3336C28.8238 28.8003 26.4811 30.7229 23.7403 31.8582C20.9994 32.9935 17.9834 33.2906 15.0737 32.7118C12.1639 32.133 9.49119 30.7044 7.3934 28.6066C5.29562 26.5088 3.86701 23.8361 3.28823 20.9264C2.70945 18.0166 3.0065 15.0006 4.14181 12.2597C5.27713 9.51886 7.19972 7.17618 9.66645 5.52796ZM9.5056 13.3333C9.17595 13.8266 9.00001 14.4067 9.00001 15C9.00001 15.7956 9.31608 16.5587 9.87869 17.1213C10.4413 17.6839 11.2044 18 12 18C12.5934 18 13.1734 17.8241 13.6667 17.4944C14.1601 17.1648 14.5446 16.6962 14.7716 16.1481C14.9987 15.5999 15.0581 14.9967 14.9424 14.4147C14.8266 13.8328 14.5409 13.2982 14.1213 12.8787C13.7018 12.4591 13.1672 12.1734 12.5853 12.0576C12.0033 11.9419 11.4001 12.0013 10.852 12.2284C10.3038 12.4554 9.83524 12.8399 9.5056 13.3333ZM22.3333 17.4944C22.8266 17.8241 23.4067 18 24 18C24.7957 18 25.5587 17.6839 26.1213 17.1213C26.6839 16.5587 27 15.7956 27 15C27 14.4067 26.8241 13.8266 26.4944 13.3333C26.1648 12.8399 25.6962 12.4554 25.1481 12.2284C24.5999 12.0013 23.9967 11.9419 23.4147 12.0576C22.8328 12.1734 22.2982 12.4591 21.8787 12.8787C21.4591 13.2982 21.1734 13.8328 21.0576 14.4147C20.9419 14.9967 21.0013 15.5999 21.2284 16.1481C21.4554 16.6962 21.8399 17.1648 22.3333 17.4944ZM23 22C23 23.3261 22.4732 24.5979 21.5355 25.5355C20.5979 26.4732 19.3261 27 18 27C16.6739 27 15.4021 26.4732 14.4645 25.5355C13.5268 24.5979 13 23.3261 13 22H23Z", fill: "currentColor", }), ); } function R(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.73 28.34C15.6223 29.3235 18.732 29.4785 21.7078 28.7876C24.6836 28.0966 27.4069 26.5873 29.57 24.43L36 18L29.57 11.57C28 10 26.5 9 23.94 7.94C20.9843 6.77796 17.7541 6.50244 14.6444 7.14712C11.5346 7.7918 8.68012 9.32875 6.43 11.57L0 18L6.43 24.43C8.10419 26.1042 10.2596 27.5 12.73 28.34ZM18 25C21.866 25 25 21.866 25 18C25 14.134 21.866 11 18 11C14.134 11 11 14.134 11 18C11 21.866 14.134 25 18 25Z", fill: "currentColor" })); } function A(e) { return o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M29.57 11.57L24.82 16.32C24.9485 16.8705 25.0089 17.4347 25 18C25 19.8565 24.2625 21.637 22.9497 22.9497C21.637 24.2625 19.8565 25 18 25C17.423 24.9983 16.8486 24.9244 16.29 24.78L12.73 28.34C15.6223 29.3235 18.732 29.4785 21.7078 28.7876C24.6836 28.0966 27.4069 26.5873 29.57 24.43L36 18L29.57 11.57Z", fill: "currentColor" }), o.createElement("path", { d: "M28.94 2.94L23.94 7.94C20.9843 6.77797 17.7541 6.50244 14.6444 7.14712C11.5346 7.79181 8.68012 9.32876 6.43 11.57L0 18L6.43 24.43C6.6 24.6 6.79 24.75 6.97 24.91L3.44 28.44L5.56 30.56L31.06 5.06L28.94 2.94ZM11 18C11.0002 16.8706 11.2736 15.7581 11.7969 14.7573C12.3203 13.7565 13.078 12.8971 14.0054 12.2527C14.9328 11.6082 16.0024 11.1977 17.1229 11.0561C18.2434 10.9146 19.3815 11.0463 20.44 11.44L11.44 20.44C11.1493 19.6593 11.0003 18.833 11 18Z", fill: "currentColor" }), ); } function M(e) { return o.createElement("svg", { width: "5", height: "19", viewBox: "0 0 5 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, o.createElement("path", { d: "M5 0H3C1.34315 0 0 1.34315 0 3V16C0 17.6569 1.34315 19 3 19H5V0Z", fill: "white" })); } function k(e) { return o.createElement("svg", { width: "5", height: "19", viewBox: "0 0 5 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, o.createElement("path", { d: "M0 0H2C3.65685 0 5 1.34315 5 3V16C5 17.6569 3.65685 19 2 19H0V0Z", fill: "white" })); } }, 31695: (e, t, n) => { "use strict"; n.d(t, { Q: () => s, R: () => a }); var i = n(27378), o = n(25548), r = n.n(o); const a = () => i.createElement("div", { className: r().FriendsListInsetShadowCtn }, i.createElement("div", { className: r().FriendListInsetShadowTop })), s = () => i.createElement("div", { className: r().FriendsListInsetShadowCtn }, i.createElement("div", { className: r().FriendListInsetShadowBottom })); }, 19399: (e, t, n) => { "use strict"; n.d(t, { t: () => S }); var i = n(85556), o = n(27378); function r(e) { var t; const [n, i] = (0, o.useState)(!0); return ( (0, o.useEffect)(() => { i(!0); }, []), n ? e.children : null !== (t = e.fallback) && void 0 !== t ? t : null ); } var a = n(33690), s = n(38571), l = n(40172), c = n(31542), m = n(10553); function d(e) { const { ModalManager: t } = e, [n, i] = o.useState(void 0), [r, a] = o.useState(!0), s = o.useRef(0), l = o.useCallback(() => { a(!0); }, []); o.useEffect(() => t.RegisterMeasureModalCallback(l).Unregister, [t, l]), o.useLayoutEffect(() => { n || (i(t.TakeMeasureModalRequest()), a(!1)); }, [t, n, r]); const c = o.useCallback((e) => { s.current++, i((t) => (t === e ? void 0 : t)); }, []); return n ? o.createElement(h, { key: s.current, onMeasureComplete: c, request: n }) : null; } function h(e) { const [t, n] = o.useState(), i = (0, a.Wy)().ownerWindow; return ( o.useLayoutEffect(() => { const e = i.document.body, t = i.document.createElement("div"); return ( (t.style.position = "absolute"), (t.style.visibility = "hidden"), e.appendChild(t), n(t), () => { e.removeChild(t); } ); }, [i]), t ? c.createPortal(o.createElement(u, Object.assign({}, e, { elContainer: t })), t) : null ); } function u(e) { const { elContainer: t, onMeasureComplete: n, request: r } = e; return ( o.useEffect(() => { let e = !1; const o = (t) => { e || (r.fnResults(t), n(r), (e = !0)); }; return ( (function (e, t) { return (0, i.mG)(this, void 0, void 0, function* () { t && (yield t); let n = document; m.De.IN_STEAMUI && n.fonts && (yield n.fonts.ready); const i = e.getBoundingClientRect(); return { height: Math.ceil(i.height), width: Math.ceil(i.width) }; }); })(t, r.promiseContentReady).then(o), () => o(void 0) ); }, [t, n, r]), o.createElement(s.SV, null, r.rctToMeasure) ); } var p = n(87018), _ = n(2049), g = n(77898), C = n(66147), f = n(53600); function v(e) { o.useEffect(() => { if (e) return document.body.classList.add(f.BodyNoScrollDialog), () => document.body.classList.remove(f.BodyNoScrollDialog); }, [e]); } function S(e) { let { ModalManager: t, bRegisterModalManager: n = !0, DialogWrapper: s, style: l } = e, c = (0, i._T)(e, ["ModalManager", "bRegisterModalManager", "DialogWrapper", "style"]); const m = t.modals, h = m && !!m.length, u = t.active_modal; v(h), (function (e) { const t = (0, a.Wy)().ownerWindow, n = (0, _.NW)(), i = o.useCallback(() => { var e; (null === (e = null == t ? void 0 : t.SteamClient) || void 0 === e ? void 0 : e.Window) && t.SteamClient.Window.BringToFront(); }, [t]); o.useEffect(() => e.RegisterOverlay(n), [e, n]), o.useEffect(() => e.RegisterOnModalShownCallback(i).Unregister, [e, i]); })(t); const f = (function (e, t) { return (0, _.xK)( (n) => { if (!n || !t) return; const i = n.ownerDocument.defaultView; return C.Zp.RegisterModalManager(e, i); }, [e], ); })(t, n); let S = null; return m && m.length ? (S = m.map((e) => (e instanceof g.kv ? o.createElement(I, { key: e.key, modal: e, active: e == u, Component: null != s ? s : y }) : e instanceof g.QA ? o.createElement(b, { key: e.key, modal: e, active: e == u }) : void 0))) : (l = Object.assign(Object.assign({}, l), { display: "none" })), o.createElement(o.Fragment, null, o.createElement(r, null, o.createElement("div", Object.assign({}, c, { style: l, ref: f, className: (0, p.Z)(c.className, "FullModalOverlay") }), o.createElement("div", { className: "ModalOverlayContent ModalOverlayBackground" }), S)), o.createElement(d, { ModalManager: t }), o.createElement(E, { ModalManager: t })); } function b(e) { const { modal: t, active: n } = e; return o.useEffect(() => (n ? (t.SetActive(n), () => t.SetActive(!1)) : void 0), [t, n]), o.createElement(s.SV, null, o.createElement("div", { className: (0, p.Z)("ModalOverlayContent", n ? "active" : "inactive"), ref: t.RefModalElement })); } function I(e) { const { modal: t, active: n, Component: i } = e, r = (0, _.NW)(); return (0, _.Qg)(t.ModalUpdatedCallback, r), o.createElement(s.SV, null, o.createElement(i, { className: (0, p.Z)("ModalOverlayContent", n ? "active" : "inactive"), active: n, modalKey: t.key }, t.element)); } const y = o.forwardRef(function (e, t) { const { className: n, active: i, children: r } = e, a = o.useRef(); o.useEffect(() => { const e = a.current; if (e && i) { const t = e.firstChild; t && t.focus && t.focus(); } }, [i]); const s = (0, _.BE)(a, t); return o.createElement("div", { ref: s, className: n, tabIndex: -1 }, r); }); function E(e) { const { ModalManager: t } = e, n = (0, _.NW)(); return ( (0, _.Qg)(t.LegacyPopupModalCountChangedCallbacks, n), o.createElement( o.Fragment, null, t.legacy_popup_modals.map((e) => o.createElement(l.l6, { key: e.key, Modal: e })), ) ); } }, 65204: (e, t, n) => { "use strict"; n.d(t, { uH: () => F, RG: () => T, JX: () => B, BL: () => r.BL, e1: () => u, E_: () => O, SQ: () => G, jF: () => N }); var i = n(27378), o = n(11259), r = (n(31542), n(76135), n(66147)); var a = n(91300), s = n(38571), l = n(16518), c = n(88669), m = n(21561); const d = (0, a.Yt)("ModalPresentationContext", () => i.createContext({})), h = () => i.useContext(d); function u(e) { const t = h(); return i.createElement(m.T, Object.assign({ component: t.ModalPosition, fallback: p }, e)); } function p(e) { let t, n = {}; e.onEscKeypress && ((n.tabIndex = 0), (n.onKeyDown = (t) => { 27 == t.keyCode && e.onEscKeypress(); }), (n.onMouseDown = (t) => { t.currentTarget !== t.target || e.bDisableBackgroundDismiss || e.onEscKeypress(); }), (t = (e) => { e && (c.ni(e, e.ownerDocument.activeElement) || e.focus()); })); let o = ["ModalPosition"]; e.className && o.push(e.className), e.bDestructiveWarning && o.push("Destructive"); const r = e.renderContent || ((e) => i.createElement("div", Object.assign({}, e))), a = i.createElement( i.Fragment, null, !e.hideTopBar && i.createElement("div", { className: "ModalPosition_TopBar" }), e.onEscKeypress && !e.bHideCloseIcon && i.createElement( "div", { className: "ModalPosition_Dismiss" }, i.createElement( "div", { className: "closeButton", onClick: (t) => { t.stopPropagation(), e.onEscKeypress(); }, }, i.createElement(l.pVO, null), ), ), i.createElement(s.SV, null, e.children), ); return i.createElement("div", Object.assign({ className: o.join(" ") }, n, { ref: t }), r({ className: "ModalPosition_Content", children: a })); } n(24424), n(61963), n(55948); var _ = n(2049), g = (n(33690), n(10553)); n(59192); n(19399), n(56320), n(8070), n(83817), n(20646); var C, f, v = n(85556), S = n(55981), b = n(34294); !(function (e) { (e[(e.k_EControllerBindingType_None = 0)] = "k_EControllerBindingType_None"), (e[(e.k_EControllerBindingType_Key = 1)] = "k_EControllerBindingType_Key"), (e[(e.k_EControllerBindingType_MouseButton = 2)] = "k_EControllerBindingType_MouseButton"), (e[(e.k_EControllerBindingType_Gamepad = 3)] = "k_EControllerBindingType_Gamepad"), (e[(e.k_EControllerBindingType_Mousewheel = 4)] = "k_EControllerBindingType_Mousewheel"), (e[(e.k_EControllerBindingType_Modeshift = 5)] = "k_EControllerBindingType_Modeshift"), (e[(e.k_EControllerBindingType_GameAction = 6)] = "k_EControllerBindingType_GameAction"), (e[(e.k_EControllerBindingType_ControllerAction = 7)] = "k_EControllerBindingType_ControllerAction"); })(C || (C = {})), (function (e) { (e[(e.GAMEPAD_BUTTON_A = 0)] = "GAMEPAD_BUTTON_A"), (e[(e.GAMEPAD_BUTTON_B = 1)] = "GAMEPAD_BUTTON_B"), (e[(e.GAMEPAD_BUTTON_X = 2)] = "GAMEPAD_BUTTON_X"), (e[(e.GAMEPAD_BUTTON_Y = 3)] = "GAMEPAD_BUTTON_Y"), (e[(e.GAMEPAD_BUTTON_DPAD_UP = 4)] = "GAMEPAD_BUTTON_DPAD_UP"), (e[(e.GAMEPAD_BUTTON_DPAD_RIGHT = 5)] = "GAMEPAD_BUTTON_DPAD_RIGHT"), (e[(e.GAMEPAD_BUTTON_DPAD_DOWN = 6)] = "GAMEPAD_BUTTON_DPAD_DOWN"), (e[(e.GAMEPAD_BUTTON_DPAD_LEFT = 7)] = "GAMEPAD_BUTTON_DPAD_LEFT"), (e[(e.GAMEPAD_BUTTON_MENU = 8)] = "GAMEPAD_BUTTON_MENU"), (e[(e.GAMEPAD_BUTTON_VIEW = 9)] = "GAMEPAD_BUTTON_VIEW"), (e[(e.GAMEPAD_LEFTPAD_UP = 10)] = "GAMEPAD_LEFTPAD_UP"), (e[(e.GAMEPAD_LEFTPAD_DOWN = 11)] = "GAMEPAD_LEFTPAD_DOWN"), (e[(e.GAMEPAD_LEFTPAD_LEFT = 12)] = "GAMEPAD_LEFTPAD_LEFT"), (e[(e.GAMEPAD_LEFTPAD_RIGHT = 13)] = "GAMEPAD_LEFTPAD_RIGHT"), (e[(e.GAMEPAD_LEFTPAD_ANALOG = 14)] = "GAMEPAD_LEFTPAD_ANALOG"), (e[(e.GAMEPAD_RIGHTPAD_UP = 15)] = "GAMEPAD_RIGHTPAD_UP"), (e[(e.GAMEPAD_RIGHTPAD_DOWN = 16)] = "GAMEPAD_RIGHTPAD_DOWN"), (e[(e.GAMEPAD_RIGHTPAD_LEFT = 17)] = "GAMEPAD_RIGHTPAD_LEFT"), (e[(e.GAMEPAD_RIGHTPAD_RIGHT = 18)] = "GAMEPAD_RIGHTPAD_RIGHT"), (e[(e.GAMEPAD_RIGHTPAD_ANALOG = 19)] = "GAMEPAD_RIGHTPAD_ANALOG"), (e[(e.GAMEPAD_LEFTSTICK_UP = 20)] = "GAMEPAD_LEFTSTICK_UP"), (e[(e.GAMEPAD_LEFTSTICK_DOWN = 21)] = "GAMEPAD_LEFTSTICK_DOWN"), (e[(e.GAMEPAD_LEFTSTICK_LEFT = 22)] = "GAMEPAD_LEFTSTICK_LEFT"), (e[(e.GAMEPAD_LEFTSTICK_RIGHT = 23)] = "GAMEPAD_LEFTSTICK_RIGHT"), (e[(e.GAMEPAD_LEFTSTICK_ANALOG = 24)] = "GAMEPAD_LEFTSTICK_ANALOG"), (e[(e.GAMEPAD_LEFTSTICK_CLICK = 25)] = "GAMEPAD_LEFTSTICK_CLICK"), (e[(e.GAMEPAD_LTRIGGER_ANALOG = 26)] = "GAMEPAD_LTRIGGER_ANALOG"), (e[(e.GAMEPAD_RTRIGGER_ANALOG = 27)] = "GAMEPAD_RTRIGGER_ANALOG"), (e[(e.GAMEPAD_BUTTON_LTRIGGER = 28)] = "GAMEPAD_BUTTON_LTRIGGER"), (e[(e.GAMEPAD_BUTTON_RTRIGGER = 29)] = "GAMEPAD_BUTTON_RTRIGGER"), (e[(e.GAMEPAD_BUTTON_LSHOULDER = 30)] = "GAMEPAD_BUTTON_LSHOULDER"), (e[(e.GAMEPAD_BUTTON_RSHOULDER = 31)] = "GAMEPAD_BUTTON_RSHOULDER"), (e[(e.GAMEPAD_BUTTON_LBACK = 32)] = "GAMEPAD_BUTTON_LBACK"), (e[(e.GAMEPAD_BUTTON_RBACK = 33)] = "GAMEPAD_BUTTON_RBACK"), (e[(e.GAMEPAD_BUTTON_GUIDE = 34)] = "GAMEPAD_BUTTON_GUIDE"), (e[(e.GAMEPAD_BUTTON_SELECT = 35)] = "GAMEPAD_BUTTON_SELECT"), (e[(e.GAMEPAD_BUTTON_START = 36)] = "GAMEPAD_BUTTON_START"), (e[(e.GAMEPAD_BUTTON_LPAD_CLICKED = 37)] = "GAMEPAD_BUTTON_LPAD_CLICKED"), (e[(e.GAMEPAD_BUTTON_LPAD_TOUCH = 38)] = "GAMEPAD_BUTTON_LPAD_TOUCH"), (e[(e.GAMEPAD_BUTTON_RPAD_CLICKED = 39)] = "GAMEPAD_BUTTON_RPAD_CLICKED"), (e[(e.GAMEPAD_BUTTON_RPAD_TOUCH = 40)] = "GAMEPAD_BUTTON_RPAD_TOUCH"), (e[(e.GAMEPAD_RIGHTSTICK_CLICK = 41)] = "GAMEPAD_RIGHTSTICK_CLICK"), (e[(e.GAMEPAD_RIGHTSTICK_TOUCH = 42)] = "GAMEPAD_RIGHTSTICK_TOUCH"), (e[(e.GAMEPAD_LEFTSTICK_TOUCH = 43)] = "GAMEPAD_LEFTSTICK_TOUCH"), (e[(e.GAMEPAD_BUTTON_LBACK_UPPER = 44)] = "GAMEPAD_BUTTON_LBACK_UPPER"), (e[(e.GAMEPAD_BUTTON_RBACK_UPPER = 45)] = "GAMEPAD_BUTTON_RBACK_UPPER"), (e[(e.GAMEPAD_BUTTON_LAST = 46)] = "GAMEPAD_BUTTON_LAST"), (e[(e.GAMEPAD_ANALOG_SCROLL = 47)] = "GAMEPAD_ANALOG_SCROLL"), (e[(e.GAMEPAD_ANALOG_LEFT_KEYBOARD_CURSOR = 48)] = "GAMEPAD_ANALOG_LEFT_KEYBOARD_CURSOR"), (e[(e.GAMEPAD_ANALOG_RIGHT_KEYBOARD_CURSOR = 49)] = "GAMEPAD_ANALOG_RIGHT_KEYBOARD_CURSOR"), (e[(e.GAMEPAD_ANALOG_LAST = 50)] = "GAMEPAD_ANALOG_LAST"); })(f || (f = {})); var I = n(8568); const y = { [f.GAMEPAD_BUTTON_A]: S.eV.OK, [f.GAMEPAD_BUTTON_B]: S.eV.CANCEL, [f.GAMEPAD_BUTTON_X]: S.eV.SECONDARY, [f.GAMEPAD_BUTTON_Y]: S.eV.OPTIONS, [f.GAMEPAD_BUTTON_SELECT]: S.eV.SELECT, [f.GAMEPAD_BUTTON_START]: S.eV.START, [f.GAMEPAD_BUTTON_LSHOULDER]: S.eV.BUMPER_LEFT, [f.GAMEPAD_BUTTON_RSHOULDER]: S.eV.BUMPER_RIGHT, [f.GAMEPAD_BUTTON_LTRIGGER]: S.eV.TRIGGER_LEFT, [f.GAMEPAD_BUTTON_RTRIGGER]: S.eV.TRIGGER_RIGHT, [f.GAMEPAD_LEFTSTICK_UP]: S.eV.DIR_UP, [f.GAMEPAD_LEFTSTICK_RIGHT]: S.eV.DIR_RIGHT, [f.GAMEPAD_LEFTSTICK_DOWN]: S.eV.DIR_DOWN, [f.GAMEPAD_LEFTSTICK_LEFT]: S.eV.DIR_LEFT, [f.GAMEPAD_LEFTSTICK_CLICK]: S.eV.LSTICK_CLICK, [f.GAMEPAD_RIGHTSTICK_CLICK]: S.eV.RSTICK_CLICK, [f.GAMEPAD_LEFTSTICK_TOUCH]: S.eV.LSTICK_TOUCH, [f.GAMEPAD_RIGHTSTICK_TOUCH]: S.eV.RSTICK_TOUCH, [f.GAMEPAD_BUTTON_LPAD_TOUCH]: S.eV.LPAD_TOUCH, [f.GAMEPAD_BUTTON_LPAD_CLICKED]: S.eV.LPAD_CLICK, [f.GAMEPAD_BUTTON_RPAD_TOUCH]: S.eV.RPAD_TOUCH, [f.GAMEPAD_BUTTON_RPAD_CLICKED]: S.eV.RPAD_CLICK, [f.GAMEPAD_BUTTON_LBACK_UPPER]: S.eV.REAR_LEFT_UPPER, [f.GAMEPAD_BUTTON_LBACK]: S.eV.REAR_LEFT_LOWER, [f.GAMEPAD_BUTTON_RBACK_UPPER]: S.eV.REAR_RIGHT_UPPER, [f.GAMEPAD_BUTTON_RBACK]: S.eV.REAR_RIGHT_LOWER, }, E = { [b.Xg.SystemKey0]: S.eV.STEAM_GUIDE, [b.Xg.SystemKey1]: S.eV.STEAM_QUICK_MENU }; class D extends S.oH { constructor() { var e, t, n; super(), (this.m_rgControllers = new Map()), "undefined" != typeof SteamClient && ((this.m_hUnregisterControllerDigitalInput = null === (e = SteamClient.Input) || void 0 === e ? void 0 : e.RegisterForControllerInputMessages(this.HandleControllerInputMessages)), null === (t = SteamClient.System.UI) || void 0 === t || t.RegisterForSystemKeyEvents(this.HandleSystemKeyEvents), null === (n = SteamClient.Input) || void 0 === n || n.RegisterForControllerListChanges(this.OnControllerListChanged)), this.SetSourceType(S.Rr.GAMEPAD); } OnControllerListChanged(e) { this.m_rgControllers.forEach((t, n) => { if (-1 == e.findIndex((e) => e.nControllerIndex == n)) { for (let e = 0; e in S.eV; e++) t.activeButtons[e] && this.OnButtonUp(e, n); this.OnAnalogPad(S.eV.LPAD_TOUCH, 0, 0, n), this.OnAnalogPad(S.eV.RPAD_TOUCH, 0, 0, n), this.m_rgControllers.delete(n); } }); } HandleSystemKeyEvents(e) { const t = E[e.eKey]; t && this.OnSystemButtonPress(t, e.nControllerIndex); } OnSystemButtonPress(e, t) { this.OnButtonDown(e, t), this.OnButtonUp(e, t); } GetController(e) { let t = this.m_rgControllers.get(e); return t || ((t = { activeButtons: {} }), this.m_rgControllers.set(e, t)), t; } EnableAnalogInputMessages(e) { var t, n; e ? (this.m_hUnregisterControllerAnalogInput = null === (t = SteamClient.Input) || void 0 === t ? void 0 : t.RegisterForControllerAnalogInputMessages(this.HandleControllerInputMessages)) : null === (n = this.m_hUnregisterControllerAnalogInput) || void 0 === n || n.unregister(); } HandleControllerInputMessages(e) { for (const t of e) { const e = y[t.nA], n = this.GetController(t.nC); null != e ? (t.bS && !n.activeButtons[e] ? ((n.activeButtons[e] = !0), this.OnButtonDown(e, t.nC)) : !t.bS && n.activeButtons[e] && ((n.activeButtons[e] = !1), this.OnButtonUp(e, t.nC))) : t.nA == f.GAMEPAD_ANALOG_SCROLL || (t.nA == f.GAMEPAD_ANALOG_LEFT_KEYBOARD_CURSOR ? n.activeButtons[S.eV.LPAD_TOUCH] && this.OnAnalogPad(S.eV.LPAD_TOUCH, t.x, t.y, t.nC) : t.nA == f.GAMEPAD_ANALOG_RIGHT_KEYBOARD_CURSOR && n.activeButtons[S.eV.RPAD_TOUCH] && this.OnAnalogPad(S.eV.RPAD_TOUCH, t.x, t.y, t.nC)); } } } (0, v.gn)([I.a], D.prototype, "OnControllerListChanged", null), (0, v.gn)([I.a], D.prototype, "HandleSystemKeyEvents", null), (0, v.gn)([I.a], D.prototype, "EnableAnalogInputMessages", null), (0, v.gn)([I.a], D.prototype, "HandleControllerInputMessages", null); n(82398); class w extends S.oH { constructor(e) { super(), (this.m_nAccumulatedMouseMovement = 0), (this.m_bFirstMouseUpdate = !0), (this.m_lastButtonDown = S.eV.INVALID), this.SetSourceType(S.Rr.MOUSE), e.addEventListener("mousedown", this.OnMouseDown), e.addEventListener("mouseup", this.OnMouseUp), e.addEventListener("mousemove", this.OnMouseMove), e.addEventListener("blur", this.Reset); } TranslateKey(e) { return 3 === e.button ? S.eV.CANCEL : S.eV.INVALID; } OnMouseDown(e) { if (e.defaultPrevented) return; const t = this.TranslateKey(e); t != S.eV.INVALID && (e.preventDefault(), t != this.m_lastButtonDown && (this.Reset(), this.OnButtonDown(t), (this.m_lastButtonDown = t)), this.OnNavigationTypeChanged(S.Rr.MOUSE)); } OnMouseUp(e) { const t = this.TranslateKey(e); t != S.eV.INVALID && (this.OnButtonUp(t), (this.m_lastButtonDown = S.eV.INVALID), e.preventDefault()); } OnMouseMove(e) { if (!e.defaultPrevented) { if (this.m_bFirstMouseUpdate) return (this.m_nLastScreenX = e.screenX), (this.m_nLastScreenY = e.screenY), void (this.m_bFirstMouseUpdate = !1); (this.m_nAccumulatedMouseMovement += Math.abs(e.screenX - this.m_nLastScreenX) + Math.abs(e.screenY - this.m_nLastScreenY)), this.m_nAccumulatedMouseMovement > 500 && (this.Reset(), this.OnNavigationTypeChanged(S.Rr.MOUSE)); } } Reset() { (this.m_nAccumulatedMouseMovement = 0), (this.m_bFirstMouseUpdate = !0), this.m_lastButtonDown != S.eV.INVALID && (this.OnButtonUp(this.m_lastButtonDown), (this.m_lastButtonDown = S.eV.INVALID)); } } (0, v.gn)([I.a], w.prototype, "TranslateKey", null), (0, v.gn)([I.a], w.prototype, "OnMouseDown", null), (0, v.gn)([I.a], w.prototype, "OnMouseUp", null), (0, v.gn)([I.a], w.prototype, "OnMouseMove", null), (0, v.gn)([I.a], w.prototype, "Reset", null); n(95967); n(53600); var R = n(50649), A = n(84290), M = n(93635), k = n(87018); const T = (0, R.Pi)((e) => { const { onCancel: t, closeModal: n, bOKDisabled: r, onOK: a } = e, s = (0, g.id)(); (0, M.X)(n || t, `Either closeModal or onCancel should be passed to GenericDialog. Classes: ${e.className} ${e.modalClassName}`); const l = i.useCallback(() => { (t && t()) || (n && n()); }, [t, n]), c = i.useCallback( () => (0, v.mG)(void 0, void 0, void 0, function* () { r || (a && (yield a()), n && n()); }), [r, a, n], ); return i.createElement(u, { onEscKeypress: l, className: e.modalClassName, bDestructiveWarning: e.bDestructiveWarning, bDisableBackgroundDismiss: e.bDisableBackgroundDismiss, bHideCloseIcon: e.bHideCloseIcon }, i.createElement(o.oX, { classNameContent: (0, k.Z)("GenericConfirmDialog", e.bAllowFullSize && "DialogContentFullSize", e.className), onSubmit: c, bCenterVertically: !s }, e.children)); }); var L = n(68816); function G(e, t, n, o, r, a, s) { return new Promise((l, c) => { e(i.createElement(F, { strTitle: t, strDescription: n, strOKButtonText: o, strCancelButtonText: r, onOK: l, onCancel: c, bDestructiveWarning: a, children: s })); }); } function O(e, t, n, o, r) { return new Promise((a, s) => { e(i.createElement(F, { bAlertDialog: !0, strTitle: t, strDescription: n, strOKButtonText: o, onOK: a, onCancel: a, children: r })); }); } let F = class extends i.Component { Cancel() { this.props.onCancel && this.props.onCancel(), this.props.closeModal && this.props.closeModal(); } render() { const e = this.props, { strTitle: t, strDescription: n, strOKButtonText: r, strCancelButtonText: a, strMiddleButtonText: s, onMiddleButton: l, bAlertDialog: c, children: m } = e, d = (0, v._T)(e, ["strTitle", "strDescription", "strOKButtonText", "strCancelButtonText", "strMiddleButtonText", "onMiddleButton", "bAlertDialog", "children"]), h = r || (0, A.Xx)("#Button_Close"); let u = i.createElement(o.o9, { bOKDisabled: this.props.bOKDisabled, bCancelDisabled: this.props.bCancelDisabled, strOKText: r, onCancel: this.Cancel, strCancelText: a }); return ( c ? (u = i.createElement(o.KM, null, h)) : l && (u = i.createElement(o.$0, { bOKDisabled: this.props.bOKDisabled, bCancelDisabled: this.props.bCancelDisabled, strOKText: r, onCancel: this.Cancel, strCancelText: a, onUpdate: () => { l(), this.props.closeModal && this.props.closeModal(); }, strUpdateText: s, bUpdateDisabled: this.props.bMiddleDisabled, })), i.createElement(T, Object.assign({}, d), i.createElement(o.h4, null, " ", t || i.createElement(i.Fragment, null, " "), " "), i.createElement(o.V5, { onCancelButton: this.Cancel }, i.createElement(o.Ac, null, n, m), i.createElement(o.$_, null, u))) ); } }; (0, v.gn)([_.ak], F.prototype, "Cancel", null), (F = (0, v.gn)([R.Pi], F)); let B = class extends i.Component { render() { const e = Object.assign({ strTitle: (0, A.Xx)("#Error_FailureNotice"), strDescription: (0, A.Xx)("#Error_GenericFailureDescription"), bAlertDialog: !0, bDestructiveWarning: !0, onOK: () => {}, onCancel: () => {} }, this.props); return i.createElement(F, Object.assign({}, e)); } }; B = (0, v.gn)([R.Pi], B); let x = class extends i.Component { render() { let e = Object.assign({ onOK: () => {}, onCancel: () => {}, bAlertDialog: !0 }, this.props); return (e.strDescription = i.createElement("span", { style: { whiteSpace: "pre-line" } }, " ", e.strDescription, " ")), i.createElement(F, Object.assign({}, e)); } }; function N(e, t, n) { (0, L.AM)(i.createElement(x, { strTitle: e, strDescription: t }), n); } x = (0, v.gn)([R.Pi], x); }, 40172: (e, t, n) => { "use strict"; n.d(t, { l6: () => h, lc: () => u }); var i = n(27378), o = n(31542), r = n(33690), a = n(24424), s = n(61963), l = n(77898), c = n(76135), m = n(55948), d = n(10553); n(65204); function h(e) { const { Modal: t } = e, { name: n, modalProps: l, options: h } = t, u = (0, r.Wy)().ownerWindow, { popup: p, element: _ } = (0, a.B)( n, { title: l.strTitle, html_class: "client_chat_frame fullheight ModalDialogPopup LegacyPopup " + (l.className || ""), body_class: "fullheight ModalDialogBody", popup_class: "fullheight popup_chat_frame", owner_window: void 0, replace_existing_popup: !0, target_browser: l.browserContext, availscreenwidth: u.screen.availWidth, availscreenheight: u.screen.availHeight, bModal: l.bHideMainWindowForPopouts }, { updateParamsBeforeShow: (e) => (function (e, t, n, i) { var o, r; let a, s, l, c = t.popupWidth || 500, m = t.popupHeight || 400; if (d.De.IN_CLIENT && (null === (r = null === (o = null == i ? void 0 : i.SteamClient) || void 0 === o ? void 0 : o.Browser) || void 0 === r ? void 0 : r.GetBrowserID)) l = i.SteamClient.Browser.GetBrowserID(); else { let e = i.screen; (a = (e.availWidth - c) / 2), (s = (e.availHeight - m) / 2); let t = e; void 0 !== t.availLeft && void 0 !== t.availTop && ((a += t.availLeft), (s += t.availTop)); } return Object.assign(Object.assign({}, e), { dimensions: { width: c, height: m, left: a, top: s }, center_on_window: n.bCenterOnWindow ? i : void 0, window_opener_id: l }); })(e, l, h, u), onClose: () => l.fnOnClose && l.fnOnClose(), }, ), g = null == h ? void 0 : h.bHideActions, C = "number" == typeof (null == h ? void 0 : h.nDragAreaHeight) ? { height: h.nDragAreaHeight } : void 0; return _ ? o.createPortal(i.createElement(r.Rt, { ownerWindow: p }, i.createElement("div", { className: "PopupFullWindow", onContextMenu: s.T }, i.createElement(m.T, { hideMin: !0, hideMax: !0, popup: p, hideActions: g, style: C }), i.createElement(c.Y0, { browserInfo: l.browserContext, bCenterPopupsOnWindow: h.bCenterOnWindow }, t.element))), _) : null; } class u extends l.kv { constructor(e, t, n, i) { super(t), (this.m_strName = e), (this.m_modalProps = n), (this.m_options = i); } get name() { return this.m_strName; } get modalProps() { return this.m_modalProps; } get options() { return this.m_options; } } }, 77898: (e, t, n) => { "use strict"; n.d(t, { QA: () => l, kv: () => s }); var i = n(85556), o = n(8568), r = n(22394); class a { constructor() { this.key = "Modal_" + a.sm_lastKey++; } } a.sm_lastKey = 0; class s extends a { constructor(e) { super(), (this.ModalUpdatedCallback = new r.pB()), (this.element = e); } UpdateModal(e) { (this.element = e), this.ModalUpdatedCallback.Dispatch(); } } class l extends a { constructor() { super(), (this.m_OnElementReadyCallbacks = new r.pB()), (this.m_OnActiveModalCallbacks = new r.pB()); } get OnElementReadyCallbacks() { return this.m_OnElementReadyCallbacks; } get OnModalActiveCallbacks() { return this.m_OnActiveModalCallbacks; } RefModalElement(e) { e && this.m_OnElementReadyCallbacks.Dispatch(e); } SetActive(e) { this.m_OnActiveModalCallbacks.Dispatch(e); } } (0, i.gn)([o.a], l.prototype, "RefModalElement", null); }, 76135: (e, t, n) => { "use strict"; n.d(t, { Y0: () => R, Yu: () => M, $C: () => A }); var i = n(85556), o = n(27378), r = n(31542), a = n(94198), s = n(19399), l = n(66147), c = n(82909), m = n(78482), d = n(33690), h = n(78654), u = n(24424), p = n(61963), _ = n(97841), g = n.n(_), C = n(38571), f = n(88669), v = n(2049); function S(e) { var t; const { manager: n, ownerWindow: i, browserInfo: a, bSuppressMouseOverlay: s } = e, l = (0, v.NW)(), c = null === (t = i.document) || void 0 === t ? void 0 : t.body; (0, v.Qg)(n.OnMenusChanged, l); const m = !s && n.BShouldRenderMouseOverlay(), d = n.GetAllMenus(); return o.createElement( o.Fragment, null, m && r.createPortal(o.createElement(p.Vc, null), c), d.map((e) => o.createElement(C.SV, { key: e.key }, o.createElement(b, { instance: e, elRoot: c, browserInfo: a }))), ); } function b(e) { var t; const { instance: n, elRoot: i, browserInfo: r, children: a } = e, s = A(), l = o.useRef(void 0); if (void 0 === l.current) if (i) { const e = i.ownerDocument.defaultView; l.current = (n.options.bForcePopup || e.innerWidth < 400 || (null == s ? void 0 : s.BOnlyPopups())) && !!(null === (t = e.SteamClient) || void 0 === t ? void 0 : t.Window); } else l.current = !0; const c = o.useMemo(() => ({ instance: n, styles: g(), presentation: 0 }), [n]), m = a || n.ReactElement; return o.createElement(p.Yr.Provider, { value: c }, l.current ? o.createElement(y, { instance: n, browserInfo: r, children: m }) : o.createElement(I, { instance: n, elRoot: i, children: m })); } function I(e) { const { instance: t, elRoot: n, children: i } = e; return r.createPortal(o.createElement(p.Wn, Object.assign({}, t.position), i), n); } function y(e) { const { instance: t, browserInfo: n, children: i } = e, a = o.useRef(null), s = (0, d.Wy)().ownerWindow, l = s.SteamClient.Browser.GetBrowserID(), c = o.useCallback( (e) => { const { options: n, position: i } = t, o = i.element; if (n.bScreenCoordinates) e.dimensions = { left: i.clientX, top: i.clientY, width: 2, height: 1 }; else { let t = f.sH(s, o.getBoundingClientRect()); (e.dimensions = { left: t.right, top: t.top, width: 2, height: 1 }), (e.availscreenwidth = s.screen.availWidth), (e.availscreenheight = s.screen.availHeight); } return e; }, [s, t], ); let m = t.options.bStandalone ? (0, d.sB)(d.iJ.StandaloneContextMenu) : (0, d.sB)(d.iJ.PopupContextMenu); t.options.bCreateHidden && (m |= d.eL.Hidden), t.options.bAlwaysOnTop && (m |= d.eL.AlwaysOnTop); const { popupObj: _, element: C } = (0, u.B)("contextmenu_" + t.key, { title: t.options.title || "Menu", html_class: g().ContextMenuPopup + " client_chat_frame", body_class: "ContextMenuPopupBody", replace_existing_popup: !1, target_browser: n, window_opener_id: l, bHideOnClose: !0, eCreationFlags: m }, { updateParamsBeforeShow: c }); return ( (0, o.useEffect)(() => { if (_) if (t.visible) { a.current && a.current.PositionMenu(), a.current && a.current.PositionPopupWindow(); let e = t.options.bNoFocusWhenShown ? h.IF.k_EWindowBringToFrontWithoutForcingOS : h.IF.k_EWindowBringToFrontAndForceOS; t.TakeFocus(e); } else t.options.bRetainOnHide && window.setTimeout(() => { var e; null === (e = _.window) || void 0 === e || e.SteamClient.Window.HideWindow(); }, 30); }, [_, t, t.visible]), M(_.window), o.useLayoutEffect(() => { t.SetPopup(_); }, [t, _]), C ? r.createPortal(o.createElement(p.Wn, Object.assign({ ref: a }, t.position, { parentWin: s, popup: _ }), i), C) : null ); } const E = o.createContext(null); function D(e) { const { ActiveMenuComponent: t, refContextMenuManager: n, browserInfo: i, bRegisterMenuManager: r = !0, children: a } = e, s = (0, d.Wy)(), l = (null == s ? void 0 : s.ownerWindow) || window, h = o.useRef(); h.current || (h.current = new m.u()), o.useLayoutEffect(() => { if (r) return c.Oo.SetMenuManager(l, h.current), () => c.Oo.SetMenuManager(l, void 0); }, [l, r]), o.useLayoutEffect(() => ((0, v.k$)(n, h.current), () => (0, v.k$)(n, void 0)), [n]); const u = t || S; return o.createElement(E.Provider, { value: h.current }, o.createElement(u, { manager: h.current, ownerWindow: l, browserInfo: i }), a); } const w = o.createContext({}), R = o.memo(function (e) { const { children: t, bRenderOverlayAtRoot: n, refModalManager: c, DialogWrapper: m, ContextMenuComponent: d, refContextMenuManager: h, browserInfo: u, bUsePopups: p, bOnlyPopups: _, bCenterPopupsOnWindow: g, bRegisterManagersWithWindow: f = !0 } = e, v = (0, i._T)(e, ["children", "bRenderOverlayAtRoot", "refModalManager", "DialogWrapper", "ContextMenuComponent", "refContextMenuManager", "browserInfo", "bUsePopups", "bOnlyPopups", "bCenterPopupsOnWindow", "bRegisterManagersWithWindow"]), S = o.useRef(); S.current || (S.current = new l.pG()); let b = o.createElement(s.t, Object.assign({}, v, { DialogWrapper: m, ModalManager: S.current, bRegisterModalManager: f })); e.bRenderOverlayAtRoot && "body" in document && (b = r.createPortal(b, document.body)), (0, a.LY)(c, S.current), o.useEffect(() => { var e, t, n; void 0 !== p && (null === (e = S.current) || void 0 === e || e.SetUsePopups(p)), void 0 !== g && (null === (t = S.current) || void 0 === t || t.SetCenterPopupsOnWindow(g)), void 0 !== _ && (null === (n = S.current) || void 0 === n || n.SetOnlyPopups(_)); }, [p, g, _]); const I = o.useMemo(() => ({ ModalManager: S.current, DialogWrapper: m }), [m]); return o.createElement(w.Provider, { value: I }, o.createElement(D, { ActiveMenuComponent: d, refContextMenuManager: h, browserInfo: u, bRegisterMenuManager: f }, o.createElement(C.SV, null, b), e.children)); }); function A() { return o.useContext(w).ModalManager; } function M(e) { const t = A(); o.useEffect(() => { if (e) return l.Zp.RegisterModalManager(t, e); }, [e, t]); } }, 66147: (e, t, n) => { "use strict"; n.d(t, { BL: () => d, Zp: () => m, pG: () => l }); n(27378); var i = n(91300), o = n(40172), r = n(93635), a = n(22394), s = (n(2049), n(77898)); n(76135); class l { constructor() { (this.m_bUsePopups = !0), (this.m_bOnlyPopups = !1), (this.m_bCenterPopupsOnWindow = !1), (this.m_rgModals = []), (this.m_OnModalCountChangedCallbacks = new a.pB()), (this.m_OnModalShownCallbacks = new a.pB()), (this.m_OnModalHiddenCallbacks = new a.pB()), (this.m_cMountedOverlays = 0), (this.m_rgMeasureModalRequests = []), (this.m_OnMeasureModal = new a.pB()), (this.m_rgLegacyPopupModals = []), (this.m_OnLegacyPopupModalCountChanged = new a.pB()); } get ModalCountChangedCallbacks() { return this.m_OnModalCountChangedCallbacks; } get LegacyPopupModalCountChangedCallbacks() { return this.m_OnLegacyPopupModalCountChanged; } RegisterOnModalShownCallback(e) { return this.m_OnModalShownCallbacks.Register(e); } RegisterOnModalHiddenCallback(e) { return this.m_OnModalHiddenCallbacks.Register(e); } RegisterMeasureModalCallback(e) { return this.m_OnMeasureModal.Register(e); } TakeMeasureModalRequest() { return this.m_rgMeasureModalRequests.length ? this.m_rgMeasureModalRequests.shift() : void 0; } RegisterOverlay(e) { (0, r.X)(0 == this.m_cMountedOverlays, "Duplicate modal DialogOverlay; modals will appear in both"), this.m_cMountedOverlays++; const t = this.m_OnModalCountChangedCallbacks.Register(e); return () => { this.m_cMountedOverlays--, t.Unregister(); }; } OnModalCountChanged(e) { "show" == e && 0 == this.m_cMountedOverlays && window.setTimeout(() => { (0, r.X)(this.m_cMountedOverlays > 0, "Modal was shown but ModalManager has no associated DialogOverlay"); }, 50), this.m_OnModalCountChangedCallbacks.Dispatch(this.m_rgModals.length), "show" == e ? this.m_OnModalShownCallbacks.Dispatch(this.m_rgModals.length) : "hide" == e && this.m_OnModalHiddenCallbacks.Dispatch(this.m_rgModals.length); } get modals() { return this.m_rgModals; } get active_modal() { return this.m_rgModals.length ? this.m_rgModals[this.m_rgModals.length - 1] : void 0; } ShowModal(e) { return this.ShowModalInternal(e); } RemoveModal(e) { let t = this.m_rgModals.indexOf(e); -1 != t && this.m_rgModals.splice(t, 1), this.OnModalCountChanged("hide"); } ShowModalInternal(e) { (0, r.X)(!this.m_bOnlyPopups, "Attempting to show modal in popup-only modal manager; will not display."); const t = new s.kv(e); this.m_rgModals.push(t); const n = { Close: () => { this.RemoveModal(t); }, Update: (e) => { t.UpdateModal(e); }, }; return this.OnModalCountChanged("show"), n; } ShowPortalModal() { (0, r.X)(!this.m_bOnlyPopups, "Attempting to show modal in popup-only modal manager; will not display."); const e = new s.QA(); return ( this.m_rgModals.push(e), this.OnModalCountChanged("show"), { key: e.key, Close: () => { this.RemoveModal(e); }, OnElementReadyCallbacks: e.OnElementReadyCallbacks, OnModalActiveCallbacks: e.OnModalActiveCallbacks, } ); } SetUsePopups(e) { this.m_bUsePopups = e; } BUsePopups() { return this.m_bUsePopups || this.m_bOnlyPopups; } SetOnlyPopups(e) { this.m_bOnlyPopups = e; } BOnlyPopups() { return this.m_bOnlyPopups; } SetCenterPopupsOnWindow(e) { this.m_bCenterPopupsOnWindow = e; } BCenterPopupsOnWindow() { return this.m_bCenterPopupsOnWindow; } RequestModalMeasure(e, t, n) { this.m_rgMeasureModalRequests.push({ rctToMeasure: e, fnResults: t, promiseContentReady: n }), this.m_OnMeasureModal.Dispatch(); } get legacy_popup_modals() { return this.m_rgLegacyPopupModals; } ShowLegacyPopupModal(e, t, n, i) { const r = () => { let e = this.m_rgLegacyPopupModals.indexOf(a); -1 != e && this.m_rgLegacyPopupModals.splice(e, 1), this.m_OnLegacyPopupModalCountChanged.Dispatch(this.m_rgLegacyPopupModals.length), n.fnOnClose && n.fnOnClose(); }, a = new o.lc(e, t, Object.assign(Object.assign({}, n), { fnOnClose: r }), Object.assign({ bCenterOnWindow: this.m_bCenterPopupsOnWindow }, i)); return ( this.m_rgLegacyPopupModals.push(a), this.m_OnLegacyPopupModalCountChanged.Dispatch(this.m_rgLegacyPopupModals.length), { Close: r, Update: (e) => { a.UpdateModal(e); }, } ); } } class c { constructor() { this.m_mapModalManager = new WeakMap(); } GetModalManager(e) { let t = this.m_mapModalManager.get(e); return t || (console.assert(!1, `Early access to modal manager, creating one for ${e.document.title}`), (t = new l()), this.m_mapModalManager.set(e, t)), t; } RegisterModalManager(e, t) { (0, r.X)(!this.m_mapModalManager.has(t) || t == window, `Stomping CModalManager for ${t.document.title}!`); const n = this.m_mapModalManager.get(t); return ( this.m_mapModalManager.set(t, e), () => { n ? this.m_mapModalManager.set(t, n) : this.m_mapModalManager.delete(t); } ); } UnregisterModalManager(e) { this.m_mapModalManager.delete(e); } } const m = (0, i.Yt)("ModalManagerFactory", () => new c()); function d(e) { return m.GetModalManager(e); } }, 68816: (e, t, n) => { "use strict"; n.d(t, { AM: () => m, BR: () => d, e1: () => r.e1, x1: () => c }); var i = n(85556), o = n(27378), r = n(65204), a = n(93635), s = n(84290), l = n(10553); function c(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { const l = (0, r.BL)(t), c = (null == n ? void 0 : n.bForcePopOut) || u(l); (0, a.X)(!(c && (null == n ? void 0 : n.bNeverPopOut)), "Conflicting popout options; will ignore bNeverPopOut"); const m = !c && !0 === (null == n ? void 0 : n.bNeverPopOut), p = u(l) || (!m && h(l, t)), _ = c && (null == n ? void 0 : n.popupWidth) && (null == n ? void 0 : n.popupHeight); let g; if (p && !_) { const t = o.cloneElement(e, { closeModal: () => {} }); g = yield (function (e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { return new Promise((i, o) => { e.RequestModalMeasure(t, i, n); }); }); })(l, t, null == n ? void 0 : n.promiseRenderComplete); } const C = g && g.height / t.innerHeight < 0.9 && g.width / t.innerWidth < 0.8; if (m || (!c && C)) return d(e, t); { const i = { strTitle: (null == n ? void 0 : n.strTitle) || (0, s.Xx)("#Dialog_DefaultWindowTitle"), fnOnClose: null == n ? void 0 : n.fnOnClose, popupWidth: (null == n ? void 0 : n.popupWidth) || (null == g ? void 0 : g.width), popupHeight: (null == n ? void 0 : n.popupHeight) || (null == g ? void 0 : g.height), bHideMainWindowForPopouts: null == n ? void 0 : n.bHideMainWindowForPopouts, className: null == n ? void 0 : n.className }, o = { bHideActions: null == n ? void 0 : n.bHideActionIcons }, r = (null == n ? void 0 : n.browserContext) || t.browserInfo; return d(e, t, i.strTitle, i, r, o, l); } }); } function m(e, t, n) { return (0, i.mG)(this, void 0, void 0, function* () { return c(e, t, Object.assign({ bHideMainWindowForPopouts: !0 }, n)); }); } function d(e, t, n, i, a, s, l) { let c, m; const d = e.props.closeModal, u = () => { m && m.Close(), d && d(), (null == i ? void 0 : i.fnOnClose) && i.fnOnClose(); }, p = () => { c && c.Close(), u(); }, _ = o.cloneElement(e, { closeModal: p }); if (h((l = l || (0, r.BL)(t)), t) && i && n) { if (i.bHideMainWindowForPopouts) { const e = o.createElement(r.e1, { className: "Hidden", onEscKeypress: _.props.bDisableBackgroundDismiss ? void 0 : p }, o.createElement("div", null)); m = l.ShowModal(e); } const e = Object.assign(Object.assign({}, i), { fnOnClose: u, browserContext: a }); c = l.ShowLegacyPopupModal(n, _, e, s); } else c = l.ShowModal(_); return c; } function h(e, t) { return (e = e || (0, r.BL)(t || window)), l.De.USE_POPUPS && e.BUsePopups(); } function u(e) { return e.BOnlyPopups && e.BOnlyPopups(); } }, 16518: (e, t, n) => { "use strict"; n.d(t, { $06: () => we, $gZ: () => g, $nj: () => y, AlT: () => Ne, Bh5: () => xe, Cq4: () => R, Eep: () => ie, Ehc: () => re, FUf: () => P, Fsn: () => Ce, Fyr: () => fe, G$j: () => se, HEZ: () => te, JgI: () => b, JrY: () => Y, KKY: () => Ke, Kon: () => H, Lao: () => de, M9_: () => x, MFo: () => k, MrB: () => ke, NBO: () => L, NN7: () => G, NP6: () => ae, P9w: () => Se, PjE: () => S, QlI: () => Re, SUY: () => v, TCU: () => X, THo: () => Ee, Ucz: () => Me, Uos: () => oe, V7n: () => ge, VR: () => Te, Vgm: () => Oe, X: () => D, Xsu: () => _e, YVI: () => ze, YVR: () => ve, YqJ: () => le, YtI: () => f, Yx0: () => O, ZAu: () => F, ZNm: () => pe, Zrf: () => h, _F3: () => Le, _GE: () => Fe, _OD: () => q, bpe: () => T, chI: () => Ae, dCe: () => $e, dzL: () => Q, eNM: () => Qe, fHW: () => B, ffh: () => j, foH: () => u, gR: () => ce, ge: () => ee, h9: () => _, hLd: () => be, hnm: () => $, hoX: () => he, hxK: () => K, iz5: () => M, j5H: () => Ue, j7C: () => je, k4K: () => I, k4w: () => z, lBf: () => m, lO8: () => N, lVV: () => p, lsH: () => ye, mKE: () => J, miF: () => Xe, nWq: () => d, nkn: () => ne, pUF: () => V, pVO: () => w, pkz: () => W, r6F: () => me, rFk: () => ue, ret: () => C, shV: () => Z, sqQ: () => Ve, tEX: () => De, uZu: () => Be, ui7: () => Ie, vyu: () => qe, x0L: () => We, xg: () => Pe, xsH: () => A, yBp: () => U, yRy: () => E, yTr: () => He, yVt: () => Ge, z5E: () => Ze, }); var i = n(85556), o = n(27378), r = n(87018), a = n(35313), s = n.n(a), l = n(10553), c = n(89051); function m(e) { const [t, n] = (0, c.y)(); return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 15 23", fill: "none" }, e), o.createElement("g", { clipPath: n }, o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M6.9955 11.5L15 3.4955L11.5045 -1.52793e-07L0.00450275 11.5L11.5045 23L15 19.5045L6.9955 11.5Z" })), o.createElement("defs", null, o.createElement("clipPath", { id: t }, o.createElement("rect", { fill: "currentColor", width: "15", height: "23" })))); } function d(e) { const { className: t } = e; return o.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: (0, r.Z)(t, "SVGIcon_Button SVGIcon_Hyperlink"), "data-name": "Layer 1", viewBox: "0 0 100 100", x: "0px", y: "0px" }, o.createElement("g", { "data-name": "Group" }, o.createElement("path", { "data-name": "Path", d: "M50.86,20.23l-9,9,4.24,4.24,9-9c6.35-6.35,16.09-6.93,21.73-1.3s5,15.38-1.3,21.73l-9,9,4.24,4.24,9-9c8.69-8.69,9.27-22.24,1.3-30.21S59.55,11.55,50.86,20.23Z" }), o.createElement("path", { "data-name": "Path", d: "M44.89,75.53a17.22,17.22,0,0,1-11.28,5.13A13.23,13.23,0,0,1,19.34,66.39a17.22,17.22,0,0,1,5.13-11.28l9-9-4.24-4.24-9,9a23.21,23.21,0,0,0-6.88,15.22c0,.37,0,.74,0,1.11A19.19,19.19,0,0,0,33.91,86.66a23.21,23.21,0,0,0,15.22-6.88l9-9-4.24-4.24Z" }), o.createElement("rect", { "data-name": "Path", className: "Link1", x: "28.75", y: "47", width: "42.48", height: "6", transform: "translate(-20.71 50) rotate(-45)" }))); } function h(e) { const t = (0, r.Z)("SVGIcon_Button", "SVGIcon_Settings", e.className); return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: t, x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "-305.5 396.5 256 256", enableBackground: "new -305.5 396.5 256 256" }, o.createElement("path", { d: "M-232.755,589.942l3.103,2.408c5.78,4.492,11.973,8.18,18.409,10.959l3.581,1.547l2.276,33.783 c0.089,1.33,1.385,2.54,2.715,2.54h48.62c1.355,0,2.745-1.273,2.852-2.621l2.74-33.284l3.602-1.496 c6.406-2.656,12.646-6.262,18.554-10.707l3.137-2.366l30.578,15.009c1.155,0.571,2.924,0.017,3.563-1.087l24.303-42.1 c0.674-1.173,0.265-3.014-0.852-3.785l-27.872-19.309l0.469-3.832c0.495-4.032,0.725-7.395,0.725-10.57 c0-3.129-0.227-6.5-0.687-10.307l-0.469-3.896l28.699-19.253c1.112-0.741,1.509-2.473,0.84-3.627l-24.3-42.104 c-0.657-1.139-2.502-1.727-3.7-1.155l-31.208,14.748l-3.091-2.341c-5.571-4.224-11.466-7.688-17.522-10.306l-3.58-1.548 l-2.34-34.887c-0.089-1.33-1.381-2.536-2.715-2.536h-48.617c-1.355,0-2.74,1.274-2.851,2.626l-2.834,34.371l-3.593,1.501 c-6.082,2.535-12.028,5.924-17.667,10.071l-3.124,2.302l-31.392-15.413c-1.168-0.575-2.924-0.025-3.559,1.074l-24.309,42.107 c-0.678,1.172-0.264,3.014,0.848,3.781l28.068,19.444l-0.524,3.883c-0.592,4.378-0.865,8.018-0.865,11.462 c0,2.988,0.179,6.065,0.55,9.403l0.431,3.853l-28.528,19.125c-1.108,0.742-1.509,2.468-0.84,3.632l24.308,42.1 c0.656,1.142,2.489,1.726,3.7,1.154L-232.755,589.942z M-177.498,560.051c-19.311,0-35.02-15.709-35.02-35.02 s15.709-35.02,35.02-35.02s35.02,15.709,35.02,35.02S-158.188,560.051-177.498,560.051z", fill: "currentColor", }), ); } function u(e) { return o.createElement( "svg", Object.assign({ viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M22 6H2V27H12L18 34L24 27H34V21H27C24.2386 21 22 18.7614 22 16V6ZM8.11107 18.5787C8.5222 18.8534 9.00555 19 9.5 19C9.8283 19 10.1534 18.9353 10.4567 18.8097C10.76 18.6841 11.0356 18.4999 11.2678 18.2678C11.4999 18.0356 11.6841 17.76 11.8097 17.4567C11.9353 17.1534 12 16.8283 12 16.5C12 16.0055 11.8534 15.5222 11.5787 15.1111C11.304 14.7 10.9135 14.3795 10.4567 14.1903C9.99989 14.0011 9.49723 13.9516 9.01227 14.048C8.52732 14.1445 8.08186 14.3826 7.73223 14.7322C7.3826 15.0819 7.1445 15.5273 7.04804 16.0123C6.95157 16.4972 7.00108 16.9999 7.1903 17.4567C7.37952 17.9135 7.69995 18.304 8.11107 18.5787ZM16.6111 18.5787C17.0222 18.8534 17.5055 19 18 19C18.3283 19 18.6534 18.9353 18.9567 18.8097C19.26 18.6841 19.5356 18.4999 19.7678 18.2678C19.9999 18.0356 20.1841 17.76 20.3097 17.4567C20.4353 17.1534 20.5 16.8283 20.5 16.5C20.5 16.0055 20.3534 15.5222 20.0787 15.1111C19.804 14.7 19.4135 14.3795 18.9567 14.1903C18.4999 14.0011 17.9972 13.9516 17.5123 14.048C17.0273 14.1445 16.5819 14.3826 16.2322 14.7322C15.8826 15.0819 15.6445 15.5273 15.548 16.0123C15.4516 16.4972 15.5011 16.9999 15.6903 17.4567C15.8795 17.9135 16.2 18.304 16.6111 18.5787Z", fill: "currentColor", }), ); } function p() { return (0, l.id)() ? o.createElement( "svg", { width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M31.7 15.75C31.703 13.1045 30.94 10.5148 29.5031 8.2936C28.0663 6.07238 26.0171 4.31465 23.603 3.23272C21.189 2.15079 18.5133 1.79092 15.8991 2.19659C13.285 2.60226 10.8442 3.75611 8.87157 5.51878C6.89893 7.28145 5.47882 9.57755 4.78275 12.1298C4.08667 14.682 4.14441 17.3811 4.94899 19.9013C5.75356 22.4214 7.27057 24.6546 9.31678 26.3313C11.363 28.008 13.8509 29.0565 16.48 29.35V35.05L27.31 25.79C28.6947 24.5098 29.7995 22.9569 30.555 21.2291C31.3105 19.5012 31.7003 17.6358 31.7 15.75ZM27 14.572V17.428L24.63 17.86C24.4791 18.3905 24.2677 18.9018 24 19.384L25.374 21.34L23.352 23.362L21.384 22C20.9023 22.2718 20.391 22.4872 19.86 22.642L19.428 25H16.572L16.14 22.63C15.6096 22.4791 15.0982 22.2677 14.616 22L12.648 23.374L10.626 21.352L12 19.384C11.7282 18.9023 11.5128 18.391 11.358 17.86L9 17.428V14.572L11.358 14.14C11.5128 13.609 11.7282 13.0977 12 12.616L10.626 10.648L12.648 8.626L14.616 10C15.0977 9.72818 15.609 9.51276 16.14 9.358L16.572 7H19.428L19.86 9.358C20.391 9.51276 20.9023 9.72818 21.384 10L23.352 8.626L25.362 10.648L24 12.616C24.2718 13.0977 24.4872 13.609 24.642 14.14L27 14.572ZM16.3333 18.4944C16.8266 18.8241 17.4067 19 18 19C18.394 19 18.7841 18.9224 19.1481 18.7716C19.512 18.6209 19.8427 18.3999 20.1213 18.1213C20.3999 17.8427 20.6209 17.512 20.7716 17.1481C20.9224 16.7841 21 16.394 21 16C21 15.4067 20.8241 14.8266 20.4944 14.3333C20.1648 13.8399 19.6962 13.4554 19.1481 13.2284C18.5999 13.0013 17.9967 12.9419 17.4147 13.0576C16.8328 13.1734 16.2982 13.4591 15.8787 13.8787C15.4591 14.2982 15.1734 14.8328 15.0576 15.4147C14.9419 15.9967 15.0013 16.5999 15.2284 17.1481C15.4554 17.6962 15.8399 18.1648 16.3333 18.4944Z", fill: "currentColor", }), ) : o.createElement( "svg", { xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_ChatSettings", version: "1.1", x: "0px", y: "0px", viewBox: "0 0 600 600" }, o.createElement("g", null, o.createElement("path", { d: "M256,0C126.6,0,21.3,104.7,21.3,233.7c0,65.9,26.5,125.4,74.7,168.3v99.3c0,3.8,2,7.4,5.3,9.2c1.7,1,3.5,1.5,5.3,1.5 c1.8,0,3.7-0.5,5.4-1.5l85.8-50.3c18.9,4.8,38.4,7.3,58.1,7.3c129.4,0,234.7-104.9,234.7-233.7C490.7,104.7,385.4,0,256,0z M405.3,254.1L370,260c-3,13.5-8.3,26-15.5,37.3l20.8,29.2L347.8,354l-29.2-20.8c-11.3,7.2-23.8,12.5-37.3,15.5l-5.9,35.3h-39 l-5.9-35.3c-13.5-3-26-8.3-37.3-15.5L164.2,354l-27.5-27.5l20.8-29.2C150.3,286,145,273.5,142,260l-35.3-5.9v-39l35.3-5.9 c3-13.5,8.3-26,15.5-37.3l-20.8-29.2l27.5-27.5l29.2,20.8c11.3-7.2,23.8-12.5,37.3-15.5l5.9-35.3h39l5.9,35.3 c13.5,3,26,8.3,37.3,15.5l29.2-20.8l27.5,27.5L354.5,172c7.2,11.3,12.5,23.8,15.5,37.3l35.3,5.9V254.1z" }), o.createElement("circle", { cx: "256", cy: "234.6", r: "45.9" })), ); } function _() { return o.createElement( "svg", { version: "1.1", className: "SVGIcon_Button SVGIcon_CopyToClipboard", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("polyline", { fill: "none", className: "line", strokeWidth: "12", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", points: "178.25,197.25 247,197.25 247,82.5 175,10.25 111.5,10.25 111.5,56 " }), o.createElement("polygon", { fill: "none", className: "line", strokeWidth: "12", strokeLinejoin: "round", strokeMiterlimit: "10", points: "155,133 83,60.75 11,60.75 11,247.75 155,247.75 " }), o.createElement("polyline", { fill: "none", className: "line", strokeWidth: "12", strokeLinejoin: "round", strokeMiterlimit: "10", points: "83,60.75 83,133 155,133 " }), o.createElement("polyline", { fill: "none", className: "line", strokeWidth: "12", strokeLinejoin: "round", strokeMiterlimit: "10", points: "175,10.25 175,82.5 247,82.5 " }), ); } function g() { return o.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_DownArrowContextMenu", "data-name": "Layer 1", viewBox: "0 0 128 128", x: "0px", y: "0px" }, o.createElement("polygon", { points: "50 59.49 13.21 22.89 4.74 31.39 50 76.41 95.26 31.39 86.79 22.89 50 59.49" })); } function C(e) { return o.createElement("svg", { style: { transform: `rotate(${e.angle}deg)` }, version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", width: "24.833px", height: "21.917px", viewBox: "0 0 24.833 21.917" }, o.createElement("polygon", { points: "12.5,14.873 3.302,5.723 1.185,7.848 12.5,19.103 23.814,7.848 21.697,5.723 " })); } function f(e) { let t = "SVGIcon_Button SVGIcon_MagnifyingGlass"; return ( e.className && (t += ` ${e.className}`), o.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: t, version: "1.1", x: "0px", y: "0px", viewBox: "0 0 100 100" }, o.createElement("g", { transform: "translate(0,-952.36218)" }, o.createElement("path", { className: "ColorSelector", d: "m 40.99855,964.36216 c -15.9798,0 -28.9986,13.01864 -28.9986,28.99862 0,15.97992 13.0188,28.99862 28.9986,28.99862 6.9189,0 13.2881,-2.4349 18.2803,-6.4997 l 23.5927,23.6239 c 1.1714,1.1714 3.0784,1.1715 4.2498,0 1.1716,-1.1715 1.1716,-3.0783 0,-4.2498 l -23.6239,-23.5926 c 4.0649,-4.9923 6.4997,-11.3615 6.4997,-18.28042 0,-15.97998 -13.0187,-28.99862 -28.9986,-28.99862 z m 0,5.99972 c 12.7374,0 22.9989,10.26145 22.9989,22.9989 0,12.73732 -10.2615,22.99892 -22.9989,22.99892 -12.7374,0 -22.9989,-10.2616 -22.9989,-22.99892 0,-12.73745 10.2615,-22.9989 22.9989,-22.9989 z", fill: "currentColor", fillOpacity: "1", stroke: "none", visibility: "visible", display: "inline", overflow: "visible" }))) ); } function v() { return o.createElement("svg", { className: "SVGIcon_Button SVGIcon_Clock", version: "1.1", x: "0px", y: "0px", width: "20px", height: "20px", viewBox: "0 0 20 20" }, o.createElement("path", { d: "M15.999 15c-.15 0-.303-.034-.446-.105l-4-2A1.001 1.001 0 0111 12V5a1 1 0 012 0v6.382l3.447 1.724A1 1 0 0115.999 15zM12 24C5.383 24 0 18.617 0 12S5.383 0 12 0s12 5.383 12 12-5.383 12-12 12zm0-22C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2z" })); } function S(e) { let t = "SVGIcon_Button SVGIcon_Microphone"; return ( e.className && (t += ` ${e.className}`), o.createElement( "svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: t, x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "-127.5 664.5 256 256" }, o.createElement( "g", { className: "MicBase" }, o.createElement( "g", null, o.createElement("g", null, o.createElement("path", { d: "M-64.7,826.3c-0.5-2.9-0.8-5.8-0.8-8.7v-38.2h11.2v36.5L-64.7,826.3z" }), o.createElement("path", { d: "M-54.8,779.9v35.8l-9.6,9.6c-0.4-2.6-0.6-5.1-0.6-7.6v-37.7H-54.8 M-53.8,778.9H-66v38.7c0,3.3,0.4,6.5,1,9.7l11.2-11.2 V778.9L-53.8,778.9z" })), o.createElement("g", null, o.createElement("path", { d: "M56.8,817.6c0,24.7-24.8,44.9-55.3,44.9c-16.6,0-31.6-6-41.7-15.5l-8.6,8.6c11.1,10.5,26.7,17.5,44.2,18.8v25.1h-35.2 c-2.1,0-3.8,2.7-3.8,6.1c0,3.4,1.7,6.1,3.8,6.1h35.5H7.3h35.5c2.1,0,3.8-2.7,3.8-6.1c0-3.4-1.7-6.1-3.8-6.1H7.6v-25.1 C42,871.8,69,847.3,69,817.6v-38.7H56.8V817.6z" }), o.createElement("path", { d: "M69,778.9H56.8v38.7c0,24.7-24.8,44.9-55.3,44.9c-16.6,0-31.6-6-41.7-15.5l-8.6,8.6c11.1,10.5,26.7,17.5,44.2,18.8v25.1 h-35.2c-2.1,0-3.8,2.7-3.8,6.1c0,3.4,1.7,6.1,3.8,6.1h35.5H7.3h35.5c2.1,0,3.8-2.7,3.8-6.1c0-3.4-1.7-6.1-3.8-6.1H7.6v-25.1 C42,871.8,69,847.3,69,817.6V778.9L69,778.9z" })), ), o.createElement("g", null, o.createElement("path", { d: "M40.6,712.5c0-21.6-17.5-39.1-39.1-39.1c-21.6,0-39.1,17.5-39.1,39.1v87.4l10-10v-72.4h0v-5c0-16.1,13.1-29.1,29.1-29.1 c16.1,0,29.1,13.1,29.1,29.1v5v14.1l10-10V712.5z" })), o.createElement( "g", null, o.createElement("path", { d: "M-4.7,835.4c-2.2-0.5-4.4-1.2-6.4-2.2C-9.1,834.2-6.9,834.9-4.7,835.4z" }), o.createElement("path", { d: "M-0.1,836c-0.2,0-0.4,0-0.6,0C-0.6,836-0.4,836-0.1,836z" }), o.createElement("path", { d: "M30.6,806.9C30.6,806.9,30.6,806.9,30.6,806.9v-16.6" }), o.createElement("path", { d: "M-11.9,832.8c0.2,0.1,0.5,0.2,0.7,0.3C-11.4,833-11.7,832.9-11.9,832.8L-11.9,832.8z" }), o.createElement("path", { d: "M-1.7,835.9c-0.3,0-0.5-0.1-0.8-0.1C-2.3,835.8-2,835.8-1.7,835.9z" }), o.createElement("path", { d: "M-3.3,835.7c-0.3-0.1-0.6-0.1-1-0.2C-3.9,835.6-3.6,835.6-3.3,835.7z" }), o.createElement("path", { d: "M30.6,776.1v14.1v16.6c0,0,0,0,0,0s0,0,0,0c0,16.1-13,29.1-29.1,29.1c-0.5,0-1.1,0-1.6,0c-0.2,0-0.4,0-0.6,0 c-0.3,0-0.6,0-1-0.1c-0.3,0-0.5-0.1-0.8-0.1c-0.2,0-0.5-0.1-0.7-0.1c-0.3-0.1-0.6-0.1-1-0.2c-0.2,0-0.3-0.1-0.5-0.1 c-2.2-0.5-4.4-1.2-6.4-2.2c0,0-0.1,0-0.1,0c-0.2-0.1-0.5-0.2-0.7-0.3l0,0c-3-1.6-5.7-3.6-8-6.1l-7.1,7.1 c7.1,7.6,17.3,12.3,28.5,12.3c21.6,0,39.1-17.5,39.1-39.1v-40.8L30.6,776.1z" }), o.createElement("path", { d: "M-0.8,836c-0.3,0-0.6-0.1-1-0.1C-1.4,835.9-1.1,835.9-0.8,836z" }), o.createElement("path", { d: "M1.5,836.1c-0.5,0-1.1,0-1.6,0C0.4,836,0.9,836.1,1.5,836.1z" }), o.createElement("path", { d: "M-2.6,835.8c-0.2,0-0.5-0.1-0.7-0.1C-3,835.7-2.8,835.7-2.6,835.8z" }), o.createElement("path", { d: "M1.5,836.1c16.1,0,29.1-13,29.1-29.1c0,0,0,0,0,0C30.6,823,17.6,836.1,1.5,836.1z" }), o.createElement("path", { d: "M-4.2,835.5c-0.2,0-0.3-0.1-0.5-0.1C-4.5,835.4-4.4,835.5-4.2,835.5z" }), o.createElement("path", { d: "M-11.1,833.2C-11.1,833.2-11.2,833.2-11.1,833.2C-11.2,833.2-11.1,833.2-11.1,833.2z" }), ), ), o.createElement("g", { className: "MicFill" }, o.createElement("g", null, o.createElement("path", { d: "M-53.8,816.1L-65,827.3c2.2,10.8,7.9,20.5,16.2,28.3l8.6-8.6c-8.5-7.9-13.6-18.2-13.6-29.4V816.1L-53.8,816.1z" })), o.createElement("g", null, o.createElement("path", { d: "M1.5,834.6c-15.2,0-27.6-12.4-27.6-27.6v-94.5c0-15.2,12.4-27.6,27.6-27.6c15.2,0,27.6,12.4,27.6,27.6v94.5 C29.1,822.2,16.7,834.6,1.5,834.6z" }), o.createElement("path", { d: "M1.5,696.3c8.9,0,16.1,7.2,16.1,16.1v94.5c0,8.9-7.2,16.1-16.1,16.1c-8.9,0-16.1-7.2-16.1-16.1v-94.5 C-14.6,703.6-7.4,696.3,1.5,696.3 M1.5,673.3c-21.6,0-39.1,17.5-39.1,39.1v94.5c0,21.6,17.5,39.1,39.1,39.1s39.1-17.5,39.1-39.1 v-94.5C40.6,690.8,23.1,673.3,1.5,673.3L1.5,673.3z" }))), o.createElement("g", { className: "MicStrike", fill: "none", strokeWidth: "1" }, o.createElement("line", { x1: "-82.5", y1: "866.5", x2: "83.5", y2: "700.4" })), ) ); } function b(e) { const { off: t } = e, n = (0, i._T)(e, ["off"]); return t ? o.createElement( "svg", Object.assign({ viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n), o.createElement("path", { d: "M14.6999 25.42L18.0799 22.05L33.0599 7.06005L30.9399 4.94005L23.9999 11.88V8.05005C23.9999 6.45875 23.3678 4.93263 22.2426 3.80741C21.1174 2.68219 19.5912 2.05005 17.9999 2.05005C16.4086 2.05005 14.8825 2.68219 13.7573 3.80741C12.6321 4.93263 11.9999 6.45875 11.9999 8.05005V16.05C12.0021 17.0575 12.2579 18.0482 12.7437 18.9308C13.2296 19.8134 13.9298 20.5594 14.7799 21.1L11.9999 23.84C10.6491 22.6903 9.65647 21.1771 9.13994 19.48L5.34994 20.6201C6.05673 22.9386 7.39296 25.0157 9.20994 26.6201L4.93994 30.9401L7.05994 33.0601L14.6999 25.42Z", fill: "currentColor" }), o.createElement("path", { d: "M18.3299 26L14.7399 29.58C15.1551 29.6912 15.5757 29.7813 15.9999 29.85V34.01H19.9999V29.89C22.4663 29.5004 24.7732 28.4243 26.6566 26.785C28.54 25.1456 29.9239 23.0091 30.6499 20.6201L26.8199 19.48C26.2501 21.3098 25.1284 22.9186 23.6084 24.0858C22.0885 25.2531 20.2448 25.9217 18.3299 26Z", fill: "currentColor" }), ) : o.createElement( "svg", Object.assign({ viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n), o.createElement("path", { d: "M30.65 20.6201L26.82 19.48C26.25 21.376 25.0842 23.0378 23.4955 24.2191C21.9068 25.4004 19.9797 26.0383 18 26.0383C16.0202 26.0383 14.0931 25.4004 12.5044 24.2191C10.9157 23.0378 9.74999 21.376 9.17998 19.48L5.34998 20.6201C6.07599 23.0091 7.45988 25.1456 9.3433 26.785C11.2267 28.4243 13.5336 29.5004 16 29.89V34.05H20V29.89C22.4664 29.5004 24.7732 28.4243 26.6567 26.785C28.5401 25.1456 29.924 23.0091 30.65 20.6201Z", fill: "currentColor" }), o.createElement("path", { d: "M18 22.05C19.5913 22.05 21.1174 21.4179 22.2426 20.2927C23.3678 19.1675 24 17.6413 24 16.05V8.05005C24 6.45875 23.3678 4.93263 22.2426 3.80741C21.1174 2.68219 19.5913 2.05005 18 2.05005C16.4087 2.05005 14.8826 2.68219 13.7573 3.80741C12.6321 4.93263 12 6.45875 12 8.05005V16.05C12 17.6413 12.6321 19.1675 13.7573 20.2927C14.8826 21.4179 16.4087 22.05 18 22.05Z", fill: "currentColor" }), ); } function I(e) { return o.createElement("svg", Object.assign({ width: "24", height: "24", viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Submit" }, e), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.16683 8.982C4.10732 8.3908 3.83847 7.42693 4.15486 7.17995C4.46877 6.93489 4.7797 6.90487 5.90123 7.31306L31.1931 17.2282C32.2693 17.6503 32.2686 18.335 31.1931 18.7564L5.90123 28.6715C4.77972 29.1235 4.46864 29.0497 4.15487 28.8049C3.83836 28.5579 4.0953 27.5939 4.15484 27.0028L4.7797 21.2151C4.89862 20.0374 5.92644 18.9801 7.0706 18.854L15.467 18.4429C24.1686 17.9924 24.1686 17.9924 15.467 17.5419L7.0706 17.1313C5.92423 17.0053 4.89825 15.9476 4.7797 14.7706L4.16683 8.982Z", fill: "currentColor" })); } function y() { return o.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_ResizeIcon", x: "0px", y: "0px", viewBox: "0 0 256 256" }, o.createElement("g", null, o.createElement("path", { fill: "#020202", d: "M115.512,137.263l21.6-21.6c0,0,25.5,25.5,45.8,45.8l35-35v91.6h-91.6l35-35 C141.012,162.763,115.512,137.263,115.512,137.263z" }), o.createElement("path", { fill: "#020202", d: "M108.312,129.763c-20.3-20.3-35.8-35.8-35.8-35.8l21.6-21.601c0,0,15.5,15.5,35.8,35.801L108.312,129.763z" }), o.createElement("path", { fill: "#020202", d: "M54.312,75.763c-20.3-20.3-15.8-15.8-15.8-15.8l21.6-21.601c0,0-4.5-4.5,15.8,15.801L54.312,75.763z" }))); } function E() { return o.createElement("svg", { fill: "#FFFFFF", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Popout", viewBox: "0 0 8 8", x: "0px", y: "0px" }, o.createElement("path", { d: "M0 0v8h8v-2h-1v1h-6v-6h1v-1h-2zm4 0l1.5 1.5-2.5 2.5 1 1 2.5-2.5 1.5 1.5v-4h-4z" })); } function D(e) { return o.createElement("svg", Object.assign({ fill: "#FFFFFF", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_X", version: "1.1", x: "0px", y: "0px", viewBox: "-165 95 100 100" }, e), o.createElement("g", null, o.createElement("polygon", { points: "-74.9,117.2 -102.2,145 -74.9,172.8 -89.1,186.8 -116.2,159.3 -143.2,186.8 -157.5,172.8 -130.2,145 -157.5,117.2 -143.2,103.2 -116.2,130.7 -89.1,103.2" }))); } function w(e) { const t = e.color || "#FFFFFF"; return o.createElement("svg", { version: "1.1", id: "Layer_2", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_X_Line", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("line", { fill: "none", stroke: t, strokeWidth: "45", strokeMiterlimit: "10", x1: "212", y1: "212", x2: "44", y2: "44" }), o.createElement("line", { fill: "none", stroke: t, strokeWidth: "45", strokeMiterlimit: "10", x1: "44", y1: "212", x2: "212", y2: "44" })); } function R(e) { return o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_VoiceRoom", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M31.7 15.75C31.703 13.1045 30.94 10.5148 29.5031 8.2936C28.0663 6.07238 26.0171 4.31465 23.603 3.23272C21.189 2.15079 18.5133 1.79092 15.8991 2.19659C13.285 2.60226 10.8442 3.75611 8.87157 5.51878C6.89893 7.28145 5.47882 9.57755 4.78275 12.1298C4.08667 14.682 4.14441 17.3811 4.94899 19.9013C5.75356 22.4214 7.27057 24.6546 9.31678 26.3313C11.363 28.008 13.8509 29.0565 16.48 29.35V35.05L27.31 25.79C28.6947 24.5098 29.7995 22.9569 30.555 21.2291C31.3105 19.5012 31.7003 17.6358 31.7 15.75ZM14.25 9.79997C14.25 8.80541 14.6451 7.85158 15.3483 7.14832C16.0516 6.44506 17.0054 6.04997 18 6.04997C18.9945 6.04997 19.9484 6.44506 20.6516 7.14832C21.3549 7.85158 21.75 8.80541 21.75 9.79997V14.8C21.75 15.7945 21.3549 16.7484 20.6516 17.4516C19.9484 18.1549 18.9945 18.55 18 18.55C17.0054 18.55 16.0516 18.1549 15.3483 17.4516C14.6451 16.7484 14.25 15.7945 14.25 14.8V9.79997ZM19.25 23.45V26.05H16.75V23.45C15.2086 23.2066 13.7667 22.5346 12.5891 21.5107C11.4114 20.4869 10.5454 19.1525 10.09 17.66L12.49 16.94C12.8494 18.1186 13.5778 19.1505 14.568 19.8838C15.5582 20.6171 16.7578 21.0129 17.99 21.0129C19.2221 21.0129 20.4217 20.6171 21.4119 19.8838C22.4021 19.1505 23.1306 18.1186 23.49 16.94L25.89 17.66C25.4361 19.1498 24.5731 20.4824 23.3992 21.5059C22.2254 22.5295 20.7878 23.2031 19.25 23.45Z", fill: "currentColor", }), ); } function A() { return o.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 26 26", fill: "none" }, o.createElement("path", { fill: "currentColor", d: "M7.69668 14.4444L11.0087 17.7564L8.9659 19.7992L2.16675 13L8.9659 6.20086L11.0087 8.24362L7.69672 11.5556L16.4873 11.5556V14.4444H7.69668Z" }), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M16.6113 20.9444H20.2225L20.2225 5.05555H16.6113L16.6113 2.16666L23.1113 2.16666L23.1113 23.8333H16.6113V20.9444Z" })); } function M() { return o.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_ExitIcon", x: "0px", y: "0px", width: "64px", height: "64px", viewBox: "0 0 64 64", enableBackground: "new 0 0 64 64" }, o.createElement("g", { className: "Arrow" }, o.createElement("polyline", { fill: "none", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", points: "41,30.7 14.5,30.7 23.5,19.4 " }), o.createElement("polyline", { fill: "none", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", points: "41,30.7 14.5,30.7 23.5,42 " })), o.createElement("g", null, o.createElement("polyline", { className: "ExitDoor", strokeLinecap: "round", strokeMiterlimit: "1", strokeWidth: "2px", fill: "none", points: "32.5,22.1 32.5,17.7 47.7,17.7 47.7,43.8 32.5,43.8 32.5,39.5" }))); } function k() { return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_TextRoom", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256", stroke: "#000", strokeWidth: "10px" }, o.createElement("g", { className: "ScratchPad" }, o.createElement("path", { fill: "none", strokeWidth: "0", strokeMiterlimit: "10", d: "M179.751,40.994h14.869 c8.388,0,15.25,6.862,15.25,15.25v141.193c0,8.388-6.862,15.25-15.25,15.25H57.37c-8.388,0-15.25-6.862-15.25-15.25V56.244 c0-8.388,6.862-15.25,15.25-15.25h14.869H179.751z" }), o.createElement("line", { fill: "none", strokeWidth: "0", strokeLinecap: "round", strokeMiterlimit: "10", x1: "74.495", y1: "27.313", x2: "74.495", y2: "54.063" }), o.createElement("line", { fill: "none", strokeWidth: "0", strokeLinecap: "round", strokeMiterlimit: "10", x1: "124.495", y1: "27.313", x2: "124.495", y2: "54.063" }), o.createElement("line", { fill: "none", strokeWidth: "0", strokeLinecap: "round", strokeMiterlimit: "10", x1: "174.745", y1: "27.313", x2: "174.745", y2: "54.063" })), o.createElement("line", { className: "TextLines", x1: "71.6", y1: "115.4", x2: "179.4", y2: "115.4" }), o.createElement("line", { className: "TextLines", x1: "71.6", y1: "145.8", x2: "143.3", y2: "145.8" }), o.createElement("line", { className: "TextLines", x1: "71.6", y1: "175.9", x2: "179.4", y2: "175.9" }), o.createElement("line", { className: "TextLines", x1: "73.7", y1: "82.7", x2: "166.8", y2: "82.7" }), ); } function T(e) { const { off: t } = e, n = (0, i._T)(e, ["off"]); return t ? o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), o.createElement("path", { d: "M31.06 13L27.82 16.24C27.9314 16.8338 27.9916 17.436 28 18.04C28.001 19.0585 27.8424 20.0707 27.53 21.04H24L21 29.04L26 32.04C31.07 25.77 31.74 20.69 31.74 20.69C31.9114 19.8205 31.9985 18.9364 32 18.05C32.0008 16.3231 31.6821 14.611 31.06 13Z", fill: "currentColor" }), o.createElement("path", { d: "M33.06 6.76005L30.94 4.64005L27.65 7.93005C25.6668 6.04325 23.1741 4.77921 20.48 4.2943C17.786 3.80939 15.0089 4.12489 12.4923 5.20176C9.97574 6.27863 7.83004 8.06963 6.32066 10.3532C4.81129 12.6368 4.00447 15.3127 4 18.05C4.00415 18.94 4.09458 19.8275 4.27 20.7C4.8128 23.3864 5.8541 25.9472 7.34 28.25L3.94 31.64L6.06 33.76L33.06 6.76005ZM12.69 22.89L12 21.05H8.47C8.15762 20.0807 7.99903 19.0685 8 18.05C8.00457 16.104 8.57689 14.2015 9.6468 12.5759C10.7167 10.9503 12.2377 9.67215 14.0233 8.89825C15.8089 8.12435 17.7815 7.88828 19.6993 8.21899C21.6171 8.54969 23.3967 9.4328 24.82 10.76L12.69 22.89Z", fill: "currentColor" }), ) : o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, n), o.createElement("path", { d: "M32 18.05C32 14.337 30.525 10.7761 27.8995 8.15055C25.274 5.52504 21.713 4.05005 18 4.05005C14.287 4.05005 10.726 5.52504 8.1005 8.15055C5.475 10.7761 4 14.337 4 18.05C4.00415 18.94 4.09457 19.8275 4.27 20.7001C4.27 20.7001 4.93 25.78 10 32.05L15 29.05L12 21.05H8.47C8.15762 20.0807 7.99903 19.0685 8 18.05C8 15.3979 9.05357 12.8543 10.9289 10.979C12.8043 9.10362 15.3478 8.05005 18 8.05005C20.6522 8.05005 23.1957 9.10362 25.0711 10.979C26.9464 12.8543 28 15.3979 28 18.05C28.001 19.0685 27.8424 20.0807 27.53 21.05H24L21 29.05L26 32.05C31.07 25.78 31.74 20.7001 31.74 20.7001C31.9121 19.8272 31.9991 18.9397 32 18.05Z", fill: "currentColor" })); } function L(e) { return o.createElement( "svg", Object.assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.1334 10.5001C21.1353 8.73644 20.6267 7.00996 19.6688 5.52915C19.5205 5.29997 19.3625 5.0782 19.1953 4.86435L17.452 6.60766L16.0589 5.21472L17.8215 3.45216C17.1909 2.93055 16.4899 2.49338 15.7354 2.15523C14.126 1.43394 12.3422 1.19403 10.5995 1.46448C8.8567 1.73492 7.22951 2.50415 5.91442 3.67927C4.59933 4.85438 3.65259 6.38512 3.18854 8.08659C2.72449 9.78807 2.76298 11.5875 3.29937 13.2676C3.83575 14.9477 4.84709 16.4365 6.21123 17.5543C7.57537 18.6721 9.23396 19.3711 10.9867 19.5667V23.3667L18.2067 17.1934C19.1298 16.3399 19.8664 15.3047 20.37 14.1528C20.8737 13.0009 21.1336 11.7573 21.1334 10.5001ZM14.4972 9.56583L16.3388 7.72437L14.9458 6.33143L13.1041 8.17289L14.4972 9.56583ZM7.33337 15.3334L7.33337 9.42369H9.30347L9.30347 11.9688L11.9907 9.2858L13.3816 10.6766L10.6983 13.3635H13.2437V15.3334H7.33337Z", fill: "currentColor" }), ); } function G(e) { return o.createElement( "svg", Object.assign({ width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M31.7 15.75C31.703 13.1045 30.94 10.5148 29.5031 8.2936C28.0663 6.07238 26.0171 4.31465 23.603 3.23272C21.189 2.15079 18.5133 1.79092 15.8991 2.19659C13.285 2.60226 10.8442 3.75611 8.87157 5.51878C6.89893 7.28145 5.47882 9.57755 4.78275 12.1298C4.08667 14.682 4.14441 17.3811 4.94899 19.9013C5.44737 21.4623 6.2191 22.9133 7.22063 24.1901L9.32215 22.0886L11.4117 24.178L9.28472 26.305C9.29539 26.3138 9.30608 26.3226 9.31678 26.3313C11.363 28.008 13.8509 29.0565 16.48 29.35V35.05L27.31 25.79C28.6947 24.5098 29.7995 22.9569 30.555 21.2291C31.3105 19.5012 31.7003 17.6358 31.7 15.75ZM24.5 9V17.8646H21.5449V14.0469L17.5141 18.0714L15.4277 15.9853L19.4526 11.9549H15.6346V9H24.5ZM13.7543 17.6514L10.9918 20.4136L13.0814 22.503L15.8439 19.7408L13.7543 17.6514Z", fill: "currentColor" }), ); } function O(e) { return o.createElement( "svg", Object.assign({ width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M31.7 15.75C31.703 13.1045 30.94 10.5148 29.5031 8.2936C28.0663 6.07238 26.0171 4.31465 23.603 3.23272C21.189 2.15079 18.5133 1.79092 15.8991 2.19659C13.285 2.60226 10.8442 3.75611 8.87157 5.51878C6.89893 7.28145 5.47882 9.57755 4.78275 12.1298C4.08667 14.682 4.14441 17.3811 4.94899 19.9013C5.75356 22.4214 7.27057 24.6546 9.31678 26.3313C11.363 28.008 13.8509 29.0565 16.48 29.35V35.05L27.31 25.79C28.6947 24.5098 29.7995 22.9569 30.555 21.2291C31.3105 19.5012 31.7003 17.6358 31.7 15.75ZM18 26.75C24.0751 26.75 29 21.8251 29 15.75C29 9.67487 24.0751 4.75 18 4.75C11.9249 4.75 7 9.67487 7 15.75C7 21.8251 11.9249 26.75 18 26.75Z", fill: "currentColor" }), o.createElement("path", { d: "M16.3333 21H13V11H16.3333V21ZM23 11H19.6667V21H23V11Z", fill: "currentColor" }), ); } function F(e) { return (0, l.id)() ? o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Group", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M7.71001 20.11C7.23859 21.3527 6.99798 22.6709 7.00001 24V30H1.23001V25.38C1.23001 24.6726 1.3695 23.9722 1.64049 23.3189C1.91149 22.6655 2.30867 22.0719 2.80931 21.5722C3.30995 21.0725 3.90422 20.6764 4.5581 20.4067C5.21199 20.1369 5.91266 19.9987 6.62001 20C6.98607 20.001 7.35115 20.0378 7.71001 20.11ZM6.50001 10C5.80778 10 5.13109 10.2053 4.55552 10.5899C3.97994 10.9744 3.53134 11.5211 3.26643 12.1606C3.00153 12.8002 2.93221 13.5039 3.06726 14.1828C3.20231 14.8618 3.53565 15.4854 4.02514 15.9749C4.51462 16.4644 5.13826 16.7977 5.81719 16.9328C6.49613 17.0678 7.19986 16.9985 7.8394 16.7336C8.47894 16.4687 9.02557 16.0201 9.41016 15.4445C9.79474 14.8689 10 14.1922 10 13.5C10 12.5717 9.63126 11.6815 8.97488 11.0251C8.31851 10.3688 7.42827 10 6.50001 10ZM13.5 9.5C13.5 8.60999 13.7639 7.73996 14.2584 6.99994C14.7529 6.25991 15.4557 5.68314 16.2779 5.34254C17.1002 5.00195 18.005 4.91283 18.8779 5.08647C19.7508 5.2601 20.5527 5.68868 21.182 6.31802C21.8113 6.94736 22.2399 7.74918 22.4135 8.6221C22.5872 9.49501 22.4981 10.3998 22.1575 11.2221C21.8169 12.0443 21.2401 12.7471 20.5001 13.2416C19.7601 13.7361 18.89 14 18 14C17.4087 14.0013 16.8229 13.8858 16.2764 13.6601C15.7298 13.4345 15.2332 13.103 14.8151 12.6849C14.397 12.2668 14.0655 11.7702 13.8399 11.2236C13.6142 10.6771 13.4987 10.0913 13.5 9.5ZM25 24V30H11V24C11 22.1435 11.7375 20.363 13.0503 19.0503C14.363 17.7375 16.1435 17 18 17C19.8565 17 21.637 17.7375 22.9498 19.0503C24.2625 20.363 25 22.1435 25 24ZM35 25.38V30H29V24C29.0038 22.6921 28.77 21.3944 28.31 20.17C28.7376 20.0576 29.1779 20.0004 29.62 20C31.0469 20 32.4153 20.5668 33.4242 21.5758C34.4332 22.5847 35 23.9531 35 25.38ZM29.5 17C28.8078 17 28.1311 16.7947 27.5555 16.4101C26.9799 16.0256 26.5313 15.4789 26.2664 14.8394C26.0015 14.1999 25.9322 13.4961 26.0673 12.8172C26.2023 12.1383 26.5357 11.5146 27.0251 11.0251C27.5146 10.5356 28.1383 10.2023 28.8172 10.0673C29.4961 9.9322 30.1999 10.0015 30.8394 10.2664C31.4789 10.5313 32.0256 10.9799 32.4102 11.5555C32.7947 12.1311 33 12.8078 33 13.5C33 14.4283 32.6313 15.3185 31.9749 15.9749C31.3185 16.6313 30.4283 17 29.5 17Z", fill: "currentColor", }), ) : o.createElement( "svg", { version: "1.1", id: "Layer_5", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Group", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement( "g", { transform: "translate(0,-952.36218)" }, o.createElement("path", { d: "M58.6,970.4c-15.4,0-28.1,12.7-28.1,28.1c0,15.4,12.7,28.1,28.1,28.1s28.1-12.7,28.1-28.1\tC86.7,983,74,970.4,58.6,970.4z M202.1,970.4c-15.4,0-28.1,12.7-28.1,28.1c0,15.4,12.7,28.1,28.1,28.1s28.1-12.7,28.1-28.1 C230.2,983,217.6,970.4,202.1,970.4z M130.4,986c-15.4,0-28.1,12.7-28.1,28.1c0,15.4,12.7,28.1,28.1,28.1s28.1-12.7,28.1-28.1 C158.5,998.6,145.8,986,130.4,986z M242.8,1110.6c0-0.1,0-17.9,0-18l-0.1-16.1c0-22.4-18.2-40.6-40.6-40.6 c-17.8,0-30,7.7-36.3,18.8c-2,3.5-3.4,7.3-4.5,11.1c-7.5-8.7-18.6-14.3-31-14.3s-23.5,5.6-31,14.3c-1.1-3.9-2.5-7.6-4.5-11.1 c-6.3-11.1-18.4-18.8-36.3-18.8c-22.4,0-40.6,18.2-40.6,40.6v46.8c0,3.4,2.8,6.2,6.2,6.2h12.5v31.2c0,3.4,2.8,6.2,6.2,6.2h31.2 c3.4,0,6.2-2.8,6.2-6.2v-31.2h9.4v9.4c0,3.4,2.8,6.2,6.2,6.2h12.5v31.2c0,3.4,2.8,6.2,6.2,6.2H146c3.4,0,6.2-2.8,6.2-6.2v-31.2 h12.5c3.4,0,6.2-2.8,6.2-6.2v-9.4h9.4v31.2c0,3.4,2.8,6.2,6.2,6.2h31.2c3.4,0,6.2-2.8,6.2-6.2v-31.2h12.5c3.4,0,6.3-2.7,6.3-6.2\tV1110.6z", }), ), ); } function B(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_RecentChats", viewBox: "0 0 22 22", fill: "none" }, e), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M0.333252 0.666626V8.66663V11.3333L3.66659 8.66663H14.9999V0.666626H0.333252ZM6.99992 11.3333V19.3333H18.3333L21.6666 22V19.3333V11.3333H6.99992Z" })); } function x(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_ScratchPad", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M28 6V2H24V6H12V2H8V6H4V32H26C27.5913 32 29.1174 31.3679 30.2426 30.2426C31.3679 29.1174 32 27.5913 32 26V6H28ZM18 25H10V21H18V25ZM26 17H10V13H26V17Z", fill: "currentColor" })); } function N(e) { let t = "SVGIcon_Button SVGIcon_Pin"; return ( e.bPinned && (t += " Pinned"), o.createElement( "svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: t, x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { className: "point", d: "M134.787,129.241v52.051v26.025c0.041,4.334-0.092,8.677,0.094,13.009c-1.493,4.332-3.129,8.675-5.239,13.009 c-2.109-4.334-3.734-8.677-5.237-13.009c0.186-4.333,0.05-8.677,0.092-33.009v-26.025v-32.051v-5.146h10.291V129.241z" }), o.createElement("path", { className: "head", d: "M186.55,151.049H73.351l-5.146-5.146c0-23.791,11.186-40.359,30.871-46.091V39.394 c-6.843-3.478-17.164-10.034-17.154-27.312l5.146-5.146h85.167l5.146,5.146c0,17.227-9.828,23.803-16.537,27.292v60.521 c19.664,6.062,30.852,22.609,30.852,46.01L186.55,151.049z" }), o.createElement("line", { className: "ground", opacity: e.bPinned ? 1 : 0, fill: "none", stroke: "#ffffff", strokeWidth: "16", strokeLinecap: "round", strokeMiterlimit: "10", x1: "33.833", y1: "238.5", x2: "221.834", y2: "238.5" }), ) ); } function P(e) { const { className: t } = e; return o.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: (0, r.Z)("SVGIcon_Button SVGIcon_PlusCircle", t), x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, !e.nocircle && o.createElement("circle", { fill: "none", strokeWidth: "10", strokeMiterlimit: "10", cx: "128", cy: "128", r: "95.333" }), o.createElement("line", { className: "horizontalLine", fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", x1: "73.333", y1: "128", x2: "183.333", y2: "128" }), !e.minus && o.createElement("line", { className: "verticalLine", fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", x1: "128.333", y1: "73.335", x2: "128.333", y2: "183.333" })); } function U(e) { return (0, l.id)() ? o.createElement( "svg", Object.assign({ width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.63604 19.636C7.32387 17.9482 9.61305 17 12 17C12.4664 17 12.9292 17.0362 13.3844 17.1071C13.1338 18.0289 13 18.9988 13 20C13 25.0351 16.383 29.2801 21 30.5859V31H3V26C3 23.6131 3.94821 21.3239 5.63604 19.636ZM14.7779 13.1573C13.9556 13.7068 12.9889 14 12 14C10.6739 14 9.40215 13.4732 8.46447 12.5355C7.52678 11.5979 7 10.3261 7 9C7 8.0111 7.29324 7.0444 7.84265 6.22215C8.39206 5.39991 9.17295 4.75904 10.0866 4.3806C11.0002 4.00217 12.0055 3.90315 12.9755 4.09608C13.9454 4.289 14.8363 4.76521 15.5355 5.46447C16.2348 6.16373 16.711 7.05465 16.9039 8.02455C17.0969 8.99446 16.9978 9.99979 16.6194 10.9134C16.241 11.827 15.6001 12.6079 14.7779 13.1573Z", fill: "currentColor" }), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M24 28C28.4183 28 32 24.4183 32 20C32 15.5817 28.4183 12 24 12C19.5817 12 16 15.5817 16 20C16 24.4183 19.5817 28 24 28ZM22.5 21.5V26H25.5V21.5H30V18.5H25.5V14H22.5V18.5H18V21.5H22.5Z", fill: "currentColor" }), ) : o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_AddFriend", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("g", { className: "friendHead", transform: "matrix(1.34048,0,0,1.34048,-10.0942,-5.50445)" }, o.createElement("circle", { cx: "86.296", cy: "47.419", r: "33.526", fill: "currentcolor" })), o.createElement("path", { className: "friendBody", d: "M100.353,170.882c0-23.589,10.397-44.736,26.842-59.152c-3.352-0.423-6.773-0.649-10.257-0.649H94.231\tc-39.775,0-56.481,28.271-56.481,63.099v41.88c0,0-0.3,16.369,35.917,21.813c36.217,5.444,73.651,5,73.651,5 C119.666,230.681,100.353,203.044,100.353,170.882z", fill: "currentColor" }), o.createElement("path", { className: "plusCircle", d: "M179.01,103.892c-36.998,0-66.99,29.992-66.99,66.99s29.994,66.989,66.99,66.989c36.997,0,66.99-29.991,66.99-66.989 S216.008,103.892,179.01,103.892z M217.893,175.882h-33.647v33.882c0,2.762-2.239,5-5,5s-5-2.238-5-5v-33.882h-33.647 c-2.762,0-5-2.238-5-5c0-2.763,2.238-5,5-5h33.647V132.47c0-2.762,2.239-5,5-5s5,2.238,5,5v33.412h33.647c2.762,0,5,2.237,5,5 C222.893,173.643,220.654,175.882,217.893,175.882z", fill: "currentColor" }), ); } function V() { return o.createElement( "svg", { version: "1.1", id: "Layer_4", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_FriendRequest", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("g", { className: "friendHead", transform: "matrix(1.34048,0,0,1.34048,-10.0942,-5.50445)" }, o.createElement("circle", { cx: "85.923", cy: "47.419", r: "33.526" })), o.createElement("path", { className: "friendBody", d: "M100.353,170.882c0-23.589,10.397-44.736,26.842-59.152c-3.352-0.423-6.773-0.649-10.257-0.649H94.231\tc-39.775,0-56.481,28.271-56.481,63.099v41.88c0,0-0.3,16.369,35.917,21.813c36.217,5.444,73.651,5,73.651,5 C119.666,230.681,100.353,203.044,100.353,170.882z" }), o.createElement("path", { className: "friendBodyFull", d: "M176.504,217.922v-42.624c0-35.443-17.002-64.217-57.483-64.217H106.96h-1.017H94.898 c-40.48,0.001-57.484,28.774-57.484,64.217v42.624c0,0,0,22.197,69.544,22.197C177.521,240.121,176.504,217.922,176.504,217.922z" }), o.createElement("path", { className: "friendArm", d: "M18.167,63.833c6.53-0.734,39.348,39.127,50.007,47.647s21.327,16.686,15.16,25.353s-20.646,16.74-36.167,2.5 S-1.349,90.532,0,85.333S8.599,64.909,18.167,63.833z" }), o.createElement("path", { className: "redCircle", d: "M178.51,103.892c-36.998,0-66.99,29.992-66.99,66.99s29.994,66.99,66.99,66.99c36.997,0,66.99-29.992,66.99-66.99 S215.508,103.892,178.51,103.892z" }), ); } function H(e) { return (0, l.id)() ? o.createElement( "svg", Object.assign({ width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", className: "SVGIcon_Button SVGIcon_Invite", xmlns: "http://www.w3.org/2000/svg" }, e), o.createElement("path", { d: "M5.5 7C5.5 6.20888 5.7346 5.43552 6.17412 4.77772C6.61365 4.11992 7.23836 3.60723 7.96927 3.30448C8.70017 3.00173 9.50444 2.92252 10.2804 3.07686C11.0563 3.2312 11.769 3.61216 12.3284 4.17157C12.8878 4.73098 13.2688 5.44372 13.4231 6.21964C13.5775 6.99556 13.4983 7.79983 13.1955 8.53074C12.8928 9.26164 12.3801 9.88635 11.7223 10.3259C11.0645 10.7654 10.2911 11 9.5 11C8.43913 11 7.42172 10.5786 6.67157 9.82843C5.92143 9.07828 5.5 8.06087 5.5 7ZM9.5 14C7.51088 14 5.60322 14.7902 4.1967 16.1967C2.79018 17.6032 2 19.5109 2 21.5V26H5.2L6 35H13L13.8 26H17V21.5C17 19.5109 16.2098 17.6032 14.8033 16.1967C13.3968 14.7902 11.4891 14 9.5 14Z", fill: "currentColor" }), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M34.959 9.48904C34.9608 7.85167 34.4886 6.24879 33.5993 4.87399C32.7099 3.49918 31.4416 2.41125 29.9474 1.7416C28.4533 1.07195 26.7972 0.849212 25.1792 1.1003C23.5612 1.35138 22.0505 2.06555 20.8295 3.15654C19.6086 4.24753 18.7296 5.66868 18.2988 7.24834C17.868 8.82801 17.9037 10.4986 18.4017 12.0584C18.8997 13.6182 19.8386 15.0005 21.1051 16.0383C22.3716 17.0761 23.9114 17.725 25.5387 17.9066V21.4346L32.2418 15.7032C33.0989 14.9108 33.7827 13.9497 34.2503 12.8803C34.7179 11.8109 34.9592 10.6562 34.959 9.48904ZM24.8116 11.2173V14.6231H28.2173V11.2173H31.6231V7.81157H28.2173V4.4058H24.8116V7.81157H21.4058V11.2173H24.8116Z", fill: "currentColor" }), ) : o.createElement( "svg", { version: "1.1", id: "Layer_5", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Invite", x: "0px", y: "0px", width: "256px", height: "255.999px", viewBox: "0 0 256 255.999" }, o.createElement("path", { d: "M165.678,20.535c-17.251,0-31.386,14.135-31.386,31.386c0,17.252,14.135,31.386,31.386,31.386 c17.251,0,31.386-14.134,31.386-31.386C197.063,34.67,182.929,20.535,165.678,20.535z" }), o.createElement("path", { d: "M165.678,93.121c24.995,0,45.335,20.34,45.335,45.335v52.31c0,3.853-3.123,6.975-6.975,6.975h-13.95v34.874 c0,3.852-3.123,6.974-6.974,6.975h-34.874c-3.852-0.001-6.974-3.123-6.975-6.975v-34.874h-13.95c-3.852,0-6.974-3.123-6.974-6.975 v-52.31C120.343,113.461,140.683,93.121,165.678,93.121z" }), o.createElement("g", { className: "invitePlus" }, o.createElement("line", { fill: "none", stroke: "#ffffff", strokeWidth: "22", strokeMiterlimit: "10", x1: "14", y1: "128", x2: "101.5", y2: "128" }), o.createElement("line", { fill: "none", stroke: "#ffffff", strokeWidth: "22", strokeMiterlimit: "10", x1: "57.75", y1: "84.25", x2: "57.75", y2: "171.75" })), ); } function W() { return o.createElement("svg", { version: "1.1", id: "Layer_5", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Paperclip", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", d: "M167.768,62.647 l-0.012,123.052c0,24.729-19.334,44.856-43.096,44.866c-23.765-0.006-43.099-20.134-43.096-44.872L81.557,48.851 c0-15.345,14.483-27.827,29.83-27.83c15.342,0.003,27.827,12.488,27.833,27.833l-0.002,139.245 c0.003,6.376-8.546,12.925-14.925,12.925c0,0-13.929-0.166-13.929-12.928l0.003-124.839" })); } function X(e) { return o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { fill: "currentColor", d: "M25.1181 30.1923C23.8364 31.4691 22.2052 32.3377 20.4303 32.6884C18.6554 33.0391 16.8165 32.8562 15.1454 32.1628C13.4744 31.4693 12.0462 30.2965 11.0411 28.7922C10.0359 27.2879 9.49891 25.5196 9.49776 23.7104L9.49776 7.91381C9.65271 6.56298 10.2991 5.31635 11.3139 4.41135C12.3286 3.50635 13.6408 3.00623 15.0005 3.00623C16.3601 3.00623 17.6723 3.50635 18.6871 4.41135C19.7018 5.31635 20.3482 6.56298 20.5032 7.9138L20.5032 23.9715H16.8086L16.7955 7.91381C16.7858 7.43731 16.5922 6.98305 16.2552 6.64605C15.9182 6.30905 15.4639 6.11542 14.9874 6.10568C14.5109 6.11542 14.0567 6.30905 13.7197 6.64605C13.3827 6.98305 13.189 7.43732 13.1793 7.91381L13.1858 23.717C13.2181 25.1446 13.8079 26.5028 14.829 27.5011C15.8501 28.4993 17.2214 29.0582 18.6494 29.0582C20.0773 29.0582 21.4486 28.4993 22.4697 27.5011C23.4908 26.5028 24.0806 25.1446 24.1129 23.717V6.45816L27.8271 6.42553L27.8075 23.717C27.8046 26.1465 26.8373 28.4755 25.1181 30.1923Z", }), ); } function j(e) { const { muted: t, className: n } = e; return o.createElement( "svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: (0, r.Z)("SVGIcon_Button", "SVGIcon_Volume", n), x: "0px", y: "0px", width: "256px", height: "255.999px", viewBox: "0 0 256 255.999" }, o.createElement("g", { className: "Speaker" }, o.createElement("path", { d: "M93.785,52.265c-0.946,0-2.357,0.63-3.304,1.577L40.284,98.022c-0.947,0.789-2.831,1.578-4.093,1.578H9.367 C8.104,99.6,7,100.706,7,101.967v52.069c0,1.264,1.104,2.367,2.367,2.367H36.19c1.262,0,3.146,0.632,4.093,1.578l50.197,44.181 c0.947,0.789,2.516,1.578,3.304,1.578s1.578-1.104,1.578-2.367V54.631C95.363,53.369,94.731,52.265,93.785,52.265z" })), !t && o.createElement( "g", { className: "SoundWaves" }, o.createElement("path", { className: "SoundWavesHighest", d: "M193.826,30.402c24.959,24.958,40.349,59.403,40.349,97.604c0,38.199-15.388,72.645-40.349,97.603l9.916,9.916 c28.067-28.067,44.263-64.673,44.263-107.521c0-42.847-16.196-79.455-44.263-107.521" }), o.createElement("path", { className: "SoundWavesHigh", d: "M175.737,47.628l-8.924,8.924c18.271,18.27,29.536,43.484,29.536,71.448s-11.264,53.178-29.536,71.448l8.924,8.924 c20.546-20.546,33.234-49.008,33.234-80.374c0-31.366-12.688-59.829-33.234-80.374V47.628z" }), o.createElement("path", { className: "SoundWavesMed", d: "M148.913,74.454l-8.925,8.925c11.488,11.488,18.491,27.236,18.491,44.624c0,17.388-7.054,33.281-18.491,44.575l8.875,8.975 c13.811-13.635,22.239-32.753,22.239-53.55c0-20.797-8.432-39.793-22.189-53.55V74.454z" }), o.createElement("path", { className: "SoundWavesLow", d: "M121.989,101.229l-8.778,9.073c4.641,4.516,7.397,10.706,7.397,17.702c0,6.995-2.755,13.186-7.397,17.702l8.778,9.073 c7.035-6.844,11.243-16.413,11.243-26.775C133.232,117.643,129.024,108.075,121.989,101.229z" }), ), o.createElement("g", { className: "SoundX" }, o.createElement("line", { fill: "none", strokeWidth: t ? 10 : 0, stroke: "#fff", strokeMiterlimit: "10", x1: "137", y1: "170.667", x2: "223.167", y2: "84.5" }), o.createElement("line", { fill: "none", strokeWidth: t ? 10 : 0, stroke: "#fff", strokeMiterlimit: "10", x1: "137", y1: "84.5", x2: "223.167", y2: "170.667" })), ); } function z() { return o.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_NewChatGroup", x: "0px", y: "0px", viewBox: "0 0 256 256" }, o.createElement("path", { className: "Bubble", strokeWidth: "12", strokeMiterlimit: "10", d: "M127.393,10.833 c64.854,0,117.46,52.609,117.46,117.013c0,24.035-7.254,45.804-19.5,63.943c-4.99,7.711,13.15,39.457,20.408,51.705 c4.989,8.612-51.701-19.05-59.412-14.514c-17.233,9.979-37.188,15.872-58.957,15.872c-64.859,0-117.465-52.607-117.465-117.008 C9.928,63.442,62.534,10.833,127.393,10.833z" }), o.createElement("line", { strokeWidth: "22", strokeLinecap: "round", strokeMiterlimit: "10", x1: "83.5", y1: "128.886", x2: "176.184", y2: "128.886" }), o.createElement("line", { strokeWidth: "22", strokeLinecap: "round", strokeMiterlimit: "10", x1: "129.842", y1: "82.544", x2: "129.842", y2: "175.228" })); } function K(e) { return o.createElement("svg", Object.assign({ width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M31.7 15.75C31.703 13.1045 30.94 10.5148 29.5031 8.2936C28.0663 6.07238 26.0171 4.31465 23.603 3.23272C21.189 2.15079 18.5133 1.79092 15.8991 2.19659C13.285 2.60226 10.8442 3.75611 8.87157 5.51878C6.89893 7.28145 5.47882 9.57755 4.78275 12.1298C4.08667 14.682 4.14441 17.3811 4.94899 19.9013C5.75356 22.4214 7.27057 24.6546 9.31678 26.3313C11.363 28.008 13.8509 29.0565 16.48 29.35V35.05L27.31 25.79C28.6947 24.5098 29.7995 22.9569 30.555 21.2291C31.3105 19.5012 31.7003 17.6358 31.7 15.75ZM16.25 17.75V23H19.75V17.75H25V14.25H19.75V9H16.25V14.25H11V17.75H16.25Z", fill: "currentColor" })); } function q() { return o.createElement("svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Crown", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("g", null, o.createElement("path", { d: "M239.874,94.963l-31.115,21.325c-18.18,12.586-43.351,5.594-52.44-14.333l-23.772-50.692c-2.099-4.194-8.041-4.194-9.789,0 l-23.074,50.343c-9.439,20.627-35.31,27.27-53.49,13.983L16.128,93.565c-4.195-3.147-10.139,1.049-8.391,6.293l31.464,106.628 c0.35,1.049,1.398,1.397,2.098,1.397h173.752c1.049,0,1.749-0.698,2.098-1.397l31.115-104.53 C250.012,96.36,244.068,91.816,239.874,94.963z" }))); } function Z() { return o.createElement("svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Play", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { className: "playTriangle", d: "M65.321,33.521c-11.274-6.615-20.342-1.471-20.342,11.52V210.96c0,12.989,9.068,18.135,20.342,11.521l137.244-82.348 c11.274-6.618,11.274-17.646,0-24.509L65.321,33.521z" })); } function Q() { return o.createElement("svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Pause", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { d: "M44.979,219.364c0,3.3,2.7,6,6,6h49.753c3.3,0,6-2.7,6-6V36.5c0-3.3-2.7-6-6-6H50.979c-3.3,0-6,2.7-6,6V219.364z" }), o.createElement("path", { d: "M149.267,219.364c0,3.3,2.7,6,6,6h49.753c3.3,0,6-2.7,6-6V36.5c0-3.3-2.7-6-6-6h-49.753c-3.3,0-6,2.7-6,6V219.364z" })); } function $() { return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_SortBy", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("g", { className: "time" }, o.createElement("circle", { fill: "none", strokeWidth: "10", strokeMiterlimit: "10", cx: "91.735", cy: "128.014", r: "64" }), o.createElement("polyline", { fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", points: "91.735,90.833 91.735,128.014 116.58,152.086 \t" })), o.createElement("g", { className: "alphabet" }, o.createElement("polyline", { fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", points: "70.268,109.934 94.483,63.635 119.77,109.934" }), o.createElement("line", { fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", x1: "77.458", y1: "97.861", x2: "112.135", y2: "97.861" }), o.createElement("polyline", { fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", points: "70.045,145.379 119.547,145.379 70.045,192.032 119.547,192.032" })), o.createElement("g", { className: "Arrow" }, o.createElement("polyline", { fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", points: "199.735,63.66 199.735,192.366 171.207,163.675" }), o.createElement("polyline", { fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", points: "199.735,63.66 199.735,192.366 228.266,163.675" })), ); } function Y(e) { var t; return o.createElement("svg", Object.assign({ version: "1.1", id: "base", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Check", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256", strokeWidth: "24", stroke: null !== (t = e.color) && void 0 !== t ? t : "#fff", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10" }, e), o.createElement("polyline", { fill: "none", points: "49.5,147.75 95,210.75 206.5,45.25 " })); } function J(e) { let t = e.highlightColor || "#00ccff", n = e.color || "#2d73ff"; const [i, r] = (0, c.y)(), [a, s] = (0, c.y)(), [l] = (0, o.useState)(Math.random().toString()); return o.createElement( "svg", { version: "1.1", id: "base", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_DialogCheck", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("defs", null, o.createElement("linearGradient", { id: i, x1: "0%", y1: "0%", x2: "100%", y2: "100%" }, o.createElement("stop", { offset: "0%", stopColor: t }), o.createElement("stop", { offset: "100%", stopColor: n })), o.createElement("filter", { id: a, x: "0", y: "0", width: "200%", height: "200%" }, o.createElement("feOffset", { result: "offOut", in: "SourceAlpha", dx: "20", dy: "20" }), o.createElement("feGaussianBlur", { result: "blurOut", in: "offOut", stdDeviation: "10" }), o.createElement("feBlend", { in: "SourceGraphic", in2: "blurOut", mode: "normal" }))), o.createElement("path", { fill: "none", stroke: r, strokeWidth: "24", strokeLinecap: "round", strokeLinejoin: "miter", strokeMiterlimit: "10", d: "M206.5,45.25L95,210.75l-45.5-63", strokeDasharray: "365.19 365.19", strokeDashoffset: "0.00" }), o.createElement("path", { fill: "none", opacity: ".2", filter: s, stroke: r, strokeWidth: "24", strokeLinecap: "round", strokeLinejoin: "miter", strokeMiterlimit: "10", d: "M206.5,45.25L95,210.75l-45.5-63", strokeDasharray: "365.19 365.19", strokeDashoffset: "0.00" }), ); } function ee(e) { const { className: t, color: n = "#020202" } = e; return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: (0, r.Z)("SVGIcon_Button", "SVGIcon_Caution", t), x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("g", { className: "triangle" }, o.createElement("path", { stroke: n, strokeWidth: "16", strokeLinecap: "round", strokeMiterlimit: "10", d: "M127.9,76.632" }), o.createElement("path", { fill: "none", stroke: n, strokeWidth: "11", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "5", d: "M128.001,226.606c42.507,0,81.538,0,87.756,0c31.222,0,36.95-14.974,24.045-34.771c-6.921-10.617-78.297-122.962-89.163-140.254\tC141.859,37.613,138.542,29.393,128,29.393l0,0c-10.543,0-13.86,8.222-22.639,22.189C94.495,68.874,23.119,181.219,16.198,191.836 c-12.905,19.797-7.175,34.771,24.045,34.771C46.463,226.606,85.494,226.606,128.001,226.606" }), o.createElement("path", { fill: n, d: "M127.9,208.12" })), o.createElement("g", { className: "exclamation" }, o.createElement("line", { fill: "none", stroke: n, strokeWidth: "16", strokeLinecap: "round", strokeMiterlimit: "10", x1: "127.9", y1: "76.632", x2: "127.9", y2: "160.07" }), o.createElement("path", { fill: n, d: "M127.9,208.12c-6.377,0-11.548-5.17-11.548-11.548c0-6.377,5.17-11.547,11.548-11.547 c6.377,0,11.547,5.17,11.547,11.547C139.447,202.95,134.277,208.12,127.9,208.12" })), ); } function te() { return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Lock", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { className: "topLock", d: "M203.553,197.794c0,21.929-17.778,39.706-39.706,39.706H92.154c-21.929,0-39.706-17.777-39.706-39.706v-71.693 c0-21.928,17.778-39.706,39.706-39.706h71.692c21.928,0,39.706,17.778,39.706,39.706V197.794z M128.001,129.664 c-8.941,0-16.19,7.248-16.19,16.189c0,5.589,2.833,10.518,7.137,13.427c2.066,1.395,0.318,23.508,0.318,32.842 c0,2.292-0.078,3.65,8.734,3.65c8.676,0,8.75-1.221,8.75-3.654c0-9.348-1.708-31.469,0.368-32.886 c4.269-2.916,7.071-7.821,7.071-13.38C144.191,136.912,136.941,129.664,128.001,129.664z" }), o.createElement("path", { className: "baseLock", fill: "none", stroke: "#ffffff", strokeWidth: "22", strokeMiterlimit: "10", d: "M84.813,172.74V73.688l0,0 c0-23.85,19.335-43.188,43.187-43.188l0,0c23.852,0,43.188,19.337,43.188,43.188l0,0v23.885" }), ); } function ne() { return o.createElement( "svg", { version: "1.1", id: "base", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Video", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { className: "videoPlayButton", d: "M165.399,124.063L109.118,92.06c-1.399-0.797-3.118-0.787-4.508,0.026c-1.39,0.805-2.25,2.295-2.25,3.905v64.008 c0,1.609,0.86,3.1,2.25,3.913c0.705,0.412,1.491,0.613,2.277,0.613c0.768,0,1.546-0.191,2.241-0.596l56.283-32.003 c1.416-0.806,2.285-2.306,2.285-3.934C167.694,126.368,166.816,124.869,165.399,124.063z" }), o.createElement("path", { d: "M238.069,40.646H214.25h-28.82h-28.82h-28.458h-0.36H99.333H70.536H41.727h-23.82c-3.184,0-5.773,2.59-5.773,5.772v23.856 v120.441v18.867c0,3.184,2.589,5.771,5.773,5.771h2.415h21.394h28.82h28.82h28.459h0.361h28.457h28.82h28.82h23.82 c3.184,0,5.773-2.589,5.773-5.771v-18.867V70.274V46.418C243.844,43.223,241.254,40.646,238.069,40.646z M191.215,47.181h17.273 V64.5h-17.273V47.181L191.215,47.181z M162.396,47.181h17.272V64.5h-17.272V47.181z M133.938,47.181h16.912V64.5h-16.912V47.181z\tM105.128,47.181h16.912V64.5h-16.912V47.181z M76.309,47.181h17.273V64.5H76.309V47.181z M47.488,47.181h17.273V64.5H47.488V47.181 z M18.681,47.181h17.273V64.5H18.681V47.181z M35.954,208.811H18.681v-17.319h17.273V208.811z M64.763,208.811H47.489v-17.319 h17.273V208.811L64.763,208.811z M93.583,208.811H76.31v-17.319h17.273V208.811z M122.041,208.811h-16.912v-17.319h16.912V208.811z M150.849,208.811h-16.912v-17.319h16.912V208.811z M179.668,208.811h-17.272v-17.319h17.272V208.811z M208.488,208.811h-17.273 v-17.319h17.273V208.811z M237.297,208.811h-17.273v-17.319h17.273V208.811L237.297,208.811z M237.297,184.943H214.25h-28.819 h-28.82h-28.458h-0.361H99.333H70.537H41.728H18.682V71.047h23.046h28.82h28.82h28.458h0.36h28.458h28.82h28.82h23.045v113.896 H237.297z M237.297,64.5h-17.273V47.181h17.273V64.5L237.297,64.5z", }), ); } function ie() { return o.createElement( "svg", { xmlns: "http://www.w3.org/2000/svg", version: "1.1", className: "SVGIcon_Button SVGIcon_Image", x: "0px", y: "0px", viewBox: "0 0 100 100", enableBackground: "new 0 0 100 100" }, o.createElement("path", { stroke: "#ffffff", fill: "#ffffff", d: "M83.086,12.091H16.913C10.344,12.091,5,17.435,5,24.004v51.992l0.005,0.102c0.056,6.514,5.396,11.813,11.908,11.813h66.173 c6.531,0,11.874-5.314,11.906-11.764L95,24.004C95,17.435,89.654,12.091,83.086,12.091z M83.086,82.989H16.913 c-3.516,0-6.488-2.653-6.93-6.106l18.899-20.615c1.226-1.34,2.85-2.076,4.574-2.076c1.723,0,3.347,0.736,4.574,2.078l19.611,21.393 c0.885,0.961,2.508,1.029,3.473,0.148c1-0.916,1.068-2.476,0.152-3.478l-4.113-4.485l8.406-8.918 c1.258-1.332,2.926-2.064,4.696-2.064c1.772,0,3.44,0.732,4.696,2.064l15.061,15.973C89.564,80.346,86.594,82.989,83.086,82.989z M90.08,69.801L78.532,57.555c-2.194-2.328-5.132-3.609-8.275-3.609c-3.142,0-6.08,1.281-8.272,3.609l-8.164,8.656l-12.162-13.27 c-2.171-2.366-5.084-3.67-8.201-3.67c-3.119,0-6.031,1.304-8.202,3.67L9.92,69.673V24.004c0-3.856,3.137-6.994,6.993-6.994h66.173 c3.857,0,6.994,3.137,6.994,6.994V69.801z" }), o.createElement("path", { stroke: "#ffffff", fill: "#ffffff", d: "M68.907,22.489c-6.569,0-11.914,5.344-11.914,11.914c0,6.569,5.345,11.913,11.914,11.913 c6.567,0,11.913-5.344,11.913-11.913C80.82,27.833,75.477,22.489,68.907,22.489z M68.907,41.396c-3.856,0-6.993-3.137-6.993-6.993 s3.137-6.994,6.993-6.994c3.854,0,6.991,3.138,6.991,6.994S72.764,41.396,68.907,41.396z" }), ); } function oe(e) { return (0, l.id)() ? o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Bell", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M32 24V26H4V24L8 19V12C8 9.34784 9.05357 6.8043 10.9289 4.92893C12.8043 3.05357 15.3478 2 18 2C20.6522 2 23.1957 3.05357 25.0711 4.92893C26.9464 6.8043 28 9.34784 28 12V19L32 24ZM18 34C19.2396 33.9986 20.4483 33.6133 21.46 32.897C22.4718 32.1807 23.2368 31.1687 23.65 30H12.35C12.7632 31.1687 13.5282 32.1807 14.54 32.897C15.5517 33.6133 16.7604 33.9986 18 34Z", fill: "currentColor" })) : o.createElement("svg", { version: "1.1", id: "base", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Bell", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { d: "M107.785,33.965c-34.875,8.972-60.644,40.618-60.644,78.308v53.903c0,4.965-4.035,8.99-8.975,8.99 c-9.929,0-17.978,8.066-17.978,17.971c0,9.924,8.059,17.969,18.013,17.969h179.598c9.948,0,18.014-8.066,18.014-17.969 c0-9.926-8.087-17.971-17.979-17.971c-4.956,0-8.975-3.993-8.975-8.99v-53.903c0-37.676-25.763-69.333-60.644-78.308v-9.281 c0-11.193-9.052-20.219-20.215-20.219c-11.143,0-20.215,9.052-20.215,20.219V33.965L107.785,33.965z M96.554,220.09h62.891 c0,17.366-14.079,31.445-31.445,31.445C110.633,251.535,96.554,237.458,96.554,220.09z" })); } function re(e) { return o.createElement("svg", { style: { transform: `rotate(${e.angle}deg)` }, version: "1.1", id: "arrowBase", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Arrow", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("polyline", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", points: "128,247.688 128,8.313 181.061,61.674 " }), o.createElement("polyline", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", points: "128,247.688 128,8.313 74.939,61.674 " })); } function ae(e) { return o.createElement("svg", { style: { transform: `rotate(${e.angle}deg)` }, version: "1.1", id: "arrowBase", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_DoubleArrow", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("polyline", { className: "Arrow1", fill: "none", stroke: "#ffffff", strokeWidth: "23", strokeLinecap: "round", strokeMiterlimit: "10", points: "135.65,21.667 30.081,127.235 137.18,234.333 " }), !e.singlearrow && o.createElement("polyline", { className: "Arrow2", fill: "none", stroke: "#ffffff", strokeWidth: "23", strokeLinecap: "round", strokeMiterlimit: "10", points: "224.389,21.667 118.821,127.235 225.92,234.333 " })); } function se() { return o.createElement("svg", { version: "1.1", id: "arrowBase", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_DoubleArrow", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("polyline", { className: "Arrow1", fill: "none", stroke: "#ffffff", strokeWidth: "23", strokeLinecap: "round", strokeMiterlimit: "10", points: "135.65,21.667 30.081,127.235 137.18,234.333 " }), o.createElement("polyline", { className: "Arrow2", fill: "none", stroke: "#ffffff", strokeWidth: "23", strokeLinecap: "round", strokeMiterlimit: "10", points: "224.389,21.667 118.821,127.235 225.92,234.333 " })); } function le() { return o.createElement("svg", { version: "1.1", id: "base", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Maximize", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("rect", { x: "24", y: "42.167", fill: "none", stroke: "rgb(120, 138, 146)", strokeWidth: "18", strokeMiterlimit: "10", width: "208", height: "171.667" }), o.createElement("line", { fill: "none", stroke: "rgb(120, 138, 146)", strokeWidth: "42", strokeMiterlimit: "10", x1: "24", y1: "54.01", x2: "232", y2: "54.01" })); } function ce() { return o.createElement("svg", { version: "1.1", id: "base", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Minimize", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("line", { fill: "none", stroke: "rgb(120, 138, 146)", strokeWidth: "18", strokeMiterlimit: "10", x1: "24", y1: "209.01", x2: "232", y2: "209.01" })); } function me() { return o.createElement("svg", { version: "1.1", id: "Layer_2", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Restore", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("polyline", { fill: "none", stroke: "rgb(120, 138, 146)", strokeWidth: "12", strokeMiterlimit: "10", points: "83,90.861 83,42.167 232,42.167 232,165.14 173,165.14 " }), o.createElement("rect", { x: "24", y: "90.861", fill: "none", stroke: "rgb(120, 138, 146)", strokeWidth: "18", strokeMiterlimit: "10", width: "149", height: "122.973" })); } function de() { return o.createElement("svg", { version: "1.1", id: "Layer_2", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Reload", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { fill: "none", stroke: "#ffffff", strokeWidth: "30", strokeLinecap: "round", strokeMiterlimit: "10", d: "M229.809,147.639 c-9.178,47.863-51.27,84.027-101.809,84.027c-57.253,0-103.667-46.412-103.667-103.666S70.747,24.334,128,24.334 c34.107,0,64.368,16.472,83.261,41.895" }), o.createElement("polygon", { points: "147.639,108.361 245.755,10.166 245.834,108.361 " })); } function he() { return o.createElement("svg", { version: "1.1", id: "Layer_2", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Trade", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { d: "M132.025,162.943h40.246c0,0,3.219,56.879-31.303,79.599c-12.298,8.094,71.103-6.708,75.574-79.599h35.775l-60.146-74.681 L132.025,162.943z" }), o.createElement("path", { d: "M123.975,93.056H83.729c0,0-3.219-56.879,31.303-79.599c12.298-8.094-71.103,6.708-75.574,79.599H3.682l60.146,74.681 L123.975,93.056z" })); } function ue() { return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Trash", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("g", { className: "base" }, o.createElement("path", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", d: "M216.773,43.909 l-7.399,177.589c-0.37,8.893-7.919,16.1-16.812,16.1H63.437c-8.914,0-16.442-7.24-16.812-16.1L39.226,43.909" })), o.createElement("g", { className: "lines" }, o.createElement("path", { className: "line1", fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", d: "M128,68.12v137.197" }), o.createElement("path", { className: "line2", fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", d: "M83.613,68.12 l4.035,137.197" }), o.createElement("path", { className: "line3", fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", d: "M172.387,68.12 l-4.035,137.197" })), o.createElement("g", { className: "lid" }, o.createElement("path", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", d: "M27.121,38.577H228.88" }), o.createElement("path", { fill: "none", stroke: "#ffffff", strokeWidth: "10", d: "M87.648,38.577l4.319-10.796c2.072-5.181,8.292-9.379,13.84-9.379h44.386 c5.572,0,11.761,4.18,13.841,9.379l4.319,10.796" })), ); } function pe() { return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", style: { overflow: "visible", width: "100%", height: "100%", maxWidth: "320px", maxHeight: "320px" }, x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("g", { className: "base" }, o.createElement("path", { fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", d: "M216.773,43.909 l-7.399,177.589c-0.37,8.893-7.919,16.1-16.812,16.1H63.437c-8.914,0-16.442-7.24-16.812-16.1L39.226,43.909" })), o.createElement("g", { className: "lines" }, o.createElement("path", { className: "line1", fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", d: "M128,68.12v137.197" }), o.createElement("path", { className: "line2", fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", d: "M83.613,68.12 l4.035,137.197" }), o.createElement("path", { className: "line3", fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", d: "M172.387,68.12 l-4.035,137.197" })), o.createElement("g", { className: "lid" }, o.createElement("path", { fill: "none", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", d: "M27.121,38.577H228.88" }), o.createElement("path", { fill: "none", strokeWidth: "10", d: "M87.648,38.577l4.319-10.796c2.072-5.181,8.292-9.379,13.84-9.379h44.386 c5.572,0,11.761,4.18,13.841,9.379l4.319,10.796" })), ); } function _e() { return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Scroll", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement( "g", { transform: "translate(0,-952.36215)" }, o.createElement("path", { d: "M49.624,963.362c-20.72,0-37.667,14.78-37.667,32.806c0,3.589,3.353,6.499,7.486,6.499l52.407-0.305v162.5 c0,18.134,17.404,32.5,38.018,32.5h96.508c20.612,0,37.667-14.475,37.667-32.5c0-3.59-3.354-6.499-7.486-6.5H217.84V996.168 c0-18.024-16.947-32.806-37.667-32.806H49.624z M49.624,976.362h2.223c0.569,0.162,1.158,0.265,1.754,0.306 c8.159,1.274,14.426,6.085,16.962,12.694l-42.112,0.306C31.513,981.897,39.656,976.362,49.624,976.362z M79.337,976.362h100.836 c12.587,0,22.694,8.77,22.694,19.806v162.194H139.23c-4.135,0.001-7.486,2.91-7.488,6.5c0,4.609-1.43,7.796-4.21,10.765 c-2.78,2.972-7.203,5.757-13.686,7.923c-0.624,0.201-1.214,0.476-1.755,0.813h-2.223c-12.695,0-23.044-8.573-23.044-19.5v-169 C86.824,988.529,84.023,981.812,79.337,976.362z M108.582,1005.611c-4.135,0.169-7.33,3.216-7.135,6.807 c0.193,3.59,3.702,6.363,7.837,6.194h71.123c4.135,0.051,7.535-2.817,7.592-6.407c0.059-3.591-3.246-6.542-7.381-6.594 c-0.069,0-0.141,0-0.211,0h-71.123C109.05,1005.603,108.816,1005.603,108.582,1005.611z M108.582,1044.612 c-4.135,0.169-7.33,3.215-7.135,6.807c0.193,3.588,3.702,6.362,7.837,6.192h71.123c4.135,0.051,7.535-2.816,7.592-6.407 c0.059-3.59-3.246-6.542-7.381-6.592c-0.069,0-0.141,0-0.211,0h-71.123C109.05,1044.603,108.816,1044.603,108.582,1044.612z M108.582,1083.612c-4.135,0.169-7.33,3.216-7.135,6.806c0.193,3.589,3.702,6.363,7.837,6.193h71.123 c4.135,0.052,7.535-2.816,7.592-6.407c0.059-3.59-3.246-6.541-7.381-6.592c-0.069-0.001-0.141-0.001-0.211,0h-71.123 C109.05,1083.602,108.816,1083.602,108.582,1083.612z M108.582,1122.611c-4.135,0.17-7.33,3.216-7.135,6.806 c0.193,3.591,3.702,6.364,7.837,6.195h71.123c4.135,0.05,7.535-2.818,7.592-6.408c0.059-3.591-3.246-6.541-7.381-6.593 c-0.069,0-0.141,0-0.211,0h-71.123C109.05,1122.602,108.816,1122.602,108.582,1122.611z M145.547,1171.363h82.002 c-3.09,7.604-11.189,12.999-21.173,12.999h-67.849c0.196-0.197,0.512-0.306,0.703-0.509 C142.576,1180.277,144.436,1175.973,145.547,1171.363z", }), ), ); } function ge(e) { return o.createElement("svg", { style: { transform: `rotate(${e.angle}deg)` }, version: "1.1", id: "base", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_FlatArrow", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("polygon", { points: "13.913,141 128,59 242.087,141 ", fill: "#ffffff" })); } function Ce(e) { let { bPending: t, bShowArm: n, className: a } = e, s = (0, i._T)(e, ["bPending", "bShowArm", "className"]); return (0, l.id)({ bSuppressAssert: !0 }) ? o.createElement( "svg", Object.assign({ className: (0, r.Z)("SVGIcon_Button", "SVGIcon_FriendIcon", a), viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s), o.createElement("path", { d: "M18 17C15.6131 17 13.3239 17.9482 11.636 19.636C9.94821 21.3239 9 23.6131 9 26V31H27V26C27 23.6131 26.0518 21.3239 24.364 19.636C22.6761 17.9482 20.3869 17 18 17ZM18 14C18.9889 14 19.9556 13.7068 20.7779 13.1573C21.6001 12.6079 22.241 11.827 22.6194 10.9134C22.9978 9.99979 23.0969 8.99446 22.9039 8.02455C22.711 7.05465 22.2348 6.16373 21.5355 5.46447C20.8363 4.76521 19.9454 4.289 18.9755 4.09608C18.0055 3.90315 17.0002 4.00217 16.0866 4.3806C15.173 4.75904 14.3921 5.39991 13.8427 6.22215C13.2932 7.0444 13 8.0111 13 9C13 10.3261 13.5268 11.5979 14.4645 12.5355C15.4021 13.4732 16.6739 14 18 14Z", fill: "currentColor" }), o.createElement("path", { className: "WavingArm", opacity: n ? "1" : "0", d: "M4.67541 11.8555C5.6007 10.8308 7.18156 10.7501 8.20635 11.6754L18.9515 21.3773L15.6007 25.0884L4.85556 15.3865C3.83077 14.4612 3.75011 12.8803 4.67541 11.8555V11.8555Z", fill: "currentColor", strokeWidth: "0" }), o.createElement("path", { opacity: n ? "1" : "0", d: "M32.3573 11.8876C33.2626 12.93 33.1515 14.509 32.109 15.4144L23.2784 23.083L20 19.3078L28.8305 11.6392C29.873 10.7339 31.452 10.8451 32.3573 11.8876Z", fill: "currentColor", strokeWidth: "0" }), ) : o.createElement( "svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: (0, r.Z)("SVGIcon_Button", "SVGIcon_FriendIcon", t ? " SVGIcon_FriendIcon_Pending" : "", a), x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement( "g", { className: "Outline" }, o.createElement("g", { transform: "matrix(1.34048,0,0,1.34048,-10.0942,-5.50445)" }, o.createElement("path", { d: "M102.239,90.394c-22.556,0-40.906-18.351-40.906-40.906c0-22.556,18.35-40.906,40.906-40.906s40.906,18.35,40.906,40.906 C143.145,72.043,124.795,90.394,102.239,90.394z" })), o.createElement("path", { d: "M127.453,250.212c-30.208,0-52.086-4.188-65.028-12.45c-12.507-7.983-13.141-17.484-13.141-19.308v-41.781 c0-20.554,5.356-38.104,15.489-50.754c11.63-14.519,29.216-22.193,50.858-22.194h23.646c21.643,0,39.229,7.674,50.858,22.193 c10.133,12.65,15.488,30.201,15.488,50.754v41.751c0.011,2.202-0.586,8.058-6.43,14.175 c-11.164,11.687-35.301,17.613-71.732,17.613C127.458,250.212,127.458,250.212,127.453,250.212z" }), o.createElement("path", { className: "WavingArm", opacity: t ? "1" : "0", d: "M87.625,170.102c-5.877,0-14.85-1.804-24.219-10.4c-8.677-7.961-20.959-20.438-30.563-31.048 c-18.766-20.732-21.125-26.658-19.522-32.832c1.463-5.64,10.288-27.077,26.729-28.926c0.429-0.048,0.867-0.072,1.303-0.072 c7.609,0,14.543,6.335,38.063,31.516c7.141,7.645,14.524,15.549,18.002,18.33l0.803,0.641c5.551,4.432,11.291,9.015,15.104,14.136 c8.477,11.383,3.634,20.705,1.158,24.185C108.034,164.692,97.995,170.102,87.625,170.102z" }), ), o.createElement("g", { className: "foreground" }, o.createElement("g", { transform: "matrix(1.34048,0,0,1.34048,-10.0942,-5.50445)" }, o.createElement("circle", { fill: "currentColor", cx: "102.239", cy: "49.488", r: "33.446" })), o.createElement("path", { fill: "currentColor", d: "M195.624,218.454v-41.781c0-34.743-16.666-62.948-56.347-62.948h-11.822h-0.997h-10.826 c-39.68,0.001-56.348,28.205-56.348,62.948v41.781c0,0,0,21.758,68.169,21.758C196.62,240.214,195.624,218.454,195.624,218.454z" }), o.createElement("path", { className: "WavingArm", opacity: t ? "1" : "0", d: "M41.167,76.833c6.53-0.734,39.348,39.127,50.007,47.647c10.659,8.52,21.327,16.686,15.16,25.353 s-20.646,16.74-36.167,2.5 s-48.516-48.801-47.167-54S31.599,77.909,41.167,76.833z" })), ); } function fe(e) { return o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_FavoriteFriends", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { d: "M18 34.05H2C2 31.9283 2.84285 29.8935 4.34315 28.3932C5.84344 26.8929 7.87827 26.05 10 26.05C12.1217 26.05 14.1566 26.8929 15.6569 28.3932C17.1571 29.8935 18 31.9283 18 34.05ZM10 23.05C10.89 23.05 11.76 22.7861 12.5001 22.2917C13.2401 21.7972 13.8169 21.0944 14.1575 20.2721C14.4981 19.4499 14.5872 18.5451 14.4135 17.6721C14.2399 16.7992 13.8113 15.9974 13.182 15.3681C12.5526 14.7387 11.7508 14.3101 10.8779 14.1365C10.005 13.9629 9.10019 14.052 8.27792 14.3926C7.45566 14.7332 6.75285 15.31 6.25839 16.05C5.76392 16.79 5.5 17.66 5.5 18.55C5.49868 19.1414 5.61418 19.7271 5.83986 20.2737C6.06554 20.8202 6.39695 21.3168 6.81508 21.735C7.23321 22.1531 7.72981 22.4845 8.27637 22.7102C8.82293 22.9359 9.40868 23.0514 10 23.05ZM31.66 28.39C30.186 26.916 28.1949 26.0755 26.1105 26.0474C24.0261 26.0194 22.0131 26.8061 20.5 28.24C21.4889 30.0165 22.0054 32.0169 22 34.05H34C34.0008 32.9992 33.7946 31.9584 33.3931 30.9873C32.9916 30.0161 32.4027 29.1336 31.66 28.39ZM21.5 18.55C21.5 19.4401 21.7639 20.3101 22.2584 21.0501C22.7529 21.7901 23.4557 22.3669 24.2779 22.7075C25.1002 23.0481 26.005 23.1372 26.8779 22.9636C27.7508 22.7899 28.5526 22.3614 29.182 21.732C29.8113 21.1027 30.2399 20.3009 30.4135 19.428C30.5872 18.555 30.4981 17.6502 30.1575 16.828C29.8169 16.0057 29.2401 15.3029 28.5001 14.8084C27.76 14.314 26.89 14.05 26 14.05C25.4087 14.0487 24.8229 14.1642 24.2764 14.3899C23.7298 14.6156 23.2332 14.947 22.8151 15.3651C22.397 15.7833 22.0655 16.2799 21.8399 16.8264C21.6142 17.373 21.4987 17.9587 21.5 18.55ZM20.83 6.91005L23.65 4.16005L19.75 3.59005L18 0.0500488L16.25 3.59005L12.35 4.16005L15.17 6.91005L14.51 10.81L18 9.00005L21.49 10.84L20.83 6.91005Z", fill: "currentColor", }), ); } function ve() { return o.createElement("svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_DoNotDisturb", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("circle", { fill: "none", stroke: "#ffffff", strokeWidth: "24", strokeMiterlimit: "10", cx: "128", cy: "128", r: "101.5" }), o.createElement("line", { fill: "none", stroke: "#ffffff", strokeWidth: "24", strokeMiterlimit: "10", x1: "73", y1: "128", x2: "183", y2: "128" })); } function Se(e) { return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", style: { transform: `scaleX(${e.bFlipHorizontal ? -1 : 1})` }, className: "SVGIcon_Button SVGIcon_MediaControls", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { className: "Arrow", d: "M77.003,54.763h32.784c3.794,0,9.113,2.181,11.814,4.848l63.604,62.773c2.703,2.667,2.727,7.054,0.05,9.748 l-63.705,64.206c-2.674,2.693-7.968,4.898-11.763,4.898H77.003" }), o.createElement("polyline", { className: "preArrowBox", opacity: e.bHidePreArrow ? "0" : "1", points: "6.833,54.763 46.71,54.763 46.71,201.236 6.833,201.236 \t" }), o.createElement("polyline", { className: "jumpAheadBox", opacity: e.bShowJumpAheadBox ? "1" : "0", points: "6.833,54.764 86.386,54.764 86.386,201.236 6.833,201.236 \t" }), o.createElement("polyline", { className: "postArrowBox", opacity: e.bHidePostArrow ? "0" : "1", points: "209.29,54.763 249.167,54.763 249.167,201.236 209.29,201.236 \t" }), ); } function be() { const [e, t] = (0, c.y)(), [n, i] = (0, c.y)(); return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_SteamTV", x: "0px", y: "0px", width: "1024px", height: "256px", viewBox: "0 0 1024 256" }, o.createElement("defs", null, o.createElement("linearGradient", { id: e, x1: "0%", y1: "0%", x2: "100%", y2: "0%" }, o.createElement("stop", { offset: "0%", stopColor: "rgb(55, 102, 251)" }), o.createElement("stop", { offset: "100%", stopColor: "rgb(91, 106, 219)" })), o.createElement("linearGradient", { id: n, x1: "0%", y1: "0%", x2: "100%", y2: "0%" }, o.createElement("stop", { offset: "0%", stopColor: "rgb(91, 106, 219)" }), o.createElement("stop", { offset: "100%", stopColor: "rgb(125, 110, 188)" }))), o.createElement("circle", { className: "logoBG", opacity: "0", fill: "#000000", cx: "156.586", cy: "128", r: "125.914" }), o.createElement( "g", { id: "logo" }, o.createElement("path", { fill: t, d: "M156.374,5.355c-64.404,0-117.167,49.661-122.18,112.77l65.712,27.171 c5.567-3.808,12.293-6.032,19.53-6.032c0.649,0,1.294,0.016,1.934,0.051l29.226-42.355c0-0.202-0.005-0.399-0.005-0.598 c0-25.496,20.74-46.241,46.237-46.241c25.498,0,46.239,20.745,46.239,46.241c0,25.494-20.741,46.241-46.239,46.241 c-0.352,0-0.698-0.01-1.047-0.021l-41.68,29.741c0.022,0.546,0.041,1.095,0.041,1.644c0,19.14-15.569,34.707-34.706,34.707 c-16.796,0-30.843-11.991-34.026-27.87l-46.993-19.429c14.55,51.464,61.831,89.19,117.957,89.19 c67.713,0,122.605-54.893,122.605-122.604C278.978,60.244,224.086,5.355,156.374,5.355" }), o.createElement("path", { fill: "rgb(67, 104, 241)", d: "M111.026,191.387l-15.061-6.22c2.67,5.56,7.285,10.208,13.418,12.767 c13.25,5.521,28.531-0.771,34.054-14.028c2.674-6.416,2.694-13.5,0.04-19.929c-2.646-6.431-7.64-11.451-14.063-14.129 c-6.371-2.648-13.196-2.552-19.198-0.291l15.561,6.436c9.776,4.074,14.396,15.299,10.324,25.072 C132.031,190.841,120.801,195.464,111.026,191.387" }), o.createElement("path", { fill: "rgb(79, 105, 230)", d: "M227.639,96.359c0-16.987-13.82-30.809-30.809-30.809c-16.987,0-30.812,13.821-30.812,30.809 c0,16.988,13.824,30.806,30.812,30.806C213.818,127.165,227.639,113.347,227.639,96.359 M173.736,96.306 c0-12.783,10.364-23.142,23.145-23.142c12.783,0,23.145,10.359,23.145,23.142c0,12.783-10.361,23.142-23.145,23.142 C184.1,119.447,173.736,109.089,173.736,96.306" }), ), o.createElement( "g", { id: "steam" }, o.createElement("path", { fill: "rgb(92, 106, 218)", d: "M404.52,91.9l-7.968,14.006c-6.138-4.287-14.455-6.862-21.717-6.862c-8.299,0-13.437,3.43-13.437,9.586 c0,7.473,9.124,9.212,22.682,14.082c14.574,5.149,22.948,11.21,22.948,24.558c0,18.264-14.359,28.519-34.998,28.519 c-10.063,0-22.195-2.595-31.53-8.265l5.815-15.539c7.579,4.008,16.644,6.381,24.722,6.381c10.897,0,16.071-4.021,16.071-9.96 c0-6.802-7.893-8.843-20.641-13.06c-14.521-4.856-24.586-11.213-24.586-25.992c0-16.658,13.34-26.225,32.538-26.225 C387.797,83.128,398.551,87.367,404.52,91.9" }), o.createElement("polygon", { fill: "rgb(99, 107, 211)", points: "468.163,100.753 468.163,174.252 449.402,174.252 449.402,100.753 422.166,100.753 422.166,84.663 495.315,84.663 495.315,100.753 \t" }), o.createElement("polygon", { fill: "rgb(108, 108, 203)", points: "533.512,100.706 533.512,120.896 569.417,120.896 569.417,136.982 533.512,136.982 533.512,158.014 575.173,158.014 575.173,174.253 514.757,174.253 514.757,84.665 575.173,84.665 575.173,100.706" }), o.createElement("path", { fill: "rgb(117, 109, 195)", d: "M617.054,156.857l-5.932,17.396h-19.67l33.593-89.594h18.888l34.539,89.594h-20.336l-6.061-17.396H617.054z M634.378,106.035l-12.23,35.87h24.723L634.378,106.035z" }), o.createElement("polygon", { fill: "rgb(125, 110, 188)", points: "773.403,119.291 748.888,171.645 738.302,171.645 714.182,119.758 714.182,174.253 696.212,174.253 696.212,84.665 714.138,84.665 744.251,149.33 773.285,84.665 791.374,84.665 791.374,174.253 773.406,174.253" }), ), o.createElement("g", { id: "tv" }, o.createElement("polygon", { fill: "rgb(125, 110, 188)", points: "853.961,92.664 823.506,92.664 823.506,84.147 893.835,84.147 893.835,92.664 863.51,92.664 863.51,174.479 853.961,174.479" }), o.createElement("polygon", { fill: "rgb(125, 110, 188)", points: "909.835,84.147 920.286,84.147 950.612,165.831 980.033,84.147 990.487,84.147 956.421,174.479 944.159,174.479" })), ); } function Ie(e) { const t = (0, r.Z)("SVGIcon_Button", "SVGIcon_SteamLogo", e && e.className); return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", fill: "#FFFFFF", className: t, x: "0px", y: "0px", viewBox: "0 0 256 256" }, o.createElement("path", { fill: "#currentColor", d: "M127.374,5.355c-64.404,0-117.167,49.661-122.18,112.77l65.712,27.171 c5.567-3.808,12.293-6.032,19.53-6.032c0.649,0,1.294,0.017,1.934,0.051l29.226-42.354c0-0.202-0.005-0.399-0.005-0.598 c0-25.496,20.74-46.241,46.237-46.241c25.498,0,46.238,20.745,46.238,46.241c0,25.494-20.74,46.242-46.238,46.242 c-0.352,0-0.698-0.011-1.047-0.021l-41.68,29.741c0.022,0.546,0.041,1.095,0.041,1.644c0,19.141-15.569,34.707-34.706,34.707 c-16.796,0-30.843-11.99-34.026-27.869l-46.993-19.43c14.55,51.464,61.831,89.189,117.957,89.189 c67.713,0,122.604-54.893,122.604-122.604C249.979,60.244,195.086,5.355,127.374,5.355" }), o.createElement("path", { fill: "#currentColor", d: "M82.026,191.387l-15.061-6.22c2.67,5.56,7.285,10.208,13.418,12.767 c13.25,5.521,28.531-0.771,34.054-14.027c2.674-6.416,2.694-13.5,0.04-19.93c-2.646-6.431-7.64-11.451-14.063-14.129 c-6.371-2.647-13.196-2.552-19.198-0.291l15.561,6.437c9.776,4.073,14.396,15.299,10.324,25.071 C103.031,190.841,91.801,195.464,82.026,191.387" }), o.createElement("path", { fill: "#currentColor", d: "M198.639,96.359c0-16.987-13.82-30.809-30.809-30.809c-16.987,0-30.813,13.821-30.813,30.809 c0,16.988,13.824,30.806,30.813,30.806S198.639,113.347,198.639,96.359 M144.736,96.306c0-12.783,10.363-23.142,23.145-23.142 c12.783,0,23.145,10.359,23.145,23.142c0,12.783-10.36,23.142-23.145,23.142C155.1,119.447,144.736,109.089,144.736,96.306" }), ); } function ye() { return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Viewers", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { className: "frontGuy", fill: "#666666", d: "M181.732,53.151c-17.255,0-31.321,13.316-31.321,32.634v25.132 c0,18.005,24.006,21.006,24.382,21.381c-10.691,2.813-30.947,8.252-40.888,15.566c-8.252,6.003-11.44,18.005-13.128,22.882 c-0.75,2.063-1.688,5.064-1.688,7.127c0,0,0,9.94,0,19.881s12.941,16.505,18.005,16.505h89.65c4.877,0,18.006-5.627,18.006-16.505 s0-19.881,0-19.881c0-2.251-0.938-5.627-1.688-7.689c-4.313-10.878-4.688-16.316-13.315-22.319 c-9.941-6.939-30.009-12.19-40.512-15.004c0.374-0.563,24.193-4.127,24.193-22.131V85.785 C213.053,66.467,198.986,53.151,181.732,53.151L181.732,53.151z" }), o.createElement("path", { className: "backGuy", fill: "rgb(144, 153, 161)", d: "M84.204,34.396c-20.068,0-36.385,15.38-36.385,38.074v29.258c0,20.818,27.945,24.382,28.32,24.944 c-12.378,3.189-36.01,9.565-47.638,18.006c-9.753,7.127-13.504,21.006-15.379,26.632c-0.75,2.251-1.876,6.002-1.876,8.253 c0,0,0,11.44,0,23.257c0,11.815,15.004,19.13,20.819,19.13h104.279c5.814,0,20.818-6.564,20.818-19.13c0-12.566,0-23.257,0-23.257 c0-2.438-1.125-6.564-2.063-8.815c-5.063-12.566-5.438-18.942-15.566-26.069c-11.628-8.065-34.885-14.067-47.076-17.443 c0.375-0.563,28.133-4.876,28.133-25.695V72.469C120.59,49.775,104.272,34.396,84.204,34.396L84.204,34.396z" }), ); } function Ee() { return o.createElement( "svg", { version: "1.1", id: "Layer_5", className: "SVGIcon_Button SVGIcon_Globe", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 64 64" }, o.createElement( "g", null, o.createElement("path", { d: "M32.5,5C17.9,5,6,16.9,6,31.5C6,46.1,17.9,58,32.5,58S59,46.1,59,31.5C59,16.9,47.1,5,32.5,5 M32.5,54.7c-1.2,0-2.5-0.1-3.7-0.3c-1.1-1.1-2.1-2.8-3-4.8c-0.8-1.8-1.4-3.8-2-6c2.7-0.3,5.6-0.5,8.6-0.5c3,0,5.9,0.2,8.6,0.5c-0.5,2.2-1.2,4.2-2,6c-0.9,2-1.9,3.7-3,4.8C35,54.6,33.7,54.7,32.5,54.7 M32.5,41.4c-3.2,0-6.2,0.2-9,0.5c-0.6-3-0.9-6.2-1-9.6h19.9c0,3.4-0.4,6.6-1,9.6C38.7,41.6,35.7,41.4,32.5,41.4 M32.5,8.3c1.2,0,2.5,0.1,3.7,0.3c1.1,1.1,2.1,2.8,3,4.8c0.8,1.8,1.4,3.8,2,6c-2.7,0.3-5.6,0.5-8.6,0.5c-3,0-5.9-0.2-8.6-0.5c0.5-2.2,1.2-4.2,2-6c0.9-2,1.9-3.7,3-4.8C30,8.4,31.3,8.3,32.5,8.3 M32.5,21.6c3.2,0,6.2-0.2,9-0.5c0.6,3,0.9,6.2,1,9.6H22.6c0-3.4,0.4-6.6,1-9.6C26.3,21.4,29.3,21.6,32.5,21.6 M44.1,30.7c0-3.5-0.4-6.8-1-9.8c3.4-0.5,6.4-1.1,8.8-2c2.3,3.5,3.6,7.5,3.7,11.8H44.1z M20.9,30.7H9.3c0.1-4.2,1.4-8.3,3.7-11.8c2.5,0.8,5.5,1.5,8.8,2C21.3,23.9,21,27.2,20.9,30.7 M20.9,32.3c0,3.5,0.4,6.8,1,9.8c-3.4,0.5-6.4,1.1-8.8,2c-2.3-3.5-3.6-7.5-3.7-11.8H20.9z M44.1,32.3h11.6c-0.1,4.2-1.4,8.3-3.7,11.8c-2.5-0.8-5.5-1.5-8.8-2C43.7,39.1,44,35.8,44.1,32.3 M51,17.5c-0.1,0-0.2,0.1-0.3,0.1c-2.3,0.7-5,1.3-7.9,1.7c-0.9-4.1-2.3-7.6-4-10.1c3.8,1.1,7.3,3.1,10.2,5.9C49.6,15.9,50.3,16.6,51,17.5 M26.3,9.2c-1.7,2.5-3.1,6-4,10.1c-2.9-0.4-5.6-1-7.9-1.7c-0.1,0-0.2-0.1-0.3-0.1c0.6-0.8,1.3-1.6,2.1-2.4C19,12.2,22.5,10.2,26.3,9.2 M14,45.5c0.1,0,0.2-0.1,0.3-0.1c2.3-0.7,5-1.3,7.9-1.7c0.9,4.1,2.3,7.6,4,10.1c-3.8-1.1-7.3-3.1-10.2-5.9C15.4,47.1,14.7,46.4,14,45.5 M38.7,53.8c1.7-2.5,3.1-6,4-10.1c2.9,0.4,5.6,1,7.9,1.7c0.1,0,0.2,0.1,0.3,0.1c-0.6,0.8-1.3,1.6-2.1,2.4C46,50.8,42.5,52.8,38.7,53.8", }), ), ); } function De() { return o.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_STVTimelineGrabber", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("g", { className: "leftarrow", opacity: "0" }, o.createElement("polygon", { points: "127.817,4.403 4,128 127.817,251.598" })), o.createElement("g", { className: "rightarrow", opacity: "0" }, o.createElement("polygon", { points: "127.816,4.403 251.633,128 127.816,251.598" })), o.createElement("g", { className: "grabber" }, o.createElement("polygon", { points: "145.692,22.132 145.692,234.361 127.817,251.598 110.307,234.361 110.307,22.132 127.817,4.403" }))); } function we() { return o.createElement("svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_STVTimelineMarker", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("polygon", { className: "pointer", points: "128,154.979 46.374,230.548 46.374,253.333 209.626,253.333 209.626,230.548 \t" }), o.createElement("rect", { className: "line", x: "116.271", y: "3.168", width: "23.459", height: "137.332" })); } function Re(e) { return o.createElement( "svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_HideShowChat", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("g", { id: "hidechat", opacity: e.showChat ? "0" : "1" }, o.createElement("polyline", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", points: "156.001,189.834 116.375,189.834 67.31,222.538 67.31,189.834 39.834,189.834 39.834,59.011 59.25,59.011" }), o.createElement("polyline", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", points: "109.427,59.011 225.299,59.011 225.299,189.834 207,189.834" }), o.createElement("line", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", x1: "49.786", y1: "15.012", x2: "214.409", y2: "233.723" })), o.createElement("g", { id: "showchat", opacity: e.showChat ? "1" : "0" }, o.createElement("polygon", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", points: "116.375,189.834 67.31,222.538 67.31,189.834 39.834,189.834 39.834,59.011 225.299,59.011 225.299,189.834" })), o.createElement( "g", { id: "textlines", opacity: e.showChat ? "1" : "0" }, o.createElement("line", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeMiterlimit: "10", x1: "72.333", y1: "124.75", x2: "194.167", y2: "124.75" }), o.createElement("line", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeMiterlimit: "10", x1: "72.333", y1: "155.75", x2: "194.167", y2: "155.75" }), o.createElement("line", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeMiterlimit: "10", x1: "72.333", y1: "93.75", x2: "179.926", y2: "93.75" }), o.createElement("polyline", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", points: "156.001,189.834 116.375,189.834 67.31,222.538 67.31,189.834 39.834,189.834 39.834,59.011 59.25,59.011 " }), o.createElement("polyline", { fill: "none", stroke: "#ffffff", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", points: "109.427,59.011 225.299,59.011 225.299,189.834 207,189.834" }), ), ); } function Ae() { return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_ShowBothChats", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("circle", { opacity: "0", fill: "#FFFFFF", strokeWidth: "0", cx: "166.241", cy: "161.906", r: "75.259" }), o.createElement("polyline", { fill: "none", stroke: "#ffffff", strokeWidth: "8", strokeLinecap: "round", strokeMiterlimit: "10", points: "92.367,155.634 51.311,183 51.311,150.296 23.834,150.296 23.834,19.473 140.5,19.473 140.5,91.5" }), o.createElement("line", { fill: "none", stroke: "#ffffff", strokeWidth: "8", strokeMiterlimit: "10", x1: "48.529", y1: "82.167", x2: "113.379", y2: "82.167" }), o.createElement("line", { fill: "none", stroke: "#ffffff", strokeWidth: "8", strokeMiterlimit: "10", x1: "48.529", y1: "113.167", x2: "113.379", y2: "113.167" }), o.createElement("line", { fill: "none", stroke: "#ffffff", strokeWidth: "8", strokeMiterlimit: "10", x1: "48.529", y1: "51.167", x2: "99.138", y2: "51.167" }), o.createElement("path", { d: "M166.241,82.167c-43.933,0-79.74,35.807-79.74,79.74c0,43.932,35.808,79.739,79.74,79.739 c43.932,0,79.739-35.808,79.739-79.739C245.98,117.975,210.173,82.167,166.241,82.167 M166.241,231.717 c-3.611,0-7.522-0.301-11.134-0.902c-3.31-3.311-6.318-8.426-9.027-14.444c-2.407-5.416-4.212-11.434-6.018-18.054 8.124-0.902,16.851-1.505,25.878-1.505c9.026,0,17.753,0.603,25.877,1.505c-1.504,6.62-3.61,12.638-6.018,18.054 c-2.708,6.019-5.718,11.134-9.027,14.444C173.764,231.416,169.852,231.717,166.241,231.717 M166.241,191.696 c-9.629,0-18.656,0.602-27.082,1.505c-1.805-9.027-2.708-18.656-3.009-28.887h59.88c0,10.23-1.203,19.859-3.009,28.887 C184.896,192.298,175.87,191.696,166.241,191.696 M166.241,92.097c3.61,0,7.522,0.301,11.133,0.903 c3.311,3.31,6.319,8.425,9.027,14.443c2.407,5.416,4.213,11.435,6.019,18.055c-8.125,0.902-16.851,1.504-25.878,1.504 s-17.753-0.602-25.878-1.504c1.505-6.62,3.611-12.639,6.019-18.055c2.708-6.018,5.717-11.133,9.026-14.443 \tC158.719,92.398,162.63,92.097,166.241,92.097 M166.241,132.117c9.629,0,18.655-0.602,27.081-1.504 \tc1.806,9.026,2.708,18.655,3.009,28.887h-59.88c0-10.231,1.204-19.86,3.01-28.887 \tC147.585,131.516,156.612,132.117,166.241,132.117 M201.146,159.5c0-10.532-1.203-20.462-3.009-29.488 c10.23-1.505,19.258-3.311,26.479-6.019c6.921,10.531,10.833,22.567,11.134,35.507H201.146z M131.336,159.5H96.432 c0.301-12.639,4.212-24.976,11.133-35.507c7.522,2.407,16.55,4.514,26.479,6.019C132.54,139.038,131.637,148.968,131.336,159.5 M131.336,164.314c0,10.531,1.204,20.461,3.01,29.488c-10.231,1.505-19.259,3.31-26.48,6.018 c-6.921-10.531-10.832-22.567-11.133-35.506H131.336z M201.146,164.314h34.905c-0.301,12.638-4.213,24.975-11.134,35.506 c-7.522-2.406-16.55-4.513-26.479-6.018C199.942,184.775,200.845,174.846,201.146,164.314 M221.908,119.78 c-0.301,0-0.602,0.301-0.903,0.301c-6.92,2.106-15.045,3.912-23.771,5.115c-2.708-12.337-6.921-22.868-12.036-30.391 c11.434,3.31,21.966,9.328,30.691,17.753C217.695,114.966,219.802,117.072,221.908,119.78 M147.585,94.806 c-5.115,7.522-9.328,18.054-12.036,30.391c-8.727-1.203-16.851-3.009-23.771-5.115c-0.301,0-0.602-0.301-0.902-0.301 c1.805-2.407,3.911-4.814,6.318-7.222C125.619,103.833,136.15,97.814,147.585,94.806 M110.574,204.033 c0.301,0,0.602-0.301,0.902-0.301c6.921-2.106,15.045-3.912,23.771-5.115c2.708,12.337,6.921,22.869,12.036,30.392 c-11.435-3.311-21.966-9.328-30.692-17.754C114.786,208.848,112.68,206.742,110.574,204.033 M184.896,229.009 c5.116-7.522,9.329-18.055,12.036-30.392c8.727,1.203,16.852,3.009,23.771,5.115c0.301,0,0.603,0.301,0.903,0.301 c-1.806,2.407-3.912,4.814-6.319,7.222C206.863,219.981,196.331,226,184.896,229.009", }), ); } function Me() { return o.createElement( "svg", { version: "1.1", id: "Layer_2", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_BigPicture", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { fill: "currentColor", d: "M213.771,68.659c-4.108-7.066-46.007-7.231-49.293-7.231H128H91.522c-3.286,0-45.186,0.165-49.293,7.231 c-19.555,29.248-27.385,100.263-27.276,104.01c0.238,8.294,2.11,24.583,16.595,35.162c9.201,6.72,22.183,8.709,29.083,3.614 c4.989-3.682,11.995-19.224,19.061-32.204c7.064-12.981,9.202-11.174,12.98-12.159c3.78-0.986,36.066-0.74,36.066-0.74 s30.809-0.247,34.588,0.74c3.777,0.985,5.915-0.822,12.98,12.159c7.064,12.98,14.07,28.522,19.061,32.204 c6.9,5.095,19.882,3.106,29.083-3.614c14.485-10.58,16.356-26.868,16.595-35.162C241.154,168.922,233.325,97.906,213.771,68.659z M67.251,128.14c-14.974,0-27.112-12.137-27.112-27.111c0-14.975,12.137-27.112,27.112-27.112 c14.973,0,27.111,12.137,27.111,27.112C94.362,116.003,82.224,128.14,67.251,128.14z M188.749,128.14 c-14.974,0-27.111-12.137-27.111-27.111c0-14.975,12.138-27.112,27.111-27.112c14.973,0,27.111,12.137,27.111,27.112 C215.86,116.003,203.722,128.14,188.749,128.14z" }), ); } function ke(e) { const { className: t } = e; return o.createElement("svg", { version: "1.1", id: "Layer_2", xmlns: "http://www.w3.org/2000/svg", className: (0, r.Z)("SVGIcon_Button", "SVGIcon_MobilePhone", t), x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { d: "M165.693,45.186H91.368c-7.963,0-14.41,6.447-14.41,14.41V210.9c0,7.964,6.447,14.41,14.41,14.41h74.134 c7.965,0,14.41-6.447,14.41-14.41V59.596C180.102,51.633,173.657,45.186,165.693,45.186z M113.172,57.509h30.717 c1.707,0,3.223,1.327,3.223,3.224c0,1.896-1.328,3.223-3.223,3.223h-30.717c-1.707,0-3.223-1.328-3.223-3.223 C109.949,58.837,111.465,57.509,113.172,57.509z M128.529,213.554c-4.551,0-8.152-3.603-8.152-8.153c0-4.55,3.604-8.152,8.152-8.152 s8.151,3.603,8.151,8.152C136.682,209.761,133.081,213.554,128.529,213.554z M169.105,186.819h-81.15V74.384h81.15V186.819 L169.105,186.819z" })); } function Te(e) { return o.createElement("svg", Object.assign({ width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button" }, e), o.createElement("path", { d: "M11.45 26.5H7.625L1 9H5.025L9.625 22.325L14.1 9H18.125L11.45 26.5Z", fill: "white" }), o.createElement("path", { d: "M34.552 26.5H30.477L26.952 20.6H26.527H23.927V26.5H20.252V9H26.802C29.202 9 30.9686 9.48333 32.102 10.45C33.2353 11.4 33.802 12.7333 33.802 14.45C33.802 15.8 33.502 16.925 32.902 17.825C32.3186 18.725 31.4936 19.4083 30.427 19.875L34.552 26.5ZM23.927 12.125V17.45H26.802C27.7686 17.45 28.5186 17.2083 29.052 16.725C29.602 16.225 29.877 15.5417 29.877 14.675C29.877 13.825 29.6103 13.1917 29.077 12.775C28.5603 12.3417 27.727 12.125 26.577 12.125H23.927Z", fill: "white" })); } function Le() { return o.createElement("svg", { version: "1.1", id: "Layer_2", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_YouTube", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { d: "M243.402,70.101c-2.775-10.309-10.906-18.439-21.217-21.217c-18.838-5.152-94.185-5.152-94.185-5.152 s-75.348,0-94.185,4.957c-10.112,2.775-18.44,11.104-21.216,21.413C7.644,88.94,7.644,128,7.644,128s0,39.257,4.957,57.896 c2.775,10.313,10.905,18.439,21.216,21.219c19.036,5.154,94.185,5.154,94.185,5.154s75.347,0,94.185-4.957 c10.311-2.771,18.441-10.906,21.217-21.217c4.953-18.838,4.953-57.898,4.953-57.898S248.557,88.94,243.402,70.101z M104.008,164.088 V91.912L166.668,128L104.008,164.088z" })); } function Ge() { return o.createElement( "svg", { version: "1.1", id: "Layer_2", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_CSGO", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M236.979,138.059c0.548,0.078,6.91,0.101,7.772,0.032 c1.215-0.095,1.396,0.068,1.388,0.708c-0.01,0.397,0.012,3.039-2.365,7.32c-3.301,5.948-12.079,10.436-12.55,10.672 c-0.47,0.233-0.53,0.484-0.136,0.75c0.434,0.295,8.068,1.454,9.084,1.611c1.017,0.154,0.637,1.001,0.637,1.001 s-0.704,2.621-2.895,5.36c-2.189,2.738-9.311,6.123-8.583,6.123c0.731,0,7.187,0.159,6.181,1.422 c-3.019,3.786-13.603,9.528-18.43,13.813c-13.388,11.885-13.217,12.864-15.52,15.09c-0.983-3.298-3.02-12.658-3.02-12.658 l-6.105-11.467c4.413,0.18,6.364,0.081,8.952,0.081c9.214,0,17.525-2.185,22.234-5.841l2.371-1.843l-2.911-0.728 c-2.131-0.528-7.121-1.782-11.896-2.979c2.184-0.104,10.803-1.299,14.413-5.339c0.136-0.151,0.276-0.321,0.406-0.494l1.245-1.664 l-2.404-0.735c-2.607-0.799-5.948-1.682-8.517-2.335c3.173-1.572,7.585-3.942,10.048-6.088c4.83-4.203,7.226-9.709,7.322-9.943 l0.9-2.098l-10.772,0.318c1.503-1.483,3.218-3.197,3.939-3.991c1.43-1.571,4.053-6.221,4.198-9.896l0.072-1.787l-1.763,0.288 c-1.979,0.322-5.301,1.279-8.179,2.173c2.025-2.193,4.296-4.767,5.46-6.484c2.687-3.964,2.76-8.371,2.597-12.916l-0.104-2.881 l-2.261,1.79c-2.559,2.028-7.595,5.031-11.097,7.047c1.538-3.644,3.54-8.752,3.813-11.276c0.5-4.681-0.248-10.196-0.248-10.196 l-10.76,9.394c0.885-1.953,1.684-4.013,2.117-5.832c1.735-7.29,0.055-17.892-0.021-18.338l-0.452-2.807l-7.777,7.739 c0.722-3.535,1.465-8.253,1.23-11.789c-0.426-6.321-2.278-10.517-2.359-10.694l-1.01-2.251l-6.465,8.577 c0.231-4.285,0.27-10.24-0.948-13.547c-1.934-5.262-3.651-8.007-3.723-8.121l-1.232-1.958l-3.057,4.85 c0.018-2.967-0.11-6.475-0.69-8.68c-1.202-4.543-2.825-6.396-3.002-6.592l-1.325-1.433l-1.623,2.705 c-0.278-3.19-1.112-7.084-3.343-9.478l-0.814-0.872l-1.012,0.623c-0.327,0.201-0.714,0.497-1.104,0.823 c-0.154-1.135-0.365-2.451-0.639-3.691c0.563-4.733,1.186-10.03,1.206-10.452c0.027-0.547,0.274-0.767,1.017-0.391 c0.898,0.452,3.156,2.064,5.187,6.133c2.036,4.067,3.132,11.324,3.117,12.044c-0.009,0.383,0.291,0.757,0.438,0.151 c0.145-0.607,0.478-7.591,0.623-8.312c0.081-0.383,0.199-0.484,0.737-0.212c0.496,0.249,2.959,2.181,4.899,6.463 c1.179,2.599,1.634,11.946,1.574,12.653c-0.106,1.278,0.313,0.891,0.339,0.883c-0.009,0.013-0.025,0.04-0.03,0.049 c0.03-0.041,0.036-0.049,0.03-0.049c0.573-0.841,4.21-8.99,4.519-9.377c0.313-0.39,0.521-0.395,0.835,0.002 c0.262,0.33,2.095,1.717,4.049,10.088c1.902,8.135,1.949,11.542,1.848,12.682c-0.08,0.86,0.339,0.993,0.731,0.524 c0.389-0.47,5.104-9.201,5.497-9.515c0.389-0.313,0.613-0.309,0.927,0.161c0.312,0.469,2.718,4.762,3.684,11.448 c0.861,5.947,0.608,13.599,0.375,14.381c-0.235,0.782-0.135,1.077,0.493,0.53c0.623-0.548,10.299-8.412,11.004-9.038 c0.703-0.627,1.18-0.65,1.34-0.046c0.172,0.654,0.822,8.654,0.275,15.225c-0.549,6.571-2.626,12.752-2.94,13.145 c-0.312,0.391,0.087,0.712,0.478,0.555c0.394-0.157,11.902-10.018,12.645-10.402c0.711-0.367,1.043,0.005,1.105,0.507 c0.068,0.544,0.966,3.098-0.419,11.269c-0.959,5.65-3.54,11.876-3.855,12.033c-0.313,0.157-0.077,0.336,0.234,0.259 c0.315-0.079,8.324-3.488,8.872-3.567c0.546-0.079,0.671,0.339,0.514,0.808c-0.158,0.469-0.458,6.273-2.534,11.639 c-2.603,6.732-6.056,11.001-6.056,11.001s-0.252,0.519,0.217,0.519s9.266-0.186,9.813-0.263c0.547-0.079,0.627,0.156,0.547,0.704 c-0.077,0.547,0.858,9.116-8.624,14.601C236.524,137.734,236.432,137.979,236.979,138.059z M174.473,24.823 c1.981,3.34,2.018,9.248,1.836,11.469l-0.52,6.238l5.25-8.744c0.395,0.843,0.85,2.003,1.25,3.524 c1.02,3.877,0.422,13.082,0.417,13.173l-0.384,5.752l6.435-10.212c0.628,1.27,1.45,3.097,2.32,5.459 c1.466,3.983,0.772,13.806,0.381,17.257l-0.602,5.308l9.568-12.69c0.493,1.707,1.058,4.21,1.259,7.227 c0.39,5.821-2.272,15.731-2.299,15.83l-1.428,5.26l11.125-11.068c0.377,3.586,0.772,9.774-0.304,14.302 c-1.2,5.057-5.778,12.588-5.823,12.664l-1.806,3.992l16.878-14.09c-0.116,1.366-0.262,2.944-0.423,4.435 c-0.312,2.935-3.954,11.389-5.335,14.399l-1.827,4.002l3.856-2.115c0.381-0.208,8.027-4.41,12.979-7.778 c-0.039,3.484-0.537,6.042-2.139,8.4c-2.189,3.234-9.05,10.198-9.118,10.268l-4.352,4.408l5.861-2.004 c0.08-0.025,6.868-2.34,11.188-3.41c-0.675,2.445-2.208,5.125-3.11,6.118c-1.319,1.449-6.429,6.429-6.48,6.482l-2.682,2.614 l13.475-0.404c-1.06,1.837-2.89,4.549-5.457,6.783c-3.727,3.244-12.956,7.341-13.048,7.383l-3.952,1.746l4.201,1.008 c0.062,0.015,5.637,1.354,10.266,2.67c-3.412,2.191-9.291,3.081-10.948,3.138c-2.06,0.072-11.075,0.125-11.075,0.125l-11.51,0.069 l11.162,2.804c0,0,12.587,3.164,19.486,4.894c-4.398,2.216-10.717,3.493-17.657,3.493c-3.102,0-10.335-0.284-15.048-0.483 c4.064,6.069,7.041,11.004,7.992,13.681c2.813,7.915,6.777,28.269,6.889,48.907c0.039,6.572-1.081,11.649-9.022,11.649 c-0.288,0-0.597-0.038-0.908-0.092c-1.846,0.339-4.351,0.595-5.438-0.095c-1.805-1.149-3.163-2.627-3.544-3.957 c-0.383-1.334-1.146-9.374-3.106-20.675c-1.92-11.046-4.038-19.431-4.237-19.525c-1.535-0.731-9.358-18.45-9.358-18.45 l-37.23-47.615c0,0-20.737,23.917-37.455,47.8c-0.867,1.235-5.994,11.251-9.275,17.989c-0.212,0.437-0.181,0.475-0.281,0.808 c-0.604,2.015-2.396,9.525-4.039,18.994c-1.962,11.301-2.725,19.341-3.105,20.675c-0.384,1.33-1.74,2.808-3.546,3.957 c-1.085,0.689-3.592,0.434-5.437,0.095c-0.313,0.054-0.621,0.092-0.909,0.092c-7.941,0-9.061-5.077-9.024-11.649 c0.114-20.639,4.078-40.992,6.892-48.907c0.95-2.677,3.926-7.611,7.993-13.681c-4.714,0.199-11.946,0.483-15.051,0.483 c-6.939,0-13.26-1.277-17.653-3.493c6.896-1.729,19.486-4.894,19.486-4.894l11.159-2.804l-11.508-0.069 c0,0-9.019-0.053-11.076-0.125c-1.66-0.057-7.537-0.946-10.949-3.138c4.629-1.315,10.202-2.655,10.264-2.67l4.201-1.008l-3.95-1.746 c-0.094-0.042-9.324-4.139-13.049-7.383c-2.566-2.234-4.397-4.946-5.458-6.783l13.477,0.404l-2.684-2.614 c-0.05-0.054-5.16-5.033-6.48-6.482c-0.9-0.993-2.436-3.673-3.108-6.118c4.319,1.069,11.108,3.384,11.188,3.41l5.861,2.004 l-4.352-4.408c-0.069-0.069-6.928-7.033-9.12-10.268c-1.601-2.358-2.099-4.916-2.139-8.4c4.953,3.368,12.601,7.57,12.98,7.778 l3.858,2.115l-1.829-4.002c-1.379-3.011-5.022-11.465-5.334-14.399c-0.161-1.491-0.305-3.068-0.421-4.435l16.877,14.09l-1.806-3.992 c-0.046-0.076-4.622-7.607-5.821-12.664c-1.078-4.528-0.682-10.716-0.307-14.302L58.57,89.672l-1.426-5.26 c-0.025-0.098-2.688-10.008-2.3-15.83c0.203-3.017,0.767-5.52,1.26-7.227l9.566,12.69l-0.601-5.308 c-0.391-3.451-1.083-13.274,0.381-17.257c0.871-2.362,1.693-4.189,2.32-5.459l6.435,10.212l-0.382-5.752 c-0.006-0.091-0.604-9.295,0.416-13.173c0.401-1.521,0.854-2.681,1.251-3.524l5.249,8.744l-0.52-6.238 c-0.181-2.221-0.144-8.129,1.836-11.469c0.596,0.522,1.248,1.148,1.67,1.575l2.215,2.245l0.276-3.142 c0.162-1.838,0.783-7.003,1.703-8.813c1.342-2.635,4.69-3.91,7.104-4.505c-6.691,13.614-36.889,77.59-36.889,122.937 c0,23.658,16.206,23.931,16.368,23.931c4.881,0,6.947-7.914,6.947-11.063V133.45c0-2.744,1.148-2.744,1.835-2.744 c5.807,0,10.48,3.196,13.855,6.69c8.813-11.615,15.81-20.526,15.81-20.526s0.16-0.182,0.248-0.345 c-1.03-2.443-7.165-16.995-7.165-16.995l1.708-43.717c0,0-0.278-3.797,1.044-6.052c1.314-2.245,4.247-3.175,4.247-3.175 l13.307,41.443c0,0-4.107,0.866-4.107,5.585c0,2.982,2.658,4.99,6.227,5.013c3.572-0.022,6.227-2.031,6.227-5.013 c0-4.719-4.109-5.585-4.109-5.585l13.311-41.443c0,0,2.93,0.93,4.245,3.175c1.322,2.255,1.043,6.052,1.043,6.052l1.709,43.717 l-7.309,17.34c0,0,6.997,8.911,15.809,20.526c3.375-3.494,8.048-6.69,13.855-6.69c0.687,0,1.833,0,1.833,2.744v14.538 c0,3.148,2.068,11.063,6.95,11.063c0.159,0,16.367-0.272,16.367-23.931c0-45.347-30.197-109.322-36.888-122.937 c2.412,0.595,5.761,1.87,7.104,4.505c0.92,1.809,1.541,6.975,1.705,8.813l0.275,3.142l2.213-2.245 C173.226,25.972,173.875,25.345,174.473,24.823z M176.157,181.396c-1.644-2.189-41.07-55.856-41.07-55.856l-6.723,8.809 l-0.946-1.233l-0.829-1.082l-5.053-6.594l-0.095,0.101c0,0-39.427,53.667-41.07,55.856c-1.643,2.191-4.777,6.708-6.058,9.322 c-1.279,2.614-8.946,39.306-8.946,42.592c0,2.005,0.041,8.618,0.071,13.47c1.536,0.2,3.411,0.761,4.357,0.125 c1.624-1.093,2.363-2.323,2.491-3.372c0.128-1.048,1.367-12.969,2.69-20.812c1.779-10.547,4.571-19.005,4.415-18.97 c3.213-6.672,8.966-17.938,9.887-19.252c17.808-25.439,38.994-49.947,38.994-49.947s21.166,24.502,38.978,49.947 c0.921,1.313,6.672,12.58,9.888,19.252c-0.158-0.035,2.635,8.423,4.414,18.97c1.322,7.843,2.562,19.764,2.688,20.812 c0.131,1.049,0.87,2.279,2.493,3.372c0.944,0.636,2.818,0.075,4.355-0.125c0.032-4.852,0.073-11.465,0.073-13.47 c0-3.286-7.667-39.978-8.948-42.592C180.936,188.104,177.801,183.588,176.157,181.396z M82.538,21.517l-1.014-0.623l-0.813,0.872 c-2.231,2.394-3.063,6.287-3.342,9.478l-1.624-2.705l-1.323,1.433c-0.179,0.197-1.801,2.049-3.004,6.592 c-0.581,2.205-0.709,5.712-0.689,8.68l-3.057-4.85l-1.234,1.958c-0.072,0.114-1.787,2.859-3.722,8.121 c-1.22,3.307-1.179,9.262-0.949,13.547l-6.463-8.577l-1.012,2.251c-0.08,0.177-1.934,4.373-2.359,10.694 c-0.234,3.536,0.51,8.253,1.231,11.789l-7.778-7.739l-0.453,2.807c-0.073,0.446-1.754,11.048-0.02,18.338 c0.433,1.819,1.231,3.879,2.117,5.832l-10.759-9.394c0,0-0.749,5.515-0.248,10.196c0.271,2.523,2.272,7.632,3.813,11.276 c-3.503-2.016-8.539-5.019-11.099-7.047l-2.259-1.79l-0.106,2.881c-0.162,4.545-0.087,8.952,2.6,12.916 c1.161,1.717,3.433,4.291,5.459,6.484c-2.877-0.894-6.201-1.851-8.179-2.173l-1.763-0.288l0.071,1.787 c0.148,3.675,2.771,8.324,4.198,9.896c0.723,0.794,2.436,2.508,3.941,3.991L21.93,137.83l0.896,2.098 c0.1,0.234,2.493,5.74,7.324,9.943c2.464,2.146,6.876,4.516,10.047,6.088c-2.57,0.653-5.908,1.536-8.518,2.335l-2.402,0.735 l1.246,1.664c0.13,0.173,0.27,0.343,0.407,0.494c3.608,4.04,12.229,5.234,14.412,5.339c-4.774,1.197-9.767,2.451-11.896,2.979 l-2.911,0.728l2.371,1.843c4.708,3.656,13.02,5.841,22.233,5.841c2.588,0,4.539,0.099,8.954-0.081l-6.105,11.467 c0,0-2.038,9.36-3.02,12.658c-2.304-2.226-2.133-3.205-15.52-15.09c-4.829-4.284-15.411-10.026-18.429-13.813 c-1.005-1.263,5.449-1.422,6.179-1.422c0.73,0-6.393-3.385-8.582-6.123c-2.191-2.739-2.895-5.36-2.895-5.36s-0.38-0.847,0.637-1.001 c1.018-0.157,8.65-1.316,9.084-1.611c0.395-0.266,0.332-0.517-0.137-0.75c-0.469-0.236-9.248-4.724-12.548-10.672 c-2.375-4.281-2.357-6.923-2.364-7.32c-0.01-0.64,0.17-0.803,1.385-0.708c0.862,0.068,7.226,0.046,7.774-0.032 c0.546-0.08,0.453-0.324,0.019-0.576c-9.483-5.484-8.546-14.054-8.624-14.601c-0.079-0.548,0-0.783,0.548-0.704 c0.546,0.077,9.342,0.263,9.812,0.263c0.469,0,0.218-0.519,0.218-0.519s-3.452-4.27-6.056-11.001 c-2.077-5.366-2.377-11.169-2.533-11.639c-0.157-0.469-0.034-0.887,0.514-0.808c0.549,0.079,8.558,3.488,8.87,3.567 c0.313,0.077,0.548-0.103,0.235-0.259c-0.314-0.157-2.896-6.383-3.855-12.033c-1.384-8.17-0.488-10.725-0.42-11.269 c0.063-0.502,0.397-0.874,1.105-0.507c0.743,0.385,12.255,10.245,12.646,10.402c0.391,0.157,0.79-0.164,0.477-0.555 c-0.313-0.392-2.392-6.574-2.938-13.145c-0.548-6.571,0.1-14.571,0.274-15.225c0.161-0.604,0.635-0.581,1.339,0.046 c0.704,0.626,10.381,8.489,11.006,9.038c0.625,0.547,0.727,0.252,0.492-0.53c-0.235-0.782-0.484-8.435,0.375-14.381 c0.965-6.686,3.372-10.979,3.685-11.448s0.536-0.474,0.927-0.161c0.391,0.313,5.106,9.045,5.497,9.515 c0.391,0.469,0.809,0.336,0.732-0.524c-0.104-1.14-0.057-4.547,1.845-12.682c1.956-8.371,3.789-9.758,4.052-10.088 c0.313-0.396,0.521-0.392,0.833-0.002c0.309,0.387,3.945,8.536,4.519,9.377c-0.005,0,0,0.008,0.031,0.049 c-0.007-0.009-0.022-0.036-0.031-0.049c0.025,0.008,0.446,0.395,0.34-0.883c-0.058-0.707,0.396-10.055,1.574-12.653 c1.941-4.282,4.404-6.214,4.899-6.463c0.54-0.272,0.658-0.171,0.737,0.212c0.146,0.721,0.478,7.705,0.625,8.312 c0.146,0.606,0.444,0.232,0.437-0.151c-0.015-0.72,1.081-7.977,3.115-12.044c2.033-4.069,4.292-5.681,5.188-6.133 c0.742-0.376,0.989-0.156,1.018,0.391c0.022,0.422,0.645,5.719,1.206,10.452c-0.272,1.24-0.484,2.556-0.639,3.691 C83.251,22.014,82.866,21.718,82.538,21.517z M127.35,141.814c-1.158,12.032-4.978,23.045-6.326,29.486 c-1.643,7.849-4.788,18.061-6.793,20.931c-4.433,6.343-18.036,18.547-20.403,19.732c-1.094,0.547-6.376-4.115-6.56-4.846 c-0.182-0.728,2.883-3.993,2.154-3.627c-0.731,0.364-4.104,0.906-5.06,0.87c-0.753-0.026,0.633-2.728,0.633-2.728 s-1.484,2.217-3.021,2.947c-0.03,0.015,9.433-18.119,9.433-18.119S127.52,140.043,127.35,141.814z M119.7,169.39l3.104-10.647 l-1.869-0.559l-3.152,10.656L119.7,169.39z M114.072,167.242l4.687-10.051l-1.764-0.838l-4.735,10.055L114.072,167.242z M126.961,159.319l-0.82,11.06l-1.991-0.139l0.867-11.079L126.961,159.319z M131.727,170.391l-1.986,0.167l-0.828-11.078 l1.944-0.144L131.727,170.391z M164.422,186.462c0,0,9.463,18.134,9.434,18.119c-1.54-0.73-3.021-2.947-3.021-2.947 s1.384,2.701,0.633,2.728c-0.957,0.036-4.33-0.506-5.06-0.87c-0.731-0.366,2.334,2.899,2.153,3.627 c-0.185,0.73-5.467,5.393-6.56,4.846c-2.368-1.186-15.973-13.39-20.404-19.732c-2.007-2.87-5.149-13.082-6.792-20.931 c-1.349-6.441-4.621-17.127-5.778-29.16C128.854,140.373,164.422,186.462,164.422,186.462z M142.029,167.242l1.813-0.834 l-4.735-10.055l-1.762,0.838L142.029,167.242z M136.402,169.39l1.917-0.55l-3.152-10.656l-1.868,0.559L136.402,169.39z", }), ); } function Oe() { return o.createElement( "svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_ClosedCaption", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { className: "CCBox", fill: "none", stroke: "#000000", strokeWidth: "10", strokeMiterlimit: "10", d: "M238,210c0,6.627-5.373,12-12,12H30 c-6.627,0-12-5.373-12-12V46c0-6.627,5.373-12,12-12h196c6.627,0,12,5.373,12,12V210z" }), o.createElement("path", { className: "C1", d: "M90.505,173.207c11.431,0,22.338-4.276,30.72-12.036c2.6-2.407,2.753-6.47,0.347-9.068c-2.41-2.604-6.47-2.757-9.072-0.349 c-5.998,5.559-13.811,8.62-21.995,8.62c-17.852,0-32.373-14.524-32.373-32.372c0-17.849,14.521-32.373,32.373-32.373 c8.177,0,15.981,3.055,21.979,8.603c2.603,2.407,6.662,2.25,9.072-0.353c2.407-2.602,2.249-6.662-0.353-9.068 c-8.375-7.751-19.276-12.019-30.694-12.019c-24.931,0-45.209,20.281-45.209,45.209C45.3,152.93,65.574,173.207,90.505,173.207z" }), o.createElement("path", { className: "C1", d: "M177.926,173.207c11.431,0,22.338-4.276,30.721-12.036c2.6-2.407,2.754-6.47,0.347-9.068 c-2.41-2.604-6.47-2.757-9.072-0.349c-5.998,5.559-13.812,8.62-21.995,8.62c-17.852,0-32.372-14.524-32.372-32.372 c0-17.849,14.521-32.373,32.372-32.373c8.178,0,15.981,3.055,21.979,8.603c2.604,2.407,6.663,2.25,9.072-0.353 c2.407-2.602,2.25-6.662-0.353-9.068c-8.375-7.751-19.277-12.019-30.694-12.019c-24.932,0-45.209,20.281-45.209,45.209 C132.721,152.93,152.996,173.207,177.926,173.207z" }), ); } function Fe() { return o.createElement( "svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_Hidden", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { fill: "none", stroke: "#FFFFFF", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", d: "M62.499,172.263 c-32.755-16.197-47.415-39.509-47.415-39.509" }), o.createElement("path", { fill: "none", stroke: "#FFFFFF", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", d: "M177.948,85.392 c48.213,14.998,68.451,47.362,68.451,47.362s-36.393,54.737-115.689,54.737c-17.938,0-33.591-2.671-47.096-6.832" }), o.createElement("path", { fill: "none", stroke: "#FFFFFF", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", d: "M15.084,132.754 c0,0,32.933-56.576,115.674-54.785c8.505,0.185,16.486,0.913,23.96,2.072" }), o.createElement("path", { fill: "none", stroke: "#FFFFFF", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", d: "M93.981,141.131 c-0.475-2.385-0.725-4.852-0.725-7.377c0-20.711,16.789-37.5,37.5-37.5c2.42,0,4.787,0.229,7.08,0.668" }), o.createElement("path", { fill: "none", stroke: "#FFFFFF", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", d: "M156.528,106.512 c7.223,6.836,11.729,16.513,11.729,27.242c0,20.711-16.789,37.5-37.5,37.5c-10.609,0-20.189-4.405-27.012-11.487" }), o.createElement("line", { fill: "none", stroke: "#FFFFFF", strokeWidth: "10", strokeLinecap: "round", strokeMiterlimit: "10", x1: "53.007", y1: "210.504", x2: "208.507", y2: "55.004" }), ); } function Be() { return o.createElement("svg", { version: "1.1", id: "base", xmlns: "http://www.w3.org/2000/svg", className: "SVGIcon_Button SVGIcon_AppleLogo", x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, o.createElement("path", { d: "M138.365,26.557c16.139-21.272,38.578-21.376,38.578-21.376s3.336,19.999-12.696,39.266 c-17.12,20.572-36.58,17.206-36.58,17.206S124.012,45.473,138.365,26.557z" }), o.createElement("path", { d: "M129.719,75.662c8.305,0,23.713-11.413,43.771-11.413c34.527,0,48.109,24.566,48.109,24.566s-26.565,13.583-26.565,46.54 c0,37.179,33.093,49.991,33.093,49.991s-23.134,65.112-54.38,65.112c-14.353,0-25.509-9.672-40.631-9.672 c-15.41,0-30.702,10.032-40.662,10.032c-28.533,0-64.581-61.765-64.581-111.414c0-48.849,30.512-74.474,59.13-74.474 C105.61,64.933,120.047,75.662,129.719,75.662z" })); } function xe() { return o.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", className: "SVGIcon_Button SVGIcon_WindowsLogo", width: "100%", height: "100%", viewBox: "0 0 128 128", enableBackground: "new 0 0 128 128" }, o.createElement("rect", { fill: "currentColor", width: "60.834", height: "60.835" }), o.createElement("rect", { x: "67.165", fill: "currentColor", width: "60.835", height: "60.835" }), o.createElement("rect", { y: "67.164", fill: "currentColor", width: "60.834", height: "60.836" }), o.createElement("rect", { x: "67.165", y: "67.164", fill: "currentColor", width: "60.835", height: "60.836" })); } function Ne() { return o.createElement("svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 100 100" }, o.createElement("circle", { style: { fill: "currentColor" }, cx: "51.8", cy: "22.5", r: "6.5" }), o.createElement("circle", { style: { fill: "currentColor" }, cx: "51.8", cy: "48.3", r: "6.5" }), o.createElement("circle", { style: { fill: "currentColor" }, cx: "51.8", cy: "74.2", r: "6.5" })); } function Pe(e, t) { return (0, l.id)() ? o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2 4V16V20L7 16H24V4H2ZM12 20V32H29L34 36V32V20H12Z", fill: "currentColor" })) : o.createElement("svg", { version: "1.1", id: "Layer_2", xmlns: "http://www.w3.org/2000/svg", className: e.className, x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 409.6 409.6" }, o.createElement("path", { d: "M109.9,96.2H302c16.3,0,29.6,13,29.6,29v101.4c0,16-13.2,29-29.6,29h-90.1l-57.6,57.9L138,255.6h-28.1\n\t\t\t\tc-16.3,0-29.6-13-29.6-29V125.2C80.4,109.2,93.6,96.2,109.9,96.2z" })); } function Ue(e) { return o.createElement( "svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36", fill: "none" }, e), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M18 3C15.0333 3 12.1332 3.87973 9.66645 5.52796C7.19972 7.17618 5.27713 9.51886 4.14181 12.2597C3.0065 15.0006 2.70945 18.0166 3.28823 20.9264C3.86701 23.8361 5.29562 26.5088 7.3934 28.6066C9.49119 30.7044 12.1639 32.133 15.0737 32.7118C17.9834 33.2906 20.9994 32.9935 23.7403 31.8582C26.4811 30.7229 28.8238 28.8003 30.472 26.3336C32.1203 23.8668 33 20.9667 33 18C33 16.0302 32.612 14.0796 31.8582 12.2597C31.1044 10.4399 29.9995 8.78628 28.6066 7.3934C27.2137 6.00052 25.5601 4.89563 23.7403 4.14181C21.9204 3.38799 19.9698 3 18 3ZM9.00001 15C9.00001 14.4067 9.17595 13.8266 9.5056 13.3333C9.83524 12.8399 10.3038 12.4554 10.852 12.2284C11.4001 12.0013 12.0033 11.9419 12.5853 12.0576C13.1672 12.1734 13.7018 12.4591 14.1213 12.8787C14.5409 13.2982 14.8266 13.8328 14.9424 14.4147C15.0581 14.9967 14.9987 15.5999 14.7716 16.1481C14.5446 16.6962 14.1601 17.1648 13.6667 17.4944C13.1734 17.8241 12.5934 18 12 18C11.2044 18 10.4413 17.6839 9.87869 17.1213C9.31608 16.5587 9.00001 15.7956 9.00001 15ZM24 18C23.4067 18 22.8266 17.8241 22.3333 17.4944C21.8399 17.1648 21.4554 16.6962 21.2284 16.1481C21.0013 15.5999 20.9419 14.9967 21.0576 14.4147C21.1734 13.8328 21.4591 13.2982 21.8787 12.8787C22.2982 12.4591 22.8328 12.1734 23.4147 12.0576C23.9967 11.9419 24.5999 12.0013 25.1481 12.2284C25.6962 12.4554 26.1648 12.8399 26.4944 13.3333C26.8241 13.8266 27 14.4067 27 15C27 15.7956 26.6839 16.5587 26.1213 17.1213C25.5587 17.6839 24.7957 18 24 18ZM26.3149 23.6788C26.7672 22.8295 27 21.9193 27 21H18H9C9 21.9193 9.23279 22.8295 9.68508 23.6788C10.1374 24.5281 10.8003 25.2997 11.636 25.9497C12.4718 26.5998 13.4639 27.1154 14.5558 27.4672C15.6478 27.8189 16.8181 28 18 28C19.1819 28 20.3522 27.8189 21.4442 27.4672C22.5361 27.1154 23.5282 26.5998 24.364 25.9497C25.1997 25.2997 25.8626 24.5281 26.3149 23.6788Z", }), ); } function Ve(e) { return o.createElement("svg", Object.assign({}, e, { height: "24px", width: "24px", viewBox: "0 0 24 24", x: "0px", y: "0px" }), o.createElement("path", { fill: "white", d: "M3.3,0.5v23h17.5v-23H3.3z M10.2,9.6l-3-2.2h3.7L12,3.9l1.2,3.6H17l-3,2.2l1.2,3.6L12,11l-3,2.2L10.2,9.6z M17.3,16.1 M17.4,18H6.6v-1.2h10.7L17.4,18L17.4,18z M17.3,19.9" })); } function He() { return o.createElement("svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 32 32", enableBackground: "new 0 0 32 32" }, o.createElement("path", { fill: "white", d: "M24.68,19.53l6.9-5.69c0.98-0.81,0.47-2.39-0.81-2.46l-8.89-0.54c-0.54-0.03-1.01-0.37-1.21-0.88L17.4,1.61\n\t\t\tc-0.47-1.18-2.12-1.18-2.59,0l-3.27,8.32c-0.2,0.51-0.67,0.84-1.21,0.88l-8.92,0.54c-1.28,0.07-1.78,1.65-0.81,2.46l6.9,5.66\n\t\t\tc0.4,0.34,0.61,0.91,0.47,1.41l-2.26,8.65c-0.3,1.21,1.01,2.19,2.09,1.52l7.51-4.81c0.47-0.3,1.04-0.3,1.48,0l7.54,4.81\n\t\t\tc1.08,0.67,2.39-0.3,2.09-1.52l-2.26-8.62C24.07,20.4,24.24,19.86,24.68,19.53z" })); } function We() { return o.createElement("svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 32 32", enableBackground: "new 0 0 32 32" }, o.createElement("g", null, o.createElement("path", { fill: "white", d: "M28.4,1.49H3.79c-1.99,0-3.6,1.61-3.6,3.6v14.88c0,1.99,1.61,3.6,3.6,3.6h2.37c0,1.61-0.38,3.7-1.51,5.88\n\t\t\tc-0.28,0.57-0.19,1.33,0.19,1.8c0.28,0.38,0.76,0.47,1.14,0.47c0.19,0,0.38,0,0.57-0.09c4.07-1.61,7.57-5.59,9.47-8.05h12.4\n\t\t\tc1.99,0,3.6-1.61,3.6-3.6V5.1C31.91,3.11,30.3,1.49,28.4,1.49z M8.23,14.97c-1.33,0-2.37-1.04-2.37-2.37s1.04-2.37,2.37-2.37\n\t\t\ts2.37,1.04,2.37,2.37S9.56,14.97,8.23,14.97z M15.99,14.97c-1.33,0-2.37-1.04-2.37-2.37s1.04-2.37,2.37-2.37\n\t\t\tc1.33,0,2.37,1.04,2.37,2.37S17.32,14.97,15.99,14.97z M23.85,14.97c-1.33,0-2.37-1.04-2.37-2.37s1.04-2.37,2.37-2.37\n\t\t\tc1.33,0,2.37,1.04,2.37,2.37S25.18,14.97,23.85,14.97z" }))); } function Xe() { return o.createElement( "svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 32 32", enableBackground: "new 0 0 32 32" }, o.createElement( "g", null, o.createElement("path", { fill: "white", d: "M23.32,28.28C23,25.55,20.68,23.52,18,23.52h-3.78c-2.73,0-5,2.03-5.33,4.76L8.56,30.8h15.09L23.32,28.28z" }), o.createElement("path", { fill: "white", d: "M16.08,22.15c2.82,0,5.1-2.28,5.1-5.1c0-2.82-2.28-5.1-5.1-5.1s-5.1,2.28-5.1,5.1\n\t\t\tC10.98,19.86,13.27,22.15,16.08,22.15z" }), o.createElement( "g", null, o.createElement("path", { fill: "white", d: "M24.09,10.21c-0.94-1.22-2.18-2.23-3.57-2.9c-1.39-0.68-2.94-1.02-4.48-1.01l-0.02,0L16,6.3\n\t\t\t\tc-0.03,0-0.05,0-0.08,0c-1.52,0-3.04,0.35-4.4,1.01c-1.39,0.68-2.62,1.68-3.57,2.9c-0.94,1.22-1.6,2.67-1.91,4.18\n\t\t\t\tc-0.3,1.51-0.25,3.1,0.15,4.59c0.14,0.55,0.62,0.92,1.18,0.92c0.01,0,0.02,0,0.04,0h0.27l0.03-0.01c0.32-0.08,0.59-0.29,0.76-0.57\n\t\t\t\tl0.07-0.1c0.14-0.21,0.18-0.46,0.11-0.7L8.6,18.38c-0.18-0.62-0.27-1.27-0.29-1.92c0-4.24,3.45-7.68,7.69-7.68h0.04\n\t\t\t\tc4.24,0,7.69,3.45,7.69,7.68c-0.02,0.65-0.11,1.3-0.29,1.92l-0.04,0.15c-0.07,0.24-0.03,0.49,0.11,0.7l0.07,0.1\n\t\t\t\tc0.17,0.28,0.44,0.49,0.76,0.57l0.03,0.01l0.26,0c0.01,0,0.02,0,0.04,0c0.56,0,1.04-0.37,1.18-0.92c0.4-1.49,0.46-3.08,0.15-4.59\n\t\t\t\tC25.69,12.88,25.04,11.44,24.09,10.21z" }), o.createElement("path", { fill: "white", d: "M16.02,0.68c-8.83,0-15.99,7.16-16,15.99h0.01c-0.02,2.68,0.74,5.31,2.18,7.57l0,0.01l0.01,0.01\n\t\t\t\tc0.37,0.43,1,0.51,1.47,0.19c0.47-0.32,0.62-0.94,0.36-1.44l0,0l0,0c-1.19-1.89-1.81-4.09-1.79-6.32v0v0\n\t\t\t\tc0-7.6,6.16-13.76,13.76-13.76c7.6,0,13.76,6.16,13.76,13.76v0v0c0.03,2.24-0.59,4.43-1.79,6.32l0,0l0,0\n\t\t\t\tc-0.26,0.5-0.11,1.12,0.36,1.44c0.47,0.32,1.1,0.24,1.47-0.19l0.01-0.01l0-0.01c1.45-2.26,2.2-4.89,2.18-7.57h0.01\n\t\t\t\tC32.02,7.84,24.86,0.68,16.02,0.68" }), ), ), ); } function je(e) { const { className: t } = e, n = (0, i._T)(e, ["className"]); return o.createElement("svg", Object.assign({ className: (0, r.Z)(s().SteamDeckCompatLogo, t) }, n, { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }), o.createElement("path", { opacity: "0.84", fillRule: "evenodd", clipRule: "evenodd", d: "M7.77715 4.30197C10.9241 4.30197 13.4752 6.85305 13.4752 9.99997C13.4752 13.1469 10.9241 15.698 7.77715 15.698V18.8889C12.6864 18.8889 16.666 14.9092 16.666 9.99997C16.666 5.09078 12.6864 1.11108 7.77715 1.11108V4.30197ZM7.77756 13.8889C9.92533 13.8889 11.6664 12.1477 11.6664 9.99997C11.6664 7.8522 9.92533 6.11108 7.77756 6.11108C5.62979 6.11108 3.88867 7.8522 3.88867 9.99997C3.88867 12.1477 5.62979 13.8889 7.77756 13.8889Z", fill: "white" })); } function ze(e) { const { className: t } = e, n = (0, i._T)(e, ["className"]); return o.createElement("svg", Object.assign({ className: (0, r.Z)(s().SteamDeckCompatIcon, s().SteamDeckCompatVerified, t) }, n, { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 19C14.9706 19 19 14.9706 19 10C19 5.02944 14.9706 1 10 1C5.02944 1 1 5.02944 1 10C1 14.9706 5.02944 19 10 19ZM8.33342 11.9222L14.4945 5.76667L16.4556 7.72779L8.33342 15.8556L3.26675 10.7833L5.22786 8.82223L8.33342 11.9222Z", fill: "currentColor" })); } function Ke(e) { const { className: t } = e, n = (0, i._T)(e, ["className"]); return o.createElement("svg", Object.assign({ className: (0, r.Z)(s().SteamDeckCompatIcon, s().SteamDeckCompatPlayable, t) }, n, { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 19C14.9706 19 19 14.9706 19 10C19 5.02944 14.9706 1 10 1C5.02944 1 1 5.02944 1 10C1 14.9706 5.02944 19 10 19ZM8.61079 9.44444V15H11.3886V9.44444H8.61079ZM9.07372 8.05245C9.34781 8.23558 9.67004 8.33333 9.99967 8.33333C10.4417 8.33333 10.8656 8.15774 11.1782 7.84518C11.4907 7.53262 11.6663 7.10869 11.6663 6.66667C11.6663 6.33703 11.5686 6.0148 11.3855 5.74072C11.2023 5.46663 10.942 5.25301 10.6375 5.12687C10.3329 5.00072 9.99783 4.96771 9.67452 5.03202C9.35122 5.09633 9.05425 5.25507 8.82116 5.48815C8.58808 5.72124 8.42934 6.01821 8.36503 6.34152C8.30072 6.66482 8.33373 6.99993 8.45988 7.30447C8.58602 7.60902 8.79964 7.86931 9.07372 8.05245Z", fill: "currentColor" })); } function qe(e) { const { className: t } = e, n = (0, i._T)(e, ["className"]); return o.createElement("svg", Object.assign({ className: (0, r.Z)(s().SteamDeckCompatIcon, s().SteamDeckCompatUnsupported, t) }, n, { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.1931 15.6064C13.0246 16.4816 11.5733 17 10.001 17C6.13498 17 3.00098 13.866 3.00098 10C3.00098 8.42766 3.51938 6.97641 4.39459 5.80783L14.1931 15.6064ZM15.6074 14.1922C16.4826 13.0236 17.001 11.5723 17.001 10C17.001 6.13401 13.867 3 10.001 3C8.42864 3 6.97739 3.5184 5.80881 4.39362L15.6074 14.1922ZM19.001 10C19.001 14.9706 14.9715 19 10.001 19C5.03041 19 1.00098 14.9706 1.00098 10C1.00098 5.02944 5.03041 1 10.001 1C14.9715 1 19.001 5.02944 19.001 10Z", fill: "currentColor" })); } function Ze(e) { const { className: t } = e, n = (0, i._T)(e, ["className"]); return o.createElement( "svg", Object.assign({ className: (0, r.Z)(s().SteamDeckCompatIcon, s().SteamDeckCompatUnknown, t) }, n, { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }), o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.3972 11.2461L18.8767 11.4932C18.9578 11.0075 19 10.5087 19 10C19 9.49131 18.9578 8.99248 18.8767 8.50682L17.3972 8.75386C17.4647 9.15821 17.5 9.57442 17.5 10C17.5 10.4256 17.4647 10.8418 17.3972 11.2461ZM17.0295 7.3783L18.4348 6.8539C18.0814 5.90668 17.5729 5.03501 16.9403 4.26971L15.7842 5.22538C16.3119 5.86387 16.7354 6.59021 17.0295 7.3783ZM14.7746 4.21582L15.7303 3.05967C14.965 2.42708 14.0933 1.91864 13.1461 1.56519L12.6217 2.97054C13.4098 3.26461 14.1361 3.68805 14.7746 4.21582ZM11.2461 2.60281L11.4932 1.1233C11.0075 1.0422 10.5087 1 10 1C9.49131 1 8.99248 1.0422 8.50682 1.1233L8.75386 2.60281C9.15821 2.5353 9.57442 2.5 10 2.5C10.4256 2.5 10.8418 2.5353 11.2461 2.60281ZM7.3783 2.97054L6.8539 1.56519C5.90668 1.91864 5.03501 2.42708 4.26971 3.05967L5.22538 4.21582C5.86387 3.68805 6.59021 3.26461 7.3783 2.97054ZM4.21582 5.22538L3.05967 4.26971C2.42708 5.03501 1.91864 5.90668 1.56519 6.8539L2.97054 7.3783C3.26461 6.59022 3.68805 5.86387 4.21582 5.22538ZM1 10C1 9.49131 1.0422 8.99248 1.1233 8.50682L2.60281 8.75386C2.5353 9.15821 2.5 9.57442 2.5 10C2.5 10.4256 2.5353 10.8418 2.60281 11.2461L1.1233 11.4932C1.0422 11.0075 1 10.5087 1 10ZM2.97054 12.6217L1.56519 13.1461C1.91864 14.0933 2.42708 14.965 3.05967 15.7303L4.21582 14.7746C3.68805 14.1361 3.26461 13.4098 2.97054 12.6217ZM5.22538 15.7842L4.26971 16.9403C5.03501 17.5729 5.90668 18.0814 6.8539 18.4348L7.3783 17.0295C6.59022 16.7354 5.86387 16.3119 5.22538 15.7842ZM8.75386 17.3972L8.50682 18.8767C8.99248 18.9578 9.49131 19 10 19C10.5087 19 11.0075 18.9578 11.4932 18.8767L11.2461 17.3972C10.8418 17.4647 10.4256 17.5 10 17.5C9.57442 17.5 9.15821 17.4647 8.75386 17.3972ZM12.6217 17.0295L13.1461 18.4348C14.0933 18.0814 14.965 17.5729 15.7303 16.9403L14.7746 15.7842C14.1361 16.3119 13.4098 16.7354 12.6217 17.0295ZM15.7842 14.7746L16.9403 15.7303C17.5729 14.965 18.0814 14.0933 18.4348 13.1461L17.0295 12.6217C16.7354 13.4098 16.3119 14.1361 15.7842 14.7746ZM9.2425 14.7702C9.46679 14.92 9.73048 15 10.0002 15C10.362 15 10.7089 14.8563 10.9646 14.6006C11.2204 14.3448 11.3641 13.998 11.3641 13.6363C11.3641 13.3666 11.2841 13.1029 11.1343 12.8787C10.9844 12.6544 10.7714 12.4796 10.5222 12.3764C10.2729 12.2732 9.99872 12.2462 9.73415 12.2988C9.46958 12.3514 9.22656 12.4813 9.03582 12.672C8.84508 12.8628 8.71518 13.1057 8.66255 13.3703C8.60993 13.6348 8.63694 13.909 8.74016 14.1582C8.84339 14.4074 9.01821 14.6203 9.2425 14.7702ZM11.0981 10.3552C11.1722 10.2348 11.2765 10.1358 11.4005 10.068C11.8099 9.82315 12.1479 9.47526 12.3808 9.05903C12.6137 8.64279 12.7333 8.17276 12.7278 7.69584C12.7223 7.21892 12.5918 6.75179 12.3493 6.34105C12.1069 5.93031 11.7609 5.59033 11.346 5.35502C10.9311 5.11972 10.4617 4.99732 9.98466 5.00004C9.50764 5.00277 9.03969 5.13052 8.62748 5.37054C8.21527 5.61057 7.87321 5.95448 7.63545 6.36796C7.39769 6.78144 7.27253 7.25004 7.27246 7.72699H9.23191C9.23191 7.6261 9.25178 7.52621 9.29039 7.43301C9.32901 7.3398 9.3856 7.25511 9.45694 7.18378C9.52829 7.11244 9.61299 7.05586 9.70621 7.01725C9.79942 6.97865 9.89933 6.95878 10.0002 6.95878C10.1659 6.96387 10.3255 7.02207 10.4556 7.12479C10.5856 7.22751 10.6792 7.3693 10.7225 7.52925C10.7658 7.6892 10.7565 7.85883 10.6961 8.01311C10.6356 8.16739 10.5271 8.29816 10.3867 8.3861C9.97322 8.62846 9.63003 8.97429 9.39088 9.38955C9.15173 9.80482 9.02487 10.2752 9.02278 10.7544V11.3635H10.9777V10.7544C10.9825 10.6131 11.024 10.4755 11.0981 10.3552Z", fill: "currentColor", }), ); } function Qe(e) { return o.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 22 20", fill: "none" }, e), o.createElement("path", { fill: "currentColor", d: "M5.55344 11.3334L7.94011 13.7267L6.06011 15.6067L0.446777 10.0001L6.06011 4.39341L7.94011 6.27341L5.55344 8.66675H13.6668V11.3334H5.55344ZM12.4334 0.666748H11.0001V3.33341H12.4334C14.2016 3.33341 15.8972 4.03579 17.1475 5.28604C18.3977 6.53628 19.1001 8.23197 19.1001 10.0001C19.1001 11.7682 18.3977 13.4639 17.1475 14.7141C15.8972 15.9644 14.2016 16.6667 12.4334 16.6667H11.0001V19.3334H12.4334C14.9088 19.3334 17.2828 18.3501 19.0331 16.5997C20.7834 14.8494 21.7668 12.4754 21.7668 10.0001C21.7668 7.52473 20.7834 5.15076 19.0331 3.40042C17.2828 1.65008 14.9088 0.666748 12.4334 0.666748Z" })); } function $e(e) { return o.createElement( "svg", Object.assign({ width: "26", height: "26", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 26 26", fill: "none" }, e), o.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M17.5133 4.65595C15.8046 6.36468 17.0366 9.2803 19.4284 9.28035C20.446 9.28035 21.0261 8.76331 21.2519 8.56209C21.2963 8.5225 21.327 8.49513 21.3447 8.48633C22.4018 7.42917 22.4024 5.71423 21.3441 4.65595C20.2817 3.59714 18.5699 3.59936 17.5133 4.65595ZM18.5553 7.44735C17.4045 6.30173 19.1522 4.54882 20.301 5.69597V5.69586C20.7836 6.18159 20.783 6.96269 20.301 7.44422C19.8189 7.92684 19.0348 7.92415 18.5553 7.44735ZM0.583974 13.873L14.455 0L24.4165 1.583L26 11.5449L12.1289 25.416C11.7368 25.805 11.2252 26 10.7156 26C10.2065 26 9.69489 25.805 9.30552 25.416L0.583974 16.6976C0.194954 16.305 0 15.7933 0 15.2843C0 14.7742 0.194948 14.2625 0.583974 13.873ZM9.26632 17.5853L8.88665 17.965C8.62416 18.2274 8.43667 18.5227 8.32418 18.8509C8.21403 19.1766 8.19645 19.5106 8.27145 19.8528C8.34879 20.1926 8.53979 20.5148 8.84446 20.8195C9.14445 21.1195 9.46318 21.307 9.80066 21.382C10.1428 21.457 10.4756 21.4382 10.7991 21.3257C11.1272 21.2132 11.4225 21.0257 11.6849 20.7633L12.0646 20.3836C12.3271 20.1211 12.5146 19.8281 12.6271 19.5047C12.7419 19.179 12.7618 18.8473 12.6868 18.5099C12.6142 18.17 12.4255 17.8478 12.1209 17.5431C11.8209 17.2431 11.4986 17.0545 11.1541 16.9771C10.8143 16.8998 10.4791 16.9162 10.1487 17.0263C9.82293 17.1365 9.5288 17.3228 9.26632 17.5853ZM9.6038 18.6821L9.98347 18.3024C10.2014 18.0845 10.4487 17.9427 10.7252 17.8771C11.0065 17.8115 11.2701 17.9017 11.5162 18.1478C11.7693 18.4009 11.8584 18.6634 11.7834 18.9352C11.7107 19.2047 11.5654 19.4485 11.3475 19.6664L10.9678 20.0461C10.7498 20.2641 10.5026 20.4082 10.226 20.4785C9.95417 20.5488 9.6952 20.4609 9.44912 20.2148C9.19601 19.9617 9.10344 19.6981 9.1714 19.4239C9.24171 19.1473 9.38584 18.9001 9.6038 18.6821ZM9.80066 9.87944L9.421 10.2591C9.15851 10.5216 8.97102 10.8169 8.85853 11.145C8.74837 11.4708 8.7308 11.8047 8.80579 12.1469C8.88313 12.4867 9.07414 12.809 9.37881 13.1136C9.6788 13.4136 9.99753 13.6011 10.335 13.6761C10.6772 13.7511 11.01 13.7324 11.3334 13.6199C11.6615 13.5074 11.9568 13.3199 12.2193 13.0574L12.599 12.6777C12.8614 12.4152 13.0489 12.1223 13.1614 11.7989C13.2763 11.4731 13.2962 11.1415 13.2212 10.804C13.1485 10.4642 12.9599 10.1419 12.6552 9.83725C12.3552 9.53727 12.033 9.34861 11.6885 9.27127C11.3486 9.19393 11.0135 9.21033 10.683 9.32048C10.3573 9.43063 10.0632 9.61695 9.80066 9.87944ZM10.1381 10.9763L10.5178 10.5966C10.7358 10.3786 10.983 10.2368 11.2596 10.1712C11.5408 10.1056 11.8045 10.1958 12.0506 10.4419C12.3037 10.695 12.3927 10.9575 12.3177 11.2294C12.2451 11.4989 12.0998 11.7426 11.8818 11.9606L11.5021 12.3403C11.2842 12.5582 11.0369 12.7023 10.7604 12.7726C10.4885 12.843 10.2295 12.7551 9.98347 12.509C9.73036 12.2559 9.63778 11.9922 9.70575 11.718C9.77606 11.4415 9.92019 11.1942 10.1381 10.9763ZM16.3675 13.7464L4.21814 15.9963L5.01966 16.7978L17.169 14.5479L16.3675 13.7464Z", }), ); } }, 60194: (e, t, n) => { "use strict"; n.d(t, { PZ: () => c, bJ: () => l, zv: () => s }); var i = n(27378), o = n(62902), r = n(10553); const a = i.createContext({}); i.createContext(void 0); function s(e, t, n) { return Object.assign(Object.assign({}, e), { feature: t || e.feature, depth: n || e.depth, countrycode: r.De.COUNTRY, is_client: r.De.IN_CLIENT }); } function l() { return i.useContext(a); } function c(e, t) { const n = l(); return i.useMemo(() => o.ZP.GetLinkParam(Object.assign(Object.assign({}, n), { feature: e || n.feature }), t), [n, e, t]); } }, 89051: (e, t, n) => { "use strict"; n.d(t, { y: () => r }); var i = n(27378); let o = 0; function r() { const e = i.useRef(); return void 0 === e.current && (e.current = "svgid_" + o++), [e.current, `url(#${e.current})`]; } }, 99165: (e, t, n) => { "use strict"; n.d(t, { V: () => c }); var i = n(27378), o = n(87018), r = n(54196), a = n.n(r); const s = n.p + "images/webui/8669e97b288da32670e77181618c3dfb.png"; var l = n(77947); const c = i.memo(function (e) { const { className: t, size: n, string: r, position: c, static: d, msDelayAppear: h } = e; let u = [a().LoadingWrapper, "SteamLogoThrobber", m(n)]; const [p, _] = i.useState(!h), g = !(0, l.J)(); return ( (0, i.useEffect)(() => { if (p) return; const e = setTimeout(() => _(!0), h); return () => clearTimeout(e); }, [h, p]), void 0 === r && u.push(a().noString), t && u.push(t), d && u.push(a().Static), i.createElement("div", { className: (0, o.Z)("center" == c && a().throbber_center_wrapper, h && a().ThrobberDelayAppear, p && a().Visible) }, p && g && i.createElement("div", { className: u.join(" ") }, i.createElement("div", { className: a().NewThrobber }, i.createElement("img", { src: s }))), Boolean(r) && i.createElement("div", { className: a().ThrobberText }, r)) ); }); i.memo(function (e) { const { className: t, size: n, string: r, position: s, static: l, msDelayAppear: c } = e; let h = [a().LoadingWrapper, "SteamLogoThrobber", m(n)]; const [u, p] = i.useState(!c); return ( (0, i.useEffect)(() => { if (u) return; const e = setTimeout(() => p(!0), c); return () => clearTimeout(e); }, [c, u]), void 0 === r && h.push(a().noString), t && h.push(t), l && h.push(a().Static), i.createElement("div", { className: (0, o.Z)("center" == s && a().throbber_center_wrapper, c && a().ThrobberDelayAppear, u && a().Visible) }, u && i.createElement("div", { className: h.join(" ") }, i.createElement("div", { className: a().Throbber }, i.createElement(d, { className: a().base }), i.createElement(d, { className: a().blur }))), Boolean(r) && i.createElement("div", { className: a().ThrobberText }, r)) ); }); function m(e) { switch (e) { case "small": return a().throbber_small; case "medium": return a().throbber_medium; case "xlarge": return a().throbber_xlarge; case "xxlarge": return a().throbber_xxlarge; default: return a().throbber_large; } } function d(e) { let t = "SVGIcon_Button SVGIcon_Throbber "; return ( e.className && (t += e.className), i.createElement( "svg", { version: "1.1", id: "base", xmlns: "http://www.w3.org/2000/svg", className: t, x: "0px", y: "0px", width: "256px", height: "256px", viewBox: "0 0 256 256" }, i.createElement("g", { className: a().partCircle }, i.createElement("path", { className: a().roundOuter, fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895" }), i.createElement("path", { className: a().roundOuter, fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M201.432,101.166" }), i.createElement("path", { className: a().roundOuter, fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754" })), i.createElement( "g", { className: a().mainOutline }, i.createElement("path", { className: a().roundFill, fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundOuterOutline, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber01, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber02, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber03, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber04, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber05, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber06, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber07, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber08, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber09, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber10, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber11, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber12, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber13, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber14, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), i.createElement("path", { className: a().roundThrobber15, strokeLinecap: "butt", fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", d: "M127.82,23.895 c-54.686,0-99.487,42.167-103.745,95.754l55.797,23.069c4.729-3.231,10.44-5.122,16.584-5.122c0.551,0,1.098,0.014,1.642,0.047 l24.815-35.968c0-0.17-0.004-0.338-0.004-0.509c0-21.647,17.61-39.261,39.26-39.261s39.263,17.613,39.263,39.261 c0,21.65-17.611,39.264-39.263,39.264c-0.299,0-0.593-0.007-0.887-0.014l-35.392,25.251c0.018,0.462,0.035,0.931,0.035,1.396 c0,16.252-13.22,29.472-29.469,29.472c-14.265,0-26.19-10.185-28.892-23.666L27.66,156.37 c12.355,43.698,52.503,75.733,100.16,75.733c57.495,0,104.104-46.61,104.104-104.105S185.314,23.895,127.82,23.895z" }), ), i.createElement("g", { className: a().bottomCircle }, i.createElement("path", { fill: "#ffffff", d: "M89.226,181.579L76.5,176.321c2.256,4.696,6.159,8.628,11.339,10.786 c11.197,4.668,24.11-0.647,28.779-11.854c2.259-5.425,2.274-11.405,0.033-16.841c-2.237-5.436-6.46-9.675-11.886-11.938 c-5.384-2.24-11.151-2.156-16.22-0.244l13.146,5.436c8.261,3.443,12.166,12.93,8.725,21.189 C106.976,181.115,97.486,185.022,89.226,181.579" })), i.createElement("g", { className: a().topCircle }, i.createElement("circle", { fill: "none", stroke: "#ffffff", strokeWidth: "6", strokeMiterlimit: "10", cx: "161.731", cy: "101.274", r: "23.019" })), ) ); } }, 55948: (e, t, n) => { "use strict"; n.d(t, { T: () => u }); var i = n(27378), o = n(57476), r = n(16518), a = n(87018), s = n(26821), l = n(10553); function c(e) { const { popup: t, onMaximize: n, bOSX: l } = e, c = (0, s.b3)(t), m = i.useCallback(() => { n ? n() : (0, o.w3)(t, "Window.ToggleMaximize") && t.SteamClient.Window.ToggleMaximize(); }, [t, n]); return i.createElement(h, { className: (0, a.Z)(c ? "restoreButton" : "maximizeButton", "windowControlButton"), onClick: m }, !l && (c ? i.createElement(r.r6F, null) : i.createElement(r.YqJ, null))); } function m(e) { const { popup: t, onMinimize: n, bOSX: o } = e, a = i.useCallback(() => { t.SteamClient.Window.Minimize(); }, [t]); return i.createElement(h, { className: "minimizeButton windowControlButton", onClick: null != n ? n : a }, !o && i.createElement(r.gR, null)); } function d(e) { const { popup: t, onClose: n, bOSX: a } = e, s = i.useCallback(() => { t && ((0, o.w3)(t, "Window.Close") ? t.SteamClient.Window.Close() : t.close()); }, [t]); return i.createElement(h, { className: "closeButton windowControlButton", onClick: null != n ? n : s }, !a && i.createElement(r.pVO, null)); } function h(e) { const { className: t, onClick: n, children: o } = e, r = i.useCallback( (e) => { n && (e.stopPropagation(), n(e)); }, [n], ); return i.createElement("div", { className: (0, a.Z)("title-area-icon", t), onClick: r }, i.createElement("div", { className: "title-area-icon-inner" }, o)); } function u(e) { const { className: t, style: n, hideActions: o, hideClose: r, hideMin: h, hideMax: u, bOSX: p = (0, l.Uy)(), bForceWindowFocused: _, onMinimize: g, onMaximize: C, onClose: f, extraActions: v, popup: S, children: b } = e, I = (0, s.n8)(S); return i.createElement("div", { className: (0, a.Z)("TitleBar", "title-area", p && "OSX", (I || _) && "WindowFocus", t), style: n }, i.createElement("div", { className: "title-area-highlight" }), i.createElement("div", { className: "title-area-children" }, b), !o && i.createElement(i.Fragment, null, v && i.createElement("div", { className: "title-bar-actions extra-actions" }, v), i.createElement("div", { className: "title-bar-actions window-controls" }, !r && i.createElement(d, { popup: S, onClose: f, bOSX: p }), !u && i.createElement(c, { popup: S, onMaximize: C, bOSX: p }), !h && i.createElement(m, { popup: S, onMinimize: g, bOSX: p })))); } }, 45788: (e, t, n) => { "use strict"; n.d(t, { HP: () => h }); var i = n(85556), o = n(27378), r = n(31542), a = n(56320), s = n(28413), l = n(87018), c = n(84290), m = n(10491), d = n.n(m); function h(e) { var t; const { divProps: n, tooltipProps: i } = u(e); return o.createElement(a.Ks, Object.assign({ noFocusRing: !0, focusable: null !== (t = e.bNavStop) && void 0 !== t ? t : !!n.onClick }, n), o.createElement(_, Object.assign({}, i)), e.children); } function u(e) { const { toolTipContent: t, nDelayShowMS: n = 300, bDisabled: r, direction: a, nBodyAlignment: s, nBodyDistance: l, nAllowOffscreenPx: c, nMaxLateralMoveOnScreen: m, strTooltipClassname: d, bNavStop: h, bTopmost: u, children: p } = e, _ = (0, i._T)(e, ["toolTipContent", "nDelayShowMS", "bDisabled", "direction", "nBodyAlignment", "nBodyDistance", "nAllowOffscreenPx", "nMaxLateralMoveOnScreen", "strTooltipClassname", "bNavStop", "bTopmost", "children"]), g = { direction: a, nBodyAlignment: s, nBodyDistance: l, nAllowOffscreenPx: c, nMaxLateralMoveOnScreen: m, className: d, bTopmost: u }, [C, f] = o.useState(!1), [v, S] = o.useState(), b = o.useCallback((e) => { f(!0), S(e.currentTarget); }, []), I = o.useCallback(() => { f(!1); }, []), y = { active: C && !r, target: v, nDelayShowMS: n, hoverPositionProps: g, children: t }; return { divProps: Object.assign(Object.assign({}, _), { onMouseEnter: b, onMouseLeave: I }), tooltipProps: y }; } function p(e) { return o.createElement("div", Object.assign({}, e, { className: (0, l.Z)(d().TextToolTip, e.className) })); } function _(e) { const { active: t, target: n, nDelayShowMS: i = 300, hoverPositionProps: a, children: l } = e, [m, d] = o.useState(t); if ( (o.useLayoutEffect(() => { if (t) { if (i) { const e = window.setTimeout(() => d(!0), i); return () => window.clearTimeout(e); } d(!0); } else d(!1); }, [t]), !m) ) return null; let h = l; return "function" == typeof l ? (h = l()) : "string" == typeof l && (h = o.createElement(p, null, (0, c.Xx)(l))), h && n ? r.createPortal(o.createElement(s.T, Object.assign({ target: n }, a), h), n.ownerDocument.body) : null; } }, 37091: (e, t, n) => { "use strict"; n.d(t, { Qc: () => y, R6: () => p, Sb: () => I, VK: () => S, b8: () => b, k0: () => C, mO: () => v, ns: () => _ }); var i = n(85556), o = n(79588), r = n(27378), a = n(82909), s = n(5997), l = n(57476), c = n(87018), m = n(88669), d = n(84290), h = n(10553), u = n(61963); function p(e, t) { let n; (n = "currentTarget" in e ? e.currentTarget.ownerDocument.defaultView : e), 0 == t.indexOf("steam://") ? ((0, l.w3)(n, "URL.ExecuteSteamURL") ? n.SteamClient.URL.ExecuteSteamURL(t) : (n.location.href = t)) : n.open(t, void 0, "menubar,location,resizable,scrollbars,status,noopener"); } function _(e) { let { bDisableContextMenu: t, onContextMenu: n, bForceExternal: o, href: a, bUseLinkFilter: l, getPIDFromEvent: c } = e, m = (0, i._T)(e, ["bDisableContextMenu", "onContextMenu", "bForceExternal", "href", "bUseLinkFilter", "getPIDFromEvent"]); return ( t || n || (n = C), l && a && (a = (h.De.IN_CLIENT ? "steam://openurl_external/" : "") + (0, s.d)(a)), c || (c = () => 0), r.createElement( "a", Object.assign({}, m, { href: a, onClick: (e) => { e.preventDefault(), b(window, a, { bForceExternal: !!o, bUseLinkFilter: !!l, unPID: c(e) }); }, onContextMenu: n, rel: l ? "noopener noreferrer" : void 0, }), e.children, ) ); } function g(e) { const { strURL: t, unPID: n } = e; return r.createElement( r.Fragment, null, r.createElement( u.Zo, { onSelected: () => { m.J$(t); }, }, (0, d.Xx)("#ContextMenu_CopyLinkURL"), ), r.createElement( u.Zo, { onSelected: (e) => { b(e, t, { unPID: n }); }, }, (0, d.Xx)("#ContextMenu_OpenLinkInNewWindow"), ), ); } function C(e, t) { let n = e.currentTarget; return (0, a.yV)(r.createElement(u.xV, null, r.createElement(g, { strURL: n.href, unPID: t })), e); } function f(e) { const { strFullImageURL: t, unPID: n } = e; return r.createElement( r.Fragment, null, r.createElement( u.Zo, { onSelected: () => { m.J$(t); }, }, (0, d.Xx)("#ContextMenu_CopyImageURL"), ), r.createElement( u.Zo, { onSelected: (e) => { b(e, t, { unPID: n }); }, }, (0, d.Xx)("#ContextMenu_OpenImageInNewWindow"), ), ); } function v(e, t, n) { return S(e, e.currentTarget.src, t, n); } function S(e, t, n, i) { return (0, a.yV)(r.createElement(u.xV, null, n && r.createElement(g, { strURL: n }), r.createElement(f, { strFullImageURL: t, unPID: i })), e); } function b(e, t, n = {}) { const { bForceExternal: i, unPID: o, bUseLinkFilter: r } = n; let a; (a = "currentTarget" in e ? e.currentTarget.ownerDocument.defaultView : e), "undefined" != typeof SteamClient && void 0 !== SteamClient.WebChat ? SteamClient.WebChat.OpenURLInClient(t, o || 0, !!i) : 0 == t.indexOf("steam://") && 0 != t.indexOf("steam://remoteplay/connect") ? (a.location.href = t) : a.open(t, void 0, "menubar,location,resizable,scrollbars,status,noopener" + (r ? ",noreferrer" : "")); } function I(e) { return r.forwardRef(function (t, n) { return r.createElement("div", Object.assign({}, t, { className: (0, c.Z)(e, t.className), ref: n })); }); } function y(e) { if ("string" != typeof e) return NaN; const t = !e.includes("ms") && e.includes("s"); let n = Number.parseFloat(e); return t && (n *= 1e3), n; } (0, i.gn)( [o.LO], class { constructor(e) { (this.m_Value = void 0), (0, o.rC)(this), (this.promise = e); } set promise(e) { (this.m_Promise = e), (this.m_Value = void 0), null == e || e.then((t) => { this.m_Promise === e && (this.m_Value = t); }); } get promise() { return this.m_Promise; } get value() { return this.m_Value; } }.prototype, "m_Value", void 0, ); }, 14593: (e, t, n) => { "use strict"; n.d(t, { I: () => u }); n(27378); var i = n(85556), o = n(1736), r = n(68146), a = n(77385), s = n(5395), l = n(8568); const c = new a.sO("ReactUsageReporting").Debug, m = 1e3 * s._H.PerMinute; class d { constructor() { (this.m_transport = null), (this.m_mapRoutes = new Map()), (this.m_mapComponents = new Map()), (this.m_mapActions = new Map()), (this.m_reportCount = 0), (this.m_bInitialized = !1); } Init(e, t, n) { (this.m_bInitialized = !0), (this.m_strProduct = e), (this.m_strVersion = t), (this.m_transport = n), this.ScheduleSend(); } ScheduleSend() { setTimeout(() => this.CheckSend(), m); } CheckSend() { this.m_reportCount > 0 && this.SendMetrics(), this.ScheduleSend(); } ReportInternal(e, t) { t.has(e) || t.set(e, 0), t.set(e, t.get(e) + 1), this.m_reportCount++, this.ShouldSendMetricsImmediately() && this.SendMetrics(); } ReportRouteMatch(e) { c("Route match: " + e), this.ReportInternal(e, this.m_mapRoutes); } ReportTrackedComponent(e) { c("Tracked component: " + e), this.ReportInternal(e, this.m_mapComponents); } ReportTrackedAction(e) { c("User action: " + e), this.ReportInternal(e, this.m_mapActions); } ShouldSendMetricsImmediately() { return this.m_reportCount >= 100; } SendMetrics() { if (!this.m_bInitialized) return; const e = o.gA.Init(r.YH); e.Body().set_product(this.m_strProduct), e.Body().set_version(this.m_strVersion), this.m_mapRoutes.forEach((t, n) => { let i = new r.Be(); i.set_route(n), i.set_count(t), e.Body().add_routes(i); }), this.m_mapComponents.forEach((t, n) => { let i = new r.Hy(); i.set_component(n), i.set_count(t), e.Body().add_components(i); }), this.m_mapActions.forEach((t, n) => { let i = new r.Js(); i.set_action(n), i.set_count(t), e.Body().add_actions(i); }), this.m_mapRoutes.clear(), this.m_mapComponents.clear(), this.m_mapActions.clear(), (this.m_reportCount = 0), r.TF.ReportReactUsage(this.m_transport, e); } get version() { return this.m_strVersion; } get product() { return this.m_strProduct; } } (0, i.gn)([l.a], d.prototype, "CheckSend", null); const h = new d(); function u(e) { h.ReportTrackedAction(e); } }, 59192: (e, t, n) => { "use strict"; n.d(t, { f: () => l }); var i = n(85556), o = n(27378), r = n(57476), a = n(87018), s = n(26821); function l(e) { const { popup: t, className: n } = e, l = (0, i._T)(e, ["popup", "className"]), c = (0, s.b3)(t), m = o.useRef(null); return ( o.useEffect(() => { const e = m.current; if (e && (0, r.w3)(t, "Window.SetResizeGrip")) { let n = 0, i = 0; const o = e.getBoundingClientRect(), r = e.ownerDocument.defaultView; o && r && !c && ((n = Math.ceil(r.innerWidth - o.left)), (i = Math.ceil(r.innerHeight - o.top))), t.SteamClient.Window.SetResizeGrip(n, i); } return () => { (0, r.w3)(t, "Window.SetResizeGrip") && t.SteamClient.Window.SetResizeGrip(0, 0); }; }, [t, c]), c ? null : o.createElement("div", Object.assign({ className: (0, a.Z)("window_resize_grip", n), ref: m }, l)) ); } }, 18608: (e, t, n) => { "use strict"; n.d(t, { e: () => _, m: () => u }); var i, o = n(85556), r = n(27378), a = n(9824), s = n(70756), l = n(2049), c = n(87018), m = n(99165); !(function (e) { (e[(e.NotLoaded = 0)] = "NotLoaded"), (e[(e.Loading = 1)] = "Loading"), (e[(e.Loaded = 2)] = "Loaded"); })(i || (i = {})); let d = i.NotLoaded, h = []; function u(e) { if (d == i.Loaded) return void e(); if (d == i.NotLoaded) { let e = document.createElement("script"); e.src = "https://www.youtube.com/iframe_api"; let t = document.getElementsByTagName("script")[0]; t.parentNode.insertBefore(e, t), (window.onYouTubeIframeAPIReady = p); } h.findIndex((t) => e == t) < 0 && h.push(e); } function p() { d = i.Loaded; for (let e of h) e(); h = []; } class _ extends r.Component { constructor(e) { super(e), (this.m_strPlayerID = ""), (this.m_player = null), (this.m_playerContainer = null), (this.m_bPlayerReady = !1), (this.m_strPlayerID = "YoutubePlayer_" + _.s_nPlayerIndex++), (this.state = { bYoutubeLoaded: !1 }); } componentWillUnmount() { var e; this.DestroyPlayer(), (e = this.OnYoutubeScriptsReady), a.Zf(h, e); } shouldComponentUpdate(e, t) { if (!this.m_player) return !1; const n = this.props; return n.autoplay != e.autoplay || n.controls != e.controls || n.showInfo != e.showInfo || n.video != e.video ? (this.CreatePlayer(e), !1) : ((n.width == e.width && n.height == e.height) || (this.m_bPlayerReady && e.width && e.height && this.m_player.setSize(e.width, e.height)), n.forcePause != e.forcePause); } componentDidUpdate(e) { e.forcePause != this.props.forcePause && (this.props.forcePause ? this.m_player.pauseVideo() : this.m_player.playVideo()); } DestroyPlayer() { if (this.m_player) try { this.m_player.stopVideo && this.m_player.stopVideo(), this.m_player.destroy && this.m_player.destroy(); } catch (e) { } finally { this.m_player = null; } } BindPlayerContainer(e) { this.m_playerContainer != e && ((this.m_playerContainer = e), this.DestroyPlayer(), this.m_playerContainer && u(this.OnYoutubeScriptsReady)); } OnYoutubeScriptsReady() { this.CreatePlayer(this.props); } CreatePlayer(e) { if ((this.DestroyPlayer(), !this.m_playerContainer)) return; const t = !1 === e.autoplay ? 0 : 1, n = !0 === e.showInfo ? 1 : 0, i = !0 === e.controls ? 1 : 0, o = !0 === e.showFullscreenBtn ? 1 : 0, r = !0 === e.playsInline ? 1 : 0; let a = { width: void 0 !== e.width ? String(e.width) : void 0, height: void 0 !== e.height ? String(e.height) : void 0, videoId: e.video, playerVars: { autoplay: t, showinfo: n, autohide: 1, fs: o, modestbranding: 1, rel: 0, playsinline: r, iv_load_policy: 3, controls: i, start: e.startSeconds }, events: { onReady: this.OnPlayerReady, onStateChange: this.OnPlayerStateChange, onError: this.OnError } }, s = this.m_playerContainer.firstElementChild; (this.m_bPlayerReady = !1), (this.m_player = new YT.Player(s, a)); } OnPlayerReady(e) { if (((this.m_bPlayerReady = !0), this.props.onVideoInfoChanged)) { let e = this.m_player.getVideoData(), t = { strAuthor: "", strTitle: "", strVideoID: "" }; e.author && (t.strAuthor = e.author), e.title && (t.strTitle = e.title), e.video_id && (t.strVideoID = e.video_id), this.props.onVideoInfoChanged(t); } this.props.width && this.props.height && this.m_player.setSize(this.props.width, this.props.height), this.props.autoplay && this.m_player.playVideo(), this.props.onPlayerReady && this.props.onPlayerReady(); } OnPlayerStateChange(e) { switch (e.data) { case YT.PlayerState.UNSTARTED: break; case YT.PlayerState.BUFFERING: this.props.onBuffering && this.props.onBuffering(); break; case YT.PlayerState.PLAYING: this.props.onPlaying && this.props.onPlaying(); break; case YT.PlayerState.PAUSED: this.props.onPaused && this.props.onPaused(); break; case YT.PlayerState.ENDED: this.props.onMovieEnd && this.props.onMovieEnd(); } } OnError(e) { console.log("Youtube: Playback failed", e), this.props.onError && this.props.onError(e); } OnPlayerLeftView() { this.props.autopause && this.m_player && this.m_bPlayerReady && this.m_player.pauseVideo(); } PlayVideo(e) { this.m_player && this.m_bPlayerReady && (e && this.m_player.seekTo(0, !0), this.m_player.playVideo()); } render() { const e = r.createElement("div", { key: this.m_strPlayerID, ref: this.BindPlayerContainer, className: (0, c.Z)("YoutubePlayer", this.props.classnames) }, r.createElement(m.V, { className: "YoutubePlayerThrobber" })); return this.props.autopause ? r.createElement(s.h, { onLeave: this.OnPlayerLeftView }, e) : e; } } (_.s_nPlayerIndex = 0), (0, o.gn)([l.ak], _.prototype, "BindPlayerContainer", null), (0, o.gn)([l.ak], _.prototype, "OnYoutubeScriptsReady", null), (0, o.gn)([l.ak], _.prototype, "CreatePlayer", null), (0, o.gn)([l.ak], _.prototype, "OnPlayerReady", null), (0, o.gn)([l.ak], _.prototype, "OnPlayerStateChange", null), (0, o.gn)([l.ak], _.prototype, "OnError", null), (0, o.gn)([l.ak], _.prototype, "OnPlayerLeftView", null), (0, o.gn)([l.ak], _.prototype, "PlayVideo", null); }, 54701: (e, t, n) => { "use strict"; n.d(t, { T: () => a }); var i = n(14206), o = n.n(i), r = n(27378); function a(e) { const t = r.useRef(o().CancelToken.source()); return ( r.useEffect(() => { const n = t.current; return () => n.cancel(e ? `${e}: unmounting` : "unmounting"); }, [e]), t.current ); } }, 19939: (e, t, n) => { "use strict"; n.d(t, { TP: () => i, UA: () => a, iD: () => s, kN: () => o }); const i = { x: "y", y: "x" }; function o() { return { x: 0, y: 0 }; } function r(e, t) { return e.x * t.x + e.y * t.y; } function a(e, t) { return { x: t.x - e.x, y: t.y - e.y }; } function s(e, t) { const n = a(e, t); return Math.sqrt(r(n, n)); } }, 54530: (e, t, n) => { "use strict"; n.d(t, { Rq: () => o, jg: () => a, sw: () => r }); var i = n(88669); class o { constructor(e, t) { (this.m_bActive = !1), (this.m_fnBoundAnimationFunc = void 0), (this.m_window = e), (this.m_options = Object.assign({ timing: "sine" }, t)); } Start() { let e; switch (((this.m_msStart = performance.now()), (this.m_msEnd = this.m_msStart + this.m_options.msDuration), this.m_options.timing)) { case "linear": e = function (e) { return e; }; break; case "cubic-in-out": e = function (e) { return e < 0.5 ? 4 * e * e * e : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1; }; break; default: e = function (e) { return 0.5 - Math.cos(e * Math.PI) / 2; }; } (this.m_bActive = !0), (this.m_fnBoundAnimationFunc = this.OnInterval.bind(this, e)), this.m_window.requestAnimationFrame(this.m_fnBoundAnimationFunc); } BIsActive() { return this.m_bActive; } End() { if (this.m_bActive) { try { this.Update(1); } catch (e) {} this.ClearInterval(), this.FireOnComplete(); } } FireOnComplete() { this.m_options.onComplete && this.m_options.onComplete(); } Cancel() { this.m_bActive = !1; } OnInterval(e) { if (!this.m_bActive) return; let t = performance.now() - this.m_msStart; if (t >= this.m_options.msDuration) return void this.End(); let n = t / this.m_options.msDuration; try { this.Update(e(n)); } catch (e) {} this.m_window.requestAnimationFrame(this.m_fnBoundAnimationFunc); } ClearInterval() { this.m_bActive = !1; } } class r extends o { constructor(e, t, n) { super(e, t), (this.m_fnCallback = n); } Update(e) { this.m_fnCallback(e); } } class a extends o { constructor(e, t, n) { super("ownerDocument" in e ? i.kR(e) : e, n), (this.m_props = {}), (this.m_object = e), (this.m_propTargets = t); } Start() { this.m_props = {}; for (let e in this.m_propTargets) { let t = parseFloat(this.m_object[e]) || 0, n = this.m_propTargets[e]; t != n && (this.m_props[e] = { start: t, end: n }); } super.Start(); } Update(e) { for (let t in this.m_props) { let n = this.m_props[t], i = n.start + (n.end - n.start) * e; this.m_object[t] = i; } } } }, 9824: (e, t, n) => { "use strict"; function i(e, t = 0) { if ((null == e ? void 0 : e.length) > 1) { let n = t > 0 ? Math.min(t, e.length) : e.length; for (; 0 !== n; ) { const t = Math.floor(Math.random() * n); n -= 1; const i = e[n]; (e[n] = e[t]), (e[t] = i); } } } function o(e, t, n) { t < 0 || n < 0 || (n >= e.length && (e[n] = void 0), e.splice(n, 0, e.splice(t, 1)[0])); } function r(e, t) { return a(e, (e) => t == e); } function a(e, t) { const n = e.findIndex(t); return n >= 0 && (e.splice(n, 1), !0); } function s(e, t) { return e.reduce((e, n, i, o) => e + (t(n, i, o) ? 1 : 0), 0); } function l(e, t) { return e.filter((e) => t !== e); } function c(e, t) { let n = 0, i = e.length - 1; for (; n <= i; ) { const o = Math.floor((n + i) / 2), r = t(e[o]); if (r > 0) n = o + 1; else if (r < 0) i = o - 1; else { if (i == o) return o; if (o == n) return i > o && t(e[o + 1]) < 0 ? o : o + 1; n = o; } } return i; } function m(e, t, n) { const i = c(e, (e) => n(t, e)); e.splice(i + 1, 0, t); } function d(e, t, n) { return e || console.error("array should be defined for us to fill in the missing indexes"), e.length < t ? e.concat(Array(t - e.length).fill(n)) : e; } function h(e) { const t = new Set(); return e.forEach((e) => t.add(e)), Array.from(t); } n.d(t, { DG: () => m, LG: () => d, LQ: () => i, Qf: () => a, W: () => s, Zf: () => r, de: () => l, hV: () => o, kp: () => h, sL: () => c }); }, 93635: (e, t, n) => { "use strict"; function i(e, t, ...n) { console.assert ? (0 == n.length ? console.assert(!!e, t) : console.assert(!!e, t, ...n)) : e || console.warn(t, ...n); } function o(e, t, ...n) { i(!1, t, ...n); } n.d(t, { X: () => i, Z: () => o }); }, 52705: (e, t, n) => { "use strict"; n.d(t, { l: () => a }); var i = n(14206), o = n.n(i), r = n(1736); function a(e) { if (o().isCancel(e)) return { strErrorMsg: "Action Cancelled:" + e, errorCode: 52 }; if (void 0 !== e.response && e.response.data && "object" == typeof e.response.data) { if ("msg" in e.response.data) return { strErrorMsg: e.response.data.msg, errorCode: e.response.data.success }; if ("err_msg" in e.response.data) return { strErrorMsg: e.response.data.err_msg, errorCode: e.response.data.success }; if ("message" in e.response.data) return { strErrorMsg: e.response.data.message, errorCode: e.response.data.success }; if ("success" in e.response.data) return { strErrorMsg: "error code: " + e.response.data.success, errorCode: e.response.data.success }; } else if ("object" == typeof e.data) { if ("msg" in e.data) return { strErrorMsg: e.data.msg, errorCode: e.data.success }; if ("err_msg" in e.data) return { strErrorMsg: e.data.err_msg, errorCode: e.data.success }; if ("message" in e.data) return { strErrorMsg: e.data.message, errorCode: e.data.success }; if ("success" in e.data) return { strErrorMsg: "error code: " + e.data.success, errorCode: e.data.success }; } else { if (void 0 !== e.success && void 0 !== e.msg) return { strErrorMsg: e.msg, errorCode: e.success }; if (void 0 !== e.success && void 0 !== e.message) return { strErrorMsg: e.message, errorCode: e.success }; if (void 0 !== e.success && void 0 !== e.err_msg) return { strErrorMsg: e.err_msg, errorCode: e.success }; if ("string" == typeof e && e.length > 1024) console.groupCollapsed("GetMsgAndErrorCodeFromResponse cannot parse: "), console.warn(e), console.groupEnd(); else { if ("object" == typeof e && e instanceof r.gA) return { strErrorMsg: "" + e.GetErrorMessage(), errorCode: e.GetEResult() }; console.warn("GetMsgAndErrorCodeFromResponse cannot parse: ", e); } } return "object" == typeof e && "status" in e ? { strErrorMsg: "Unknown Error: " + e + "\nStatus Code:" + e.status, errorCode: 2 } : { strErrorMsg: "Unknown Error: " + e, errorCode: 2 }; } }, 8568: (e, t, n) => { "use strict"; function i(e, t, n) { return { get() { let e = n.value.bind(this); return this.hasOwnProperty(t) || Object.defineProperty(this, t, { value: e }), e; }, }; } n.d(t, { a: () => i }); }, 22394: (e, t, n) => { "use strict"; n.d(t, { Ar: () => d, G_: () => h, Hf: () => p, bX: () => u, km: () => m, pB: () => a, vq: () => l }); var i = n(85556), o = n(9824), r = n(8568); class a { constructor() { this.m_vecCallbacks = []; } Register(e) { this.m_vecCallbacks.push(e); return { Unregister: () => { o.Zf(this.m_vecCallbacks, e); }, }; } Dispatch(...e) { for (const t of Array.from(this.m_vecCallbacks)) t(...e); } ClearAllCallbacks() { this.m_vecCallbacks = []; } CountRegistered() { return this.m_vecCallbacks.length; } } class s { constructor(e, t) { (this.m_callbacks = new a()), (this.m_currentValue = e), (this.m_fnEquals = t); } Set(e) { if (this.m_fnEquals) { if (this.m_fnEquals(this.m_currentValue, e)) return; } else if (this.m_currentValue === e) return; (this.m_currentValue = e), this.m_callbacks.Dispatch(e); } get Value() { return this.m_currentValue; } Subscribe(e) { return { Unsubscribe: this.m_callbacks.Register(e).Unregister }; } } function l(e, t) { return new s(e, t); } class c { constructor(e, t, n) { (this.m_subscriptionRefCount = 0), (this.m_originalSubscribableValue = e), (this.m_mappedSubscribableValue = new s(t(e.Value), n)), (this.m_fnMap = t); } get Value() { var e; return null === (e = this.m_mappedSubscribableValue) || void 0 === e ? void 0 : e.Value; } Subscribe(e) { var t; 0 == this.m_subscriptionRefCount++ && (this.m_mappedUnsubscribe = this.m_originalSubscribableValue.Subscribe((e) => this.m_mappedSubscribableValue.Set(this.m_fnMap(e)))); const n = null === (t = this.m_mappedSubscribableValue) || void 0 === t ? void 0 : t.Subscribe(e); return { Unsubscribe: () => { var e; n.Unsubscribe(), 0 == --this.m_subscriptionRefCount && (null === (e = this.m_mappedUnsubscribe) || void 0 === e || e.Unsubscribe(), (this.m_mappedUnsubscribe = void 0)); }, }; } } function m(e, t, n) { return new c(e, t, n); } class d { Schedule(e, t) { this.IsScheduled() && this.Cancel(), (this.m_fnCallback = t), (this.m_schTimer = window.setTimeout(this.ScheduledInternal, e)); } IsScheduled() { return void 0 !== this.m_schTimer; } Cancel() { this.m_schTimer && (clearTimeout(this.m_schTimer), (this.m_schTimer = void 0)); } ScheduledInternal() { this.m_schTimer = void 0; const e = this.m_fnCallback; (this.m_fnCallback = void 0), null == e || e(); } } (0, i.gn)([r.a], d.prototype, "ScheduledInternal", null); class h { constructor() { this.m_rgListeners = []; } AddEventListener(e, t, n) { e.addEventListener(t, n), this.m_rgListeners.push({ element: e, type: t, listener: n }); } Unregister() { for (const e of this.m_rgListeners) e.element.removeEventListener(e.type, e.listener); this.m_rgListeners = []; } } function u(e) { return (0, i.mG)(this, void 0, void 0, function* () { const t = [], n = Object.keys(e); n.forEach((n) => t.push(e[n])); return (yield Promise.all(t)).reduce((e, t, i) => ((e[n[i]] = t), e), {}); }); } class p { constructor() { this.m_vecCallbacks = []; } Push(e) { this.m_vecCallbacks.push(e); } PushArrayRemove(e, t) { this.m_vecCallbacks.push(() => o.Zf(e, t)); } Unregister() { for (const e of this.m_vecCallbacks) e(); this.m_vecCallbacks = []; } GetUnregisterFunc() { return this.Unregister; } } (0, i.gn)([r.a], p.prototype, "Unregister", null); }, 87018: (e, t, n) => { "use strict"; function i(...e) { return e.reduce((e, t) => (t ? ("string" == typeof t ? (e ? `${e} ${t}` : t) : "object" == typeof t ? (e ? `${e} ${o(t)}` : o(t)) : e) : e), ""); } function o(e) { return Object.keys(e).reduce((t, n) => (e[n] ? (t ? `${t} ${n}` : n) : t), ""); } n.d(t, { Z: () => i }); }, 99115: (e, t, n) => { "use strict"; function i(e) { if (!r() || !window.document.cookie) return null; const t = document.cookie.match("(^|; )" + e + "=([^;]*)"); return t && t[2] ? decodeURIComponent(t[2]) : null; } function o(e, t, n, i) { if (!r()) return; i || (i = "/"); let o = ""; if (void 0 !== n && n) { const e = new Date(); e.setTime(e.getTime() + 864e5 * n), (o = "; expires=" + e.toUTCString()); } document.cookie = encodeURIComponent(e) + "=" + encodeURIComponent(t) + o + ";path=" + i; } function r() { return !!window.document; } n.d(t, { I1: () => o, bG: () => i, t$: () => r }); }, 97063: (e, t, n) => { "use strict"; function i(e, t = !0) { return function (n, i, o) { const r = o.value; o.value = function (...n) { let o = this[i + "_DebounceProperties"]; void 0 === o && (o = this[i + "_DebounceProperties"] = { hTimer: void 0, nPending: 0 }), void 0 === o.hTimer ? (t ? r.apply(this, n) : (o.nPending += 1), (o.hTimer = window.setInterval(() => { o.nPending > 0 ? (r.apply(this, n), (o.nPending = 0)) : (window.clearInterval(o.hTimer), (o.hTimer = void 0)); }, e))) : (o.nPending += 1); }; }; } n.d(t, { D: () => i }); }, 88669: (e, t, n) => { "use strict"; function i(e) { return null != e && void 0 !== e.focus; } function o(e) { if (!(e.clientX || e.clientY || e.screenX || e.screenY)) return !0; if (e.relatedTarget) return !r(e.currentTarget, e.relatedTarget); { const t = e.currentTarget.getBoundingClientRect(); return (e.clientX <= t.left || e.clientX >= t.right || e.clientY <= t.top || e.clientY >= t.bottom) && (console.log(`${e.clientX} <= ${t.left} || ${e.clientX} >= ${t.right} ||\n\t\t\t\t${e.clientY} <= ${t.top} || ${e.clientY} >= ${t.bottom}`), !0); } } function r(e, t) { var n; let i = t; for (; i; ) { if (((null === (n = i.parentNode) || void 0 === n ? void 0 : n.nodeType) == Node.DOCUMENT_FRAGMENT_NODE && (i = i.parentNode.host), i == e)) return !0; i = i.parentElement; } return !1; } function a(e, t) { let n = t; for (; n; ) if (((n = n.parentElement), n == e)) return !0; return !1; } function s(e) { const t = window.getSelection(); if (!t) return !1; let n = 0; for (let i = 0; i < t.rangeCount; i++) { const o = t.getRangeAt(i); if (o.startOffset == o.endOffset) continue; r(e, o.commonAncestorContainer) && n++; } return t.rangeCount > 0 && t.rangeCount == n; } function l(e, t, n) { let i = 0, o = 0; return t < e.left ? (i = e.left - t) : t > e.right && (i = t - e.right), n < e.top ? (o = e.top - n) : n > e.bottom && (o = n - e.bottom), Math.sqrt(i * i + o * o); } function c(e, t) { let n = 0, i = 0; return t.right < e.left ? (n = e.left - t.right) : t.left > e.right && (n = t.left - e.right), t.bottom < e.top ? (i = e.top - t.bottom) : t.top > e.bottom && (i = t.top - e.bottom), Math.sqrt(n * n + i * i); } function m(e, t) { return { top: e.screenTop + t.top, bottom: e.screenTop + t.bottom, left: e.screenLeft + t.left, right: e.screenLeft + t.right }; } function d(e) { return e.right - e.left; } function h(e) { return e.bottom - e.top; } function u(e) { let t; return e && i(e.currentTarget) && (t = e.currentTarget.ownerDocument.defaultView), t; } function p(e) { let t; return e && (t = e.ownerDocument.defaultView), t; } function _(e) { let t = window.document; try { t = window.top.document; } catch (e) {} const n = t.createElement("textarea"); (n.textContent = e), (n.style.position = "fixed"), t.body.appendChild(n), n.select(); try { t.execCommand("copy"); } catch (e) { console.warn("Copy to clipboard failed.", e); } finally { t.body.removeChild(n); } } function g(e) { const t = "steam://openurl/"; e.startsWith(t) && (e = e.slice(16)), _(e); } function C(e) { if (!e) return null; if (0 == e.clipboardData.files.length) return null; return e.clipboardData.types.some((e) => ("text" == e || e.startsWith("text/")) && "text/html" !== e) ? null : e.clipboardData.files[0]; } function f(e) { const t = e.ownerDocument; return t.fullscreen || t.webkitIsFullScreen || t.mozFullScreen || t.msFullscreenElement; } function v(e, t) { const n = e; n.requestFullscreen ? n.requestFullscreen() : n.webkitRequestFullscreen ? n.webkitRequestFullscreen() : t && t.webkitSetPresentationMode ? t.webkitSetPresentationMode("fullscreen") : n.mozRequestFullScreen ? n.mozRequestFullScreen() : n.msRequestFullscreen && n.msRequestFullscreen(); } function S(e) { const t = e.ownerDocument; t.cancelFullscreen ? t.cancelFullscreen() : t.webkitCancelFullScreen ? t.webkitCancelFullScreen() : t.mozCancelFullScreen ? t.mozCancelFullScreen() : t.msExitFullscreen && t.msExitFullscreen(); } function b(e) { return "INPUT" === e.nodeName; } function I(e, t) { switch (e) { case "TEXTAREA": return !0; case "INPUT": switch (t) { case "date": case "datetime-local": case "datetime": case "email": case "month": case "number": case "password": case "search": case "tel": case "text": case "time": case "url": case "week": return !0; default: return !1; } default: return !1; } } n.d(t, { BJ: () => h, Ei: () => _, Et: () => E, GB: () => i, H0: () => o, H2: () => l, H8: () => D, J$: () => g, LO: () => k, Lh: () => y, Mv: () => R, PT: () => d, RA: () => u, RD: () => v, U0: () => w, V2: () => A, _J: () => I, b$: () => M, bI: () => C, dw: () => c, fH: () => a, h9: () => f, kR: () => p, mQ: () => S, ni: () => r, p8: () => s, sH: () => m, uk: () => b }); function y(e, t) { const n = e; return (n.lastModifiedDate = new Date()), (n.name = t || Date.now().toString()), e; } function E(e, t) { let n = null == e ? void 0 : e.parentElement; for (; n; ) { if (!t || "x" == t) { const e = window.getComputedStyle(n); if ("scroll" == e.overflowX || "auto" == e.overflowX || "fixed" == e.position) break; } if (!t || "y" == t) { const e = window.getComputedStyle(n); if ("scroll" == e.overflowY || "auto" == e.overflowY || "fixed" == e.position) break; } n = n.parentElement; } return i(n) ? n : null; } function D(e, t) { const n = []; let i = e; for (; (i = E(i, t)); ) n.push(i); return n; } function w(e, t) { if (!("ownerDocument" in e)) return !0; const n = e.ownerDocument.defaultView.getComputedStyle(e), i = "x" === t ? n.overflowX : n.overflowY; return "auto" === i || "scroll" === i; } function R() { return (function (e) { const t = {}; return ( e.querySelectorAll('link[rel="stylesheet"]').forEach((e) => { t[e.href] = e; }), t ); })(document); } function A(e, t) { M(e.document, t, !0); } function M(e, t, n) { var i; const o = Object.assign({}, t), r = e.getElementsByTagName("head")[0], a = r.getElementsByTagName("link"), s = a.length; for (let e = 0; e < s; ++e) { const t = a[e]; o[t.href] ? delete o[t.href] : n && (null === (i = t.parentNode) || void 0 === i || i.removeChild(t)); } const l = []; for (const t in o) { const n = o[t], i = e.createElement("link"); for (let e = 0; e < n.attributes.length; e++) { const t = n.attributes.item(e); i.setAttribute(t.name, t.value); } l.push(i); } return r.prepend(...l), l; } function k(e, t) { let n = null != e ? e : null; for (; n && !n.contains(t); ) n = n.parentElement; return n; } }, 84290: (e, t, n) => { "use strict"; n.d(t, { $1: () => c.$1, CE: () => S, LJ: () => m, LZ: () => C, Mh: () => c.Mh, XG: () => c.XG, Xx: () => d, Yt: () => b, is: () => v, jr: () => c.jr, kQ: () => h, kb: () => _, vX: () => c.vX, yW: () => c.yW, yu: () => u }); var i = n(27378), o = n(78654), r = n(11612), a = n(10553), s = n(9824), l = n(22394), c = n(89554); class m { constructor() { (this.m_mapTokens = new Map()), (this.m_mapFallbackTokens = new Map()), (this.m_cbkTokensChanged = new l.pB()); } static InstallErrorReportingStore(e) { this.sm_ErrorReportingStore = e; } static GetLanguageFallback(e) { return "sc_schinese" === e ? "schinese" : "english"; } static GetELanguageFallback(e) { return 29 === e ? 6 : 0; } static IsELanguageValidInRealm(e, t) { return t === (29 === e ? r.IN.k_ESteamRealmChina : r.IN.k_ESteamRealmGlobal); } static GetLanguageListForRealms(e) { const t = new Array(); for (let n = 0; n < 31; n++) for (const i of e) if (this.IsELanguageValidInRealm(n, i)) { t.push(n); break; } return t; } InitFromObjects(e, t, n, i, o) { o || this.m_mapTokens.clear(); const r = Object.assign(Object.assign({}, n || {}), e), a = Object.assign(Object.assign({}, i || {}), t || {}); this.AddTokens(r, a), this.m_cbkTokensChanged.Dispatch(); } InitDirect(e, t) { this.m_mapTokens.clear(), this.m_mapFallbackTokens.clear(), this.AddTokens(e, t), this.m_cbkTokensChanged.Dispatch(); } AddTokens(e, t) { Object.keys(e).forEach((t) => { this.m_mapTokens.set(t, e[t]); }), t && Object.keys(t).forEach((e) => { this.m_mapTokens.has(e) || this.m_mapTokens.set(e, t[e]), this.m_mapFallbackTokens.set(e, t[e]); }); } GetTokensChangedCallbackList() { return this.m_cbkTokensChanged; } GetPreferredLocales() { return this.m_rgLocalesToUse ? this.m_rgLocalesToUse : navigator && navigator.languages ? navigator.languages : ["en-US"]; } GetELanguageFallbackOrder(e = null) { let t = new Array(); if ( (t.push((0, o.jM)(a.De.LANGUAGE)), (a.De.SUPPORTED_LANGUAGES || []).forEach((e) => { e.value != a.De.LANGUAGE && t.push((0, o.jM)(e.value)); }), e) ) { m.GetLanguageListForRealms(e).forEach((e) => { -1 == t.indexOf(e) && t.push(e); }); } return t; } SetPreferredLocales(e) { this.m_rgLocalesToUse = e; } BLooksLikeToken(e) { return !!e && e.length > 0 && "#" == e.charAt(0); } LocalizeIfToken(e, t) { return this.BLooksLikeToken(e) ? this.LocalizeString(e, t) : e; } LocalizeString(e, t) { if (!this.BLooksLikeToken(e)) return; let n = this.m_mapTokens.get(e.substring(1)); if (void 0 !== n) return n; !t && m.sm_ErrorReportingStore && m.sm_ErrorReportingStore.ReportError(new Error(`Unable to find localization token '${e}' for language '${a.De.LANGUAGE}', ${this.m_mapTokens.size} tokens in map`), { bIncludeMessageInIdentifier: !0 }); } LocalizeStringFromFallback(e) { if (!e || 0 == e.length || "#" != e.charAt(0)) return; let t = this.m_mapFallbackTokens.get(e.substring(1)); return void 0 !== t ? t : void 0; } } function d(e, ...t) { let n = b.LocalizeString(e); return void 0 === n ? e : g(n, ...t); } function h(e, ...t) { let n = b.LocalizeString(e); if (void 0 === n) return e; let o, r = [], a = /(.*?)%(\d+)\$s/g, s = 0; for (; (o = a.exec(n)); ) { (s += o[0].length), r.push(o[1]); let e = parseInt(o[2]); e >= 1 && e <= t.length && r.push(t[e - 1]); } return r.push(n.substr(s)), i.createElement(i.Fragment, null, ...r); } function u(e, ...t) { let n = b.LocalizeIfToken(e); return void 0 === n ? e : p(n, ...t); } function p(e, ...t) { let n, o = [], r = new RegExp(/(.*?)<(\d+)>(.*?)<\/(\2)>/, "gs"), a = 0; for (; (n = r.exec(e)); ) { (a += n[0].length), o.push(n[1]); let e = parseInt(n[2]), r = n[3] || "", s = p(r, ...t), l = (e >= 1 && e <= t.length ? t[e - 1] : null) ? i.cloneElement(t[e - 1], {}, r ? s : null) : r; o.push(l); } return o.push(e.substr(a)), i.createElement(i.Fragment, null, ...o); } function _(e, t, ...n) { return 1 === t || "1" === t ? d(e, t, ...n) : d(e + "_Plural", t, ...n); } function g(e, ...t) { return 0 == t.length ? e : (e = e.replace(/%(?:(\d+)\$)?s/g, function (e, n) { if (n <= t.length && n >= 1) { let e = t[n - 1]; return String(null == e ? "" : e); } return e; })); } class C { static Set(e, t, n) { if (e.length <= t) { if (t >= 31) return e; e = (0, s.LG)(e, t + 1, null); } return (e[t] = n), e; } static Get(e, t) { return (e && e.length > t && e[t]) || ""; } static GetWithFallback(e, t) { if (e) { return C.Get(e, t) || C.Get(e, m.GetELanguageFallback(t)); } return null; } } const f = { english: "en", german: "de", french: "fr", italian: "it", korean: "ko", latam: "es-419", spanish: "es", schinese: "zh-cn", tchinese: "zh-tw", russian: "ru", thai: "th", japanese: "ja", brazilian: "pt-br", portuguese: "pt", polish: "pl", danish: "da", dutch: "nl", finnish: "fi", norwegian: "no", swedish: "sv", hungarian: "hu", czech: "cs", romanian: "ro", turkish: "tr", arabic: "ar", bulgarian: "bg", greek: "el", ukrainian: "uk", vietnamese: "vi", indonesian: "id", sc_schinese: "zh-cn", koreana: "ko" }, v = { "en-US": 0, "de-DE": 1, "fr-FR": 2, "it-IT": 3, "ko-KR": 4, "es-ES": 5, "zh-CH": 6, "zh-CN": 7, "ru-RU": 8, "th-TH": 9, "ja-JP": 10, "pt-PT": 11, "pl-PL": 12, "da-DK": 13, "nl-NL": 14, "fi-FI": 15, "nb-NO": 16, "sv-SE": 17, "hu-HU": 18, "cs-CZ": 19, "ro-RO": 20, "tr-TR": 21, "pt-BR": 22, "bg-BG": 23, "el-GR": 24, "ar-SA": 25, "uk-UA": 26, "es-419": 27, "vi-VN": 28, "id-ID": 30 }; function S() { return f[a.De.LANGUAGE] || null; } const b = new m(); window.LocalizationManager = b; }, 89554: (e, t, n) => { "use strict"; n.d(t, { $1: () => l, Kb: () => E, LO: () => y, Mh: () => S, Np: () => I, XG: () => v, jr: () => u, vX: () => c, yW: () => s }); var i, o = n(98315), r = n(84290), a = n(5395); function s(e, t, n) { let o; if ("boolean" == typeof t) { o = { eSuffix: t ? i.None : i.Ago, bForceSingleUnits: n, bHighGranularity: !1 }; } else o = Object.assign({ eSuffix: i.Ago, bForceSingleUnits: !1, bHighGranularity: !1 }, t); let s = "#TimeInterval_"; o.eSuffix == i.Ago ? (s = "#TimeSince_") : o.eSuffix == i.Remaining && (s = "#TimeRemaining_"); let l = (e) => Math.floor(e); if ((o.bAllowDecimal && (l = (e) => Math.round(10 * e) / 10), e >= 2 * a._H.PerYear)) return (0, r.Xx)(s + "XYears", l(e / a._H.PerYear)); if (e >= a._H.PerYear) return (e -= a._H.PerYear) >= 2 * a._H.PerMonth && !o.bForceSingleUnits ? (0, r.Xx)(s + "1YearXMonths", l(e / a._H.PerMonth)) : (0, r.Xx)(s + "1Year"); if (e >= 2 * a._H.PerMonth) return (0, r.Xx)(s + "XMonths", l(e / a._H.PerMonth)); if (e >= 2 * a._H.PerWeek) return (0, r.Xx)(s + "XWeeks", l(e / a._H.PerWeek)); if (e >= a._H.PerWeek) return (0, r.Xx)(s + "1Week", l(e / a._H.PerWeek)); if (e >= 2 * a._H.PerDay) return (0, r.Xx)(s + "XDays", l(e / a._H.PerDay)); if (e >= a._H.PerDay) return (e -= a._H.PerDay) >= 2 * a._H.PerHour && !o.bForceSingleUnits ? (0, r.Xx)(s + "1DayXHours", l(e / a._H.PerHour)) : (0, r.Xx)(s + "1Day"); if (e >= 2 * a._H.PerHour) return (0, r.Xx)(s + "XHours", l(e / a._H.PerHour)); if (e >= a._H.PerHour) return (e -= a._H.PerHour) >= 2 * a._H.PerMinute && !o.bForceSingleUnits ? (0, r.Xx)(s + "1HourXMinutes", l(e / a._H.PerMinute)) : (0, r.Xx)(s + "1Hour"); if (e >= 2 * a._H.PerMinute) { const t = Math.floor(e / a._H.PerMinute), n = e % a._H.PerMinute; return o.bHighGranularity && 0 != n ? (1 == n ? (0, r.Xx)(s + "XMinutes1Second", t) : (0, r.Xx)(s + "XMinutesXSeconds", t, n)) : (0, r.Xx)(s + "XMinutes", l(e / a._H.PerMinute)); } if (e >= a._H.PerMinute) { const t = e % a._H.PerMinute; return o.bHighGranularity && 0 != t ? (1 == t ? (0, r.Xx)(s + "1Minute1Second") : (0, r.Xx)(s + "1MinuteXSeconds", t)) : (0, r.Xx)(s + "1Minute"); } return o.bHighGranularity ? (1 == e ? (0, r.Xx)(s + "1Second") : (0, r.Xx)(s + "XSeconds", e)) : (0, r.Xx)(s + "LessThanAMinute"); } function l(e, t, n) { let i; i = void 0 === t || !0 === t || !1 === t ? { weekday: n ? "long" : "short", year: t ? void 0 : "numeric" } : t; let o = new Date(1e3 * e); const a = Object.assign({ weekday: "short", month: "long", day: "numeric", year: "numeric" }, i); return o.toLocaleDateString(r.Yt.GetPreferredLocales(), a); } function c(e, t) { let n, i = new Date(1e3 * e); if (!t) { const e = i.setHours(0, 0, 0, 0); let t = h.get(e); if (t) return t; } const o = Object.assign({ year: "numeric", month: "short", day: "numeric" }, t); return (n = i.toLocaleDateString(r.Yt.GetPreferredLocales(), o)), n; } !(function (e) { (e[(e.None = 0)] = "None"), (e[(e.Ago = 1)] = "Ago"), (e[(e.Remaining = 2)] = "Remaining"); })(i || (i = {})); const m = new Map(); function d(e, t, n) { const i = new Date(1e3 * e), o = r.Yt.GetPreferredLocales(), a = (null == t ? void 0 : t.bForce24HourClock) || (function (e) { let t = m.get(e); if (!0 === t || !1 === t) return t; const n = new Date(); return n.setHours(15), (t = n.toLocaleTimeString(e, { hour: "numeric" }) == n.toLocaleTimeString(e, { hour: "numeric", hour12: !1 })), m.set(e, t), t; })(o[0]), s = Object.assign(Object.assign({}, a ? { hour: "numeric", minute: "2-digit", hourCycle: "h23" } : { hour: "numeric", minute: "2-digit" }), n); return i.toLocaleTimeString(o, s); } const h = new Map(); new Map(); function u(e, t) { const n = new Date(1e3 * e), i = new Date(), s = Object.assign({ bGranularFutureTime: !1, bGranularTodayTimeOnly: !1, bGranularToday: !1, bGranularYesterday: !1, bGranularWeek: !1, bGranularPast: !1, bAbbreviateDayOfWeek: !1, bForce24HourClock: !1 }, t); if (n > i) { if (!s.bGranularFutureTime) return o.zO(n.getTime() - i.getTime()), n.getFullYear() == i.getFullYear() ? b(n) : y(n); o.zO(new Date().setHours(24, 0, 0, 0) - i.getTime()); let e = new Date(); return e.setHours(0, 0, 0, 0), e.setDate(e.getDate() + 1), n < e ? (0, r.Xx)("#Time_Today") : (e.setDate(e.getDate() + 1), n < e ? (0, r.Xx)("#Time_Tomorrow") : (e.setDate(e.getDate() + 5), n < e ? S(n) : v(n, !0, s.bAbbreviateDayOfWeek))); } o.zO(new Date().setHours(24, 0, 0, 0) - i.getTime()); let c = new Date(); if ((c.setHours(0, 0, 0, 0), n >= c)) return s.bGranularToday ? (s.bGranularTodayTimeOnly ? d(e, { bForce24HourClock: s.bForce24HourClock }) : (0, r.Xx)("#Time_Today_At", d(e, { bForce24HourClock: s.bForce24HourClock }))) : (0, r.Xx)("#Time_Today"); if ((c.setDate(i.getDate() - 1), n >= c)) return s.bGranularYesterday ? (0, r.Xx)("#Time_Yesterday_At", d(e, { bForce24HourClock: s.bForce24HourClock })) : (0, r.Xx)("#Time_Yesterday"); c.setDate(i.getDate() - 6); const m = new Date(c); if (s.bGranularWeek && n >= m) return v(n, !1, !s.bAbbreviateDayOfWeek); if (s.bGranularPast) return (0, r.Xx)("#Time_Past_At", l(e, n.getFullYear() == i.getFullYear(), !s.bAbbreviateDayOfWeek), d(e, { bForce24HourClock: s.bForce24HourClock })); if (n >= m) return (0, r.Xx)("#TimeSince_ThisWeek"); if (n.getMonth() == i.getMonth() && n.getFullYear() == i.getFullYear()) { const e = Math.floor((m.valueOf() - n.valueOf()) / (1e3 * a._H.PerWeek)) + 1; return 1 == e ? (0, r.Xx)("#TimeSince_1Week") : (0, r.Xx)("#TimeSince_XWeeks", e); } return n.getFullYear() == i.getFullYear() ? b(n) : y(n); } const p = new Map(), _ = new Map(), g = new Map(), C = new Map(), f = new Map(); new Map(); function v(e, t = !1, n = !0) { const i = { weekday: n ? "long" : "short", day: "numeric", month: t ? "long" : "short" }, o = e.setHours(0, 0, 0, 0) + i.weekday + i.month; let a = f.get(o); return a || ((a = e.toLocaleDateString(r.Yt.GetPreferredLocales(), i)), f.set(o, a), a); } function S(e) { let t = p.get(e.getDay()); return t || ((t = e.toLocaleDateString(r.Yt.GetPreferredLocales(), { weekday: "long" })), p.set(e.getDay(), t), t); } function b(e) { let t = _.get(e.getMonth()); return t || ((t = e.toLocaleDateString(r.Yt.GetPreferredLocales(), { month: "long" })), _.set(e.getMonth(), t), t); } function I(e) { let t = g.get(e.getFullYear()); return t || ((t = e.toLocaleDateString(r.Yt.GetPreferredLocales(), { year: "numeric" })), g.set(e.getFullYear(), t), t); } function y(e) { const t = e.getMonth() + 12 * e.getFullYear(); let n = C.get(t); return n || ((n = e.toLocaleDateString(r.Yt.GetPreferredLocales(), { month: "long", year: "numeric" })), C.set(t, n), n); } function E(e) { switch (e.getUTCMonth()) { case 0: case 1: case 2: return (0, r.Xx)("#Time_QuarterOfYear_Q1", e.getUTCFullYear()); case 3: case 4: case 5: return (0, r.Xx)("#Time_QuarterOfYear_Q2", e.getUTCFullYear()); case 6: case 7: case 8: return (0, r.Xx)("#Time_QuarterOfYear_Q3", e.getUTCFullYear()); default: return (0, r.Xx)("#Time_QuarterOfYear_Q4", e.getUTCFullYear()); } } }, 23556: (e, t, n) => { "use strict"; n.d(t, { AV: () => r, l: () => o }); var i = n(84290); function o(e, t, n, o) { let r = t; r = "number" == typeof r ? { nDigitsAfterDecimal: t, bUseBinary1K: n || void 0 === n, bValueIsInBytes: !o, bValueIsRate: o, nMinimumDigitsAfterDecimal: 0 } : Object.assign({ nDigitsAfterDecimal: 2, bUseBinary1K: !0, bValueIsInBytes: !0, bValueIsRate: !1, nMinimumDigitsAfterDecimal: 0 }, r); const a = r.bUseBinary1K ? 1024 : 1e3, s = a * a, l = s * a, c = l * a; let m, d = ""; e > c ? ((m = e / c), (d = "Tera")) : e > l ? ((m = e / l), (d = "Giga")) : e > s ? ((m = e / s), (d = "Mega")) : e > a ? ((m = e / a), (d = "Kilo")) : (m = e); const h = "#" + d + (r.bValueIsInBytes ? "bytes" : "bits") + (r.bValueIsRate ? "_PerSecond" : ""); return (0, i.Xx)(h, m.toLocaleString(i.Yt.GetPreferredLocales(), { minimumFractionDigits: r.nMinimumDigitsAfterDecimal, maximumFractionDigits: r.nDigitsAfterDecimal })); } function r(e) { return e ? e.toLocaleString(i.Yt.GetPreferredLocales()) : "" + e; } }, 77385: (e, t, n) => { "use strict"; n.d(t, { cH: () => m, sO: () => c }); var i = n(85556), o = n(8568), r = n(99627), a = n(22394); const s = ["ActionDescription", "Backstack", "BrowserBackstack", "GroupMemberStore", "Chat", "ChatRoom", "ChatRoomGroup", "ChatHistory", "CompositionState", "AppOverviewImplObservable", "ReducedValue", "FocusNavigation", "FocusNavigationMovement", "GamepadEvents", "VirtualKeyboard", "LibraryUIStore/BasicUIStore", "SystemNetworkStore", "SteamClient", "AudioPlaybackManager", "LaunchStates", "Haptics", "ControllerConfigurator", "FriendsUI/RemotePlay", "SalePage", "VR", "VRDashboardPopupStore", "VRGamepadUIMessages", "VRPathProperties"]; var l; !(function (e) { (e[(e.Debug = 0)] = "Debug"), (e[(e.Info = 1)] = "Info"), (e[(e.Warning = 2)] = "Warning"), (e[(e.Error = 3)] = "Error"); })(l || (l = {})); class c { constructor(e, t) { (this.m_fnIdGenerator = void 0), (this.m_sName = e), (this.m_fnIdGenerator = t), m.Get().RegisterLogName(e); } Debug(...e) { this.Log(l.Debug, ...e); } Info(...e) { this.Log(l.Info, ...e); } Warning(...e) { this.Log(l.Warning, ...e); } Error(...e) { this.Log(l.Error, ...e); } Assert(e, ...t) { e || this.Log(l.Error, "Assertion failed:", ...t); } IsDebugEnabled() { return m.Get().IsDebugLogEnabled(this.m_sName); } Log(e, ...t) { var n, i; const o = m.Get().IsDebugLogEnabled(this.m_sName); if (e == l.Debug && !o) return; let r = this.m_sName; const a = null !== (i = null === (n = this.m_fnIdGenerator) || void 0 === n ? void 0 : n.call(this)) && void 0 !== i ? i : null; null != a && (r += " (" + a + ")"); d(e, o, m.Get().IncludeBacktraceInLog, r, this.m_sName, ...t); } } (0, i.gn)([o.a], c.prototype, "Debug", null), (0, i.gn)([o.a], c.prototype, "Info", null), (0, i.gn)([o.a], c.prototype, "Warning", null), (0, i.gn)([o.a], c.prototype, "Error", null), (0, i.gn)([o.a], c.prototype, "Assert", null); class m { constructor() { (this.m_Storage = null), (this.m_setEnabledDebugLogs = new Set()), (this.m_bIncludeBacktraceInLog = !1), (this.m_SettingsChangedCallback = new a.pB()), (this.m_bLoading = !1), (this.m_Storage = new r.Z()), (this.m_rgLogNames = s.slice()), this.LoadSettings(); } LogAsLogManager(...e) { d(l.Info, !0, this.IncludeBacktraceInLog, "LogManager", "LogManager", ...e); } LoadSettings() { var e, t; return (0, i.mG)(this, void 0, void 0, function* () { (this.m_bLoading = !0), (this.m_bIncludeBacktraceInLog = !!(yield null === (e = this.m_Storage) || void 0 === e ? void 0 : e.GetObject(m.k_IncludeBacktraceInLog_StorageKey))); const n = yield null === (t = this.m_Storage) || void 0 === t ? void 0 : t.GetObject(m.k_EnabledLogNames_StorageKey); Array.isArray(n) && ((this.m_setEnabledDebugLogs = new Set(n)), this.LogAsLogManager("Loaded debug enabled log names. Will print log messages for:", Array.from(this.m_setEnabledDebugLogs))), (this.m_bLoading = !1), this.m_SettingsChangedCallback.Dispatch(); }); } SaveSettings() { var e, t; return (0, i.mG)(this, void 0, void 0, function* () { yield null === (e = this.m_Storage) || void 0 === e ? void 0 : e.StoreObject(m.k_EnabledLogNames_StorageKey, Array.from(this.m_setEnabledDebugLogs)), yield null === (t = this.m_Storage) || void 0 === t ? void 0 : t.StoreObject(m.k_IncludeBacktraceInLog_StorageKey, this.m_bIncludeBacktraceInLog), this.LogAsLogManager("Saved enabled debug log names. Will print log messages for:", Array.from(this.m_setEnabledDebugLogs)); }); } static Get() { return null == m.s_Singleton && (m.s_Singleton = new m()), m.s_Singleton; } get Loading() { return this.m_bLoading; } get LogNames() { return this.m_rgLogNames; } RegisterLogName(e) { this.m_rgLogNames.includes(e) || this.m_rgLogNames.push(e); } IsLogName(e) { return this.m_rgLogNames.includes(e); } IsDebugLogEnabled(e) { return this.m_setEnabledDebugLogs.has(e); } ToggleDebugLogEnabled(e) { return (0, i.mG)(this, void 0, void 0, function* () { this.SetDebugLogEnabled(e, !this.IsDebugLogEnabled(e)); }); } SetDebugLogEnabled(e, t) { return (0, i.mG)(this, void 0, void 0, function* () { t ? this.m_setEnabledDebugLogs.add(e) : this.m_setEnabledDebugLogs.delete(e), this.m_SettingsChangedCallback.Dispatch(), yield this.SaveSettings(); }); } SetAllDebugLogsEnabled(e) { return (0, i.mG)(this, void 0, void 0, function* () { (this.m_setEnabledDebugLogs = new Set(e ? s : [])), this.m_SettingsChangedCallback.Dispatch(), yield this.SaveSettings(); }); } RegisterForSettingsChanges(e) { return this.m_SettingsChangedCallback.Register(e); } get IncludeBacktraceInLog() { return this.m_bIncludeBacktraceInLog; } SetIncludeBacktraceInLog(e) { return (0, i.mG)(this, void 0, void 0, function* () { (this.m_bIncludeBacktraceInLog = e), this.m_SettingsChangedCallback.Dispatch(), yield this.SaveSettings(); }); } } function d(e, t, n, i, o, ...r) { const a = (function (e) { let t = 0; for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t); return [(t >> 0) & 255, (t >> 8) & 255, (t >> 16) & 255]; })(o).map((e, t) => Math.round(Math.max(0, Math.min(255, 255 * (0.8 * (e / 255 - 0.5) + 0.15))))), s = (299 * (c = a)[0] + 587 * c[1] + 114 * c[2]) / 1e3 >= 128; var c; let m = i; n && (m = (function (e) { switch (e) { case l.Debug: return String.fromCodePoint(128027); case l.Info: return String.fromCodePoint(8505); case l.Warning: return String.fromCodePoint(9888); case l.Error: return String.fromCodePoint(128165); } })(e) + " " + m); const d = r.length >= 1 && "string" == typeof r[0] && r[0].includes("%c"), h = d && r.shift(); let u; if (((u = t ? [`%c${m}%c:${d ? " %c" + h : ""}`, `color: ${s ? "black" : "white"}; background: rgb(${a.join(",")}); padding: 0 1ch; border-radius: 3px;`, "color: transparent; margin-right: -1ch", ...(d ? [""] : []), ...r] : r), n)) console.groupCollapsed(...u), console.trace("Callstack"), console.groupEnd(); else switch (e) { case l.Debug: case l.Info: console.log(...u); break; case l.Warning: console.warn(...u); break; case l.Error: console.clogerror ? console.clogerror(3, ...u) : console.error(...u); } } (m.k_EnabledLogNames_StorageKey = "EnabledWebLogs"), (m.k_IncludeBacktraceInLog_StorageKey = "IncludeBacktraceInLog"), (m.s_Singleton = null); const h = () => m.Get().LogNames.slice().sort(), u = (e, t) => { m.Get().IsLogName(e) ? m.Get().SetDebugLogEnabled(e, t) : console.warn(`No log named "${e}", available logs:`, h()); }; (window.DebugLogEnable = (...e) => e.forEach((e) => u(e, !0))), (window.DebugLogDisable = (...e) => e.forEach((e) => u(e, !1))), (window.DebugLogEnableAll = () => m.Get().SetAllDebugLogsEnabled(!0)), (window.DebugLogDisableAll = () => m.Get().SetAllDebugLogsEnabled(!1)), (window.DebugLogEnableBacktrace = () => m.Get().SetIncludeBacktraceInLog(!0)), (window.DebugLogDisableBacktrace = () => m.Get().SetIncludeBacktraceInLog(!1)), (window.DebugLogNames = h), (window.EnableSteamConsole = (e = !0) => m.Get().SetDebugLogEnabled("SteamClient", e)); }, 59702: (e, t, n) => { "use strict"; function i(e, t) { return (e = Math.ceil(e)), (t = Math.floor(t)), Math.floor(Math.random() * (t - e + 1)) + e; } function o(e, t, n) { return null == e || isNaN(e) ? e : Math.max(t, Math.min(n, e)); } function r(e, t, n, i, o) { return i + ((o - i) * (e - t)) / (n - t); } function a(e, t, n, i, r) { return o(i + ((r - i) * (e - t)) / (n - t), Math.min(i, r), Math.max(i, r)); } n.d(t, { LO: () => i, Lh: () => o, bU: () => a, r4: () => r }); }, 2049: (e, t, n) => { "use strict"; n.d(t, { $T: () => a.$, B8: () => i.B8, BE: () => o.BE, Dc: () => i.Dc, I5: () => i.I5, JI: () => i.JI, KM: () => i.KM, NW: () => i.NW, Qg: () => i.Qg, ak: () => s.a, dn: () => o.dn, e1: () => i.e1, eF: () => i.eF, fJ: () => i.fJ, it: () => r.it, k$: () => o.k$, kD: () => i.kD, rA: () => i.rA, vK: () => i.vK, ww: () => o.ww, xK: () => o.xK, yU: () => r.yU }); var i = n(70349), o = n(94198), r = n(52049), a = (n(97200), n(24552)), s = n(8568); }, 92117: (e, t, n) => { "use strict"; n.d(t, { R: () => r }); var i = n(27378), o = n(56552); n(29029), n(38571); function r(e) { const t = i.useRef(a), n = function (e, t, ...n) { console.log(`React-Query ${e}`, t, ...n); }; (0, o.setLogger)({ log: (e, ...t) => n("LOG", e, ...t), warn: (e, ...t) => n("WARN", e, ...t), error: (e, ...t) => n("ERROR", e, ...t) }); let r = e.children; return e.debug, i.createElement(o.QueryClientProvider, { client: t.current }, r); } const a = new o.QueryClient({ defaultOptions: { queries: { staleTime: 1 / 0 } } }); }, 70349: (e, t, n) => { "use strict"; n.d(t, { B: () => _, B8: () => r, Dc: () => g, I5: () => f, JI: () => m, KM: () => l, NW: () => s, Qg: () => h, e1: () => u, eF: () => c, fJ: () => a, kD: () => C, rA: () => p, vK: () => d }); var i = n(27378), o = (n(94198), n(88669)); n(2049), n(5395), n(89554); function r(e, t, n) { return [e, t, n]; } function a(e, t, n) { const [o, r] = i.useState(n); return ( i.useEffect(() => { let t = !0; const n = e(); return ( n && n.then((e) => { t && r(e); }), () => { t = !1; } ); }, t), o ); } function s() { const [, e] = i.useState(0); return i.useCallback(() => e((e) => e + 1), []); } function l(e) { let t = 1, n = e; for (; null != n && "HTML" != n.tagName; ) { const e = getComputedStyle(n); if (e.zoom) { const n = Number.parseFloat(e.zoom); isNaN(n) || (t *= n); } n = n.parentElement; } return t; } function c(e, t, n) { const o = i.useRef(); o.current = n; const r = i.useRef(), a = i.useCallback(() => { var e; null === (e = r.current) || void 0 === e || e.call(r), (r.current = void 0); }, []), s = i.useCallback( (n) => { a(), n && (n.addEventListener(e, t, o.current), (r.current = () => n.removeEventListener(e, t))); }, [e, t, a], ); return i.useEffect(() => a, [a]), s; } function m(e, t, n, o) { i.useEffect(() => { if (e && n) return e.addEventListener(t, n, o), () => e.removeEventListener(t, n, o); }, [e, t, n]); } function d(e, t, n, i) { return m( e, "message", function (e) { t.includes(e.data) && n(this, e); }, i, ); } function h(e, t) { i.useLayoutEffect(() => { if (!t || !e) return; const n = e.Register(t); return () => n.Unregister(); }, [e, t]); } function u(e) { const [t, n] = i.useState(null == e ? void 0 : e.Value); return ( i.useEffect(() => { if (null == e) return () => {}; const i = e.Subscribe(n); return t !== e.Value && n(e.Value), null == i ? void 0 : i.Unsubscribe; }, [e]), t ); } function p(e, t, n = 1e3) { const o = i.useRef(t); o.current = t; const [r, a] = i.useState(e), [s, l] = i.useState(!1), c = i.useCallback(() => { a(e), l(!1); }, [e, a]), { fnStopTimer: m, fnRestartTimer: d } = (function (e, t, n = !0, o = !1) { const r = i.useRef(t); r.current = t; const [a, s] = i.useState(!1), l = i.useRef(0), c = i.useCallback(() => { s(!0), r.current && r.current(); }, []), m = i.useCallback(() => { window.clearTimeout(l.current); }, []), d = i.useCallback(() => { s(!1), m(), (l.current = window.setTimeout(c, e)); }, [m, e, c]), h = i.useCallback(() => { n && d(); }, [n, d]); return ( i.useEffect(h, [e, h]), i.useEffect(() => m, [m]), i.useEffect(() => { a && o && d(); }, [a, o, d]), { bTimerCompleted: a, fnStopTimer: m, fnRestartTimer: d } ); })(n, c, !1), h = i.useCallback( (e) => { d(), a(e), l(!0), o.current && o.current(e); }, [a, d], ); return [s ? r : e, h, c]; } function _(e, t) { const [n, o] = i.useState(e); return ( i.useEffect(() => { if (!e) { const e = window.setTimeout(() => o(!1), t); return () => window.clearTimeout(e); } o(!0); }, [e, t]), n ); } function g(e, t) { return _(e, t) || e; } function C(e) { const t = i.useRef(); return i.useCallback(() => ((t.current && t.current.factory == e) || (t.current = { value: e(), factory: e }), t.current.value), [e]); } function f(e) { const t = i.useRef([]), n = i.useCallback(() => { for (const e of t.current) e(); t.current = []; }, []), [r, a] = i.useState(null); return ( i.useEffect(() => { if ((n(), r && null != e)) { const n = (0, o.H8)(r); for (const i of n) i.addEventListener("scroll", e), t.current.push(() => i.removeEventListener("scroll", e)); } return n; }, [n, r, e]), a ); } }, 94198: (e, t, n) => { "use strict"; n.d(t, { BE: () => r, LY: () => c, dn: () => a, k$: () => o, ww: () => l, xK: () => s }); var i = n(27378); function o(e, t) { null != e && ("function" == typeof e ? e(t) : "current" in e && (e.current = t)); } function r(...e) { return i.useCallback((t) => { for (const n of e) o(n, t); }, e); } function a(...e) { if (e && 0 !== e.length) return 1 === e.length ? e[0] : (t) => e.forEach((e) => { e && ("function" == typeof e ? e(t) : (e.current = t)); }); } function s(e, t) { const n = i.useRef(); return i.useCallback((t) => { n.current && n.current(), (n.current = e(t)); }, t); } function l(e) { const t = i.useRef(null); return { refWithValue: t, refForElement: r(e, t) }; } function c(e, t) { const n = i.useRef(!1); i.useLayoutEffect( () => () => { n.current && o(e, void 0); }, [e], ), i.useLayoutEffect(() => { (t || n.current) && (o(e, t), (n.current = !!t)); }, [e, t]); } }, 39353: (e, t, n) => { "use strict"; n.d(t, { P: () => a }); var i = n(31542), o = n(88669), r = n(54530); class a extends r.Rq { constructor(e, t, n) { super(o.kR(i.findDOMNode(e)), n), (this.m_props = {}), (this.m_component = e), (this.m_propTargets = t), (this.m_setStateOnComplete = n.setStateOnComplete); } Start() { this.m_props = {}; for (let e in this.m_propTargets) { let t = parseFloat(this.m_component.state[e]) || 0, n = this.m_propTargets[e]; t != n && (this.m_props[e] = { start: t, end: n }); } super.Start(); } Update(e) { let t = {}; for (let n in this.m_props) { let i = this.m_props[n], o = i.start + (i.end - i.start) * e; t[n] = o; } this.m_component.setState(t); } FireOnComplete() { super.FireOnComplete(), this.m_setStateOnComplete && this.m_component.setState(this.m_setStateOnComplete); } } }, 24552: (e, t, n) => { "use strict"; n.d(t, { $: () => r }); var i = n(27378), o = n(52049); function r() { const [e, t] = i.useState(0), n = i.useCallback( (n) => { const i = n.target.clientHeight; i > e && t(i); }, [e], ); return { strMinHeightStyle: e + "px", refForResizeObserver: (0, o.yU)(n) }; } }, 52049: (e, t, n) => { "use strict"; n.d(t, { it: () => l, yU: () => s }); var i = n(27378), o = n(93635), r = (n(70349), n(94198)); function a(e, t) { return (0, r.xK)( (n) => { if (!n) return; const i = t(n.ownerDocument.defaultView, (t) => { e(t[0]); }); return i.observe(n), () => i.unobserve(n); }, [e, t], ); } function s(e) { return a( e, i.useCallback((e, t) => (e.ResizeObserver ? new e.ResizeObserver(t) : ((0, o.X)(!1, "ResizeObserver is not available"), { observe: () => {}, unobserve: () => {}, disconnect: () => {} })), []), ); } function l(e, ...t) { const n = new e.ownerDocument.defaultView.ResizeObserver(...t); return n.observe(e), n; } }, 97200: (e, t, n) => { "use strict"; n(27378), n(52049), n(94198); }, 21298: (e, t, n) => { "use strict"; function i(e, t) { return e < t ? -1 : e > t ? 1 : 0; } function o(e, t) { return i(e.toLocaleLowerCase(), t.toLocaleLowerCase()); } function r(e) { return (e >= 55356 && e <= 57343) || (e >= 8205 && e <= 11093) || 12953 == e || 12349 == e || 12336 == e || 65039 == e || 12951 == e || 169 == e || (e >= 48 && e <= 57) || 35 == e || 42 == e || 10 == e || 174 == e; } function a(e) { let t = !1, n = !1, i = !0; for (let o = 0; o < e.length; o++) { let a = e.charCodeAt(o); if (((i && a >= 48 && a <= 57) || 35 == a || 42 == a || 10 == a ? (n = !0) : r(a) && ((n = !0), (i = !1)), n && 0 == o)) (t = !0), (n = !1); else if (n && t) (t = !0), (n = !1); else if (!n) return (t = !1), !1; if (o > 20) return !1; } return !i && t; } function s(e) { let t = e.charCodeAt(0); return t >= 65 && t <= 90; } function l(e) { if (e.length <= 2) return e; let t = e.charAt(1), n = s(t); for (let i = 2; i < e.length; i++) { let o = e.charAt(i); if (n || !s(o)) { if (" " == o) { (o = e.charAt(i + 1)), o.length > 0 && (t = o); break; } } else (n = !0), (t = o); } return e.charAt(0) + t; } function c(e) { if (!e) return ""; if (DOMParser) { return new DOMParser().parseFromString(e, "text/html").documentElement.textContent; } return e; } function m(e, t = "") { return e.replace(/\bhttps?:\/\/\S+/gi, t); } function d(e, t, n = !0) { let i = e.trim(); if (((i = i.replace(n ? /\s+/g : /[ \t]+/g, " ")), i.length > t)) { i = i.substring(0, t); let e = i.replace(/^(.*([.!?])) .*$/, "$1"), o = e.length; (o < 0.6 * t || o == t) && (e = i.replace(/ [^ ]*$/, "...")), (i = n ? e.replace(/(\r\n|\n|\r)/gm, "") : e); } return i; } function h(e) { if (e.startsWith("[emoticon")) { let t = e.match(/^(?:\[emoticon\][^\[]+\[\/emoticon\]\s*)+$/); if (t && t.length) { let t = e.match(/\[emoticon\][^\[]+\[\/emoticon\]/g); return t && t.length <= 6; } } return !1; } function u(e) { return e.length <= 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1); } function p(e, t) { let n = e.lastIndexOf(t); return -1 == n ? "" : e.substr(n + t.length); } function _(e) { return atob(e.replace(/-/g, "+").replace(/_/g, "/")); } n.d(t, { CR: () => a, Gt: () => l, HA: () => c, W5: () => m, Xf: () => u, eT: () => i, hj: () => p, hs: () => h, nh: () => _, oU: () => d, tN: () => o }); }, 5395: (e, t, n) => { "use strict"; n.d(t, { QU: () => s, U8: () => r, _H: () => i, _R: () => a, yK: () => o }); const i = { PerYear: 31536e3, PerMonth: 2628e3, PerWeek: 604800, PerDay: 86400, PerHour: 3600, PerMinute: 60 }; function o(e, t) { return e.getFullYear() == t.getFullYear() && e.getMonth() == t.getMonth() && e.getDate() == t.getDate(); } function r(e, t) { return e.getFullYear() == t.getFullYear(); } function a(e) { return new Promise((t) => setTimeout(t, e)); } function s() { return Math.floor(Date.now() / 1e3); } }, 61752: (e, t, n) => { "use strict"; n.d(t, { FM: () => r, H8: () => s, OL: () => h, Pm: () => c, XW: () => a, bk: () => p, dK: () => d, et: () => m, md: () => u }); var i = n(10553), o = (n(84290), n(88024)); function r(e) { let t = new RegExp("^(steam://openurl(_external)?/)?((f|ht)tps?://)?([^@/?#]*@)?([^/#?]+)", "im"), n = e.match(t); return n && n.length > 5 ? n[6].toString() : e; } function a(e) { let t = r(e); return t.startsWith("www.") && (t = t.slice(4)), t; } function s(e) { let t = document.createElement("a"); return (t.href = e), t.hostname.indexOf("xn--") >= 0 ? t.href : e; } const l = /^(steam|ftp|https?):\/\//; function c(e) { return l.test(e) ? e : "https://" + e; } function m(e) { return e ? 1 != i.De.EUNIVERSE ? e : ("http:" == e.substring(0, 5) && (e = "https:" + e.substring(5)), (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(/https:\/\/media.steampowered.com\//g, i.De.MEDIA_CDN_URL)).replace(/https:\/\/cdn.akamai.steamstatic.com\//g, i.De.MEDIA_CDN_URL)).replace(/https:\/\/cdn.cloudflare.steamstatic.com\//g, i.De.MEDIA_CDN_URL)).replace(/https:\/\/cdn.edgecast.steamstatic.com\//g, i.De.MEDIA_CDN_URL)).replace(/https:\/\/cdn.dota2.com\//g, i.De.MEDIA_CDN_URL)).replace(/https:\/\/storefront.steampowered.com\/v\/gfx\//g, i.De.MEDIA_CDN_URL + "steam/")).replace(/https:\/\/clan.akamai.steamstatic.com\//g, i.De.CLAN_CDN_ASSET_URL)).replace(/https:\/\/clan.cloudflare.steamstatic.com\//g, i.De.CLAN_CDN_ASSET_URL)).replace(/https:\/\/cdn.steamcommunity.com\//g, i.De.COMMUNITY_CDN_URL)).replace(/https:\/\/community.akamai.steamstatic.com\//g, i.De.COMMUNITY_CDN_URL)).replace(/https:\/\/community.cloudflare.steamstatic.com\//g, i.De.COMMUNITY_CDN_URL)).replace( /https:\/\/community.edgecast.steamstatic.com\//g, i.De.COMMUNITY_CDN_URL, )).replace(/{IMG_URL}/g, i.De.IMG_URL)).replace(/{MEDIA_CDN_URL}/g, i.De.MEDIA_CDN_URL)).replace(/{MEDIA_CDN_COMMUNITY_URL}/g, i.De.MEDIA_CDN_COMMUNITY_URL)).replace(/{COMMUNITY_CDN_URL}/g, i.De.COMMUNITY_CDN_URL)), (e = (0, o.HZ)(e))) : e; } function d(e) { if (!e) return !0; const t = r(e).toLocaleLowerCase(); return [r(i.De.COMMUNITY_CDN_URL).toLocaleLowerCase(), r(i.De.MEDIA_CDN_URL).toLocaleLowerCase(), r(i.De.MEDIA_CDN_COMMUNITY_URL).toLocaleLowerCase(), r(i.De.STORE_CDN_URL).toLocaleLowerCase(), r(i.De.BASE_URL_SHARED_CDN).toLocaleLowerCase(), r(i.De.CLAN_CDN_ASSET_URL).toLocaleLowerCase(), "support.steampowered.com", "steamcdn-a.akamaihd.net", "cdn.cloudflare.steamstatic.com", "cdn.akamai.steamstatic.com"].indexOf(t) >= 0; } function h(e) { return i.De.SNR && i.De.SNR.length > 0 && e && -1 == e.toLocaleLowerCase().indexOf("snr=") ? e + (e.indexOf("?") >= 0 ? "&" : "?") + "snr=" + i.De.SNR : e; } function u(e, t) { try { const n = new URL(t), i = new URL(e); return n.href.replace(/\/$/, "") + i.pathname + i.search + i.hash; } catch (e) { return ""; } } function p(e) { return i.De.IN_STEAMUI && !e.startsWith("steam://") && (e = `steam://openurl/${e}`), e; } }, 36175: (e, t, n) => { "use strict"; function i(e, t) { return e + "economy/sticker/" + t; } n.d(t, { a: () => i }); }, 26821: (e, t, n) => { "use strict"; n.d(t, { b3: () => a, n8: () => s }); var i = n(27378), o = n(57476), r = n(2049); function a(e) { const [t, n] = i.useState(!1), a = i.useCallback(() => { (0, o.w3)(e, "Window.IsWindowMaximized") ? e.SteamClient.Window.IsWindowMaximized().then((e) => { n(e); }) : (null == e ? void 0 : e.screen) && n(e.screen.availWidth == e.innerWidth && e.screen.availHeight == e.innerHeight); }, [e]); return i.useEffect(a, [a, e]), (0, r.JI)(e, "resize", a), (0, r.vK)(e, ["window_moved"], a), t; } function s(e, t = 100) { const [n, o] = i.useState(!1), a = i.useCallback(() => o(!0), [o]), s = i.useCallback(() => o(!1), [o]); return ( i.useEffect( () => e ? (e.addEventListener("focus", a), e.addEventListener("blur", s), () => { e.removeEventListener("focus", a), e.removeEventListener("blur", s); }) : void 0, [e, a, s], ), (0, r.Dc)(n, t) ); } }, 16682: (e, t, n) => { "use strict"; n.d(t, { B: () => d, M: () => m }); var i = n(27378), o = n(70283), r = n(88669), a = n(2049), s = n(10553); const l = new WeakMap(); function c(e) { if (e) return l.has(e) || l.set(e, new Set()), l.get(e); } function m(e) { const t = (0, s.qt)({ bSuppressAssert: !0 }).IN_VR, n = i.useMemo(() => new Map(), []), [o, l] = i.useState(!1), m = i.useRef(void 0), d = e.onClick, h = i.useCallback( (e) => { d && d(e); }, [d], ), u = e.onTouchStart, p = i.useCallback( (e) => { for (const t of Array.from(e.targetTouches)) { const i = c(e.view); if (!n.has(t.identifier)) { if (i.has(t.identifier)) continue; i.add(t.identifier), n.set(t.identifier, { bReceivedTouchMove: !1, bScrolled: !1, elemTouchStart: e.target }); } } l(n.size > 0), u && u(e); }, [u, n], ), _ = e.onTouchMove, g = i.useCallback( (e) => { for (const t of Array.from(e.changedTouches)) n.has(t.identifier) && (n.get(t.identifier).bReceivedTouchMove = !0); _ && _(e); }, [_, n], ), C = e.onTouchEnd, f = i.useCallback( (e) => { var t, i; let o = !1; for (const a of Array.from(e.changedTouches)) { if (!n.has(a.identifier)) continue; if (o || !m.current) continue; const s = n.get(a.identifier); if ((n.delete(a.identifier), null === (t = c(e.view)) || void 0 === t || t.delete(a.identifier), !s.bReceivedTouchMove)) continue; if (s.bScrolled) continue; const l = s.elemTouchStart, d = m.current.ownerDocument.elementFromPoint(a.clientX, a.clientY), h = (0, r.LO)((0, r.GB)(l) ? l : void 0, (0, r.GB)(d) ? d : void 0); m.current.contains(h) && (null === (i = null == h ? void 0 : h.click) || void 0 === i || i.call(h), (o = !0)); } l(n.size > 0), C && C(e); }, [C, n], ); i.useEffect(() => { var e, t, i; const o = c(null !== (i = null === (t = null === (e = m.current) || void 0 === e ? void 0 : e.ownerDocument) || void 0 === t ? void 0 : t.defaultView) && void 0 !== i ? i : void 0); return () => { for (const e of n.keys()) null == o || o.delete(e); }; }, [n]); const v = i.useCallback( (e) => { for (const e of n.values()) e.bScrolled = !0; }, [n], ), S = (0, a.I5)(o ? v : void 0), b = (0, a.BE)(m, S); return t && e.onClick ? ((e.onClick = h), (e.onTouchStart = p), (e.onTouchMove = g), (e.onTouchEnd = f), b) : void 0; } function d(e) { const t = (0, s.qt)({ bSuppressAssert: !0 }).IN_VR, n = e.onClick, r = i.useCallback( (e) => { o.LT.PlayNavSound(o.qr.BasicNav), n && n(e); }, [n], ); t && n && (e.onClick = r); } }, 90406: (e, t, n) => { "use strict"; n.d(t, { F: () => K, x: () => q }); var i = n(85556), o = n(27378), r = n(21298), a = n(50649), s = n(37174), l = n.n(s), c = n(10553), m = n(59702); function d(e, t, n) { return c.De.COMMUNITY_CDN_ASSET_URL + e + "/roomeffects/" + t + "/" + n; } class h extends o.Component { constructor(e) { super(e), (this.m_strSaleId = this.props.sale); } getAsset(e) { return d(this.m_strSaleId, this.props.effect.name, e); } } function u(e, t) { !(function (e) { const t = (0, o.useRef)({ bSet: !1 }); t.current.bSet || (t.current = { bSet: !0, value: e() }), t.current.value; })(() => setTimeout(e, t)); } const p = ({ msDelay: e, children: t }) => (function (e) { const [t, n] = (0, o.useState)(!1); return u(() => n(!0), e), t; })(e) ? o.createElement(o.Fragment, null, t) : null; class _ extends o.Component { constructor(e) { super(e), (this.m_refContainer = o.createRef()), (this.m_rgFireworks = []), (this.m_nCurrentDelay = 0), (this.state = { bReady: !1 }); } CreateFireworks(e) { (this.m_nCurrentDelay = 0), this.AddCluster(e), (this.m_nCurrentDelay += 200), this.RenderLong(e), (this.m_nCurrentDelay += 200), this.AddCluster(e), (this.m_nCurrentDelay += 600), this.AddCluster(e), (this.m_nCurrentDelay += 200), this.RenderLong(e), (this.m_nCurrentDelay += 200), this.RenderLong(e), (this.m_nCurrentDelay += 200), this.RenderLong(e), this.AddCluster(e), this.RenderLong(e), (this.m_nCurrentDelay += 200), this.AddCluster(e); } TestRender(e) { (0, m.LO)(0, 70), (0, m.LO)(0, 70); for (let t = 0; t < 1; t++) this.m_rgFireworks.push({ x: "20%", y: "20%", nHueRotation: 0, nDelay: this.m_nCurrentDelay, flScale: e, burst: g }), (this.m_nCurrentDelay += 500); this.m_rgFireworks.push({ x: "0%", y: "0%", nHueRotation: 0, nDelay: this.m_nCurrentDelay, flScale: e, burst: C }), this.m_rgFireworks.push({ x: "30%", y: "30%", nHueRotation: 0, nDelay: this.m_nCurrentDelay, flScale: e, burst: f }); } CalcHueRotation() { return "lny2020" == this.props.sale ? 360 + (0, m.LO)(-30, 10) : (0, m.LO)(0, 360); } AddCluster(e) { let t = (0, m.LO)(-5, 50), n = (0, m.LO)(-10, 50), i = this.CalcHueRotation(); this.m_rgFireworks.push({ x: `${t}%`, y: `${n}%`, nHueRotation: i, nDelay: this.m_nCurrentDelay, flScale: e, burst: C }); let o = Math.random() * Math.PI * 2; const r = Math.floor(64 * e), a = Math.floor(60 * e), s = Math.floor(10 * e); let l = 0; for (let c = 0; c < 3; c++) { let m = `calc( ${t}% + ${r + Math.cos(o + l) * a}px )`, d = `calc( ${n}% + ${r + (Math.sin(o + l) * a + s)}px )`; c < 2 && (this.m_nCurrentDelay += 200), (i = this.CalcHueRotation()), this.m_rgFireworks.push({ x: m, y: d, nHueRotation: i, nDelay: this.m_nCurrentDelay, flScale: e, burst: f }), (l += 2.09); } } RenderLong(e) { const t = (0, m.LO)(20, 60), n = (0, m.LO)(-5, 50), i = this.CalcHueRotation(); this.m_rgFireworks.push({ x: `${t}%`, y: `${n}%`, nHueRotation: i, nDelay: this.m_nCurrentDelay, flScale: e, burst: g }); } componentDidMount() { if (!this.m_refContainer.current || this.m_rgFireworks.length > 0) return; let e = this.m_refContainer.current, t = e.offsetWidth, n = e.offsetHeight, i = (0, m.r4)(t, 400, 1080, 0.5, 2); (i = (0, m.Lh)(i, 0.5, 2)), console.log(t, n, i), this.CreateFireworks(i), this.setState({ bReady: !0 }); } render() { let e = []; return ( this.state.bReady && this.m_rgFireworks.forEach((t, n) => { let i = `${n}`, r = { top: t.y, left: t.x, filter: `hue-rotate(${t.nHueRotation}deg)` }; e.push(o.createElement(t.burst, { key: i, style: r, msDelay: t.nDelay, scale: t.flScale, sale: this.props.sale })); }), o.createElement("div", { ref: this.m_refContainer, className: l().FireworkContainer }, e) ); } } function g(e) { const t = d(e.sale, "fireworks", "long_sheet.png"); let n = e.style; return (n.backgroundImage = `url(${t})`), (n.width = 256), (n.height = 256), (n.animation = `${l().fireworkLongX} 0.2s steps(9) 10, ${l().fireworkLongY} 2.0s steps(10) forwards`), (n.transformOrigin = "0 0"), (n.transform = `scale( ${e.scale} )`), o.createElement(p, { msDelay: e.msDelay }, o.createElement("div", { style: e.style, className: l().FireworkPNG })); } function C(e) { const t = d(e.sale, "fireworks", "big_sheet.png"); let n = e.style; return (n.backgroundImage = `url(${t})`), (n.width = 256), (n.height = 256), (n.animation = `${l().fireworkBigX} 0.2s steps(9) 4, ${l().fireworkBigY} 0.8s steps(4) forwards`), (n.transformOrigin = "0 0"), (n.transform = `scale( ${e.scale} )`), o.createElement(p, { msDelay: e.msDelay }, o.createElement("div", { style: e.style, className: l().FireworkPNG })); } function f(e) { const t = d(e.sale, "fireworks", "small_sheet.png"); let n = e.style; return (n.backgroundImage = `url(${t})`), (n.width = 256), (n.height = 256), (n.animation = `${l().fireworkSmallX} 0.15s steps(10) 6, ${l().fireworkSmallY} 0.9s steps(6) forwards`), (n.transformOrigin = "0 0"), (n.transform = `scale( ${e.scale / 2} )`), o.createElement(p, { msDelay: e.msDelay }, o.createElement("div", { style: e.style, className: l().FireworkPNG })); } var v = n(51910); const S = 8e3; var b; function I(e) { switch (e) { case b.Gold: case b.LNY2020: return `hsl(${51 + -16 * Math.random()}, 93%, 54%)`; default: return `hsl(${360 * Math.random()}, 100%, 40%)`; } } function y(e) { return e == b.LNY2020 ? `hue-rotate(${360 + (0, m.LO)(-30, 10)}deg)` : ""; } !(function (e) { (e[(e.Default = 0)] = "Default"), (e[(e.Gold = 1)] = "Gold"), (e[(e.LNY2020 = 2)] = "LNY2020"); })(b || (b = {})); const E = (e, t) => { const { anim: n } = (0, v.q_)({ anim: 1, from: { anim: 0 }, config: { duration: S } }), i = (0, o.useMemo)(() => { let i = (function (e, t) { const n = []; if (!e) return n; const { width: i, height: o } = e; for (let e = 0; e < 200; e++) { const e = Math.random(), r = Math.random() * e, a = Math.random() * r, s = 4 * (Math.random() - 0.5) * Math.PI * 20, l = Math.random() + 0.5, c = [Math.random() * o - o - 20, o + 20 + Math.random() * o * l], m = l * (i <= 1e3 ? 1 : i / 1e3) * (t == b.Gold ? 2 : 1), d = (Math.random() - 0.5) * i, h = (Math.random() - 0.5) * i, u = [h, d + h], p = I(t), _ = y(t); n.push({ rotationCoefficient: s, rotationRatioY: r, rotationRatioX: e, rotationRatioZ: a, yRange: c, xRange: u, scale: m, colorHue: p, filter: _ }); } return n; })(e, t), o = i.map((e) => (function (e, t, n) { b.Default; const { rotationCoefficient: i, rotationRatioY: o, rotationRatioX: r, rotationRatioZ: a, yRange: s, xRange: l, scale: c, colorHue: m, filter: d } = e; return { backgroundColor: m, fill: m, filter: d, flRandom: 0, transform: t.interpolate((e) => { const t = e * i * o, n = e * i * r, m = e * i * a, d = e * (s[1] - s[0]) + s[0]; return `translate(${e * (l[1] - l[0]) + l[0]}px, ${d}px) rotateY(${t}rad) rotateX(${n}rad) rotateZ(${m}rad) scale(${c})`; }), }; })(e, n), ), r = i .map((e) => (function (e, t, n) { if (Math.random() > 0.1) return null; const { rotationCoefficient: i, rotationRatioZ: o, yRange: r, xRange: a, scale: s, colorHue: l, filter: c } = e; return { backgroundColor: void 0, fill: l, filter: c, flRandom: Math.random(), transform: t.interpolate((e) => { const t = ((e * i) / 4) * o, n = e * (r[1] - r[0]) + r[0]; return `translate(${e * (a[1] - a[0]) + a[0]}px, ${n}px) rotateZ(${t}rad) scale(${s})`; }), }; })(e, n), ) .filter((e) => !!e); return { rgParticleStyles: o, rgStreamerStyles: r }; }, [e, t, n]); return i; }, D = { position: "absolute", left: "50%", top: 0 }, w = Object.assign(Object.assign({}, D), { width: 10, height: 5, borderWidth: 1, borderColor: "black" }), R = ({ eType: e }) => { b.Gold, b.LNY2020; const [t, n] = (function () { const [e, t] = (0, o.useState)(null), n = (0, o.useCallback)((e) => { e && "function" == typeof e.getBoundingClientRect && t(e.getBoundingClientRect()); }, []); return [e, n]; })(); let i, { rgParticleStyles: r, rgStreamerStyles: a } = E(t, e); switch (e) { case b.Gold: i = r.map((e, t) => o.createElement(M, { key: t, style: e })); break; case b.LNY2020: i = r.map((e, t) => (t % 2 ? o.createElement(A, { key: t, style: e }) : o.createElement(k, { key: t, style: e }))); break; case b.Default: i = r.map((e, t) => o.createElement(A, { key: t, style: e })); } return o.createElement( "div", { style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, overflow: "hidden" }, ref: n }, i, a.map((e, t) => (e.flRandom > 0.5 ? o.createElement(L, { key: t, style: e }) : o.createElement(T, { key: t, style: e }))), ); }, A = ({ style: e }) => o.createElement(v.q.div, { style: Object.assign(Object.assign({}, w), e) }), M = ({ style: e }) => { const [t] = (0, o.useState)(Math.floor(Math.random() * G.length)), n = G[t]; return o.createElement(n, { style: Object.assign(Object.assign(Object.assign({}, D), e), { backgroundColor: void 0 }) }); }, k = ({ style: e }) => { const [t] = (0, o.useState)(Math.floor(Math.random() * O.length)), n = O[t]; return o.createElement(n, { style: Object.assign(Object.assign(Object.assign({}, D), e), { backgroundColor: void 0 }) }); }, T = ({ style: e }) => o.createElement( v.q.svg, { viewBox: "0 0 80 620", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: Object.assign({ width: 10, height: 70 }, e) }, o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.53418 0.446363C4.80788 7.96949 8.99436 15.2008 13.0073 22.1324C35.0383 60.1862 51.8397 89.2071 49.1318 107.895C48.8475 101.617 47.1164 95.1506 43.6182 89.4997C22.9652 56.1375 -2.34054 7.06674 0.53418 0.446363ZM56.8207 188.805C55.1885 180.279 48.7591 170.011 41.3806 161.521C37.204 156.715 9.25983 141.889 7.31883 141.711L7.31474 141.711L7.31468 141.71L7.31452 141.71L7.11268 139.174L6.5244 131.791L6.5251 131.791L6.52505 131.79L6.52672 131.791C34.8022 129.659 47.1567 121.526 49.1318 107.895C49.6795 119.989 44.859 131.385 36.9599 134.917C33.2606 136.571 29.1329 137.843 25.1609 138.813C32.3599 142.599 44.0294 149.927 51.5956 160.751C60.8324 173.966 58.2537 184.901 56.8207 188.805ZM14.1541 214.387C28.3318 211.43 49.5183 206.914 54.7559 200.428C57.1974 197.404 57.6912 193.352 56.8207 188.805C56.4544 189.804 56.163 190.342 56.163 190.342C50.7646 194.114 26.0806 200.624 11.3908 204.497L11.3906 204.497L11.3904 204.497C7.40758 205.548 4.15949 206.404 2.22967 206.96L2.67009 212.483L3.21786 219.36C12.4021 224.467 20.8538 228.732 28.2879 232.483C70.3706 253.717 79.8458 258.498 5.02032 306.544C5.02047 306.546 5.02063 306.548 5.02078 306.55C5.01989 306.548 5.019 306.547 5.01812 306.545C5.24371 309.369 5.53845 312.547 5.79092 315.269C5.89859 316.43 5.99858 317.508 6.08223 318.44C6.15188 319.464 6.19564 320.436 6.20554 321.424C6.20464 321.331 6.23688 321.223 6.30064 321.101C6.31949 321.398 6.32799 321.609 6.32408 321.719C6.27561 321.616 6.23528 321.518 6.20333 321.425C6.28038 321.817 6.31788 321.895 6.32408 321.719C7.33553 323.874 11.894 328.285 17.8731 334.069C41.6329 357.056 87.8264 401.748 23.0228 412.886C23.5764 419.833 23.1631 419.992 23.1631 419.992C23.1631 419.992 24.3205 419.752 26.2506 419.305C34.1052 423.989 55.3095 438.589 58.8169 442.625C66.1955 451.115 72.6248 461.382 74.2571 469.909C73.8908 470.907 73.5993 471.446 73.5993 471.446C68.4367 475.053 42.2327 481.635 25.7172 485.783L25.7152 485.783L25.7147 485.784L25.7135 485.784L25.7028 485.787C20.6602 487.053 16.5222 488.093 14.1645 488.751L13.6222 488.439L13.6585 488.894L13.653 488.896L13.6602 488.916L14.4124 498.36C47.1778 516.58 73.923 535.597 77.6114 557.121C77.1891 558.457 76.6366 559.776 75.9628 561.084C62.5946 587.039 41.1874 608.612 24.1016 619.88C66.6744 596.331 80.8095 575.784 77.6114 557.121C81.823 543.801 73.0945 528.757 42.6319 505.104L26.8056 496.013C27.3301 495.908 27.8664 495.802 28.4133 495.693L28.4153 495.693C43.5756 492.685 66.9267 488.052 72.1923 481.531C74.6338 478.508 75.1275 474.456 74.2571 469.909C75.69 466.004 78.2687 455.069 69.032 441.855C57.4339 425.262 36.1944 416.886 36.1944 416.886L35.6563 416.927C41.635 415.285 48.7178 413.074 54.4334 410.519C66.4332 405.154 68.2307 384.374 57.9941 367.838C51.515 357.372 43.7231 350.194 35.4751 342.596C27.6489 335.386 19.4122 327.798 11.4967 316.664C12.7089 315.779 14.0928 314.791 15.6091 313.709C40.2963 296.086 100.082 253.407 25.4758 221.439L14.1541 214.387Z", fill: e.fill, }), ), L = ({ style: e }) => o.createElement( v.q.svg, { viewBox: "0 0 203 295", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: Object.assign({ width: 10, height: 20 }, e) }, o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M104.427 22.6009L104.428 22.6013C125.146 59.4015 140.687 87.0059 133.282 102.839C134.662 95.3303 133.62 86.4659 129.246 79.1843C112.124 50.6796 91.1453 8.75528 93.5285 3.10091C97.2525 9.85693 100.914 16.3611 104.427 22.6009ZM142.726 166.38C141.373 159.096 136.043 150.323 129.926 143.069C127.078 139.691 110.154 127.651 103.342 123.396C101.494 123.638 100.371 123.725 100.371 123.725C100.371 123.725 100.713 123.589 100.254 117.655C119.247 116.187 129.407 111.125 133.282 102.839C131.985 109.898 128.547 115.759 123.726 117.978C120.124 119.637 116.182 120.838 112.579 121.699C116.941 123.721 130.418 130.653 138.395 142.414C146.052 153.705 143.914 163.045 142.726 166.38ZM103.389 188.664C103.824 188.575 104.268 188.484 104.721 188.392L104.722 188.392C117.291 185.827 136.649 181.876 141.015 176.307C143.039 173.725 143.448 170.264 142.726 166.38C142.423 167.232 142.181 167.693 142.181 167.693C137.901 170.772 116.177 176.387 102.486 179.926C98.3006 181.007 94.8659 181.895 92.9093 182.457L92.4596 182.191L92.4896 182.579C92.4878 182.58 92.486 182.58 92.4842 182.581L92.4914 182.602L93.1147 190.665C120.278 206.239 142.45 222.491 145.508 240.879C145.158 242.02 144.7 243.146 144.141 244.263C133.059 266.43 115.312 284.852 101.148 294.472C136.441 274.369 148.16 256.821 145.508 240.879C149 229.501 141.764 216.649 116.509 196.435L103.389 188.664Z", fill: e.fill, }), ), G = [ ({ style: e }) => o.createElement(v.q.svg, { viewBox: "0 0 48 102", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: Object.assign({ width: 5, height: 10 }, e) }, o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M45.8382 77.0734L24 0L2.16179 77.0734C0.773631 79.3013 0 81.7786 0 84.3885C0 84.4894 0.00115761 84.5902 0.00346361 84.6908L0 84.703H0.00374963C0.23239 94.2845 10.8883 102 24 102C37.1117 102 47.7676 94.2845 47.9963 84.703H48L47.9965 84.6908C47.9988 84.5902 48 84.4894 48 84.3885C48 81.7786 47.2264 79.3013 45.8382 77.0734Z", fill: "#F7D51E" })), ({ style: e }) => o.createElement(v.q.svg, { viewBox: "0 0 50 39", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: Object.assign({ width: 10, height: 7 }, e) }, o.createElement("path", { d: "M48.444 16.0525L32.7132 0.633915C20.0884 16.8827 7.13568 21.7989 0.597293 21.9904C7.33478 28.5984 14.1472 37.4728 14.1472 37.4728C31.6473 38.7751 44.3035 23.7352 48.444 16.0525Z", fill: "#C4C4C4" }), o.createElement("path", { d: "M48.444 16.0525L32.7132 0.633915C20.0884 16.8827 7.13568 21.7989 0.597293 21.9904C7.33478 28.5984 14.1472 37.4728 14.1472 37.4728C31.6473 38.7751 44.3035 23.7352 48.444 16.0525Z", fill: e.fill })), ({ style: e }) => o.createElement(v.q.svg, { viewBox: "0 0 68 69", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: Object.assign({ width: 10, height: 10 }, e) }, o.createElement("rect", { y: "34.6389", width: "48", height: "48", transform: "rotate(-45 0 34.6389)", fill: e.fill })), ({ style: e }) => o.createElement(v.q.svg, { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: Object.assign({ width: 10, height: 10 }, e) }, o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M24 0L0 24L24 47.9999L48 24L24 0ZM23.7089 8.48533L8.48527 23.7089L23.7089 38.9325L38.9324 23.7089L23.7089 8.48533Z", fill: e.fill })), ({ style: e }) => o.createElement(v.q.svg, { viewBox: "0 0 48 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: Object.assign({ width: 10, height: 8 }, e) }, o.createElement("ellipse", { cx: "24", cy: "15", rx: "24", ry: "15", fill: e.fill })), ({ style: e }) => o.createElement(v.q.svg, { viewBox: "0 0 48 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: Object.assign({ width: 10, height: 8 }, e) }, o.createElement("ellipse", { cx: "24", cy: "15", rx: "24", ry: "15", fill: e.fill })), ({ style: e }) => o.createElement(v.q.svg, { viewBox: "0 0 48 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: Object.assign({ width: 10, height: 8 }, e) }, o.createElement("ellipse", { cx: "24", cy: "15", rx: "24", ry: "15", fill: e.fill })), ({ style: e }) => o.createElement(v.q.svg, { viewBox: "0 0 48 39", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: Object.assign({ width: 10, height: 8 }, e) }, o.createElement("path", { d: "M33.8287 29.6914L24.9705 21.1201C23.199 24.5487 23.4612 24.5487 21.4282 27.9773C19.3952 31.4058 13.4557 29.6914 12.57 27.9773C7.25553 22.8344 10.7985 17.6914 12.57 15.9773C19.656 5.69155 36.5247 4.54869 48 5.69155C47.4095 4.54865 45.5199 1.92 42.6855 0.548571C39.1425 -1.16571 1.94169 0.548571 0.170191 14.2629C-1.60131 27.9771 10.7992 38.2629 21.4282 38.2629C29.9314 38.2629 33.2382 32.5486 33.8287 29.6914Z", fill: e.fill })), ({ style: e }) => o.createElement(v.q.svg, { width: "48", height: "35", viewBox: "0 0 48 35", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: Object.assign({ width: 10, height: 7 }, e) }, o.createElement("path", { d: "M48 0H0L24 35L48 0Z", fill: e.fill })), ], O = [ ({ style: e }) => o.createElement( v.q.svg, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 54 47.18", style: Object.assign({ width: 28, height: 28 }, e) }, o.createElement("polygon", { fill: "#60000e", points: "10.02 14.06 10.02 14.06 10.02 14.06 10.02 14.06" }), o.createElement("path", { fill: "#f93838", d: "M54,9.53A9.52,9.52,0,0,0,37.74,2.79a10.82,10.82,0,0,0-2.25,3.54,21.52,21.52,0,0,0-1.19,4.08A16.55,16.55,0,0,0,27,8.73h-.24a16.38,16.38,0,0,0-7,1.69,22.41,22.41,0,0,0-1.2-4.09,10.82,10.82,0,0,0-2.25-3.54A9.52,9.52,0,1,0,2.79,16.26h0a10.82,10.82,0,0,0,3.54,2.25,23.87,23.87,0,0,0,5,1.36,16.34,16.34,0,0,0-.94,5.48h0v0a16.57,16.57,0,0,0,4.92,11.81A7.36,7.36,0,0,1,17.05,40a10.5,10.5,0,0,0,10,7.15,10.38,10.38,0,0,0,6.17-2,10.57,10.57,0,0,0,3.77-5.11,7.48,7.48,0,0,1,1.79-2.89,16.66,16.66,0,0,0,4-17.3l.65-.12a22.44,22.44,0,0,0,4.31-1.24,10.82,10.82,0,0,0,3.54-2.25L50.9,16l.31.31A9.5,9.5,0,0,0,54,9.53ZM32.11,21.28a9.27,9.27,0,0,1,2.68-.38,9.06,9.06,0,0,1,2.87.44.44.44,0,0,1,.28.56.44.44,0,0,1-.56.27,8.4,8.4,0,0,0-2.59-.39,8.59,8.59,0,0,0-2.43.34h0a.44.44,0,1,1-.26-.84Zm-7.88,8.64a9.27,9.27,0,0,1,2.68-.38,9.06,9.06,0,0,1,2.87.44.44.44,0,0,1,.28.56.44.44,0,0,1-.56.27,8.35,8.35,0,0,0-2.59-.39,8.46,8.46,0,0,0-2.42.34h0a.44.44,0,1,1-.26-.84ZM24.31,33a.45.45,0,0,1,.54-.32l2.16.55,2.14-.55a.45.45,0,0,1,.54.32.44.44,0,0,1-.32.53l-2.25.58a.41.41,0,0,1-.22,0l-2.27-.58h0A.44.44,0,0,1,24.31,33ZM21.9,21.34a.44.44,0,0,1,.28.56.44.44,0,0,1-.56.27A8.35,8.35,0,0,0,19,21.78a8.46,8.46,0,0,0-2.42.34h0a.44.44,0,0,1-.26-.84A9.27,9.27,0,0,1,19,20.9,9.06,9.06,0,0,1,21.9,21.34Zm-1.6,8.08h0v0a.41.41,0,0,1,0-.1c0-.08-.06-.19-.12-.33a4.39,4.39,0,0,0-.47-.95,2.16,2.16,0,0,0-.43-.5,1.11,1.11,0,0,0-.24-.16.7.7,0,0,0-.25-.05.88.88,0,0,0-.29.05,1.82,1.82,0,0,0-.4.24,5,5,0,0,0-1.16,1.3.66.66,0,0,1-.92.17.65.65,0,0,1-.17-.91,7.44,7.44,0,0,1,1.1-1.32A3.45,3.45,0,0,1,18,26.13a2.21,2.21,0,0,1,.75-.14,2,2,0,0,1,.87.21,2.37,2.37,0,0,1,.66.49,4.41,4.41,0,0,1,.84,1.21,7.08,7.08,0,0,1,.3.72c.1.27.14.45.15.46h0a.67.67,0,0,1-.47.81A.66.66,0,0,1,20.3,29.42Zm12.19,8.86a4.18,4.18,0,0,1-.92.52,7.57,7.57,0,0,1-1.11,2.55A4.85,4.85,0,0,1,28.58,43a3.56,3.56,0,0,1-3.16,0,4.71,4.71,0,0,1-1.33-1,7.14,7.14,0,0,1-1.66-3.24,4.18,4.18,0,0,1-.92-.52.44.44,0,0,1-.1-.61.45.45,0,0,1,.62-.1,2.89,2.89,0,0,0,1.76.61,3,3,0,0,0,1.58-.47,4.28,4.28,0,0,0,1.26-1.31.43.43,0,0,1,.74,0,4.28,4.28,0,0,0,1.26,1.31,3,3,0,0,0,1.58.47A2.89,2.89,0,0,0,32,37.57h0a.45.45,0,0,1,.62.1A.44.44,0,0,1,32.49,38.28ZM38,29.07a.66.66,0,0,1-.92-.17,6.25,6.25,0,0,0-.9-1.09,2.25,2.25,0,0,0-.66-.45.88.88,0,0,0-.29-.05.58.58,0,0,0-.28.07,1,1,0,0,0-.31.23,3.29,3.29,0,0,0-.58.84c-.1.21-.19.42-.25.59s-.12.37-.13.38h0a.66.66,0,0,1-.8.47.67.67,0,0,1-.47-.81s.07-.25.2-.58a6.91,6.91,0,0,1,.59-1.2,3.66,3.66,0,0,1,.69-.79,2.3,2.3,0,0,1,.56-.35,1.82,1.82,0,0,1,.78-.17,2.21,2.21,0,0,1,.75.14,3,3,0,0,1,.73.41,6.6,6.6,0,0,1,1.46,1.62A.65.65,0,0,1,38,29.07Z", }), o.createElement("path", { fill: "#f93838", d: "M27,40.35c1.12,0,1.55-.37,1.89-1.53a4.17,4.17,0,0,1-.73-.37A5,5,0,0,1,27,37.39a5,5,0,0,1-1.16,1.06,4.17,4.17,0,0,1-.73.37C25.45,40,25.88,40.35,27,40.35Z" }), ), ({ style: e }) => o.createElement( v.q.svg, { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 14.5 22", style: Object.assign({ width: 28, height: 28 }, e) }, o.createElement("path", { fill: "#fc1010", d: "M1.6,10.1c0,0-0.1,0-0.4-0.1C1,10,0.8,9.9,0.8,9.9c-0.1,0-0.2-0.1-0.2-0.2c0-0.2,0.1-0.4,0.3-0.6v0L1,9c0.1-0.1,0.2-0.3,0.5-0.6C1.8,8.1,2,7.8,2.2,7.5c0-0.1,0.1-0.1,0.1-0.2s0.1-0.1,0.1-0.2C2.6,7,2.7,6.8,2.8,6.5c0-0.1,0.1-0.2,0.1-0.3C3,6.1,3,6,3,5.9c0-0.2-0.1-0.4-0.2-0.5C2.6,5.3,2.4,5.3,2.1,5.3c-0.2,0-0.4,0-0.6,0.1c-0.1,0-0.4,0.1-0.7,0.3c0,0,0,0,0,0c0,0,0-0.1,0-0.1c0-0.2,0-0.4-0.1-0.8l0-0.6l0-0.3l0-0.2V3.5l0.5-0.2C1.6,3.2,2,3.1,2.5,3c0.5-0.1,0.9-0.1,1.4-0.1c0.4,0,0.8,0,1.1,0.1c0.4,0.1,0.7,0.2,0.9,0.4c0.6,0.4,0.9,1,0.9,1.8c0,0.4-0.1,0.8-0.4,1.2C6.1,6.8,5.7,7.2,5.1,7.6h0.5h0.5c0.2,0,0.4,0,0.5,0c0.2,0.1,0.3,0.1,0.3,0.3c0,0.2,0,0.5,0,0.8V9v0.3c0,0.2,0,0.4-0.1,0.5C6.6,10,6.5,10,6.2,10c0,0-0.1,0-0.2,0c-0.1,0-0.4,0-0.9,0H4H3.6H3.1H2.6C1.9,10.1,1.6,10.1,1.6,10.1z" }), o.createElement("path", { fill: "#fc1010", d: "M9.8,10.3c-0.1,0-0.2,0-0.3,0l-0.6-0.1c0,0-0.1,0-0.1-0.1c0,0-0.1,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0-0.1c-0.1,0-0.2-0.1-0.3-0.1C8.1,9.8,8,9.8,8,9.7L7.8,9.6c-0.1,0-0.1-0.1-0.2-0.1C7.4,9.3,7.2,9,7.1,8.6C7,8.3,6.9,8,6.9,7.6c0-0.2,0-0.6,0-0.9c0-0.5,0-0.8,0.1-1.1c0-0.3,0.1-0.7,0.3-1.1c0.1,0,0.1-0.2,0.3-0.5c0,0,0.1-0.1,0.1-0.1s0-0.1,0.1-0.1c0,0,0,0,0-0.1s0-0.1,0.1-0.1c0.1,0,0.2-0.1,0.3-0.2c0,0,0.1-0.1,0.2-0.1c0.1-0.1,0.1-0.1,0.2-0.1C8.5,3.1,8.8,3,9.1,2.9c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.2,0c0.1,0,0.2,0,0.3,0c0.1,0,0.1,0,0.2,0c0.5,0,0.9,0,1.3,0.1c0.3,0,0.7,0.1,1.1,0.2c0,0,0.1,0,0.1,0c0.3,0.1,0.5,0.2,0.6,0.2c0.1,0,0.1,0.1,0.1,0.1v0.1c0.1,0,0.2,0,0.3,0.1s0.2,0.2,0.3,0.3c0.1,0.1,0.2,0.2,0.2,0.4c0,0.1,0.1,0.2,0.1,0.3c0.1,0,0.1,0,0.1,0s0,0,0,0.1c0,0.2,0.1,0.4,0.1,0.5c0,0.1,0,0.1,0.1,0.2c0,0.1,0,0.2,0.1,0.3l0,0.1l0,0.4v0.3c0,0.6,0,1.1-0.1,1.4C14.2,8.6,14,9,13.7,9.3c-0.1,0.1-0.3,0.2-0.4,0.3l-0.4,0.3c-0.2,0.1-0.4,0.1-0.5,0.2l-0.5,0.2c-0.3,0-0.6,0-0.9,0.1c-0.3,0-0.6,0.1-0.9,0.1C9.9,10.3,9.9,10.3,9.8,10.3z M11.2,8.3c0-0.1,0.1-0.2,0.1-0.3c0-0.1,0-0.2,0-0.2l0-0.3c0-0.2,0-0.5,0-0.7c0-0.1,0-0.2,0-0.3c0-0.2,0-0.4-0.1-0.6c0-0.2-0.1-0.3-0.1-0.5c0-0.2-0.1-0.3-0.1-0.3c0-0.1,0-0.3-0.1-0.3c-0.1-0.1-0.1-0.1-0.3-0.1c-0.2,0-0.4,0.1-0.5,0.4c0,0.1-0.1,0.2-0.1,0.3c0,0,0,0.2,0,0.3L10,6.2C9.9,6.4,9.9,6.6,9.9,6.8c0,0.3,0,0.5,0.1,0.8c0,0.1,0,0.2,0.1,0.4s0.1,0.2,0.1,0.3c0,0.1,0.1,0.2,0.2,0.2c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0,0.1,0C10.9,8.6,11.1,8.5,11.2,8.3z", }), o.createElement("path", { fill: "#fc1010", d: "M1.6,17.5c0,0-0.1,0-0.4-0.1c-0.2,0-0.4-0.1-0.4-0.1c-0.1,0-0.2-0.1-0.2-0.2c0-0.2,0.1-0.4,0.3-0.6v0L1,16.4c0.1-0.1,0.2-0.3,0.5-0.6c0.2-0.2,0.4-0.5,0.7-0.9c0-0.1,0.1-0.1,0.1-0.2s0.1-0.1,0.1-0.2c0.1-0.1,0.2-0.3,0.3-0.6c0-0.1,0.1-0.2,0.1-0.3C3,13.5,3,13.4,3,13.3c0-0.2-0.1-0.4-0.2-0.5c-0.1-0.1-0.4-0.1-0.7-0.1c-0.2,0-0.4,0-0.6,0.1c-0.1,0-0.4,0.1-0.7,0.3c0,0,0,0,0,0c0,0,0-0.1,0-0.1c0-0.2,0-0.4-0.1-0.8l0-0.6l0-0.3l0-0.2v-0.1l0.5-0.2c0.4-0.1,0.9-0.2,1.3-0.3c0.5-0.1,0.9-0.1,1.4-0.1c0.4,0,0.8,0,1.1,0.1c0.4,0.1,0.7,0.2,0.9,0.4c0.6,0.4,0.9,1,0.9,1.8c0,0.4-0.1,0.8-0.4,1.2c-0.3,0.4-0.7,0.8-1.3,1.2h0.5h0.5c0.2,0,0.4,0,0.5,0c0.2,0.1,0.3,0.1,0.3,0.3c0,0.2,0,0.5,0,0.8v0.3v0.3c0,0.2,0,0.4-0.1,0.5c-0.1,0.1-0.3,0.2-0.5,0.2c0,0-0.1,0-0.2,0c-0.1,0-0.4,0-0.9,0H4H3.6H3.1H2.6C1.9,17.5,1.6,17.5,1.6,17.5z" }), o.createElement("path", { fill: "#fc1010", d: "M9.8,17.7c-0.1,0-0.2,0-0.3,0l-0.6-0.1c0,0-0.1,0-0.1-0.1c0,0-0.1,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0-0.1c-0.1,0-0.2-0.1-0.3-0.1c-0.1,0-0.2-0.1-0.3-0.1L7.8,17c-0.1,0-0.1-0.1-0.2-0.1c-0.2-0.2-0.4-0.5-0.5-0.9C7,15.7,6.9,15.4,6.9,15c0-0.2,0-0.6,0-0.9c0-0.5,0-0.8,0.1-1.1c0-0.3,0.1-0.7,0.3-1.1c0.1,0,0.1-0.2,0.3-0.5c0,0,0.1-0.1,0.1-0.1s0-0.1,0.1-0.1c0,0,0,0,0-0.1s0-0.1,0.1-0.1c0.1,0,0.2-0.1,0.3-0.2c0,0,0.1-0.1,0.2-0.1c0.1-0.1,0.1-0.1,0.2-0.1c0.2-0.1,0.5-0.2,0.8-0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.2,0c0.1,0,0.2,0,0.3,0c0.1,0,0.1,0,0.2,0c0.5,0,0.9,0,1.3,0.1c0.3,0,0.7,0.1,1.1,0.2c0,0,0.1,0,0.1,0c0.3,0.1,0.5,0.2,0.6,0.2c0.1,0,0.1,0.1,0.1,0.1v0.1c0.1,0,0.2,0,0.3,0.1s0.2,0.2,0.3,0.3c0.1,0.1,0.2,0.2,0.2,0.4c0,0.1,0.1,0.2,0.1,0.3c0.1,0,0.1,0,0.1,0s0,0,0,0.1c0,0.2,0.1,0.4,0.1,0.5c0,0.1,0,0.1,0.1,0.2c0,0.1,0,0.2,0.1,0.3l0,0.1l0,0.4v0.3c0,0.6,0,1.1-0.1,1.4c-0.1,0.5-0.3,0.9-0.7,1.2c-0.1,0.1-0.3,0.2-0.4,0.3l-0.4,0.3c-0.2,0.1-0.4,0.1-0.5,0.2l-0.5,0.2c-0.3,0-0.6,0-0.9,0.1c-0.3,0-0.6,0.1-0.9,0.1C9.9,17.7,9.9,17.7,9.8,17.7z M11.2,15.7c0-0.1,0.1-0.2,0.1-0.3c0-0.1,0-0.2,0-0.2l0-0.3c0-0.2,0-0.5,0-0.7c0-0.1,0-0.2,0-0.3c0-0.2,0-0.4-0.1-0.6c0-0.2-0.1-0.3-0.1-0.5c0-0.2-0.1-0.3-0.1-0.3c0-0.1,0-0.3-0.1-0.3C10.9,12,10.8,12,10.7,12c-0.2,0-0.4,0.1-0.5,0.4c0,0.1-0.1,0.2-0.1,0.3c0,0,0,0.2,0,0.3L10,13.6c-0.1,0.2-0.1,0.4-0.1,0.6c0,0.3,0,0.5,0.1,0.8c0,0.1,0,0.2,0.1,0.4s0.1,0.2,0.1,0.3c0,0.1,0.1,0.2,0.2,0.2c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0,0.1,0C10.9,16,11.1,15.9,11.2,15.7z", }), ), ]; class F extends h { constructor(e) { super(e), (this.m_x = m.LO(0, 70) + "%"), (this.m_y = m.LO(0, 70) + "%"), (this.m_nRotate = Math.floor(90 * Math.random()) - 45), (this.m_splatRots = [360 * Math.random(), 360 * Math.random(), 360 * Math.random()]), (this.m_nPathAnimation = m.LO(1, 6)), (this.m_nKeyID = F.sm_nUnique++), (this.m_strSaleId = "winter2019"); } fragment(e, ...t) { let n = t.map((e) => l()[e]); return n.push(l().snowball_fragment), o.createElement("img", { src: this.getAsset(e), className: n.join(" ") }); } Snowball(e, t, ...n) { let i = e < 0 ? l().SnowballImageCW : l().SnowballImageCCW; e > -5 && e < 5 && (i = ""); let r = n.map((e) => l()[e]); return r.push(l().snowball_fragment), o.createElement("div", { style: { display: "inline-block" }, className: r.join(" ") }, o.createElement("img", { style: { transform: "rotation( 360deg )" }, className: `${l().SnowballImage} ${i}`, src: this.getAsset(t) })); } residue() { return o.createElement(o.Fragment, null, o.createElement("div", { style: { transform: `rotate(${this.m_splatRots[0]}deg)` } }, this.fragment("splat1.png", "snowball-residue")), o.createElement("div", { style: { transform: `rotate(${this.m_splatRots[1]}deg)` } }, this.fragment("splat2.png", "snowball-residue")), o.createElement("div", { style: { transform: `rotate(${this.m_splatRots[2]}deg)` } }, this.fragment("splat3.png", "snowball-residue"))); } render() { let e = `snowball-path-${this.m_nPathAnimation}`, t = { animationName: l()[e] }; return o.createElement(o.Fragment, { key: `${this.m_nKeyID}` }, o.createElement("div", { className: l()["snowball-path"], style: t }, o.createElement("div", { className: l()["snowball-container"], style: { left: this.m_x, top: this.m_y, transform: `rotate( ${this.m_nRotate}deg )` } }, this.Snowball(this.m_nRotate, "snowball.png", "snowball"), this.fragment("slide-out-tl.png", "slide-out-tl"), this.fragment("slide-out-tr.png", "slide-out-tr"), this.fragment("slide-out-bottom.png", "slide-out-bottom"), this.residue(), this.fragment("snowball_1.png", "snowball-chunk", "snowball-chunk-1"), this.fragment("snowball_2.png", "snowball-chunk", "snowball-chunk-2"), this.fragment("snowball_3.png", "snowball-chunk", "snowball-chunk-3"), this.fragment("snowball_4.png", "snowball-chunk", "snowball-chunk-4")))); } } F.sm_nUnique = 0; var B = n(9824); function x(e) { const t = e.data, n = d(e.sale, e.effect.name, `${t.strImage}.png`); let i = null; if (t.SOverlay) { const n = t.SOverlay ? d(e.sale, e.effect.name, `${t.SOverlay.strImage}.png`) : null, r = { animationDuration: `${t.SOverlay.nDuration}s` }; i = o.createElement("img", { src: n, className: l()[t.SOverlay.strClass], style: r }); } let r = { animationDuration: `${t.nDuration}s`, animationName: l()[t.strAnimation], marginLeft: `${t.nOffset}%` }; return o.createElement("div", { style: r, className: l().balloons }, o.createElement("img", { src: n, style: { maxWidth: "100%", position: "absolute" } }), i); } class N extends h { constructor(e) { if ((super(e), (this.m_rgBalloons = []), (this.m_nNextImage = 0), "lny2020" === e.sale)) this.m_rgImages = ["orange", "peach", "yellow"]; else this.m_rgImages = ["balloon_blue", "balloon_cyan", "balloon_green", "balloon_purple", "balloon_red", "balloon_yellow"]; B.LQ(this.m_rgImages), this.GenerateBalloons(); } GetNextImage() { let e = this.m_rgImages[this.m_nNextImage % this.m_rgImages.length]; return this.m_nNextImage++, e; } GenerateDuration() { return parseFloat(l().balloonsDurationS) + parseFloat(l().balloonsDurationJitterS) * Math.random(); } GenerateBalloons() { let e = ["balloon_small_1", "balloon_small_2", "balloon_small_3"], t = ["balloon_big_1", "balloon_big_2"]; this.m_rgBalloons = []; for (let t of e) { let e = m.LO(-10, 10); this.m_rgBalloons.push(this.GenerateSingleBalloon(t, e)); } let n = [70, 20]; B.LQ(n); let i = 20 == n[1]; for (let e of t) { let t = m.LO(-10, 10) + n.pop(); this.m_rgBalloons.push(this.GenerateSingleBalloon(e, t)); } let o = ["balloon_move_left", "balloon_move_right"][m.LO(0, 1)]; i && (o = "balloon_move_left"); let r = m.LO(-10, 10); this.m_rgBalloons.push(this.GenerateSingleBalloon(o, r)); } GenerateSingleBalloon(e, t) { const n = this.GetNextImage(); let i = { strAnimation: e, strImage: n, nDuration: this.GenerateDuration(), nOffset: t }; return "lny2020" == this.props.sale && (i.SOverlay = { strImage: n + "-glow", strClass: "lantern_glow", nDuration: 1 + 4 * Math.random() }), i; } render() { return o.createElement( o.Fragment, null, this.m_rgBalloons.map((e, t) => o.createElement(x, { key: `${t}`, data: e, effect: this.props.effect, sale: this.m_strSaleId })), ); } } var P = n(87018); class U { constructor(e) { this.m_seed = e; } next() { const e = 1e3 * Math.sin(this.m_seed++); return e - Math.floor(e); } } function V(e) { const t = new U(e); let n = 0.8 * t.next() + 0.5; const i = 10 * (t.next() + e) + 10 + "px", r = { opacity: n, width: i, height: i, margin: 30 * t.next() + 15 + "px", filter: `hue-rotate(${90 * t.next() - 30}deg) saturate(100%)` }, a = 1 + Math.floor(5 * t.next()), s = c.De.COMMUNITY_CDN_ASSET_URL + `winter2019/roomeffects/96px/flake_${a}.png`; return o.createElement("img", { style: r, src: s }); } const H = parseInt(l().balloonsDurationMaxMs), W = parseInt(l().snowballDurationMs); function X(e, t) { return () => { const n = c.De.COMMUNITY_CDN_ASSET_URL + t + "/roomeffects/96px/" + e + ".png"; return o.createElement("img", { style: { width: "100%" }, src: n }); }; } function j(e, t, n, i) { return { timeout: n, renderButton: X(e, t), renderEffectIcon: X(e, t), buttonToken: "#ChatEntryButton_Send" + r.Xf(e), locToken: "#ChatRoom_RoomEffect" + r.Xf(e), render: i }; } function z(e, t, n) { return j(e, "winter2019", t, n); } const K = { lny2020_lanterns: j("lny2020_lanterns", "lny2020", H, (e) => o.createElement(N, { effect: e, sale: "lny2020" })), lny2020_firework: j("lny2020_firework", "lny2020", 7e3, () => o.createElement(_, { sale: "lny2020" })), lny2020_confetti: j("lny2020_confetti", "lny2020", S, () => o.createElement(R, { eType: b.LNY2020 })), snowball: z("snowball", W, (e) => o.createElement(F, { effect: e, sale: "winter2019" })), balloons: z("balloons", H, (e) => o.createElement(N, { effect: e, sale: "winter2019" })), confetti: z("confetti", S, () => o.createElement(R, { eType: b.Default })), goldfetti: z("goldfetti", S, () => o.createElement(R, { eType: b.Gold })), firework: z("firework", 7e3, () => o.createElement(_, { sale: "winter2019" })), snow: z("snow", 1e4, function (e) { const t = [], n = new U(e.timestamp); for (let i = 0; i < 150; i++) { const r = n.next(), a = { left: 100 * n.next() + "%", animationDuration: 3 * (1 - r) + 4 + "s", animationDelay: `${r + 4 * n.next()}s` }; t.push(o.createElement("div", { key: e.timestamp + "_" + i, style: a, className: (0, P.Z)(l().Snowflake, l()["Snowflake-" + (i % 20)]) }, V(r), V(r + 1))); } return o.createElement(o.Fragment, null, " ", t, " "); }), }; let q = class extends o.Component { render() { return o.createElement( "div", { className: l()["animation-container"] }, this.props.effectManager.m_rgRunningEffects.map((e) => o.createElement(o.Fragment, { key: e.timestamp }, e.render())), ); } }; q = (0, i.gn)([a.Pi], q); }, 10553: (e, t, n) => { "use strict"; n.d(t, { De: () => a.De, E_: () => c, Ek: () => l.Ek, JA: () => a.JA, Kc: () => S, L7: () => a.L7, Me: () => p, S$: () => f, Tl: () => l.Tl, Uy: () => _, Zv: () => b, dk: () => a.dk, eG: () => g, fI: () => d, h4: () => u, id: () => h, ip: () => l.ip, kQ: () => l.kQ, qt: () => m, wg: () => C, y9: () => l.y9 }); var i = n(27378), o = n(11612), r = n(93635), a = n(57117), s = n(39689), l = n(69261); const c = i.createContext({}), m = (e) => { const t = i.useContext(c); return (0, r.X)((null == e ? void 0 : e.bSuppressAssert) || void 0 !== t.IN_GAMEPADUI, "Trying to use ConfigContext without a provider! Add ConfigContextRoot to application."), t; }; function d(e) { var t; const { IN_GAMEPADUI: n, IN_DESKTOPUI: o, IN_VR: r, children: l } = e, d = m({ bSuppressAssert: !0 }), h = null === (t = (0, s.g3)()) || void 0 === t ? void 0 : t.startsWith("Gamepad VR"), u = i.useMemo(() => { var e, t, i; return { IN_GAMEPADUI: null !== (e = null != n ? n : null == d ? void 0 : d.IN_GAMEPADUI) && void 0 !== e ? e : a.De.IN_GAMEPADUI, IN_DESKTOPUI: null !== (t = null != o ? o : null == d ? void 0 : d.IN_DESKTOPUI) && void 0 !== t && t, IN_VR: null !== (i = null != r ? r : null == d ? void 0 : d.IN_VR) && void 0 !== i ? i : h }; }, [d, n, o, r, h]); return i.createElement(c.Provider, { value: u }, l); } function h(e) { const t = m(e); return null == t ? void 0 : t.IN_GAMEPADUI; } function u() { return a.De.EREALM === o.IN.k_ESteamRealmChina; } function p() { return "windows" == a.De.PLATFORM; } function _() { return "macos" == a.De.PLATFORM; } function g() { return "linux" == a.De.PLATFORM; } function C() { return a.De.IN_CHROMEOS; } function f() { return a.De.ON_STEAMOS; } function v(e, t) { return 0 != t.length && e.startsWith(t); } function S() { if (!window || !window.location || !window.location.href) return console.warn("Unable to determine base url!"), "unknown"; const e = window.location.href; return v(e, a.De.STORE_BASE_URL) ? a.De.STORE_BASE_URL : v(e, a.De.COMMUNITY_BASE_URL) ? a.De.COMMUNITY_BASE_URL : v(e, a.De.CHAT_BASE_URL) ? a.De.CHAT_BASE_URL : v(e, a.De.PARTNER_BASE_URL) ? a.De.PARTNER_BASE_URL : v(e, a.De.HELP_BASE_URL) ? a.De.HELP_BASE_URL : v(e, a.De.STEAMTV_BASE_URL) ? a.De.STEAMTV_BASE_URL : v(e, a.De.STATS_BASE_URL) ? a.De.STATS_BASE_URL : v(e, a.De.INTERNAL_STATS_BASE_URL) ? a.De.INTERNAL_STATS_BASE_URL : v(e, a.De.STORE_CHECKOUT_BASE_URL) ? a.De.STORE_CHECKOUT_BASE_URL : v(e, "https://steamloopback.host") ? "https://steamloopback.host" : ""; } function b() { const e = window.location.href; return v(e, a.De.STORE_BASE_URL) || v(e, a.De.STORE_CHECKOUT_BASE_URL) ? "store" : v(e, a.De.COMMUNITY_BASE_URL) ? "community" : v(e, a.De.PARTNER_BASE_URL) ? "partnerweb" : v(e, a.De.HELP_BASE_URL) ? "help" : v(e, a.De.STEAMTV_BASE_URL) ? "steamtv" : v(e, a.De.STATS_BASE_URL) || v(e, a.De.INTERNAL_STATS_BASE_URL) ? "stats" : ""; } }, 57117: (e, t, n) => { "use strict"; n.d(t, { De: () => o, JA: () => s, L7: () => r, Wj: () => l, dk: () => a }); var i = n(69261); const o = { EUNIVERSE: 0, WEB_UNIVERSE: "", LANGUAGE: "english", SUPPORTED_LANGUAGES: [], COUNTRY: "", AVATAR_BASE_URL: "", MEDIA_CDN_COMMUNITY_URL: "", MEDIA_CDN_URL: "", CLAN_CDN_ASSET_URL: "", COMMUNITY_CDN_URL: "", COMMUNITY_CDN_ASSET_URL: "", BASE_URL_SHARED_CDN: "", STORE_CDN_URL: "", PUBLIC_SHARED_URL: "", COMMUNITY_BASE_URL: "", CHAT_BASE_URL: "", STORE_BASE_URL: "", STORE_CHECKOUT_BASE_URL: "", LOGIN_BASE_URL: "", SUPPORT_BASE_URL: "", STORE_ICON_BASE_URL: "", IMG_URL: "", STEAMTV_BASE_URL: "", HELP_BASE_URL: "", PARTNER_BASE_URL: "", STATS_BASE_URL: "", INTERNAL_STATS_BASE_URL: "", BASE_URL_STORE_CDN_ASSETS: "", IN_CLIENT: !1, USE_POPUPS: !1, IN_MOBILE: !1, IN_MOBILE_WEBVIEW: !1, IN_TENFOOT: !1, PLATFORM: "", SNR: "", LAUNCHER_TYPE: 0, EREALM: 0, IN_CHROMEOS: !1, TESLA: !1, LOCAL_HOSTNAME: "", WEBAPI_BASE_URL: "", TOKEN_URL: "", BUILD_TIMESTAMP: 0, PAGE_TIMESTAMP: 0, FROM_WEB: !1, WEBSITE_ID: "Unknown", get SESSIONID() { return (0, i.c9)(); }, FRIENDSUI_BETA: !1, STEAM_TV: !1, DEV_MODE: !1, IN_STEAMUI: !1, IN_GAMEPADUI: !1, IN_STEAMUI_SHARED_CONTEXT: !1, DECK_DISPLAY_MODE: !1, ON_DECK: !1, ON_STEAMOS: !1, IN_GAMESCOPE: !1, IN_LOGIN: !1, IN_LOGIN_REFRESH: !1, USE_LONGEST_LOC_STRING: !1, SILENT_STARTUP: !1, }; const r = { logged_in: !1, steamid: "", accountid: 0, account_name: "", token: void 0, token_use_id: void 0, webapi_token: "", authwgtoken: "", is_support: !1, is_limited: !1, is_partner_member: !1, short_url: "", country_code: "" }, a = { steamid: "", clanid: 0, listid: 0 }, s = { CLANSTEAMID: "", CLANACCOUNTID: 0, APPID: 0, VANITY_ID: "", IS_CREATOR_HOME: !1, IS_CURATOR: !1, IS_OGG: !1, CAN_UPLOAD_IMAGES: !1, IS_VALVE_GROUP: !1, IS_ALLOWED_SC: !1 }, l = { ANNOUNCEMENT_GID: "", TAKEOVER_ANNOUNCEMENT_GID: "" }; }, 69261: (e, t, n) => { "use strict"; n.d(t, { Ek: () => m, Tl: () => c, c9: () => l, ip: () => h, kQ: () => d, y9: () => _ }); var i = n(59702), o = n(99115), r = n(57117); const a = "webui_config"; let s; function l() { if (!(0, o.t$)()) return s || (s = c()), s; let e = (0, o.bG)("sessionid"); return e || (e = c()), e; } function c() { const e = (function () { let e = ""; for (let t = 0; t < 24; t++) e += (0, i.LO)(0, 35).toString(36); return e; })(); return (0, o.I1)("sessionid", e, 0), e; } function m(e = a) { const t = {}, n = d("config", e); n && (delete n.SESSIONID, Object.assign(r.De, n), (t.config = !0)); const i = d("userinfo", e); i && (Object.assign(r.L7, i), (t.userConfig = !0), r.L7.is_support && _() && (r.L7.is_support = !1)); const o = d("broadcast", e); o && (Object.assign(r.dk, o), (t.broadcastConfig = !0)); const s = d("community", e); s && (Object.assign(r.JA, s), (t.communityConfig = !0)); const l = d("event", e); return l && (Object.assign(r.Wj, l), (t.eventConfig = !0)), t; } function d(e, t = a) { return u(e, t, !0); } function h(e, t = a) { return u(e, t, !1); } function u(e, t = a, n) { let i; if (((i = "string" == typeof t ? ({ NODE_ENV: "production", STEAM_BUILD: "buildbot", VALVE_BUILD: "false" }.MOBILE_BUILD ? null : document.getElementById(t)) : t), i)) try { if (i.hasAttribute("data-" + e)) { return JSON.parse(i.getAttribute("data-" + e)); } return null; } catch (e) { console.error("Failed to parse config for " + r.L7.steamid + " (" + window.location.href + ")", e); } else n && console.error("Missing config element #", t); } const p = "presentation_mode"; function _() { let e = null; return (0, o.t$)() && (e = (0, o.bG)(p)), Boolean(e && 1 === Number.parseInt(e)); } }, 46361: (e, t, n) => { "use strict"; "VALVE_PUBLIC_PATH" in window ? (n.p = window.VALVE_PUBLIC_PATH) : console.error("VALVE_PUBLIC_PATH not defined; check for a call to CHTMLHelpers::WebpackConfigScriptlet"), 123 !== Array.from(new Set([123]))[0] && console.error("Should not include prototypejs."); }, 39689: (e, t, n) => { "use strict"; n.d(t, { g3: () => i }); function i() { if (!(null === navigator || void 0 === navigator ? void 0 : navigator.userAgent)) return; const e = navigator.userAgent.match(/Valve Steam ([^\/]*)\//); return e && 2 == e.length ? e[1] : void 0; } }, 59087: (e, t, n) => { "use strict"; var i; n.d(t, { Z: () => T }); function o(e, t, n) { null != e && ("number" == typeof e ? this.fromNumber(e, t, n) : null == t && "string" != typeof e ? this.fromString(e, 256) : this.fromString(e, t)); } function r() { return new o(null); } "Microsoft Internet Explorer" == navigator.appName ? ((o.prototype.am = function (e, t, n, i, o, r) { for (var a = 32767 & t, s = t >> 15; --r >= 0; ) { var l = 32767 & this[e], c = this[e++] >> 15, m = s * l + c * a; (o = ((l = a * l + ((32767 & m) << 15) + n[i] + (1073741823 & o)) >>> 30) + (m >>> 15) + s * c + (o >>> 30)), (n[i++] = 1073741823 & l); } return o; }), (i = 30)) : "Netscape" != navigator.appName ? ((o.prototype.am = function (e, t, n, i, o, r) { for (; --r >= 0; ) { var a = t * this[e++] + n[i] + o; (o = Math.floor(a / 67108864)), (n[i++] = 67108863 & a); } return o; }), (i = 26)) : ((o.prototype.am = function (e, t, n, i, o, r) { for (var a = 16383 & t, s = t >> 14; --r >= 0; ) { var l = 16383 & this[e], c = this[e++] >> 14, m = s * l + c * a; (o = ((l = a * l + ((16383 & m) << 14) + n[i] + o) >> 28) + (m >> 14) + s * c), (n[i++] = 268435455 & l); } return o; }), (i = 28)), (o.prototype.DB = i), (o.prototype.DM = (1 << i) - 1), (o.prototype.DV = 1 << i); (o.prototype.FV = Math.pow(2, 52)), (o.prototype.F1 = 52 - i), (o.prototype.F2 = 2 * i - 52); var a, s, l = "0123456789abcdefghijklmnopqrstuvwxyz", c = new Array(); for (a = "0".charCodeAt(0), s = 0; s <= 9; ++s) c[a++] = s; for (a = "a".charCodeAt(0), s = 10; s < 36; ++s) c[a++] = s; for (a = "A".charCodeAt(0), s = 10; s < 36; ++s) c[a++] = s; function m(e) { return l.charAt(e); } function d(e, t) { var n = c[e.charCodeAt(t)]; return null == n ? -1 : n; } function h(e) { var t = r(); return t.fromInt(e), t; } function u(e) { var t, n = 1; return 0 != (t = e >>> 16) && ((e = t), (n += 16)), 0 != (t = e >> 8) && ((e = t), (n += 8)), 0 != (t = e >> 4) && ((e = t), (n += 4)), 0 != (t = e >> 2) && ((e = t), (n += 2)), 0 != (t = e >> 1) && ((e = t), (n += 1)), n; } function p(e) { this.m = e; } function _(e) { (this.m = e), (this.mp = e.invDigit()), (this.mpl = 32767 & this.mp), (this.mph = this.mp >> 15), (this.um = (1 << (e.DB - 15)) - 1), (this.mt2 = 2 * e.t); } function g(e, t) { return e & t; } function C(e, t) { return e | t; } function f(e, t) { return e ^ t; } function v(e, t) { return e & ~t; } function S(e) { if (0 == e) return -1; var t = 0; return 0 == (65535 & e) && ((e >>= 16), (t += 16)), 0 == (255 & e) && ((e >>= 8), (t += 8)), 0 == (15 & e) && ((e >>= 4), (t += 4)), 0 == (3 & e) && ((e >>= 2), (t += 2)), 0 == (1 & e) && ++t, t; } function b(e) { for (var t = 0; 0 != e; ) (e &= e - 1), ++t; return t; } function I() {} function y(e) { return e; } function E(e) { (this.r2 = r()), (this.q3 = r()), o.ONE.dlShiftTo(2 * e.t, this.r2), (this.mu = this.r2.divide(e)), (this.m = e); } (p.prototype.convert = function (e) { return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e; }), (p.prototype.revert = function (e) { return e; }), (p.prototype.reduce = function (e) { e.divRemTo(this.m, null, e); }), (p.prototype.mulTo = function (e, t, n) { e.multiplyTo(t, n), this.reduce(n); }), (p.prototype.sqrTo = function (e, t) { e.squareTo(t), this.reduce(t); }), (_.prototype.convert = function (e) { var t = r(); return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(o.ZERO) > 0 && this.m.subTo(t, t), t; }), (_.prototype.revert = function (e) { var t = r(); return e.copyTo(t), this.reduce(t), t; }), (_.prototype.reduce = function (e) { for (; e.t <= this.mt2; ) e[e.t++] = 0; for (var t = 0; t < this.m.t; ++t) { var n = 32767 & e[t], i = (n * this.mpl + (((n * this.mph + (e[t] >> 15) * this.mpl) & this.um) << 15)) & e.DM; for (e[(n = t + this.m.t)] += this.m.am(0, i, e, t, 0, this.m.t); e[n] >= e.DV; ) (e[n] -= e.DV), e[++n]++; } e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e); }), (_.prototype.mulTo = function (e, t, n) { e.multiplyTo(t, n), this.reduce(n); }), (_.prototype.sqrTo = function (e, t) { e.squareTo(t), this.reduce(t); }), (o.prototype.copyTo = function (e) { for (var t = this.t - 1; t >= 0; --t) e[t] = this[t]; (e.t = this.t), (e.s = this.s); }), (o.prototype.fromInt = function (e) { (this.t = 1), (this.s = e < 0 ? -1 : 0), e > 0 ? (this[0] = e) : e < -1 ? (this[0] = e + DV) : (this.t = 0); }), (o.prototype.fromString = function (e, t) { var n; if (16 == t) n = 4; else if (8 == t) n = 3; else if (256 == t) n = 8; else if (2 == t) n = 1; else if (32 == t) n = 5; else { if (4 != t) return void this.fromRadix(e, t); n = 2; } (this.t = 0), (this.s = 0); for (var i = e.length, r = !1, a = 0; --i >= 0; ) { var s = 8 == n ? 255 & e[i] : d(e, i); s < 0 ? "-" == e.charAt(i) && (r = !0) : ((r = !1), 0 == a ? (this[this.t++] = s) : a + n > this.DB ? ((this[this.t - 1] |= (s & ((1 << (this.DB - a)) - 1)) << a), (this[this.t++] = s >> (this.DB - a))) : (this[this.t - 1] |= s << a), (a += n) >= this.DB && (a -= this.DB)); } 8 == n && 0 != (128 & e[0]) && ((this.s = -1), a > 0 && (this[this.t - 1] |= ((1 << (this.DB - a)) - 1) << a)), this.clamp(), r && o.ZERO.subTo(this, this); }), (o.prototype.clamp = function () { for (var e = this.s & this.DM; this.t > 0 && this[this.t - 1] == e; ) --this.t; }), (o.prototype.dlShiftTo = function (e, t) { var n; for (n = this.t - 1; n >= 0; --n) t[n + e] = this[n]; for (n = e - 1; n >= 0; --n) t[n] = 0; (t.t = this.t + e), (t.s = this.s); }), (o.prototype.drShiftTo = function (e, t) { for (var n = e; n < this.t; ++n) t[n - e] = this[n]; (t.t = Math.max(this.t - e, 0)), (t.s = this.s); }), (o.prototype.lShiftTo = function (e, t) { var n, i = e % this.DB, o = this.DB - i, r = (1 << o) - 1, a = Math.floor(e / this.DB), s = (this.s << i) & this.DM; for (n = this.t - 1; n >= 0; --n) (t[n + a + 1] = (this[n] >> o) | s), (s = (this[n] & r) << i); for (n = a - 1; n >= 0; --n) t[n] = 0; (t[a] = s), (t.t = this.t + a + 1), (t.s = this.s), t.clamp(); }), (o.prototype.rShiftTo = function (e, t) { t.s = this.s; var n = Math.floor(e / this.DB); if (n >= this.t) t.t = 0; else { var i = e % this.DB, o = this.DB - i, r = (1 << i) - 1; t[0] = this[n] >> i; for (var a = n + 1; a < this.t; ++a) (t[a - n - 1] |= (this[a] & r) << o), (t[a - n] = this[a] >> i); i > 0 && (t[this.t - n - 1] |= (this.s & r) << o), (t.t = this.t - n), t.clamp(); } }), (o.prototype.subTo = function (e, t) { for (var n = 0, i = 0, o = Math.min(e.t, this.t); n < o; ) (i += this[n] - e[n]), (t[n++] = i & this.DM), (i >>= this.DB); if (e.t < this.t) { for (i -= e.s; n < this.t; ) (i += this[n]), (t[n++] = i & this.DM), (i >>= this.DB); i += this.s; } else { for (i += this.s; n < e.t; ) (i -= e[n]), (t[n++] = i & this.DM), (i >>= this.DB); i -= e.s; } (t.s = i < 0 ? -1 : 0), i < -1 ? (t[n++] = this.DV + i) : i > 0 && (t[n++] = i), (t.t = n), t.clamp(); }), (o.prototype.multiplyTo = function (e, t) { var n = this.abs(), i = e.abs(), r = n.t; for (t.t = r + i.t; --r >= 0; ) t[r] = 0; for (r = 0; r < i.t; ++r) t[r + n.t] = n.am(0, i[r], t, r, 0, n.t); (t.s = 0), t.clamp(), this.s != e.s && o.ZERO.subTo(t, t); }), (o.prototype.squareTo = function (e) { for (var t = this.abs(), n = (e.t = 2 * t.t); --n >= 0; ) e[n] = 0; for (n = 0; n < t.t - 1; ++n) { var i = t.am(n, t[n], e, 2 * n, 0, 1); (e[n + t.t] += t.am(n + 1, 2 * t[n], e, 2 * n + 1, i, t.t - n - 1)) >= t.DV && ((e[n + t.t] -= t.DV), (e[n + t.t + 1] = 1)); } e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)), (e.s = 0), e.clamp(); }), (o.prototype.divRemTo = function (e, t, n) { var i = e.abs(); if (!(i.t <= 0)) { var a = this.abs(); if (a.t < i.t) return null != t && t.fromInt(0), void (null != n && this.copyTo(n)); null == n && (n = r()); var s = r(), l = this.s, c = e.s, m = this.DB - u(i[i.t - 1]); m > 0 ? (i.lShiftTo(m, s), a.lShiftTo(m, n)) : (i.copyTo(s), a.copyTo(n)); var d = s.t, h = s[d - 1]; if (0 != h) { var p = h * (1 << this.F1) + (d > 1 ? s[d - 2] >> this.F2 : 0), _ = this.FV / p, g = (1 << this.F1) / p, C = 1 << this.F2, f = n.t, v = f - d, S = null == t ? r() : t; for (s.dlShiftTo(v, S), n.compareTo(S) >= 0 && ((n[n.t++] = 1), n.subTo(S, n)), o.ONE.dlShiftTo(d, S), S.subTo(s, s); s.t < d; ) s[s.t++] = 0; for (; --v >= 0; ) { var b = n[--f] == h ? this.DM : Math.floor(n[f] * _ + (n[f - 1] + C) * g); if ((n[f] += s.am(0, b, n, v, 0, d)) < b) for (s.dlShiftTo(v, S), n.subTo(S, n); n[f] < --b; ) n.subTo(S, n); } null != t && (n.drShiftTo(d, t), l != c && o.ZERO.subTo(t, t)), (n.t = d), n.clamp(), m > 0 && n.rShiftTo(m, n), l < 0 && o.ZERO.subTo(n, n); } } }), (o.prototype.invDigit = function () { if (this.t < 1) return 0; var e = this[0]; if (0 == (1 & e)) return 0; var t = 3 & e; return (t = ((t = ((t = ((t = (t * (2 - (15 & e) * t)) & 15) * (2 - (255 & e) * t)) & 255) * (2 - (((65535 & e) * t) & 65535))) & 65535) * (2 - ((e * t) % this.DV))) % this.DV) > 0 ? this.DV - t : -t; }), (o.prototype.isEven = function () { return 0 == (this.t > 0 ? 1 & this[0] : this.s); }), (o.prototype.exp = function (e, t) { if (e > 4294967295 || e < 1) return o.ONE; var n = r(), i = r(), a = t.convert(this), s = u(e) - 1; for (a.copyTo(n); --s >= 0; ) if ((t.sqrTo(n, i), (e & (1 << s)) > 0)) t.mulTo(i, a, n); else { var l = n; (n = i), (i = l); } return t.revert(n); }), (o.prototype.toString = function (e) { if (this.s < 0) return "-" + this.negate().toString(e); var t; if (16 == e) t = 4; else if (8 == e) t = 3; else if (2 == e) t = 1; else if (32 == e) t = 5; else { if (4 != e) return this.toRadix(e); t = 2; } var n, i = (1 << t) - 1, o = !1, r = "", a = this.t, s = this.DB - ((a * this.DB) % t); if (a-- > 0) for (s < this.DB && (n = this[a] >> s) > 0 && ((o = !0), (r = m(n))); a >= 0; ) s < t ? ((n = (this[a] & ((1 << s) - 1)) << (t - s)), (n |= this[--a] >> (s += this.DB - t))) : ((n = (this[a] >> (s -= t)) & i), s <= 0 && ((s += this.DB), --a)), n > 0 && (o = !0), o && (r += m(n)); return o ? r : "0"; }), (o.prototype.negate = function () { var e = r(); return o.ZERO.subTo(this, e), e; }), (o.prototype.abs = function () { return this.s < 0 ? this.negate() : this; }), (o.prototype.compareTo = function (e) { var t = this.s - e.s; if (0 != t) return t; var n = this.t; if (0 != (t = n - e.t)) return t; for (; --n >= 0; ) if (0 != (t = this[n] - e[n])) return t; return 0; }), (o.prototype.bitLength = function () { return this.t <= 0 ? 0 : this.DB * (this.t - 1) + u(this[this.t - 1] ^ (this.s & this.DM)); }), (o.prototype.mod = function (e) { var t = r(); return this.abs().divRemTo(e, null, t), this.s < 0 && t.compareTo(o.ZERO) > 0 && e.subTo(t, t), t; }), (o.prototype.modPowInt = function (e, t) { var n; return (n = e < 256 || t.isEven() ? new p(t) : new _(t)), this.exp(e, n); }), (o.ZERO = h(0)), (o.ONE = h(1)), (I.prototype.convert = y), (I.prototype.revert = y), (I.prototype.mulTo = function (e, t, n) { e.multiplyTo(t, n); }), (I.prototype.sqrTo = function (e, t) { e.squareTo(t); }), (E.prototype.convert = function (e) { if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m); if (e.compareTo(this.m) < 0) return e; var t = r(); return e.copyTo(t), this.reduce(t), t; }), (E.prototype.revert = function (e) { return e; }), (E.prototype.reduce = function (e) { for (e.drShiftTo(this.m.t - 1, this.r2), e.t > this.m.t + 1 && ((e.t = this.m.t + 1), e.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0; ) e.dAddOffset(1, this.m.t + 1); for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0; ) e.subTo(this.m, e); }), (E.prototype.mulTo = function (e, t, n) { e.multiplyTo(t, n), this.reduce(n); }), (E.prototype.sqrTo = function (e, t) { e.squareTo(t), this.reduce(t); }); var D = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509], w = (1 << 26) / D[D.length - 1]; (o.prototype.chunkSize = function (e) { return Math.floor((Math.LN2 * this.DB) / Math.log(e)); }), (o.prototype.toRadix = function (e) { if ((null == e && (e = 10), 0 == this.signum() || e < 2 || e > 36)) return "0"; var t = this.chunkSize(e), n = Math.pow(e, t), i = h(n), o = r(), a = r(), s = ""; for (this.divRemTo(i, o, a); o.signum() > 0; ) (s = (n + a.intValue()).toString(e).substr(1) + s), o.divRemTo(i, o, a); return a.intValue().toString(e) + s; }), (o.prototype.fromRadix = function (e, t) { this.fromInt(0), null == t && (t = 10); for (var n = this.chunkSize(t), i = Math.pow(t, n), r = !1, a = 0, s = 0, l = 0; l < e.length; ++l) { var c = d(e, l); c < 0 ? "-" == e.charAt(l) && 0 == this.signum() && (r = !0) : ((s = t * s + c), ++a >= n && (this.dMultiply(i), this.dAddOffset(s, 0), (a = 0), (s = 0))); } a > 0 && (this.dMultiply(Math.pow(t, a)), this.dAddOffset(s, 0)), r && o.ZERO.subTo(this, this); }), (o.prototype.fromNumber = function (e, t, n) { if ("number" == typeof t) if (e < 2) this.fromInt(1); else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(o.ONE.shiftLeft(e - 1), C, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t); ) this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(o.ONE.shiftLeft(e - 1), this); else { var i = new Array(), r = 7 & e; (i.length = 1 + (e >> 3)), t.nextBytes(i), r > 0 ? (i[0] &= (1 << r) - 1) : (i[0] = 0), this.fromString(i, 256); } }), (o.prototype.bitwiseTo = function (e, t, n) { var i, o, r = Math.min(e.t, this.t); for (i = 0; i < r; ++i) n[i] = t(this[i], e[i]); if (e.t < this.t) { for (o = e.s & this.DM, i = r; i < this.t; ++i) n[i] = t(this[i], o); n.t = this.t; } else { for (o = this.s & this.DM, i = r; i < e.t; ++i) n[i] = t(o, e[i]); n.t = e.t; } (n.s = t(this.s, e.s)), n.clamp(); }), (o.prototype.changeBit = function (e, t) { var n = o.ONE.shiftLeft(e); return this.bitwiseTo(n, t, n), n; }), (o.prototype.addTo = function (e, t) { for (var n = 0, i = 0, o = Math.min(e.t, this.t); n < o; ) (i += this[n] + e[n]), (t[n++] = i & this.DM), (i >>= this.DB); if (e.t < this.t) { for (i += e.s; n < this.t; ) (i += this[n]), (t[n++] = i & this.DM), (i >>= this.DB); i += this.s; } else { for (i += this.s; n < e.t; ) (i += e[n]), (t[n++] = i & this.DM), (i >>= this.DB); i += e.s; } (t.s = i < 0 ? -1 : 0), i > 0 ? (t[n++] = i) : i < -1 && (t[n++] = this.DV + i), (t.t = n), t.clamp(); }), (o.prototype.dMultiply = function (e) { (this[this.t] = this.am(0, e - 1, this, 0, 0, this.t)), ++this.t, this.clamp(); }), (o.prototype.dAddOffset = function (e, t) { for (; this.t <= t; ) this[this.t++] = 0; for (this[t] += e; this[t] >= this.DV; ) (this[t] -= this.DV), ++t >= this.t && (this[this.t++] = 0), ++this[t]; }), (o.prototype.multiplyLowerTo = function (e, t, n) { var i, o = Math.min(this.t + e.t, t); for (n.s = 0, n.t = o; o > 0; ) n[--o] = 0; for (i = n.t - this.t; o < i; ++o) n[o + this.t] = this.am(0, e[o], n, o, 0, this.t); for (i = Math.min(e.t, t); o < i; ++o) this.am(0, e[o], n, o, 0, t - o); n.clamp(); }), (o.prototype.multiplyUpperTo = function (e, t, n) { --t; var i = (n.t = this.t + e.t - t); for (n.s = 0; --i >= 0; ) n[i] = 0; for (i = Math.max(t - this.t, 0); i < e.t; ++i) n[this.t + i - t] = this.am(t - i, e[i], n, 0, 0, this.t + i - t); n.clamp(), n.drShiftTo(1, n); }), (o.prototype.modInt = function (e) { if (e <= 0) return 0; var t = this.DV % e, n = this.s < 0 ? e - 1 : 0; if (this.t > 0) if (0 == t) n = this[0] % e; else for (var i = this.t - 1; i >= 0; --i) n = (t * n + this[i]) % e; return n; }), (o.prototype.millerRabin = function (e) { var t = this.subtract(o.ONE), n = t.getLowestSetBit(); if (n <= 0) return !1; var i = t.shiftRight(n); (e = (e + 1) >> 1) > D.length && (e = D.length); for (var a = r(), s = 0; s < e; ++s) { a.fromInt(D[s]); var l = a.modPow(i, this); if (0 != l.compareTo(o.ONE) && 0 != l.compareTo(t)) { for (var c = 1; c++ < n && 0 != l.compareTo(t); ) if (0 == (l = l.modPowInt(2, this)).compareTo(o.ONE)) return !1; if (0 != l.compareTo(t)) return !1; } } return !0; }), (o.prototype.clone = function () { var e = r(); return this.copyTo(e), e; }), (o.prototype.intValue = function () { if (this.s < 0) { if (1 == this.t) return this[0] - this.DV; if (0 == this.t) return -1; } else { if (1 == this.t) return this[0]; if (0 == this.t) return 0; } return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0]; }), (o.prototype.byteValue = function () { return 0 == this.t ? this.s : (this[0] << 24) >> 24; }), (o.prototype.shortValue = function () { return 0 == this.t ? this.s : (this[0] << 16) >> 16; }), (o.prototype.signum = function () { return this.s < 0 ? -1 : this.t <= 0 || (1 == this.t && this[0] <= 0) ? 0 : 1; }), (o.prototype.toByteArray = function () { var e = this.t, t = new Array(); t[0] = this.s; var n, i = this.DB - ((e * this.DB) % 8), o = 0; if (e-- > 0) for (i < this.DB && (n = this[e] >> i) != (this.s & this.DM) >> i && (t[o++] = n | (this.s << (this.DB - i))); e >= 0; ) i < 8 ? ((n = (this[e] & ((1 << i) - 1)) << (8 - i)), (n |= this[--e] >> (i += this.DB - 8))) : ((n = (this[e] >> (i -= 8)) & 255), i <= 0 && ((i += this.DB), --e)), 0 != (128 & n) && (n |= -256), 0 == o && (128 & this.s) != (128 & n) && ++o, (o > 0 || n != this.s) && (t[o++] = n); return t; }), (o.prototype.equals = function (e) { return 0 == this.compareTo(e); }), (o.prototype.min = function (e) { return this.compareTo(e) < 0 ? this : e; }), (o.prototype.max = function (e) { return this.compareTo(e) > 0 ? this : e; }), (o.prototype.and = function (e) { var t = r(); return this.bitwiseTo(e, g, t), t; }), (o.prototype.or = function (e) { var t = r(); return this.bitwiseTo(e, C, t), t; }), (o.prototype.xor = function (e) { var t = r(); return this.bitwiseTo(e, f, t), t; }), (o.prototype.andNot = function (e) { var t = r(); return this.bitwiseTo(e, v, t), t; }), (o.prototype.not = function () { for (var e = r(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t]; return (e.t = this.t), (e.s = ~this.s), e; }), (o.prototype.shiftLeft = function (e) { var t = r(); return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t; }), (o.prototype.shiftRight = function (e) { var t = r(); return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t; }), (o.prototype.getLowestSetBit = function () { for (var e = 0; e < this.t; ++e) if (0 != this[e]) return e * this.DB + S(this[e]); return this.s < 0 ? this.t * this.DB : -1; }), (o.prototype.bitCount = function () { for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += b(this[n] ^ t); return e; }), (o.prototype.testBit = function (e) { var t = Math.floor(e / this.DB); return t >= this.t ? 0 != this.s : 0 != (this[t] & (1 << e % this.DB)); }), (o.prototype.setBit = function (e) { return this.changeBit(e, C); }), (o.prototype.clearBit = function (e) { return this.changeBit(e, v); }), (o.prototype.flipBit = function (e) { return this.changeBit(e, f); }), (o.prototype.add = function (e) { var t = r(); return this.addTo(e, t), t; }), (o.prototype.subtract = function (e) { var t = r(); return this.subTo(e, t), t; }), (o.prototype.multiply = function (e) { var t = r(); return this.multiplyTo(e, t), t; }), (o.prototype.divide = function (e) { var t = r(); return this.divRemTo(e, t, null), t; }), (o.prototype.remainder = function (e) { var t = r(); return this.divRemTo(e, null, t), t; }), (o.prototype.divideAndRemainder = function (e) { var t = r(), n = r(); return this.divRemTo(e, t, n), new Array(t, n); }), (o.prototype.modPow = function (e, t) { var n, i, o = e.bitLength(), a = h(1); if (o <= 0) return a; (n = o < 18 ? 1 : o < 48 ? 3 : o < 144 ? 4 : o < 768 ? 5 : 6), (i = o < 8 ? new p(t) : t.isEven() ? new E(t) : new _(t)); var s = new Array(), l = 3, c = n - 1, m = (1 << n) - 1; if (((s[1] = i.convert(this)), n > 1)) { var d = r(); for (i.sqrTo(s[1], d); l <= m; ) (s[l] = r()), i.mulTo(d, s[l - 2], s[l]), (l += 2); } var g, C, f = e.t - 1, v = !0, S = r(); for (o = u(e[f]) - 1; f >= 0; ) { for (o >= c ? (g = (e[f] >> (o - c)) & m) : ((g = (e[f] & ((1 << (o + 1)) - 1)) << (c - o)), f > 0 && (g |= e[f - 1] >> (this.DB + o - c))), l = n; 0 == (1 & g); ) (g >>= 1), --l; if (((o -= l) < 0 && ((o += this.DB), --f), v)) s[g].copyTo(a), (v = !1); else { for (; l > 1; ) i.sqrTo(a, S), i.sqrTo(S, a), (l -= 2); l > 0 ? i.sqrTo(a, S) : ((C = a), (a = S), (S = C)), i.mulTo(S, s[g], a); } for (; f >= 0 && 0 == (e[f] & (1 << o)); ) i.sqrTo(a, S), (C = a), (a = S), (S = C), --o < 0 && ((o = this.DB - 1), --f); } return i.revert(a); }), (o.prototype.modInverse = function (e) { var t = e.isEven(); if ((this.isEven() && t) || 0 == e.signum()) return o.ZERO; for (var n = e.clone(), i = this.clone(), r = h(1), a = h(0), s = h(0), l = h(1); 0 != n.signum(); ) { for (; n.isEven(); ) n.rShiftTo(1, n), t ? ((r.isEven() && a.isEven()) || (r.addTo(this, r), a.subTo(e, a)), r.rShiftTo(1, r)) : a.isEven() || a.subTo(e, a), a.rShiftTo(1, a); for (; i.isEven(); ) i.rShiftTo(1, i), t ? ((s.isEven() && l.isEven()) || (s.addTo(this, s), l.subTo(e, l)), s.rShiftTo(1, s)) : l.isEven() || l.subTo(e, l), l.rShiftTo(1, l); n.compareTo(i) >= 0 ? (n.subTo(i, n), t && r.subTo(s, r), a.subTo(l, a)) : (i.subTo(n, i), t && s.subTo(r, s), l.subTo(a, l)); } return 0 != i.compareTo(o.ONE) ? o.ZERO : l.compareTo(e) >= 0 ? l.subtract(e) : l.signum() < 0 ? (l.addTo(e, l), l.signum() < 0 ? l.add(e) : l) : l; }), (o.prototype.pow = function (e) { return this.exp(e, new I()); }), (o.prototype.gcd = function (e) { var t = this.s < 0 ? this.negate() : this.clone(), n = e.s < 0 ? e.negate() : e.clone(); if (t.compareTo(n) < 0) { var i = t; (t = n), (n = i); } var o = t.getLowestSetBit(), r = n.getLowestSetBit(); if (r < 0) return t; for (o < r && (r = o), r > 0 && (t.rShiftTo(r, t), n.rShiftTo(r, n)); t.signum() > 0; ) (o = t.getLowestSetBit()) > 0 && t.rShiftTo(o, t), (o = n.getLowestSetBit()) > 0 && n.rShiftTo(o, n), t.compareTo(n) >= 0 ? (t.subTo(n, t), t.rShiftTo(1, t)) : (n.subTo(t, n), n.rShiftTo(1, n)); return r > 0 && n.lShiftTo(r, n), n; }), (o.prototype.isProbablePrime = function (e) { var t, n = this.abs(); if (1 == n.t && n[0] <= D[D.length - 1]) { for (t = 0; t < D.length; ++t) if (n[0] == D[t]) return !0; return !1; } if (n.isEven()) return !1; for (t = 1; t < D.length; ) { for (var i = D[t], o = t + 1; o < D.length && i < w; ) i *= D[o++]; for (i = n.modInt(i); t < o; ) if (i % D[t++] == 0) return !1; } return n.millerRabin(e); }); const R = o; var A = function (e, t) { (this.modulus = new R(e, 16)), (this.encryptionExponent = new R(t, 16)); }, M = { base64: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", encode: function (e) { if (!e) return !1; var t, n, i, o, r, a, s, l = "", c = 0; do { (o = (t = e.charCodeAt(c++)) >> 2), (r = ((3 & t) << 4) | ((n = e.charCodeAt(c++)) >> 4)), (a = ((15 & n) << 2) | ((i = e.charCodeAt(c++)) >> 6)), (s = 63 & i), isNaN(n) ? (a = s = 64) : isNaN(i) && (s = 64), (l += this.base64.charAt(o) + this.base64.charAt(r) + this.base64.charAt(a) + this.base64.charAt(s)); } while (c < e.length); return l; }, decode: function (e) { if (!e) return !1; e = e.replace(/[^A-Za-z0-9\+\/\=]/g, ""); var t, n, i, o, r = "", a = 0; do { (t = this.base64.indexOf(e.charAt(a++))), (n = this.base64.indexOf(e.charAt(a++))), (i = this.base64.indexOf(e.charAt(a++))), (o = this.base64.indexOf(e.charAt(a++))), (r += String.fromCharCode((t << 2) | (n >> 4))), 64 != i && (r += String.fromCharCode(((15 & n) << 4) | (i >> 2))), 64 != o && (r += String.fromCharCode(((3 & i) << 6) | o)); } while (a < e.length); return r; }, }, k = { hex: "0123456789abcdef", encode: function (e) { if (!e) return !1; var t, n = "", i = 0; do { (t = e.charCodeAt(i++)), (n += this.hex.charAt((t >> 4) & 15) + this.hex.charAt(15 & t)); } while (i < e.length); return n; }, decode: function (e) { if (!e) return !1; e = e.replace(/[^0-9abcdef]/g, ""); var t = "", n = 0; do { t += String.fromCharCode(((this.hex.indexOf(e.charAt(n++)) << 4) & 240) | (15 & this.hex.indexOf(e.charAt(n++)))); } while (n < e.length); return t; }, }; const T = { getPublicKey: function (e, t) { return new A(e, t); }, encrypt: function (e, t) { return !!t && !!(e = this.pkcs1pad2(e, (t.modulus.bitLength() + 7) >> 3)) && !!(e = e.modPowInt(t.encryptionExponent, t.modulus)) && (1 == (1 & (e = e.toString(16)).length) && (e = "0" + e), M.encode(k.decode(e))); }, pkcs1pad2: function (e, t) { if (t < e.length + 11) return null; for (var n = [], i = e.length - 1; i >= 0 && t > 0; ) n[--t] = e.charCodeAt(i--); for (n[--t] = 0; t > 2; ) n[--t] = Math.floor(254 * Math.random()) + 1; return (n[--t] = 2), (n[--t] = 0), new R(n); }, }; }, 41171: (e, t, n) => { var i = { "./shared_arabic.json": [78501, 2431], "./shared_brazilian.json": [55106, 8385], "./shared_bulgarian.json": [34469, 1313], "./shared_czech.json": [93182, 4189], "./shared_danish.json": [87113, 9753], "./shared_dutch.json": [80737, 5925], "./shared_english.json": [48751, 7975], "./shared_finnish.json": [7817, 3557], "./shared_french.json": [50731, 3112], "./shared_german.json": [54811, 6007], "./shared_greek.json": [90175, 4297], "./shared_hungarian.json": [49628, 5948], "./shared_indonesian.json": [46741, 8754], "./shared_italian.json": [90116, 5933], "./shared_japanese.json": [15055, 2844], "./shared_koreana.json": [82062, 6542], "./shared_latam.json": [97679, 2443], "./shared_norwegian.json": [33469, 4108], "./shared_polish.json": [13255, 3252], "./shared_portuguese.json": [77294, 5849], "./shared_romanian.json": [3850, 4823], "./shared_russian.json": [76440, 9062], "./shared_sc_schinese.json": [16386, 2029], "./shared_schinese.json": [65933, 2537], "./shared_spanish.json": [2712, 6492], "./shared_swedish.json": [85835, 5625], "./shared_tchinese.json": [85918, 7602], "./shared_thai.json": [63269, 1162], "./shared_turkish.json": [27810, 5438], "./shared_ukrainian.json": [32110, 7781], "./shared_vietnamese.json": [59201, 4964], }; function o(e) { if (!n.o(i, e)) return Promise.resolve().then(() => { var t = new Error("Cannot find module '" + e + "'"); throw ((t.code = "MODULE_NOT_FOUND"), t); }); var t = i[e], o = t[0]; return n.e(t[1]).then(() => n.t(o, 19)); } (o.keys = () => Object.keys(i)), (o.id = 41171), (e.exports = o); }, 91090: (e, t, n) => { var i = { "./shared_arabic.json": [78501, 2431], "./shared_brazilian.json": [55106, 8385], "./shared_bulgarian.json": [34469, 1313], "./shared_czech.json": [93182, 4189], "./shared_danish.json": [87113, 9753], "./shared_dutch.json": [80737, 5925], "./shared_english.json": [48751, 7975], "./shared_finnish.json": [7817, 3557], "./shared_french.json": [50731, 3112], "./shared_german.json": [54811, 6007], "./shared_greek.json": [90175, 4297], "./shared_hungarian.json": [49628, 5948], "./shared_indonesian.json": [46741, 8754], "./shared_italian.json": [90116, 5933], "./shared_japanese.json": [15055, 2844], "./shared_koreana.json": [82062, 6542], "./shared_latam.json": [97679, 2443], "./shared_norwegian.json": [33469, 4108], "./shared_polish.json": [13255, 3252], "./shared_portuguese.json": [77294, 5849], "./shared_romanian.json": [3850, 4823], "./shared_russian.json": [76440, 9062], "./shared_sc_schinese.json": [16386, 2029], "./shared_schinese.json": [65933, 2537], "./shared_spanish.json": [2712, 6492], "./shared_swedish.json": [85835, 5625], "./shared_tchinese.json": [85918, 7602], "./shared_thai.json": [63269, 1162], "./shared_turkish.json": [27810, 5438], "./shared_ukrainian.json": [32110, 7781], "./shared_vietnamese.json": [59201, 4964], }; function o(e) { if (!n.o(i, e)) return Promise.resolve().then(() => { var t = new Error("Cannot find module '" + e + "'"); throw ((t.code = "MODULE_NOT_FOUND"), t); }); var t = i[e], o = t[0]; return n.e(t[1]).then(() => n.t(o, 19)); } (o.keys = () => Object.keys(i)), (o.id = 91090), (e.exports = o); }, 85556: (e, t, n) => { "use strict"; n.d(t, { _T: () => i, gn: () => o, mG: () => r }); function i(e, t) { var n = {}; for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]); if (null != e && "function" == typeof Object.getOwnPropertySymbols) { var o = 0; for (i = Object.getOwnPropertySymbols(e); o < i.length; o++) t.indexOf(i[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, i[o]) && (n[i[o]] = e[i[o]]); } return n; } function o(e, t, n, i) { var o, r = arguments.length, a = r < 3 ? t : null === i ? (i = Object.getOwnPropertyDescriptor(t, n)) : i; if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, n, i); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, n, a) : o(t, n)) || a); return r > 3 && a && Object.defineProperty(t, n, a), a; } function r(e, t, n, i) { return new (n || (n = Promise))(function (o, r) { function a(e) { try { l(i.next(e)); } catch (e) { r(e); } } function s(e) { try { l(i.throw(e)); } catch (e) { r(e); } } function l(e) { var t; e.done ? o(e.value) : ((t = e.value), t instanceof n ? t : new n(function (e) { e(t); })).then(a, s); } l((i = i.apply(e, t || [])).next()); }); } Object.create; Object.create; "function" == typeof SuppressedError && SuppressedError; }, }, a = {}; function s(e) { var t = a[e]; if (void 0 !== t) return t.exports; var n = (a[e] = { id: e, loaded: !1, exports: {} }); return r[e].call(n.exports, n, n.exports, s), (n.loaded = !0), n.exports; } (s.m = r), (s.amdO = {}), (e = []), (s.O = (t, n, i, o) => { if (!n) { var r = 1 / 0; for (m = 0; m < e.length; m++) { for (var [n, i, o] = e[m], a = !0, l = 0; l < n.length; l++) (!1 & o || r >= o) && Object.keys(s.O).every((e) => s.O[e](n[l])) ? n.splice(l--, 1) : ((a = !1), o < r && (r = o)); if (a) { e.splice(m--, 1); var c = i(); void 0 !== c && (t = c); } } return t; } o = o || 0; for (var m = e.length; m > 0 && e[m - 1][2] > o; m--) e[m] = e[m - 1]; e[m] = [n, i, o]; }), (s.n = (e) => { var t = e && e.__esModule ? () => e.default : () => e; return s.d(t, { a: t }), t; }), (n = Object.getPrototypeOf ? (e) => Object.getPrototypeOf(e) : (e) => e.__proto__), (s.t = function (e, i) { if ((1 & i && (e = this(e)), 8 & i)) return e; if ("object" == typeof e && e) { if (4 & i && e.__esModule) return e; if (16 & i && "function" == typeof e.then) return e; } var o = Object.create(null); s.r(o); var r = {}; t = t || [null, n({}), n([]), n(n)]; for (var a = 2 & i && e; "object" == typeof a && !~t.indexOf(a); a = n(a)) Object.getOwnPropertyNames(a).forEach((t) => (r[t] = () => e[t])); return (r.default = () => e), s.d(o, r), o; }), (s.d = (e, t) => { for (var n in t) s.o(t, n) && !s.o(e, n) && Object.defineProperty(e, n, { enumerable: !0, get: t[n] }); }), (s.f = {}), (s.e = (e) => Promise.all(Object.keys(s.f).reduce((t, n) => (s.f[n](e, t), t), []))), (s.u = (e) => "javascript/webui/" + ({ 699: "friendsui_polish-json", 1162: "shared_thai-json", 1313: "shared_bulgarian-json", 1471: "friendsui_greek-json", 1635: "friendsui_vietnamese-json", 2029: "shared_sc_schinese-json", 2431: "shared_arabic-json", 2443: "shared_latam-json", 2537: "shared_schinese-json", 2822: "friendsui_ukrainian-json", 2844: "shared_japanese-json", 2862: "friendsui_brazilian-json", 2913: "friendsui_russian-json", 3112: "shared_french-json", 3140: "friendsui_sc_schinese-json", 3182: "friendsui_romanian-json", 3252: "shared_polish-json", 3471: "friendsui_spanish-json", 3500: "friendsui_french-json", 3557: "shared_finnish-json", 4103: "navevents", 4108: "shared_norwegian-json", 4189: "shared_czech-json", 4264: "friendsui_portuguese-json", 4297: "shared_greek-json", 4448: "friendsui_czech-json", 4596: "friendsui_finnish-json", 4679: "broadcastapp", 4716: "friendsui_norwegian-json", 4823: "shared_romanian-json", 4964: "shared_vietnamese-json", 4989: "friendsui_german-json", 5438: "shared_turkish-json", 5625: "shared_swedish-json", 5632: "friendsui_turkish-json", 5802: "friendsui_hungarian-json", 5849: "shared_portuguese-json", 5925: "shared_dutch-json", 5933: "shared_italian-json", 5948: "shared_hungarian-json", 6007: "shared_german-json", 6492: "shared_spanish-json", 6542: "shared_koreana-json", 6646: "friendsui_indonesian-json", 6727: "friendsui_japanese-json", 6986: "friendsui_koreana-json", 6992: "friendsui_arabic-json", 7340: "friendsui_tchinese-json", 7575: "friendsui_dutch-json", 7602: "shared_tchinese-json", 7651: "friendsui_latam-json", 7706: "friendsui_schinese-json", 7781: "shared_ukrainian-json", 7975: "shared_english-json", 8247: "friendsui_english-json", 8385: "shared_brazilian-json", 8518: "friendsui_bulgarian-json", 8754: "shared_indonesian-json", 8815: "friendsui_italian-json", 9062: "shared_russian-json", 9263: "friendsui_thai-json", 9753: "shared_danish-json", 9775: "friendsui_danish-json", 9818: "friendsui_swedish-json", }[e] || e) + ".js?contenthash=" + { 699: "db61932813c3162c8ae0", 1162: "70edf5295d9f7de64271", 1313: "39ffddc54bea66e44657", 1471: "fd64fdd4b89921fcf094", 1635: "2f759517243b4099c40e", 2029: "6f7f951d0f10150c976e", 2388: "3574c270b47b0ea36bb8", 2431: "453484513ab5e66f8413", 2443: "607973e876822d4cd1a4", 2537: "396eb70395f4dd0c1717", 2822: "97ede6bebef51e270a03", 2844: "fb138b5541d6fd18fd5b", 2862: "ae6633c97f1ad3e6bd24", 2913: "d07f68a3eccbe0e60b07", 3112: "6b54ab3b65ce0673ff8c", 3140: "4b057f32b7604ec3eaa0", 3182: "00f6384b3c2400e25151", 3252: "b7a3658bb1d07ce11804", 3471: "750ec7fe066f661f0c4e", 3500: "94fdfffb1355033a80f6", 3557: "9fb6a518337249fd80b2", 4103: "d78b41d987f1ef45cf6f", 4108: "9f325ec5039daa383c99", 4189: "d19f0c7d24bd90e5ec4f", 4264: "b9ae5d9ff77b6f441560", 4297: "4a84bcc33f1476d72fe1", 4448: "ee2d590d3c42ef646cf4", 4596: "d89705224b580389fb19", 4679: "61aff791a785f98d3383", 4716: "95c9c9079862b31f3592", 4823: "7f6b4bc56b1ad19bb44d", 4964: "428a8ee2a7f4f0ff50e1", 4989: "9007e45872c16ccfb49e", 5438: "9a35bfc6c54dd94d3d84", 5625: "cdc4521b5648a5b10a1b", 5632: "8b21e1c0be128ee38a51", 5802: "5b495bbe13af07295e01", 5849: "25a8e6e405311f2379cc", 5925: "60bc9dbe1f18a65d5203", 5933: "2b3022df0706a57a2eaa", 5948: "fda2b0b096a9e1c294b6", 6007: "05e6126ce9bce05ca886", 6492: "89aef571a65b57799141", 6542: "d2c4bf38bb88a1079db1", 6646: "093df9eebbf7fc769248", 6727: "46dc482d8a43a74d9a3f", 6986: "45bb643fd7b8905e00a1", 6992: "5aca62e8d2baaf5ced56", 7340: "5e06384f2b7dd2ffd8a7", 7575: "93aca65c60c521bfa601", 7602: "a5fb5e225a1e3a51c40a", 7651: "0b1690252d70a50c2a5a", 7706: "fe8c646f24c71cea3de6", 7781: "9ea75eead6ee9a109254", 7975: "de48af0adb39d14573b2", 8247: "9f7054540e7cfcbab4bb", 8385: "1b7257a52fbc2165f622", 8518: "bdd246fdade670ade83a", 8754: "d4aefd9829bc768992d4", 8815: "57e083c3ed6ac3bd8c7c", 9062: "13d57f9a1f85dc257fc8", 9263: "b3c288617faa32990a5f", 9753: "6630599aeb0fdd78cb3a", 9775: "872e4abe11f62ddb1168", 9818: "529dcdd4b8869bc9b6a5", }[e]), (s.miniCssF = (e) => "css/webui/" + (4679 === e ? "broadcastapp" : e) + ".css?contenthash=" + { 2388: "75a6e9ff11215c0f2a0b", 4679: "3aa210867d74fbc33884" }[e]), (s.g = (function () { if ("object" == typeof globalThis) return globalThis; try { return this || new Function("return this")(); } catch (e) { if ("object" == typeof window) return window; } })()), (s.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)), (i = {}), (o = "@steam/friendsui:"), (s.l = (e, t, n, r) => { if (i[e]) i[e].push(t); else { var a, l; if (void 0 !== n) for (var c = document.getElementsByTagName("script"), m = 0; m < c.length; m++) { var d = c[m]; if (d.getAttribute("src") == e || d.getAttribute("data-webpack") == o + n) { a = d; break; } } a || ((l = !0), ((a = document.createElement("script")).charset = "utf-8"), (a.timeout = 120), s.nc && a.setAttribute("nonce", s.nc), a.setAttribute("data-webpack", o + n), (a.src = e)), (i[e] = [t]); var h = (t, n) => { (a.onerror = a.onload = null), clearTimeout(u); var o = i[e]; if ((delete i[e], a.parentNode && a.parentNode.removeChild(a), o && o.forEach((e) => e(n)), t)) return t(n); }, u = setTimeout(h.bind(null, void 0, { type: "timeout", target: a }), 12e4); (a.onerror = h.bind(null, a.onerror)), (a.onload = h.bind(null, a.onload)), l && document.head.appendChild(a); } }), (s.r = (e) => { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }); }), (s.nmd = (e) => ((e.paths = []), e.children || (e.children = []), e)), (s.j = 267), (() => { var e; s.g.importScripts && (e = s.g.location + ""); var t = s.g.document; if (!e && t && (t.currentScript && (e = t.currentScript.src), !e)) { var n = t.getElementsByTagName("script"); if (n.length) for (var i = n.length - 1; i > -1 && !e; ) e = n[i--].src; } if (!e) throw new Error("Automatic publicPath is not supported in this browser"); (e = e .replace(/#.*$/, "") .replace(/\?.*$/, "") .replace(/\/[^\/]+$/, "/")), (s.p = e + "../../"); })(), (() => { if ("undefined" != typeof document) { var e = (e) => new Promise((t, n) => { var i = s.miniCssF(e), o = s.p + i; if ( ((e, t) => { for (var n = document.getElementsByTagName("link"), i = 0; i < n.length; i++) { var o = (a = n[i]).getAttribute("data-href") || a.getAttribute("href"); if ("stylesheet" === a.rel && (o === e || o === t)) return a; } var r = document.getElementsByTagName("style"); for (i = 0; i < r.length; i++) { var a; if ((o = (a = r[i]).getAttribute("data-href")) === e || o === t) return a; } })(i, o) ) return t(); ((e, t, n, i, o) => { var r = document.createElement("link"); (r.rel = "stylesheet"), (r.type = "text/css"), (r.onerror = r.onload = (n) => { if (((r.onerror = r.onload = null), "load" === n.type)) i(); else { var a = n && n.type, s = (n && n.target && n.target.href) || t, l = new Error("Loading CSS chunk " + e + " failed.\n(" + a + ": " + s + ")"); (l.name = "ChunkLoadError"), (l.code = "CSS_CHUNK_LOAD_FAILED"), (l.type = a), (l.request = s), r.parentNode && r.parentNode.removeChild(r), o(l); } }), (r.href = t), n ? n.parentNode.insertBefore(r, n.nextSibling) : document.head.appendChild(r); })(e, o, null, t, n); }), t = { 267: 0 }; s.f.miniCss = (n, i) => { t[n] ? i.push(t[n]) : 0 !== t[n] && { 2388: 1, 4679: 1 }[n] && i.push( (t[n] = e(n).then( () => { t[n] = 0; }, (e) => { throw (delete t[n], e); }, )), ); }; } })(), (() => { var e = { 267: 0 }; (s.f.j = (t, n) => { var i = s.o(e, t) ? e[t] : void 0; if (0 !== i) if (i) n.push(i[2]); else { var o = new Promise((n, o) => (i = e[t] = [n, o])); n.push((i[2] = o)); var r = s.p + s.u(t), a = new Error(); s.l( r, (n) => { if (s.o(e, t) && (0 !== (i = e[t]) && (e[t] = void 0), i)) { var o = n && ("load" === n.type ? "missing" : n.type), r = n && n.target && n.target.src; (a.message = "Loading chunk " + t + " failed.\n(" + o + ": " + r + ")"), (a.name = "ChunkLoadError"), (a.type = o), (a.request = r), i[1](a); } }, "chunk-" + t, t, ); } }), (s.O.j = (t) => 0 === e[t]); var t = (t, n) => { var i, o, [r, a, l] = n, c = 0; if (r.some((t) => 0 !== e[t])) { for (i in a) s.o(a, i) && (s.m[i] = a[i]); if (l) var m = l(s); } for (t && t(n); c < r.length; c++) (o = r[c]), s.o(e, o) && e[o] && e[o][0](), (e[o] = 0); return s.O(m); }, n = (self.webpackChunk_steam_friendsui = self.webpackChunk_steam_friendsui || []); n.forEach(t.bind(null, 0)), (n.push = t.bind(null, n.push.bind(n))); })(); var l = s.O(void 0, [3817, 5140, 5968], () => s(4853)); l = s.O(l); })();