local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local v3 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_UI_0 = v3.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_DragListener_0 = l_UI_0.DragListener;
local v12 = require(l_script_FirstAncestor_0.Src.Components.DragTooltip);
local v13 = require(l_script_FirstAncestor_0.Src.Thunks.SetOverride);
local v14 = require(l_script_FirstAncestor_0.Src.Util.findInterval);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v16 = v1.PureComponent:extend("BlendBase");
local function _(v17)
    if v17.LayerData then
        if not v17.Overrides or not v17.Overrides.targetPosition then
            if not v17.LayerData or not v17.LayerData.props then
                return nil;
            else
                return v17.LayerData.props.targetPosition;
            end;
        else
            return v17.Overrides.targetPosition;
        end;
    else
        return nil;
    end;
end;
v16.init = function(v19)
    v19.dragArea = v1.createRef();
    v19.cursor = v1.createRef();
    v19.state = {};
    v19.onAbsoluteSizeChanged = function(v20)
        v19.absoluteSize = v20.AbsoluteSize;
        v19.absolutePosition = v20.AbsolutePosition;
    end;
    v19.resetOverride = function()
        v19.props.SetOverride(v19.props.LayerData.id, {
            "targetPosition"
        }, nil);
    end;
    v19.onDragStarted = function(_, v22)
        local l_Stylizer_0 = v19.props.Stylizer;
        if v22.UserInputType == Enum.UserInputType.MouseButton1 then
            v19:setState({
                dragging = true,
                delta = (v19.cursor.current.AbsolutePosition + 0.5 * Vector2.new(l_Stylizer_0.Dot.Size.X.Offset, l_Stylizer_0.Dot.Size.Y.Offset)) - Vector2.new(v22.Position.X, v22.Position.Y)
            });
        end;
    end;
    v19.onDragMoved = function(v24)
        local l_props_0 = v19.props;
        local l_state_0 = v19.state;
        local l_LayerData_0 = l_props_0.LayerData;
        local v28 = Vector2.new(v24.Position.X, v24.Position.Y) + v19.state.delta;
        local l_current_0 = v19.dragArea.current;
        local v30 = (v28 - l_current_0.AbsolutePosition) / l_current_0.AbsoluteSize;
        v30 = Vector2.new(math.clamp(v30.X, 0, 1), not v19.props.Show2D and 0.5 or math.clamp(v30.Y, 0, 1));
        v19.cursor.current.Position = UDim2.fromScale(v30.X, v30.Y);
        local v31 = l_state_0.min + Vector2.new(v30.X, 1 - v30.Y) * (l_state_0.max - l_state_0.min);
        l_props_0.SetOverride(l_LayerData_0.id, {
            "targetPosition"
        }, if not v19.props.Show2D then v31.X else v31);
    end;
    v19.onDragEnded = function()
        v19:setState({
            dragging = false
        });
    end;
    v19.make2dPosition = function(v32)
        if not v19.props.Show2D then
            if typeof(v32) == "number" then
                return Vector2.new(v32, 0.5);
            elseif not ((typeof(v32) ~= "Vector2" and typeof(v32) ~= "Vector3") and type(v32) ~= "userdata") or type(v32) == "table" then
                return Vector2.new(v32.X or 0, 0.5);
            else
                return Vector2.new(0, 0.5);
            end;
        elseif typeof(v32) == "number" then
            return Vector2.new(v32, 0);
        elseif typeof(v32) == "Vector2" then
            return v32;
        elseif not (typeof(v32) ~= "Vector3" and type(v32) ~= "userdata") or type(v32) == "table" then
            return Vector2.new(v32.X or 0, v32.Y or 0);
        else
            return Vector2.new();
        end;
    end;
    v19.updateMinMax = function(v33, v34, v35)
        local v36 = v19.make2dPosition(v33);
        return Vector2.new(math.min(v36.X, v34.X), (math.min(v36.Y, v34.Y))), Vector2.new(math.max(v36.X, v35.X), (math.max(v36.Y, v35.Y)));
    end;
    v19.makeTooltipText = function(v37, v38)
        local v39 = not v37 and "" or v37 .. "\n";
        if not v19.props.Show2D then
            return v39 .. string.format("(%.2f)", v38.X);
        else
            return v39 .. string.format("(%.2f, %.2f)", v38.X, v38.Y);
        end;
    end;
    v19.calculateGrid = function()
        local l_Grid_0 = v19.props.Stylizer.Grid;
        local l_state_1 = v19.state;
        local v42 = l_state_1.max - l_state_1.min;
        local l_MaxTicks_0 = l_Grid_0.MaxTicks;
        local l_Intervals_0 = l_Grid_0.Intervals;
        local v45 = Vector2.new(v14(v42.X, l_MaxTicks_0, l_Intervals_0), v14(v42.Y, l_MaxTicks_0, l_Intervals_0));
        return Vector2.new(math.floor(l_state_1.min.X / v45.X) * v45.X, math.floor(l_state_1.min.Y / v45.Y) * v45.Y), Vector2.new(math.ceil(l_state_1.max.X / v45.X) * v45.X, math.ceil(l_state_1.max.Y / v45.Y) * v45.Y), v45;
    end;
    v19:calculateExtents(true);
end;
v16.createDots = function(v46)
    local l_props_1 = v46.props;
    local l_state_2 = v46.state;
    local l_Stylizer_1 = l_props_1.Stylizer;
    local l_LayerData_1 = l_props_1.LayerData;
    local l_dragging_0 = l_state_2.dragging;
    local v52 = {};
    if l_LayerData_1 then
        local v53 = l_LayerData_1.children or {};
        for v54, v55 in v53, nil, nil do
            local v56 = "Dot_" .. (v55.name or tostring(v54));
            local v57 = if not not v55 and v55.linkData then v55.linkData.position else nil;
            if v57 then
                local v58 = v46.make2dPosition(v57);
                local v59 = (v58 - l_state_2.min) / (l_state_2.max - l_state_2.min);
                v52[v56] = v1.createElement("ImageButton", {
                    LayoutOrder = 4,
                    Size = l_Stylizer_1.Dot.Size,
                    Position = UDim2.fromScale(v59.X, 1 - v59.Y),
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    BackgroundTransparency = 1,
                    Image = l_Stylizer_1.Dot.Image,
                    ImageColor3 = l_Stylizer_1.Dot.Color,
                    ZIndex = 3
                }, {
                    Tooltip = if l_dragging_0 then nil else v1.createElement(l_Tooltip_0, {
                        Text = v46.makeTooltipText(v55.name, v58)
                    })
                });
            end;
        end;
        if not (not l_LayerData_1.props or not l_LayerData_1.props.targetPosition) then
            v53 = not not l_props_1.Overrides and l_props_1.Overrides.targetPosition or nil;
            local v60 = v46.make2dPosition(v53 or l_LayerData_1.props.targetPosition);
            local v61 = (v60 - l_state_2.min) / (l_state_2.max - l_state_2.min);
            v52.cursor = v1.createElement("ImageButton", {
                LayoutOrder = 4,
                Size = l_Stylizer_1.Cursor.Size,
                Position = UDim2.fromScale(v61.X, 1 - v61.Y),
                AnchorPoint = Vector2.new(0.5, 0.5),
                BackgroundTransparency = 1,
                Image = l_Stylizer_1.Cursor.Image,
                ImageColor3 = if not v53 then l_Stylizer_1.Cursor.Color else l_Stylizer_1.Cursor.Override,
                ZIndex = 4,
                ref = v46.cursor,
                [v1.Event.InputBegan] = v46.onDragStarted
            }, if not l_dragging_0 then nil else {
                DragListener = v1.createElement(l_DragListener_0, {
                    OnDragMoved = v46.onDragMoved,
                    OnDragEnded = v46.onDragEnded
                }),
                Tooltip = v1.createElement(v12, {
                    Text = v46.makeTooltipText(nil, v60)
                })
            });
        end;
    end;
    return v52;
end;
v16.createAxes = function(v62)
    local l_props_2 = v62.props;
    local l_state_3 = v62.state;
    local l_Grid_1 = l_props_2.Stylizer.Grid;
    local v66 = {};
    local v67, v68, v69 = v62.calculateGrid();
    local v70 = 1;
    if l_props_2.Show2D then
        for v71 = v67.Y, v68.Y, v69.Y do
            local v72 = string.format("Y%d", v70);
            v70 = v70 + 1;
            v66[v72] = v1.createElement(l_Pane_0, {
                AnchorPoint = Vector2.new(0, 0.5),
                Size = UDim2.new(1, 0, 0, 1),
                Position = UDim2.fromScale(0, 1 - (v71 - l_state_3.min.Y) / (l_state_3.max.Y - l_state_3.min.Y)),
                BackgroundColor = if v71 == 0 then l_Grid_1.AxisColor else l_Grid_1.GridColor,
                BackgroundTransparency = 0,
                ZIndex = v71 == 0 and 2 or 1
            });
        end;
    end;
    v70 = 1;
    for v73 = v67.X, v68.X, v69.X do
        local v74 = string.format("X%d", v70);
        v70 = v70 + 1;
        v66[v74] = v1.createElement(l_Pane_0, {
            AnchorPoint = Vector2.new(0.5, 0),
            Size = UDim2.new(0, 1, 1, 0),
            Position = UDim2.fromScale((v73 - l_state_3.min.X) / (l_state_3.max.X - l_state_3.min.X), 0),
            BackgroundColor = if v73 == 0 then l_Grid_1.AxisColor else l_Grid_1.GridColor,
            BackgroundTransparency = 0,
            ZIndex = v73 == 0 and 2 or 1
        });
    end;
    return v66;
end;
v16.calculateExtents = function(v75, v76)
    local l_props_3 = v75.props;
    local l_LayerData_2 = l_props_3.LayerData;
    local v79 = not v76 and v75.state.min or Vector2.new(math.huge, not l_props_3.Show2D and 0 or math.huge);
    local v80 = not v76 and v75.state.max or Vector2.new(-math.huge, not l_props_3.Show2D and 1 or -math.huge);
    if l_LayerData_2 then
        local v81 = if l_props_3.LayerData then if l_props_3.Overrides and l_props_3.Overrides.targetPosition then l_props_3.Overrides.targetPosition else if l_props_3.LayerData and l_props_3.LayerData.props then l_props_3.LayerData.props.targetPosition else nil else nil;
        if v81 then
            local v82, v83 = v75.updateMinMax(v81, v79, v80);
            v79 = v82;
            v80 = v83;
        end;
        local v84 = l_LayerData_2.children or {};
        for _, v86 in v84, nil, nil do
            if not (not v86.linkData or not v86.linkData.position) then
                local v87, v88 = v75.updateMinMax(v86.linkData.position, v79, v80);
                v79 = v87;
                v80 = v88;
            end;
        end;
    end;
    if not (v79 == v75.state.min) or v80 ~= v75.state.max then
        v75:setState({
            min = v79,
            max = v80
        });
    end;
end;
v16.didUpdate = function(v89, v90)
    local l_props_4 = v89.props;
    if l_props_4.LayerData ~= v90.LayerData then
        v89:calculateExtents(not v90.LayerData or l_props_4.LayerData and l_props_4.LayerData.id ~= v90.LayerData.id);
    end;
end;
v16.didMount = function(v92)
    v92:calculateExtents(true);
end;
v16.render = function(v93)
    local l_props_5 = v93.props;
    local l_Stylizer_2 = l_props_5.Stylizer;
    local l_Padding_0 = l_Stylizer_2.Padding;
    local v97 = v93:createDots();
    v97.Grid = v1.createElement(l_Pane_0, {
        Size = UDim2.new(1, 0, 1, 0),
        ClipsDescendants = true,
        ZIndex = 1
    }, v93:createAxes());
    if not (not l_props_5.Overrides or not l_props_5.Overrides.targetPosition) then
        v97.Reset = v1.createElement("ImageButton", {
            Size = l_Stylizer_2.Reset.Size,
            Position = l_Stylizer_2.Reset.Position,
            AnchorPoint = Vector2.new(1, 1),
            BackgroundTransparency = 1,
            Image = l_Stylizer_2.Reset.Image,
            ImageColor3 = l_Stylizer_2.Reset.Color,
            [v1.Event.Activated] = v93.resetOverride
        });
    end;
    return v1.createElement(l_Pane_0, {}, {
        v1.createElement(l_Pane_0, {
            Size = if not l_props_5.Show2D then UDim2.new(1, -l_Padding_0.Left - l_Padding_0.Right, 0, l_Stylizer_2.Dot.Size.Y.Offset) else UDim2.new(1, -l_Padding_0.Left - l_Padding_0.Right, 1, -l_Padding_0.Top - l_Padding_0.Bottom),
            Position = if not l_props_5.Show2D then UDim2.new(0, l_Padding_0.Left, 0.5, 0) else UDim2.new(0, l_Padding_0.Left, 0, l_Padding_0.Top),
            BorderColor3 = l_Stylizer_2.BorderColor,
            BorderSizePixel = 1,
            BackgroundColor3 = l_Stylizer_2.BackgroundColor,
            BackgroundTransparency = 0,
            [v1.Change.AbsoluteSize] = v93.onAbsoluteSizeChanged,
            ref = v93.dragArea
        }, v97)
    });
