local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Roact);
local v2 = require(l_CorePackages_0.Packages.t);
local l_ExternalEventConnection_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).ExternalEventConnection;
local l_RunService_0 = game:GetService("RunService");
local v5 = Vector3.new(0, 1, 0);
local v6 = v1.PureComponent:extend("ObjectViewport");
v6.validateProps = v2.strictInterface({
    model = v2.instanceOf("Model")
});
local function _(v7, v8)
    local l_X_0 = v8.X;
    local l_Y_0 = v8.Y;
    local l_Z_0 = v8.Z;
    return (math.max(l_X_0, l_Y_0, l_Z_0) / 2) * (1 / math.tan(math.rad(v7) / 2)) + l_Z_0 / 2;
end;
local function _(v13, v14, v15)
    return CFrame.fromAxisAngle(v15, v14):VectorToWorldSpace(v13);
end;
v6.init = function(v17)
    v17.cameraRef = v1.createRef();
    v17.worldModelRef = v1.createRef();
    local v18, v19 = v1.createBinding(CFrame.new());
    v17.cameraCFrameBinding = v18;
    v17.updateCameraCFrameBinding = v19;
    v18, v19 = v1.createBinding(0);
    v17.cameraRotationBinding = v18;
    v17.updateCameraRotationBinding = v19;
    v18, v19 = v1.createBinding(CFrame.new());
    v17.cameraFocusBinding = v18;
    v17.updateCameraFocusBinding = v19;
    v17:OnModelChanged();
end;
v6.OnModelChanged = function(v20)
    if v20.props.model ~= nil then
        v20.modelCFrame = v20.props.model:GetModelCFrame();
        v20.initialLookVector = v20.modelCFrame.lookVector;
        v20.modelExtentsSize = v20.props.model:GetExtentsSize();
        local l_modelExtentsSize_0 = v20.modelExtentsSize;
        local l_X_1 = l_modelExtentsSize_0.X;
        local l_Y_1 = l_modelExtentsSize_0.Y;
        local l_Z_1 = l_modelExtentsSize_0.Z;
        v20.cameraDistance = (math.max(l_X_1, l_Y_1, l_Z_1) / 2) * 1.4281480067421146 + l_Z_1 / 2;
    end;
end;
v6.render = function(v25)
    return v1.createElement("Frame", {
        BackgroundTransparency = 1,
        Position = UDim2.fromScale(0, 0),
        AnchorPoint = Vector2.new(0, 0),
        Size = UDim2.fromScale(1, 1)
    }, {
        AspectRatioConstraint = v1.createElement("UIAspectRatioConstraint", {
            AspectRatio = 1,
            AspectType = Enum.AspectType.FitWithinMaxSize,
            DominantAxis = Enum.DominantAxis.Width
        }),
        ViewportFrame = v1.createElement("ViewportFrame", {
            BackgroundTransparency = 0,
            BackgroundColor3 = Color3.new(0, 0, 0),
            Size = UDim2.fromScale(1, 1),
            Position = UDim2.fromScale(0.5, 0.5),
            AnchorPoint = Vector2.new(0.5, 0.5),
            LightColor = Color3.fromRGB(240, 240, 240),
            LightDirection = Vector3.new(1, 1, 1),
            Ambient = Color3.fromRGB(240, 240, 240),
            CurrentCamera = v25.cameraRef
        }, {
            Camera = v1.createElement("Camera", {
                CameraType = Enum.CameraType.Scriptable,
                FieldOfView = 70,
                CFrame = v25.cameraCFrameBinding,
                Focus = v25.cameraFocusBinding,
                [v1.Ref] = v25.cameraRef
            }),
            WorldModel = v1.createElement("WorldModel", {
                [v1.Ref] = v25.worldModelRef
            }),
            RenderSteppedConnection = v1.createElement(l_ExternalEventConnection_0, {
                event = l_RunService_0.RenderStepped,
                callback = function()
                    v25.updateCameraRotationBinding(v25.cameraRotationBinding:getValue() + 0.01);
                    v25.updateCameraCFrameBinding((CFrame.new(v25.modelCFrame.p + CFrame.fromAxisAngle(v5, (v25.cameraRotationBinding:getValue())):VectorToWorldSpace(v25.initialLookVector) * v25.cameraDistance, v25.modelCFrame.p)));
                end
            })
        })
    });
end;
v6.didMount = function(v26)
    if v26.worldModelRef:getValue() and v26.props.model ~= nil then
        v26.props.model.Parent = v26.worldModelRef:getValue();
    end;
end;
v6.willUnmount = function(v27)
    if v27.props.model then
        v27.props.model.Parent = nil;
    end;
end;
v6.didUpdate = function(v28, v29)
    if v28.props.model ~= v29.model then
        if v29.model ~= nil then
            v29.model.Parent = nil;
        end;
        if v28.props.model ~= nil then
            v28.props.model.Parent = v28.worldModelRef:getValue();
        end;
        v28:OnModelChanged();
    end;
end;
return v6;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_GuiService_0 = game:GetService("GuiService");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_CoreGui_0 = game:GetService("CoreGui");
local l_RobloxGui_0 = l_CoreGui_0:WaitForChild("RobloxGui");
local l_Players_0 = game:GetService("Players");
local v6 = require(l_CorePackages_0.Roact);
local v7 = require(l_CorePackages_0.RoactRodux);
local v8 = require(l_CorePackages_0.Packages.RoactGamepad);
local v9 = require(l_CorePackages_0.Packages.t);
local l_ExternalEventConnection_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).ExternalEventConnection;
local v11 = require(l_CorePackages_0.Workspace.Packages.InputType);
local l_getInputGroup_0 = require(l_CorePackages_0.Workspace.Packages.InputType).getInputGroup;
local l_LocalPlayer_0 = l_Players_0.LocalPlayer;
local l_Parent_0 = script.Parent;
local v15 = require(l_Parent_0.Parent.PromptType);
local v16 = require(l_Parent_0.PublishAssetPromptSingleStep);
local v17 = require(l_Parent_0.PublishAvatarPrompt.PublishAvatarPrompt);
local v18 = require(l_Parent_0.ResultModal);
local l_SelectionCursorProvider_0 = require(l_CorePackages_0.UIBlox).App.SelectionImage.SelectionCursorProvider;
local v20 = require(l_CorePackages_0.Packages.ReactFocusNavigation);
local v21 = v20.FocusNavigationService.new(v20.EngineInterface.CoreGui);
local v22 = require(l_CorePackages_0.Workspace.Packages.FocusNavigationUtils);
local l_Provider_0 = v22.FocusNavigableSurfaceRegistry.Provider;
local v24 = require(l_RobloxGui_0.Modules.Common.FocusNavigationEffectsWrapper);
local l_FocusNavigableSurfaceIdentifierEnum_0 = v22.FocusNavigableSurfaceIdentifierEnum;
local v26 = require(script.Parent.Parent.FFlagPublishAvatarPromptEnabled);
local v27 = game:DefineFastFlag("MigratePublishPromptFromRoactGamepad", false);
local v28 = v6.PureComponent:extend("PublishAssetPromptApp");
local v29 = game:DefineFastFlag("FixFocusOnResultModal", false);
v28.validateProps = v9.strictInterface({
    assetType = v9.optional(v9.enum(Enum.AssetType)),
    assetInstance = v9.optional(v9.Instance)
});
local function _(v30)
    return l_getInputGroup_0(v30) == v11.InputTypeConstants.Gamepad;
end;
v28.init = function(v32)
    v32:setState({
        isGamepad = if not v27 then l_getInputGroup_0((l_UserInputService_0:GetLastInputType())) == v11.InputTypeConstants.Gamepad else nil,
        screenSize = Vector2.new(0, 0)
    });
    v32.absoluteSizeChanged = function(v33)
        if v32.state.screenSize ~= v33.AbsoluteSize then
            v32:setState({
                screenSize = v33.AbsoluteSize
            });
        end;
    end;
    v32.focusController = if not v27 then v8.createFocusController() else nil;
    v32.selectedCoreGuiObject = nil;
    v32.selectedGuiObject = nil;
end;
v28.render = function(v34)
    local v35 = nil;
    if not v34.props.resultModalType then
        if not v34.props.assetInstance then
            if v26 and v34.props.promptType == v15.PublishAvatar then
                v35 = v6.createElement(v17, {
                    screenSize = v34.state.screenSize
                });
            end;
        elseif v34.props.promptType == v15.PublishAssetSingleStep then
            v35 = v6.createElement(v16, {
                screenSize = v34.state.screenSize
            });
        end;
    else
        v35 = v6.createElement(v18, {
            screenSize = v34.state.screenSize
        });
    end;
    return v6.createElement("ScreenGui", {
        IgnoreGuiInset = true,
        ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
        AutoLocalize = false,
        DisplayOrder = -1,
        [v6.Change.AbsoluteSize] = v34.absoluteSizeChanged
    }, {
        LastInputTypeConnection = v6.createElement(l_ExternalEventConnection_0, {
            event = l_UserInputService_0.LastInputTypeChanged,
            callback = function(v36)
                v34:setState({
                    isGamepad = l_getInputGroup_0(v36) == v11.InputTypeConstants.Gamepad
                });
            end
        }) or nil,
        PromptFrame = v6.createElement(v8.Focusable.Frame, {
            focusController = if not v27 then v34.focusController else nil,
            BackgroundTransparency = 1,
            Size = UDim2.fromScale(1, 1)
        }, {
            Prompt = if not v27 then v35 else nil,
            CursorProvider = if not v27 then nil else v6.createElement(l_SelectionCursorProvider_0, {}, {
                FocusNavigationProvider = v6.createElement(v20.FocusNavigationContext.Provider, {
                    value = v21
                }, {
                    FocusNavigationRegistryProvider = v6.createElement(l_Provider_0, nil, {
                        FocusNavigationEffects = v6.createElement(v24, {
                            selectionGroupName = "PublishAssetPromptApp",
                            focusNavigableSurfaceIdentifier = l_FocusNavigableSurfaceIdentifierEnum_0.CentralOverlay
                        }, {
                            Prompt = v35
                        })
                    })
                })
            })
        }) or nil
    });
end;
if not v27 then
    v28.revertSelectedGuiObject = function(v37)
        local v38 = nil;
        if l_LocalPlayer_0 then
            v38 = l_LocalPlayer_0:FindFirstChildWhichIsA("PlayerGui");
        end;
        if not v37.selectedCoreGuiObject or not v37.selectedCoreGuiObject:IsDescendantOf(l_CoreGui_0) then
            if not v37.selectedGuiObject or not v37.selectedGuiObject:IsDescendantOf(v38) then
                l_GuiService_0.SelectedCoreObject = nil;
            else
                l_GuiService_0.SelectedObject = v37.selectedGuiObject;
                l_GuiService_0.SelectedCoreObject = nil;
            end;
        else
            l_GuiService_0.SelectedCoreObject = v37.selectedCoreGuiObject;
        end;
        v37.selectedCoreGuiObject = nil;
        v37.selectedGuiObject = nil;
    end;
    v28.didUpdate = function(v39, v40, v41)
        local v42 = nil;
        local v43 = nil;
        if not v29 then
            v42 = v39.state.isGamepad and v39.props.assetInstance ~= nil;
            v43 = v41.isGamepad and v40.assetInstance ~= nil;
        else
            local l_isGamepad_0 = v39.state.isGamepad;
            if l_isGamepad_0 then
                l_isGamepad_0 = true;
                if v39.props.assetInstance == nil then
                    l_isGamepad_0 = v39.props.resultModalType ~= nil;
                end;
            end;
            v42 = l_isGamepad_0;
            l_isGamepad_0 = v41.isGamepad;
            if l_isGamepad_0 then
                l_isGamepad_0 = true;
                if v40.assetInstance == nil then
                    l_isGamepad_0 = v40.resultModalType ~= nil;
                end;
            end;
            v43 = l_isGamepad_0;
        end;
        if v42 ~= v43 then
            if not v42 then
                v39.focusController.releaseFocus();
                if v39.state.isGamepad then
                    v39:revertSelectedGuiObject();
                end;
            else
                v39.selectedCoreGuiObject = l_GuiService_0.SelectedCoreObject;
                v39.selectedGuiObject = l_GuiService_0.SelectedObject;
                l_GuiService_0.SelectedObject = nil;
                v39.focusController.captureFocus();
                return ;
            end;
        end;
    end;
    v28.willUnmount = function(v45)
        if v45.state.isGamepad then
            v45:revertSelectedGuiObject();
        end;
    end;
