local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.LuauPolyfill);
local v2 = {};
local _ = require(l_Parent_0.Shared);
local _ = require(l_Parent_0.ReactReconciler);
local _ = require(script.Parent.Parent.types);
local _ = require(script.Parent.Parent.devtools.views.Profiler.types);
v2.InspectElementFullDataType = "full-data";
v2.InspectElementNoChangeType = "no-change";
v2.InspectElementNotFoundType = "not-found";
v2.InspectElementHydratedPathType = "hydrated-path";
return v2;


local v0 = require(script.Parent.Parent.Parent.LuauPolyfill);
local l_Set_0 = v0.Set;
local l_Array_0 = v0.Array;
local l_dehydrate_0 = require(script.Parent.Parent.hydration).dehydrate;
local _ = require(script.Parent.Parent.devtools.views.Components.types);
local l_HttpService_0 = game:GetService("HttpService");
local v12 = {
    cleanForBridge = function(v6, v7, v8)
        v8 = v8 or {};
        if v6 ~= nil then
            local v9 = {};
            local v10 = {};
            return {
                data = l_dehydrate_0(v6, v9, v10, v8, v7),
                cleaned = v9,
                unserializable = v10
            };
        else
            return nil;
        end;
    end,
    copyToClipboard = function(_)
    end
};
v12.copyWithDelete = function(v13, v14, v15)
    v15 = v15 or 1;
    local v16 = v14[v15];
    local v17 = table.clone(v13);
    if v15 == #v14 then
        if not l_Array_0.isArray(v17) then
            v17[v16] = nil;
            return v17;
        else
            l_Array_0.splice(v17, v16, 1);
            return v17;
        end;
    else
        v17[v16] = v12.copyWithDelete(v13[v16], v14, v15 + 1);
        return v17;
    end;
end;
v12.copyWithRename = function(v18, v19, v20, v21)
    v21 = v21 or 1;
    local v22 = v19[v21];
    local v23 = table.clone(v18);
    if v21 == #v19 then
        v23[v20[v21]] = v23[v22];
        if not l_Array_0.isArray(v23) then
            v23[v22] = nil;
            return v23;
        else
            l_Array_0.splice(v23, v22, 1);
            return v23;
        end;
    else
        v23[v22] = v12.copyWithRename(v18[v22], v19, v20, v21 + 1);
        return v23;
    end;
end;
v12.copyWithSet = function(v24, v25, v26, v27)
    v27 = v27 or 1;
    if #v25 < v27 then
        return v26;
    else
        local v28 = v25[v27];
        local v29 = table.clone(v24);
        v29[v28] = v12.copyWithSet(v24[v28], v25, v26, v27 + 1);
        return v29;
    end;
end;
v12.serializeToString = function(v30)
    local v31 = l_Set_0.new();
    return l_HttpService_0.JSONEncode(v30, function(_, v33)
        if typeof(v33) == "table" and v33 ~= nil then
            if not v31:has(v33) then
                v31:add(v33);
            else
                return ;
            end;
        end;
        return v33;
    end);
end;
return v12;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.LuauPolyfill);
local l_console_0 = require(l_Parent_0.Shared).console;
local v3 = require(script.Parent.events);
local _ = require(script.Parent.types);
local _ = require(script.Parent.backend.types);
local v6 = setmetatable({}, {
    __index = v3
});
local v7 = {
    __index = v6
};
v6.new = function(v8)
    local v9 = setmetatable(v3.new(), v7);
    v9._isShutdown = false;
    v9._messageQueue = {};
    v9._timeoutID = nil;
    v9._wallUnlisten = nil;
    v9._wall = v8;
    v9._wallUnlisten = v8.listen(function(v10)
        v9:emit(v10.event, v10.payload);
    end) or nil;
    v9:addListener("overrideValueAtPath", v9.overrideValueAtPath);
    v9.wall = v8;
    return v9;
end;
v6.send = function(v11, v12, ...)
    local v13 = {
        ...
    };
    if not v11._isShutdown then
        table.insert(v11._messageQueue, v12);
        table.insert(v11._messageQueue, v13);
        if not v11._timeoutID then
            v11._timeoutID = v1.setTimeout(function()
                v11:_flush();
            end, 0);
        end;
        return ;
    else
        l_console_0.warn(string.format("Cannot send message \"%s\" through a Bridge that has been shutdown.", v12));
        return ;
    end;
