local l_HttpService_0 = game:GetService("HttpService");
local l_ScriptEditorService_0 = game:GetService("ScriptEditorService");
local l_CollectionService_0 = game:GetService("CollectionService");
local v3 = require(script:FindFirstAncestor("R15Migrator").Src.Util.ScriptAnalysis.Constants);
local v23 = {
    GetScriptBackupChunks = function(_, v5)
        local l_v5_Attribute_0 = v5:GetAttribute(v3.AttributeChunkCountName);
        if l_v5_Attribute_0 then
            local v7 = {};
            for v8 = 1, l_v5_Attribute_0 do
                table.insert(v7, l_HttpService_0:JSONDecode((v5:GetAttribute(v3.AttributeChunkNameBase .. tostring(v8)))).source);
            end;
            return v7;
        else
            return ;
        end;
    end,
    HasScriptBackup = function(_, v10)
        local l_v10_Attribute_0 = v10:GetAttribute(v3.AttributeChunkCountName);
        if not l_v10_Attribute_0 or l_v10_Attribute_0 == 0 then
            return false;
        else
            return true;
        end;
    end,
    RemoveScriptBackupChunks = function(_, v13)
        local l_v13_Attribute_0 = v13:GetAttribute(v3.AttributeChunkCountName);
        if l_v13_Attribute_0 then
            v13:SetAttribute(v3.AttributeChunkCountName, nil);
            v13:SetAttribute(v3.AttributeInitialIssueCountName, nil);
            for v15 = 1, l_v13_Attribute_0 do
                v13:SetAttribute(v3.AttributeChunkNameBase .. tostring(v15), nil);
            end;
            return ;
        else
            return ;
        end;
    end,
    DidSourceChange = function(v16, v17, v18)
        if not v18 then
            v18 = v16:GetScriptBackupChunks(v17);
        end;
        if v18 then
            local l_l_ScriptEditorService_0_EditorSource_0 = l_ScriptEditorService_0:GetEditorSource(v17);
            local v20 = "";
            for _, v22 in v18, nil, nil do
                v20 = v20 .. v22;
            end;
            if string.gsub(l_l_ScriptEditorService_0_EditorSource_0, "\r\n", "\n") == string.gsub(v20, "\r\n", "\n") then
                return false;
            else
                return true;
            end;
        else
            return false;
        end;
    end
};
local function _(v24)
    local l_l_ScriptEditorService_0_ScriptDocument_0 = l_ScriptEditorService_0:FindScriptDocument(v24);
    if not l_l_ScriptEditorService_0_ScriptDocument_0 then
        l_ScriptEditorService_0:OpenScriptDocumentAsync(v24);
        l_l_ScriptEditorService_0_ScriptDocument_0 = l_ScriptEditorService_0:FindScriptDocument(v24);
    end;
    return l_l_ScriptEditorService_0_ScriptDocument_0;
end;
v23.AppendChunk = function(_, v28, v29)
    local l_l_ScriptEditorService_0_ScriptDocument_1 = l_ScriptEditorService_0:FindScriptDocument(v28);
    if not l_l_ScriptEditorService_0_ScriptDocument_1 then
        l_ScriptEditorService_0:OpenScriptDocumentAsync(v28);
        l_l_ScriptEditorService_0_ScriptDocument_1 = l_ScriptEditorService_0:FindScriptDocument(v28);
    end;
    local l_l_l_ScriptEditorService_0_ScriptDocument_1_0 = l_l_ScriptEditorService_0_ScriptDocument_1;
    if l_l_l_ScriptEditorService_0_ScriptDocument_1_0 then
        l_l_ScriptEditorService_0_ScriptDocument_1 = l_l_l_ScriptEditorService_0_ScriptDocument_1_0:GetLineCount();
        local v32 = string.len((l_l_l_ScriptEditorService_0_ScriptDocument_1_0:GetLine(l_l_ScriptEditorService_0_ScriptDocument_1)));
        l_l_l_ScriptEditorService_0_ScriptDocument_1_0:EditTextAsync(v29, l_l_ScriptEditorService_0_ScriptDocument_1, v32 + 1, l_l_ScriptEditorService_0_ScriptDocument_1, v32 + 1);
    end;
end;
v23.ReplaceWithChunk = function(_, v34, v35)
    local l_l_ScriptEditorService_0_ScriptDocument_2 = l_ScriptEditorService_0:FindScriptDocument(v34);
    if not l_l_ScriptEditorService_0_ScriptDocument_2 then
        l_ScriptEditorService_0:OpenScriptDocumentAsync(v34);
        l_l_ScriptEditorService_0_ScriptDocument_2 = l_ScriptEditorService_0:FindScriptDocument(v34);
    end;
    local l_l_l_ScriptEditorService_0_ScriptDocument_2_0 = l_l_ScriptEditorService_0_ScriptDocument_2;
    if l_l_l_ScriptEditorService_0_ScriptDocument_2_0 then
        l_l_ScriptEditorService_0_ScriptDocument_2 = l_l_l_ScriptEditorService_0_ScriptDocument_2_0:GetLineCount();
        l_l_l_ScriptEditorService_0_ScriptDocument_2_0:EditTextAsync(v35, 1, 1, l_l_ScriptEditorService_0_ScriptDocument_2, (string.len((l_l_l_ScriptEditorService_0_ScriptDocument_2_0:GetLine(l_l_ScriptEditorService_0_ScriptDocument_2)))));
    end;
