local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Packages.React);
local v3 = require(l_Modules_0.AvatarExperience.Common.Enum.CreatorFilter);
local v4 = require(l_Modules_0.AvatarExperience.Common.Enum.PriceFilter);
local v5 = require(l_Modules_0.AvatarExperience.Common.Enum.SalesTypeFilter);
local v6 = require(l_Modules_0.AvatarExperience.Common.Enum.UnavailableItemFilter);
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local v8 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local l_useDispatch_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useDispatch;
local v10 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSalesTypeFilter);
local v11 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetCreatorFilter);
local v12 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetPriceRange);
local v13 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetUnavailableItemFilter);
local v14 = require(l_Modules_0.AvatarExperience.Catalog.Components.Filters.FilterUtils);
local function _(v15, v16)
    if not (v8.MinPriceFilter >= v15) or v16 < v8.MaxPriceFilter then
        return v4.PriceRange;
    else
        return v4.AnyPrice;
    end;
end;
local function _(v18)
    if not (v18 ~= nil) or v18 == "" then
        return v3.AllCreators;
    else
        return v3.Username;
    end;
end;
return function()
    local v20 = l_useSelector_0(v14.selectSalesTypeFilter);
    local v21, v22 = v2.useState(v20);
    local v23 = l_useSelector_0(v14.selectCreatorFilter);
    local v24, v25 = v2.useState(if not (v23 ~= nil) or v23 == "" then v3.AllCreators else v3.Username);
    local v26, v27 = v2.useState(v23);
    local v28 = l_useSelector_0(v14.selectMinPrice);
    local v29 = l_useSelector_0(v14.selectMaxPrice);
    local v30, v31 = v2.useState(if not (v8.MinPriceFilter >= v28) or v29 < v8.MaxPriceFilter then v4.PriceRange else v4.AnyPrice);
    local v32, v33 = v2.useState(v28);
    local v34, v35 = v2.useState(v29);
    local v36 = l_useSelector_0(v14.selectUnavailableItemFilter);
    local v37, v38 = v2.useState(v36);
    local v39 = l_useDispatch_0();
    local v40 = true;
    if v21 == v5.All then
        v40 = true;
        if v24 == v3.AllCreators then
            v40 = true;
            if v30 == v4.AnyPrice then
                v40 = v37 ~= v6.Hide;
            end;
        end;
    end;
    local v41 = v24 == v3.AllCreators and "" or v26;
    local v42 = if v30 == v4.AnyPrice then v8.MinPriceFilter else v32;
    local v43 = if v30 == v4.AnyPrice then v8.MaxPriceFilter else v34;
    local v44 = true;
    if v21 == v20 then
        v44 = true;
        if v41 == v23 then
            v44 = true;
            if v42 == v28 then
                v44 = true;
                if v43 == v29 then
                    v44 = v37 ~= v36;
                end;
            end;
        end;
    end;
    return {
        salesTypeFilter = v21,
        setSalesTypeFilter = v22,
        creatorFilter = v24,
        setCreatorFilter = v25,
        creatorUsername = v26,
        setCreatorUsername = v27,
        priceFilter = v30,
        setPriceFilter = v31,
        minPrice = v32,
        setMinPrice = v33,
        maxPrice = v34,
        setMaxPrice = v35,
        unavailableItemFilter = v37,
        setUnavailableItemFilter = v38,
        canReset = v40,
        canApply = v44,
        reset = v2.useCallback(function()
            v22(v5.All);
            v25(v3.AllCreators);
            v31(v4.AnyPrice);
            v38(v6.Hide);
        end),
        apply = v2.useCallback(function()
            v39(v10(v21));
            v39(v11(v41));
            v39(v12(v42, v43));
            v39(v13(v37));
        end, {
            v21,
            v41,
            v42,
            v43,
            v37
        })
    };
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Packages.React);
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local l_useDispatch_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useDispatch;
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSelectedTopics);
local v7 = {};
local function v9(v8)
    return v8.AvatarExperience.Catalog.SortAndFilters.SelectedTopics or v7;
end;
return function()
    local v10 = l_useSelector_0(v9);
    local v11 = l_useDispatch_0();
    return v10, (v3.useCallback(function(v12)
        v11(v6(v12));
    end));
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Packages.React);
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local l_useDispatch_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useDispatch;
local v5 = require(l_Modules_0.LuaApp.Hooks.useRoactService);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Services.Analytics);
local v7 = require(l_Modules_0.AvatarExperience.Common.Enum.SortType);
local v8 = require(l_Modules_0.AvatarExperience.Common.Enum.SortAggregation);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetCatalogSort);
local v10 = require(l_Modules_0.AvatarExperience.Catalog.Components.Filters.FilterUtils);
return function()
    local _ = v5(v6);
    local v12 = l_useSelector_0(v10.selectCatalogSort);
    local v13 = l_useSelector_0(v10.selectCatalogSortAggregation);
    local v14, v15 = v2.useState(v12);
    local v16, v17 = v2.useState(v13);
    local v18, v19 = v2.useState(v13);
    local v20 = l_useDispatch_0();
    local v21 = v14 ~= v7.Relevance;
    local v22 = true;
    if v14 == v12 then
        if v14 == v7.MostFavorited then
            v22 = true;
            if not (v16 == v13) then
                goto label0;
            end;
        end;
        v22 = false;
        if v14 == v7.Bestselling then
            v22 = v18 ~= v13;
        end;
    end;
    ::label0::;
    return {
        sortType = v14,
        setSortType = v15,
        mostFavoritedAggregation = v16,
        setMostFavoritedAggregation = v17,
        bestSellingAggregation = v18,
        setBestSellingAggregation = v19,
        canReset = v21,
        canApply = v22,
        reset = v2.useCallback(function()
            v15(v7.Relevance);
            v17(v8.AllTime);
            v19(v8.AllTime);
        end),
        apply = v2.useCallback(function()
            local l_AllTime_0 = v8.AllTime;
            if v14 == v7.MostFavorited then
                l_AllTime_0 = v16;
            elseif v14 == v7.Bestselling then
                l_AllTime_0 = v18;
            end;
            v20(v9(v14, l_AllTime_0));
        end, {
            v14,
            v16,
            v18
        })
    };
end;


local v0 = nil;
pcall(function()
    v0 = game:GetService("PlatformService");
end);
local v1 = require(game:GetService("CorePackages").Promise);
local function _(v2)
    local v3 = string.gsub(v2 and v2.Name, ",", "");
    v3 = not not v3 and string.match(v3, "[0-9]+") or nil;
    return not not v3 and tonumber(v3) or 1000;
end;
local function v11(v5)
    local v6 = {};
    for _, v8 in v5, nil, nil do
        local v9 = {};
        local v10 = string.gsub(v8 and v8.Name, ",", "");
        v10 = not not v10 and string.match(v10, "[0-9]+") or nil;
        v9.robuxValue = not not v10 and tonumber(v10) or 1000;
        v9.productId = v8.ProductId;
        table.insert(v6, v9);
    end;
    return v6;
end;
return function()
    return v1.new(function(v12, v13)
        local l_status_0, l_result_0 = pcall(function()
            return v0:BeginGetCatalogInfo();
        end);
        if not l_status_0 or not l_result_0 then
            v13(l_result_0);
            return ;
        else
            v12(l_result_0);
            return ;
        end;
    end):andThen(function(v16)
        return v1.resolve((v11(v16)));
    end);
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local v2 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v3 = {
    new = function()
        return {
            items = {}
        };
    end
};
v3.mock = function()
    local v4 = v3.new();
    v4.items = {
        {
            id = "123",
            type = v2.ItemType.Asset
        }
    };
    v4.keyword = "";
    v4.previousPageCursor = "";
    v4.nextPageCursor = "";
    return v4;
end;
v3.fromSearchItemsDetails = function(v5)
    local v6 = v3.new();
    v6.items = {};
    for _, v8 in v5.data, nil, nil do
        table.insert(v6.items, {
            id = tostring(v8.id),
            type = v8.itemType,
            productId = tostring(v8.productId)
        });
    end;
    v6.keyword = v5.keyword;
    v6.previousPageCursor = v5.previousPageCursor;
    v6.nextPageCursor = v5.nextPageCursor;
    return v6;
end;
return v3;