end;
return v7.connect(function(v46)
    return {
        resultModalType = v46.promptRequest.resultModalType,
        promptType = v46.promptRequest.promptInfo.promptType,
        assetInstance = v46.promptRequest.promptInfo.assetInstance,
        assetType = v46.promptRequest.promptInfo.assetType,
        humanoidModel = if not v26 then nil else v46.promptRequest.promptInfo.humanoidModel
    };
end)(v28);


local l_CorePackages_0 = game:GetService("CorePackages");
local l_CoreGui_0 = game:GetService("CoreGui");
local l_ExperienceAuthService_0 = game:GetService("ExperienceAuthService");
local l_Players_0 = game:GetService("Players");
local v4 = require(l_CorePackages_0.Roact);
local v5 = require(l_CorePackages_0.RoactRodux);
local v6 = require(l_CorePackages_0.Packages.t);
local v7 = require(l_CoreGui_0:WaitForChild("RobloxGui").Modules.RobloxTranslator);
local v8 = require(l_CorePackages_0.UIBlox);
local l_withStyle_0 = v8.Style.withStyle;
local l_InteractiveAlert_0 = v8.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v8.App.Button.Enum.ButtonType;
local l_IconButton_0 = v8.App.Button.IconButton;
local v13 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_LocalPlayer_0 = l_Players_0.LocalPlayer;
local v15 = require(script.Parent.Common.NameTextBox);
local v16 = require(script.Parent.AssetDescriptionTextBox);
local v17 = require(script.Parent.ObjectViewport);
local v18 = require(script.Parent.Common.PreviewViewport);
local v19 = require(script.Parent.EmoteThumbnailView);
local v20 = require(script.Parent.EmoteThumbnailEditor);
local v21 = require(script.Parent.EmoteThumbnailParameters);
local v22 = require(script.Parent.Parent.Actions.CloseOpenPrompt);
local l_Images_0 = v8.App.ImageSet.Images;
local v24 = l_Images_0["icons/actions/previewExpand"];
local v25 = l_Images_0["icons/actions/edit/edit"];
local v26 = {
    [Enum.AssetType.TShirtAccessory] = true,
    [Enum.AssetType.ShirtAccessory] = true,
    [Enum.AssetType.PantsAccessory] = true,
    [Enum.AssetType.JacketAccessory] = true,
    [Enum.AssetType.SweaterAccessory] = true,
    [Enum.AssetType.ShortsAccessory] = true,
    [Enum.AssetType.LeftShoeAccessory] = true,
    [Enum.AssetType.RightShoeAccessory] = true,
    [Enum.AssetType.DressSkirtAccessory] = true,
    [Enum.AssetType.HairAccessory] = true
};
local v27 = require(script.Parent.Parent.GetFFlagValidateDescription);
local v28 = game:DefineFastFlag("SendConsentDeniedOnCancel", false);
local l_game_EngineFeature_0 = game:GetEngineFeature("EnableEmotePublish");
local v30 = v4.PureComponent:extend("PublishAssetPromptSingleStep");
v30.validateProps = v6.strictInterface({
    screenSize = v6.Vector2,
    assetInstance = v6.Instance,
    assetType = v6.enum(Enum.AssetType),
    guid = v6.any,
    scopes = v6.any,
    closePrompt = v6.callback
});
v30.getDefaultText = function(v31)
    if v31.props.assetType == Enum.AssetType.Model then
        return v7:FormatByKey("CoreScripts.PublishAssetPrompt.PackagesDefaultName", {
            RBX_NAME = not not l_LocalPlayer_0 and l_LocalPlayer_0.Name or ""
        });
    else
        return "";
    end;
end;
v30.init = function(v32)
    v32.assetName = v32:getDefaultText();
    v32.assetDescription = v32:getDefaultText();
    v32.isNameValid = true;
    v32.isDescriptionValid = true;
    v32:setState({
        thumbnailParameters = v21.defaultParameters,
        showingThumbnailEditor = false,
        showingAssetPreview = false
    });
    v32.closePrompt = function()
        v32.props.closePrompt();
    end;
    v32.openThumbnailEditor = function()
        v32:setState({
            showingThumbnailEditor = true
        });
    end;
    v32.closeThumbnailEditor = function()
        v32:setState({
            showingThumbnailEditor = false
        });
    end;
    v32.openAssetPreview = function()
        v32:setState({
            showingAssetPreview = true
        });
    end;
    v32.closeAssetPreview = function()
        v32:setState({
            showingAssetPreview = false
        });
    end;
    v32.updateThumbnailParameters = function(v33)
        v32:setState({
            thumbnailParameters = v33
        });
    end;
    v32.denyAndClose = function()
        l_ExperienceAuthService_0:ScopeCheckUIComplete(v32.props.guid, v32.props.scopes, Enum.ScopeCheckResult.ConsentDenied, {});
        v32.closePrompt();
    end;
    v32.confirmAndUpload = function()
        if v32.isNameValid then
            if not v27() or v32.isDescriptionValid then
                local v34 = {
                    assetName = v32.assetName,
                    assetDescription = v32.assetDescription
                };
                if l_game_EngineFeature_0 and v32.props.assetType == Enum.AssetType.EmoteAnimation then
                    v34.emoteThumbnailParameters = v21.encodeAsATable(v32.state.thumbnailParameters);
                end;
                l_ExperienceAuthService_0:ScopeCheckUIComplete(v32.props.guid, v32.props.scopes, Enum.ScopeCheckResult.ConsentAccepted, v34);
                v32.closePrompt();
                return ;
            else
                return ;
            end;
        else
            return ;
        end;
    end;
    v32.onAssetNameUpdated = function(v35, v36)
        if not v36 then
            v32.isNameValid = false;
            return ;
        else
            v32.assetName = v35;
            v32.isNameValid = true;
            return ;
        end;
    end;
    v32.onAssetDescriptionUpdated = function(v37, v38)
        v32.assetDescription = v37;
        v32.isDescriptionValid = v38;
    end;
    v32.nameTextBoxRef = v4.createRef();
    v32.descriptionTextBoxRef = v4.createRef();
end;
v30.renderMiddle = function(v39, v40)
    return l_withStyle_0(function(v41)
        local l_Font_0 = v41.Font;
        local l_Theme_0 = v41.Theme;
        local l_l_game_EngineFeature_0_0 = l_game_EngineFeature_0;
        if l_l_game_EngineFeature_0_0 then
            l_l_game_EngineFeature_0_0 = false;
            if v39.props.assetType == Enum.AssetType.EmoteAnimation then
                l_l_game_EngineFeature_0_0 = v39.props.assetInstance:IsA("AnimationClip");
            end;
        end;
        return v4.createElement(v13.Focusable.Frame, {
            BackgroundTransparency = 1,
            Size = UDim2.new(1, 0, 0, 150),
            defaultChild = v39.nameTextBoxRef,
            [v4.Ref] = v39.middleContentRef
        }, {
            UISizeConstraint = v4.createElement("UISizeConstraint", {
                MinSize = Vector2.new(200, 200)
            }),
            TopSection = v4.createElement("Frame", {
                Size = UDim2.new(1, 0, 1, -50),
                BackgroundTransparency = 1
            }, {
                ViewportParent = v4.createElement("Frame", {
                    Size = UDim2.new(0.4, 0, 1, 0),
                    BackgroundTransparency = 1
                }, {
                    ObjectViewport = not l_l_game_EngineFeature_0_0 and v4.createElement(v17, {
                        model = v39.props.assetInstance
                    }) or nil,
                    EmoteThumbnailParent = not not l_l_game_EngineFeature_0_0 and v4.createElement("Frame", {
                        Size = UDim2.fromScale(1, 1),
                        BackgroundTransparency = 1
                    }, {
                        AspectRatioConstraint = v4.createElement("UIAspectRatioConstraint", {
                            AspectRatio = 1,
                            AspectType = Enum.AspectType.FitWithinMaxSize,
                            DominantAxis = Enum.DominantAxis.Width
                        }),
                        EmoteThumbnailView = v4.createElement(v19, {
                            animationClip = v39.props.assetInstance,
                            thumbnailParameters = v39.state.thumbnailParameters
                        }),
                        PreviewButton = v4.createElement(l_IconButton_0, {
                            position = UDim2.new(1, -2, 1, -2),
                            anchorPoint = Vector2.new(1, 1),
                            icon = v24,
                            size = UDim2.new(0, 30, 0, 30),
                            showBackground = true,
                            onActivated = v39.openAssetPreview
                        }),
                        EditButton = v4.createElement(l_IconButton_0, {
                            position = UDim2.new(0, 2, 1, -2),
                            anchorPoint = Vector2.new(0, 1),
                            icon = v25,
                            size = UDim2.new(0, 30, 0, 30),
                            showBackground = true,
                            onActivated = v39.openThumbnailEditor
                        })
                    }) or nil
                }),
                NameDescriptionFields = v4.createElement("Frame", {
                    Size = UDim2.new(0.6, -10, 1, 0),
                    AnchorPoint = Vector2.new(1, 0),
                    Position = UDim2.fromScale(1, 0),
                    BackgroundTransparency = 1
                }, {
                    NameLabel = v4.createElement("TextLabel", {
                        Size = UDim2.new(1, 0, 0, 15),
                        Font = l_Font_0.Body.Font,
                        Text = v40.name,
                        TextSize = 12,
                        TextColor3 = l_Theme_0.TextDefault.Color,
                        BackgroundTransparency = 1,
                        TextXAlignment = Enum.TextXAlignment.Left
                    }),
                    NameInput = v4.createElement(v15, {
                        Size = UDim2.new(1, 0, 0, 30),
                        Position = UDim2.new(0, 0, 0, 15),
                        onNameUpdated = v39.onAssetNameUpdated,
                        nameTextBoxRef = v39.nameTextBoxRef,
                        NextSelectionDown = v39.descriptionTextBoxRef,
                        defaultName = v39.assetName
                    }),
                    DescriptionLabel = v4.createElement("TextLabel", {
                        Size = UDim2.new(1, 0, 0, 15),
                        Position = UDim2.new(0, 0, 0, 60),
                        Font = l_Font_0.Body.Font,
                        TextSize = 12,
                        Text = v40.description,
                        TextColor3 = l_Theme_0.TextDefault.Color,
                        BackgroundTransparency = 1,
                        TextXAlignment = Enum.TextXAlignment.Left
                    }),
                    DescriptionInput = v4.createElement(v16, {
                        Size = UDim2.new(1, 0, 0, 80),
                        Position = UDim2.new(0, 0, 0, 75),
                        onAssetDescriptionUpdated = v39.onAssetDescriptionUpdated,
                        descriptionTextBoxRef = v39.descriptionTextBoxRef,
                        NextSelectionUp = v39.nameTextBoxRef,
                        defaultDescription = v39.assetDescription
                    })
                })
            }),
            Disclaimer = v4.createElement("TextLabel", {
                Size = UDim2.new(1, 0, 0, 50),
                Text = v40.disclaimer,
                Font = l_Font_0.Body.Font,
                TextSize = 12,
                TextColor3 = l_Theme_0.TextEmphasis.Color,
                BackgroundTransparency = 1,
                AnchorPoint = Vector2.new(0, 1),
                Position = UDim2.fromScale(0, 1),
                TextWrapped = true
            })
        });
    end);
end;
v30.renderAlertLocalized = function(v45, v46)
    local v47 = v4.createElement(l_InteractiveAlert_0, {
        title = v46.title,
        buttonStackInfo = {
            buttons = {
                {
                    props = {
                        onActivated = if not v28 then v45.closePrompt else v45.denyAndClose,
                        text = v46.cancel
                    },
                    isDefaultChild = true
                },
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        onActivated = v45.confirmAndUpload,
                        text = v46.submit,
                        isDelayedInput = true,
                        enableInputDelayed = true,
                        delayInputSeconds = 3
                    },
                    isDefaultChild = false
                }
            }
        },
        middleContent = function()
            return v45:renderMiddle(v46);
        end,
        screenSize = v45.props.screenSize,
        defaultChildRef = v45.props.defaultChildRef,
        isMiddleContentFocusable = true
    });
    if not l_game_EngineFeature_0 then
        return v47;
    else
        return v4.createFragment({
            Prompt = v47,
            ThumbnailEditor = not not v45.state.showingThumbnailEditor and v4.createElement(v20, {
                animationClip = v45.props.assetInstance,
                initialThumbnailParameters = v45.state.thumbnailParameters,
                screenSize = v45.props.screenSize,
                updateThumbnailCallback = v45.updateThumbnailParameters,
                closePromptCallback = v45.closeThumbnailEditor
            }) or nil,
            PreviewFrame = not not v45.state.showingAssetPreview and v4.createElement("Frame", {
                Size = UDim2.new(0.5, 0, 0.5, 0),
                BackgroundColor3 = Color3.new(0.2, 0.2, 0.2),
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.fromScale(0.5, 0.5),
                BackgroundTransparency = 0
            }, {
                PreviewViewport = v4.createElement(v18, {
                    asset = v45.props.assetInstance,
                    closePreviewView = v45.closeAssetPreview
                })
            }) or nil
        });
    end;