end;
return (v2.connect(nil, function(v98)
    return {
        SetOverride = function(v99, v100, v101)
            v98(v13(v99, v100, v101));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0
})(v16))));


local _ = require(script:FindFirstAncestor("CompositorDebugger").Src.Types);
local v1 = {};
local v2 = {
    Blend1D = require(script.Blend1D),
    Blend2D = require(script.Blend2D),
    BlendSpace = {
        Locomotion = require(script.Blend2D),
        Scalar = require(script.Blend1D),
        Directional = require(script.Blend2D)
    }
};
v1.getModule = function(v3)
    if not v3 or not v3.className then
        return nil;
    elseif v3.className == "BlendSpace" then
        if not v3.props then
            return nil;
        else
            return v2.BlendSpace[v3.props.blendSpaceType];
        end;
    else
        return v2[v3.className];
    end;
end;
return v1;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local v3 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_UI_0 = v3.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_Tabs_0 = l_UI_0.Tabs;
local _ = l_UI_0.TextLabel;
local l_Components_0 = l_script_FirstAncestor_0.Src.Components;
local v14 = require(l_Components_0.LayerView);
local v15 = require(l_Components_0.HistoryGraph);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local v17 = require(l_Util_0.AnalyticsEnums);
local v18 = require(l_Util_0.Constants);
local _ = require(l_Util_0.debugFlags);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v21 = v1.PureComponent:extend("LayerPanel");
v21.init = function(v22)
    v22.state = {
        lastTabSwitch = os.clock(),
        selectedTab = v18.LAYER_TABS.LayerData,
        oldTab = v18.LAYER_TABS.LayerData
    };
    v22.switchToTab = function(v23, v24)
        if v23 == v22.state.selectedTab then
            return ;
        else
            v22.props.Analytics:report("onLayerTabChanged", v17.LAYER_TABS[v22.state.selectedTab], v17.LAYER_TABS[v23], v24, os.clock() - v22.state.lastTabSwitch);
            v22:setState({
                lastTabSwitch = os.clock(),
                oldTab = v22.state.selectedTab,
                selectedTab = v23
            });
            return ;
        end;
    end;
end;
v21.isVisualizationEnabled = function(_, v26)
    return v21.Visualizers.getModule(v26) ~= nil;
end;
v21.didUpdate = function(v27, v28)
    local l_props_0 = v27.props;
    local l_state_0 = v27.state;
    local v31 = ((l_props_0.HistoryField and l_props_0.HistoryField.id) and l_props_0.HistoryField.section) and l_props_0.HistoryField.field;
    if not (l_state_0.selectedTab == v18.LAYER_TABS.History and not v31) and (not (l_state_0.selectedTab == v18.LAYER_TABS.Visualization) or v27:isVisualizationEnabled(l_props_0.LayerData)) then
        if v31 and (not ((v28.HistoryField and l_props_0.HistoryField.id == v28.HistoryField.id) and l_props_0.HistoryField.section == v28.HistoryField.section) or l_props_0.HistoryField.field ~= v28.HistoryField.field) then
            v27.switchToTab(v18.LAYER_TABS.History, v17.TAB_SWITCH_REASONS.HistoryIcon);
        end;
        return ;
    else
        v27.switchToTab(v18.LAYER_TABS.LayerData, v17.TAB_SWITCH_REASONS.NoData);
        return ;
    end;
end;
v21.render = function(v32)
    local l_state_1 = v32.state;
    local l_props_1 = v32.props;
    local l_Stylizer_1 = l_props_1.Stylizer;
    local l_Localization_1 = l_props_1.Localization;
    local l_LayerData_0 = l_props_1.LayerData;
    local l_ShowRawPayload_0 = l_props_1.ShowRawPayload;
    local v39 = {
        {
            Key = v18.LAYER_TABS.LayerData,
            Label = l_Localization_1:getText("LayerPanel", v18.LAYER_TABS.LayerData)
        },
        {
            Key = v18.LAYER_TABS.Visualization,
            Label = l_Localization_1:getText("LayerPanel", v18.LAYER_TABS.Visualization),
            Disabled = not v32:isVisualizationEnabled(l_LayerData_0)
        },
        {
            Key = v18.LAYER_TABS.History,
            Label = l_Localization_1:getText("LayerPanel", v18.LAYER_TABS.History),
            Disabled = not (((l_props_1.HistoryField and l_props_1.HistoryField.id) and l_props_1.HistoryField.section) and l_props_1.HistoryField.field)
        }
    };
    if l_ShowRawPayload_0 then
        table.insert(v39, {
            Key = v18.LAYER_TABS.RawData,
            Label = l_Localization_1:getText("LayerPanel", v18.LAYER_TABS.RawData)
        });
    end;
    local v40 = v21.Visualizers.getModule(l_LayerData_0);
    return v1.createElement(l_Pane_0, {
        Layout = Enum.FillDirection.Vertical,
        VerticalAlignment = Enum.VerticalAlignment.Top,
        HorizontalAlignment = Enum.HorizontalAlignment.Left
    }, {
        Tabs = v1.createElement(l_Tabs_0, {
            LayoutOrder = 1,
            Tabs = v39,
            SelectedTab = v32.state.selectedTab,
            OnTabSelected = function(v41)
                v32.switchToTab(v41.Key, v17.TAB_SWITCH_REASONS.Manual);
            end
        }),
        LayerData = if l_state_1.selectedTab == v18.LAYER_TABS.LayerData then v1.createElement(v14, {
            Size = UDim2.new(1, 0, 1, -l_Stylizer_1.TabsHeight - 1),
            LayoutOrder = 2,
            LayerData = l_props_1.LayerData,
            ExpandedSections = l_props_1.ExpandedSections,
            Overrides = l_props_1.Overrides
        }) else nil,
        Visualization = if l_state_1.selectedTab == v18.LAYER_TABS.Visualization and v40 then v1.createElement(l_Pane_0, {
            Size = UDim2.new(1, 0, 1, -l_Stylizer_1.TabsHeight - 1),
            LayoutOrder = 2
        }, {
            Content = v1.createElement(v40, {
                Stylizer = l_Stylizer_1,
                LayerData = l_props_1.LayerData,
                Overrides = l_props_1.Overrides
            })
        }) else nil,
        History = if l_state_1.selectedTab == v18.LAYER_TABS.History then v1.createElement(l_Pane_0, {
            Size = UDim2.new(1, 0, 1, -l_Stylizer_1.TabsHeight - 1),
            LayoutOrder = 2
        }, {
            HistoryGraph = v1.createElement(v15, {
                FrameBuffer = l_props_1.FrameBuffer,
                HistoryField = l_props_1.HistoryField
            })
        }) else nil,
        RawData = if l_state_1.selectedTab == v18.LAYER_TABS.RawData then v1.createElement(v14, {
            Size = UDim2.new(1, 0, 1, -l_Stylizer_1.TabsHeight - 1),
            LayoutOrder = 2,
            LayerData = l_LayerData_0,
            RawMode = true
        }) else nil
    });
end;
v21 = l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v21);
v21 = v2.connect(function(v42, _)
    return {
        HistoryField = v42.Status.HistoryField
    };
end, function(_)
    return {};
end)(v21);
v21.Visualizers = require(script.Visualizers);
return v21;


local l_StyleKey_0 = require(script:FindFirstAncestor("CompositorDebugger").Packages.Framework).Style.StyleKey;
return {
    TabsHeight = 32,
    Blend = {
        Padding = {
            Left = 15,
            Right = 15,
            Top = 33,
            Bottom = 15
        },
        BorderColor = l_StyleKey_0.MainText,
        BackgroundColor = l_StyleKey_0.SubBackground2,
        Dot = {
            Image = "rbxasset://textures/CompositorDebugger/dot.png",
            Size = UDim2.fromOffset(9, 9),
            Color = l_StyleKey_0.MainText
        },
        Cursor = {
            Image = "rbxasset://textures/CompositorDebugger/cursor.png",
            Size = UDim2.fromOffset(9, 9),
            Color = l_StyleKey_0.MainText,
            Override = l_StyleKey_0.ErrorMain
        },
        Reset = {
            Image = "rbxasset://textures/CompositorDebugger/clear.png",
            Size = UDim2.fromOffset(12, 12),
            Position = UDim2.new(1, 0, 0, -6),
            Color = l_StyleKey_0.MainText
        },
        Grid = {
            MaxTicks = 10,
            Intervals = {
                0.05,
                0.1,
                0.25,
                0.5,
                1
            },
            AxisColor = l_StyleKey_0.MainText,
            GridColor = l_StyleKey_0.MainTextDisabled
        }
    }
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local v3 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_join_0 = v3.Dash.join;
local l_TreeView_0 = v3.UI.TreeView;
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v12 = require(l_Actions_0.SetSelectedLayer);
local v13 = require(l_Actions_0.SetHistoryField);
local v14 = require(l_script_FirstAncestor_0.Src.Components.LayerTreeRow);
local _ = require(l_script_FirstAncestor_0.Src.Thunks.DetachCompositor);
local v16 = require(l_script_FirstAncestor_0.Src.Util.traverse);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v18 = v1.PureComponent:extend("LayerTree");
v18.init = function(v19)
    v19.state = {
        Selection = {},
        Expansion = {}
    };
    v19.getItemId = function(v20)
        return v20.id;
    end;
    v19.onExpand = function(v21)
        v19:setState({
            Expansion = l_join_0(v19.state.Expansion, v21)
        });
    end;
    v19.onToggleAdornment = function(v22)
        if v19.props.OnToggleAdornment then
            v19.props.OnToggleAdornment(v22);
        end;
    end;
    v19.onSelect = function(v23)
        for v24, _ in v23, nil, nil do
            v19.props.SetSelectedLayer(v24);
        end;
        v19.props.ClearHistoryField();
        v19:setState({
            Selection = v23
        });
    end;
end;
updateTreeViewItems = function(v26, v27)
    local v28 = {};
    if v26 then
        v16(v26, function(v29)
            if v27[v29.id] == nil then
                v28[v29.id] = true;
            end;
            if v29.children then
                table.sort(v29.children, function(v30, v31)
                    if not (not v30.index or not v31.index) and v30.index ~= v31.index then
                        return v30.index < v31.index;
                    elseif not (not v30.name or not v31.name) and v30.name ~= v31.name then
                        return v30.name < v31.name;
                    elseif not (not v30.className or not v31.className) and v30.className ~= v31.className then
                        return v30.className < v31.className;
                    else
                        return v30.id < v31.id;
                    end;
                end);
            end;
        end);
    end;
    return v28;
end;
v18.getDerivedStateFromProps = function(v32, v33)
    local v34 = updateTreeViewItems(v32.FramePayload, v33.Expansion);
    if not next(v34) then
        return {};
    else
        return {
            Expansion = l_join_0(v33.Expansion, v34)
        };
    end;
end;
v18.render = function(v35)
    local l_state_0 = v35.state;
    local l_props_0 = v35.props;
    return v1.createElement(l_TreeView_0, {
        Size = l_props_0.Size,
        LayoutOrder = l_props_0.LayoutOrder,
        RootItems = {
            l_props_0.FramePayload
        },
        Expansion = l_state_0.Expansion,
        Selection = l_state_0.Selection,
        GetItemId = v35.getItemId,
        RowComponent = v14,
        RowProps = {
            GetItemId = v35.getItemId,
            Adornments = l_props_0.Adornments,
            OnToggleAdornment = v35.onToggleAdornment
        },
        RowHeight = 26,
        OnExpansionChange = v35.onExpand,
        OnSelectionChange = v35.onSelect,
        ScrollingDirection = Enum.ScrollingDirection.Y
    }, {});
end;
return (v2.connect(function(_, _)
    return {};
end, function(v40)
    return {
        ClearHistoryField = function()
            v40(v13(nil, nil, nil));
        end,
        SetSelectedLayer = function(v41)
            v40(v12(v41));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v18))));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local l_UI_0 = require(l_script_FirstAncestor_0.Packages.Framework).UI;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v6 = v1.PureComponent:extend("Timestamp");
