local l_script_FirstAncestor_0 = script:FindFirstAncestor("TnSAvatarIdentification");
local v1 = require(l_script_FirstAncestor_0.Flags.GetFFlagReportAnythingFixConvexHullCalculation);
local v2 = require(l_script_FirstAncestor_0.Flags.GetFFlagReportAnythingAvatarIdentificationEdgeCaseFix);
local v3 = require(l_script_FirstAncestor_0.Flags.GetFIntReportAnythingAvatarIdentificationCloseDiscardDistanceHundredths);
local v4 = require(l_script_FirstAncestor_0.Flags.GetFIntReportAnythingAvatarIdentificationDiscardFractionSkipThresholdPercent);
local v5 = require(l_script_FirstAncestor_0.Flags.GetFIntReportAnythingAvatarIdentificationOffScreenDiscardDistancePercent);
local l_Players_0 = game:GetService("Players");
local v7 = v3() / 100;
local v8 = v5() / 100;
local v9 = v4() / 100;
local v10 = {};
shouldIgnoreLocalCharacter = function(v11)
    local l_Head_0 = v11:FindFirstChild("Head");
    if not l_Head_0 or not l_Head_0:IsA("BasePart") then
        return false;
    else
        return l_Head_0.LocalTransparencyModifier >= 0.95;
    end;
end;
getLocalCharacterPosition = function(v13)
    local l_HumanoidRootPart_0 = v13:FindFirstChild("HumanoidRootPart");
    if l_HumanoidRootPart_0 then
        return l_HumanoidRootPart_0.Position;
    else
        return nil;
    end;
end;
getBBCorners = function(v15, v16)
    local v17 = table.create(8);
    local l_XVector_0 = v15.XVector;
    local l_YVector_0 = v15.YVector;
    local l_ZVector_0 = v15.ZVector;
    local v21 = 1;
    for v22 = -0.5, 0.5 do
        local v23 = (l_XVector_0 * v22) * v16.X;
        for v24 = -0.5, 0.5 do
            local v25 = (l_YVector_0 * v24) * v16.Y;
            for v26 = -0.5, 0.5 do
                v17[v21] = ((v15.Position + v23) + v25) + (l_ZVector_0 * v26) * v16.Z;
                v21 = v21 + 1;
            end;
        end;
    end;
    return v17;