end;
local function _(v48)
    if v26[v48] == true then
        return true;
    else
        return false;
    end;
end;
local function v52(v50)
    local v51 = {
        name = v7:FormatByKey("CoreScripts.PublishAssetPrompt.Name"),
        description = v7:FormatByKey("CoreScripts.PublishAssetPrompt.Description"),
        invalidName = v7:FormatByKey("CoreScripts.PublishAssetPrompt.InvalidName"),
        invalidDescription = v7:FormatByKey("CoreScripts.PublishAssetPrompt.InvalidDescription"),
        cancel = v7:FormatByKey("CoreScripts.PublishAssetPrompt.Cancel"),
        submit = v7:FormatByKey("CoreScripts.PublishAssetPrompt.Submit")
    };
    if not (v26[v50] == true) then
        if v50 == Enum.AssetType.EmoteAnimation then
            v51.title = v7:FormatByKey("CoreScripts.PublishAssetPrompt.TitleTextEmote");
            v51.disclaimer = v7:FormatByKey("CoreScripts.PublishAssetPrompt.DisclaimerEmote");
            return v51;
        elseif v50 == Enum.AssetType.Model then
            v51.title = v7:FormatByKey("CoreScripts.PublishAssetPrompt.TitleTextModel");
            v51.disclaimer = v7:FormatByKey("CoreScripts.PublishAssetPrompt.DisclaimerModel");
            return v51;
        else
            if v50 == Enum.AssetType.Package then
                v51.title = v7:FormatByKey("CoreScripts.PublishAssetPrompt.TitleTextPackage");
                v51.disclaimer = v7:FormatByKey("CoreScripts.PublishAssetPrompt.DisclaimerModel");
            end;
            return v51;
        end;
    else
        v51.title = v7:FormatByKey("CoreScripts.PublishAssetPrompt.TitleTextClothing");
        v51.disclaimer = v7:FormatByKey("CoreScripts.PublishAssetPrompt.DisclaimerAvatar");
        return v51;
    end;
end;
v30.render = function(v53)
    return v53:renderAlertLocalized((v52(v53.props.assetType)));
end;
return v5.connect(function(v54)
    return {
        assetInstance = v54.promptRequest.promptInfo.assetInstance,
        assetType = v54.promptRequest.promptInfo.assetType,
        guid = v54.promptRequest.promptInfo.guid,
        scopes = v54.promptRequest.promptInfo.scopes
    };
end, function(v55)
    return {
        closePrompt = function()
            return v55(v22());
        end
    };
end)(v30);


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Packages.React);
local l_useStyle_0 = require(l_CorePackages_0.UIBlox).Core.Style.useStyle;
local v3 = require(script.Parent.AvatarPartViewport);
return function(v4)
    local v5 = l_useStyle_0();
    local l_Font_0 = v5.Font;
    local l_Theme_0 = v5.Theme;
    local l_asset_0 = v4.asset;
    local v9 = true;
    if typeof(l_asset_0) ~= "table" then
        v9 = l_asset_0:IsA("MeshPart") or l_asset_0:IsA("Accessory");
    end;
    assert(v9, "Assert that asset is a table, MeshPart, or Accessory");
    return v1.createElement("Frame", {
        Size = UDim2.fromScale(1, 1),
        LayoutOrder = v4.LayoutOrder,
        BackgroundTransparency = 1
    }, {
        UIListLayout = v1.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 5)
        }),
        AvatarPartViewport = v1.createElement(v3, {
            asset = l_asset_0,
            LayoutOrder = 1,
            viewportSize = v4.viewportSize
        }),
        TitleText = v4.titleText and v1.createElement("TextLabel", {
            LayoutOrder = 2,
            BackgroundTransparency = 1,
            Text = v4.titleText,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            Size = UDim2.new(1, 0, 0, 50),
            TextColor3 = l_Theme_0.TextDefault.Color,
            TextWrapped = true,
            Font = l_Font_0.Header2.Font,
            TextSize = l_Font_0.Header2.RelativeSize * l_Font_0.BaseSize,
            TextTruncate = Enum.TextTruncate.AtEnd
        })
    });
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Packages.React);
local v2 = require(l_CorePackages_0.UIBlox);
local l_GridMetrics_0 = v2.App.Grid.GridMetrics;
local l_DefaultMetricsGridView_0 = v2.App.Grid.DefaultMetricsGridView;
local v5 = require(script.Parent.Parent.Parent.Parent.Constants);
local v6 = require(script.Parent.AvatarItemCard);
local v7 = Vector2.new(20, 20);
local _ = function(v8)
    local l_Folder_0 = Instance.new("Folder");
    l_Folder_0.Name = "R15ArtistIntent";
    for _, v11 in v8, nil, nil do
        v11.Parent = l_Folder_0;
    end;
    return {
        [1] = l_Folder_0
    };
end;
local function _(v13, v14)
    return (v13:FindFirstChild(v14));
end;
local function v42(v16, v17)
    local v18 = nil;
    local v19 = nil;
    for _, v21 in ipairs(v16:GetChildren()) do
        if v21:IsA("Accessory") then
            if v21.AccessoryType == Enum.AccessoryType.Eyebrow then
                v19 = v21;
            elseif v21.AccessoryType == Enum.AccessoryType.Eyelash then
                v18 = v21;
            end;
        end;
    end;
    local v22 = {};
    local v23 = {
        asset = v16:FindFirstChild("Head"),
        titleText = v17 .. "'s Head"
    };
    local v24 = {};
    local v25 = {
        v16:FindFirstChild("UpperTorso"),
        (v16:FindFirstChild("LowerTorso"))
    };
    local l_Folder_1 = Instance.new("Folder");
    l_Folder_1.Name = "R15ArtistIntent";
    for _, v28 in v25, nil, nil do
        v28.Parent = l_Folder_1;
    end;
    v24.asset = {
        [1] = l_Folder_1
    };
    v24.titleText = v17 .. "'s Torso";
    local v29 = {};
    l_Folder_1 = {
        v16:FindFirstChild("LeftUpperArm"),
        v16:FindFirstChild("LeftLowerArm"),
        (v16:FindFirstChild("LeftHand"))
    };
    local l_Folder_2 = Instance.new("Folder");
    l_Folder_2.Name = "R15ArtistIntent";
    for _, v32 in l_Folder_1, nil, nil do
        v32.Parent = l_Folder_2;
    end;
    v29.asset = {
        [1] = l_Folder_2
    };
    v29.titleText = v17 .. "'s Left Arm";
    v25 = {};
    l_Folder_2 = {
        v16:FindFirstChild("LeftUpperLeg"),
        v16:FindFirstChild("LeftLowerLeg"),
        (v16:FindFirstChild("LeftFoot"))
    };
    local l_Folder_3 = Instance.new("Folder");
    l_Folder_3.Name = "R15ArtistIntent";
    for _, v35 in l_Folder_2, nil, nil do
        v35.Parent = l_Folder_3;
    end;
    v25.asset = {
        [1] = l_Folder_3
    };
    v25.titleText = v17 .. "'s Left Leg";
    l_Folder_1 = {};
    l_Folder_3 = {
        v16:FindFirstChild("RightUpperArm"),
        v16:FindFirstChild("RightLowerArm"),
        (v16:FindFirstChild("RightHand"))
    };
    local l_Folder_4 = Instance.new("Folder");
    l_Folder_4.Name = "R15ArtistIntent";
    for _, v38 in l_Folder_3, nil, nil do
        v38.Parent = l_Folder_4;
    end;
    l_Folder_1.asset = {
        [1] = l_Folder_4
    };
    l_Folder_1.titleText = v17 .. "'s Right Arm";
    l_Folder_2 = {};
    l_Folder_4 = {
        v16:FindFirstChild("RightUpperLeg"),
        v16:FindFirstChild("RightLowerLeg"),
        (v16:FindFirstChild("RightFoot"))
    };
    local l_Folder_5 = Instance.new("Folder");
    l_Folder_5.Name = "R15ArtistIntent";
    for _, v41 in l_Folder_4, nil, nil do
        v41.Parent = l_Folder_5;
    end;
    l_Folder_2.asset = {
        [1] = l_Folder_5
    };
    l_Folder_2.titleText = v17 .. "'s Right Leg";
    setlist { ['R004[1 to 6]'] = 'R005 to R010' };
    if v19 then
        table.insert(v22, {
            asset = v19,
            titleText = v17 .. "'s Eyebrows"
        });
    end;
    if v18 then
        table.insert(v22, {
            asset = v18,
            titleText = v17 .. "'s Eyelashes"
        });
    end;
    return v22;
end;
return function(v43)
    local v44, v45 = v1.useState({});
    v1.useEffect(function()
        v45((v42(v43.humanoidModel:Clone(), v43.name)));
    end, {
        v43.humanoidModel,
        v43.name
    });
    local v46 = if not (v43.screenSize.X < v43.screenSize.Y) then v5.ItemCardWidthLandscape else v5.ItemCardWidthPortrait;
    return v1.createElement("Frame", {
        Size = UDim2.fromScale(1, 0),
        AutomaticSize = Enum.AutomaticSize.Y,
        LayoutOrder = v43.LayoutOrder,
        BackgroundTransparency = 1
    }, {
        Grid = v1.createElement(l_DefaultMetricsGridView_0, {
            getItemHeight = function(v47)
                return v47 * 1.3333333333333333;
            end,
            getItemMetrics = l_GridMetrics_0.makeCustomMetricsGetter({
                minimumItemsPerRow = 2,
                minimumItemWidth = v46
            }),
            renderItem = v1.useCallback(function(v48)
                return v1.createElement(v6, {
                    asset = v48.asset,
                    titleText = v48.titleText,
                    viewportSize = v46
                });
            end, {
                v46
            }),
            itemPadding = v7,
            items = v44
        })
    });
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Roact);
local v2 = require(l_CorePackages_0.Packages.t);
local l_withStyle_0 = require(l_CorePackages_0.UIBlox).Style.withStyle;
local l_CameraUtility_0 = require(l_CorePackages_0.Thumbnailing).CameraUtility;
local l_MannequinUtility_0 = require(l_CorePackages_0.Thumbnailing).MannequinUtility;
local v6 = require(script.Parent.Parent.Parent.Parent.Constants);
local v7 = v1.PureComponent:extend("AvatarPartViewport");
v7.validateProps = v2.strictInterface({
    LayoutOrder = v2.optional(v2.number),
    asset = v2.union(v2.table, v2.instanceOf("MeshPart"), v2.instanceOf("Accessory")),
    viewportSize = v2.optional(v2.Vector2)
});
v7.init = function(v8)
    v8.camera = nil;
    v8.modelRef = v1.createRef();
    local v9, v10 = v1.createBinding(nil);
    v8.camera = v9;
    v8.updateCamera = v10;
end;
v7.createViewportCamera = function(v11)
    local l_Camera_0 = Instance.new("Camera");
    l_Camera_0.Parent = v11.modelRef:getValue();
    l_Camera_0.CameraType = Enum.CameraType.Scriptable;
    return l_Camera_0;
end;
v7.addBodyPartMannequinToViewport = function(v13)
    local v14, v15, v16 = l_MannequinUtility_0.CreateBodyPartMannequin(v13.props.asset, false);
    local v17, v18 = l_MannequinUtility_0.SetupBodyPartMannequin(v14, v15, v16, v13.props.asset);
    v16.Parent = v13.modelRef:getValue();
    local v19 = v13:createViewportCamera();
    l_CameraUtility_0.SetupBodyPartCamera(v16, v17, v18, v19);
    v13.updateCamera(v19);
end;
v7.addHeadModelToViewport = function(v20)
    local v21 = l_MannequinUtility_0.CreateHeadModel(v20.props.asset);
    v21.Parent = v20.modelRef:getValue();
    local v22 = v20:createViewportCamera();
    l_CameraUtility_0.SetupHeadCamera(v21, v22);
    v20.updateCamera(v22);
end;
v7.addAccessoryToViewport = function(v23)
    local l_asset_0 = v23.props.asset;
    local l_Model_0 = Instance.new("Model");
    l_asset_0.Parent = l_Model_0;
    l_Model_0.Parent = v23.modelRef:getValue();
    local v26 = v23:createViewportCamera();
    l_CameraUtility_0.SetupAccessoryCamera(l_Model_0, v26);
    v23.updateCamera(v26);