v6.init = function(v7)
    v7.formatTime = function(v8)
        if v8 == -math.huge then
            return "-inf";
        elseif v8 == math.huge then
            return "inf";
        else
            return string.format("%02d.%02d", math.floor(v8), math.floor(v8 * 100 + 0.5) % 100);
        end;
    end;
    v7.createLoadingBar = function(v9)
        return v1.createElement(l_Pane_0, {
            BackgroundColor = v7.props.BarBackground,
            BorderColor3 = v7.props.BarBorder,
            BorderSizePixel = 1,
            AnchorPoint = Vector2.new(0, 1),
            Size = UDim2.new(1, -10, 0, 2),
            Position = UDim2.new(0, 5, 1, -1),
            ZIndex = 1
        }, {
            Progress = v1.createElement(l_Pane_0, {
                Size = UDim2.fromScale(math.clamp(v9, 0, 1), 1),
                BackgroundColor = v7.props.BarColor
            })
        });
    end;
end;
v6.render = function(v10)
    local l_props_0 = v10.props;
    local v12 = nil;
    local v13 = l_props_0.Length or 0;
    local v14 = not l_props_0.TimePercentage and 0 or math.clamp(l_props_0.TimePercentage * v13, 0, v13);
    if v13 > 0 then
        v12 = {
            ProgressBar = v10.createLoadingBar(l_props_0.TimePercentage),
            TextLabel = v1.createElement(l_TextLabel_0, {
                TextColor = l_props_0.TextColor,
                Font = l_props_0.Font,
                Text = string.format("%s / %s", v10.formatTime(v14), v10.formatTime(v13)),
                TextXAlignment = Enum.TextXAlignment.Center,
                ZIndex = 2
            })
        };
    end;
    return v1.createElement(l_Pane_0, {
        Size = l_props_0.Size,
        LayoutOrder = l_props_0.LayoutOrder
    }, v12);
end;
return v6;


local l_RunService_0 = game:GetService("RunService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v2 = require(l_script_FirstAncestor_0.Packages.React);
local v3 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_withControl_0 = v3.Wrappers.withControl;
local l_Dash_0 = v3.Dash;
local l_join_0 = l_Dash_0.join;
local l_assign_0 = l_Dash_0.assign;
local l_UI_0 = v3.UI;
local l_Image_0 = l_UI_0.Image;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local v17 = require(l_script_FirstAncestor_0.Src.Util.getSafeName);
local v18 = require(script.Timestamp);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v20 = v2.PureComponent:extend("LayerTreeRow");
v20.init = function(v21)
    v21.onToggle = function()
        if v21.props.OnToggle then
            v21.props.OnToggle(v21.props);
        end;
    end;
    v21.onToggleAdornment = function()
        if v21.props.OnToggleAdornment then
            v21.props.OnToggleAdornment(v21.props.Item);
        end;
    end;
    v21.toggleRef = v2.createRef();
    v21.tweenInfo = TweenInfo.new(0.1, Enum.EasingStyle.Linear);
end;
v20.getContents = function(v22, v23, v24)
    local l_props_0 = v22.props;
    return v24[v23.className] or v24.Default, v17(v23), if not v23.weight then nil else string.format("%d%%", (math.floor(v23.weight * 100 + 0.5))), not not l_props_0.Adornments and l_props_0.Adornments[l_props_0.GetItemId(v23)] or {};
end;
v20.render = function(v26)
    local l_props_1 = v26.props;
    local l_Stylizer_1 = l_props_1.Stylizer;
    local l_Index_0 = l_props_1.Index;
    local l_Item_0 = l_props_1.Item;
    local v31 = l_props_1.Depth or 0;
    local v32 = l_props_1.Children and #l_props_1.Children > 0;
    local l_Expanded_0 = l_props_1.Expanded;
    local l_Size_0 = l_Stylizer_1.Arrow.Size;
    local l_TailItem_0 = l_props_1.TailItem;
    local l_BeforeIndentItem_0 = l_props_1.BeforeIndentItem;
    local l_ExpandableRoot_0 = l_props_1.ExpandableRoot;
    local v38 = l_props_1.Size or UDim2.new(1, 0, 0, l_Stylizer_1.RowHeight);
    local l_Position_0 = l_props_1.Position;
    local v40, v41, v42, v43 = v26:getContents(l_Item_0, l_Stylizer_1.Icons);
    local l_enabled_0 = v43.enabled;
    local l_color_0 = v43.color;
    local v46 = true;
    if v31 == 0 then
        v46 = l_ExpandableRoot_0;
    end;
    local v47 = (v31 - (l_ExpandableRoot_0 and 0 or 1)) * l_Stylizer_1.Indent;
    local l_Padding_0 = l_Stylizer_1.Padding;
    local l_Filter_0 = l_Stylizer_1.Filter;
    local _ = l_Stylizer_1.Detach;
    local v51 = UDim2.new(0, l_Stylizer_1.ColumnWidths.Weight, 1, 0);
    local v52 = UDim2.new(0, l_Stylizer_1.ColumnWidths.Timestamp, 1, 0);
    local v53 = (l_Item_0.state and l_Item_0.state.timePositionNormalized) and l_Item_0.state.length;
    local v54 = nil;
    v54 = if v31 == 0 then if l_RunService_0:IsServer() then l_Stylizer_1.Colors.Server else l_Stylizer_1.Colors.Client else if l_props_1.Selected then l_Stylizer_1.ActiveLayer else l_Stylizer_1.InactiveLayer:Lerp(l_Stylizer_1.ActiveLayer, l_Item_0.weight or 1);
    local v55 = l_Stylizer_1.TimeBar.Inactive:Lerp(l_Stylizer_1.TimeBar.Active, l_Item_0.weight or 1);
    local v56 = if v31 == 0 then l_Stylizer_1.Font.TopLayer else l_Stylizer_1.Font.RegularLayer;
    local v57 = UDim2.new(0, l_Size_0, 0, v38.Y.Offset);
    return v2.createElement(l_Pane_0, l_assign_0({
        LayoutOrder = if not l_BeforeIndentItem_0 then l_Index_0 else 2,
        Size = v38,
        Position = l_Position_0,
        Style = "Box",
        Layout = if not l_TailItem_0 then Enum.FillDirection.Horizontal else nil,
        HorizontalAlignment = if not l_TailItem_0 then Enum.HorizontalAlignment.Left else nil,
        BackgroundColor3 = l_Stylizer_1.Background,
        Padding = l_Padding_0,
        Spacing = l_Stylizer_1.Spacing
    }, l_props_1.WrapperProps), {
        Spacer = v2.createElement(l_Pane_0, {
            LayoutOrder = 2,
            Size = UDim2.new(0, v47, 0, 0)
        }),
        Toggle = v2.createElement(l_Pane_0, {
            LayoutOrder = 4,
            Size = v57,
            OnPress = if not not v46 and v32 then v26.onToggle else nil
        }, {
            Button = if not not v46 and v32 then v2.createElement("ImageButton", {
                LayoutOrder = 4,
                Size = UDim2.fromOffset(l_Size_0, l_Size_0),
                Position = UDim2.fromScale(0.5, 0.5),
                AnchorPoint = Vector2.new(0.5, 0.5),
                BackgroundTransparency = 1,
                Image = l_Stylizer_1.Arrow.Image,
                ImageColor3 = l_Stylizer_1.Arrow.Color,
                ImageRectSize = Vector2.new(l_Size_0, l_Size_0),
                ImageRectOffset = if not l_Expanded_0 then l_Stylizer_1.Arrow.CollapsedOffset else l_Stylizer_1.Arrow.ExpandedOffset,
                [v2.Event.Activated] = v26.onToggle
            }) else nil
        }),
        LeftIcon = v2.createElement(l_Image_0, l_join_0({
            ImageColor3 = v54,
            LayoutOrder = 6
        }, v40)),
        Name = v2.createElement(l_TextLabel_0, {
            Font = v56,
            TextColor = v54,
            LayoutOrder = 7,
            Text = v41,
            Size = UDim2.new(1, if v31 == 0 then -(((((((v47 + v57.X.Offset) + (not v40 and 0 or v40.Size.X.Offset)) + v57.X.Offset) + l_Padding_0.Left) + l_Padding_0.Right) + l_Stylizer_1.Spacing * 3) + l_Stylizer_1.Spacing * 3) else -(((((((((v47 + v57.X.Offset) + (not v40 and 0 or v40.Size.X.Offset)) + l_Stylizer_1.ColumnWidths.Weight) + l_Stylizer_1.ColumnWidths.Timestamp) + v57.X.Offset) + l_Padding_0.Left) + l_Padding_0.Right) + l_Stylizer_1.Spacing * 5) + l_Stylizer_1.Spacing * 3), 1, 0),
            TextXAlignment = Enum.TextXAlignment.Left,
            TextTruncate = Enum.TextTruncate.AtEnd
        }),
        Weight = if v31 ~= 0 then if v42 then v2.createElement(l_TextLabel_0, {
            Font = v56,
            TextColor = v54,
            LayoutOrder = 8,
            Text = v42,
            Size = v51,
            TextXAlignment = Enum.TextXAlignment.Right
        }) else v2.createElement(l_Pane_0, {
            Size = v51,
            LayoutOrder = 8
        }) else nil,
        Timestamp = if v31 ~= 0 then if v53 then v2.createElement(v18, {
            Size = v52,
            LayoutOrder = 9,
            TimePercentage = l_Item_0.state.timePositionNormalized,
            Length = l_Item_0.state.length,
            Font = v56,
            TextColor = v54,
            BarColor = v55,
            BarBorder = l_Stylizer_1.TimeBar.Border,
            BarBackground = l_Stylizer_1.TimeBar.Background
        }) else v2.createElement(l_Pane_0, {
            Size = v52,
            LayoutOrder = 9
        }) else nil,
        Adornment = if v31 ~= 0 then v2.createElement(l_Pane_0, {
            LayoutOrder = 10,
            Size = v57,
            OnPress = v26.onToggleAdornment
        }, {
            Button = v2.createElement("ImageButton", {
                Size = l_Filter_0.Size,
                Position = UDim2.fromScale(0.5, 0.5),
                AnchorPoint = Vector2.new(0.5, 0.5),
                BackgroundTransparency = 1,
                Image = l_Filter_0.Image,
                ImageColor3 = if not l_enabled_0 then l_Filter_0.InactiveColor else l_color_0,
                ImageTransparency = if not l_enabled_0 then l_Filter_0.InactiveTransparency else l_Filter_0.ActiveTransparency,
                [v2.Event.Activated] = v26.onToggleAdornment
            })
        }) else nil
    });
end;
v20.defaultProps = {
    ExpandableRoot = true
};
return l_withControl_0((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v20)));


