local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local _ = game:GetService("LocalizationService");
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_Modules_0.LuaApp.Constants);
local v6 = require(l_Modules_0.LuaApp.AppPage);
local _ = require(l_CorePackages_0.Workspace.Packages.Navigation).getCurrentRouteState;
local l_PeekView_0 = require(l_CorePackages_0.Workspace.Packages.PeekView).PeekView;
local l_PeekViewState_0 = require(l_CorePackages_0.Workspace.Packages.PeekView).PeekViewState;
local l_PeekViewWithTopBar_0 = require(l_CorePackages_0.Workspace.Packages.PeekView).PeekViewWithTopBar;
local v11 = require(l_Modules_0.LuaApp.Actions.Games.SetGameDetailsPeekViewState);
local v12 = require(l_Modules_0.LuaApp.Components.GameDetails.GameDetailsTopBar);
local v13 = require(l_Modules_0.LuaApp.Components.GameDetails.ActionBar);
local v14 = require(l_Modules_0.LuaApp.Components.GameDetails.GameDetailsCard);
local l_withStyle_0 = require(l_CorePackages_0.UIBlox).Style.withStyle;
local l_SessionType_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppSessionization).SessionType;
local l_getSafeAreaSize_0 = require(l_CorePackages_0.Workspace.Packages.InputUi).getSafeAreaSize;
local v18 = require(l_CorePackages_0.RoactNavigation);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v20 = require(l_Modules_0.LuaApp.Services.AppEventIngestService);
local l_AppSessionService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppSessionService;
local v22 = require(l_Modules_0.LuaApp.Analytics.Events.Games.gameDetailsPeekViewEvents);
local l_peekViewDismissedEvent_0 = require(l_CorePackages_0.Workspace.Packages.PeekView).analytics.peekViewDismissedEvent;
local v24 = require(l_Modules_0.Profile.Flags.ProfileIXPTest);
local v25 = require(l_Modules_0.LuaApp.Experiment.RoactAppExperiment);
local v26 = require(l_Modules_0.LuaApp.Experiment.AppUserLayers);
local l_GetFFlagPeekViewScrimEnabledIXP_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagPeekViewScrimEnabledIXP;
local l_GetFFlagPeekViewScrimEnabled_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagPeekViewScrimEnabled;
local l_GetFFlagPeekViewScrimLogging_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagPeekViewScrimLogging;
local l_GetFFlagEDPContextRedesign_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagEDPContextRedesign;
local l_ActionBarHeight_0 = v5.GameDetails.ActionBarHeight;
local function _(v32)
    if v32 < 600 then
        return 20;
    else
        return 40;
    end;
end;
local v34 = v3.PureComponent:extend("GameDetailsPeekView");
v34.init = function(v35)
    v35.state = {
        topBarOpacity = 0
    };
    if l_GetFFlagEDPContextRedesign_0() then
        v35.maxContentTopPadding = -(v35.props.screenSize.X * 0.5625) / 2;
        local v36, v37 = v3.createBinding(v35.maxContentTopPadding);
        v35.contentTopPadding = v36;
        v35.setContentTopPadding = v37;
        v36, v37 = v3.createBinding(0);
        v35.contentHeaderSizeY = v36;
        v35.setContentHeaderSizeY = v37;
    end;
    v35.briefToFullTransitionPercent = function(v38)
        if not l_GetFFlagEDPContextRedesign_0() then
            v35:setState({
                topBarOpacity = v38
            });
            return ;
        else
            v35.setContentTopPadding(v35.maxContentTopPadding * (1 - v38));
            return ;
        end;
    end;
    if l_GetFFlagEDPContextRedesign_0() then
        v35.onHeaderFrameSizeChanged = function(v39)
            v35.setContentHeaderSizeY(v39.AbsoluteSize.Y);
        end;
    end;
    if l_GetFFlagPeekViewScrimLogging_0() then
        v35.getPeekViewEventMeta = function()
            return {
                universeId = v35.props.universeId,
                source = v35.props.source or "None",
                index = v35.props.index or -1
            };
        end;
        v35.eventTopBarClosePeekView = function()
            local l_eventIngest_0 = v35.props.eventIngest;
            local l_routeName_0 = v35.props.navigation.state.routeName;
            local v42 = v35.getPeekViewEventMeta();
            l_peekViewDismissedEvent_0.logEvent(l_eventIngest_0, "ProfilePeekView", {
                dismissMethod = l_peekViewDismissedEvent_0.dismissMethodEnum.topBarTap,
                page = l_routeName_0,
                locale = v42.RobloxLocaleId,
                universeId = v42.universeId,
                source = v42.source or "None",
                index = v42.index or -1
            });
        end;
    end;
    v35.closeGameDetailsPeekViewInNavigation = function(v43)
        v35.props.navigation.clearAppScreens({
            v6.GameDetail
        });
        if v35.props.onClose ~= nil then
            v35.props.onClose();
        end;
        if not (not v35.props.onPeekViewClosed or v43 and v43.backButtonNavigation) then
            v35.props.onPeekViewClosed();
        end;
        v35.props.sessionService:RemoveSession(l_SessionType_0.StructuralIdentifier.GameDetailSource);
    end;
    v35.viewStateChanged = function(v44, v45)
        if v44 == l_PeekViewState_0.Brief then
            local l_gameDetailsPeekViewState_0 = v35.props.gameDetailsPeekViewState;
            if l_gameDetailsPeekViewState_0 == l_PeekViewState_0.Brief then
                v35.eventSwitchGame();
            elseif l_gameDetailsPeekViewState_0 == l_PeekViewState_0.Closed then
                v35.eventOpenPeekView();
            end;
        end;
        v35.props.setGameDetailsPeekViewState(v44);
        if v44 == l_PeekViewState_0.Closed then
            v35.closeGameDetailsPeekViewInNavigation();
            return ;
        else
            if v45 == l_PeekViewState_0.Brief and v44 == l_PeekViewState_0.Full then
                v35.eventGoToFullView();
            end;
            return ;
        end;
    end;
    v35.eventOpenPeekView = function()
        v22(v35.props.eventIngest, "OpenPeekView", v35.props.universeId, v35.props.source or "None", v35.props.index or -1);
    end;
    v35.eventSwitchGame = function()
        v22(v35.props.eventIngest, "SwitchGame", v35.props.universeId, v35.props.source or "None", v35.props.index or -1);
    end;
    v35.eventGoToFullView = function()
        v22(v35.props.eventIngest, "GoToFullView", v35.props.universeId, v35.props.source or "None", v35.props.index or -1);
    end;