local l_MockId_0 = require(game:GetService("CorePackages").Workspace.Packages.UnitTestHelpers).MockId;
return {
    mock = function()
        return {
            userAssetId = tostring(l_MockId_0()),
            userId = tostring(l_MockId_0()),
            userName = "",
            sellerHasVerifiedBadge = false,
            serialNumber = tostring(l_MockId_0()),
            priceInRobux = 0
        };
    end,
    fromSellPageAndResellers = function(v1)
        local v2 = {
            userAssetId = tostring(v1.userAssetId)
        };
        if v1.seller then
            v2.userId = tostring(v1.seller.id);
            v2.userName = v1.seller.name;
            v2.sellerHasVerifiedBadge = v1.seller.hasVerifiedBadge;
        end;
        v2.serialNumber = not not v1.serialNumber and tostring(v1.serialNumber) or nil;
        v2.priceInRobux = v1.price;
        v2.isOnHold = v1.isOnHold;
        return v2;
    end,
    fromPriceInRobux = function(v3, v4)
        return {
            userAssetId = tostring(v3),
            priceInRobux = v4
        };
    end
};


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_CorePackages_0.Cryo);
return v3.createReducer({}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetAssetFavorite).name] = function(v5, v6)
        return v4.Dictionary.join(v5, {
            [v6.assetId] = v6.isFavorited
        });
    end
});


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Rodux);
local v3 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetAvailableToSellAssetsFromFetchSellData);
local v4 = require(l_Modules_0.AvatarExperience.Catalog.Actions.AddAvailableToSellAsset);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.RemoveAvailableToSellAsset);
local v6 = require(l_CorePackages_0.Cryo);
return v2.createReducer({}, {
    [v3.name] = function(v7, v8)
        return v6.Dictionary.join(v7, {
            [v8.assetId] = v8.userAssetIdList
        });
    end,
    [v4.name] = function(v9, v10)
        local l_assetId_0 = v10.assetId;
        local v12 = {
            v10.userAssetId
        };
        local v13 = v9[l_assetId_0];
        if v13 then
            v12 = v6.List.join(v13, v12);
        end;
        return v6.Dictionary.join(v9, {
            [l_assetId_0] = v12
        });
    end,
    [v5.name] = function(v14, v15)
        local l_assetId_1 = v15.assetId;
        local v17 = v14[l_assetId_1];
        if v17 then
            return v6.Dictionary.join(v14, {
                [l_assetId_1] = v6.List.removeValue(v17, v15.userAssetId)
            });
        else
            return v14;
        end;
    end
});


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Cryo);
return (require(l_CorePackages_0.Rodux).createReducer({}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.AddAvatarAutocompleteSuggestion).name] = function(v3, v4)
        return (v2.Dictionary.join(v3, {
            [v4.prefix] = v4.autocompleteSuggestions
        }));
    end
}));


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_CorePackages_0.Cryo);
return v3.createReducer({}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetBundleFavorite).name] = function(v5, v6)
        return v4.Dictionary.join(v5, {
            [v6.bundleId] = v6.isFavorited
        });
    end
});


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.BundleFavorites);
local v2 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.AssetFavorites);
local v3 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.Categories);
local v4 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.SearchCategories);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.MarketplaceFee);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.Sell);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.SortsContents);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.Topics);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.TopicsFetchTimes);
local v10 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.UserAssets);
local v11 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.ResellerCursor);
local v12 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.SortAndFilters);
local v13 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.SponsoredItems);
local v14 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.Metadata);
local v15 = require(l_Modules_0.AvatarExperience.Catalog.Reducers.ResultsList);
local v16 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXSearchResultsCategories);
return function(v17, v18)
    v17 = v17 or {};
    return {
        AssetFavorites = v2(v17.AssetFavorites, v18),
        BundleFavorites = v1(v17.BundleFavorites, v18),
        Categories = v3(v17.Categories, v18),
        SearchCategories = if not v16() then nil else v4(v17.SearchCategories, v18),
        Topics = v8(v17.Topics, v18),
        TopicsFetchTimes = v9(v17.TopicsFetchTimes, v18),
        MarketplaceFee = v5(v17.MarketplaceFee, v18),
        Sell = v6(v17.Sell, v18),
        SortsContents = v7(v17.SortsContents, v18),
        ResellerCursor = v11(v17.ResellerCursor, v18),
        UserAssets = v10(v17.UserAssets, v18),
        SortAndFilters = v12(v17.SortAndFilters, v18),
        SponsoredItems = v13(v17.SponsoredItems, v18),
        Metadata = v14(v17.Metadata, v18),
        ResultsList = v15(v17.ResultsList, v18)
    };
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetCatalogSort);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.ResetSortAndFilters);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSortAndFilters);
local _ = require(l_Modules_0.AvatarExperience.Common.Enum.SortType);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
return v3.createReducer(v8.DefaultFilters.CatalogSort, {
    [v4.name] = function(_, v10)
        return v10.sort;
    end,
    [v5.name] = function(_, _)
        return v8.DefaultFilters.CatalogSort;
    end,
    [v6.name] = function(v13, v14)
        return v14.CatalogSort or v13;
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetCatalogSort);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.ResetSortAndFilters);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSortAndFilters);
local _ = require(l_Modules_0.AvatarExperience.Common.Enum.SortAggregation);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
return v3.createReducer(v9.DefaultFilters.CatalogSortAggregation, {
    [v4.name] = function(_, v11)
        return v11.sortAggregation;
    end,
    [v5.name] = function(_, _)
        return v9.DefaultFilters.CatalogSortAggregation;
    end,
    [v6.name] = function(v14, v15)
        return v15.CatalogSortAggregation or v14;
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_CorePackages_0.Cryo);
return v3.createReducer({
    category = 1,
    subcategory = 0
}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetCategoryAndSubcategory).name] = function(v5, v6)
        return v4.Dictionary.join(v5, {
            category = v6.category or v5.category,
            subcategory = v6.subcategory or 0
        });
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetCreatorFilter);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Actions.ResetSortAndFilters);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSortAndFilters);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
return (v3.createReducer(v8.DefaultFilters.CreatorFilter, {
    [v5.name] = function(_, v10)
        return v10.creatorFilter;
    end,
    [v6.name] = function(_, _)
        return v8.DefaultFilters.CreatorFilter;
    end,
    [v7.name] = function(v13, v14)
        return v14.CreatorFilter or v13;
    end
}));


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Rodux);
local v3 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetCurrentlySellingAssetsFromFetchSellData);
local v4 = require(l_Modules_0.AvatarExperience.Catalog.Actions.AddCurrentlySellingAsset);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.RemoveCurrentlySellingAsset);
local v6 = require(l_CorePackages_0.Cryo);
return v2.createReducer({}, {
    [v3.name] = function(v7, v8)
        return v6.Dictionary.join(v7, {
            [v8.assetId] = v8.userAssetIdList
        });
    end,
    [v4.name] = function(v9, v10)
        local l_assetId_0 = v10.assetId;
        local v12 = {
            v10.userAssetId
        };
        local v13 = v9[l_assetId_0];
        if v13 then
            v12 = v6.List.join(v13, v12);
        end;
        return v6.Dictionary.join(v9, {
            [l_assetId_0] = v12
        });
    end,
    [v5.name] = function(v14, v15)
        local l_assetId_1 = v15.assetId;
        local v17 = v14[l_assetId_1];
        if v17 then
            return v6.Dictionary.join(v14, {
                [l_assetId_1] = v6.List.removeValue(v17, v15.userAssetId)
            });
        else
            return v14;
        end;
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Cryo);
local v4 = require(l_Modules_0.AvatarExperience.Common.Models.MarketplaceFeeInfo);
return require(l_CorePackages_0.Rodux).createReducer({}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetMarketplaceFee).name] = function(v5, v6)
        return v3.Dictionary.join(v5, (v4.fromGetResaleTaxRate(v6.marketplaceFeeInfo)));
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_CorePackages_0.Cryo);
return v3.createReducer({
    obtainedCatalogMetadata = false
}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetCatalogMetadata).name] = function(_, v6)
        return v4.Dictionary.join({
            obtainedCatalogMetadata = true
        }, v6.metadata);
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetPriceRange);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.ResetSortAndFilters);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSortAndFilters);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
return v3.createReducer(v7.DefaultFilters.PriceRange, {
    [v4.name] = function(_, v10)
        return v10.priceRange;
    end,
    [v5.name] = function(_, _)
        return v7.DefaultFilters.PriceRange;
    end,
    [v6.name] = function(v13, v14)
        return v14.PriceRange or v13;
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_CorePackages_0.Cryo);
return v3.createReducer({
    nextPageCursor = nil,
    hasMoreRows = nil
}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetResellerCursor).name] = function(v5, v6)
        return v4.Dictionary.join(v5, {
            nextPageCursor = v6.cursor,
            hasMoreRows = v6.cursor ~= nil
        });
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_CorePackages_0.Cryo);
return v3.createReducer({}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetResultsListFocusedWidget).name] = function(v5, v6)
        return v4.Dictionary.join(v5, {
            [v6.searchUuid] = {
                focusedWidget = {
                    id = v6.id,
                    active = true,
                    title = v6.title or "",
                    description = v6.description or ""
                },
                hideTopBar = true
            }
        });
    end,
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.ClearResultsListFocusedWidget).name] = function(v7, v8)
        return v4.Dictionary.join(v7, {
            [v8.searchUuid] = {}
        });
    end,
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.ClearAllResultsListFocusedWidgets).name] = function(_, _)
        return {};
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSalesTypeFilter);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.ResetSortAndFilters);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSortAndFilters);
local _ = require(l_Modules_0.AvatarExperience.Common.Enum.SalesTypeFilter);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
return (v3.createReducer(v9.DefaultFilters.SalesTypeFilter, {
    [v4.name] = function(_, v11)
        return v11.salesType;
    end,
    [v5.name] = function(_, _)
        return v9.DefaultFilters.SalesTypeFilter;
    end,
    [v6.name] = function(v14, v15)
        return v15.SalesTypeFilter or v14;
    end
}));


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_CorePackages_0.Cryo);
return v3.createReducer({
    category = 1,
    subcategory = 0
}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSearchCategoryAndSubcategory).name] = function(v5, v6)
        return v4.Dictionary.join(v5, {
            category = v6.category or v5.category,
            subcategory = v6.subcategory or 0
        });
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Cryo);
return require(l_CorePackages_0.Rodux).createReducer({}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.AppendSearchInCatalog).name] = function(v4, v5)
        local v6 = v4[v5.searchUuid];
        if v6 then
            v5.searchInCatalog.items = v3.List.join(v6.items, v5.searchInCatalog.items);
            return v3.Dictionary.join(v4, {
                [v5.searchUuid] = v5.searchInCatalog
            });
        else
            return v3.Dictionary.join(v4, {
                [v5.searchUuid] = v5.searchInCatalog
            });
        end;
    end,
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.RemoveSearchInCatalog).name] = function(v7, v8)
        return v3.Dictionary.join(v7, {
            [v8.searchUuid] = v3.None
        });
    end,
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSearchInCatalog).name] = function(v9, v10)
        return v3.Dictionary.join(v9, {
            [v10.searchUuid] = v10.searchInCatalog
        });
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.ClearSelectedTopics);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSelectedTopics);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSortAndFilters);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.Actions.ResetSortAndFilters);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
return v3.createReducer(v9.DefaultFilters.SelectedTopics, {
    [v6.name] = function(_, v11)
        return v11.selectedTopics;
    end,
    [v5.name] = function(_, _)
        return v9.DefaultFilters.SelectedTopics;
    end,
    [v7.name] = function(v14, v15)
        return v15.SelectedTopics or v14;
    end,
    [v8.name] = function(_, _)
        return v9.DefaultFilters.SelectedTopics;
    end
});