local v0 = require(script:FindFirstAncestor("CompositorDebugger").Packages.Framework);
local l_StyleKey_0 = v0.Style.StyleKey;
local l_StyleModifier_0 = v0.Util.StyleModifier;
return {
    Arrow = {
        Image = "rbxasset://textures/StudioSharedUI/arrowSpritesheet.png",
        Size = 12,
        ExpandedOffset = Vector2.new(24, 0),
        CollapsedOffset = Vector2.new(12, 0),
        Color = l_StyleKey_0.MainText
    },
    Filter = {
        Image = "rbxasset://textures/CompositorDebugger/eye.png",
        Size = UDim2.fromOffset(12, 12),
        ActiveColor = l_StyleKey_0.MainText,
        ActiveTransparency = 0,
        InactiveColor = l_StyleKey_0.MainText,
        InactiveTransparency = 1
    },
    Detach = {
        Image = "rbxasset://textures/CompositorDebugger/clear.png",
        Size = UDim2.fromOffset(12, 12)
    },
    Border = l_StyleKey_0.SubBackground,
    Background = l_StyleKey_0.MainBackground,
    Indent = 17,
    [l_StyleModifier_0.Hover] = {
        Background = l_StyleKey_0.ButtonHover,
        Filter = {
            Image = "rbxasset://textures/CompositorDebugger/eye.png",
            Size = UDim2.fromOffset(12, 12),
            ActiveColor = l_StyleKey_0.MainText,
            ActiveTransparency = 0,
            InactiveColor = l_StyleKey_0.MainTextDisabled,
            InactiveTransparency = 0
        }
    },
    [l_StyleModifier_0.Selected] = {
        Background = l_StyleKey_0.ActionSelected,
        Filter = {
            Image = "rbxasset://textures/CompositorDebugger/eye.png",
            Size = UDim2.fromOffset(12, 12),
            ActiveColor = l_StyleKey_0.MainText,
            ActiveTransparency = 0,
            InactiveColor = l_StyleKey_0.MainTextDisabled,
            InactiveTransparency = 0
        }
    },
    ColumnWidths = {
        Tree = 250,
        Weight = 40,
        Timestamp = 100
    },
    Spacing = 5,
    Padding = {
        Top = 1,
        Bottom = 1,
        Left = 0,
        Right = 0
    },
    ActiveLayer = l_StyleKey_0.MainText,
    InactiveLayer = l_StyleKey_0.MainTextDisabled,
    TimeBar = {
        Active = l_StyleKey_0.DialogMainButtonSelected,
        Inactive = l_StyleKey_0.MainTextDisabled,
        Background = l_StyleKey_0.Button,
        Border = l_StyleKey_0.Border
    },
    Font = {
        TopLayer = Enum.Font.SourceSansBold,
        RegularLayer = Enum.Font.SourceSans
    },
    Colors = {
        Client = Color3.fromHex("349AD5"),
        Server = Color3.fromHex("00CC67")
    },
    Icons = {
        Blend1D = {
            Image = "rbxasset://textures/CompositorDebugger/blend1d.png",
            Size = UDim2.fromOffset(12, 12)
        },
        Blend2D = {
            Image = "rbxasset://textures/CompositorDebugger/blend2d.png",
            Size = UDim2.fromOffset(12, 12)
        },
        BlendSpace = {
            Image = "rbxasset://textures/CompositorDebugger/blend2d.png",
            Size = UDim2.fromOffset(12, 12)
        },
        ClipLayer = {
            Image = "rbxasset://textures/CompositorDebugger/clip.png",
            Size = UDim2.fromOffset(12, 12)
        },
        Default = {
            Image = "rbxasset://textures/CompositorDebugger/default.png",
            Size = UDim2.fromOffset(12, 12)
        },
        SelectLayer = {
            Image = "rbxasset://textures/CompositorDebugger/select.png",
            Size = UDim2.fromOffset(12, 12)
        },
        SequenceLayer = {
            Image = "rbxasset://textures/CompositorDebugger/sequence.png",
            Size = UDim2.fromOffset(12, 12)
        }
    }
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v2 = require(l_script_FirstAncestor_0.Packages.React);
local v3 = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local v4 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Dash_0 = v4.Dash;
local l_copy_0 = l_Dash_0.copy;
local l_join_0 = l_Dash_0.join;
local _ = l_Dash_0.keys;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_TextInput_0 = l_UI_0.TextInput;
local l_TreeTable_0 = l_UI_0.TreeTable;
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v19 = require(l_Actions_0.SetExpandedSections);
local v20 = require(l_Actions_0.SetHistoryField);
local v21 = require(l_script_FirstAncestor_0.Src.Components.LayerViewCell);
local v22 = require(l_script_FirstAncestor_0.Src.Thunks.SetOverride);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local v24 = require(l_Util_0.Constants);
local v25 = require(l_Util_0.debugFlags);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v27 = {
    props = {
        Editable = true,
        Overrides = true,
        History = true
    },
    state = {
        History = true
    },
    watches = {
        History = true
    }
};
local v32 = {
    number = {
        Type = "Number",
        History = true
    },
    string = {
        Type = "Text"
    },
    boolean = {
        Type = "Checkbox"
    },
    Vector2 = {
        Type = "Vector",
        Components = {
            "X",
            "Y"
        },
        GetValue = function(v28)
            return Vector2.new(v28[1], v28[2]);
        end,
        GetComponents = function(v29)
            return {
                v29.X,
                v29.Y
            };
        end,
        History = true
    },
    Vector3 = {
        Type = "Vector",
        Components = {
            "X",
            "Y",
            "Z"
        },
        GetValue = function(v30)
            return (Vector3.new(v30[1], v30[2], v30[3]));
        end,
        GetComponents = function(v31)
            return {
                v31.X,
                v31.Y,
                v31.Z
            };
        end,
        History = true
    }
};
local v33 = v2.PureComponent:extend("LayerView");
v33.init = function(v34)
    v34.getChildren = function(v35)
        return v35.children or {};
    end;
    v34.getItemId = function(v36)
        return v36.id;
    end;
    v34.onToggle = function(v37)
        v34.props.SetExpandedSections(l_join_0(v34.props.ExpandedSections, v37));
    end;
    v34.onDoubleClick = function(v38)
        if v38.hasChildren then
            local v39 = v34.getItemId(v38.item);
            v34.onToggle({
                [v39] = v34.props.ExpandedSections[v39] == false
            });
        end;
    end;
    v34.onCellEdited = function(v40, v41)
        v34.props.SetOverride(v41.id, v41.field, v40);
    end;
    v34.onCellAction = function(v42, v43)
        local _ = v34.props;
        if v42 == v24.LAYERVIEW_ACTIONS.Clear then
            v34.props.SetOverride(v43.id, v43.field, nil);
            return ;
        else
            if v42 == v24.LAYERVIEW_ACTIONS.History then
                v34.props.SetHistoryField(v43.id, v43.section, v43.field);
            end;
            return ;
        end;
    end;
    v34:setState({
        LayerData = nil
    });
end;
local _ = function(v45, v46)
    local l_v45_0 = v45;
    for _, v49 in v46, nil, nil do
        l_v45_0 = l_v45_0 and l_v45_0[v49];
    end;
    return l_v45_0;
end;
local function v51(v52, v53, v54, v55, v56, v57)
    if v55 then
        assert(v55);
        local v58 = v27[v54];
        local v59 = v58 and v58.Editable;
        local v60 = v58 and v58.Overrides;
        local v61 = v58 and v58.History;
        local _ = v57 == nil;
        v57 = v57 or {};
        for v63, v64 in v55, nil, nil do
            local v65 = {};
            local v66 = l_copy_0(v57);
            table.insert(v66, v63);
            if not (not v60 or not v56) then
                local l_v56_0 = v56;
                for _, v69 in v66, nil, nil do
                    l_v56_0 = l_v56_0 and l_v56_0[v69];
                end;
                local l_l_v56_0_0 = l_v56_0;
                if l_l_v56_0_0 ~= nil then
                    v64 = l_l_v56_0_0;
                    table.insert(v65, {
                        Id = v24.LAYERVIEW_ACTIONS.Clear,
                        Icon = {
                            Image = "rbxasset://textures/CompositorDebugger/clear.png",
                            Size = UDim2.fromOffset(12, 12)
                        }
                    });
                end;
            end;
            local v71 = {
                name = v63,
                id = v54 .. "|" .. table.concat(v66, "|"),
                path = {
                    id = v53,
                    section = v54,
                    field = v66
                }
            };
            local v72 = typeof(v64);
            if v72 == "table" then
                v71.value = {
                    Value = "",
                    Actions = v65
                };
                v71.children = {};
                v51(v71.children, v53, v54, v64, v56, v66);
            elseif v32[v72] then
                if not v61 or not v32[v72].History then
                    table.insert(v65, {
                        Id = v24.LAYERVIEW_ACTIONS.NoOp,
                        Icon = {
                            Image = "",
                            Size = UDim2.fromOffset(12, 12)
                        }
                    });
                else
                    table.insert(v65, {
                        Id = v24.LAYERVIEW_ACTIONS.History,
                        Icon = {
                            Image = "rbxasset://textures/CompositorDebugger/history.png",
                            Size = UDim2.fromOffset(12, 12)
                        }
                    });
                end;
                v71.value = {
                    Value = v64,
                    Disabled = not v59,
                    Schema = v32[v72],
                    Actions = v65
                };
            else
                v71.value = "[" .. v72 .. "]";
            end;
            table.insert(v52, v71);
        end;
        table.sort(v52, function(v73, v74)
            return v73.name < v74.name;
        end);
        return ;
    else
        return ;
    end;
end;
local function _(v75, v76, v77, v78)
    return function(v79, v80)
        if not (not v80 or not next(v80)) then
            local v81 = {
                name = v78:getText("LayerView", v79),
                children = {},
                id = v79
            };
            v51(v81.children, v76, v79, v80, v77);
            table.insert(v75, v81);
        end;
    end;
end;
local function v92(v83, v84, v85)
    if v83 then
        local v86 = {};
        if v25.ShowLayerID then
            table.insert(v86, {
                name = v83.id,
                children = {},
                id = v83.id or "uuid"
            });
        end;
        local l_id_0 = v83.id;
        local function v91(v88, v89)
            if not (not v89 or not next(v89)) then
                local v90 = {
                    name = v85:getText("LayerView", v88),
                    children = {},
                    id = v88
                };
                v51(v90.children, l_id_0, v88, v89, v84);
                table.insert(v86, v90);
            end;
        end;
        v91("layerDetails", {
            name = v83.name or "",
            class = v83.className,
            children = not not v83.children and #v83.children or 0
        });
        v91("props", v83.props);
        v91("state", v83.state);
        v91("watches", v83.watches);
        return v86;
    else
        return nil;
    end;
end;
v33.getDerivedStateFromProps = function(v93, _)
    return {
        LayerData = v92(v93.LayerData, v93.Overrides, v93.Localization) or v2.None
    };
end;
v33.render = function(v95)
    local l_state_0 = v95.state;
    local l_props_1 = v95.props;
    if not l_props_1.RawMode then
        if not l_state_0.LayerData then
            return v2.createElement(l_Pane_0, {
                LayoutOrder = l_props_1.LayoutOrder,
                Size = l_props_1.Size
            });
        else
            return v2.createElement(l_TreeTable_0, {
                LayoutOrder = l_props_1.LayoutOrder,
                Size = l_props_1.Size,
                Columns = {
                    {
                        Name = "Name",
                        Key = "name"
                    },
                    {
                        Name = "Value",
                        Key = "value"
                    }
                },
                Expansion = l_props_1.ExpandedSections,
                RootItems = l_state_0.LayerData,
                ShowHeader = false,
                GetChildren = v95.getChildren,
                GetItemId = v95.getItemId,
                FullSpan = true,
                FullSpanEmphasis = true,
                Scroll = true,
                CellComponent = v21,
                OnExpansionChange = v95.onToggle,
                OnDoubleClick = v95.onDoubleClick,
                OnCellEdited = v95.onCellEdited,
                OnCellAction = v95.onCellAction
            });
        end;
    else
        local v98 = nil;
        local v99 = require(l_script_FirstAncestor_0.Src.Util.Debug.dumpTable);
        if not l_props_1.LayerData then
            v98 = "{}";
        else
            local v100 = l_copy_0(l_props_1.LayerData);
            if not v25.ShowRawDataChildren then
                v100.children = not v100.children and 0 or #v100.children;
            end;
            if not v25.ShowLayerID then
                v100.id = nil;
            end;
            v99(v100, function(v101)
                v98 = v101;
            end);
        end;
        return v2.createElement(l_TextInput_0, {
            LayoutOrder = l_props_1.LayoutOrder,
            Size = l_props_1.Size,
            MultiLine = true,
            Disabled = true,
            Text = v98
        });
    end;
end;
return (v3.connect(function(v102, _)
    return {
        ExpandedSections = v102.Status.ExpandedSections,
        HistoryField = v102.Status.HistoryField
    };
end, function(v104)
    return {
        SetExpandedSections = function(v105)
            v104(v19(v105));
        end,
        SetOverride = function(v106, v107, v108)
            v104(v22(v106, v107, v108));
        end,
        SetHistoryField = function(v109, v110, v111)
            v104(v20(v109, v110, v111));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v33))));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_withContext_0 = v2.ContextServices.withContext;
