local l_RunService_0 = game:GetService("RunService");
local l_Workspace_0 = game:GetService("Workspace");
local l_ServerStorage_0 = game:GetService("ServerStorage");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v4 = require(l_script_FirstAncestor_0.Packages.Roact);
local _ = require(l_script_FirstAncestor_0.Packages.Cryo);
local v6 = require(l_script_FirstAncestor_0.Packages.Framework);
local v7 = require(l_script_FirstAncestor_0.Packages.Thumbnailing);
local l_CharacterUtility_0 = v7.CharacterUtility;
local l_CFrameUtility_0 = v7.CFrameUtility;
local _ = require(l_script_FirstAncestor_0.Src.Types);
local _ = v6.Util.Math;
local _ = require(l_script_FirstAncestor_0.Src.Util.buildHierarchy);
local _ = require(l_script_FirstAncestor_0.Src.Util.AnimationData);
local v14 = require(l_script_FirstAncestor_0.Src.Util.KeyframeUtils);
local _ = require(l_script_FirstAncestor_0.Src.Util.TrackUtils);
local _ = require(l_script_FirstAncestor_0.Src.Util.Adorn);
local _ = require(l_script_FirstAncestor_0.Src.Util.Templates);
local v18 = require(l_script_FirstAncestor_0.Src.Util.RigInfo);
local v19 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v20 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagAnimationConstraints);
local v21 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagRigIK);
local v22 = {};
if not v21() then
    v22.buildR15Constraints = function(v23)
        local v24 = v18.getRigInfo(v23);
        local l_PartNameToMotor_0 = v24.PartNameToMotor;
        local l_PartNameToAnimConstraint_0 = v24.PartNameToAnimConstraint;
        local v27 = {};
        for v28, v29 in pairs(v19.PartToConstraintConfigMap) do
            local v30 = {};
            if not (v20() and not l_PartNameToMotor_0[v28]) then
                local v31, v32 = v22.findMatchingAttachments(l_PartNameToMotor_0[v28].Part0, l_PartNameToMotor_0[v28].Part1);
                v30.Attachment0 = v31;
                v30.Attachment1 = v32;
            end;
            if not ((not v20() or not l_PartNameToAnimConstraint_0) or not l_PartNameToAnimConstraint_0[v28]) then
                local v33, v34 = v22.findMatchingAttachments(v18.getPart0(l_PartNameToAnimConstraint_0[v28]), v18.getPart1(l_PartNameToAnimConstraint_0[v28]));
                v30.Attachment0 = v33;
                v30.Attachment1 = v34;
            end;
            local v35 = string.gsub(v30.Attachment0.Name, "Attachment", "");
            if v29.LowerAngle ~= nil then
                v30.LowerAngle = v29.LowerAngle;
            end;
            if v29.TwistLimitsEnabled ~= nil then
                v30.TwistLimitsEnabled = v29.TwistLimitsEnabled;
                v30.TwistUpperAngle = v29.TwistUpperAngle;
                v30.TwistLowerAngle = v29.TwistLowerAngle;
            end;
            v30.Restitution = v29.Restitution;
            v30.LimitsEnabled = v29.LimitsEnabled;
            v30.UpperAngle = v29.UpperAngle;
            v30.Enabled = false;
            v27[v35] = {
                Type = v29.Type,
                Props = v30
            };
        end;
        return v27;
    end;
    v22.findMatchingAttachments = function(v36, v37)
        if not (not v36 or not v37) then
            for _, v39 in ipairs(v36:GetChildren()) do
                if v39:IsA("Attachment") then
                    local l_v37_FirstChild_0 = v37:FindFirstChild(v39.Name);
                    if l_v37_FirstChild_0 then
                        return v39, l_v37_FirstChild_0;
                    end;
                end;
            end;
        end;
    end;
    v22.canUseIK = function(v41)
        if v41 then
            local v42 = v18.getRigInfo(v41);
            local l_PartNameToMotor_1 = v42.PartNameToMotor;
            local l_PartNameToConstraint_0 = v42.PartNameToConstraint;
            local l_PartNameToAnimConstraint_1 = v42.PartNameToAnimConstraint;
            if next(l_PartNameToConstraint_0) ~= nil then
                return true, v18.usingTemporaryConstraints();
            else
                for v46, v47 in pairs(v19.R15links) do
                    local v48 = l_PartNameToMotor_1[v46];
                    local v49 = if not not v20() and l_PartNameToAnimConstraint_1 then l_PartNameToAnimConstraint_1[v46] else nil;
                    if not v48 and (not v20() or not v49) then
                        return false, false;
                    else
                        local v50, v51 = v22.findMatchingAttachments(v41:FindFirstChild(v46), v41:FindFirstChild(v47));
                        local v52 = if not v20() then nil else v18.getPart0(v49);
                        if not ((v50 ~= nil and v51 ~= nil) and (not v48 or v48.Part0.Name == v47)) or not (not v20() or not v52) and v52.Name ~= v47 then
                            return false, false;
                        end;
                    end;
                end;
                return true, true;
            end;
        else
            return false, false;
        end;
    end;
end;
v22.canUseFaceControlsEditor = function(v53)
    if v53 then
        if v53:FindFirstChildOfClass("Humanoid") then
            if v18.getFaceControls(v53) == nil then
                return false;
            else
                return true;
            end;
        else
            return false;
        end;
    else
        return false;
    end;
end;
v22.getJoints = function(v54, v55)
    local v56 = {};
    local v57 = v18.getRigInfo(v55);
    local l_PartNameToMotor_2 = v57.PartNameToMotor;
    local l_PartNameToAnimConstraint_2 = v57.PartNameToAnimConstraint;
    local l_BoneNameToBone_0 = v57.BoneNameToBone;
    for _, v62 in ipairs(v54) do
        local l_Name_0 = v62.Name;
        if not l_PartNameToMotor_2[l_Name_0] then
            if not l_BoneNameToBone_0[l_Name_0] then
                if v20() then
                    local v64 = l_PartNameToAnimConstraint_2[l_Name_0];
                    if not ((not v64 or not v64.Attachment0) or not v64.Attachment1) then
                        table.insert(v56, {
                            Type = v19.JOINT_TYPES.AnimationConstraint,
                            Part0 = v18.getPart0(v64),
                            Part1 = v18.getPart1(v64),
                            C0 = v64.Attachment0.CFrame,
                            C1 = v64.Attachment1.CFrame
                        });
                    end;
                end;
            else
                table.insert(v56, {
                    Type = v19.JOINT_TYPES.Bone,
                    Bone = l_BoneNameToBone_0[l_Name_0]
                });
            end;
        else
            table.insert(v56, {
                Type = v19.JOINT_TYPES.Motor6D,
                Part0 = l_PartNameToMotor_2[l_Name_0].Part0,
                Part1 = l_PartNameToMotor_2[l_Name_0].Part1,
                C0 = l_PartNameToMotor_2[l_Name_0].C0,
                C1 = l_PartNameToMotor_2[l_Name_0].C1
            });
        end;
    end;
    return v56;