local v0 = require(game:GetService("CorePackages").Rodux);
local l_Parent_0 = script.Parent;
return v0.combineReducers({
    AvailableToSellAssets = require(l_Parent_0.AvailableToSellAssets),
    CurrentlySellingAssets = require(l_Parent_0.CurrentlySellingAssets)
});


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
return require(game:GetService("CorePackages").Rodux).combineReducers({
    CatalogSort = require(l_Modules_0.AvatarExperience.Catalog.Reducers.CatalogSort),
    CatalogSortAggregation = require(l_Modules_0.AvatarExperience.Catalog.Reducers.CatalogSortAggregation),
    PriceRange = require(l_Modules_0.AvatarExperience.Catalog.Reducers.PriceRange),
    SalesTypeFilter = require(l_Modules_0.AvatarExperience.Catalog.Reducers.SalesTypeFilter),
    CreatorFilter = require(l_Modules_0.AvatarExperience.Catalog.Reducers.CreatorFilter),
    UnavailableItemFilter = require(l_Modules_0.AvatarExperience.Catalog.Reducers.UnavailableItemFilter),
    SelectedTopics = require(l_Modules_0.AvatarExperience.Catalog.Reducers.SelectedTopics)
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_CorePackages_0.Cryo);
return v3.createReducer({
    DataStatus = {}
}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.CatalogDataReceived).name] = function(v5, v6)
        local v7 = v5[v6.categoryIndex] or {};
        local v8 = {};
        for _, v10 in v6.sortResults.items, nil, nil do
            table.insert(v8, v10);
        end;
        return v4.Dictionary.join(v5, {
            [v6.categoryIndex] = v4.Dictionary.join(v7, {
                [v6.subcategoryIndex] = {
                    entries = v8,
                    nextPageCursor = v6.sortResults.nextPageCursor,
                    hasMoreRows = v6.sortResults.nextPageCursor ~= nil
                }
            })
        });
    end,
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.CatalogAppendSortData).name] = function(v11, v12)
        local v13 = v11[v12.categoryIndex] or {};
        local v14 = (v13[v12.subcategoryIndex] or {}).entries or {};
        local v15 = {};
        for _, v17 in v12.sortResults.items, nil, nil do
            table.insert(v15, v17);
        end;
        return v4.Dictionary.join(v11, {
            [v12.categoryIndex] = v4.Dictionary.join(v13, {
                [v12.subcategoryIndex] = {
                    entries = v4.List.join(v14, v15),
                    nextPageCursor = v12.sortResults.nextPageCursor,
                    hasMoreRows = v12.sortResults.nextPageCursor ~= nil
                }
            })
        });
    end,
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetCatalogSortDataStatus).name] = function(v18, v19)
        return v4.Dictionary.join(v18, {
            DataStatus = v4.Dictionary.join(v18.DataStatus, {
                [v19.categoryIndex] = v4.Dictionary.join(v18.DataStatus[v19.categoryIndex] or {}, {
                    [v19.subcategoryIndex] = v19.status
                })
            })
        });
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_CorePackages_0.Cryo);
return v3.createReducer({}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSponsoredItems).name] = function(v5, v6)
        return (v4.Dictionary.join(v5, {
            [v6.category] = v4.List.map(v6.items, function(v7)
                return {
                    id = tostring(v7.id),
                    type = tostring(v7.itemType),
                    productId = v7.productId,
                    encryptedAdTrackingData = v7.encryptedAdTrackingData
                };
            end)
        }));
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_Modules_0.AvatarExperience.Catalog.CatalogUtils);
local v4 = require(l_CorePackages_0.Rodux);
local v5 = require(l_CorePackages_0.Cryo);
return v4.createReducer({}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetTopics).name] = function(v6, v7)
        return v5.Dictionary.join(v6, {
            [v3.getTopicRequestKey(v7.selectedTopics, v7.initialItems, v7.searchKeyword)] = v7.newTopics
        });
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_CorePackages_0.Cryo);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.CatalogUtils);
return v3.createReducer({}, {
    [require(l_Modules_0.AvatarExperience.Catalog.Actions.SetTopics).name] = function(v6, v7)
        return v4.Dictionary.join(v6, {
            [v5.getTopicRequestKey(v7.selectedTopics, v7.initialItems, v7.searchKeyword)] = tick()
        });
    end
});


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Rodux);
local v4 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetUnavailableItemFilter);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.ResetSortAndFilters);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSortAndFilters);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local _ = require(l_Modules_0.AvatarExperience.Common.Enum.UnavailableItemFilter);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
return v3.createReducer(v9.DefaultFilters.UnavailableItemFilter, {
    [v4.name] = function(_, v11)
        return v11.unavailableItemFilter;
    end,
    [v5.name] = function(_, _)
        return v9.DefaultFilters.UnavailableItemFilter;
    end,
    [v6.name] = function(v14, v15)
        return v15.UnavailableItemFilter or v14;
    end
});


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Rodux);
local v3 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetUserAssetsFromSellPageAndResellers);
local v4 = require(l_Modules_0.AvatarExperience.Catalog.Actions.UpdateUserAssetPrice);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Models.UserAssetModel);
local v6 = require(l_CorePackages_0.Cryo);
return v2.createReducer({}, {
    [v3.name] = function(v7, v8)
        local v9 = {};
        for _, v11 in v8.userAssets, nil, nil do
            local v12 = tostring(v11.userAssetId);
            local v13 = v5.fromSellPageAndResellers(v11);
            local v14 = v7[v12];
            if not v14 then
                v9[v12] = v13;
            else
                v9[v12] = v6.Dictionary.join(v14, v13);
            end;
        end;
        return v6.Dictionary.join(v7, v9);
    end,
    [v4.name] = function(v15, v16)
        local v17 = tostring(v16.userAssetId);
        local v18 = v5.fromPriceInRobux(v17, v16.priceInRobux);
        local v19 = v15[v17];
        if not v19 then
            return v6.Dictionary.join(v15, {
                [v17] = v18
            });
        else
            return v6.Dictionary.join(v15, {
                [v17] = v6.Dictionary.join(v19, v18)
            });
        end;
    end
});


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local _ = require(l_Modules_0.AvatarExperience.Common.CategoryTypes);
local _ = require(l_Modules_0.AvatarExperience.Catalog.Reducers.SortAndFilters);
return {};


local _ = require(game:GetService("CoreGui").RobloxGui.Modules.AvatarExperience.Common.AvatarExperienceState);
return function(v1)
    return v1.AvatarExperience.Catalog.Categories.category;
end;


local _ = require(game:GetService("CoreGui").RobloxGui.Modules.AvatarExperience.Common.AvatarExperienceState);
return function(v1)
    return v1.AvatarExperience.Catalog.Categories.subcategory;
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_DefaultFilters_0 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants).DefaultFilters;
return function(v3)
    local l_SortAndFilters_0 = v3.AvatarExperience.Catalog.SortAndFilters;
    local v5 = 0;
    if not (l_SortAndFilters_0.PriceRange.minPrice == l_DefaultFilters_0.PriceRange.minPrice) or l_SortAndFilters_0.PriceRange.maxPrice ~= l_DefaultFilters_0.PriceRange.maxPrice then
        v5 = v5 + 1;
    end;
    if l_SortAndFilters_0.SalesTypeFilter ~= l_DefaultFilters_0.SalesTypeFilter then
        v5 = v5 + 1;
    end;
    if l_SortAndFilters_0.CreatorFilter ~= l_DefaultFilters_0.CreatorFilter then
        v5 = v5 + 1;
    end;
    if l_SortAndFilters_0.UnavailableItemFilter ~= l_DefaultFilters_0.UnavailableItemFilter then
        v5 = v5 + 1;
    end;
    if l_SortAndFilters_0.CatalogSort ~= l_DefaultFilters_0.CatalogSort then
        v5 = v5 + 1;
    end;
    return v5;
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local _ = require(game:GetService("CoreGui").RobloxGui.Modules.AvatarExperience.Common.AvatarExperienceState);
local l_memoize_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).memoize;
local v3 = require(l_CorePackages_0.tutils);
local v5 = l_memoize_0(function(v4)
    return v3.fieldCount(v4);
end);
return function(v6)
    return v5(v6.AvatarExperience.AvatarScene.OutfitTryOn.TryOnItems);
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v4 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local l_memoize_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).memoize;
local v6 = require(l_CorePackages_0.Packages.Dash);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local l_SponsoredItemsCategoryRecommended_0 = v4.SponsoredItemsCategoryRecommended;
local v13 = l_memoize_0(function(v9, v10)
    return v6.map(v9, function(v11)
        local v12 = v10[v11.id];
        if not v12 or not v12.product then
            return v11;
        else
            return (v6.join(v11, {
                productId = v12.product.id
            }));
        end;
    end);
end);
return function(v14)
    local v15 = v14.AvatarExperience.Catalog.SponsoredItems[l_SponsoredItemsCategoryRecommended_0];
    local l_AssetInfos_0 = v14.AvatarExperience.Common.AssetInfos;
    if not v15 then
        return nil;
    else
        return (v13(v15, l_AssetInfos_0));
    end;
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Promise);
local v4 = require(l_CorePackages_0.Logging);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.AppendSearchInCatalog);
local v6 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSearchInCatalog);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetAssetInfoFromSortResults);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetBundleInfoFromSortResults);
local v10 = require(l_Modules_0.LuaApp.Actions.SetSearchTime);
local _ = require(l_Modules_0.AvatarExperience.Catalog.SearchTypes);
local v12 = require(l_Modules_0.AvatarExperience.Catalog.Components.Filters.FilterUtils);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v14 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v15 = require(l_Modules_0.AvatarExperience.Common.RoduxUtils);
local v16 = require(l_Modules_0.AvatarExperience.Common.Analytics.reportAvatarEventCounterNoAnalyticsArgument);
local v17 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v18 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableAvatarEditorServiceAPIErrorLogging);
local function v34(v19, v20, v21, v22, v23, v24)
    local l_searchUuid_0 = v19.searchUuid;
    local l_searchKeyword_0 = v19.searchKeyword;
    local v27 = v20:getState().Search.SearchesInCatalog[l_searchUuid_0];
    if v12.selectSortAndFiltersKey(v20:getState()) ~= v24 then
        v23("Search with Uuid " .. l_searchUuid_0 .. " has been terminated");
    end;
    local v28 = v14.tableToCamelCaseKeys((v21:GetCurrentPage()));
    local v29 = {};
    local v30 = {};
    local v31 = {
        items = {},
        keyword = l_searchKeyword_0,
        hasMoreEntries = not v21.IsFinished
    };
    for v32, v33 in v28, nil, nil do
        if v33.itemType == v6.ItemType.Asset then
            v33.assetType = v6.AssetTypeIdStrings[v33.assetType];
            table.insert(v29, v33);
        elseif v33.itemType == v6.ItemType.Bundle then
            v33.bundleType = v6.BundleTypeIdStrings[v33.bundleType];
            table.insert(v30, v33);
        end;
        v31.items[v32] = {
            id = tostring(v33.id),
            type = tostring(v33.itemType),
            productId = v33.productId
        };
    end;
    if not v27 then
        v20:dispatch(v7(l_searchUuid_0, v31));
    else
        v20:dispatch(v5(l_searchUuid_0, v31));
    end;
    if v19.recordSearchTime then
        v20:dispatch(v10(l_searchUuid_0, tick()));
    end;
    if #v29 > 0 then
        v20:dispatch(v8(v29));
    end;
    if #v30 > 0 then
        v20:dispatch(v9(v30));
    end;
    v22:storePageObject(l_searchUuid_0, v21);
    v23();