local l_join_0 = v2.Dash.join;
local l_Stylizer_0 = v2.Style.Stylizer;
local l_UI_0 = v2.UI;
local l_Image_0 = l_UI_0.Image;
local l_Pane_0 = l_UI_0.Pane;
local l_PropertyCell_0 = l_UI_0.PropertyCell;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_DEPRECATED_TextInput_0 = l_UI_0.DEPRECATED_TextInput;
local l_StyleModifier_0 = v2.Util.StyleModifier;
local v14 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v15 = v1.PureComponent:extend("LayerViewCell");
v15.init = function(v16)
    v16.onToggle = function()
        v16.props.CellProps.OnToggle(v16.props.Row);
    end;
    v16.textRef = v1.createRef();
    v16.fetchCellContentsWidthIfOverflow = function()
        if not v16.state.textOverflows then
            return 0;
        else
            local l_CellStyle_0 = v16.props.CellProps.CellStyle;
            return v16.textRef.current.AbsoluteSize.X + (l_CellStyle_0.CellPadding.Left + l_CellStyle_0.Indent);
        end;
    end;
    v16.onAbsoluteSizeChanged = function(_)
        if v16.textRef:getValue() then
            v16:setState({
                textOverflows = not v16.textRef:getValue().TextFits
            });
        end;
        local l_props_0 = v16.props;
        if not (not v16.textRef.current or not l_props_0.SetCellContentsWidth) then
            l_props_0.SetCellContentsWidth(l_props_0.ColumnIndex, l_props_0.RowIndex, v16.fetchCellContentsWidthIfOverflow());
        end;
    end;
    v16.onTextInputFocused = function(v20)
        local l_props_1 = v16.props;
        local l_OnFocused_0 = l_props_1.CellProps.OnFocused;
        if l_OnFocused_0 then
            l_OnFocused_0(v20, l_props_1.Row, l_props_1.ColumnIndex);
        end;
    end;
    v16.onTextInputFocusLost = function(v23, v24)
        local l_props_2 = v16.props;
        local l_OnFocusLost_0 = l_props_2.CellProps.OnFocusLost;
        if l_OnFocusLost_0 then
            l_OnFocusLost_0(v23, v24, l_props_2.Row, l_props_2.ColumnIndex);
        end;
    end;
    v16.onPressed = function(...)
        local l_props_3 = v16.props;
        if l_props_3.CellProps.OnCellPressed then
            l_props_3.CellProps.OnCellPressed(l_props_3.Row.item.path, l_props_3.ColumnIndex, ...);
        end;
    end;
    v16.onDoubleClick = function(...)
        local l_props_4 = v16.props;
        if l_props_4.CellProps.OnCellDoubleClick then
            l_props_4.CellProps.OnCellDoubleClick(l_props_4.Row.item.path, l_props_4.ColumnIndex, ...);
        end;
    end;
    v16.getTextElement = function(v29, v30, v31)
        local l_TextInputCols_0 = v29.CellProps.TextInputCols;
        if not ((l_TextInputCols_0 and l_TextInputCols_0[v29.ColumnIndex]) and v29.Row.depth == 0) then
            return not not v30 and v1.createElement(l_TextLabel_0, {
                LayoutOrder = 3,
                Size = v31,
                Text = v30,
                TextXAlignment = Enum.TextXAlignment.Left,
                ref = v16.textRef
            }) or nil;
        else
            return v1.createElement(l_DEPRECATED_TextInput_0, {
                AutomaticSize = Enum.AutomaticSize.XY,
                LayoutOrder = 3,
                OnFocused = v16.onTextInputFocused,
                OnFocusLost = v16.onTextInputFocusLost,
                Size = v31,
                Text = v30,
                ref = v16.textRef
            });
        end;
    end;
    v16.getTextFromProps = function(v33)
        local v34 = v33.Columns[v33.ColumnIndex];
        return v33.Row.item[v34.Key or v34.Name];
    end;
    v16.getPropertyCell = function(v35)
        return v1.createElement(l_Pane_0, {}, {
            PropertyCell = v1.createElement(l_PropertyCell_0, {
                AnchorPoint = Vector2.new(0, 0.5),
                Size = UDim2.new(1, -6, 1, 0),
                Position = UDim2.new(0, 3, 0.5, 0),
                GetAutocompleteItems = v16.props.CellProps.GetAutocompleteItems,
                Item = v35.Item,
                LayoutOrder = 3,
                OnChanged = v16.onChanged,
                OnDoubleClick = v35.OnDoubleClick,
                OnPressed = v35.OnPressed,
                Schema = v35.Schema,
                Value = v35.Value
            })
        });
    end;
    v16.onChanged = function(v36)
        if v16.props.CellProps.OnCellEdited then
            v16.props.CellProps.OnCellEdited(v36, v16.props.Row.item.path, v16.props.ColumnIndex);
        end;
    end;
end;
v15.didUpdate = function(v37, v38)
    local l_props_5 = v37.props;
    if not (not (not (v38.RowIndex == l_props_5.RowIndex) or v37.getTextFromProps(v38) ~= v37.getTextFromProps(l_props_5)) or not l_props_5.SetCellContentsWidth) then
        l_props_5.SetCellContentsWidth(l_props_5.ColumnIndex, l_props_5.RowIndex, v37.fetchCellContentsWidthIfOverflow());
    end;
