local v0 = require(game:GetService("CoreGui").RobloxGui.Modules.Personalization.Games.Discovery.SetDiscoveryNextPageId);
return function(v1, v2)
    local v3 = v1 or "";
    if v2.type == v0.name then
        v3 = v2.nextPageId;
    end;
    return v3;
end;


return require(game:GetService("CoreGui").RobloxGui.Modules.Common.Action)(script.Name, function(v0)
    return {
        nextPageId = v0
    };
end);


local _ = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.React);
local l_Signal_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).Signal;
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local l_dependencyArray_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.dependencyArray;
local l_ScreenSizeImpressionsDetector_0 = require(l_CorePackages_0.Workspace.Packages.Impressions).ScreenSizeImpressionsDetector;
local l_ImpressionsVisualizer_0 = require(l_CorePackages_0.Workspace.Packages.Impressions).ImpressionsVisualizer;
return function(v8)
    local v9 = v2.useRef({});
    local v10 = v2.useRef(l_Signal_0.new());
    local v12 = v2.useCallback(function(v11)
        return v8.gameSortId .. "_" .. v11;
    end, {
        v8.gameSortId
    });
    local v13 = nil;
    v13 = v2.useRef(nil);
    if v13.current == nil then
        v13.current = l_ImpressionsVisualizer_0.new(v8.impressionsTag, v12);
    end;
    assert(v13.current);
    local v14, v15 = v2.useState({});
    local v18 = l_useSelector_0(function(v16)
        local v17 = v16.Personalization.TopicContents[v8.gameSortId];
        return not not v17 and v17.updatedTimestamp or nil;
    end);
    v2.useEffect(function()
        v13.current:setCustomKeyMapper(v12);
        v10.current:fire();
    end, {
        v12
    });
    v2.useEffect(function()
        local v19 = v9.current[v8.gameSortId] or {};
        if v19.lastUpdatedTimestamp ~= nil and v18 ~= v19.lastUpdatedTimestamp then
            local l_impressionsSeen_0 = v19.impressionsSeen;
            if l_impressionsSeen_0 then
                local v21 = {};
                for v22, v23 in pairs(l_impressionsSeen_0) do
                    if v23 then
                        table.insert(v21, v22);
                    end;
                end;
                if #v21 > 0 then
                    v13.current:onClearImpressions(v21);
                end;
            end;
            v19.impressionsSeen = {};
        end;
        v19.lastUpdatedTimestamp = v18;
        v9.current[v8.gameSortId] = v19;
        v10.current:fire();
    end, l_dependencyArray_0(v8.gameSortId, v18));
    v2.useEffect(function()
        v10.current:fire();
        local v24 = nil;
        if v8.scrollViewPositionChangedSignal then
            v24 = v8.scrollViewPositionChangedSignal:connect(function()
                v10.current:fire();
            end);
        end;
        return function()
            if v24 ~= nil then
                v24:disconnect();
            end;
        end;
    end, {
        v8.scrollViewPositionChangedSignal
    });
    v2.useEffect(function()
        if v14 ~= nil and #v14 > 0 then
            v8.sendGameImpressions(v14);
            v13.current:onSendImpressions(v14);
            v15({});
        end;
    end, {
        v14
    });
    v2.useEffect(function()
        return function()
            v13.current:destroy();
        end;
    end, {});
    return v2.createElement(l_ScreenSizeImpressionsDetector_0, {
        onRequestImpressionsSignal = v10.current,
        parentRef = v8.parentRef,
        filterImpressionFunc = v2.useCallback(function(v25)
            if v9.current[v8.gameSortId] == nil then
                v9.current[v8.gameSortId] = {
                    impressionsSeen = {},
                    lastUpdatedTimestamp = v18
                };
            end;
            local v26 = v9.current[v8.gameSortId];
            v26.impressionsSeen = v26.impressionsSeen or {};
            if v26.impressionsSeen[v25] ~= nil then
                return false;
            else
                v26.impressionsSeen[v25] = true;
                return true;
            end;
        end, {
            v8.gameSortId
        }),
        onImpressionsDetected = v2.useCallback(function(v27)
            if not v27 or #v27 == 0 then
                return ;
            else
                v15(v27);
                return ;
            end;
        end, {}),
        impressionsTag = v8.impressionsTag
    });
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_HttpService_0 = game:GetService("HttpService");
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.Packages.t);
local l_memoize_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).memoize;
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local _ = require(l_CorePackages_0.Workspace.Packages.GameTile);
local v9 = require(l_Modules_0.LuaApp.Constants);
local v10 = require(l_Modules_0.LuaApp.AppPage);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local l_RoactAnalyticsCommonGameEvents_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).RoactAnalyticsCommonGameEvents;
local v13 = require(l_Modules_0.LuaApp.Components.Games.GameCarousel);
local v14 = require(l_Modules_0.Personalization.Games.GameSortGridRow);
local v15 = require(l_Modules_0.LuaApp.Enum.RetrievalStatus);
local v16 = require(l_Modules_0.LuaApp.Thunks.Games.ApiFetchGamesInSort);
local v17 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v18 = require(l_Modules_0.LuaApp.Actions.Games.SetNextTokenRefreshTime);
local v19 = require(l_Modules_0.LuaApp.Actions.Games.SetGameSortStatus);
local l_GetFFlagApolloClientFetchExperiences_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagApolloClientFetchExperiences;
local l_FFlagLuaAppPlayButtonStyle_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).FFlagLuaAppPlayButtonStyle;
local v22 = require(l_Modules_0.Personalization.Flags.GetFFlagLuaAppSortHideSeeAll);
local l_GetFFlagLuaAppUseTooltipsFromSort_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagLuaAppUseTooltipsFromSort;
local v24 = require(l_Modules_0.Personalization.Flags.FFlagLuaAppLinkSortTitle);
local v25 = require(l_Modules_0.Personalization.Flags.FFlagLuaAppCountdownSubtitle);
local v26 = v3.PureComponent:extend("GameSortContainer");
v26.validateProps = v5.strictInterface({
    gameSortId = v5.string,
    analyticsIndexOnPage = v5.number,
    itemRowData = v5.optional(v5.table),
    pageContext = v5.string,
    sideMargin = v5.number,
    scrollViewPositionChangedSignal = v5.optional(v5.any),
    tileHasFriendFooter = v5.optional(v5.boolean),
    useGridTiles = v5.optional(v5.boolean),
    playerCountStyle = v5.optional(v5.string),
    isSponsoredFooterAllowed = v5.optional(v5.boolean),
    componentType = v5.optional(v5.string),
    linkPath = if not v24 then nil else v5.optional(v5.string),
    hideSeeAll = if not v22() then nil else v5.optional(v5.boolean),
    gameTileLayoutType = v5.string,
    infoText = if not l_GetFFlagLuaAppUseTooltipsFromSort_0() then nil else v5.optional(v5.string),
    endTimestamp = if not v25 then nil else v5.optional(v5.number),
    countdownString = if not v25 then nil else v5.optional(v5.string),
    playButtonStyle = if not l_FFlagLuaAppPlayButtonStyle_0 then nil else v5.optional(v5.string),
    gridSupportAllowed = v5.optional(v5.boolean),
    gameSortContents = if not l_GetFFlagApolloClientFetchExperiences_0() then nil else v5.optional(v5.table),
    sort = if not l_GetFFlagApolloClientFetchExperiences_0() then nil else v5.optional(v5.table),
    sortIndex = v5.optional(v5.number),
    omniRecommendationsPageType = v5.optional(v5.string),
    isOmni = v5.optional(v5.boolean),
    gameSortDataFound = v5.optional(v5.boolean),
    gamesApiSortData = v5.optional(v5.table),
    dispatchFetchGamesInSort = v5.callback,
    dispatchSetNextTokenRefreshTime = v5.callback,
    dispatchSetGameSortStatus = v5.callback,
    useGridPageLayout = v5.optional(v5.boolean),
    analytics = v5.any,
    networking = v5.callback
});
v26.init = function(v27)
    v27.state = {
        gamesApiSortFetchRetries = 0
    };
    v27.fetchGamesInSort = function()
        local l_gameSortDataFound_0 = v27.props.gameSortDataFound;
        local l_gamesApiSortData_0 = v27.props.gamesApiSortData;
        if (l_gameSortDataFound_0 and l_gamesApiSortData_0 ~= nil) and l_gamesApiSortData_0.gameSortFetchingStatus == v15.NotStarted then
            v27.props.dispatchFetchGamesInSort(v27.props.networking, l_gamesApiSortData_0.gameSort):catch(function(v30)
                if v27.state.gamesApiSortFetchRetries > 2 then
                    return ;
                else
                    if not (not v30 or not v30.Body) then
                        local l_status_0, l_result_0 = pcall(function()
                            return l_HttpService_0:JSONDecode(v30.Body);
                        end);
                        if not ((not l_status_0 or not l_result_0) or not l_result_0.errors) then
                            for _, v34 in ipairs(l_result_0.errors) do
                                if v34.code == 400 and v34.field == "sortToken" then
                                    v27.props.dispatchSetGameSortStatus(l_gamesApiSortData_0.gameSort.name, v15.NotStarted);
                                    v27.props.dispatchSetNextTokenRefreshTime(0);
                                    v27:setState({
                                        gamesApiSortFetchRetries = v27.state.gamesApiSortFetchRetries + 1
                                    });
                                end;
                            end;
                        end;
                    end;
                    return ;
                end;
            end);
        end;
    end;
    v27.fetchGamesInSort();
end;
v26.render = function(v35)
    local l_gameSortDataFound_1 = v35.props.gameSortDataFound;
    local l_analyticsIndexOnPage_0 = v35.props.analyticsIndexOnPage;
    local v38 = not not v35.props.gamesApiSortData and v35.props.gamesApiSortData.gameSortPageId or nil;
    if l_gameSortDataFound_1 then
        if not v35.props.gridSupportAllowed or not v35.props.useGridPageLayout then
            return v3.createElement(v13, {
                sortName = v35.props.gameSortId,
                sortIndex = v35.props.sortIndex,
                LayoutOrder = l_analyticsIndexOnPage_0,
                sortIndexOnPage = l_analyticsIndexOnPage_0,
                itemRowData = v35.props.itemRowData,
                omniRecommendationsPageType = v35.props.omniRecommendationsPageType,
                analytics = v35.props.analytics,
                friendFooterEnabled = v35.props.tileHasFriendFooter,
                scrollViewPositionChangedSignal = v35.props.scrollViewPositionChangedSignal,
                context = v35.props.pageContext,
                sideMargin = v35.props.sideMargin,
                sortPageId = v38,
                isOmni = v35.props.isOmni,
                gameSortContents = if not l_GetFFlagApolloClientFetchExperiences_0() then nil else v35.props.gameSortContents,
                sort = if not l_GetFFlagApolloClientFetchExperiences_0() then nil else v35.props.sort,
                useGridTiles = v35.props.useGridTiles,
                playerCountStyle = v35.props.playerCountStyle,
                isSponsoredFooterAllowed = v35.props.isSponsoredFooterAllowed,
                linkPath = if not v24 then nil else v35.props.linkPath,
                componentType = v35.props.componentType,
                hideSeeAll = if not v22() then nil else v35.props.hideSeeAll,
                gameTileLayoutType = v35.props.gameTileLayoutType,
                infoText = if not l_GetFFlagLuaAppUseTooltipsFromSort_0() then nil else v35.props.infoText,
                endTimestamp = if not v25 then nil else v35.props.endTimestamp,
                countdownString = if not v25 then nil else v35.props.countdownString,
                playButtonStyle = if not l_FFlagLuaAppPlayButtonStyle_0 then nil else v35.props.playButtonStyle
            });
        else
            return v3.createElement(v14, {
                sortName = v35.props.gameSortId,
                sortIndex = v35.props.sortIndex,
                sortIndexOnPage = l_analyticsIndexOnPage_0,
                itemRowData = v35.props.itemRowData,
                omniRecommendationsPageType = v35.props.omniRecommendationsPageType,
                gameAnalytics = v35.props.analytics,
                context = v35.props.pageContext,
                sortPageId = v38,
                isOmni = v35.props.isOmni,
                scrollViewPositionChangedSignal = v35.props.scrollViewPositionChangedSignal,
                gameSortContents = if not l_GetFFlagApolloClientFetchExperiences_0() then nil else v35.props.gameSortContents,
                sort = if not l_GetFFlagApolloClientFetchExperiences_0() then nil else v35.props.sort,
                useGridTiles = v35.props.useGridTiles,
                playerCountStyle = v35.props.playerCountStyle,
                isSponsoredFooterAllowed = v35.props.isSponsoredFooterAllowed,
                linkPath = if not v24 then nil else v35.props.linkPath,
                componentType = v35.props.componentType,
                hideSeeAll = if not v22() then nil else v35.props.hideSeeAll,
                gameTileLayoutType = v35.props.gameTileLayoutType,
                infoText = if not l_GetFFlagLuaAppUseTooltipsFromSort_0() then nil else v35.props.infoText,
                endTimestamp = if not v25 then nil else v35.props.endTimestamp,
                countdownString = if not v25 then nil else v35.props.countdownString,
                playButtonStyle = if not l_FFlagLuaAppPlayButtonStyle_0 then nil else v35.props.playButtonStyle
            });
        end;
    else
        return nil;
    end;