end;
v23.SplitIntoChunks = function(_, v39)
    local v40 = {};
    local l_v39_0 = v39;
    while v3.CharacterLimit < string.len(l_v39_0) do
        local v42 = #v40 * v3.CharacterLimit + 1;
        local v43 = (#v40 + 1) * v3.CharacterLimit;
        table.insert(v40, (string.sub(l_v39_0, v42, v43)));
        l_v39_0 = string.sub(l_v39_0, v43 + 1, (string.len(l_v39_0)));
    end;
    table.insert(v40, l_v39_0);
    return v40;
end;
v23.GetScriptSourceFromChunks = function(v44, v45)
    local l_v44_ScriptBackupChunks_0 = v44:GetScriptBackupChunks(v45);
    local v47 = "";
    for v48 = 1, #l_v44_ScriptBackupChunks_0 do
        v47 = v47 .. l_v44_ScriptBackupChunks_0[v48];
    end;
    return v47;
end;
v23.RemoveAllScriptBackups = function(v49)
    for _, v51 in (l_CollectionService_0:GetTagged(v3.ScriptBackupTag)), nil, nil do
        v49:RemoveScriptBackupChunks(v51);
        l_CollectionService_0:RemoveTag(v51, v3.ScriptBackupTag);
    end;
end;
v23.TrackBackup = function(_, v53)
    l_CollectionService_0:AddTag(v53, v3.ScriptBackupTag);
end;
return v23;


local l_HttpService_0 = game:GetService("HttpService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("R15Migrator");
local v2 = require(l_script_FirstAncestor_0.Src.Util.ScriptAnalysis.Constants);
local v3 = require(l_script_FirstAncestor_0.Src.Util.ScriptHistory.ChunkUtil);
local function _(v4, v5, v6)
    v6:SetAttribute(v2.AttributeChunkNameBase .. tostring(v4), (l_HttpService_0:JSONEncode(v5)));
end;
return function(v8)
    if v8 and not v8:GetAttribute(v2.AttributeChunkCountName) then
        local v9 = v3:SplitIntoChunks(v8.Source);
        v8:SetAttribute(v2.AttributeChunkCountName, #v9);
        for v10, v11 in v9, nil, nil do
            v8:SetAttribute(v2.AttributeChunkNameBase .. tostring(v10), (l_HttpService_0:JSONEncode({
                source = v11
            })));
        end;
        v3:TrackBackup(v8);
        return ;
    else
        return ;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("R15Migrator");
local v1 = require(l_script_FirstAncestor_0.Src.Util.findAllInServices);
local v2 = require(l_script_FirstAncestor_0.Src.Util.ScriptHistory.ChunkUtil);
return function()
    for _, v5 in (v1(function(v3)
        return v3:IsA("LuaSourceContainer");
    end)), nil, nil do
        v2:RemoveScriptBackupChunks(v5);
    end;
end;


local v0 = require(script:FindFirstAncestor("R15Migrator").Src.Util.ScriptHistory.ChunkUtil);
return function(v1, v2, v3)
    local v4 = {};
    local v5 = {};
    for _, v7 in v1, nil, nil do
        local v8 = v2:getScriptInstanceFromGUID(v7);
        local l_v0_ScriptBackupChunks_0 = v0:GetScriptBackupChunks(v8);
        if not (not l_v0_ScriptBackupChunks_0 or not v0:DidSourceChange(v8, l_v0_ScriptBackupChunks_0)) then
            v4[v7] = true;
            v5[v7] = l_v0_ScriptBackupChunks_0;
        end;
    end;
    local v10 = next(v5);
    for v11, v12 in v5, nil, nil do
        local v13 = v2:getScriptInstanceFromGUID(v11);
        v2:setRevertedScriptSource(v11);
        v0:ReplaceWithChunk(v13, v12[1]);
        if #v12 > 1 then
            for v14 = 2, #v12 do
                v0:AppendChunk(v13, v12[v14]);
            end;
        end;
        if v3 then
            v3(v11);
        end;
        if v11 ~= v10 then
            v2:closeScriptIfOpen(v11);
        end;
    end;
    if v10 then
        v2:closeScriptIfOpen(v10);
    end;
    return v4;
end;


local v0 = require(script:FindFirstAncestor("R15Migrator").Src.Util.ScriptHistory.ChunkUtil);
return function(v1, v2)
    for _, v4 in v1, nil, nil do
        if not v0:HasScriptBackup((v2:getScriptInstanceFromGUID(v4.scriptId))) then
            return false;
        end;
    end;
    return true;
end;


local v0 = require(script:FindFirstAncestor("R15Migrator").Src.Util.ScriptHistory.ChunkUtil);
return function(v1, v2, v3)
    local v4 = v1[1];
    for _, v6 in v1, nil, nil do
        local v7 = v2:getRevertedScriptSource(v6);
        local v8 = v2:getScriptInstanceFromGUID(v6);
        local v9 = v0:SplitIntoChunks(v7);
        if #v9 ~= 0 then
            v0:ReplaceWithChunk(v8, v9[1]);
            for v10 = 2, #v9 do
                v0:AppendChunk(v8, v9[v10]);
            end;
            if v3 then
                v3(v6);
            end;
            if v6 ~= v4 then
                v2:closeScriptIfOpen(v6);
            end;
        end;
    end;
    if v4 then
        v2:closeScriptIfOpen(v4);
    end;
end;


local l_deepCopy_0 = require(script:FindFirstAncestor("R15Migrator").Packages.Framework).Util.deepCopy;
return {
    addScriptIssue = function(v1, v2, v3, v4, v5)
        if not (not v2.scriptId or v3[v2.scriptId]) then
            v3[v2.scriptId] = {};
        end;
        if v2.range then
            if not v5[v2.scriptId] then
                table.insert(v3[v2.scriptId], l_deepCopy_0(v2));
            end;
            return ;
        else
            v3[v2.scriptId] = v1:sortDiagListForConversion(v4[v2.scriptId]);
            v5[v2.scriptId] = true;
            return ;
        end;
    end,
    sortSelectionForConversion = function(v6, v7, v8)
        local v9 = {};
        local v10 = {};
        for _, v12 in v7, nil, nil do
            v6:addScriptIssue(v12, v9, v8, v10);
        end;
        for v13, v14 in v9, nil, nil do
            if not v10[v13] then
                v6:sortScriptItemsByRange(v14);
            end;
        end;
        return v9;
    end,
    sortScriptItemsByRange = function(_, v16)
        table.sort(v16, function(v17, v18)
            return v18.range < v17.range;
        end);
    end,
    sortDiagListForConversion = function(v19, v20)
        if v20 then
            local v21 = l_deepCopy_0(v20:Get());
            v19:sortScriptItemsByRange(v21);
            return v21;
        else
            return {};
        end;
    end
};


local l_ScriptEditorService_0 = game:GetService("ScriptEditorService");
local l_DraftsService_0 = game:GetService("DraftsService");
local l_Util_0 = script:FindFirstAncestor("R15Migrator").Src.Util;
local _ = require(l_Util_0.ScriptAnalysis.Constants);
local v4 = require(l_Util_0.ScriptHistory.ChunkUtil);
local v8 = {
    UNASSIGNED = "Unassigned",
    goToScriptInstance = function(v5, v6)
        if v5 then
            l_ScriptEditorService_0:OpenScriptDocumentAsync(v5);
            local l_l_ScriptEditorService_0_ScriptDocument_0 = l_ScriptEditorService_0:FindScriptDocument(v5);
            if l_l_ScriptEditorService_0_ScriptDocument_0 and v6 then
                l_l_ScriptEditorService_0_ScriptDocument_0:ForceSetSelectionAsync(v6.startLine, v6.startCharacter, v6.endLine, v6.endCharacter);
                return l_l_ScriptEditorService_0_ScriptDocument_0;
            else
                return ;
            end;
        else
            return ;
        end;
    end
};
v8.goToScript = function(v9, v10, v11)
    if v9 and v11 then
        return v8.goToScriptInstance(v11:getScriptInstanceFromGUID(v9), v10);
    else
        return ;
    end;
end;
local function _(v12, v13, v14)
    if v12 and v13 then
        v12:EditTextAsync(v14, v13.startLine, v13.startCharacter, v13.endLine, v13.endCharacter);
        return true;
    else
        return false;
    end;
end;
v8.replaceWithSuggestion = function(v16, v17, v18, v19, v20, v21)
    for _, v23 in v20._list, nil, nil do
        if v17 == v23.range then
            v21:getHandler("onScriptAutoReplacement")(v23.issueType);
        end;
    end;
    local v24 = v8.goToScript(v16, v17, v18);
    if v24 and v17 then
        v24:EditTextAsync(v19, v17.startLine, v17.startCharacter, v17.endLine, v17.endCharacter);
        return true;
    else
        return false;
    end;
end;
v8.diffScripts = function(v25, v26)
    local v27 = {};
    local v28 = {};
    for _, v30 in v25, nil, nil do
        local v31 = v26:getScriptInstanceFromGUID(v30.scriptId);
        table.insert(v28, v31);
        table.insert(v27, (v4:GetScriptSourceFromChunks(v31)));
    end;
    l_DraftsService_0:ShowSourceDiffsAgainstCurrent(v27, v28);
end;
return v8;


local v0 = require(script:FindFirstAncestor("R15Migrator").Src.Util.ScriptAnalysis.Constants);
local v1 = {};
local _ = function(v2)
    local v3 = 0;
    for _, v5 in v2, nil, nil do
        for _ in v5, nil, nil do
            v3 = v3 + 1;
        end;
    end;
    return v3;
end;
v1.GetStatusCounts = function(_, v9)
    local l_revertResult_0 = v9.revertResult;
    local l_scriptInstance_0 = v9.scriptInstance;
    local l_replaceResult_0 = v9.replaceResult;
    local l_undoRevertResult_0 = v9.undoRevertResult;
    local v14 = 0;
    local v15 = 0;
    local v16 = 0;
    local v17 = 0;
    if l_replaceResult_0 then
        v14 = l_replaceResult_0.autoConverted;
        v15 = v15 + l_replaceResult_0.succeeded;
        local l_failed_0 = l_replaceResult_0.failed;
        local v19 = 0;
        for _, v21 in l_failed_0, nil, nil do
            for _ in v21, nil, nil do
                v19 = v19 + 1;
            end;
        end;
        v16 = v19;
        l_failed_0 = l_replaceResult_0.failedVar;
        v19 = 0;
        for _, v24 in l_failed_0, nil, nil do
            for _ in v24, nil, nil do
                v19 = v19 + 1;
            end;
        end;
        v17 = v19;
    end;
    if l_scriptInstance_0 then
        v15 = 1;
    end;
    local v26 = {};
    if not l_revertResult_0 then
        if l_undoRevertResult_0 then
            v26[v0.ScriptStatus.Reverted] = l_undoRevertResult_0;
        end;
    else
        v26[v0.ScriptStatus.Reverted] = l_revertResult_0;
    end;
    if v14 > 0 then
        v26[v0.ScriptStatus.AutoConverted] = v14;
    end;
    if v15 > 0 then
        v26[v0.ScriptStatus.Complete] = v15;
    end;
    if v16 > 0 then
        v26[v0.ScriptStatus.Error] = v16;
    end;
    if v17 > 0 then
        v26[v0.ScriptStatus.VariableError] = v17;
    end;
    return v26;
end;
v1.GetStatusMessages = function(v27, v28, v29)
    if not v28.scriptInstance then
        local l_v27_StatusCounts_0 = v27:GetStatusCounts(v28);
        local v31 = {};
        for v32, v33 in l_v27_StatusCounts_0, nil, nil do
            if v32 ~= v0.ScriptStatus.AutoConverted then
                local v34 = {
                    count = string.format("%d", v33)
                };
                if not v28.undoRevertResult then
                    v31[v32] = v29:getText("ConversionResult", v32, v34);
                else
                    v31[v32] = v29:getText("ConversionResult", "Undo" .. v32, v34);
                end;
            end;
        end;
        return v31;
    else
        return {
            [v0.ScriptStatus.Complete] = v29:getText("ConversionResult", "Script", {
                name = v28.scriptInstance
            })
        };
    end;
end;
return v1;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("R15Migrator");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local l_Signal_0 = require(l_script_FirstAncestor_0.Packages.Framework).Util.Signal;
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v4 = require(l_script_FirstAncestor_0.Src.Util.Input);
local v5 = require(l_script_FirstAncestor_0.Src.Util.ScriptAnalysis.Constants);
local v6 = require(l_script_FirstAncestor_0.Src.Util.ScriptReplacement);
local v7 = require(l_script_FirstAncestor_0.Src.Util.sanitizeString);
local v8 = {};
v8.__index = v8;
v8.new = function()
    return (setmetatable({
        _ctrlDown = false,
        _shiftDown = false,
        _selected = {},
        _expanded = {},
        _onSelectedChanged = l_Signal_0.new(),
        _onExpandedChanged = l_Signal_0.new()
    }, v8));
end;
v8.connectToExpandedChanged = function(v9, v10)
    v9._onExpandedChanged:Connect(v10);
end;
v8.connectToSelectedChanged = function(v11, v12)
    v11._onSelectedChanged:Connect(v12);
end;
v8.onKeyPressed = function(v13, v14)
    if not v4:isShift(v14.KeyCode) then
        if v4:isControl(v14.KeyCode) then
            v13._ctrlDown = true;
        end;
    else
        v13._shiftDown = true;
    end;
    if not ((not v13._ctrlDown or not v13._shiftDown) or not v4:isLetterA(v14.KeyCode)) then
        v13:selectAll(false);
    end;
end;
v8.onKeyReleased = function(v15, v16)
    if not v4:isShift(v16.KeyCode) then
        if v4:isControl(v16.KeyCode) then
            v15._ctrlDown = false;
        end;
        return ;
    else
        v15._shiftDown = false;
        return ;
    end;
end;
v8.getItems = function(v17)
    return v17._items;
end;
v8.terminate = function(v18)
    v18._items = nil;
    v18._expanded = {};
    v18._selected = {};
    v18._previousSelected = nil;
    v18._shiftDown = false;
    v18._ctrlDown = false;
end;
v8.buildDiagnosticListForScript = function(_, v20, v21, _, v23)
    local v24 = {};
    for v25, v26 in v21, nil, nil do
        if not v23 or v23 == v26.instanceName then
            table.insert(v24, {
                key = v20 .. "." .. v25,
                codeText = v26.code,
                text = v26.message,
                instanceName = v26.instanceName,
                range = v26.range,
                url = not v26.codeDescription and "" or v26.codeDescription.href,
                scriptId = v20,
                suggestions = v26.suggestions,
                statuses = if v26.severity == Enum.Severity.Warning then {
                    [v5.ScriptStatus.Warning] = 1
                } else {
                    [v5.ScriptStatus.Error] = 1
                },
                issueType = v26.issueType
            });
        end;
    end;
    return v24;
end;
v8.addScriptListItem = function(v27, v28, v29, v30, v31, v32, v33, v34, v35)
    local v36 = v7(v31:getScriptInstanceFromGUID(v30):GetFullName());
    local v37 = if not v29 then nil else v27:buildDiagnosticListForScript(v30, v29:Get(), v31, v35);
    local v38 = {};
    if not v32 then
        if v33 then
            v38[v5.ScriptStatus.Reverted] = 1;
        end;
        v38[v5.ScriptStatus.Error] = v29:ErrorCount(v35);
        v38[v5.ScriptStatus.Warning] = v29:WarningCount(v35);
    elseif not v29 or not v29:HasWarnings() then
        v38[v5.ScriptStatus.Complete] = 1;
    else
        v38[v5.ScriptStatus.Warning] = v29:WarningCount();
    end;
    if not v35 or v35 and #v37 > 0 then
        table.insert(v28, {
            key = v30,
            text = v36,
            scriptId = v30,
            children = v37,
            initialIssueCount = v34,
            statuses = v38
        });
    end;
end;
v8.buildTreeItems = function(v39, v40)
    v39._items = {};
    local l_diagnostics_0 = v40.diagnostics;
    local l_revertedScripts_0 = v40.revertedScripts;
    local l_completedScripts_0 = v40.completedScripts;
    local l_initialIssueCounts_0 = v40.initialIssueCounts;
    local l_filter_0 = v40.filter;
    local l_ScriptConversionContext_0 = v40.ScriptConversionContext;
    for v47, v48 in l_diagnostics_0, nil, nil do
        v39:addScriptListItem(v39._items, v48, v47, l_ScriptConversionContext_0, l_completedScripts_0[v47], l_revertedScripts_0[v47], l_initialIssueCounts_0[v47], l_filter_0);
    end;
    table.sort(v39._items, function(v49, v50)
        if not v49.scriptId or not v50.scriptId then
            return false;
        else
            local v51 = l_ScriptConversionContext_0:getScriptInstanceFromGUID(v49.scriptId);
            local v52 = l_ScriptConversionContext_0:getScriptInstanceFromGUID(v50.scriptId);
            if v51:GetFullName() == v52:GetFullName() then
                return v49.scriptId < v50.scriptId;
            else
                return v51:GetFullName() < v52:GetFullName();
            end;
        end;
    end);
end;
v8.flattenItems = function(v53, v54)
    if v53._items then
        local v55 = {};
        for _, v57 in v53._items, nil, nil do
            table.insert(v55, v57);
            if not (not v54 and not v53._expanded[v57.key]) then
                for _, v59 in v57.children, nil, nil do
                    table.insert(v55, v59);
                    if not (not v54 and not v53._expanded[v59.key] or not v59.children) then
                        for _, v61 in v59.children, nil, nil do
                            table.insert(v55, v61);
                        end;
                    end;
                end;
            end;
        end;
        return v55;
    else
        return {};
    end;
end;
v8.getExpansionTable = function(v62)
    local v63 = {};
    for _, v65 in v62._items, nil, nil do
        if v62._expanded[v65.key] then
            v63[v65] = true;
        end;
    end;
    return v63;
end;
v8.getSelectionList = function(v66)
    local v67 = {};
    for _, v69 in v66._items, nil, nil do
        if v66._selected[v69.key] then
            table.insert(v67, v69);
        end;
        for _, v71 in v69.children, nil, nil do
            if v66._selected[v71.key] then
                table.insert(v67, v71);
            end;
        end;
    end;
    return v67;
end;
v8.toggleExpanded = function(v72, v73)
    v72._expanded[v73.key] = not v72._expanded[v73.key];
    v72._onExpandedChanged:Fire();
end;
v8.resetSelected = function(v74)
    v74._selected = {};
    v74._onSelectedChanged:Fire();
end;
v8.findCurrentAndPreviousSelectionIndex = function(v75, v76, v77)
    local v78 = nil;
    local v79 = nil;
    for v80, v81 in v76, nil, nil do
        if v81.key == v77.key then
            v78 = v80;
            if v79 then
                break;
            end;
        end;
        if v81.key == v75._previousSelected then
            v79 = v80;
            if v78 then
                break;
            end;
        end;
    end;
    return v78, v79;
end;
v8.areAllSelected = function(v82, v83)
    for _, v85 in (v82:flattenItems(v83)), nil, nil do
        if not v82._selected[v85.key] then
            return false;
        end;
    end;
    return true;
end;
v8.selectAll = function(v86, v87)
    for _, v89 in (v86:flattenItems(v87)), nil, nil do
        v86._selected[v89.key] = true;
    end;
    v86._previousSelected = nil;
    v86._onSelectedChanged:Fire();
end;
v8.shiftSelectItem = function(v90, v91)
    local v92 = v90:flattenItems(false);
    local v93, v94 = v90:findCurrentAndPreviousSelectionIndex(v92, v91);
    if v93 then
        if v94 then
            for v95 = math.min(v93, v94), math.max(v93, v94) do
                v90._selected[v92[v95].key] = true;
            end;
            return ;
        else
            v90._selected = {
                [v91.key] = true
            };
            return ;
        end;
    else
        return ;
    end;
end;
v8.toggleSelectItem = function(v96, v97)
    v96._selected[v97.key] = not v96._selected[v97.key];
    if v97.children then
        for _, v99 in v97.children, nil, nil do
            v96._selected[v99.key] = v96._selected[v97.key];
        end;
    end;
end;
v8.hasMultiSelection = function(v100)
    local v101 = 1;
    for _ in v100._selected, nil, nil do
        if v101 > 1 then
            return true;
        else
            v101 = v101 + 1;
        end;
    end;
    return false;
end;
v8.plainSelectItem = function(v103, v104, v105)
    if not v103._selected[v104.key] or not v105 then
        if not (v103._selected[v104.key] and not v103:hasMultiSelection()) then
            v103._selected = {
                [v104.key] = true
            };
        end;
        return ;
    else
        return ;
    end;
end;
v8.itemIsSelected = function(v106, v107)
    return v106._selected[v107.key] == true;
end;
v8.onItemDoubleClicked = function(_, v109, v110)
    v6.goToScript(v109.scriptId, v109.range, v110);
end;
v8.onItemClicked = function(v111, v112, v113)
    if not v111._shiftDown then
        if not v113 then
            v111:toggleSelectItem(v112);
        else
            v111:plainSelectItem(v112, v113);
        end;
    else
        v111:shiftSelectItem(v112);
    end;
    v111._previousSelected = v112.key;
    v111._onSelectedChanged:Fire();
end;
v8.getRightClickContextInfo = function(v114, v115, _)
    local v117 = {};
    local v118 = {};
    for _, v120 in (v114:getSelectionList()), nil, nil do
        if not v120.range then
            if v120.scriptId then
                table.insert(v117, v120);
            end;
        else
            table.insert(v118, v120);
        end;
    end;
    return v1.Dictionary.join(v115, {
        selectedScriptItems = v117,
        selectedRangeItems = v118,
        onScriptsReverted = function()
            v114:resetSelected();
        end,
        onSuggestionApplied = function()
            v114:resetSelected();
        end
    });
end;
return v8;


local v0 = {
    Alphabetical = 1,
    Status = 2
};
v0.getOrderedSortData = function(v1)
    return {
        [v0.Alphabetical] = v1:getText("Summary", "Alphabetical"),
        [v0.Status] = v1:getText("StatusTable", "Status")
    };
end;
return v0;


local l_R15MigScriptsPane_0 = game:GetFastFlag("R15MigScriptsPane");
local v1 = {
    Summary = "Summary",
    CharacterConversion = "CharacterConversion",
    AnimationConversion = "AnimationConversion",
    ScriptConversion = "ScriptConversion",
    ScriptConversionDeprecated = if not l_R15MigScriptsPane_0 then nil else "ScriptConversionDeprecated"
};
v1.getAllTabsData = function(v2, v3)
    local v4 = {
        v1.Summary,
        v1.CharacterConversion,
        v1.AnimationConversion,
        v1.ScriptConversion
    };
    if l_R15MigScriptsPane_0 then
        table.insert(v4, v1.ScriptConversionDeprecated);
    end;
    local v5 = {};
    for _, v7 in v4, nil, nil do
        table.insert(v5, {
            Tooltip = v2:getText("Tabs", v7),
            Key = v7,
            Icon = string.format("rbxasset://textures/R15Migrator/Icon_%sTab.png", v7),
            Disabled = not not v3 and not v3(v7)
        });
    end;
    return v5;
end;
v1.findTabData = function(v8, v9)
    for _, v11 in v9, nil, nil do
        if v11.Key == v8 then
            return v11;
        end;
    end;
    return nil;
end;
return v1;


local l_InsertService_0 = game:GetService("InsertService");
return {
    CreateScriptWithSource = function(_, v2)
        local l_Script_0 = Instance.new("Script");
        l_Script_0.Source = v2;
        return l_Script_0;
    end,
    GetSourceFromLocalFileContents = function(_, v5)
        return l_InsertService_0:GetLocalFileContents("rbxasset://avatar/unification/testScripts/" .. v5 .. ".lua");
    end,
    InsertTestScript = function(v6, v7)
        return v6:CreateScriptWithSource((v6:GetSourceFromLocalFileContents(v7)));
    end
};


local v0 = {};
local l_TextService_0 = game:GetService("TextService");
v0.getTextSize = function(v2, v3, v4, v5)
    local l_l_TextService_0_TextSize_0 = l_TextService_0:GetTextSize(v2, v3, v4, Vector2.new(math.huge, math.huge));
    local v7 = v5 or Vector2.new(0, 0);
    return UDim2.new(0, l_l_TextService_0_TextSize_0.X + v7.X, 0, l_l_TextService_0_TextSize_0.Y + v7.Y);
end;
v0.getTextHeight = function(v8, v9, v10, v11)
    return v0.getTextSize(v8, v9, v10, v11).Y.Offset;
end;
return v0;


local l_Math_0 = require(script:FindFirstAncestor("R15Migrator").Packages.Framework).Util.Math;
return function(v1, v2, v3)
    local v4 = {
        v1:GetComponents()
    };
    local v5 = {
        v2:GetComponents()
    };
    for v6 = 1, 12 do
        if not l_Math_0.fuzzyEq(v4[v6], v5[v6], v3) then
            return false;
        end;
    end;
    return true;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("R15Migrator");
local v1 = require(l_script_FirstAncestor_0.Src.Util.SaveInterface);
local v2 = require(l_script_FirstAncestor_0.Src.Util.PublishTagging);
return function()
    if v1.doesSaveFolderExistInDM() then
        v2:checkPublishTags();
    end;
end;


local v0 = require(script:FindFirstAncestor("R15Migrator").Src.Util.SaveInterface);
local v1 = {
    game:GetService("Chat"),
    game:GetService("Lighting"),
    game:GetService("ReplicatedFirst"),
    game:GetService("ReplicatedStorage"),
    game:GetService("ServerScriptService"),
    game:GetService("ServerStorage"),
    game:GetService("StarterGui"),
    game:GetService("StarterPack"),
    game:GetService("StarterPlayer"),
    game:GetService("Workspace")
};
local function v7(v2, v3, v4)
    for _, v6 in v3, nil, nil do
        if not (v2 and not v2(v6)) then
            table.insert(v4, v6);
        end;
    end;
end;
return function(v8)
    local v9 = {};
    for _, v11 in v1, nil, nil do
        assert(v0.isRootSaveFolderChildOf(v11) or not v0.isRootSaveFolderDescendantOf(v11));
        if not v0.isRootSaveFolderChildOf(v11) then
            v7(v8, v11:GetDescendants(), v9);
        else
            for _, v13 in v11:GetChildren() do
                if not v0.isRootSaveFolder(v13) then
                    local l_v13_Descendants_0 = v13:GetDescendants();
                    table.insert(l_v13_Descendants_0, v13);
                    v7(v8, l_v13_Descendants_0, v9);
                end;
            end;
        end;
    end;
    return v9;
end;


local _ = require(script:FindFirstAncestor("R15Migrator").Src.Types);
return function(v1)
    local function _(v2)
        if v2 == 0 then
            return 12;
        elseif v2 > 12 then
            return v2 - 12;
        else
            return v2;
        end;
    end;
    local v4 = v1:ToLocalTime();
    local v5 = {
        year = tostring(v4.Year),
        month = tostring(v4.Month),
        day = tostring(v4.Day)
    };
    local l_Hour_0 = v4.Hour;
    v5.hour = tostring(l_Hour_0 == 0 and 12 or if l_Hour_0 > 12 then l_Hour_0 - 12 else l_Hour_0);
    v5.isPm = v4.Hour >= 12;
    v5.minute = if v4.Minute < 10 then "0" .. tostring(v4.Minute) else tostring(v4.Minute);
    return v5;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("R15Migrator");
local v1 = require(l_script_FirstAncestor_0.Packages.Rodux);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_TestHelpers_0 = v2.TestHelpers;
local l_ContextServices_0 = v2.ContextServices;
local v5 = {
    l_ContextServices_0.Analytics.mock(),
    l_ContextServices_0.Localization.mock(),
    l_ContextServices_0.Store.new(v1.Store.new(require(l_script_FirstAncestor_0.Src.Reducers.MainReducer), nil, nil, nil)),
    require(l_script_FirstAncestor_0.Src.Resources.MakeTheme)(true)
};
return function(v6)
    assert(type(v6) == "table", "Expected story to be a table");
    return l_TestHelpers_0.provideMockContext(v5, v6);
end;


local v0 = {
    "rbxassetid://(%d+)",
    "http[s]?://www.roblox.com/[Aa]sset[/]?%?[Ii][Dd]=(%d+)"
};
return function(v1)
    for _, v3 in v0, nil, nil do
        local v4, v5, v6 = string.find(v1, v3);
        if v4 then
            return v4, v5, v1:sub(v4, v5), (tonumber(v6));
        end;
    end;
    return nil;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("R15Migrator");
local v1 = require(l_script_FirstAncestor_0.Src.Util.SaveInterface);
local v2 = require(l_script_FirstAncestor_0.Src.Util.PublishTagging);
local v3 = require(l_script_FirstAncestor_0.Src.Util.findAllInServices);
local v4 = require(l_script_FirstAncestor_0.Src.Util.ScriptHistory.ChunkUtil);
return function()
    v2:prepareToPublish();
    v4:RemoveAllScriptBackups();
    for _, v6 in (v3(v1.conversionIdFilter())), nil, nil do
        v1.removeConversionId(v6);
    end;
    v1.removeAllSavedData();
end;


return function(v0)
    if v0 then
        return (string.gsub(v0, "[\n\t]", ""));
    else
        return nil;
    end;
end;


return function()
    if not require(script.Parent.DebugFlags).RunningUnderCLI() then
        if game:GetFastFlag("DebugR15MigratorPlugin") then
            return true;
        else
            return ;
        end;
    else
        return false;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("R15Migrator");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Packages.Cryo);
local l_ContextServices_0 = require(l_script_FirstAncestor_0.Packages.Framework).ContextServices;
local v4 = require(l_script_FirstAncestor_0.Src.Resources.MakeTheme);
local v5 = require(l_script_FirstAncestor_0.Src.Util.DebugFlags);
return function(v6, v7, v8, v9)
    local v10 = nil;
    local function v12(v11)
        if v10 then
            v1.unmount(v10);
        end;
        if v11.OnClose then
            v11.OnClose();
        end;
    end;
    v10 = v1.mount((l_ContextServices_0.provide({
        v7,
        v4((v5.RunTests())),
        v6
    }, {
        v1.createElement(v8, v2.Dictionary.join(v9, {
            OnClose = function()
                local l_v9_0 = v9;
                if v10 then
                    v1.unmount(v10);
                end;
                if l_v9_0.OnClose then
                    l_v9_0.OnClose();
                end;
            end
        }))
    })));
    return v12;
end;


if not game:GetFastFlag("ImprovePluginSpeed_RigGenerator") then
    local l_Parent_0 = script.Parent.Parent;
    local v1 = require(l_Parent_0.Packages.TestLoader);
    v1.launch("RigGenerator", l_Parent_0.Src);
    if not v1.isCli() then
        require(script.Parent.main)(plugin);
        return ;
    else
        return ;
    end;
else
    return ;
end;


return function(v0, v1)
    if v0 then
        require(script.Parent.defineLuaFlags);
        require(script.Parent.commonInit)();
        local l_Parent_0 = script.Parent.Parent;
        local v3 = require(l_Parent_0.Packages.React);
        local v4 = require(l_Parent_0.Packages.ReactRoblox);
        local v5 = require(l_Parent_0.Packages.Framework);
        local v6 = require(l_Parent_0.Src.MainPlugin);
        local v7 = nil;
        local v8 = require(l_Parent_0.Src.Util.hasInternalPermission);
        local v9 = nil;
        if v8() then
            v9 = v5.DeveloperTools.forPlugin(l_Parent_0.Name, v0);
        end;
        local function v11()
            v0.Name = l_Parent_0.Name;
            local v10 = v3.createElement(v6, {
                Plugin = v0,
                PluginLoaderContext = v1
            });
            v7 = v4.createRoot(Instance.new("Frame"));
            v7:render(v10);
            if v9 then
                v9:addRoactTree("Roact tree", v7);
            end;
        end;
        v0.Unloading:Connect(function()
            if v9 then
                v9:destroy();
            end;
            if v7 then
                v7:render(nil);
            end;
        end);
        v11();
        return ;
    else
        return ;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local v2 = require(l_Parent_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_UI_0 = v2.UI;
local l_Button_0 = l_UI_0.Button;
local l_Pane_0 = l_UI_0.Pane;
local v11 = require(l_Parent_0.Src.RigPresets.PresetManifest);
local v12 = v1.PureComponent:extend("RigList");
v12.render = function(v13)
    local l_props_0 = v13.props;
    local l_Localization_1 = l_props_0.Localization;
    local l_OnSelected_0 = l_props_0.OnSelected;
    local v17 = {};
    for v18, v19 in v11, nil, nil do
        v17[v19.Name] = v1.createElement(l_Button_0, {
            Text = l_Localization_1:getText("RigPresetLabel", v19.Name),
            Style = "Round",
            LayoutOrder = v18,
            Size = UDim2.new(1, 0, 0, 26),
            OnClick = function()
                l_OnSelected_0(v19);
            end
        });
    end;
    return v1.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.Y,
        Layout = Enum.FillDirection.Vertical,
        LayoutOrder = l_props_0.LayoutOrder,
        Spacing = 6
    }, v17);
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v12));