end;
v15.render = function(v40)
    local l_props_6 = v40.props;
    local _ = l_props_6.Stylizer;
    local v43 = l_props_6.Columns[l_props_6.ColumnIndex];
    local v44 = v43.Key or v43.Name;
    local v45 = l_props_6.Width or UDim.new(1 / #l_props_6.Columns, 0);
    local l_Row_0 = l_props_6.Row;
    local l_CellProps_0 = l_props_6.CellProps;
    local v48 = l_Row_0.item[v44];
    local v49 = nil;
    local v50 = nil;
    local v51 = false;
    if typeof(v48) == "table" then
        v49 = tostring(v48.Value);
        v50 = v48.LeftIcon;
        if v48.Schema then
            v51 = true;
        end;
    else
        v49 = tostring(v48);
    end;
    local v52 = l_props_6.Tooltip or v49;
    local v53 = false;
    if v52 ~= nil then
        v53 = false;
        if v52 ~= "" then
            v53 = v40.state.textOverflows and not l_CellProps_0.DisableTooltip;
        end;
    end;
    local v54 = l_join_0(l_props_6.Style, l_CellProps_0.CellStyle);
    if not (l_props_6.RowIndex % 2 == 1 and v54.BackgroundOdd) then
        local _ = v54.BackgroundEven;
    end;
    local v56 = if not l_props_6.Emphasis then v54.BackgroundEven else v54.BackgroundOdd;
    if not (not l_props_6.HighlightCell or not v54[l_StyleModifier_0.Hover]) then
        v56 = l_props_6.RowIndex % 2 == 1 and v54[l_StyleModifier_0.Hover].BackgroundOdd or v54[l_StyleModifier_0.Hover].BackgroundEven;
    end;
    local v57 = l_CellProps_0.Expansion[l_CellProps_0.GetItemId(l_Row_0.item)];
    local l_Size_0 = v54.Arrow.Size;
    local v59 = l_Row_0.depth * v54.Indent;
    local v60 = l_props_6.ColumnIndex == 1;
    local v61 = if not v51 then v54.CellPadding else v54.SchemaCellPadding;
    local v62 = not not v60 and {
        Top = v61.Top,
        Left = v54.CellPadding.Left + v59,
        Right = v61.Right,
        Bottom = v61.Bottom
    } or v61;
    local v63 = v60 and l_Row_0.hasChildren;
    local v64 = 0;
    local v65 = nil;
    if not (not (typeof(v48) == "table") or not v48.Actions) then
        v64 = v64 + v54.CellSpacing;
        v65 = {};
        for v66, v67 in ipairs(v48.Actions) do
            if v67.Id == v14.LAYERVIEW_ACTIONS.NoOp then
                v65["Action " .. v66] = v1.createElement(l_Pane_0, {
                    Size = v67.Icon.Size,
                    LayoutOrder = v66,
                    BackgroundTransparency = 1
                });
            else
                v65[v67.Id] = v1.createElement("ImageButton", {
                    Size = v67.Icon.Size,
                    LayoutOrder = v66,
                    BackgroundTransparency = 1,
                    Image = v67.Icon.Image,
                    ImageColor3 = v54.Text,
                    [v1.Event.Activated] = function()
                        if l_CellProps_0.OnCellAction then
                            l_CellProps_0.OnCellAction(v67.Id, l_Row_0.item.path, l_props_6.ColumnIndex);
                        end;
                    end
                });
            end;
            v64 = v64 + (v67.Icon.Size.X.Offset + v54.CellSpacing);
        end;
    end;
    local v68 = 0;
    if v50 then
        v68 = v68 + (v54.CellSpacing + v50.Size.X.Offset);
    end;
    if v63 then
        v68 = v68 + (v54.CellSpacing + l_Size_0);
    end;
    local v69 = UDim2.new(1, -v68, 1, 0);
    return v1.createElement(l_Pane_0, {
        Style = "Box",
        BackgroundColor3 = v56,
        BorderSizePixel = 1,
        BorderColor3 = v54.Border,
        Size = UDim2.new(v45.Scale, v45.Offset, 1, 0),
        [v1.Change.AbsoluteSize] = v40.onAbsoluteSizeChanged,
        ClipsDescendants = true
    }, {
        Tooltip = v53 and v1.createElement(l_Tooltip_0, {
            MaxWidth = v54.Tooltip.MaxWidth,
            Text = v52,
            TextXAlignment = Enum.TextXAlignment.Left
        }),
        Left = v1.createElement(l_Pane_0, {
            Layout = Enum.FillDirection.Horizontal,
            LayoutOrder = l_props_6.ColumnIndex,
            Padding = v62,
            Spacing = v54.CellSpacing,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            Size = UDim2.new(1, -v64, 1, 0)
        }, {
            Toggle = if not v63 then nil else v1.createElement(l_Pane_0, {
                AutomaticSize = Enum.AutomaticSize.XY,
                LayoutOrder = 1
            }, {
                Icon = v1.createElement("ImageButton", {
                    Size = UDim2.fromOffset(l_Size_0, l_Size_0),
                    BackgroundTransparency = 1,
                    Image = v54.Arrow.Image,
                    ImageColor3 = v54.Arrow.Color,
                    ImageRectSize = Vector2.new(l_Size_0, l_Size_0),
                    ImageRectOffset = if not v57 then v54.Arrow.CollapsedOffset else v54.Arrow.ExpandedOffset,
                    [v1.Event.Activated] = v40.onToggle
                })
            }),
            LeftIcon = not not v50 and v1.createElement(l_Image_0, l_join_0({
                LayoutOrder = 2
            }, v50)) or nil,
            Text = if not v51 or v48.Disabled then v40.getTextElement(l_props_6, v49, v69) else v40.getPropertyCell({
                OnDoubleClick = v40.onDoubleClick,
                OnPressed = v40.onPressed,
                Schema = v48.Schema,
                Size = v69,
                Value = v48.Value
            })
        }),
        Right = if not v65 then nil else v1.createElement(l_Pane_0, {
            AnchorPoint = Vector2.new(1, 0.5),
            AutomaticSize = Enum.AutomaticSize.XY,
            Layout = Enum.FillDirection.Horizontal,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            Position = UDim2.new(1, -3, 0.5, 0),
            Spacing = v54.CellSpacing
        }, v65)
    });
end;
return (l_withContext_0({
    Stylizer = l_Stylizer_0
})(v15));


local _ = require(script:FindFirstAncestor("CompositorDebugger").Src.Types);
local function v1(v2, v3, v4)
    local v5 = {};
    local v6 = false;
    for _, v8 in v2, nil, nil do
        if v3[v8.className] or v4 and v8.weight == 0 then
            v6 = true;
        else
            local _ = nil;
            local v10, v11 = v1(v8.children, v3, v4);
            v8.children = v10;
            v6 = v6 or v11;
            table.insert(v5, v8);
        end;
    end;
    if v6 then
        v2 = v5;
    end;
    return v2, v6;
end;
return v1;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local v3 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_copy_0 = v3.Dash.copy;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_Pane_0 = v3.UI.Pane;
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v10 = require(l_Actions_0.SetActiveLayersFilter);
local v11 = require(l_Actions_0.SetHistoryField);
local v12 = require(l_Actions_0.SetLayerFilter);
local l_Components_0 = l_script_FirstAncestor_0.Src.Components;
local v14 = require(l_Components_0.CompositorSelector);
local v15 = require(l_Components_0.LayerPanel);
local v16 = require(l_Components_0.LayerTree);
local v17 = require(l_Components_0.MainSplitPane);
local v18 = require(l_Components_0.Toolbar);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local v20 = require(l_Util_0.debugFlags);
local v21 = require(l_Util_0.Constants);
local l_Thunks_0 = l_script_FirstAncestor_0.Src.Thunks;
local v23 = require(l_Thunks_0.SetFrameBufferDuration);
local v24 = require(l_Thunks_0.ToggleAdornment);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v26 = require(script.filterChildren);
local v27 = v1.PureComponent:extend("MainComponent");
v27.init = function(v28)
    v28.openedTimestamp = nil;
    v28.state = {
        layout = Enum.FillDirection.Vertical
    };
    v28.onToggleAdornment = function(v29)
        v28.props.ToggleAdornment(v29.id);
    end;
    v28.onAbsoluteSizeChanged = function(v30)
        v28:setState({
            layout = if v30.AbsoluteSize.Y < v30.AbsoluteSize.X then Enum.FillDirection.Horizontal else Enum.FillDirection.Vertical
        });
    end;
end;
v27.readSettings = function(v31)
    local l_props_0 = v31.props;
    local v33 = l_props_0.Plugin:get();
    local l_v33_Setting_0 = v33:GetSetting(v21.SETTINGS.LayerFilters);
    if l_v33_Setting_0 ~= nil then
        for v35, v36 in l_v33_Setting_0, nil, nil do
            l_props_0.SetLayerFilter(v35, v36);
        end;
    end;
    local l_v33_Setting_1 = v33:GetSetting(v21.SETTINGS.ActiveLayersFilter);
    if l_v33_Setting_1 ~= nil then
        l_props_0.SetActiveLayersFilter(l_v33_Setting_1);
    end;
    local v38 = v33:GetSetting(v21.SETTINGS.FrameBufferDuration) or 10;
    if not v21.TIMECONTROLS_INVERVALS[v38] then
        v38 = 10;
    end;
    l_props_0.SetFrameBufferDuration(v38);
end;
v27.didMount = function(v39)
    v39.openedTimestamp = os.clock();
    v39:readSettings();
end;
v27.willUnmount = function(v40)
    v40.props.Analytics:report("onPluginClosed", os.clock() - v40.openedTimestamp);
end;
v27.render = function(v41)
    local l_props_1 = v41.props;
    local l_state_0 = v41.state;
    local l_Stylizer_1 = l_props_1.Stylizer;
    local l_layout_0 = l_state_0.layout;
    local v46 = nil;
    local v47 = l_props_1.Overrides and l_props_1.Overrides[l_props_1.SelectedLayer];
    local l_ExpandedSections_0 = l_props_1.ExpandedSections;
    local v49 = {
        UDim.new(0.35, 0),
        UDim.new(0.25, 0)
    };
    local v50 = {
        UDim.new(0.6, 0),
        UDim.new(0.4, 0)
    };
    local v51 = l_props_1.FrameBuffer and l_props_1.FrameBuffer[1];
    if not (not v51 or not l_props_1.HistoryOffset) and l_props_1.HistoryOffset ~= 0 then
        local v52 = v51.timestamp + l_props_1.HistoryOffset;
        for v53 = 2, l_props_1.FrameBuffer:getSize() do
            if l_props_1.FrameBuffer[v53] then
                if v51.timestamp >= v52 then
                    v51 = l_props_1.FrameBuffer[v53];
                else
                    break;
                end;
            end;
        end;
    end;
    local v54 = v51 and v51.payload;
    if v54 then
        local v55, v56 = v26(v54.children, l_props_1.LayerFilters, l_props_1.ActiveLayersFilter);
        if v56 then
            v54 = l_copy_0(v54);
            v54.children = v55;
        end;
        v46 = v51.layerMap and v51.layerMap[l_props_1.SelectedLayer];
    end;
    return v1.createElement(l_Pane_0, {
        Size = UDim2.fromScale(1, 1),
        [v1.Change.AbsoluteSize] = v41.onAbsoluteSizeChanged
    }, {
        CompositorSelector = v1.createElement(v14),
        MainSplitPane = v1.createElement(v17, {
            MinSizes = v49,
            InitialSizes = v50,
            Layout = l_layout_0
        }, {
            v1.createElement(l_Pane_0, {
                LayoutOrder = 1,
                Layout = Enum.FillDirection.Vertical,
                VerticalAlignment = Enum.VerticalAlignment.Top
            }, {
                Toolbar = v1.createElement(v18, {
                    FrameBuffer = l_props_1.FrameBuffer,
                    LayoutOrder = 1,
                    Size = UDim2.new(1, 0, 0, l_Stylizer_1.ToolbarHeight)
                }),
                LayerTree = v1.createElement(v16, {
                    LayoutOrder = 3,
                    Size = UDim2.new(1, 0, 1, -l_Stylizer_1.ToolbarHeight),
                    FramePayload = v54,
                    Adornments = l_props_1.Adornments,
                    OnToggleAdornment = v41.onToggleAdornment
                })
            }),
            v1.createElement(v15, {
                LayoutOrder = 2,
                LayerData = v46,
                FrameBuffer = l_props_1.FrameBuffer,
                ExpandedSections = l_ExpandedSections_0,
                Overrides = v47,
                ShowRawPayload = v20.ShowRawPayload
            })
        })
    });
end;
return (v2.connect(function(v57)
    return {
        FrameBuffer = v57.DebugData.FrameBuffer,
        Overrides = v57.DebugData.Overrides,
        ActiveLayersFilter = v57.Status.ActiveLayersFilter,
        Adornments = v57.Status.Adornments,
        ExpandedSections = v57.Status.ExpandedSections,
        HistoryField = v57.Status.HistoryField,
        HistoryOffset = v57.Status.HistoryOffset,
        LayerFilters = v57.Status.LayerFilters,
        SelectedLayer = v57.Status.SelectedLayer
    };
end, function(v58)
    return {
        SetActiveLayersFilter = function(v59)
            v58(v10(v59));
        end,
        SetFrameBufferDuration = function(v60)
            v58(v23(v60));
        end,
        SetHistoryField = function(v61, v62, v63)
            v58(v11(v61, v62, v63));
        end,
        SetLayerFilter = function(v64, v65)
            v58(v12(v64, v65));
        end,
        ToggleAdornment = function(v66)
            v58(v24(v66));
        end
    };
end)((l_withContext_0({
    Analytics = l_ContextServices_0.Analytics,
    Plugin = l_ContextServices_0.Plugin,
    Stylizer = l_Stylizer_0
})(v27))));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v2.Style.Stylizer;
local l_SplitPane_0 = v2.UI.SplitPane;
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v10 = v1.PureComponent:extend("MainSplitPane");
v10.init = function(v11)
    v11.state = {
        sizes = v11.props.InitialSizes
    };
    v11.onSizesChange = function(v12)
        v11:setState({
            sizes = v12
        });
    end;
end;
v10.render = function(v13)
    local l_state_0 = v13.state;
    local l_props_0 = v13.props;
    return v1.createElement(l_SplitPane_0, {
        Size = UDim2.fromScale(1, 1),
        Sizes = l_state_0.sizes,
        OnSizesChange = v13.onSizesChange,
        MinSizes = l_props_0.MinSizes,
        PaneStyle = "BorderBox",
        BarStyle = "BorderBox",
        UseScale = true,
        ClampSize = true,
        Layout = l_props_0.Layout
    }, l_props_0.children);
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v10));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local v3 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local _ = v3.Style.Stylizer;
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v8 = require(l_Actions_0.SetActiveLayersFilter);
local v9 = require(l_Actions_0.SetLayerFilter);
local v10 = require(l_script_FirstAncestor_0.Src.Thunks.SetFrameBufferDuration);
local v11 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local l_showContextMenu_0 = v3.UI.showContextMenu;
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v14 = v1.PureComponent:extend("SettingsButton");
v14.init = function(v15)
    v15.toggleCrossFadeFilter = function()
        local l_props_0 = v15.props;
        local v17 = l_props_0.Plugin:get();
        local l_LayerFilters_0 = l_props_0.LayerFilters;
        l_LayerFilters_0.CrossFade = not l_LayerFilters_0.CrossFade;
        l_props_0.SetLayerFilter("CrossFade", l_LayerFilters_0.CrossFade);
        v17:SetSetting(v11.SETTINGS.LayerFilters, l_LayerFilters_0);
        l_props_0.Analytics:report("onChangeSetting", "crossFadeFilter", l_LayerFilters_0.CrossFade);
    end;
    v15.toggleActiveLayersFilter = function()
        local l_props_1 = v15.props;
        local v20 = l_props_1.Plugin:get();
        local v21 = not v15.props.ActiveLayersFilter;
        v15.props.SetActiveLayersFilter(v21);
        v20:SetSetting(v11.SETTINGS.ActiveLayersFilter, v21);
        l_props_1.Analytics:report("onChangeSetting", "activeLayersFilter", v21);
    end;
    v15.onReplayDurationChanged = function(v22)
        local l_props_2 = v15.props;
        local v24 = l_props_2.Plugin:get();
        local l_Id_0 = v22.Id;
        v15.props.SetFrameBufferDuration(l_Id_0);
        v24:SetSetting(v11.SETTINGS.FrameBufferDuration, l_Id_0);
        l_props_2.Analytics:report("onChangeSetting", "frameBufferDuration", l_Id_0);
    end;
    v15.onButtonClicked = function()
        local l_props_3 = v15.props;
        local l_Localization_0 = l_props_3.Localization;
        l_showContextMenu_0(l_props_3.Plugin:get(), {
            v15:makeReplaySubmenu(),
            {
                Id = "ToggleCrossFade",
                Text = l_Localization_0:getText("Settings", "ToggleCrossFade"),
                Checked = not v15.props.LayerFilters.CrossFade,
                OnItemClicked = v15.toggleCrossFadeFilter
            },
            {
                Id = "ToggleActiveLayers",
                Text = l_Localization_0:getText("Settings", "ToggleActiveLayers"),
                Checked = v15.props.ActiveLayersFilter,
                OnItemClicked = v15.toggleActiveLayersFilter
            }
        });
    end;
end;
v14.makeReplaySubmenu = function(v28)
    local l_props_4 = v28.props;
    local l_Localization_1 = l_props_4.Localization;
    local v31 = if not l_props_4.FrameBuffer then nil else l_props_4.FrameBuffer:getSize() / v11.FRAMERATE;
    local v32 = {};
    for v33, _ in v11.TIMECONTROLS_INVERVALS, nil, nil do
        table.insert(v32, {
            Id = v33,
            Text = l_Localization_1:getText("Replay", "Seconds", {
                duration = v33
            }),
            Checked = v33 == v31,
            OnItemClicked = v28.onReplayDurationChanged
        });
    end;
    table.sort(v32, function(v35, v36)
        return v35.Id < v36.Id;
    end);
    v32.Id = "ReplayLength";
    v32.Text = l_Localization_1:getText("Settings", "ReplayLength");
    return v32;
end;
v14.render = function(v37)
    local l_props_5 = v37.props;
    local l_Stylizer_1 = l_props_5.Stylizer;
    return v1.createElement("ImageButton", {
        LayoutOrder = l_props_5.LayoutOrder,
        Size = l_props_5.Size,
        Position = UDim2.fromScale(1, 0.5),
        AnchorPoint = Vector2.new(1, 0.5),
        BackgroundTransparency = 1,
        Image = l_Stylizer_1.Image,
        ImageColor3 = l_Stylizer_1.Color,
        [v1.Event.Activated] = v37.onButtonClicked
    });
end;
return (v2.connect(function(v40, _)
    return {
        ActiveLayersFilter = v40.Status.ActiveLayersFilter,
        LayerFilters = v40.Status.LayerFilters
    };
end, function(v42)
    return {
        SetActiveLayersFilter = function(v43)
            v42(v8(v43));
        end,
        SetFrameBufferDuration = function(v44)
            v42(v10(v44));
        end,
        SetLayerFilter = function(v45, v46)
            v42(v9(v45, v46));
        end
    };
end)((l_withContext_0({
    Analytics = l_ContextServices_0.Analytics,
    Localization = l_ContextServices_0.Localization,
    Plugin = l_ContextServices_0.Plugin,
    Stylizer = v3.Style.Stylizer
})(v14))));


