local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Cryo);
local v3 = require(l_CorePackages_0.UIBlox);
local v4 = require(l_CorePackages_0.Roact);
local v5 = require(l_CorePackages_0.RoactRodux);
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local l_useDispatch_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useDispatch;
local v8 = require(l_Modules_0.LuaApp.withLocalization);
local l_useLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).Hooks.useLocalization;
local l_Text_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).Text;
local v11 = require(l_CorePackages_0.Workspace.Packages.React);
local l_useEffect_0 = v11.useEffect;
local _ = v11.useCallback;
local v14 = require(l_Modules_0.LuaApp.Components.SystemPrimaryButtonRetheme);
local l_FormFactor_0 = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local v16 = require(l_Modules_0.LuaApp.Components.GenericTextButton);
local l_Button_0 = v3.App.Button.Button;
local l_ButtonType_0 = v3.App.Button.Enum.ButtonType;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local l_useRoactService_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppHooks).useRoactService;
local v21 = require(l_Modules_0.LuaApp.Services.RoactAnalyticsAuthEvents);
local v22 = require(l_Modules_0.LuaApp.AppPage);
local _ = require(l_Modules_0.LuaApp.Flags.GetFFlagEnableHomePageUpsellCard);
local v24 = require(l_Modules_0.LuaApp.Flags.GetFFlagEnableHomePageEmailUpsellCard);
local v25 = require(l_Modules_0.LuaApp.EventStreamConstants);
local v26 = require(l_Modules_0.LuaApp.Actions.SetHomePageUpsellCardVariation);
local v27 = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local v28 = require(l_Modules_0.LuaApp.Thunks.Verification.OpenEmailUpsellModal);
local v29 = require(l_Modules_0.LuaApp.Thunks.Verification.OpenPhoneUpsellModal);
local v30 = require(l_Modules_0.LuaApp.Components.DiscoverabilityModal.useNavigateToDiscoverabilityModal);
local l_EntryPoints_0 = require(l_CorePackages_0.Workspace.Packages.DiscoverabilityModal).Analytics.EntryPoints;
local v32 = require(l_Modules_0.LuaApp.Enum.OptionalContactMethodUpsellTypes);
local v33 = require(l_Modules_0.LuaApp.Experiment.RoactAppExperiment);
local l_useUserExperiment_0 = v33.useUserExperiment;
local l_IXPService_0 = game:GetService("IXPService");
local v36 = require(l_Modules_0.LuaApp.Experiment.AppUserLayers);
local v37 = require(l_Modules_0.LuaApp.Flags.GetFFlagEnableUpdateAddPhoneDescriptionTextExperiment);
local v38 = require(l_Modules_0.Personalization.Flags.GetFFlagUseUpsellCardOmniFeedItem);
local v39 = require(l_Modules_0.LuaApp.Flags.GetFFlagUseUIBloxButtonsUpsellCard);
local v40 = require(l_Modules_0.LuaApp.Flags.GetFFlagRefactorHomePageUpsellCardWithIconToFunctional);
local l_withStyle_0 = v3.Style.withStyle;
local l_useStyle_0 = v3.Core.Style.useStyle;
local l_Images_0 = v3.App.ImageSet.Images;
local l_ImageSetLabel_0 = v3.Core.ImageSet.ImageSetLabel;
local v45 = l_Images_0["icons/graphic/passcode_large"];
local v46 = l_Images_0["icons/controls/microphone"];
local v47 = not v39() and 650 or 800;
local function v48()
end;
if not v40() then
    local v49 = v4.PureComponent:extend("HomePageUpsellCardWithIcon");
    local v50 = "phone";
    local v51 = "";
    local v52 = nil;
    local v53 = nil;
    v49.didMount = function(v54)
        if v54.props.upsellCardVariation then
            v51 = v54.props.upsellCardVariation.upsellCardType;
        end;
        if not (v51 ~= v32.ContactMethodPhoneNumberEmailHorizontalLayout) or v51 == v32.ContactMethodPhoneNumberEmailVerticalLayout then
            v50 = "emailOrPhone";
        end;
        v54.props.authEventAnalytics.reportModalShownWithSection("verificationUpsell", "homepage", v50);
    end;
    v49.render = function(v55)
        return l_withStyle_0(function(v56)
            local l_Theme_0 = v56.Theme;
            local l_Color_0 = l_Theme_0.TextEmphasis.Color;
            local l_Font_0 = v56.Font;
            local l_Font_1 = l_Font_0.Header2.Font;
            local v61 = v56.Font.BaseSize * v56.Font.Header2.RelativeSize;
            local l_formFactor_0 = v55.props.formFactor;
            local l_Color_1 = l_Theme_0.TextDefault.Color;
            local l_Font_2 = l_Font_0.CaptionBody.Font;
            local v65 = v56.Font.BaseSize * v56.Font.CaptionBody.RelativeSize;
            local l_Top_0 = Enum.VerticalAlignment.Top;
            local l_Horizontal_0 = Enum.FillDirection.Horizontal;
            local v68 = 10;
            local v69 = 1;
            local v70 = 2;
            if v55.props.upsellCardVariation then
                v51 = v55.props.upsellCardVariation.upsellCardType;
            end;
            if (v55.props.upsellCardVariation and v55.props.upsellCardVariation.titleTextOverride ~= "") and v55.props.upsellCardVariation.bodyTextOverride ~= "" then
                v52 = v55.props.upsellCardVariation.titleTextOverride;
                v53 = v55.props.upsellCardVariation.bodyTextOverride;
            end;
            v55.contactMethodAddedToAccountCallback = function()
                v55.props.hideUpsellCard();
            end;
            v55.emailButtonClickCallback = function()
                v55.props.authEventAnalytics.reportButtonClickedWithSectionAndOrigin(v25.Context.HomepageUpsellCard, v25.Button.Email, v50, "homepage");
                v55.props.addEmailContactMethod(v55.props.networking, v55.contactMethodAddedToAccountCallback);
            end;
            local v71 = "Feature.VerificationUpsell.Description.VerificationCodeSmsFeesMayApply";
            v55.phoneButtonClickCallback = function()
                v55.props.authEventAnalytics.reportButtonClickedWithSectionAndOrigin(v25.Context.HomepageUpsellCard, v25.Button.Phone, v50, "homepage");
                l_IXPService_0:LogUserLayerExposure(v36.PhoneVerificationEntryLayer);
                if not (not v37() or not v55.props.updatePhoneVerificationText) then
                    v71 = "Feature.VerificationUpsell.Description.AddPhoneBody";
                end;
                local v72 = nil;
                if v51 == v32.ContactMethodPhoneNumberVoiceOptIn then
                    v72 = true;
                end;
                if not v55.props.usePhoneVerificationFlow then
                    v55.props.navigateDown({
                        name = v22.PhoneVerification,
                        extraProps = {
                            onSuccessCallback = v55.contactMethodAddedToAccountCallback
                        }
                    });
                    return ;
                else
                    v55.props.addPhoneContactMethod(function()
                        v55.props.hideUpsellCard();
                        v55.props.navigateToDiscoverabilityModal({
                            isStandaloneDiscoverabilityModal = true,
                            navigateOnActivated = v48,
                            entryPoint = l_EntryPoints_0.HomePage
                        });
                    end, v71, v72);
                    return ;
                end;
            end;
            return v8({
                addButtonText = "Feature.ContactMethodUpsell.Action.AddPhoneNumber",
                bodyText = "Feature.ContactMethodUpsell.Label.RecoverYourAccount",
                titleText = "Feature.ContactMethodUpsell.Title.HomePageUpsellCardLockOutTitle",
                addEmailInstead = "Feature.ContactUpsell.Action.AddEmailInstead",
                addPhone = "Feature.ContactMethodUpsell.Label.AddPhone",
                addEmail = "Feature.ContactMethodUpsell.Label.AddEmail"
            })(function(v73)
                local v74 = UDim2.new(1, 0, 0, 0);
                local v75 = UDim2.new(1, 0, 0, 28);
                local v76 = UDim2.new(0.5, 0, 0, 28);
                local v77 = 12;
                local v78 = 12;
                local l_Vertical_0 = Enum.FillDirection.Vertical;
                local v80 = UDim2.new(1, -25, 0, 0);
                local v81 = if not v24() then nil else v73.addEmail;
                if l_formFactor_0 == l_FormFactor_0.WIDE then
                    v77 = not v38() and 20 or 12;
                    l_Vertical_0 = Enum.FillDirection.Horizontal;
                    v76 = UDim2.new(1, 0, 0, 28);
                    v78 = 20;
                    l_Top_0 = Enum.VerticalAlignment.Center;
                    l_Horizontal_0 = Enum.FillDirection.Vertical;
                    v68 = 0;
                    v69 = 2;
                    v70 = 1;
                    v73.addEmail = v73.addEmailInstead;
                    v73.addPhone = v73.addButtonText;
                    v74 = UDim2.new(1, -l_Text_0.GetTextWidth(v73.addButtonText, v56.Font.CaptionHeader.Font, v56.Font.BaseSize * v56.Font.CaptionHeader.RelativeSize) - 30, 0, 0);
                    v75 = UDim2.new(0, l_Text_0.GetTextWidth(v73.addButtonText, v56.Font.CaptionHeader.Font, v56.Font.BaseSize * v56.Font.CaptionHeader.RelativeSize) + 15, 0, 28);
                end;
                local l_createElement_0 = v4.createElement;
                local v83 = "Frame";
                local v84 = {
                    Position = if not not v38() and v55.props.isCentered then UDim2.new(0.5, 0, 0, 0) else nil,
                    AnchorPoint = if not not v38() and v55.props.isCentered then Vector2.new(0.5, 0) else nil,
                    Size = UDim2.new(1, 0, 0, 0),
                    BorderSizePixel = 0,
                    BackgroundTransparency = 0,
                    BackgroundColor3 = l_Theme_0.BackgroundUIDefault.Color,
                    AutomaticSize = Enum.AutomaticSize.Y
                };
                local v85 = {
                    UISizeConstraint = v4.createElement("UISizeConstraint", {
                        MaxSize = Vector2.new(v47, math.huge)
                    }),
                    Layout = v4.createElement("UIListLayout", {
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        FillDirection = l_Vertical_0,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        Padding = UDim.new(0, v77)
                    }),
                    UICorner = v4.createElement("UICorner", {
                        CornerRadius = UDim.new(0, 12)
                    }),
                    UIStroke = v4.createElement("UIStroke", {
                        Thickness = 1,
                        Color = l_Theme_0.SystemPrimaryDefault.Color,
                        Transparency = 0.7
                    }),
                    UIPadding = v4.createElement("UIPadding", {
                        PaddingLeft = UDim.new(0, 12),
                        PaddingRight = UDim.new(0, not v38() and 12 or v78),
                        PaddingTop = UDim.new(0, 12),
                        PaddingBottom = UDim.new(0, 12)
                    }),
                    IconAndTextFrame = v4.createElement("Frame", {
                        Size = v74,
                        BackgroundTransparency = 1,
                        LayoutOrder = 1,
                        AutomaticSize = Enum.AutomaticSize.Y
                    }, {
                        HorizontalLayout = v4.createElement("UIListLayout", {
                            SortOrder = Enum.SortOrder.LayoutOrder,
                            FillDirection = Enum.FillDirection.Horizontal,
                            VerticalAlignment = l_Top_0
                        }),
                        ImageIcon = v4.createElement(l_ImageSetLabel_0, {
                            AnchorPoint = Vector2.new(1, 0.5),
                            Size = UDim2.new(0, 40, 0, 40),
                            Position = UDim2.new(1, 0, 0.5, 0),
                            Image = if v51 == v32.ContactMethodPhoneNumberVoiceOptIn then v46 else v45,
                            ImageColor3 = v56.Theme.SystemPrimaryDefault.Color,
                            ImageTransparency = v56.Theme.SystemPrimaryDefault.Transparency,
                            BackgroundTransparency = 1
                        }),
                        TextFrame = v4.createElement("Frame", {
                            Size = v80,
                            BackgroundTransparency = 1,
                            LayoutOrder = 2,
                            AutomaticSize = Enum.AutomaticSize.Y
                        }, {
                            VerticalLayout = v4.createElement("UIListLayout", {
                                SortOrder = Enum.SortOrder.LayoutOrder,
                                FillDirection = Enum.FillDirection.Vertical,
                                VerticalAlignment = Enum.VerticalAlignment.Center,
                                Padding = UDim.new(0, 4)
                            }),
                            UIPadding = v4.createElement("UIPadding", {
                                PaddingLeft = UDim.new(0, 12)
                            }),
                            TitleTextLabel = v4.createElement("TextLabel", {
                                Size = v80,
                                LayoutOrder = 1,
                                Font = l_Font_1,
                                BorderSizePixel = 0,
                                Text = v52 or v73.titleText,
                                TextColor3 = l_Color_0,
                                TextSize = v61,
                                TextWrapped = true,
                                TextXAlignment = Enum.TextXAlignment.Left,
                                BackgroundTransparency = 0,
                                BackgroundColor3 = l_Theme_0.BackgroundUIDefault.Color,
                                AutomaticSize = Enum.AutomaticSize.Y
                            }),
                            BodyTextLabel = v4.createElement("TextLabel", {
                                Size = v80,
                                LayoutOrder = 2,
                                Font = l_Font_2,
                                BorderSizePixel = 0,
                                Text = v53 or v73.bodyText,
                                TextColor3 = l_Color_1,
                                TextSize = v65,
                                TextWrapped = true,
                                TextXAlignment = Enum.TextXAlignment.Left,
                                BackgroundTransparency = 0,
                                BackgroundColor3 = l_Theme_0.BackgroundUIDefault.Color,
                                AutomaticSize = Enum.AutomaticSize.Y
                            })
                        })
                    })
                };
                local v86 = false;
                if v51 == v32.ContactMethodPhoneNumberEmailHorizontalLayout then
                    v86 = v4.createElement("Frame", {
                        Size = v75,
                        BackgroundTransparency = 1,
                        LayoutOrder = 2
                    }, {
                        OrientationLayout = v4.createElement("UIListLayout", {
                            SortOrder = Enum.SortOrder.LayoutOrder,
                            FillDirection = l_Horizontal_0,
                            VerticalAlignment = Enum.VerticalAlignment.Center,
                            Padding = UDim.new(0, 10)
                        }),
                        UIPadding = v4.createElement("UIPadding", {
                            PaddingRight = UDim.new(0, v68)
                        }),
                        HorizontalCallToActionButton = v4.createElement(v16, {
                            Size = v76,
                            BackgroundTransparency = 0,
                            Text = v73.addEmail,
                            LayoutOrder = v69,
                            Font = v56.Font.CaptionHeader.Font,
                            TextSize = v56.Font.BaseSize * v56.Font.CaptionHeader.RelativeSize,
                            onActivated = v55.emailButtonClickCallback,
                            BackgroundColor3 = l_Theme_0.BackgroundUIDefault.Color,
                            themeSettings = {
                                Color = l_Theme_0.SystemPrimaryContent.Color,
                                Transparency = l_Theme_0.SystemPrimaryContent.Transparency,
                                OnPressTransparency = 0.5,
                                DisabledTransparency = 0.5,
                                Text = {
                                    Color = l_Theme_0.SystemPrimaryDefault.Color,
                                    Transparency = l_Theme_0.SystemPrimaryDefault.Transparency
                                },
                                Border = {
                                    Hidden = false,
                                    Transparency = 0,
                                    Color = l_Theme_0.SystemPrimaryDefault.Color
                                }
                            }
                        }),
                        SecondHorizontalCallToActionButton = if not v39() then v4.createElement(v14, {
                            Size = v76,
                            BackgroundTransparency = 0,
                            Text = v73.addPhone,
                            LayoutOrder = v70,
                            fontStyle = "CaptionHeader",
                            onActivated = v55.phoneButtonClickCallback,
                            BackgroundColor3 = l_Theme_0.BackgroundOnHover.Color
                        }) else v4.createElement(l_Button_0, {
                            buttonType = l_ButtonType_0.PrimarySystem,
                            size = v76,
                            text = v73.addPhone,
                            layoutOrder = v70,
                            fontStyle = "CaptionHeader",
                            onActivated = v55.phoneButtonClickCallback
                        })
                    });
                end;
                v85.FirstVariantFrame = v86;
                if not v24() then
                    v86 = v51 ~= v32.ContactMethodPhoneNumberEmailHorizontalLayout;
                else
                    v86 = false;
                    if v51 ~= v32.ContactMethodPhoneNumberEmailHorizontalLayout then
                        v86 = v51 ~= v32.ContactMethodEmail;
                    end;
                end;
                if v86 then
                    v86 = v4.createElement;
                    local v87 = "Frame";
                    local v88 = {
                        Size = v75,
                        BackgroundTransparency = 1,
                        LayoutOrder = 2,
                        AutomaticSize = Enum.AutomaticSize.Y
                    };
                    local v89 = {
                        VerticalLayout = v4.createElement("UIListLayout", {
                            SortOrder = Enum.SortOrder.LayoutOrder,
                            FillDirection = Enum.FillDirection.Vertical,
                            VerticalAlignment = Enum.VerticalAlignment.Center,
                            Padding = UDim.new(0, 10)
                        }),
                        CallToActionButton = if not v39() then v4.createElement(v14, {
                            Size = v75,
                            BackgroundTransparency = 0,
                            Text = v73.addButtonText,
                            LayoutOrder = 1,
                            fontStyle = "CaptionHeader",
                            onActivated = v55.phoneButtonClickCallback,
                            BackgroundColor3 = l_Theme_0.BackgroundUIDefault.Color
                        }) else v4.createElement(l_Button_0, {
                            buttonType = l_ButtonType_0.PrimarySystem,
                            size = v75,
                            text = v73.addButtonText,
                            layoutOrder = 1,
                            fontStyle = "CaptionHeader",
                            onActivated = v55.phoneButtonClickCallback
                        })
                    };
                    local v90 = false;
                    if v51 == v32.ContactMethodPhoneNumberEmailVerticalLayout then
                        v90 = v4.createElement(v16, {
                            Size = v75,
                            BackgroundTransparency = 0,
                            Text = v73.addEmailInstead,
                            LayoutOrder = 2,
                            Font = v56.Font.CaptionHeader.Font,
                            TextSize = v56.Font.BaseSize * v56.Font.CaptionHeader.RelativeSize,
                            onActivated = v55.emailButtonClickCallback,
                            BackgroundColor3 = l_Theme_0.BackgroundOnHover.Color,
                            themeSettings = {
                                Color = l_Theme_0.SystemPrimaryContent.Color,
                                Transparency = l_Theme_0.SystemPrimaryContent.Transparency,
                                OnPressTransparency = 0.5,
                                DisabledTransparency = 0.5,
                                Text = {
                                    Color = l_Theme_0.SystemPrimaryDefault.Color,
                                    Transparency = l_Theme_0.SystemPrimaryDefault.Transparency
                                },
                                Border = {
                                    Hidden = false,
                                    Transparency = 1
                                }
                            }
                        });
                    end;
                    v89.SecondVerticalCallToActionButton = v90;
                    v86 = v86(v87, v88, v89);
                end;
                v85.SecondVariantFrame = v86;
                v86 = v24();
                if v86 then
                    v86 = false;
                    if v51 == v32.ContactMethodEmail then
                        v86 = v4.createElement("Frame", {
                            Size = v75,
                            BackgroundTransparency = 1,
                            LayoutOrder = 2
                        }, {
                            OrientationLayout = v4.createElement("UIListLayout", {
                                SortOrder = Enum.SortOrder.LayoutOrder,
                                FillDirection = l_Horizontal_0,
                                VerticalAlignment = Enum.VerticalAlignment.Center,
                                Padding = UDim.new(0, 10)
                            }),
                            UIPadding = v4.createElement("UIPadding", {
                                PaddingRight = UDim.new(0, v68)
                            }),
                            HorizontalCallToActionButton = v4.createElement(l_Button_0, {
                                buttonType = l_ButtonType_0.PrimarySystem,
                                size = v75,
                                text = v81,
                                layoutOrder = 1,
                                fontStyle = "CaptionHeader",
                                onActivated = v55.emailButtonClickCallback
                            })
                        });
                    end;
                end;
                v85.EmailVariantFrame = v86;
                return l_createElement_0(v83, v84, v85);
            end);
        end);
    end;
    v49 = v33.connectUserLayer({
        v36.PhoneVerificationEntryLayer
    }, function(v91, _)
        local v93 = v91[v36.PhoneVerificationEntryLayer] or {};
        return {
            usePhoneVerificationFlow = v93.ShouldUseLuaPhoneVerificationFlow,
            updatePhoneVerificationText = v93.ShouldUseUpdatedPhoneVerificationText
        };
    end)((l_RoactServices_0.connect({
        authEventAnalytics = v21
    })((v5.connect(function(v94, _)
        return {
            formFactor = v94.FormFactor
        };
    end, function(v96)
        return {
            hideUpsellCard = function()
                return v96(v26("", "", ""));
            end,
            addEmailContactMethod = function(_, v98)
                return v96(v28({
                    successCallback = v98,
                    addEmailOver13TextKey = "Feature.ContactMethodUpsell.Label.PleaseAddEmail",
                    addEmailTitleKey = "Feature.AccountSecurityPrompt.Action.AbortDismissForeverAddEmail",
                    isEmailModalCalledFromHomePage = true,
                    eventContext = "verificationUpsell",
                    origin = "homepage",
                    section = "addEmail"
                }));
            end,
            addPhoneContactMethod = function(v99, v100, v101)
                return v96(v29({
                    onSuccess = v99,
                    onCancelled = v48,
                    onAbandoned = v48,
                    eventContext = "verificationUpsell",
                    origin = "homepage",
                    shouldAutofillAndroidPhoneNumberAtLaunch = true,
                    addPhoneDescriptionKey = v100
                }, v101));
            end,
            navigateDown = function(v102)
                v96(v27(v102));
            end
        };
    end)(v49)))));
    HomePageUpsellCardWithIconWrapper = function(v103)
        return v4.createElement(v49, v2.Dictionary.join({
            navigateToDiscoverabilityModal = v30()
        }, v103));
    end;
    return HomePageUpsellCardWithIconWrapper;