local l_Players_0 = game:GetService("Players");
local l_Selection_0 = game:GetService("Selection");
local l_Parent_0 = script.Parent.Parent.Parent;
local v3 = require(l_Parent_0.Packages.React);
local v4 = require(l_Parent_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_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_RadioButtonList_0 = l_UI_0.RadioButtonList;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_TitledFrame_0 = l_UI_0.TitledFrame;
local v15 = require(l_Parent_0.Src.Util.BodyShape);
local v16 = require(l_Parent_0.Src.Components.RigList);
local v17 = v3.PureComponent:extend("RigSelector");
local function _()
    local l_CurrentCamera_0 = workspace.CurrentCamera;
    local v19 = l_CurrentCamera_0.ViewportSize / 2;
    local v20 = l_CurrentCamera_0:ViewportPointToRay(v19.X, v19.Y, 0);
    local v21 = workspace:Raycast(v20.Origin, v20.Direction * 25);
    if v21 then
        return v21.Position;
    else
        return v20.Origin + v20.Direction * 25;
    end;
end;
local function v26(v23)
    for _, v25 in v23:GetDescendants() do
        if v25:IsA("BasePart") then
            v25.Locked = false;
        end;
    end;
end;
v17.insertRig = function(v27, v28)
    local l_Analytics_1 = v27.props.Analytics;
    local l_l_Players_0_HumanoidModelFromDescription_0 = l_Players_0:CreateHumanoidModelFromDescription(require(v28)(v27.state.bodyShape), v27.state.rigType);
    v26(l_l_Players_0_HumanoidModelFromDescription_0);
    l_l_Players_0_HumanoidModelFromDescription_0.Name = "Rig";
    local l_Humanoid_0 = l_l_Players_0_HumanoidModelFromDescription_0:FindFirstChildWhichIsA("Humanoid");
    local l_HumanoidRootPart_0 = l_l_Players_0_HumanoidModelFromDescription_0:FindFirstChild("HumanoidRootPart");
    assert(l_Humanoid_0, "Generated rig did not have Humanoid");
    assert(l_HumanoidRootPart_0, "Generated rig did not have HumanoidRootPart");
    assert(l_l_Players_0_HumanoidModelFromDescription_0.PrimaryPart, "Generated rig does not have PrimaryPart");
    local l_CurrentCamera_1 = workspace.CurrentCamera;
    local v34 = l_CurrentCamera_1.ViewportSize / 2;
    local v35 = l_CurrentCamera_1:ViewportPointToRay(v34.X, v34.Y, 0);
    local v36 = workspace:Raycast(v35.Origin, v35.Direction * 25);
    local v37 = if v36 then v36.Position else v35.Origin + v35.Direction * 25;
    l_CurrentCamera_1 = l_Humanoid_0.HipHeight;
    if v27.state.rigType == Enum.HumanoidRigType.R6 then
        l_l_Players_0_HumanoidModelFromDescription_0.PrimaryPart.PivotOffset = CFrame.new(0, (-l_l_Players_0_HumanoidModelFromDescription_0.PrimaryPart.Size.Y / 2 - l_HumanoidRootPart_0.Size.Y) - 2, 0);
    else
        l_l_Players_0_HumanoidModelFromDescription_0.PrimaryPart.PivotOffset = CFrame.new(0, -l_l_Players_0_HumanoidModelFromDescription_0.PrimaryPart.Size.Y / 2 - l_CurrentCamera_1, 0);
    end;
    l_l_Players_0_HumanoidModelFromDescription_0:PivotTo(CFrame.new(v37));
    l_l_Players_0_HumanoidModelFromDescription_0.Parent = workspace;
    l_Selection_0:Set({
        l_l_Players_0_HumanoidModelFromDescription_0
    });
    l_Analytics_1:report("rigInsert", v28.Name, v27.state.rigType, v27.state.bodyShape);
end;
v17.init = function(v38, _)
    v38:setState({
        rigType = Enum.HumanoidRigType.R15,
        bodyShape = v15.Masculine
    });
end;
v17.render = function(v40)
    local l_props_0 = v40.props;
    local l_Localization_1 = l_props_0.Localization;
    local l_MenuCompleted_0 = l_props_0.MenuCompleted;
    local l_state_0 = v40.state;
    return v3.createElement("Frame", {
        Position = UDim2.new(0.5, 0, 0.5, 0),
        AnchorPoint = Vector2.new(0.5, 0.5),
        Size = UDim2.new(0, 200, 0, 0),
        AutomaticSize = Enum.AutomaticSize.Y,
        BackgroundTransparency = 1
    }, {
        Pane = v3.createElement(l_Pane_0, {
            Style = "BorderBox",
            Layout = Enum.FillDirection.Vertical,
            Padding = 10,
            Spacing = 10
        }, {
            Text = v3.createElement(l_TextLabel_0, {
                AutomaticSize = Enum.AutomaticSize.XY,
                LayoutOrder = 0,
                Style = "Title",
                Text = l_Localization_1:getText("Plugin", "Text")
            }),
            RigType = v3.createElement(l_TitledFrame_0, {
                Title = l_Localization_1:getText("Menu", "RigType"),
                FillDirection = Enum.FillDirection.Vertical,
                LayoutOrder = 1
            }, {
                Types = v3.createElement(l_RadioButtonList_0, {
                    Buttons = {
                        {
                            Key = Enum.HumanoidRigType.R15,
                            Text = Enum.HumanoidRigType.R15.Name
                        },
                        {
                            Key = Enum.HumanoidRigType.R6,
                            Text = Enum.HumanoidRigType.R6.Name
                        }
                    },
                    CurrentSelectedKey = l_state_0.rigType,
                    FillDirection = Enum.FillDirection.Vertical,
                    OnClick = function(v45)
                        v40:setState({
                            rigType = v45
                        });
                    end
                })
            }),
            BodyShape = v3.createElement(l_TitledFrame_0, {
                Title = l_Localization_1:getText("Menu", "BodyShape"),
                FillDirection = Enum.FillDirection.Vertical,
                LayoutOrder = 2
            }, {
                Types = v3.createElement(l_RadioButtonList_0, {
                    Buttons = {
                        {
                            Key = v15.Masculine,
                            Text = l_Localization_1:getText("BodyShape", "Masculine")
                        },
                        {
                            Key = v15.Feminine,
                            Text = l_Localization_1:getText("BodyShape", "Feminine")
                        }
                    },
                    CurrentSelectedKey = l_state_0.bodyShape,
                    FillDirection = Enum.FillDirection.Vertical,
                    OnClick = function(v46)
                        v40:setState({
                            bodyShape = v46
                        });
                    end
                })
            }),
            Rigs = v3.createElement(v16, {
                LayoutOrder = 3,
                OnSelected = function(v47)
                    v40:insertRig(v47);
                    l_MenuCompleted_0();
                end
            })
        })
    });
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v17));


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local v2 = require(l_Parent_0.Packages.ReactRoblox);
local v3 = require(l_Parent_0.Packages.Rodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_UI_0 = v4.UI;
local l_PluginButton_0 = l_UI_0.PluginButton;
local l_PluginToolbar_0 = l_UI_0.PluginToolbar;
local l_ContextServices_0 = v4.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 v12 = require(l_Parent_0.Src.Resources.AnalyticsHandlers);
local v13 = require(l_Parent_0.Src.Reducers.MainReducer);
local v14 = require(l_Parent_0.Src.Resources.MakeTheme);
local l_SourceStrings_0 = l_Parent_0.Src.Resources.Localization.SourceStrings;
local l_LocalizedStrings_0 = l_Parent_0.Src.Resources.Localization.LocalizedStrings;
local l_Components_0 = l_Parent_0.Src.Components;
local v18 = require(l_Components_0.RigSelector);
local v19 = require(l_Components_0.ExampleRoactRoduxComponent);
local l_FixAvatarTabPluginsNotLoadingOnNonEnglishBuilds_0 = game:GetFastFlag("FixAvatarTabPluginsNotLoadingOnNonEnglishBuilds");
local l_ImprovePluginSpeed_RigGenerator_0 = game:GetFastFlag("ImprovePluginSpeed_RigGenerator");
local l_CoreGui_0 = game:GetService("CoreGui");
local v23 = v1.PureComponent:extend("MainPlugin");
v23.init = function(v24, v25)
    v24:setState({
        enabled = false
    });
    v24.toggleEnabled = function()
        if not v24.state.enabled then
            v24.analytics:report("menuOpen");
        else
            v24.analytics:report("menuClose");
            v24.analytics:report("menuCloseManual");
        end;
        v24:setState(function(v26)
            return {
                enabled = not v26.enabled
            };
        end);
    end;
    v24.onClose = function()
        v24.analytics:report("menuClose");
        v24:setState({
            enabled = false
        });
    end;
    v24.onWidgetEnabledChanged = function(v27)
        v24:setState({
            enabled = v27.Enabled
        });
    end;
    v24.store = v3.Store.new(v13, nil, {
        v3.thunkMiddleware
    }, nil);
    v24.localization = l_ContextServices_0.Localization.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "RigGenerator"
    });
    v24.analytics = l_ContextServices_0.Analytics.new(v12);
    if l_ImprovePluginSpeed_RigGenerator_0 then
        v24:initToolbarAndButton(v25);
    end;