end;
if not v21() then
    local function v74(v65, v66)
        local v67 = {};
        for _, v69 in pairs(v65) do
            v67[v69.Part0] = v69.Part0.CFrame;
            v67[v69.Part1] = v69.Part1.CFrame;
        end;
        if v20() then
            for _, v71 in v66, nil, nil do
                local v72 = v18.getPart0(v71.OriginalData);
                local v73 = v18.getPart1(v71.OriginalData);
                v67[v72] = v72.CFrame;
                v67[v73] = v73.CFrame;
            end;
        end;
        return v67;
    end;
    local function _(v75)
        local l_Motor6D_0 = Instance.new("Motor6D");
        l_Motor6D_0.Name = v75.Name;
        l_Motor6D_0.Part0 = v75.Part0;
        l_Motor6D_0.Part1 = v75.Part1;
        l_Motor6D_0.C0 = v75.C0;
        l_Motor6D_0.C1 = v75.C1;
        l_Motor6D_0.Parent = v75.Parent;
    end;
    local function _(v78)
        v78.OriginalData.Parent = v78.Parent;
    end;
    local function _(v80, v81, v82, v83)
        return ((v82:inverse() * v80:inverse()) * v81) * v83;
    end;
    local function _(v85, v86)
        return ((v85.C0:inverse() * v86[v85.Part0]:inverse()) * v86[v85.Part1]) * v85.C1;
    end;
    local function _(v88, v89)
        return ((v88.OriginalData.Attachment0.CFrame:inverse() * v89[v18.getPart0(v88.OriginalData)]:inverse()) * v89[v18.getPart1(v88.OriginalData)]) * v88.OriginalData.Attachment1.CFrame;
    end;
    v22.getJointTransform = function(v91)
        return ((v91.C0:inverse() * v91.Part0.CFrame:inverse()) * v91.Part1.CFrame) * v91.C1;
    end;
    local function v103(v92, v93, v94, v95)
        local l_PartNameToConstraint_1 = v18.getRigInfo(v92).PartNameToConstraint;
        for v97, v98 in pairs(v94) do
            if l_PartNameToConstraint_1[v97.Name] ~= nil then
                l_PartNameToConstraint_1[v97.Name].Enabled = false;
            end;
            v97.Anchored = false;
            local v99 = v98.Attachments or {};
            for _, v101 in v99, nil, nil do
                local l_v97_FirstChild_0 = v97:FindFirstChild(v101.Name);
                if l_v97_FirstChild_0 then
                    l_v97_FirstChild_0.Axis = v101.Axis;
                    l_v97_FirstChild_0.SecondaryAxis = v101.SecondaryAxis;
                end;
            end;
            v99 = Instance.new("Motor6D");
            v99.Name = v98.Name;
            v99.Part0 = v98.Part0;
            v99.Part1 = v98.Part1;
            v99.C0 = v98.C0;
            v99.C1 = v98.C1;
            v99.Parent = v98.Parent;
            v95[v97.Name] = ((v98.C0:inverse() * v93[v98.Part0]:inverse()) * v93[v98.Part1]) * v98.C1;
        end;
    end;
    local function v123(v104, v105, v106, v107, v108)
        local l_PartNameToConstraint_2 = v18.getRigInfo(v104).PartNameToConstraint;
        local function v117(v110, v111, _)
            if l_PartNameToConstraint_2[v110.Name] ~= nil then
                l_PartNameToConstraint_2[v110.Name].Enabled = false;
            end;
            v110.Anchored = false;
            local v113 = v111.Attachments or {};
            for _, v115 in v113, nil, nil do
                local l_v110_FirstChild_0 = v110:FindFirstChild(v115.Name);
                if l_v110_FirstChild_0 then
                    l_v110_FirstChild_0.Axis = v115.Axis;
                    l_v110_FirstChild_0.SecondaryAxis = v115.SecondaryAxis;
                end;
            end;
        end;
        for v118, v119 in pairs(v106) do
            v117(v118, v119);
            local l_Motor6D_1 = Instance.new("Motor6D");
            l_Motor6D_1.Name = v119.Name;
            l_Motor6D_1.Part0 = v119.Part0;
            l_Motor6D_1.Part1 = v119.Part1;
            l_Motor6D_1.C0 = v119.C0;
            l_Motor6D_1.C1 = v119.C1;
            l_Motor6D_1.Parent = v119.Parent;
            v108[v118.Name] = ((v119.C0:inverse() * v105[v119.Part0]:inverse()) * v105[v119.Part1]) * v119.C1;
        end;
        for v121, v122 in pairs(v107) do
            v117(v121, v122);
            v122.OriginalData.Parent = v122.Parent;
            v108[v121.Name] = ((v122.OriginalData.Attachment0.CFrame:inverse() * v105[v18.getPart0(v122.OriginalData)]:inverse()) * v105[v18.getPart1(v122.OriginalData)]) * v122.OriginalData.Attachment1.CFrame;
        end;
    end;
    v22.ikDragEnd = function(v124, v125, v126)
        local v127 = {};
        local v128 = v74(v125, v126);
        if not v20() then
            v103(v124, v128, v125, v127);
        else
            v123(v124, v128, v125, v126, v127);
        end;
        v18.findRootPart(v124).Anchored = true;
        v18.clearCache();
        return v127;
    end;
    local function v133(v129, v130, v131)
        if not (not v129 or not v130) then
            v131[v129] = {
                Name = v130.Name,
                Parent = v130.Parent,
                Part0 = v130.Part0,
                Part1 = v130.Part1,
                C0 = v130.C0,
                C1 = v130.C1
            };
            local l_CFrame_0 = v129.CFrame;
            v130:Destroy();
            v129.CFrame = l_CFrame_0;
        end;
    end;
    local function _(v134, v135, v136)
        if not (not v134 or not v135) then
            v136[v134] = {
                OriginalData = v135,
                Parent = v135.Parent
            };
            local l_CFrame_1 = v134.CFrame;
            v135.Parent = nil;
            v134.CFrame = l_CFrame_1;
        end;
    end;
    local function _(v139, v140, v141)
        if v139 then
            local v142 = v139[v141.Name];
            if v142 then
                return v142.Part0;
            end;
        end;
        if not (not v20() or not v140) then
            local v143 = v140[v141.Name];
            if v143 then
                return v18.getPart0(v143);
            end;
        end;
    end;
    local function _(v145, v146, v147)
        local l_v147_0 = v147;
        local v149 = -1;
        while l_v147_0 ~= nil do
            local l_l_v147_0_0 = l_v147_0;
            if v145 then
                local v151 = v145[l_l_v147_0_0.Name];
                if v151 then
                    l_v147_0 = v151.Part0;
                    goto label0 --[[  true, true  ]];
                end;
            end;
            if not (not v20() or not v146) then
                local v152 = v146[l_l_v147_0_0.Name];
                if v152 then
                    l_v147_0 = v18.getPart0(v152);
                    goto label0 --[[  true, true  ]];
                end;
            end;
            l_v147_0 = nil;
            ::label0::;
            v149 = v149 + 1;
        end;
        return v149;
    end;
    v22.pinForLimbMode = function(v154, v155, v156)
        local v157 = {};
        local v158 = v155[v19.R15_PARTS.UpperTorso];
        local v159 = v155[v19.R15_PARTS.LowerTorso];
        local v160 = v155[v19.R15_PARTS.LeftFoot];
        local v161 = v155[v19.R15_PARTS.RightFoot];
        if not (not v158 or not v159) then
            if v154 ~= v158.Part1 and v154 ~= v159.Part1 then
                v157[v158.Part1] = true;
                v157[v159.Part1] = true;
            elseif not (not v160 or not v161) then
                v157[v160.Part1] = true;
                v157[v161.Part1] = true;
            end;
        end;
        if not (not v20() or not v156) then
            local v162 = v156[v19.R15_PARTS.UpperTorso];
            local v163 = v156[v19.R15_PARTS.LowerTorso];
            if not (not v162 or not v163) then
                local v164 = v18.getPart1(v162);
                local v165 = v18.getPart1(v163);
                if v154 ~= v164 and v154 ~= v165 then
                    if not (not v164 or not v165) then
                        v157[v164] = true;
                        v157[v165] = true;
                        return v157;
                    end;
                else
                    local v166 = v156[v19.R15_PARTS.LeftFoot];
                    local v167 = v156[v19.R15_PARTS.RightFoot];
                    if not (not v166 or not v167) then
                        local v168 = v18.getPart1(v166);
                        local v169 = v18.getPart1(v167);
                        if not (not v168 or not v169) then
                            v157[v168] = true;
                            v157[v169] = true;
                        end;
                    end;
                end;
            end;
        end;
        return v157;
    end;
    v22.getPoseCFrames = function(v170)
        local v171 = {};
        local v172 = v18.getRigInfo(v170);
        local l_PartNameToMotor_3 = v172.PartNameToMotor;
        local l_PartNameToAnimConstraint_3 = v172.PartNameToAnimConstraint;
        for _, v176 in pairs(l_PartNameToMotor_3) do
            v171[v176.Part0.Name] = v176.Part0.CFrame;
            v171[v176.Part1.Name] = v176.Part1.CFrame;
        end;
        if not (not v20() or not l_PartNameToAnimConstraint_3) then
            for _, v178 in pairs(l_PartNameToAnimConstraint_3) do
                local v179 = v18.getPart0(v178);
                local v180 = v18.getPart1(v178);
                v171[v179.Name] = v179.CFrame;
                v171[v180.Name] = v180.CFrame;
            end;
        end;
        return v171;
    end;
    v22.fixRigAttachments = function(v181, v182, v183, v184)
        if not v182 or v182 == v4.None then
            return ;
        else
            for _, v186 in pairs(v181) do
                local v187 = v18.getPart0(v186);
                local v188 = v18.getPart1(v186);
                if not (not v186:IsA("BallSocketConstraint") or not (v183[v187] and v183[v188]) and ((not v20() or not v184[v187]) or not v184[v188])) then
                    local v189 = nil;
                    for _, v191 in pairs(v181) do
                        if v18.getPart0(v191) == v188 then
                            v189 = v191;
                        end;
                    end;
                    local v192 = nil;
                    local v193 = v18.getPart1(v189);
                    v192 = if not v193 then (v182[v188.Name].p - v182[v187.Name].p).Unit else (v182[v193.Name].p - v182[v188.Name].p).Unit;
                    if not (not v183[v187] or not v183[v188]) then
                        v183[v187].Attachments = v183[v187].Attachments or {};
                        v183[v188].Attachments = v183[v188].Attachments or {};
                        table.insert(v183[v187].Attachments, {
                            Axis = v186.Attachment0.Axis,
                            SecondaryAxis = v186.Attachment0.SecondaryAxis,
                            Name = v186.Attachment0.Name
                        });
                        table.insert(v183[v188].Attachments, {
                            Axis = v186.Attachment1.Axis,
                            SecondaryAxis = v186.Attachment1.SecondaryAxis,
                            Name = v186.Attachment1.Name
                        });
                    end;
                    if not ((not v20() or not v184[v187]) or not v184[v188]) then
                        v184[v187].Attachments = v184[v187].Attachments or {};
                        v184[v188].Attachments = v184[v188].Attachments or {};
                        table.insert(v184[v187].Attachments, {
                            Axis = v186.Attachment0.Axis,
                            SecondaryAxis = v186.Attachment0.SecondaryAxis,
                            Name = v186.Attachment0.Name
                        });
                        table.insert(v184[v188].Attachments, {
                            Axis = v186.Attachment1.Axis,
                            SecondaryAxis = v186.Attachment1.SecondaryAxis,
                            Name = v186.Attachment1.Name
                        });
                    end;
                    v186.Attachment0.Axis = v192;
                    v186.Attachment1.Axis = v192;
                end;
            end;
            return ;
        end;
    end;
    v22.ikDragStart = function(v194, v195, v196, v197, v198)
        v18.clearCache();
        local v199 = {};
        local v200 = {};
        local v201 = {};
        local v202 = {};
        local v203 = v18.getRigInfo(v194);
        local l_PartNameToMotor_4 = v203.PartNameToMotor;
        local l_PartNameToConstraint_3 = v203.PartNameToConstraint;
        local l_PartNameToAnimConstraint_4 = v203.PartNameToAnimConstraint;
        local function v217(v207)
            local l_l_PartNameToMotor_4_0 = l_PartNameToMotor_4;
            local l_l_PartNameToAnimConstraint_4_0 = l_PartNameToAnimConstraint_4;
            local l_v207_0 = v207;
            local v211 = -1;
            while l_v207_0 ~= nil do
                local l_l_v207_0_0 = l_v207_0;
                if l_l_PartNameToMotor_4_0 then
                    local v213 = l_l_PartNameToMotor_4_0[l_l_v207_0_0.Name];
                    if v213 then
                        l_v207_0 = v213.Part0;
                        goto label1 --[[  true, true  ]];
                    end;
                end;
                if not (not v20() or not l_l_PartNameToAnimConstraint_4_0) then
                    local v214 = l_l_PartNameToAnimConstraint_4_0[l_l_v207_0_0.Name];
                    if v214 then
                        l_v207_0 = v18.getPart0(v214);
                        goto label1 --[[  true, true  ]];
                    end;
                end;
                l_v207_0 = nil;
                ::label1::;
                v211 = v211 + 1;
            end;
            local l_v211_0 = v211;
            while l_v211_0 >= 0 do
                if not v199[v207] then
                    v200[#v200 + 1] = {
                        Item = v207,
                        Priority = l_v211_0
                    };
                    v199[v207] = true;
                end;
                l_l_PartNameToMotor_4_0 = l_PartNameToMotor_4;
                l_l_PartNameToAnimConstraint_4_0 = l_PartNameToAnimConstraint_4;
                local l_v207_1 = v207;
                if l_l_PartNameToMotor_4_0 then
                    l_v207_0 = l_l_PartNameToMotor_4_0[l_v207_1.Name];
                    if l_v207_0 then
                        v207 = l_v207_0.Part0;
                        goto label2 --[[  true, true  ]];
                    end;
                end;
                if not (not v20() or not l_l_PartNameToAnimConstraint_4_0) then
                    l_v207_0 = l_l_PartNameToAnimConstraint_4_0[l_v207_1.Name];
                    if l_v207_0 then
                        v207 = v18.getPart0(l_v207_0);
                        goto label2 --[[  true, true  ]];
                    end;
                end;
                v207 = nil;
                ::label2::;
                l_v211_0 = l_v211_0 - 1;
            end;
        end;
        if v196 then
            v198 = v22.pinForLimbMode(v195, l_PartNameToMotor_4, l_PartNameToAnimConstraint_4);
        end;
        v217(v195);
        for v218, v219 in pairs(v198) do
            if v219 and v218.Name ~= v195.Name then
                v217(v218);
            end;
        end;
        table.sort(v200, function(v220, v221)
            return v221.Priority < v220.Priority;
        end);
        for v222 = 1, #v200 do
            local l_Item_0 = v200[v222].Item;
            v133(l_Item_0, l_PartNameToMotor_4[l_Item_0.Name], v201);
            if not (not v20() or not l_PartNameToAnimConstraint_4) then
                local v224 = l_PartNameToAnimConstraint_4[l_Item_0.Name];
                if not (not l_Item_0 or not v224) then
                    v202[l_Item_0] = {
                        OriginalData = v224,
                        Parent = v224.Parent
                    };
                    local l_CFrame_2 = l_Item_0.CFrame;
                    v224.Parent = nil;
                    l_Item_0.CFrame = l_CFrame_2;
                end;
            end;
            if v198[l_Item_0] and l_Item_0.Name ~= v195.Name then
                l_Item_0.Anchored = true;
            end;
        end;
        v22.fixRigAttachments(l_PartNameToConstraint_3, v197, v201, v202);
        for v226 in pairs(v201) do
            local v227 = l_PartNameToConstraint_3[v226.Name];
            if v227 then
                v227.Enabled = true;
            end;
        end;
        if v20() then
            for v228 in pairs(v202) do
                local v229 = l_PartNameToConstraint_3[v228.Name];
                if v229 then
                    v229.Enabled = true;
                end;
            end;
        end;
        return v201, v202;
    end;
end;
v22.resetAllFacsValuesInFaceControls = function(v230)
    if v22.canUseFaceControlsEditor(v230) then
        local v231 = v18.getFaceControls(v230);
        if v231 ~= nil then
            for _, v233 in pairs(v19.FacsNames) do
                v231[v233] = 0;
            end;
        end;
        return ;
    else
        return ;
    end;
end;
v22.stepRigAnimation = function(v234, v235, v236)
    local v237 = v18.getAnimator(v234);
    local v238 = v18.getRigInfo(v234);
    local l_Parts_0 = v238.Parts;
    local l_PartNameToMotor_5 = v238.PartNameToMotor;
    local l_PartNameToAnimConstraint_5 = v238.PartNameToAnimConstraint;
    local l_BoneNameToBone_1 = v238.BoneNameToBone;
    local v243 = not v234:IsA("Model") and 1 or v234:GetScale();
    for _, v245 in ipairs(l_Parts_0) do
        local v246 = (l_PartNameToMotor_5[v245.Name] or l_BoneNameToBone_1[v245.Name]) or v20() and l_PartNameToAnimConstraint_5[v245.Name];
        if v246 then
            local v247 = v235.Tracks[v245.Name];
            if not v247 then
                v246.Transform = CFrame.new();
            else
                local v248 = v14.getValue(v247, v236);
                v246.Transform = v248.Rotation + v248.Position * v243;
            end;
        end;
    end;
    local v249 = v18.getFaceControls(v234);
    if v249 ~= nil then
        for _, v251 in pairs(v19.FacsNames) do
            if v235 and v235.Tracks ~= nil then
                local v252 = v235.Tracks[v251];
                if v252 and v252.Type == v19.TRACK_TYPES.Facs then
                    v249[v251] = v14.getValue(v252, v236);
                else
                    v249[v251] = 0;
                end;
            else
                v249[v251] = 0;
            end;
        end;
    end;
    if not (not v237 or l_RunService_0:IsRunning()) then
        v237:StepAnimations(0);
    end;
end;
v22.clearPose = function(v253)
    local v254 = v18.getAnimator(v253);
    local v255 = v18.getRigInfo(v253);
    local l_Parts_1 = v255.Parts;
    local l_PartNameToMotor_6 = v255.PartNameToMotor;
    local l_PartNameToAnimConstraint_6 = v255.PartNameToAnimConstraint;
    local l_BoneNameToBone_2 = v255.BoneNameToBone;
    for _, v261 in ipairs(l_Parts_1) do
        local v262 = (l_PartNameToMotor_6[v261.Name] or l_BoneNameToBone_2[v261.Name]) or (v20() and l_PartNameToAnimConstraint_6) and l_PartNameToAnimConstraint_6[v261.Name];
        if v262 then
            v262.Transform = CFrame.new();
        end;
    end;
    if not (not v254 or l_RunService_0:IsRunning()) then
        v254:StepAnimations(0);
    end;