else
    return function(v104)
        local v105 = "phone";
        local v106 = "";
        local v107 = nil;
        local v108 = nil;
        if v104.upsellCardVariation then
            v106 = v104.upsellCardVariation.upsellCardType;
            if v104.upsellCardVariation.titleTextOverride ~= "" and v104.upsellCardVariation.bodyTextOverride ~= "" then
                v107 = v104.upsellCardVariation.titleTextOverride;
                v108 = v104.upsellCardVariation.bodyTextOverride;
            end;
        end;
        if not (v106 ~= v32.ContactMethodPhoneNumberEmailHorizontalLayout) or v106 == v32.ContactMethodPhoneNumberEmailVerticalLayout then
            v105 = "emailOrPhone";
        end;
        local v109 = l_useRoactService_0(v21);
        l_useEffect_0(function()
            v109.reportModalShownWithSection("verificationUpsell", "homepage", v105);
        end, {});
        local v112, v113 = l_useUserExperiment_0({
            v36.PhoneVerificationEntryLayer
        }, function(v110)
            local v111 = v110[v36.PhoneVerificationEntryLayer] or {};
            return v111.ShouldUseLuaPhoneVerificationFlow, v111.ShouldUseUpdatedPhoneVerificationText;
        end);
        local v114 = l_useStyle_0();
        local v115 = v30();
        local v116 = l_useLocalization_0({
            addButtonText = "Feature.ContactMethodUpsell.Action.AddPhoneNumber",
            bodyText = "Feature.ContactMethodUpsell.Label.RecoverYourAccount",
            titleText = "Feature.ContactMethodUpsell.Title.HomePageUpsellCardLockOutTitle",
            addEmailInstead = "Feature.ContactUpsell.Action.AddEmailInstead",
            addPhone = "Feature.ContactMethodUpsell.Label.AddPhone",
            addEmail = "Feature.ContactMethodUpsell.Label.AddEmail"
        });
        local v118 = l_useSelector_0(function(v117)
            return v117.FormFactor;
        end);
        local v119 = l_useDispatch_0();
        local function v120()
            return v119(v26("", "", ""));
        end;
        local function _(v121)
            return v119(v28({
                successCallback = v121,
                addEmailOver13TextKey = "Feature.ContactMethodUpsell.Label.PleaseAddEmail",
                addEmailTitleKey = "Feature.AccountSecurityPrompt.Action.AbortDismissForeverAddEmail",
                isEmailModalCalledFromHomePage = true,
                eventContext = "verificationUpsell",
                origin = "homepage",
                section = "addEmail"
            }));
        end;
        local function _(v123, v124, v125)
            return v119(v29({
                onSuccess = v123,
                onCancelled = v48,
                onAbandoned = v48,
                eventContext = "verificationUpsell",
                origin = "homepage",
                shouldAutofillAndroidPhoneNumberAtLaunch = true,
                addPhoneDescriptionKey = v124
            }, v125));
        end;
        local function _(v127)
            v119(v27(v127));
        end;
        local l_Theme_1 = v114.Theme;
        local l_Color_2 = l_Theme_1.TextEmphasis.Color;
        local l_Font_3 = v114.Font;
        local l_Font_4 = l_Font_3.Header2.Font;
        local v133 = v114.Font.BaseSize * v114.Font.Header2.RelativeSize;
        local l_Color_3 = l_Theme_1.TextDefault.Color;
        local l_Font_5 = l_Font_3.CaptionBody.Font;
        local v136 = v114.Font.BaseSize * v114.Font.CaptionBody.RelativeSize;
        local l_Top_1 = Enum.VerticalAlignment.Top;
        local l_Horizontal_1 = Enum.FillDirection.Horizontal;
        local v139 = 10;
        local v140 = 1;
        local v141 = 2;
        local function v143()
            v109.reportButtonClickedWithSectionAndOrigin(v25.Context.HomepageUpsellCard, v25.Button.Email, v105, "homepage");
            local _ = v119(v28({
                successCallback = v120,
                addEmailOver13TextKey = "Feature.ContactMethodUpsell.Label.PleaseAddEmail",
                addEmailTitleKey = "Feature.AccountSecurityPrompt.Action.AbortDismissForeverAddEmail",
                isEmailModalCalledFromHomePage = true,
                eventContext = "verificationUpsell",
                origin = "homepage",
                section = "addEmail"
            }));
        end;
        local v144 = "Feature.VerificationUpsell.Description.VerificationCodeSmsFeesMayApply";
        local function v148()
            v109.reportButtonClickedWithSectionAndOrigin(v25.Context.HomepageUpsellCard, v25.Button.Phone, v105, "homepage");
            l_IXPService_0:LogUserLayerExposure(v36.PhoneVerificationEntryLayer);
            if not (not v37() or not v113) then
                v144 = "Feature.VerificationUpsell.Description.AddPhoneBody";
            end;
            local v145 = nil;
            if v106 == v32.ContactMethodPhoneNumberVoiceOptIn then
                v145 = true;
            end;
            if not v112 then
                v119(v27({
                    name = v22.PhoneVerification,
                    extraProps = {
                        onSuccessCallback = v120
                    }
                }));
                return ;
            else
                local _ = v119(v29({
                    onSuccess = function()
                        local _ = v119(v26("", "", ""));
                        v115({
                            isStandaloneDiscoverabilityModal = true,
                            navigateOnActivated = v48,
                            entryPoint = l_EntryPoints_0.HomePage
                        });
                    end,
                    onCancelled = v48,
                    onAbandoned = v48,
                    eventContext = "verificationUpsell",
                    origin = "homepage",
                    shouldAutofillAndroidPhoneNumberAtLaunch = true,
                    addPhoneDescriptionKey = v144
                }, v145));
                return ;
            end;
        end;
        local v149 = UDim2.new(1, 0, 0, 0);
        local v150 = UDim2.new(1, 0, 0, 28);
        local v151 = UDim2.new(0.5, 0, 0, 28);
        local v152 = 12;
        local v153 = 12;
        local l_Vertical_1 = Enum.FillDirection.Vertical;
        local v155 = UDim2.new(1, -25, 0, 0);
        local v156 = if not v24() then nil else v116.addEmail;
        if v118 == l_FormFactor_0.WIDE then
            v152 = not v38() and 20 or 12;
            l_Vertical_1 = Enum.FillDirection.Horizontal;
            v151 = UDim2.new(1, 0, 0, 28);
            v153 = 20;
            l_Top_1 = Enum.VerticalAlignment.Center;
            l_Horizontal_1 = Enum.FillDirection.Vertical;
            v139 = 0;
            v140 = 2;
            v141 = 1;
            v116.addEmail = v116.addEmailInstead;
            v116.addPhone = v116.addButtonText;
            v149 = UDim2.new(1, -l_Text_0.GetTextWidth(v116.addButtonText, v114.Font.CaptionHeader.Font, v114.Font.BaseSize * v114.Font.CaptionHeader.RelativeSize) - 30, 0, 0);
            v150 = UDim2.new(0, l_Text_0.GetTextWidth(v116.addButtonText, v114.Font.CaptionHeader.Font, v114.Font.BaseSize * v114.Font.CaptionHeader.RelativeSize) + 15, 0, 28);
        end;
        local l_createElement_1 = v4.createElement;
        local v158 = "Frame";
        local v159 = {
            Position = if not not v38() and v104.isCentered then UDim2.new(0.5, 0, 0, 0) else nil,
            AnchorPoint = if not not v38() and v104.isCentered then Vector2.new(0.5, 0) else nil,
            Size = UDim2.new(1, 0, 0, 0),
            BorderSizePixel = 0,
            BackgroundTransparency = 0,
            BackgroundColor3 = l_Theme_1.BackgroundUIDefault.Color,
            AutomaticSize = Enum.AutomaticSize.Y
        };
        local v160 = {
            UISizeConstraint = v4.createElement("UISizeConstraint", {
                MaxSize = Vector2.new(v47, math.huge)
            }),
            Layout = v4.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = l_Vertical_1,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                Padding = UDim.new(0, v152)
            }),
            UICorner = v4.createElement("UICorner", {
                CornerRadius = UDim.new(0, 12)
            }),
            UIStroke = v4.createElement("UIStroke", {
                Thickness = 1,
                Color = l_Theme_1.SystemPrimaryDefault.Color,
                Transparency = 0.7
            }),
            UIPadding = v4.createElement("UIPadding", {
                PaddingLeft = UDim.new(0, 12),
                PaddingRight = UDim.new(0, not v38() and 12 or v153),
                PaddingTop = UDim.new(0, 12),
                PaddingBottom = UDim.new(0, 12)
            }),
            IconAndTextFrame = v4.createElement("Frame", {
                Size = v149,
                BackgroundTransparency = 1,
                LayoutOrder = 1,
                AutomaticSize = Enum.AutomaticSize.Y
            }, {
                HorizontalLayout = v4.createElement("UIListLayout", {
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    FillDirection = Enum.FillDirection.Horizontal,
                    VerticalAlignment = l_Top_1
                }),
                ImageIcon = v4.createElement(l_ImageSetLabel_0, {
                    AnchorPoint = Vector2.new(1, 0.5),
                    Size = UDim2.new(0, 40, 0, 40),
                    Position = UDim2.new(1, 0, 0.5, 0),
                    Image = if v106 == v32.ContactMethodPhoneNumberVoiceOptIn then v46 else v45,
                    ImageColor3 = v114.Theme.SystemPrimaryDefault.Color,
                    ImageTransparency = v114.Theme.SystemPrimaryDefault.Transparency,
                    BackgroundTransparency = 1
                }),
                TextFrame = v4.createElement("Frame", {
                    Size = v155,
                    BackgroundTransparency = 1,
                    LayoutOrder = 2,
                    AutomaticSize = Enum.AutomaticSize.Y
                }, {
                    VerticalLayout = v4.createElement("UIListLayout", {
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        FillDirection = Enum.FillDirection.Vertical,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        Padding = UDim.new(0, 4)
                    }),
                    UIPadding = v4.createElement("UIPadding", {
                        PaddingLeft = UDim.new(0, 12)
                    }),
                    TitleTextLabel = v4.createElement("TextLabel", {
                        Size = v155,
                        LayoutOrder = 1,
                        Font = l_Font_4,
                        BorderSizePixel = 0,
                        Text = v107 or v116.titleText,
                        TextColor3 = l_Color_2,
                        TextSize = v133,
                        TextWrapped = true,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        BackgroundTransparency = 0,
                        BackgroundColor3 = l_Theme_1.BackgroundUIDefault.Color,
                        AutomaticSize = Enum.AutomaticSize.Y
                    }),
                    BodyTextLabel = v4.createElement("TextLabel", {
                        Size = v155,
                        LayoutOrder = 2,
                        Font = l_Font_5,
                        BorderSizePixel = 0,
                        Text = v108 or v116.bodyText,
                        TextColor3 = l_Color_3,
                        TextSize = v136,
                        TextWrapped = true,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        BackgroundTransparency = 0,
                        BackgroundColor3 = l_Theme_1.BackgroundUIDefault.Color,
                        AutomaticSize = Enum.AutomaticSize.Y
                    })
                })
            })
        };
        local v161 = false;
        if v106 == v32.ContactMethodPhoneNumberEmailHorizontalLayout then
            v161 = v4.createElement("Frame", {
                Size = v150,
                BackgroundTransparency = 1,
                LayoutOrder = 2
            }, {
                OrientationLayout = v4.createElement("UIListLayout", {
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    FillDirection = l_Horizontal_1,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    Padding = UDim.new(0, 10)
                }),
                UIPadding = v4.createElement("UIPadding", {
                    PaddingRight = UDim.new(0, v139)
                }),
                HorizontalCallToActionButton = v4.createElement(v16, {
                    Size = v151,
                    BackgroundTransparency = 0,
                    Text = v116.addEmail,
                    LayoutOrder = v140,
                    Font = v114.Font.CaptionHeader.Font,
                    TextSize = v114.Font.BaseSize * v114.Font.CaptionHeader.RelativeSize,
                    onActivated = v143,
                    BackgroundColor3 = l_Theme_1.BackgroundUIDefault.Color,
                    themeSettings = {
                        Color = l_Theme_1.SystemPrimaryContent.Color,
                        Transparency = l_Theme_1.SystemPrimaryContent.Transparency,
                        OnPressTransparency = 0.5,
                        DisabledTransparency = 0.5,
                        Text = {
                            Color = l_Theme_1.SystemPrimaryDefault.Color,
                            Transparency = l_Theme_1.SystemPrimaryDefault.Transparency
                        },
                        Border = {
                            Hidden = false,
                            Transparency = 0,
                            Color = l_Theme_1.SystemPrimaryDefault.Color
                        }
                    }
                }),
                SecondHorizontalCallToActionButton = if not v39() then v4.createElement(v14, {
                    Size = v151,
                    BackgroundTransparency = 0,
                    Text = v116.addPhone,
                    LayoutOrder = v141,
                    fontStyle = "CaptionHeader",
                    onActivated = v148,
                    BackgroundColor3 = l_Theme_1.BackgroundOnHover.Color
                }) else v4.createElement(l_Button_0, {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    size = v151,
                    text = v116.addPhone,
                    layoutOrder = v141,
                    fontStyle = "CaptionHeader",
                    onActivated = v148
                })
            });
        end;
        v160.FirstVariantFrame = v161;
        if not v24() then
            v161 = v106 ~= v32.ContactMethodPhoneNumberEmailHorizontalLayout;
        else
            v161 = false;
            if v106 ~= v32.ContactMethodPhoneNumberEmailHorizontalLayout then
                v161 = v106 ~= v32.ContactMethodEmail;
            end;
        end;
        if v161 then
            v161 = v4.createElement;
            local v162 = "Frame";
            local v163 = {
                Size = v150,
                BackgroundTransparency = 1,
                LayoutOrder = 2,
                AutomaticSize = Enum.AutomaticSize.Y
            };
            local v164 = {
                VerticalLayout = v4.createElement("UIListLayout", {
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    FillDirection = Enum.FillDirection.Vertical,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    Padding = UDim.new(0, 10)
                }),
                CallToActionButton = if not v39() then v4.createElement(v14, {
                    Size = v150,
                    BackgroundTransparency = 0,
                    Text = v116.addButtonText,
                    LayoutOrder = 1,
                    fontStyle = "CaptionHeader",
                    onActivated = v148,
                    BackgroundColor3 = l_Theme_1.BackgroundUIDefault.Color
                }) else v4.createElement(l_Button_0, {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    size = v150,
                    text = v116.addButtonText,
                    layoutOrder = 1,
                    fontStyle = "CaptionHeader",
                    onActivated = v148
                })
            };
            local v165 = false;
            if v106 == v32.ContactMethodPhoneNumberEmailVerticalLayout then
                v165 = v4.createElement(v16, {
                    Size = v150,
                    BackgroundTransparency = 0,
                    Text = v116.addEmailInstead,
                    LayoutOrder = 2,
                    Font = v114.Font.CaptionHeader.Font,
                    TextSize = v114.Font.BaseSize * v114.Font.CaptionHeader.RelativeSize,
                    onActivated = v143,
                    BackgroundColor3 = l_Theme_1.BackgroundOnHover.Color,
                    themeSettings = {
                        Color = l_Theme_1.SystemPrimaryContent.Color,
                        Transparency = l_Theme_1.SystemPrimaryContent.Transparency,
                        OnPressTransparency = 0.5,
                        DisabledTransparency = 0.5,
                        Text = {
                            Color = l_Theme_1.SystemPrimaryDefault.Color,
                            Transparency = l_Theme_1.SystemPrimaryDefault.Transparency
                        },
                        Border = {
                            Hidden = false,
                            Transparency = 1
                        }
                    }
                });
            end;
            v164.SecondVerticalCallToActionButton = v165;
            v161 = v161(v162, v163, v164);
        end;
        v160.SecondVariantFrame = v161;
        v161 = v24();
        if v161 then
            v161 = false;
            if v106 == v32.ContactMethodEmail then
                v161 = v4.createElement("Frame", {
                    Size = v150,
                    BackgroundTransparency = 1,
                    LayoutOrder = 2
                }, {
                    OrientationLayout = v4.createElement("UIListLayout", {
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        FillDirection = l_Horizontal_1,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        Padding = UDim.new(0, 10)
                    }),
                    UIPadding = v4.createElement("UIPadding", {
                        PaddingRight = UDim.new(0, v139)
                    }),
                    HorizontalCallToActionButton = v4.createElement(l_Button_0, {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        size = v150,
                        text = v156,
                        layoutOrder = 1,
                        fontStyle = "CaptionHeader",
                        onActivated = v143
                    })
                });
            end;
        end;
        v160.EmailVariantFrame = v161;
        return l_createElement_1(v158, v159, v160);
    end;
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local v4 = require(l_CorePackages_0.Cryo);
local v5 = require(l_Modules_0.Common.memoize);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v7 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v8 = require(l_Modules_0.LuaApp.Services.RoactAnalyticsSocialProfileShare);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v10 = require(l_Modules_0.LuaApp.Experiment.RoactAppExperiment);
local v11 = require(l_Modules_0.LuaApp.Experiment.AppUserLayers);
local v12 = require(l_Modules_0.LuaApp.AppPage);
local v13 = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local v14 = require(l_Modules_0.LuaApp.Components.Home.UserInfoWidget);
local v15 = require(l_Modules_0.LuaApp.Thunks.OpenProfilePeekView);
local v16 = require(l_Modules_0.LuaApp.Http.UrlBuilder);
local v17 = require(l_Modules_0.LuaApp.EventStreamConstants);
local v18 = require(l_Modules_0.Profile.Analytics.ProfileAnalytics);
local v19 = require(l_Modules_0.Profile.Analytics.EntryPoints);
local l_EntryPoints_0 = require(l_CorePackages_0.Workspace.Packages.DiscoverabilityModal).Analytics.EntryPoints;
local v21 = require(l_Modules_0.LuaApp.Components.DiscoverabilityModal.useNavigateToDiscoverabilityModal);
local l_Sources_0 = require(l_CorePackages_0.Workspace.Packages.SocialLuaAnalytics).Analytics.Enums.Sources;
local v23 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaProfileShareEnabled);
local v24 = require(l_Modules_0.LuaApp.Flags.GetFFlagEnableHomePageUpsellCard);
local l_FFlagLuaAppConsolidateProfileLogging_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).FFlagLuaAppConsolidateProfileLogging;
local l_SelfViewProfileDiscoverabilityUpsellIXP_0 = require(l_CorePackages_0.Workspace.Packages.DiscoverabilityModal).Flags.SelfViewProfileDiscoverabilityUpsellIXP;
local v27 = v2.PureComponent:extend("HomeUserInfoWidget");
v27.init = function(v28)
    v28.navigateToProfile = function()
        local l_id_0 = v28.props.localUserModel.id;
        if not l_FFlagLuaAppConsolidateProfileLogging_0 then
            v18.new({
                localUserId = v28.props.localUserId,
                profileUserId = v28.props.profileUserId
            }):navigateToProfile(v19.HomePageSelf);
            v28.props.openProfilePeekView(l_id_0);
            return ;
        else
            v28.props.openProfilePeekView(l_id_0, {
                source = l_Sources_0.HomePageSelfWidget
            });
            return ;
        end;
    end;
    v28.onUsernameActivated = function()
        if v28.props.enableHomeProfileLink then
            local l_id_1 = v28.props.localUserModel.id;
            local l_navigateDown_0 = v28.props.navigateDown;
            if not v28.props.luaProfileEnabled then
                if not v28.props.discoverabilityUpsellOnProfileSelfViewEnabled then
                    l_navigateDown_0({
                        name = v12.ViewUserProfile,
                        detail = l_id_1
                    });
                    return ;
                else
                    v28.props.navigateToDiscoverabilityModal({
                        isStandaloneDiscoverabilityModal = true,
                        navigateOnActivated = function()
                            l_navigateDown_0({
                                name = v12.ViewUserProfile,
                                detail = l_id_1
                            });
                        end,
                        entryPoint = l_EntryPoints_0.HomePageProfile
                    });
                    return ;
                end;
            elseif not v28.props.discoverabilityUpsellOnProfileSelfViewEnabled then
                v28.navigateToProfile();
                return ;
            else
                v28.props.navigateToDiscoverabilityModal({
                    isStandaloneDiscoverabilityModal = true,
                    navigateOnActivated = v28.navigateToProfile,
                    entryPoint = l_EntryPoints_0.HomePageProfile
                });
                return ;
            end;
        else
            return ;
        end;
    end;
    v28.onProfileShareActivated = function()
        v28.props.profileShareAnalytics.inviterButtonClick(v17.Context.Home);
        v28.props.navigateDown({
            name = v12.ShareSheet,
            extraProps = {
                context = "ProfileShareAtHomePage",
                url = v16.user.appsflyer({
                    userId = v28.props.localUserModel.id,
                    sourceType = "ProfileShare"
                })
            }
        });
    end;
