local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxEnableSearchOptionsRefactor);
local v2 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxFixDefaultTabForCreations);
local v3 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagEnablePluginHomeview);
local l_AICOChatBot_0 = game:GetFastFlag("AICOChatBot");
local l_AICOChatBotFindVariationFix_0 = game:GetFastFlag("AICOChatBotFindVariationFix");
local l_Packages_0 = l_Parent_0.Packages;
local v7 = require(l_Packages_0.Cryo);
local v8 = require(l_Packages_0.Roact);
local v9 = require(l_Packages_0.RoactRodux);
local v10 = require(l_Packages_0.Framework);
local l_showRobloxCreatedAssets_0 = require(l_Parent_0.Core.Util.ToolboxUtilities).showRobloxCreatedAssets;
local l_getHomeViewEnabledAssetTypes_0 = require(l_Parent_0.Core.Util.ToolboxUtilities).getHomeViewEnabledAssetTypes;
local v13 = require(l_Parent_0.SharedPluginConstants);
local l_Util_0 = l_Parent_0.Core.Util;
local v15 = require(l_Util_0.Constants);
local v16 = require(l_Util_0.PageInfoHelper);
local v17 = require(l_Util_0.getTabs);
local v18 = require(l_Util_0.Analytics.Analytics);
local v19 = require(l_Util_0.isInSemanticSearchIXP);
local l_Types_0 = l_Parent_0.Core.Types;
local v21 = require(l_Types_0.Sort);
local v22 = require(l_Types_0.Category);
local v23 = require(l_Types_0.RequestReason);
local l_Components_0 = l_Parent_0.Core.Components;
local v25 = require(l_Components_0.AnnouncementDialog);
local v26 = require(l_Components_0.TabSet);
local v27 = require(l_Components_0.Header);
local v28 = require(l_Components_0.MainView.MainView);
local v29 = require(l_Components_0.SoundPreviewComponent);
local v30 = require(l_Components_0.Home.HomeWrapper);
local v31 = if not v1() then require(l_Parent_0.Core.Components.SearchOptions.SearchOptions) else nil;
local v32 = require(l_Parent_0.Core.Components.SearchOptions.SearchOptionWrappers.AudioMarketplaceSearchOptions);
local v33 = if not v1() then nil else require(l_Parent_0.Core.Components.SearchOptions.SearchOptionWrappers.MarketplaceSearchOptions);
local v34 = if not v1() then nil else require(l_Parent_0.Core.Components.SearchOptions.SearchOptionWrappers.InventorySearchOptions);
local l_Requests_0 = l_Parent_0.Core.Networking.Requests;
local v36 = require(l_Requests_0.UpdatePageInfoAndSendRequest);
local v37 = require(l_Requests_0.ChangeMarketplaceTab);
local v38 = require(l_Requests_0.GetToolboxManageableGroupsRequest);
local v39 = require(l_Requests_0.GetRolesRequest);
local v40 = require(l_Requests_0.GetRolesDebugRequest);
local v41 = require(l_Requests_0.GetRobuxBalance);
local v42 = require(l_Parent_0.Core.ContextServices.IXPContext);
local l_ContextServices_0 = v10.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v45 = require(l_Parent_0.Core.ContextServices.Settings);
local v46 = require(l_Parent_0.Core.ContextServices.ModalContext);
local v47 = require(l_Parent_0.Core.ContextServices.NetworkContext);
local _ = require(l_Parent_0.Core.Types.HomeTypes);
local v49 = require(l_Parent_0.Core.Actions.SetLayoutMode);
local v50 = require(l_Parent_0.Core.Thunks.LogMarketplaceSearchAnalytics);
local l_DebugToolboxGetRolesRequest_0 = game:GetFastFlag("DebugToolboxGetRolesRequest");
local v52 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxContentManagementCombineTabs);
local v53 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxEnableAssetRows);
local v54 = require(l_Parent_0.Core.Util.SharedFlags.getIsIXPEnabledForListView);
local v55 = require(l_Parent_0.Core.Types.LayoutMode);
local v56 = require(l_Parent_0.Core.Types.Background);
local v57 = v8.PureComponent:extend("Toolbox");
v57.defaultProps = {
    Size = UDim2.new(1, 0, 1, 0)
};
v57.handleInitialSettings = function(v58)
    if v58.props.Settings and v58.props.Network then
        local l_networkInterface_0 = v58.props.Network.networkInterface;
        local v60 = v58.props.Settings:get("Plugin");
        local v61 = v60:loadInitialSettings();
        local v62 = nil;
        if v53() then
            v62 = v60:getLayoutMode();
            v58.props.setLayoutMode(v62);
        end;
        local v63 = nil;
        local v64 = nil;
        local v65 = v56.getBackgroundForStudioTheme();
        v63 = 1;
        v64 = "";
        local l_categoryName_0 = v61.categoryName;
        local v67 = v22.getTabForCategoryName(l_categoryName_0);
        if v52() and v67 == v22.CREATIONS then
            v67 = if not v2() then v22.INVENTORY else v22.DEFAULT_TAB;
            l_categoryName_0 = v22.DEFAULT.name;
        end;
        local v68 = {
            categories = v67,
            categoryName = l_categoryName_0,
            creator = v61.creator,
            searchTerm = v64,
            sortIndex = v63,
            targetPage = 1,
            selectedBackgroundIndex = v65,
            requestReason = v23.InitLoad
        };
        local v69 = true;
        if v67 ~= v22.INVENTORY then
            v69 = v67 == v22.CREATIONS;
        end;
        if v69 then
            v58.props.getToolboxManageableGroups(l_networkInterface_0, v60, v68);
        end;
        local v70 = v54(v58.props.IXP);
        if v70 then
            v70 = false;
            if v62 == v55.ListView then
                v70 = v22.getTabForCategoryName(l_categoryName_0) == v22.INVENTORY;
            end;
        end;
        if not v70 then
            v58.props.updatePageInfo(l_networkInterface_0, v60, v68);
        end;
        return ;
    else
        return ;
    end;
end;
v57.init = function(v71, v72)
    v71.state = {
        toolboxWidth = math.max(v72.initialWidth or 0, v15.TOOLBOX_MIN_WIDTH),
        showSearchOptions = false
    };
    v71.onAbsoluteSizeChange = function(v73)
        local v74 = math.max(v73.AbsoluteSize.X, v15.TOOLBOX_MIN_WIDTH);
        if v71.state.toolboxWidth ~= v74 then
            v71:setState({
                toolboxWidth = v74
            });
        end;
    end;
    v71:handleInitialSettings();
    v71.toggleSearchOptions = function()
        local l_showSearchOptions_0 = v71.state.showSearchOptions;
        if not l_showSearchOptions_0 then
            local l_categoryName_1 = v71.props.categoryName;
            local v77 = v22.getCategoryByName(l_categoryName_1);
            v18.MarketplaceSearchFilterOpened(if not v77 then nil else v22.ToolboxAssetTypeToEngine[v77.assetType], (v22.getTabKeyForCategoryName(l_categoryName_1)));
        end;
        v71.props.Modal.onSearchOptionsToggled(not l_showSearchOptions_0);
        v71:setState({
            showSearchOptions = not l_showSearchOptions_0
        });
    end;
    local function v83(v78, v79)
        if v22.CREATIONS_KEY == v78 then
            for _, v81 in ipairs(v79) do
                local l_v81_0 = v81;
                if l_v81_0 then
                    l_v81_0 = true;
                    if v81.selectable ~= nil then
                        l_v81_0 = v81.selectable;
                    end;
                end;
                if l_v81_0 then
                    return v81.name;
                end;
            end;
        end;
        return v79[1].name;
    end;
    local function _(v84)
        if l_showRobloxCreatedAssets_0() and v84 == v22.MARKETPLACE_KEY then
            return v22.CREATOR_ROBLOX;
        else
            return nil;
        end;
    end;
    v71.changeMarketplaceTab = function(v86, v87)
        local v88 = v22.getCategories(v86, v71.props.roles, if not v52() then nil else v71.props.IXP);
        local v89 = v7.Dictionary.join({
            categoryName = v83(v86, v88),
            creator = if not not l_showRobloxCreatedAssets_0() and v86 == v22.MARKETPLACE_KEY then v22.CREATOR_ROBLOX else nil,
            searchTerm = "",
            sortIndex = 1,
            groupIndex = 0
        }, v87 or {});
        v71.props.changeMarketplaceTab(v71.props.Network.networkInterface, v86, v88, v71.props.Settings:get("Plugin"), v89, if not v52() then nil else v71.props.IXP);
        v18.onCategorySelected(v16.getCategory(v71.props.categoryName), (v16.getCategory(v89.categoryName)));
    end;
    v71.onBackToHome = function()
        local l_categoryName_2 = v71.props.categoryName;
        v71.changeMarketplaceTab(v22.getTabKeyForCategoryName(l_categoryName_2), {
            categoryName = l_categoryName_2
        });
    end;
    if l_AICOChatBot_0 then
        v71.updatePageInfoWithSearchTerm = function(v91)
            if v71.props.Settings and v71.props.Network then
                v71.props.updatePageInfo(v71.props.Network.networkInterface, v71.props.Settings:get("Plugin"), {
                    searchTerm = v91
                });
                return ;
            else
                return ;
            end;
        end;
    end;
end;
v57.didUpdate = function(v92, v93, _)
    local l_props_0 = v92.props;
    if v93.searchId ~= l_props_0.searchId then
        v92.props.logSearchAnalytics(l_props_0.searchTerm);
    end;
end;
v57.didMount = function(v96)
    v96:handleInitialSettings();
    v96.props.setRoles(v96.props.Network.networkInterface);
    v96.props.getRobuxBalance(v96.props.Network.networkInterface);
    v96._showPluginsConnection = not not v96.props.pluginLoaderContext and v96.props.pluginLoaderContext.signals["MemStorageService." .. v13.SHOW_TOOLBOX_PLUGINS_EVENT]:Connect(function()
        v96.changeMarketplaceTab(v22.MARKETPLACE_KEY, {
            categoryName = v22.WHITELISTED_PLUGINS.name
        });
        v18.openedFromPluginManagement();
    end) or nil;
    if l_AICOChatBot_0 then
        v96._showPluginsConnection = not not v96.props.pluginLoaderContext and v96.props.pluginLoaderContext.signals["MemStorageService." .. v13.SHOW_TOOLBOX_OPEN_MODELS_AND_SEARCH_EVENT]:Connect(function(v97)
            if not l_AICOChatBotFindVariationFix_0() then
                v96.changeMarketplaceTab(v22.MARKETPLACE_KEY, {
                    categoryName = v22.FREE_MODELS.name
                });
                v96.updatePageInfoWithSearchTerm(v97);
                return ;
            else
                v96.changeMarketplaceTab(v22.MARKETPLACE_KEY, {
                    categoryName = v22.FREE_MODELS.name,
                    searchTerm = v97
                });
                return ;
            end;
        end) or nil;
    end;
    v96._changeMarketplaceTabConnection = not not v96.props.pluginLoaderContext and v96.props.pluginLoaderContext.signals["MemStorageService." .. v15.OPEN_MARKETPLACE_VIEW_FOR_ASSET_TYPE]:Connect(function(v98)
        v96.changeMarketplaceTab(v22.MARKETPLACE_KEY, {
            categoryName = v22.getMarketplaceCategoryByAssetType(Enum.AssetType[v98]).name
        });
        v18.openedExternallyByAssetType(v98);
    end) or nil;
end;
v57.willUnmount = function(v99)
    if v99._showPluginsConnection then
        v99._showPluginsConnection:Disconnect();
        v99._showPluginsConnection = nil;
    end;
    if v99._changeMarketplaceTabConnection then
        v99._changeMarketplaceTabConnection:Disconnect();
        v99._changeMarketplaceTabConnection = nil;
    end;