end;
v7.didMount = function(v27)
    local l_asset_1 = v27.props.asset;
    if typeof(l_asset_1) == "Instance" then
        if not l_asset_1:IsA("MeshPart") then
            v27:addAccessoryToViewport();
            return ;
        else
            v27:addHeadModelToViewport();
            return ;
        end;
    else
        v27:addBodyPartMannequinToViewport();
        return ;
    end;
end;
v7.render = function(v29)
    return l_withStyle_0(function(v30)
        local l_Theme_0 = v30.Theme;
        local v32 = if not v29.props.viewportSize then v6.ItemCardWidthLandscape else v29.props.viewportSize;
        return v1.createElement("Frame", {
            LayoutOrder = v29.props.LayoutOrder,
            BackgroundColor3 = l_Theme_0.PlaceHolder.Color,
            BackgroundTransparency = l_Theme_0.PlaceHolder.Transparency,
            BorderSizePixel = 0,
            Size = UDim2.fromOffset(v32, v32),
            ZIndex = 0
        }, {
            UICorner = v1.createElement("UICorner", {
                CornerRadius = UDim.new(0, 10)
            }),
            AspectRatioConstraint = v1.createElement("UIAspectRatioConstraint", {
                AspectRatio = 1,
                AspectType = Enum.AspectType.FitWithinMaxSize,
                DominantAxis = Enum.DominantAxis.Width
            }),
            ViewportFrame = v1.createElement("ViewportFrame", {
                Size = UDim2.fromScale(1, 1),
                Position = UDim2.fromScale(0.5, 0.5),
                AnchorPoint = Vector2.new(0.5, 0.5),
                ImageTransparency = 0,
                BackgroundTransparency = 1,
                LightColor = v6.ViewportLightColor,
                Ambient = v6.ViewportLightAmbient,
                LightDirection = v6.ViewportLightDirection,
                CurrentCamera = v29.camera
            }, {
                UICorner = v1.createElement("UICorner", {
                    CornerRadius = UDim.new(0, 10)
                }),
                WorldModel = v1.createElement("WorldModel", {
                    [v1.Ref] = v29.modelRef
                })
            })
        });
    end);
end;
return v7;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_CoreGui_0 = game:GetService("CoreGui");
local l_Players_0 = game:GetService("Players");
local l_ExperienceAuthService_0 = game:GetService("ExperienceAuthService");
local v4 = require(l_CorePackages_0.Roact);
local v5 = require(l_CorePackages_0.RoactRodux);
local v6 = require(l_CorePackages_0.Packages.t);
local v7 = require(l_CoreGui_0:WaitForChild("RobloxGui").Modules.RobloxTranslator);
local v8 = require(script.Parent.AvatarParts.AvatarPartGrid);
local l_Parent_0 = script.Parent.Parent;
local v10 = require(l_Parent_0.BasePublishPrompt);
local v11 = require(l_Parent_0.Common.ObjectViewport);
local v12 = UDim.new(0, 20);
local v13 = v4.PureComponent:extend("PublishAvatarPrompt");
v13.validateProps = v6.strictInterface({
    screenSize = v6.Vector2,
    humanoidModel = v6.instanceOf("Model"),
    guid = v6.any,
    scopes = v6.any
});
v13.init = function(v14)
    local l_LocalPlayer_0 = l_Players_0.LocalPlayer;
    assert(l_LocalPlayer_0, "Assert LocalPlayer is not nil to silence type checker");
    v14:setState({
        showingPreviewView = false,
        name = l_LocalPlayer_0.Name .. "'s Body",
        isNameValid = true
    });
    v14.openPreviewView = function()
        v14:setState({
            showingPreviewView = true
        });
    end;
    v14.closePreviewView = function()
        v14:setState({
            showingPreviewView = false
        });
    end;
    v14.canSubmit = function()
        return v14.state.isNameValid and v14.props.humanoidModel ~= nil;
    end;
    v14.onSubmit = function()
        l_ExperienceAuthService_0:ScopeCheckUIComplete(v14.props.guid, v14.props.scopes, Enum.ScopeCheckResult.ConsentAccepted, {
            avatarName = v14.state.name
        });
    end;
    v14.onNameUpdated = function(v16, v17)
        v14:setState({
            name = v16,
            isNameValid = v17
        });
    end;
end;
v13.renderPromptBody = function(v18)
    local v19 = v18.props.humanoidModel == nil;
    return v4.createFragment({
        UIListLayout = v4.createElement("UIListLayout", {
            Padding = v12,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Vertical
        }),
        UIPadding = v4.createElement("UIPadding", {
            PaddingBottom = v12,
            PaddingTop = v12
        }),
        EmbeddedPreview = v4.createElement(v11, {
            openPreviewView = v18.openPreviewView,
            model = v18.props.humanoidModel,
            isLoading = v19,
            useFullBodyCameraSettings = true,
            fieldOfView = 30,
            LayoutOrder = 1
        }),
        AvatarPartGrid = if v19 then nil else v4.createElement(v8, {
            humanoidModel = v18.props.humanoidModel,
            name = v18.state.name,
            LayoutOrder = 2,
            screenSize = v18.props.screenSize
        })
    });
end;
local function _()
    return {
        body = v7:FormatByKey("Feature.Catalog.Label.Body"),
        title = "Submit Creation"
    };
end;
v13.render = function(v21)
    local v22 = {
        body = v7:FormatByKey("Feature.Catalog.Label.Body"),
        title = "Submit Creation"
    };
    assert(l_Players_0, "Players should always be defined, silence type checker");
    return v4.createElement(v10, {
        promptBody = v21:renderPromptBody(),
        screenSize = v21.props.screenSize,
        showingPreviewView = v21.state.showingPreviewView,
        closePreviewView = v21.closePreviewView,
        asset = v21.props.humanoidModel,
        nameLabel = "Body Name",
        defaultName = v21.state.name,
        typeData = v22.body,
        titleText = v22.title,
        onNameUpdated = v21.onNameUpdated,
        canSubmit = v21.canSubmit,
        onSubmit = v21.onSubmit,
        enableInputDelayed = true,
        isDelayedInput = true,
        delayInputSeconds = 3
    });
end;
return v5.connect(function(v23)
    return {
        humanoidModel = v23.promptRequest.promptInfo.humanoidModel,
        guid = v23.promptRequest.promptInfo.guid,
        scopes = v23.promptRequest.promptInfo.scopes
    };
end)(v13);


local l_CorePackages_0 = game:GetService("CorePackages");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_CoreGui_0 = game:GetService("CoreGui");
local v3 = require(l_CorePackages_0.UIBlox);
local l_ButtonType_0 = v3.App.Button.Enum.ButtonType;
local l_InteractiveAlert_0 = v3.App.Dialog.Alert.InteractiveAlert;
local v6 = require(l_CoreGui_0:WaitForChild("RobloxGui").Modules.RobloxTranslator);
local v7 = v3.App.ImageSet.Images["icons/controls/keys/xboxA"];
local v8 = require(l_CorePackages_0.Roact);
local v9 = require(l_CorePackages_0.RoactRodux);
local v10 = require(l_CorePackages_0.Packages.t);
local v11 = require(l_CorePackages_0.Workspace.Packages.InputType);
local l_getInputGroup_0 = require(l_CorePackages_0.Workspace.Packages.InputType).getInputGroup;
local v13 = require(script.Parent.Parent.Thunks.CloseResultModal);
local v14 = require(script.Parent.Parent.GetFFlagValidateDescription);
local v15 = v8.PureComponent:extend("ResultModal");
v15.validateProps = v10.strictInterface({
    screenSize = v10.Vector2,
    resultModalType = v10.enum(Enum.PromptPublishAssetResult),
    closeResultModal = v10.callback
});
local function _(v16)
    return l_getInputGroup_0(v16) == v11.InputTypeConstants.Gamepad;
end;
v15.init = function(v18)
    v18:setState({
        isGamepad = l_getInputGroup_0((l_UserInputService_0:GetLastInputType())) == v11.InputTypeConstants.Gamepad
    });
end;
v15.getLocalizedStringForResultPrompt = function(_, v20)
    if v20 == Enum.PromptPublishAssetResult.Success then
        return v6:FormatByKey("CoreScripts.PublishAssetPrompt.PublishSuccessMessage");
    elseif v20 == Enum.PromptPublishAssetResult.UploadFailed then
        return v6:FormatByKey("CoreScripts.PublishAssetPrompt.PublishFailed");
    elseif v20 == Enum.PromptPublishAssetResult.NoUserInput then
        return v6:FormatByKey("CoreScripts.PublishAssetPrompt.NoUserInput");
    else
        return v6:FormatByKey("CoreScripts.PublishAssetPrompt.UndefinedError", {
            RESULT_TYPE = tostring(v20)
        });
    end;
end;
v15.getLocalizedTitleForResultPrompt = function(_, v22)
    if v22 == Enum.PromptPublishAssetResult.Success then
        return v6:FormatByKey("CoreScripts.PublishAssetPrompt.PublishSuccessTitle");
    else
        return v6:FormatByKey("CoreScripts.PublishAssetPrompt.PublishFailedTitle");
    end;
end;
v15.render = function(v23)
    return v8.createElement(l_InteractiveAlert_0, {
        title = v23:getLocalizedTitleForResultPrompt(v23.props.resultModalType),
        bodyText = v23:getLocalizedStringForResultPrompt(v23.props.resultModalType),
        screenSize = v23.props.screenSize,
        buttonStackInfo = {
            buttons = {
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        onActivated = v23.props.closeResultModal,
                        text = if not v14() then v6:FormatByKey("InGame.CommonUI.Button.Ok") else v6:FormatByKey("CoreScripts.PublishAssetPrompt.ResultModalOk"),
                        inputIcon = not not v23.state.isGamepad and v7 or nil
                    }
                }
            }
        }
    });
end;
return v9.connect(function(v24)
    return {
        resultModalType = v24.promptRequest.resultModalType
    };
end, function(v25)
    return {
        closeResultModal = function()
            return v25(v13);
        end
    };
end)(v15);


local l_CorePackages_0 = game:GetService("CorePackages");
local l_CoreGui_0 = game:GetService("CoreGui");
local v2 = require(l_CorePackages_0.UIBlox);
local l_ButtonType_0 = v2.App.Button.Enum.ButtonType;
local l_InteractiveAlert_0 = v2.App.Dialog.Alert.InteractiveAlert;
local l_Overlay_0 = v2.App.Dialog.Overlay;
local v6 = require(l_CoreGui_0:WaitForChild("RobloxGui").Modules.RobloxTranslator);
local v7 = v2.App.ImageSet.Images["icons/controls/keys/xboxA"];
local v8 = require(l_CorePackages_0.Workspace.Packages.RoactUtils);
local l_useIsGamepad_0 = v8.Hooks.useIsGamepad;
local l_useDispatch_0 = v8.Hooks.RoactRodux.useDispatch;
local v11 = require(l_CorePackages_0.Packages.React);
local v12 = require(script.Parent.Parent.Actions.CloseOpenPrompt);
return function(v13)
    local v14 = l_useIsGamepad_0();
    local v15 = l_useDispatch_0();
    return v11.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.fromScale(1, 1),
        ZIndex = 3
    }, {
        Overlay = v11.createElement(l_Overlay_0, {
            showGradient = false,
            ZIndex = 3
        }),
        InteractiveAlertWrapper = v11.createElement("Frame", {
            BackgroundTransparency = 1,
            Size = UDim2.fromScale(1, 1),
            ZIndex = 4
        }, {
            InteractiveAlert = v11.createElement(l_InteractiveAlert_0, {
                title = "Something Went Wrong",
                bodyText = "Your creation could not be created due to an error. A report has been sent to the developer of this experience.",
                screenSize = v13.screenSize,
                buttonStackInfo = {
                    buttons = {
                        {
                            buttonType = l_ButtonType_0.PrimarySystem,
                            props = {
                                onActivated = function()
                                    v15(v12());
                                end,
                                text = v6:FormatByKey("InGame.CommonUI.Button.Ok"),
                                inputIcon = not not v14 and v7 or nil
                            }
                        }
                    }
                }
            })
        })
    });
end;