end;
v26.didUpdate = function(v39)
    v39.fetchGamesInSort();
end;
local v44 = l_memoize_0(function(v40)
    local v41 = {};
    if not (not v40 or not v40.sorts) then
        for v42, v43 in ipairs(v40.sorts) do
            if v43.topicId then
                v41[tostring(v43.topicId)] = v42;
            end;
        end;
    end;
    return v41;
end);
return (l_RoactServices_0.connect({
    analytics = l_RoactAnalyticsCommonGameEvents_0,
    networking = v17
})((l_RoactAppPolicy_0.connect(function(v45, _)
    return {
        useGridPageLayout = v45.useGridPageLayout()
    };
end)((v4.connect(function(v47, v48)
    local l_gameSortId_0 = v48.gameSortId;
    local l_pageContext_0 = v48.pageContext;
    local v51 = false;
    local v52 = nil;
    local v53 = nil;
    local v54 = nil;
    local v55 = v47.GameSorts[l_gameSortId_0];
    local v56 = nil;
    if v55 ~= nil then
        v51 = true;
        local v57 = nil;
        if l_pageContext_0 == v10.Games then
            v57 = v9.GameSortGroups.Games;
        elseif l_pageContext_0 == v10.Home then
            v57 = v9.GameSortGroups.HomeGames;
        end;
        v56 = {
            gameSort = v55,
            gameSortFetchingStatus = v47.RequestsStatus.GameSortsStatus[l_gameSortId_0] or v15.NotStarted,
            gameSortPageId = if not v57 then nil else v47.GameSortGroups[v57].pageId
        };
    else
        if l_pageContext_0 == v10.Home then
            local l_PAGE_TYPE_HOME_0 = v9.OmniRecommendationsPageType.PAGE_TYPE_HOME;
            local v59 = v44(v47.OmniRecommendations[l_PAGE_TYPE_HOME_0])[l_gameSortId_0];
            if v59 then
                v51 = true;
                v52 = true;
                v53 = v59;
                v54 = l_PAGE_TYPE_HOME_0;
            end;
        end;
        v56 = nil;
    end;
    return {
        sortIndex = v53,
        omniRecommendationsPageType = v54,
        isOmni = v52,
        gameSortDataFound = v51,
        gamesApiSortData = v56
    };
end, function(v60)
    return {
        dispatchFetchGamesInSort = function(v61, v62)
            return v60(v16(v61, v62, false, nil));
        end,
        dispatchSetNextTokenRefreshTime = function(v63)
            return v60(v18(v9.GameSortGroups.Games, v63));
        end,
        dispatchSetGameSortStatus = function(v64, v65)
            return v60(v19(v64, v65));
        end
    };
end)(v26))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.React);
local v3 = require(l_CorePackages_0.Packages.ApolloClient);
local l_useQuery_0 = v3.useQuery;
local l_gql_0 = v3.gql;
local l_Object_0 = require(l_CorePackages_0.Packages.LuauPolyfill).Object;
local _ = require(l_Modules_0.Personalization.DataStoreTypes);
local v8 = require(l_Modules_0.Personalization.Games.GameSortContainer);
local _ = require(l_CorePackages_0.Workspace.Packages.GameTile);
local v10 = l_gql_0("  query OmniFeedItem($sortId: String $sortId) {\n      topicId\n      topic\n      treatmentType\n      hasMoreRows @client\n      experiences {\n        universeId\n        name\n        placeId\n        playerCount\n        totalDownVotes\n        totalUpVotes\n        under9\n        under13\n        adId\n        isSponsored\n        thumbnails {\n          url\n        }\n      }\n    }\n  }\n");
return function(v11)
    local v12 = l_useQuery_0(v10, {
        variables = {
            sortId = v11.gameSortId
        }
    });
    return v2.createElement(v11.containerComponent or v8, (l_Object_0.assign(table.clone(v11.containerProps), {
        gameSortContents = if not not v12.data and v12.data.omniFeedItem then {
            entries = v12.data.omniFeedItem.experiences,
            hasMoreRows = v12.data.omniFeedItem.hasMoreRows
        } else nil,
        sort = if not not v12.data and v12.data.omniFeedItem then {
            displayName = v12.data.omniFeedItem.topic,
            topicId = v12.data.omniFeedItem.topicId,
            treatmentType = v12.data.omniFeedItem.treatmentType
        } else nil
    })));
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local _ = game:GetService("CoreGui").RobloxGui.Modules;
local _ = game:GetService("CollectionService");
local v3 = require(l_CorePackages_0.Packages.React);
local _ = require(l_CorePackages_0.Cryo);
local v5 = require(l_CorePackages_0.UIBlox);
local l_ActionTile_0 = v5.App.Tile.ActionTile;
local l_Images_0 = v5.App.ImageSet.Images;
GameSortGridRowSeeAllTile = function(v8)
    return v3.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.fromScale(1, 1)
    }, {
        Tile = v3.createElement(l_ActionTile_0, {
            title = v8.title,
            icon = l_Images_0["icons/navigation/pushRight"],
            onActivated = v8.onSeeAll,
            isHoverEnabled = false
        })
    });
end;
return GameSortGridRowSeeAllTile;


local _ = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.React);
local l_Signal_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).Signal;
local l_useRouteName_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.useRouteName;
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local v6 = require(l_CorePackages_0.Cryo);
local l_ScreenSizeImpressionsDetector_0 = require(l_CorePackages_0.Workspace.Packages.Impressions).ScreenSizeImpressionsDetector;
local l_ImpressionsVisualizer_0 = require(l_CorePackages_0.Workspace.Packages.Impressions).ImpressionsVisualizer;
return function(v9)
    local v10 = v2.useRef({});
    local v11 = v2.useRef(l_Signal_0.new());
    local v12 = nil;
    v12 = v2.useRef(nil);
    if v12.current == nil then
        v12.current = l_ImpressionsVisualizer_0.new(v9.impressionsTag);
    end;
    assert(v12.current);
    local v13, v14 = v2.useState({});
    local v15, v16 = v2.useState(v9.dataUpdatedTimestamp);
    local v17 = l_useRouteName_0();
    local v19 = l_useSelector_0(function(v18)
        return v18.ScreenSize;
    end);
    local v20 = v2.useRef(v9.impressionsTag);
    v2.useEffect(function()
        if v20.current ~= v9.impressionsTag then
            v20.current = v9.impressionsTag;
            v16(v9.dataUpdatedTimestamp);
            v10.current = {};
            v12.current:onClearAllImpressions();
            v12.current:setImpressionsTag(v9.impressionsTag);
        end;
    end, {
        v9.impressionsTag
    });
    v2.useEffect(function()
        v11.current:fire();
        local v21 = nil;
        if v9.scrollViewPositionChangedSignal then
            v21 = v9.scrollViewPositionChangedSignal:connect(function()
                v11.current:fire();
            end);
        end;
        return function()
            if v21 ~= nil then
                v21:disconnect();
            end;
        end;
    end, {
        v9.scrollViewPositionChangedSignal
    });
    v2.useEffect(function()
        local _ = false;
        if if type(v9.pageContext) == "table" then v6.List.find(v9.pageContext, v17) ~= nil else v17 == v9.pageContext then
            v11.current:fire();
            if v9.dataUpdatedTimestamp ~= v15 then
                v16(v9.dataUpdatedTimestamp);
                v10.current = {};
                v12.current:onClearAllImpressions();
            end;
        end;
    end, {
        v17,
        v9.pageContext,
        v9.dataUpdatedTimestamp,
        v15,
        v19
    });
    v2.useEffect(function()
        if v13 ~= nil and #v13 > 0 then
            v9.sendGameImpressions(v13);
            v12.current:onSendImpressions(v13);
            v14({});
        end;
    end, {
        v13
    });
    v2.useEffect(function()
        return function()
            v12.current:destroy();
        end;
    end, {});
    return v2.createElement(l_ScreenSizeImpressionsDetector_0, {
        onRequestImpressionsSignal = v11.current,
        parentRef = v9.parentRef,
        filterImpressionFunc = v2.useCallback(function(v23)
            if v10.current[v23] ~= nil then
                return false;
            else
                v10.current[v23] = true;
                return true;
            end;
        end, {}),
        onImpressionsDetected = v2.useCallback(function(v24)
            if not v24 or #v24 == 0 then
                return ;
            else
                v14(v24);
                return ;
            end;
        end, {}),
        impressionsTag = v9.impressionsTag
    });
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Packages.React);
local v2 = require(l_CorePackages_0.Packages.ReactFocusNavigation);
local v3 = require(l_CorePackages_0.Packages.InputHandlers);
local l_FocusNavigationEventNameEnum_0 = require(l_CorePackages_0.Workspace.Packages.FocusNavigationUtils).FocusNavigationEventNameEnum;
local v5 = {
    [Enum.KeyCode.ButtonX] = l_FocusNavigationEventNameEnum_0.SeeAll
};
local v6 = {};
local function v8(v7)
    return v2.useEventHandlerMap(v1.useMemo(function()
        return {
            [l_FocusNavigationEventNameEnum_0.SeeAll] = {
                handler = v3.onRelease(v7)
            }
        };
    end, {
        v7
    }), (v2.useEventMap(v5)));
end;
v6.useControllerBarFocusNavigationBindings = v8;
v6.OnSeeAllControllerBarNavigateWrapper = function(v9)
    return v1.createElement("Frame", {
        ref = v8(v9.onSeeAll),
        Size = UDim2.new(1, 0, 0, 0),
        AutomaticSize = Enum.AutomaticSize.Y,
        BackgroundTransparency = 1
    }, v9.children);
end;
return v6;