end;
v23.initToolbarAndButton = function(v28, v29)
    v28.toolbar = v29.PluginLoaderContext.toolbar;
    v28.mainButton = v29.PluginLoaderContext.mainButton;
    v28.mainButton:SetActive(v28.state.enabled);
    v29.PluginLoaderContext.mainButtonClickedSignal:Connect(v28.toggleEnabled);
end;
v23.renderButtons = function(v30, v31)
    assert(not l_ImprovePluginSpeed_RigGenerator_0);
    return {
        Toggle = v1.createElement(l_PluginButton_0, {
            Toolbar = v31,
            Active = v30.state.enabled,
            Id = "Generate Rig",
            Title = v30.localization:getText("Plugin", "Button"),
            Tooltip = v30.localization:getText("Plugin", "Description"),
            Icon = "rbxlocaltheme://BuildRig",
            OnClick = v30.toggleEnabled,
            ClickableWhenViewportHidden = true
        })
    };
end;
v23.render = function(v32)
    local l_props_0 = v32.props;
    local l_state_0 = v32.state;
    local l_Plugin_1 = l_props_0.Plugin;
    return l_ContextServices_0.provide({
        l_Plugin_0.new(l_Plugin_1),
        l_Store_0.new(v32.store),
        l_Mouse_0.new(l_Plugin_1:getMouse()),
        v14(),
        v32.localization,
        v32.analytics
    }, {
        Toolbar = if l_ImprovePluginSpeed_RigGenerator_0 then nil else v1.createElement(l_PluginToolbar_0, {
            Title = if not l_FixAvatarTabPluginsNotLoadingOnNonEnglishBuilds_0 then v32.localization:getText("Plugin", "Toolbar") else "Rig Generator",
            RenderButtons = function(v36)
                return v32:renderButtons(v36);
            end
        }),
        MainWidget = v2.createPortal({
            RigGenerator = v1.createElement("ScreenGui", {
                Enabled = l_state_0.enabled,
                ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
                [v2.Change.Enabled] = v32.onWidgetEnabledChanged
            }, {
                ExampleRoactRoduxComponent = v1.createElement(v19),
                RigSelector = v1.createElement(v18, {
                    MenuCompleted = function()
                        v32:onClose();
                    end
                })
            })
        }, l_CoreGui_0)
    });