local l_AssetService_0 = game:GetService("AssetService");
local l_AvatarCreationService_0 = game:GetService("AvatarCreationService");
local l_ExperienceAuthService_0 = game:GetService("ExperienceAuthService");
local l_Parent_0 = script.Parent;
local v4 = require(l_Parent_0.Thunks.OpenPublishAssetPrompt);
local v5 = require(l_Parent_0.Thunks.OpenPublishAvatarPrompt);
local v6 = require(l_Parent_0.Thunks.OpenResultModal);
local v7 = require(l_Parent_0.Actions.SetHumanoidModel);
local v8 = require(l_Parent_0.Actions.OpenValidationErrorModal);
local v9 = game:DefineFastFlag("InExperiencePublishDeserializeAsset", false);
local v10 = game:DefineFastFlag("NewInExperienceSerializationFix", false);
local v11 = require(script.Parent.FFlagPublishAvatarPromptEnabled);
local l_game_EngineFeature_0 = game:GetEngineFeature("PromptImportAnimationClipFromVideoAsyncEnabled");
return function(v13)
    local v14 = {};
    table.insert(v14, l_ExperienceAuthService_0.OpenAuthPrompt:Connect(function(v15, v16, v17)
        local v18 = l_game_EngineFeature_0 and v17.isVideoToAnimationFlow;
        if not (not (#v16 == 1 and v16[1] == Enum.ExperienceAuthScope.CreatorAssetsCreate) or v18) then
            if not v10 then
                if not game:GetEngineFeature("AssetServiceDeserializeInstance") or not v9 then
                    if not v11 or not v17.outfitToPublish then
                        v13:dispatch(v4(v17.instanceToPublish, v17.assetType, v15, v16));
                    else
                        v13:dispatch(v5(l_AssetService_0:DeserializeInstance(v17.outfitToPublish), v15, v16));
                        return ;
                    end;
                elseif not v11 or not v17.outfitToPublish then
                    v13:dispatch(v4(l_AssetService_0:DeserializeInstance(v17.serializedInstance), v17.assetType, v15, v16));
                    return ;
                else
                    v13:dispatch(v5(l_AssetService_0:DeserializeInstance(v17.outfitToPublish), v15, v16));
                    return ;
                end;
            elseif not v17.instanceToPublish then
                if not v17.serializedInstance then
                    if not (not v11 or not v17.outfitToPublish) then
                        v13:dispatch(v5(nil, v15, v16));
                        return ;
                    end;
                else
                    v13:dispatch(v4(l_AssetService_0:DeserializeInstance(v17.serializedInstance), v17.assetType, v15, v16));
                    return ;
                end;
            else
                v13:dispatch(v4(v17.instanceToPublish, v17.assetType, v15, v16));
                return ;
            end;
        end;
    end));
    table.insert(v14, l_AssetService_0.OpenPublishResultModal:Connect(function(v19)
        v13:dispatch(v6(v19));
    end));
    local function v20()
        return l_AvatarCreationService_0.UgcValidationSuccess and l_AvatarCreationService_0.UgcValidationFailure;
    end;
    if pcall(v20) then
        table.insert(v14, l_AvatarCreationService_0.UgcValidationSuccess:Connect(function(v21, v22)
            local v23 = v13:getState();
            if v23 and v23.promptRequest.promptInfo.guid == v21 then
                v13:dispatch(v7((l_AssetService_0:DeserializeInstance(v22))));
            end;
        end));
    end;
    if pcall(v20) then
        table.insert(v14, l_AvatarCreationService_0.UgcValidationFailure:Connect(function(v24, v25)
            local v26 = v13:getState();
            if v26 and v26.promptRequest.promptInfo.guid == v24 then
                v13:dispatch(v8(v25));
            end;
        end));
    end;
    return v14;
end;


return {
    PromptSidePadding = 24,
    ViewportLightColor = Color3.fromRGB(240, 240, 240),
    ViewportLightAmbient = Color3.fromRGB(160, 160, 160),
    ViewportLightDirection = Vector3.new(9.5, -12, 7.5),
    ItemCardWidthLandscape = 150,
    ItemCardWidthPortrait = 100
};


return game:DefineFastFlag("PublishAvatarPromptEnabled2", false) and game:GetEngineFeature("AvatarCreationService");


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


return {
    PublishAssetSingleStep = "PublishAssetSingleStep",
    PublishAvatar = "PublishAvatar"
};


local l_Parent_0 = script.Parent.Parent;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Rodux);
local v3 = require(l_CorePackages_0.Cryo);
return (v2.createReducer({
    promptInfo = {},
    queue = {}
}, {
    [require(l_Parent_0.Actions.OpenPublishAssetPrompt).name] = function(v4, v5)
        if v4.promptInfo.promptType == nil then
            return v3.Dictionary.join(v4, {
                promptInfo = v5.promptInfo
            });
        else
            return v3.Dictionary.join(v4, {
                queue = v3.List.join(v4.queue, {
                    v5.promptInfo
                })
            });
        end;
    end,
    [require(l_Parent_0.Actions.OpenPublishAvatarPrompt).name] = function(v6, v7)
        if v6.promptInfo.promptType == nil then
            return v3.Dictionary.join(v6, {
                promptInfo = v7.promptInfo
            });
        else
            return v3.Dictionary.join(v6, {
                queue = v3.List.join(v6.queue, {
                    v7.promptInfo
                })
            });
        end;
    end,
    [require(l_Parent_0.Actions.SetHumanoidModel).name] = function(v8, v9)
        return v3.Dictionary.join(v8, {
            promptInfo = v3.Dictionary.join(v8.promptInfo, {
                humanoidModel = v9.humanoidModel
            })
        });
    end,
    [require(l_Parent_0.Actions.CloseOpenPrompt).name] = function(v10, _)
        if not v3.isEmpty(v10.queue) then
            return v3.Dictionary.join(v10, {
                promptInfo = v10.queue[1],
                queue = v3.List.removeIndex(v10.queue, 1)
            });
        else
            return {
                promptInfo = {},
                queue = v10.queue
            };
        end;
    end,
    [require(l_Parent_0.Actions.OpenResultModal).name] = function(v12, v13)
        return v3.Dictionary.join(v12, {
            resultModalType = v13.resultType
        });
    end,
    [require(l_Parent_0.Actions.CloseResultModal).name] = function(v14, _)
        return v3.Dictionary.join(v14, {
            resultModalType = v3.None
        });
    end,
    [require(l_Parent_0.Actions.OpenValidationErrorModal).name] = function(v16, v17)
        return v3.Dictionary.join(v16, {
            promptInfo = v3.Dictionary.join(v16.promptInfo, {
                errorMessage = v17.errorMessage
            })
        });
    end
}));


return (require(game:GetService("CorePackages").Rodux).combineReducers({
    promptRequest = require(script.PromptRequestReducer)
}));


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


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Actions.OpenPublishAssetPrompt);
local v2 = require(l_Parent_0.PromptType);
return function(v3, v4, v5, v6)
    return function(v7)
        if v3:IsA("Accessory") then
            local l_Model_0 = Instance.new("Model");
            l_Model_0.Parent = v3.Parent;
            v3.Parent = l_Model_0;
            local l_v3_FirstChildWhichIsA_0 = v3:FindFirstChildWhichIsA("BasePart", true);
            if l_v3_FirstChildWhichIsA_0 == nil then
                print("Error: accessory to be published does not contain a BasePart");
            else
                l_Model_0.PrimaryPart = l_v3_FirstChildWhichIsA_0;
                v3 = l_Model_0;
            end;
        end;
        v7:dispatch(v1(v2.PublishAssetSingleStep, v3, v4, v5, v6));
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Actions.OpenPublishAvatarPrompt);
local v2 = require(l_Parent_0.PromptType);
return function(v3, v4, v5)
    return function(v6)
        v6:dispatch(v1(v2.PublishAvatar, v3, v4, v5));
    end;
end;


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


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


local l_CorePackages_0 = game:GetService("CorePackages");
local l_CoreGui_0 = game:GetService("CoreGui");
local v2 = require(script.Parent.Common.renderWithCoreScriptsStyleProvider);
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.Rodux);
local v5 = require(l_CorePackages_0.RoactRodux);
local v6 = require(script.Components.PublishAssetPromptApp);
local v7 = require(script.Reducer);
local v8 = require(script.ConnectAssetServiceEvents);
local v9 = {};
v9.__index = v9;
v9.new = function()
    local v10 = setmetatable({}, v9);
    v10.store = v4.Store.new(v7, nil, {
        v4.thunkMiddleware
    });
    v10.root = v3.createElement(v5.StoreProvider, {
        store = v10.store
    }, {
        ThemeProvider = v2({
            PublishAssetPromptApp = v3.createElement(v6)
        })
    });
    v10.element = v3.mount(v10.root, l_CoreGui_0, "PublishAssetPrompt");
    v10.serviceConnections = v8(v10.store);
    return v10;
end;
return v9.new();


return require(script.Parent.makeActionCreator)(script.Name, "robuxProductId", "productId", "robuxPurchaseAmount");


return require(script.Parent.makeActionCreator)(script.Name, "id", "equipIfPurchased", "isRobloxPurchase", "idempotencyKey", "purchaseAuthToken", "collectibleItemId", "collectibleItemInstanceId", "collectibleProductId", "expectedPrice");


local l_Parent_0 = script.Parent.Parent;
local v1 = require(script.Parent.makeActionCreator);
if not require(l_Parent_0.Parent.Flags.FFlagEnableUGC4ACollectiblePurchaseSupport) then
    return v1(script.Name, "id");
else
    return v1(script.Name, "id", "idempotencyKey", "purchaseAuthToken", "collectibleItemId", "collectibleItemInstanceId", "collectibleProductId", "expectedPrice");
end;


return require(script.Parent.makeActionCreator)(script.Name, "id", "equipIfPurchased");


return require(script.Parent.makeActionCreator)(script.Name, "key", "variation");


return require(script.Parent.makeActionCreator)(script.Name, "id", "infoType", "equipIfPurchased");