end;
local v27 = Vector2.new(0, 0);
local v28 = Vector2.new(math.huge, math.huge);
getCoveringPolygon = function(v29, v30, _)
    local l_ViewportSize_0 = v30.ViewportSize;
    local v33 = {};
    for _, v35 in ipairs(v29) do
        local l_target_0 = v35.target;
        for _, v38 in (getBBCorners(l_target_0.ExtentsCFrame, l_target_0.ExtentsSize)), nil, nil do
            table.insert(v33, v38);
        end;
    end;
    local v39 = table.create(#v33);
    for v40, v41 in ipairs(v33) do
        local v42, _ = v30:WorldToViewportPoint(v41);
        v39[v40] = Vector2.new(v42.X, v42.Y) / l_ViewportSize_0;
    end;
    return getConvexHull(v39);
end;
local v44 = v8 + 1;
local v45 = -v8;
local function _(v46)
    local v47 = true;
    if v44 >= v46.Y then
        v47 = true;
        if v46.Y >= v45 then
            v47 = true;
            if v44 >= v46.X then
                v47 = v46.X < v45;
            end;
        end;
    end;
    return v47;
end;
local v49 = {
    total = 0,
    offScreenDiscardCount = 0,
    tooCloseDiscardCount = 0,
    wasSkipped = false
};
getCoveringPolygon2 = function(v50, v51)
    if #v50 == 0 then
        return {}, v49;
    else
        local l_ViewportSize_1 = v51.ViewportSize;
        local v53 = {};
        for _, v55 in ipairs(v50) do
            local l_target_1 = v55.target;
            for _, v58 in (getBBCorners(l_target_1.ExtentsCFrame, l_target_1.ExtentsSize)), nil, nil do
                table.insert(v53, v58);
            end;
        end;
        local v59 = {};
        local v60 = 0;
        local v61 = 0;
        for _, v63 in ipairs(v53) do
            local v64, _ = v51:WorldToViewportPoint(v63);
            local v66 = Vector2.new(v64.X, v64.Y) / l_ViewportSize_1;
            if v64.Z < v7 then
                v60 = v60 + 1;
            else
                local v67 = true;
                if v44 >= v66.Y then
                    v67 = true;
                    if v66.Y >= v45 then
                        v67 = true;
                        if v44 >= v66.X then
                            v67 = v66.X < v45;
                        end;
                    end;
                end;
                if not v67 then
                    v59[#v59 + 1] = v66;
                else
                    v61 = v61 + 1;
                end;
            end;
        end;
        local v68 = {
            total = #v53,
            offScreenDiscardCount = v61,
            tooCloseDiscardCount = v60,
            wasSkipped = false
        };
        if v9 < (v60 + v61) / #v53 then
            v68.wasSkipped = true;
            return {}, v68;
        else
            return getConvexHull(v59), v68;
        end;
    end;
end;
getViewportCorners = function(v69, v70)
    local l_v28_0 = v28;
    local l_v27_0 = v27;
    local l_ViewportSize_2 = v70.ViewportSize;
    local v74 = 0;
    for _, v76 in ipairs(v69) do
        local v77, v78 = v70:WorldToViewportPoint(v76);
        local v79 = Vector2.new(v77.X / l_ViewportSize_2.X, v77.Y / l_ViewportSize_2.Y);
        if not v78 then
            v79 = Vector2.new(math.clamp(v79.X, 0, 1), (math.clamp(v79.Y, 0, 1)));
        end;
        if not v1() then
            v74 = v74 + 1;
        elseif v78 then
            v74 = v74 + 1;
        end;
        l_v28_0 = l_v28_0:Min(v79);
        l_v27_0 = l_v27_0:Max(v79);
    end;
    if v74 <= 2 then
        return v28, v27;
    else
        return l_v28_0, l_v27_0;
    end;
end;
getDistanceAlongCamLookVector = function(v80, v81)
    local l_CFrame_0 = v81.CFrame;
    return ((v80.Position - l_CFrame_0.Position):Dot(l_CFrame_0.LookVector));
end;
getVisibleParts = function(v83, v84, v85)
    local l_Position_0 = v83.CFrame.Position;
    local l_Character_0 = v84.Character;
    if l_Character_0 and l_Character_0.Parent then
        local l_l_Character_0_Children_0 = l_Character_0:GetChildren();
        local v89 = RaycastParams.new();
        v89.FilterType = Enum.RaycastFilterType.Exclude;
        v89.FilterDescendantsInstances = v85;
        v89.IgnoreWater = true;
        local v90 = 0;
        local v91 = {};
        for _, v93 in ipairs(l_l_Character_0_Children_0) do
            if v93:IsA("BasePart") then
                local v94 = v93.CFrame.Position - l_Position_0;
                v90 = v90 + 1;
                local v95 = workspace:Raycast(l_Position_0, v94, v89);
                if not (not v95 or not v95.Instance:IsDescendantOf(l_Character_0)) then
                    table.insert(v91, {
                        result = v95,
                        target = v93
                    });
                end;
            end;
        end;
        return v90, v91;
    else
        return 0, {};
    end;
end;
local function _(v96, v97, v98)
    return (v97 - v96):Cross(v98 - v97);
end;
getConvexHull = function(v100)
    if #v100 <= 2 then
        return {};
    else
        local v101 = {};
        local v102 = v100[1];
        local v103 = {};
        for v104 = 2, #v100 do
            local v105 = v100[v104];
            if not (v105.Y >= v102.Y) or v105.Y == v102.Y and v105.X < v102.X then
                v102 = v105;
            end;
        end;
        table.insert(v101, v102);
        local function _(v106)
            local v107 = v106 - v102;
            return (math.atan2(v107.Y, v107.X));
        end;
        for _, v110 in ipairs(v100) do
            if v110 ~= v102 then
                local l_X_0 = v110.X;
                local l_Y_0 = v110.Y;
                local v113 = v110 - v102;
                table.insert(v103, (Vector3.new(l_X_0, l_Y_0, (math.atan2(v113.Y, v113.X)))));
            end;
        end;
        table.sort(v103, function(v114, v115)
            if v114.Z ~= v115.Z then
                return v114.Z < v115.Z;
            else
                return (Vector2.new(v114.X, v114.Y) - v102).Magnitude < (Vector2.new(v115.X, v115.Y) - v102).Magnitude;
            end;
        end);
        local v116 = {};
        local v117 = v103[1];
        for v118 = 2, #v103 do
            local v119 = v103[v118];
            if v117.Z == v119.Z then
                v117 = v119;
            else
                table.insert(v116, Vector2.new(v117.X, v117.Y));
                v117 = v119;
            end;
        end;
        table.insert(v116, Vector2.new(v117.X, v117.Y));
        if #v116 == 1 then
            return {};
        else
            table.insert(v101, v116[1]);
            table.insert(v101, v116[2]);
            for v120 = 3, #v116 do
                local v121 = v116[v120];
                while #v101 > 1 do
                    local v122 = v101[#v101 - 1];
                    local v123 = v101[#v101];
                    if (v123 - v122):Cross(v121 - v123) <= 0 then
                        table.remove(v101);
                    else
                        break;
                    end;
                end;
                table.insert(v101, v121);
            end;
            return v101;
        end;
    end;
end;
projectVertices = function(v124, v125, v126)
    local l_huge_0 = math.huge;
    local v128 = -math.huge;
    for _, v130 in ipairs(v124) do
        local v131 = (v130 * v126):Dot(v125);
        if v131 < l_huge_0 then
            l_huge_0 = v131;
        end;
        if v128 < v131 then
            v128 = v131;
        end;
    end;
    return l_huge_0, v128;
end;
projectCircle = function(v132, v133, v134)
    local v135 = v134.Unit * v133;
    local v136 = v132 + v135;
    local v137 = v132 - v135;
    local v138 = v136:Dot(v134);
    local v139 = v137:Dot(v134);
    if v139 < v138 then
        local l_v138_0 = v138;
        v138 = v139;
        v139 = l_v138_0;
    end;
    return v138, v139;
end;
getClosestPoint = function(v141, v142, v143)
    local v144 = -1;
    local l_huge_1 = math.huge;
    for v146, v147 in ipairs(v142) do
        v147 = v147 * v143;
        local v148 = math.sqrt(math.pow(v147.X - v141.X, 2) + math.pow(v147.Y - v141.Y, 2));
        if v148 < l_huge_1 then
            l_huge_1 = v148;
            v144 = v146;
        end;
    end;
    return v144;
end;
intersectCirclePolygon = function(v149, v150, v151, v152)
    for v153, _ in ipairs(v151) do
        local v155 = v151[v153 % #v151 + 1] * v152 - v151[v153] * v152;
        local l_Unit_0 = Vector2.new(v155.Y, -v155.X).Unit;
        local v157, v158 = projectVertices(v151, l_Unit_0, v152);
        local v159, v160 = projectCircle(v149, v150, l_Unit_0);
        if not (v160 > v157) or v158 <= v159 then
            return false;
        end;
    end;
    local v161 = getClosestPoint(v149, v151, v152);
    if v161 == -1 then
        return false;
    else
        local l_Unit_1 = (v151[v161] - v149).Unit;
        local v163, v164 = projectVertices(v151, l_Unit_1, v152);
        local v165, v166 = projectCircle(v149, v150, l_Unit_1);
        if not (v166 > v163) or v164 <= v165 then
            return false;
        else
            return true;
        end;
    end;
end;
intersectCircleBox = function(v167, v168, v169, v170, _)
    local l_X_1 = v167.X;
    local l_Y_1 = v167.Y;
    local l_l_X_1_0 = l_X_1;
    local l_l_Y_1_0 = l_Y_1;
    local l_X_2 = v169.X;
    local l_Y_2 = v169.Y;
    local v178 = v170.X - v169.X;
    local v179 = v170.Y - v169.Y;
    if l_X_1 < l_X_2 then
        l_l_X_1_0 = l_X_2;
    elseif l_X_2 + v178 < l_X_1 then
        l_l_X_1_0 = l_X_2 + v178;
    end;
    if l_Y_1 < l_Y_2 then
        l_l_Y_1_0 = l_Y_2;
    elseif l_Y_2 + v179 < l_Y_1 then
        l_l_Y_1_0 = l_Y_2 + v179;
    end;
    local v180 = l_X_1 - l_l_X_1_0;
    local v181 = l_Y_1 - l_l_Y_1_0;
    if math.sqrt(v180 * v180 + v181 * v181) <= v168 then
        return true;
    else
        return false;
    end;
end;
v10.getAvatarsForRegion = function(v182, v183, v184, v185, v186)
    local v187 = {};
    local v188 = v186 < v185;
    local v189 = if not v188 then v186 / v185 else v185 / v186;
    local v190 = nil;
    v190 = if not v188 then Vector2.new(1, v189) else Vector2.new(v189, 1);
    for _, v192 in pairs(v182) do
        if not (not (intersectCircleBox(v183 * v190, v184 * v189, v192.boundingBox.min * v190, v192.boundingBox.max * v190, v190) and #v192.convexHull >= 3) or not intersectCirclePolygon(v183 * v190, v184 * v189, v192.convexHull, v190)) then
            v187[v192.player.UserId] = v192.player;
        end;
    end;
    return v187;
end;
v10.getAvatarsForPoint = function(v193, v194)
    local v195 = {};
    for _, v197 in pairs(v193) do
        local l_boundingBox_0 = v197.boundingBox;
        if ((v194.X >= l_boundingBox_0.min.X and v194.Y >= l_boundingBox_0.min.Y) and l_boundingBox_0.max.X >= v194.X) and l_boundingBox_0.max.Y >= v194.Y then
            local l_convexHull_0 = v197.convexHull;
            if #l_convexHull_0 >= 3 then
                local v200 = l_convexHull_0[#l_convexHull_0];
                local v201 = true;
                local v202 = true;
                for _, v204 in ipairs(l_convexHull_0) do
                    local v205 = (v204 - v200):Cross(v194 - v200);
                    v202 = v202 and v205 <= 0;
                    v201 = v201 and v205 >= 0;
                    v200 = v204;
                end;
                if not (not v201 and not v202) then
                    v195[v197.player.UserId] = v197.player;
                end;
            end;
        end;
    end;
    return v195;
end;
v10.getVisibleAvatars = function()
    local l_l_Players_0_Players_0 = l_Players_0:GetPlayers();
    local v207 = {
        totalPlayers = 0,
        checkedPlayers = 0,
        duration = 0
    };
    local l_CurrentCamera_0 = workspace.CurrentCamera;
    if l_CurrentCamera_0 then
        local l_LocalPlayer_0 = l_Players_0.LocalPlayer;
        if l_LocalPlayer_0 then
            local l_Character_1 = l_LocalPlayer_0.Character;
            local v211 = nil;
            local v212 = nil;
            local v213 = {};
            if not l_Character_1 then
                v211 = l_CurrentCamera_0.CFrame.Position;
                v212 = false;
            else
                v211 = getLocalCharacterPosition(l_Character_1) or l_CurrentCamera_0.CFrame.Position;
                if shouldIgnoreLocalCharacter(l_Character_1) then
                    v213[#v213 + 1] = l_Character_1;
                end;
            end;
            local v214 = {};
            local v215 = os.clock();
            v207.totalPlayers = #l_l_Players_0_Players_0 - 1;
            local function _()
                v207.duration = os.clock() - v215;
                return v207;
            end;
            local function _()
                return os.clock() - v215 > 0.5;
            end;
            for _, v219 in ipairs(l_l_Players_0_Players_0) do
                if not (not (v219 ~= l_LocalPlayer_0) or not v219.Character) then
                    if not (os.clock() - v215 > 0.5) then
                        local l_BoundingBox_0, v221 = v219.Character:GetBoundingBox();
                        local l_Magnitude_0 = (l_BoundingBox_0.Position - v211).Magnitude;
                        if getDistanceAlongCamLookVector(l_BoundingBox_0, l_CurrentCamera_0) < 0 then
                            v207.checkedPlayers = v207.checkedPlayers + 1;
                        else
                            local v223, v224 = getViewportCorners(getBBCorners(l_BoundingBox_0, v221), l_CurrentCamera_0);
                            if not (v224.X ~= 0) or v224.Y == 0 then
                                v207.checkedPlayers = v207.checkedPlayers + 1;
                            else
                                local v225, v226 = getVisibleParts(l_CurrentCamera_0, v219, v213);
                                if not (os.clock() - v215 > 0.5) then
                                    local v227 = #v226 / v225;
                                    if not v2() then
                                        v214[v219.UserId] = {
                                            player = v219,
                                            distance = l_Magnitude_0,
                                            boundingBox = {
                                                min = v223,
                                                max = v224
                                            },
                                            hitRate = v227,
                                            convexHull = getCoveringPolygon(v226, l_CurrentCamera_0, l_Character_1)
                                        };
                                    else
                                        local v228, v229 = getCoveringPolygon2(v226, l_CurrentCamera_0);
                                        v214[v219.UserId] = {
                                            player = v219,
                                            distance = l_Magnitude_0,
                                            boundingBox = {
                                                min = v223,
                                                max = v224
                                            },
                                            hitRate = v227,
                                            convexHull = v228,
                                            pointProcessingStats = v229
                                        };
                                    end;
                                    v207.checkedPlayers = v207.checkedPlayers + 1;
                                else
                                    local l_v214_0 = v214;
                                    v207.duration = os.clock() - v215;
                                    return l_v214_0, v207;
                                end;
                            end;
                        end;
                    else
                        local l_v214_1 = v214;
                        v207.duration = os.clock() - v215;
                        return l_v214_1, v207;
                    end;
                end;
            end;
            local l_v214_2 = v214;
            v207.duration = os.clock() - v215;
            return l_v214_2, v207;
        else
            return {}, v207;
        end;
    else
        return {}, v207;
    end;
end;
return v10;


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


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


game:DefineFastInt("ReportAnythingAvatarIdentificationCloseDiscardDistanceHundredths", 50);
return function()
    return game:GetFastInt("ReportAnythingAvatarIdentificationCloseDiscardDistanceHundredths");
end;


game:DefineFastInt("ReportAnythingAvatarIdentificationOffScreenDiscardDistancePercent", 30);
return function()
    return game:GetFastInt("ReportAnythingAvatarIdentificationOffScreenDiscardDistancePercent");
end;


return {
    AvatarIdentification = require(script.AvatarIdentification)
};


local function _()
    return game:GetEngineFeature("ReportAnythingScreenshot") and game:GetEngineFeature("ReportAnythingScreenshotUploadedSignal");
end;
local v1 = {};
v1.__index = v1;
local v2 = {};
local v3 = {};
local v4 = false;
local v5 = {
    RAABTestReason = "RAABTest"
};
local function v13(v6)
    v6.ScreenshotUploaded:Connect(function(v7, v8)
        local v9 = v2[v7];
        if v9 then
            v9(v8);
            table.remove(v2, v7);
            return ;
        else
            return ;
        end;
    end);
    v6.ScreenshotContentReady:Connect(function(v10, v11)
        local v12 = v3[v10];
        if v12 then
            v12(v11);
            table.remove(v3, v10);
            return ;
        else
            return ;
        end;
    end);
    v4 = true;
end;
v1.TakeScreenshotWithCallback = function(_, v15, v16)
    if game:GetEngineFeature("ReportAnythingScreenshot") and game:GetEngineFeature("ReportAnythingScreenshotUploadedSignal") then
        local l_SafetyService_0 = game:GetService("SafetyService");
        local v18 = l_SafetyService_0:TakeScreenshot({
            registerContent = v16 ~= nil and 1 or 0,
            reason = v5.RAABTestReason
        });
        v2[v18] = v15;
        v3[v18] = v16;
        if not v4 then
            v13(l_SafetyService_0);
        end;
        return true;
    else
        return false;
    end;
end;
return v1;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v3 = require(l_Parent_1.React);
local v4 = require(l_Parent_1.ExperienceService);
local l_LuaApp_0 = l_CoreGui_0.RobloxGui.Modules:FindFirstChild("LuaApp");
local v6 = nil;
local v7 = l_LuaApp_0 and l_LuaApp_0.ExperienceEventReceiver;
if v7 then
    v6 = require(v7).new();
end;
local v8 = require(l_Parent_0.ToastNotificationWrapper);
local l_ExperienceService_0 = v4.ExperienceService;
local l_UseExperienceService_0 = v4.Flags.UseExperienceService;
local v11 = game:DefineFastFlag("EnableToastNotificationInAppFromWebExperienceJoinFix", false);
return function(v12)
    local v13, v14 = v3.useState(false);
    v3.useEffect(function()
        if not v11 or not l_UseExperienceService_0() then
            if v6 then
                v6:onLaunched(function(_)
                    v14(true);
                end);
                v6:onLeft(function()
                    v14(false);
                end);
            end;
            return ;
        else
            l_ExperienceService_0:RegisterForExperienceJoin(function()
                v14(true);
            end);
            l_ExperienceService_0:RegisterForExperienceLeave(function()
                v14(false);
            end);
            return ;
        end;
    end, {});
    return not v13 and v3.createElement(v8, {
        displayOrder = v12.displayOrder,
        renderLocation = "universalApp"
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_context_0 = l_Parent_0.context;
local l_Hooks_0 = l_Parent_0.Hooks;
local l_utils_0 = l_Parent_0.utils;
local l_Parent_1 = l_Parent_0.Parent;
local v5 = require(l_Parent_0.dependencies);
local l_React_0 = v5.React;
local l_UIBlox_0 = v5.UIBlox;
local l_Colors_0 = l_UIBlox_0.App.Style.Colors;
local l_DarkTheme_0 = l_UIBlox_0.App.Style.Themes.DarkTheme;
local l_useStyle_0 = l_UIBlox_0.Core.Style.useStyle;
local v11 = require(l_Parent_0.type);
local l_ButtonStack_0 = l_UIBlox_0.App.Button.ButtonStack;
local l_ButtonType_0 = l_UIBlox_0.App.Button.Enum.ButtonType;
local v14 = require(l_Parent_0.constants);
local l_DefaultCardPadding_0 = v14.Padding.DefaultCardPadding;
local l_DefaultContentPadding_0 = v14.DefaultContentPadding;
local l_DefaultButtonHeight_0 = v14.DefaultButtonHeight;
local l_getTimerFromCardData_0 = require(l_utils_0.toastNotificationHelper).getTimerFromCardData;
local v19 = require(l_context_0.useNotificationCardState);
local v20 = require(l_context_0.useNotificationCardData);
local v21 = require(l_Hooks_0.useTimeRemainingMap);
local l_GetFFlagFixToastStyleIssues_0 = require(l_Parent_1.SharedFlags).GetFFlagFixToastStyleIssues;
local l_GetFFlagToastNotificationTimerChangesEnabled_0 = require(l_Parent_1.SharedFlags).GetFFlagToastNotificationTimerChangesEnabled;
local function _(v24)
    if v24 == v11.SENDERButtonStyleEnum.Growth then
        return l_ButtonType_0.PrimaryContextual;
    elseif v24 == v11.SENDERButtonStyleEnum.Primary then
        return l_ButtonType_0.PrimarySystem;
    elseif v24 == v11.SENDERButtonStyleEnum.Secondary then
        return l_ButtonType_0.Secondary;
    elseif v24 == v11.SENDERButtonStyleEnum.Alert then
        return l_ButtonType_0.Alert;
    else
        return l_ButtonType_0.Secondary;
    end;
end;
local _ = function(v26, v27, v28)
    local _ = nil;
    return string.format("%s (%ds)", v26.label.text, if v28 == l_DarkTheme_0 then l_Colors_0.Graphite:ToHex() else l_Colors_0.Pumice:ToHex(), v27);
end;
local function v48(v31, v32)
    local v33 = l_useStyle_0();
    local v34 = v20();
    local v35 = nil;
    if l_GetFFlagToastNotificationTimerChangesEnabled_0() then
        local v36 = {};
        for _, v38 in ipairs(v31) do
            if not (not v38.timer or not v38.timer.showTimeOnElement) then
                v36[v38.timer.showTimeOnElement] = l_getTimerFromCardData_0(v34, v38.timer.showTimeOnElement);
            end;
        end;
        v35 = v21(v36, v34);
    end;
    local v39 = {};
    if v31 then
        for _, v41 in ipairs(v31) do
            local v42 = nil;
            if ((not l_GetFFlagToastNotificationTimerChangesEnabled_0() or not v41) or not v41.timer) or not v41.timer.showTimeOnElement then
                v42 = v41.label.text;
            else
                local v43 = v35[v41.timer.showTimeOnElement];
                local l_Theme_0 = v33.Theme;
                local _ = nil;
                v42 = string.format("%s (%ds)", v41.label.text, if l_Theme_0 == l_DarkTheme_0 then l_Colors_0.Graphite:ToHex() else l_Colors_0.Pumice:ToHex(), v43);
            end;
            local v46 = {};
            local l_buttonStyle_0 = v41.buttonStyle;
            v46.buttonType = if l_buttonStyle_0 == v11.SENDERButtonStyleEnum.Growth then l_ButtonType_0.PrimaryContextual else if l_buttonStyle_0 == v11.SENDERButtonStyleEnum.Primary then l_ButtonType_0.PrimarySystem else if l_buttonStyle_0 == v11.SENDERButtonStyleEnum.Secondary then l_ButtonType_0.Secondary else if l_buttonStyle_0 == v11.SENDERButtonStyleEnum.Alert then l_ButtonType_0.Alert else l_ButtonType_0.Secondary;
            v46.props = {
                text = v42,
                onActivated = function()
                    if v32 then
                        v32(v41);
                    end;
                end,
                buttonTextOverride = if not l_GetFFlagToastNotificationTimerChangesEnabled_0() then nil else {
                    RichText = true
                }
            };
            table.insert(v39, v46);
        end;
    end;
    return v39;
end;
return function()
    local v49 = v19("button");
    local v50 = v20();
    local l_handleActions_0 = v50.handleActions;
    local l_cardSize_0 = v50.cardSize;
    local v53 = if not not l_cardSize_0 and l_cardSize_0.cardPadding then l_cardSize_0.cardPadding else l_DefaultCardPadding_0;
    local v54 = v48(v49, l_handleActions_0);
    if #v54 > 0 then
        return (l_React_0.createElement("Frame", {
            AutomaticSize = Enum.AutomaticSize.Y,
            BackgroundTransparency = 1,
            LayoutOrder = 2,
            Size = UDim2.new(1, 0, 0, 0)
        }, {
            UIPadding = if l_GetFFlagFixToastStyleIssues_0() then nil else l_React_0.createElement("UIPadding", {
                PaddingBottom = UDim.new(0, v53)
            }),
            ActionButtons = v54 and l_React_0.createElement(l_ButtonStack_0, {
                buttonHeight = l_DefaultButtonHeight_0,
                buttons = v54,
                marginBetween = l_DefaultContentPadding_0
            })
        }));
    else
        return nil;
    end;
end;


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_context_0 = l_Parent_1.context;
local v3 = require(l_Parent_1.dependencies);
local l_React_0 = v3.React;
local l_UIBlox_0 = v3.UIBlox;
local v6 = require(l_Parent_0.NotificationActionsFrame);
local v7 = require(l_Parent_0.NotificationContentFrame);
local l_useStyle_0 = l_UIBlox_0.Core.Style.useStyle;
local v9 = require(l_Parent_1.constants);
local v10 = require(l_context_0.useNotificationCardData);
local l_DefaultCardPadding_0 = v9.Padding.DefaultCardPadding;
local l_DefaultContentPadding_0 = v9.DefaultContentPadding;
local l_DefaultCardCornerRadius_0 = v9.DefaultCardCornerRadius;
return function(_)
    local v15 = v10();
    local l_cardSize_0 = v15.cardSize;
    local v17 = if not v15.cardTransparency then v9.CardTransparency.Default else v15.cardTransparency;
    local v18 = if not not l_cardSize_0 and l_cardSize_0.cardPadding then l_cardSize_0.cardPadding else l_DefaultCardPadding_0;
    local v19 = l_useStyle_0();
    return l_React_0.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, 0),
        BackgroundColor3 = v19.Theme.BackgroundUIDefault.Color,
        BackgroundTransparency = v17,
        BorderSizePixel = 0,
        AutomaticSize = Enum.AutomaticSize.Y
    }, {
        Border = l_React_0.createElement("UIStroke", {
            ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
            Color = v19.Theme.UIDefault.Color
        }),
        UICorner = l_React_0.createElement("UICorner", {
            CornerRadius = l_DefaultCardCornerRadius_0
        }),
        UIListLayout = l_React_0.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            Padding = UDim.new(0, l_DefaultContentPadding_0),
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Center
        }),
        UIPadding = l_React_0.createElement("UIPadding", {
            PaddingBottom = UDim.new(0, v18),
            PaddingLeft = UDim.new(0, v18),
            PaddingRight = UDim.new(0, v18),
            PaddingTop = UDim.new(0, v18)
        }),
        NotificationContentFrame = l_React_0.createElement(v7),
        NotificationActionsFrame = l_React_0.createElement(v6)
    });
end;


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_context_0 = l_Parent_1.context;
local v3 = require(l_Parent_1.dependencies);
local v4 = require(l_Parent_0.NotificationStyledText);
local v5 = require(l_Parent_0.NotificationThumbnail);
local _ = require(l_Parent_1.type);
local l_React_0 = v3.React;
local l_useStyle_0 = v3.UIBlox.Core.Style.useStyle;
local v9 = require(l_Parent_1.constants);
local v10 = require(l_context_0.useNotificationCardState);
local v11 = require(l_context_0.useNotificationCardData);
local l_DefaultContentPadding_0 = v9.DefaultContentPadding;
local l_DefaultTextContentPadding_0 = v9.DefaultTextContentPadding;
return function()
    local v14 = l_useStyle_0();
    local v15 = v14.Font.BaseSize * v14.Font.CaptionHeader.RelativeSize;
    local v16 = v14.Font.BaseSize * v14.Font.CaptionBody.RelativeSize;
    local l_cardSize_0 = v11().cardSize;
    local v18 = not not l_cardSize_0 and l_cardSize_0.thumbnail or v9.CardSizeDefault.thumbnail;
    local v19 = v10("textBody");
    local v20 = v19 and v19[1];
    local v21 = (v20 and v20.title) and {
        Text = v20.title,
        Size = UDim2.new(1, 0, 0, 0),
        TextSize = v15,
        AutomaticSize = Enum.AutomaticSize.Y,
        TextXAlignment = Enum.TextXAlignment.Left,
        LayoutOrder = 1,
        Font = v14.Font.CaptionHeader.Font,
        TextColor3 = v14.Theme.TextEmphasis.Color
    };
    local v22 = (v20 and v20.label) and {
        Text = v20.label,
        Size = UDim2.new(1, 0, 0, 0),
        TextSize = v16,
        AutomaticSize = Enum.AutomaticSize.Y,
        TextXAlignment = Enum.TextXAlignment.Left,
        LayoutOrder = 2,
        Font = v14.Font.CaptionBody.Font
    };
    return l_React_0.createElement("Frame", {
        AutomaticSize = Enum.AutomaticSize.Y,
        LayoutOrder = 1,
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 0, 0)
    }, {
        UIListLayout = l_React_0.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Top,
            Padding = UDim.new(0, l_DefaultContentPadding_0)
        }),
        NotificationThumbnailFrame = l_React_0.createElement("Frame", {
            BackgroundTransparency = 1,
            LayoutOrder = 1,
            AutomaticSize = Enum.AutomaticSize.Y,
            Size = UDim2.new(0, v18, 0, v18)
        }, {
            UIPadding = l_React_0.createElement("UIPadding", {
                PaddingTop = UDim.new(0, 3)
            }),
            NotificationThumbnail = l_React_0.createElement(v5)
        }),
        ToastTextFrame = l_React_0.createElement("Frame", {
            BackgroundTransparency = 1,
            LayoutOrder = 2,
            AutomaticSize = Enum.AutomaticSize.Y,
            Size = UDim2.new(1, -v18, 0, 0)
        }, {
            UIListLayout = l_React_0.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                SortOrder = Enum.SortOrder.LayoutOrder,
                VerticalAlignment = Enum.VerticalAlignment.Top,
                Padding = UDim.new(0, l_DefaultTextContentPadding_0)
            }),
            ToastTitle = v21 and l_React_0.createElement(v4, v21),
            ToastSubtitle = v22 and l_React_0.createElement(v4, v22)
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_useStyle_0 = v1.UIBlox.Core.Style.useStyle;
local _ = require(l_Parent_0.type);
local l_React_0 = v1.React;
local v6 = {
    highlight = function(v5)
        return "<b>" .. v5 .. "</b>";
    end
};
local function v25(v7)
    local l_text_0 = v7.text;
    local l_styledElements_0 = v7.styledElements;
    local v10 = {
        {
            Position = 0,
            ReferenceCount = 0,
            Format = "highlight"
        },
        {
            Position = #v7.text,
            ReferenceCount = 0,
            Format = "highlight"
        }
    };
    if l_styledElements_0 then
        for _, v12 in pairs(l_styledElements_0) do
            table.insert(v10, {
                Position = v12.offset,
                ReferenceCount = 1,
                Format = v12.styledElementType
            });
            table.insert(v10, {
                Position = v12.offset + v12.length,
                ReferenceCount = -1,
                Format = v12.styledElementType
            });
        end;
    end;
    table.sort(v10, function(v13, v14)
        return v13.Position < v14.Position;
    end);
    local v15 = {};
    for v16 in pairs(v6) do
        v15[v16] = 0;
    end;
    local v17 = "";
    for v18 = 1, #v10 - 1 do
        local v19 = v10[v18];
        local v20 = v10[v18 + 1];
        if v19.Format then
            local l_Format_0 = v19.Format;
            v15[l_Format_0] = v15[l_Format_0] + v19.ReferenceCount;
        end;
        if v19.Position ~= v20.Position then
            local v22 = l_text_0:sub(v19.Position + 1, v20.Position);
            for v23, v24 in pairs(v6) do
                if v15[v23] > 0 then
                    v22 = v24(v22);
                end;
            end;
            v17 = v17 .. v22;
        end;
    end;
    return v17;
end;
return function(v26)
    local v27 = l_useStyle_0();
    return l_React_0.createElement("TextLabel", {
        RichText = true,
        Text = not v26.Text and "" or v25(v26.Text),
        BackgroundTransparency = 1,
        TextColor3 = v26.TextColor3 or v27.Theme.TextDefault.Color,
        TextTransparency = v26.TextTransparency or v27.Theme.TextDefault.Transparency,
        Font = v26.Font or v27.Font.Body.Font,
        AutomaticSize = v26.AutomaticSize,
        Size = v26.Size,
        TextSize = v26.TextSize,
        Position = v26.Position,
        AnchorPoint = v26.AnchorPoint,
        TextXAlignment = v26.TextXAlignment,
        TextWrapped = true
    });
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Parent_0 = script.Parent.Parent;
local l_context_0 = l_Parent_0.context;
local v3 = require(l_Parent_0.dependencies);
local l_React_0 = v3.React;
local l_LoadableImage_0 = v3.UIBlox.App.Loading.LoadableImage;
local v6 = require(l_Parent_0.type);
local l_getRbxthumbWithTypeSizeAndOptions_0 = v3.getRbxthumbWithTypeSizeAndOptions;
local l_UserLibConstants_0 = v3.UserLibConstants;
local l_GetFFlagFixToastStyleIssues_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagFixToastStyleIssues;
local v10 = require(l_context_0.useNotificationCardState);
local function v12(v11)
    if v11 == v6.SENDERThumbnailTypeEnum.Game then
        return l_UserLibConstants_0.RbxthumbTypes.GameIcon;
    elseif v11 == v6.SENDERThumbnailTypeEnum.User then
        return l_UserLibConstants_0.RbxthumbTypes.AvatarHeadShot;
    elseif v11 == v6.SENDERThumbnailTypeEnum.Group then
        return l_UserLibConstants_0.RbxthumbTypes.GroupIcon;
    elseif v11 == v6.SENDERThumbnailTypeEnum.Asset then
        return l_UserLibConstants_0.RbxthumbTypes.Asset;
    elseif v11 == v6.SENDERThumbnailTypeEnum.Bundle then
        return l_UserLibConstants_0.RbxthumbTypes.BundleThumbnail;
    else
        return l_UserLibConstants_0.RbxthumbTypes.GameIcon;
    end;
end;
local function _(v13)
    return v13.idType == v6.SENDERThumbnailTypeEnum.User;
end;
return function()
    local v15 = v10("thumbnail");
    if not (v15 ~= nil) or #v15 == 0 then
        return nil;
    else
        local v16 = v15[1];
        if v16 == nil then
            return nil;
        else
            return l_React_0.createElement("Frame", {
                BackgroundTransparency = 1,
                Size = UDim2.fromScale(1, 1),
                SizeConstraint = Enum.SizeConstraint.RelativeXX,
                BorderSizePixel = 0
            }, {
                Thumbnail = l_React_0.createElement(l_LoadableImage_0, {
                    BackgroundTransparency = 1,
                    Image = l_getRbxthumbWithTypeSizeAndOptions_0(v16.id, v12(v16.idType), 150),
                    Size = UDim2.fromScale(1, 1),
                    cornerRadius = if not (v16.idType == v6.SENDERThumbnailTypeEnum.User) then UDim.new(0, 8) else if not l_GetFFlagFixToastStyleIssues_0() then nil else UDim.new(0.5, 0),
                    showFailedStateWhenLoadingFailed = true,
                    useShimmerAnimationWhileLoading = true,
                    ZIndex = 1
                })
            });
        end;
    end;
end;


local l_GuiService_0 = game:GetService("GuiService");
local l_Parent_0 = script.Parent.Parent.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.UIBlox);
local l_VRConstants_0 = require(l_Parent_0.VrCompatibility).VRConstants;
local l_GetFFlagAdjustVRFloor_0 = require(l_Parent_0.SharedFlags).GetFFlagAdjustVRFloor;
local l_Panel3D_0 = v3.Core.VR.Panel3D;
local l_Constants_0 = v3.Core.VR.Constants;
local v8 = game:DefineFastFlag("RepositionInExperienceVRToasts", false);
return function(v9)
    local l_isConfirmModalOpen_0 = v9.isConfirmModalOpen;
    local l_isToastOpen_0 = v9.isToastOpen;
    local l_isCoreScript_0 = v9.isCoreScript;
    local l_ToastComponent_0 = v9.ToastComponent;
    local l_ConfirmationModalComponent_0 = v9.ConfirmationModalComponent;
    local v15 = v2.useRef(nil);
    local v16 = l_GuiService_0.CoreGuiFolder and l_GuiService_0.CoreGuiFolder:FindFirstChild(l_VRConstants_0.PositionLockedPanelName);
    if not v16 then
        v16 = v15.current;
    else
        v15.current = v16;
    end;
    local v17 = not v16 and 2.45 or v16.Size.Y;
    local v18 = {
        partSize = l_VRConstants_0.ToastSize,
        offset = not not l_GetFFlagAdjustVRFloor_0() and l_VRConstants_0.ToastPosition or CFrame.lookAt(l_VRConstants_0.ToastPosition, l_VRConstants_0.DefaultCameraPosition),
        virtualScreenSize = l_VRConstants_0.ToastResolution,
        curvature = l_VRConstants_0.ToastCurvature,
        panelName = "ToastNotifications",
        hidden = not l_isToastOpen_0
    };
    if l_isCoreScript_0 then
        v18 = {
            panelName = "ToastNotifications",
            partSize = if not v8 then Vector3.new(1.2, 0.6, 0) else Vector3.new(1, 0.5, 0),
            virtualScreenSize = Vector2.new(300, 150),
            lerp = false,
            tilt = 0,
            anchoring = l_Constants_0.AnchoringTypes.Head,
            faceCamera = true,
            curvature = 0,
            alwaysOnTop = true,
            parent = l_GuiService_0.CoreGuiFolder,
            hidden = not l_isToastOpen_0,
            tiltCallback = v2.useCallback(function(v19)
                if not v16 then
                    return v19.panelCFrame;
                elseif not v8 then
                    return (v16.CFrame * CFrame.new(0, v17 * -0.45, v17 * -0.15)) * CFrame.Angles(0.2, 0, 0);
                else
                    return (v16.CFrame * CFrame.new(0, v17 * -0.53, v17 * -0.15)) * CFrame.Angles(0.25, 0, 0);
                end;
            end, {
                v16,
                v17
            })
        };
    end;
    return v2.createElement(v2.Fragment, nil, {
        v2.createElement(l_Panel3D_0, v18, {
            Toast = l_ToastComponent_0
        }),
        v2.createElement(l_Panel3D_0, {
            panelName = "ConfirmationModal",
            partSize = Vector3.new(3, 3, 0),
            virtualScreenSize = Vector2.new(600, 600),
            lerp = false,
            tilt = 0,
            anchoring = l_Constants_0.AnchoringTypes.Head,
            faceCamera = true,
            curvature = 0,
            alwaysOnTop = true,
            parent = l_GuiService_0.CoreGuiFolder,
            hidden = not l_isConfirmModalOpen_0,
            tiltCallback = v2.useCallback(function(v20)
                if not v16 then
                    return v20.panelCFrame;
                else
                    return v16.CFrame * CFrame.new(0, 0, -0.1);
                end;
            end, {
                v16
            })
        }, {
            DeeplinkConfirmationModal = l_ConfirmationModalComponent_0
        })
    });
end;


local l_getPlatformTarget_0 = require(script.Parent.Parent.Parent.Analytics).getPlatformTarget;
return function(v1)
    return function(v2, v3, v4)
        v1:SendEventDeferred(l_getPlatformTarget_0(), v2, v3, v4);
    end;
end;


return {
    Padding = {
        CompactCardPadding = 8,
        DefaultCardPadding = 12
    },
    CardTopMargin = {
        App = 68,
        Experience = 12
    },
    DefaultCardCornerRadius = UDim.new(0, 8),
    DefaultCardCloseButtonCornerRadius = UDim.new(0, 4),
    DefaultContentPadding = 8,
    DefaultTextContentPadding = 4,
    DefaultButtonHeight = 28,
    DisplayNotificationDelay = 1,
    DefaultNotificationDisplayTime = 4,
    DefaultNotificationDisplayTimeOnUnpause = 2,
    InAppToastWidth = 400,
    InExperienceToastWidth = 300,
    FullWidthDeviceThreshold = 500,
    CompactCardThreashold = 900,
    CardTransparency = {
        Default = 0,
        Compact = 0.1
    },
    CardSizeDefault = {
        thumbnail = 48,
        closeButton = 22,
        closeIcon = 16
    },
    CardSizeCompact = {
        thumbnail = 32,
        closeButton = 22,
        closeIcon = 16
    },
    DeliveryChannel = "Toast",
    Destinations = {
        App = "InApp",
        Experience = "InExperience"
    },
    ToastStructuralIdentifier = {
        Level1 = "level1",
        ToastNotification = "toastNotification"
    }
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Parent.React);
local _ = require(l_Parent_0.type);
return (v1.createContext({
    state = nil,
    cardSize = nil,
    handleActions = nil,
    cardTransparency = nil,
    notificationReceivedTimestampMs = nil,
    timers = nil,
    displayTimestampMs = nil
}));


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_0.NotificationCardContext);
local v3 = require(l_Parent_1.Parent.React);
local _ = require(l_Parent_1.type);
local v5 = require(l_Parent_1.constants);
local v6 = require(l_Parent_1.analytics.analyticsService);
local v7 = require(l_Parent_1.utils.toastNotificationHelper);
return function(v8)
    local l_EventStream_0 = v6.EventStream;
    local v10 = {
        thumbnail = v5.CardSizeDefault.thumbnail,
        cardPadding = v5.Padding.DefaultCardPadding
    };
    if v8.isCompact then
        v10.thumbnail = v5.CardSizeCompact.thumbnail;
        v10.cardPadding = v5.Padding.CompactCardPadding;
    end;
    return v3.createElement(v2.Provider, {
        value = {
            state = v8.state,
            cardSize = v10,
            handleActions = v8.handleActions,
            sendEvent = function(v11)
                v7.fireEvent(l_EventStream_0, v11);
            end,
            cardTransparency = if not v8.isCompact then v5.CardTransparency.Default else v5.CardTransparency.Compact,
            notificationReceivedTimestampMs = v8.notificationReceivedTimestampMs,
            timers = v8.timers,
            displayTimestampMs = v8.displayTimestampMs
        }
    }, v8.children);
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.UserLib);
return {
    Cryo = require(l_Parent_0.Cryo),
    Dash = require(l_Parent_0.Dash),
    Rodux = require(l_Parent_0.Rodux),
    RoactRodux = require(l_Parent_0.RoactRodux),
    RoactServices = require(l_Parent_0.RoactServices),
    React = require(l_Parent_0.React),
    ReactRoblox = require(l_Parent_0.ReactRoblox),
    UIBlox = require(l_Parent_0.UIBlox),
    Localization = require(l_Parent_0.Localization),
    RobloxAppHooks = require(l_Parent_0.RobloxAppHooks),
    RobloxAppEnums = require(l_Parent_0.RobloxAppEnums),
    RoactServiceTags = require(l_Parent_0.RoactServiceTags),
    Hooks = {
        dependencyArray = require(l_Parent_0.RoactUtils).Hooks.dependencyArray
    },
    LuauPolyfill = require(l_Parent_0.LuauPolyfill),
    t = require(l_Parent_0.t),
    ToastNotificationsProtocol = require(l_Parent_0.ToastNotificationsProtocol).ToastNotificationProtocol,
    ToastNotificationProtocolEnums = require(l_Parent_0.ToastNotificationsProtocol).ToastNotificationProtocolEnums,
    UserLib = v1,
    getRbxthumbWithTypeSizeAndOptions = v1.Utils.getRbxthumbWithTypeSizeAndOptions,
    UserLibConstants = v1.Utils.Constants
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.ReactRoblox);
local v2 = require(l_Parent_0.Dev.JestGlobals);
return {
    Rhodium = require(l_Parent_0.Dev.Rhodium),
    RhodiumHelpers = function()
        return require(l_Parent_0.Dev.RhodiumHelpers);
    end,
    JestGlobals = v2,
    jestExpect = v2.expect,
    jest = v2.jest,
    act = v1.act,
    UIBloxUniversalAppConfig = require(l_Parent_0.Dev.RobloxAppUIBloxConfig),
    DeferredLuaHelpers = require(l_Parent_0.Dev.TestUtils).DeferredLuaHelpers
};


return {
    dependencies = require(script.dependencies),
    ["jest.config"] = script["jest.config"],
    renderToastNotificationContainer = require(script.renderToastNotification),
    ToastNotificationWrapper = require(script.ToastNotificationWrapper),
    AppToastNotificationContainer = require(script.AppToastNotificationContainer),
    ToastNotificationTypeModule = require(script.type),
    LifecycleEvents = require(script.utils.LifecycleEvents)
};


local v0 = require(script.Parent.Parent.Dev.JestConfigs);
return {
    displayName = "ToastNotification",
    testMatch = {
        "**/*.test"
    },
    setupFilesAfterEnv = {
        v0.setupFiles.LogHandler,
        v0.setupFiles.UIBloxInitializer,
        v0.setupFiles.createPromiseRejectionHandler()
    }
};


local l_CoreGui_0 = game:GetService("CoreGui");
local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v3 = require(l_Parent_0.dependencies);
local v4 = require(l_Parent_0.ToastNotificationWrapper);
local l_React_0 = v3.React;
local l_ReactRoblox_0 = v3.ReactRoblox;
local _ = require(l_Parent_0.type);
local l_StyleProviderWithDefaultTheme_0 = require(l_Parent_1.Style).StyleProviderWithDefaultTheme;
return function(v9)
    local l_Folder_0 = Instance.new("Folder");
    l_Folder_0.Name = "ToastNotification";
    l_Folder_0.Parent = l_CoreGui_0;
    l_ReactRoblox_0.createRoot(l_Folder_0):render((l_React_0.createElement(l_StyleProviderWithDefaultTheme_0, {
        withUiModeSupport = false,
        withDarkTheme = true
    }, {
        ToastNotificationWrapper = l_React_0.createElement(v4, {
            displayOrder = 13,
            renderLocation = v9.renderLocation
        })
    })));
end;


local _ = require(script.Parent.Parent.ToastNotificationsProtocol);
return {
    ChannelListEnum = {
        App = "toast-in-app-notifications",
        Experience = "toast-in-experience-notifications",
        Dual = "toast-in-app-and-experience-notifications",
        Desktop = "toast-in-app-and-experience-desktop-notifications"
    },
    ActionTypeEnum = {
        Report = "reportNotification",
        Deeplink = "deeplink",
        NotificationApi = "notificationAPI",
        Dismiss = "dismiss",
        Reload = "reload",
        None = "none",
        VoltronBroadcast = "voltronBroadcast"
    },
    SENDERButtonStyleEnum = {
        Primary = "Primary",
        Secondary = "Secondary",
        Alert = "Alert",
        Growth = "Growth"
    },
    SENDERThumbnailTypeEnum = {
        User = "userThumbnail",
        Game = "gameThumbnail",
        Group = "groupThumbnail",
        Asset = "assetThumbnail",
        Bundle = "bundleThumbnail",
        Icon = "icon"
    },
    ToastNotificationActionsEnum = {
        ModalCancel = "modalCancel",
        ModalConfirm = "modalConfirm",
        Dismissed = "dismissed",
        Display = "displayed",
        Hover = "hoverOver",
        Ignored = "ignored",
        Update = "update",
        DeeplinkFailed = "deeplinkFailed"
    },
    RenderLocationEnum = {
        UniversalApp = "universalApp",
        CoreScript = "coreScript"
    },
    DeviceOrientationEnum = {
        Portrait = "Portrait",
        Landscape = "Landscape",
        Unknown = "Unknown"
    },
    VisualItemTypeEnum = {
        Button = "button",
        TextBody = "textBody",
        Thumbnail = "thumbnail",
        MetaAction = "metaAction"
    },
    NotificationTypeEnum = {
        CallReceived = "CallReceived",
        SquadInvitation = "SquadInvitation"
    }
};


return {
    ToastEvents = {
        AttemptDisplay = "ToastNotifications.displayToastNotification",
        Display = "ToastNotifications.displayedToastNotification",
        UserAction = "ToastNotifications.UserActionOnToastNotification"
    },
    RegisteredCallbacks = {},
    DispatchEvent = function(v0, v1, v2, v3)
        local v4 = v0.RegisteredCallbacks[v2] and v0.RegisteredCallbacks[v2][v1];
        if v4 then
            for v5 in v4, nil, nil do
                task.spawn(v5, v3);
            end;
        end;
    end,
    RemoveCallback = function(v6, v7, v8, v9)
        local v10 = v6.RegisteredCallbacks[v8] and v6.RegisteredCallbacks[v8][v7];
        if v10 then
            v10[v9] = nil;
            if not next(v10) then
                v6.RegisteredCallbacks[v8][v7] = nil;
                if not next(v6.RegisteredCallbacks[v8]) then
                    v6.RegisteredCallbacks[v8] = nil;
                end;
            end;
            return ;
        else
            return ;
        end;
    end,
    RegisterCallback = function(v11, v12, v13, v14)
        if not v11.RegisteredCallbacks[v13] then
            v11.RegisteredCallbacks[v13] = {};
        end;
        if not v11.RegisteredCallbacks[v13][v12] then
            v11.RegisteredCallbacks[v13][v12] = {};
        end;
        v11.RegisteredCallbacks[v13][v12][v14] = true;
        return function()
            v11:RemoveCallback(v12, v13, v14);
        end;
    end
};


local l_SessionService_0 = game:GetService("SessionService");
local l_Parent_0 = script.Parent.Parent;
local v2 = require(l_Parent_0.constants);
local v3 = require(l_Parent_0.type);
return function(v4)
    if v4 == v3.ToastNotificationActionsEnum.Display then
        l_SessionService_0:SetSession(v2.ToastStructuralIdentifier.Level1, v2.ToastStructuralIdentifier.ToastNotification, v2.ToastStructuralIdentifier.ToastNotification);
        return ;
    else
        if not (v4 ~= v3.ToastNotificationActionsEnum.Dismissed) or v4 == v3.ToastNotificationActionsEnum.Ignored then
            l_SessionService_0:RemoveSession(v2.ToastStructuralIdentifier.ToastNotification);
        end;
        return ;
    end;
end;


local l_MessageBusService_0 = game:GetService("MessageBusService");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Players_0 = game:GetService("Players");
local l_Parent_0 = script.Parent;
local _ = require(l_Parent_0.ToastNotificationProtocolTypes);
local v5 = require(l_Parent_0.ToastNotificationProtocolConstants);
local l_getPlatformTarget_0 = require(l_CorePackages_0.Workspace.Packages.Analytics).getPlatformTarget;
local v7 = {};
v7.__index = v7;
game:DefineFastFlag("LuaAppInitializeToastNotificationEventParams2", false);
v7.new = function()
    return (setmetatable({}, v7));
end;
v7.setupNotifications = function(_, v9)
    if #v9 > 0 then
        local v10 = nil;
        local v11 = nil;
        if game:GetFastFlag("LuaAppInitializeToastNotificationEventParams2") then
            v11 = l_getPlatformTarget_0();
            v10 = not l_Players_0.LocalPlayer and "" or tostring(l_Players_0.LocalPlayer.UserId);
        end;
        l_MessageBusService_0:Publish(v5.MESSAGE_INIT_TOAST_NOTIF, {
            channels = v9,
            userId = v10,
            platform = v11
        });
    end;
end;
v7.updateNotification = function(_, v13, v14)
    if not (not v13 or not v14) then
        l_MessageBusService_0:Publish(v5.MESSAGE_UPDATE_TOAST_NOTIF, {
            notificationId = v13,
            stateName = v14
        });
    end;
end;
v7.voltronBroadcast = function(_, v16, v17)
    if v16 then
        l_MessageBusService_0:Publish(v16, v17);
    end;
end;
v7.dismissNotification = function(_, v19)
    if v19 then
        l_MessageBusService_0:Publish(v5.MESSAGE_DISMISS_TOAST_NOTIF, {
            notificationId = v19
        });
    end;
end;
v7.listenToDisplayNotification = function(_, v21)
    return l_MessageBusService_0:Subscribe(v5.MESSAGE_DISPLAY_TOAST_NOTIF, v21, false, true);
end;
v7.listenToDismissNotification = function(_, v23)
    return l_MessageBusService_0:Subscribe(v5.MESSAGE_DISMISS_TOAST_NOTIF, v23, false, true);
end;
v7.default = v7.new();
return v7;


local l_MessageBusService_0 = game:GetService("MessageBusService");
return {
    PROTOCOL_NAME = "ToastNotifications",
    MESSAGE_INIT_TOAST_NOTIF = l_MessageBusService_0:GetMessageId("ToastNotifications", "initializeToastNotifications"),
    MESSAGE_GET_TOAST_NOTIF = l_MessageBusService_0:GetMessageId("ToastNotifications", "getToastNotification"),
    MESSAGE_UPDATE_TOAST_NOTIF = l_MessageBusService_0:GetMessageId("ToastNotifications", "updateToastNotificationState"),
    MESSAGE_DISMISS_TOAST_NOTIF = l_MessageBusService_0:GetMessageId("ToastNotifications", "dismissToastNotification"),
    MESSAGE_DISPLAY_TOAST_NOTIF = l_MessageBusService_0:GetMessageId("ToastNotifications", "displayToastNotification")
};


local _ = require(script.ToastNotificationProtocolTypes);
return {
    ToastNotificationProtocol = require(script.ToastNotificationProtocol),
    ToastNotificationProtocolConstants = require(script.ToastNotificationProtocolConstants),
    ToastNotificationProtocolEnums = require(script.Enums)
};


return require(script:FindFirstAncestor("ToastRodux").Parent.Rodux).makeActionCreator(script.Name, function()
    return {};
end);


return require(script:FindFirstAncestor("ToastRodux").Parent.Rodux).makeActionCreator(script.Name, function(v0)
    assert(type(v0) == "table", "SetCurrentToastMessage action expects toastMessage to be a table");
    return {
        toastMessage = v0
    };
end);


return {
    MarkCurrentToastMessageAsRead = require(script.MarkCurrentToastMessageAsRead),
    RemoveAllToastMessages = require(script.RemoveAllToastMessages),
    RemoveCurrentToastMessage = require(script.RemoveCurrentToastMessage),
    SetCurrentToastMessage = require(script.SetCurrentToastMessage)
};


local l_GetNotificationsExperienceDetailsVariant_0 = require(script:FindFirstAncestor("ToastRodux").Parent.SharedFlags).GetNotificationsExperienceDetailsVariant;
return {
    NetworkingError = "NetworkingError",
    QuickLaunchError = "QuickLaunchError",
    PlayButtonError = "PlayButtonError",
    PurchaseMessage = "PurchaseMessage",
    GameFollowError = "GameFollowError",
    SuccessConfirmation = "SuccessConfirmation",
    InformationMessage = "InformationMessage",
    NotificationsTurnedOn = if not l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then nil else "NotificationsTurnedOn",
    NotificationsTurnedOff = if not l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then nil else "NotificationsTurnedOff"
};


return {
    ["jest.config"] = script["jest.config"],
    Actions = require(script.Actions),
    Enums = require(script.Enums)
};


local v0 = require(script.Parent.Parent.Dev.JestConfigs);
return {
    displayName = "ToastRodux",
    setupFilesAfterEnv = {
        v0.setupFiles.LogHandler,
        v0.setupFiles.UIBloxInitializer,
        v0.setupFiles.createPromiseRejectionHandler()
    }
};


return function(v0, v1, v2)
    v0:sendEventDeferred(v1, "inputTypeChanged", v2);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UiShellEvents");
local v1 = require(l_script_FirstAncestor_0.Parent.t);
local v2 = require(l_script_FirstAncestor_0.Logger);
local v3 = v1.strictInterface({
    page = v1.string
});
return function(v4, v5, v6)
    local v7, v8 = v3(v6);
    if not v7 then
        v2:error(v8);
    end;
    v4:sendEventDeferred(v5, "uiShellStatusBarTapped", v6);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UiShellEvents");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v3 = require(l_Parent_0.React);
local v4 = require(l_script_FirstAncestor_0.Analytics.logInputTypeChanged);
local l_useInputType_0 = require(l_Parent_0.RoactUtils).Hooks.useInputType;
return function(v6, v7)
    local v8 = l_useInputType_0();
    v3.useEffect(function()
        v4(v6, "inputTypeChanged", {
            inputType = v8,
            gamepadConnected = l_UserInputService_0:GetGamepadConnected(Enum.UserInputType.Gamepad1),
            playSessionId = v7
        });
    end, {
        v8
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UiShellEvents");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local l_useNavigation_0 = require(l_Parent_0.RoactUtils).Hooks.useNavigation;
local l_useRoactService_0 = require(l_Parent_0.RobloxAppHooks).useRoactService;
local l_getCurrentRouteState_0 = require(l_Parent_0.Navigation).getCurrentRouteState;
local l_AppEventIngestService_0 = require(l_Parent_0.RoactServiceTags).AppEventIngestService;
local l_AppUserInputService_0 = require(l_Parent_0.RoactServiceTags).AppUserInputService;
local v8 = require(l_script_FirstAncestor_0.Analytics.uiStatusBarTappedEvent);
return function(v9)
    local v10 = l_useRoactService_0(l_AppEventIngestService_0);
    local v11 = l_useRoactService_0(l_AppUserInputService_0);
    local v12 = (v9 or (l_getCurrentRouteState_0((l_useNavigation_0())) or {}).name) or "Unknown";
    v2.useEffect(function()
        local v13 = v11.StatusBarTapped:Connect(function()
            v8(v10, "StatusBar", {
                page = v12
            });
        end);
        return function()
            v13:Disconnect();
        end;
    end, {
        v10,
        v11,
        v12
    });
end;


local _ = require(script.Analytics.uiStatusBarTappedEvent);
return {
    useLogStatusBarTapped = require(script.Hooks.useLogStatusBarTapped),
    useLogInputTypeChanged = require(script.Hooks.useLogInputTypeChanged)
};


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Roact);
local v2 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v2.Focusable;
local v4 = require(l_CorePackages_0.Packages.t);
local v5 = v1.Component:extend("FocusControllerProvider");
v5.validateProps = v4.strictInterface({
    captureFocusOnMount = v4.boolean,
    [v1.Children] = v4.table,
    focusController = v4.optional(v4.table)
});
v5.init = function(v6)
    v6.focusController = v6.props.focusController or v2.createFocusController();
end;
v5.render = function(v7)
    return v1.createElement(l_Focusable_0.Frame, {
        focusController = v7.focusController,
        BackgroundTransparency = 1,
        Size = UDim2.fromScale(1, 1)
    }, v7.props[v1.Children]);
end;
v5.didMount = function(v8)
    if v8.props.captureFocusOnMount then
        v8.focusController.captureFocus();
    end;
end;
return v5;


local l_jest_0 = require(script.Parent.Parent.JestGlobals).jest;
return function(v1)
    local v2 = {};
    local v3 = getmetatable(v1);
    return function(v4)
        local v5 = v3[v4];
        local v6 = l_jest_0.fn();
        v3[v4] = v6;
        table.insert(v2, function()
            v3[v4] = v5;
        end);
        return v6;
    end, function()
        for v7 = #v2, 1, -1 do
            v2[v7]();
        end;
        table.clear(v2);
    end;
end;


local l_RunService_0 = game:GetService("RunService");
local v1 = require(script.Parent.Parent.Promise);
local v2 = game:DefineFastFlag("DummyFFlagPromiseRejectionFlagState", false);
local function _(v3)
    return v3:match("^[%w%._%-]+:[%d]+.+") ~= nil;
end;
local function v6(v5)
    return ((((((v5:find("CorePackages.Packages.+%.TestEZ%.") or v5:find("CorePackages.Packages.+%.Promise%.")) or v5:find("CorePackages.Packages.+%.roblox_rodux%.")) or v5:find("CorePackages.Packages.+%.React%.")) or v5:find("CorePackages.Packages.+%.ReactReconciler%.")) or v5:find("CorePackages.Packages.+%.Scheduler%.")) or v5:find("CorePackages.Packages.+%.Shared%.")) ~= nil;
end;
local function v12(v7)
    local v8 = {};
    local v9 = false;
    for _, v11 in ipairs(v7:split("\n")) do
        if not (v11:match("^[%w%._%-]+:[%d]+.+") ~= nil) then
            v9 = false;
        elseif not v9 then
            v9 = true;
            table.insert(v8, v11);
            continue;
        end;
        if not v6(v11) then
            table.insert(v8, v11);
        elseif v8[#v8] ~= "..." then
            table.insert(v8, "...");
        end;
    end;
    return table.concat(v8, "\n");
end;
return function(v13)
    local v14 = {};
    local function v23(v15, ...)
        local v16 = v15._source:split("\n");
        local v17 = nil;
        for v18 = #v16, 1, -1 do
            if v16[v18]:find("%.([%a%d]+%.spec):(%d+)") then
                v17 = v16[v18];
                break;
            end;
        end;
        local v19 = nil;
        local v20 = nil;
        local v21 = nil;
        if select("#", ...) >= 1 then
            v20 = tostring(select(1, ...));
            v21 = if not v13 then v12(v20) else v20;
        end;
        local v22 = nil;
        if not (v20 ~= nil) or v20:find("Promise created at:") == nil then
            v22 = if not v13 then v12(v15._source) else v15._source;
        end;
        v19 = if not v17 then ("%*\nNo test file was found in promise creation stack. "):format("\n~~~ UNHANDLED PROMISE REJECTION ~~~") else ("%*\nPromise was created in test at:\n%*\n\n"):format("\n~~~ UNHANDLED PROMISE REJECTION ~~~", v17);
        if v21 ~= nil then
            v19 = v19 .. ("Error output:\n%*"):format(v21);
        end;
        if v22 ~= nil then
            v19 = v19 .. ("\n\nPromise created at:\n%*"):format(v22);
        end;
        table.insert(v14, v19);
    end;
    return {
        reportRejections = function(v24, v25, v26)
            l_RunService_0.Heartbeat:Wait();
            l_RunService_0.Heartbeat:Wait();
            local v27 = v26 or 1;
            local v28 = if not v2 then v24 else v25;
            local v29 = nil;
            local v30 = nil;
            if v28 == nil then
                v29 = 0;
                v30 = "0 (default)";
            else
                v29 = math.floor(v28 * v27);
                v30 = tostring(v29);
            end;
            if #v14 > 0 then
                local v31 = {};
                local v32 = v29 < #v14;
                table.insert(v31, "Caught unhandled promise rejections caught during test run. These may indicate\nerrors in tested code, or tests that were not cleaned up properly.\n\nIf you would like to see full stack traces without library internals redacted,\npass `true` as the first argument to `createPromiseRejectionHandler`.\n\nMore information about unhandled promise rejections in tests (and how to clean\nthem up) can be found at https://roblox.atlassian.net/wiki/spaces/HOW/pages/1556186613/Handling+Lua+Promises+in+Tests.\n");
                for _, v34 in ipairs(v14) do
                    table.insert(v31, v34);
                end;
                table.insert(v31, string.format("\nPromise rejection report:\n    unhandled rejections: %d", #v14));
                if v32 then
                    table.insert(v31, string.format("    allowed rejections threshold: %s\n\nThis test suite run has FAILED due to exceeding the threshold of unhandled\npromise rejections. For any functionality changed, try running the suite with\nrelevant tests focused (new or existing) to find which tests are producing\nunhandled promise rejections", v30));
                end;
                if v29 < #v14 then
                    error(table.concat(v31, "\n"), 0);
                    return ;
                else
                    warn(table.concat(v31, "\n"));
                end;
            end;
        end,
        inject = function()
            v1.TEST = true;
            return v1.onUnhandledRejection(v23);
        end
    };
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Roact);
local l_StyleProviderWithDefaultTheme_0 = require(l_Parent_0.Style).StyleProviderWithDefaultTheme;
return function(v3, v4)
    return v1.createElement(l_StyleProviderWithDefaultTheme_0, {
        withUiModeSupport = not not v4 and v4.withUiModeSupport,
        withDarkTheme = if not v4 then nil else v4.withDarkTheme
    }, v3);
end;


local v0 = require(script.Parent.Parent.Dev.React);
local v1 = require(script.Parent.foldProviders);
return function(v2, v3)
    v3 = v3 or {};
    assert(v3, "Config must not be nil");
    return v1(v0.createElement(v2, v3.props), v3.providers or {});
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Cryo);
local v2 = require(l_Parent_0.Dev.React);
return function(v3, v4)
    return v1.List.foldRight(v4, function(v5, v6)
        return v2.createElement(v6, nil, {
            ProviderChildren = v5
        });
    end, v3);
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Roact);
local v2 = require(l_Parent_0.Style);
return function(v3, v4)
    return v1.createElement(v2.DesignTokenProvider, {
        tokenMappers = v4 or {}
    }, {
        Element = v3
    });
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Roact);
local l_LocalizationProvider_0 = require(l_Parent_0.Localization).LocalizationProvider;
local l_Signal_0 = require(l_Parent_0.AppCommonLib).Signal;
return function(v4)
    return v1.createElement(l_LocalizationProvider_0, {
        localization = {
            Format = function(_, v6, _)
                return v6;
            end,
            changed = l_Signal_0.new()
        }
    }, {
        TestElement1 = v4
    });
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Roact);
local v2 = require(l_Parent_0.RoactNavigation);
local v3 = {
    state = {
        params = {},
        routeName = "",
        key = ""
    },
    dispatch = function()
    end,
    goBack = function()
    end,
    addListener = function()
    end,
    isFocused = function()
    end,
    setParams = function()
    end,
    getParam = function()
    end,
    replace = function()
    end,
    push = function()
    end
};
return function(v4)
    return v1.createElement(v2.Provider, {
        value = v3
    }, {
        Element = v4
    });
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Roact);
return function(v2, v3)
    return v1.createElement(require(l_Parent_0.UniversalAppPolicy).RoactAppPolicy.Provider, {
        policy = {
            require(l_Parent_0.UniversalAppPolicy).AppFeaturePolicies,
            require(l_Parent_0.SocialPolicies).ChatPolicies,
            require(l_Parent_0.AvatarPolicies).AvatarPolicies,
            require(l_Parent_0.SocialPolicies).SharePolicies,
            require(l_Parent_0.SocialPolicies).ShareTargetGamePolicies
        },
        policyData = v3 or {}
    }, {
        Element = v2
    });
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Roact);
local v2 = require(l_Parent_0.Rodux);
local v3 = require(l_Parent_0.RoactRodux);
local v4 = require(script.Parent.mockPolicyProvider);
local v5 = require(script.Parent.mockStyle);
local v6 = require(script.Parent.mockLocale);
local v7 = require(script.Parent.mockNavigation);
local v8 = require(script.Parent.mockDesignTokens);
local v9 = v2.Store.new(function()
    return {};
end, {}, {
    v2.thunkMiddleware
});
return function(v10, v11)
    v11 = v11 or {};
    return v1.createElement(v3.StoreProvider, {
        store = v11.store or v9
    }, {
        children = v4(v5(v8(v6((v11.mockNavigation or v7)(v10)), v11.tokenMappers or {})), v11.appPolicy)
    });