end;
v6.shutdown = function(v14)
    if not v14._isShutdown then
        v14:send("shutdown");
        v14._isShutdown = true;
        v14.addListener = function()
        end;
        v14.emit = function()
        end;
        v14:removeAllListeners();
        local l__wallUnlisten_0 = v14._wallUnlisten;
        if l__wallUnlisten_0 then
            l__wallUnlisten_0();
        end;
        while true do
            v14:_flush();
            if not (#v14._messageQueue ~= 0) then
                break;
            end;
        end;
        if v14._timeoutID ~= nil then
            v1.clearTimeout(v14._timeoutID);
            v14._timeoutID = nil;
        end;
        return ;
    else
        l_console_0.warn("Bridge was already shutdown.");
        return ;
    end;
end;
v6._flush = function(v16)
    if v16._timeoutID ~= nil then
        v1.clearTimeout(v16._timeoutID);
        v16._timeoutID = nil;
    end;
    if #v16._messageQueue > 0 then
        local v17 = 1;
        while v17 < #v16._messageQueue do
            v16._wall.send(v16._messageQueue[v17], table.unpack(v16._messageQueue[v17 + 1]));
            v17 = v17 + 2;
        end;
        table.clear(v16._messageQueue);
        v16._timeoutID = v1.setTimeout(function()
            v16:_flush();
        end, 100);
    end;
end;
v6.overrideValueAtPath = function(v18, v19)
    local l_id_0 = v19.id;
    local l_path_0 = v19.path;
    local l_rendererID_0 = v19.rendererID;
    local l_type_0 = v19.type;
    local l_value_0 = v19.value;
    if l_type_0 == "context" then
        v18:send("overrideContext", {
            id = l_id_0,
            path = l_path_0,
            rendererID = l_rendererID_0,
            wasForwarded = true,
            value = l_value_0
        });
        return ;
    elseif l_type_0 == "hooks" then
        v18:send("overrideHookState", {
            id = l_id_0,
            path = l_path_0,
            rendererID = l_rendererID_0,
            wasForwarded = true,
            value = l_value_0
        });
        return ;
    elseif l_type_0 == "props" then
        v18:send("overrideProps", {
            id = l_id_0,
            path = l_path_0,
            rendererID = l_rendererID_0,
            wasForwarded = true,
            value = l_value_0
        });
        return ;
    else
        if l_type_0 == "state" then
            v18:send("overrideState", {
                id = l_id_0,
                path = l_path_0,
                rendererID = l_rendererID_0,
                wasForwarded = true,
                value = l_value_0
            });
        end;
        return ;
    end;
end;
return v6;


local v0 = require(script.Parent.Parent.Parent.LuauPolyfill);
local l_Array_0 = v0.Array;
local l_Map_0 = v0.Map;
local l_Set_0 = v0.Set;
local l_console_0 = v0.console;
local v5 = require(script.Parent.Parent.events);
local l_prepareProfilingDataFrontendFromBackendAndStore_0 = require(script.Parent.views.Profiler.utils).prepareProfilingDataFrontendFromBackendAndStore;
local _ = require(script.Parent.types);
local _ = require(script.Parent.Parent.bridge);
local _ = require(script.Parent.Parent.backend.types);
local _ = require(script.Parent.views.Profiler.types);
local v11 = require(script.Parent.ProfilingCache);
local v12 = setmetatable({}, {
    __index = v5
});
v12.__index = v12;
v12.new = function(v13, v14, v15)
    local v16 = setmetatable(v5.new(), v12);
    v16._dataBackends = {};
    v16._dataFrontend = nil;
    v16._initialRendererIDs = l_Set_0.new();
    v16._initialSnapshotsByRootID = l_Map_0.new();
    v16._inProgressOperationsByRootID = l_Map_0.new();
    v16._isProfiling = v15;
    v16._rendererIDsThatReportedProfilingData = l_Set_0.new();
    v16._rendererQueue = l_Set_0.new();
    v16._bridge = v13;
    v16._store = v14;
    v16._takeProfilingSnapshotRecursive = function(v17, v18, v19)
        local v20 = v17._store:getElementByID(v18);
        if v20 ~= nil then
            v19:set(v18, {
                id = v18,
                children = l_Array_0.slice(v20.children, 0),
                displayName = v20.displayName,
                hocDisplayNames = v20.hocDisplayNames,
                key = v20.key,
                type = v20.type
            });
            l_Array_0.forEach(v20.children, function(v21)
                return v17:_takeProfilingSnapshotRecursive(v21, v19);
            end);
        end;
    end;
    v16.onBridgeOperations = function(v22, v23)
        local v24 = v23[1];
        local v25 = v23[2];
        if v22._isProfiling then
            local v26 = v22._inProgressOperationsByRootID:get(v25);
            if v26 == nil then
                v22._inProgressOperationsByRootID:set(v25, {
                    v23
                });
            else
                table.insert(v26, v23);
            end;
            if not v22._initialRendererIDs:has(v24) then
                v22._initialRendererIDs:add(v24);
            end;
            if not v22._initialSnapshotsByRootID:has(v25) then
                v22._initialSnapshotsByRootID:set(v25, l_Map_0.new());
            end;
            v22._rendererIDsThatReportedProfilingData:add(v24);
        end;
    end;
    v16.onBridgeProfilingData = function(v27, v28)
        if not v27._isProfiling then
            local l_rendererID_0 = v28.rendererID;
            if not v27._rendererQueue:has(l_rendererID_0) then
                error(string.format("Unexpected profiling data update from renderer \"%s\"", (tostring(l_rendererID_0))));
            end;
            table.insert(v27._dataBackends, v28);
            v27._rendererQueue:delete(l_rendererID_0);
            if v27._rendererQueue.size == 0 then
                v27._dataFrontend = l_prepareProfilingDataFrontendFromBackendAndStore_0(v27._dataBackends, v27._inProgressOperationsByRootID, v27._initialSnapshotsByRootID);
                l_Array_0.splice(v27._dataBackends, 0);
                v27:emit("isProcessingData");
            end;
            return ;
        else
            return ;
        end;
    end;
    v16.onBridgeShutdown = function(v30)
        v30._bridge:removeListener("operations", v30.onBridgeOperations);
        v30._bridge:removeListener("profilingData", v30.onBridgeProfilingData);
        v30._bridge:removeListener("profilingStatus", v30.onProfilingStatus);
        v30._bridge:removeListener("shutdown", v30.onBridgeShutdown);
    end;
    v16.onProfilingStatus = function(v31, v32)
        if v32 then
            l_Array_0.splice(v31._dataBackends, 0);
            v31._dataFrontend = nil;
            v31._initialRendererIDs:clear();
            v31._initialSnapshotsByRootID:clear();
            v31._inProgressOperationsByRootID:clear();
            v31._rendererIDsThatReportedProfilingData:clear();
            v31._rendererQueue:clear();
            for _, v34 in v31._store:getRootIDToRendererID() do
                if not v31._initialRendererIDs:has(v34) then
                    v31._initialRendererIDs:add(v34);
                end;
            end;
            for _, v36 in v31._store:getRoots() do
                local v37 = l_Map_0.new();
                v31._initialSnapshotsByRootID:set(v36, v37);
                v31:_takeProfilingSnapshotRecursive(v36, v37);
            end;
        end;
        if v31._isProfiling ~= v32 then
            v31._isProfiling = v32;
            v31._cache:invalidate();
            v31:emit("isProfiling");
            if not v32 then
                l_Array_0.splice(v31._dataBackends, 0);
                v31._rendererQueue:clear();
                for _, v39 in v31._rendererIDsThatReportedProfilingData, nil, nil do
                    if not v31._rendererQueue:has(v39) then
                        v31._rendererQueue:add(v39);
                        v31._bridge:send("getProfilingData", {
                            rendererID = v39
                        });
                    end;
                end;
                v31:emit("isProcessingData");
            end;
        end;
    end;
    v13:addListener("operations", function(...)
        return v16:onBridgeOperations(...);
    end);
    v13:addListener("profilingData", function(...)
        return v16:onBridgeProfilingData(...);
    end);
    v13:addListener("profilingStatus", function(...)
        return v16:onProfilingStatus(...);
    end);
    v13:addListener("shutdown", function(...)
        return v16:onBridgeShutdown(...);
    end);
    v13:send("getProfilingStatus");
    v16._cache = v11.new(v16);
    return v16;
end;
v12.getCommitData = function(v40, v41, v42)
    if v40._dataFrontend ~= nil then
        local v43 = v40._dataFrontend.dataForRoots:get(v41);
        if v43 ~= nil then
            local v44 = v43.commitData[v42];
            if v44 ~= nil then
                return v44;
            end;
        end;
    end;
    error(string.format("Could not find commit data for root \"%s\" and commit %s", tostring(v41), (tostring(v42))));
end;
v12.getDataForRoot = function(v45, v46)
    if v45._dataFrontend ~= nil then
        local v47 = v45._dataFrontend.dataForRoots:get(v46);
        if v47 ~= nil then
            return v47;
        end;
    end;
    error(string.format("Could not find commit data for root \"%s\"", (tostring(v46))));
end;
v12.didRecordCommits = function(v48)
    local v49 = false;
    if v48._dataFrontend ~= nil then
        v49 = v48._dataFrontend.dataForRoots.size > 0;
    end;
    return v49;
end;
v12.isProcessingData = function(v50)
    local v51 = true;
    if v50._rendererQueue.size <= 0 then
        v51 = #v50._dataBackends > 0;
    end;
    return v51;
end;
v12.isProfiling = function(v52)
    return v52._isProfiling;
end;
v12.profilingCache = function(v53)
    return v53._cache;
end;
v12.profilingData = function(v54, v55)
    if v55 == nil then
        return v54._dataFrontend;
    elseif not v54._isProfiling then
        l_Array_0.splice(v54._dataBackends, 0);
        v54._dataFrontend = v55;
        v54._initialRendererIDs:clear();
        v54._initialSnapshotsByRootID:clear();
        v54._inProgressOperationsByRootID:clear();
        v54._cache:invalidate();
        v54:emit("profilingData");
        return ;
    else
        l_console_0.warn("Profiling data cannot be updated while profiling is in progress.");
        return ;
    end;
end;
v12.clear = function(v56)
    l_Array_0.splice(v56._dataBackends, 0);
    v56._dataFrontend = nil;
    v56._initialRendererIDs:clear();
    v56._initialSnapshotsByRootID:clear();
    v56._inProgressOperationsByRootID:clear();
    v56._rendererQueue:clear();
    v56._cache:invalidate();
    v56:emit("profilingData");
end;
v12.startProfiling = function(v57)
    v57._bridge:send("startProfiling", v57._store:getRecordChangeDescriptions());
end;
v12.stopProfiling = function(v58)
    v58._bridge:send("stopProfiling");
end;
return v12;


local v0 = require(script.Parent.Parent.Parent.LuauPolyfill);
local l_Array_0 = v0.Array;
local l_Map_0 = v0.Map;
local l_Profiler_0 = script.Parent.views.Profiler;
local v4 = require(l_Profiler_0.CommitTreeBuilder);
local l_getCommitTree_0 = v4.getCommitTree;
local l_invalidateCommitTrees_0 = v4.invalidateCommitTrees;
local v7 = require(l_Profiler_0.FlamegraphChartBuilder);
local l_getChartData_0 = v7.getChartData;
local l_invalidateChartData_0 = v7.invalidateChartData;
local v10 = require(l_Profiler_0.InteractionsChartBuilder);
local l_getChartData_1 = v10.getChartData;
local l_invalidateChartData_1 = v10.invalidateChartData;
local v13 = require(l_Profiler_0.RankedChartBuilder);
local l_getChartData_2 = v13.getChartData;
local l_invalidateChartData_2 = v13.invalidateChartData;
local _ = require(l_Profiler_0.types);
local _ = require(script.Parent.types);
local v18 = {};
v18.__index = v18;
v18.new = function(v19)
    local v20 = setmetatable({}, v18);
    v20._fiberCommits = l_Map_0.new();
    v20._profilerStore = v19;
    v20.getCommitTree = function(v21, v22)
        return l_getCommitTree_0({
            commitIndex = v22.commitIndex,
            profilerStore = v21._profilerStore,
            rootID = v22.rootID
        });
    end;
    v20.getFiberCommits = function(v23, v24)
        local l_fiberID_0 = v24.fiberID;
        local l_rootID_0 = v24.rootID;
        local v27 = v23._fiberCommits:get(l_fiberID_0);
        if v27 ~= nil then
            return v27;
        else
            local v28 = {};
            l_Array_0.forEach(v23._profilerStore:getDataForRoot(l_rootID_0).commitData, function(v29, v30)
                if v29.fiberActualDurations:has(l_fiberID_0) then
                    table.insert(v28, v30);
                end;
            end);
            v23._fiberCommits:set(l_fiberID_0, v28);
            return v28;
        end;
    end;
    v20.getFlamegraphChartData = function(v31, v32)
        return l_getChartData_0({
            commitIndex = v32.commitIndex,
            commitTree = v32.commitTree,
            profilerStore = v31._profilerStore,
            rootID = v32.rootID
        });
    end;
    v20.getInteractionsChartData = function(v33, v34)
        return l_getChartData_1({
            profilerStore = v33._profilerStore,
            rootID = v34.rootID
        });
    end;
    v20.getRankedChartData = function(v35, v36)
        return l_getChartData_2({
            commitIndex = v36.commitIndex,
            commitTree = v36.commitTree,
            profilerStore = v35._profilerStore,
            rootID = v36.rootID
        });
    end;
    return v20;
end;
v18.invalidate = function(v37)
    v37._fiberCommits:clear();
    l_invalidateCommitTrees_0();
    l_invalidateChartData_0();
    l_invalidateChartData_1();
    l_invalidateChartData_2();
end;
return v18;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.LuauPolyfill);
local l_Error_0 = v1.Error;
local l_Map_0 = v1.Map;
local l_WeakMap_0 = v1.WeakMap;
local _ = require(l_Parent_0.Shared);
local v6 = require(l_Parent_0.React);
local l_createContext_0 = v6.createContext;
local l_ReactCurrentDispatcher_0 = v6.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;
local function _(v9, v10)
    local l_current_0 = l_ReactCurrentDispatcher_0.current;
    if l_current_0 == nil then
        error(l_Error_0.new("react-cache: read and preload may only be called from within a " .. "component's render. They are not supported in event handlers or " .. "lifecycle methods."));
    end;
    assert(l_current_0 ~= nil, "assert needed until Luau understands if nil then error()");
    return l_current_0.readContext(v9, v10);
end;
local v13 = l_createContext_0(nil);
local v14 = l_Map_0.new();
local v15 = l_Map_0.new();
local function _(v16)
    local v17 = v14:get(v16);
    if v17 == nil then
        v17 = l_WeakMap_0.new();
        v14:set(v16, v17);
    end;
    return v17;
end;
local function v31(v19, v20, v21, v22)
    local v23 = v14:get(v19);
    if v23 == nil then
        v23 = l_WeakMap_0.new();
        v14:set(v19, v23);
    end;
    local l_v23_0 = v23;
    v23 = l_v23_0:get(v22);
    if v23 == nil then
        local v25 = v20(v21);
        local v26 = nil;
        v25:andThen(function(v27)
            if v26.status == 0 then
                local l_v26_0 = v26;
                l_v26_0.status = 1;
                l_v26_0.value = v27;
            end;
        end, function(v29)
            if v26.status == 0 then
                local l_v26_1 = v26;
                l_v26_1.status = 2;
                l_v26_1.value = v29;
            end;
        end);
        v26 = {
            status = 0,
            value = v25
        };
        l_v23_0:set(v22, v26);
        return v26;
    else
        return v23;
    end;
end;
return {
    createResource = function(v32, v33, v34)
        local v35 = v34 or {};
        local v36 = nil;
        v36 = {
            clear = function()
                v14[v36] = nil;
            end,
            invalidate = function(v37)
                local l_v36_0 = v36;
                local v39 = v14:get(l_v36_0);
                if v39 == nil then
                    v39 = l_WeakMap_0.new();
                    v14:set(l_v36_0, v39);
                end;
                v39[v37] = nil;
            end,
            read = function(v40)
                local l_v13_0 = v13;
                local l_current_1 = l_ReactCurrentDispatcher_0.current;
                if l_current_1 == nil then
                    error(l_Error_0.new("react-cache: read and preload may only be called from within a " .. "component's render. They are not supported in event handlers or " .. "lifecycle methods."));
                end;
                assert(l_current_1 ~= nil, "assert needed until Luau understands if nil then error()");
                local _ = l_current_1.readContext(l_v13_0, nil);
                l_current_1 = v31(v36, v32, v40, (v33(v40)));
                if l_current_1.status == 0 then
                    error(l_current_1.value);
                    return ;
                elseif l_current_1.status == 1 then
                    return l_current_1.value;
                elseif l_current_1.status == 2 then
                    error(l_current_1.value);
                    return ;
                else
                    return nil;
                end;
            end,
            preload = function(v44)
                local l_v13_1 = v13;
                local l_current_2 = l_ReactCurrentDispatcher_0.current;
                if l_current_2 == nil then
                    error(l_Error_0.new("react-cache: read and preload may only be called from within a " .. "component's render. They are not supported in event handlers or " .. "lifecycle methods."));
                end;
                assert(l_current_2 ~= nil, "assert needed until Luau understands if nil then error()");
                local _ = l_current_2.readContext(l_v13_1, nil);
                v31(v36, v32, v44, (v33(v44)));
            end,
            write = function(v48, v49)
                local l_v36_1 = v36;
                local v51 = v14:get(l_v36_1);
                if v51 == nil then
                    v51 = l_WeakMap_0.new();
                    v14:set(l_v36_1, v51);
                end;
                v51:set(v48, {
                    status = 1,
                    value = v49
                });
            end
        };
        v15:set(v36, v35);
        return v36;
    end,
    invalidateResources = function()
        v14:clear();
    end
};