end;
v34.willUnmount = function(v47)
    if (function(_)
        local l_history_0 = v47.props.history;
        local v50 = l_history_0[#l_history_0];
        local v51 = 0;
        for v52 = 1, #v50 do
            if v50[v52].name == v6.GameDetail then
                v51 = v51 + 1;
                if v51 > 1 then
                    return false;
                end;
            end;
        end;
        return true;
    end)(v47.props.universeId) then
        v47.props.setGameDetailsPeekViewState(l_PeekViewState_0.Closed);
    end;
    if v47.props.onClose ~= nil then
        v47.props.onClose();
    end;
end;
v34.render = function(v53)
    local l_universeId_0 = v53.props.universeId;
    local v55 = v53.props.statusBarHeight + v5.NAV_BAR_SIZE;
    local l_gameDetailsPeekViewState_1 = v53.props.gameDetailsPeekViewState;
    local v57 = math.min(l_getSafeAreaSize_0(v53.props.screenSize, v53.props.globalGuiInset).X.Offset, 640);
    local v58 = v57 < 600 and 20 or 40;
    local l_topBarOpacity_0 = v53.state.topBarOpacity;
    local l_mountAsFullView_0 = v53.props.mountAsFullView;
    local v61 = UDim2.new(0, 0, 0, 0);
    local v62 = UDim2.new(1, 0, 1, 0);
    if l_mountAsFullView_0 == nil then
        local v63 = true;
        if l_gameDetailsPeekViewState_1 ~= l_PeekViewState_0.Full then
            v63 = l_gameDetailsPeekViewState_1 == l_PeekViewState_0.Extended;
        end;
        l_mountAsFullView_0 = v63;
    end;
    local l_mountAnimation_0 = v53.props.mountAnimation;
    if l_mountAnimation_0 == nil then
        l_mountAnimation_0 = l_gameDetailsPeekViewState_1 == l_PeekViewState_0.Closed;
    end;
    local v65 = l_topBarOpacity_0 > 0.95;
    local v66 = false;
    if l_topBarOpacity_0 > 0 then
        v66 = not v65;
    end;
    local v67 = nil;
    local l_luaProfileEnabled_0 = v53.props.luaProfileEnabled;
    if l_luaProfileEnabled_0 and v53.props.showBackButton ~= nil then
        v67 = not v53.props.showBackButton;
    end;
    if not l_GetFFlagPeekViewScrimEnabled_0() and not v53.props.scrimEnabled then
        return l_withStyle_0(function(v69)
            return v3.createElement("Frame", {
                Position = v61,
                Size = v62,
                BackgroundTransparency = 1
            }, {
                PeekViewTopBar = v65 and v3.createElement(v12, {
                    universeId = l_universeId_0,
                    withNewThemeProvider = true,
                    showCloseIcon = l_luaProfileEnabled_0 and v67,
                    onCloseButtonActivated = function(v70)
                        if l_GetFFlagPeekViewScrimLogging_0() then
                            v53.eventTopBarClosePeekView();
                        end;
                        v53.closeGameDetailsPeekViewInNavigation(v70);
                    end,
                    luaProfileEnabled = l_luaProfileEnabled_0,
                    scrimEnabled = v53.props.scrimEnabled
                }),
                PeekViewTopBarEffectHolder = v66 and v3.createElement("Frame", {
                    Size = UDim2.new(1, 0, 0, v55),
                    Position = UDim2.new(0, 0, 0, 0),
                    BackgroundColor3 = v69.Theme.BackgroundDefault.Color,
                    BorderSizePixel = 0,
                    BackgroundTransparency = 1 - l_topBarOpacity_0
                }),
                PeekViewContainer = v3.createElement("Frame", {
                    Size = UDim2.new(1, 0, 1, -v55 + 6),
                    Position = UDim2.new(0, 0, 0, v55 - 6),
                    BackgroundTransparency = 1,
                    ClipsDescendants = true
                }, {
                    PeekViewGameDetailsCard = v3.createElement(l_PeekView_0, {
                        briefViewContentHeight = UDim.new(0, v57 + l_ActionBarHeight_0),
                        bottomDockedContainerHeight = l_ActionBarHeight_0 + 10,
                        bottomDockedContainerContent = {
                            PeekViewBottomBar = v3.createElement(v13, {
                                leftPadding = v58,
                                rightPadding = v58,
                                bottomPadding = 10,
                                containerWidth = v57,
                                universeId = l_universeId_0,
                                withNewThemeProvider = true,
                                referralSource = v53.props.referralSource
                            })
                        },
                        mountAsFullView = l_mountAsFullView_0,
                        mountAnimation = l_mountAnimation_0,
                        viewStateChanged = v53.viewStateChanged,
                        briefToFullTransitionPercent = v53.briefToFullTransitionPercent,
                        withNewThemeProvider = true
                    }, {
                        UIListLayout = v3.createElement("UIListLayout", {
                            Padding = UDim.new(0, 0),
                            SortOrder = Enum.SortOrder.LayoutOrder,
                            HorizontalAlignment = Enum.HorizontalAlignment.Left,
                            VerticalAlignment = Enum.VerticalAlignment.Top
                        }),
                        GameDetailsCard = v3.createElement(v14, {
                            universeId = l_universeId_0,
                            source = v53.props.source,
                            index = v53.props.index,
                            onPeekViewClosed = v53.props.onPeekViewClosed
                        })
                    })
                })
            });
        end);
    else
        return v3.createElement(l_PeekViewWithTopBar_0, {
            topBarHeight = v55,
            bottomDockedContainerHeight = l_ActionBarHeight_0 + 10,
            fullViewContentHeight = if not l_GetFFlagEDPContextRedesign_0() then UDim.new(1, -v55) else UDim.new(1, 1),
            briefViewContentHeight = UDim.new(0, v57 + l_ActionBarHeight_0),
            onViewStateChanged = v53.viewStateChanged,
            viewChangedEventMeta = if not l_GetFFlagPeekViewScrimLogging_0() then nil else v53.getPeekViewEventMeta(),
            mountAsFullView = l_mountAsFullView_0,
            mountAnimation = l_mountAnimation_0,
            transitionPercentCallback = if not l_GetFFlagEDPContextRedesign_0() then nil else v53.briefToFullTransitionPercent,
            solidifyTopBarOffset = if not l_GetFFlagEDPContextRedesign_0() then nil else v53.contentHeaderSizeY:map(function(v71)
                return v71 - v55;
            end),
            overlayDragger = not not l_GetFFlagEDPContextRedesign_0() or nil,
            bottomBarSlot = v3.createElement(v13, {
                leftPadding = v58,
                rightPadding = v58,
                bottomPadding = 10,
                containerWidth = v57,
                universeId = l_universeId_0,
                withNewThemeProvider = true,
                referralSource = v53.props.referralSource
            }),
            contentSlot = v3.createElement(v14, {
                universeId = l_universeId_0,
                source = v53.props.source,
                index = v53.props.index,
                onPeekViewClosed = v53.props.onPeekViewClosed,
                topPaddingBinding = if not l_GetFFlagEDPContextRedesign_0() then nil else v53.contentTopPadding,
                onHeaderFrameSizeChanged = if not l_GetFFlagEDPContextRedesign_0() then nil else v53.onHeaderFrameSizeChanged
            }),
            topBarSlot = v3.createElement(v12, {
                universeId = l_universeId_0,
                withNewThemeProvider = true,
                showCloseIcon = l_luaProfileEnabled_0 and v67,
                onCloseButtonActivated = function(v72)
                    if l_GetFFlagPeekViewScrimLogging_0() then
                        v53.eventTopBarClosePeekView();
                    end;
                    v53.closeGameDetailsPeekViewInNavigation(v72);
                end,
                luaProfileEnabled = l_luaProfileEnabled_0,
                scrimEnabled = v53.props.scrimEnabled
            })
        });
    end;
end;
v34.didUpdate = function(v73, v74)
    if not (not (v73.props.searchBarFocused ~= v74.searchBarFocused) or not v73.props.searchBarFocused) then
        v73.closeGameDetailsPeekViewInNavigation();
    end;
end;
return (v25.connectUserLayer({
    v26.SocialFriendsLayer,
    not not l_GetFFlagPeekViewScrimEnabledIXP_0() and v26.PlatformExcellenceQualityImprovementApp or nil
}, function(v75, _)
    local v77 = v75[v26.PlatformExcellenceQualityImprovementApp];
    return {
        luaProfileEnabled = v24.experimentOrRolloutEnabled(v75),
        scrimEnabled = v77 and v77.peekViewScrimEnabled
    };
end)((v18.withNavigation((l_RoactServices_0.connect({
    eventIngest = v20,
    sessionService = l_AppSessionService_0
})((v4.connect(function(v78, _)
    return {
        history = v78.Navigation.history,
        gameDetailsPeekViewState = v78.GameDetailsPeekView.viewState,
        statusBarHeight = v78.TopBar.statusBarHeight,
        screenSize = v78.ScreenSize,
        globalGuiInset = v78.GlobalGuiInset,
        searchBarFocused = v78.SearchBar.focused
    };
end, function(v80)
    return {
        setGameDetailsPeekViewState = function(v81)
            return v80(v11(v81));
        end
    };
end)(v34))))))));


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local v4 = require(l_Modules_0.LuaApp.Enum.OverlayType);
local v5 = require(l_Modules_0.LuaApp.Enum.RetrievalStatus);
local l_ApiFetchGameDetails_0 = require(l_CorePackages_0.Workspace.Packages.GameDetailRodux).GameDetails.ApiFetchGameDetails;
local v7 = require(l_Modules_0.LuaApp.Thunks.OpenCentralOverlayForGameDetailsPlayWithFriends);
local v8 = require(l_CorePackages_0.UIBlox);
local l_ImageSetButton_0 = v8.Core.ImageSet.ImageSetButton;
local l_ImageSetLabel_0 = v8.Core.ImageSet.ImageSetLabel;
local l_withStyle_0 = v8.Style.withStyle;
local l_Images_0 = v8.App.ImageSet.Images;
local v13 = require(l_Modules_0.LuaApp.withTheme_DEPRECATED);
local v14 = UDim2.new(0, 44, 0, 44);
local v15 = UDim2.new(0, 37, 0, 37);
local v16 = Rect.new(8, 8, 9, 9);
local v17 = v2.PureComponent:extend("GameDetailsPlayWithFriendsButton");
v17.getMoreMenuPosition = function(v18)
    local l_screenWidth_0 = v18.props.screenWidth;
    local l_leftPadding_0 = v18.props.leftPadding;
    local l_current_0 = v18.moreButtonRef.current;
    if l_current_0 == nil then
        return UDim2.new(0, 0, 0, 0);
    else
        local v22 = l_current_0.AbsolutePosition.X + l_current_0.AbsoluteSize.X / 2;
        local l_Y_0 = l_current_0.AbsolutePosition.Y;
        local v24 = (l_screenWidth_0 - 300) / 2;
        local _ = nil;
        return UDim2.new(0, l_screenWidth_0 < 600 and 0 or if v22 < l_leftPadding_0 + 150 then l_leftPadding_0 - v24 else (v22 - 150) - v24, 0, l_Y_0 - 15);
    end;
end;
v17.getMoreMenuWidth = function(v26)
    local l_leftPadding_1 = v26.props.leftPadding;
    local l_rightPadding_0 = v26.props.rightPadding;
    local l_screenWidth_1 = v26.props.screenWidth;
    local v30 = (v26.props.containerWidth - l_leftPadding_1) - l_rightPadding_0;
    if l_screenWidth_1 < 600 then
        return v30;
    else
        return 300;
    end;
end;
v17.init = function(v31)
    v31.moreButtonRef = v2.createRef();
    local l_openContextualMenu_0 = v31.props.openContextualMenu;
    v31.onActivated = function()
        local l_appTheme_0 = v31.props.appTheme;
        local l_universeId_0 = v31.props.universeId;
        if not v31.props.isDisabled then
            l_openContextualMenu_0(l_universeId_0, l_appTheme_0, v31:getMoreMenuPosition(), (v31:getMoreMenuWidth()));
            return ;
        else
            return ;
        end;
    end;
end;
v17.render = function(v35)
    return l_withStyle_0(function(v36)
        return v35:renderWithStyle(v36);
    end);
end;
v17.renderWithStyle = function(v37, v38)
    local l_Theme_0 = v38.Theme;
    return v2.createElement(l_ImageSetButton_0, {
        BorderSizePixel = 0,
        BackgroundTransparency = 1,
        Size = v14,
        Image = l_Images_0["component_assets/circle_17"],
        ScaleType = Enum.ScaleType.Slice,
        SliceCenter = v16,
        ImageTransparency = (v37.props.isLoading or v37.props.isDisabled) and 0.5 or l_Theme_0.BackgroundDefault.Transparency,
        ImageColor3 = l_Theme_0.BackgroundDefault.Color,
        LayoutOrder = 1,
        ClipsDescendants = false,
        [v2.Event.Activated] = v37.onActivated,
        [v2.Ref] = v37.moreButtonRef
    }, {
        Icon = v2.createElement(l_ImageSetLabel_0, {
            Size = v15,
            AnchorPoint = Vector2.new(0.5, 0.5),
            Position = UDim2.new(0.5, 0, 0.5, 0),
            BorderSizePixel = 0,
            BackgroundTransparency = 1,
            Image = l_Images_0["icons/actions/friends/friendsplaying"],
            ImageTransparency = l_Theme_0.IconEmphasis.Transparency,
            ImageColor3 = l_Theme_0.IconEmphasis.Color
        })
    });
end;
local function _(v40)
    local v41 = true;
    if v40 ~= v5.NotStarted then
        v41 = v40 == v5.Fetching;
    end;
    return v41;
end;
local function _(v43, v44, v45)
    local v46;
    if v43 == v5.Failed then
        v46 = not v45;
        if v46 then
            goto label0;
        end;
    end;
    v46 = true;
    if v44 ~= v4.GameDetailMore then
        v46 = v44 == v4.GameDetailsPlayWithFriends;
    end;
    ::label0::;
    return v46;
end;
return v3.connect(function(v48, v49)
    local v50 = l_ApiFetchGameDetails_0.GetFetchingStatus(v48, v49.universeId);
    local l_OverlayType_0 = v48.CentralOverlay.OverlayType;
    local v52 = v48.Games[v49.universeId];
    local v53 = {
        screenWidth = v48.ScreenSize.X
    };
    local v54 = true;
    if v50 ~= v5.NotStarted then
        v54 = v50 == v5.Fetching;
    end;
    v53.isLoading = v54;
    if v50 == v5.Failed then
        v54 = not v52;
        if v54 then
            goto label1;
        end;
    end;
    v54 = true;
    if l_OverlayType_0 ~= v4.GameDetailMore then
        v54 = l_OverlayType_0 == v4.GameDetailsPlayWithFriends;
    end;
    ::label1::;
    v53.isDisabled = v54;
    return v53;
end, function(v55)
    return {
        openContextualMenu = function(v56, v57, v58, v59)
            v55(v7(v56, v57, v58, v59));
        end
    };
end)((v13(v17)));


local l_CorePackages_0 = game:GetService("CorePackages");
local l_CoreGui_0 = game:GetService("CoreGui");
local l_Players_0 = game:GetService("Players");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v4 = require(l_Modules_0.Common.memoize);
local v5 = require(l_CorePackages_0.Roact);
local v6 = require(l_CorePackages_0.RoactRodux);
local v7 = require(l_CorePackages_0.UIBlox);
local v8 = require(l_CorePackages_0.Packages.Otter);
local l_IXPService_0 = game:GetService("IXPService");
local v10 = require(l_CorePackages_0.Workspace.Packages.SharedFlags);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v12 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v14 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local v15 = require(l_Modules_0.LuaApp.Services.AppEventIngestService);
local v16 = require(l_Modules_0.LuaApp.Thunks.CloseCentralOverlay);
local v17 = require(l_Modules_0.LuaApp.AppPage);
local v18 = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local v19 = require(l_Modules_0.LuaApp.Analytics.Events.Games.GameDetailsEvents);
local v20 = require(l_Modules_0.LuaApp.withLocalization);
local l_UserIconList_0 = require(l_CorePackages_0.Workspace.Packages.GameTile).UserIconList;
local l_ShareGameToChat_0 = v19.ShareGameToChat;
local l_CreatePrivateGame_0 = v19.CreatePrivateGame;
local l_JoinFriendsInGame_0 = v19.JoinFriendsInGame;
local v25 = require(l_Modules_0.LuaApp.sortFriendsByPresenceAndRecency);
local v26 = require(l_Modules_0.LuaApp.Http.UrlBuilder);
local l_DeviceOrientationMode_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).DeviceOrientationMode;
local l_NetworkingSquads_0 = require(l_CorePackages_0.Workspace.Packages.Squads).NetworkingSquads;
local l_Images_0 = v7.App.ImageSet.Images;
local l_ContextualMenu_0 = v7.App.Menu.ContextualMenu;
local l_MenuDirection_0 = v7.App.Menu.MenuDirection;
local v32 = require(l_Modules_0.LuaApp.withTheme_DEPRECATED);
local v33 = require(l_CorePackages_0.Workspace.Packages.GameInvite);
local l_GameInviteModalManager_0 = v33.GameInviteModalManager;
local l_GameInviteConstants_0 = v33.GameInviteConstants;
local l_GameInviteAnalyticsManager_0 = v33.GameInviteAnalyticsManager;
local l_GetFFlagEnableUniversalAppGameInviteUnification_0 = v10.GetFFlagEnableUniversalAppGameInviteUnification;
local l_GetFFlagLuaAppEnableSquadPage_0 = v10.GetFFlagLuaAppEnableSquadPage;
local l_GetFStringUniversalAppGameInviteMenuLayer_0 = v10.GetFStringUniversalAppGameInviteMenuLayer;
local l_LocalPlayer_0 = l_Players_0.LocalPlayer;
local v41 = Vector2.new(64, 24);
local v48 = v4(function(v42, v43)
    if v42 and v43 then
        local v44 = {};
        for _, v46 in pairs(v43) do
            local v47 = v42[v46];
            if not (not v47 or not v47.isFriend) then
                table.insert(v44, v47);
            end;
        end;
        table.sort(v44, v25);
        return v44;
    else
        return {};
    end;
end);
local v49 = v5.PureComponent:extend("GameDetailsPlayWithFriendsContextualMenu");
v49.init = function(v50)
    v50.getMenuPos = function()
        if v50.props.menuPosition == nil then
            return UDim2.fromOffset(0, 0);
        else
            return v50.props.menuPosition;
        end;
    end;
    v50.getMenuSize = function()
        return UDim2.new(0, 300, 1, 0);
    end;
    v50.getMenuAnchor = function()
        if not (v50.props.menuPosition ~= nil) or v50.props.screenSize == nil then
            return nil;
        else
            return Vector2.new(0, 0);
        end;
    end;