return function(v0, ...)
    local v1 = {
        ...
    };
    assert(type(v0) == "string", "Bad argument #1 to makeActionCreator, expected string");
    for v2 = 1, select("#", ...) do
        assert(typeof(select(v2, ...)) == "string", "Bad argument to makeActionCreator, all arguments must be of type string");
    end;
    return (setmetatable({
        name = v0
    }, {
        __call = function(_, ...)
            local v4 = {
                type = v0
            };
            assert(select("#", ...) == #v1, "Incorrect number of arguments provided to action creator " .. v0);
            for v5, v6 in ipairs(v1) do
                v4[v6] = select(v5, ...);
            end;
            return v4;
        end
    }));
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_GuiService_0 = game:GetService("GuiService");
local l_Roact_0 = require(game:GetService("CorePackages").PurchasePromptDeps).Roact;
local v3 = require(l_Parent_0.Thunks.retryAfterUpsell);
local v4 = require(l_Parent_0.connectToStore);
local v5 = require(script.Parent.ExternalEventConnection);
return (v4(nil, function(v6)
    return {
        onBrowserWindowClosed = function()
            v6(v3());
        end
    };
end)(function(v7)
    return l_Roact_0.createElement(v5, {
        event = l_GuiService_0.BrowserWindowClosed,
        callback = v7.onBrowserWindowClosed
    });
end));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_UserInputService_0 = game:GetService("UserInputService");
local l_Roact_0 = require(game:GetService("CorePackages").PurchasePromptDeps).Roact;
local v3 = require(l_Parent_0.Enums.UpsellFlow);
local v4 = require(l_Parent_0.NativeUpsell.getUpsellFlow);
local v5 = require(script.Parent.MarketplaceServiceEventConnector);
local v6 = require(script.Parent.InputTypeManager);
local v7 = require(script.Parent.BrowserPurchaseFinishedConnector);
local v8 = require(script.Parent.NativePurchaseFinishedConnector);
return function()
    local v9 = nil;
    local v10 = v4(l_UserInputService_0:GetPlatform());
    if v10 == v3.Web then
        v9 = l_Roact_0.createElement(v7);
    elseif v10 == v3.Mobile then
        v9 = l_Roact_0.createElement(v8);
    end;
    return l_Roact_0.createElement("Folder", {}, {
        MarketPlaceServiceEventConnector = l_Roact_0.createElement(v5),
        InputTypeManager = not not (l_UserInputService_0:GetPlatform() ~= Enum.Platform.XBoxOne) and l_Roact_0.createElement(v6) or nil,
        UpsellFinishedConnector = v9
    });
end;


local _ = script.Parent.Parent.Parent;
local l_Roact_0 = require(game:GetService("CorePackages").PurchasePromptDeps).Roact;
local v2 = l_Roact_0.Component:extend("ExternalEventConnection");
v2.init = function(v3)
    v3.connection = nil;
end;
v2.render = function(v4)
    return l_Roact_0.oneChild(v4.props[l_Roact_0.Children]);
end;
v2.didMount = function(v5)
    v5.connection = v5.props.event:Connect(v5.props.callback);
end;
v2.didUpdate = function(v6, v7)
    if not (v6.props.event == v7.event) or v6.props.callback ~= v7.callback then
        v6.connection:Disconnect();
        v6.connection = v6.props.event:Connect(v6.props.callback);
    end;
end;
v2.willUnmount = function(v8)
    if v8.connection then
        v8.connection:Disconnect();
        v8.connection = nil;
    end;
end;
return v2;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_Roact_0 = require(l_CorePackages_0.PurchasePromptDeps).Roact;
local v4 = require(l_CorePackages_0.InGameServices.MouseIconOverrideService);
local v5 = require(l_Parent_0.Actions.SetGamepadEnabled);
local v6 = require(l_Parent_0.Enums.PromptState);
local v7 = require(l_Parent_0.connectToStore);
local v8 = require(script.Parent.ExternalEventConnection);
local v9 = {
    [Enum.UserInputType.Gamepad1] = true,
    [Enum.UserInputType.Gamepad2] = true,
    [Enum.UserInputType.Gamepad3] = true,
    [Enum.UserInputType.Gamepad4] = true
};
local v10 = l_Roact_0.Component:extend("InputTypeManager");
v10.init = function(v11)
    local l_setGamepadEnabled_0 = v11.props.setGamepadEnabled;
    v11.dispatchOnChange = function(v13)
        local _ = nil;
        l_setGamepadEnabled_0(not not v9[v13] or false);
    end;
    v11.cursorOverridden = false;
end;
v10.render = function(v15)
    return l_Roact_0.createElement(v8, {
        event = l_UserInputService_0.LastInputTypeChanged,
        callback = v15.dispatchOnChange
    });
end;
v10.didUpdate = function(v16, v17, _)
    local v19 = false;
    if v17.promptState == v6.None then
        v19 = v16.props.promptState ~= v6.None;
    end;
    local v20 = false;
    if v17.promptState ~= v6.None then
        v20 = v16.props.promptState == v6.None;
    end;
    local v21 = v16.props.promptState ~= v6.None;
    local v22 = not not v16.props.gamepadEnabled and Enum.OverrideMouseIconBehavior.ForceHide or Enum.OverrideMouseIconBehavior.ForceShow;
    if v21 and v17.gamepadEnabled ~= v16.props.gamepadEnabled then
        if v16.cursorOverridden then
            v4.pop("PurchasePromptOverrideKey");
        end;
        v4.push("PurchasePromptOverrideKey", v22);
        v16.cursorOverridden = true;
        return ;
    elseif not v19 then
        if v20 then
            v4.pop("PurchasePromptOverrideKey");
            v16.cursorOverridden = false;
        end;
        return ;
    else
        v4.push("PurchasePromptOverrideKey", v22);
        v16.cursorOverridden = true;
        return ;
    end;
end;
return (v7(function(v23)
    return {
        promptState = v23.promptState,
        gamepadEnabled = v23.gamepadEnabled
    };
end, function(v24)
    return {
        setGamepadEnabled = function(v25)
            v24(v5(v25));
        end
    };
end)(v10));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Roact_0 = require(game:GetService("CorePackages").PurchasePromptDeps).Roact;
local v2 = require(l_Parent_0.Services.LayoutValues);
local v3 = require(script.Parent.LayoutValuesContext);
return function(v4)
    return l_Roact_0.createElement(v3.Provider, {
        value = v2.new(v4.isTenFootInterface).layout
    }, l_Roact_0.oneChild(v4[l_Roact_0.Children]));
end;


local l_Roact_0 = require(game:GetService("CorePackages").PurchasePromptDeps).Roact;
local v1 = require(script.Parent.LocalizationContext);
return function(v2)
    return l_Roact_0.createElement(v1.Provider, {
        value = v2.localizationContext
    }, l_Roact_0.oneChild(v2[l_Roact_0.Children]));
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(game:GetService("CorePackages").PurchasePromptDeps);
local l_Roact_0 = v1.Roact;
local l_t_0 = v1.t;
local v4 = require(l_Parent_0.Localization.LocalizationService);
local v5 = require(script.Parent.LocalizationContextConsumer);
local v6 = l_t_0.strictInterface({
    locKeys = l_t_0.table,
    render = l_t_0.callback
});
local v7 = l_t_0.strictInterface({
    key = l_t_0.string,
    params = l_t_0.optional(l_t_0.table)
});
return function(v8)
    assert(v6(v8));
    for _, v10 in pairs(v8.locKeys) do
        assert(v7(v10));
    end;
    local l_render_0 = v8.render;
    return l_Roact_0.createElement(v5, {
        render = function(v12)
            local v13 = {};
            for v14, v15 in pairs(v8.locKeys) do
                v13[v14] = v4.getString(v12, v15.key, v15.params);
            end;
            return l_render_0(v13);
        end
    });
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_MarketplaceService_0 = game:GetService("MarketplaceService");
local l_Roact_0 = require(game:GetService("CorePackages").PurchasePromptDeps).Roact;
local v3 = require(l_Parent_0.Actions.ErrorOccurred);
local v4 = require(l_Parent_0.Enums.PurchaseError);
local v5 = require(l_Parent_0.Thunks.retryAfterUpsell);
local v6 = require(l_Parent_0.connectToStore);
local v7 = require(l_Parent_0.Enums.Counter);
local v8 = require(l_Parent_0.Thunks.sendCounter);
local v9 = require(script.Parent.ExternalEventConnection);
return (v6(nil, function(v10)
    return {
        nativePurchaseFinished = function(_, _, v13)
            if not v13 then
                v10(v3(v4.InvalidFundsUnknown));
                v10(v8(v7.UpsellFailedNativePurchase));
                return ;
            else
                v10(v5());
                return ;
            end;
        end,
        nativePurchaseFinishedWithLocalPlayer = function(_, v15)
            if not v15 then
                v10(v3(v4.InvalidFundsUnknown));
                v10(v8(v7.UpsellFailedNativePurchase));
                return ;
            else
                v10(v5());
                return ;
            end;
        end
    };
end)(function(v16)
    local l_nativePurchaseFinished_0 = v16.nativePurchaseFinished;
    local l_nativePurchaseFinishedWithLocalPlayer_0 = v16.nativePurchaseFinishedWithLocalPlayer;
    if not game:GetEngineFeature("NativePurchaseWithLocalPlayer") then
        return l_Roact_0.createElement(v9, {
            event = l_MarketplaceService_0.NativePurchaseFinished,
            callback = l_nativePurchaseFinished_0
        });
    else
        return l_Roact_0.createFragment({
            NativePurchase = l_Roact_0.createElement(v9, {
                event = l_MarketplaceService_0.NativePurchaseFinished,
                callback = l_nativePurchaseFinished_0
            }),
            NativePurchaseWithLocalPlayer = l_Roact_0.createElement(v9, {
                event = l_MarketplaceService_0.NativePurchaseFinishedWithLocalPlayer,
                callback = l_nativePurchaseFinishedWithLocalPlayer_0
            })
        });
    end;
end));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Roact_0 = require(game:GetService("CorePackages").PurchasePromptDeps).Roact;
local v2 = require(l_Parent_0.Localization.LocalizationService);
local v3 = require(script.Parent.LocalizationContextConsumer);
return function(v4)
    local l_number_0 = v4.number;
    local l_render_0 = v4.render;
    assert(typeof(l_number_0) == "number", "prop 'number' must be provided");
    assert(typeof(l_render_0) == "function", "Render prop must be a function");
    return l_Roact_0.createElement(v3, {
        render = function(v7)
            return l_render_0(v2.formatNumber(v7, l_number_0));
        end
    });
end;


local l_PolicyProvider_0 = require(game:GetService("CorePackages").PurchasePromptDeps).PolicyProvider;
local v1 = l_PolicyProvider_0.withGetPolicyImplementation((l_PolicyProvider_0.GetPolicyImplementations.MemStorageService("app-policy")));
v1.Mapper = function(_)
    return {};
end;
return v1;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Roact_0 = require(game:GetService("CorePackages").PurchasePromptDeps).Roact;
local v2 = require(l_Parent_0.Localization.LocalizationService);
local v3 = require(script.Parent.LocalizationContextConsumer);
return function(v4)
    local l_locKey_0 = v4.locKey;
    local l_params_0 = v4.params;
    local l_render_0 = v4.render;
    assert(typeof(l_locKey_0) == "string", "String prop 'locKey' must be provided");
    assert(typeof(l_render_0) == "function", "Render prop must be a function");
    return l_Roact_0.createElement(v3, {
        render = function(v8)
            return l_render_0(v2.getString(v8, l_locKey_0, l_params_0));
        end
    });
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_LocalizationService_0 = game:GetService("LocalizationService");
local l_Roact_0 = require(game:GetService("CorePackages").PurchasePromptDeps).Roact;
local v3 = require(l_Parent_0.Localization.getLocalizationContext);
local v4 = require(script.Parent.LocalizationContextProvider);
return function(v5)
    return l_Roact_0.createElement(v4, {
        localizationContext = v3(l_LocalizationService_0.RobloxLocaleId)
    }, {
        PurchasePromptApp = v5()
    });
end;


local l_Roact_0 = require(game:GetService("CorePackages").PurchasePromptDeps).Roact;
local v1 = require(script.Parent.LayoutValuesContext);
return function(v2)
    assert(type(v2) == "function", "Expect withLayoutValues callback to be a function.");
    return l_Roact_0.createElement(v1.Consumer, {
        render = v2
    });
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_GuiService_0 = game:GetService("GuiService");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Roact_0 = require(l_CorePackages_0.PurchasePromptDeps).Roact;
local v4 = require(l_CorePackages_0.Packages.React);
local l_CoreGui_0 = game:GetService("CoreGui");
local l_RobloxGui_0 = l_CoreGui_0:WaitForChild("RobloxGui");
local v7 = require(l_RobloxGui_0.Modules.Common.CoreScriptsRootProvider);
local v8 = require(l_RobloxGui_0.Modules.Common.FocusNavigationEffectsWrapper);
local l_FocusNavigableSurfaceIdentifierEnum_0 = require(l_CorePackages_0.Workspace.Packages.FocusNavigationUtils).FocusNavigableSurfaceIdentifierEnum;
local v10 = require(l_Parent_0.Enums.RequestType);
local v11 = require(l_Parent_0.Thunks.completeRequest);
local v12 = require(l_Parent_0.Thunks.launchPremiumUpsell);
local v13 = require(l_Parent_0.Thunks.sendEvent);
local v14 = require(l_Parent_0.connectToStore);
local v15 = require(l_Parent_0.Components.Connection.ExternalEventConnection);
local v16 = require(script.Parent.PremiumUpsellOverlay);
local v17 = require(l_Parent_0.Flags.GetFFLagUseCoreScriptsRootProviderForUpsellModal);
local v18 = l_Roact_0.Component:extend(script.Name);
local v19 = require(l_Parent_0.Flags.GetFFlagFixPlayerGuiSelectionBugOnPromptExitPremium);
v18.init = function(v20)
    v20.state = {
        screenSize = Vector2.new(0, 0)
    };
    v20.changeScreenSize = function(v21)
        if v20.state.screenSize ~= v21.AbsoluteSize then
            v20:setState({
                screenSize = v21.AbsoluteSize
            });
        end;
    end;
    if v19() then
        v20.savedSelectedCoreObject = nil;
        v20.endPurchase = function()
            v20:restoreSelectedObject();
            v20.props.completeRequest();
        end;
    end;
end;
v18.saveSelectedObject = function(v22)
    if v19() then
        v22.savedSelectedCoreObject = l_GuiService_0.SelectedCoreObject;
        l_GuiService_0.SelectedCoreObject = nil;
        return ;
    else
        return ;
    end;
end;
v18.restoreSelectedObject = function(v23)
    if v19() then
        if not (v23.savedSelectedCoreObject ~= nil and not v23.savedSelectedCoreObject:IsDescendantOf(l_CoreGui_0)) then
            l_GuiService_0.SelectedCoreObject = v23.savedSelectedCoreObject;
        end;
        return ;
    else
        return ;
    end;
end;
v18.createElement = function(v24)
    local l_props_0 = v24.props;
    local l_state_0 = v24.state;
    if l_props_0.requestType ~= v10.Premium then
        return nil;
    else
        if v19() then
            v24:saveSelectedObject();
        end;
        return l_Roact_0.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            [l_Roact_0.Change.AbsoluteSize] = v24.changeScreenSize,
            BackgroundTransparency = 1
        }, {
            Prompt = l_Roact_0.createElement(v16, {
                screenSize = l_state_0.screenSize,
                promptState = l_props_0.promptState,
                purchaseError = l_props_0.purchaseError,
                currencySymbol = l_props_0.premiumProductInfo.currencySymbol,
                robuxPrice = l_props_0.premiumProductInfo.price,
                robuxAmount = l_props_0.premiumProductInfo.robuxAmount,
                isGamepadEnabled = l_props_0.isGamepadEnabled,
                promptPremiumPurchase = l_props_0.promptPremiumPurchase,
                endPurchase = if not v19() then l_props_0.completeRequest else v24.endPurchase,
                onAnalyticEvent = l_props_0.onAnalyticEvent
            }),
            ModalFix = l_Roact_0.createElement("ImageButton", {
                BackgroundTransparency = 0,
                Modal = true,
                Size = UDim2.new(0, 0, 0, 0)
            }),
            OnCoreGuiMenuOpened = l_Roact_0.createElement(v15, {
                event = l_GuiService_0.MenuOpened,
                callback = function()
                    l_props_0.completeRequest();
                end
            })
        });
    end;