end;
v22.findOrCreateServerAnimSaves = function()
    local l_l_ServerStorage_0_FirstChild_0 = l_ServerStorage_0:FindFirstChild(v19.FOLDERS.AnimSaves);
    if not l_l_ServerStorage_0_FirstChild_0 then
        local l_Model_0 = Instance.new("Model");
        l_Model_0.Name = v19.FOLDERS.AnimSaves;
        l_Model_0.Parent = l_ServerStorage_0;
        l_l_ServerStorage_0_FirstChild_0 = l_Model_0;
    end;
    return l_l_ServerStorage_0_FirstChild_0;
end;
v22.getAnimSavesFolder = function(v265, _)
    if v265 then
        local l_AnimSaves_0 = v265:FindFirstChild("AnimSaves");
        if not (l_AnimSaves_0 and l_AnimSaves_0:IsA("ObjectValue")) then
            local l_ObjectValue_0 = Instance.new("ObjectValue");
            l_ObjectValue_0.Name = "AnimSaves";
            l_ObjectValue_0.Parent = v265;
            if l_AnimSaves_0 then
                for _, v270 in l_AnimSaves_0:GetChildren() do
                    v270.Parent = l_ObjectValue_0;
                end;
                l_AnimSaves_0:Destroy();
            end;
            l_AnimSaves_0 = l_ObjectValue_0;
        end;
        local v271 = v22.findOrCreateServerAnimSaves();
        local l_Value_0 = l_AnimSaves_0.Value;
        if not (not l_Value_0 or l_Value_0.Parent) then
            l_Value_0.Parent = v271;
        end;
        if (not l_Value_0 or not l_Value_0:IsA("ObjectValue")) or l_Value_0.Value ~= v265 then
            local l_ObjectValue_1 = Instance.new("ObjectValue");
            l_ObjectValue_1.Name = v265.Name;
            l_ObjectValue_1.Parent = v271;
            l_ObjectValue_1.Value = v265;
            l_Value_0 = l_ObjectValue_1;
            l_AnimSaves_0.Value = l_Value_0;
        end;
        return l_Value_0, l_AnimSaves_0;
    else
        return nil, nil;
    end;
end;
v22.getAnimSaves = function(v274)
    local v275, v276 = v22.getAnimSavesFolder(v274);
    local v277 = {};
    local function v282(v278, v279)
        if v278 then
            for _, v281 in ipairs((v278:GetChildren())) do
                if not (not v281:IsA("KeyframeSequence") and not v281:IsA("CurveAnimation")) then
                    table.insert(v277, {
                        animation = v281,
                        isLegacyAnimSaves = v279
                    });
                end;
            end;
        end;
    end;
    v282(v275, false);
    v282(v276, true);
    return v277;
end;
v22.focusCamera = function(v283)
    local l_Camera_0 = l_Workspace_0:FindFirstChildOfClass("Camera");
    if l_Camera_0 then
        local l_v283_ExtentsSize_0 = v283:GetExtentsSize();
        local v286 = math.max(l_v283_ExtentsSize_0.X, l_v283_ExtentsSize_0.Z);
        local l_CFrame_3 = v18.findRootPart(v283).CFrame;
        l_Camera_0.CFrame = CFrame.new(l_CFrame_3.Position + l_CFrame_3.LookVector * (v286 * 2), l_CFrame_3.Position);
        l_Camera_0.Focus = l_CFrame_3;
    end;
end;
v22.focusCameraOnFace = function(v288)
    if v288 then
        local l_CurrentCamera_0 = workspace.CurrentCamera;
        local v290 = v18.getFaceControls(v288);
        if v290 ~= nil then
            local l_Parent_0 = v290.Parent;
            local v292 = nil;
            local l_Neck_0 = l_Parent_0:FindFirstChild("Neck");
            if not (not l_Neck_0 or not l_Neck_0:IsA("Motor6D")) and l_Neck_0.Part1 == l_Parent_0 then
                v292 = l_Neck_0.Part0;
            else
                l_Neck_0 = l_Parent_0:FindFirstChildOfClass("Motor6D");
                if l_Neck_0 and l_Neck_0.Part1 == l_Parent_0 then
                    v292 = l_Neck_0.Part0;
                elseif not (not (v292 == nil) or not l_Parent_0.Parent) and l_Parent_0.Parent ~= l_Workspace_0 then
                    for _, v295 in pairs((l_Parent_0.Parent:GetDescendants())) do
                        if not ((not (v295:IsA("Motor6D") and v295.Part1 == l_Parent_0) or not v295.Parent) or not v295.Parent:IsA("BasePart")) then
                            v292 = v295.Parent;
                            break;
                        end;
                    end;
                end;
            end;
            if v292 ~= nil then
                local v296 = 1;
                local v297 = 1;
                local v298, v299 = l_CharacterUtility_0.CalculateHeadExtents(v288, (l_CFrameUtility_0.CalculateTargetCFrame(l_Parent_0.CFrame)));
                local v300 = Vector3.new(v299.X, v299.Y, v299.Z) - Vector3.new(v298.X, v298.Y, v298.Z);
                headHeight = l_Parent_0.Size.Y;
                v297 = math.min(v300.X, v300.Z) + 0.25;
                v296 = v297;
                if l_CurrentCamera_0.FieldOfView ~= 70 then
                    v296 = v297 / (l_CurrentCamera_0.FieldOfView / 70);
                end;
                l_CurrentCamera_0.CFrame = CFrame.lookAt(l_Parent_0.Position + v292.CFrame.LookVector * (v296 * 1.5), l_Parent_0.CFrame.Position);
                l_CurrentCamera_0.Focus = l_Parent_0.CFrame;
            end;
        end;
        return ;
    else
        return ;
    end;
end;
return v22;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Util.RigInfo);
local v2 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v3 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagAnimationConstraints);
local v4 = {};
local function v21(v5)
    local v6 = v1.getMotors(v5);
    local v7 = v1.getBones(v5);
    local v8 = {};
    local v9 = {};
    local v10 = {};
    for _, v12 in v6, nil, nil do
        if v12.Part0 then
            v8[v12.Part0] = true;
        end;
        if v12.Part1 then
            v8[v12.Part1] = true;
        end;
    end;
    if v3() then
        for _, v14 in (v1.getAnimationConstraints(v5)), nil, nil do
            local v15 = v1.getPart0(v14);
            local v16 = v1.getPart1(v14);
            if v15 then
                v8[v15] = true;
            end;
            if v16 then
                v8[v16] = true;
            end;
        end;
    end;
    for v17, _ in v8, nil, nil do
        if not v9[v17.Name] then
            v9[v17.Name] = true;
        else
            return {
                {
                    ID = v2.RIG_ERRORS.NameCollision
                }
            };
        end;
    end;
    for _, v20 in v7, nil, nil do
        if not v10[v20.Name] then
            v10[v20.Name] = true;
        else
            return {
                {
                    ID = v2.RIG_ERRORS.BoneNameCollision
                }
            };
        end;
    end;
    return {};
end;
local function v33(v22)
    local l_motors_0 = v22.motors;
    local l_motorsWithMissingPart0_0 = v22.motorsWithMissingPart0;
    local l_motorsWithMissingPart1_0 = v22.motorsWithMissingPart1;
    local l_partsWithMultipleParents_0 = v22.partsWithMultipleParents;
    local l_rig_0 = v22.rig;
    local l_motorsMap_0 = v22.motorsMap;
    for _, v30 in pairs(l_motors_0) do
        local l_Part0_0 = v30.Part0;
        local l_Part1_0 = v30.Part1;
        if not l_Part0_0 or l_Part0_0 and l_Part0_0.Parent == nil then
            table.insert(l_motorsWithMissingPart0_0, v30);
        end;
        if not l_Part1_0 or l_Part1_0 and l_Part1_0.Parent == nil then
            table.insert(l_motorsWithMissingPart1_0, v30);
        end;
        if not ((not l_Part0_0 or not l_Part1_0) or l_Part0_0.Anchored and l_Part1_0.Anchored) then
            v22.unanchoredPartExists = true;
        end;
        if not (((not l_Part0_0 or not l_Part1_0) or not l_rig_0:FindFirstChild(l_Part0_0.Name, true)) or not l_rig_0:FindFirstChild(l_Part1_0.Name, true)) then
            if not l_motorsMap_0[l_Part1_0] then
                l_motorsMap_0[l_Part1_0] = v30;
            else
                table.insert(l_partsWithMultipleParents_0, l_Part1_0);
            end;
        end;
    end;
end;
local function v45(v34)
    local l_animConstraints_0 = v34.animConstraints;
    local l_animConstraintsWithMissingAttachment0_0 = v34.animConstraintsWithMissingAttachment0;
    local l_animConstraintsWithMissingAttachment1_0 = v34.animConstraintsWithMissingAttachment1;
    local l_partsWithMultipleParents_1 = v34.partsWithMultipleParents;
    local l_rig_1 = v34.rig;
    local l_animConstraintsMap_0 = v34.animConstraintsMap;
    for _, v42 in l_animConstraints_0, nil, nil do
        local v43 = v1.getPart0(v42);
        local v44 = v1.getPart1(v42);
        if not (v43 and v43.Parent) then
            table.insert(l_animConstraintsWithMissingAttachment0_0, v42);
        end;
        if not (v44 and v44.Parent) then
            table.insert(l_animConstraintsWithMissingAttachment1_0, v42);
        end;
        if not ((not v43 or not v44) or v43.Anchored and v44.Anchored) then
            v34.unanchoredPartExists = true;
        end;
        if not (((not v43 or not v44) or not l_rig_1:FindFirstChild(v43.Name, true)) or not l_rig_1:FindFirstChild(v44.Name, true)) then
            if not l_animConstraintsMap_0[v44] then
                l_animConstraintsMap_0[v44] = v42;
            else
                table.insert(l_partsWithMultipleParents_1, v44);
            end;
        end;
    end;
end;
local function v53(v46)
    local l_parts_0 = v46.parts;
    local l_root_0 = v46.root;
    if l_root_0 then
        for _, v50 in ipairs(l_parts_0) do
            if v50.Name == l_root_0.Name and v50 ~= l_root_0 then
                table.insert(v46.errorList, {
                    ID = v2.RIG_ERRORS.NameCollision
                });
                return ;
            else
                for _, v52 in ipairs(l_parts_0) do
                    if v50 ~= v52 and v50.Name == v52.Name then
                        table.insert(v46.errorList, {
                            ID = v2.RIG_ERRORS.NameCollision
                        });
                        break;
                    end;
                end;
            end;
        end;
        return ;
    else
        return ;
    end;
end;
local function v66(v54, v55)
    for v56, v57 in pairs(v54) do
        local l_Part0_1 = v57.Part0;
        if not (not l_Part0_1 or not v56) and l_Part0_1 == v56 then
            return true;
        else
            local v59 = {};
            while l_Part0_1 ~= nil and l_Part0_1 ~= game.Workspace do
                local v60 = v54[l_Part0_1];
                if not v60 then
                    break;
                else
                    l_Part0_1 = v60.Part0;
                    if not v3() then
                        if v59[v60] then
                            return true;
                        else
                            v59[v60] = {};
                        end;
                    elseif not v59[v60] then
                        v59[v60] = true;
                    else
                        return true;
                    end;
                end;
            end;
        end;
    end;
    if v3() then
        for v61, v62 in pairs(v55) do
            local v63 = v1.getPart0(v62);
            if not (not v63 or not v61) and v63 == v61 then
                return true;
            else
                local v64 = {};
                while v63 ~= nil and v63 ~= game.Workspace do
                    local v65 = v55[v63];
                    if not v65 then
                        break;
                    else
                        v63 = v1.getPart0(v65);
                        if not v64[v65] then
                            v64[v65] = true;
                        else
                            return true;
                        end;
                    end;
                end;
            end;
        end;
    end;
    return false;