end;
v49.getItems = function(v51, v52)
    local l_closeCallback_0 = v51.props.closeCallback;
    local l_createExperienceInvite_0 = v51.props.createExperienceInvite;
    local l_eventIngest_0 = v51.props.eventIngest;
    local l_rootPlaceId_0 = v51.props.rootPlaceId;
    local v57 = v48(v51.props.users, v51.props.inGameUsersByGame);
    local l_appTheme_0 = v51.props.appTheme;
    local l_privateServersEnabled_0 = v51.props.privateServersEnabled;
    local v60 = {};
    if l_GetFFlagLuaAppEnableSquadPage_0() then
        table.insert(v60, {
            text = "Drive Caravan",
            icon = l_Images_0["icons/menu/groups"],
            onActivated = function()
                l_createExperienceInvite_0(l_rootPlaceId_0);
                l_closeCallback_0();
            end
        });
    end;
    table.insert(v60, {
        text = v52.inviteFriends,
        icon = l_Images_0["icons/actions/friends/friendInvite"],
        onActivated = function()
            if v51.isMounted and l_rootPlaceId_0 then
                local v61 = false;
                if l_GetFFlagEnableUniversalAppGameInviteUnification_0() then
                    local v62 = l_GetFStringUniversalAppGameInviteMenuLayer_0();
                    local l_status_0, l_result_0 = pcall(function()
                        return l_IXPService_0:GetUserLayerVariables(v62);
                    end);
                    if l_status_0 then
                        l_IXPService_0:LogUserLayerExposure(v62);
                        v61 = not not l_result_0 and (l_result_0.inAppGameInviteUXRefresh2023 and true or false);
                    end;
                end;
                if not v61 then
                    v51.props.navigateDown({
                        name = v17.ShareGameToChat,
                        detail = l_rootPlaceId_0,
                        extraProps = {
                            source = "GameDetailsPlayWithFriendsContextualMenu"
                        }
                    });
                    l_ShareGameToChat_0(l_eventIngest_0, "GameDetailsPlayWithFriendsContextualMenu", l_rootPlaceId_0);
                else
                    l_GameInviteAnalyticsManager_0:withButtonName(l_GameInviteAnalyticsManager_0.ButtonName.GameDetailsPlayWithFriendsMenu);
                    l_GameInviteAnalyticsManager_0:inputShareGameEntryPoint(l_rootPlaceId_0, v51.props.universeId);
                    l_GameInviteModalManager_0:openModal({
                        trigger = l_GameInviteConstants_0.Triggers.GameDetailsPlayWithFriendsMenu,
                        rootPlaceId = l_rootPlaceId_0,
                        universeId = v51.props.universeId
                    });
                end;
                l_closeCallback_0();
                return ;
            else
                return ;
            end;
        end
    });
    if not (not v51.props.webViewSupport or not l_privateServersEnabled_0) then
        table.insert(v60, {
            text = v52.createPrivateGame,
            icon = l_Images_0["icons/actions/edit/add"],
            onActivated = function()
                if v51.isMounted and l_rootPlaceId_0 then
                    v51.props.navigateDown({
                        name = v17.GenericWebPage,
                        detail = v26.game.info.serversPreopenCreateVip({
                            universeId = v51.props.universeId
                        }),
                        extraProps = {
                            title = v52.createPrivateGame
                        }
                    });
                    l_CreatePrivateGame_0(l_eventIngest_0, "GameDetailsPlayWithFriendsContextualMenu", l_rootPlaceId_0);
                    l_closeCallback_0();
                    return ;
                else
                    return ;
                end;
            end
        });
    end;
    if v51.props.webViewSupport then
        table.insert(v60, {
            text = v52.joinFriendsInGame,
            icon = l_Images_0["icons/actions/friends/friendsplaying"],
            onActivated = function()
                if v51.isMounted and l_rootPlaceId_0 then
                    v51.props.navigateDown({
                        name = v17.GenericWebPage,
                        detail = v26.game.info.servers({
                            universeId = v51.props.universeId
                        }),
                        extraProps = {
                            title = v52.joinFriendsInGame
                        }
                    });
                    l_JoinFriendsInGame_0(l_eventIngest_0, "GameDetailsPlayWithFriendsContextualMenu", l_rootPlaceId_0);
                    l_closeCallback_0();
                    return ;
                else
                    return ;
                end;
            end,
            renderRightSideGadget = function()
                return {
                    UserIconList = v5.createElement(l_UserIconList_0, {
                        users = v57,
                        width = v41.X,
                        height = v41.Y,
                        maskColor = not not l_appTheme_0.Background and l_appTheme_0.Background.Color or nil
                    })
                };
            end,
            rightSideGadgetSize = v41
        });
    end;
    return v60;
end;
v49.renderLandscapeContextualMenu = function(v65)
    local l_closeCallback_1 = v65.props.closeCallback;
    local l_screenSize_0 = v65.props.screenSize;
    return v20({
        inviteFriends = "Feature.GameDetails.Action.InviteFriends",
        joinFriendsInGame = "Feature.GameDetails.Action.JoinFriendsInGame",
        createPrivateGame = "Feature.GameDetails.Action.CreatePrivateGame"
    })(function(v68)
        return v5.createElement("Frame", {
            BackgroundTransparency = 1,
            Position = v65.getMenuPos(),
            Size = v65.getMenuSize()
        }, {
            ContextMenu = v5.createElement(l_ContextualMenu_0, {
                buttonProps = v65:getItems(v68),
                open = true,
                horizontalAlignment = Enum.HorizontalAlignment.Left,
                openPositionX = UDim.new(0, 0),
                openPositionY = UDim.new(0, 0),
                closeBackgroundVisible = false,
                screenSize = l_screenSize_0,
                onDismiss = l_closeCallback_1,
                contextMenuWidthOverride = UDim.new(1, 0),
                anchorPointOverride = v65:getMenuAnchor(),
                motorOverrideOptions = {
                    motorCallback = v8.instant,
                    open = {
                        targetValue = 1
                    },
                    close = {
                        targetValue = 0
                    }
                }
            })
        });
    end);
end;
v49.didMount = function(v69)
    v69.isMounted = true;
    local l_currentPage_0 = v69.props.currentPage;
    local l_closeCallback_2 = v69.props.closeCallback;
    if l_currentPage_0 ~= v17.GameDetail and l_currentPage_0 ~= v17.ExperienceDetail then
        l_closeCallback_2();
    end;
end;
v49.WillUnmount = function(v72)
    v72.isMounted = false;
end;
v49.renderPortraitContextualMenu = function(v73)
    local l_closeCallback_3 = v73.props.closeCallback;
    local l_screenSize_1 = v73.props.screenSize;
    return v20({
        inviteFriends = "Feature.GameDetails.Action.InviteFriends",
        joinFriendsInGame = "Feature.GameDetails.Action.JoinFriendsInGame",
        createPrivateGame = "Feature.GameDetails.Action.CreatePrivateGame"
    })(function(v76)
        return v5.createElement("Frame", {
            BackgroundTransparency = 1,
            Position = UDim2.new(if not (v73.props.deviceOrientation == l_DeviceOrientationMode_0.Portrait) then (l_screenSize_1 ~= nil and l_screenSize_1.X > 0) and (v73.props.menuPosition.X.Offset / l_screenSize_1.X) / 2 or 0 else 0, 0, 0, 0),
            Size = UDim2.new(1, 0, 1, 0)
        }, {
            ContextMenu = v5.createElement(l_ContextualMenu_0, {
                buttonProps = v73:getItems(v76),
                open = true,
                menuDirection = l_MenuDirection_0.Up,
                openPositionY = UDim.new(1, -76),
                closeBackgroundVisible = false,
                screenSize = l_screenSize_1,
                onDismiss = l_closeCallback_3
            })
        });
    end);