end;
v18.render = function(v27)
    if not v17() then
        return v27:createElement();
    else
        return l_Roact_0.createElement(v7, {}, {
            FocusNavigationEffects = v4.createElement(v8, {
                selectionGroupName = "PremiumUpsellContainer",
                focusNavigableSurfaceIdentifier = l_FocusNavigableSurfaceIdentifierEnum_0.CentralOverlay
            }, {
                PremiumUpsellContainer = v27:createElement()
            })
        });
    end;
end;
return (v14(function(v28)
    return {
        requestType = v28.promptRequest.requestType,
        promptState = v28.promptState,
        purchaseError = v28.purchaseError,
        premiumProductInfo = v28.premiumProductInfo,
        isGamepadEnabled = v28.gamepadEnabled
    };
end, function(v29)
    return {
        promptPremiumPurchase = function()
            return v29(v12());
        end,
        completeRequest = function()
            return v29(v11());
        end,
        onAnalyticEvent = function(v30, v31)
            return v29(v13(v30, v31));
        end
    };
end)(v18));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_ContextActionService_0 = game:GetService("ContextActionService");
local v2 = require(game:GetService("CorePackages").PurchasePromptDeps);
local l_Roact_0 = v2.Roact;
local l_IAPExperience_0 = v2.IAPExperience;
local l_PremiumUpsellFlow_0 = l_IAPExperience_0.PurchaseFlow.PremiumUpsellFlow;
local l_PremiumUpsellFlowState_0 = l_IAPExperience_0.PurchaseFlow.PremiumUpsellFlowState;
local l_PurchaseErrorType_0 = l_IAPExperience_0.PurchaseFlow.PurchaseErrorType;
local v8 = require(l_Parent_0.Enums.PromptState);
local v9 = require(l_Parent_0.Enums.PurchaseError);
local v10 = l_Roact_0.PureComponent:extend(script.Name);
local _ = game:GetService("CoreGui"):WaitForChild("RobloxGui");
v10.init = function(v12)
    v12.confirmButtonPressed = function()
        local l_props_0 = v12.props;
        local l_promptState_0 = l_props_0.promptState;
        if l_promptState_0 == v8.PremiumUpsell then
            l_props_0.promptPremiumPurchase();
            return ;
        elseif l_promptState_0 == v8.PurchaseComplete then
            l_props_0.endPurchase();
            return ;
        elseif l_promptState_0 == v8.Error then
            l_props_0.endPurchase();
            return ;
        else
            return ;
        end;
    end;
    v12.cancelButtonPressed = function()
        v12.props.endPurchase();
    end;
end;
v10.didMount = function(v15)
    l_ContextActionService_0:BindCoreAction("PremiumPurchaseConfirmButtonBind", function(_, v17, _)
        if v17 == Enum.UserInputState.Begin then
            v15.confirmButtonPressed();
        end;
    end, false, Enum.KeyCode.ButtonA);
    l_ContextActionService_0:BindCoreAction("PremiumPurchaseCancelButtonBind", function(_, v20, _)
        if v20 == Enum.UserInputState.Begin then
            v15.cancelButtonPressed();
        end;
    end, false, Enum.KeyCode.ButtonB);
end;
v10.willUnmount = function(_)
    l_ContextActionService_0:UnbindCoreAction("PremiumPurchaseConfirmButtonBind");
    l_ContextActionService_0:UnbindCoreAction("PremiumPurchaseCancelButtonBind");
end;
v10.getFlowState = function(v23)
    local l_promptState_1 = v23.props.promptState;
    if l_promptState_1 == v8.PremiumUpsell then
        return l_PremiumUpsellFlowState_0.PurchaseModal;
    elseif l_promptState_1 == v8.Error then
        return l_PremiumUpsellFlowState_0.Error;
    else
        return l_PremiumUpsellFlowState_0.None;
    end;
end;
v10.getErrorType = function(v25)
    local l_props_1 = v25.props;
    if l_props_1.purchaseError == v9.AlreadyPremium then
        return l_PurchaseErrorType_0.AlreadyPremium;
    elseif l_props_1.purchaseError == v9.PremiumUnavailablePlatform then
        return l_PurchaseErrorType_0.PremiumPlatformUnavailable;
    else
        return l_PurchaseErrorType_0.Unknown;
    end;
end;
v10.render = function(v27)
    local l_props_2 = v27.props;
    return l_Roact_0.createElement(l_PremiumUpsellFlow_0, {
        screenSize = l_props_2.screenSize,
        isCatalog = false,
        currencySymbol = l_props_2.currencySymbol,
        robuxPrice = l_props_2.robuxPrice,
        robuxAmount = l_props_2.robuxAmount,
        purchaseState = v27:getFlowState(),
        errorType = v27:getErrorType(),
        acceptControllerIcon = if not l_props_2.isGamepadEnabled then nil else "rbxasset://textures/ui/Controls/DesignSystem/ButtonA.png",
        purchasePremium = l_props_2.promptPremiumPurchase,
        cancelPurchase = l_props_2.endPurchase,
        flowComplete = l_props_2.endPurchase,
        onAnalyticEvent = l_props_2.onAnalyticEvent,
        eventPrefix = "InGame"
    });
end;
return v10;


local _ = script.Parent.Parent.Parent;
local v1 = require(game:GetService("CorePackages").PurchasePromptDeps);
local l_Roact_0 = v1.Roact;
local l_Otter_0 = v1.Otter;
local l_t_0 = v1.t;
local v5 = l_Roact_0.Component:extend(script.Name);
local v6 = {
    dampingRatio = 1,
    frequency = 1.6
};
v5.validateProps = l_t_0.interface({
    shouldShow = l_t_0.boolean,
    onShown = l_t_0.optional(l_t_0.callback),
    onHidden = l_t_0.optional(l_t_0.callback)
});
v5.init = function(v7)
    local v8, v9 = l_Roact_0.createBinding(1);
    v7.motor = l_Otter_0.createSingleMotor(1);
    v7.motor:start();
    v7.motor:onStep(v9);
    v7.animationProgress = v8;
    v7.motor:onComplete(function()
        if not v7.props.shouldShow then
            if v7.props.onHidden then
                v7.props.onHidden();
            end;
        elseif v7.props.onShown then
            v7.props.onShown();
            return ;
        end;
    end);
    v7.motor:setGoal(l_Otter_0.spring(not v7.props.shouldShow and 1 or 0, v6));
end;
v5.didUpdate = function(v10, v11, _)
    if v11.shouldShow ~= v10.props.shouldShow then
        v10.motor:setGoal(l_Otter_0.spring(not v10.props.shouldShow and 1 or 0, v6));
    end;
end;
v5.render = function(v13)
    return l_Roact_0.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BorderSizePixel = 0,
        BackgroundTransparency = 1,
        Position = v13.animationProgress:map(function(v14)
            return UDim2.new(0, 0, -1 * v14, 0);
        end)
    }, v13.props[l_Roact_0.Children]);
end;
return v5;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_GuiService_0 = game:GetService("GuiService");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Roact_0 = require(l_CorePackages_0.PurchasePromptDeps).Roact;
local v4 = require(l_CorePackages_0.Packages.React);
local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local v6 = require(l_RobloxGui_0.Modules.Common.CoreScriptsRootProvider);
local v7 = require(l_RobloxGui_0.Modules.Common.FocusNavigationEffectsWrapper);
local l_FocusNavigableSurfaceIdentifierEnum_0 = require(l_CorePackages_0.Workspace.Packages.FocusNavigationUtils).FocusNavigableSurfaceIdentifierEnum;
local v9 = require(l_Parent_0.Enums.PurchaseFlow);
local v10 = require(l_Parent_0.Thunks.completeRequest);
local v11 = require(l_Parent_0.Thunks.purchaseItem);
local v12 = require(l_Parent_0.Thunks.launchRobuxUpsell);
local v13 = require(l_Parent_0.Thunks.openRobuxStore);
local v14 = require(l_Parent_0.Thunks.openSecuritySettings);
local v15 = require(l_Parent_0.Thunks.openTermsOfUse);
local v16 = require(l_Parent_0.Thunks.initiatePurchasePrecheck);
local v17 = require(l_Parent_0.Thunks.sendEvent);
local v18 = require(l_Parent_0.Utils.isMockingPurchases);
local v19 = require(l_Parent_0.Utils.getPlayerPrice);
local v20 = require(l_Parent_0.Utils.isLinksAllowed);
local v21 = require(l_Parent_0.connectToStore);
local v22 = require(l_Parent_0.Components.Connection.ExternalEventConnection);
local v23 = require(l_Parent_0.Flags.GetFFLagUseCoreScriptsRootProviderForUpsellModal);
local v24 = require(script.Parent.RobuxUpsellOverlay);
local v25 = l_Roact_0.Component:extend(script.Name);
v25.init = function(v26)
    v26.state = {
        screenSize = Vector2.new(0, 0)
    };
    v26.changeScreenSize = function(v27)
        if v26.state.screenSize ~= v27.AbsoluteSize then
            v26:setState({
                screenSize = v27.AbsoluteSize
            });
        end;
    end;
end;
v25.createElement = function(v28)
    local l_props_0 = v28.props;
    local l_state_0 = v28.state;
    if l_props_0.purchaseFlow ~= v9.RobuxUpsellV2 and l_props_0.purchaseFlow ~= v9.LargeRobuxUpsell then
        return nil;
    else
        local v31 = v20();
        local l_imageUrl_0 = l_props_0.productInfo.imageUrl;
        if string.find(l_props_0.productInfo.imageUrl, "assetid=0") then
            l_imageUrl_0 = nil;
        end;
        return l_Roact_0.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            [l_Roact_0.Change.AbsoluteSize] = v28.changeScreenSize,
            BackgroundTransparency = 1
        }, {
            Prompt = l_Roact_0.createElement(v24, {
                screenSize = l_state_0.screenSize,
                requestType = l_props_0.requestType,
                promptState = l_props_0.promptState,
                purchaseFlow = l_props_0.purchaseFlow,
                purchaseError = l_props_0.purchaseError,
                robuxProviderId = l_props_0.nativeUpsell.robuxProductId,
                robuxProductId = l_props_0.nativeUpsell.productId,
                itemIcon = l_imageUrl_0,
                itemName = l_props_0.productInfo.name,
                itemRobuxCost = v19(l_props_0.productInfo, l_props_0.accountInfo.membershipType == 4),
                iapRobuxAmount = l_props_0.nativeUpsell.robuxPurchaseAmount or 0,
                beforeRobuxBalance = l_props_0.accountInfo.balance,
                isTestPurchase = l_props_0.isTestPurchase,
                isGamepadEnabled = l_props_0.isGamepadEnabled,
                purchaseItem = l_props_0.purchaseItem,
                promptRobuxPurchase = l_props_0.promptRobuxPurchase,
                openRobuxStore = l_props_0.openRobuxStore,
                openTermsOfUse = not not v31 and l_props_0.openTermsOfUse or nil,
                openSecuritySettings = not not v31 and l_props_0.openSecuritySettings or nil,
                dispatchFetchPurchaseWarning = l_props_0.dispatchFetchPurchaseWarning,
                endPurchase = l_props_0.completeRequest,
                onAnalyticEvent = l_props_0.onAnalyticEvent
            }),
            ModalFix = l_Roact_0.createElement("ImageButton", {
                BackgroundTransparency = 0,
                Modal = true,
                Size = UDim2.new(0, 0, 0, 0)
            }),
            OnCoreGuiMenuOpened = l_Roact_0.createElement(v22, {
                event = l_GuiService_0.MenuOpened,
                callback = function()
                    l_props_0.completeRequest();
                end
            })
        });
    end;