end;
local function v89(v67)
    local l_bones_0 = v67.bones;
    local l_motors_1 = v67.motors;
    local l_animConstraints_1 = v67.animConstraints;
    local l_unanchoredPartExists_0 = v67.unanchoredPartExists;
    local l_motorsWithMissingPart0_1 = v67.motorsWithMissingPart0;
    local l_motorsWithMissingPart1_1 = v67.motorsWithMissingPart1;
    local l_partsWithMultipleParents_2 = v67.partsWithMultipleParents;
    local l_rig_2 = v67.rig;
    local l_motorsMap_1 = v67.motorsMap;
    local l_animConstraintsMap_1 = v67.animConstraintsMap;
    local l_animConstraintsWithMissingAttachment0_1 = v67.animConstraintsWithMissingAttachment0;
    local l_animConstraintsWithMissingAttachment1_1 = v67.animConstraintsWithMissingAttachment1;
    local l_errorList_0 = v67.errorList;
    local l_root_1 = v67.root;
    local v82 = false;
    if l_bones_0 ~= nil then
        v82 = #l_bones_0 > 0;
    end;
    if not (not ((#l_motors_1 == 0 and (not v3() or #l_animConstraints_1 == 0)) and not v82) and l_root_1) then
        table.insert(l_errorList_0, {
            ID = v2.RIG_ERRORS.NoMotors
        });
    end;
    if not (l_unanchoredPartExists_0 or v82) then
        table.insert(l_errorList_0, {
            ID = v2.RIG_ERRORS.PartsAnchored
        });
    end;
    if #l_partsWithMultipleParents_2 > 0 then
        table.insert(l_errorList_0, {
            ID = v2.RIG_ERRORS.MultipleParents,
            Data = l_partsWithMultipleParents_2
        });
    end;
    if #l_motorsWithMissingPart0_1 > 0 then
        table.insert(l_errorList_0, {
            ID = v2.RIG_ERRORS.MissingPart0,
            Data = l_motorsWithMissingPart0_1
        });
    end;
    if #l_motorsWithMissingPart1_1 > 0 then
        table.insert(l_errorList_0, {
            ID = v2.RIG_ERRORS.MissingPart1,
            Data = l_motorsWithMissingPart1_1
        });
    end;
    if v3() then
        if #l_animConstraintsWithMissingAttachment0_1 > 0 then
            table.insert(l_errorList_0, {
                ID = v2.RIG_ERRORS.MissingPart0,
                Data = l_animConstraintsWithMissingAttachment0_1
            });
        end;
        if #l_animConstraintsWithMissingAttachment1_1 > 0 then
            table.insert(l_errorList_0, {
                ID = v2.RIG_ERRORS.MissingPart1,
                Data = l_animConstraintsWithMissingAttachment1_1
            });
        end;
    end;
    if v66(l_motorsMap_1, l_animConstraintsMap_1) then
        table.insert(l_errorList_0, {
            ID = v2.RIG_ERRORS.CircularRig
        });
    end;
    if v1.getAnimator(l_rig_2) == nil then
        table.insert(l_errorList_0, {
            ID = v2.RIG_ERRORS.NoAnimationController
        });
    end;
    local _, v84 = v1.getFaceControls(l_rig_2);
    local _ = require(l_script_FirstAncestor_0.Src.Util.Debug.dumpTable);
    if #v84 > 1 then
        table.insert(l_errorList_0, {
            ID = v2.RIG_ERRORS.MultipleFaceControls,
            Data = v84
        });
    end;
    local v86 = {};
    for _, v88 in v84, nil, nil do
        if not (not v88.Parent or v88.Parent:IsA("BasePart")) then
            table.insert(v86, v88);
        end;
    end;
    if #v86 > 0 then
        table.insert(l_errorList_0, {
            ID = v2.RIG_ERRORS.FaceControlsParent,
            Data = v86
        });
    end;
end;
v4.rigHasErrors = function(v90)
    v1.clearCache();
    local v91 = v21(v90);
    if #v91 > 0 then
        return true, v91;
    else
        local v92 = {
            errorList = {},
            motorsMap = {},
            partsWithMultipleParents = {},
            motorsWithMissingPart0 = {},
            motorsWithMissingPart1 = {},
            unanchoredPartExists = false,
            motors = v1.getMotors(v90),
            parts = v1.getRigInfo(v90).Parts,
            root = v1.findRootPart(v90),
            bones = v1.getBones(v90),
            animConstraints = if not v3() then {} else v1.getAnimationConstraints(v90),
            animConstraintsMap = {},
            animConstraintsWithMissingAttachment0 = {},
            animConstraintsWithMissingAttachment1 = {},
            rig = v90
        };
        v33(v92);
        if v3() then
            v45(v92);
        end;
        v53(v92);
        v89(v92);
        return #v92.errorList > 0, v92.errorList;
    end;
end;
return v4;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local l_Math_0 = require(l_script_FirstAncestor_0.Packages.Framework).Util.Math;
local v2 = require(l_script_FirstAncestor_0.Packages.DraggerFramework.Utility.Math);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local v4 = require(l_Util_0.Adorn);
local v5 = require(l_Util_0.Constants);
local v6 = require(l_Util_0.RigInfo);
local v7 = game:DefineFastFlag("ACEShowBoneLeaves", false);
local v8 = {};
local function _(v9)
    return v9.TransformedWorldCFrame.Position;
end;
local function _(v11)
    local v12 = 0;
    local l_Parent_0 = v11.Parent;
    if not (not l_Parent_0 or not l_Parent_0:IsA("Bone")) then
        v12 = (l_Parent_0.TransformedWorldCFrame.Position - v11.TransformedWorldCFrame.Position).Magnitude;
    end;
    return v12;
end;
local function v21(v15, v16)
    local v17 = v16 - v15;
    local l_Magnitude_0 = v17.Magnitude;
    v17 = if not l_Math_0.fuzzyEq(l_Magnitude_0, 0) then v17 / l_Magnitude_0 else Vector3.new(0, 0, 1);
    local v19 = Vector3.new(0, 1, 0);
    if l_Math_0.fuzzyEq(math.abs((v17:Dot(v19))), 1) then
        v19 = Vector3.new(1, 0, 0);
    end;
    local v20 = v17:Cross(v19);
    return CFrame.fromMatrix(v15, v20, (v20:Cross(v17)));
end;
local function v50(v22, v23, v24)
    local v25 = false;
    local l_Position_0 = v22.TransformedWorldCFrame.Position;
    local function v36(v27, v28)
        local l_v23_FirstChild_0 = v23:FindFirstChild(v27);
        if not (l_v23_FirstChild_0 and l_v23_FirstChild_0:IsA("Part")) then
            local l_Part_0 = Instance.new("Part");
            l_Part_0.Transparency = 1;
            l_Part_0.Name = v27;
            l_Part_0.Archivable = false;
            l_Part_0.Parent = v23;
            l_Part_0.Size = Vector3.new(0, 0, 0);
            l_v23_FirstChild_0 = l_Part_0;
        end;
        local l_BoneRef_0 = l_v23_FirstChild_0:FindFirstChild("BoneRef");
        if not (l_BoneRef_0 and l_BoneRef_0:IsA("ObjectValue")) then
            local l_ObjectValue_0 = Instance.new("ObjectValue");
            l_ObjectValue_0.Name = "BoneRef";
            l_ObjectValue_0.Parent = l_v23_FirstChild_0;
            l_BoneRef_0 = l_ObjectValue_0;
        end;
        assert(l_v23_FirstChild_0:IsA("Part"));
        assert(l_BoneRef_0:IsA("ObjectValue"));
        l_BoneRef_0.Value = v22;
        local l_Cone_0 = l_v23_FirstChild_0:FindFirstChild("Cone");
        if not (l_Cone_0 and l_Cone_0:IsA("ConeHandleAdornment")) then
            l_Cone_0 = v4:Cone("Cone", l_v23_FirstChild_0, v5.BONE_LINK_TRANSPARENCY, v5.BONE_CONE_COLOR, 0);
        end;
        local l_Line_0 = l_v23_FirstChild_0:FindFirstChild("Line");
        if not (l_Line_0 and l_Line_0:IsA("LineHandleAdornment")) then
            l_Line_0 = v4:Line("Line", l_v23_FirstChild_0, 1, v5.BONE_LINK_COLOR, 0, 0);
        end;
        assert(l_Cone_0:IsA("ConeHandleAdornment"));
        assert(l_Line_0:IsA("LineHandleAdornment"));
        local v35 = not v24 and 1 or v5.BONE_TRANSPARENCY_DEFAULT;
        l_Cone_0.Transparency = v35;
        l_Cone_0.Radius = v28 / v5.LENGTH_TO_RADIUS_RATIO;
        l_Cone_0.Height = v28;
        l_Line_0.Transparency = v35;
        l_Line_0.Length = v28;
        return l_v23_FirstChild_0;
    end;
    for _, v38 in ipairs(v22:GetChildren()) do
        if v38:IsA("Bone") then
            local l_Position_1 = v38.TransformedWorldCFrame.Position;
            local l_Magnitude_1 = (l_Position_1 - l_Position_0).Magnitude;
            local v41 = v22.Name .. "To" .. v38.Name;
            if not v7 then
                local l_v23_FirstChild_1 = v23:FindFirstChild(v41);
                if not (l_v23_FirstChild_1 and l_v23_FirstChild_1:IsA("Part")) then
                    local l_Part_1 = Instance.new("Part");
                    l_Part_1.Transparency = 1;
                    l_Part_1.Name = v41;
                    l_Part_1.Archivable = false;
                    l_Part_1.Parent = v23;
                    v4:Cone("Cone", l_Part_1, v5.BONE_LINK_TRANSPARENCY, v5.BONE_CONE_COLOR, 0);
                    v4:Line("Line", l_Part_1, 1, v5.BONE_LINK_COLOR, 0, 0);
                    l_v23_FirstChild_1 = l_Part_1;
                end;
                local l_BoneRef_1 = l_v23_FirstChild_1:FindFirstChild("BoneRef");
                if not (l_BoneRef_1 and l_BoneRef_1:IsA("ObjectValue")) then
                    local l_ObjectValue_1 = Instance.new("ObjectValue");
                    l_ObjectValue_1.Name = "BoneRef";
                    l_ObjectValue_1.Parent = l_v23_FirstChild_1;
                    l_BoneRef_1 = l_ObjectValue_1;
                end;
                assert(l_v23_FirstChild_1:IsA("Part"));
                assert(l_BoneRef_1:IsA("ObjectValue"));
                l_BoneRef_1.Value = v22;
                local l_Cone_1 = l_v23_FirstChild_1:FindFirstChild("Cone");
                local l_Line_1 = l_v23_FirstChild_1:FindFirstChild("Line");
                if not (not l_Cone_1 or not l_Cone_1:IsA("ConeHandleAdornment")) then
                    l_Cone_1.Transparency = not v24 and 1 or v5.BONE_TRANSPARENCY_DEFAULT;
                    l_Cone_1.Radius = l_Magnitude_1 / v5.LENGTH_TO_RADIUS_RATIO;
                    l_Cone_1.Height = l_Magnitude_1;
                end;
                if not (not l_Line_1 or not l_Line_1:IsA("LineHandleAdornment")) then
                    l_Line_1.Transparency = not v24 and 1 or v5.BONE_TRANSPARENCY_DEFAULT;
                    l_Line_1.Length = l_Magnitude_1;
                end;
                l_v23_FirstChild_1.CFrame = v21(l_Position_0, l_Position_1);
            else
                v36(v41, l_Magnitude_1).CFrame = v21(l_Position_0, l_Position_1);
            end;
            v25 = true;
        end;
    end;
    if not (not v7 or v25) then
        local l_Parent_1 = v22.Parent;
        local _ = nil;
        v36(v22.Name .. "End", if not not l_Parent_1 and l_Parent_1:IsA("Bone") then (l_Parent_1.TransformedWorldCFrame.Position - l_Position_0).Magnitude * v5.LEAF_BONE_LENGTH_RATIO else 1).CFrame = v22.TransformedWorldCFrame * CFrame.fromEulerAngles(1.5707963267948966, 0, 0);
    end;
end;
local function v63(v51, v52, v53)
    local l_Position_2 = v51.TransformedWorldCFrame.Position;
    local v55 = v51.Name .. "Node";
    local l_v52_FirstChild_0 = v52:FindFirstChild(v55);
    if not (l_v52_FirstChild_0 and l_v52_FirstChild_0:IsA("Part")) then
        local l_Part_2 = Instance.new("Part");
        l_Part_2.Transparency = 1;
        l_Part_2.Name = v55;
        l_Part_2.Archivable = false;
        l_Part_2.Parent = v52;
        v4:Sphere("Sphere", l_Part_2, v5.BONE_NODE_TRANSPARENCY, v5.BONE_NODE_COLOR, 0);
        l_v52_FirstChild_0 = l_Part_2;
    end;
    local l_BoneRef_2 = l_v52_FirstChild_0:FindFirstChild("BoneRef");
    if not (l_BoneRef_2 and l_BoneRef_2:IsA("ObjectValue")) then
        local l_ObjectValue_2 = Instance.new("ObjectValue");
        l_ObjectValue_2.Name = "BoneRef";
        l_ObjectValue_2.Parent = l_v52_FirstChild_0;
        l_BoneRef_2 = l_ObjectValue_2;
    end;
    assert(l_v52_FirstChild_0:IsA("Part"));
    assert(l_BoneRef_2:IsA("ObjectValue"));
    l_BoneRef_2.Value = v51;
    local l_Sphere_0 = l_v52_FirstChild_0:FindFirstChild("Sphere");
    if not (not l_Sphere_0 or not l_Sphere_0:IsA("SphereHandleAdornment")) then
        local v61 = 0;
        local l_Parent_2 = v51.Parent;
        if not (not l_Parent_2 or not l_Parent_2:IsA("Bone")) then
            v61 = (l_Parent_2.TransformedWorldCFrame.Position - v51.TransformedWorldCFrame.Position).Magnitude;
        end;
        l_Sphere_0.Radius = v61 / v5.LENGTH_TO_RADIUS_RATIO;
        l_Sphere_0.Transparency = not v53 and 1 or v5.BONE_TRANSPARENCY_DEFAULT;
    end;
    l_v52_FirstChild_0.CFrame = CFrame.new(l_Position_2);
    v50(v51, v52, v53);
end;
local function _()
    return Workspace:FindFirstChild(v5.FOLDERS.Microbones);
end;
local function _()
    local l_Workspace_FirstChild_0 = Workspace:FindFirstChild(v5.FOLDERS.Microbones);
    if not l_Workspace_FirstChild_0 then
        local l_Folder_0 = Instance.new("Folder");
        l_Folder_0.Name = v5.FOLDERS.Microbones;
        l_Folder_0.Archivable = false;
        l_Folder_0.Parent = Workspace;
        l_Workspace_FirstChild_0 = l_Folder_0;
    end;
    assert(l_Workspace_FirstChild_0);
    return l_Workspace_FirstChild_0;
end;
local function v78(v68, v69)
    local l_Cone_2 = v68:FindFirstChild("Cone");
    local l_Sphere_1 = v68:FindFirstChild("Sphere");
    if not l_Cone_2 or not l_Cone_2:IsA("ConeHandleAdornment") then
        if not l_Sphere_1 or not l_Sphere_1:IsA("SphereHandleAdornment") then
            return nil;
        else
            local v72, v73 = v2.intersectRaySphere(v69.Origin, v69.Direction.Unit, v68.CFrame.Position, l_Sphere_1.Radius);
            if not v72 then
                return nil;
            else
                return v73;
            end;
        end;
    else
        local v74, v75 = v2.intersectRayRay(v68.CFrame.Position, v68.CFrame.LookVector, v69.Origin, v69.Direction.Unit);
        if v74 then
            local _, v77 = v2.intersectRayRay(v69.Origin, v69.Direction.Unit, v68.CFrame.Position, v68.CFrame.LookVector);
            if (((v68.CFrame.Position + v68.CFrame.LookVector * v75) - (v69.Origin + v69.Direction.Unit * v77)).Magnitude < l_Cone_2.Radius and v75 > 0) and v75 < l_Cone_2.Height then
                return v77;
            else
                return nil;
            end;
        else
            return nil;
        end;
    end;
end;
local function v88(v79)
    local v80 = nil;
    local l_huge_0 = math.huge;
    local l_Workspace_FirstChild_1 = Workspace:FindFirstChild(v5.FOLDERS.Microbones);
    if l_Workspace_FirstChild_1 then
        for _, v84 in pairs((l_Workspace_FirstChild_1:GetChildren())) do
            local l_Cone_3 = v84:FindFirstChild("Cone");
            local l_Sphere_2 = v84:FindFirstChild("Sphere");
            if not (not l_Cone_3 or not l_Cone_3:IsA("ConeHandleAdornment")) and l_Cone_3.Color3 ~= v5.BONE_COLOR_SELECTED then
                l_Cone_3.Color3 = v5.BONE_COLOR_DEFAULT;
                l_Cone_3.Transparency = v5.BONE_TRANSPARENCY_DEFAULT;
            end;
            if not (not l_Sphere_2 or not l_Sphere_2:IsA("SphereHandleAdornment")) and l_Sphere_2.Color3 ~= v5.BONE_COLOR_SELECTED then
                l_Sphere_2.Color3 = v5.BONE_COLOR_DEFAULT;
                l_Sphere_2.Transparency = v5.BONE_TRANSPARENCY_DEFAULT;
            end;
            if v84:IsA("Part") then
                local v87 = v78(v84, v79);
                if v87 and v87 < l_huge_0 then
                    l_huge_0 = v87;
                    v80 = v84;
                end;
            end;
        end;
    end;
    return v80, l_huge_0;
end;
v8.clearMicrobones = function()
    local l_Workspace_FirstChild_2 = Workspace:FindFirstChild(v5.FOLDERS.Microbones);
    if l_Workspace_FirstChild_2 then
        l_Workspace_FirstChild_2:Destroy();
    end;
end;
v8.updateMicrobones = function(v90, v91)
    if not v90 or type(v90) == "table" then
        return ;
    else
        local l_Workspace_FirstChild_3 = Workspace:FindFirstChild(v5.FOLDERS.Microbones);
        if not l_Workspace_FirstChild_3 then
            local l_Folder_1 = Instance.new("Folder");
            l_Folder_1.Name = v5.FOLDERS.Microbones;
            l_Folder_1.Archivable = false;
            l_Folder_1.Parent = Workspace;
            l_Workspace_FirstChild_3 = l_Folder_1;
        end;
        assert(l_Workspace_FirstChild_3);
        local l_l_Workspace_FirstChild_3_0 = l_Workspace_FirstChild_3;
        for _, v96 in v6.getRigInfo(v90).BoneNameToBone, nil, nil do
            v63(v96, l_l_Workspace_FirstChild_3_0, v91);
        end;
        return ;
    end;
end;
v8.getBoneHit = function(v97, v98)
    local _ = v6.getRigInfo(v98).BoneNameToBone;
    return v88(v97);
end;
v8.selectBone = function(v100)
    if v100 then
        assert(v100);
        local l_Cone_4 = v100:FindFirstChild("Cone");
        local l_Sphere_3 = v100:FindFirstChild("Sphere");
        if not (not l_Cone_4 or not l_Cone_4:IsA("ConeHandleAdornment")) then
            l_Cone_4.Color3 = v5.BONE_COLOR_SELECTED;
        end;
        if not (not l_Sphere_3 or not l_Sphere_3:IsA("SphereHandleAdornment")) then
            l_Sphere_3.Color3 = v5.BONE_COLOR_SELECTED;
        end;
        return ;
    else
        return ;
    end;
end;
v8.deselectBones = function()
    local l_Workspace_FirstChild_4 = Workspace:FindFirstChild(v5.FOLDERS.Microbones);
    if l_Workspace_FirstChild_4 then
        assert(l_Workspace_FirstChild_4);
        for _, v105 in pairs((l_Workspace_FirstChild_4:GetChildren())) do
            local l_Cone_5 = v105:FindFirstChild("Cone");
            local l_Sphere_4 = v105:FindFirstChild("Sphere");
            if not (not l_Cone_5 or not l_Cone_5:IsA("ConeHandleAdornment")) and l_Cone_5.Color3 == v5.BONE_COLOR_SELECTED then
                l_Cone_5.Color3 = v5.BONE_COLOR_DEFAULT;
                l_Cone_5.Transparency = v5.BONE_TRANSPARENCY_DEFAULT;
            end;
            if not (not l_Sphere_4 or not l_Sphere_4:IsA("SphereHandleAdornment")) and l_Sphere_4.Color3 == v5.BONE_COLOR_SELECTED then
                l_Sphere_4.Color3 = v5.BONE_COLOR_DEFAULT;
                l_Sphere_4.Transparency = v5.BONE_TRANSPARENCY_DEFAULT;
            end;
        end;
        return ;
    else
        return ;
    end;
end;
v8.isBone = function(v108)
    local v109 = false;
    if v108.Parent ~= nil then
        v109 = v108.Parent.Name == v5.FOLDERS.Microbones;
    end;
    return v109;
end;
return v8;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local _ = require(l_script_FirstAncestor_0.Src.Util.PathUtils);
local v3 = {};
v3.traverse = function(v4, v5, v6, v7, v8)
    if v6 then
        v6(v4, v5, v8 or {});
    end;
    if v4.Components then
        for v9, v10 in pairs(v4.Components) do
            v3.traverse(v10, not not v5 and v5.Components[v9] or nil, v6, v7, (v1.List.join(v8 or {}, {
                v9
            })));
        end;
    end;
    if v7 then
        v7(v4, v5, v8 or {});
    end;
end;
return v3;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v2 = require(l_script_FirstAncestor_0.Src.Util.buildHierarchy);
local v3 = {};
if not require(l_script_FirstAncestor_0.LuaFlags.GetFFlagSelectFromViewport)() then
    v3.buildSkeletonHierarchy = function(v4, v5)
        local v6 = {};
        for v7, v8 in ipairs(v4) do
            local v9 = v5[v7];
            local v10 = nil;
            if v9 == 0 then
                v6[v8] = {};
            else
                v10 = v4[v9];
                if not v6[v10] then
                    v6[v10] = {
                        v8
                    };
                else
                    table.insert(v6[v10], v8);
                end;
            end;
        end;
        local v11 = v4[1];
        return {
            [v11] = v2(v11, function(v12)
                return v6[v12];
            end)
        };
    end;
    v3.getUnusedSkeletonTracks = function(v13, v14)
        local v15 = {};
        for _, v17 in ipairs(v13) do
            local v18 = true;
            for _, v20 in ipairs(v14) do
                if v20.Name == v17 then
                    v18 = false;
                    break;
                end;
            end;
            if v18 then
                table.insert(v15, {
                    Name = v17,
                    Instance = "Root",
                    Type = v1.TRACK_TYPES.CFrame
                });
            end;
        end;
        table.sort(v15, function(v21, v22)
            return v21.Name < v22.Name;
        end);
        return v15;
    end;
    return v3;
else
    return v3;
end;


local l_TextService_0 = game:GetService("TextService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local l_Math_0 = require(l_script_FirstAncestor_0.Packages.Framework).Util.Math;
local v3 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v4 = require(l_script_FirstAncestor_0.Src.Util.KeyframeUtils);
local v5 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagTimelineUnitSeconds);
local v6 = {};
local v7 = Vector2.new(1000000, 50);
v6.getTextWidth = function(v8, v9, v10)
    return l_TextService_0:GetTextSize(v8, v9, v10, v7).X;
end;
v6.split = function(v11, v12)
    local _ = v12 or ":";
    local v14 = {};
    v11:gsub(string.format("([^%s]+)", v12), function(v15)
        v14[#v14 + 1] = v15;
    end);
    return v14;
end;
v6.parseTime = function(v16, v17, v18)
    if not v5() then
        local v19 = v6.split(v16, ":");
        if #v19 == 0 then
            v19 = v6.split(v16, ";");
        end;
        local v20 = {};
        for _, v22 in ipairs(v19) do
            local l_status_0, l_result_0 = pcall(function()
                return (tonumber(v22));
            end);
            if not l_status_0 then
                return 0;
            else
                table.insert(v20, l_result_0);
            end;
        end;
        if #v20 == 1 then
            return (v20[1] * v3.TICK_FREQUENCY) / v17;
        elseif #v20 > 1 then
            return (v20[1] + v20[2] / v17) * v3.TICK_FREQUENCY;
        else
            return nil;
        end;
    elseif v18 == v3.TIMELINE_UNITS.SecondsDecimal then
        local v25 = tonumber(v16);
        if not v25 then
            return nil;
        else
            return v25 * v3.TICK_FREQUENCY;
        end;
    elseif v18 == v3.TIMELINE_UNITS.Frames then
        local v26 = tonumber(v16);
        if not v26 then
            return nil;
        else
            return (v26 * v3.TICK_FREQUENCY) / v17;
        end;
    else
        local v27 = v6.split(v16, ":");
        local v28 = {};
        for _, v30 in ipairs(v27) do
            local v31 = tonumber(v30);
            if not v31 then
                return nil;
            else
                table.insert(v28, v31);
            end;
        end;
        if #v28 == 1 then
            return (v28[1] * v3.TICK_FREQUENCY) / v17;
        elseif #v28 > 1 then
            return (v28[1] + v28[2] / v17) * v3.TICK_FREQUENCY;
        else
            return nil;
        end;
    end;
end;
v6.formatTime = function(v32, v33, v34)
    if v34 == v3.TIMELINE_UNITS.Frames then
        return (tostring((math.floor((v32 * v33) / v3.TICK_FREQUENCY))));
    elseif v34 == v3.TIMELINE_UNITS.Seconds then
        local v35 = v4.getNearestTick((v32 * v33) / v3.TICK_FREQUENCY);
        if v33 == 0 then
            return (tostring("0:" .. string.format("%02d", 0)));
        else
            local v36 = math.floor(v35 / v33);
            return (tostring(v36 .. ":" .. string.format("%02d", v35 - v36 * v33)));
        end;
    elseif v34 == v3.TIMELINE_UNITS.SecondsDecimal then
        return l_Math_0.round(v32 / v3.TICK_FREQUENCY, 2);
    else
        return ;
    end;
end;
v6.formatTime_DEPRECATED = function(v37, v38, v39)
    if v39 then
        local v40 = v4.getNearestTick((v37 * v38) / v3.TICK_FREQUENCY);
        if v38 == 0 then
            return (tostring("0:" .. string.format("%02d", 0)));
        else
            local v41 = math.floor(v40 / v38);
            return (tostring(v41 .. ":" .. string.format("%02d", v40 - v41 * v38)));
        end;
    else
        return (tostring((math.floor((v37 * v38) / v3.TICK_FREQUENCY))));
    end;
end;
v6.formatTimeInSeconds = function(v42, v43)
    if v43 == 0 then
        return (tostring("0s"));
    else
        return (tostring(l_Math_0.round(v42 / v43, 2) .. "s"));
    end;
end;
v6.getMaxTextWidth = function(v44, v45, v46)
    local v47 = 0;
    for _, v49 in ipairs(v44) do
        v47 = math.max(v47, (v6.getTextWidth(v49.Name, v45, v46)));
    end;
    return v47;
end;
return v6;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local l_HttpService_0 = game:GetService("HttpService");
local _ = require(l_script_FirstAncestor_0.Src.Types);
return {
    animationData = function()
        return {
            Metadata = {
                Name = "",
                StartTick = 0,
                EndTick = 0,
                Looping = false,
                Priority = Enum.AnimationPriority.Core,
                FrameRate = 30,
                Guid = l_HttpService_0:GenerateGUID()
            },
            Events = {
                NamedKeyframes = {},
                Keyframes = {},
                Data = {}
            },
            Instances = {
                Root = {
                    Type = nil,
                    Tracks = {}
                }
            }
        };
    end,
    instance = function()
        return {
            Type = nil,
            Tracks = {}
        };
    end,
    track = function(v3)
        return {
            Type = v3,
            IsCurveTrack = false
        };
    end,
    trackListEntry = function(v4)
        return {
            Name = "",
            Depth = 0,
            Expanded = false,
            Selected = false,
            Type = v4
        };
    end,
    keyframe = function()
        return {
            Value = nil,
            EasingStyle = nil,
            EasingDirection = nil,
            InterpolationMode = nil,
            LeftSlope = nil,
            RightSlope = nil
        };
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_StyleModifier_0 = v2.Util.StyleModifier;
local l_Style_0 = v2.Style;
local l_StudioTheme_0 = l_Style_0.Themes.StudioTheme;
local l_StyleKey_0 = l_Style_0.StyleKey;
local l_Colors_0 = l_Style_0.Colors;
local l_UI_0 = v2.UI;
local l_Box_0 = l_UI_0.Box;
local l_RoundBox_0 = l_UI_0.RoundBox;
local _ = l_UI_0.TextLabel;
local l_Image_0 = l_UI_0.Image;
local l_LightTheme_0 = l_Style_0.Themes.LightTheme;
local l_DarkTheme_0 = l_Style_0.Themes.DarkTheme;
local l_getRawComponentStyle_0 = l_Style_0.getRawComponentStyle;
local l_ComponentSymbols_0 = l_Style_0.ComponentSymbols;
local l_join_0 = v2.Dash.join;
local v18 = v1.Dictionary.join(l_LightTheme_0, {
    [l_StyleKey_0.DialogButtonTextDisabled] = Color3.fromRGB(184, 184, 184),
    [l_StyleKey_0.TrackShadedBackgroundColor] = Color3.fromRGB(243, 243, 243),
    [l_StyleKey_0.TrackTitleBackgroundColor] = Color3.fromRGB(227, 227, 227),
    [l_StyleKey_0.TrackPrimaryBackgroundColor] = Color3.fromRGB(243, 243, 243),
    [l_StyleKey_0.TrackButtonColor] = Color3.fromRGB(136, 136, 136),
    [l_StyleKey_0.TrackHoveredButtonColor] = l_Colors_0.Blue,
    [l_StyleKey_0.TrackAddButtonColor] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.TrackHoveredAddButtonColor] = l_Colors_0.Blue,
    [l_StyleKey_0.TrackPlusIconColor] = Color3.fromRGB(82, 82, 82),
    [l_StyleKey_0.TimelineDimmedColor] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.TimelineBackgroundColor] = Color3.fromRGB(243, 243, 243),
    [l_StyleKey_0.KeyframePrimaryClusterColor] = Color3.fromRGB(136, 136, 136),
    [l_StyleKey_0.EventMarkerImageColor] = Color3.fromRGB(184, 184, 184),
    [l_StyleKey_0.EventMarkerBorderColor] = Color3.fromRGB(136, 136, 136),
    [l_StyleKey_0.ScrollBarControl] = l_Colors_0.White,
    [l_StyleKey_0.ScrollBarHover] = Color3.fromRGB(231, 240, 250),
    [l_StyleKey_0.ScrollBarPressed] = Color3.fromRGB(224, 224, 224),
    [l_StyleKey_0.StartScreenDarkTextColor] = l_Colors_0.White,
    [l_StyleKey_0.IKHeaderColor] = Color3.fromRGB(243, 243, 243),
    [l_StyleKey_0.IKHeaderBorder] = Color3.fromRGB(243, 243, 243),
    [l_StyleKey_0.KeyframePrimaryBackgroundColor] = l_Colors_0.White,
    [l_StyleKey_0.KeyframePrimaryBackgroundColorSelected] = l_Colors_0.White,
    [l_StyleKey_0.KeyframeErrorBackgroundColor] = Color3.fromRGB(255, 161, 161),
    [l_StyleKey_0.KeyframeErrorBorderColor] = Color3.fromRGB(168, 132, 132),
    [l_StyleKey_0.KeyframeErrorBackgroundColorSelected] = Color3.fromRGB(255, 161, 161),
    [l_StyleKey_0.KeyframeErrorBorderColorSelected] = l_Colors_0.Red,
    [l_StyleKey_0.KeyframePrimaryErrorBackgroundColor] = Color3.fromRGB(255, 161, 161),
    [l_StyleKey_0.KeyframePrimaryErrorBorderColor] = Color3.fromRGB(168, 132, 132),
    [l_StyleKey_0.KeyframePrimaryErrorBackgroundColorSelected] = Color3.fromRGB(255, 161, 161),
    [l_StyleKey_0.KeyframePrimaryErrorBorderColorSelected] = l_Colors_0.Red,
    [l_StyleKey_0.CurvePositionX] = Color3.fromRGB(255, 0, 0),
    [l_StyleKey_0.CurvePositionY] = Color3.fromRGB(3, 201, 3),
    [l_StyleKey_0.CurvePositionZ] = Color3.fromRGB(0, 0, 255),
    [l_StyleKey_0.CurveRotationX] = Color3.fromRGB(47, 128, 123),
    [l_StyleKey_0.CurveRotationY] = Color3.fromRGB(255, 0, 255),
    [l_StyleKey_0.CurveRotationZ] = Color3.fromRGB(255, 165, 0),
    [l_StyleKey_0.CurveEditorButton] = "rbxasset://textures/AnimationEditor/Button_Curve_Lightmode.png",
    [l_StyleKey_0.DopeSheetButton] = "rbxasset://textures/AnimationEditor/Button_Dopesheet_Lightmode.png",
    [l_StyleKey_0.StopRecordingButtonImage] = "rbxasset://textures/AnimationEditor/FaceCaptureUI/StopRecordButton_lightTheme.png",
    [l_StyleKey_0.FaceCaptureDefaultButtonIconColor] = Color3.fromRGB(82, 82, 82),
    [l_StyleKey_0.FaceSliderKnob] = l_Colors_0.Blue
});
local v19 = v1.Dictionary.join(l_DarkTheme_0, {
    [l_StyleKey_0.DialogButtonTextDisabled] = Color3.fromRGB(92, 92, 92),
    [l_StyleKey_0.TrackShadedBackgroundColor] = Color3.fromRGB(54, 54, 54),
    [l_StyleKey_0.TrackTitleBackgroundColor] = Color3.fromRGB(54, 54, 54),
    [l_StyleKey_0.TrackPrimaryBackgroundColor] = Color3.fromRGB(37, 37, 37),
    [l_StyleKey_0.TrackButtonColor] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.TrackHoveredButtonColor] = l_Colors_0.White,
    [l_StyleKey_0.TrackAddButtonColor] = l_Colors_0.Gray,
    [l_StyleKey_0.TrackHoveredAddButtonColor] = l_Colors_0.lighter(l_Colors_0.Gray, 0.26),
    [l_StyleKey_0.TrackPlusIconColor] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.TimelineDimmedColor] = Color3.fromRGB(102, 102, 102),
    [l_StyleKey_0.TimelineBackgroundColor] = Color3.fromRGB(56, 56, 56),
    [l_StyleKey_0.KeyframePrimaryClusterColor] = Color3.fromRGB(170, 170, 170),
    [l_StyleKey_0.EventMarkerImageColor] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.EventMarkerBorderColor] = l_Colors_0.White,
    [l_StyleKey_0.ScrollBarControl] = Color3.fromRGB(64, 64, 64),
    [l_StyleKey_0.ScrollBarHover] = Color3.fromRGB(80, 80, 80),
    [l_StyleKey_0.ScrollBarPressed] = Color3.fromRGB(80, 80, 80),
    [l_StyleKey_0.StartScreenDarkTextColor] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.IKHeaderColor] = l_Colors_0.Slate,
    [l_StyleKey_0.IKHeaderBorder] = Color3.fromRGB(26, 26, 26),
    [l_StyleKey_0.KeyframePrimaryBackgroundColor] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.KeyframePrimaryBackgroundColorSelected] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.KeyframeErrorBackgroundColor] = l_Colors_0.lighter(l_Colors_0.Black, 0.4),
    [l_StyleKey_0.KeyframeErrorBorderColor] = Color3.fromRGB(255, 68, 68),
    [l_StyleKey_0.KeyframeErrorBackgroundColorSelected] = Color3.fromRGB(170, 170, 170),
    [l_StyleKey_0.KeyframeErrorBorderColorSelected] = Color3.fromRGB(255, 68, 68),
    [l_StyleKey_0.KeyframePrimaryErrorBackgroundColor] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.KeyframePrimaryErrorBorderColor] = Color3.fromRGB(255, 68, 68),
    [l_StyleKey_0.KeyframePrimaryErrorBackgroundColorSelected] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.KeyframePrimaryErrorBorderColorSelected] = Color3.fromRGB(255, 68, 68),
    [l_StyleKey_0.CurvePositionX] = Color3.fromRGB(255, 0, 0),
    [l_StyleKey_0.CurvePositionY] = Color3.fromRGB(3, 201, 3),
    [l_StyleKey_0.CurvePositionZ] = Color3.fromRGB(0, 0, 255),
    [l_StyleKey_0.CurveRotationX] = Color3.fromRGB(47, 128, 123),
    [l_StyleKey_0.CurveRotationY] = Color3.fromRGB(255, 0, 255),
    [l_StyleKey_0.CurveRotationZ] = Color3.fromRGB(255, 165, 0),
    [l_StyleKey_0.CurveEditorButton] = "rbxasset://textures/AnimationEditor/Button_Curve_Darkmode.png",
    [l_StyleKey_0.DopeSheetButton] = "rbxasset://textures/AnimationEditor/Button_Dopesheet_Darkmode.png",
    [l_StyleKey_0.StopRecordingButtonImage] = "rbxasset://textures/AnimationEditor/FaceCaptureUI/StopRecordButton.png",
    [l_StyleKey_0.FaceCaptureDefaultButtonIconColor] = Color3.fromRGB(255, 255, 255),
    [l_StyleKey_0.FaceSliderKnob] = l_Colors_0.White
});
local v20 = {
    autokeyOn = "",
    autokeyOff = "",
    skipBackward = "rbxasset://textures/AnimationEditor/button_control_previous.png",
    skipForward = "rbxasset://textures/AnimationEditor/button_control_next.png",
    play = "rbxasset://textures/AnimationEditor/button_control_play.png",
    pause = "rbxasset://textures/AnimationEditor/button_pause_white@2x.png",
    loop = "rbxasset://textures/AnimationEditor/button_loop.png",
    reverse = "rbxasset://textures/AnimationEditor/button_control_reverseplay.png",
    goToFirstFrame = "rbxasset://textures/AnimationEditor/button_control_firstframe.png",
    goToLastFrame = "rbxasset://textures/AnimationEditor/button_control_lastframe.png",
    selectClipDropdownIcon = "rbxasset://textures/AnimationEditor/btn_expand.png",
    iconColor = l_StyleKey_0.MainText,
    iconHighlightColor = l_StyleKey_0.DialogMainButtonText,
    timeInputBackground = l_StyleKey_0.InputFieldBackground,
    borderColor = l_StyleKey_0.Border,
    inputBorderColor = l_StyleKey_0.InputFieldBorder
};
local v21 = {
    itemColor = l_StyleKey_0.Item,
    hoveredItemColor = l_StyleKey_0.ItemHovered,
    textColor = l_StyleKey_0.MainText,
    itemHeight = 22,
    textSize = 15
};
local v22 = {
    backgroundColor = l_StyleKey_0.MainBackground,
    shadedBackgroundColor = l_StyleKey_0.TrackShadedBackgroundColor,
    titleBackgroundColor = l_StyleKey_0.TrackTitleBackgroundColor,
    selectedBackgroundColor = l_StyleKey_0.ItemSelected,
    primaryBackgroundColor = l_StyleKey_0.TrackPrimaryBackgroundColor,
    textColor = l_StyleKey_0.MainText,
    primaryTextColor = l_StyleKey_0.BrightText,
    selectedTextColor = l_StyleKey_0.MainTextSelected,
    textSize = 15,
    arrow = {
        collapsed = "rbxasset://textures/StudioToolbox/ArrowCollapsed.png",
        expanded = "rbxasset://textures/StudioToolbox/ArrowExpanded.png"
    },
    contextMenu = "rbxasset://textures/AnimationEditor/icon_showmore.png",
    addButtonBackground = "rbxasset://textures/AnimationEditor/Circle.png",
    addEventBackground = "rbxasset://textures/AnimationEditor/addEvent_inner.png",
    addEventBorder = "rbxasset://textures/AnimationEditor/addEvent_border.png",
    plusIcon = "rbxasset://textures/AnimationEditor/icon_add.png",
    buttonColor = l_StyleKey_0.TrackButtonColor,
    hoveredButtonColor = l_StyleKey_0.TrackHoveredButtonColor,
    addButtonColor = l_StyleKey_0.TrackAddButtonColor,
    hoveredAddButtonColor = l_StyleKey_0.TrackHoveredAddButtonColor,
    plusIconColor = l_StyleKey_0.TrackPlusIconColor,
    hoveredPlusIconColor = l_StyleKey_0.DialogMainButtonText
};
local v23 = {
    mainColor = l_StyleKey_0.DialogMainButton,
    textColor = l_StyleKey_0.DialogMainButtonText,
    textSize = 15
};
local v24 = {
    textSize = 16,
    textColor = l_StyleKey_0.MainText,
    backgroundColor = l_StyleKey_0.InputFieldBackground,
    errorBorder = l_StyleKey_0.ErrorText,
    focusedBorder = l_StyleKey_0.DialogMainButton,
    defaultBorder = l_StyleKey_0.Border
};
local v25 = {
    image = "rbxasset://textures/AnimationEditor/btn_manage.png",
    imageColor = l_StyleKey_0.MainText
};
local v26 = {
    clusterColor = l_StyleKey_0.DialogButtonTextDisabled,
    primaryClusterColor = l_StyleKey_0.KeyframePrimaryClusterColor
};
local v27 = {
    backgroundColor = Color3.fromRGB(182, 182, 182),
    titleColor = l_StyleKey_0.MainText,
    font = Enum.Font.Legacy,
    textSize = 8,
    backgroundImage = "rbxasset://textures/GameSettings/UncheckedBox.png",
    selectedImage = "rbxasset://textures/GameSettings/CheckedBoxLight.png"
};
local v28 = Rect.new(3, 0, 4, 6);
local l_FaceSliderKnob_0 = l_StyleKey_0.FaceSliderKnob;
local v30 = {
    AnchorPoint = Vector2.new(0.5, 0.5),
    Color = l_FaceSliderKnob_0,
    Image = l_StyleKey_0.SliderKnobImage,
    Size = UDim2.new(0, 6.5, 0, 6.5),
    [l_StyleModifier_0.Disabled] = {
        Color = l_StyleKey_0.Button
    }
};
local v31 = {
    AnchorPoint = Vector2.new(0.5, 0.5),
    Color = l_FaceSliderKnob_0,
    Image = l_StyleKey_0.SliderKnobImage,
    Size = UDim2.new(0, 9, 0, 9),
    [l_StyleModifier_0.Disabled] = {
        Color = l_StyleKey_0.Button
    }
};
local v32 = {
    KnobSize = Vector2.new(18, 18),
    Background = l_Image_0,
    BackgroundStyle = {
        Background = Color3.fromRGB(87, 87, 87),
        Size = UDim2.new(1, 0, 0, 1)
    },
    Foreground = l_Image_0,
    ForegroundStyle = {
        Background = l_StyleKey_0.DialogMainButton,
        Size = UDim2.new(1, 0, 0, 1),
        [l_StyleModifier_0.Disabled] = {
            Background = l_StyleKey_0.Button
        }
    },
    LowerKnobBackground = l_Image_0,
    LowerKnobBackgroundStyle = v30,
    UpperKnobBackground = l_Image_0,
    UpperKnobBackgroundStyle = v30
};
local v33 = {
    KnobSize = Vector2.new(18, 18),
    Background = l_Image_0,
    BackgroundStyle = {
        Background = Color3.fromRGB(87, 87, 87),
        Size = UDim2.new(1, 0, 0, 1)
    },
    Foreground = l_Image_0,
    ForegroundStyle = {
        Background = l_StyleKey_0.DialogMainButton,
        Size = UDim2.new(1, 0, 0, 1),
        [l_StyleModifier_0.Disabled] = {
            Background = l_StyleKey_0.Button
        }
    },
    LowerKnobBackground = l_Image_0,
    LowerKnobBackgroundStyle = v31,
    UpperKnobBackground = l_Image_0,
    UpperKnobBackgroundStyle = v31
};
local v34 = {
    KnobSize = Vector2.new(18, 18),
    Background = l_Image_0,
    BackgroundStyle = {
        AnchorPoint = Vector2.new(0, 0.5),
        Color = Color3.fromRGB(87, 87, 87),
        Position = UDim2.new(0, 0, 0.5, 0),
        ScaleType = Enum.ScaleType.Slice,
        Size = UDim2.new(UDim.new(1, 0), UDim.new(1, 0)),
        SliceCenter = v28,
        BackgroundTransparency = 1,
        ImageTransparency = 1
    },
    ForegroundStyle = {
        AnchorPoint = Vector2.new(0, 0.5),
        Image = "rbxasset://textures/DeveloperFramework/slider_bg.png",
        Color = l_StyleKey_0.DialogMainButton,
        ScaleType = Enum.ScaleType.Slice,
        Size = UDim2.new(UDim.new(1, 0), UDim.new(0, 1)),
        SliceCenter = v28,
        [l_StyleModifier_0.Disabled] = {
            Color = l_StyleKey_0.Button
        }
    },
    OutlineStyle = {
        Color = Color3.fromRGB(87, 87, 87)
    },
    KnobBackground = l_Image_0,
    KnobBackgroundStyle = v30
};
local v35 = {
    KnobSize = Vector2.new(18, 18),
    Background = l_Image_0,
    BackgroundStyle = {
        AnchorPoint = Vector2.new(0, 0.5),
        Color = Color3.fromRGB(87, 87, 87),
        Position = UDim2.new(0, 0, 0.5, 0),
        ScaleType = Enum.ScaleType.Slice,
        Size = UDim2.new(UDim.new(1, 0), UDim.new(1, 0)),
        SliceCenter = v28,
        BackgroundTransparency = 1,
        ImageTransparency = 1
    },
    ForegroundStyle = {
        AnchorPoint = Vector2.new(0, 0.5),
        Image = "rbxasset://textures/DeveloperFramework/slider_bg.png",
        Color = l_StyleKey_0.DialogMainButton,
        ScaleType = Enum.ScaleType.Slice,
        Size = UDim2.new(UDim.new(1, 0), UDim.new(0, 1)),
        SliceCenter = v28,
        [l_StyleModifier_0.Disabled] = {
            Color = l_StyleKey_0.Button
        }
    },
    OutlineStyle = {
        Color = Color3.fromRGB(87, 87, 87)
    },
    KnobBackground = l_Image_0,
    KnobBackgroundStyle = v31
};
local v36 = {
    slice = Rect.new(3, 3, 13, 13),
    backgroundImage = "rbxasset://textures/StudioToolbox/RoundedBackground.png",
    borderImage = "rbxasset://textures/StudioToolbox/RoundedBorder.png"
};
local v37 = {
    MediaControl = {
        Background = l_Box_0,
        BackgroundStyle = {
            Color = l_StyleKey_0.MainBackground,
            BorderColor = l_StyleKey_0.Border,
            BorderSize = 1
        },
        [l_StyleModifier_0.Hover] = {
            BackgroundStyle = {
                Color = l_StyleKey_0.ButtonHover,
                BorderColor = l_StyleKey_0.Border,
                BorderSize = 1
            }
        }
    },
    EventFilter = {
        Background = l_Box_0,
        BackgroundStyle = {
            Color = l_StyleKey_0.TrackTitleBackgroundColor
        },
        [l_StyleModifier_0.Hover] = {
            BackgroundStyle = {
                Color = l_StyleKey_0.ButtonHover
            }
        }
    },
    ActiveControl = {
        Background = l_Box_0,
        BackgroundStyle = {
            Color = l_StyleKey_0.DialogMainButton,
            BorderColor = l_StyleKey_0.DialogMainButton,
            BorderSize = 1
        },
        [l_StyleModifier_0.Hover] = {
            BackgroundStyle = {
                Color = l_StyleKey_0.DialogMainButtonHover,
                BorderColor = l_StyleKey_0.DialogMainButtonHover,
                BorderSize = 1
            }
        }
    },
    IKDefault = {
        Background = l_RoundBox_0
    },
    IKActive = {
        Background = l_RoundBox_0
    },
    FaceControlsEditorActive = {
        Background = l_RoundBox_0
    },
    FaceControlsEditorDefault = {
        Background = l_RoundBox_0
    }
};
local v38 = l_getRawComponentStyle_0("Button");
local v39 = l_join_0(v38, {
    ["&ACEHeaderButtonDefault"] = l_join_0(v38["&Round"], {
        Background = l_RoundBox_0
    }),
    ["&ACEHeaderButtonActive"] = l_join_0(v38["&RoundPrimary"], {})
});
local v40 = {
    imageColor = l_StyleKey_0.EventMarkerImageColor,
    borderColor = l_StyleKey_0.EventMarkerBorderColor,
    selectionBorderColor = l_StyleKey_0.DialogMainButton,
    mainImage = "rbxasset://textures/AnimationEditor/eventMarker_inner.png",
    borderImage = "rbxasset://textures/AnimationEditor/eventMarker_border.png",
    selectionBorderImage = "rbxasset://textures/AnimationEditor/eventMarker_border_selected.png",
    textSize = 15
};
local v41 = {
    controlImage = "rbxasset://textures/AnimationEditor/button_zoom.png",
    arrowImage = "rbxasset://textures/AnimationEditor/img_triangle.png",
    imageColor = l_StyleKey_0.MainText,
    controlColor = l_StyleKey_0.ScrollBarControl,
    hoverColor = l_StyleKey_0.ScrollBarHover,
    pressedColor = l_StyleKey_0.ScrollBarPressed,
    backgroundColor = l_StyleKey_0.ScrollBarBackground,
    borderColor = l_StyleKey_0.InputFieldBorder,
    borderSize = 1
};
local v42 = {
    font = Enum.Font.SourceSans,
    backgroundColor = l_StyleKey_0.MainBackground,
    borderColor = l_StyleKey_0.Border,
    playbackTheme = v20,
    dropdownTheme = v21,
    trackTheme = v22,
    eventTheme = {
        filterButton = {
            image = "rbxasset://textures/StudioSharedUI/filter.png",
            size = UDim2.fromOffset(16, 16)
        }
    },
    keyframeTheme = v26,
    eventMarker = v40,
    selectionBox = l_StyleKey_0.DialogMainButton,
    zoomBarTheme = v41,
    scrollBarTheme = v41,
    timelineTheme = {
        lineColor = l_StyleKey_0.DimmedText,
        textColor = l_StyleKey_0.DimmedText,
        dimmedColor = l_StyleKey_0.TimelineDimmedColor,
        barColor = l_StyleKey_0.MainBackground,
        backgroundColor = l_StyleKey_0.TimelineBackgroundColor,
        lowerTransparency = 0.85,
        lowerBrightTransparency = 0.7,
        textSize = 15
    },
    scaleControlsTheme = v23,
    textBox = v24,
    settingsButtonTheme = v25,
    dialogTheme = {
        textSize = 16,
        subTextSize = 15,
        headerFont = Enum.Font.SourceSansSemibold,
        textColor = l_StyleKey_0.MainText,
        subTextColor = l_StyleKey_0.DimmedText,
        errorTextColor = l_StyleKey_0.ErrorText,
        deleteImage = "rbxasset://textures/AnimationEditor/icon_close.png",
        addImage = "rbxasset://textures/AnimationEditor/icon_add.png",
        errorImage = "rbxasset://textures/AnimationEditor/icon_error.png"
    },
    toastTheme = {
        textSize = 16,
        textColor = l_StyleKey_0.MainText,
        shadowTransparency = 0.75,
        shadowColor = Color3.new(),
        shadowSize = 35
    },
    startScreenTheme = {
        textSize = 16,
        textColor = l_StyleKey_0.MainText,
        darkTextColor = l_StyleKey_0.StartScreenDarkTextColor
    },
    gridTheme = {
        lineColor = BrickColor.new(Color3.new(1, 1, 1))
    },
    ikTheme = {
        textColor = l_StyleKey_0.MainText,
        primaryTextColor = l_StyleKey_0.MainTextSelected,
        textSize = 15,
        lineColor = l_StyleKey_0.DimmedText,
        ikLineColor = Color3.fromRGB(182, 80, 203),
        transparency = 0.6,
        leafNodeImage = "rbxasset://textures/AnimationEditor/icon_hierarchy_end_white.png",
        expandImage = "rbxasset://textures/AnimationEditor/button_expand.png",
        collapseImage = "rbxasset://textures/AnimationEditor/button_collapse.png",
        pinImage = "rbxasset://textures/AnimationEditor/Pin.png",
        iconColor = l_StyleKey_0.DimmedText,
        iconHighlightColor = l_StyleKey_0.BrightText,
        selected = l_StyleKey_0.ItemSelected,
        headerColor = l_StyleKey_0.IKHeaderColor,
        headerBorder = l_StyleKey_0.IKHeaderBorder,
        pinHover = l_StyleKey_0.DialogMainButtonHover
    },
    checkBox = v27,
    faceSliderTheme = v32,
    faceSliderMaxValueTheme = v33,
    faceDragBoxTheme = v34,
    faceDragBoxMaxValueTheme = v35,
    roundFrame = v36,
    button = v37,
    keyframe = {
        Default = {
            backgroundColor = l_StyleKey_0.DialogButtonTextDisabled,
            borderColor = l_StyleKey_0.DimmedText,
            selected = {
                backgroundColor = l_StyleKey_0.DialogButtonTextDisabled,
                borderColor = l_StyleKey_0.DialogMainButton
            }
        },
        Primary = {
            backgroundColor = l_StyleKey_0.KeyframePrimaryBackgroundColor,
            borderColor = l_StyleKey_0.Border,
            selected = {
                backgroundColor = l_StyleKey_0.KeyframePrimaryBackgroundColorSelected,
                borderColor = l_Colors_0.Blue
            }
        },
        Error = {
            backgroundColor = l_StyleKey_0.KeyframeErrorBackgroundColor,
            borderColor = l_StyleKey_0.KeyframeErrorBorderColor,
            selected = {
                backgroundColor = l_StyleKey_0.KeyframeErrorBackgroundColorSelected,
                borderColor = l_StyleKey_0.KeyframeErrorBorderColorSelected
            }
        },
        PrimaryError = {
            backgroundColor = l_StyleKey_0.KeyframePrimaryErrorBackgroundColor,
            borderColor = l_StyleKey_0.KeyframePrimaryErrorBorderColor,
            selected = {
                backgroundColor = l_StyleKey_0.KeyframePrimaryErrorBackgroundColorSelected,
                borderColor = l_StyleKey_0.KeyframePrimaryErrorBorderColorSelected
            }
        },
        Bounce = {
            backgroundColor = Color3.fromRGB(155, 198, 204),
            borderColor = Color3.fromRGB(56, 56, 56),
            selected = {
                backgroundColor = Color3.fromRGB(155, 198, 204),
                borderColor = l_StyleKey_0.DialogMainButton
            }
        },
        Constant = {
            backgroundColor = Color3.fromRGB(156, 147, 226),
            borderColor = Color3.fromRGB(56, 56, 56),
            selected = {
                backgroundColor = Color3.fromRGB(156, 147, 226),
                borderColor = l_StyleKey_0.DialogMainButton
            }
        },
        Cubic = {
            backgroundColor = Color3.fromRGB(254, 189, 81),
            borderColor = Color3.fromRGB(56, 56, 56),
            selected = {
                backgroundColor = Color3.fromRGB(254, 189, 81),
                borderColor = l_StyleKey_0.DialogMainButton
            }
        },
        Elastic = {
            backgroundColor = Color3.fromRGB(137, 187, 77),
            borderColor = Color3.fromRGB(56, 56, 56),
            selected = {
                backgroundColor = Color3.fromRGB(137, 187, 77),
                borderColor = l_StyleKey_0.DialogMainButton
            }
        }
    },
    scrubberTheme = {
        backgroundColor = l_StyleKey_0.DialogMainButton,
        image = "rbxasset://textures/AnimationEditor/img_scrubberhead.png"
    },
    faceCaptureTheme = {
        faceCaptureDefaultButtonIconColor = l_StyleKey_0.FaceCaptureDefaultButtonIconColor,
        stopRecordingButtonImage = l_StyleKey_0.StopRecordingButtonImage,
        errorIcon = "rbxasset://textures/AnimationEditor/icon_error.png",
        warningIcon = "rbxasset://textures/AnimationEditor/icon_warning.png"
    },
    curveTheme = {
        default = l_StyleKey_0.MainText,
        positionX = l_StyleKey_0.CurvePositionX,
        positionY = l_StyleKey_0.CurvePositionY,
        positionZ = l_StyleKey_0.CurvePositionZ,
        rotationX = l_StyleKey_0.CurveRotationX,
        rotationY = l_StyleKey_0.CurveRotationY,
        rotationZ = l_StyleKey_0.CurveRotationZ,
        selected = l_StyleKey_0.DialogMainButton,
        xAxis = l_StyleKey_0.BrightText,
        curveEditorButton = l_StyleKey_0.CurveEditorButton,
        dopesheetButton = l_StyleKey_0.DopeSheetButton,
        tangentControlColor = l_StyleKey_0.BrightText,
        tangentAutoButton = "rbxasset://textures/AnimationEditor/TangentHandle_Automatic_9x9.png",
        tangentDefinedButton = "rbxasset://textures/AnimationEditor/TangentHandle_SelfDefined_9x9.png"
    },
    progressBarTheme = {
        backgroundColor = l_Colors_0.Blue
    },
    [l_ComponentSymbols_0.Button] = v39,
    radioButton = {
        font = Enum.Font.SourceSans,
        textColor = l_StyleKey_0.MainText,
        textSize = 15,
        buttonHeight = 20,
        radioButtonBackground = "rbxasset://textures/GameSettings/RadioButton.png",
        radioButtonSelected = "rbxasset://textures/ui/LuaApp/icons/ic-blue-dot.png",
        contentPadding = 16,
        buttonPadding = 6
    }
};
return function(v43)
    return ((if not v43 then l_StudioTheme_0.new(v19, v18) else l_StudioTheme_0.mock(v19, v18)):extend(v42));
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Util.AnimationData);
local _ = require(l_script_FirstAncestor_0.Src.Util.isEmpty);
local _ = require(l_script_FirstAncestor_0.Src.Util.PathUtils);
return {
    PruneSelectedTracks = function(v4, v5)
        local v6 = {};
        local v7 = false;
        if v5 then
            for _, v9 in ipairs(v5) do
                if not v1.getTrack(v4, "Root", v9) then
                    v7 = true;
                else
                    table.insert(v6, v9);
                end;
            end;
        end;
        return v6, v7;
    end
};