end;
v27.render = function(v32)
    local l_localUserModel_0 = v32.props.localUserModel;
    local l_layoutOrder_0 = v32.props.layoutOrder;
    local l_sideMargin_0 = v32.props.sideMargin;
    if l_localUserModel_0 then
        local v36 = nil;
        if v24() then
            v36 = v32.props.homePageUpsellCardVariation;
        end;
        return v2.createElement(v14, {
            layoutOrder = l_layoutOrder_0,
            localUserModel = l_localUserModel_0,
            onActivated = v32.onUsernameActivated,
            isProfileShareEnabled = v32.props.isProfileSharePolicyEnabled and (v23() or v32.props.luaProfileShareEnabled),
            onActivatedProfileShare = v32.onProfileShareActivated,
            sideMargin = l_sideMargin_0,
            upsellCardVariation = v36
        });
    else
        return nil;
    end;
end;
local v39 = v5(function(v37, v38)
    return v37[v38];
end);
v27 = l_RoactServices_0.connect({
    networking = v7,
    profileShareAnalytics = v8
})((v10.connectUserLayer({
    v11.SocialFriendsLayer,
    v11.SocialProfileLayer
}, function(v40, _)
    local v42 = v40[v11.SocialFriendsLayer] or {};
    return {
        luaProfileShareEnabled = v42.show_profile_share == "True",
        luaProfileEnabled = v42.show_lua_profile,
        discoverabilityUpsellOnProfileSelfViewEnabled = l_SelfViewProfileDiscoverabilityUpsellIXP_0.experimentOrRolloutEnabled(v40)
    };
end)((l_RoactAppPolicy_0.connect(function(v43, _)
    return {
        enableHomeProfileLink = v43.getHomePageProfileLink(),
        isProfileSharePolicyEnabled = v43.getProfileShareEnabled()
    };
end)((v3.connect(function(v45, _)
    local v47 = nil;
    if v24() then
        v47 = v45.HomePageUpsellCardVariation;
    end;
    return {
        localUserModel = v39(v45.Users, v45.LocalUserId),
        homePageUpsellCardVariation = v47
    };
end, function(v48)
    return {
        navigateDown = function(v49)
            v48(v13(v49));
        end,
        openProfilePeekView = function(v50, v51)
            v48(v15(v50, v51));
        end
    };
end)(v27)))))));
HomeUserInfoWidgetWrapper = function(v52)
    return v2.createElement(v27, v4.Dictionary.join({
        navigateToDiscoverabilityModal = v21()
    }, v52));