end;


local v0 = require(script.Parent.Parent.Rodux);
return function(v1, v2)
    return v0.Store.new(v2 or function(v3)
        return v3;
    end, v1 or {}, {
        v0.thunkMiddleware
    });
end;


local v0 = require(script.Parent.createStyleProvider);
return function(v1)
    return v0({
        TestElement = v1
    });
end;


local l_HttpService_0 = game:GetService("HttpService");
local v1 = require(script.Parent.Parent.Roact);
local v2 = require(script.Parent.mockProviders);
return function(v3, v4)
    v4 = v4 or {};
    local l_parent_0 = v4.parent;
    if l_parent_0 == nil then
        l_parent_0 = Instance.new("Frame");
        l_parent_0.Name = l_HttpService_0:GenerateGUID(false);
    end;
    local v6 = v1.mount(v2(v3, v4), l_parent_0);
    return l_parent_0, function()
        v1.unmount(v6);
        l_parent_0:Destroy();
    end;
end;


local v0 = require(script.Parent.Parent.Roact);
local v1 = require(script.Parent.mockProviders);
return function(v2, v3)
    if v3 == nil then
        v3 = Instance.new("Frame");
    end;
    local v4 = v0.mount(v1(v2), v3);
    return v3, function()
        v0.unmount(v4);
        v3:Destroy();
    end;