local function v0(v1, v2)
    local v3 = {};
    local v4 = v2(v1);
    if v4 then
        for _, v6 in ipairs(v4) do
            v3[v6] = v0(v6, v2);
        end;
    end;
    return v3;
end;
return v0;


return function(v0, v1)
    local v2 = {};
    local v3 = {};
    local v4 = {};
    local v5 = {};
    for _, v7 in v0, nil, nil do
        v2[v7] = true;
    end;
    for _, v9 in v1, nil, nil do
        v3[v9] = true;
        if not v2[v9] then
            table.insert(v4, v9);
        end;
    end;
    for _, v11 in v0, nil, nil do
        if not v3[v11] then
            table.insert(v5, v11);
        end;
    end;
    return v4, v5;
end;


local function v0(v1)
    local v2 = type(v1);
    local v3 = nil;
    if v2 == "table" then
        v3 = {};
        for v4, v5 in next, v1, nil do
            v3[v0(v4)] = v0(v5);
        end;
        setmetatable(v3, v0((getmetatable(v1))));
        return v3;
    else
        return v1;
    end;
end;
return v0;


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


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Promise);
local v3 = require(l_script_FirstAncestor_0.Src.Components.BlockingDialog.BlockingDialog);
return function(v4, v5)
    return v2.new(function(v6)
        spawn(function()
            local v7 = nil;
            local function v8()
                if v7 then
                    v1.unmount(v7);
                    v6();
                end;
            end;
            v7 = v1.mount((v1.createElement(v3, {
                plugin = v4,
                OnButtonClicked = v8,
                OnClose = v8
            }, v5)));
        end);
    end):await();