end;
v57.render = function(v100)
    local l_props_1 = v100.props;
    local l_state_0 = v100.state;
    local l_toolboxWidth_0 = l_state_0.toolboxWidth;
    local l_showSearchOptions_1 = l_state_0.showSearchOptions;
    local _ = l_props_1.backgrounds;
    local l_creator_0 = l_props_1.creator;
    local l_searchTerm_0 = l_props_1.searchTerm;
    local v108 = l_props_1.suggestions or {};
    local l_categoryName_3 = l_props_1.categoryName;
    local l_audioSearchInfo_0 = l_props_1.audioSearchInfo;
    local l_additionalAudioSearchInfo_0 = l_props_1.additionalAudioSearchInfo;
    local l_uiSortIntent_0 = l_props_1.uiSortIntent;
    local v113 = v22.getTabKeyForCategoryName(l_categoryName_3);
    local l_tryOpenAssetConfig_0 = l_props_1.tryOpenAssetConfig;
    local l_pluginGui_0 = l_props_1.pluginGui;
    local l_Size_0 = v100.props.Size;
    local l_Stylizer_0 = v100.props.Stylizer;
    local l_Localization_0 = l_props_1.Localization;
    local l_locale_0 = l_props_1.Localization.locale;
    local l_onAbsoluteSizeChange_0 = v100.onAbsoluteSizeChange;
    local l_TAB_WIDGET_HEIGHT_0 = v15.TAB_WIDGET_HEIGHT;
    local v122 = false;
    local v123 = {};
    local v124 = v22.getEngineAssetType(v22.getCategoryByName(l_categoryName_3).assetType);
    local v125 = if not not v3() and l_getHomeViewEnabledAssetTypes_0() ~= nil then string.split(l_getHomeViewEnabledAssetTypes_0(), ";") else {};
    if ((((v113 == v22.MARKETPLACE_KEY and (not l_creator_0 or l_creator_0 == "")) and l_searchTerm_0 == "") and l_audioSearchInfo_0 == nil) and l_additionalAudioSearchInfo_0 == nil) and l_uiSortIntent_0 == nil then
        if not v3() then
            table.insert(v123, Enum.AssetType.Model);
            table.insert(v123, Enum.AssetType.Audio);
        else
            for _, v127 in ipairs(v125) do
                local v128 = Enum.AssetType[v127];
                if v128 then
                    table.insert(v123, v128);
                end;
            end;
        end;
        v122 = table.find(v123, v124);
    end;
    local v129 = nil;
    if not v1() then
        v129 = if not l_showSearchOptions_1 then nil else v8.createElement(v31, {
            onSearchOptionsToggled = v100.toggleSearchOptions
        });
    else
        local v130 = v22.getTabForCategoryName(l_categoryName_3) == v22.INVENTORY;
        if l_showSearchOptions_1 then
            v129 = if not v130 then if v22.categoryIsAudio(l_categoryName_3) then v8.createElement(v32, {
                OnClose = v100.toggleSearchOptions
            }) else v8.createElement(v33, {
                OnClose = v100.toggleSearchOptions
            }) else v8.createElement(v34, {
                OnClose = v100.toggleSearchOptions
            });
        end;
    end;
    return v8.createElement("Frame", {
        Position = UDim2.new(0, 0, 0, 0),
        Size = l_Size_0,
        BorderSizePixel = 0,
        BackgroundColor3 = l_Stylizer_0.backgroundColor,
        [v8.Change.AbsoluteSize] = l_onAbsoluteSizeChange_0,
        [v8.Event.MouseEnter] = l_props_1.onMouseEnter
    }, {
        AnnouncementDialogContainer = v8.createElement(v25, {
            checkUserInIXP = v19
        }),
        Tabs = v8.createElement(v26, {
            Disabled = l_props_1.hasTutorialLimits,
            Size = UDim2.new(1, 0, 0, v15.TAB_WIDGET_HEIGHT),
            Tabs = if not v52() then v17(l_Localization_0) else v17(l_Localization_0, l_props_1.roles, l_props_1.IXP),
            CurrentTab = v113,
            onTabSelected = v100.changeMarketplaceTab
        }),
        Header = v8.createElement(v27, {
            Position = UDim2.new(0, 0, 0, l_TAB_WIDGET_HEIGHT_0),
            maxWidth = l_toolboxWidth_0,
            onSearchOptionsToggled = v100.toggleSearchOptions,
            pluginGui = l_pluginGui_0
        }),
        MainView = if not v122 then v8.createElement(v28, {
            Position = UDim2.new(0, 0, 0, (l_TAB_WIDGET_HEIGHT_0 + v15.HEADER_HEIGHT) + 1),
            Size = UDim2.new(1, 0, 1, -((v15.HEADER_HEIGHT + l_TAB_WIDGET_HEIGHT_0) + 2)),
            maxWidth = l_toolboxWidth_0,
            suggestions = v108,
            tryOpenAssetConfig = l_tryOpenAssetConfig_0,
            onBackToHome = v100.onBackToHome
        }) else v8.createElement(v30, {
            AssetType = v124,
            CategoryName = l_categoryName_3,
            Locale = l_locale_0,
            Position = UDim2.new(0, 0, 0, (l_TAB_WIDGET_HEIGHT_0 + v15.HEADER_HEIGHT) + 1),
            Size = UDim2.new(1, 0, 1, -((v15.HEADER_HEIGHT + l_TAB_WIDGET_HEIGHT_0) + 2)),
            SortName = v21.getDefaultSortNameForCategory(l_categoryName_3),
            TryOpenAssetConfig = l_tryOpenAssetConfig_0,
            EnabledAssetTypes = v123
        }),
        SearchOptions = v129,
        AudioPreview = v8.createElement(v29)
    });
end;
return v9.connect(function(v131, _)
    v131 = v131 or {};
    local v133 = v131.pageInfo or {};
    return {
        categoryName = v133.categoryName or v22.DEFAULT.name,
        creator = v133.creator,
        audioSearchInfo = v133.audioSearchInfo,
        additionalAudioSearchInfo = v133.additionalAudioSearchInfo,
        roles = v131.roles or {},
        searchId = v133.searchId or "",
        searchTerm = v133.searchTerm or "",
        sorts = v133.sorts or {},
        uiSortIntent = if not not v133.uiSortIntent and v133.uiSortIntent ~= v7.None then v133.uiSortIntent else nil,
        hasTutorialLimits = v131.tutorialLimits.assetIds ~= nil
    };
end, function(v134)
    return {
        setRoles = function(v135)
            if not l_DebugToolboxGetRolesRequest_0 then
                v134(v39(v135));
                return ;
            else
                v134(v40(v135));
                return ;
            end;
        end,
        updatePageInfo = function(v136, v137, v138)
            v134(v36(v136, v137, v138));
        end,
        changeMarketplaceTab = function(v139, v140, v141, v142, v143, v144)
            v134(v37(v139, v140, v141, v142, v143, v144));
        end,
        getRobuxBalance = function(v145)
            v134(v41(v145));
        end,
        getToolboxManageableGroups = function(v146, v147, v148)
            v134(v38(v146, v147, v148));
        end,
        logSearchAnalytics = function(v149)
            return v134(v50(v149, false));
        end,
        setLayoutMode = if not v53() then nil else function(v150)
            v134(v49(v150));
        end
    };
end)((l_withContext_0({
    IXP = if v52() or v53() then v42 else nil,
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Settings = v45,
    Modal = v46,
    Network = v47
})(v57)));


local l_StudioFixPluginWidgetLocalizedIds_0 = game:GetFastFlag("StudioFixPluginWidgetLocalizedIds");
local l_AICOChatBot_0 = game:GetFastFlag("AICOChatBot");
local l_StudioService_0 = game:GetService("StudioService");
local l_Parent_0 = script.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v5 = require(l_Packages_0.Roact);
local v6 = require(l_Packages_0.RoactRodux);
local l_Util_0 = l_Parent_0.Core.Util;
local v8 = require(l_Parent_0.SharedPluginConstants);
local v9 = require(l_Parent_0.Core.Util.Constants);
local _ = require(l_Parent_0.Core.Util.Images);
local v11 = require(l_Parent_0.Core.Components.ExternalServicesWrapper);
local v12 = require(l_Parent_0.Core.Components.PluginWidget.DockWidget);
local v13 = require(l_Parent_0.Core.Components.Toolbox);
local v14 = require(l_Parent_0.Core.Actions.StopAllSounds);
local v15 = require(l_Util_0.makeTheme);
local l_ContextServices_0 = require(l_Packages_0.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local _ = require(l_Packages_0.Framework).Util;
local v19 = require(l_Parent_0.Core.ContextServices.NavigationContext);
local v20 = require(l_Util_0.Analytics.Analytics);
local v21 = v5.PureComponent:extend("ToolboxPlugin");
v21.init = function(v22, v23)
    v22.theme = v15();
    v22.localization = v23.localization;
    v22.plugin = v23.plugin;
    if not v22.plugin then
        error("ToolboxPlugin component requires plugin to be passed as prop");
    end;
    v22.state = {
        enabled = true,
        pluginGui = nil
    };
    v22.toolbar = v23.pluginLoaderContext.toolbar;
    v22.toolboxButton = v23.pluginLoaderContext.mainButton;
    v22.onDockWidgetEnabledChanged = function(_)
        if v22.dockWidget.Enabled == false then
            v22.props.stopAllSounds();
        end;
        v22.toolboxButton:SetActive(v22.dockWidget.Enabled);
        if not v22.dockWidget.Enabled then
            v20.onToolboxHidden();
            return ;
        else
            v20.onToolboxDisplayed();
            return ;
        end;
    end;
    v22.onAncestryChanged = function(_, _, v27)
        if not (v27 or not v22.props.onPluginWillDestroy) then
            v22.props.onPluginWillDestroy();
        end;
    end;
    v22.dockWidgetRefFunc = function(v28)
        v22.dockWidget = v28;
        v22.toolboxButton:SetActive(v22.dockWidget.Enabled);
    end;
    local v29 = nil;
    v22.onDockWidgetInteraction = function()
        local l_AbsoluteSize_0 = v22.dockWidget.AbsoluteSize;
        if not (v29 ~= nil and v29.X == l_AbsoluteSize_0.X) or v29.Y ~= l_AbsoluteSize_0.Y then
            v20.onToolboxWidgetInteraction(l_AbsoluteSize_0);
            v29 = l_AbsoluteSize_0;
        end;
    end;
end;
v21.didMount = function(v31)
    v31.props.pluginLoaderContext.mainButtonClickedSignal:Connect(function()
        v31.dockWidget.Enabled = not v31.dockWidget.Enabled;
        if not v31.dockWidget.Enabled then
            v20.onPluginButtonClickClose();
            return ;
        else
            v20.onPluginButtonClickOpen();
            return ;
        end;
    end);
    local v32 = l_StudioService_0:getStartupAssetId();
    if v32 and #v32 > 0 then
        v31.dockWidget.Enabled = true;
    end;
    v31.onDockWidgetEnabledChanged(v31.dockWidget);
    v31._dockWidgetInteractionConnection = v31.dockWidget.WindowFocused:Connect(v31.onDockWidgetInteraction);
    v31:setState({
        pluginGui = v31.dockWidget
    });
    v31._showPluginsConnection = v31.props.pluginLoaderContext.signals["MemStorageService." .. v8.SHOW_TOOLBOX_PLUGINS_EVENT]:Connect(function()
        v31.dockWidget.Enabled = true;
        v31.dockWidget:RequestRaise();
    end);
    if l_AICOChatBot_0 then
        v31._showPluginsConnection = v31.props.pluginLoaderContext.signals["MemStorageService." .. v8.SHOW_TOOLBOX_OPEN_MODELS_AND_SEARCH_EVENT]:Connect(function()
            v31.dockWidget.Enabled = true;
            v31.dockWidget:RequestRaise();
        end);
    end;
    v31._changeMarketplaceTabConnection = v31.props.pluginLoaderContext.signals["MemStorageService." .. v9.OPEN_MARKETPLACE_VIEW_FOR_ASSET_TYPE]:Connect(function()
        v31.dockWidget.Enabled = true;
        v31.dockWidget:RequestRaise();
    end);
end;
v21.willUnmount = function(v33)
    if v33.disconnectLocalizationListener then
        v33.disconnectLocalizationListener();
    end;
    if v33._showPluginsConnection then
        v33._showPluginsConnection:Disconnect();
        v33._showPluginsConnection = nil;
    end;
    if v33._changeMarketplaceTabConnection then
        v33._changeMarketplaceTabConnection:Disconnect();
        v33._changeMarketplaceTabConnection = nil;
    end;
    if v33._dockWidgetInteractionConnection then
        v33._dockWidgetInteractionConnection:Disconnect();
        v33._dockWidgetInteractionConnection = nil;
    end;
end;
v21.render = function(v34)
    local l_props_0 = v34.props;
    local l_state_0 = v34.state;
    local l_plugin_0 = l_props_0.plugin;
    local l_theme_0 = l_props_0.theme;
    local l_networkInterface_0 = l_props_0.networkInterface;
    local l_localization_0 = l_props_0.localization;
    local l_backgrounds_0 = l_props_0.backgrounds;
    local l_suggestions_0 = l_props_0.suggestions;
    local l_tryOpenAssetConfig_0 = l_props_0.tryOpenAssetConfig;
    local _ = l_state_0.enabled;
    local l_pluginGui_0 = l_state_0.pluginGui;
    return v5.createElement(v12, {
        Id = if not l_StudioFixPluginWidgetLocalizedIds_0 then nil else "Toolbox",
        Title = v34.props.Localization:getText("General", "ToolboxToolbarName"),
        Name = "Toolbox",
        ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
        Widget = l_props_0.pluginLoaderContext.mainDockWidget,
        MinWidth = v9.TOOLBOX_MIN_WIDTH,
        MinHeight = v9.TOOLBOX_MIN_HEIGHT,
        [v5.Ref] = v34.dockWidgetRefFunc,
        [v5.Change.Enabled] = v34.onDockWidgetEnabledChanged,
        [v5.Event.AncestryChanged] = v34.onAncestryChanged
    }, {
        Toolbox = l_pluginGui_0 ~= nil and l_ContextServices_0.provide({
            l_ContextServices_0.Focus.new(v34.state.pluginGui),
            v19.new()
        }, {
            v5.createElement(v11, {
                plugin = l_plugin_0,
                pluginGui = l_pluginGui_0,
                theme = l_theme_0,
                networkInterface = l_networkInterface_0,
                localization = l_localization_0
            }, {
                v5.createElement(v13, {
                    initialWidth = not not l_pluginGui_0 and l_pluginGui_0.AbsoluteSize.x or v9.TOOLBOX_MIN_WIDTH,
                    backgrounds = l_backgrounds_0,
                    suggestions = l_suggestions_0,
                    tryOpenAssetConfig = l_tryOpenAssetConfig_0,
                    pluginGui = l_pluginGui_0,
                    pluginLoaderContext = l_props_0.pluginLoaderContext,
                    onMouseEnter = v34.onDockWidgetInteraction
                })
            })
        })
    });
end;
return v6.connect(nil, function(v46)
    return {
        stopAllSounds = function()
            v46(v14());
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v21)));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local l_ContextServices_0 = require(l_Packages_0.Framework).ContextServices;
local v4 = require(l_Parent_0.Core.ContextServices.Settings);
local v5 = require(l_Parent_0.Core.Util.makeTheme);
local v6 = v2.PureComponent:extend("ToolboxServiceWrapper");
v6.render = function(v7)
    local l_props_0 = v7.props;
    local l_localization_0 = l_props_0.localization;
    local l_plugin_0 = l_props_0.plugin;
    local l_settings_0 = l_props_0.settings;
    local l_store_0 = l_props_0.store;
    local _ = l_props_0.theme;
    local l_analytics_0 = l_props_0.analytics;
    local _ = l_props_0.ixp;
    return l_ContextServices_0.provide({
        l_ContextServices_0.API.new(),
        l_ContextServices_0.Plugin.new(l_plugin_0),
        l_localization_0,
        v5(),
        l_ContextServices_0.Store.new(l_store_0),
        v4.new(l_settings_0),
        l_ContextServices_0.Mouse.new((l_plugin_0:GetMouse())),
        l_analytics_0,
        l_props_0.assetAnalytics,
        l_props_0.ixp
    }, l_props_0[v2.Children]);