local l_LocalizationService_0 = game:GetService("LocalizationService");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v3 = require(l_Modules_0.LuaApp.AppPage);
local v4 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v5 = require(l_CorePackages_0.Workspace.Packages.LoggingProtocol);
local v6 = require(l_CorePackages_0.Cryo);
local _ = require(l_Modules_0.Personalization.DataStoreTypes);
local _ = require(l_Modules_0.Personalization.OmniFeed.DataStore.FeedItemModel);
local _ = require(l_CorePackages_0.Workspace.Packages.Loggers).mutedError;
local v10 = require(l_Modules_0.Personalization.Analytics.gameImpressionsEvent);
local v11 = require(l_Modules_0.Personalization.Impressions.reportGameImpressionCounts);
local v12 = require(l_Modules_0.Personalization.Analytics.RobloxTelemetryConfigs.FeedItemRowDataHitCounter);
local v13 = require(l_Modules_0.Personalization.Analytics.RobloxTelemetryConfigs.FeedItemRowDataMissingCounter);
local v14 = require(l_Modules_0.Personalization.Flags.FFlagOmniItemsRowDataEnabled);
local function v37(v15, v16, v17, v18, v19)
    local v20 = {};
    local v21 = {};
    local v22 = {};
    local v23 = {};
    local v24 = {};
    local v25 = {};
    local v26 = {};
    local v27 = {};
    local v28 = {};
    local v29 = false;
    for _, v31 in ipairs(v15) do
        local v32 = v16[v31];
        if v32 ~= nil then
            table.insert(v20, v32.placeId or 0);
            table.insert(v21, v31);
            table.insert(v22, v32.universeId or 0);
            if not v32.isSponsored then
                table.insert(v24, 0);
                table.insert(v25, 0);
            else
                v29 = true;
                table.insert(v24, 1);
                table.insert(v25, v32.adId or 0);
            end;
            if not v14 then
                if v17 and v17 > 0 then
                    table.insert(v26, (math.ceil(v31 / v17)));
                end;
            else
                local v33 = nil;
                local v34 = nil;
                if v17 and v17 > 0 then
                    v33 = math.ceil(v31 / v17);
                    v34 = v31 % v17;
                    if v34 == 0 then
                        v34 = v17;
                    end;
                    table.insert(v26, v33);
                else
                    v4.assert(v17 ~= 0);
                    v33 = 1;
                    v34 = v31;
                end;
                if v19 then
                    table.insert(v27, (v19 + v33) - 1);
                    table.insert(v28, v34);
                end;
            end;
            if v18 then
                table.insert(v23, v32.primaryWideAssetId or "0");
            end;
        end;
    end;
    local v35 = #v20;
    v4.assert(v35 == #v21);
    v4.assert(v35 == #v22);
    v4.assert(v35 == #v24);
    v4.assert(v35 == #v25);
    if #v26 > 0 then
        v4.assert(v35 == #v26);
    end;
    if v14 then
        if #v27 > 0 then
            v4.assert(v35 == #v27);
        end;
        if #v28 > 0 then
            v4.assert(v35 == #v28);
        end;
    end;
    local v36 = {
        rootPlaceIds = table.concat(v20, ","),
        absPositions = table.concat(v21, ","),
        universeIds = table.concat(v22, ",")
    };
    if v29 then
        v36.adFlags = table.concat(v24, ",");
        v36.adIds = table.concat(v25, ",");
    end;
    if #v26 > 0 then
        v36.rows = table.concat(v26, ",");
    end;
    if v14 then
        if #v27 > 0 then
            v36.rowsOnPage = table.concat(v27, ",");
        end;
        if #v28 > 0 then
            v36.positionsInRows = table.concat(v28, ",");
        end;
    end;
    if v18 and #v23 > 0 then
        v36.thumbnailAssetIds = table.concat(v23, ",");
    end;
    return v36, v35;
end;
return {
    sendFromTopicContents = function(v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50)
        if v38 and v39 then
            if not v40 or #v40 == 0 then
                return ;
            elseif not v41 or #v41 == 0 then
                return ;
            else
                local v51 = nil;
                if not (not (v14 and v42 == v3.Home) or not v45) then
                    if not v45.startRowNumber or not v45.numberOfRows then
                        v5.default:logRobloxTelemetryCounter(v13);
                    else
                        v5.default:logRobloxTelemetryCounter(v12);
                    end;
                    v51 = if v45.numberOfRows == 0 then nil else v45.startRowNumber;
                end;
                local v52 = nil;
                local v53 = nil;
                local v54, v55 = v37(v40, v41, v48, v49, v51);
                v52 = v54;
                v53 = v55;
                v10(v38, v42, (v6.Dictionary.join(v52, {
                    sortPos = v44,
                    gameSetTypeId = v43,
                    gameSetTargetId = v46,
                    pageId = v47,
                    componentType = v50,
                    locale = l_LocalizationService_0.RobloxLocaleId
                })));
                v11(v39, v42, v53);
                return ;
            end;
        else
            return ;
        end;
    end,
    sendFromSearch = function(v56, v57, v58, v59, v60, v61)
        if v56 and v57 then
            if not v58 or #v58 == 0 then
                return ;
            elseif not v59 or #v59 == 0 then
                return ;
            else
                local v62, v63 = v37(v58, v59);
                v62.locale = l_LocalizationService_0.RobloxLocaleId;
                v10(v56, v60, (v6.Dictionary.join(v62, v61)));
                v11(v57, v60, v63);
                return ;
            end;
        else
            return ;
        end;
    end,
    sendFromGameDetails = function(v64, v65, v66, v67, v68)
        local v69, v70 = v37(v66, v67);
        v69.locale = l_LocalizationService_0.RobloxLocaleId;
        v69.refId = v68;
        v10(v64, "recommended", v69);
        v11(v65, "recommended", v70);
    end,
    sendFromSeeAll = function(v71, v72, v73, v74, v75, v76, v77, v78)
        if v71 and v72 then
            if not v73 or #v73 == 0 then
                return ;
            elseif not v74 or #v74 == 0 then
                return ;
            else
                local v79, v80 = v37(v73, v74);
                v10(v71, v75, (v6.Dictionary.join(v79, {
                    gameSetTypeId = v76,
                    gameSetTargetId = v77,
                    pageId = v78,
                    locale = l_LocalizationService_0.RobloxLocaleId,
                    seeAllFlag = 1
                })));
                v11(v72, v75, v80, 1);
                return ;
            end;
        else
            return ;
        end;
    end
};


local l_CorePackages_0 = game:GetService("CorePackages");
local _ = require(l_CorePackages_0.Workspace.Packages.LinkingProtocol).LinkingProtocol;
local l_useNavigation_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.useNavigation;
local v3 = require(l_CorePackages_0.Workspace.Packages.React);
local l_UrlBuilder_0 = require(l_CorePackages_0.Packages.UrlBuilder).UrlBuilder;
local l_AppPage_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).AppPage;
local l_useAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).useAppPolicy;
local l_useRoactService_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppHooks).useRoactService;
local l_AppEventIngestService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppEventIngestService;
local v9 = require(l_CorePackages_0.Packages.t);
local l_mutedError_0 = require(l_CorePackages_0.Workspace.Packages.Loggers).mutedError;
local v11 = v9.strictInterface({
    action = v9.string,
    linkPath = v9.string,
    webViewSupported = v9.boolean,
    gameSetTypeId = v9.optional(v9.string),
    durationInSeconds = v9.optional(v9.number)
});
local function _(v12)
    local v13, v14 = v11(v12);
    if not v13 then
        l_mutedError_0(v14);
    end;
end;
return function()
    local v16 = l_useNavigation_0();
    local v18 = l_useAppPolicy_0(function(v17)
        return v17.getWebViewSupport();
    end);
    local v19 = l_useRoactService_0(l_AppEventIngestService_0);
    return v3.useCallback(function(v20, v21, v22, v23, v24)
        local function _(v25, v26)
            local v27 = {
                linkPath = v20,
                action = v25,
                gameSetTypeId = v23,
                webViewSupported = v18,
                durationInSeconds = v26
            };
            local v28, v29 = v11(v27);
            if not v28 then
                l_mutedError_0(v29);
            end;
            v19:sendEventDeferred(v21, "navigateToSortLink", v27);
        end;
        local v31 = {
            linkPath = v20,
            action = "click",
            gameSetTypeId = v23,
            webViewSupported = v18,
            durationInSeconds = nil
        };
        local v32, v33 = v11(v31);
        if not v32 then
            l_mutedError_0(v33);
        end;
        v19:sendEventDeferred(v21, "navigateToSortLink", v31);
        if not v18 then
            warn("WebView is not supported on this platform");
            return ;
        else
            v31 = l_UrlBuilder_0.fromString(if string.find(v20, "/") == 1 then v20:gsub("/", "www:", 1) else v20)();
            v32 = os.clock();
            v33 = {
                linkPath = v20,
                action = "open",
                gameSetTypeId = v23,
                webViewSupported = v18,
                durationInSeconds = nil
            };
            local v34, v35 = v11(v33);
            if not v34 then
                l_mutedError_0(v35);
            end;
            v19:sendEventDeferred(v21, "navigateToSortLink", v33);
            v16.navigate(l_AppPage_0.GenericWebPage, {
                detail = v31,
                extraProps = {
                    title = v22,
                    onClose = function()
                        local v36 = {
                            linkPath = v20,
                            action = "close",
                            gameSetTypeId = v23,
                            webViewSupported = v18,
                            durationInSeconds = os.clock() - v32
                        };
                        local v37, v38 = v11(v36);
                        if not v37 then
                            l_mutedError_0(v38);
                        end;
                        v19:sendEventDeferred(v21, "navigateToSortLink", v36);
                        if v24 then
                            v24();
                        end;
                    end
                }
            });
            return ;
        end;
    end, {
        v16,
        v18
    });
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Players_0 = game:GetService("Players");
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.UIBlox);
local l_LoadingStateContainer_0 = v5.App.Container.LoadingStateContainer;
local l_RetrievalStatus_0 = v5.App.Loading.Enum.RetrievalStatus;
local v8 = require(l_CorePackages_0.RoactNavigation);
local v9 = require(l_CorePackages_0.Packages.t);
local v10 = require(l_CorePackages_0.tutils);
local v11 = require(l_CorePackages_0.Cryo);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v13 = require(l_Modules_0.LuaApp.Services.RoactAnalytics);
local l_AppStartupSequenceTag_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppStartupSequenceTag;
local l_AppSessionService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppSessionService;
local l_AppLogging_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppLogging;
local l_AppPrefetch_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppPrefetch;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v19 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local l_AppOmniRecommendationsRequest_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppOmniRecommendationsRequest;
local v21 = require(l_Modules_0.LuaApp.Services.AppEventIngestService);
local v22 = require(l_Modules_0.LuaApp.AppPage);
local v23 = require(l_Modules_0.LuaApp.Components.Games.TokenRefreshComponent);
local v24 = require(l_Modules_0.LuaApp.Components.Games.OmniRecommendationsRefreshComponent);
local v25 = require(l_Modules_0.LuaApp.Constants);
local v26 = require(l_Modules_0.LuaApp.Promise);
local v27 = require(l_Modules_0.LuaApp.Thunks.SetNetworkingErrorToast);
local v28 = require(l_Modules_0.LuaApp.Thunks.FetchHomePageData);
local v29 = require(l_Modules_0.LuaApp.Enum.RetrievalStatus);
local v30 = require(l_Modules_0.LuaApp.Thunks.Omni.ApiFetchOmniRecommendations);
local v31 = require(l_Modules_0.LuaApp.Thunks.RefreshGameSorts);
local v32 = require(l_Modules_0.LuaApp.Actions.RefreshSiteAlertInfo);
local v33 = require(l_Modules_0.Personalization.OmniFeed.DataStore.AddLocalOmniItems);
local v34 = require(l_Modules_0.Personalization.OmniFeed.OmniFeedConstants);
local v35 = require(l_Modules_0.Personalization.OmniFeed.OmniFeedTypes);
local v36 = require(l_Modules_0.Personalization.Sessions.PageSessionManager);
local v37 = require(l_Modules_0.Personalization.Sessions.setHomePageSessionInfo);
local _ = require(l_Modules_0.Personalization.DataStoreTypes);
local v39 = require(l_Modules_0.Personalization.OmniFeed.FeedViews.OmniFeedViewSelector);
local v40 = require(l_Modules_0.Personalization.OmniFeed.FeedViews.OmniFeedViewLoadMore);
local v41 = require(l_Modules_0.Personalization.Analytics.ScrollingPerfTracker);
local v42 = require(l_Modules_0.Personalization.Analytics.feedScroll);
local v43 = require(l_Modules_0.LuaApp.Components.Banner.useBannerContainer);
local v44 = require(l_Modules_0.LuaApp.Enum.OptionalContactMethodUpsellTypes);
local v45 = require(l_Modules_0.Personalization.OmniFeed.DataStore.SetOmniFeedItemsRowData);
local v46 = require(l_Modules_0.Personalization.OmniFeed.DataStore.ClearOmniFeedItemsRowData);
local v47 = game:DefineFastInt("LuaAppHomeFeedProfilePosition", 1);
local v48 = game:DefineFastInt("LuaAppHomeFeedFriendsPosition", 1);
local v49 = game:DefineFastInt("LuaAppHomeFeedUpsellCardPosition", 1);
local v50 = require(l_Modules_0.Personalization.Flags.FFlagLuaAppConsoleSupportRFY);
local v51 = require(l_Modules_0.Personalization.Flags.FFlagOmniItemsRowDataEnabled);
local v52 = require(l_Modules_0.LuaApp.Flags.GetFFlagUseHomeOmniFeedDataLoader);
local v53 = require(l_Modules_0.LuaApp.Flags.GetFFlagFixFetchNextOmniWithoutPageToken);
local v54 = require(l_Modules_0.Personalization.Flags.GetFFlagUseUpsellCardOmniFeedItem);
local v55 = require(l_Modules_0.LuaApp.Flags.GetFFlagEnableHomePageUpsellCard);
local v56 = require(l_Modules_0.LuaApp.Flags.GetFFlagEnableHomePageEmailUpsellCard);
local l_IsPrefetchOneCopyEnabled_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).IsPrefetchOneCopyEnabled;
local l_Home_0 = v22.Home;
local v59 = v3.PureComponent:extend("HomeOmniFeed");
v59.validateProps = v9.strictInterface({
    hasNextPage = v9.optional(v9.boolean),
    homeOmniFetchStatus = if not v53() then nil else v9.optional(v9.string),
    localUserId = v9.string,
    homePageDataStatus = v9.string,
    omniFeedItems = v9.optional(v9.table),
    hasLocalOmniItems = v9.optional(v9.boolean),
    recommendationsRequestId = v9.optional(v9.string),
    omniSessionId = v9.optional(v9.string),
    omniItemsGlobalLayoutData = v9.optional(v9.table),
    screenSize = v9.Vector2,
    upsellCardVariation = v9.optional(v9.table),
    addLocalFeedItems = v9.callback,
    refresh = v9.callback,
    loadNext = v9.optional(v9.callback),
    fetchHomePageData = v9.callback,
    setOmniFeedItemsRowData = if not v51 then nil else v9.callback,
    clearOmniFeedItemsRowData = if not v51 then nil else v9.callback,
    isOmni = v9.optional(v9.boolean),
    appAnalytics = v9.any,
    networking = v9.any,
    loggingProtocol = v9.optional(v9.any),
    prefetchProtocol = v9.optional(v9.any),
    sessionService = v9.optional(v9.any),
    appStartupSequence = v9.any,
    eventIngest = v9.any,
    omniRecommendationsRequest = if not l_IsPrefetchOneCopyEnabled_0() then nil else v9.any,
    navigation = v9.any,
    header = v9.optional(v9.any),
    headerHeight = v9.number
});
local function _(v60)
    local v61 = false;
    if v60 ~= v29.NotStarted then
        v61 = v60 ~= v29.Fetching;
    end;
    return v61;
end;
local function _(v63)
    local v64 = true;
    if v63 ~= v44.ContactMethodPhoneNumber then
        v64 = true;
        if v63 ~= v44.ContactMethodPhoneNumberVoiceOptIn then
            v64 = true;
            if v63 ~= v44.ContactMethodPhoneNumberEmailVerticalLayout then
                v64 = true;
                if v63 ~= v44.ContactMethodPhoneNumberEmailHorizontalLayout then
                    v64 = v56() and v63 == v44.ContactMethodEmail;
                end;
            end;
        end;
    end;
    return v64;
end;
v59.init = function(v66)
    v66.props.loggingProtocol:logEventOnce("home_page_container_init");
    v66.isMounted = false;
    v66.loadNext = function()
        local l_hasNextPage_0 = v66.props.hasNextPage;
        local l_loadNext_0 = v66.props.loadNext;
        if not v53() then
            if not (not l_hasNextPage_0 or not l_loadNext_0) then
                return l_loadNext_0(v66.props.networking, v66.props.omniRecommendationsRequest);
            end;
        else
            local l_homeOmniFetchStatus_0 = v66.props.homeOmniFetchStatus;
            if not (not l_hasNextPage_0 or not l_loadNext_0) and l_homeOmniFetchStatus_0 ~= v29.Fetching then
                return l_loadNext_0(v66.props.networking, v66.props.omniRecommendationsRequest);
            end;
        end;
        return v26.resolve();
    end;
    v66.fetchHomePageData = function()
        return v66.props.fetchHomePageData(v66.props.networking, v66.props.omniRecommendationsRequest, v66.props.appAnalytics, v66.props.localUserId, v66.props.isOmni, v66.props.loggingProtocol, v66.props.prefetchProtocol);
    end;
    v66.scrollingFrameRef = v3.createRef();
    v66.sendScrollEvent = function(v70, v71, v72)
        local l_Y_0 = Enum.ScrollingDirection.Y;
        if l_Y_0 then
            local v74 = 0;
            if v66.scrollingFrameRef.current then
                v74 = v66.scrollingFrameRef.current.AbsoluteSize.Y;
            end;
            v42(v66.props.eventIngest, l_Home_0, l_Y_0, {
                distance = v70,
                screenSizeX = v66.props.screenSize.X,
                screenSizeY = v66.props.screenSize.Y,
                scrollAreaSize = v74,
                scrollDepth = if v74 > 0 then v70 / v74 else nil,
                startDepth = if v74 > 0 then v72 / v74 else nil,
                startPos = v72,
                scrollDuration = v71
            });
        end;
    end;
    v66.logHomePageInteractive = function(v75)
        if v66.isMounted then
            if v75 then
                if not v66.props.appStartupSequence.isInteractive then
                    if v75.AbsoluteSize.X > 1 and v75.AbsoluteSize.Y > 1 then
                        v66.props.loggingProtocol:logEventOnce("home_page_interactive_legacy");
                        task.defer(function()
                            v66.props.loggingProtocol:logEventOnce("home_page_interactive");
                        end);
                        v66.props.appStartupSequence:setInteractive();
                    end;
                    return ;
                else
                    return ;
                end;
            else
                return ;
            end;
        else
            return ;
        end;
    end;
    v66.setHomePageSessionInfoFunc = function()
        v37(v66.props.sessionService, v66.props.recommendationsRequestId, v66.props.omniSessionId);
    end;
    v66.insertLocalFeedItem = function(v76, v77, v78, v79, v80)
        table.insert(v76, {
            orderIndex = v77,
            treatmentType = v78,
            treatmentProps = v79,
            numberOfRows = if not v51 then nil else v80
        });
    end;
    v66.createLocalFeedItems = function()
        local l_homePageDataStatus_0 = v66.props.homePageDataStatus;
        local v82 = false;
        if l_homePageDataStatus_0 ~= v29.NotStarted then
            v82 = l_homePageDataStatus_0 ~= v29.Fetching;
        end;
        if v82 then
            v82 = {};
            if v47 > 0 then
                v66.insertLocalFeedItem(v82, v47, v35.UserInfo, {}, if not v51 then nil else 0);
            end;
            if v54() then
                l_homePageDataStatus_0 = v55();
                if l_homePageDataStatus_0 then
                    l_homePageDataStatus_0 = v66.props.upsellCardVariation;
                    if l_homePageDataStatus_0 then
                        local l_upsellCardType_0 = v66.props.upsellCardVariation.upsellCardType;
                        l_homePageDataStatus_0 = true;
                        if l_upsellCardType_0 ~= v44.ContactMethodPhoneNumber then
                            l_homePageDataStatus_0 = true;
                            if l_upsellCardType_0 ~= v44.ContactMethodPhoneNumberVoiceOptIn then
                                l_homePageDataStatus_0 = true;
                                if l_upsellCardType_0 ~= v44.ContactMethodPhoneNumberEmailVerticalLayout then
                                    l_homePageDataStatus_0 = true;
                                    if l_upsellCardType_0 ~= v44.ContactMethodPhoneNumberEmailHorizontalLayout then
                                        l_homePageDataStatus_0 = v56() and l_upsellCardType_0 == v44.ContactMethodEmail;
                                    end;
                                end;
                            end;
                        end;
                        if l_homePageDataStatus_0 then
                            l_homePageDataStatus_0 = v49 > 0;
                        end;
                    end;
                end;
                if l_homePageDataStatus_0 then
                    v66.insertLocalFeedItem(v82, v49, v35.UpsellCard, {});
                end;
            end;
            l_homePageDataStatus_0 = v66.props.omniItemsGlobalLayoutData;
            local l_l_homePageDataStatus_0_0 = l_homePageDataStatus_0;
            if l_l_homePageDataStatus_0_0 then
                l_l_homePageDataStatus_0_0 = true;
                if l_homePageDataStatus_0[v34.GlobalLayoutDataKeys.JYFRefresh] ~= "true" then
                    l_l_homePageDataStatus_0_0 = l_homePageDataStatus_0[v34.GlobalLayoutDataKeys.JYFRefresh] == true;
                end;
            end;
            if not l_l_homePageDataStatus_0_0 and v48 > 0 then
                v66.insertLocalFeedItem(v82, v48, v35.FriendCarousel, {});
            end;
            v66.props.addLocalFeedItems(v82);
            return ;
        else
            return ;
        end;
    end;
    v66.fetchDataIfNeeded = function()
        if v66.props.homePageDataStatus == v29.NotStarted then
            v66.fetchHomePageData();
        end;
    end;
    v66._willFocusListener = v66.props.navigation.addListener(v8.Events.WillFocus, function()
        v66.fetchDataIfNeeded();
    end);
    v66.fetchDataIfNeeded();
    v66.createLocalFeedItems();
end;
v59.render = function(v85)
    local l_homePageDataStatus_1 = v85.props.homePageDataStatus;
    local l_isOmni_0 = v85.props.isOmni;
    local l_l_homePageDataStatus_1_0 = l_homePageDataStatus_1;
    local l_l_l_homePageDataStatus_1_0_0 = l_l_homePageDataStatus_1_0;
    local v90 = false;
    if l_l_l_homePageDataStatus_1_0_0 ~= v29.NotStarted then
        v90 = l_l_l_homePageDataStatus_1_0_0 ~= v29.Fetching;
    end;
    if not (not v90 or v85.props.hasLocalOmniItems) then
        l_l_homePageDataStatus_1_0 = v29.Fetching;
    end;
    return v3.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1,
        BorderSizePixel = 0
    }, {
        TokenRefreshComponent = not not l_isOmni_0 and v3.createElement(v24, {
            pageType = v25.OmniRecommendationsPageType.PAGE_TYPE_HOME
        }) or v3.createElement(v23, {
            sortToRefresh = v25.GameSortGroups.HomeGames
        }),
        PageSessionManager = v3.createElement(v36, {
            appPage = l_Home_0,
            setPageSession = v85.setHomePageSessionInfoFunc
        }),
        LoadingStateContainer = v3.createElement(l_LoadingStateContainer_0, {
            dataStatus = l_RetrievalStatus_0.fromRawValue(l_l_homePageDataStatus_1_0),
            onRetry = v85.fetchHomePageData,
            renderOnLoaded = function()
                return v3.createElement(if not v50 then v39 else v40, {
                    pageContext = l_Home_0,
                    refresh = function(v91)
                        return v85.props.refresh(v85.props.networking, v85.props.omniRecommendationsRequest, v85.props.isOmni, v91);
                    end,
                    omniFeedItems = v85.props.omniFeedItems,
                    impressionsTag = "FEEDITEM_IMPRESSIONS",
                    onAbsoluteSizeChanged = v85.logHomePageInteractive,
                    hasNextPage = v85.props.hasNextPage,
                    loadNext = v85.loadNext,
                    scrollingFrameRef = v85.scrollingFrameRef,
                    analyticsContext = v34.EventContext,
                    header = v85.props.header,
                    headerHeight = v85.props.headerHeight,
                    sendScrollEvent = v85.sendScrollEvent
                });
            end
        })
    });