end;


local v0 = require(script.Parent.Parent.Dev.ReactRoblox);
local l_act_0 = v0.act;
local v2 = require(script.Parent.createTreeWithProviders);
return function(v3, v4)
    local v5 = nil;
    local v6 = nil;
    local function v8(v7)
        v5 = v3(v7);
        return nil;
    end;
    local function _(v9)
        return (v2(v8, v9));
    end;
    local v11 = v0.createRoot((Instance.new("Frame")));
    l_act_0(function()
        v11:render((v2(v8, v4)));
    end);
    local function v13(v12)
        l_act_0(function()
            v11:render((v2(v8, v12 or v4)));
        end);
        return v6();
    end;
    local function v14()
        v11:unmount();
    end;
    v6 = function()
        return {
            result = v5,
            rerender = v13,
            cleanup = v14
        };
    end;
    return v6();
end;


local l_HttpService_0 = game:GetService("HttpService");
local l_Parent_0 = script.Parent;
local v2 = require(l_Parent_0.Parent.Roact);
local v3 = require(l_Parent_0.mockStyle);
return function(v4)
    local l_Frame_0 = Instance.new("Frame");
    l_Frame_0.Name = l_HttpService_0:GenerateGUID(false);
    local v6 = v2.mount(v3(v4), l_Frame_0);
    return l_Frame_0, function()
        v2.unmount(v6);
        l_Frame_0:Destroy();
    end;