end;
return v6;


local l_Packages_0 = script.Parent.Parent.Parent.Packages;
local v1 = require(l_Packages_0.Roact);
local l_Tooltip_0 = require(l_Packages_0.Framework).UI.Tooltip;
local v3 = v1.PureComponent:extend("TooltipWrapper");
v3.render = function(v4)
    local l_props_0 = v4.props;
    return v1.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1,
        SizeConstraint = l_props_0.SizeConstraint or Enum.SizeConstraint.RelativeXY
    }, {
        Tooltip = v1.createElement(l_Tooltip_0, {
            Enabled = l_props_0.canShowCurrentTooltip and l_props_0.isHovered,
            Text = tostring(l_props_0.Text or ""),
            Priority = 2
        })
    });
end;
return v3;


local l_Packages_0 = script.Parent.Parent.Parent.Packages;
local v1 = require(l_Packages_0.Roact);
local v2 = require(l_Packages_0.Cryo);
return function(v3, v4, v5)
    local v6 = v1.Component:extend((("FitComponent(%s, %s)"):format(v3, v4)));
    local v7 = v5.BorderSize or 0;
    v5 = v2.Dictionary.join(v5, {
        BorderSize = v2.None
    });
    v6.init = function(v8)
        v8.layoutRef = v1.createRef();
        v8.containerRef = v1.createRef();
        v8.layoutProps = v2.Dictionary.join(v5, {
            [v1.Ref] = v8.layoutRef,
            [v1.Change.AbsoluteContentSize] = function()
                if v8.layoutRef.current ~= nil and v8.containerRef.current ~= nil then
                    v8:resizeContainer();
                end;
            end
        });
    end;
    v6.render = function(v9)
        assert(v9.props.Size == nil, "Size must not be specified");
        local l_join_0 = v2.Dictionary.join;
        local v11 = {
            Layout = v1.createElement(v4, v9.layoutProps)
        };
        local v12 = false;
        if v7 > 0 then
            v12 = v1.createElement("UIPadding", {
                PaddingTop = UDim.new(0, v7),
                PaddingBottom = UDim.new(0, v7),
                PaddingLeft = UDim.new(0, v7),
                PaddingRight = UDim.new(0, v7)
            });
        end;
        v11.Padding = v12;
        return v1.createElement(v3, (v2.Dictionary.join(v9.props, {
            [v1.Children] = l_join_0(v11, v9.props[v1.Children]),
            [v1.Ref] = v9.containerRef
        })));
    end;
    v6.didMount = function(v13)
        v13:resizeContainer();
    end;
    v6.resizeContainer = function(v14)
        v14.containerRef.current.Size = UDim2.new(1, 0, 0, v14.layoutRef.current.AbsoluteContentSize.Y + v7 * 2);
    end;
    return v6;
end;


local l_Packages_0 = script.Parent.Parent.Parent.Packages;
local v1 = require(l_Packages_0.Framework);
local l_ContextItem_0 = v1.ContextServices.ContextItem;
local l_Signal_0 = v1.Util.Signal;
local _ = require(l_Packages_0.Dash);
local v5 = require(l_Packages_0.Cryo);
local v6 = l_ContextItem_0:extend("IXPContext");
v6.createMock = function(v7)
    return v6.new({
        GetUserLayerLoadingStatus = function()
            return Enum.IXPLoadingStatus.Initialized;
        end,
        GetUserLayerVariables = function()
            return v7 or {};
        end,
        OnUserLayerLoadingStatusChanged = l_Signal_0.new()
    });
end;
v6.new = function(v8)
    local v9 = {
        IXPService = v8 or game:GetService("IXPService")
    };
    setmetatable(v9, v6);
    return v9;
end;
v6.getSignal = function(v10)
    return v10.IXPService.OnUserLayerLoadingStatusChanged;
end;
v6.isReady = function(v11)
    return v11.IXPService:GetUserLayerLoadingStatus() == Enum.IXPLoadingStatus.Initialized;
end;
v6.isError = function(v12)
    local l_UserLayerLoadingStatus_0 = v12.IXPService:GetUserLayerLoadingStatus();
    local v14 = false;
    if l_UserLayerLoadingStatus_0 ~= Enum.IXPLoadingStatus.Initialized then
        v14 = l_UserLayerLoadingStatus_0 ~= Enum.IXPLoadingStatus.Pending;
    end;
    return v14;
end;
v6.getVariables = function(v15)
    if v15:isReady() then
        return v5.Dictionary.join(v15.IXPService:GetUserLayerVariables("CreatorMarketplace"), v15.IXPService:GetUserLayerVariables("StudioMarketplace"), v15.IXPService:GetUserLayerVariables("Studio.Toolbox.Usage"), v15.IXPService:GetUserLayerVariables("CreatorContent.Music.Studio"), v15.IXPService:GetUserLayerVariables("Studio.Toolbox.AssetQuality.Exposure"));
    else
        return {};
    end;
end;
v6.logUserLayerExposure = function(v16, v17)
    if v16:isReady() then
        pcall(function()
            v16.IXPService:LogUserLayerExposure(v17);
        end);
    end;
end;
return v6;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local l_ContextItem_0 = require(l_Packages_0.Framework).ContextServices.ContextItem;
local _ = require(l_Packages_0.Roact);
local v4 = require(l_Parent_0.Core.Util.ModalStatus);
local v5 = l_ContextItem_0:extend("ModalContext");
v5.new = function(v6)
    local v7 = {
        modalTarget = v6
    };
    local v8 = v4.new();
    v7.modalStatus = v8;
    v7.onTooltipTriggered = function(v9, v10)
        v8:onTooltipTriggered(v9, v10);
    end;
    v7.onDropdownToggled = function(v11)
        v8:onDropdownToggled(v11);
    end;
    v7.onSearchOptionsToggled = function(v12)
        v8:onSearchOptionsToggled(v12);
    end;
    v7.onSearchOptionsMouse = function(v13)
        v8:onSearchOptionsMouse(v13);
    end;
    v7.isShowingModal = function()
        return v8:isShowingModal();
    end;
    v7.isShowingSearchOptions = function()
        return v8:isShowingSearchOptions();
    end;
    v7.isMouseInSearchOptions = function()
        return v8:isMouseInSearchOptions();
    end;
    v7.isAssetPreviewing = function()
        return v8:isAssetPreviewing();
    end;
    v7.onAssetPreviewToggled = function(v14)
        return v8:onAssetPreviewToggled(v14);
    end;
    v7.canHoverAsset = function()
        return v8:canHoverAsset();
    end;
    setmetatable(v7, v5);
    return v7;
end;
return v5;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_ContextItem_0 = require(l_Parent_0.Packages.Framework).ContextServices.ContextItem;
local v2 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagFixSwimlaneAnalytics);
local v3 = l_ContextItem_0:extend("NavigationContext");
v3.new = function(v4)
    local v5 = {
        navigation = {
            push = function()
            end,
            pop = function()
            end,
            popToTop = function()
            end
        },
        observedNavStack = {
            v4
        },
        observedRouteStack = {
            v4
        },
        rootRoute = v4
    };
    setmetatable(v5, v3);
    return v5;
end;
v3.updateNavigation = function(v6, v7)
    v6.navigation = v7;
end;
v3.get = function(v8)
    return v8;
end;
v3.push = function(v9, v10, v11, v12)
    table.insert(v9.observedNavStack, v11);
    if v2() then
        table.insert(v9.observedRouteStack, v10);
    end;
    v9.navigation.push(v10, v12);