end;
v59.didUpdate = function(v92, v93, _)
    if not ((v92.props.hasLocalOmniItems and v93.omniItemsGlobalLayoutData == v92.props.omniItemsGlobalLayoutData) and v93.homePageDataStatus == v92.props.homePageDataStatus) or v93.upsellCardVariation ~= v92.props.upsellCardVariation then
        v92.createLocalFeedItems();
    end;
    if v92.scrollingPerf then
        v92.scrollingPerf:setScrollingFrame(v92.scrollingFrameRef.current);
    end;
    if not (not v51 or v10.shallowEqual(v92.props.omniFeedItems, v93.omniFeedItems)) then
        v92.props.setOmniFeedItemsRowData(v92.props.omniFeedItems);
    end;
end;
v59.didMount = function(v95)
    v95.isMounted = true;
    v95.logHomePageInteractive(v95.scrollingFrameRef.current);
    if v41 then
        v95.scrollingPerf = v41.new("HomeOmniFeed", {
            loggingProtocol = v95.props.loggingProtocol,
            analyticsService = v95.props.appAnalytics
        });
        v95.scrollingPerf:setScrollingFrame(v95.scrollingFrameRef.current);
    end;
    if v51 then
        v95.props.setOmniFeedItemsRowData(v95.props.omniFeedItems);
    end;