end;
v49.render = function(v77)
    if not (v77.props.deviceOrientation == l_DeviceOrientationMode_0.Portrait) then
        return v77:renderLandscapeContextualMenu();
    else
        return v77:renderPortraitContextualMenu();
    end;
end;
return l_RoactServices_0.connect({
    networking = v12,
    localization = v14,
    eventIngest = v15
})((l_RoactAppPolicy_0.connect(function(v78)
    return {
        webViewSupport = v78.getWebViewSupport()
    };
end)((v32((v6.connect(function(v79, v80)
    local v81 = v79.Navigation.history[#v79.Navigation.history];
    local v82 = v79.GameDetails[v80.universeId];
    local v83 = v79.Games[v80.universeId];
    return {
        rootPlaceId = (v82 and v82.rootPlaceId or v83 and v83.placeId) or nil,
        currentPage = v81[#v81].name,
        users = v79.Users,
        inGameUsersByGame = v79.InGameUsersByGame[v80.universeId],
        screenSize = v79.ScreenSize,
        deviceOrientation = v79.DeviceOrientation,
        privateServersEnabled = v79.GamePrivateServersEnabled[v80.universeId]
    };
end, function(v84)
    return {
        closeCallback = function()
            v84(v16());
        end,
        navigateDown = function(v85)
            return v84(v18(v85));
        end,
        createExperienceInvite = function(v86)
            return v84(l_NetworkingSquads_0.CreateExperienceInvite.API({
                userId = l_LocalPlayer_0.UserId,
                placeId = v86,
                membershipEntityId = "12345"
            }));
        end
    };
end)(v49)))))));


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_ExternalContentSharingProtocol_0 = require(l_CorePackages_0.Workspace.Packages.ExternalContentSharingProtocol).ExternalContentSharingProtocol;
local v3 = require(l_Modules_0.Common.Roact);
local v4 = require(l_Modules_0.Common.RoactRodux);
local v5 = require(l_Modules_0.LuaApp.Enum.OverlayType);
local v6 = require(l_Modules_0.LuaApp.Enum.RetrievalStatus);
local v7 = require(l_Modules_0.LuaApp.Components.GenericIconButtonUIBlox);
local l_ApiFetchGameDetails_0 = require(l_CorePackages_0.Workspace.Packages.GameDetailRodux).GameDetails.ApiFetchGameDetails;
local v9 = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local v10 = require(l_Modules_0.LuaApp.AppPage);
local v11 = require(l_Modules_0.LuaApp.Http.UrlBuilder);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local l_Images_0 = require(l_CorePackages_0.UIBlox).App.ImageSet.Images;
local v14 = UDim2.new(0, 44, 0, 44);
local v15 = UDim2.new(0, 37, 0, 37);
local v16 = v3.PureComponent:extend("GameDetailsShareButton");
v16.defaultProps = {
    externalContentSharingProtocol = l_ExternalContentSharingProtocol_0.default
};
v16.init = function(v17)
    v17.onActivated = function()
        if not v17.props.shouldShareToAccountProvider then
            v17.props.externalContentSharingProtocol:shareUrl({
                url = v11.game.info.webpage({
                    placeId = v17.props.placeId
                }),
                context = v17.props.context
            });
            return ;
        else
            v17.props.navigateDown({
                name = v10.SdkShare,
                extraProps = {
                    context = v17.props.context,
                    universeId = v17.props.universeId
                }
            });
            return ;
        end;
    end;
end;
v16.render = function(v18)
    return v3.createElement(v7, {
        Size = v14,
        iconImage = l_Images_0["icons/actions/share"],
        iconSize = v15,
        isLoading = v18.props.isLoading,
        isDisabled = v18.props.isDisabled,
        onActivated = v18.onActivated,
        withNewThemeProvider = v18.props.withNewThemeProvider
    });
end;
local _ = function(v19, _)
    local v21 = true;
    if v19 ~= v6.NotStarted then
        v21 = v19 == v6.Fetching;
    end;
    return v21;
end;
local function _(v23, v24)
    local v25 = true;
    if v23 ~= v6.Failed then
        v25 = v24 == v5.GameDetailMore;
    end;
    return v25;
end;
return v4.connect(function(v27, v28)
    local v29 = l_ApiFetchGameDetails_0.GetFetchingStatus(v27, v28.universeId);
    local l_OverlayType_0 = v27.CentralOverlay.OverlayType;
    local v31 = v27.GameDetails[v28.universeId];
    local v32 = {
        screenWidth = v27.ScreenSize.X
    };
    local v33 = true;
    if v29 ~= v6.NotStarted then
        v33 = v29 == v6.Fetching;
    end;
    v32.isLoading = v33;
    v33 = true;
    if v29 ~= v6.Failed then
        v33 = l_OverlayType_0 == v5.GameDetailMore;
    end;
    v32.isDisabled = v33;
    v32.placeId = v31 and v31.rootPlaceId;
    return v32;
end, function(v34)
    return {
        navigateDown = function(v35)
            v34(v9(v35));
        end
    };
end)((l_RoactAppPolicy_0.connect(function(v36, _)
    return {
        shouldShareToAccountProvider = v36.shouldShareToAccountProvider()
    };
end)(v16)));


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 v4 = require(l_Modules_0.LuaApp.AppPage);
local v5 = require(l_Modules_0.LuaApp.Constants);
local v6 = require(l_Modules_0.LuaApp.Thunks.NavigateBack);
local v7 = require(l_CorePackages_0.UIBlox);
local l_withStyle_0 = v7.Style.withStyle;
local v9 = require(l_Modules_0.LuaApp.withTheme_DEPRECATED);
local l_ImageSetLabel_0 = v7.Core.ImageSet.ImageSetLabel;
local l_GetImageData_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppAssets).GetImageData;
local v12 = require(l_Modules_0.LuaApp.Flags.UseGameDetailsPeekView);
local l_GetFFlagEDPContextRedesign_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagEDPContextRedesign;
local l_GetFFlagPeekViewScrimEnabled_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagPeekViewScrimEnabled;
local v15 = not l_GetFFlagEDPContextRedesign_0() and 36 or 40;
local v16 = not l_GetFFlagEDPContextRedesign_0() and 36 or 24;
local v17 = if not l_GetFFlagEDPContextRedesign_0() then nil else 0.3;
local v18 = v2.PureComponent:extend("GameDetailsTopBar");
local function v23(v19)
    local v20 = v19[#v19];
    local v21 = 0;
    for v22 = 1, #v20 do
        if v20[v22].name == v4.GameDetail then
            v21 = v21 + 1;
            if not (v21 <= 1) then
                break;
            end;
        end;
    end;
    return v21;
end;
v18.init = function(v24)
    v24.onNavigationButtonActivated = function()
        if v24.isMounted then
            if v23(v24.props.history) <= 1 and v24.props.onCloseButtonActivated ~= nil then
                v24.props.onCloseButtonActivated({
                    backButtonNavigation = true
                });
                return ;
            else
                v24.props.navigateBack();
            end;
        end;
    end;
    v24.onCloseButtonActivated = function()
        if v24.isMounted and v24.props.onCloseButtonActivated ~= nil then
            v24.props.onCloseButtonActivated();
        end;
    end;
end;
v18.didMount = function(v25)
    v25.isMounted = true;
end;
v18.willUnmount = function(v26)
    v26.isMounted = false;
end;
v18.render = function(v27)
    local l_appTheme_0 = v27.props.appTheme;
    local l_statusBarHeight_0 = v27.props.statusBarHeight;
    local v30 = l_statusBarHeight_0 + v5.NAV_BAR_SIZE;
    local l_showCloseIcon_0 = v27.props.showCloseIcon;
    local l_withNewThemeProvider_0 = v27.props.withNewThemeProvider;
    return l_withStyle_0(function(v33)
        return v2.createElement("Frame", {
            Position = UDim2.new(0, 0, 0, 0),
            Size = UDim2.new(1, 0, 0, v30),
            BackgroundTransparency = (not not l_GetFFlagEDPContextRedesign_0() and (l_GetFFlagPeekViewScrimEnabled_0() or v27.props.scrimEnabled)) and 1 or (v12() and 0 or 1),
            Active = if not l_GetFFlagEDPContextRedesign_0() then v12() else false,
            BackgroundColor3 = not not l_withNewThemeProvider_0 and v33.Theme.BackgroundDefault.Color or l_appTheme_0.Color.Background,
            BorderSizePixel = 0
        }, {
            LeftNavigationButton = v2.createElement("TextButton", {
                Position = UDim2.new(0, 15, 0, l_statusBarHeight_0),
                Size = UDim2.new(0, v15, 0, v15),
                BorderSizePixel = if not l_GetFFlagEDPContextRedesign_0() then nil else 0,
                BackgroundColor3 = if not l_GetFFlagEDPContextRedesign_0() then nil else v33.Theme.BackgroundDefault.Color,
                BackgroundTransparency = not l_GetFFlagEDPContextRedesign_0() and 1 or v17,
                Text = "",
                [v2.Event.Activated] = v27.onNavigationButtonActivated
            }, {
                UICorner = if not l_GetFFlagEDPContextRedesign_0() then nil else v2.createElement("UICorner", {
                    CornerRadius = UDim.new(1, 0)
                }),
                LeftCloseButton = not not l_showCloseIcon_0 and v2.createElement(l_ImageSetLabel_0, {
                    Size = UDim2.new(0, v16, 0, v16),
                    Position = UDim2.new(0.5, 0, 0.5, 0),
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    Image = l_GetImageData_0("LuaApp/icons/navigation/close") or "LuaApp/icons/navigation/close",
                    ImageColor3 = not not l_withNewThemeProvider_0 and v33.Theme.SystemPrimaryDefault.Color or l_appTheme_0.GameDetails.TopBar.Icon.Color,
                    ImageTransparency = not not l_withNewThemeProvider_0 and v33.Theme.SystemPrimaryDefault.Transparency or 0,
                    BackgroundTransparency = 1
                }) or nil,
                LeftNavigationButton = not l_showCloseIcon_0 and v2.createElement(l_ImageSetLabel_0, {
                    Size = UDim2.new(0, v16, 0, v16),
                    Position = UDim2.new(0.5, 0, 0.5, 0),
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    Image = l_GetImageData_0("LuaApp/icons/navigation/pushBack") or "LuaApp/icons/navigation/pushBack",
                    ImageColor3 = not not l_withNewThemeProvider_0 and v33.Theme.SystemPrimaryDefault.Color or l_appTheme_0.GameDetails.TopBar.Icon.Color,
                    ImageTransparency = not not l_withNewThemeProvider_0 and v33.Theme.SystemPrimaryDefault.Transparency or 0,
                    BackgroundTransparency = 1
                }) or nil
            })
        });
    end);
end;
v18 = v9(v18);
local function _(v34)
    return v23(v34) <= 1;
end;
return (v3.connect(function(v36, v37)
    local v38 = v23(v36.Navigation.history) <= 1;
    if v37.luaProfileEnabled and v37.showCloseIcon ~= nil then
        v38 = v37.showCloseIcon;
    end;
    return {
        statusBarHeight = v36.TopBar.statusBarHeight,
        showCloseIcon = v38,
        history = v36.Navigation.history
    };
end, function(v39)
    return {
        navigateBack = function()
            return v39(v6());
        end
    };
end)(v18));


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v5 = require(l_CorePackages_0.Workspace.Packages.RoactAppExperiment);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v7 = require(l_CorePackages_0.Workspace.Packages.GameIconRodux);
local v8 = require(l_CorePackages_0.Workspace.Packages.VerifiedBadges);
local v9 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v10 = require(l_Modules_0.LuaApp.Services.AppEventIngestService);
local v11 = require(l_Modules_0.LuaApp.Constants);
local v12 = require(l_Modules_0.LuaApp.Experiment.AppUserLayers);
local v13 = require(l_Modules_0.LuaApp.Components.FitTextLabel);
local v14 = require(l_Modules_0.LuaApp.Components.Games.GameBasicStats);
local v15 = require(l_CorePackages_0.UIBlox);
local l_withStyle_0 = v15.Style.withStyle;
local l_Pillv2_0 = v15.App.Control.Pillv2;
local l_LoadableImage_0 = v15.App.Loading.LoadableImage;
local _ = v15.App.Text.StyledTextLabel;
local v20 = require(l_Modules_0.LuaApp.withTheme_DEPRECATED);
local v21 = require(l_Modules_0.LuaApp.withLocalization);
local v22 = require(l_Modules_0.LuaApp.Thunks.SendGameFollow);
local l_Follow_0 = require(l_Modules_0.LuaApp.Analytics.Events.Games.GameDetailsEvents).Follow;
local l_GameIconReducer_0 = v7.GameIcons.GameIconReducer;
local v25 = require(l_Modules_0.LuaApp.Components.ExperienceGuidelines.ExperienceGuidelinesHeader);
local v26 = require(l_Modules_0.LuaApp.Components.GameDetails.GameDetailNotificationsButton);
local l_GetFFlagEnableSwapToSourceButton_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagEnableSwapToSourceButton;
local v28 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppShowPillContainsStrongLanguage);
local v29 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppShowPillContainsStrongLanguageContent);
local v30 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppShowPillContainsStrongLanguageIXP);
local l_GetNotificationsExperienceDetailsVariant_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetNotificationsExperienceDetailsVariant;
local v32 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppFixNotificationsEnabledLimitReached);
local v33 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppAddNotificationsEnabledAgeGate);
local v34 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppFixSendFollowEventParams);
local l_GetFFlagEDPContextRedesign_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagEDPContextRedesign;
local v36 = if not l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then nil else 36;
local v37 = if not l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then nil else 16;
local v38 = if not l_GetFFlagEDPContextRedesign_0() then nil else 12;
local v39 = if not l_GetFFlagEDPContextRedesign_0() then nil else 56;
local v40 = v2.PureComponent:extend("GameHeader");
v40.init = function(v41)
    if l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then
        v41.toggleFollowExperience = function()
            local l_gameFollowings_0 = v41.props.gameFollowings;
            local l_universeId_0 = v41.props.universeId;
            local l_rootPlaceId_0 = v41.props.rootPlaceId;
            if not v34() then
                if l_gameFollowings_0 == nil then
                    return ;
                end;
            elseif not (l_gameFollowings_0 ~= nil and l_rootPlaceId_0 ~= nil) or l_universeId_0 == nil then
                return ;
            end;
            local l_isFollowed_0 = l_gameFollowings_0.isFollowed;
            local v46 = if not v32() then nil else v41.props.notificationsEnabled.count or 0;
            local v47 = if not v32() then nil else v41.props.notificationsEnabled.limit or 0;
            local l_networking_0 = v41.props.networking;
            local l_eventIngest_0 = v41.props.eventIngest;
            v41.props.sendGameFollow(l_networking_0, l_universeId_0, not l_isFollowed_0, v41.props.enableNotificationsDiscoverability, v46, v47);
            l_Follow_0(l_eventIngest_0, "GameDetailsGameHeader", l_rootPlaceId_0, not l_isFollowed_0);
        end;
    end;
    if l_GetFFlagEDPContextRedesign_0() then
        v41.renderSubtitle = function(v50, v51)
            local function _(v52)
                return l_withStyle_0(function(v53)
                    return v2.createElement("TextLabel", {
                        AutomaticSize = Enum.AutomaticSize.XY,
                        Text = v52,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextWrapped = true,
                        BackgroundTransparency = 1,
                        Font = v53.Tokens.Semantic.Typography.Body.Font,
                        TextSize = v53.Tokens.Global.FontSize_75,
                        TextColor3 = v53.Tokens.Semantic.Color.Text.Muted.Color3,
                        TextTransparency = v53.Tokens.Semantic.Color.Text.Muted.Transparency,
                        LayoutOrder = v51,
                        RichText = false,
                        LineHeight = 1
                    });
                end);
            end;
            local l_hasVerifiedBadge_0 = v50.hasVerifiedBadge;
            local l_createElement_0 = v2.createElement;
            local l_EmojiWrapper_0 = v8.EmojiWrapper;
            local v58 = {
                emoji = not l_hasVerifiedBadge_0 and "" or v8.emoji.verified,
                layoutOrder = v51
            };
            local v59 = {};
            local l_name_0 = v50.name;
            v59.subtitleText = l_withStyle_0(function(v61)
                return v2.createElement("TextLabel", {
                    AutomaticSize = Enum.AutomaticSize.XY,
                    Text = l_name_0,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextWrapped = true,
                    BackgroundTransparency = 1,
                    Font = v61.Tokens.Semantic.Typography.Body.Font,
                    TextSize = v61.Tokens.Global.FontSize_75,
                    TextColor3 = v61.Tokens.Semantic.Color.Text.Muted.Color3,
                    TextTransparency = v61.Tokens.Semantic.Color.Text.Muted.Transparency,
                    LayoutOrder = v51,
                    RichText = false,
                    LineHeight = 1
                });
            end);
            return l_createElement_0(l_EmojiWrapper_0, v58, v59);
        end;
    end;