end;
v3.pop = function(v13)
    table.remove(v13.observedNavStack, #v13.observedNavStack);
    if #v13.observedNavStack <= 0 then
        v13.observedNavStack = {
            v13.rootRoute
        };
    end;
    if v2() then
        table.remove(v13.observedRouteStack, #v13.observedRouteStack);
        if #v13.observedRouteStack <= 0 then
            v13.observedRouteStack = {
                v13.rootRoute
            };
        end;
    end;
    v13.navigation.pop();
end;
v3.popToTop = function(v14)
    v14.observedNavStack = {
        v14.rootRoute
    };
    if v2() then
        v14.observedRouteStack = {
            v14.rootRoute
        };
    end;
    v14.navigation.popToTop();
end;
v3.getBreadcrumbRoute = function(v15)
    return v15.observedNavStack;
end;
v3.getNavigationRoute = function(v16)
    return v16.observedRouteStack;
end;
v3.getCurrentPath = function(v17)
    return v17.observedNavStack[#v17.observedNavStack];
end;
return v3;


local v0 = require(script.Parent.Parent.Parent.Packages.Framework).ContextServices.ContextItem:extend("NetworkInterface");
v0.new = function(v1)
    local v2 = {
        networkInterface = v1
    };
    setmetatable(v2, v0);
    return v2;
end;
return v0;


local v0 = require(script.Parent.Parent.Parent.Packages.Framework).ContextServices.ContextItem:extend("Settings");
v0.new = function(v1)
    local v2 = {
        settings = v1
    };
    setmetatable(v2, v0);
    return v2;
end;
v0.get = function(v3)
    return v3.settings;
end;
return v0;


game:DefineFastFlag("AssetConfigSelectInput2", false);
return function()
    return game:GetFastFlag("AssetConfigSelectInput2");
end;


game:DefineFastFlag("EnableUGCIndividualAssetUploadAnalytics", false);
return function()
    return game:GetFastFlag("EnableUGCIndividualAssetUploadAnalytics");
end;


game:DefineFastFlag("FixCreatorGroupIdNotChanging", false);
return function()
    return game:GetFastFlag("FixCreatorGroupIdNotChanging");
end;


game:DefineFastFlag("QualityFiltersFixInResultsView", false);
return function()
    return game:GetFastFlag("QualityFiltersFixInResultsView");
end;


game:DefineFastFlag("QualityFiltersInToolboxSearch5", false);
return function()
    return game:GetFastFlag("QualityFiltersInToolboxSearch5");
end;


game:DefineFastFlag("ToolboxAddNewUGCAssetTypes3", false);
return function()
    return game:GetFastFlag("ToolboxAddNewUGCAssetTypes3");
end;


game:DefineFastFlag("ToolboxAddPackageVersionDescriptions6", false);
return function()
    return game:GetFastFlag("ToolboxAddPackageVersionDescriptions6");
end;


game:DefineFastFlag("ToolboxAnimationAPIMigration", false);
return function()
    return game:GetFastFlag("ToolboxAnimationAPIMigration");
end;


game:DefineFastFlag("ToolboxDisableContextualRecommendationRetries", false);
return function()
    return game:GetFastFlag("ToolboxDisableContextualRecommendationRetries");
end;


game:DefineFastFlag("ToolboxRollingAssetPermissionRequests", false);
return function()
    return game:GetFastFlag("ToolboxRollingAssetPermissionRequests");
end;


game:DefineFastFlag("ToolboxSetParentFix", false);
return function()
    return game:GetFastFlag("ToolboxSetParentFix");
end;


game:DefineFastFlag("ToolboxShowArtistThenCreator", false);
return function()
    return game:GetFastFlag("ToolboxShowArtistThenCreator");
end;


game:DefineFastFlag("ToolboxThrottleContextualRecommendationRequests", false);
return function()
    return game:GetFastFlag("ToolboxThrottleContextualRecommendationRequests");
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local v2 = require(l_script_FirstAncestor_0.Packages.React);
local v3 = require(l_script_FirstAncestor_0.Packages.ReactRoblox);
local l_act_0 = v3.act;
return function(v5, v6, v7)
    local v8 = {};
    local function v10(v9)
        v8.current = v6(v9);
        return nil;
    end;
    local function v13(v11)
        local v12 = v2.createElement(v10, v11);
        if v5 ~= nil then
            v12 = v2.createElement(v1.StoreProvider, {
                store = v5
            }, {
                Wrapper = v12
            });
        end;
        return v12;
    end;
    local v14 = v3.createRoot((Instance.new("Frame")));
    l_act_0(function()
        v14:render((v13(v7 or {})));
    end);
    return {
        result = v8,
        rerender = function(v15)
            l_act_0(function()
                v14:render((v13(v15)));
            end);
        end,
        cleanup = function()
            v14:unmount();
        end
    };
end;


local v0 = require(script:FindFirstAncestor("Toolbox").Packages.React);
local l_useCallback_0 = v0.useCallback;
local l_useEffect_0 = v0.useEffect;
local l_useRef_0 = v0.useRef;
local l_useState_0 = v0.useState;
return function(v5, v6)
    local v7, v8 = l_useState_0(v5);
    local v9 = l_useRef_0(true);
    local v10 = l_useCallback_0(function()
        task.delay(v6, function()
            v9.current = false;
        end);
    end, {});
    l_useEffect_0(function()
        if v5 ~= v7 and v9.current == false then
            v8(v5);
            v9.current = true;
            v10();
        end;
    end, {
        v5
    });
    l_useEffect_0(v10, {});
    return v7;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local v3 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v4 = require(l_script_FirstAncestor_0.Core.ContextServices.NetworkContext);
local _ = require(l_script_FirstAncestor_0.Core.Requests.fetchCategoryAssets);
local _ = require(l_script_FirstAncestor_0.Core.Components.ResultsFetcher);
local v7 = require(l_script_FirstAncestor_0.Core.Util.DebugFlags);
local v8 = require(l_script_FirstAncestor_0.Core.Hooks.usePrevious);
local l_deepEqual_0 = v2.Util.deepEqual;
return function(v10)
    return function(v11, v12)
        local l_networkInterface_0 = v4:use().networkInterface;
        local v14, v15 = v1.useState({});
        local v16 = v1.useRef({});
        local v17 = v1.useRef({});
        local v18 = v1.useRef(0);
        local v22 = v1.useMemo(function()
            local v19 = {};
            for _, v21 in v12, nil, nil do
                v19[v21.name] = v21;
            end;
            return v19;
        end, {
            v12
        });
        local v23 = v8(v22);
        local v32 = v1.useMemo(function()
            local v24 = {};
            local v25 = {};
            if not v23 then
                return {
                    added = v12,
                    removed = {}
                };
            else
                for _, v27 in v22, nil, nil do
                    local v28 = v23[v27.name];
                    if not (v28 and l_deepEqual_0(v27, v28)) then
                        table.insert(v24, v27);
                    end;
                end;
                for _, v30 in v23, nil, nil do
                    local v31 = v22[v30.name];
                    if not (v31 and l_deepEqual_0(v30, v31)) then
                        table.insert(v25, v30);
                    end;
                end;
                return {
                    added = v24,
                    removed = v25
                };
            end;
        end, {
            v22,
            v23,
            v12
        });
        local v33 = nil;
        v33 = v1.useCallback(function(v34, v35)
            if not v17.current[v34] then
                v17.current[v34] = true;
                v15(function(v36)
                    if not v36[v34] then
                        return v3.Dictionary.join(v36, {
                            [v34] = {
                                loading = true,
                                assets = {},
                                assetMap = {},
                                assetIds = {}
                            }
                        });
                    else
                        return v3.Dictionary.join(v36, {
                            [v34] = v3.Dictionary.join(v36[v34], {
                                loading = true
                            })
                        });
                    end;
                end);
                v10.fetchCategoryAssets(l_networkInterface_0, v11, v34, v35):andThen(function(v37)
                    if v17.current[v34] then
                        local l_v18_0 = v18;
                        l_v18_0.current = l_v18_0.current + 1;
                        v17.current[v34] = nil;
                        v16.current[v34] = true;
                        v15(function(v39)
                            local v40 = v39[v34];
                            local v41 = if not not v40 and v40.assets then #v40.assets else 0;
                            local v42 = {};
                            for v43, v44 in v37.assetIds, nil, nil do
                                local v45 = v37.assetMap[v44];
                                if not v45 then
                                    if v7.shouldDebugWarnings() then
                                        warn((("asset with ID %* not found in asset map"):format(v44)));
                                    end;
                                else
                                    v45.Context = {
                                        page = math.round(v41 / v18.current) + 1,
                                        pagePosition = v43,
                                        position = v41 + v43
                                    };
                                    table.insert(v42, v45);
                                end;
                            end;
                            return v3.Dictionary.join(v39, {
                                [v34] = v3.Dictionary.join(v40, {
                                    loading = false,
                                    assets = v3.List.join(v40.assets, v42),
                                    assetMap = {},
                                    assetIds = {},
                                    fetchNextPage = function()
                                        v33(v34, (v3.Dictionary.join(v35 or {}, {
                                            nextPageCursor = v37.nextPageCursor
                                        })));
                                    end
                                })
                            });
                        end);
                        return ;
                    else
                        return ;
                    end;
                end):catch(function(v46)
                    if v7.shouldDebugWarnings() then
                        warn(("failed to fetch assets for category \"%*\" and section \"%*\":"):format(v11, v34), v46);
                    end;
                    v17.current[v34] = nil;
                    v15(function(v47)
                        return v3.Dictionary.join(v47, {
                            [v34] = v3.Dictionary.join(v47[v34], {
                                loading = false
                            })
                        });
                    end);
                end);
                return ;
            else
                return ;
            end;
        end, {
            v11,
            l_networkInterface_0
        });
        local v50 = v1.useCallback(function(v48)
            v17.current[v48] = nil;
            v16.current[v48] = nil;
            v15(function(v49)
                return v3.Dictionary.join(v49, {
                    [v48] = v3.None
                });
            end);
        end, {});
        v1.useEffect(function()
            for _, v52 in v32.removed, nil, nil do
                v50(v52.name);
            end;
            for _, v54 in v32.added, nil, nil do
                v33(v54.name, v54.fetchArgs);
            end;
        end, {
            v32,
            v33,
            v50
        });
        return v14;
    end;
end;


return require(script.Parent["useCategorySectionAssets.impl"])({
    fetchCategoryAssets = require(script:FindFirstAncestor("Toolbox").Core.Requests.fetchCategoryAssets)
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local v3 = require(l_script_FirstAncestor_0.Packages.React);
local v4 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v5 = require(l_script_FirstAncestor_0.Core.Hooks.useHomeConfiguration);
local v6 = require(l_script_FirstAncestor_0.Core.Hooks.useCategorySectionAssets);
local v7 = require(l_script_FirstAncestor_0.Core.Hooks.useContextualAssets);
local v8 = require(l_script_FirstAncestor_0.Core.Hooks.useCachedValue);
local _ = require(l_script_FirstAncestor_0.Core.Requests.fetchCategoryAssets);
local _ = require(l_script_FirstAncestor_0.Core.Components.ResultsFetcher);
local _ = require(l_script_FirstAncestor_0.Core.Types.HomeTypes);
local v12 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local v13 = require(l_script_FirstAncestor_0.Core.Flags.getFFlagToolboxThrottleContextualRecommendationRequests);
local l_Localization_0 = v2.ContextServices.Localization;
local l_game_FastInt_0 = game:GetFastInt("ToolboxSceneAnalysisPollingSeconds");
return function(v16, v17)
    local v18 = v5(v4.getEngineAssetType(v16.assetType), l_Localization_0:use().locale);
    local v19 = if not v13() then v7() else v8(v7(), l_game_FastInt_0);
    local v23 = v3.useMemo(function()
        local v20 = {};
        if not (not v18 or not v18.sections) then
            for _, v22 in v18.sections, nil, nil do
                if not v22.subcategory then
                    table.insert(v20, v22);
                end;
            end;
        end;
        return v20;
    end, {
        v18
    });
    local v28 = v6(v16.name, (v3.useMemo(function()
        local v24 = {};
        for _, v26 in v23, nil, nil do
            local v27 = {
                pageSize = v17
            };
            if v26.name == v12.CONTEXTUAL_RECOMMENDATIONS_HOME_CONFIG_SECTION_NAME then
                v27 = v1.Dictionary.join(v27, {
                    assetsInCameraVicinity = v19.assetsInCameraVicinity,
                    assetsInCameraViewport = v19.assetsInCameraViewport
                });
            end;
            table.insert(v24, {
                name = v26.name,
                fetchArgs = v27
            });
        end;
        return v24;
    end, {
        v23,
        v19.assetsInCameraVicinity,
        v19.assetsInCameraViewport
    })));
    return (v3.useMemo(function()
        local v29 = {};
        if v18 then
            for _, v31 in v18.sections, nil, nil do
                table.insert(v29, {
                    Section = v31,
                    ResultsState = v28[v31.name]
                });
            end;
        end;
        return v29;
    end, {
        v18,
        v28
    }));
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v2 = require(l_script_FirstAncestor_0.Packages.React);
local v3 = require(l_script_FirstAncestor_0.Packages.ReactSceneUnderstanding);
local v4 = require(l_script_FirstAncestor_0.Core.Util.findFirstAncestorSourceAsset);
local l_useCallback_0 = v2.useCallback;
local l_useMemo_0 = v2.useMemo;
local function v14(v7, v8)
    local v9 = {};
    for _, v11 in v7, nil, nil do
        local l_status_0, l_result_0 = pcall(function()
            return v11[v8];
        end);
        if l_status_0 then
            table.insert(v9, l_result_0);
        end;
    end;
    return v9;
end;
return function()
    local v15 = v3.useAssetsInView();
    local v16 = v3.useAssetsInRange();
    local v19 = l_useCallback_0(function(v17)
        return v1.List.filter(v17, function(v18)
            return v4(v18) == nil;
        end);
    end, {});
    local v20 = l_useMemo_0(function()
        return (v14(v19(v15), "SourceAssetId"));
    end, {
        v15
    });
    local v21 = l_useMemo_0(function()
        return (v14(v19(v16), "SourceAssetId"));
    end, {
        v16
    });
    return (l_useMemo_0(function()
        return {
            assetsInCameraViewport = v20,
            assetsInCameraVicinity = v21
        };
    end, {
        v20,
        v21
    }));
end;


local v0 = require(script:FindFirstAncestor("Toolbox").Packages.React);
local v1 = require(script.Parent.useStore);
return function()
    local v2 = v1();
    return (v0.useCallback(function(...)
        return v2:dispatch(...);
    end, {
        v2
    }));
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Core.ContextServices.NetworkContext);
local v3 = require(l_script_FirstAncestor_0.Core.Networking.Requests.GetHomeConfigurationRequest);
local v4 = require(l_script_FirstAncestor_0.Core.Hooks.useDispatch);
local v5 = require(l_script_FirstAncestor_0.Core.Hooks.useSelector);
local _ = require(l_script_FirstAncestor_0.Core.Types.HomeTypes);
return function(v7, v8)
    local l_networkInterface_0 = v2.use().networkInterface;
    local v10 = v4();
    local v12 = v5(function(v11)
        if not v11.homeConfiguration then
            return nil;
        else
            return v11.homeConfiguration[v7.Name];
        end;
    end);
    v1.useEffect(function()
        v10(v3(l_networkInterface_0, v7, v8));
    end, {
        v10,
        l_networkInterface_0,
        v7,
        v8
    });
    return v12;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Core.ContextServices.NetworkContext);
local v3 = require(l_script_FirstAncestor_0.Core.Networking.Requests.SelectCategoryRequest);
local v4 = require(l_script_FirstAncestor_0.Core.ContextServices.Settings);
local v5 = require(l_script_FirstAncestor_0.Core.Hooks.useDispatch);
local l_useCallback_0 = v1.useCallback;
return function()
    local v7 = v5();
    local l_networkInterface_0 = v2.use().networkInterface;
    local v9 = v4.use():get("Plugin");
    return (l_useCallback_0(function(v10)
        v7(v3(l_networkInterface_0, v9, v10));
    end, {
        v7,
        l_networkInterface_0
    }));
end;


local v0 = require(script:FindFirstAncestor("Toolbox").Packages.React);
return function(v1)
    local v2 = v0.useRef(nil);
    v0.useEffect(function()
        v2.current = v1;
    end);
    return v2.current;
end;


local v0 = require(script:FindFirstAncestor("Toolbox").Packages.React);
local v1 = require(script.Parent.useStore);
local function v4(v2, v3)
    return v2 == v3;
end;
useSelectorWithStore = function(v5, v6, v7)
    local _, v10 = v0.useReducer(function(v8)
        return v8 + 1;
    end, 0);
    local v11 = v0.useRef(nil);
    local v12 = v0.useRef(nil);
    local v13 = v0.useRef(nil);
    local v14 = v0.useRef(nil);
    local v15 = v7:getState();
    local v16 = nil;
    local l_status_0, l_result_0 = pcall(function()
        if (v5 == v12.current and v15 == v13.current) and not v11.current then
            v16 = v14.current;
            return ;
        else
            local v17 = v5(v15);
            if v14.current ~= nil and v6(v17, v14.current) then
                v16 = v14.current;
                return ;
            else
                v16 = v17;
                return ;
            end;
        end;
    end);
    if not l_status_0 then
        if v11.current then
            l_result_0 = string.format("%s\nThe error may be correlated with this previous error:\n%s\n\n", tostring(l_result_0), (tostring(v11.current)));
        end;
        error(l_result_0);
    end;
    v0.useLayoutEffect(function()
        v12.current = v5;
        v13.current = v15;
        v14.current = v16;
        v11.current = nil;
    end);
    v0.useLayoutEffect(function()
        local v24 = v7.changed:connect(function(v20)
            local l_status_1, l_result_1 = pcall(function()
                if v20 == v13.current then
                    return false;
                else
                    assert(v12.current, "latestSelector");
                    local v21 = v12.current(v20);
                    if not v6(v21, v14.current) then
                        v14.current = v21;
                        v13.current = v20;
                        return true;
                    else
                        return false;
                    end;
                end;
            end);
            if not l_status_1 then
                l_result_1 = l_result_1 or "Error";
                v11.current = l_result_1;
            end;
            if l_result_1 then
                v10(nil);
            end;
        end);
        local v25 = v7:getState();
        local l_status_2, l_result_2 = pcall(function()
            if v25 == v13.current then
                return false;
            else
                assert(v12.current, "latestSelector");
                local v26 = v12.current(v25);
                if not v6(v26, v14.current) then
                    v14.current = v26;
                    v13.current = v25;
                    return true;
                else
                    return false;
                end;
            end;
        end);
        if not l_status_2 then
            l_result_2 = l_result_2 or "Error";
            v11.current = l_result_2;
        end;
        if l_result_2 then
            v10(nil);
        end;
        return function()
            v24:disconnect();
        end;
    end, {
        v7
    });
    return v16;
end;
useSelector = function(v29, v30)
    return (useSelectorWithStore(v29, v30 or v4, (v1())));
end;
return useSelector;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local l_StoreContext_0 = require(l_script_FirstAncestor_0.Packages.RoactRodux).StoreContext;
return function()
    local v3 = v1.useContext(l_StoreContext_0);
    assert(v3, "useDispatch and useSelector can only be called from a descendant of the Rodux Store Provider");
    return v3;
end;


local v0 = require(script:FindFirstAncestor("Toolbox").Core.Util.AssetConfigConstants);
return function(v1)
    return {
        [v0.ASSET_STATUS.ReviewPending] = v1:getText("General", "StatusReviewPending"),
        [v0.ASSET_STATUS.Moderated] = v1:getText("General", "StatusModerated"),
        [v0.ASSET_STATUS.ReviewApproved] = v1:getText("General", "StatusReviewApproved"),
        [v0.ASSET_STATUS.OnSale] = v1:getText("General", "StatusOnSale"),
        [v0.ASSET_STATUS.OffSale] = v1:getText("General", "StatusOffSale"),
        [v0.ASSET_STATUS.DelayedRelease] = v1:getText("General", "StatusDelayedRelease"),
        [v0.ASSET_STATUS.Free] = v1:getText("General", "Free")
    };
end;


local v0 = require(script:FindFirstAncestor("Toolbox").Core.Flags.getFFlagToolboxAddNewUGCAssetTypes);
return function(v1)
    local v2 = {
        [Enum.AssetType.Model] = v1:getText("General", "AssetTypeModel"),
        [Enum.AssetType.Decal] = v1:getText("General", "AssetTypeDecal"),
        [Enum.AssetType.Mesh] = v1:getText("General", "AssetTypeMesh"),
        [Enum.AssetType.Audio] = v1:getText("General", "AssetTypeAudio"),
        [Enum.AssetType.Hat] = v1:getText("General", "AssetTypeHat"),
        [Enum.AssetType.TShirt] = v1:getText("General", "AssetTypeTeeShirt"),
        [Enum.AssetType.Shirt] = v1:getText("General", "AssetTypeShirt"),
        [Enum.AssetType.Pants] = v1:getText("General", "AssetTypePants"),
        [Enum.AssetType.Plugin] = v1:getText("General", "AssetTypePlugin"),
        [Enum.AssetType.HairAccessory] = v1:getText("General", "AssetTypeHairAccessory"),
        [Enum.AssetType.FaceAccessory] = v1:getText("General", "AssetTypeFaceAccessory"),
        [Enum.AssetType.NeckAccessory] = v1:getText("General", "AssetTypeNeckAccessory"),
        [Enum.AssetType.ShoulderAccessory] = v1:getText("General", "AssetTypeShoulderAccessory"),
        [Enum.AssetType.FrontAccessory] = v1:getText("General", "AssetTypeFrontAccessory"),
        [Enum.AssetType.BackAccessory] = v1:getText("General", "AssetTypeBackAccessory"),
        [Enum.AssetType.WaistAccessory] = v1:getText("General", "AssetTypeWaistAccessory"),
        [Enum.AssetType.TShirtAccessory] = v1:getText("General", "AssetTypeTShirtAccessory"),
        [Enum.AssetType.ShirtAccessory] = v1:getText("General", "AssetTypeShirtAccessory"),
        [Enum.AssetType.PantsAccessory] = v1:getText("General", "AssetTypePantsAccessory"),
        [Enum.AssetType.JacketAccessory] = v1:getText("General", "AssetTypeJacketAccessory"),
        [Enum.AssetType.SweaterAccessory] = v1:getText("General", "AssetTypeSweaterAccessory"),
        [Enum.AssetType.ShortsAccessory] = v1:getText("General", "AssetTypeShortsAccessory"),
        [Enum.AssetType.LeftShoeAccessory] = v1:getText("General", "AssetTypeLeftShoeAccessory"),
        [Enum.AssetType.RightShoeAccessory] = v1:getText("General", "AssetTypeRightShoeAccessory"),
        [Enum.AssetType.DressSkirtAccessory] = v1:getText("General", "AssetTypeDressSkirtAccessory")
    };
    if v0() then
        v2[Enum.AssetType.Torso] = v1:getText("General", "AssetTypeTorso");
        v2[Enum.AssetType.RightArm] = v1:getText("General", "AssetTypeRightArm");
        v2[Enum.AssetType.LeftArm] = v1:getText("General", "AssetTypeLeftArm");
        v2[Enum.AssetType.LeftLeg] = v1:getText("General", "AssetTypeLeftLeg");
        v2[Enum.AssetType.RightLeg] = v1:getText("General", "AssetTypeRightLeg");
        v2[Enum.AssetType.DynamicHead] = v1:getText("General", "AssetTypeDynamicHead");
        v2[Enum.AssetType.EyebrowAccessory] = v1:getText("General", "AssetTypeEyebrowAccessory");
        v2[Enum.AssetType.EyelashAccessory] = v1:getText("General", "AssetTypeEyelashAccessory");
    end;
    return v2;
end;


local v0 = require(script:FindFirstAncestor("Toolbox").Core.Localization.getLocalizedCategoryMap);
return function(v1, v2)
    local v3 = {};
    local v4 = v0(v1);
    for _, v6 in v2, nil, nil do
        local v7 = table.clone(v6);
        v7.name = v4[v6.name];
        table.insert(v3, v7);
    end;
    return v3;
end;


return function(v0)
    return {
        FreeModels = v0:getText("General", "CategoryModels"),
        FreeDecals = v0:getText("General", "CategoryDecals"),
        FreeMeshes = v0:getText("General", "CategoryMeshes"),
        FreeAudio = v0:getText("General", "CategoryAudio"),
        FreeFonts = v0:getText("General", "CategoryFonts"),
        PaidPlugins = v0:getText("General", "CategoryPaidPlugins"),
        FreeVideo = v0:getText("General", "CategoryVideos"),
        MyModels = v0:getText("General", "CategoryMyModels"),
        MyDecals = v0:getText("General", "CategoryMyDecals"),
        MyMeshes = v0:getText("General", "CategoryMyMeshes"),
        MyAudio = v0:getText("General", "CategoryMyAudio"),
        MyPlugins = v0:getText("General", "CategoryMyPlugins"),
        MyPackages = v0:getText("General", "CategoryMyPackages"),
        MyVideo = v0:getText("General", "CategoryMyVideos"),
        MyAnimations = v0:getText("General", "CategoryMyAnimations"),
        MyFonts = v0:getText("General", "CategoryMyFonts"),
        RecentModels = v0:getText("General", "CategoryRecentModels"),
        RecentDecals = v0:getText("General", "CategoryRecentDecals"),
        RecentMeshes = v0:getText("General", "CategoryRecentMeshes"),
        RecentAudio = v0:getText("General", "CategoryRecentAudio"),
        RecentVideo = v0:getText("General", "CategoryRecentVideos"),
        RecentAnimations = v0:getText("General", "CategoryRecentAnimations"),
        RecentFonts = v0:getText("General", "CategoryRecentFonts"),
        GroupModels = v0:getText("General", "CategoryGroupModels"),
        GroupDecals = v0:getText("General", "CategoryGroupDecals"),
        GroupMeshes = v0:getText("General", "CategoryGroupMeshes"),
        GroupAudio = v0:getText("General", "CategoryGroupAudio"),
        GroupPackages = v0:getText("General", "CategoryGroupPackages"),
        GroupPlugins = v0:getText("General", "CategoryGroupPlugins"),
        CreationsDevelopmentSectionDivider = v0:getText("General", "CategoryCreationsDevelopmentSectionDivider"),
        CreationsModels = v0:getText("General", "CategoryCreationsModels"),
        CreationsDecals = v0:getText("General", "CategoryCreationsDecals"),
        CreationsAudio = v0:getText("General", "CategoryCreationsAudio"),
        CreationsMeshes = v0:getText("General", "CategoryCreationsMeshes"),
        CreationsPlugins = v0:getText("General", "CategoryCreationsPlugins"),
        CreationsAnimations = v0:getText("General", "CategoryCreationsAnimations"),
        CreationsGroupModels = v0:getText("General", "CategoryGroupModels"),
        CreationsGroupDecals = v0:getText("General", "CategoryGroupDecals"),
        CreationsGroupMeshes = v0:getText("General", "CategoryGroupMeshes"),
        CreationsGroupAudio = v0:getText("General", "CategoryGroupAudio"),
        CreationsGroupPackages = v0:getText("General", "CategoryGroupPackages"),
        CreationsGroupPlugins = v0:getText("General", "CategoryGroupPlugins"),
        CreationsGroupAnimations = v0:getText("General", "CategoryGroupAnimations"),
        CreationsCatalogSectionDivider = v0:getText("General", "CategoryCreationsCatalogSectionDivider"),
        CreationsHats = v0:getText("General", "CategoryCreationsHats"),
        CreationsTeeShirts = v0:getText("General", "CategoryCreationsTeeShirts"),
        CreationsShirts = v0:getText("General", "CategoryCreationsShirts"),
        CreationsPants = v0:getText("General", "CategoryCreationsPants"),
        CreationsHair = v0:getText("General", "CategoryCreationsHair"),
        CreationsFaceAccessories = v0:getText("General", "CategoryCreationsFaceAccessory"),
        CreationsNeckAccessories = v0:getText("General", "CategoryCreationsNeckAccessory"),
        CreationsShoulderAccessories = v0:getText("General", "CategoryCreationsShoulderAccessory"),
        CreationsFrontAccessories = v0:getText("General", "CategoryCreationsFrontAccessory"),
        CreationsBackAccessories = v0:getText("General", "CategoryCreationsBackAccessory"),
        CreationsWaistAccessories = v0:getText("General", "CategoryCreationsWaistAccessory"),
        CreationsTShirtAccessories = v0:getText("General", "CategoryCreationsTShirtAccessory"),
        CreationsShirtAccessories = v0:getText("General", "CategoryCreationsShirtAccessory"),
        CreationsPantsAccessories = v0:getText("General", "CategoryCreationsPantsAccessory"),
        CreationsJacketAccessories = v0:getText("General", "CategoryCreationsJacketAccessory"),
        CreationsSweaterAccessories = v0:getText("General", "CategoryCreationsSweaterAccessory"),
        CreationsShortsAccessories = v0:getText("General", "CategoryCreationsShortsAccessory"),
        CreationsLeftShoeAccessories = v0:getText("General", "CategoryCreationsLeftShoeAccessory"),
        CreationsRightShoeAccessories = v0:getText("General", "CategoryCreationsRightShoeAccessory"),
        CreationsDressSkirtAccessories = v0:getText("General", "CategoryCreationsDressSkirtAccessory"),
        CreationsGroupHats = v0:getText("General", "CategoryCreationsGroupHats"),
        CreationsGroupHair = v0:getText("General", "CategoryCreationsGroupHair"),
        CreationsGroupFaceAccessories = v0:getText("General", "CategoryCreationsGroupFaceAccessory"),
        CreationsGroupNeckAccessories = v0:getText("General", "CategoryCreationsGroupNeckAccessory"),
        CreationsGroupShoulderAccessories = v0:getText("General", "CategoryCreationsGroupShoulderAccessory"),
        CreationsGroupFrontAccessories = v0:getText("General", "CategoryCreationsGroupFrontAccessory"),
        CreationsGroupBackAccessories = v0:getText("General", "CategoryCreationsGroupBackAccessory"),
        CreationsGroupWaistAccessories = v0:getText("General", "CategoryCreationsGroupWaistAccessory"),
        CreationsGroupTShirtAccessories = v0:getText("General", "CategoryCreationsGroupTShirtAccessory"),
        CreationsGroupShirtAccessories = v0:getText("General", "CategoryCreationsGroupShirtAccessory"),
        CreationsGroupPantsAccessories = v0:getText("General", "CategoryCreationsGroupPantsAccessory"),
        CreationsGroupJacketAccessories = v0:getText("General", "CategoryCreationsGroupJacketAccessory"),
        CreationsGroupSweaterAccessories = v0:getText("General", "CategoryCreationsGroupSweaterAccessory"),
        CreationsGroupShortsAccessories = v0:getText("General", "CategoryCreationsGroupShortsAccessory"),
        CreationsGroupLeftShoeAccessories = v0:getText("General", "CategoryCreationsGroupLeftShoeAccessory"),
        CreationsGroupRightShoeAccessories = v0:getText("General", "CategoryCreationsGroupRightShoeAccessory"),
        CreationsGroupDressSkirtAccessories = v0:getText("General", "CategoryCreationsGroupDressSkirtAccessory")
    };
end;


local v0 = require(script:FindFirstAncestor("Toolbox").Core.Util.AssetConfigConstants);
return function(v1)
    return {
        [v0.SIDE_TABS.Sales] = v1:getText("General", "SideTabSales"),
        [v0.SIDE_TABS.Versions] = v1:getText("General", "SideTabVersions"),
        [v0.SIDE_TABS.General] = v1:getText("General", "SideTabGeneral"),
        [v0.SIDE_TABS.Permissions] = v1:getText("General", "SideTabPermissions")
    };
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local _ = require(l_Packages_0.Framework);
local v3 = require(l_Packages_0.Dash);
local v4 = require(l_Parent_0.Core.Util.AssetConfigConstants);
local v5 = require(l_Parent_0.Core.Util.FiatUtil);
local _ = require(l_Parent_0.Core.Types.MarketplaceFiatServiceTypes);
itemsDetailsToCreationsDistributionStatus = function(v7)
    if not v7.fiatProduct then
        if not v7.product then
            return v4.ASSET_STATUS.OffSale;
        elseif not v7.product.isForSaleOrIsPublicDomain then
            return v4.ASSET_STATUS.OffSale;
        elseif typeof(v7.product.price) == "number" and v7.product.price > 0 then
            return v4.ASSET_STATUS.OnSale;
        else
            return v4.ASSET_STATUS.Free;
        end;
    else
        local l_purchasable_0 = v7.fiatProduct.purchasable;
        local l_purchasePrice_0 = v7.fiatProduct.purchasePrice;
        if l_purchasable_0 and l_purchasePrice_0 then
            if not v5.isFree(l_purchasePrice_0) then
                return v4.ASSET_STATUS.OnSale;
            else
                return v4.ASSET_STATUS.Free;
            end;
        else
            return v4.ASSET_STATUS.OffSale;
        end;
    end;
end;
local v10 = {
    new = function()
        return {};
    end
};
v10.fromItemDetailsRequest = function(v11)
    local v12 = v10.new();
    if v11.asset then
        v12.Asset = {
            Id = v11.asset.id,
            Name = v11.asset.name,
            TypeId = v11.asset.typeId,
            AssetGenres = v11.asset.assetGenres,
            AssetSubTypes = v11.asset.assetSubTypes,
            IsEndorsed = v11.asset.isEndorsed,
            Description = v11.asset.description,
            Duration = v11.asset.duration,
            Created = v11.asset.createdUtc,
            Updated = v11.asset.updatedUtc,
            HasScripts = v11.asset.hasScripts,
            CreatingUniverseId = v11.asset.creatingUniverseId,
            Status = itemsDetailsToCreationsDistributionStatus(v11)
        };
        if v11.asset.audioDetails then
            v12.AudioDetails = {
                Type = v11.asset.audioDetails.audioType,
                Artist = v11.asset.audioDetails.artist,
                MusicAlbum = v11.asset.audioDetails.musicAlbum,
                MusicGenre = v11.asset.audioDetails.musicGenre,
                SoundEffectCategory = v11.asset.audioDetails.soundEffectCategory,
                SoundEffectSubcategory = v11.asset.audioDetails.soundEffectSubcategory
            };
        end;
    end;
    if v11.creator then
        v12.Creator = {
            Id = v11.creator.id,
            Name = v11.creator.name,
            Type = v11.creator.type,
            IsVerifiedCreator = v11.creator.isVerifiedCreator
        };
    end;
    if v11.product then
        v12.Product = {
            ProductId = v11.product.productId,
            Price = v11.product.price
        };
    end;
    if v11.fiatProduct then
        v12.FiatProduct = {
            PurchasePrice = v11.fiatProduct.purchasePrice,
            Purchasable = v11.fiatProduct.purchasable
        };
    end;
    if v11.thumbnail then
        v12.Thumbnail = {
            Final = v11.thumbnail.final,
            Url = v11.thumbnail.url,
            RetryUrl = v11.thumbnail.retryUrl,
            UserId = v11.thumbnail.userId,
            EndpointType = v11.thumbnail.endpointType
        };
    end;
    if v11.voting then
        v12.Voting = {
            ShowVotes = v11.voting.showVotes,
            UpVotes = v11.voting.upVotes,
            DownVotes = v11.voting.downVotes,
            VoteCount = v11.voting.voteCount,
            UpVotePercent = v11.voting.upVotePercent,
            CanVote = v11.voting.canVote,
            UserVote = v11.voting.userVote,
            HasVoted = v11.voting.hasVoted,
            ReasonForNotVoteable = v11.voting.reasonForNotVoteable
        };
    end;
    return v12;
end;
v10.AddContextToItemDetails = function(v13, v14)
    v13.Context = v3.join(v13.Context, v14);
    return v13;
end;
v10.fromCreationsDetails = function(v15, v16, v17, v18)
    local v19 = v10.new();
    v19.Asset = {
        Description = v15.description,
        Id = v15.assetId,
        Name = v15.name,
        TypeId = v16 and v16.Value,
        AssetGenres = {},
        Status = v15.status
    };
    v19.Creator = {
        Id = v15.creatorTargetId,
        Name = v17,
        Type = v18
    };
    return v19;
end;
return v10;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
local v2 = require(l_Parent_0.Core.Types.RequestReason);
local l_showRobloxCreatedAssets_0 = require(l_Parent_0.Core.Util.ToolboxUtilities).showRobloxCreatedAssets;
local v4 = require(l_Parent_0.Core.Networking.Requests.GetToolboxManageableGroupsRequest);
local v5 = require(l_Parent_0.Core.Networking.Requests.UpdatePageInfoAndSendRequest);
local v6 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxContentManagementCombineTabs);
local v7 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxEnableSearchOptionsRefactor);
local v8 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxAddCreationsFilterToListView);
local v9 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxExcludeGroupCreations);
local v10 = require(l_Parent_0.Core.Types.Category);
local v11 = require(l_Parent_0.Core.Actions.StopAllSounds);
return function(v12, v13, _, v15, v16, v17)
    return function(v18)
        local v19 = v10.getCategories(v13, v18:getState().roles, if not v6() then nil else v17);
        local l_None_0 = v1.None;
        if l_showRobloxCreatedAssets_0() then
            l_None_0 = v16.creator or v1.None;
        end;
        local _ = nil;
        v18:dispatch(v5(v12, v15, {
            audioSearchInfo = v1.None,
            additionalAudioSearchInfo = v1.None,
            creator = l_None_0,
            currentTab = v13,
            categories = v19,
            requestReason = v2.ChangeTabs,
            categoryName = v16.categoryName,
            excludeGroupCreations = not not v9() or not v8() and nil,
            searchTerm = v16.searchTerm,
            sortIndex = v16.sortIndex,
            groupIndex = v16.groupIndex,
            targetPage = 1,
            currentPage = 0,
            selectedBackgroundIndex = v16.selectedBackgroundIndex,
            includeUnverifiedCreators = if not v7() then nil else false,
            creatorTargetIds = if not v7() then nil else v1.None,
            groupTargetIds = if not v7() then nil else v1.None,
            uiSortIntent = if not v7() then nil else v1.None,
            queryParams = v1.None,
            sortDirection = v1.None
        }));
        local v22 = true;
        if v13 ~= v10.INVENTORY_KEY then
            v22 = v13 == v10.CREATIONS_KEY;
        end;
        if v22 then
            v18:dispatch(v4(v12));
        end;
        v18:dispatch(v11());
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Core.Actions.NetworkError);
local v2 = require(l_Parent_0.Core.Actions.UploadResult);
local v3 = require(l_Parent_0.Core.Util.DebugFlags);
local l_Promise_0 = require(l_Parent_0.Packages.Framework).Util.Promise;
return function(v5, v6, v7, v8)
    return function(v9)
        local function v10()
            v9:dispatch(v2(true));
        end;
        local function v12(_)
            if v3.shouldDebugWarnings() then
                warn("Lua toolbox: Could not configure tags");
            end;
            v9:dispatch(v1("Could not configure tags"));
            v9:dispatch(v2(false));
        end;
        local v13 = {};
        for _, v15 in pairs(v7) do
            v13[v15.tag.tagId] = true;
        end;
        local v16 = {};
        local v17 = {};
        if v8 then
            for _, v19 in pairs(v8) do
                v16[v19.tagId] = true;
                if not v13[v19.tagId] then
                    table.insert(v17, v19.tagId);
                end;
            end;
        end;
        local v20 = {};
        for _, v22 in pairs(v7) do
            if not v16[v22.tag.tagId] then
                table.insert(v20, v22.id);
            end;
        end;
        local v23 = {
            l_Promise_0.resolve()
        };
        for _, v25 in pairs(v20) do
            table.insert(v23, v5:deleteAssetItemTag(v25));
        end;
        l_Promise_0.all(unpack(v23)):andThen(function()
            local v26 = {
                l_Promise_0.resolve()
            };
            for _, v28 in pairs(v17) do
                table.insert(v26, v5:addAssetTag(v6, v28));
            end;
            l_Promise_0.all(unpack(v26)):andThen(v10, v12);
        end, v12);
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Core.Util.AssetConfigConstants);
local v2 = require(l_Parent_0.Core.Actions.NetworkError);
local v3 = require(l_Parent_0.Core.Actions.UploadResult);
local v4 = require(l_Parent_0.Core.Util.DebugFlags);
local v5 = require(l_Parent_0.Core.Networking.Requests.ConfigureItemTagsRequest);
return function(v6, v7, v8, v9, v10, v11, v12, v13)
    return function(v14)
        local function v16(_)
            v14:dispatch(v5(v6, v7, v12, v13));
        end;
        local function v18(v17)
            if v4.shouldDebugWarnings() then
                warn("Lua toolbox: Could not configure sales");
            end;
            v14:dispatch(v2(v17));
            v14:dispatch(v3(false));
        end;
        local v19 = v9 == v1.ASSET_STATUS.OnSale;
        local v20 = not not v19 and v1.ASSET_STATUS.OnSale or v1.ASSET_STATUS.OffSale;
        local v21 = not not v19 and v11 or nil;
        if v8 ~= v9 then
            v6:configureSales(v7, v20, v21):andThen(v16, v18);
            return ;
        elseif v8 == v1.ASSET_STATUS.OnSale and v10 ~= v11 then
            v6:updateSales(v7, v21):andThen(v16, v18);
            return ;
        else
            v14:dispatch(v5(v6, v7, v12, v13));
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Core.Util.DebugFlags);
local v2 = require(l_Parent_0.Core.Util.getUserId);
local v3 = require(l_Parent_0.Core.Actions.NetworkError);
local v4 = require(l_Parent_0.Core.Actions.SetCanManageAsset);
return function(v5, v6)
    return function(v7)
        if (v7:getState().assets.manageableAssets or {})[tostring(v6)] ~= nil then
            return ;
        else
            return v5:getHasEditPermissionForAsset(v6, (v2())):andThen(function(v8)
                v7:dispatch(v4(v8, v6));
            end, function(v9)
                if v1.shouldDebugWarnings() then
                    warn("Could not get canManage status");
                end;
                v7:dispatch(v3(v9));
            end);
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Actions_0 = l_Parent_0.Core.Actions;
local v2 = require(l_Actions_0.NetworkError);
local v3 = require(l_Actions_0.SetCachedCreatorInfo);
local v4 = require(l_Parent_0.Core.Util.CreatorInfoHelper);
return function(v5, v6, v7)
    return function(v8)
        return v5:getCreatorInfo(v6, v7):andThen(function(v9)
            v8:dispatch(v3({
                Id = v6,
                Name = v4.getNameFromResult(v9, v7),
                Type = v7
            }));
        end, function(v10)
            v8:dispatch(v2(v10));
        end);
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Util_0 = l_Parent_0.Core.Util;
local v2 = require(l_Util_0.PreviewModelGetter);
local v3 = require(l_Util_0.DebugFlags);
local v4 = require(l_Parent_0.Core.Actions.SetPreviewModel);
local l_getFFlagModelPreviewThumbnailFallback_0 = require(l_Parent_0.Packages.Framework).SharedFlags.getFFlagModelPreviewThumbnailFallback;
return function(v6, v7)
    return function(v8)
        if not l_getFFlagModelPreviewThumbnailFallback_0() then
            return v2(v6, v7):andThen(function(v9)
                v8:dispatch(v4(v9));
            end);
        else
            return v2(v6, v7):andThen(function(v10)
                v8:dispatch(v4(v10));
            end, function(v11)
                if v3.shouldDebugWarnings() then
                    warn((tostring(v11)));
                end;
            end);
        end;
    end;