end;
if l_ImprovePluginSpeed_RigGenerator_0 then
    v23.didUpdate = function(v37)
        v37.mainButton:SetActive(v37.state.enabled);
    end;
end;
return v23;


local v0 = require(script.Parent.Parent.Parent.Packages.Cryo);
return function(v1)
    local function v4(v2, v3)
        v1:SendEventDeferred("studio", "RigGenerator", v2, (v0.Dictionary.join({
            studioSid = v1:GetSessionId(),
            clientId = v1:GetClientId(),
            placeId = game.PlaceId
        }, v3 or {})));
    end;
    local function _(v5, v6)
        v1:ReportCounter(v5, v6 or 1);
    end;
    return {
        rigInsert = function(v8, v9, v10)
            v1:ReportCounter("AvatarGeneratorRigInsert", nil or 1);
            v4("Rig Generated", {
                rigName = v8,
                rigType = v9.Name,
                bodyShape = v10
            });
        end,
        menuOpen = function()
            v1:ReportCounter("AvatarGeneratorMenuOpen", nil or 1);
        end,
        menuClose = function()
            v1:ReportCounter("AvatarGeneratorMenuClose", nil or 1);
        end,
        menuCloseManual = function()
            v1:ReportCounter("AvatarGeneratorMenuCloseManual", nil or 1);
        end
    };
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Util.BodyShape);
local v2 = require(l_Parent_0.Src.Util.loadOutfitAsHumanoidDescription);
return function(v3)
    return v2(v3 == v1.Masculine and 131929496 or 131929497);
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Util.BodyShape);
local v2 = require(l_Parent_0.Src.Util.loadOutfitAsHumanoidDescription);
return function(v3)
    return v2(v3 == v1.Masculine and 131830044 or 131830043);
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Util.BodyShape);
local v2 = require(l_Parent_0.Src.Util.loadOutfitAsHumanoidDescription);
return function(v3)
    return v2(v3 == v1.Masculine and 0 or 131929545);
end;


local l_Parent_0 = script.Parent;
return {
    l_Parent_0.UserAvatar,
    l_Parent_0.SkinnedAvatar,
    l_Parent_0.RthroAvatar,
    l_Parent_0.BlockAvatar,
    l_Parent_0["2016Avatar"],
    l_Parent_0["2012Avatar"]
};


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Util.BodyShape);
local v2 = require(l_Parent_0.Src.Util.loadOutfitAsHumanoidDescription);
return function(v3)
    return v2(v3 == v1.Masculine and 1545219396 or 1545101850);
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Util.BodyShape);
local v2 = require(l_Parent_0.Src.Util.loadOutfitAsHumanoidDescription);
return function(v3)
    return v2(v3 == v1.Masculine and 11999916658 or 12006493372);
end;


local l_Players_0 = game:GetService("Players");
local l_StudioService_0 = game:GetService("StudioService");
local v2 = require(script.Parent.Parent.Parent.Src.Util.clearPrebakedDescriptionAnimations);
return function(_)
    local l_l_Players_0_HumanoidDescriptionFromUserId_0 = l_Players_0:GetHumanoidDescriptionFromUserId((l_StudioService_0:GetUserId()));
    v2(l_l_Players_0_HumanoidDescriptionFromUserId_0);
    return l_l_Players_0_HumanoidDescriptionFromUserId_0;
end;


return function(v0)
    v0.ClimbAnimation = 0;
    v0.FallAnimation = 0;
    v0.IdleAnimation = 0;
    v0.JumpAnimation = 0;
    v0.MoodAnimation = 0;
    v0.RunAnimation = 0;
    v0.SwimAnimation = 0;
    v0.WalkAnimation = 0;
end;


local l_Players_0 = game:GetService("Players");
local v1 = require(script.Parent.clearPrebakedDescriptionAnimations);
local v2 = game:DefineFastFlag("RigBuilderBlockyScalesFix", false);
local v3 = Color3.new(0.5, 0.5, 0.5);
local function _(v4)
    v4.HeadColor = v3;
    v4.LeftArmColor = v3;
    v4.LeftLegColor = v3;
    v4.RightArmColor = v3;
    v4.RightLegColor = v3;
    v4.TorsoColor = v3;
end;
return function(v6)
    local v7 = nil;
    if not v2 then
        v7 = if v6 == 0 then Instance.new("HumanoidDescription") else l_Players_0:GetHumanoidDescriptionFromOutfitId(v6);
    elseif v6 == 0 then
        v7 = Instance.new("HumanoidDescription");
        v7.BodyTypeScale = 0;
        v7.ProportionScale = 0;
    else
        v7 = l_Players_0:GetHumanoidDescriptionFromOutfitId(v6);
    end;
    v1(v7);
    local l_v7_0 = v7;
    l_v7_0.HeadColor = v3;
    l_v7_0.LeftArmColor = v3;
    l_v7_0.LeftLegColor = v3;
    l_v7_0.RightArmColor = v3;
    l_v7_0.RightLegColor = v3;
    l_v7_0.TorsoColor = v3;
    return v7;
end;


if not game:GetFastFlag("ImprovePluginSpeed_RobloxClassic") then
    local v0 = require(script.Parent.main);
    if require(script.Parent.Parent.Src.Util.shouldPluginRun)() then
        v0(plugin);
        return ;
    else
        return ;
    end;
else
    return ;
end;


return function(v0, v1)
    if v0 then
        require(script.Parent.defineLuaFlags);
        require(script.Parent.commonInit)();
        local l_Parent_0 = script.Parent.Parent;
        local v3 = require(l_Parent_0.Packages.Roact);
        local v4 = require(l_Parent_0.Packages.Framework);
        local v5 = require(l_Parent_0.Src.MainPlugin);
        local v6 = require(l_Parent_0.Src.Util.hasInternalPermission)();
        local v7 = nil;
        local v8 = nil;
        if v6 then
            v8 = v4.DeveloperTools.forPlugin(l_Parent_0.Name, v0);
        end;
        local function v9()
            v0.Name = l_Parent_0.Name;
            v7 = v3.mount((v3.createElement(v5, {
                Plugin = v0,
                PluginLoaderContext = v1
            })));
            if v8 then
                v8:addRoactTree("RobloxClassic", v7);
            end;
        end;
        v0.Unloading:Connect(function()
            if v8 then
                v8:destroy();
            end;
            if v7 then
                v3.unmount(v7);
                v7 = nil;
            end;
        end);
        v9();
        return ;
    else
        return ;
    end;
end;


local l_ImprovePluginSpeed_RobloxClassic_0 = game:GetFastFlag("ImprovePluginSpeed_RobloxClassic");
local l_Parent_0 = script.Parent.Parent;
require(script.Parent.commonInit)();
local v2 = require(l_Parent_0.Src.Util.DebugFlags);
local v3 = nil;
if not l_ImprovePluginSpeed_RobloxClassic_0 then
    v3 = require(l_Parent_0.Packages.Framework);
end;
if not (not v2.RunningUnderCLI() and not v2.RunTests()) then
    if l_ImprovePluginSpeed_RobloxClassic_0 then
        v3 = require(l_Parent_0.Packages.Framework);
    end;
    local v4 = require(l_Parent_0.Packages.Dev.TestEZ);
    local l_TestBootstrap_0 = v4.TestBootstrap;
    local v6 = not not _G.TEAMCITY and v4.Reporters.TeamCityReporter or v4.Reporters.TextReporter;
    local l_Src_0 = l_Parent_0.Src;
    local v8 = {
        showTimingInfo = false,
        testNamePattern = nil,
        extraEnvironment = {}
    };
    print("----- All " .. l_Parent_0.Name .. " Tests ------");
    require(script.Parent.defineLuaFlags);
    l_TestBootstrap_0:run({
        l_Src_0
    }, v6, v8);
    print("----------------------------------");
    if v2.RunDeveloperFrameworkTests() then
        print("");
        print("----- All DeveloperFramework Tests ------");
        v3.TestHelpers.runFrameworkTests(v4, v6);
        print("----------------------------------");
    end;