end;


local v0 = false;
return function()
    if not v0 then
        v0 = true;
        local l_Parent_0 = script.Parent.Parent;
        local v2 = require(l_Parent_0.Packages.Roact);
        if require(l_Parent_0.Src.Utility.DebugFlags).EnableRoactConfigs() then
            v2.setGlobalConfig({
                elementTracing = true,
                propValidation = true,
                typeChecks = true
            });
        end;
        return ;
    else
        return ;
    end;
end;


local l_Parent_0 = script.Parent.Parent;
return function(v1, v2, v3)
    local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
    local l_Analytics_0 = l_ContextServices_0.Analytics;
    local l_Localization_0 = l_ContextServices_0.Localization;
    local l_Mouse_0 = l_ContextServices_0.Mouse;
    local l_Store_0 = l_ContextServices_0.Store;
    local v9 = require(l_Parent_0.Src.Controllers.CalloutController);
    local v10 = require(l_Parent_0.Src.Controllers.PresetController);
    local v11 = require(l_Parent_0.Src.Controllers.FileController);
    local v12 = require(l_Parent_0.Src.Controllers.QueueController);
    local v13 = require(l_Parent_0.Src.Resources.createAnalyticsHandlers);
    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 v17 = require(l_Parent_0.Src.Flags.getFFlagAssetImportEnableMultipleFiles);
    local v18 = l_ContextServices_0.Plugin.new(v1);
    local v19 = l_Mouse_0.new(v1:GetMouse());
    local v20 = l_Store_0.new(v2);
    local v21 = v14();
    local v22 = l_Localization_0.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "AssetImporter"
    });
    local v23 = v9.new();
    local v24 = v10.new(v1, v2, v22);
    local v25 = {
        Plugin = v18,
        Mouse = v19,
        Store = v20,
        Theme = v21,
        Localization = v22,
        Analytics = l_Analytics_0.new(v13),
        CalloutController = v23,
        PresetController = v24,
        FileController = v11.new(v2, v24),
        QueueController = if not v17() then nil else v12.new(v2)
    };
    if v3 then
        v25.PluginLoaderContextItem = v3;
    end;
    return v25;