end;


local l_Actions_0 = script.Parent.Parent.Parent.Parent.Core.Actions;
local v1 = require(l_Actions_0.AddChange);
local v2 = require(l_Actions_0.ClearChange);
return function(v3, v4, v5, v6)
    return function(v7)
        local _ = nil;
        if not if not v6 then v4 == v5 else v6(v4, v5) then
            v7:dispatch(v1(v3, v5));
            return ;
        else
            v7:dispatch(v2(v3));
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Core.Types.RequestReason);
local v2 = require(l_Parent_0.Core.Networking.Requests.UpdatePageInfoAndSendRequest);
return function(v3, v4)
    return function(v5)
        local l_assets_0 = v5:getState().assets;
        if not l_assets_0.isLoading and not l_assets_0.hasReachedBottom then
            v5:dispatch(v2(v3, v4, {
                targetPage = (v5:getState().pageInfo.currentPage or 0) + 1,
                requestReason = v1.NextPage
            }));
            return ;
        else
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Core.Util.DebugFlags);
local v2 = require(l_Parent_0.Core.Actions.NetworkError);
local l_webKeys_0 = require(l_Parent_0.Core.Util.Permissions.Constants).webKeys;
return function(v4, v5)
    return function(v6)
        return v4:grantAssetPermissions(v5, {
            [l_webKeys_0.SubjectType] = l_webKeys_0.All,
            [l_webKeys_0.SubjectId] = "",
            [l_webKeys_0.Action] = l_webKeys_0.UseAction
        }):andThen(function()
        end, function(v7)
            if v1.shouldDebugWarnings() then
                warn("Patch make asset public unsuccessful");
            end;
            v6:dispatch(v2(v7));
        end);
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Core.Util.Analytics.Analytics);
local v2 = require(l_script_FirstAncestor_0.Core.Actions.NetworkError);
local l_ToolboxSendPackageVersionNoteTelemetry_0 = game:GetFastFlag("ToolboxSendPackageVersionNoteTelemetry");
return function(v4, v5, v6, v7)
    return function(v8)
        if not l_ToolboxSendPackageVersionNoteTelemetry_0 then
            return v4:postVersionDescription(v5, v6, v7);
        else
            return v4:postVersionDescription(v5, v6, v7):andThen(function(_)
                v1.onPackageNoteCreated(v5, v6, v7);
            end, function(v10)
                v8:dispatch(v2(v10));
            end);
        end;
    end;