end;
return HomeUserInfoWidgetWrapper;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_Modules_0.Common.Roact);
local v3 = require(l_Modules_0.Common.RoactRodux);
local l_withStyle_0 = require(l_CorePackages_0.UIBlox).Style.withStyle;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local l_RoactAnalyticsCommonGameEvents_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).RoactAnalyticsCommonGameEvents;
local v7 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v9 = require(l_Modules_0.LuaApp.Constants);
local v10 = require(l_Modules_0.LuaApp.withLocalization);
local v11 = require(l_Modules_0.LuaApp.Components.FitImageTextButton);
local v12 = require(l_Modules_0.LuaApp.Models.User);
local l_FriendIcon_0 = require(l_CorePackages_0.Workspace.Packages.GameTile).FriendIcon;
local v14 = require(l_Modules_0.LuaApp.Util.joinGame);
local v15 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppUseWithLocalization);
local l_SourceSans_0 = Enum.Font.SourceSans;
local l_AvatarSize_0 = v9.PlacesList.ContextualMenu.AvatarSize;
local l_HorizontalInnerPadding_0 = v9.PlacesList.ContextualMenu.HorizontalInnerPadding;
local l_HorizontalOuterPadding_0 = v9.PlacesList.ContextualMenu.HorizontalOuterPadding;
local v20 = (l_HorizontalOuterPadding_0 + l_AvatarSize_0) + l_HorizontalInnerPadding_0;
local v21 = v2.PureComponent:extend("JoinableFriendEntry");
v21.defaultProps = {
    layoutOrder = 0
};
v21.init = function(v22)
    v22.state = {
        joinButtonWidth = 60
    };
    v22.joinButtonRef = v2.createRef();
    v22.onJoinButtonActivated = function()
        local l_analytics_0 = v22.props.analytics;
        local l_upToDateUser_0 = v22.props.upToDateUser;
        local l_universePlaceInfo_0 = v22.props.universePlaceInfo;
        local l_placeId_0 = l_universePlaceInfo_0.placeId;
        local l_universeRootPlaceId_0 = l_universePlaceInfo_0.universeRootPlaceId;
        v14:ByUser(l_upToDateUser_0, v9.AnalyticsContext.GamePlayIntentInPlacesList, function(v28)
            l_analytics_0.reportJoinGameInPlacesList(l_upToDateUser_0.id, l_placeId_0, l_universeRootPlaceId_0, l_upToDateUser_0.gameInstanceId, v28);
        end);
    end;
    v22.updateJoinButtonWidth = function()
        local l_current_0 = v22.joinButtonRef.current;
        if l_current_0 then
            v22:setState({
                joinButtonWidth = l_current_0.AbsoluteSize.X
            });
        end;
    end;