end;


local l_RunService_0 = game:GetService("RunService");
local l_LogService_0 = game:GetService("LogService");
local function v5(v2, v3)
    v3 = v3 or 1;
    local v4 = 0;
    while not (not (v4 < v3) or v2()) do
        v4 = v4 + l_RunService_0.Heartbeat:Wait();
    end;
end;
return function()
    v5(function()
        for _, v7 in ipairs((l_LogService_0:GetLogHistory())) do
            if string.match(v7.message, "%d+ passed, %d+ failed, %d+ skipped") then
                return true;
            end;
        end;
        return false;
    end, 300);
end;


return {
    CrossPlatform = "CrossPlatform",
    Multiplayer = "Multiplayer",
    SharedContent = "SharedContent"
};


return {
    Grid = "Grid",
    List = "List",
    Carousel = "Carousel"
};


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local _ = require(l_Parent_0.AppFeaturePolicies);
local _ = require(l_Parent_1.AvatarPolicies);
local _ = require(l_Parent_1.SocialPolicies);
return {};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.PolicyProvider);
local l_Logger_0 = require(l_Parent_0.Loggers).Logger;
local v3 = require(script.Parent.UniversalAppPolicy);
v1.Logger:setParent(l_Logger_0);
return v3;


local v0 = require(script.Parent.UniversalAppGetPolicy);
local v1 = require(script.Parent.AppFeaturePolicies);
return function()
    return v1(v0.read() or {});