end;
local function v45(v35, v36, v37, v38, v39, v40, v41)
    local v42 = v14.getSearchParams(v35, v36:getState().AvatarExperience.Catalog.SortAndFilters);
    local l_status_0, l_result_0 = pcall(function()
        return v38:SearchCatalog(v42);
    end);
    if not l_status_0 then
        if v18() then
            v16(v17.Counter.AvatarEditorServiceErrors.SearchCatalog);
        end;
        v4.warn("ApiFetchCatalogSearch failure: " .. tostring(l_result_0));
        v40({
            HttpError = Enum.HttpError.OK
        });
        return ;
    else
        v34(v35, v36, l_result_0, v37, v39, v41);
        return ;
    end;
end;
local function v55(v46, v47, v48, v49, v50, v51, v52)
    local l_status_1, l_result_1 = pcall(function()
        v46:AdvanceToNextPageAsync();
    end);
    if not l_status_1 then
        v4.warn("ApiFetchCatalogSearch failure: " .. l_result_1);
        v51({
            HttpError = Enum.HttpError.OK
        });
        return ;
    else
        v34(v47, v48, v46, v49, v50, v52);
        return ;
    end;
end;
return function(v56)
    return v15.convertPaginatedFetchThunk("ApiFetchCatalogSearch", function(v57, v58, v59)
        local l_searchUuid_1 = v56.searchUuid;
        local v61 = v12.selectSortAndFiltersKey(v57:getState());
        return l_PerformFetch_0.Single(v14.getSearchKey(v57:getState(), l_searchUuid_1), function(v62)
            local v63 = v58:getPageObject(l_searchUuid_1);
            if not v63 or not v63.IsFinished then
                return v3.new(function(v64, v65)
                    if not l_searchUuid_1 then
                        v65("Must have a searchUuid.");
                    end;
                    if v63 == nil then
                        v45(v56, v62, v58, v59, v64, v65, v61);
                        return ;
                    else
                        v55(v63, v56, v62, v58, v64, v65, v61);
                        return ;
                    end;
                end);
            else
                return v3.resolve();
            end;
        end)(v57);
    end);
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Promise);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v4 = require(l_Modules_0.LuaApp.Thunks.SpendFriction.FetchTwoStepStatus);
local v5 = require(l_Modules_0.LuaApp.Thunks.SpendFriction.GenerateTwoStepChallenge);
return function(v6, v7)
    return l_PerformFetch_0.Single("CheckAndGenerateTwoStep", function(v8)
        return v8:dispatch(v4(v6, v7)):andThen(function(v9)
            if v9 then
                return v8:dispatch(v5(v6)):andThen(function(v10)
                    return v2.resolve({
                        is2SVEnabled = v9,
                        challengeToken = v10
                    });
                end, function(v11)
                    return v2.reject(v11);
                end);
            else
                return v2.resolve({
                    is2SVEnabled = v9
                });
            end;
        end, function(v12)
            return v2.reject(v12);
        end);
    end);
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Logging);
local v3 = require(l_CorePackages_0.Promise);
local v4 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v6 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetBundleInfoFromCatalogItemAction);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetAssetInfoFromCatalogItemAction);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v10 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetAssetInfoFromBundleItemAction);
local v11 = require(l_Modules_0.AvatarExperience.Catalog.CatalogUtils);
local v12 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.FetchAssetResellers);
local v13 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.FetchCollectibleItemData);
local v14 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.FetchCollectibResellersInstances);
local v15 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.FetchCollectibleResaleData);
local v16 = require(l_Modules_0.AvatarExperience.Common.Models.AssetInfo);
local v17 = require(l_Modules_0.AvatarExperience.Common.Models.BundleInfo);
local v18 = require(l_Modules_0.AvatarExperience.Common.Utils);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local v20 = require(l_Modules_0.LuaApp.mutedError);
local v21 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXFixItemTypeHandling);
local v22 = require(l_Modules_0.AvatarExperience.Common.RoduxUtils);
local v23 = require(l_Modules_0.AvatarExperience.Common.Models.ItemInfo);
local v24 = require(l_Modules_0.AvatarExperience.Common.Selectors.selectItemInfo);
local v25 = require(l_Modules_0.AvatarExperience.Common.Analytics.reportAvatarEventCounterNoAnalyticsArgument);
local v26 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v27 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableAvatarEditorServiceAPIErrorLogging);
local l_FVariable_0 = settings():GetFVariable("LuaAppsPageLoadTimeItemDetails");
local v29 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXLimitedBundlesHandleNewData);
local function _(v30, v31)
    return v11.GetItemDetailsKey(v30, v31);
end;
local function _(v33, v34)
    local v35 = v33.AvatarExperience.Common.AssetInfos[v34];
    if not v35 or not v35.receivedFromBundleItemData then
        return false;
    else
        return true;
    end;
end;
local v42 = if not v29() then nil else function(v37, v38, v39, v40)
    local v41 = {
        v37:dispatch(v13(v38, v39))
    };
    if v40 then
        table.insert(v41, v37:dispatch(v14(v38, v39, nil, v5.MaxResellersPerPage)));
        table.insert(v41, v37:dispatch(v15(v38, v39)));
    end;
    return v3.all(v41);
end;
local v46 = if v29() then nil else function(v43, v44, v45)
    return v3.all({
        v43:dispatch(v13(v44, v45)),
        v43:dispatch(v14(v44, v45, nil, v5.MaxResellersPerPage)),
        v43:dispatch(v15(v44, v45))
    });
end;
local function v67(v47, v48, v49, v50, v51)
    local v52 = v50:getState();
    if v49 == v6.ItemType.Bundle then
        v50:dispatch(v7(v48, v51));
        local v53 = {};
        if v51.bundledItems then
            for _, v55 in v51.bundledItems, nil, nil do
                local v56 = tostring(v55.id);
                if v55.Type == v6.ItemType.Asset then
                    local v57 = v52.AvatarExperience.Common.AssetInfos[v56];
                    if not (not not v57 and (v57.receivedFromBundleItemData and true or false)) then
                        table.insert(v53, v55);
                    end;
                end;
            end;
            if #v53 > 0 then
                v50:dispatch(v10(v53));
            end;
        end;
        if v29() then
            local v58 = v17.fromGetCatalogItemData(v51);
            local v59 = nil;
            local v60 = nil;
            if not v21 then
                v59 = v58.collectibleItemId;
                v60 = v11.DEPRECATED_isLimitedCollectible(v58);
            else
                local v61 = v23.fromBundleInfo(v58);
                v59 = v61 and v61.collectibleItemId;
                v60 = v61 and v61.isLimitedCollectible;
            end;
            if v59 then
                v42(v50, v47, v59, v60);
                return ;
            end;
        end;
    elseif v49 == v6.ItemType.Asset then
        v50:dispatch(v8(v48, v51));
        local v62 = v16.fromGetCatalogItemData(v51);
        local v63 = nil;
        local v64 = nil;
        local v65 = nil;
        if not v21 then
            v63 = v11.DEPRECATED_IsResellable(v62);
            v64 = v62.collectibleItemId;
            if v29() then
                v65 = v11.DEPRECATED_isLimitedCollectible(v62);
            end;
        else
            local v66 = v23.fromAssetInfo(v62);
            v63 = v66.isResellable;
            if v29() then
                v64 = v66 and v66.collectibleItemId;
                v65 = v66 and v66.isLimitedCollectible;
            end;
        end;
        if not v64 then
            if v63 then
                v50:dispatch(v12(v47, v48, nil, v5.MaxResellersPerPage));
            end;
        elseif not v29() then
            v46(v50, v47, v64);
            return ;
        else
            v42(v50, v47, v64, v65);
            return ;
        end;
    end;