end;


return function(v0, v1)
    local l_Parent_0 = script.Parent.Parent;
    if not require(l_Parent_0.Src.Flags.getFFlagAssetImportRefactorPluginInit)() then
        if v0 then
            if require(l_Parent_0.Src.Utility.DEPRECATED_shouldPluginRun)() then
                require(script.Parent.DEPRECATED_commonInit)();
            else
                return ;
            end;
        else
            return ;
        end;
    end;
    local v3 = require(l_Parent_0.Packages.Framework);
    local v4 = require(l_Parent_0.Packages.Roact);
    local v5 = require(l_Parent_0.Packages.Rodux);
    local v6 = require(l_Parent_0.Src.Reducers.MainReducer);
    local v7 = require(script.Parent.createContextItems);
    local v8 = require(l_Parent_0.Src.MainPlugin);
    local v9 = nil;
    local v10 = if not require(l_Parent_0.Src.Flags.getFFlagDebugAssetImporterPackageMigration)() then nil else v3.DeveloperTools.forPlugin(l_Parent_0.Name, v0);
    local function v11()
        v0.Name = l_Parent_0.Name;
        v9 = v4.mount((v4.createElement(v8, (v7(v0, v5.Store.new(v6, nil, {
            v5.thunkMiddleware
        }), v1)))));
    end;
    v0.Unloading:Connect(function()
        if v10 then
            v10:destroy();
        end;
        if v9 then
            v4.unmount(v9);
            v9 = nil;
        end;
    end);
    v11();
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Packages");
if not require(l_script_FirstAncestor_0.Parent.Src.Flags.getFFlagDebugAssetImporterPackageMigration)() then
    return require(l_script_FirstAncestor_0._Index.Roact.Roact);
else
    return require(l_script_FirstAncestor_0.RoactCompat);
end;


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        filepath = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function()
    return {};
end);


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Packages.Framework);
local _ = require(l_script_FirstAncestor_0.Src.DataTypes.QueuedSession);
return v1.Util.Action(script.Name, function(v3)
    return {
        activeQueueItem = v3
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        assetImportSession = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        count = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        currentPreset = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        isErrorChecked = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        filename = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        hasInvalidPackageId = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        importTree = v0
    };
end);


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Packages.Framework);
local _ = require(l_script_FirstAncestor_0.Src.Types);
return v1.Util.Action(script.Name, function(v3)
    return {
        managedGroups = v3
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        previewInstance = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        selectedImportItem = v0
    };
end);


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Packages.Framework);
local _ = require(l_script_FirstAncestor_0.Src.DataTypes.QueuedSession);
return v1.Util.Action(script.Name, function(v3)
    return {
        sessionQueue = v3
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        settingsChanged = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        showError = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        showPreview = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        showProgress = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        showQueue = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        showWarning = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "table", "checked should be a table");
    return {
        checked = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "table", "expansion should be a table");
    return {
        expansion = v0
    };
end);


return require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        uploading = v0
    };
end);