end;


local _ = require(script.PolicyTypes);
return {
    getAppFeaturePolicies = require(script.getAppFeaturePolicies),
    AppFeaturePolicies = require(script.AppFeaturePolicies),
    RoactAppPolicy = require(script.RoactAppPolicy),
    UniversalAppPolicy = require(script.UniversalAppPolicy),
    useAppPolicy = require(script.useAppPolicy),
    Enum = {
        MorePageLayout = require(script.Enum.MorePageLayout),
        CrossPlayCapabilities = require(script.Enum.CrossPlayCapabilities)
    }
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.PolicyProvider);
local l_Logger_0 = v1.Logger;
local v3 = require(l_Parent_0.React);
local v4 = require(l_Parent_0.Cryo);
local _ = require(script.Parent.PolicyTypes);
local function v11(v6, v7)
    local v8 = {};
    for _, v10 in ipairs(v7) do
        v8 = v4.Dictionary.join(v8, v10(v6));
    end;
    return v8;
end;
return function(v12)
    assert(v12, "expected getPolicyImpl");
    return function(v13)
        local v14 = v3.useContext(v1.AppPolicyContext);
        assert(v14, "Not a descendent of PolicyProvider");
        local v16, v17 = v3.useState(function()
            if not v14.staticExternalPolicy then
                local v15 = v12.read();
                if not v15 then
                    l_Logger_0:trace("No app policy data available");
                    return (v11({}, v14.presentationPolicy));
                else
                    return (v11(v15, v14.presentationPolicy));
                end;
            else
                return (v11(v14.staticExternalPolicy, v14.presentationPolicy));
            end;
        end);
        v3.useEffect(function()
            local v18 = nil;
            if not v14.staticExternalPolicy then
                v18 = v12.onPolicyChanged(function(v19)
                    l_Logger_0:trace("Received policy update");
                    v17((v11(v19, v14.presentationPolicy)));
                end);
            end;
            return function()
                if v18 then
                    v18:Disconnect();
                end;
            end;
        end, {
            v14
        });
        return v13(v16);
    end;