end;
v40.render = function(v62)
    local l_enableNotificationsDiscoverability_0 = v62.props.enableNotificationsDiscoverability;
    local l_appTheme_0 = v62.props.appTheme;
    local l_gameDetail_0 = v62.props.gameDetail;
    local l_gameInfo_0 = v62.props.gameInfo;
    local l_votes_0 = v62.props.votes;
    local v68 = l_gameDetail_0 and l_gameDetail_0.visits;
    local v69 = if not l_GetFFlagEDPContextRedesign_0() then nil else l_gameDetail_0 and l_gameDetail_0.creator;
    local v70 = if not l_enableNotificationsDiscoverability_0 then nil else l_gameDetail_0 and l_gameDetail_0.rootPlaceId;
    local l_LayoutOrder_0 = v62.props.LayoutOrder;
    local l_showSubtitle_0 = v62.props.showSubtitle;
    local v73 = if not l_GetFFlagEnableSwapToSourceButton_0() then nil else v62.props.showSource;
    local l_ageSummary_0 = v62.props.ageSummary;
    local v75 = not not l_ageSummary_0 or false;
    local v76 = if not v30() then nil else v62.props.isShowContainsStrongLanguageWarningEnabled;
    local v77 = if not v28() then nil else v62.props.containsStrongLanguage;
    local l_showVisits_0 = v62.props.showVisits;
    local v79 = if not v33() then nil else v62.props.isLocalUserUnder13;
    local v80 = l_votes_0 ~= nil and l_votes_0.upVotes or nil;
    local v81 = l_votes_0 ~= nil and l_votes_0.downVotes or nil;
    local v82 = (not not l_gameDetail_0 and l_gameDetail_0.name or l_gameInfo_0 and l_gameInfo_0.name) or nil;
    local v83 = (not not l_gameDetail_0 and l_gameDetail_0.playing or l_gameInfo_0 and l_gameInfo_0.playerCount) or nil;
    if l_GetFFlagEnableSwapToSourceButton_0() then
        local v84 = not not l_gameDetail_0 and l_gameDetail_0.sourceName or nil;
        v82 = if not not v73 and v84 ~= nil then v84 else if l_gameDetail_0 and l_gameDetail_0.name ~= nil then l_gameDetail_0.name else not not l_gameInfo_0 and l_gameInfo_0.name or nil;
    end;
    local l_withNewThemeProvider_0 = v62.props.withNewThemeProvider;
    local v87 = l_withStyle_0(function(v86)
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, 0),
            BackgroundTransparency = 1,
            LayoutOrder = l_LayoutOrder_0,
            AutomaticSize = Enum.AutomaticSize.Y
        }, {
            ListLayout = v2.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            Title = if not l_enableNotificationsDiscoverability_0 then l_withNewThemeProvider_0 and v2.createElement(v13, {
                Size = UDim2.new(1, 0, 0, 0),
                Text = v82,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextWrapped = true,
                BackgroundTransparency = 1,
                LayoutOrder = 1,
                Font = v86.Font.Title.Font,
                TextSize = v86.Font.BaseSize * v86.Font.Title.RelativeSize,
                TextColor3 = v86.Theme.TextEmphasis.Color,
                TextTransparency = v86.Theme.TextEmphasis.Transparency
            }) or v2.createElement(v13, {
                Size = UDim2.new(1, 0, 0, 0),
                Text = v82,
                Font = l_appTheme_0.GameDetails.Text.BoldFont,
                TextSize = 32,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextColor3 = l_appTheme_0.GameDetails.Text.Color.Main,
                TextWrapped = true,
                BackgroundTransparency = 1,
                LayoutOrder = 1
            }) else v2.createElement("Frame", {
                BackgroundTransparency = 1,
                LayoutOrder = 1,
                AutomaticSize = Enum.AutomaticSize.Y,
                Size = UDim2.new(1, 0, 0, 0)
            }, {
                TitleHeader = v2.createElement("Frame", {
                    BackgroundTransparency = 1,
                    AutomaticSize = Enum.AutomaticSize.Y,
                    Size = UDim2.new(1, -v36, 0, 0)
                }, {
                    TitleLabel = not not l_withNewThemeProvider_0 and v2.createElement(v13, {
                        Size = UDim2.new(1, -v36, 0, 0),
                        Position = UDim2.new(0, 0, 0, 0),
                        Text = v82,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextWrapped = true,
                        BackgroundTransparency = 1,
                        Font = v86.Font.Title.Font,
                        TextSize = v86.Font.BaseSize * v86.Font.Title.RelativeSize,
                        TextColor3 = v86.Theme.TextEmphasis.Color,
                        TextTransparency = v86.Theme.TextEmphasis.Transparency
                    }) or v2.createElement(v13, {
                        Size = UDim2.new(1, 0, 0, 0),
                        Text = v82,
                        Font = l_appTheme_0.GameDetails.Text.BoldFont,
                        TextSize = 32,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextColor3 = l_appTheme_0.GameDetails.Text.Color.Main,
                        TextWrapped = true,
                        BackgroundTransparency = 1
                    }),
                    PaddingRight = v2.createElement("UIPadding", {
                        PaddingBottom = UDim.new(0, v37)
                    })
                }),
                GameDetailNotificationsButton = not v79 and v2.createElement(v26, {
                    position = UDim2.new(1, -v36, 0, 0),
                    universeId = v62.props.universeId,
                    gameFollowings = v62.props.gameFollowings,
                    rootPlaceId = v70,
                    toggleFollowExperience = v62.toggleFollowExperience
                }) or nil
            }),
            SubTitle = l_showSubtitle_0 and v2.createElement("Frame", {
                BackgroundTransparency = 1,
                LayoutOrder = 2,
                AutomaticSize = Enum.AutomaticSize.Y,
                Size = UDim2.new(1, 0, 0, 0)
            }, {
                BasicStats = v2.createElement(v14, {
                    playerCount = v83,
                    upVotes = v80,
                    downVotes = v81,
                    visits = if not l_showVisits_0 then nil else v68,
                    themeInfo = l_appTheme_0.GameDetails.GameBasicStats,
                    layoutType = v11.GameBasicStatsLayoutType.GameDetails,
                    withNewThemeProvider = l_withNewThemeProvider_0
                }),
                ExperienceGuidelinesHeader = v75 and v2.createElement(v25, {
                    ageSummary = l_ageSummary_0
                })
            })
        });
    end);
    if not v28() or not v76 and v30() then
        return v87;
    else
        return v21({
            containsStrongLanguageText = "Feature.GameDetails.Label.ContainsStrongLanguagePillWarning"
        })(function(v88)
            return l_withStyle_0(function(v89)
                return v2.createElement("Frame", {
                    Size = UDim2.new(1, 0, 0, 0),
                    BackgroundTransparency = 1,
                    LayoutOrder = l_LayoutOrder_0,
                    AutomaticSize = Enum.AutomaticSize.Y
                }, {
                    ListLayout = if not l_GetFFlagEDPContextRedesign_0() then v2.createElement("UIListLayout", {
                        FillDirection = Enum.FillDirection.Vertical,
                        HorizontalAlignment = Enum.HorizontalAlignment.Left,
                        SortOrder = Enum.SortOrder.LayoutOrder
                    }) else v2.createElement("UIListLayout", {
                        FillDirection = Enum.FillDirection.Horizontal,
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        Padding = UDim.new(0, v38)
                    }),
                    GameIcon = if not l_GetFFlagEDPContextRedesign_0() then nil else v2.createElement(l_LoadableImage_0, {
                        LayoutOrder = 1,
                        Size = UDim2.fromOffset(v39, v39),
                        Image = v62.props.gameIcon.url,
                        cornerRadius = UDim.new(0, 8)
                    }),
                    HeaderText = if not l_GetFFlagEDPContextRedesign_0() then nil else v2.createElement("Frame", {
                        Size = UDim2.new(1, -(v39 + v38) - (v36 + v38), 1, 0),
                        BackgroundTransparency = 1,
                        LayoutOrder = 2
                    }, {
                        TextListLayout = v2.createElement("UIListLayout", {
                            FillDirection = Enum.FillDirection.Vertical,
                            HorizontalAlignment = Enum.HorizontalAlignment.Left,
                            SortOrder = Enum.SortOrder.LayoutOrder,
                            Padding = UDim.new(0, 4)
                        }),
                        Title = v2.createElement("TextLabel", {
                            Size = UDim2.new(1, 0, 0, 0),
                            AutomaticSize = Enum.AutomaticSize.Y,
                            Position = UDim2.new(0, 0, 0, 0),
                            Text = v82,
                            TextXAlignment = Enum.TextXAlignment.Left,
                            TextWrapped = true,
                            BackgroundTransparency = 1,
                            Font = v89.Tokens.Semantic.Typography.Header.Font,
                            TextSize = v89.Tokens.Semantic.Typography.Header.FontSize,
                            TextColor3 = v89.Tokens.Semantic.Color.Text.Emphasis.Color3,
                            TextTransparency = v89.Tokens.Semantic.Color.Text.Emphasis.Transparency,
                            LayoutOrder = 1
                        }),
                        Subtitle = (l_showSubtitle_0 and v69) and v62.renderSubtitle(v69, 2)
                    }),
                    GameDetailNotificationsButton = if not not l_GetFFlagEDPContextRedesign_0() and l_enableNotificationsDiscoverability_0 then v2.createElement(v26, {
                        position = UDim2.new(1, -v36, 0, 0),
                        universeId = v62.props.universeId,
                        gameFollowings = v62.props.gameFollowings,
                        rootPlaceId = v70,
                        toggleFollowExperience = v62.toggleFollowExperience,
                        layoutOrder = 3
                    }) else nil,
                    Title = not l_GetFFlagEDPContextRedesign_0() and if l_enableNotificationsDiscoverability_0 then v2.createElement("Frame", {
                        BackgroundTransparency = 1,
                        LayoutOrder = 1,
                        AutomaticSize = Enum.AutomaticSize.Y,
                        Size = UDim2.new(1, 0, 0, 0)
                    }, {
                        TitleHeader = v2.createElement("Frame", {
                            BackgroundTransparency = 1,
                            AutomaticSize = Enum.AutomaticSize.Y,
                            Size = UDim2.new(1, -v36, 0, 0)
                        }, {
                            TitleLabel = not not l_withNewThemeProvider_0 and v2.createElement(v13, {
                                Size = UDim2.new(1, -v36, 0, 0),
                                Position = UDim2.new(0, 0, 0, 0),
                                Text = v82,
                                TextXAlignment = Enum.TextXAlignment.Left,
                                TextWrapped = true,
                                BackgroundTransparency = 1,
                                Font = v89.Font.Title.Font,
                                TextSize = v89.Font.BaseSize * v89.Font.Title.RelativeSize,
                                TextColor3 = v89.Theme.TextEmphasis.Color,
                                TextTransparency = v89.Theme.TextEmphasis.Transparency
                            }) or v2.createElement(v13, {
                                Size = UDim2.new(1, 0, 0, 0),
                                Text = v82,
                                Font = l_appTheme_0.GameDetails.Text.BoldFont,
                                TextSize = 32,
                                TextXAlignment = Enum.TextXAlignment.Left,
                                TextColor3 = l_appTheme_0.GameDetails.Text.Color.Main,
                                TextWrapped = true,
                                BackgroundTransparency = 1
                            }),
                            PaddingRight = v2.createElement("UIPadding", {
                                PaddingBottom = UDim.new(0, v37)
                            })
                        }),
                        GameDetailNotificationsButton = v2.createElement(v26, {
                            position = UDim2.new(1, -v36, 0, 0),
                            universeId = v62.props.universeId,
                            gameFollowings = v62.props.gameFollowings,
                            rootPlaceId = v70,
                            toggleFollowExperience = v62.toggleFollowExperience
                        })
                    }) else l_withNewThemeProvider_0 and v2.createElement(v13, {
                        Size = UDim2.new(1, 0, 0, 0),
                        Text = v82,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextWrapped = true,
                        BackgroundTransparency = 1,
                        LayoutOrder = 1,
                        Font = v89.Font.Title.Font,
                        TextSize = v89.Font.BaseSize * v89.Font.Title.RelativeSize,
                        TextColor3 = v89.Theme.TextEmphasis.Color,
                        TextTransparency = v89.Theme.TextEmphasis.Transparency
                    }) or v2.createElement(v13, {
                        Size = UDim2.new(1, 0, 0, 0),
                        Text = v82,
                        Font = l_appTheme_0.GameDetails.Text.BoldFont,
                        TextSize = 32,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextColor3 = l_appTheme_0.GameDetails.Text.Color.Main,
                        TextWrapped = true,
                        BackgroundTransparency = 1,
                        LayoutOrder = 1
                    }),
                    SubTitle = if l_GetFFlagEDPContextRedesign_0() then nil else l_showSubtitle_0 and v2.createElement("Frame", {
                        BackgroundTransparency = 1,
                        LayoutOrder = 2,
                        AutomaticSize = Enum.AutomaticSize.Y,
                        Size = UDim2.new(1, 0, 0, 0)
                    }, {
                        BasicStats = v2.createElement(v14, {
                            playerCount = v83,
                            upVotes = v80,
                            downVotes = v81,
                            visits = if not l_showVisits_0 then nil else v68,
                            themeInfo = l_appTheme_0.GameDetails.GameBasicStats,
                            layoutType = v11.GameBasicStatsLayoutType.GameDetails,
                            withNewThemeProvider = l_withNewThemeProvider_0
                        }),
                        ExperienceGuidelinesHeader = v75 and v2.createElement(v25, {
                            ageSummary = l_ageSummary_0
                        })
                    });
                    if not v77 then nil else v2.createElement("Frame", {
                        BackgroundTransparency = 1,
                        BorderSizePixel = 0,
                        LayoutOrder = 3,
                        AutomaticSize = Enum.AutomaticSize.Y,
                        Size = UDim2.new(1, 0, 0, 0)
                    }, {
                        PaddingTop = if not v29() then nil else v2.createElement("UIPadding", {
                            PaddingTop = UDim.new(0, 8)
                        });
                        v2.createElement(l_Pillv2_0, {
                            BackgroundTransparency = 1,
                            text = v88.containsStrongLanguageText
                        })
                    })
                });
            end);
        end);
    end;