end;
return function(v68, v69, v70, v71)
    v4.isType(v70, "string", "FetchAssetOrBundleInfo request expects itemId");
    v4.isType(v71, "string", "FetchAssetOrBundleInfo request expects itemType");
    if v21 then
        local v72 = true;
        if v71 ~= v6.ItemType.Asset then
            v72 = v71 == v6.ItemType.Bundle;
        end;
        assert(v72, "Does not work with outfits");
    end;
    return v22.convertAvatarEditorServiceThunk("FetchAssetOrBundleInfo", function(v73, v74)
        local v75 = tick();
        local v76 = v73:getState();
        local v77 = nil;
        local v78 = nil;
        local v79 = nil;
        local v80 = nil;
        if not v21 then
            if v71 == v6.ItemType.Asset then
                v77 = v76.AvatarExperience.Common.AssetInfos[v70];
            elseif v71 == v6.ItemType.Bundle then
                v77 = v76.AvatarExperience.Common.BundleInfos[v70];
            end;
            if v29() then
                v79 = v77 and v77.collectibleItemId;
                v80 = v11.DEPRECATED_isLimitedCollectible(v77);
            end;
        else
            v78 = v24(v76.AvatarExperience, v70, v71);
            if v29() then
                v79 = v78 and v78.collectibleItemId;
                v80 = v78 and v78.isLimitedCollectible;
            end;
        end;
        return l_PerformFetch_0.Single(v11.GetItemDetailsKey(v70, v71), function(v81)
            if not v21 then
                if not (not (v77 ~= nil) or not v77.receivedCatalogData) then
                    if not v29() then
                        if v77.collectibleItemId then
                            return v46(v81, v68, v77.collectibleItemId);
                        end;
                    elseif v79 then
                        return v42(v81, v68, v79, v80);
                    end;
                    if not v11.DEPRECATED_IsResellable(v77) then
                        return v3.resolve();
                    else
                        return v81:dispatch(v12(v68, v70, nil, v5.MaxResellersPerPage));
                    end;
                end;
            elseif not (not (v78 ~= nil) or not v78.receivedCatalogData) then
                if not v29() then
                    if v78.collectibleItemId then
                        return v46(v81, v68, v78.collectibleItemId);
                    end;
                elseif v79 then
                    return v42(v81, v68, v79, v80);
                end;
                if v78 and v78.isResellable then
                    if v71 == v6.ItemType.Asset then
                        return v81:dispatch(v12(v68, v70, nil, v5.MaxResellersPerPage));
                    else
                        v20("Backend is saying a bundle is resellable.  Client-side is not set up to handle that properly.");
                    end;
                end;
                return v3.resolve();
            end;
            return v3.new(function(v82, v83)
                local l_status_0, l_result_0 = pcall(function()
                    return v74:GetItemDetails(tonumber(v70), v71);
                end);
                if not l_status_0 then
                    if v27() then
                        v25(v26.Counter.AvatarEditorServiceErrors.FetchAssetOrBundleInfo);
                    end;
                    v2.warn("FetchAssetOrBundleInfo failure: " .. l_result_0);
                    v83();
                else
                    l_result_0 = v18.tableToCamelCaseKeys(l_result_0);
                    v67(v68, v70, v71, v81, l_result_0);
                    v82(l_result_0);
                end;
                v69.Diag:reportStats(l_FVariable_0, (tick() - v75) * 1000);
            end);
        end)(v73);
    end);
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Logging);
local v3 = require(l_CorePackages_0.Promise);
local v4 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetAssetInfoFromCatalogItemAction);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v8 = require(l_Modules_0.AvatarExperience.Catalog.CatalogUtils);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.FetchAssetResellers);
local v10 = require(l_Modules_0.AvatarExperience.Common.Models.AssetInfo);
local v11 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v12 = require(l_Modules_0.AvatarExperience.Common.RoduxUtils);
local v13 = require(l_Modules_0.AvatarExperience.Common.Actions.ReceivedBundleInfoForTryOn);
local v14 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.HandleTryOnFailure);
local v15 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.UpdateSortOrderDueToLCBundleLoaded);
local v16 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXFixItemTypeHandling);
local v17 = require(l_Modules_0.AvatarExperience.Common.Models.ItemInfo);
local v18 = require(l_Modules_0.AvatarExperience.Common.Analytics.reportAvatarEventCounterNoAnalyticsArgument);
local v19 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v20 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableAvatarEditorServiceAPIErrorLogging);
local function _(v21)
    return v8.GetBatchItemDetailsKey(v21);
end;
local function v34(v23, v24, _, v26, v27)
    local v28 = v26:getState();
    for _, v30 in v27, nil, nil do
        local v31 = tostring(v30.id);
        v26:dispatch(v6(v31, v30));
        local v32 = v10.fromGetCatalogItemData(v30);
        local _ = nil;
        if if not v16 then v8.DEPRECATED_IsResellable(v32) else v17.fromAssetInfo(v32).isResellable then
            v26:dispatch(v9(v23, v31, nil, v5.MaxResellersPerPage));
        end;
    end;
    if v28.AvatarExperience.AvatarScene.OutfitTryOn.TryOnItems[v24] then
        v26:dispatch(v13(v24));
        v26:dispatch(v15(v24));
    end;
end;
return function(v35, v36, v37)
    v4.isType(v37, "table", "FetchBundleAssetsDetails request expects itemIds");
    return v12.convertAvatarEditorServiceThunk("FetchOutfitAssetDetails", function(v38, v39)
        return l_PerformFetch_0.Single(v8.GetBatchItemDetailsKey(v37), function(v40)
            return v3.new(function(v41, v42)
                local l_status_0, l_result_0 = pcall(function()
                    return v39:GetBatchItemDetails(v37, Enum.AvatarItemType.Asset);
                end);
                if not l_status_0 then
                    if v20() then
                        v18(v19.Counter.AvatarEditorServiceErrors.GetBatchItemDetails);
                    end;
                    v2.warn("FetchBundleAssetsDetails failure: " .. tostring(l_result_0));
                    v40:dispatch(v14(v36));
                    v42();
                    return ;
                else
                    l_result_0 = v11.tableToCamelCaseKeys(l_result_0);
                    v34(v35, v36, v37, v40, l_result_0);
                    v41(l_result_0);
                    return ;
                end;
            end);
        end)(v38);
    end);
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v3 = require(l_CorePackages_0.Promise);
local v4 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v6 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetAssetInfoFromBundleItemAction);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.HandleTryOnFailure);
local v9 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v10 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetBundleInfoFromCatalogItemAction);
local v11 = require(l_Modules_0.AvatarExperience.Common.Analytics.reportAvatarEventCounterNoAnalyticsArgument);
local v12 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v13 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableAvatarEditorServiceAPIErrorLogging);
local v14 = require(l_Modules_0.AvatarExperience.Common.RoduxUtils);
local function _(v15)
    return v5.FetchBundleInfoKey .. tostring(v15);
end;
local function _(v17, v18)
    local v19 = v17.AvatarExperience.Common.AssetInfos[v18];
    if not v19 or not v19.receivedFromBundleItemData then
        return false;
    else
        return true;
    end;
end;
local function v30(v21, v22, v23)
    if v23.bundledItems then
        local v24 = v21:getState();
        local v25 = {};
        for _, v27 in v23.bundledItems, nil, nil do
            local v28 = tostring(v27.id);
            if v27.type == v6.ItemType.Asset then
                local v29 = v24.AvatarExperience.Common.AssetInfos[v28];
                if not (not not v29 and (v29.receivedFromBundleItemData and true or false)) then
                    table.insert(v25, v27);
                end;
            end;
        end;
        if #v25 > 0 then
            v21:dispatch(v7(v25));
        end;
    end;
    v21:dispatch(v10(v22, v23));
end;
return function(v31)
    v4.isType(v31, "string", "FetchBundleInfo thunk expects bundleId to be a string");
    return v14.convertAvatarEditorServiceThunk("FetchBundleInfo", function(v32, v33)
        local v34 = v32:getState().AvatarExperience.Common.BundleInfos[tostring(v31)];
        if not (v34 ~= nil) or not v34.receivedCatalogData then
            return l_PerformFetch_0.Single(v5.FetchBundleInfoKey .. tostring(v31), function(v35)
                return v3.new(function(v36, v37)
                    local l_status_0, l_result_0 = pcall(function()
                        return v33:GetItemDetails(v31, Enum.AvatarItemType.Bundle);
                    end);
                    if not l_status_0 then
                        if v13() then
                            v11(v12.Counter.AvatarEditorServiceErrors.FetchBundleInfo);
                        end;
                        v35:dispatch(v8(v31));
                        v37(l_result_0);
                        return ;
                    else
                        l_result_0 = v9.tableToCamelCaseKeys(l_result_0);
                        v30(v35, v31, l_result_0);
                        v36(l_result_0);
                        return ;
                    end;
                end);
            end)(v32);
        else
            return v3.resolve("We already have the bundle");
        end;
    end);
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v2 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.ApiFetchCatalogSearch);
local v3 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.FetchSponsoredItems);
return function(v4, v5, v6)
    return function(v7)
        local v8 = not not v6 and v6.categoryInfo or {};
        if not (not v5 or not v8.ShowSponsored) then
            v7:dispatch(v3(v4, v1.SponsoredItemsCategoryRecommended, v1.SponsoredItemsToFetch));
        end;
        return v7:dispatch(v2(v6));
    end;
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v3 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v4 = require(l_CorePackages_0.Cryo);
local v5 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v6 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v8 = require(l_Modules_0.LuaApp.Enum.RetrievalStatus);
local v9 = require(l_CorePackages_0.Promise);
local v10 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.GetOutfit);
local v11 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.FetchBundleAssetsDetails);
local v12 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.FetchBundleInfo);
local function _(v13)
    return v7.FetchOutfitInfoFromBundleKey .. tostring(v13);
end;
local function _(v15, v16)
    return l_PerformFetch_0.GetStatus(v15, v7.FetchBundleInfoKey .. tostring(v16)) == v8.Fetching;
end;
local function _(v18, v19)
    return l_PerformFetch_0.GetStatus(v18, v5.OutfitInfoKey .. tostring(v19)) == v8.Fetching;
end;
local function _(v21, v22)
    local v23 = v21.AvatarExperience.Common.BundleInfos[v22];
    if not (v23 and v23.receivedCatalogData) and not (l_PerformFetch_0.GetStatus(v21, v7.FetchBundleInfoKey .. tostring(v22)) == v8.Fetching) then
        return true;
    else
        return false;
    end;
end;
local function v29(v25, v26)
    local v27 = v25.AvatarExperience.Common.BundleInfos[v26];
    if not v27 or not v27.receivedCatalogData then
        return false;
    elseif not v6.isShoeBundle(v27) then
        local v28 = v6.getUserOutfitIdFromBundle(v27);
        if not v25.AvatarExperience.AvatarEditor.OutfitInfos[v28] and not (l_PerformFetch_0.GetStatus(v25, v5.OutfitInfoKey .. tostring(v28)) == v8.Fetching) then
            return true;
        else
            return false;
        end;
    else
        return false;
    end;