end;
if v2.RunningUnderCLI() then
    pcall(function()
        game:GetService("ProcessService"):ExitAsync(0);
    end);
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_UI_0 = v2.UI;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_ToggleButton_0 = l_UI_0.ToggleButton;
local l_StyleModifier_0 = v2.Util.StyleModifier;
local v8 = v1.PureComponent:extend("LabeledToggleButton");
v8.defaultProps = {
    Disabled = false,
    Selected = false
};
v8.render = function(v9)
    local l_props_0 = v9.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    return v1.createElement(l_UI_0.Pane, {
        Size = l_Stylizer_0.ComponentSize,
        AutomaticSize = Enum.AutomaticSize.X,
        Layout = Enum.FillDirection.Horizontal,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        VerticalAlignment = Enum.VerticalAlignment.Center,
        Padding = {
            Left = l_Stylizer_0.LeftInsetPx
        },
        Spacing = l_Stylizer_0.PaddingPx,
        LayoutOrder = l_props_0.LayoutOrder
    }, {
        ToggleButton = v1.createElement(l_ToggleButton_0, {
            OnClick = l_props_0.OnClick,
            Size = l_Stylizer_0.ToggleSize,
            Selected = l_props_0.Selected,
            AnchorPoint = Vector2.new(0, 0.5),
            Disabled = l_props_0.Disabled
        }),
        TextLabel = v1.createElement(l_TextLabel_0, {
            Size = UDim2.fromScale(0, 0),
            AutomaticSize = Enum.AutomaticSize.XY,
            Text = l_props_0.Text,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Center,
            StyleModifier = not not l_props_0.Disabled and l_StyleModifier_0.Disabled or nil
        })
    });
end;
return (l_ContextServices_0.withContext({
    Stylizer = l_ContextServices_0.Stylizer
})(v8));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Src.Modules.NpcManager);
local v3 = require(l_Parent_0.Packages.Framework);
local l_UI_0 = v3.UI;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Pane_0 = l_UI_0.Pane;
local l_Button_0 = l_UI_0.Button;
local l_LayoutOrderIterator_0 = v3.Util.LayoutOrderIterator;
local l_ContextServices_0 = v3.ContextServices;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Stylizer_0 = l_ContextServices_0.Stylizer;
local l_Localization_0 = l_ContextServices_0.Localization;
local v13 = require(l_Parent_0.Src.Components.LabeledToggleButton);
local v14 = require(l_Parent_0.Src.Util.scanNPCs);
local v15 = v1.PureComponent:extend("MainView");
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
local l_StarterPlayer_0 = game:GetService("StarterPlayer");
v15.init = function(v18, v19)
    v18.doClassicScriptsExist = function()
        local l_StarterCharacterScripts_0 = l_StarterPlayer_0.StarterCharacterScripts;
        if not l_StarterCharacterScripts_0 then
            return false;
        else
            return v2.DoClassicScriptsExist(l_StarterCharacterScripts_0, v19.Localization);
        end;
    end;
    v18.onButtonClicked = function()
        v14(v18.props.Localization);
    end;
    v18:setState(function(_)
        if not v18.doClassicScriptsExist() then
            return {
                classicComponentsActive = false
            };
        else
            return {
                classicComponentsActive = true
            };
        end;
    end);
    v18.OnUndo = function(v22)
        if string.find(v22, "insert") == nil then
            v18:setState({
                classicComponentsActive = true
            });
            return ;
        else
            v18:setState({
                classicComponentsActive = false
            });
            return ;
        end;
    end;
    v18.OnRedo = function(v23)
        if string.find(v23, "insert") == nil then
            v18:setState({
                classicComponentsActive = false
            });
            return ;
        else
            v18:setState({
                classicComponentsActive = true
            });
            return ;
        end;
    end;
    l_ChangeHistoryService_0.OnUndo:connect(v18.OnUndo);
    l_ChangeHistoryService_0.OnRedo:connect(v18.OnRedo);
    v18.insertComponents = function()
        local l_Localization_1 = v19.Localization;
        local l_StarterCharacterScripts_1 = l_StarterPlayer_0.StarterCharacterScripts;
        if not l_StarterCharacterScripts_1 then
            warn(l_Localization_1:getText("InsertComponents", "NoStarter"));
            return ;
        elseif not v2.DoClassicScriptsExist(l_StarterCharacterScripts_1, l_Localization_1) then
            print(l_Localization_1:getText("InsertComponents", "AddingStarterChar"));
            v2.InsertComponents(l_StarterCharacterScripts_1, l_Localization_1, true);
            return ;
        else
            warn(string.format(l_Localization_1:getText("InsertComponents", "AlreadyExist"), "StarterCharacterScripts"));
            return ;
        end;
    end;
    v18.removeComponents = function()
        v2.RemoveComponents(v19.Localization);
    end;
end;
v15.render = function(v26)
    local l_props_0 = v26.props;
    local l_Localization_2 = l_props_0.Localization;
    local l_Stylizer_1 = l_props_0.Stylizer;
    local l_state_0 = v26.state;
    local v31 = l_LayoutOrderIterator_0.new();
    v26.toggleClassicComponentsActive = function()
        local v32 = "";
        if not v26.state.classicComponentsActive then
            v26.insertComponents();
            v32 = "insert RobloxClassic components";
            l_props_0.Analytics:report("classicPluginFlipped", {
                wasFlippedTo = tostring(true)
            });
        else
            v26.removeComponents();
            v32 = "remove RobloxClassic components";
            l_props_0.Analytics:report("classicPluginFlipped", {
                wasFlippedTo = tostring(false)
            });
        end;
        v26:setState({
            classicComponentsActive = not v26.state.classicComponentsActive
        });
        l_ChangeHistoryService_0:SetWaypoint(v32);
    end;
    return v1.createElement(l_Pane_0, {
        Size = UDim2.new(1, 0, 0, l_Stylizer_1.UIHeightPx),
        LayoutOrder = v31:getNextOrder(),
        Padding = l_Stylizer_1.PaddingPx
    }, {
        Label = v1.createElement(l_TextLabel_0, {
            Text = l_Localization_2:getText("Plugin", "RobloxClassicComponents"),
            Size = UDim2.fromScale(1, 0),
            AutomaticSize = Enum.AutomaticSize.Y,
            LayoutOrder = v31:getNextOrder(),
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top
        }),
        GridLayoutArea = v1.createElement(l_Pane_0, {
            Size = UDim2.new(1, 0, 0, l_Stylizer_1.UIGridHeightPx),
            LayoutOrder = v31:getNextOrder(),
            Padding = l_Stylizer_1.UIGridTopMarginPx
        }, {
            Layout = v1.createElement("UIGridLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                CellPadding = l_Stylizer_1.UIGridPadding,
                SortOrder = Enum.SortOrder.LayoutOrder,
                VerticalAlignment = Enum.VerticalAlignment.Top,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                CellSize = l_Stylizer_1.UIGridCellSize
            }),
            ClassicComponentsToggle = v1.createElement(v13, {
                Selected = l_state_0.classicComponentsActive,
                OnClick = v26.toggleClassicComponentsActive,
                Text = l_Localization_2:getText("ClassicComponents", "Active"),
                LayoutOrder = v31:getNextOrder()
            }),
            NPCButton = if not l_state_0.classicComponentsActive then nil else v1.createElement(l_Button_0, {
                Text = l_Localization_2:getText("ClassicComponents", "UpdateNPCs"),
                OnClick = v26.onButtonClicked,
                LayoutOrder = v31:getNextOrder()
            })
        })
    });
end;
return (l_ContextServices_0.withContext({
    Analytics = l_Analytics_0,
    Stylizer = l_Stylizer_0,
    Localization = l_Localization_0
})(v15));


local l_ImprovePluginSpeed_RobloxClassic_0 = game:GetFastFlag("ImprovePluginSpeed_RobloxClassic");
local l_StudioFixPluginWidgetLocalizedIds_0 = game:GetFastFlag("StudioFixPluginWidgetLocalizedIds");
local l_Parent_0 = script.Parent.Parent;
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.Packages.Rodux);
local v5 = require(l_Parent_0.Packages.Framework);
local l_UI_0 = v5.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 l_ContextServices_0 = v5.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 v14 = require(l_Parent_0.Src.Reducers.MainReducer);
local v15 = require(l_Parent_0.Src.Resources.MakeTheme);
local v16 = require(l_Parent_0.Src.Resources.createAnalyticsHandlers);
local l_SourceStrings_0 = l_Parent_0.Src.Resources.Localization.SourceStrings;
local l_LocalizedStrings_0 = l_Parent_0.Src.Resources.Localization.LocalizedStrings;
local v19 = require(l_Parent_0.Src.Components.MainView);
local v20 = v3.PureComponent:extend("MainPlugin");
v20.initToolbarAndButton = function(v21, v22)
    v21.toolbar = v22.PluginLoaderContext.toolbar;
    v21.mainButton = v22.PluginLoaderContext.mainButton;
    v21.mainButton:SetActive(v21.state.enabled);
    v22.PluginLoaderContext.mainButtonClickedSignal:Connect(v21.toggleEnabled);
end;
v20.init = function(v23, v24)
    v23.state = {
        enabled = false
    };
    v23.toggleEnabled = function()
        v23:setState(function(v25)
            return {
                enabled = not v25.enabled
            };
        end);
    end;
    v23.onClose = function()
        v23:setState({
            enabled = false
        });
    end;
    v23.onRestore = function(v26)
        v23:setState({
            enabled = v26
        });
    end;
    v23.onWidgetEnabledChanged = function(v27)
        v23:setState({
            enabled = v27.Enabled
        });
    end;
    v23.store = v4.Store.new(v14, nil, {
        v4.thunkMiddleware
    }, nil);
    v23.localization = l_ContextServices_0.Localization.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "RobloxClassic"
    });
    v23.analytics = l_ContextServices_0.Analytics.new(v16);
    if l_ImprovePluginSpeed_RobloxClassic_0 then
        v23:initToolbarAndButton(v24);
    end;
end;
v20.renderButtons = function(v28, v29)
    assert(not l_ImprovePluginSpeed_RobloxClassic_0);
    return {
        Toggle = v3.createElement(l_PluginButton_0, {
            Toolbar = v29,
            Active = v28.state.enabled,
            Id = "RobloxClassicButton",
            Title = v28.localization:getText("Plugin", "Button"),
            Tooltip = v28.localization:getText("Plugin", "Description"),
            Icon = "rbxasset://textures/AnimationEditor/rigbuilder_blue.png",
            OnClick = v28.toggleEnabled,
            ClickableWhenViewportHidden = true
        })
    };
end;
v20.render = function(v30)
    local l_props_0 = v30.props;
    local l_state_0 = v30.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(v30.store),
        l_Mouse_0.new(l_Plugin_1:getMouse()),
        v15(),
        v30.localization,
        v30.analytics
    }, {
        Toolbar = if l_ImprovePluginSpeed_RobloxClassic_0 then nil else v3.createElement(l_PluginToolbar_0, {
            Title = "AvatarUnification",
            RenderButtons = function(v35)
                return v30:renderButtons(v35);
            end
        }),
        MainWidget = if not l_ImprovePluginSpeed_RobloxClassic_0 then v3.createElement(l_DockWidget_0, {
            Id = if not l_StudioFixPluginWidgetLocalizedIds_0 then nil else "RobloxClassic",
            Enabled = l_enabled_0,
            Title = v30.localization:getText("Plugin", "Name"),
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            InitialDockState = Enum.InitialDockState.Bottom,
            Size = Vector2.new(640, 480),
            MinSize = Vector2.new(250, 200),
            OnClose = v30.onClose,
            ShouldRestore = true,
            OnWidgetRestored = v30.onRestore,
            [v3.Change.Enabled] = v30.onWidgetEnabledChanged
        }, {
            MainView = l_enabled_0 and v3.createElement(v19)
        }) else v3.createElement(l_DockWidget_0, {
            Id = if not l_StudioFixPluginWidgetLocalizedIds_0 then nil else "RobloxClassic",
            Enabled = l_enabled_0,
            Title = v30.localization:getText("Plugin", "Name"),
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            OnClose = v30.onClose,
            ShouldRestore = true,
            Widget = l_props_0.PluginLoaderContext.mainDockWidget,
            OnWidgetRestored = v30.onRestore,
            [v3.Change.Enabled] = v30.onWidgetEnabledChanged
        }, {
            MainView = l_enabled_0 and v3.createElement(v19)
        })
    });