end;
v21.didMount = function(v30)
    v30.updateJoinButtonWidth();
end;
v21.render = function(v31)
    local l_user_0 = v31.props.user;
    local l_upToDateUser_1 = v31.props.upToDateUser;
    local l_layoutOrder_0 = v31.props.layoutOrder;
    local l_entryHeight_0 = v31.props.entryHeight;
    local l_entryWidth_0 = v31.props.entryWidth;
    local l_universeId_0 = v31.props.universeId;
    local l_localization_0 = v31.props.localization;
    local l_universePlaceInfo_1 = v31.props.universePlaceInfo;
    local l_joinButtonWidth_0 = v31.state.joinButtonWidth;
    local v41 = nil;
    local v42 = not not l_universePlaceInfo_1 and (l_universePlaceInfo_1.isPlayable or false);
    v41 = not l_entryWidth_0 and 60 or math.max((l_entryWidth_0 - l_HorizontalInnerPadding_0) / 2 - l_HorizontalInnerPadding_0, 60);
    local v43 = ((l_HorizontalOuterPadding_0 * 2 + l_AvatarSize_0) + l_HorizontalInnerPadding_0 * 2) + l_joinButtonWidth_0;
    local function v59(v44, v45)
        local v46 = nil;
        local l_GREEN_PRIMARY_0 = v9.Color.GREEN_PRIMARY;
        local v48 = 0;
        local l_WHITE_0 = v9.Color.WHITE;
        local v50 = 0;
        local l_l_SourceSans_0_0 = l_SourceSans_0;
        local l_l_SourceSans_0_1 = l_SourceSans_0;
        local l_BLACK_0 = v9.Color.BLACK;
        local v54 = 0;
        local v55 = 22;
        local l_WHITE_1 = v9.Color.WHITE;
        local v57 = 0;
        local l_name_0 = l_user_0.name;
        if v31.props.enableDisplayNamePolicy then
            l_name_0 = l_user_0.displayName;
        end;
        if v44 then
            l_GREEN_PRIMARY_0 = v44.Theme.ContextualPrimaryDefault.Color;
            v48 = v44.Theme.ContextualPrimaryDefault.Transparency;
            l_WHITE_0 = v44.Theme.ContextualPrimaryContent.Color;
            v50 = v44.Theme.ContextualPrimaryContent.Transparency;
            l_l_SourceSans_0_0 = v44.Font.Header2.Font;
            l_l_SourceSans_0_1 = v44.Font.Body.Font;
            l_BLACK_0 = v44.Theme.TextDefault.Color;
            v54 = v44.Theme.TextDefault.Transparency;
            v55 = v44.Font.BaseSize * v44.Font.Body.RelativeSize;
            l_WHITE_1 = v44.Theme.BackgroundUIDefault.Color;
            v57 = v44.Theme.BackgroundUIDefault.Transparency;
        end;
        if not (l_upToDateUser_1.presence == v12.PresenceType.IN_GAME and tostring(l_upToDateUser_1.universeId) == tostring(l_universeId_0)) or not v42 then
            v46 = nil;
            if not v44 then
                l_GREEN_PRIMARY_0 = v9.Color.GREEN_DISABLED;
            else
                v48 = v48 * 0.5;
                v50 = v50 * 0.5;
            end;
        else
            v46 = v31.onJoinButtonActivated;
        end;
        return v2.createElement("Frame", {
            Size = UDim2.new(0, l_entryWidth_0, 0, l_entryHeight_0),
            BackgroundColor3 = l_WHITE_1,
            BackgroundTransparency = v57,
            BorderSizePixel = 0,
            LayoutOrder = l_layoutOrder_0
        }, {
            AvatarHolder = v2.createElement("Frame", {
                Size = UDim2.new(0, l_AvatarSize_0, 0, l_AvatarSize_0),
                AnchorPoint = Vector2.new(0, 0.5),
                Position = UDim2.new(0, l_HorizontalOuterPadding_0, 0.5, 0),
                BackgroundTransparency = 1,
                BorderSizePixel = 0
            }, {
                Avatar = v2.createElement(l_FriendIcon_0, {
                    user = l_upToDateUser_1,
                    itemSize = l_AvatarSize_0,
                    layoutOrder = 1,
                    maskColor = l_WHITE_1
                })
            }),
            Username = v2.createElement("Frame", {
                Size = UDim2.new(1, -v43, 1, 0),
                BorderSizePixel = 0,
                BackgroundTransparency = 1,
                AnchorPoint = Vector2.new(0, 0.5),
                Position = UDim2.new(0, v20, 0.5, 0)
            }, {
                Text = v2.createElement("TextLabel", {
                    BackgroundTransparency = 1,
                    BorderSizePixel = 0,
                    Size = UDim2.new(1, 0, 1, 0),
                    Text = l_name_0,
                    TextSize = v55,
                    Font = l_l_SourceSans_0_1,
                    TextColor3 = l_BLACK_0,
                    TextTransparency = v54,
                    TextTruncate = Enum.TextTruncate.AtEnd,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextYAlignment = Enum.TextYAlignment.Center
                })
            }),
            JoinButton = v2.createElement(v11, {
                backgroundColor = l_GREEN_PRIMARY_0,
                backgroundTransparency = v48,
                backgroundImage = "LuaApp/9-slice/input-default",
                leftIconEnabled = false,
                height = 32,
                minWidth = 60,
                maxWidth = v41,
                text = v45.joinText,
                textFont = l_l_SourceSans_0_0,
                textColor = l_WHITE_0,
                textTransparency = v50,
                anchorPoint = Vector2.new(1, 0.5),
                position = UDim2.new(1, -l_HorizontalOuterPadding_0, 0.5, 0),
                onActivated = v46,
                [v2.Ref] = v31.joinButtonRef,
                [v2.Change.AbsoluteSize] = v31.updateJoinButtonWidth
            })
        });
    end;
    local function v62(v60)
        return l_withStyle_0(function(v61)
            return v59(v61, v60);
        end);
    end;
    if not v15() then
        return v62({
            joinText = l_localization_0:Format("Feature.Chat.Drawer.Join")
        });
    else
        return v10({
            joinText = "Feature.Chat.Drawer.Join"
        })(v62);
    end;
end;
return (l_RoactAppPolicy_0.connect(function(v63, _)
    return {
        enableDisplayNamePolicy = v63.getShowDisplayName()
    };
end)((l_RoactServices_0.connect({
    analytics = l_RoactAnalyticsCommonGameEvents_0,
    localization = v7
})((v3.connect(function(v65, v66)
    return {
        upToDateUser = v65.Users[v66.user.id],
        universePlaceInfo = v65.UniversePlaceInfos[v66.universeId]
    };
end)(v21))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(l_Modules_0.Common.Roact);
local v2 = require(l_Modules_0.Common.RoactRodux);
local v3 = require(l_Modules_0.Common.memoize);
local v4 = require(l_Modules_0.LuaApp.sortFriendsByPresenceAndRecency);
local v5 = require(l_Modules_0.LuaApp.Constants);
local v6 = require(l_Modules_0.LuaApp.Components.Home.JoinableFriendEntry);
local v7 = (v5.PlacesList.ContextualMenu.HorizontalOuterPadding + v5.PlacesList.ContextualMenu.AvatarSize) + v5.PlacesList.ContextualMenu.HorizontalInnerPadding;
local v8 = v1.PureComponent:extend("JoinableFriendsList");
local function v10(v9)
    return v1.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, 1),
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        LayoutOrder = v9.layoutOrder
    }, {
        BottomDivider = v1.createElement("Frame", {
            Size = UDim2.new(1, -v7, 1, 0),
            AnchorPoint = Vector2.new(1, 1),
            Position = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = v5.Color.GRAY4,
            BorderSizePixel = 0
        })
    });
end;
v8.defaultProps = {
    layoutOrder = 0
};
v8.init = function(v11)
    v11.state = {
        friends = v11.props.friends
    };
end;
v8.render = function(v12)
    local l_LayoutOrder_0 = v12.props.LayoutOrder;
    local l_maxHeight_0 = v12.props.maxHeight;
    local l_width_0 = v12.props.width;
    local l_universeId_0 = v12.props.universeId;
    local v17 = v12.state.friends or {};
    local v18 = {
        ListLayout = v1.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder
        })
    };
    for v19, v20 in ipairs(v17) do
        local v21 = v19 * 2;
        local v22 = v19 < #v17;
        v18["Entry_" .. v20.name] = v1.createElement(v6, {
            user = v20,
            layoutOrder = v21,
            entryHeight = 67,
            entryWidth = l_width_0,
            universeId = l_universeId_0
        });
        v18["Divider_" .. v20.name] = v22 and v1.createElement(v10, {
            layoutOrder = v21 + 1
        });
    end;
    local v23 = 67 * #v17 + 1 * (#v17 - 1);
    return v1.createElement("ScrollingFrame", {
        LayoutOrder = l_LayoutOrder_0,
        Size = UDim2.new(1, 0, 0, (math.min(l_maxHeight_0, v23))),
        CanvasSize = UDim2.new(1, 0, 0, v23),
        BackgroundColor3 = v5.Color.WHITE,
        BorderSizePixel = 0,
        ScrollBarThickness = 0
    }, v18);