end;


local v0 = require(script.Parent.Parent.Dev.JestConfigs);
return {
    displayName = "UserActivationFramework",
    setupFilesAfterEnv = {
        v0.setupFiles.LogHandler,
        v0.setupFiles.UIBloxInitializer,
        v0.setupFiles.createPromiseRejectionHandler()
    }
};


local v0 = require(script.Parent.Parent.dependencies);
local l_GuiService_0 = game:GetService("GuiService");
local l_Roact_0 = v0.Roact;
local l_AppCommonLib_0 = v0.AppCommonLib;
local l_RobloxAppAssets_0 = v0.RobloxAppAssets;
local l_Cryo_0 = v0.Cryo;
local l_Immutable_0 = l_AppCommonLib_0.Immutable;
local l_GetImageSetData_0 = l_RobloxAppAssets_0.GetImageSetData;
local l_GetImageSetPathPattern_0 = l_RobloxAppAssets_0.GetImageSetPathPattern;
local v9 = l_Roact_0.PureComponent:extend("ImageSetLabel");
v9.render = function(v10)
    local v11, v12 = l_GetImageSetData_0(l_GuiService_0:GetResolutionScale());
    local v13 = v11[v10.props.Image];
    if v13 then
        local l_forwardRef_0 = v10.props.forwardRef;
        local v15 = l_Immutable_0.RemoveFromDictionary(v10.props, "Image", "ImageRectOffset", "ImageRectSize", "SliceCenter", "forwardRef");
        v15[l_Roact_0.Ref] = l_forwardRef_0;
        if v10.props.Image then
            v15.Image = l_GetImageSetPathPattern_0(v13.ImageSet);
        end;
        if not v10.props.ImageRectOffset then
            v15.ImageRectOffset = v13.ImageRectOffset;
        else
            v15.ImageRectOffset = Vector2.new(v13.ImageRectOffset.X + v10.props.ImageRectOffset.X * v12, v13.ImageRectOffset.Y + v10.props.ImageRectOffset.Y * v12);
        end;
        if not v10.props.ImageRectSize then
            v15.ImageRectSize = v13.ImageRectSize;
        else
            v15.ImageRectSize = Vector2.new(v10.props.ImageRectSize.X * v12, v10.props.ImageRectSize.Y * v12);
        end;
        if v10.props.SliceCenter then
            v15.SliceCenter = Rect.new(v10.props.SliceCenter.Min.X * v12, v10.props.SliceCenter.Min.Y * v12, v10.props.SliceCenter.Max.X * v12, v10.props.SliceCenter.Max.Y * v12);
            if not v10.props.SliceScale then
                v15.SliceScale = 1 / v12;
            else
                v15.SliceScale = v10.props.SliceScale / v12;
            end;
        end;
        return l_Roact_0.createElement("ImageLabel", v15);
    else
        local l_forwardRef_1 = v10.props.forwardRef;
        local v17 = l_Immutable_0.RemoveFromDictionary(v10.props, "forwardRef");
        v17[l_Roact_0.Ref] = l_forwardRef_1;
        return l_Roact_0.createElement("ImageLabel", v17);
    end;