end;
return function(v30, v31)
    v3.isType(v30, "function", "FetchOutfitInfoFromBundle thunk expects networkImpl to be a function");
    v3.isType(v31, "string", "FetchOutfitInfoFromBundle thunk expects bundleId to be a string");
    return function(v32)
        if l_PerformFetch_0.GetStatus(v32:getState(), v7.FetchOutfitInfoFromBundleKey .. tostring(v31)) == v8.Fetching then
            return v9.resolve();
        else
            return l_PerformFetch_0.Single(v7.FetchOutfitInfoFromBundleKey .. tostring(v31), function(v33)
                local v34 = v33:getState();
                local l_v34_0 = v34;
                local l_v31_0 = v31;
                local v37 = l_v34_0.AvatarExperience.Common.BundleInfos[l_v31_0];
                if not ((not v37 or not v37.receivedCatalogData) and l_PerformFetch_0.GetStatus(l_v34_0, v7.FetchBundleInfoKey .. tostring(l_v31_0)) ~= v8.Fetching) then
                    if v29(v34, v31) then
                        for _, v39 in (v6.getUserOutfitIdsFromBundle(v34.AvatarExperience.Common.BundleInfos[v31])), nil, nil do
                            v33:dispatch(v10(v30, v39, nil, v31));
                        end;
                    end;
                else
                    v33:dispatch(v12(v31)):andThen(function(_)
                        v34 = v33:getState();
                        if not v29(v34, v31) then
                            local v41 = v34.AvatarExperience.Common.BundleInfos[v31];
                            if v4.isEmpty((v6.getUserOutfitIdsFromBundle(v41))) then
                                local v42 = {};
                                if v41.items then
                                    for _, v44 in v41.items, nil, nil do
                                        table.insert(v42, (tonumber(v44.id)));
                                    end;
                                end;
                                v33:dispatch(v11(v30, v31, v42));
                            end;
                        else
                            for _, v46 in (v6.getUserOutfitIdsFromBundle(v34.AvatarExperience.Common.BundleInfos[v31])), nil, nil do
                                v33:dispatch(v10(v30, v46, nil, v31));
                            end;
                        end;
                        return v9.resolve();
                    end);
                end;
                return v9.resolve();
            end)(v32);
        end;
    end;
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Promise);
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v4 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v5 = require(l_CorePackages_0.Logging);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v8 = require(l_Modules_0.AvatarExperience.Common.RoduxUtils);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetAssetFavorite);
local v10 = require(l_Modules_0.AvatarExperience.Common.Analytics.reportAvatarEventCounterNoAnalyticsArgument);
local v11 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v12 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableAvatarEditorServiceAPIErrorLogging);
local function _(v13)
    return v6.GetFavoriteAssetKey .. v13;
end;
return function(v15)
    v4.isType(v15, "string", "GetAssetFavorite thunk expects assetId");
    return v8.convertAvatarEditorServiceThunk("GetAssetFavorite", function(v16, v17)
        return l_PerformFetch_0.Single(v6.GetFavoriteAssetKey .. v15, function(v18)
            return v2.new(function(v19, v20)
                local l_status_0, l_result_0 = pcall(function()
                    return v17:GetFavorite(v15, Enum.AvatarItemType.Asset);
                end);
                if not l_status_0 then
                    if v12() then
                        v10(v11.Counter.AvatarEditorServiceErrors.GetAssetFavorite);
                    end;
                    v5.warn("GetAssetFavorite failure: " .. tostring(l_result_0));
                    v20();
                    return ;
                else
                    v18:dispatch(v9(v15, l_result_0));
                    v19();
                    return ;
                end;
            end);
        end)(v16);
    end);
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Promise);
local v3 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v4 = require(l_CorePackages_0.Logging);
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v6 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v8 = require(l_Modules_0.AvatarExperience.Common.RoduxUtils);
local v9 = require(l_Modules_0.AvatarExperience.Common.Analytics.reportAvatarEventCounterNoAnalyticsArgument);
local v10 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v11 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableAvatarEditorServiceAPIErrorLogging);
local v12 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetBundleFavorite);
local function _(v13)
    return v6.GetFavoriteBundleKey .. v13;
end;
return function(v15)
    v3.isType(v15, "string", "GetBundleFavorite thunk expects bundleId");
    return v8.convertAvatarEditorServiceThunk("GetBundleFavorite", function(v16, v17)
        return l_PerformFetch_0.Single(v6.GetFavoriteBundleKey .. v15, function(v18)
            return v2.new(function(v19, v20)
                local l_status_0, l_result_0 = pcall(function()
                    return v17:GetFavorite(v15, Enum.AvatarItemType.Bundle);
                end);
                if not l_status_0 then
                    if v11() then
                        v9(v10.Counter.AvatarEditorServiceErrors.GetBundleFavorite);
                    end;
                    v4.warn("GetBundleFavorite failure: " .. tostring(l_result_0));
                    v20();
                    return ;
                else
                    v18:dispatch(v12(v15, l_result_0));
                    v19();
                    return ;
                end;
            end);
        end)(v16);
    end);
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Logging);
local v3 = require(l_CorePackages_0.Promise);
local v4 = require(l_CorePackages_0.Cryo);
local v5 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v7 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetRecommendedAssetsAction);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v9 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v10 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v11 = require(l_Modules_0.AvatarExperience.Common.RoduxUtils);
local v12 = require(l_Modules_0.AvatarExperience.Common.Analytics.reportAvatarEventCounterNoAnalyticsArgument);
local v13 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v14 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableAvatarEditorServiceAPIErrorLogging);
local function _(v15)
    return v8.RecommendedItemsForAssetsKey .. tostring(v15);
end;
return function(v17, v18, v19, v20)
    v5.isType(v17, "string", "GetRecommendedAssets thunk expects assetId to be a string");
    v5.isType(v18, "string", "GetRecommendedAssets thunk expects assetTypeId to be a string");
    v5.isType(v19, "number", "GetRecommendedAssets thunk expects numItems to be a number");
    v5.isType(v20, "boolean", "GetRecommendedAssets thunk expects details to be a boolean");
    return v11.convertAvatarEditorServiceThunk("GetRecommendedAssets", function(v21, v22)
        return l_PerformFetch_0.Single(v8.RecommendedItemsForAssetsKey .. tostring(v17), function(v23)
            local v24 = v23:getState().AvatarExperience.Common.AssetInfos[v17];
            if not (v24 ~= nil) or not v24.receivedRecommendedData then
                return v3.new(function(v25, v26)
                    local l_status_0, l_result_0 = pcall(function()
                        return v22:GetRecommendedAssets(v10.AssetTypeIdStringToEnumValue(v18), v17, v19, v20);
                    end);
                    if not l_status_0 then
                        if v14() then
                            v12(v13.Counter.AvatarEditorServiceErrors.GetRecommendedAssets);
                        end;
                        v2.warn("GetRecommendedAssets failed: " .. l_result_0);
                        v26({
                            HttpError = Enum.HttpError.OK
                        });
                        return ;
                    else
                        local v29 = v4.List.getRange(v10.tableToCamelCaseKeys(l_result_0), 1, v9.NumRecommendedItems);
                        v23:dispatch(v7(v17, v18, v29));
                        v25(v29);
                        return ;
                    end;
                end);
            else
                return v3.resolve();
            end;
        end)(v21);
    end);
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Logging);
local v3 = require(l_CorePackages_0.Promise);
local v4 = require(l_CorePackages_0.Cryo);
local v5 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v7 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetRecommendedBundlesAction);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v9 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v10 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v11 = require(l_Modules_0.AvatarExperience.Common.RoduxUtils);
local v12 = require(l_Modules_0.AvatarExperience.Common.Analytics.reportAvatarEventCounterNoAnalyticsArgument);
local v13 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v14 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableAvatarEditorServiceAPIErrorLogging);
local function _(v15)
    return v8.RecommendedItemsForBundlesKey .. tostring(v15);