end;
v59.willUnmount = function(v96)
    if v96.scrollingPerf then
        v96.scrollingPerf:clean();
        v96.scrollingPerf = nil;
    end;
    v96.isMounted = false;
    if v96._willFocusListener ~= nil then
        v96._willFocusListener.remove();
        v96._willFocusListener = nil;
    end;
    if v51 then
        v96.props.clearOmniFeedItemsRowData();
    end;
end;
local v128 = v4.connect(function(v97, v98)
    local v99 = nil;
    local v100 = nil;
    local v101 = nil;
    local v102 = nil;
    local v103 = nil;
    local l_LocalUserId_0 = v97.LocalUserId;
    local v105 = nil;
    local v106 = nil;
    if not l_LocalUserId_0 or l_LocalUserId_0 == "" then
        l_LocalUserId_0 = not not l_Players_0.LocalPlayer and l_Players_0.LocalPlayer.UserId or 0;
    end;
    local v107 = if not not v53() and v98.isOmni then v97.RequestsStatus.OmniRecommendationsRetrievalStatus[v25.OmniRecommendationsPageType.PAGE_TYPE_HOME] else nil;
    if not v52() then
        if v98.isOmni then
            local v108 = v97.OmniRecommendations[v25.OmniRecommendationsPageType.PAGE_TYPE_HOME];
            if v108 then
                v99 = v108.recommendationsId;
                v100 = v108.omniSessionId;
                v101 = v108.nextPageToken;
            end;
        end;
        local v109 = false;
        if v101 ~= nil then
            v109 = false;
            if v101 ~= "" then
                v109 = v98.isOmni;
            end;
        end;
        v103 = v109;
        v109 = v97.Personalization.OrderedOmniItems[l_Home_0];
        v102 = not not v109 and v109.allItems or {};
        v105 = not not v109 and (v109.hasLocalItems or false);
        v106 = v97.Personalization.OmniItemsGlobalLayoutData;
    end;
    return {
        localUserId = tostring(l_LocalUserId_0),
        homePageDataStatus = v97.Startup.HomePageDataStatus,
        homeOmniFetchStatus = if not v53() then nil else v107,
        screenSize = v97.ScreenSize,
        upsellCardVariation = if not v54() then nil else v97.HomePageUpsellCardVariation,
        hasNextPage = if not v52() then v103 else nil,
        recommendationsRequestId = if not v52() then v99 else nil,
        omniSessionId = if not v52() then v100 else nil,
        omniFeedItems = if not v52() then v102 else nil,
        hasLocalOmniItems = if not v52() then v105 else nil,
        omniItemsGlobalLayoutData = if not v52() then v106 else nil
    };
end, function(v110)
    return {
        addLocalFeedItems = not v52() and function(v111)
            v110(v33(v111, l_Home_0));
        end or nil,
        loadNext = function(v112, v113)
            return v110(v30(v112, v113, v25.OmniRecommendationsPageType.PAGE_TYPE_HOME, true, nil, v34.OmniRecommendationsRequestIntent.LoadMore));
        end,
        refresh = function(v114, v115, v116, v117)
            v110(v32());
            return v26.all({
                v110(if not v116 then v31(v114, {
                    v25.GameSortGroups.HomeGames
                }, nil, nil, nil) else v30(v114, v115, v25.OmniRecommendationsPageType.PAGE_TYPE_HOME, nil, nil, v117))
            }):andThen(function(v118)
                return v26.resolve(v118);
            end, function(v119)
                v110(v27(v119));
                return v26.reject(v119);
            end);
        end,
        fetchHomePageData = function(v120, v121, v122, v123, v124, v125, v126)
            return v110(v28(v120, v121, v122, v123, v124, v125, v126, v34.OmniRecommendationsRequestIntent.LogIn));
        end,
        setOmniFeedItemsRowData = if not v51 then nil else function(v127)
            return v110(v45(l_Home_0, v127));
        end,
        clearOmniFeedItemsRowData = if not v51 then nil else function()
            return v110(v46(l_Home_0));
        end
    };
end)(v59);
v59 = function(v129)
    local v130, v131 = v43();
    return v3.createElement(v128, v11.Dictionary.join(v129, {
        header = v130,
        headerHeight = v131
    }));
end;
if not v52() then
    return (l_RoactServices_0.connect({
        appAnalytics = v13,
        networking = v19,
        loggingProtocol = l_AppLogging_0,
        prefetchProtocol = l_AppPrefetch_0,
        sessionService = l_AppSessionService_0,
        appStartupSequence = l_AppStartupSequenceTag_0,
        eventIngest = v21,
        omniRecommendationsRequest = if not l_IsPrefetchOneCopyEnabled_0() then nil else l_AppOmniRecommendationsRequest_0
    })((v8.withNavigation((l_RoactAppPolicy_0.connect(function(v132, _)
        return {
            isOmni = v132.getUseOmniRecommendation()
        };
    end)(v59))))));
else
    return v59;
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Packages.React);
local v2 = require(l_CorePackages_0.Packages.ApolloClient);
local l_useQuery_0 = v2.useQuery;
local l_useReactiveVar_0 = v2.useReactiveVar;
local v5 = require(l_CorePackages_0.Workspace.Packages.ApolloLocalState);
local l_reactiveVars_0 = v5.reactiveVars;
local l_omniSessionId_0 = l_reactiveVars_0.omniSessionId;
local l_nextPageToken_0 = l_reactiveVars_0.nextPageToken;
local l_homeGameSorts_0 = l_reactiveVars_0.homeGameSorts;
local l_omniFeed_0 = v5.queries.omniFeed.omniFeed;
local l_supportedTreatmentTypes_0 = l_reactiveVars_0.supportedTreatmentTypes;
local l_localSorts_0 = l_reactiveVars_0.localSorts;
local l_useNavigation_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.useNavigation;
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v15 = require(l_Modules_0.LuaApp.Constants);
local v16 = require(l_Modules_0.LuaApp.Hooks.useAppPolicy);
local v17 = require(script.Parent.Hooks.useOmniFeedItems);
local v18 = require(script.Parent.Hooks.useHomePageServices);
local v19 = {
    pageType = v15.OmniRecommendationsPageType.PAGE_TYPE_HOME,
    sorts = {}
};
return function(v20)
    local v21 = v18();
    local v22 = l_useNavigation_0();
    local v24 = v16(function(v23)
        return {
            isOmni = v23.getUseOmniRecommendation()
        };
    end);
    local v25 = l_useQuery_0(l_omniFeed_0, {
        fetchPolicy = "cache-only",
        errorPolicy = "all",
        variables = {
            sessionId = l_useReactiveVar_0(l_omniSessionId_0),
            nextPageToken = l_useReactiveVar_0(l_nextPageToken_0),
            pageType = v15.OmniRecommendationsPageType.PAGE_TYPE_HOME,
            supportedTreatmentTypes = l_useReactiveVar_0(l_supportedTreatmentTypes_0)
        }
    });
    local v26 = if not not v25.data and v25.data.omniFeed then v25.data.omniFeed else v19;
    local v27 = false;
    if v26.nextPageToken ~= nil then
        v27 = false;
        if v26.nextPageToken ~= "" then
            v27 = v24.isOmni;
        end;
    end;
    local v28, v29 = v17(v26, l_localSorts_0, l_homeGameSorts_0, v24.isOmni);
    return v1.createElement(v20.OmniFeedComponent, {
        hasNextPage = v27,
        recommendationsRequestId = v26.recommendationsId,
        omniSessionId = v26.omniSessionId,
        omniFeedItems = v28,
        hasLocalOmniItems = #v29 > 0,
        omniItemsGlobalLayoutData = v26.globalLayoutData,
        addLocalFeedItems = function(v30)
            l_localSorts_0(v30 or {});
        end,
        isOmni = v24.isOmni,
        navigation = v22,
        appAnalytics = v21.appAnalytics,
        networking = v21.networking,
        eventIngest = v21.eventIngest,
        loggingProtocol = v21.loggingProtocol,
        prefetchProtocol = v21.prefetchProtocol,
        sessionService = v21.sessionService,
        appStartupSequence = v21.appStartupSequence
    });
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_AppLogging_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppLogging;
local l_AppPrefetch_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppPrefetch;
local l_AppSessionService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppSessionService;
local l_AppStartupSequenceTag_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppStartupSequenceTag;
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v6 = require(l_Modules_0.LuaApp.Services.RoactAnalytics);
local v7 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v8 = require(l_Modules_0.LuaApp.Services.AppEventIngestService);
local v9 = require(l_Modules_0.LuaApp.Hooks.useRoactService);
return function()
    return {
        appAnalytics = v9(v6),
        networking = v9(v7),
        eventIngest = v9(v8),
        loggingProtocol = v9(l_AppLogging_0),
        prefetchProtocol = v9(l_AppPrefetch_0),
        sessionService = v9(l_AppSessionService_0),
        appStartupSequence = v9(l_AppStartupSequenceTag_0)
    };
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Packages.React);
local l_useReactiveVar_0 = require(l_CorePackages_0.Packages.ApolloClient).useReactiveVar;
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v4 = require(l_Modules_0.Personalization.OmniFeed.DataStore.OrderedOmniItems);
local v5 = require(l_Modules_0.Personalization.OmniFeed.DataStore.AddLocalOmniItems);
local v6 = require(l_Modules_0.LuaApp.Actions.Games.AddOmniRecommendations);
local v7 = require(l_Modules_0.LuaApp.Actions.Games.SetGameSortsInGroup);
local v8 = require(l_Modules_0.LuaApp.Constants);
local _ = require(l_Modules_0.Personalization.DataStoreTypes);
local v10 = require(l_Modules_0.LuaApp.AppPage);
return function(v11, v12, v13, v14)
    local v15 = l_useReactiveVar_0(v12);
    local v16 = l_useReactiveVar_0(v13);
    local v17 = v1.useMemo(function()
        return v4({}, v5(v15, v10.Home));
    end, {
        v15
    });
    local v19, v20 = v1.useMemo(function()
        local v18 = (if not v14 then v4(v17, v7(v8.GameSortGroups.HomeGames, v16, nil)) else v4(v17, v6(v11)))[v10.Home] or {};
        return v18.allItems or {}, v18.localItems or {};
    end, {
        v11.sorts,
        v17[v10.Home].allItems,
        v16
    });
    return v19, v20;
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Cryo);
local v3 = require(l_CorePackages_0.Packages.React);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.RoactNavigation);
local v6 = require(l_CorePackages_0.Packages.t);
local l_withStyle_0 = require(l_CorePackages_0.UIBlox).Style.withStyle;
local l_useDesignTokens_0 = require(l_CorePackages_0.Workspace.Packages.Style).useDesignTokens;
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local l_AppNotificationService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppNotificationService;
local l_IsVRAppBuild_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).IsVRAppBuild;
local v13 = require(l_Modules_0.LuaApp.Enum.RetrievalStatus);
local v14 = require(l_Modules_0.LuaApp.Components.TopBar.TopBar);
local v15 = require(l_Modules_0.LuaApp.Flags.GetFFlagEnableContactMethodPromptModal);
local v16 = require(l_Modules_0.LuaApp.Thunks.Verification.OpenContactMethodPromptModal);
local v17 = require(l_Modules_0.LuaApp.Enum.ContactMethodPromptTypes);
local v18 = require(l_Modules_0.Personalization.Home.HomeOmniFeed.HomeOmniFeed);
local v19 = require(l_Modules_0.LuaApp.Common.withThrottleFramerateGivenPolicy);
local v20 = require(l_Modules_0.Personalization.Home.HomeOmniFeed.HomeOmniFeedDataLoader);
local v21 = require(l_Modules_0.Personalization.PersonalizationTopBar);
local v22 = require(l_CorePackages_0.Workspace.Packages.RobloxAppHooks);
local l_UiMode_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).UiMode;
local l_useUiModeInfo_0 = v22.useUiModeInfo;
local v25 = require(l_Modules_0.LuaApp.AppPage);
local v26 = require(l_Modules_0.LuaApp.Thunks.ResetNavigationHistory);
local v27 = require(l_Modules_0.Personalization.Home.VngAppUpsell.CheckForVngAppUpsell);
local l_isSubjectToDesktopPolicies_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).isSubjectToDesktopPolicies;
local l_GetFFlagEnableMaquettesHomePageAgeBlock_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagEnableMaquettesHomePageAgeBlock;
local v30 = require(l_Modules_0.LuaApp.Flags.GetFFlagInjectAnalyticsService);
local v31 = require(l_Modules_0.LuaApp.Flags.GetFFlagUseHomeOmniFeedDataLoader);
local v32 = require(l_Modules_0.LuaApp.Flags.FFlagLuaAppSingleHeaderBar);
local l_FFlagLuaAppHomeVngAppUpsell_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).FFlagLuaAppHomeVngAppUpsell;
local v34 = v3.PureComponent:extend("HomePageWithFeed");
v34.validateProps = v6.strictInterface({
    homePageDataStatus = v6.string,
    homePageUpsellCardVariation = v6.any,
    launchContactMethodPrompt = v6.callback,
    navigateToU13Block = v6.callback,
    useGridPageLayout = v6.optional(v6.boolean),
    policyEnableHomePageAgeBlock = if not l_GetFFlagEnableMaquettesHomePageAgeBlock_0() then nil else v6.optional(v6.boolean),
    setThrottleFramerateEnabled = v6.optional(v6.callback),
    navigation = v6.table,
    screenProps = v6.optional(v6.table),
    notificationService = v6.any,
    backgroundColor = v6.Color3,
    backgroundTransparency = v6.number,
    hasTopBar = v6.boolean
});
v34.init = function(v35)
    if not ((not l_GetFFlagEnableMaquettesHomePageAgeBlock_0() or not l_IsVRAppBuild_0()) or not v35.props.policyEnableHomePageAgeBlock) then
        v35.props.navigateToU13Block();
    end;
    v35.notifyPageLoaded = function()
        v35.props.notificationService:ActionEnabled(Enum.AppShellActionType.HomePageLoaded);
    end;
    v35.tryLaunchContactMethodPromptModal = function()
        if v35.props.homePageUpsellCardVariation and v35.props.homePageUpsellCardVariation.upsellCardType == v17.ContactMethodMandatoryEmailPhone then
            v35.props.launchContactMethodPrompt();
        end;
    end;
    v35.onDidFocus = function()
        if l_isSubjectToDesktopPolicies_0() then
            v35.props.setThrottleFramerateEnabled(false);
        end;
    end;
    v35.onWillBlur = function()
        if l_isSubjectToDesktopPolicies_0() then
            v35.props.setThrottleFramerateEnabled(true);
        end;
    end;