end;
v40 = v3.connect(function(v90, v91)
    local v92 = v90.Games[v91.universeId];
    return {
        gameDetail = v90.GameDetails[v91.universeId],
        gameInfo = v92,
        gameIcon = if not l_GetFFlagEDPContextRedesign_0() then nil else v90[l_GameIconReducer_0.key][v91.universeId],
        gameFollowings = if not l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then nil else v90.GameFollowings[v91.universeId],
        votes = v90.GameVotes[v91.universeId],
        rootPlaceId = if not l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then nil else v92 and v92.placeId,
        notificationsEnabled = if not v32() then nil else v90.ExperienceNotificationsEnabled or {},
        isLocalUserUnder13 = if not v33() then nil else v90.IsLocalUserUnder13
    };
end, if not l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then nil else function(v93)
    return {
        sendGameFollow = function(v94, v95, v96, v97, v98, v99)
            return v93(v22(v94, v95, v96, v97, v98, v99));
        end
    };
end)((v20(v40)));
if l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then
    v40 = l_RoactServices_0.connect({
        networking = v9,
        eventIngest = v10
    })(v40);
end;
v40 = l_RoactAppPolicy_0.connect(function(v100, _)
    return {
        showSubtitle = v100.getGameDetailsSubtitle()
    };
end)(v40);
if l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then
    v40 = v5.connectUserLayer({
        v12.ExperienceDetailsPageLayer
    }, function(v102, _)
        return {
            enableNotificationsDiscoverability = ((v102[v12.ExperienceDetailsPageLayer] or {})[l_GetNotificationsExperienceDetailsVariant_0.getNotificationsVariantFieldName] or -1) == 2
        };
    end)(v40);