end;
return function(v17, v18, v19, v20)
    v5.isType(v17, "string", "GetRecommendedBundles thunk expects bundleId to be a string");
    v5.isType(v18, "string", "GetRecommendedBundles thunk expects bundleTypeId to be a string");
    v5.isType(v19, "number", "GetRecommendedBundles thunk expects numItems to be a number");
    v5.isType(v20, "boolean", "GetRecommendedBundles thunk expects details to be a boolean");
    return v11.convertAvatarEditorServiceThunk("GetRecommendedBundles", function(v21, v22)
        return l_PerformFetch_0.Single(v8.RecommendedItemsForBundlesKey .. tostring(v17), function(v23)
            local v24 = v23:getState().AvatarExperience.Common.BundleInfos[v17];
            if not (v24 ~= nil) or not v24.receivedRecommendedData then
                return v3.new(function(v25, v26)
                    local l_status_0, l_result_0 = pcall(function()
                        return v22:GetRecommendedBundles(v17);
                    end);
                    if not l_status_0 then
                        if v14() then
                            v12(v13.Counter.AvatarEditorServiceErrors.GetRecommendedBundles);
                        end;
                        v2.warn("GetRecommendedBundles failed: " .. l_result_0);
                        v26({
                            HttpError = Enum.HttpError.OK
                        });
                        return ;
                    else
                        local v29 = v4.List.getRange(v10.tableToCamelCaseKeys(l_result_0), 1, v9.NumRecommendedItems);
                        v23:dispatch(v7(v17, v18, v29));
                        v25(v29);
                        return ;
                    end;
                end);
            else
                return v3.resolve();
            end;
        end)(v21);
    end);
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v3 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local v4 = require(l_Modules_0.LuaApp.Enum.ToastType);
local v5 = require(l_Modules_0.AvatarExperience.Common.Actions.RemoveFromTryOn);
local v6 = {
    toastMessage = "Feature.Avatar.Label.TryOnFail",
    isLocalized = false,
    toastType = v4.InformationMessage
};
return function(v7)
    v2.isType(v7, "string", "HandleTryOnFailure request expects bundleId");
    return function(v8)
        if v8:getState().AvatarExperience.AvatarScene.OutfitTryOn.TryOnItems[v7] then
            v8:dispatch(v5(v7));
            v8:dispatch(v3(v6));
        end;
    end;
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Packages.Dash);
local v3 = require(l_Modules_0.AvatarExperience.Catalog.Components.Filters.FilterUtils);
local _ = require(l_Modules_0.AvatarExperience.Catalog.SearchTypes);
local v5 = require(l_Modules_0.LuaApp.SearchUuid);
local v6 = require(l_Modules_0.LuaApp.Actions.SetSearchType);
local v7 = require(l_Modules_0.LuaApp.Constants);
local v8 = require(l_Modules_0.LuaApp.Actions.SetSearchParameters);
local v9 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
return function(v11, v12)
    return function(v13)
        local v14 = v5();
        v13:dispatch(v6(v14, v7.SearchTypes.Catalog));
        local v15 = v2.join(v12 or {}, {
            sortAndFilters = v3.selectSortAndFilters(v13:getState())
        });
        v13:dispatch(v8(v14, v15));
        v9.navigateToSearch(v11, v14, v15);
    end;
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v2 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v3 = require(l_Modules_0.AvatarExperience.Common.Selectors.DEPRECATED_ItemData);
local v4 = require(l_Modules_0.LuaApp.Enum.ToastType);
local v5 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local v6 = require(l_Modules_0.AvatarExperience.Common.Thunks.NavigateWithLock);
local v7 = require(l_Modules_0.AvatarExperience.Common.Selectors.selectItemInfo);
local v8 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXFixItemTypeHandling);
local v9 = {
    toastMessage = "Feature.Avatar.Message.AlreadyAcquired",
    isLocalized = false,
    toastType = v4.InformationMessage
};
return function(v10, v11, v12, v13, v14)
    return function(v15)
        local v16 = v15:getState();
        local l_name_0 = v12.opaque.name;
        local v18 = nil;
        if not v8 then
            local v19 = v3(v16.AvatarExperience.Common, v13, v14);
            if v14 == v2.ItemType.Asset then
                v18 = v19.assetType;
            elseif v14 == v2.ItemType.Bundle then
                v18 = v19.bundleType;
            end;
        else
            local v20 = v7(v16.AvatarExperience, v13, v14);
            if v20 then
                v18 = v20.itemSubType;
            end;
        end;
        if l_name_0 == v1.AvatarEditor then
            return v15:dispatch(v5(v9));
        else
            v15:dispatch(v6(function()
                v11.navigate(v1.LeaveCatalogToAvatarPrompt, {
                    itemType = v14,
                    itemSubType = v18,
                    onOverlayClosed = v10
                });
            end));
            return ;
        end;
    end;
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local v1 = require(game:GetService("CorePackages").Workspace.Packages.ArgCheck);
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v4 = require(l_Modules_0.AvatarExperience.Common.Selectors.DEPRECATED_ItemData);
local v5 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.SendPremiumUpsellCancelledAnalytics);
local v7 = require(l_Modules_0.AvatarExperience.Common.Thunks.NavigateWithLock);
local v8 = require(l_Modules_0.LuaApp.Components.PremiumUpsell.Enum.PremiumUpsellTriggerContext);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v11 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXFixItemTypeHandling);
return function(_, v13, v14, v15, v16, v17, v18)
    v1.isTypeOrNil(v17, "string", "OpenPremiumUpsellPrompt expects itemId");
    v1.isTypeOrNil(v18, "string", "OpenPremiumUpsellPrompt expects itemType");
    return function(v19)
        local v20 = v19:getState();
        local v21 = nil;
        local v22 = nil;
        if not v16 then
            if not v11 then
                v21 = v4(v20.AvatarExperience.Common, v17, v18).id;
                v22 = v18 == v5.ItemType.Bundle;
            else
                v21 = v17;
                v22 = v18 == v5.ItemType.Bundle;
            end;
        else
            v21 = v16.assetId;
            v22 = v16.isBundle;
        end;
        v19:dispatch(v7(function()
            v15.navigate(v3.PremiumUpsellPrompt, {
                onCancel = function()
                    v19:dispatch(v6(v13.premiumUpsellCancelled, v21, v22));
                end,
                onOverlayClosed = v14,
                triggerContext = v8.UACatalog
            });
        end));
    end;
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v4 = require(l_Modules_0.AvatarExperience.Common.Selectors.DEPRECATED_ItemData);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.CatalogUtils);
local v6 = require(l_Modules_0.AvatarExperience.Common.Thunks.NavigateWithLock);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.PurchaseProduct);
local v8 = require(l_Modules_0.LuaApp.Components.RobuxUpsell.Enum.RobuxUpsellTriggerContext);
local l_getRbxthumbWithTypeSizeAndOptions_0 = require(l_CorePackages_0.Workspace.Packages.UserLib).Utils.getRbxthumbWithTypeSizeAndOptions;
local v10 = require(l_Modules_0.AvatarExperience.Common.Selectors.selectItemInfo);
local v11 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXFixItemTypeHandling);
local v12 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXLimitedBundlesHandleNewData);
local v13 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableKeywordAnalyticsForSearch);
local v14 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local v15 = {
    toastMessage = "IAPExperience.RobuxUpsell.Title.InsufficientRobux",
    isLocalized = false,
    toastType = require(l_Modules_0.LuaApp.Enum.ToastType).InformationMessage
};
return function(v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26)
    return function(v27)
        local v28 = v27:getState();
        local l_v22_0 = v22;
        local l_v23_0 = v23;
        local l_name_0 = v21.opaque.name;
        local v32 = nil;
        local v33 = nil;
        if not v11 then
            v32 = v4(v28.AvatarExperience.Common, l_v22_0, l_v23_0);
            if not v32 then
                return ;
            end;
        else
            v33 = v10(v28.AvatarExperience, l_v22_0, l_v23_0);
            if not v33 then
                return ;
            end;
        end;
        if v19 then
            local l_RequestId_0 = v28.AvatarExperience.Common.Widgets.WidgetInfo.RequestId;
            local v35 = nil;
            if v13() then
                local v36 = v28.Navigation and v28.Navigation.currentRoute;
                if v36 and v36.name == v3.CatalogSearch then
                    v35 = (v36.params and v36.params.searchParams) and v36.params.searchParams.searchKeyword;
                end;
            end;
            v19.clickPurchaseItemButton(l_v22_0, l_v23_0, v20, l_name_0, l_RequestId_0, if not v13() then nil else v35);
        end;
        local v37 = nil;
        v37 = if not v11 then v32.resellerUserAssetIds else v33.resellerUserAssetIds;
        local v38 = v28.AvatarExperience.Catalog.UserAssets[v37 and v37[1]];
        local v39 = v28.UserRobux[v28.LocalUserId];
        local v40 = (not not v28.Users[v28.LocalUserId] and v28.Users[v28.LocalUserId].membership or Enum.MembershipType.None) == Enum.MembershipType.Premium;
        local v41 = nil;
        local v42 = nil;
        local v43 = nil;
        local v44 = nil;
        local v45 = nil;
        local v46 = nil;
        local v47 = nil;
        if not v11 then
            v41 = v5.DEPRECATED_HasPremiumBenefits(v32);
            v42 = v32.lowestPrice or v32.priceInRobux;
            if not (not v40 or not v41) then
                v42 = v32.premiumPricing.premiumPriceInRobux;
            end;
            v43 = v5.DEPRECATED_IsResellable(v32);
            v44 = v32.expectedSellerId;
            v45 = v32.creator and v32.creator.name;
            v46 = v32.collectibleItemId;
            v47 = if not v12() then nil else v5.DEPRECATED_isLimitedCollectible(v32);
        else
            v41 = v33.hasPremiumBenefits;
            v42 = v33.lowestPrice or v33.priceInRobux;
            if not (not v40 or not v41) then
                v42 = v33.premiumPricing.premiumPriceInRobux;
            end;
            v43 = v33.isResellable;
            v44 = v33.expectedSellerId;
            v45 = v33.creator and v33.creator.name;
            v46 = v33.collectibleItemId;
            v47 = if not v12() then nil else v33 and v33.isLimitedCollectible;
        end;
        local v48 = nil;
        if not (not v43 or not v38) then
            v48 = v38.userAssetId;
            v44 = v38.userId;
            v45 = v38.userName;
        end;
        local v49 = nil;
        if v46 then
            local l_CollectiblesItemInfo_0 = v28.AvatarExperience.Common.Collectibles.CollectiblesItemInfo;
            local l_CollectiblesResellersInstances_0 = v28.AvatarExperience.Common.Collectibles.CollectiblesResellersInstances;
            local l_CollectiblesResellableInstances_0 = v28.AvatarExperience.Common.Collectibles.CollectiblesResellableInstances;
            local v53 = nil;
            v53 = if not v12() then v5.findCheapestCollectiblePurchaseInfo(v46, l_CollectiblesItemInfo_0, l_CollectiblesResellersInstances_0, l_CollectiblesResellableInstances_0) else v5.findCheapestCollectiblePurchaseInfoV2(v46, v47, l_CollectiblesItemInfo_0, l_CollectiblesResellersInstances_0, l_CollectiblesResellableInstances_0);
            if v53.price then
                v42 = v53.price;
            end;
            if v53.collectibleInstanceId then
                v49 = v53.collectibleInstanceId;
                v44 = v53.expectedSellerId;
                v45 = v53.sellerName;
            end;
        end;
        if v42 and v42 <= v39 then
            v27:dispatch(v6(function()
                v18.navigate(v3.PurchaseCatalogItem, {
                    itemId = l_v22_0,
                    itemType = l_v23_0,
                    priceInRobux = v42,
                    sellerId = v44,
                    sellerName = v45,
                    userAssetId = v48,
                    collectibleInstanceId = v49,
                    onOverlayClosed = v17,
                    fromProfile = v20,
                    fromAvatarRoute = v21,
                    widgetInfo = v26
                });
            end));
        elseif not v24 then
            local l_InsufficientRobuxPrompt_0 = v3.InsufficientRobuxPrompt;
            local v55 = {
                onOverlayClosed = v17
            };
            local v56 = l_getRbxthumbWithTypeSizeAndOptions_0(l_v22_0, v5.GetRbxThumbType(l_v23_0), 150);
            local v57 = nil;
            v57 = if not v11 then v32.name else v33.name;
            l_InsufficientRobuxPrompt_0 = v3.RobuxUpsellPrompt;
            v55.triggerContext = v8.UACatalog;
            v55.priceInRobux = v42;
            v55.userRobux = v39;
            v55.itemName = v57;
            v55.itemIcon = v56;
            v55.purchaseItem = function()
                local v58 = if not v18 then nil else v18.state.routeName;
                local v59 = nil;
                local v60 = nil;
                local v61 = nil;
                local v62 = nil;
                if not v11 then
                    v59 = (v32 and v32.product) and v32.product.id;
                    v60 = v5.DEPRECATED_GetItemSubType(l_v23_0, v32);
                    v61 = v32.collectibleItemId;
                    v62 = v32.creator and v32.creator.type;
                else
                    v59 = v33.productId;
                    v60 = v33.itemSubType;
                    v61 = v33.collectibleItemId;
                    v62 = v33.creator and v33.creator.type;
                end;
                return v27:dispatch(v7(v16, v59, v42, v44, l_v22_0, l_v23_0, v60, false, v48, v19, v18, v20, false, v58, v61, v49, v62, v26));
            end;
            do
                local l_l_InsufficientRobuxPrompt_0_0 = l_InsufficientRobuxPrompt_0;
                v27:dispatch(v6(function()
                    v18.navigate(l_l_InsufficientRobuxPrompt_0_0, v55);
                end));
            end;
        else
            v27:dispatch(v14(if not v25 then v15 else v25));
            return ;
        end;
    end;
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Promise);
local v3 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.UpdateUserAssetPrice);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Actions.AddCurrentlySellingAsset);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.Actions.RemoveAvailableToSellAsset);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.Http.WebApi);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v11 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local v12 = require(l_Modules_0.LuaApp.Thunks.SetNetworkingErrorToast);
local v13 = require(l_Modules_0.LuaApp.Enum.ToastType);
local function _(v14)
    return v8.RemoveAvailableToSellAssetKey .. tostring(v14);