end;
v34.render = function(v36)
    local function v42(_)
        local l_backgroundColor_0 = v36.props.backgroundColor;
        local l_backgroundTransparency_0 = v36.props.backgroundTransparency;
        local l_useGridPageLayout_0 = v36.props.useGridPageLayout;
        local v41 = if not v31() then v3.createElement(v18) else v3.createElement(v20, {
            OmniFeedComponent = v18
        });
        return v3.createElement("Frame", {
            [v3.Tag] = if not v30() then nil else "app-screen.home",
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = l_backgroundColor_0,
            BackgroundTransparency = l_backgroundTransparency_0,
            BorderSizePixel = 0
        }, {
            NavigationEvents = v3.createElement(v5.NavigationEvents, {
                onDidFocus = v36.onDidFocus,
                onWillBlur = v36.onWillBlur
            }),
            CheckForVngAppUpsell = if not l_FFlagLuaAppHomeVngAppUpsell_0 then nil else v3.createElement(v27),
            Content = if not v32 then v3.createElement(v14.PageWrapper, {
                topBarSlot = if not v36.props.hasTopBar then nil else v3.createElement(v21, {
                    useGridPageLayout = l_useGridPageLayout_0
                }),
                BackgroundColor3 = l_backgroundColor_0,
                BackgroundTransparency = l_backgroundTransparency_0
            }, {
                HomeOmniFeed = v41
            }) else nil,
            HomeOmniFeed = if not v32 then nil else v41
        });
    end;
    return l_withStyle_0(function(v43)
        return v42(v43);
    end);
end;
v34.didMount = function(v44)
    v44.isMounted = true;
    if v44.props.homePageDataStatus == v13.Done then
        v44.notifyPageLoaded();
    end;
    if not (not v15() or not v44.props.homePageUpsellCardVariation) then
        v44.tryLaunchContactMethodPromptModal();
    end;
    v44.onDidFocus();
end;
v34.didUpdate = function(v45, v46)
    if not ((not l_GetFFlagEnableMaquettesHomePageAgeBlock_0() or not l_IsVRAppBuild_0()) or not v45.props.policyEnableHomePageAgeBlock) then
        v45.props.navigateToU13Block();
    end;
    local v47 = v45.props.homePageDataStatus == v13.Done;
    local v48 = v46.homePageDataStatus == v13.Done;
    if not (not v47 or v48) then
        v45.notifyPageLoaded();
    end;
    local v49 = v15();
    if v49 then
        v49 = false;
        if v45.props.homePageUpsellCardVariation ~= "" then
            v49 = v45.props.homePageUpsellCardVariation ~= v46.homePageUpsellCardVariation;
        end;
    end;
    if v49 then
        v45.tryLaunchContactMethodPromptModal();
    end;
end;
v34.willUnmount = function(v50)
    v50.isMounted = false;
end;
local v56 = v5.withNavigation((v4.connect(function(v51, _)
    local v53 = "";
    if v15() then
        v53 = v51.HomePageUpsellCardVariation or "";
    end;
    return {
        homePageDataStatus = v51.Startup.HomePageDataStatus,
        homePageUpsellCardVariation = v53
    };
end, function(v54)
    return {
        launchContactMethodPrompt = function(v55)
            if v15() then
                v54(v16(v55, {}));
            end;
        end,
        navigateToU13Block = function()
            if l_GetFFlagEnableMaquettesHomePageAgeBlock_0() then
                v54(v26({
                    {
                        name = v25.U13Block
                    }
                }));
            end;
        end
    };
end)(v34)));
return (v19((l_RoactAppPolicy_0.connect(function(v57, _)
    return {
        useGridPageLayout = v57.useGridPageLayout(),
        policyEnableHomePageAgeBlock = if not l_GetFFlagEnableMaquettesHomePageAgeBlock_0() then nil else v57.getEnableHomePageAgeBlock()
    };
end)((l_RoactServices_0.connect({
    notificationService = l_AppNotificationService_0
})(function(v59)
    local v60 = l_useDesignTokens_0();
    return v3.createElement(v56, (v2.Dictionary.join(v59, {
        backgroundColor = v60.LuaApps.App.Page.BackgroundColor,
        backgroundTransparency = v60.LuaApps.App.Page.BackgroundTransparency,
        hasTopBar = l_useUiModeInfo_0().uiMode ~= l_UiMode_0.TenFoot
    })));
end))))));


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Packages.React);
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local l_LoginStatus_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).LoginStatus;
local l_useAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).useAppPolicy;
local v5 = require(script.Parent.CheckForVngAppUpsellForVnUsers);
return function(_)
    local v10 = l_useSelector_0(function(v7)
        local l_CountryCode_0 = v7.CountryCode;
        local v9 = false;
        if v7.AuthenticationStatus.status == l_LoginStatus_0.LOGGED_IN then
            v9 = l_CountryCode_0 == "VN";
        end;
        return v9;
    end);
    local v12 = l_useAppPolicy_0(function(v11)
        return v11.getVngAppUpsell();
    end);
    if not v10 or not v12 then
        return nil;
    else
        return v1.createElement(v5);
    end;
end;


local l_IXPService_0 = game:GetService("IXPService");
local l_Players_0 = game:GetService("Players");
local l_CorePackages_0 = game:GetService("CorePackages");
local v3 = require(l_CorePackages_0.Packages.React);
local l_useDispatch_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useDispatch;
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local l_CentralOverlayType_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).CentralOverlayType;
local l_SetCentralOverlay_0 = require(l_CorePackages_0.Workspace.Packages.CentralOverlay).Actions.SetCentralOverlay;
local l_useUserExperiment_0 = require(l_CorePackages_0.Packages.RoactAppExperiment).useUserExperiment;
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v10 = require(l_Modules_0.LuaApp.getCurrentPage);
local v11 = require(l_Modules_0.LuaApp.Thunks.WaitUntilIXPUserInit);
local v12 = game:DefineFastString("LuaAppVngAppIxpUserLayer", "PlayerApp.HomePageUpsell.VNGApp");
local v13 = game:DefineFastString("LuaAppVngIxpFrequency", "frequency");
local v14 = game:DefineFastString("LuaAppVngIxpDismissable", "dismissable");
local v15 = game:DefineFastString("LuaAppVngIxpEnabled", "enabled");
local v16 = game:DefineFastInt("LuaAppVngUpsellNagFrequencySec", 86400);
local v17 = game:DefineFastFlag("LuaAppVngUpsellAlwaysEnabled", false);
local v18 = game:DefineFastFlag("LuaAppVngUpsellAlwaysCanClose", false);
local v19 = nil;
return function(_)
    local v21, v22 = v3.useState(false);
    local v23 = l_useSelector_0(v10);
    local v24 = l_useDispatch_0();
    local v25 = {};
    if not v17 then
        v25 = l_useUserExperiment_0({
            v12
        }, function(v26)
            local v27 = v26[v12] or {};
            local v28 = tostring(v27[v15]);
            local v29 = tostring(v27[v14]);
            local v30 = {};
            local v31;
            if v28 then
                v31 = true;
                if not (v28 ~= "true") then
                    goto label0;
                end;
            end;
            v31 = false;
            ::label0::;
            v30.upsellEnabled = v31;
            v30.upsellFrequency = v27[v13];
            if v29 then
                v31 = true;
                if not (v29 ~= "true") then
                    goto label1;
                end;
            end;
            v31 = false;
            ::label1::;
            v30.upsellDismissable = v31;
            return v30;
        end);
        v3.useEffect(function()
            if not v21 then
                v24(v11(l_IXPService_0, not not l_Players_0.LocalPlayer and l_Players_0.LocalPlayer.UserId or 0)):andThen(function()
                    v22(true);
                end);
            end;
        end, {
            v21
        });
    end;
    v3.useEffect(function()
        if not (not v17 and (not v21 or not v25.upsellEnabled)) and (not v19 or v19 < DateTime.now().UnixTimestampMillis) then
            local l_v16_0 = v16;
            if v25.upsellFrequency then
                l_v16_0 = tonumber(v25.upsellFrequency);
            end;
            v19 = DateTime.now().UnixTimestampMillis + l_v16_0 * 1000;
            local l_v18_0 = v18;
            if v25.upsellDismissable then
                l_v18_0 = v25.upsellDismissable;
            end;
            v24(l_SetCentralOverlay_0(l_CentralOverlayType_0.VngAppUpsell, {
                isDismissable = l_v18_0
            }));
        end;
    end, {
        v19,
        v23,
        v25,
        v21
    });
    return nil;