end;
return v40;


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 v5 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local l_abbreviateCount_0 = require(l_CorePackages_0.Workspace.Packages.Localization).abbreviateCount;
local v7 = require(l_Modules_0.LuaApp.Components.PrimaryStatWidget);
local v8 = require(l_Modules_0.LuaApp.Components.GameDetails.GameRatings);
local l_withStyle_0 = require(l_CorePackages_0.UIBlox).Style.withStyle;
local v10 = require(l_Modules_0.LuaApp.withTheme_DEPRECATED);
local v11 = v2.PureComponent:extend("GamePlaysAndRatings");
v11.getLayoutInfo = function(v12, v13, v14, v15, v16, v17)
    local l_appTheme_0 = v12.props.appTheme;
    local l_containerWidth_0 = v12.props.containerWidth;
    local v20 = nil;
    local v21 = nil;
    if not v17 then
        v20 = v7.GetMinimumWidth(v13, v14, l_appTheme_0.GameDetails.Text.BoldFont);
        v21 = v7.GetMinimumWidth(v15, v16, l_appTheme_0.GameDetails.Text.BoldFont);
    else
        v20 = v7.GetMinimumWidthRethemed(v13, v14, v17);
        v21 = v7.GetMinimumWidthRethemed(v15, v16, v17);
    end;
    if l_containerWidth_0 / 2 < math.max(v20, v21) * 2 then
        return {
            isOneRow = false,
            subSectionWidth = l_containerWidth_0,
            widgetWidth = l_containerWidth_0 / 2
        };
    else
        return {
            isOneRow = true,
            subSectionWidth = l_containerWidth_0 / 2,
            widgetWidth = l_containerWidth_0 / 4
        };
    end;
end;
v11.render = function(v22)
    return l_withStyle_0(function(v23)
        local l_appTheme_1 = v22.props.appTheme;
        local l_withNewThemeProvider_0 = v22.props.withNewThemeProvider;
        local l_showGlobalCounters_0 = v22.props.showGlobalCounters;
        local l_containerWidth_1 = v22.props.containerWidth;
        local l_rowPadding_0 = v22.props.rowPadding;
        local l_playing_0 = v22.props.playing;
        local l_visits_0 = v22.props.visits;
        local l_universeId_0 = v22.props.universeId;
        local l_LayoutOrder_0 = v22.props.LayoutOrder;
        local l_localization_0 = v22.props.localization;
        local l_hideVisits_0 = v22.props.hideVisits;
        local v35 = l_abbreviateCount_0(l_playing_0, l_localization_0:GetLocale());
        local v36 = string.upper(l_localization_0:Format("Feature.GameDetails.Label.Playing"));
        local v37 = l_abbreviateCount_0(l_visits_0, l_localization_0:GetLocale());
        local v38 = string.upper(l_localization_0:Format("Feature.GameDetails.Label.Visits"));
        local v39 = v22:getLayoutInfo(v35, v36, v37, v38, l_withNewThemeProvider_0 and v23);
        local l_isOneRow_0 = v39.isOneRow;
        local l_subSectionWidth_0 = v39.subSectionWidth;
        local l_widgetWidth_0 = v39.widgetWidth;
        return v2.createElement("Frame", {
            Size = UDim2.new(0, l_containerWidth_1, 0, 0),
            BackgroundTransparency = 1,
            LayoutOrder = l_LayoutOrder_0,
            AutomaticSize = Enum.AutomaticSize.Y
        }, {
            ListLayout = v2.createElement("UIListLayout", {
                FillDirection = not not l_isOneRow_0 and Enum.FillDirection.Horizontal or Enum.FillDirection.Vertical,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                SortOrder = Enum.SortOrder.LayoutOrder,
                Padding = UDim.new(0, if not l_isOneRow_0 then l_rowPadding_0 else 0)
            }),
            Ratings = v2.createElement(v8, {
                LayoutOrder = not l_isOneRow_0 and 2 or 1,
                universeId = l_universeId_0,
                width = l_subSectionWidth_0,
                withNewThemeProvider = l_withNewThemeProvider_0,
                showGlobalCounters = l_showGlobalCounters_0
            }),
            PlaysAndVisitsSection = (not l_hideVisits_0 and l_showGlobalCounters_0) and v2.createElement("Frame", {
                Size = UDim2.new(0, l_subSectionWidth_0, 0, 0),
                BackgroundTransparency = 1,
                LayoutOrder = not l_isOneRow_0 and 1 or 2,
                AutomaticSize = Enum.AutomaticSize.Y
            }, {
                ListLayout = v2.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Horizontal,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    SortOrder = Enum.SortOrder.LayoutOrder
                }),
                PlaySection = v2.createElement(v7, {
                    icon = "LuaApp/icons/GameDetails/playing_large",
                    number = v35,
                    label = v36,
                    font = l_appTheme_1.GameDetails.Text.BoldFont,
                    color = l_appTheme_1.GameDetails.Text.Color.Main,
                    withNewThemeProvider = l_withNewThemeProvider_0,
                    width = l_widgetWidth_0,
                    LayoutOrder = 1
                }),
                VisitsSection = v2.createElement(v7, {
                    icon = "LuaApp/icons/GameDetails/sessions_large",
                    number = v37,
                    label = v38,
                    font = l_appTheme_1.GameDetails.Text.BoldFont,
                    color = l_appTheme_1.GameDetails.Text.Color.Main,
                    withNewThemeProvider = l_withNewThemeProvider_0,
                    width = l_widgetWidth_0,
                    LayoutOrder = 2
                })
            })
        });
    end);
end;
return (l_RoactServices_0.connect({
    localization = v5
})((v3.connect(function(v43, v44)
    local v45 = v43.GameDetails[v44.universeId];
    local v46 = v43.Games[v44.universeId];
    return {
        playing = (not not v45 and v45.playing or v46 and v46.playerCount) or 0,
        visits = not not v45 and v45.visits or 0
    };
end)((v10(v11))))));


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_abbreviateCount_0 = require(l_CorePackages_0.Workspace.Packages.Localization).abbreviateCount;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v6 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local v7 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v8 = require(l_Modules_0.LuaApp.Services.AppEventIngestService);
local v9 = require(l_CorePackages_0.Workspace.Packages.GameVotesRodux);
local l_ReasonForNotVoteable_0 = v9.Enums.ReasonForNotVoteable;
local l_VoteStatus_0 = v9.Enums.VoteStatus;
local l_FetchGameVotes_0 = v9.GameVotes.FetchGameVotes;
local l_FetchUserGameVotes_0 = v9.UserGameVotes.FetchUserGameVotes;
local l_PatchUserVotes_0 = v9.UserGameVotes.PatchUserVotes;
local v15 = require(l_Modules_0.LuaApp.Enum.RetrievalStatus);
local v16 = require(l_Modules_0.LuaApp.Enum.ToastType);
local v17 = require(l_Modules_0.LuaApp.withTheme_DEPRECATED);
local v18 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local v19 = require(l_Modules_0.LuaApp.Components.GenericIconButton);
local v20 = require(l_Modules_0.LuaApp.Components.DEPRECATED_ImageSetLabel);
local v21 = require(l_Modules_0.LuaApp.Components.PrimaryStatWidget);
local l_Vote_0 = require(l_Modules_0.LuaApp.Analytics.Events.Games.GameDetailsEvents).Vote;
local l_withStyle_0 = require(l_CorePackages_0.UIBlox).Style.withStyle;
local v24 = Rect.new(9, 9, 9, 9);
local v25 = v2.PureComponent:extend("GameRatings");
v25.init = function(v26)
    v26.isMounted = false;
    v26.onVoteButtonActivated = function(v27)
        local l_universeId_0 = v26.props.universeId;
        local l_networking_0 = v26.props.networking;
        local l_rootPlaceId_0 = v26.props.rootPlaceId;
        if v26.isMounted and l_rootPlaceId_0 then
            if v26.props.dataLoadSucceed then
                local l_userGameVotes_0 = v26.props.userGameVotes;
                local l_reasonForNotVoteable_0 = l_userGameVotes_0.reasonForNotVoteable;
                if not l_userGameVotes_0.canVote then
                    if l_reasonForNotVoteable_0 == l_ReasonForNotVoteable_0.PlayGame then
                        v26.props.setCurrentToastMessage({
                            toastType = v16.NetworkingError,
                            toastMessage = "Feature.Toast.VoteError.PlayGame"
                        });
                        return ;
                    elseif l_reasonForNotVoteable_0 == l_ReasonForNotVoteable_0.FloodCheckThresholdMet then
                        v26.props.setCurrentToastMessage({
                            toastType = v16.NetworkingError,
                            toastMessage = "Feature.Toast.VoteError.FloodCheckThresholdMet"
                        });
                        return ;
                    elseif l_reasonForNotVoteable_0 == l_ReasonForNotVoteable_0.AssetNotVoteable then
                        v26.props.setCurrentToastMessage({
                            toastType = v16.NetworkingError,
                            toastMessage = "Feature.Toast.VoteError.AssetNotVoteable"
                        });
                        return ;
                    else
                        v26.props.setCurrentToastMessage({
                            toastType = v16.NetworkingError,
                            toastMessage = "Feature.Toast.VoteError.Default"
                        });
                        return ;
                    end;
                else
                    local l_eventIngest_0 = v26.props.eventIngest;
                    local l_userVote_0 = l_userGameVotes_0.userVote;
                    if l_userVote_0 == v27 then
                        v27 = l_VoteStatus_0.NotVoted;
                    end;
                    v26.props.patchUserVotes(l_networking_0, l_universeId_0, v27, l_userVote_0);
                    l_Vote_0(l_eventIngest_0, "GameRatings", l_rootPlaceId_0, v27, l_userVote_0);
                    return ;
                end;
            elseif v26.props.gameVotesFetchingStatus == v15.Failed then
                v26.props.dispatchFetchGameVotes(l_networking_0, l_universeId_0);
                return ;
            else
                local l_eventIngest_1 = v26.props.eventIngest;
                v26.props.patchUserVotes(l_networking_0, l_universeId_0, v27, l_VoteStatus_0.NotVoted);
                l_Vote_0(l_eventIngest_1, "GameRatings", l_rootPlaceId_0, v27, l_VoteStatus_0.NotVoted);
                return ;
            end;
        else
            return ;
        end;
    end;
    v26.onVoteUpActivated = function()
        v26.onVoteButtonActivated(l_VoteStatus_0.VotedUp);
    end;
    v26.onVoteDownActivated = function()
        v26.onVoteButtonActivated(l_VoteStatus_0.VotedDown);
    end;