end;
v25.render = function(v33)
    if not v23() then
        return v33:createElement();
    else
        return l_Roact_0.createElement(v6, {}, {
            FocusNavigationEffects = v4.createElement(v7, {
                selectionGroupName = "RobuxUpsellContainer",
                focusNavigableSurfaceIdentifier = l_FocusNavigableSurfaceIdentifierEnum_0.CentralOverlay
            }, {
                RobuxUpsellContainer = v33:createElement()
            })
        });
    end;
end;
return (v21(function(v34)
    return {
        purchaseFlow = v34.purchaseFlow,
        requestType = v34.promptRequest.requestType,
        promptState = v34.promptState,
        purchaseError = v34.purchaseError,
        productInfo = v34.productInfo,
        accountInfo = v34.accountInfo,
        nativeUpsell = v34.nativeUpsell,
        isTestPurchase = v18(),
        isGamepadEnabled = v34.gamepadEnabled
    };
end, function(v35)
    return {
        purchaseItem = function()
            return v35(v11());
        end,
        promptRobuxPurchase = function()
            return v35(v12());
        end,
        openRobuxStore = function()
            return v35(v13());
        end,
        openSecuritySettings = function()
            return v35(v14());
        end,
        openTermsOfUse = function()
            return v35(v15());
        end,
        dispatchFetchPurchaseWarning = function()
            return v35(v16());
        end,
        completeRequest = function()
            l_GuiService_0.SelectedCoreObject = nil;
            return v35(v10());
        end,
        onAnalyticEvent = function(v36, v37)
            return v35(v17(v36, v37));
        end
    };
end)(v25));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Players_0 = game:GetService("Players");
local l_ContextActionService_0 = game:GetService("ContextActionService");
local l_AssetService_0 = game:GetService("AssetService");
local v4 = require(game:GetService("CorePackages").PurchasePromptDeps);
local l_Roact_0 = v4.Roact;
local _ = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local l_IAPExperience_0 = v4.IAPExperience;
local l_RobuxUpsellFlow_0 = l_IAPExperience_0.PurchaseFlow.RobuxUpsellFlow;
local l_RobuxUpsellFlowState_0 = l_IAPExperience_0.PurchaseFlow.RobuxUpsellFlowState;
local l_U13ConfirmType_0 = l_IAPExperience_0.PurchaseFlow.U13ConfirmType;
local l_PurchaseErrorType_0 = l_IAPExperience_0.PurchaseFlow.PurchaseErrorType;
local v12 = require(l_Parent_0.Enums.PromptState);
local v13 = require(l_Parent_0.Enums.PurchaseError);
local v14 = require(l_Parent_0.connectToStore);
local v15 = l_Roact_0.PureComponent:extend(script.Name);
local v16 = require(l_Parent_0.Flags.GetFFlagDisablePurchasePromptFunctionForMaquettes);
local v17 = require(l_Parent_0.Flags.GetFFlagEnableAvatarCreationFeePurchase);
local v18 = require(l_Parent_0.Enums.PaymentPlatform);
local v19 = require(l_Parent_0.Utils.getPaymentPlatform);
local v20 = require(l_Parent_0.Services.ExternalSettings);
v15.init = function(v21)
    v21.state = {
        canAcceptInput = false
    };
    v21.dispatchFetchPurchaseWarning = function()
        return v21.props.dispatchFetchPurchaseWarning(v21.props.robuxProviderId);
    end;
    v21.promptRobuxPurchase = function()
        local l_props_0 = v21.props;
        v21.props.promptRobuxPurchase(v21.props.networking, l_props_0.robuxProviderId, l_props_0.robuxProductId);
    end;
    v21.onDelayedInputComplete = function()
        v21:setState({
            canAcceptInput = true
        });
    end;
    v21.canAcceptInput = function()
        local l_state_0 = v21.state;
        if (not l_Players_0 or not l_Players_0.LocalPlayer) or not l_Players_0.LocalPlayer.GameplayPaused then
            return l_state_0.canAcceptInput;
        else
            return false;
        end;
    end;
    v21.confirmButtonPressed = function()
        local l_props_1 = v21.props;
        local l_promptState_0 = l_props_1.promptState;
        local l_purchaseError_0 = l_props_1.purchaseError;
        if v21.canAcceptInput() then
            if l_promptState_0 == v12.RobuxUpsell then
                l_props_1.dispatchFetchPurchaseWarning();
                return ;
            elseif l_promptState_0 == v12.LargeRobuxUpsell then
                l_props_1.openRobuxStore();
                return ;
            elseif not ((l_promptState_0 ~= v12.U13PaymentModal and l_promptState_0 ~= v12.U13MonthlyThreshold1Modal) and l_promptState_0 ~= v12.U13MonthlyThreshold2Modal) or l_promptState_0 == v12.ParentalConsentWarningPaymentModal13To17 then
                l_props_1.promptRobuxPurchase();
                return ;
            elseif l_promptState_0 == v12.PurchaseComplete then
                l_props_1.endPurchase();
                return ;
            elseif l_promptState_0 == v12.Error then
                if not (l_purchaseError_0 ~= v13.TwoFactorNeeded) or l_purchaseError_0 == v13.TwoFactorNeededSettings then
                    l_props_1.openSecuritySettings();
                    return ;
                else
                    l_props_1.endPurchase();
                    return ;
                end;
            else
                return ;
            end;
        else
            return ;
        end;
    end;
    v21.cancelButtonPressed = function()
        v21.props.endPurchase();
    end;
end;
v15.didMount = function(v27)
    l_ContextActionService_0:BindCoreAction("ProductPurchaseConfirmButtonBind", function(_, v29, _)
        if v29 == Enum.UserInputState.Begin then
            v27.confirmButtonPressed();
        end;
    end, false, Enum.KeyCode.ButtonA);
    l_ContextActionService_0:BindCoreAction("ProductPurchaseCancelButtonBind", function(_, v32, _)
        if v32 == Enum.UserInputState.Begin then
            v27.cancelButtonPressed();
        end;
    end, false, Enum.KeyCode.ButtonB);
end;
v15.willUnmount = function(_)
    l_ContextActionService_0:UnbindCoreAction("ProductPurchaseConfirmButtonBind");
    l_ContextActionService_0:UnbindCoreAction("ProductPurchaseCancelButtonBind");
end;
v15.getFlowState = function(v35)
    local l_props_2 = v35.props;
    local l_promptState_1 = l_props_2.promptState;
    local l_purchaseError_1 = l_props_2.purchaseError;
    if l_promptState_1 == v12.RobuxUpsell then
        return l_RobuxUpsellFlowState_0.PurchaseModal;
    elseif l_promptState_1 == v12.LargeRobuxUpsell then
        return l_RobuxUpsellFlowState_0.LargeRobuxPurchaseModal;
    elseif l_promptState_1 == v12.PurchaseInProgress then
        return l_RobuxUpsellFlowState_0.ItemPurchasePending;
    elseif l_promptState_1 == v12.UpsellInProgress then
        return l_RobuxUpsellFlowState_0.RobuxPurchasePending;
    elseif l_promptState_1 == v12.PollingBalance then
        return l_RobuxUpsellFlowState_0.RobuxGrantPending;
    elseif l_promptState_1 == v12.U13PaymentModal then
        return l_RobuxUpsellFlowState_0.PurchaseWarning;
    elseif l_promptState_1 == v12.U13MonthlyThreshold1Modal then
        return l_RobuxUpsellFlowState_0.PurchaseWarning;
    elseif l_promptState_1 == v12.U13MonthlyThreshold2Modal then
        return l_RobuxUpsellFlowState_0.PurchaseWarning;
    elseif l_promptState_1 == v12.PurchaseComplete then
        return l_RobuxUpsellFlowState_0.Success;
    elseif l_promptState_1 == v12.Error then
        if not (l_purchaseError_1 ~= v13.TwoFactorNeeded) or l_purchaseError_1 == v13.TwoFactorNeededSettings then
            return l_RobuxUpsellFlowState_0.TwoStepRequired;
        else
            return l_RobuxUpsellFlowState_0.Error;
        end;
    else
        return l_RobuxUpsellFlowState_0.None;
    end;
end;
v15.getU13ConfirmType = function(v39)
    local l_promptState_2 = v39.props.promptState;
    if l_promptState_2 == v12.U13PaymentModal then
        return l_U13ConfirmType_0.U13PaymentModal;
    elseif l_promptState_2 == v12.U13MonthlyThreshold1Modal then
        return l_U13ConfirmType_0.U13MonthlyThreshold1Modal;
    elseif l_promptState_2 == v12.U13MonthlyThreshold2Modal then
        return l_U13ConfirmType_0.U13MonthlyThreshold2Modal;
    elseif l_promptState_2 == v12.ParentalConsentWarningPaymentModal13To17 then
        return l_U13ConfirmType_0.ParentalConsentWarningPaymentModal13To17;
    else
        return l_U13ConfirmType_0.None;
    end;
end;
v15.getErrorType = function(v41)
    local l_props_3 = v41.props;
    if l_props_3.purchaseError == v13.AlreadyOwn then
        return l_PurchaseErrorType_0.AlreadyOwn;
    elseif not (l_props_3.purchaseError ~= v13.NotEnoughRobux and l_props_3.purchaseError ~= v13.NotEnoughRobuxXbox) or l_props_3.purchaseError == v13.NotEnoughRobuxNoUpsell then
        return l_PurchaseErrorType_0.NotEnoughRobux;
    elseif l_props_3.purchaseError == v13.Limited then
        return l_PurchaseErrorType_0.Limited;
    elseif l_props_3.purchaseError == v13.NotForSale then
        return l_PurchaseErrorType_0.NotForSale;
    elseif l_props_3.purchaseError == v13.NotForSaleHere then
        return l_PurchaseErrorType_0.NotForSaleExperience;
    elseif l_props_3.purchaseError == v13.PremiumOnly then
        return l_PurchaseErrorType_0.PremiumOnly;
    elseif l_props_3.purchaseError == v13.ThirdPartyDisabled then
        return l_PurchaseErrorType_0.ThirdPartyDisabled;
    elseif l_props_3.purchaseError == v13.Under13 then
        return l_PurchaseErrorType_0.Under13;
    elseif l_props_3.purchaseError == v13.InvalidFunds then
        return l_PurchaseErrorType_0.FailedGrant;
    elseif l_props_3.purchaseError == v13.InvalidFundsUnknown then
        return l_PurchaseErrorType_0.FailedGrantUnknown;
    else
        return l_PurchaseErrorType_0.Unknown;
    end;
end;
v15.render = function(v43)
    local l_props_4 = v43.props;
    return l_Roact_0.createElement(l_RobuxUpsellFlow_0, {
        screenSize = l_props_4.screenSize,
        shouldAnimate = true,
        isDelayedInput = true,
        onDelayedInputComplete = v43.onDelayedInputComplete,
        model = if not l_props_4.serializedModel then nil else l_AssetService_0:DeserializeInstance(l_props_4.serializedModel),
        itemIcon = l_props_4.itemIcon,
        itemName = l_props_4.itemName,
        itemRobuxCost = l_props_4.itemRobuxCost,
        iapRobuxAmount = l_props_4.iapRobuxAmount,
        beforeRobuxBalance = l_props_4.beforeRobuxBalance,
        purchaseState = v43:getFlowState(),
        errorType = v43:getErrorType(),
        u13ConfirmType = v43:getU13ConfirmType(),
        acceptControllerIcon = if not l_props_4.isGamepadEnabled then nil else "rbxasset://textures/ui/Controls/DesignSystem/ButtonA.png",
        cancelControllerIcon = if not l_props_4.isGamepadEnabled then nil else "rbxasset://textures/ui/Controls/DesignSystem/ButtonB.png",
        purchaseRobux = v43.dispatchFetchPurchaseWarning,
        acceptPurchaseWarning = v43.promptRobuxPurchase,
        openBuyRobux = l_props_4.openRobuxStore,
        showTermsOfUse = l_props_4.openTermsOfUse,
        openSecuritySettings = l_props_4.openSecuritySettings,
        cancelPurchase = l_props_4.endPurchase,
        flowComplete = l_props_4.endPurchase,
        onAnalyticEvent = l_props_4.onAnalyticEvent,
        eventPrefix = "InGame",
        isQuest = v16() and v19(v20.new().getPlatform()) == v18.Maquettes
    });
end;
if v17() then
    v15 = v14(function(v45)
        return {
            serializedModel = v45.promptRequest.serializedModel
        };
    end, nil)(v15);
end;
return v15;