end;
local v16 = {
    toastMessage = "Feature.Catalog.Label.SellSuccess",
    isLocalized = false,
    toastType = v13.SuccessConfirmation
};
return function(v17, v18, v19, v20)
    return function(v21)
        v3.isType(v18, "string", "RemoveAvailableToSellAsset thunk expects assetId to be a string");
        v3.isType(v19, "string", "RemoveAvailableToSellAsset thunk expects userAssetId to be a string");
        v3.isType(v20, "number", "RemoveAvailableToSellAsset thunk expects priceInRobux to be a number");
        return l_PerformFetch_0.Single(v8.RemoveAvailableToSellAssetKey .. tostring(v19), function(v22)
            return v9.RemoveAvailableToSell(v17, v18, v19, v20):andThen(function(_)
                v22:dispatch(v5(v19, v20));
                v22:dispatch(v7(v18, v19));
                v22:dispatch(v6(v18, v19));
                v22:dispatch(v11(v16));
                return v2.resolve();
            end, function(v24)
                v22:dispatch(v12(v24));
                return v2.reject(v24);
            end);
        end)(v21);
    end;
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Promise);
local v3 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v5 = require(l_Modules_0.AvatarExperience.Catalog.Actions.UpdateUserAssetPrice);
local v6 = require(l_Modules_0.AvatarExperience.Catalog.Actions.RemoveCurrentlySellingAsset);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.Actions.AddAvailableToSellAsset);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.Http.WebApi);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v11 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local v12 = require(l_Modules_0.LuaApp.Thunks.SetNetworkingErrorToast);
local v13 = require(l_Modules_0.LuaApp.Enum.ToastType);
local function _(v14)
    return v8.RemoveCurrentlySellingAssetKey .. tostring(v14);
end;
local v16 = {
    toastMessage = "Feature.Catalog.Heading.ItemRemoved",
    isLocalized = false,
    toastType = v13.SuccessConfirmation
};
return function(v17, v18, v19, v20)
    return function(v21)
        v3.isType(v18, "string", "RemoveCurrentlySellingAsset thunk expects assetId to be a string");
        v3.isType(v20, "string", "RemoveCurrentlySellingAsset thunk expects userId to be a string");
        v3.isType(v19, "string", "RemoveCurrentlySellingAsset thunk expects userAssetId to be a string");
        return l_PerformFetch_0.Single(v8.RemoveCurrentlySellingAssetKey .. tostring(v19), function(v22)
            return v9.RemoveCurrentlySellingAsset(v17, v18, v19):andThen(function(_)
                v22:dispatch(v5(v19, nil));
                v22:dispatch(v7(v18, v19));
                v22:dispatch(v6(v18, v19));
                v22:dispatch(v11(v16));
                return v2.resolve();
            end, function(v24)
                v22:dispatch(v12(v24));
                return v2.reject(v24);
            end);
        end)(v21);
    end;
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(l_Modules_0.AvatarExperience.Catalog.Components.Filters.FilterUtils);
local v2 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v3 = require(l_Modules_0.AvatarExperience.Common.Enum.SortType);
local v4 = require(l_Modules_0.AvatarExperience.Common.Enum.SalesTypeFilter);
local v5 = require(l_Modules_0.AvatarExperience.Common.Enum.UnavailableItemFilter);
return function(v6)
    return function(v7)
        local v8 = v7:getState();
        local v9 = v1.selectMinPrice(v8);
        if v9 == v2.MinPriceFilter then
            v9 = nil;
        end;
        local v10 = v1.selectMaxPrice(v8);
        if v10 == v2.MaxPriceFilter then
            v10 = nil;
        end;
        local v11 = v1.selectCatalogSort(v8);
        local v12 = if not (v11 ~= v3.MostFavorited) or v11 == v3.Bestselling then v1.selectCatalogSortAggregation(v8) else nil;
        local v13 = v1.selectSalesTypeFilter(v8);
        if v13 == v4.All then
            v13 = nil;
        end;
        local v14 = v1.selectCreatorFilter(v8);
        if v14 == "" then
            v14 = nil;
        end;
        v6.applySortAndFilters({
            minPrice = v9,
            maxPrice = v10,
            sortType = v11,
            sortAggregation = v12,
            salesTypeFilter = v13,
            creatorFilter = v14,
            includeOffSale = v1.selectUnavailableItemFilter(v8) == v5.Show and true or nil
        });
    end;
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_Modules_0.AvatarExperience.Catalog.CatalogUtils);
local v3 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v4 = require(l_Modules_0.AvatarExperience.Common.Selectors.DEPRECATED_ItemData);
local v5 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v6 = require(l_Modules_0.AvatarExperience.Common.Selectors.selectItemInfo);
local v7 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXFixItemTypeHandling);
return function(v8, v9, v10, v11, v12, v13, v14)
    return function(v15)
        local v16 = v15:getState();
        local l_detail_0 = v16.AvatarExperience.AvatarScene.AvatarRoute.opaque.params.detail;
        local v18 = nil;
        local v19 = nil;
        local v20 = nil;
        local v21 = nil;
        if v8 ~= v3.AnalyticsContext.ItemDetailsRecommendedItem then
            v20 = v16.Search.SearchesInCatalog[l_detail_0];
            if v8 == v3.AnalyticsContext.CatalogSearch then
                v5.isNotNil(v20, "searchInCatalog");
            else
                v18 = v16.AvatarExperience.Catalog.Categories.category;
                v19 = v16.AvatarExperience.Catalog.Categories.subcategory;
            end;
            v21 = if not v7 then v2.DEPRECATED_GetItemSubType(v11, (v4(v16.AvatarExperience.Common, v10, v11))) else v6(v16.AvatarExperience, v10, v11).itemSubType;
        end;
        v9(v8, math.ceil(v12 / v13), v18, v19, nil, {
            keyword = v20 and v20.keyword
        }, v12, v10, v11, v21, v14, v16.AvatarExperience.Common.Widgets.WidgetInfo.RequestId);
    end;
end;


return function(v0, v1, v2)
    return function(_)
        v0(v1, v2);
    end;
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_CoreGui_0 = game:GetService("CoreGui");
local v2 = require(l_CorePackages_0.Promise);
local v3 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v5 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v7 = require(l_Modules_0.LuaApp.Thunks.SetNetworkingErrorToast);
local v8 = require(l_Modules_0.AvatarExperience.Common.RoduxUtils);
local v9 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetAssetFavorite);
local v10 = require(l_Modules_0.AvatarExperience.Common.Analytics.reportAvatarEventCounterNoAnalyticsArgument);
local v11 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v12 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableAvatarEditorServiceAPIErrorLogging);
local function _(v13)
    return v5.SetFavoriteAssetKey .. v13;
end;
return function(v15, v16)
    v3.isType(v15, "string", "SetAssetFavorite thunk expects assetId");
    v3.isType(v16, "boolean", "SetAssetFavorite thunk expects isFavorited");
    return v8.convertAvatarEditorServiceThunk("SetAssetFavorite", function(v17, v18)
        return l_PerformFetch_0.Single(v5.SetFavoriteAssetKey .. v15, function(v19)
            return v2.new(function(v20, v21)
                local v22 = v18:NoPromptSetFavorite(v15, Enum.AvatarItemType.Asset, v16);
                while not v22 do
                    v18.PromptSetFavoriteCompleted:Wait();
                    v22 = v18:NoPromptSetFavorite(v15, Enum.AvatarItemType.Asset, v16);
                    v10(v11.Counter.AvatarEditorServiceErrors.NoPromptSetFavorite);
                end;
                if v18.PromptSetFavoriteCompleted:Wait() == Enum.AvatarPromptResult.Success then
                    v19:dispatch(v9(v15, v16));
                    v20();
                    return ;
                else
                    if v12() then
                        v10(v11.Counter.AvatarEditorServiceErrors.SetAssetFavorite);
                    end;
                    v19:dispatch(v7({
                        HttpError = Enum.HttpError.OK
                    }));
                    v21();
                    return ;
                end;
            end);
        end)(v17);
    end);
end;