end;
local v30 = v3(function(v24, v25)
    if v24 and v25 then
        local v26 = {};
        for _, v28 in pairs(v25) do
            local v29 = v24[v28];
            if not (not v29 or not v29.isFriend) then
                table.insert(v26, v29);
            end;
        end;
        table.sort(v26, v4);
        return v26;
    else
        return {};
    end;
end);
return (v2.connect(function(v31, v32)
    return {
        friends = v30(v31.Users, v31.InGameUsersByGame[v32.universeId])
    };
end)(v8));


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_Modules_0.Common.Roact);
local v3 = require(l_Modules_0.Common.RoactRodux);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local l_RoactAnalyticsCommonGameEvents_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).RoactAnalyticsCommonGameEvents;
local v6 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local l_AppGuiService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppGuiService;
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v9 = require(l_Modules_0.LuaApp.AppPage);
local v10 = require(l_Modules_0.LuaApp.Constants);
local v11 = require(l_Modules_0.LuaApp.FitChildren);
local v12 = require(l_Modules_0.LuaApp.withLocalization);
local l_FormFactor_0 = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local v14 = require(l_Modules_0.LuaApp.Enum.FeatureContext);
local v15 = require(l_Modules_0.LuaApp.Enum.NotificationType);
local v16 = require(l_Modules_0.LuaApp.Thunks.CloseCentralOverlay);
local v17 = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local v18 = require(l_Modules_0.LuaApp.Models.User);
local v19 = require(l_Modules_0.LuaApp.Components.ListPicker);
local v20 = require(l_Modules_0.LuaApp.Components.Home.UserActiveGame);
local v21 = require(l_Modules_0.LuaApp.Components.FormBasedContextualMenu);
local l_EnteredChatFromEntryPoint_0 = require(l_CorePackages_0.Workspace.Packages.AppChat).Actions.EnteredChatFromEntryPoint;
local l_ChatEntryPointNames_0 = require(l_CorePackages_0.Workspace.Packages.SocialCommon).Enums.ChatEntryPointNames;
local v24 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppUseWithLocalization);
local v25 = v2.PureComponent:extend("PeopleListContextualMenu");
local l_DEFAULT_WIDE_CONTEXTUAL_MENU__WIDTH_0 = v10.DEFAULT_WIDE_CONTEXTUAL_MENU__WIDTH;
v25.defaultProps = {
    positionIndex = 0,
    absolutePosition = 0
};
v25.init = function(v27)
    local l_analytics_0 = v27.props.analytics;
    local l_guiService_0 = v27.props.guiService;
    local l_closeCentralOverlay_0 = v27.props.closeCentralOverlay;
    local l_navigateDown_0 = v27.props.navigateDown;
    local l_user_0 = v27.props.user;
    local l_positionIndex_0 = v27.props.positionIndex;
    local l_absolutePosition_0 = v27.props.absolutePosition;
    local l_source_0 = v27.props.source;
    v27.chatWithUser = function(v36)
        l_analytics_0.reportPeopleListInteraction("ChatDropdown", v36, l_positionIndex_0, l_absolutePosition_0, v27.props.analyticContext, {
            source = l_source_0
        });
        v27.props.enteredChatFromEntryPoint(l_ChatEntryPointNames_0.PeopleListDropdown);
        l_guiService_0:BroadcastNotification(v36, v15.LAUNCH_CONVERSATION);
    end;
    v27.viewProfile = function(v37)
        l_analytics_0.reportPeopleListInteraction("ProfileDropdown", v37, l_positionIndex_0, l_absolutePosition_0, v27.props.analyticContext);
        l_navigateDown_0({
            name = v9.ViewUserProfile,
            detail = v37,
            extraProps = {
                onClose = function()
                    l_closeCentralOverlay_0();
                    if v27.props.onCloseProfileWebview then
                        v27.props.onCloseProfileWebview();
                    end;
                end
            }
        });
    end;
    l_analytics_0.reportPeopleListInteraction("openPeopleList", l_user_0.id, l_positionIndex_0, l_absolutePosition_0, v27.props.analyticContext, {
        source = v27.props.source,
        universeId = if l_user_0.presence == v18.PresenceType.IN_GAME then l_user_0.universeId else nil
    });
end;
v25.didMount = function(v38)
    local l_onOpen_0 = v38.props.onOpen;
    if l_onOpen_0 then
        l_onOpen_0();
    end;
end;
v25.render = function(v40)
    local l_localization_0 = v40.props.localization;
    local l_screenSize_0 = v40.props.screenSize;
    local l_formFactor_0 = v40.props.formFactor;
    local l_closeCentralOverlay_1 = v40.props.closeCentralOverlay;
    local l_user_1 = v40.props.user;
    local l_positionIndex_1 = v40.props.positionIndex;
    local l_absolutePosition_1 = v40.props.absolutePosition;
    local l_anchorSpaceSize_0 = v40.props.anchorSpaceSize;
    local l_anchorSpacePosition_0 = v40.props.anchorSpacePosition;
    local l_combinedName_0 = v40.props.combinedName;
    local v51 = false;
    if l_user_1.presence == v18.PresenceType.IN_GAME then
        v51 = l_user_1.universeId;
    end;
    local v52 = not not (l_formFactor_0 == l_FormFactor_0.COMPACT) and l_screenSize_0.X or l_DEFAULT_WIDE_CONTEXTUAL_MENU__WIDTH_0;
    local function v54(v53)
        return v2.createElement(v21, {
            anchorSpaceSize = l_anchorSpaceSize_0,
            anchorSpacePosition = l_anchorSpacePosition_0,
            itemWidth = v52
        }, {
            Content = v2.createElement(v11.FitFrame, {
                BackgroundTransparency = 1,
                fitAxis = v11.FitAxis.Height,
                Size = UDim2.new(1, 0, 0, 0)
            }, {
                ListLayout = v2.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    SortOrder = Enum.SortOrder.LayoutOrder
                }),
                GameHeader = v51 and v2.createElement(v20, {
                    friend = l_user_1,
                    layoutOrder = 1,
                    width = v52,
                    index = l_positionIndex_1,
                    absolutePosition = l_absolutePosition_1,
                    universeId = l_user_1.universeId,
                    dismissContextualMenu = l_closeCentralOverlay_1,
                    featureContext = v14.PeopleList,
                    onCloseGameDetails = v40.props.onCloseGameDetails,
                    source = v40.props.source
                }),
                ListPicker = v2.createElement(v19, {
                    formFactor = l_formFactor_0,
                    items = if v40.props.areWebViewsSupported then {
                        {
                            displayIcon = "LuaApp/icons/menu/menu_messages",
                            text = v53.chatWithFriendText,
                            onSelect = function()
                                v40.chatWithUser(l_user_1.id);
                            end
                        },
                        {
                            displayIcon = "LuaApp/icons/menu/menu_profile",
                            text = v53.viewProfileText,
                            onSelect = function()
                                v40.viewProfile(l_user_1.id);
                            end
                        }
                    } else {
                        {
                            displayIcon = "LuaApp/icons/menu/menu_messages",
                            text = v53.chatWithFriendText,
                            onSelect = function()
                                v40.chatWithUser(l_user_1.id);
                            end
                        }
                    },
                    layoutOrder = 2,
                    width = v52,
                    maxHeight = 162
                })
            })
        });
    end;
    if not v24() then
        return v54({
            chatWithFriendText = l_localization_0:Format("Feature.Home.PeopleList.ChatWith", {
                username = l_combinedName_0
            }),
            viewProfileText = l_localization_0:Format("Feature.Chat.Label.ViewProfile")
        });
    else
        return v12({
            chatWithFriendText = {
                "Feature.Home.PeopleList.ChatWith";
                username = l_combinedName_0
            },
            viewProfileText = "Feature.Chat.Label.ViewProfile"
        })(v54);
    end;
end;
v25.willUnmount = function(v55)
    local l_onClose_0 = v55.props.onClose;
    if l_onClose_0 then
        l_onClose_0();
    end;
end;
return (l_RoactAppPolicy_0.connect(function(v57, _)
    return {
        enableDisplayNamePolicy = v57.getShowDisplayName(),
        areWebViewsSupported = v57.getWebViewSupport()
    };
end)((l_RoactServices_0.connect({
    analytics = l_RoactAnalyticsCommonGameEvents_0,
    localization = v6,
    guiService = l_AppGuiService_0
})((v3.connect(function(v59, _)
    return {
        formFactor = v59.FormFactor,
        screenSize = v59.ScreenSize
    };
end, function(v61)
    return {
        navigateDown = function(v62)
            v61(v17(v62));
        end,
        closeCentralOverlay = function()
            v61(v16());
        end,
        enteredChatFromEntryPoint = function(v63)
            v61(l_EnteredChatFromEntryPoint_0(v63));
        end
    };
end)(v25))))));


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Cryo);
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_Packages_0 = l_CorePackages_0.Workspace.Packages;
local v4 = require(l_Packages_0.React);
local v5 = require(l_Packages_0.UserProfiles);
local v6 = require(l_Modules_0.LuaApp.Components.Home.PeopleListContextualMenu);
return function(v7)
    local v8 = v5.Hooks.useUserProfilesFetch({
        userIds = {
            v7.user.id
        },
        query = v5.Queries.userProfilesCombinedNameAndUsernameByUserIds
    });
    return v4.createElement(v6, v1.Dictionary.join(v7, {
        combinedName = if not v8.data then nil else v5.Selectors.getCombinedNameFromId(v8.data, v7.user.id)
    }));
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_Modules_0.Common.Roact);
local v3 = require(l_Modules_0.Common.RoactRodux);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local l_RoactAnalyticsCommonGameEvents_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).RoactAnalyticsCommonGameEvents;
local v6 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v7 = require(l_Modules_0.LuaApp.Constants);
local v8 = require(l_Modules_0.LuaApp.Components.Home.JoinableFriendsList);
local l_FormFactor_0 = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local _ = require(l_CorePackages_0.Workspace.Packages.AppTabBarRodux).Actions.SetTabBarVisible;
local v11 = require(l_Modules_0.LuaApp.Thunks.CloseCentralOverlay);
local v12 = require(l_Modules_0.LuaApp.Components.Home.UserActiveGame);
local v13 = require(l_Modules_0.LuaApp.Enum.FeatureContext);
local l_ApiFetchGamesDataByPlaceIds_0 = require(l_CorePackages_0.Workspace.Packages.GameDetailRodux).GamesByPlaceId.ApiFetchGamesDataByPlaceIds;
local v15 = require(l_Modules_0.LuaApp.Components.FormBasedContextualMenu);
local l_DEFAULT_WIDE_CONTEXTUAL_MENU__WIDTH_0 = v7.DEFAULT_WIDE_CONTEXTUAL_MENU__WIDTH;
local l_DEFAULT_CONTEXTUAL_MENU_CANCEL_HEIGHT_0 = v7.DEFAULT_CONTEXTUAL_MENU_CANCEL_HEIGHT;
local v18 = v2.PureComponent:extend("PlacesListContextualMenu");
v18.init = function(v19)
    v19.props.analytics.reportOpenModalFromGameTileForPlacesList(v19.props.game.placeId);
    v19.state = {
        headerHeight = 0
    };
    v19.headerRef = v2.createRef();
    v19.updateHeaderHeight = function()
        v19:setState({
            headerHeight = not not v19.headerRef.current and v19.headerRef.current.AbsoluteSize.Y or 0
        });
    end;