end;


local _ = game:GetService("HttpService");
local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_0.Core.Components.AssetConfiguration.Permissions.PermissionsConstants);
local v3 = require(l_Parent_0.Core.Util.Permissions.KeyConverter);
local l_webKeys_0 = require(l_Parent_0.Core.Util.Permissions.Constants).webKeys;
local v5 = require(l_Parent_0.Core.Actions.ClearChange);
local v6 = require(l_Parent_0.Core.Actions.NetworkError);
local v7 = require(l_Parent_0.Core.Util.Analytics.Analytics);
local l_Promise_0 = require(l_Parent_0.Packages.Framework).Util.Promise;
local l_NewPackageAnalyticsWithRefactor2_0 = game:GetFastFlag("NewPackageAnalyticsWithRefactor2");
local v10 = v3.getWebAction(v2.NoAccessKey);
local function v28(v11, v12, v13)
    local v14 = {
        [v2.GroupSubjectKey] = {}
    };
    if v11 and next(v11) ~= nil then
        for v15, _ in pairs(v11) do
            v14[v15] = {};
        end;
        for v17, v18 in pairs(v11) do
            for v19, v20 in pairs(v18) do
                v14[v17][v19] = {
                    Action = v20[v2.ActionKey]
                };
            end;
        end;
    end;
    if v12 and next(v12) ~= nil then
        for v21, v22 in pairs(v12) do
            v14[v2.GroupSubjectKey][v21] = v14[v2.GroupSubjectKey][v21] or {};
            v14[v2.GroupSubjectKey][v21] = {
                Action = v22.Action
            };
        end;
    end;
    local v23 = {};
    for v24, v25 in pairs(v14) do
        for v26, v27 in pairs(v25) do
            table.insert(v23, {
                [l_webKeys_0.SubjectType] = v3.getWebSubjectType(v24),
                [l_webKeys_0.SubjectId] = v26,
                [l_webKeys_0.Action] = v3.getWebAction(v27.Action),
                [l_webKeys_0.UpToVersion] = v13
            });
        end;
    end;
    return v23;