end;


local l_GuiService_0 = game:GetService("GuiService");
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.React);
local v3 = require(l_CorePackages_0.UIBlox);
local l_useStyle_0 = v3.Core.Style.useStyle;
local l_ButtonType_0 = v3.App.Button.Enum.ButtonType;
local l_StyledTextLabel_0 = v3.App.Text.StyledTextLabel;
local l_FullPageModal_0 = v3.App.Dialog.Modal.FullPageModal;
local l_useLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).Hooks.useLocalization;
local l_useRoactService_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppHooks).useRoactService;
local l_AppLinking_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppLinking;
local l_useDesignTokens_0 = require(l_CorePackages_0.Workspace.Packages.Style).useDesignTokens;
local l_useDispatch_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useDispatch;
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local l_CloseCentralOverlay_0 = require(l_CorePackages_0.Workspace.Packages.CentralOverlay).Thunks.CloseCentralOverlay;
local v15 = require(game:GetService("CoreGui").RobloxGui.Modules.LuaApp.Services.RoactLocalization);
local v16 = game:DefineFastString("VngAppUpsellUrl", "https://www.roblox.com");
local v17 = game:DefineFastString("VngAppUpsellProTipTextEn", "");
local v18 = game:DefineFastString("VngAppUpsellProTipTextVn", "");
return function(v19)
    local v20 = l_useStyle_0();
    local v21 = l_useDesignTokens_0();
    local v22 = l_useLocalization_0({
        vngUpsellTitle = "CommonUI.Features.Label.VNGMigrationTitle",
        vngUpsellBody = "CommonUI.Features.Label.VNGMigrationBody",
        vngUpsellProtip = "CommonUI.Features.Label.VNGMigrationTip",
        vngUpsellButtonText = "CommonUI.Features.Label.VNGMigrationGoButton"
    });
    local v23 = l_useRoactService_0(l_AppLinking_0);
    local v24 = l_useDispatch_0();
    local v26 = l_useSelector_0(function(v25)
        return v25.ScreenSize;
    end);
    local v27 = v2.useCallback(function()
        v24(l_CloseCentralOverlay_0());
    end, {});
    local l_vngUpsellProtip_0 = v22.vngUpsellProtip;
    local l_Locale_0 = l_useRoactService_0(v15):GetLocale();
    if v18 ~= "" and l_Locale_0 == "vi-vn" then
        l_vngUpsellProtip_0 = v18;
    elseif v17 ~= "" and l_Locale_0 == "en-us" then
        l_vngUpsellProtip_0 = v17;
    end;
    local l_l_GuiService_0_SafeZoneOffsets_0 = l_GuiService_0:GetSafeZoneOffsets();
    local l_Size_250_0 = v21.Global.Size_250;
    return v2.createElement(l_FullPageModal_0, {
        screenSize = v26,
        title = v22.vngUpsellTitle,
        distanceFromTop = l_l_GuiService_0_SafeZoneOffsets_0.top + l_Size_250_0,
        onCloseClicked = if not v19.isDismissable then nil else v27,
        buttonStackProps = {
            buttons = {
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        onActivated = function()
                            v23:openURL(v16);
                        end,
                        text = v22.vngUpsellButtonText
                    }
                }
            }
        }
    }, {
        ContentFrame = v2.createElement("ScrollingFrame", {
            BackgroundTransparency = v20.Theme.BackgroundUIDefault.Transparency,
            BackgroundColor3 = v20.Theme.BackgroundUIDefault.Color,
            Size = UDim2.new(1, 0, 1, 0),
            Position = UDim2.new(0.5, 0, 0, 0),
            AnchorPoint = Vector2.new(0.5, 0),
            BorderSizePixel = 0,
            ScrollingDirection = Enum.ScrollingDirection.Y,
            ScrollBarThickness = 0,
            AutomaticCanvasSize = Enum.AutomaticSize.Y,
            CanvasSize = UDim2.new(1, 0, 0, 0)
        }, {
            VngIcon = v2.createElement("ImageLabel", {
                Size = UDim2.new(0, 186, 0, 186),
                BackgroundTransparency = 1,
                Image = "rbxasset://textures/ui/LuaApp/icons/ic_launcher_vng_square_xxxhdpi.png",
                Position = UDim2.new(0.5, 0, 0, l_Size_250_0),
                AnchorPoint = Vector2.new(0.5, 0)
            }),
            Contents = v2.createElement("Frame", {
                Size = UDim2.new(1, 0, 0, 0),
                Position = UDim2.new(0.5, 0, 0, (l_Size_250_0 + 186) + v21.Global.Size_400),
                AnchorPoint = Vector2.new(0.5, 0),
                AutomaticSize = Enum.AutomaticSize.Y,
                BackgroundTransparency = 1
            }, {
                UIListLayout = v2.createElement("UIListLayout", {
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    FillDirection = Enum.FillDirection.Vertical,
                    Padding = UDim.new(0, l_Size_250_0)
                }),
                BodyText = v2.createElement(l_StyledTextLabel_0, {
                    layoutOrder = 1,
                    automaticSize = Enum.AutomaticSize.Y,
                    text = v22.vngUpsellBody,
                    colorStyle = v20.Theme.TextEmphasis,
                    fontStyle = v20.Font.HeadingSmall,
                    size = UDim2.new(1, 0, 0, 0),
                    textXAlignment = Enum.TextXAlignment.Center
                }),
                Protip = v2.createElement(l_StyledTextLabel_0, {
                    layoutOrder = 2,
                    automaticSize = Enum.AutomaticSize.Y,
                    text = l_vngUpsellProtip_0,
                    colorStyle = v20.Theme.TextDefault,
                    fontStyle = v20.Font.BodyLarge,
                    size = UDim2.new(1, 0, 0, 0),
                    textXAlignment = Enum.TextXAlignment.Center
                }),
                BottomPadding = v2.createElement("Frame", {
                    Size = UDim2.new(1, 0, 0, 1),
                    BackgroundTransparency = 1,
                    BorderSizePixel = 0,
                    LayoutOrder = 4
                })
            })
        })
    });
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_IsVRAppBuild_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).IsVRAppBuild;
local v4 = require(l_Modules_0.LuaApp.AppPage);
local v5 = "Other";
pcall(function()
    local l_l_UserInputService_0_Platform_0 = l_UserInputService_0:GetPlatform();
    if l_l_UserInputService_0_Platform_0 == Enum.Platform.Android then
        v5 = "Android";
        return ;
    elseif l_l_UserInputService_0_Platform_0 == Enum.Platform.IOS then
        v5 = "iOS";
        return ;
    elseif l_l_UserInputService_0_Platform_0 == Enum.Platform.Windows then
        v5 = "Win";
        return ;
    elseif l_l_UserInputService_0_Platform_0 == Enum.Platform.UWP then
        v5 = "UWP";
        return ;
    elseif l_l_UserInputService_0_Platform_0 == Enum.Platform.OSX then
        v5 = "Mac";
        return ;
    elseif not (l_l_UserInputService_0_Platform_0 ~= Enum.Platform.XBox360) or l_l_UserInputService_0_Platform_0 == Enum.Platform.XBoxOne then
        v5 = "XBox";
        return ;
    else
        if not (l_l_UserInputService_0_Platform_0 ~= Enum.Platform.PS4) or game:GetEngineFeature("PlatformEnumPS5") and l_l_UserInputService_0_Platform_0 == Enum.Platform.PS5 then
            v5 = "PS";
        end;
        return ;
    end;
end);
return function(v7, v8, v9, v10)
    if v7 and v7.Diag then
        if v8 then
            local v11 = "Other";
            if not (v8 ~= v4.Home) or v8 == v4.Games then
                if v10 == 1 then
                    v11 = "GamesList";
                elseif v8 == v4.Home then
                    v11 = "Home";
                else
                    assert(v8 == v4.Games);
                    v11 = "Games";
                end;
            elseif v8 == "recommended" then
                v11 = "GameDetail";
            elseif v8 == v4.SearchPage then
                v11 = "SearchPage";
            end;
            local l_v5_0 = v5;
            if l_IsVRAppBuild_0() then
                l_v5_0 = "VR";
            end;
            v7.Diag:reportCounterSimple(l_v5_0 .. "-GameImps-" .. v11, v9);
            return ;
        else
            return ;
        end;
    else
        return ;
    end;
end;


return require(game:GetService("CoreGui").RobloxGui.Modules.Common.Action)(script.Name, function(v0, v1)
    return {
        localItems = v0,
        appPage = v1
    };
end);


return require(game:GetService("CoreGui").RobloxGui.Modules.Common.Action)(script.Name, function(v0, v1, v2)
    return {
        searchUuid = v0,
        topicId = v1,
        contentGroupType = v2
    };
end);


return require(game:GetService("CoreGui").RobloxGui.Modules.Common.Action)(script.Name, function(v0, v1)
    return {
        appPage = v0,
        feedItemPosition = v1
    };
end);


return require(game:GetService("CoreGui").RobloxGui.Modules.Common.Action)(script.Name, function(v0, v1)
    return {
        topicId = v0,
        sortIndex = v1
    };
end);


return require(game:GetService("CoreGui").RobloxGui.Modules.Common.Action)(script.Name, function(v0)
    return {
        appPage = v0
    };
end);


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(game:GetService("CorePackages").Cryo);
local v2 = require(l_Modules_0.Personalization.OmniFeed.DataStore.SetGameGridFlexFeedItemInput);
local v3 = require(l_Modules_0.Personalization.OmniFeed.DataStore.ClearGameGridFlexFeedItemBounds);
local _ = require(l_Modules_0.Personalization.DataStoreTypes);
local function v11(v5, v6)
    local v7 = v1.Dictionary.join(v5 or {});
    local v8 = 1;
    for _, v10 in ipairs(v6) do
        v7[v10.sortKey] = {
            firstIndex = v8,
            numberOfTiles = v10.numberOfTiles
        };
        v8 = v8 + v10.numberOfTiles;
    end;
    return v7;