end;
v18.didMount = function(v20)
    v20.props.requestGameData(v20.props.networking, v20.props.game.placeId);
    v20.headerSizeChanged = v20.headerRef.current and v20.headerRef.current:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
        v20.updateHeaderHeight();
    end);
    v20.updateHeaderHeight();
end;
v18.render = function(v21)
    local l_game_0 = v21.props.game;
    local l_anchorSpaceSize_0 = v21.props.anchorSpaceSize;
    local l_anchorSpacePosition_0 = v21.props.anchorSpacePosition;
    local l_screenSize_0 = v21.props.screenSize;
    local l_formFactor_0 = v21.props.formFactor;
    local l_topBarHeight_0 = v21.props.topBarHeight;
    local l_closeCallback_0 = v21.props.closeCallback;
    local l_headerHeight_0 = v21.state.headerHeight;
    local v30 = l_formFactor_0 == l_FormFactor_0.WIDE;
    local v31 = not not v30 and l_DEFAULT_WIDE_CONTEXTUAL_MENU__WIDTH_0 or l_screenSize_0.X;
    return v2.createElement(v15, {
        anchorSpaceSize = l_anchorSpaceSize_0,
        anchorSpacePosition = l_anchorSpacePosition_0,
        itemWidth = v31
    }, {
        Layout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Bottom
        }),
        Header = v2.createElement(v12, {
            layoutOrder = 1,
            width = v31,
            universeId = l_game_0.universeId,
            dismissContextualMenu = l_closeCallback_0,
            featureContext = v13.PlacesList,
            [v2.Ref] = v21.headerRef
        }),
        Divider = v2.createElement("Frame", {
            LayoutOrder = 2,
            Size = UDim2.new(1, 0, 0, 1),
            BackgroundColor3 = v7.Color.GRAY4,
            BorderSizePixel = 0
        }),
        JoinableFriendsList = v2.createElement(v8, {
            LayoutOrder = 3,
            maxHeight = not not v30 and ((l_screenSize_0.Y - (l_topBarHeight_0 + 50)) - (v7.BOTTOM_BAR_SIZE + 10)) - l_headerHeight_0 or l_screenSize_0.Y * 0.5 - l_DEFAULT_CONTEXTUAL_MENU_CANCEL_HEIGHT_0,
            width = v31,
            universeId = l_game_0.universeId
        })
    });
end;
v18.willUnmount = function(v32)
    if v32.headerSizeChanged then
        v32.headerSizeChanged:Disconnect();
    end;
end;
return (l_RoactServices_0.connect({
    analytics = l_RoactAnalyticsCommonGameEvents_0,
    networking = v6
})((v3.connect(function(v33, _)
    return {
        topBarHeight = v33.TopBar.topBarHeight,
        formFactor = v33.FormFactor,
        screenSize = v33.ScreenSize
    };
end, function(v35)
    return {
        requestGameData = function(v36, v37)
            return v35(l_ApiFetchGamesDataByPlaceIds_0(v36, {
                v37
            }));
        end,
        closeCallback = function()
            v35(v11());
        end
    };
end)(v18))));


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_Common_0 = l_Modules_0.Common;
local l_LuaApp_0 = l_Modules_0.LuaApp;
local l_AppGuiService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppGuiService;
local v5 = require(l_LuaApp_0.Constants);
local v6 = require(l_LuaApp_0.FitChildren);
local l_FormFactor_0 = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local v8 = require(l_LuaApp_0.Components.GameButton);
local v9 = require(l_Modules_0.LuaApp.Components.DEPRECATED_ImageSetButton);
local v10 = require(l_CorePackages_0.Roact);
local v11 = require(l_CorePackages_0.Cryo);
local v12 = require(l_CorePackages_0.RoactRodux);
local l_withStyle_0 = require(l_CorePackages_0.UIBlox).Style.withStyle;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local l_RoactAnalyticsCommonGameEvents_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).RoactAnalyticsCommonGameEvents;
local v16 = require(l_LuaApp_0.Enum.FeatureContext);
local l_ConvertUniverseIdToString_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).ConvertUniverseIdToString;
local v18 = require(l_Common_0.Text);
local v19 = require(l_Modules_0.LuaApp.Thunks.OpenGameDetails);
local l_GameIconReducer_0 = require(l_CorePackages_0.Workspace.Packages.GameIconRodux).GameIcons.GameIconReducer;
local l_VIEW_GAME_DETAILS_FROM_ICON_0 = v5.AnalyticsKeyword.VIEW_GAME_DETAILS_FROM_ICON;
local l_VIEW_GAME_DETAILS_FROM_TITLE_0 = v5.AnalyticsKeyword.VIEW_GAME_DETAILS_FROM_TITLE;
local l_game_EngineFeature_0 = game:GetEngineFeature("TextBoundsRoundUp");
local v24 = v10.PureComponent:extend("UserActiveGame");
local function v26(v25)
    return v10.createElement("Frame", {
        BackgroundColor3 = v25.color,
        BackgroundTransparency = v25.transparency,
        BorderSizePixel = 0,
        LayoutOrder = v25.layoutOrder,
        Size = UDim2.new(1, 0, 0, 1)
    });
end;
local function _(v27, v28)
    if not v27 then
        local v29 = v28 and v28.lastLocation;
        if not v29 then
            return "";
        else
            return v29;
        end;
    else
        return v27.name;
    end;
end;
v24.init = function(v31)
    v31.createOpenGameDetailsProps = function()
        return {
            onClose = v31.props.onCloseGameDetails
        };
    end;
    v31.openGameDetails = function(v32)
        local l_universePlaceInfo_0 = v31.props.universePlaceInfo;
        if l_universePlaceInfo_0 then
            local l_analytics_0 = v31.props.analytics;
            local l_friend_0 = v31.props.friend;
            local l_index_0 = v31.props.index;
            local l_absolutePosition_0 = v31.props.absolutePosition;
            local l_dismissContextualMenu_0 = v31.props.dismissContextualMenu;
            local l_featureContext_0 = v31.props.featureContext;
            local l_universeRootPlaceId_0 = l_universePlaceInfo_0.universeRootPlaceId;
            local v41 = l_ConvertUniverseIdToString_0(v31.props.universeId);
            if l_featureContext_0 == v16.PeopleList then
                l_analytics_0.reportViewProfileFromPeopleList(l_friend_0.id, l_index_0, l_absolutePosition_0, l_universeRootPlaceId_0, v32);
                l_analytics_0.reportOpenGameDetailFromPeopleList(l_friend_0.id, l_index_0, l_absolutePosition_0, l_universeRootPlaceId_0, v41, v32, "GameDetailFromUserActiveGame");
            end;
            if l_dismissContextualMenu_0 then
                l_dismissContextualMenu_0();
            end;
            v31.props.openGameDetails(v41, v31.createOpenGameDetailsProps());
            return ;
        else
            return ;
        end;
    end;
    v31.getGameTitleHeight = function(v42, v43, v44, v45)
        local v46 = v18.GetTextHeight(v42, v43, v44, v45);
        if not l_game_EngineFeature_0 then
            v46 = v46 - 2;
        end;
        return (math.min(40, v46));
    end;
end;
v24.createGameNameButton = function(v47, v48, v49, v50, v51, v52)
    local l_Theme_0 = v52.Theme;
    local l_Font_0 = v52.Font;
    return v10.createElement("TextButton", {
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        Font = l_Font_0.Header2.Font,
        LayoutOrder = 1,
        Size = UDim2.new(1, 0, 0, v48),
        Text = v49,
        TextColor3 = l_Theme_0.TextEmphasis.Color,
        TextTransparency = l_Theme_0.TextEmphasis.Transparency,
        TextSize = l_Font_0.BaseSize * l_Font_0.Header2.RelativeSize,
        TextTruncate = Enum.TextTruncate.AtEnd,
        TextWrapped = true,
        TextXAlignment = v50,
        TextYAlignment = v51,
        [v10.Event.Activated] = function()
            v47.openGameDetails(l_VIEW_GAME_DETAILS_FROM_TITLE_0, v47.createOpenGameDetailsProps());
        end
    });