end;
local function v36(v29, v30)
    local v31 = v28(v29, v30);
    local v32 = {
        [l_webKeys_0.Requests] = {}
    };
    local v33 = v32[l_webKeys_0.Requests];
    for _, v35 in pairs(v31) do
        if v35[l_webKeys_0.Action] ~= v10 then
            table.insert(v33, {
                [l_webKeys_0.SubjectType] = v3.getAssetPermissionSubjectType(v35[l_webKeys_0.SubjectType]),
                [l_webKeys_0.SubjectId] = v35[l_webKeys_0.SubjectId],
                [l_webKeys_0.Action] = v3.getAssetPermissionAction(v35[l_webKeys_0.Action])
            });
        end;
    end;
    return v32;
end;
local function v49(v37, v38, v39)
    local v40 = v28(v37, v38);
    local v41 = v28(v39, v38);
    local v42 = {};
    local v43 = {
        [l_webKeys_0.Requests] = {}
    };
    local v44 = v43[l_webKeys_0.Requests];
    for _, v46 in pairs(v41) do
        v42[v46[l_webKeys_0.SubjectId]] = v3.getAssetPermissionAction(v46[l_webKeys_0.Action]);
    end;
    for _, v48 in pairs(v40) do
        if v48[l_webKeys_0.Action] == v10 then
            table.insert(v44, {
                [l_webKeys_0.SubjectType] = v3.getAssetPermissionSubjectType(v48[l_webKeys_0.SubjectType]),
                [l_webKeys_0.SubjectId] = v48[l_webKeys_0.SubjectId],
                [l_webKeys_0.Action] = v42[v48[l_webKeys_0.SubjectId]]
            });
        end;
    end;
    return v43;