return {
    utils = require(script.utils),
    store = require(script.store),
    cache = require(script.cache),
    devtools = {
        Components = {
            views = {
                types = require(script.views.Components.types)
            }
        }
    }
};


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.LuauPolyfill);
local l_inspect_0 = v1.util.inspect;
local l_Array_0 = v1.Array;
local l_Error_0 = v1.Error;
local l_Map_0 = v1.Map;
local l_Object_0 = v1.Object;
local l_Set_0 = v1.Set;
local l_console_0 = require(l_Parent_0.Shared).console;
local v9 = require(script.Parent.Parent.events);
local v10 = require(script.Parent.Parent.constants);
local l_TREE_OPERATION_ADD_0 = v10.TREE_OPERATION_ADD;
local l_TREE_OPERATION_REMOVE_0 = v10.TREE_OPERATION_REMOVE;
local l_TREE_OPERATION_REORDER_CHILDREN_0 = v10.TREE_OPERATION_REORDER_CHILDREN;
local l_TREE_OPERATION_UPDATE_TREE_BASE_DURATION_0 = v10.TREE_OPERATION_UPDATE_TREE_BASE_DURATION;
local l_ElementTypeRoot_0 = require(script.Parent.Parent.types).ElementTypeRoot;
local v16 = require(script.Parent.Parent.utils);
local l_getSavedComponentFilters_0 = v16.getSavedComponentFilters;
local l_saveComponentFilters_0 = v16.saveComponentFilters;
local l_separateDisplayNameAndHOCs_0 = v16.separateDisplayNameAndHOCs;
local l_shallowDiffers_0 = v16.shallowDiffers;
local v21 = require(script.Parent.Parent.storage);
local l_localStorageGetItem_0 = v21.localStorageGetItem;
local l_localStorageSetItem_0 = v21.localStorageSetItem;
local l___DEBUG___0 = v10.__DEBUG__;
local v25 = require(script.Parent.ProfilerStore);
local _ = require(script.Parent.Parent.devtools.views.Components.types);
local _ = require(script.Parent.Parent.types);
local _ = require(script.Parent.Parent.bridge);
local _ = require(script.Parent.types);
local function v31(v30, ...)
    if l___DEBUG___0 then
        print("Store", v30, ...);
    end;
end;
local v32 = setmetatable({}, {
    __index = v9
});
local v33 = {
    __index = v32
};
v32.new = function(v34, v35)
    local v36 = setmetatable(v9.new(), v33);
    v35 = v35 or {};
    v36._bridge = v34;
    v36._collapseNodesByDefault = true;
    v36._componentFilters = {};
    v36._hasOwnerMetadata = false;
    v36._idToElement = l_Map_0.new();
    v36._isNativeStyleEditorSupported = false;
    v36._isBackendStorageAPISupported = false;
    v36._nativeStyleEditorValidAttributes = nil;
    v36._ownersMap = l_Map_0.new();
    v36._recordChangeDescriptions = false;
    v36._revision = 0;
    v36._roots = {};
    v36._rootIDToCapabilities = l_Map_0.new();
    v36._rootIDToRendererID = l_Map_0.new();
    v36._supportsNativeInspection = true;
    v36._supportsProfiling = false;
    v36._supportsReloadAndProfile = false;
    v36._supportsTraceUpdates = false;
    v36._unsupportedRendererVersionDetected = false;
    v36._weightAcrossRoots = 0;
    if l___DEBUG___0 then
        v31("constructor", "subscribing to Bridge");
    end;
    v36._collapseNodesByDefault = l_localStorageGetItem_0("React::DevTools::collapseNodesByDefault") == "true";
    v36._recordChangeDescriptions = l_localStorageGetItem_0("React::DevTools::recordChangeDescriptions") == "true";
    v36._componentFilters = l_getSavedComponentFilters_0();
    local v37 = false;
    if v35 ~= nil then
        v37 = v35.isProfiling == true;
        local l_supportsNativeInspection_0 = v35.supportsNativeInspection;
        local l_supportsProfiling_0 = v35.supportsProfiling;
        local l_supportsReloadAndProfile_0 = v35.supportsReloadAndProfile;
        local l_supportsTraceUpdates_0 = v35.supportsTraceUpdates;
        v36._supportsNativeInspection = l_supportsNativeInspection_0 ~= false;
        if l_supportsProfiling_0 then
            v36._supportsProfiling = true;
        end;
        if l_supportsReloadAndProfile_0 then
            v36._supportsReloadAndProfile = true;
        end;
        if l_supportsTraceUpdates_0 then
            v36._supportsTraceUpdates = true;
        end;
    end;
    v36._profilerStore = v25.new(v34, v36, v37);
    v36._onBridgeOperations = v36.onBridgeOperations;
    v36.onBridgeOperations = function(...)
        v36:_onBridgeOperations(...);
    end;
    v36._onBridgeOverrideComponentFilters = v36.onBridgeOverrideComponentFilters;
    v36.onBridgeOverrideComponentFilters = function(...)
        v36:_onBridgeOverrideComponentFilters(...);
    end;
    v36._onBridgeShutdown = v36.onBridgeShutdown;
    v36.onBridgeShutdown = function(...)
        v36:_onBridgeShutdown(...);
    end;
    v36._onBridgeStorageSupported = v36.onBridgeStorageSupported;
    v36.onBridgeStorageSupported = function(...)
        v36:_onBridgeStorageSupported(...);
    end;
    v36._onBridgeNativeStyleEditorSupported = v36.onBridgeNativeStyleEditorSupported;
    v36.onBridgeNativeStyleEditorSupported = function(...)
        v36:_onBridgeNativeStyleEditorSupported(...);
    end;
    v36._onBridgeUnsupportedRendererVersion = v36.onBridgeUnsupportedRendererVersion;
    v36.onBridgeUnsupportedRendererVersion = function(...)
        v36:_onBridgeUnsupportedRendererVersion(...);
    end;
    v34:addListener("operations", v36.onBridgeOperations);
    v34:addListener("overrideComponentFilters", v36.onBridgeOverrideComponentFilters);
    v34:addListener("shutdown", v36.onBridgeShutdown);
    v34:addListener("isBackendStorageAPISupported", v36.onBridgeStorageSupported);
    v34:addListener("isNativeStyleEditorSupported", v36.onBridgeNativeStyleEditorSupported);
    v34:addListener("unsupportedRendererVersion", v36.onBridgeUnsupportedRendererVersion);
    return v36;
end;
v32.assertExpectedRootMapSizes = function(v42)
    if #v42._roots == 0 then
        v42:assertMapSizeMatchesRootCount(v42._idToElement, "_idToElement");
        v42:assertMapSizeMatchesRootCount(v42._ownersMap, "_ownersMap");
    end;
    v42:assertMapSizeMatchesRootCount(v42._rootIDToCapabilities, "_rootIDToCapabilities");
    v42:assertMapSizeMatchesRootCount(v42._rootIDToRendererID, "_rootIDToRendererID");
end;
v32.assertMapSizeMatchesRootCount = function(v43, v44, v45)
    local v46 = #v43._roots;
    if v44.size ~= v46 then
        error(l_Error_0.new(string.format("Expected %s to contain %s items, but it contains %s items\n\n%s", v45, tostring(v46), tostring(v44.size), l_inspect_0(v44, {
            depth = 20
        }))));
    end;
end;
v32.getCollapseNodesByDefault = function(v47)
    return v47._collapseNodesByDefault;
end;
v32.setCollapseNodesByDefault = function(v48, v49)
    v48._collapseNodesByDefault = v49;
    l_localStorageSetItem_0("React::DevTools::collapseNodesByDefault", not v49 and "false" or "true");
    v48:emit("collapseNodesByDefault");
end;
v32.getComponentFilters = function(v50)
    return v50._componentFilters;
end;
v32.setComponentFilters = function(v51, v52)
    if v51._profilerStore:isProfiling() then
        error("Cannot modify filter preferences while profiling");
    end;
    local v54 = l_Array_0.filter(v51._componentFilters, function(v53)
        return v53.isEnabled;
    end);
    local v56 = l_Array_0.filter(v52, function(v55)
        return v55.isEnabled;
    end);
    local v57 = #v54 ~= #v56;
    if not v57 then
        for v58 = 1, #v56 do
            if l_shallowDiffers_0(v54[v58], v56[v58]) then
                v57 = true;
                break;
            end;
        end;
    end;
    v51._componentFilters = v52;
    l_saveComponentFilters_0(v52);
    if v57 then
        v51._bridge:send("updateComponentFilters", v52);
    end;
    v51:emit("componentFilters");
end;
v32.getHasOwnerMetadata = function(v59)
    return v59._hasOwnerMetadata;
end;
v32.getNativeStyleEditorValidAttributes = function(v60)
    return v60._nativeStyleEditorValidAttributes;
end;
v32.getNumElements = function(v61)
    return v61._weightAcrossRoots;
end;
v32.getProfilerStore = function(v62)
    return v62._profilerStore;
end;
v32.getRecordChangeDescriptions = function(v63)
    return v63._recordChangeDescriptions;
end;
v32.setRecordChangeDescriptions = function(v64, v65)
    v64._recordChangeDescriptions = v65;
    l_localStorageSetItem_0("React::DevTools::recordChangeDescriptions", not v65 and "false" or "true");
    v64:emit("recordChangeDescriptions");
end;
v32.getRevision = function(v66)
    return v66._revision;
end;
v32.getRootIDToRendererID = function(v67)
    return v67._rootIDToRendererID;
end;
v32.getRoots = function(v68)
    return v68._roots;
end;
v32.getSupportsNativeInspection = function(v69)
    return v69._supportsNativeInspection;
end;
v32.getSupportsNativeStyleEditor = function(v70)
    return v70._isNativeStyleEditorSupported;
end;
v32.getSupportsProfiling = function(v71)
    return v71._supportsProfiling;
end;
v32.getSupportsReloadAndProfile = function(v72)
    return v72._supportsReloadAndProfile and v72._isBackendStorageAPISupported;
end;
v32.getSupportsTraceUpdates = function(v73)
    return v73._supportsTraceUpdates;
end;
v32.getUnsupportedRendererVersionDetected = function(v74)
    return v74._unsupportedRendererVersionDetected;
end;
v32.containsElement = function(v75, v76)
    return v75._idToElement:get(v76) ~= nil;