end;
v25.render = function(v36)
    local l_appTheme_0 = v36.props.appTheme;
    local l_Position_0 = v36.props.Position;
    local l_LayoutOrder_0 = v36.props.LayoutOrder;
    local l_width_0 = v36.props.width;
    local l_gameVotes_0 = v36.props.gameVotes;
    local l_userGameVotes_1 = v36.props.userGameVotes;
    local l_gameVotesFetchingStatus_0 = v36.props.gameVotesFetchingStatus;
    local l_isLoading_0 = v36.props.isLoading;
    local l_dataLoadSucceed_0 = v36.props.dataLoadSucceed;
    local l_showGlobalCounters_0 = v36.props.showGlobalCounters;
    local l_localization_0 = v36.props.localization;
    local v48 = not not l_gameVotes_0 and l_gameVotes_0.upVotes or 0;
    local v49 = v48 + (not not l_gameVotes_0 and l_gameVotes_0.downVotes or 0);
    local v50 = if not l_showGlobalCounters_0 then string.upper(l_localization_0:Format("Feature.GameDetails.Label.VotesNoTotal")) else string.upper(l_localization_0:Format("Feature.GameDetails.Label.Votes", {
        votes = l_gameVotesFetchingStatus_0 == v15.Done and l_abbreviateCount_0(v49, l_localization_0:GetLocale()) or "--"
    }));
    local v51 = v49 > 0 and tostring((math.floor((v48 / v49) * 100))) .. "%" or "--";
    local v52 = (l_dataLoadSucceed_0 and l_userGameVotes_1) and l_userGameVotes_1.userVote;
    local l_withNewThemeProvider_0 = v36.props.withNewThemeProvider;
    return l_withStyle_0(function(v54)
        return v2.createElement(v20, {
            Size = UDim2.new(0, l_width_0, 0, 70),
            Position = l_Position_0,
            LayoutOrder = l_LayoutOrder_0,
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Image = "LuaApp/buttons/buttonFill",
            ImageColor3 = not not l_withNewThemeProvider_0 and v54.Theme.UIEmphasis.Color or l_appTheme_0.GameDetails.Rating.Background.Color,
            ImageTransparency = not not l_withNewThemeProvider_0 and v54.Theme.UIEmphasis.Transparency or l_appTheme_0.GameDetails.Rating.Background.Transparency,
            ScaleType = Enum.ScaleType.Slice,
            SliceCenter = v24
        }, {
            RatingsStat = v2.createElement(v21, {
                AnchorPoint = Vector2.new(0, 0.5),
                Position = UDim2.new(0, 0, 0.5, 0),
                icon = "LuaApp/icons/GameDetails/rating_large",
                number = v51,
                label = v50,
                font = l_appTheme_0.GameDetails.Text.BoldFont,
                color = l_appTheme_0.GameDetails.Text.Color.Main,
                width = (l_width_0 - 88) - 30,
                withNewThemeProvider = l_withNewThemeProvider_0
            }),
            VoteUp = v2.createElement(v19, {
                AnchorPoint = Vector2.new(1, 0.5),
                Position = UDim2.new(1, -10, 0.5, 0),
                Size = UDim2.new(0, 44, 0, 44),
                iconImage = v52 == l_VoteStatus_0.VotedUp and "LuaApp/icons/GameDetails/voteUpOn" or "LuaApp/icons/GameDetails/voteUpOff",
                iconSize = UDim2.new(0, 36, 0, 36),
                isChecked = v52 == l_VoteStatus_0.VotedUp,
                isLoading = l_isLoading_0,
                onActivated = v36.onVoteUpActivated,
                withNewThemeProvider = l_withNewThemeProvider_0
            }),
            VoteDown = v2.createElement(v19, {
                AnchorPoint = Vector2.new(1, 0.5),
                Position = UDim2.new(1, -64, 0.5, 0),
                Size = UDim2.new(0, 44, 0, 44),
                iconImage = v52 == l_VoteStatus_0.VotedDown and "LuaApp/icons/GameDetails/voteDownOn" or "LuaApp/icons/GameDetails/voteDownOff",
                iconSize = UDim2.new(0, 36, 0, 36),
                isChecked = v52 == l_VoteStatus_0.VotedDown,
                isLoading = l_isLoading_0,
                onActivated = v36.onVoteDownActivated,
                withNewThemeProvider = l_withNewThemeProvider_0
            })
        });
    end);
end;
v25.didMount = function(v55)
    v55.isMounted = true;
end;
v25.willUnmount = function(v56)
    v56.isMounted = false;
end;
return l_RoactServices_0.connect({
    localization = v6,
    networking = v7,
    eventIngest = v8
})((v3.connect(function(v57, v58)
    local v59 = l_FetchGameVotes_0.GetFetchingStatus(v57, v58.universeId);
    local v60 = l_FetchUserGameVotes_0.GetFetchingStatus(v57, v58.universeId);
    local v61 = l_PatchUserVotes_0.GetPatchingStatus(v57, v58.universeId);
    local v62 = v57.GameVotes[v58.universeId];
    local v63 = v57.UserGameVotes[v58.universeId];
    local _ = nil;
    local v65 = {
        gameVotes = v62,
        userGameVotes = v63,
        rootPlaceId = if not not v57.GameDetails and v57.GameDetails[v58.universeId] then v57.GameDetails[v58.universeId].rootPlaceId else (v57.Games and v57.Games[v58.universeId]) and v57.Games[v58.universeId].placeId,
        gameVotesFetchingStatus = v59
    };
    local v66 = true;
    if v59 ~= v15.Fetching then
        v66 = true;
        if v60 ~= v15.Fetching then
            v66 = v61 == v15.Fetching;
        end;
    end;
    v65.isLoading = v66;
    v65.dataLoadSucceed = v62 and v63;
    return v65;
end, function(v67)
    return {
        setCurrentToastMessage = function(v68)
            return v67(v18(v68));
        end,
        dispatchFetchGameVotes = function(v69, v70)
            return v67(l_FetchGameVotes_0.Fetch(v69, v70));
        end,
        patchUserVotes = function(v71, v72, v73, v74)
            return v67(l_PatchUserVotes_0.Patch(v71, v72, v73, v74));
        end
    };
end)((v17(v25)))));


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Roact);
local v2 = require(l_CorePackages_0.RoactRodux);
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v5 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local v6 = require(l_Modules_0.LuaApp.Thunks.CloseCentralOverlay);
local v7 = require(l_Modules_0.LuaApp.withLocalization);
local v8 = require(l_CorePackages_0.UIBlox);
local l_InteractiveAlert_0 = v8.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v8.App.Button.Enum.ButtonType;
local v11 = require(l_Modules_0.LuaApp.Constants);
local v12 = v1.PureComponent:extend("LeaveRobloxAlert");
v12.init = function(v13)
    v13.closeAlert = function()
        v13.props.closeAlert();
    end;
end;
v12.render = function(v14)
    local l_continueFunc_0 = v14.props.continueFunc;
    return v7({
        titleText = "Feature.GameDetails.Message.LeavingRobloxTitle",
        bodyText = "Feature.GameDetails.Message.ExternalLinkWarning",
        cancelButtonText = "Feature.GamePage.LabelCancelField",
        confirmButtonText = "Feature.GameDetails.Action.Continue"
    })(function(v16)
        return (v1.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = v11.Color.BLACK,
            BackgroundTransparency = 1,
            Active = true,
            Selectable = false
        }, {
            AlertWindow = v1.createElement(l_InteractiveAlert_0, {
                title = v16.titleText,
                bodyText = v16.bodyText,
                buttonStackInfo = {
                    buttons = {
                        {
                            buttonType = l_ButtonType_0.Secondary,
                            props = {
                                onActivated = v14.closeAlert,
                                text = v16.cancelButtonText
                            }
                        },
                        {
                            buttonType = l_ButtonType_0.PrimarySystem,
                            props = {
                                onActivated = l_continueFunc_0,
                                text = v16.confirmButtonText
                            }
                        }
                    }
                },
                screenSize = v14.props.screenSize
            })
        }));
    end);
end;
return (l_RoactServices_0.connect({
    localization = v5
})((v2.connect(function(v17, _)
    return {
        screenSize = v17.ScreenSize
    };
end, function(v19)
    return {
        closeAlert = function()
            return v19(v6());
        end
    };
end)(v12))));


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 v4 = require(l_Modules_0.Common.Functional);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local l_AppGuiService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppGuiService;
local v7 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local v8 = require(l_Modules_0.LuaApp.Components.AlertWindow);
local v9 = require(l_Modules_0.LuaApp.Thunks.CloseCentralOverlay);
local v10 = require(l_Modules_0.LuaApp.AppPage);
local v11 = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local v12 = require(l_Modules_0.LuaApp.withLocalization);
local v13 = require(l_Modules_0.LuaApp.ThemeContext_DEPRECATED);
local v14 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppUseWithLocalization);
local v15 = v2.PureComponent:extend("PurchaseGameRobuxShortfallPrompt");
v15.init = function(v16)
    v16.buyRobux = function()
        v16.props.closePrompt();
        v16.props.openPurchaseRobuxPage();
    end;
end;
v15.didMount = function(v17)
    local l_pageFilter_0 = v17.props.pageFilter;
    local l_currentPage_0 = v17.props.currentPage;
    local l_closePrompt_0 = v17.props.closePrompt;
    if not (not l_pageFilter_0 or v4.Find(l_pageFilter_0, l_currentPage_0)) then
        l_closePrompt_0();
    end;
end;
v15.render = function(v21)
    local l_theme_0 = v21.props.theme;
    local l_containerWidth_0 = v21.props.containerWidth;
    local l_robuxShortfall_0 = v21.props.robuxShortfall;
    local l_closePrompt_1 = v21.props.closePrompt;
    local l_localization_0 = v21.props.localization;
    local l_gameName_0 = v21.props.gameName;
    local function v29(v28)
        return v2.createElement(v13.Provider, {
            value = l_theme_0
        }, {
            AlertWindow = v2.createElement(v8, {
                containerWidth = l_containerWidth_0,
                titleText = v28.titleText,
                titleFont = l_theme_0.GameDetails.Text.BoldFont,
                messageText = v28.messageText,
                messageFont = l_theme_0.GameDetails.Text.Font,
                buttonFont = l_theme_0.GameDetails.Text.Font,
                confirmButtonText = v28.confirmButtonText,
                onConfirm = v21.buyRobux,
                hasCancelButton = true,
                onCancel = l_closePrompt_1
            })
        });
    end;
    if not v14() then
        return v29({
            titleText = l_localization_0:Format("Feature.GameDetails.Heading.PurchaseGame"),
            messageText = l_localization_0:Format("Feature.GameDetails.Message.BuyMoreRobuxToPurchaseGameV2", {
                gameName = l_gameName_0,
                shortfallPrice = l_robuxShortfall_0
            }),
            confirmButtonText = l_localization_0:Format("Feature.GameDetails.Action.BuyRobux")
        });
    else
        return v12({
            titleText = "Feature.GameDetails.Heading.PurchaseGame",
            messageText = {
                "Feature.GameDetails.Message.BuyMoreRobuxToPurchaseGameV2";
                gameName = l_gameName_0,
                shortfallPrice = l_robuxShortfall_0
            },
            confirmButtonText = "Feature.GameDetails.Action.BuyRobux"
        })(v29);
    end;
end;
return (l_RoactServices_0.connect({
    localization = v7,
    guiService = l_AppGuiService_0
})((v3.connect(function(v30, _)
    local v32 = v30.Navigation.history[#v30.Navigation.history];
    return {
        currentPage = v32[#v32].name
    };
end, function(v33)
    return {
        closePrompt = function()
            v33(v9());
        end,
        openPurchaseRobuxPage = function()
            return v33(v11({
                name = v10.PurchaseRobux
            }));
        end
    };
end)(v15))));