end;
return function(v12, v13)
    v12 = v12 or {};
    if v13.type == v2.name then
        local v14 = v12[v13.topicId] or {};
        local v15 = v14.flexItemsInput or {};
        local v16 = {};
        local v17 = false;
        for _, v19 in ipairs(v15) do
            if v17 then
                table.insert(v16, v19);
            elseif v19.sortKey == v13.sortIndex then
                table.insert(v16, {
                    sortKey = v13.sortIndex,
                    numberOfTiles = v13.numberOfTiles
                });
                v17 = true;
            elseif v13.sortIndex < v19.sortKey then
                table.insert(v16, {
                    sortKey = v13.sortIndex,
                    numberOfTiles = v13.numberOfTiles
                });
                table.insert(v16, v19);
                v17 = true;
            else
                table.insert(v16, v19);
            end;
        end;
        if not v17 then
            table.insert(v16, {
                sortKey = v13.sortIndex,
                numberOfTiles = v13.numberOfTiles
            });
            v17 = true;
        end;
        return (v1.Dictionary.join(v12, {
            [v13.topicId] = {
                flexItemsInput = v16,
                flexItemsBounds = v11(v14.flexItemsBounds, v16)
            }
        }));
    else
        if v13.type == v3.name then
            local v20 = v12[v13.topicId] or {};
            local v21 = v20.flexItemsInput or {};
            local v22 = {};
            for _, v24 in ipairs(v21) do
                if v24.sortKey ~= v13.sortIndex then
                    table.insert(v22, v24);
                end;
            end;
            v12 = v1.Dictionary.join(v12, {
                [v13.topicId] = {
                    flexItemsInput = v22,
                    flexItemsBounds = v11(v20.flexItemsBounds, v22)
                }
            });
        end;
        return v12;
    end;
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v3 = require(l_CorePackages_0.Cryo);
local _ = require(l_Modules_0.LuaApp.AppPage);
local v5 = require(l_Modules_0.Personalization.OmniFeed.DataStore.ClearFeedItemRowData);
local v6 = require(l_Modules_0.Personalization.OmniFeed.DataStore.ClearOmniFeedItemsRowData);
local _ = require(l_Modules_0.Personalization.DataStoreTypes);
local v8 = require(l_Modules_0.Personalization.OmniFeed.DataStore.FeedItemModel);
local v9 = require(l_Modules_0.Personalization.OmniFeed.DataStore.SetFeedItemRowData);
local v10 = require(l_Modules_0.Personalization.OmniFeed.DataStore.SetOmniFeedItemsRowData);
local function _(v11)
    if not v11 then
        return 1;
    elseif not v11.startRowNumber or not v11.numberOfRows then
        return nil;
    else
        return v11.startRowNumber + v11.numberOfRows;
    end;
end;
local function v26(v13, v14, v15, v16)
    local v17 = v13[v14] or {};
    local v18 = v17[v15];
    if v18 and v18.numberOfRows ~= v16 then
        local v19 = {};
        local v20 = nil;
        for v21, v22 in v17, nil, nil do
            if not ((not (v21 ~= v15) or v22.numberOfRows) or v20) then
                v20 = v8.getUniqueNameForAnalytics(v22.feedItem);
            end;
            local v23 = {
                feedItem = v22.feedItem
            };
            local v24;
            if v15 < v21 then
                local v25 = v19[v21 - 1];
                v24 = not v25 and 1 or if v25.startRowNumber and v25.numberOfRows then v25.startRowNumber + v25.numberOfRows else nil;
            else
                v24 = v22.startRowNumber;
            end;
            v23.startRowNumber = v24;
            v23.numberOfRows = if v21 == v15 then v16 else v22.numberOfRows;
            v23.firstItemMissingRowData = v20;
            table.insert(v19, v23);
        end;
        return v3.Dictionary.join(v13, {
            [v14] = v19
        });
    else
        return nil;
    end;
end;
return function(v27, v28)
    v27 = v27 or {};
    if v28.type == v10.name then
        local v29 = v27[v28.appPage] or {};
        local v30 = {};
        local v31 = true;
        local v32 = nil;
        for v33 = 1, #v28.omniFeedItems do
            local v34 = v28.omniFeedItems[v33];
            local v35 = nil;
            if (v31 and v33 <= #v29) and v29[v33].feedItem == v34 then
                v32 = v29[v33].firstItemMissingRowData;
                v35 = v29[v33];
            else
                v31 = false;
                local v36 = v8.getUniqueNameForAnalytics(v34);
                v2.assert(v34.numberOfRows ~= nil, (("Missing numberOfRows from server, feed item = %*"):format(v36)));
                local v37 = nil;
                if not v34.numberOfRows then
                    v37 = 1;
                elseif not (v34.numberOfRows >= 0) or v34.numberOfRows > 1 then
                    v37 = nil;
                    if not v32 then
                        v32 = v36;
                    end;
                else
                    v37 = v34.numberOfRows;
                end;
                local v38 = {
                    feedItem = v34
                };
                local v39 = if v33 > 1 then v30[v33 - 1] else nil;
                v38.startRowNumber = not v39 and 1 or if v39.startRowNumber and v39.numberOfRows then v39.startRowNumber + v39.numberOfRows else nil;
                v38.numberOfRows = v37;
                v38.firstItemMissingRowData = v32;
                v35 = v38;
            end;
            table.insert(v30, v35);
        end;
        return (v3.Dictionary.join(v27, {
            [v28.appPage] = v30
        }));
    elseif v28.type == v6.name then
        return (v3.Dictionary.join(v27, {
            [v28.appPage] = {}
        }));
    elseif v28.type == v9.name then
        return v26(v27, v28.appPage, v28.feedItemPosition, v28.numberOfRows) or v27;
    else
        if v28.type == v5.name then
            v27 = v26(v27, v28.appPage, v28.feedItemPosition, 0) or v27;
        end;
        return v27;
    end;
end;


local v0 = require(game:GetService("CorePackages").Workspace.Packages.ArgCheck);
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_Modules_0.Personalization.OmniFeed.OmniFeedConstants);
local _ = require(l_Modules_0.Personalization.DataStoreTypes);
local v4 = require(l_Modules_0.Personalization.OmniFeed.OmniFeedItemMap);
local v5 = require(l_Modules_0.Personalization.OmniFeed.DataStore.FeedItemModel);
return {
    combineOmniFeedItems = function(v6, v7)
        local v8 = {};
        local v9 = {};
        if v7 then
            for _, v11 in ipairs(v7) do
                if not (not (v11.dataSource ~= v2.DataSource.Local) or not v4.hasComponent(v11.treatmentType)) then
                    local v12 = v5.getUniqueNameForFeed(v11);
                    if v12 then
                        v0.assert(v9[v12] == nil, "Duplicate feed item id detected: " .. tostring(v12));
                        v9[v12] = v11;
                    end;
                    table.insert(v8, v11);
                end;
            end;
        end;
        if v6 then
            for _, v14 in ipairs(v6) do
                if not (not (v14.dataSource == v2.DataSource.Local) or not v4.hasComponent(v14.treatmentType)) then
                    local v15 = v5.getUniqueNameForFeed(v14);
                    assert(v15);
                    if v9[v15] == nil then
                        v9[v15] = v14;
                        local v16 = nil;
                        if v14.orderHint then
                            v16 = v14.orderHint;
                            while not (not (not (not (v16 <= #v8) or not v8[v16]) and v8[v16].dataSource == v2.DataSource.Local) or not v8[v16].orderHint) and v8[v16].orderHint == v14.orderHint do
                                v16 = v16 + 1;
                            end;
                        end;
                        if v16 ~= nil and v16 <= #v8 then
                            table.insert(v8, v16, v14);
                        else
                            table.insert(v8, v14);
                        end;
                    end;
                end;
            end;
        end;
        return v8;
    end
};


return require(game:GetService("CoreGui").RobloxGui.Modules.Common.Action)(script.Name, function(v0, v1, v2)
    return {
        appPage = v0,
        feedItemPosition = v1,
        numberOfRows = v2
    };
end);


return require(game:GetService("CoreGui").RobloxGui.Modules.Common.Action)(script.Name, function(v0, v1, v2)
    return {
        topicId = v0,
        sortIndex = v1,
        numberOfTiles = v2
    };
end);


return require(game:GetService("CoreGui").RobloxGui.Modules.Common.Action)(script.Name, function(v0, v1)
    return {
        appPage = v0,
        omniFeedItems = v1
    };
end);


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local v4 = require(l_CorePackages_0.Packages.t);
local v5 = require(l_CorePackages_0.Cryo);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v7 = require(l_Modules_0.LuaApp.Promise);
local v8 = require(l_Modules_0.LuaApp.Constants);
local v9 = require(l_Modules_0.LuaApp.Thunks.SetNetworkingErrorToast);
local l_FormFactor_0 = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v12 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local l_FetchFriendsCarousel_0 = require(l_Modules_0.LuaApp.Components.FriendsCarousel.api).FetchFriendsCarousel;
local v14 = require(l_Modules_0.LuaApp.Thunks.LegacyUpdateUsers);
local v15 = require(l_Modules_0.LuaApp.Thunks.FetchAdditionalFriendsInfo);
local v16 = require(l_Modules_0.Personalization.OmniFeed.OmniFeedProps);
local l_useUiModeInfo_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppHooks).useUiModeInfo;
local l_UiMode_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).UiMode;
local v19 = require(script.Parent.FriendGridRow);
local v20 = require(script.Parent.HomeFriendCarousel);
local l_getFFlagUpdateFriendCarousel10ft_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).getFFlagUpdateFriendCarousel10ft;
local l_FFlagFriendsCarouselPassRefreshSignalDown_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).FFlagFriendsCarouselPassRefreshSignalDown;
local l_GAME_CAROUSEL_SIDE_COMPACT_PADDING_0 = v8.GAME_CAROUSEL_SIDE_COMPACT_PADDING;
local l_GAME_CAROUSEL_SIDE_WIDE_PADDING_0 = v8.GAME_CAROUSEL_SIDE_WIDE_PADDING;
local v25 = v2.PureComponent:extend("FriendCarouselFeedItem");
v25.validateProps = v4.strictInterface({
    [v16.key] = v16.interface,
    formFactor = v4.string,
    refresh = v4.callback,
    useGridPageLayout = v4.optional(v4.boolean),
    networking = v4.any,
    uiModeInfo = if not l_getFFlagUpdateFriendCarousel10ft_0() then nil else v4.any
});
v25.init = function(v26)
    v26.isMounted = false;
    v26.refreshSignalConnection = v26.props[v16.key].refreshSignal:connect(function()
        if v26.isMounted then
            v26.props.refresh(v26.props.networking);
        end;
    end);
end;
v25.didMount = function(v27)
    v27.isMounted = true;
end;
v25.render = function(v28)
    if not l_getFFlagUpdateFriendCarousel10ft_0() then
        local l_formFactor_0 = v28.props.formFactor;
        local v30 = nil;
        v30 = if l_formFactor_0 == l_FormFactor_0.COMPACT then l_GAME_CAROUSEL_SIDE_COMPACT_PADDING_0 else l_GAME_CAROUSEL_SIDE_WIDE_PADDING_0;
        if not v28.props.useGridPageLayout then
            return v2.createElement(v20, {
                sideMargin = v30,
                refreshSignal = if not l_FFlagFriendsCarouselPassRefreshSignalDown_0 then nil else v28.props[v16.key].refreshSignal
            });
        else
            return v2.createElement(v19, {
                sortIndex = v28.props[v16.key].feedItemPosition
            });
        end;
    elseif v28.props.uiModeInfo.uiMode ~= l_UiMode_0.TenFoot and v28.props.useGridPageLayout then
        return v2.createElement(v19, {
            sortIndex = v28.props[v16.key].feedItemPosition
        });
    else
        return v2.createElement(v20, {
            refreshSignal = if not l_FFlagFriendsCarouselPassRefreshSignalDown_0 then nil else v28.props[v16.key].refreshSignal
        });
    end;
end;
v25.willUnmount = function(v31)
    v31.isMounted = false;
    if v31.refreshSignalConnection then
        v31.refreshSignalConnection:disconnect();
        v31.refreshSignalConnection = nil;
    end;
end;
v25 = l_RoactServices_0.connect({
    networking = v12
})((l_RoactAppPolicy_0.connect(function(v32, _)
    return {
        useGridPageLayout = v32.useGridPageLayout()
    };
end)((v3.connect(function(v34, _)
    return {
        formFactor = v34.FormFactor
    };
end, function(v36)
    return {
        refresh = function(v37)
            local v38 = {};
            table.insert(v38, v36(l_FetchFriendsCarousel_0({
                refresh = true
            })):andThen(function(v39)
                v36(v14(v39));
                v36(v15(v37, v39));
            end));
            return v7.all(v38):andThen(function(v40)
                return v7.resolve(v40);
            end, function(v41)
                v36(v9(v41));
                return v7.reject(v41);
            end);
        end
    };
end)(v25)))));
if not l_getFFlagUpdateFriendCarousel10ft_0() then
    return v25;
else
    return function(v42)
        return v2.createElement(v25, (v5.Dictionary.join(v42, {
            uiModeInfo = l_useUiModeInfo_0()
        })));
    end;
end;