end;
if l_ImprovePluginSpeed_RobloxClassic_0 then
    v20.didUpdate = function(v36)
        v36.mainButton:SetActive(v36.state.enabled);
    end;
end;
return v20;


local v0 = {};
local l_InsertService_0 = game:GetService("InsertService");
local l_CollectionService_0 = game:GetService("CollectionService");
local l_ReplicatedStorage_0 = game:GetService("ReplicatedStorage");
local v4 = require(script.Parent.Parent.Parent.Src.Util.findAllInServices);
local v5 = {
    RobloxClassic_SetupPhysicsParts = {
        "ModuleScript",
        "SetupPhysicsParts.lua"
    },
    RobloxClassic_UnificationScale = {
        "ModuleScript",
        "UnificationScale.lua"
    }
};
local v6 = {
    RobloxClassic_ServerScript = {
        "Script",
        "RobloxClassicServerScript.lua"
    },
    Animate = {
        "LocalScript",
        "humanoidClassicAnimate.lua"
    }
};
local function v12(v7, v8, v9, v10)
    if not (v7 == "Animate") or not v10:FindFirstChild(v7) then
        local v11 = Instance.new(v8);
        v11.Name = v7;
        v11.Source = l_InsertService_0:GetLocalFileContents("rbxasset://avatar/unification/" .. v9);
        v11.Parent = v10;
        l_CollectionService_0:AddTag(v11, "RobloxClassicCollectionTag");
        return false;
    else
        return true;
    end;
end;
v0.GetNpcs = function()
    return v4(function(v13)
        if not v13:IsA("Model") then
            return false;
        else
            local l_Humanoid_0 = v13:FindFirstChildOfClass("Humanoid");
            if l_Humanoid_0 then
                return l_Humanoid_0.RigType == Enum.HumanoidRigType.R15;
            else
                return false;
            end;
        end;
    end);
end;
v0.DoClassicScriptsExist = function(v15, v16)
    for v17, _ in v6, nil, nil do
        local l_v15_FirstChild_0 = v15:FindFirstChild(v17);
        if not (not l_v15_FirstChild_0 or not l_v15_FirstChild_0:IsA("LuaSourceContainer")) then
            if v17 == "Animate" then
                warn(string.format(v16:getText("InsertComponents", "AnimateExists"), v15.Name));
            else
                return true;
            end;
        end;
    end;
    return false;
end;
v0.InsertComponents = function(v20, _, v22)
    if v22 then
        local v23 = Instance.new("Folder", l_ReplicatedStorage_0);
        v23.Name = "RobloxClassic";
        l_CollectionService_0:AddTag(v23, "RobloxClassicCollectionTag");
        for v24, v25 in v5, nil, nil do
            v12(v24, v25[1], v25[2], v23);
        end;
    end;
    local v26 = false;
    for v27, v28 in v6, nil, nil do
        local v29 = v12(v27, v28[1], v28[2], v20);
        if not (v26 or not v29) then
            v26 = true;
        end;
    end;
    if not v26 then
        local l_Animate_0 = v20:FindFirstChild("Animate");
        for _, v32 in l_InsertService_0:LoadLocalAsset("rbxasset://avatar/unification/humanoidClassicAnimateDefaultChildren.rbxm"):GetChildren() do
            v32.Parent = l_Animate_0;
        end;
    end;
    l_InsertService_0:LoadLocalAsset("rbxasset://avatar/unification/PhysicsReference.rbxm").Parent = v20:FindFirstChild("RobloxClassic_ServerScript");
end;
v0.RemoveComponents = function(v33)
    local l_l_CollectionService_0_Tagged_0 = l_CollectionService_0:GetTagged("RobloxClassicCollectionTag");
    if next(l_l_CollectionService_0_Tagged_0) == nil then
        warn(v33:getText("RemoveComponents", "NotExist"));
        return ;
    else
        for _, v36 in l_l_CollectionService_0_Tagged_0, nil, nil do
            v36:Destroy();
        end;
        print(string.format(v33:getText("RemoveComponents", "Removed")));
        return ;
    end;
end;
v0.FindInstanceFromFullName = function(v37, v38)
    local v39 = v37:split(".");
    local v40 = v38 or game;
    local v41 = 1;
    if v38 then
        for v42, v43 in v39, nil, nil do
            if v43 == v38.Name then
                v41 = v42 + 1;
            end;
        end;
    end;
    for v44 = v41, #v39 do
        v40 = v40[v39[v44]];
        if not v40 then
            return nil;
        end;
    end;
    return v40;
end;
v0.UpdateModel = function(v45, v46)
    if not v0.DoClassicScriptsExist(v45, v46) then
        v0.InsertComponents(v45, v46, false);
        return ;
    else
        warn(string.format(v46:getText("InsertComponents", "AlreadyExist"), v45.Name));
        return ;
    end;
end;
return v0;


local l_Style_0 = require(script.Parent.Parent.Parent.Packages.Framework).Style;
local l_StudioTheme_0 = l_Style_0.Themes.StudioTheme;
local l_ComponentSymbols_0 = l_Style_0.ComponentSymbols;
l_ComponentSymbols_0:add("LabeledToggleButton");
local v3 = {
    PaddingPx = 10,
    PrimaryButtonSize = UDim2.new(0, 160, 0, 32),
    UIGridCellSize = UDim2.fromOffset(150, 30),
    UIGridHeightPx = 200,
    UIGridPadding = UDim2.fromOffset(20, 2),
    UIGridTopMarginPx = 30,
    UIGroupWidthPx = 200,
    UIHeightPx = 300,
    [l_ComponentSymbols_0.LabeledToggleButton] = {
        ComponentSize = UDim2.new(0, 150, 0, 30),
        ToggleSize = UDim2.fromOffset(40, 24),
        LeftInsetPx = 12,
        PaddingPx = 10
    }
};
return function(v4)
    local _ = nil;
    return (if not v4 then l_StudioTheme_0.new() else l_StudioTheme_0.mock()):extend(v3);
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
local v2 = require(l_Parent_0.Src.Util.DebugFlags);
local l_HttpService_0 = game:GetService("HttpService");
return function(v4)
    local function v8(v5, v6)
        local v7 = v1.Dictionary.join({
            studioSid = v4:GetSessionId(),
            clientId = v4:GetClientId(),
            placeId = game.PlaceId
        }, v6 or {});
        if v2.LogAnalytics() then
            print(("%s SendEvent eventName=%s args=%s"):format("RobloxClassic", tostring(v5), l_HttpService_0:JSONEncode(v7)));
        end;
        v4:SendEventDeferred("studio", "RobloxClassic", v5, v7);
    end;
    local function _(v9, v10)
        v10 = v10 or 1;
        if v2.LogAnalytics() then
            print(("%s ReportCounter counterName=%s count=%s"):format("RobloxClassic", tostring(v9), (tostring(v10))));
        end;
        v4:ReportCounter(v9, v10);
    end;
    local function _(v12, v13, v14)
        v13 = v13 or {};
        if v2.LogAnalytics() then
            print(("%s SendEvent eventName=%s args=%s throttlingPercent=%s"):format("RobloxClassic", tostring(v12), l_HttpService_0:JSONEncode(v13), (tostring(v14))));
        end;
        v4:ReportInfluxSeries(v12, v13, v14);
    end;
    return {
        classicPluginFlipped = function(_, v17)
            v8("RobloxClassicPluginFlipped", v17);
        end
    };
end;


local l_Workspace_0 = game:GetService("Workspace");
local v1 = require(script.Parent.hasInternalPermission)();
local v2 = pcall(function()
    return game:GetService("ProcessService");
end);
local function _(v3, v4)
    v4 = v4 or false;
    return function()
        local l_RobloxClassicFlags_0 = l_Workspace_0:FindFirstChild("RobloxClassicFlags");
        if l_RobloxClassicFlags_0 and l_RobloxClassicFlags_0:FindFirstChild(v3) then
            return l_RobloxClassicFlags_0[v3].Value;
        else
            return v4;
        end;
    end;
end;
local v7 = {};
local v8 = v2 or false;
local v9 = "RunningUnderCLI";
local l_v9_0 = v9 --[[ copy: 7 -> 8 ]];
local v11;
do
    local l_v8_0 = v8;
    v11 = function()
        local l_RobloxClassicFlags_1 = l_Workspace_0:FindFirstChild("RobloxClassicFlags");
        if l_RobloxClassicFlags_1 and l_RobloxClassicFlags_1:FindFirstChild(l_v9_0) then
            return l_RobloxClassicFlags_1[l_v9_0].Value;
        else
            return l_v8_0;
        end;
    end;
end;
v7.RunningUnderCLI = v11;
v8 = nil or false;
v9 = "RunTests";
local l_v9_1 = v9 --[[ copy: 7 -> 9 ]];
do
    local l_v8_1 = v8;
    v11 = function()
        local l_RobloxClassicFlags_2 = l_Workspace_0:FindFirstChild("RobloxClassicFlags");
        if l_RobloxClassicFlags_2 and l_RobloxClassicFlags_2:FindFirstChild(l_v9_1) then
            return l_RobloxClassicFlags_2[l_v9_1].Value;
        else
            return l_v8_1;
        end;
    end;
end;
v7.RunTests = v11;
v8 = nil or false;
v9 = "LogTestsQuiet";
local l_v9_2 = v9 --[[ copy: 7 -> 10 ]];
do
    local l_v8_2 = v8;
    v11 = function()
        local l_RobloxClassicFlags_3 = l_Workspace_0:FindFirstChild("RobloxClassicFlags");
        if l_RobloxClassicFlags_3 and l_RobloxClassicFlags_3:FindFirstChild(l_v9_2) then
            return l_RobloxClassicFlags_3[l_v9_2].Value;
        else
            return l_v8_2;
        end;
    end;
end;
v7.LogTestsQuiet = v11;
v8 = nil or false;
v9 = "LogAnalytics";
local l_v9_3 = v9 --[[ copy: 7 -> 11 ]];
do
    local l_v8_3 = v8;
    v11 = function()
        local l_RobloxClassicFlags_4 = l_Workspace_0:FindFirstChild("RobloxClassicFlags");
        if l_RobloxClassicFlags_4 and l_RobloxClassicFlags_4:FindFirstChild(l_v9_3) then
            return l_RobloxClassicFlags_4[l_v9_3].Value;
        else
            return l_v8_3;
        end;
    end;
end;
v7.LogAnalytics = v11;
v8 = nil or false;
v9 = "RunDeveloperFrameworkTests";
local l_v9_4 = v9 --[[ copy: 7 -> 12 ]];
do
    local l_v8_4 = v8;
    v11 = function()
        local l_RobloxClassicFlags_5 = l_Workspace_0:FindFirstChild("RobloxClassicFlags");
        if l_RobloxClassicFlags_5 and l_RobloxClassicFlags_5:FindFirstChild(l_v9_4) then
            return l_RobloxClassicFlags_5[l_v9_4].Value;
        else
            return l_v8_4;
        end;
    end;