end;
v32.getElementAtIndex = function(v77, v78)
    if not (v78 >= 0) or v77:getNumElements() <= v78 then
        l_console_0.warn(string.format("Invalid index %d specified; store contains %d items.", v78, v77:getNumElements()));
        return nil;
    else
        local _ = nil;
        local v80 = nil;
        local v81 = 0;
        for v82 = 1, #v77._roots do
            v80 = v77._idToElement:get(v77._roots[v82]);
            if not (#v80.children == 0) then
                if not (v78 < v81 + v80.weight) then
                    v81 = v81 + v80.weight;
                else
                    break;
                end;
            end;
        end;
        local l_v80_0 = v80;
        local v84 = v81 - 1;
        while v78 ~= v84 do
            for v85 = 1, #l_v80_0.children do
                local v86 = v77._idToElement:get(l_v80_0.children[v85]);
                local v87 = if not v86.isCollapsed then v86.weight else 1;
                if v78 <= v84 + v87 then
                    v84 = v84 + 1;
                    l_v80_0 = v86;
                    break;
                else
                    v84 = v84 + v87;
                end;
            end;
        end;
        return l_v80_0 or nil;
    end;
end;
v32.getElementIDAtIndex = function(v88, v89)
    local v90 = v88:getElementAtIndex(v89);
    if v90 == nil then
        return nil;
    else
        return v90.id;
    end;
end;
v32.getElementByID = function(v91, v92)
    local v93 = v91._idToElement:get(v92);
    if v93 == nil then
        l_console_0.warn(string.format("No element found with id \"%s\"", (tostring(v92))));
        return nil;
    else
        return v93;
    end;
end;
v32.getIndexOfElementID = function(v94, v95)
    local v96 = v94:getElementByID(v95);
    if not (v96 ~= nil) or v96.parentID == 0 then
        return nil;
    else
        local l_v95_0 = v95;
        local l_parentID_0 = v96.parentID;
        local v99 = 0;
        while true do
            local v100 = v94._idToElement:get(l_parentID_0);
            local l_children_0 = v100.children;
            for v102 = 1, #l_children_0 do
                local v103 = l_children_0[v102];
                if v103 ~= l_v95_0 then
                    local v104 = v94._idToElement:get(v103);
                    v99 = v99 + if not v104.isCollapsed then v104.weight else 1;
                else
                    break;
                end;
            end;
            if v100.parentID ~= 0 then
                v99 = v99 + 1;
                l_v95_0 = v100.id;
                l_parentID_0 = v100.parentID;
            else
                break;
            end;
        end;
        for v105 = 1, #v94._roots do
            local v106 = v94._roots[v105];
            if v106 ~= l_parentID_0 then
                v99 = v99 + v94._idToElement:get(v106).weight;
            else
                break;
            end;
        end;
        return v99;
    end;
end;
v32.getOwnersListForElement = function(v107, v108)
    local v109 = {};
    local v110 = v107._idToElement:get(v108);
    if v110 ~= nil then
        table.insert(v109, l_Object_0.assign({}, v110, {
            depth = 0
        }));
        local v111 = v107._ownersMap:get(v108);
        if v111 ~= nil then
            local v112 = l_Map_0.new({
                {
                    v108,
                    0
                }
            });
            for _, v116 in (l_Array_0.sort(l_Array_0.from(v111), function(v113, v114)
                return (v107:getIndexOfElementID(v113) or 0) - (v107:getIndexOfElementID(v114) or 0);
            end)), nil, nil do
                local v117 = v107._idToElement:get(v116);
                if v117 ~= nil then
                    local l_parentID_1 = v117.parentID;
                    local v119 = 0;
                    while l_parentID_1 > 0 do
                        if l_parentID_1 ~= v108 and not v111:has(l_parentID_1) then
                            local v120 = v107._idToElement:get(l_parentID_1);
                            if v120 ~= nil then
                                l_parentID_1 = v120.parentID;
                            else
                                break;
                            end;
                        else
                            v119 = v112:get(l_parentID_1) + 1;
                            v112:set(v116, v119);
                            break;
                        end;
                    end;
                    if v119 == 0 then
                        error("Invalid owners list");
                    end;
                    table.insert(v109, l_Object_0.assign({}, v117, {
                        depth = v119
                    }));
                end;
            end;
        end;
    end;
    return v109;
end;
v32.getRendererIDForElement = function(v121, v122)
    local v123 = v121._idToElement:get(v122);
    while true do
        if v123 ~= nil then
            if v123.parentID == 0 then
                local v124 = v121._rootIDToRendererID:get(v123.id);
                if v124 == nil then
                    return nil;
                else
                    return v124;
                end;
            else
                v123 = v121._idToElement:get(v123.parentID);
            end;
        else
            return nil;
        end;
    end;
end;
v32.getRootIDForElement = function(v125, v126)
    local v127 = v125._idToElement:get(v126);
    while true do
        if v127 ~= nil then
            if v127.parentID == 0 then
                return v127.id;
            else
                v127 = v125._idToElement:get(v127.parentID);
            end;
        else
            return nil;
        end;
    end;
end;
v32.isInsideCollapsedSubTree = function(v128, v129)
    local v130 = v128._idToElement:get(v129);
    while true do
        if v130 ~= nil then
            if v130.parentID == 0 then
                return false;
            else
                v130 = v128._idToElement:get(v130.parentID);
                if not (not (v130 ~= nil) or not v130.isCollapsed) then
                    return true;
                end;
            end;
        else
            return false;
        end;
    end;
end;
v32.toggleIsCollapsed = function(v131, v132, v133)
    local v134 = false;
    local v135 = v131:getElementByID(v132);
    if v135 ~= nil then
        if not v133 then
            local l_v135_0 = v135;
            while l_v135_0 ~= nil do
                local v137 = if not l_v135_0.isCollapsed then l_v135_0.weight else 1;
                if l_v135_0.isCollapsed then
                    v134 = true;
                    l_v135_0.isCollapsed = false;
                    local v138 = if not l_v135_0.isCollapsed then l_v135_0.weight else 1 - v137;
                    local v139 = v131._idToElement:get(l_v135_0.parentID);
                    while v139 ~= nil do
                        v139.weight = v139.weight + v138;
                        if not v139.isCollapsed then
                            v139 = v131._idToElement:get(v139.parentID);
                        else
                            break;
                        end;
                    end;
                end;
                if l_v135_0.parentID ~= 0 then
                    l_v135_0 = v131:getElementByID(l_v135_0.parentID);
                else
                    l_v135_0 = nil;
                end;
            end;
        else
            if v135.type == l_ElementTypeRoot_0 then
                error("Root nodes cannot be collapsed");
            end;
            if not v135.isCollapsed then
                v134 = true;
                v135.isCollapsed = true;
                local v140 = 1 - v135.weight;
                local v141 = v131._idToElement:get(v135.parentID);
                while v141 ~= nil do
                    v141.weight = v141.weight + v140;
                    v141 = v131._idToElement:get(v141.parentID);
                end;
            end;
        end;
        if v134 then
            local v142 = 0;
            for _, v144 in v131._roots, nil, nil do
                v142 = v142 + v131:getElementByID(v144).weight;
            end;
            v131._weightAcrossRoots = v142;
            v131:emit("mutated", {
                {},
                {}
            });
        end;
    end;
end;
v32._adjustParentTreeWeight = function(v145, v146, v147)
    local v148 = false;
    while v146 ~= nil do
        v146.weight = v146.weight + v147;
        if not v146.isCollapsed then
            v146 = v145._idToElement:get(v146.parentID);
        else
            v148 = true;
            break;
        end;
    end;
    if not v148 then
        v145._weightAcrossRoots = v145._weightAcrossRoots + v147;
    end;
end;
v32.onBridgeNativeStyleEditorSupported = function(v149, v150)
    local l_isSupported_0 = v150.isSupported;
    local l_validAttributes_0 = v150.validAttributes;
    v149._isNativeStyleEditorSupported = l_isSupported_0;
    v149._nativeStyleEditorValidAttributes = l_validAttributes_0 or nil;
    v149:emit("supportsNativeStyleEditor");
end;
v32.onBridgeOperations = function(v153, v154)
    if l___DEBUG___0 then
        l_console_0.groupCollapsed("onBridgeOperations");
        v31("onBridgeOperations", table.concat(v154, ","));
    end;
    local v155 = false;
    local v156 = v154[1];
    local v157 = {};
    local v158 = {};
    local v159 = 3;
    local v160 = {
        ""
    };
    local function _()
        local l_v159_0 = v159;
        v159 = v159 + 1;
        return l_v159_0;
    end;
    local l_v159_1 = v159;
    v159 = v159 + 1;
    local v164 = v159 + v154[l_v159_1];
    while v159 < v164 do
        local l_v159_2 = v159;
        v159 = v159 + 1;
        table.insert(v160, v154[l_v159_2]);
    end;
    while v159 <= #v154 do
        l_v159_1 = v154[v159];
        if l_v159_1 == l_TREE_OPERATION_ADD_0 then
            local v166 = v154[v159 + 1];
            local v167 = v154[v159 + 2];
            v159 = v159 + 3;
            if v153._idToElement:has(v166) then
                error(l_Error_0.new(("Cannot add node %s because a node with that id is already in the Store."):format((tostring(v166)))));
            end;
            local v168 = 0;
            local v169 = nil;
            if v167 == l_ElementTypeRoot_0 then
                if l___DEBUG___0 then
                    v31("Add", string.format("new root node %s", (tostring(v166))));
                end;
                local v170 = v154[v159] > 0;
                v159 = v159 + 1;
                local v171 = v154[v159] > 0;
                v159 = v159 + 1;
                v153._roots = l_Array_0.concat(v153._roots, v166);
                v153._rootIDToRendererID:set(v166, v156);
                v153._rootIDToCapabilities:set(v166, {
                    hasOwnerMetadata = v171,
                    supportsProfiling = v170
                });
                v153._idToElement:set(v166, {
                    children = {},
                    depth = -1,
                    displayName = nil,
                    hocDisplayNames = nil,
                    id = v166,
                    isCollapsed = false,
                    key = nil,
                    ownerID = 0,
                    parentID = 0,
                    type = v167,
                    weight = 0
                });
                v155 = true;
            else
                v169 = v154[v159];
                v159 = v159 + 1;
                v168 = v154[v159];
                v159 = v159 + 1;
                local v172 = v160[v154[v159] + 1];
                v159 = v159 + 1;
                local v173 = v160[v154[v159] + 1];
                v159 = v159 + 1;
                if l___DEBUG___0 then
                    v31("Add", string.format("node %s (%s) as child of %s", tostring(v166), v172 or "null", (tostring(v169))));
                end;
                if not v153._idToElement:has(v169) then
                    error(l_Error_0.new(("Cannot add child %s to parent %s because parent node was not found in the Store."):format(tostring(v166), (tostring(v169)))));
                end;
                local v174 = v153._idToElement:get(v169);
                table.insert(v174.children, v166);
                local v175, v176 = l_separateDisplayNameAndHOCs_0(v172, v167);
                v153._idToElement:set(v166, {
                    children = {},
                    depth = v174.depth + 1,
                    displayName = v175,
                    hocDisplayNames = v176,
                    id = v166,
                    isCollapsed = v153._collapseNodesByDefault,
                    key = v173,
                    ownerID = v168,
                    parentID = v174.id,
                    type = v167,
                    weight = 1
                });
                table.insert(v157, v166);
                v153:_adjustParentTreeWeight(v174, 1);
                if v168 > 0 then
                    local v177 = v153._ownersMap:get(v168);
                    if v177 == nil then
                        v177 = l_Set_0.new();
                        v153._ownersMap:set(v168, v177);
                    end;
                    v177:add(v166);
                end;
            end;
        elseif l_v159_1 == l_TREE_OPERATION_REMOVE_0 then
            local v178 = v154[v159 + 1];
            v159 = v159 + 2;
            for _ = 1, v178 do
                local v180 = v154[v159];
                if not v153._idToElement:has(v180) then
                    error(l_Error_0.new(("Cannot remove node %s because no matching node was found in the Store."):format((tostring(v180)))));
                end;
                v159 = v159 + 1;
                local v181 = v153._idToElement:get(v180);
                local l_children_1 = v181.children;
                local l_ownerID_0 = v181.ownerID;
                local l_parentID_2 = v181.parentID;
                local l_weight_0 = v181.weight;
                if #l_children_1 > 0 then
                    error(l_Error_0.new(string.format("Node %s was removed before its children.", (tostring(v180)))));
                end;
                v153._idToElement:delete(v180);
                local v186 = nil;
                if l_parentID_2 == 0 then
                    if l___DEBUG___0 then
                        v31("Remove", string.format("node %s root", (tostring(v180))));
                    end;
                    v153._roots = l_Array_0.filter(v153._roots, function(v187)
                        return v187 ~= v180;
                    end);
                    v153._rootIDToRendererID:delete(v180);
                    v153._rootIDToCapabilities:delete(v180);
                    v155 = true;
                else
                    if l___DEBUG___0 then
                        v31("Remove", string.format("node %s from parent %s", tostring(v180), (tostring(l_parentID_2))));
                    end;
                    v186 = v153._idToElement:get(l_parentID_2);
                    if v186 == nil then
                        error(("Cannot remove node %s from parent %s because no matching node was found in the Store."):format(tostring(v180), (tostring(l_parentID_2))));
                    end;
                    l_Array_0.splice(v186.children, l_Array_0.indexOf(v186.children, v180), 1);
                end;
                v153:_adjustParentTreeWeight(v186, -l_weight_0);
                v158[v180] = l_parentID_2;
                v153._ownersMap:delete(v180);
                if l_ownerID_0 > 0 then
                    local v188 = v153._ownersMap:get(l_ownerID_0);
                    if v188 ~= nil then
                        v188:delete(v180);
                    end;
                end;
            end;
        elseif l_v159_1 == l_TREE_OPERATION_REORDER_CHILDREN_0 then
            local v189 = v154[v159 + 1];
            local v190 = v154[v159 + 2];
            v159 = v159 + 3;
            if not v153._idToElement:has(v189) then
                error(l_Error_0.new(("Cannot reorder children for node %s because no matching node was found in the Store."):format((tostring(v189)))));
            end;
            local l_children_2 = v153._idToElement:get(v189).children;
            if #l_children_2 ~= v190 then
                error("Children cannot be added or removed during a reorder operation.");
            end;
            for v192 = 1, v190 do
                local v193 = v154[(v159 + v192) - 1];
                l_children_2[v192] = v193;
                if _G.__DEV__ then
                    local v194 = v153._idToElement:get(v193);
                    if not (v194 ~= nil) or v194.parentID ~= v189 then
                        l_console_0.error("Children cannot be added or removed during a reorder operation.");
                    end;
                end;
            end;
            v159 = v159 + v190;
            if _G.__DEBUG__ then
                v31("Re-order", string.format("Node %s children %s", tostring(v189), l_Array_0.join(l_children_2, ",")));
            end;
        elseif l_v159_1 == l_TREE_OPERATION_UPDATE_TREE_BASE_DURATION_0 then
            v159 = v159 + 3;
        else
            error("Unsupported Bridge operation " .. tostring(l_v159_1));
        end;
    end;
    v153._revision = v153._revision + 1;
    if v155 then
        l_v159_1 = v153._supportsProfiling;
        v153._hasOwnerMetadata = false;
        v153._supportsProfiling = false;
        for _, v196 in v153._rootIDToCapabilities, nil, nil do
            local l_hasOwnerMetadata_0 = v196.hasOwnerMetadata;
            local l_supportsProfiling_1 = v196.supportsProfiling;
            if l_hasOwnerMetadata_0 then
                v153._hasOwnerMetadata = true;
            end;
            if l_supportsProfiling_1 then
                v153._supportsProfiling = true;
            end;
        end;
        v153:emit("roots");
        if v153._supportsProfiling ~= l_v159_1 then
            v153:emit("supportsProfiling");
        end;
    end;
    if l___DEBUG___0 then
        l_console_0.log(require(script.Parent.utils).printStore(v153, true));
        l_console_0.groupEnd();
    end;
    v153:emit("mutated", {
        v157,
        v158
    });
end;
v32.onBridgeOverrideComponentFilters = function(v199, v200)
    v199._componentFilters = v200;
    l_saveComponentFilters_0(v200);
end;
v32.onBridgeShutdown = function(v201)
    if l___DEBUG___0 then
        v31("onBridgeShutdown", "unsubscribing from Bridge");
    end;
    v201._bridge:removeListener("operations", v201.onBridgeOperations);
    v201._bridge:removeListener("shutdown", v201.onBridgeShutdown);
    v201._bridge:removeListener("isBackendStorageAPISupported", v201.onBridgeStorageSupported);
end;
v32.onBridgeStorageSupported = function(v202, v203)
    v202._isBackendStorageAPISupported = v203;
    v202:emit("supportsReloadAndProfile");
end;
v32.onBridgeUnsupportedRendererVersion = function(v204)
    v204._unsupportedRendererVersionDetected = true;
    v204:emit("unsupportedRendererVersionDetected");
end;
return v32;


local _ = require(script.Parent.Parent.Parent.LuauPolyfill);
local _ = require(script.Parent.Parent.devtools.views.Components.types);
local _ = require(script.Parent.Parent.types);
local _ = require(script.Parent.Parent.events);
local _ = require(script.Parent.Parent.bridge);
local _ = require(script.Parent.Parent.backend.types);
local _ = require(script.Parent.views.Profiler.types);
return true;


local l_Array_0 = require(script.Parent.Parent.Parent.LuauPolyfill).Array;
local l_HttpService_0 = game:GetService("HttpService");
local v2 = {};
local _ = require(script.Parent.views.Components.types);
local _ = require(script.Parent.types);
v2.printElement = function(v5, v6)
    v6 = v6 or false;
    local v7 = " ";
    if #v5.children > 0 then
        v7 = not v5.isCollapsed and "\226\150\190" or "\226\150\184";
    end;
    local v8 = "";
    if v5.key ~= nil and v5.key ~= "" then
        v8 = string.format(" key=\"%s\"", (tostring(v5.key)));
    end;
    local v9 = nil;
    if v5.hocDisplayNames ~= nil then
        v9 = table.clone(v5.hocDisplayNames);
    end;
    local v10 = v9 == nil and "" or string.format(" [%s]", table.concat(v9, "]["));
    local v11 = "";
    if v6 then
        v11 = string.format(" (%s)", if not v5.isCollapsed then tostring(v5.weight) else "1");
    end;
    return string.format("%s%s <%s%s>%s%s", ("  "):rep(v5.depth + 1), v7, v5.displayName or "null", v8, v10, v11);
end;
v2.printOwnersList = function(v12, v13)
    v13 = v13 or false;
    return table.concat(l_Array_0.map(v12, function(v14)
        return v2.printElement(v14, v13);
    end), "\n");
end;
v2.printStore = function(v15, v16)
    v16 = v16 or false;
    local v17 = {};
    local v18 = 0;
    l_Array_0.forEach(v15:getRoots(), function(v19)
        local l_weight_0 = v15:getElementByID(v19).weight;
        table.insert(v17, "[root]" .. (not v16 and "" or string.format(" (%d)", l_weight_0)));
        for v21 = v18, (v18 + l_weight_0) - 1 do
            local v22 = v15:getElementAtIndex(v21);
            if v22 == nil then
                error(string.format("Could not find element at index %d", v21));
            end;
            table.insert(v17, v2.printElement(v22, v16));
        end;
        v18 = v18 + l_weight_0;
    end);
    if v18 ~= v15:getNumElements() then
        error(("Inconsistent Store state. Individual root weights (%s) do not match total weight (%s)"):format(tostring(v18), (tostring(v15:getNumElements()))));
    end;
    v15:assertExpectedRootMapSizes();
    return table.concat(v17, "\n");
end;
v2.sanitizeForParse = function(v23)
    if ((typeof(v23) == "string" and #v23 >= 2) and string.sub(v23, 1, 1) == "'") and string.sub(v23, #v23) == "'" then
        return "\"" .. string.sub(v23, 1, #v23 - 2) .. "\"";
    else
        return v23;
    end;
end;
v2.smartParse = function(v24)
    if v24 == "Infinity" then
        return math.huge;
    elseif v24 == "NaN" then
        return 0;
    elseif v24 == "undefined" then
        return nil;
    else
        return l_HttpService_0:JSONDecode(v2.sanitizeForParse(v24));
    end;
end;
v2.smartStringify = function(v25)
    if not (typeof(v25) == "number") and v25 == nil then
        return "undefined";
    else
        return l_HttpService_0:JSONEncode(v25);
    end;
end;
return v2;


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.LuauPolyfill);
local _ = require(l_Parent_0.Shared);
local _ = require(script.Parent.Parent.Parent.Parent.hydration);
local _ = require(script.Parent.Parent.Parent.Parent.types);
return {};


local v0 = require(script.Parent.Parent.Parent.Parent.Parent.LuauPolyfill);
local l_Array_0 = v0.Array;
local l_Map_0 = v0.Map;
local l_console_0 = v0.console;
local v4 = {};
local v5 = require(script.Parent.Parent.Parent.Parent.constants);
local l___DEBUG___0 = v5.__DEBUG__;
local l_TREE_OPERATION_ADD_0 = v5.TREE_OPERATION_ADD;
local l_TREE_OPERATION_REMOVE_0 = v5.TREE_OPERATION_REMOVE;
local l_TREE_OPERATION_REORDER_CHILDREN_0 = v5.TREE_OPERATION_REORDER_CHILDREN;
local l_TREE_OPERATION_UPDATE_TREE_BASE_DURATION_0 = v5.TREE_OPERATION_UPDATE_TREE_BASE_DURATION;
local _ = require(script.Parent.Parent.Parent.types);
local l_ElementTypeRoot_0 = require(script.Parent.Parent.Parent.Parent.types).ElementTypeRoot;
local _ = require(script.Parent.Parent.Parent.Parent.types);
local _ = require(script.Parent.types);
local function v16(v15, ...)
    if l___DEBUG___0 then
        print("[CommitTreeBuilder]", v15, ...);
    end;
end;
local function v25(v17)
    if l___DEBUG___0 then
        local l_nodes_0 = v17.nodes;
        local l_rootID_0 = v17.rootID;
        l_console_0.group("__printTree()");
        local v20 = {
            l_rootID_0,
            0
        };
        while #v20 > 0 do
            local v21 = table.remove(v20, 1);
            local v22 = table.remove(v20, 1);
            local v23 = l_nodes_0:get(v21);
            if v23 == nil then
                error(string.format("Could not find node with id \"%s\" in commit tree", (tostring(v21))));
            end;
            l_console_0.log(string.format("%s%s:%s %s (%s)", string.rep("\226\128\162", v22), tostring(v23.id), tostring(v23.displayName or ""), not v23.key and "" or string.format("key:\"%s\"", (tostring(v23.key))), (tostring(v23.treeBaseDuration))));
            l_Array_0.forEach(v23.children, function(v24)
                l_Array_0.concat(v20, {
                    v24,
                    v22 + 1
                });
            end);
        end;
        l_console_0.groupEnd();
    end;
end;
local function v61(v26, v27)
    local v28 = l_Map_0.new(v26.nodes);
    local function _(v29)
        local v30 = table.clone((v28:get(v29)));
        v28:set(v29, v30);
        return v30;
    end;
    local v32 = 3;
    local function _()
        local l_v32_0 = v32;
        v32 = v32 + 1;
        return l_v32_0;
    end;
    local v35 = nil;
    local v36 = {
        ""
    };
    local l_v32_1 = v32;
    v32 = v32 + 1;
    local v38 = v32 + v27[l_v32_1];
    while v32 < v38 do
        local l_v32_2 = v32;
        v32 = v32 + 1;
        table.insert(v36, v27[l_v32_2]);
    end;
    while v32 <= #v27 do
        local l_v32_3 = v32;
        v32 = v32 + 1;
        l_v32_1 = v27[l_v32_3];
        if l_v32_1 == l_TREE_OPERATION_ADD_0 then
            l_v32_3 = v32;
            v32 = v32 + 1;
            v35 = v27[l_v32_3];
            local l_v32_4 = v32;
            v32 = v32 + 1;
            local v42 = v27[l_v32_4];
            if v28:has(v35) then
                error("Commit tree already contains fiber " .. tostring(v35) .. ". This is a bug in React DevTools.");
            end;
            if v42 == l_ElementTypeRoot_0 then
                v32 = v32 + 2;
                if l___DEBUG___0 then
                    v16("Add", ("new root fiber %s"):format((tostring(v35))));
                end;
                v28:set(v35, {
                    children = {},
                    displayName = nil,
                    hocDisplayNames = nil,
                    id = v35,
                    key = nil,
                    parentID = 0,
                    treeBaseDuration = 0,
                    type = v42
                });
            else
                local l_v32_5 = v32;
                v32 = v32 + 1;
                l_v32_3 = v27[l_v32_5];
                v32 = v32 + 1;
                local l_v32_6 = v32;
                v32 = v32 + 1;
                l_v32_5 = v36[v27[l_v32_6] + 1];
                local l_v32_7 = v32;
                v32 = v32 + 1;
                local v46 = v36[v27[l_v32_7] + 1];
                if l___DEBUG___0 then
                    v16("Add", ("fiber %s (%s) as child of %s"):format(tostring(v35), tostring(l_v32_5 or "null"), (tostring(l_v32_3))));
                end;
                local v47 = table.clone((v28:get(l_v32_3)));
                v28:set(l_v32_3, v47);
                l_v32_7 = v47;
                l_v32_7.children = l_Array_0.concat(l_v32_7.children, v35);
                v28:set(v35, {
                    children = {},
                    displayName = l_v32_5,
                    hocDisplayNames = nil,
                    id = v35,
                    key = v46,
                    parentID = l_v32_3,
                    treeBaseDuration = 0,
                    type = v42
                });
            end;
        elseif l_v32_1 == l_TREE_OPERATION_REMOVE_0 then
            local l_v32_8 = v32;
            v32 = v32 + 1;
            for _ = 1, v27[l_v32_8] do
                local l_v32_9 = v32;
                v32 = v32 + 1;
                v35 = v27[l_v32_9];
                if not v28:has(v35) then
                    error("Commit tree does not contain fiber " .. tostring(v35) .. ". This is a bug in React DevTools.");
                end;
                l_v32_9 = v35;
                local v51 = table.clone((v28:get(l_v32_9)));
                v28:set(l_v32_9, v51);
                l_v32_9 = v51.parentID;
                v28:delete(v35);
                if v28:has(l_v32_9) then
                    local v52 = table.clone((v28:get(l_v32_9)));
                    v28:set(l_v32_9, v52);
                    v51 = v52;
                    if l___DEBUG___0 then
                        v16("Remove", ("fiber %s from parent %s"):format(tostring(v35), (tostring(l_v32_9))));
                    end;
                    v51.children = l_Array_0.filter(v51.children, function(v53)
                        return v53 ~= v35;
                    end);
                end;
            end;
        elseif l_v32_1 == l_TREE_OPERATION_REORDER_CHILDREN_0 then
            l_v32_3 = v32;
            v32 = v32 + 1;
            v35 = v27[l_v32_3];
            local l_v32_10 = v32;
            v32 = v32 + 1;
            local v55 = v27[l_v32_10];
            l_v32_3 = l_Array_0.slice(v27, v32, v32 + v55);
            v32 = v32 + v55;
            if l___DEBUG___0 then
                v16("Re-order", ("fiber %s children %s"):format(tostring(v35), (tostring(l_Array_0.join(l_v32_3, ",")))));
            end;
            local l_v35_0 = v35;
            local v57 = table.clone((v28:get(l_v35_0)));
            v28:set(l_v35_0, v57);
            v57.children = l_Array_0.from(l_v32_3);
        elseif l_v32_1 == l_TREE_OPERATION_UPDATE_TREE_BASE_DURATION_0 then
            l_v32_3 = v32;
            v32 = v32 + 1;
            v35 = v27[l_v32_3];
            l_v32_3 = v35;
            local v58 = table.clone((v28:get(l_v32_3)));
            v28:set(l_v32_3, v58);
            local l_v58_0 = v58;
            local l_v32_11 = v32;
            v32 = v32 + 1;
            l_v58_0.treeBaseDuration = v27[l_v32_11] / 1000;
            if l___DEBUG___0 then
                v16("Update", ("fiber %s treeBaseDuration to %s"):format(tostring(v35), (tostring(l_v58_0.treeBaseDuration))));
            end;
        else
            error(string.format("Unsupported Bridge operation %s at operation index %d", tostring(l_v32_1), v32));
        end;
    end;
    return {
        nodes = v28,
        rootID = v26.rootID
    };
end;
local function v62(v63, v64, v65, v66)
    local v67 = v66.snapshots:get(v63);
    if v67 ~= nil then
        v65:set(v63, {
            id = v63,
            children = v67.children,
            displayName = v67.displayName,
            hocDisplayNames = v67.hocDisplayNames,
            key = v67.key,
            parentID = v64,
            treeBaseDuration = v66.initialTreeBaseDurations:get(v63),
            type = v67.type
        });
        for _, v69 in v67.children, nil, nil do
            v62(v69, v63, v65, v66);
        end;
    end;
end;
local v70 = l_Map_0.new();
local function v71(v72)
    local l_commitIndex_0 = v72.commitIndex;
    local l_profilerStore_0 = v72.profilerStore;
    local l_rootID_1 = v72.rootID;
    if not v70:has(l_rootID_1) then
        v70:set(l_rootID_1, {});
    end;
    local v76 = v70:get(l_rootID_1);
    if l_commitIndex_0 <= #v76 then
        return v76[l_commitIndex_0];
    else
        local v77 = l_profilerStore_0:profilingData();
        if v77 == nil then
            error("No profiling data available");
        end;
        local v78 = v77.dataForRoots:get(l_rootID_1);
        if v78 == nil then
            error(string.format("Could not find profiling data for root \"%s\"", (tostring(l_rootID_1))));
        end;
        local l_operations_0 = v78.operations;
        if l_commitIndex_0 == 1 then
            local v80 = l_Map_0.new();
            v62(l_rootID_1, 0, v80, v78);
            if l_operations_0 ~= nil and l_commitIndex_0 <= #l_operations_0 then
                local v81 = v61({
                    nodes = v80,
                    rootID = l_rootID_1
                }, l_operations_0[l_commitIndex_0]);
                if l___DEBUG___0 then
                    v25(v81);
                end;
                table.insert(v76, v81);
                return v81;
            end;
        else
            local v82 = v71({
                commitIndex = l_commitIndex_0 - 1,
                profilerStore = l_profilerStore_0,
                rootID = l_rootID_1
            });
            if l_operations_0 ~= nil and l_commitIndex_0 <= #l_operations_0 then
                local v83 = v61(v82, l_operations_0[l_commitIndex_0]);
                if l___DEBUG___0 then
                    v25(v83);
                end;
                table.insert(v76, v83);
                return v83;
            end;
        end;
        error(string.format("getCommitTree(): Unable to reconstruct tree for root \"%s\" and commit %s", tostring(l_rootID_1), (tostring(l_commitIndex_0))));
        return ;
    end;
end;
v4.getCommitTree = v71;
v4.invalidateCommitTrees = function()
    return v70:clear();
end;
return v4;


local v0 = require(script.Parent.Parent.Parent.Parent.Parent.LuauPolyfill);
local l_Boolean_0 = v0.Boolean;
local l_Map_0 = v0.Map;
local l_Set_0 = v0.Set;
local v4 = {};
local _ = require(script.Parent.Parent.Parent.types);
local l_formatDuration_0 = require(script.Parent.utils).formatDuration;
local _ = require(script.Parent.types);
local v8 = l_Map_0.new();
v4.getChartData = function(v9)
    local l_commitIndex_0 = v9.commitIndex;
    local l_commitTree_0 = v9.commitTree;
    local l_profilerStore_0 = v9.profilerStore;
    local l_rootID_0 = v9.rootID;
    local v14 = l_profilerStore_0:getCommitData(l_rootID_0, l_commitIndex_0);
    local l_fiberActualDurations_0 = v14.fiberActualDurations;
    local l_fiberSelfDurations_0 = v14.fiberSelfDurations;
    local l_nodes_0 = l_commitTree_0.nodes;
    local v18 = ("%s-%s"):format(tostring(l_rootID_0), (tostring(l_commitIndex_0)));
    if not v8:has(v18) then
        local v19 = l_Map_0.new();
        local v20 = l_Set_0.new();
        local v21 = {};
        local v22 = 0;
        local v23 = 0;
        local function v24(v25, v26, v27)
            v19:set(v25, v27);
            local v28 = l_nodes_0:get(v25);
            if v28 == nil then
                error(string.format("Could not find node with id \"%s\" in commit tree", (tostring(v25))));
            end;
            local l_children_0 = v28.children;
            local l_displayName_0 = v28.displayName;
            local l_hocDisplayNames_0 = v28.hocDisplayNames;
            local l_key_0 = v28.key;
            local l_treeBaseDuration_0 = v28.treeBaseDuration;
            local v34 = l_fiberActualDurations_0:get(v25) or 0;
            local v35 = l_fiberSelfDurations_0:get(v25) or 0;
            local v36 = l_fiberActualDurations_0:has(v25);
            local v37 = l_displayName_0 or "Anonymous";
            local v38 = not l_Boolean_0.toJSBoolean(l_key_0) and "" or (" key=\"%s\""):format((tostring(l_key_0)));
            local v39 = "";
            if l_hocDisplayNames_0 ~= nil and #l_hocDisplayNames_0 > 0 then
                v39 = string.format(" (%s)", (tostring(l_hocDisplayNames_0[1])));
            end;
            local v40 = string.format("%s%s%s%s", tostring(v37), tostring(v39), tostring(v38), not v36 and "" or string.format(" (%sms of %sms)", tostring(l_formatDuration_0(v35)), (tostring(l_formatDuration_0(v34)))));
            v22 = math.max(v22, v27);
            v23 = math.max(v23, v35);
            local v41 = {
                actualDuration = v34,
                didRender = v36,
                id = v25,
                label = v40,
                name = v37,
                offset = v26 - l_treeBaseDuration_0,
                selfDuration = v35,
                treeBaseDuration = l_treeBaseDuration_0
            };
            if #v21 < v27 then
                table.insert(v21, {
                    v41
                });
            else
                table.insert(v21[v27 - 1], v41);
            end;
            local v42 = #l_children_0;
            while v42 >= 1 do
                v26 = v26 - v24(l_children_0[v42], v26, v27).treeBaseDuration;
                v42 = v42 - 1;
            end;
            return v41;
        end;
        local v43 = 0;
        if l_nodes_0.size > 0 then
            local v44 = l_nodes_0:get(l_rootID_0);
            if v44 == nil then
                error(string.format("Could not find root node with id \"%s\" in commit tree", (tostring(l_rootID_0))));
            end;
            local v45 = #v44.children;
            while v45 >= 1 do
                local v46 = v44.children[v45];
                local v47 = l_nodes_0:get(v46);
                if v47 == nil then
                    error(string.format("Could not find node with id \"%s\" in commit tree", (tostring(v46))));
                end;
                v43 = v43 + v47.treeBaseDuration;
                v24(v46, v43, 2);
                v45 = v45 - 1;
            end;
            for v48, _ in l_fiberActualDurations_0, nil, nil do
                local v50 = l_nodes_0:get(v48);
                if v50 ~= nil then
                    local l_parentID_0 = v50.parentID;
                    while l_parentID_0 ~= 0 and not v20:has(l_parentID_0) do
                        v20:add(l_parentID_0);
                        v50 = l_nodes_0:get(l_parentID_0);
                        if v50 ~= nil then
                            l_parentID_0 = v50.parentID;
                        else
                            l_parentID_0 = 0;
                        end;
                    end;
                end;
            end;
        end;
        local v52 = {
            baseDuration = v43,
            depth = v22,
            idToDepthMap = v19,
            maxSelfDuration = v23,
            renderPathNodes = v20,
            rows = v21
        };
        v8:set(v18, v52);
        return v52;
    else
        return (v8:get(v18));
    end;
end;
v4.invalidateChartData = function()
    return v8:clear();
end;
return v4;


local v0 = require(script.Parent.Parent.Parent.Parent.Parent.LuauPolyfill);
local l_Array_0 = v0.Array;
local l_Map_0 = v0.Map;
local v3 = {};
local _ = require(script.Parent.Parent.Parent.types);
local _ = require(script.Parent.types);
local v6 = l_Map_0.new();
v3.getChartData = function(v7)
    local l_profilerStore_0 = v7.profilerStore;
    local l_rootID_0 = v7.rootID;
    if not v6:has(l_rootID_0) then
        local v10 = l_profilerStore_0:getDataForRoot(l_rootID_0);
        if v10 == nil then
            error(string.format("Could not find profiling data for root \"%s\"", (tostring(l_rootID_0))));
        end;
        local l_commitData_0 = v10.commitData;
        local l_interactions_0 = v10.interactions;
        local v13 = if #l_commitData_0 > 0 then l_commitData_0[#l_commitData_0].timestamp else 0;
        local v14 = 0;
        l_Array_0.forEach(l_commitData_0, function(v15)
            v14 = math.max(v14, v15.duration);
        end);
        local v16 = {
            interactions = l_Array_0.from(l_interactions_0:values()),
            lastInteractionTime = v13,
            maxCommitDuration = v14
        };
        v6:set(l_rootID_0, v16);
        return v16;
    else
        return (v6:get(l_rootID_0));
    end;
end;
v3.invalidateChartData = function()
    return v6:clear();
end;
return v3;


local v0 = require(script.Parent.Parent.Parent.Parent.Parent.LuauPolyfill);
local l_Array_0 = v0.Array;
local l_Boolean_0 = v0.Boolean;
local l_Map_0 = v0.Map;
local v4 = {};
local _ = require(script.Parent.Parent.Parent.types);
local v6 = require(script.Parent.Parent.Parent.Parent.types);
local l_ElementTypeForwardRef_0 = v6.ElementTypeForwardRef;
local l_ElementTypeMemo_0 = v6.ElementTypeMemo;
local l_formatDuration_0 = require(script.Parent.utils).formatDuration;
local _ = require(script.Parent.types);
local v11 = l_Map_0.new();
v4.getChartData = function(v12)
    local l_commitIndex_0 = v12.commitIndex;
    local l_commitTree_0 = v12.commitTree;
    local l_profilerStore_0 = v12.profilerStore;
    local l_rootID_0 = v12.rootID;
    local v17 = l_profilerStore_0:getCommitData(l_rootID_0, l_commitIndex_0);
    local l_fiberActualDurations_0 = v17.fiberActualDurations;
    local l_fiberSelfDurations_0 = v17.fiberSelfDurations;
    local l_nodes_0 = l_commitTree_0.nodes;
    local v21 = ("%s-%s"):format(tostring(l_rootID_0), (tostring(l_commitIndex_0)));
    if not v11:has(v21) then
        local v22 = 0;
        local v23 = {};
        for v24, _ in l_fiberActualDurations_0, nil, nil do
            local v26 = l_nodes_0:get(v24);
            if v26 == nil then
                error(string.format("Could not find node with id \"%s\" in commit tree", (tostring(v24))));
            end;
            local l_displayName_0 = v26.displayName;
            local l_key_0 = v26.key;
            local l_parentID_0 = v26.parentID;
            local l_type_0 = v26.type;
            if l_parentID_0 ~= 0 then
                local v31 = l_fiberSelfDurations_0:get(v24) or 0;
                v22 = math.max(v22, v31);
                local v32 = l_displayName_0 or "Anonymous";
                local v33 = not l_Boolean_0.toJSBoolean(l_key_0) and "" or (" key=\"%s\""):format((tostring(l_key_0)));
                local v34 = "";
                if l_type_0 == l_ElementTypeForwardRef_0 then
                    v34 = " (ForwardRef)";
                elseif l_type_0 == l_ElementTypeMemo_0 then
                    v34 = " (Memo)";
                end;
                table.insert(v23, {
                    id = v24,
                    label = ("%s%s%s (%sms)"):format(tostring(v32), tostring(v34), tostring(v33), (tostring(l_formatDuration_0(v31)))),
                    name = v32,
                    value = v31
                });
            end;
        end;
        local v37 = {
            maxValue = v22,
            nodes = l_Array_0.sort(v23, function(v35, v36)
                return v36.value - v35.value;
            end)
        };
        v11:set(v21, v37);
        return v37;
    else
        return (v11:get(v21));
    end;
end;
v4.invalidateChartData = function()
    return v11:clear();
end;
return v4;


local _ = require(script.Parent.Parent.Parent.Parent.Parent.LuauPolyfill);
local v1 = {};
local _ = require(script.Parent.Parent.Parent.Parent.types);
return v1;


local v0 = require(script.Parent.Parent.Parent.Parent.Parent.LuauPolyfill);
local l_Array_0 = v0.Array;
local l_Boolean_0 = v0.Boolean;
local l_Error_0 = v0.Error;
local l_Map_0 = v0.Map;
local l_Number_0 = v0.Number;
local v6 = {};
local l_PROFILER_EXPORT_VERSION_0 = require(script.Parent.Parent.Parent.Parent.constants).PROFILER_EXPORT_VERSION;
local _ = require(script.Parent.Parent.Parent.Parent.backend.types);
local _ = require(script.Parent.types);
local v10 = {
    "var(--color-commit-gradient-0)",
    "var(--color-commit-gradient-1)",
    "var(--color-commit-gradient-2)",
    "var(--color-commit-gradient-3)",
    "var(--color-commit-gradient-4)",
    "var(--color-commit-gradient-5)",
    "var(--color-commit-gradient-6)",
    "var(--color-commit-gradient-7)",
    "var(--color-commit-gradient-8)",
    "var(--color-commit-gradient-9)"
};
v6.prepareProfilingDataFrontendFromBackendAndStore = function(v11, v12, v13)
    local v14 = l_Map_0.new();
    for _, v16 in v11, nil, nil do
        for _, v18 in v16.dataForRoots, nil, nil do
            local l_commitData_0 = v18.commitData;
            local l_displayName_0 = v18.displayName;
            local l_initialTreeBaseDurations_0 = v18.initialTreeBaseDurations;
            local l_interactionCommits_0 = v18.interactionCommits;
            local l_interactions_0 = v18.interactions;
            local l_rootID_0 = v18.rootID;
            local v25 = v12:get(l_rootID_0);
            if v25 == nil then
                error(l_Error_0.new(string.format("Could not find profiling operations for root %s", (tostring(l_rootID_0)))));
            end;
            local v26 = v13:get(l_rootID_0);
            if v26 == nil then
                error(l_Error_0.new(string.format("Could not find profiling snapshots for root %s", (tostring(l_rootID_0)))));
            end;
            v14:set(l_rootID_0, {
                commitData = l_Array_0.map(l_commitData_0, function(v27, _)
                    return {
                        changeDescriptions = if v27.changeDescriptions ~= nil then l_Map_0.new(v27.changeDescriptions) else nil,
                        duration = v27.duration,
                        fiberActualDurations = l_Map_0.new(v27.fiberActualDurations),
                        fiberSelfDurations = l_Map_0.new(v27.fiberSelfDurations),
                        interactionIDs = v27.interactionIDs,
                        priorityLevel = v27.priorityLevel,
                        timestamp = v27.timestamp
                    };
                end),
                displayName = l_displayName_0,
                initialTreeBaseDurations = l_Map_0.new(l_initialTreeBaseDurations_0),
                interactionCommits = l_Map_0.new(l_interactionCommits_0),
                interactions = l_Map_0.new(l_interactions_0),
                operations = v25,
                rootID = l_rootID_0,
                snapshots = v26
            });
        end;
    end;
    return {
        dataForRoots = v14,
        imported = false
    };
end;
v6.prepareProfilingDataFrontendFromExport = function(v29)
    local l_version_0 = v29.version;
    if l_version_0 ~= l_PROFILER_EXPORT_VERSION_0 then
        error(string.format("Unsupported profiler export version \"%s\"", (tostring(l_version_0))));
    end;
    local v31 = l_Map_0.new();
    l_Array_0.forEach(v29.dataForRoots, function(v32)
        local l_commitData_1 = v32.commitData;
        local l_displayName_1 = v32.displayName;
        local l_initialTreeBaseDurations_1 = v32.initialTreeBaseDurations;
        local l_interactionCommits_1 = v32.interactionCommits;
        local l_interactions_1 = v32.interactions;
        local l_operations_0 = v32.operations;
        local l_rootID_1 = v32.rootID;
        v31:set(l_rootID_1, {
            commitData = l_Array_0.map(l_commitData_1, function(v40)
                local l_changeDescriptions_0 = v40.changeDescriptions;
                return {
                    changeDescriptions = if l_changeDescriptions_0 ~= nil then l_Map_0.new(l_changeDescriptions_0) else nil,
                    duration = v40.duration,
                    fiberActualDurations = l_Map_0.new(v40.fiberActualDurations),
                    fiberSelfDurations = l_Map_0.new(v40.fiberSelfDurations),
                    interactionIDs = v40.interactionIDs,
                    priorityLevel = v40.priorityLevel,
                    timestamp = v40.timestamp
                };
            end),
            displayName = l_displayName_1,
            initialTreeBaseDurations = l_Map_0.new(l_initialTreeBaseDurations_1),
            interactionCommits = l_Map_0.new(l_interactionCommits_1),
            interactions = l_Map_0.new(l_interactions_1),
            operations = l_operations_0,
            rootID = l_rootID_1,
            snapshots = l_Map_0.new(v32.snapshots)
        });
    end);
    return {
        dataForRoots = v31,
        imported = true
    };
end;
v6.prepareProfilingDataExport = function(v42)
    local v43 = {};
    v42.dataForRoots:forEach(function(v44)
        table.insert(v43, {
            commitData = l_Array_0.map(v44.commitData, function(v45)
                local l_changeDescriptions_1 = v45.changeDescriptions;
                return {
                    changeDescriptions = if l_changeDescriptions_1 ~= nil then l_Array_0.from(l_changeDescriptions_1:entries()) else nil,
                    duration = v45.duration,
                    fiberActualDurations = l_Array_0.from(v45.fiberActualDurations:entries()),
                    fiberSelfDurations = l_Array_0.from(v45.fiberSelfDurations:entries()),
                    interactionIDs = v45.interactionIDs,
                    priorityLevel = v45.priorityLevel,
                    timestamp = v45.timestamp
                };
            end),
            displayName = v44.displayName,
            initialTreeBaseDurations = l_Array_0.from(v44.initialTreeBaseDurations:entries()),
            interactionCommits = l_Array_0.from(v44.interactionCommits:entries()),
            interactions = l_Array_0.from(v44.interactions:entries()),
            operations = v44.operations,
            rootID = v44.rootID,
            snapshots = l_Array_0.from(v44.snapshots:entries())
        });
    end);
    return {
        version = l_PROFILER_EXPORT_VERSION_0,
        dataForRoots = v43
    };
end;
v6.getGradientColor = function(v47)
    local v48 = #v10;
    local _ = nil;
    return v10[math.round(if not l_Number_0.isNaN(v47) then if l_Number_0.isFinite(v47) then math.max(0, (math.min(v48, v47))) * v48 else v48 else 0)];
end;
v6.formatDuration = function(v50)
    local v51 = math.round(v50 * 10) / 10;
    if not l_Boolean_0.toJSBoolean(v51) then
        return "<0.1";
    else
        return v51;
    end;
end;
v6.formatPercentage = function(v52)
    return (math.round(v52 * 100));
end;
v6.formatTime = function(v53)
    return math.round(math.round(v53) / 100) / 10;
end;
v6.scale = function(v54, v55, v56, v57)
    return function(v58, v59)
        if v55 - v54 == 0 then
            return v59;
        else
            return ((v58 - v54) / (v55 - v54)) * (v57 - v56);
        end;
    end;
end;
return v6;


local v0 = require(script.Parent.Parent.LuauPolyfill);
local l_Array_0 = v0.Array;
local l_Map_0 = v0.Map;
local v3 = {};
local v4 = {
    __index = v3
};
v3.new = function()
    return (setmetatable({
        listenersMap = l_Map_0.new()
    }, v4));
end;
v3.addListener = function(v5, v6, v7)
    local v8 = v5.listenersMap:get(v6);
    if v8 == nil then
        v5.listenersMap:set(v6, {
            v7
        });
        return ;
    else
        if l_Array_0.indexOf(v8, v7) < 1 then
            table.insert(v8, v7);
        end;
        return ;
    end;
end;
v3.emit = function(v9, v10, ...)
    local v11 = v9.listenersMap:get(v10);
    if v11 ~= nil then
        if #v11 == 1 then
            v11[1](...);
            return ;
        else
            local v12 = false;
            local v13 = nil;
            for _, v15 in (table.clone(v11)), nil, nil do
                local l_status_0, l_result_0 = pcall(function(...)
                    v15(...);
                    return nil;
                end, ...);
                if not l_status_0 then
                    v12 = true;
                    v13 = l_result_0;
                end;
            end;
            if v12 then
                error((tostring(v13)));
            end;
        end;
    end;
end;
v3.removeAllListeners = function(v18)
    v18.listenersMap:clear();
end;
v3.removeListener = function(v19, v20, v21)
    local v22 = v19.listenersMap:get(v20);
    if v22 ~= nil then
        local v23 = l_Array_0.indexOf(v22, v21);
        if v23 >= 1 then
            l_Array_0.splice(v22, v23, 1);
        end;
    end;
end;
return v3;


local v0 = require(script.Parent.Parent.LuauPolyfill);
local l_Array_0 = v0.Array;
local l_Map_0 = v0.Map;
local l_Set_0 = v0.Set;
local v4 = {};
local v5 = require(script.Parent.backend.console);
local l_patch_0 = v5.patch;
local l_registerRenderer_0 = v5.registerRenderer;
local _ = require(script.Parent.backend.types);
local l__G_0 = _G;
v4.installHook = function(v10)
    if not v10.__REACT_DEVTOOLS_GLOBAL_HOOK__ then
        local v11 = nil;
        local v12 = {};
        local v13 = l_Map_0.new();
        local v14 = {};
        local v15 = l_Map_0.new();
        local _ = function(_)
            return "production";
        end;
        local function v19(_)
        end;
        local v20 = 1;
        local function _()
            v20 = v20 + 1;
            return v20;
        end;
        v11 = {
            rendererInterfaces = v13,
            listeners = v14,
            renderers = v15,
            emit = function(v22, v23)
                if v14[v22] then
                    for _, v25 in v14[v22], nil, nil do
                        v25(v23);
                    end;
                end;
            end,
            getFiberRoots = function(v26)
                local l_v12_0 = v12;
                if not l_v12_0[v26] then
                    l_v12_0[v26] = l_Set_0.new();
                end;
                return l_v12_0[v26];
            end,
            inject = function(v28)
                v20 = v20 + 1;
                local l_v20_0 = v20;
                v15:set(l_v20_0, v28);
                local v30 = "production";
                if _G.__DEV__ then
                    pcall(function()
                        local v31 = l__G_0.__REACT_DEVTOOLS_APPEND_COMPONENT_STACK__ ~= false;
                        local v32 = l__G_0.__REACT_DEVTOOLS_BREAK_ON_CONSOLE_ERRORS__ == true;
                        if not (not v31 and not v32) then
                            l_registerRenderer_0(v28);
                            l_patch_0({
                                appendComponentStack = v31,
                                breakOnConsoleErrors = v32
                            });
                        end;
                    end);
                end;
                local l___REACT_DEVTOOLS_ATTACH___0 = v10.__REACT_DEVTOOLS_ATTACH__;
                if type(l___REACT_DEVTOOLS_ATTACH___0) == "function" then
                    v11.rendererInterfaces:set(l_v20_0, (l___REACT_DEVTOOLS_ATTACH___0(v11, l_v20_0, v28, v10)));
                end;
                v11.emit("renderer", {
                    id = l_v20_0,
                    renderer = v28,
                    reactBuildType = v30
                });
                return l_v20_0;
            end,
            on = function(v34, v35)
                if not v14[v34] then
                    v14[v34] = {};
                end;
                table.insert(v14[v34], v35);
            end,
            off = function(v36, v37)
                if v14[v36] then
                    local v38 = l_Array_0.indexOf(v14[v36], v37);
                    if v38 ~= -1 then
                        l_Array_0.splice(v14[v36], v38, 1);
                    end;
                    if #v14[v36] == 0 then
                        v14[v36] = nil;
                    end;
                    return ;
                else
                    return ;
                end;
            end,
            sub = function(v39, v40)
                v11.on(v39, v40);
                return function()
                    return v11.off(v39, v40);
                end;
            end,
            supportsFiber = true,
            checkDCE = v19,
            onCommitFiberUnmount = function(v41, v42)
                local v43 = v13:get(v41);
                if v43 ~= nil then
                    v43.handleCommitFiberUnmount(v42);
                end;
            end,
            onCommitFiberRoot = function(v44, v45, v46)
                local v47 = v11.getFiberRoots(v44);
                local l_current_0 = v45.current;
                local v49 = v47[v45] ~= nil;
                local v50 = true;
                if l_current_0.memoizedState ~= nil then
                    v50 = l_current_0.memoizedState.element == nil;
                end;
                if v49 or v50 then
                    if not (not v49 or not v50) then
                        v47[v45] = nil;
                    end;
                else
                    v47[v45] = true;
                end;
                local v51 = v13:get(v44);
                if v51 ~= nil then
                    v51.handleCommitFiberRoot(v45, v46);
                end;
            end
        };
        v10.__REACT_DEVTOOLS_GLOBAL_HOOK__ = v11;
        return v11;
    else
        return nil;
    end;
end;
return v4;


local l_Symbol_0 = require(script.Parent.Parent.LuauPolyfill).Symbol;
local function _(v1)
    print("");
    print("");
    print(" ");
end;
return {
    meta = {
        inspectable = l_Symbol_0("inspectable"),
        inspected = l_Symbol_0("inspected"),
        name = l_Symbol_0("name"),
        preview_long = l_Symbol_0("preview_long"),
        preview_short = l_Symbol_0("preview_short"),
        readonly = l_Symbol_0("readonly"),
        size = l_Symbol_0("size"),
        type = l_Symbol_0("type"),
        unserializable = l_Symbol_0("unserializable")
    },
    createDehydrated = function(_, _, _, _, _)
        print("");
        print("");
        print(" ");
        error("unimplemented createDehydrated");
    end,
    dehydrate = function(v8, _, _, _, _, v13)
        if v13 == nil then
            v13 = 0;
        end;
        return v8;
    end,
    fillInPath = function(_, _, _, _)
        print("");
        print("");
        print(" ");
    end,
    hydrate = function(v18, _, _)
        return v18;
    end
};


return {
    backend = require(script.backend),
    bridge = require(script.bridge),
    devtools = require(script.devtools),
    hydration = require(script.hydration),
    hook = require(script.hook),
    utils = require(script.utils)
};


return {
    setupFilesAfterEnv = {
        script.Parent.__tests__.setupTests
    },
    testMatch = {
        "**/*.(spec|test)"
    }
};


local v0 = {};
if _G.__LOCALSTORAGE__ == nil then
    _G.__LOCALSTORAGE__ = {};
end;
if _G.__SESSIONSTORAGE__ == nil then
    _G.__SESSIONSTORAGE__ = {};
end;
local l___LOCALSTORAGE___0 = _G.__LOCALSTORAGE__;
local l___SESSIONSTORAGE___0 = _G.__SESSIONSTORAGE__;
v0.localStorageGetItem = function(v3)
    return l___LOCALSTORAGE___0[v3];
end;
v0.localStorageRemoveItem = function(v4)
    l___LOCALSTORAGE___0[v4] = nil;
end;
v0.localStorageSetItem = function(v5, v6)
    l___LOCALSTORAGE___0[v5] = v6;
end;
v0.sessionStorageGetItem = function(v7)
    return l___SESSIONSTORAGE___0[v7];
end;
v0.sessionStorageRemoveItem = function(v8)
    l___SESSIONSTORAGE___0[v8] = nil;
end;
v0.sessionStorageSetItem = function(v9, v10)
    l___SESSIONSTORAGE___0[v9] = v10;
end;
return v0;


return {
    ElementTypeClass = 1,
    ElementTypeContext = 2,
    ElementTypeFunction = 5,
    ElementTypeForwardRef = 6,
    ElementTypeHostComponent = 7,
    ElementTypeMemo = 8,
    ElementTypeOtherOrUnknown = 9,
    ElementTypeProfiler = 10,
    ElementTypeRoot = 11,
    ElementTypeSuspense = 12,
    ElementTypeSuspenseList = 13,
    ComponentFilterElementType = 1,
    ComponentFilterDisplayName = 2,
    ComponentFilterLocation = 3,
    ComponentFilterHOC = 4
};