end;
return function(v50, v51, _)
    return function(v53)
        local l_changed_0 = v53:getState().changed;
        if l_changed_0 and next(l_changed_0) ~= nil then
            local l_originalCollaborators_0 = v53:getState().originalCollaborators;
            local v56 = v36(l_changed_0.permissions, l_changed_0.groupMetadata);
            local v57 = v49(l_changed_0.permissions, l_changed_0.groupMetadata, l_originalCollaborators_0);
            return l_Promise_0.all({
                next(v56[l_webKeys_0.Requests]) == nil and l_Promise_0.resolve(true) or v50:grantAssetPermissions(v51, v56),
                next(v57[l_webKeys_0.Requests]) == nil and l_Promise_0.resolve(true) or v50:revokeAssetPermissions(v51, v57)
            }):andThen(function(v58)
                if l_NewPackageAnalyticsWithRefactor2_0 then
                    for _, v60 in pairs(v58) do
                        if v60.url ~= nil then
                            v7.sendResultToKibana(v60);
                        end;
                    end;
                end;
                v53:dispatch(v5("permissions"));
                v53:dispatch(v5("groupMetadata"));
            end, function(v61)
                if l_NewPackageAnalyticsWithRefactor2_0 then
                    v7.sendResultToKibana(v61);
                end;
                v53:dispatch(v6(v61));
            end);
        else
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
local v2 = require(l_Parent_0.Core.Util.Constants);
local v3 = require(l_Parent_0.Core.Types.Sort);
local v4 = require(l_Parent_0.Core.Types.RequestReason);
local v5 = require(l_Parent_0.Core.Types.AutocorrectTypes);
local v6 = require(l_Parent_0.Core.Networking.Requests.UpdatePageInfoAndSendRequest);
local v7 = require(l_Parent_0.Core.Actions.StopAllSounds);
local v8 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxAddAutocorrect);
return function(v9, v10, v11, v12, v13, v14, v15, v16)
    return function(v17)
        v17:dispatch(v7());
        local l_pageInfo_0 = v17:getState().pageInfo;
        v17:dispatch(v6(v9, v10, {
            searchTerm = v11,
            sortIndex = not not v3.canSort(v11, v12 or l_pageInfo_0.categoryName) and l_pageInfo_0.sortIndex or 1,
            sortDirection = v1.None,
            uiSortIntent = v1.None,
            categoryName = v12,
            targetPage = 1,
            currentPage = 0,
            requestReason = v4.StartSearch,
            isTopKeyword = v13 or false,
            searchSource = if not v11 then nil else v2.SEARCH_SOURCE.KEYWORD,
            querySource = if not not v14 and v8() then v14 else v5.QuerySource.OriginalUserQuery,
            originalUserQuery = if not not v15 and v8() then v15 else nil,
            originalCorrection = if not not v16 and v8() then v16 else nil,
            queryParams = v1.None
        }));
    end;
end;


local v0 = require(script.Parent.Parent.Parent.Parent.Core.Actions.ResumePreviewSound);
return function()
    return function(v1)
        v1:dispatch(v0());
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Core.Types.Category);
local v2 = require(l_Parent_0.Core.Types.Sort);
local v3 = require(l_Parent_0.Core.Types.RequestReason);
local v4 = require(l_Parent_0.Packages.Cryo);
local v5 = require(l_Parent_0.Core.Util.PageInfoHelper);
local v6 = require(l_Parent_0.Core.Networking.Requests.UpdatePageInfoAndSendRequest);
local v7 = require(l_Parent_0.Core.Actions.StopAllSounds);
local l_showRobloxCreatedAssets_0 = require(l_Parent_0.Core.Util.ToolboxUtilities).showRobloxCreatedAssets;
return function(v9, v10, v11)
    return function(v12)
        v12:dispatch(v7());
        local v13 = v2.getDefaultSortForCategory(v11);
        local v14 = nil;
        if l_showRobloxCreatedAssets_0() then
            v14 = if v5.getCurrentTab(v12:getState().pageInfo) == v1.MARKETPLACE_KEY and v1.categoryIsVideo(v11) then v1.CREATOR_ROBLOX_DEVELOP_API else v1.CREATOR_ROBLOX;
        end;
        v12:dispatch(v6(v9, v10, {
            audioSearchInfo = v4.None,
            additionalAudioSearchInfo = v4.None,
            categoryName = v11,
            creator = v14,
            searchTerm = "",
            sortIndex = v13,
            targetPage = 1,
            currentPage = 0,
            requestReason = v3.ChangeCategory,
            queryParams = v4.None
        }));
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Core.Types.Sort);
local v2 = require(l_Parent_0.Core.Types.RequestReason);
local v3 = require(l_Parent_0.Core.Networking.Requests.UpdatePageInfoAndSendRequest);
local v4 = require(l_Parent_0.Core.Actions.StopAllSounds);
return function(v5, v6)
    return function(v7)
        v7:dispatch(v4());
        v7:dispatch(v3(v5, nil, {
            searchTerm = "",
            sortIndex = v1.getDefaultSortForGroups(v7:getState().pageInfo),
            groupIndex = v6,
            targetPage = 1,
            currentPage = 0,
            requestReason = v2.ChangeGroup
        }));
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Core.Types.RequestReason);
local v2 = require(l_Parent_0.Core.Networking.Requests.UpdatePageInfoAndSendRequest);
return function(v3, v4, v5)
    return function(v6)
        v6:dispatch(v2(v3, v4, {
            sortIndex = v5,
            targetPage = 1,
            currentPage = 0,
            requestReason = v1.ChangeSort
        }));
    end;
end;


local l_Actions_0 = script.Parent.Parent.Parent.Parent.Core.Actions;
local v1 = require(l_Actions_0.CreateFavorite);
local v2 = require(l_Actions_0.DeleteFavorite);
local v3 = require(l_Actions_0.NetworkError);
return function(v4, v5, v6, v7)
    return function(v8)
        if not v7 then
            return v4:postFavorite(v5, v6):andThen(function(_)
                v8:dispatch(v1(v6));
            end, function(v10)
                v8:dispatch(v3(v10));
            end);
        else
            return v4:deleteFavorite(v5, v6):andThen(function(_)
                v8:dispatch(v2(v6));
            end, function(v12)
                v8:dispatch(v3(v12));
            end);
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Actions_0 = l_Parent_0.Core.Actions;
local v2 = require(l_Actions_0.SetAssetConfigTab);
local v3 = require(l_Actions_0.ClearChange);
local v4 = require(l_Parent_0.Core.Types.ConfigTypes);
local v5 = require(l_Parent_0.Core.Util.AssetConfigConstants);
return function(v6)
    return function(v7)
        if not v4:isOverride(v6) then
            v7:dispatch(v2(v4:getOverrideTab()));
            return ;
        else
            v7:dispatch(v2(v4:getGeneralTab()));
            v7:dispatch(v3(v5.OVERRIDE_ASSET_ID));
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Util_0 = l_Parent_0.Core.Util;
local _ = require(l_Parent_0.Core.Util.DebugFlags);
local v3 = require(l_Util_0.AssetConfigConstants);
local _ = require(l_Util_0.AssetConfigUtil);
local l_Actions_0 = l_Parent_0.Core.Actions;
local v6 = require(l_Actions_0.SetCurrentScreen);
local v7 = require(l_Actions_0.UploadResult);
local v8 = require(l_Parent_0.Core.Networking.Requests.UpdateAssetMediaDataRequest);
local l_Packages_0 = l_Parent_0.Packages;
local _ = require(l_Packages_0.Framework);
local l_includes_0 = require(l_Packages_0.Dash).includes;
return function(v12)
    return function(v13)
        local v14 = true;
        local v15 = {
            thumbnail = false,
            assetMedia = false
        };
        local _ = v13:getState().allowedAssetTypesForRelease;
        local function _(v17)
            if v17 ~= nil then
                v15[v17] = true;
            end;
            if not l_includes_0(v15, false) then
                v13:dispatch(v6(v3.SCREENS.UPLOADING_ASSET));
                v13:dispatch(v7(v14));
            end;
        end;
        local function v19()
            v15.thumbnail = true;
            if not l_includes_0(v15, false) then
                v13:dispatch(v6(v3.SCREENS.UPLOADING_ASSET));
                v13:dispatch(v7(v14));
            end;
        end;
        local function v21(v20)
            if v20 ~= nil then
                v14 = v20.OverallSuccess;
            end;
            v15.assetMedia = true;
            if not l_includes_0(v15, false) then
                v13:dispatch(v6(v3.SCREENS.UPLOADING_ASSET));
                v13:dispatch(v7(v14));
            end;
        end;
        if not v12.iconFile then
            v15.thumbnail = true;
            if not l_includes_0(v15, false) then
                v13:dispatch(v6(v3.SCREENS.UPLOADING_ASSET));
                v13:dispatch(v7(v14));
            end;
        else
            v12.networkInterface:uploadAssetThumbnail(v12.assetId, v12.iconFile):andThen(v19, v19);
        end;
        if not v12.assetMediaUpdateData then
            v15.assetMedia = true;
            if not l_includes_0(v15, false) then
                v13:dispatch(v6(v3.SCREENS.UPLOADING_ASSET));
                v13:dispatch(v7(v14));
            end;
        else
            v13:dispatch(v8(v12.networkInterface, v12.assetId, v12.assetMediaUpdateData, v12.assetTypeEnum)):andThen(v21);
        end;
        if not l_includes_0(v15, false) then
            v13:dispatch(v6(v3.SCREENS.UPLOADING_ASSET));
            v13:dispatch(v7(v14));
        end;
    end;
end;


local l_PublishService_0 = game:GetService("PublishService");
local l_UGCValidationService_0 = game:GetService("UGCValidationService");
local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v3 = require(l_Parent_0.Core.Actions.SetAssetId);
local v4 = require(l_Parent_0.Core.Actions.NetworkError);
local v5 = require(l_Parent_0.Core.Actions.SetCurrentScreen);
local v6 = require(l_Parent_0.Core.Actions.UploadResult);
local l_Util_0 = l_Parent_0.Core.Util;
local v8 = require(l_Util_0.DebugFlags);
local v9 = require(l_Util_0.getUserId);
local v10 = require(l_Util_0.AssetConfigConstants);
local v11 = require(l_Util_0.Analytics.Analytics);
local v12 = require(l_Parent_0.Core.Networking.Requests.ConfigureItemTagsRequest);
local l_Promise_0 = require(l_Parent_0.Packages.Framework).Util.Promise;
return function(v14, v15, _, v17, v18, v19, v20, v21, v22)
    return function(v23, _)
        local l_v19_0 = v19;
        v15 = not v15 and "" or string.sub(v15, 1, v10.NAME_CHARACTER_LIMIT);
        v17 = not v17 and "" or string.sub(v17, 1, v10.DESCRIPTION_CHARACTER_LIMIT);
        v23:dispatch(v5(v10.SCREENS.UPLOADING_ASSET));
        local v26 = l_v19_0[1];
        if v26 then
            local l_Handle_0 = v26:FindFirstChild("Handle");
            if not (not l_Handle_0 or not l_Handle_0:IsA("MeshPart")) then
                l_UGCValidationService_0:ResetCollisionFidelity(l_Handle_0);
            end;
        end;
        local v28 = nil;
        local v29 = nil;
        if v21 ~= nil then
            v28 = Enum.AssetCreatorType.Group;
            v29 = v21;
        else
            v28 = Enum.AssetCreatorType.User;
            v29 = v9();
        end;
        return l_Promise_0.new(function(v30, v31)
            task.spawn(function()
                local l_status_0, l_result_0 = pcall(function()
                    return l_PublishService_0:CreateAssetAndWaitForAssetId(l_v19_0, "", v28, v29, v18.Name, v15, v17, v22);
                end);
                if (l_status_0 and l_result_0 ~= nil) and l_result_0 ~= 0 then
                    v30(l_result_0);
                    return ;
                else
                    v31(l_result_0);
                    return ;
                end;
            end);
        end):andThen(function(v34)
            v23:dispatch(v3(v34));
            v23:dispatch(v12(v14, v34, {}, v20));
            v11.incrementUploadAssetSuccess(v18);
        end):catch(function(v35)
            if v8.shouldDebugWarnings() then
                warn("Lua toolbox: Could not upload catalog item");
            end;
            v23:dispatch(v4(v35));
            v23:dispatch(v6(false));
            v11.incrementUploadAssetFailure(v18);
        end);
    end;
end;