end;
v7.RunDeveloperFrameworkTests = v11;
v8 = (v7.RunTests() or v1) or false;
v9 = "EnableRoactConfigs";
do
    local l_v8_5 = v8;
    v11 = function()
        local l_RobloxClassicFlags_6 = l_Workspace_0:FindFirstChild("RobloxClassicFlags");
        if l_RobloxClassicFlags_6 and l_RobloxClassicFlags_6:FindFirstChild(v9) then
            return l_RobloxClassicFlags_6[v9].Value;
        else
            return l_v8_5;
        end;
    end;
end;
v7.EnableRoactConfigs = v11;
return v7;


local v0 = {
    game:GetService("Chat"),
    game:GetService("Lighting"),
    game:GetService("ReplicatedFirst"),
    game:GetService("ReplicatedStorage"),
    game:GetService("ServerScriptService"),
    game:GetService("ServerStorage"),
    game:GetService("StarterGui"),
    game:GetService("StarterPack"),
    game:GetService("StarterPlayer"),
    game:GetService("Workspace")
};
return function(v1)
    local v2 = {};
    for _, v4 in v0, nil, nil do
        for _, v6 in v4:GetDescendants() do
            if not (v1 and not v1(v6)) then
                table.insert(v2, v6);
            end;
        end;
    end;
    return v2;
end;


local v0 = require(script.Parent.Parent.Parent.Src.Modules.NpcManager);
return function(v1)
    print(v1:getText("InsertComponents", "AddingNPCs"));
    local v2 = v0.GetNpcs();
    local l_BindableEvent_0 = Instance.new("BindableEvent");
    local v4 = 0 + 1;
    for _, v6 in v2, nil, nil do
        task.delay(0, function()
            v0.UpdateModel(v6, v1);
            v4 = v4 - 1;
            if v4 == 0 then
                l_BindableEvent_0:Fire();
            end;
        end);
    end;
    l_BindableEvent_0.Event:Wait();
end;


return function()
    if not require(script.Parent.DebugFlags).RunningUnderCLI() then
        if game:GetFastFlag("DebugRobloxClassicPlugin") then
            return true;
        else
            return ;
        end;
    else
        return false;
    end;
end;


if game:GetService("StudioService"):HasInternalPermission() then
    require(script.Parent.defineLuaFlags);
    if plugin then
        local l_Parent_0 = script.Parent.Parent;
        local v1 = require(l_Parent_0.Packages.TestLoader);
        v1.launch("RoduxDevtools", l_Parent_0.Src);
        if not v1.isCli() then
            if game:GetFastFlag("EnableRoduxDevtools") then
                local v2 = require(l_Parent_0.Packages.React);
                local v3 = require(l_Parent_0.Packages.ReactRoblox);
                local v4 = require(l_Parent_0.Src.MainPlugin);
                local v5 = nil;
                local function v7()
                    plugin.Name = l_Parent_0.Name;
                    local v6 = v2.createElement(v4, {
                        Plugin = plugin
                    });
                    v5 = v3.createRoot(Instance.new("Frame"));
                    v5:render(v6);
                end;
                plugin.Unloading:Connect(function()
                    if v5 then
                        v5:render(nil);
                        v5 = nil;
                    end;
                end);
                v7();
                return ;
            else
                return ;
            end;
        else
            return ;
        end;
    else
        return ;
    end;
else
    return ;
end;


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "table", string.format("Expected args to be a table, received %s", (type(v0))));
    return {
        events = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "string", string.format("Expected searchTerm to be a string, received %s", (type(v0))));
    return {
        searchTerm = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "number", string.format("Expected selectedIndex to be a number, received %s", (type(v0))));
    return {
        selectedIndex = v0
    };
end);


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local v2 = require(l_Parent_0.Packages.Framework);
local v3 = require(l_Parent_0.Packages.Dash);
local l_SplitPane_0 = v2.UI.SplitPane;
return v1.memo(function(v5)
    local v6, v7 = v1.useState(v5.InitialSizes);
    return v1.createElement(l_SplitPane_0, v3.join({
        Sizes = v6,
        OnSizesChange = v7,
        MinSizes = v5.MinSizes
    }, v5));
end);


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_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_TextLabel_0 = l_UI_0.TextLabel;
local l_IconButton_0 = l_UI_0.IconButton;
local l_ExpandablePane_0 = l_UI_0.ExpandablePane;
local l_Separator_0 = l_UI_0.Separator;
local l_ScrollingFrame_0 = l_UI_0.ScrollingFrame;
local v16 = require(script.Parent.Parent.LongText);
local v17 = require(script.Parent.Parent.Parent.Util.counter)();
local function v25(v18)
    local v19 = string.split(v18, "\n");
    local v20 = {};
    local v21 = v19[1];
    local v22 = 0;
    for _, v24 in v19, nil, nil do
        if v21 == v24 then
            v22 = v22 + 1;
        else
            table.insert(v20, v21 .. if v22 > 1 then " (x" .. v22 .. ")" else "");
            v21 = v24;
            v22 = 1;
        end;
    end;
    table.insert(v20, v21 .. if v22 > 1 then " (x" .. v22 .. ")" else "");
    return table.concat(v20, "\n");
end;
local function v27(v26)
    return v2.createElement("Frame", {
        Size = v26.Size,
        LayoutOrder = v26.LayoutOrder,
        BackgroundTransparency = 1
    }, {
        Layout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            HorizontalAlignment = Enum.HorizontalAlignment.Right,
            Padding = UDim.new(0, 8)
        }),
        Prev = v2.createElement(l_IconButton_0, {
            LayoutOrder = 1,
            Size = UDim2.fromOffset(24, 24),
            Disabled = v26.current <= 1,
            LeftIcon = "rbxasset://textures/DeveloperFramework/PageNavigation/button_control_previous.png",
            IconSize = 24,
            OnClick = v26.onPrev
        }),
        TextLabel = v2.createElement(l_TextLabel_0, {
            LayoutOrder = 2,
            AutomaticSize = Enum.AutomaticSize.X,
            Size = UDim2.new(0, 50, 1, 0),
            Text = ("%*/%*"):format(math.clamp(v26.current, 0, v26.total), v26.total)
        }),
        Next = v2.createElement(l_IconButton_0, {
            LayoutOrder = 3,
            Size = UDim2.fromOffset(24, 24),
            Disabled = v26.total <= v26.current,
            LeftIcon = "rbxasset://textures/DeveloperFramework/PageNavigation/button_control_next.png",
            IconSize = 24,
            OnClick = v26.onNext
        })
    });
end;
local v28 = v2.PureComponent:extend("FlushDetails");
v28.init = function(v29)
    v29:setState({
        listenerIndex = 1,
        summaryExpanded = true,
        consumersExpanded = true,
        pageHeight = 500,
        summaryHeight = 32
    });
    v29.onPrevListener = function()
        local l_Event_0 = v29.props.Event;
        if l_Event_0 then
            v29:setState(function(v31)
                return {
                    listenerIndex = math.clamp(v31.listenerIndex - 1, 1, l_Event_0.props.listenerCount)
                };
            end);
            return ;
        else
            return ;
        end;
    end;
    v29.onNextListener = function()
        local l_Event_1 = v29.props.Event;
        if l_Event_1 then
            v29:setState(function(v33)
                return {
                    listenerIndex = math.clamp(v33.listenerIndex + 1, 1, l_Event_1.props.listenerCount)
                };
            end);
            return ;
        else
            return ;
        end;
    end;
end;
v28.didUpdate = function(v34, v35)
    if v34.props.Event ~= v35.Event then
        v34:setState({
            listenerIndex = 1
        });
    end;
end;
v28.render = function(v36)
    local l_Event_2 = v36.props.Event;
    if l_Event_2 then
        local l_props_0 = l_Event_2.props;
        local v39 = nil;
        if not l_Event_2.isStub then
            local v40 = if not l_props_0.listeners then nil else l_props_0.listeners[v36.state.listenerIndex];
            v39 = if not v40 then v36.props.Localization:getText("FlushDetails", "NoTraceback") else if v40.connectTraceback then v25(v40.connectTraceback) else debug.info(v40.callback, "snl");
        else
            v39 = v36.props.Localization:getText("Common", "LoadingStub");
            l_props_0.listenerCount = 0;
        end;
        return v2.createElement(l_Pane_0, {
            [v2.Change.AbsoluteSize] = function(v41)
                v36:setState({
                    pageHeight = v41.AbsoluteSize.Y
                });
            end
        }, {
            FlushDetails = v2.createElement(l_ScrollingFrame_0, {
                Size = UDim2.fromScale(1, 1),
                AutomaticCanvasSize = Enum.AutomaticSize.Y,
                Layout = Enum.FillDirection.Vertical,
                Spacing = UDim.new(0, 5)
            }, {
                SummaryInfo = v2.createElement(l_ExpandablePane_0, {
                    Style = "Section",
                    LayoutOrder = v17(),
                    Size = UDim2.new(1, 0, 0, 32),
                    Text = v36.props.Localization:getText("FlushDetails", "SummaryTitle"),
                    ContentPadding = 5,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    Expanded = v36.state.summaryExpanded,
                    OnExpandedChanged = function()
                        v36:setState(function(v42)
                            return {
                                summaryExpanded = not v42.summaryExpanded,
                                summaryHeight = if not v42.summaryExpanded then nil else 85
                            };
                        end);
                    end
                }, {
                    v2.createElement(l_TextLabel_0, {
                        Size = UDim2.new(1, 0, 0, 0),
                        AutomaticSize = Enum.AutomaticSize.Y,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextWrapped = true,
                        Text = if not l_Event_2.isStub then v36.props.Localization:getText("FlushDetails", "Summary", {
                            count = l_props_0.listenerCount,
                            elapsed = l_props_0.elapsedMs,
                            timestamp = DateTime.fromUnixTimestampMillis(l_Event_2.timestamp):FormatLocalTime("h:mm:ss.SSS a", "en-us"),
                            source = l_Event_2.source
                        }) else v36.props.Localization:getText("Common", "LoadingStub"),
                        [v2.Change.AbsoluteSize] = function(v43)
                            v36:setState({
                                summaryHeight = (v43.AbsoluteSize.Y + v43.AbsolutePosition.Y) + 15
                            });
                        end
                    })
                }),
                SummarySeparator = v2.createElement(l_Separator_0, {
                    LayoutOrder = v17()
                }),
                ConsumersInfo = v2.createElement(l_ExpandablePane_0, {
                    Style = "Section",
                    LayoutOrder = v17(),
                    Size = UDim2.new(1, 0, 0, 32),
                    Text = v36.props.Localization:getText("FlushDetails", "ConsumersTitle"),
                    ContentPadding = 5,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    HeaderComponent = v27,
                    HeaderComponentProps = {
                        current = v36.state.listenerIndex,
                        total = l_props_0.listenerCount,
                        onPrev = v36.onPrevListener,
                        onNext = v36.onNextListener
                    },
                    Expanded = v36.state.consumersExpanded,
                    OnExpandedChanged = function()
                        v36:setState(function(v44)
                            return {
                                consumersExpanded = not v44.consumersExpanded
                            };
                        end);
                    end
                }, {
                    StackLabel = v2.createElement(v16, {
                        MaxHeight = v36.state.pageHeight - v36.state.summaryHeight,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextYAlignment = Enum.TextYAlignment.Top,
                        Font = Enum.Font.RobotoMono,
                        Text = v39
                    })
                })
            })
        });
    else
        return nil;
    end;
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v28));