return {
    Image = "rbxasset://textures/CompositorDebugger/settings.png",
    Color = require(script:FindFirstAncestor("CompositorDebugger").Packages.Framework).Style.StyleKey.MainText
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local _ = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local v3 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local _ = v3.Style.Stylizer;
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local _ = require(l_Actions_0.SetActiveLayersFilter);
local _ = require(l_Actions_0.SetLayerFilter);
local _ = require(l_script_FirstAncestor_0.Src.Util.Constants);
local _ = v3.UI.showContextMenu;
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v13 = v1.PureComponent:extend("PlayPauseButton");
v13.init = function(_)
end;
v13.render = function(v15)
    local l_props_0 = v15.props;
    local l_Style_0 = l_props_0.Style;
    return v1.createElement("ImageButton", {
        LayoutOrder = l_props_0.LayoutOrder,
        Size = l_Style_0.ButtonSize,
        BackgroundTransparency = 1,
        Image = if not l_props_0.IsPlaying then l_Style_0.Play else l_Style_0.Pause,
        ImageColor3 = l_Style_0.Color,
        [v1.Event.Activated] = l_props_0.OnButtonClicked
    });
end;
return (l_withContext_0({
    Analytics = l_ContextServices_0.Analytics,
    Localization = l_ContextServices_0.Localization,
    Plugin = l_ContextServices_0.Plugin
})(v13));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local l_Pane_0 = require(l_script_FirstAncestor_0.Packages.Framework).UI.Pane;
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v4 = v1.PureComponent:extend("Scrubber");
v4.init = function(_)
end;
v4.render = function(v6)
    local _ = v6.state;
    local l_props_0 = v6.props;
    local l_Style_0 = l_props_0.Style;
    local l_HeadSize_0 = l_Style_0.Scrubber.HeadSize;
    local l_Color_0 = l_Style_0.Scrubber.Color;
    return v1.createElement(l_Pane_0, {
        Size = UDim2.new(0, 1, 1, 0),
        Position = l_props_0.Position,
        ZIndex = l_props_0.ZIndex
    }, {
        Line = v1.createElement(l_Pane_0, {
            Size = UDim2.new(0, 1, 1, 0),
            AnchorPoint = Vector2.new(0.5, 0),
            BackgroundColor = l_Color_0
        }),
        Head = v1.createElement(l_Pane_0, {
            Size = UDim2.new(0, l_HeadSize_0, 0, l_HeadSize_0),
            AnchorPoint = Vector2.new(0.5, 0),
            BackgroundColor = l_Color_0
        })
    });
end;
return v4;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local l_StyleKey_0 = require(l_script_FirstAncestor_0.Packages.Framework).Style.StyleKey;
return {
    BackgroundColor = l_StyleKey_0.SubBackground2,
    PlayPauseButton = {
        ButtonSize = UDim2.fromOffset(24, 24),
        Play = "rbxasset://textures/CompositorDebugger/play.png",
        Pause = "rbxasset://textures/CompositorDebugger/pause.png",
        Color = l_StyleKey_0.MainText
    },
    Tick = {
        Color = l_StyleKey_0.MainTextDisabled,
        LBorder = {
            TextAlignment = Enum.TextXAlignment.Left,
            Width = 2,
            Height = 1
        },
        RBorder = {
            TextAlignment = Enum.TextXAlignment.Right,
            Width = 2,
            Height = 1
        },
        Major = {
            TextAlignment = Enum.TextXAlignment.Left,
            Width = 1,
            Height = 0.75
        },
        Medium = {
            Width = 1,
            Height = 0.5
        },
        Minor = {
            Width = 1,
            Height = 0.25
        }
    },
    Intervals = require(l_script_FirstAncestor_0.Src.Util.Constants).TIMECONTROLS_INVERVALS,
    Scrubber = {
        Color = l_StyleKey_0.DialogMainButton,
        HeadSize = 5
    },
    BufferBar = {
        Color = l_StyleKey_0.DialogMainButton,
        Height = 2
    }
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local _ = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local l_UI_0 = require(l_script_FirstAncestor_0.Packages.Framework).UI;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v7 = v1.PureComponent:extend("TimelineTick");
v7.init = function(_)
end;
v7.render = function(v9)
    local _ = v9.state;
    local l_props_0 = v9.props;
    local v12 = l_props_0.TextAlignment == Enum.TextXAlignment.Right;
    return v1.createElement(l_Pane_0, {
        ZIndex = l_props_0.ZIndex,
        Size = UDim2.new(0, 1, 1, 0),
        Position = l_props_0.Position
    }, {
        Tick = v1.createElement(l_Pane_0, {
            Size = UDim2.new(0, l_props_0.Width, l_props_0.Height, 0),
            Position = UDim2.fromScale(0.5, 1),
            AnchorPoint = Vector2.new(0.5, 1),
            BorderSizePixel = 0,
            BackgroundColor = l_props_0.Color,
            BackgroundTransparency = 0
        }),
        Label = if not l_props_0.TextAlignment then nil else v1.createElement(l_TextLabel_0, {
            AnchorPoint = Vector2.new(not v12 and 0 or 1, 0),
            AutomaticSize = Enum.AutomaticSize.XY,
            Text = tostring(if l_props_0.Tick ~= 0 then -l_props_0.Tick else l_props_0.Tick),
            TextSize = 14,
            TextXAlignment = l_props_0.TextAlignment,
            TextYAlignment = Enum.TextYAlignment.Center,
            Position = UDim2.new(0, not v12 and 3 or -3, 0, 0),
            TextColor = l_props_0.Color,
            ZIndex = 2
        })
    });
end;
return v7;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local v3 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_Pane_0 = v3.UI.Pane;
local l_Components_0 = l_script_FirstAncestor_0.Src.Components;
local v11 = require(l_Components_0.SettingsButton);
local v12 = require(l_Components_0.TimeControls);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v14 = v1.PureComponent:extend("Toolbar");
v14.init = function(_)
end;
v14.render = function(v16)
    local l_props_0 = v16.props;
    local l_Stylizer_1 = l_props_0.Stylizer;
    return v1.createElement(l_Pane_0, {
        Size = l_props_0.Size,
        Layout = Enum.FillDirection.Horizontal,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        VerticalAlignment = Enum.VerticalAlignment.Top,
        LayoutOrder = l_props_0.LayoutOrder,
        BackgroundColor = l_Stylizer_1.BackgroundColor
    }, {
        TimeControls = v1.createElement(v12, {
            FrameBuffer = l_props_0.FrameBuffer,
            LayoutOrder = 1,
            Size = UDim2.new(1, -l_Stylizer_1.ButtonSize.X.Offset, 1, 0),
            MajorInterval = 5,
            MinorInterval = 1
        }),
        SettingsButton = v1.createElement(v11, {
            FrameBuffer = l_props_0.FrameBuffer,
            LayoutOrder = 2,
            Size = l_Stylizer_1.ButtonSize,
            AnchorPoint = Vector2.new(1, 0.5)
        })
    });
end;
return (v2.connect(function(_, _)
    return {};
end, function(_)
    return {};
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v14))));


return {
    BackgroundColor = require(script:FindFirstAncestor("CompositorDebugger").Packages.Framework).Style.StyleKey.InputFieldBackground,
    ButtonSize = UDim2.fromOffset(24, 24)
};


local l_StudioFixPluginWidgetLocalizedIds_0 = game:GetFastFlag("StudioFixPluginWidgetLocalizedIds");
local l_Parent_0 = script.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v3 = require(l_Parent_0.Packages.React);
local v4 = require(l_Parent_0.Packages.ReactRoblox);
local v5 = require(l_Parent_0.Packages.Rodux);
local v6 = require(l_Parent_0.Packages.Framework);
local l_UI_0 = v6.UI;
local l_DockWidget_0 = l_UI_0.DockWidget;
local l_PluginButton_0 = l_UI_0.PluginButton;
local l_PluginToolbar_0 = l_UI_0.PluginToolbar;
local v11 = game:DefineFastFlag("CDCompositorDebuggerIcon", false);
local l_ContextServices_0 = v6.ContextServices;
local l_Plugin_0 = l_ContextServices_0.Plugin;
local l_Mouse_0 = l_ContextServices_0.Mouse;
local l_Store_0 = l_ContextServices_0.Store;
local v16 = require(l_Parent_0.Src.Reducers.MainReducer);
local l_Resources_0 = l_Parent_0.Src.Resources;
local v18 = require(l_Resources_0.AnalyticsHandlers);
local v19 = require(l_Resources_0.MakeTheme);
local l_SourceStrings_0 = l_Resources_0.SourceStrings;
local l_LocalizedStrings_0 = l_Resources_0.LocalizedStrings;
local v22 = require(l_Parent_0.Src.Components.MainComponent);
local v23 = v3.PureComponent:extend("MainPlugin");
v23.init = function(v24, _)
    v24:setState({
        enabled = false
    });
    v24.toggleEnabled = function()
        v24:setState(function(v26)
            return {
                enabled = not v26.enabled
            };
        end);
    end;
    v24.onClose = function()
        v24:setState({
            enabled = false
        });
    end;
    v24.onRestore = function(v27)
        v24:setState({
            enabled = v27
        });
    end;
    v24.onWidgetEnabledChanged = function(v28)
        v24:setState({
            enabled = v28.Enabled
        });
    end;
    v24.store = v5.Store.new(v16, nil, {
        v5.thunkMiddleware
    }, nil);
    v24.localization = l_ContextServices_0.Localization.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "CompositorDebugger"
    });
    v24.analytics = l_ContextServices_0.Analytics.new(v18);
end;
v23.renderButtons = function(v29, v30)
    return {
        Toggle = v3.createElement(l_PluginButton_0, {
            Toolbar = v30,
            Active = v29.state.enabled,
            Id = not v11 and "template_button" or "CompositorDebuggerButton",
            Title = v29.localization:getText("Plugin", "Button"),
            Tooltip = v29.localization:getText("Plugin", "Description"),
            Icon = not v11 and "rbxasset://textures/GameSettings/ToolbarIcon.png" or nil,
            OnClick = v29.toggleEnabled,
            ClickableWhenViewportHidden = true
        })
    };
end;
v23.render = function(v31)
    local l_props_0 = v31.props;
    local l_state_0 = v31.state;
    local l_Plugin_1 = l_props_0.Plugin;
    local l_enabled_0 = l_state_0.enabled;
    return l_ContextServices_0.provide({
        l_Plugin_0.new(l_Plugin_1),
        l_Store_0.new(v31.store),
        l_Mouse_0.new(l_Plugin_1:getMouse()),
        v19(),
        v31.localization,
        v31.analytics
    }, {
        Toolbar = v3.createElement(l_PluginToolbar_0, {
            Title = if not v11 then v31.localization:getText("Plugin", "Toolbar") else "CompositorToolbar",
            RenderButtons = function(v36)
                return v31:renderButtons(v36);
            end
        }),
        MainWidget = v3.createElement(l_DockWidget_0, {
            Id = if not l_StudioFixPluginWidgetLocalizedIds_0 then nil else "CompositorDebugger",
            Enabled = l_enabled_0,
            Title = v31.localization:getText("Plugin", "Name"),
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            InitialDockState = Enum.InitialDockState.Left,
            Size = Vector2.new(640, 480),
            MinSize = Vector2.new(350, 200),
            OnClose = v31.onClose,
            ShouldRestore = true,
            OnWidgetRestored = v31.onRestore,
            [v4.Change.Enabled] = v31.onWidgetEnabledChanged
        }, {
            MainComponent = l_enabled_0 and v3.createElement(v22)
        })
    });