end;
v24.renderPhone = function(v55, v56)
    local l_layoutOrder_0 = v55.props.layoutOrder;
    local l_width_0 = v55.props.width;
    local l_universeId_0 = v55.props.universeId;
    local l_friend_1 = v55.props.friend;
    local l_index_1 = v55.props.index;
    local l_absolutePosition_1 = v55.props.absolutePosition;
    local l_dismissContextualMenu_1 = v55.props.dismissContextualMenu;
    local l_featureContext_1 = v55.props.featureContext;
    local l_gameThumbnail_0 = v55.props.gameThumbnail;
    local l_universePlaceInfo_1 = v55.props.universePlaceInfo;
    local l_forwardRef_0 = v55.props.forwardRef;
    local l_Theme_1 = v56.Theme;
    local l_Font_1 = v56.Font;
    local v70 = l_Font_1.BaseSize * l_Font_1.Header2.RelativeSize;
    local l_Font_2 = l_Font_1.Header2.Font;
    local v72 = if not l_universePlaceInfo_1 then l_friend_1 and l_friend_1.lastLocation or "" else l_universePlaceInfo_1.name;
    local l_Color_0 = l_Theme_1.BackgroundUIDefault.Color;
    local l_Transparency_0 = l_Theme_1.BackgroundUIDefault.Transparency;
    local v75 = not not l_gameThumbnail_0 and l_Color_0 or l_Theme_1.PlaceHolder.Color;
    local v76 = not not l_gameThumbnail_0 and l_Transparency_0 or l_Theme_1.PlaceHolder.Transparency;
    local v77 = l_width_0 - 30;
    return v10.createElement(v6.FitImageButton, {
        BackgroundTransparency = 1,
        fitAxis = v6.FitAxis.Height,
        LayoutOrder = l_layoutOrder_0,
        Size = UDim2.new(1, 0, 0, 0),
        AutoButtonColor = false,
        [v10.Ref] = l_forwardRef_0
    }, {
        GameContent = v10.createElement(v6.FitFrame, {
            BackgroundTransparency = 1,
            fitAxis = v6.FitAxis.Height,
            Size = UDim2.new(1, 0, 0, 0)
        }, {
            Layout = v10.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            GameIcon = v10.createElement("Frame", {
                BackgroundColor3 = v75,
                BackgroundTransparency = v76,
                BorderSizePixel = 0,
                LayoutOrder = 1,
                Size = UDim2.new(0, 94, 0, 94)
            }, {
                Icon = v10.createElement(v9, {
                    BackgroundColor3 = v75,
                    BorderSizePixel = 0,
                    Image = l_gameThumbnail_0,
                    Position = UDim2.new(0, 2, 0, 2),
                    Size = UDim2.new(0, 90, 0, 90),
                    [v10.Event.Activated] = function()
                        v55.openGameDetails(l_VIEW_GAME_DETAILS_FROM_ICON_0, v55.createOpenGameDetailsProps());
                    end
                })
            }),
            GameName = v10.createElement(v6.FitFrame, {
                BackgroundTransparency = 1,
                fitAxis = v6.FitAxis.Height,
                LayoutOrder = 2,
                Size = UDim2.new(1, -30, 0, 0)
            }, {
                Layout = v10.createElement("UIListLayout", {
                    HorizontalAlignment = Enum.HorizontalAlignment.Center
                }),
                NameButton = v55:createGameNameButton(v55.getGameTitleHeight(v72, l_Font_2, v70, v77), v72, Enum.TextXAlignment.Center, Enum.TextYAlignment.Center, v56),
                Padding = v10.createElement("UIPadding", {
                    PaddingTop = UDim.new(0, 12)
                })
            }),
            InteractiveButton = v10.createElement(v6.FitFrame, {
                BackgroundTransparency = 1,
                fitAxis = v6.FitAxis.Height,
                LayoutOrder = 3,
                Size = UDim2.new(1, -30, 0, 0)
            }, {
                Layout = v10.createElement("UIListLayout", {
                    HorizontalAlignment = Enum.HorizontalAlignment.Center
                }),
                Padding = v10.createElement("UIPadding", {
                    PaddingTop = UDim.new(0, 24)
                }),
                Button = v10.createElement(v8, {
                    maxWidth = v77,
                    showLoadingIndicatorWhenDataNotReady = true,
                    universeId = l_universeId_0,
                    friend = l_friend_1,
                    index = l_index_1,
                    absolutePosition = l_absolutePosition_1,
                    callbackOnOpenGameDetails = l_dismissContextualMenu_1,
                    callbackOnJoinGame = l_dismissContextualMenu_1,
                    featureContext = l_featureContext_1,
                    source = v55.props.source
                })
            }),
            Separator = v10.createElement(v6.FitFrame, {
                BackgroundTransparency = 1,
                Size = UDim2.new(1, 0, 0, 0),
                LayoutOrder = 5,
                fitAxis = v6.FitAxis.Height
            }, {
                Layout = v10.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    SortOrder = Enum.SortOrder.LayoutOrder
                }),
                Line = v10.createElement(v26, {
                    color = l_Theme_1.Divider.Color,
                    transparency = l_Theme_1.Divider.Transparency,
                    layoutOrder = 2
                }),
                Padding = v10.createElement("UIPadding", {
                    PaddingTop = UDim.new(0, 23)
                })
            })
        }),
        Background = v10.createElement("Frame", {
            BackgroundColor3 = l_Color_0,
            BackgroundTransparency = l_Transparency_0,
            BorderSizePixel = 0,
            Size = UDim2.new(1, 0, 1, -47),
            Position = UDim2.new(0, 0, 0, 47)
        })
    });
end;
v24.renderTablet = function(v78, v79)
    local l_layoutOrder_1 = v78.props.layoutOrder;
    local l_width_1 = v78.props.width;
    local l_universeId_1 = v78.props.universeId;
    local l_friend_2 = v78.props.friend;
    local l_index_2 = v78.props.index;
    local l_absolutePosition_2 = v78.props.absolutePosition;
    local l_dismissContextualMenu_2 = v78.props.dismissContextualMenu;
    local l_featureContext_2 = v78.props.featureContext;
    local l_gameThumbnail_1 = v78.props.gameThumbnail;
    local l_universePlaceInfo_2 = v78.props.universePlaceInfo;
    local l_forwardRef_1 = v78.props.forwardRef;
    local v91 = if not l_universePlaceInfo_2 then l_friend_2 and l_friend_2.lastLocation or "" else l_universePlaceInfo_2.name;
    local l_Theme_2 = v79.Theme;
    local l_Color_1 = l_Theme_2.BackgroundUIDefault.Color;
    local l_Transparency_1 = l_Theme_2.BackgroundUIDefault.Transparency;
    return v10.createElement(v6.FitImageButton, {
        BackgroundColor3 = l_Color_1,
        BackgroundTransparency = l_Transparency_1,
        BorderSizePixel = 0,
        fitAxis = v6.FitAxis.Height,
        LayoutOrder = l_layoutOrder_1,
        Size = UDim2.new(0, l_width_1, 0, 0),
        AutoButtonColor = false,
        [v10.Ref] = l_forwardRef_1
    }, {
        Layout = v10.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            SortOrder = Enum.SortOrder.LayoutOrder
        }),
        GameContent = v10.createElement(v6.FitFrame, {
            BackgroundTransparency = 1,
            fitAxis = v6.FitAxis.Height,
            LayoutOrder = 1,
            Size = UDim2.new(1, 0, 0, 0)
        }, {
            Padding = v10.createElement("UIPadding", {
                PaddingTop = UDim.new(0, 12),
                PaddingLeft = UDim.new(0, 12),
                PaddingRight = UDim.new(0, 12),
                PaddingBottom = UDim.new(0, 11)
            }),
            Layout = v10.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                SortOrder = Enum.SortOrder.LayoutOrder,
                Padding = UDim.new(0, 15)
            }),
            GameIcon = v10.createElement(v9, {
                BackgroundColor3 = not not l_gameThumbnail_1 and l_Color_1 or l_Theme_2.PlaceHolder.Color,
                BackgroundTransparency = not not l_gameThumbnail_1 and l_Transparency_1 or l_Theme_2.PlaceHolder.Transparency,
                BorderSizePixel = 0,
                LayoutOrder = 1,
                Image = l_gameThumbnail_1,
                Size = UDim2.new(0, 90, 0, 90),
                [v10.Event.Activated] = function()
                    v78.openGameDetails(l_VIEW_GAME_DETAILS_FROM_ICON_0, v78.createOpenGameDetailsProps());
                end
            }, {
                Padding = v10.createElement("UIPadding", {
                    PaddingLeft = UDim.new(0, 12)
                })
            }),
            GameInfo = v10.createElement(v6.FitFrame, {
                BackgroundTransparency = 1,
                fitAxis = v6.FitAxis.Height,
                LayoutOrder = 2,
                Size = UDim2.new(1, -105, 0, 0)
            }, {
                Layout = v10.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    SortOrder = Enum.SortOrder.LayoutOrder
                }),
                NameButton = v78:createGameNameButton(40, v91, Enum.TextXAlignment.Left, Enum.TextYAlignment.Top, v79),
                InteractiveButton = v10.createElement(v6.FitFrame, {
                    BackgroundTransparency = 1,
                    Size = UDim2.new(1, 0, 0, 0),
                    LayoutOrder = 2,
                    fitAxis = v6.FitAxis.Height
                }, {
                    Layout = v10.createElement("UIListLayout", {
                        HorizontalAlignment = Enum.HorizontalAlignment.Right
                    }),
                    Button = v10.createElement(v8, {
                        layoutOrder = 3,
                        maxWidth = (l_width_1 - 36) - 90,
                        showLoadingIndicatorWhenDataNotReady = true,
                        universeId = l_universeId_1,
                        friend = l_friend_2,
                        index = l_index_2,
                        absolutePosition = l_absolutePosition_2,
                        callbackOnOpenGameDetails = l_dismissContextualMenu_2,
                        callbackOnJoinGame = l_dismissContextualMenu_2,
                        featureContext = l_featureContext_2,
                        source = v78.props.source
                    }),
                    Padding = v10.createElement("UIPadding", {
                        PaddingTop = UDim.new(0, 18)
                    })
                })
            })
        }),
        Separator = v10.createElement(v26, {
            layoutOrder = 2
        })
    });
end;
v24.render = function(v95)
    local l_formFactor_0 = v95.props.formFactor;
    return l_withStyle_0(function(v97)
        if l_formFactor_0 == l_FormFactor_0.COMPACT then
            return v95:renderPhone(v97);
        else
            return v95:renderTablet(v97);
        end;
    end);
end;
v24 = l_RoactServices_0.connect({
    analytics = l_RoactAnalyticsCommonGameEvents_0,
    guiService = l_AppGuiService_0
})((v12.connect(function(v98, v99)
    local v100 = l_ConvertUniverseIdToString_0(v99.universeId);
    local _ = nil;
    local v102 = v98[l_GameIconReducer_0.key][v100];
    return {
        formFactor = v98.FormFactor,
        gameThumbnail = v102 and v102.url or v5.DEFAULT_GAME_ICON,
        universePlaceInfo = v98.UniversePlaceInfos[v100]
    };
end, function(v103)
    return {
        openGameDetails = function(v104, v105)
            v103(v19(v104, v105));
        end
    };
end)(v24)));
return v10.forwardRef(function(v106, v107)
    return v10.createElement(v24, v11.Dictionary.join(v106, {
        forwardRef = v107
    }));
end);


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(game:GetService("CorePackages").Roact);
local v2 = require(l_Modules_0.LuaApp.FitChildren);
local v3 = require(l_Modules_0.LuaApp.Components.RetryButton);
local v4 = require(l_Modules_0.LuaApp.Components.LocalizedTextLabel);
local v5 = require(l_Modules_0.LuaApp.withTheme_DEPRECATED);
local v6 = v1.PureComponent:extend("UserAvatarRetryButton");
v6.render = function(v7)
    local l_appTheme_0 = v7.props.appTheme;
    local l_position_0 = v7.props.position;
    local l_anchorPoint_0 = v7.props.anchorPoint;
    local l_maxTextWidth_0 = v7.props.maxTextWidth;
    local l_onRetry_0 = v7.props.onRetry;
    local v13 = UDim2.new(1, 0, 0, 72);
    if l_maxTextWidth_0 then
        v13 = UDim2.new(0, l_maxTextWidth_0, 0, 72);
    end;
    return v1.createElement(v2.FitFrame, {
        Position = l_position_0,
        AnchorPoint = l_anchorPoint_0,
        BackgroundTransparency = 1
    }, {
        ListLayout = v1.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 40)
        }),
        RetryButton = v1.createElement(v3, {
            layoutOrder = 1,
            onRetry = l_onRetry_0,
            Position = UDim2.new(0.5, 0, 0.5, 0),
            AnchorPoint = Vector2.new(0.5, 0.5)
        }),
        FailMessage = v1.createElement(v4, {
            LayoutOrder = 2,
            BorderSizePixel = 0,
            BackgroundTransparency = 1,
            TextXAlignment = Enum.TextXAlignment.Center,
            TextYAlignment = Enum.TextYAlignment.Top,
            Size = v13,
            TextColor3 = l_appTheme_0.Main.BodyText.Color,
            Font = l_appTheme_0.Main.BodyText.Font,
            Text = "Feature.Avatar.Message.FailedToLoadAvatar",
            TextScaled = true
        }, {
            UITextSizeConstraint = v1.createElement("UITextSizeConstraint", {
                MaxTextSize = 24
            })
        })
    });
end;
return (v5(v6));