end;
return l_Roact_0.forwardRef(function(v18, v19)
    return l_Roact_0.createElement(v9, l_Cryo_0.Dictionary.join(v18, {
        forwardRef = v19
    }));
end);


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local v2 = require(l_Parent_0.UserAgreementUtils);
local l_Roact_0 = v1.Roact;
local l_UIBlox_0 = v1.UIBlox;
local l_withLocalization_0 = v1.Localization.withLocalization;
local l_withStyle_0 = l_UIBlox_0.Core.Style.withStyle;
local l_Checkbox_0 = l_UIBlox_0.App.InputButton.Checkbox;
local l_t_0 = v1.t;
local l_FitFrame_0 = v1.FitFrame;
local v10 = require(script.Parent.UserAgreementsListItem);
local l_FFlagEnableModularizedUserAgreementsList_0 = v1.SharedFlags.FFlagEnableModularizedUserAgreementsList;
local v12 = {
    REQUIRED = "REQUIRED",
    OPTIONAL = "OPTIONAL"
};
local v13 = l_Roact_0.PureComponent:extend("UserAgreementsList");
v13.validateProps = l_t_0.strictInterface({
    LayoutOrder = l_t_0.optional(l_t_0.integer),
    agreements = l_t_0.array(l_t_0.strictInterface({
        id = l_t_0.string,
        agreementType = l_t_0.string,
        clientType = l_t_0.string,
        displayUrl = l_t_0.string,
        regulationType = l_t_0.string
    })),
    checkBoxStates = l_t_0.optional(l_t_0.map(l_t_0.string, l_t_0.boolean)),
    setCheckBoxStates = l_t_0.optional(l_t_0.callback),
    separateRequiredOptional = l_t_0.optional(l_t_0.boolean),
    margin = l_t_0.optional(l_t_0.strictInterface({
        top = l_t_0.integer,
        right = l_t_0.integer,
        bottom = l_t_0.integer,
        left = l_t_0.integer
    })),
    verticalSpaceOffset = l_t_0.optional(l_t_0.integer),
    isAgreeAllChecked = l_t_0.optional(l_t_0.boolean),
    useScrollableFrame = l_t_0.optional(l_t_0.boolean)
});
v13.defaultProps = {
    margin = l_FitFrame_0.Rect.square(0)
};
shouldCreateRowsForAgreementType = function(v14, v15)
    local v16 = string.find(v14.agreementType:lower(), "optional");
    if not (tostring(v15) == tostring(v12.REQUIRED) and not v16) and (not (tostring(v15) == tostring(v12.OPTIONAL)) or not v16) then
        return false;
    else
        return true;
    end;
end;
updateTable = function(v17, v18, v19)
    local v20 = table.clone(v17);
    v20[v18] = v19;
    return v20;
end;
v13.getListItemsWithCheckBoxes = function(v21, _, v23, v24, v25, v26, v27)
    local l_agreements_0 = v21.props.agreements;
    local v29 = {};
    local v30 = {};
    for _, v32 in pairs(l_agreements_0) do
        if not v2.CheckAgreementTypeExists(v32.agreementType) then
            table.insert(v30, v32);
        else
            table.insert(v29, v32);
        end;
    end;
    local v33 = {
        v29,
        v30
    };
    local v34 = {
        true,
        false
    };
    local v35 = {};
    for v36, v37 in ipairs(v33) do
        for _, v39 in pairs(v37) do
            local v40 = v34[v36];
            local v41 = v26[v39.id];
            if shouldCreateRowsForAgreementType(v39, v24) then
                v23 = v23 + 1;
                v35["Item." .. v39.id] = l_Roact_0.createElement("Frame", {
                    BackgroundTransparency = 1,
                    AutomaticSize = Enum.AutomaticSize.Y,
                    Size = UDim2.new(1, 0, 0, 0),
                    LayoutOrder = v23
                }, {
                    Layout = l_Roact_0.createElement("UIListLayout", {
                        FillDirection = Enum.FillDirection.Horizontal,
                        SortOrder = Enum.SortOrder.LayoutOrder
                    }),
                    CheckboxFrame = l_Roact_0.createElement("Frame", {
                        BackgroundTransparency = 1,
                        Size = UDim2.new(0, v25.Global.Size_600, 1, 0),
                        LayoutOrder = 1
                    }, {
                        Padding = l_Roact_0.createElement("UIPadding", {
                            PaddingLeft = UDim.new(0, v25.Global.Size_300),
                            PaddingTop = UDim.new(0, v25.Global.Size_150)
                        }),
                        Checkbox = l_Roact_0.createElement(l_Checkbox_0, {
                            Size = UDim2.new(1, 0, 1, 0),
                            text = "",
                            isSelected = v41,
                            onActivated = function()
                                v27((updateTable(v26, v39.id, not v41)));
                            end
                        })
                    }),
                    AgreementRow = l_Roact_0.createElement(v10, {
                        LayoutOrder = v23,
                        Size = UDim2.new(1, 0, 0, 55),
                        agreement = v39,
                        agreementTypeExists = v40,
                        margin = l_FitFrame_0.Rect.quad(0, v25.Global.Size_300, 0, v25.Global.Size_200),
                        hideLink = true,
                        checkBoxPresent = true
                    })
                });
            end;
        end;
    end;
    return v35;
end;
getTableCount = function(v42)
    local v43 = 0;
    for _ in pairs(v42) do
        v43 = v43 + 1;
    end;
    return v43;
end;
setLayoutOrder = function(v45, v46)
    assert(type(v46) == "number", "Expected 'start' to be a number");
    local v47 = 0;
    local v48 = {};
    for _, v50 in pairs(v45) do
        for v51, _ in pairs(v50.props) do
            if v51 == "LayoutOrder" then
                v47 = v47 + 1;
                v50.props.LayoutOrder = v46 + v47;
                table.insert(v48, v50);
            end;
        end;
    end;
    return v48;
end;
v13.getListItems = function(v53, _)
    local l_margin_0 = v53.props.margin;
    local l_agreements_1 = v53.props.agreements;
    local v57 = {};
    local v58 = {};
    for _, v60 in ipairs(l_agreements_1) do
        if not v2.CheckAgreementTypeExists(v60.agreementType) then
            table.insert(v58, v60);
        else
            table.insert(v57, v60);
        end;
    end;
    local v61 = {
        v57,
        v58
    };
    local v62 = {
        true,
        false
    };
    local v63 = 0;
    local v64 = {};
    for v65, v66 in ipairs(v61) do
        for _, v68 in ipairs(v66) do
            local v69 = v62[v65];
            v63 = v63 + 1;
            v64["Item." .. v68.id] = l_Roact_0.createElement(v10, {
                LayoutOrder = v63,
                Size = UDim2.new(1, 0, 0, 55),
                agreement = v68,
                agreementTypeExists = v69,
                margin = l_FitFrame_0.Rect.quad(0, l_margin_0.right, 0, l_margin_0.left)
            });
        end;
    end;
    return v64;
end;
v13.checkBoxPropsExist = function(v70)
    local v71 = false;
    if v70.props.checkBoxStates ~= nil then
        v71 = false;
        if v70.props.setCheckBoxStates ~= nil then
            v71 = v70.props.isAgreeAllChecked ~= nil;
        end;
    end;
    return v71;
end;
v13.shouldReturnScrollableFrame = function(v72)
    return l_FFlagEnableModularizedUserAgreementsList_0 and (v72.props.useScrollableFrame or false);
end;
v13.render = function(v73)
    return l_withStyle_0(function(v74)
        local l_Theme_0 = v74.Theme;
        local l_Font_0 = v74.Font;
        local l_LayoutOrder_0 = v73.props.LayoutOrder;
        local l_margin_1 = v73.props.margin;
        local v79 = v73:getListItems(l_Theme_0);
        if v73:shouldReturnScrollableFrame() then
            local v80 = v73.props.separateRequiredOptional or false;
            local v81 = v73.props.verticalSpaceOffset or 0;
            local l_Tokens_0 = v74.Tokens;
            local v83 = {
                required = "CommonUI.UserAgreements.Popup.Agreement.Required",
                optional = "CommonUI.UserAgreements.Popup.Agreement.Optional"
            };
            local v84 = {};
            local v85 = {};
            if not v73:checkBoxPropsExist() then
                v84 = v73:getListItems(l_Theme_0);
            else
                v84 = v73:getListItemsWithCheckBoxes(l_Theme_0, 0, v12.REQUIRED, l_Tokens_0, v73.props.checkBoxStates, v73.props.setCheckBoxStates);
                v85 = v73:getListItemsWithCheckBoxes(l_Theme_0, getTableCount(v79), v12.OPTIONAL, l_Tokens_0, v73.props.checkBoxStates, v73.props.setCheckBoxStates);
            end;
            v84 = setLayoutOrder(v84, 1);
            v85 = setLayoutOrder(v85, getTableCount(v79) + 4);
            return l_withLocalization_0(v83)(function(v86)
                return l_Roact_0.createElement("ScrollingFrame", {
                    LayoutOrder = l_LayoutOrder_0,
                    Size = UDim2.new(1, 0, 1, -v81),
                    BackgroundTransparency = 1,
                    ScrollingEnabled = true,
                    BorderSizePixel = 0,
                    CanvasSize = UDim2.new(1, 0, 1, 0),
                    ScrollingDirection = Enum.ScrollingDirection.Y,
                    ScrollBarThickness = 2
                }, {
                    UIListLayout = l_Roact_0.createElement("UIListLayout", {
                        SortOrder = Enum.SortOrder.LayoutOrder
                    }),
                    RequiredTitleText = v80 and l_Roact_0.createElement("Frame", {
                        LayoutOrder = 0,
                        Size = UDim2.new(1, 0, 0, 0),
                        AutomaticSize = Enum.AutomaticSize.Y,
                        BackgroundTransparency = 1
                    }, {
                        Padding = l_Roact_0.createElement("UIPadding", {
                            PaddingLeft = UDim.new(0, l_Tokens_0.Global.Size_300),
                            PaddingTop = UDim.new(0, l_Tokens_0.Global.Size_100),
                            PaddingBottom = UDim.new(0, l_Tokens_0.Global.Size_100)
                        }),
                        TextLabel = l_Roact_0.createElement("TextLabel", {
                            BackgroundTransparency = 1,
                            Text = v86.required,
                            TextSize = l_Tokens_0.Global.FontSize_200,
                            TextColor3 = l_Tokens_0.Semantic.Color.Text.Emphasis.Color3,
                            TextTransparency = v74.Theme.TextDefault.Transparency,
                            Font = l_Font_0.Header1.Font,
                            TextXAlignment = Enum.TextXAlignment.Left,
                            AutomaticSize = Enum.AutomaticSize.Y,
                            TextWrapped = true,
                            Size = UDim2.new(1, 0, 0, 0)
                        })
                    }),
                    ItemsRequired = l_Roact_0.createFragment(v84),
                    OptionalTitleText = v80 and l_Roact_0.createElement("Frame", {
                        LayoutOrder = getTableCount(v79) + 2,
                        Size = UDim2.new(1, 0, 0, 0),
                        AutomaticSize = Enum.AutomaticSize.Y,
                        BackgroundTransparency = 1
                    }, {
                        Padding = l_Roact_0.createElement("UIPadding", {
                            PaddingLeft = UDim.new(0, l_Tokens_0.Global.Size_300),
                            PaddingTop = UDim.new(0, l_Tokens_0.Global.Size_100),
                            PaddingBottom = UDim.new(0, l_Tokens_0.Global.Size_100)
                        }),
                        TextLabel = l_Roact_0.createElement("TextLabel", {
                            BackgroundTransparency = 1,
                            Text = v86.optional,
                            TextSize = l_Tokens_0.Global.FontSize_200,
                            TextColor3 = l_Tokens_0.Semantic.Color.Text.Emphasis.Color3,
                            TextTransparency = v74.Theme.TextDefault.Transparency,
                            Font = l_Font_0.Header1.Font,
                            TextXAlignment = Enum.TextXAlignment.Left,
                            AutomaticSize = Enum.AutomaticSize.Y,
                            TextWrapped = true,
                            Size = UDim2.new(1, 0, 0, 0)
                        })
                    }),
                    OptionalItems = v80 and l_Roact_0.createFragment(v85)
                });
            end);
        else
            return l_Roact_0.createElement(l_FitFrame_0.FitFrameVertical, {
                LayoutOrder = l_LayoutOrder_0,
                BackgroundTransparency = 1,
                width = UDim.new(1, 0),
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Right,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                margin = l_FitFrame_0.Rect.quad(l_margin_1.top, 0, l_margin_1.bottom, 0)
            }, v79);
        end;
    end);
end;
return v13;