end;
return v23;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.Rodux);
local l_Dash_0 = require(l_script_FirstAncestor_0.Packages.Framework).Dash;
local l_join_0 = l_Dash_0.join;
local _ = l_Dash_0.None;
local _ = require(l_script_FirstAncestor_0.Src.Types);
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v7 = require(l_Actions_0.SetFrameBuffer);
local v8 = require(l_Actions_0.SetOverrides);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local _ = require(l_Util_0.CircularBuffer);
local _ = require(l_Util_0.debugFlags);
return (v1.createReducer({
    FrameBuffer = nil,
    Overrides = {}
}, {
    [v7.name] = function(v12, v13)
        return l_join_0(v12, {
            FrameBuffer = v13.frameBuffer
        });
    end,
    [v8.name] = function(v14, v15)
        return l_join_0(v14, {
            Overrides = v15.overrides
        });
    end
}));


return require(script:FindFirstAncestor("CompositorDebugger").Packages.Rodux).combineReducers({
    DebugData = require(script.Parent.DebugData),
    Status = require(script.Parent.Status)
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.Rodux);
local l_Dash_0 = require(l_script_FirstAncestor_0.Packages.Framework).Dash;
local l_join_0 = l_Dash_0.join;
local l_None_0 = l_Dash_0.None;
local _ = require(l_script_FirstAncestor_0.Src.Types);
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v7 = require(l_Actions_0.SetActiveLayersFilter);
local v8 = require(l_Actions_0.SetActor);
local v9 = require(l_Actions_0.SetAdornments);
local v10 = require(l_Actions_0.SetDebugDataEvent);
local v11 = require(l_Actions_0.SetDebugPoseEvent);
local v12 = require(l_Actions_0.SetExpandedSections);
local v13 = require(l_Actions_0.SetHistoryField);
local v14 = require(l_Actions_0.SetHistoryOffset);
local v15 = require(l_Actions_0.SetLayerAdornmentEvent);
local v16 = require(l_Actions_0.SetLayerFilter);
local v17 = require(l_Actions_0.SetPropertyOverrideEvent);
local v18 = require(l_Actions_0.SetSelectedLayer);
local v19 = require(l_Actions_0.SetSendPayloadAnalytics);
local _ = require(l_script_FirstAncestor_0.Src.Util.Constants);
return (v1.createReducer({
    ActiveLayersFilter = false,
    Actor = nil,
    Adornments = {},
    DebugDataConnection = nil,
    DebugDataEvent = nil,
    DebugPoseEvent = nil,
    ExpandedSections = {
        layerDetails = true,
        props = true,
        state = true,
        watches = true
    },
    HistoryField = {},
    HistoryOffset = nil,
    LayerAdornmentEvent = nil,
    LayerFilters = {
        CrossFade = true
    },
    PropertyOverrideEvent = nil,
    SelectedLayer = nil,
    SendPayloadAnalytics = false
}, {
    [v7.name] = function(v21, v22)
        return l_join_0(v21, {
            ActiveLayersFilter = v22.activeLayersFilter
        });
    end,
    [v10.name] = function(v23, v24)
        return l_join_0(v23, {
            DebugDataEvent = v24.event,
            DebugDataConnection = v24.connection
        });
    end,
    [v19.name] = function(v25, v26)
        return l_join_0(v25, {
            SendPayloadAnalytics = v26.enable
        });
    end,
    [v13.name] = function(v27, v28)
        return l_join_0(v27, {
            HistoryField = {
                id = v28.id,
                section = v28.section,
                field = v28.field
            }
        });
    end,
    [v14.name] = function(v29, v30)
        return l_join_0(v29, {
            HistoryOffset = v30.historyOffset
        });
    end,
    [v15.name] = function(v31, v32)
        return l_join_0(v31, {
            LayerAdornmentEvent = v32.event
        });
    end,
    [v17.name] = function(v33, v34)
        return l_join_0(v33, {
            PropertyOverrideEvent = v34.event
        });
    end,
    [v8.name] = function(v35, v36)
        return l_join_0(v35, {
            Actor = v36.actor or l_None_0
        });
    end,
    [v11.name] = function(v37, v38)
        return l_join_0(v37, {
            DebugPoseEvent = v38.event
        });
    end,
    [v18.name] = function(v39, v40)
        return l_join_0(v39, {
            SelectedLayer = v40.selectedLayer or l_None_0
        });
    end,
    [v12.name] = function(v41, v42)
        return l_join_0(v41, {
            ExpandedSections = v42.expandedSections
        });
    end,
    [v9.name] = function(v43, v44)
        return l_join_0(v43, {
            Adornments = v44.adornments
        });
    end,
    [v16.name] = function(v45, v46)
        return l_join_0(v45, {
            LayerFilters = l_join_0(v45.LayerFilters, v46.layerFilters)
        });
    end
}));


local l_StudioService_0 = game:GetService("StudioService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local l_join_0 = require(l_script_FirstAncestor_0.Packages.Framework).Dash.join;
local _ = require(l_script_FirstAncestor_0.Src.Types);
return function(v4)
    local function v7(v5, v6)
        v4:SendEventDeferred("studio", "compositorDebugger", v5, (l_join_0(v6 or {}, {
            studioSid = v4:GetSessionId(),
            clientId = v4:GetClientId(),
            placeId = game.PlaceId,
            userId = l_StudioService_0:GetUserId()
        })));
    end;
    return {
        onChangeSetting = function(v8, v9, v10)
            v7(v8, {
                [v9] = v10
            });
        end,
        onCompositorConnected = function(v11, v12, v13)
            v7(v11, {
                depth = v12,
                layers = v13
            });
        end,
        onLayerTabChanged = function(v14, v15, v16, v17, v18)
            v7(v14, {
                oldTab = v15,
                newTab = v16,
                reason = v17,
                duration = math.floor(v18 * 1000)
            });
        end,
        onPluginClosed = function(v19, v20)
            v7(v19, {
                timeSinceOpened = math.floor(v20 * 1000)
            });
        end,
        onScrubbing = v7
    };
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
return require(l_script_FirstAncestor_0.Packages.Framework).Style.makeTheme(l_script_FirstAncestor_0.Src.Components, {
    Dark = {
        Foo = "FOO"
    },
    Light = {
        Foo = "BAR"
    }
});


local l_RunService_0 = game:GetService("RunService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v3 = require(l_Actions_0.SetDebugDataEvent);
local v4 = require(l_Actions_0.SetActor);
local v5 = require(l_Actions_0.SetDebugPoseEvent);
local v6 = require(l_Actions_0.SetLayerAdornmentEvent);
local v7 = require(l_Actions_0.SetPropertyOverrideEvent);
local v8 = require(l_Actions_0.SetSendPayloadAnalytics);
local l_Thunks_0 = l_script_FirstAncestor_0.Src.Thunks;
local v10 = require(l_Thunks_0.DetachCompositor);
local v11 = require(l_Thunks_0.ParseDebugData);
local v12 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local function _(v14, v15)
    local l_v14_FirstChild_0 = v14:FindFirstChild(v15);
    if not l_v14_FirstChild_0 or not l_v14_FirstChild_0:IsA("Folder") then
        local l_Folder_0 = Instance.new("Folder");
        l_Folder_0.Archivable = false;
        l_Folder_0.Name = v15;
        return l_Folder_0;
    else
        return l_v14_FirstChild_0;
    end;
end;
local function v23(v19, v20)
    local l_v19_FirstChild_0 = v19:FindFirstChild(v20);
    if not l_v19_FirstChild_0 or l_v19_FirstChild_0:IsA("BindableEvent") then
        if not l_v19_FirstChild_0 then
            local l_BindableEvent_0 = Instance.new("BindableEvent");
            l_BindableEvent_0.Archivable = false;
            l_BindableEvent_0.Name = v20;
            l_BindableEvent_0.Parent = v19;
            l_v19_FirstChild_0 = l_BindableEvent_0;
        end;
        assert(l_v19_FirstChild_0 and l_v19_FirstChild_0:IsA("BindableEvent"));
        return l_v19_FirstChild_0;
    else
        return nil;
    end;
end;
return function(v24, v25)
    return function(v26)
        if v26:getState().Status.Actor == v24 then
            return ;
        else
            v26:dispatch(v10());
            local l_v24_0 = v24;
            local l_CompositorDebugger_0 = v12.FOLDERS.CompositorDebugger;
            local l_l_v24_0_FirstChild_0 = l_v24_0:FindFirstChild(l_CompositorDebugger_0);
            local v30;
            if not l_l_v24_0_FirstChild_0 or not l_l_v24_0_FirstChild_0:IsA("Folder") then
                local l_Folder_1 = Instance.new("Folder");
                l_Folder_1.Archivable = false;
                l_Folder_1.Name = l_CompositorDebugger_0;
                v30 = l_Folder_1;
            else
                v30 = l_l_v24_0_FirstChild_0;
            end;
            l_CompositorDebugger_0 = v12.FOLDERS.AdornmentHandles;
            l_l_v24_0_FirstChild_0 = v30:FindFirstChild(l_CompositorDebugger_0);
            if not l_l_v24_0_FirstChild_0 or not l_l_v24_0_FirstChild_0:IsA("Folder") then
                local l_Folder_2 = Instance.new("Folder");
                l_Folder_2.Archivable = false;
                l_Folder_2.Name = l_CompositorDebugger_0;
                l_v24_0 = l_Folder_2;
            else
                l_v24_0 = l_l_v24_0_FirstChild_0;
            end;
            l_l_v24_0_FirstChild_0 = if not l_RunService_0:IsServer() then v12.FOLDERS.Client else v12.FOLDERS.Server;
            local l_v30_FirstChild_0 = v30:FindFirstChild(l_l_v24_0_FirstChild_0);
            if not l_v30_FirstChild_0 or not l_v30_FirstChild_0:IsA("Folder") then
                local l_Folder_3 = Instance.new("Folder");
                l_Folder_3.Archivable = false;
                l_Folder_3.Name = l_l_v24_0_FirstChild_0;
                l_CompositorDebugger_0 = l_Folder_3;
            else
                l_CompositorDebugger_0 = l_v30_FirstChild_0;
            end;
            l_l_v24_0_FirstChild_0 = v23(l_CompositorDebugger_0, v12.EVENTS.DebugData);
            l_v30_FirstChild_0 = v23(l_CompositorDebugger_0, v12.EVENTS.PropertyOverrides);
            local v35 = v23(l_CompositorDebugger_0, v12.EVENTS.LayerAdornments);
            local v36 = v23(l_CompositorDebugger_0, v12.EVENTS.DebugPose);
            if not ((not l_l_v24_0_FirstChild_0 or not l_v30_FirstChild_0) or not v35) and v36 then
                assert(((l_l_v24_0_FirstChild_0 and l_v30_FirstChild_0) and v35) and v36);
                v26:dispatch(v8(true));
                v26:dispatch(v3(l_l_v24_0_FirstChild_0, (l_l_v24_0_FirstChild_0.Event:Connect(function(v37)
                    v26:dispatch(v11(v37, v25));
                end))));
                v26:dispatch(v7(l_v30_FirstChild_0));
                v26:dispatch(v6(v35));
                v26:dispatch(v5(v36));
                v26:dispatch(v4(v24));
                l_CompositorDebugger_0.Parent = v30;
                v30.Parent = v24;
                l_v24_0.Parent = v30;
                return ;
            else
                return ;
            end;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v2 = require(l_Actions_0.SetDebugDataEvent);
local v3 = require(l_Actions_0.SetPropertyOverrideEvent);
local v4 = require(l_Actions_0.SetLayerAdornmentEvent);
local v5 = require(l_Actions_0.SetDebugPoseEvent);
local v6 = require(l_Actions_0.SetActor);
local v7 = require(l_Actions_0.SetFrameBuffer);
local v8 = require(l_script_FirstAncestor_0.Src.Util.Constants);
return function()
    return function(v9)
        local l_Actor_0 = v9:getState().Status.Actor;
        if l_Actor_0 then
            local l_DebugDataConnection_0 = v9:getState().Status.DebugDataConnection;
            if l_DebugDataConnection_0 then
                l_DebugDataConnection_0:Disconnect();
            end;
            local l_l_Actor_0_FirstChild_0 = l_Actor_0:FindFirstChild(v8.FOLDERS.CompositorDebugger);
            if l_l_Actor_0_FirstChild_0 then
                l_l_Actor_0_FirstChild_0:Destroy();
            end;
            v9:dispatch(v2(nil, nil));
            v9:dispatch(v3(nil));
            v9:dispatch(v4(nil));
            v9:dispatch(v5(nil));
            v9:dispatch(v6(nil));
            v9:dispatch(v7(nil));
            return ;
        else
            return ;
        end;
    end;
end;