local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Parent.LuauPolyfill);
local l_Array_0 = v1.Array;
local l_Object_0 = v1.Object;
local v4 = require(l_Parent_0.NavigationActions);
local v5 = require(l_Parent_0.BackBehavior);
local v6 = require(script.Parent.getScreenForRouteName);
local v7 = require(script.Parent.createConfigGetter);
local v8 = require(script.Parent.validateRouteConfigMap);
local v9 = require(script.Parent.validateRouteConfigArray);
local v10 = require(l_Parent_0.utils.invariant);
local v11 = require(l_Parent_0.routers.StackActions);
local v12 = require(script.Parent.SwitchActions);
local l_createPathParser_0 = require(script.Parent.pathUtils).createPathParser;
local function v14()
    return {};
end;
local function v16(v15)
    return (next(v15));
end;
local function v21(v17, v18)
    local v19, v20 = next(v18);
    v17[v19] = v20;
    return v17;
end;
return function(v22, v23)
    v9(v22);
    v23 = v23 or {};
    local v24 = v8(l_Array_0.reduce(v22, v21, {}));
    local v25 = v23.order or l_Array_0.map(v22, v16);
    local v26 = v23.getCustomActionCreators or v14;
    local l_initialRouteParams_0 = v23.initialRouteParams;
    local v28 = v23.initialRouteName or v25[1];
    local v29 = v23.backBehavior or v5.None;
    local v30 = true;
    if v23.resetOnBlur ~= nil then
        v30 = v23.resetOnBlur;
    end;
    local v31 = l_Array_0.indexOf(v25, v28);
    if v31 < 1 then
        error(("Invalid initialRouteName '%s'. Should be one of %s"):format(v28, (table.concat(l_Array_0.map(v25, function(v32)
            return ("\"%s\""):format(v32);
        end), ", "))), 2);
    end;
    local v33 = {};
    for _, v35 in v25, nil, nil do
        local v36 = v6(v24, v35);
        if not (type(v36) == "table") or not v36.router then
            v33[v35] = false;
        else
            v33[v35] = v36.router;
        end;
    end;
    local function _(v37, v38)
        local v39 = v24[v37];
        if not (type(v39) == "table") or not v39.params then
            return v38;
        elseif not v38 then
            return (table.clone(v39.params));
        else
            return (l_Object_0.assign(table.clone(v39.params), v38));
        end;
    end;
    local v41 = l_createPathParser_0(v33, v24, v23);
    local l_getPathAndParamsForRoute_0 = v41.getPathAndParamsForRoute;
    local l_getActionForPathAndParams_0 = v41.getActionForPathAndParams;
    local function v48(v44)
        local v45 = if v44 == v28 then l_initialRouteParams_0 else nil;
        local v46 = v24[v44];
        local v47 = if type(v46) == "table" and v46.params then if v45 then l_Object_0.assign(table.clone(v46.params), v45) else table.clone(v46.params) else v45;
        v46 = v33[v44];
        if not v46 then
            return {
                key = v44,
                routeName = v44,
                params = v47
            };
        else
            return l_Object_0.assign(table.clone(v46.getStateForAction((v4.init()))), {
                key = v44,
                routeName = v44,
                params = v47
            });
        end;
    end;
    local function v58(v49, v50, v51)
        local l_v51_0 = v51;
        if not (not (not (not v50 or not v51) and v50.index ~= v51.index) or not v30) then
            local l_routeName_0 = v50.routes[v50.index].routeName;
            local v54 = table.clone(v51.routes);
            v54[v50.index] = v48(l_routeName_0);
            l_v51_0 = l_Object_0.assign(table.clone(v51), {
                routes = v54
            });
        end;
        if not (v29 == v5.History) or not (not v50 or not l_v51_0) and l_v51_0.index == v50.index then
            return l_v51_0;
        else
            local v55 = if not v50 then {} else v50.routeKeyHistory;
            if v49.type == v4.Navigate then
                local l_key_0 = l_v51_0.routes[l_v51_0.index].key;
                v55 = l_Array_0.filter(v55, function(v57)
                    return v57 ~= l_key_0;
                end);
                table.insert(v55, l_key_0);
            elseif v49.type == v4.Back then
                v55 = table.clone(v55);
                table.remove(v55, #v55);
            end;
            return l_Object_0.assign(table.clone(l_v51_0), {
                routeKeyHistory = v55
            });
        end;
    end;
    local function v61()
        local v59 = l_Array_0.map(v25, v48);
        local v60 = {
            routes = v59,
            index = v31
        };
        if v29 == v5.History then
            v60.routeKeyHistory = {
                v59[v31].key
            };
        end;
        return v60;
    end;
    return {
        childRouters = v33,
        getActionCreators = function(v62, v63)
            return v26(v62, v63);
        end,
        getScreenOptions = v7(v24, v23.defaultNavigationOptions),
        getStateForAction = function(v64, v65)
            local v66 = if not v65 then nil else table.clone(v65);
            local v67 = v65 or v61();
            local l_index_0 = v67.index;
            if v64.type == v4.Init then
                local l_params_0 = v64.params;
                if l_params_0 then
                    local l_l_params_0_0 = l_params_0 --[[ copy: 5 -> 15 ]];
                    v67.routes = l_Array_0.map(v67.routes, function(v71)
                        local v72 = v71.routeName == v28 and l_initialRouteParams_0 or {};
                        return l_Object_0.assign(table.clone(v71), {
                            params = if not v71.params then l_Object_0.assign(table.clone(l_l_params_0_0), v72) else l_Object_0.assign(table.clone(v71.params), l_l_params_0_0, v72)
                        });
                    end);
                end;
            end;
            if v64.type == v12.JumpTo and (not (v64.key ~= nil) or v64.key == v67.key) then
                local l_params_1 = v64.params;
                local v75 = l_Array_0.findIndex(v67.routes, function(v74)
                    return v74.routeName == v64.routeName;
                end);
                if v75 < 1 then
                    error(("There is no route named '%s' in the navigator with the key '%s'.\n"):format(v64.routeName, v64.key) .. "Must be one of: " .. table.concat(l_Array_0.map(v67.routes, function(v76)
                        return v76.routeName;
                    end), ","));
                end;
                local l_routes_0 = v67.routes;
                if not l_params_1 then
                    return v58(v64, v66, l_Object_0.assign(table.clone(v67), {
                        routes = l_routes_0,
                        index = v75
                    }));
                else
                    return v67.routes.map(function(v78, v79)
                        if v79 == v75 then
                            return l_Object_0.assign(table.clone(v78), {
                                params = l_Object_0.assign(table.clone(v78.params), l_params_1)
                            });
                        else
                            return v78;
                        end;
                    end);
                end;
            else
                local v80 = v67.routes[v67.index];
                local v81 = v33[v25[v67.index]];
                if v81 then
                    local v82 = v81.getStateForAction(v64, v80);
                    if v82 or not v65 then
                        if v82 and v82 ~= v80 then
                            local v83 = table.clone(v67.routes);
                            v83[v67.index] = v82;
                            return v58(v64, v66, l_Object_0.assign(table.clone(v67), {
                                routes = v83
                            }));
                        end;
                    else
                        return nil;
                    end;
                end;
                local v84 = true;
                if v64.key ~= nil then
                    v84 = v64.key == v80.key;
                end;
                if v64.type == v4.Back then
                    if v84 and v29 == v5.InitialRoute then
                        l_index_0 = v31;
                    elseif v84 and v29 == v5.Order then
                        l_index_0 = math.max(1, l_index_0 - 1);
                    elseif (v84 and v29 == v5.History) and #v67.routeKeyHistory > 1 then
                        l_index_0 = l_Array_0.indexOf(v25, v67.routeKeyHistory[#v67.routeKeyHistory - 1]);
                    end;
                end;
                local v85 = false;
                if v64.type == v4.Navigate then
                    v85 = l_Array_0.find(v25, function(v86, v87)
                        if v86 == v64.routeName then
                            l_index_0 = v87;
                            return true;
                        else
                            return false;
                        end;
                    end) ~= nil;
                    if v85 then
                        local v88 = v67.routes[l_index_0];
                        local v89 = v33[v64.routeName];
                        local l_v88_0 = v88;
                        if not (not v64.action or not v89) then
                            local v91 = v89.getStateForAction(v64.action, v88);
                            if v91 then
                                l_v88_0 = v91;
                            end;
                        end;
                        if v64.params then
                            l_v88_0 = l_Object_0.assign(table.clone(l_v88_0), {
                                params = if v64.params == l_Object_0.None then l_Object_0.None else if l_v88_0.params then l_Object_0.assign(table.clone(l_v88_0.params), v64.params) else table.clone(v64.params)
                            });
                        end;
                        if l_v88_0 ~= v88 then
                            local v92 = table.clone(v67.routes);
                            v92[l_index_0] = l_v88_0;
                            return v58(v64, v66, (l_Object_0.assign(table.clone(v67), {
                                routes = v92,
                                index = l_index_0
                            })));
                        elseif not (not (l_v88_0 == v88 and v67.index == l_index_0) or not v66) then
                            return nil;
                        end;
                    end;
                end;
                if v64.type == v4.SetParams then
                    local l_key_1 = v64.key;
                    local l_l_key_1_0 = l_key_1 --[[ copy: 9 -> 14 ]];
                    local v96 = l_Array_0.findIndex(v67.routes, function(v95)
                        return v95.key == l_l_key_1_0;
                    end);
                    if v96 > 0 then
                        local v97 = v67.routes[v96];
                        local l_None_0 = l_Object_0.None;
                        if v64.params ~= l_Object_0.None then
                            l_None_0 = if not not v97.params and v64.params then l_Object_0.assign(table.clone(v97.params), v64.params) else if v97.params then table.clone(v97.params) else if v64.params then table.clone(v64.params) else {};
                        end;
                        local v99 = table.clone(v67.routes);
                        v99[v96] = l_Object_0.assign(table.clone(v97), {
                            params = l_None_0
                        });
                        return v58(v64, v66, l_Object_0.assign(table.clone(v67), {
                            routes = v99
                        }));
                    end;
                end;
                if l_index_0 ~= v67.index then
                    return v58(v64, v66, l_Object_0.assign(table.clone(v67), {
                        index = l_index_0
                    }));
                elseif not v85 or v65 then
                    if not v85 then
                        local v100 = true;
                        if v64.type ~= v4.Back then
                            v100 = true;
                            if v64.type ~= v11.Pop then
                                v100 = v64.type == v11.PopToTop;
                            end;
                        end;
                        local v101 = not v100;
                        if not v101 then
                            v101 = false;
                            if v64.type == v4.Back then
                                v101 = v64.key ~= nil;
                            end;
                        end;
                        if v101 then
                            local l_index_1 = v67.index;
                            local l_routes_1 = v67.routes;
                            l_Array_0.find(v25, function(v104, v105)
                                local v106 = v33[v104];
                                if v105 == l_index_1 then
                                    return false;
                                else
                                    local v107 = l_routes_1[v105];
                                    if v106 then
                                        v107 = v106.getStateForAction(v64, v107);
                                    end;
                                    if v107 then
                                        if v107 ~= l_routes_1[v105] then
                                            l_routes_1 = table.clone(l_routes_1);
                                            l_routes_1[v105] = v107;
                                            l_index_1 = v105;
                                            return true;
                                        else
                                            return false;
                                        end;
                                    else
                                        l_index_1 = v105;
                                        return true;
                                    end;
                                end;
                            end);
                            if v64.preserveFocus then
                                l_index_1 = v67.index;
                            end;
                            if not (l_index_1 == v67.index) or l_routes_1 ~= v67.routes then
                                return v58(v64, v66, l_Object_0.assign(table.clone(v67), {
                                    index = l_index_1,
                                    routes = l_routes_1
                                }));
                            else
                                --[[ close >= 11 ]]
                            end;
                        end;
                        return v67;
                    else
                        return table.clone(v67);
                    end;
                else
                    return v67;
                end;
            end;
        end,
        getComponentForState = function(v108)
            local l_routeName_1 = (v108.routes[v108.index] or {}).routeName;
            v10(l_routeName_1, "There is no route defined for index '%d'. " .. "Check that you passed in a navigation state with a " .. "valid tab/screen index.", v108.index);
            local v110 = v33[l_routeName_1];
            if not v110 then
                return v6(v24, l_routeName_1);
            else
                return v110.getComponentForState(v108.routes[v108.index]);
            end;
        end,
        getComponentForRouteName = function(v111)
            return v6(v24, v111);
        end,
        getPathAndParamsForState = function(v112)
            return l_getPathAndParamsForRoute_0(v112.routes[v112.index]);
        end,
        getActionForPathAndParams = function(v113, v114)
            return l_getActionForPathAndParams_0(v113, v114);
        end
    };
end;


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Object_0 = require(l_Parent_1.Parent.LuauPolyfill).Object;
local v3 = require(l_Parent_0.SwitchRouter);
local v4 = require(l_Parent_1.BackBehavior);
return function(v5, v6)
    local v7 = {
        resetOnBlur = false,
        backBehavior = v4.InitialRoute
    };
    if v6 then
        v7 = l_Object_0.assign(v7, v6);
    end;
    return v3(v5, v7);
end;


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Object_0 = require(l_Parent_1.Parent.LuauPolyfill).Object;
local v3 = require(l_Parent_0.getScreenForRouteName);
local v4 = require(l_Parent_0.validateScreenOptions);
local v5 = require(l_Parent_1.utils.invariant);
local function v10(v6, v7, v8)
    v7 = v7 or {};
    local v9 = type(v6);
    if v9 == "function" then
        return l_Object_0.assign({}, v7, v6(l_Object_0.assign(table.clone(v8), {
            navigationOptions = v7
        })));
    elseif v9 == "table" then
        return l_Object_0.assign(table.clone(v7), v6);
    else
        return v7;
    end;
end;
return function(v11, v12)
    return function(v13, v14)
        v14 = v14 or {};
        local l_state_0 = v13.state;
        v5(type(l_state_0.routeName) == "string", "Cannot get config because the route does not have a routeName.");
        local v16 = v3(v11, l_state_0.routeName);
        local v17 = v11[l_state_0.routeName];
        local v18 = nil;
        if v17 ~= v16 then
            v18 = v17.navigationOptions;
        end;
        local v19 = if type(v16) == "table" then v16.navigationOptions else {};
        local v20 = {
            navigation = v13,
            screenProps = v14
        };
        local v21 = v10(v18, v10(v19, v10(v12, {}, v20), v20), v20);
        v4(v21, l_state_0);
        return v21;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Array_0 = require(l_Parent_0.LuauPolyfill).Array;
local v2 = require(l_Parent_0.RegExp);
local function v8(v3, v4)
    local v5 = v4:exec(v3);
    local v6 = {};
    while v5 do
        local v7 = v5[1];
        table.insert(v6, v7);
        v5 = v4:exec((v5.input:sub(v5.index + v7:len())));
    end;
    return v6;
end;
local function _(v9)
    return v9;
end;
local v11 = v2("(%[a-fA-F0-9]{2})+", "i");
local function v18(v12)
    local v13 = v11:exec(v12);
    local l_v12_0 = v12;
    if v13 then
        local v15 = {};
        for v16 in v13[1]:gmatch("%%(%x%x)") do
            local v17 = tonumber(v16, 16);
            if v17 >= 128 then
                error("malformed URI sequence");
            end;
            table.insert(v15, v17);
        end;
        l_v12_0 = utf8.char(unpack(v15));
    end;
    return l_v12_0;
end;
local v19 = v2("%[a-fA-F0-9]{2}", "i");
local v20 = v2("(" .. "%[a-fA-F0-9]{2}" .. ")+", "i");
local function v21(v22, v23)
    local l_status_0, l_result_0 = pcall(v18, table.concat(v22, ""));
    if not l_status_0 then
        if #v22 == 1 then
            return v22;
        else
            v23 = v23 or 1;
            return l_Array_0.concat(v21((l_Array_0.slice(v22, 1, v23 + 1))), v21((l_Array_0.slice(v22, v23 + 1))));
        end;
    else
        return l_result_0;
    end;
end;
local function v31(v26)
    local l_status_1, l_result_1 = pcall(v18, v26);
    if not l_status_1 then
        local v29 = v8(v26, v19);
        local v30 = 2;
        while v29[v30] do
            v26 = table.concat(v21(v29, v30), "");
            v29 = v8(v26, v19);
            v30 = v30 + 1;
        end;
        return v26;
    else
        return l_result_1;
    end;
end;
local function _(v32)
    return (v32:gsub("%%", "%%%%"));
end;
local function v46(v34)
    local v35 = utf8.char(65533);
    local v36 = {
        ["%FE%FF"] = v35 .. v35,
        ["%FF%FE"] = v35 .. v35
    };
    local v37 = {
        "%FE%FF",
        "%FF%FE"
    };
    local v38 = v20:exec(v34);
    while v38 do
        local v39 = v38[1];
        local v42, v43 = xpcall(v18, function(_)
            local v41 = v31(v39);
            if v41 ~= v39 then
                if v36[v39] == nil then
                    table.insert(v37, v39);
                end;
                v36[v39] = v41;
            end;
        end, v39);
        if v42 then
            if v36[v39] == nil then
                table.insert(v37, v39);
            end;
            v36[v39] = v43;
        end;
        v38 = v20:exec((v38.input:sub(v38.index + v39:len())));
    end;
    v36["%C2"] = v35;
    table.insert(v37, "%C2");
    for _, v45 in v37, nil, nil do
        v34 = string.gsub(v34, v45:gsub("%%", "%%%%"), (v36[v45]:gsub("%%", "%%%%")));
    end;
    return v34;
end;
return function(v47)
    if type(v47) ~= "string" then
        error("Expected `encodedURI` to be of type `string`, got `" .. typeof(v47) .. "`");
    end;
    return (v46((v47:gsub("%+", " "))));
end;


local v0 = require(script.Parent.Parent.NavigationActions);
local v1 = require(script.Parent.Parent.utils.invariant);
return function(v2)
    return {
        goBack = function(v3)
            if not (not (v3 == nil) or not v2.key) then
                v1(type(v2.key) == "string", ".goBack(): key should be a string");
                v3 = v2.key;
            end;
            return v0.back({
                key = v3
            });
        end,
        navigate = function(v4, v5, v6)
            if type(v4) == "string" then
                return v0.navigate({
                    routeName = v4,
                    params = v5,
                    action = v6
                });
            else
                v1(type(v4) == "table", ".navigate(): navigateTo must be a string or table");
                v1(v5 == nil, ".navigate(): params can only be provided with a string navigateTo value");
                v1(v6 == nil, ".navigate(): child action can only be provided with a string navigateTo value");
                return v0.navigate(v4);
            end;
        end,
        setParams = function(v7)
            v1(type(v2.key) == "string", ".setParams(): cannot be called by the root navigator");
            return v0.setParams({
                params = v7,
                key = v2.key
            });
        end
    };
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Parent.LuauPolyfill);
local l_Array_0 = v1.Array;
local l_Object_0 = v1.Object;
local v4 = require(l_Parent_0.utils.invariant);
local v5 = require(l_Parent_0.utils.isValidScreenComponent);
return function(v6, v7)
    local v8 = v6[v7];
    if v8 == nil then
        error(("There is no route defined for key %s.\nMust be one of: %s"):format(v7, table.concat(l_Array_0.map(l_Object_0.keys(v6), function(v9)
            return ("'%s'"):format(v9);
        end), ",")), 2);
    end;
    if type(v8) == "table" then
        if v8.screen ~= nil then
            v4(v5(v8.screen), "screen for key '%s' must be a valid Roact component.", v7);
            return v8.screen;
        elseif type(v8.getScreen) == "function" then
            local v10 = v8.getScreen();
            v4(v5(v10), "The getScreen defined for route '%s' didn't return a valid " .. "screen or navigator.\n\n" .. "Please pass it like this:\n" .. "%s = {\n    getScreen: function() return MyScreen end\n}", v7, v7);
            return v10;
        end;
    end;
    v4(v5(v8), "Value for key '%s' must be a route config table or a valid Roact component.", v7);
    return v8;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Array_0 = require(l_Parent_0.LuauPolyfill).Array;
local v2 = require(l_Parent_0.RegExp);
local function _(v3)
    return v3;
end;
local v5 = {};
local v6 = nil;
local v7 = nil;
local function v54(v8)
    local v9 = {};
    local v10 = 1;
    local function _(v11)
        v10 = v10 + 1;
        return v11;
    end;
    local function _(v13)
        return (string.sub(v8, v13, v13));
    end;
    local v15 = string.len(v8);
    while v10 <= v15 do
        local v16 = string.sub(v8, v10, v10);
        if not (v16 ~= "*" and v16 ~= "+") or v16 == "?" then
            local v17 = {
                type = "MODIFIER",
                index = v10
            };
            local l_v10_0 = v10;
            v10 = v10 + 1;
            local l_l_v10_0_0 = l_v10_0;
            v17.value = string.sub(v8, l_l_v10_0_0, l_l_v10_0_0);
            table.insert(v9, v17);
        elseif v16 == "\\" then
            local v20 = {
                type = "ESCAPED_CHAR"
            };
            local l_v10_1 = v10;
            v10 = v10 + 1;
            v20.index = l_v10_1;
            local l_v10_2 = v10;
            v10 = v10 + 1;
            l_v10_1 = l_v10_2;
            v20.value = string.sub(v8, l_v10_1, l_v10_1);
            table.insert(v9, v20);
        elseif v16 == "{" then
            local v23 = {
                type = "OPEN",
                index = v10
            };
            local l_v10_3 = v10;
            v10 = v10 + 1;
            local l_l_v10_3_0 = l_v10_3;
            v23.value = string.sub(v8, l_l_v10_3_0, l_l_v10_3_0);
            table.insert(v9, v23);
        elseif v16 == "}" then
            local v26 = {
                type = "CLOSE",
                index = v10
            };
            local l_v10_4 = v10;
            v10 = v10 + 1;
            local l_l_v10_4_0 = l_v10_4;
            v26.value = string.sub(v8, l_l_v10_4_0, l_l_v10_4_0);
            table.insert(v9, v26);
        elseif v16 == ":" then
            local v29 = "";
            local v30 = v10 + 1;
            do
                local l_v30_0 = v30;
                local function _(v32)
                    l_v30_0 = l_v30_0 + 1;
                    return v32;
                end;
                while l_v30_0 <= v15 do
                    local v34 = string.byte(v8, l_v30_0);
                    if not (((not (v34 >= 48) or v34 > 57) and (not (v34 >= 65) or v34 > 90)) and (not (v34 >= 97) or v34 > 122)) or v34 == 95 then
                        local l_v29_0 = v29;
                        local l_l_v30_0_0 = l_v30_0;
                        l_v30_0 = l_v30_0 + 1;
                        local l_l_l_v30_0_0_0 = l_l_v30_0_0;
                        v29 = l_v29_0 .. string.sub(v8, l_l_l_v30_0_0_0, l_l_l_v30_0_0_0);
                    else
                        break;
                    end;
                end;
                if v29 == "" then
                    error((("Missing parameter name at %d"):format(v10)));
                end;
                table.insert(v9, {
                    type = "NAME",
                    index = v10,
                    value = v29
                });
                v10 = l_v30_0;
            end;
        elseif v16 == "(" then
            local v38 = 1;
            local v39 = "";
            local v40 = v10 + 1;
            local l_v40_0 = v40;
            if string.sub(v8, l_v40_0, l_v40_0) == "?" then
                error((("Pattern cannot start with \"?\" at %d"):format(v40)));
            end;
            do
                local l_v40_1 = v40;
                local function _(v43)
                    l_v40_1 = l_v40_1 + 1;
                    return v43;
                end;
                while l_v40_1 <= v15 do
                    local l_l_v40_1_0 = l_v40_1;
                    if string.sub(v8, l_l_v40_1_0, l_l_v40_1_0) == "\\" then
                        l_v40_0 = v39;
                        local l_l_v40_1_1 = l_v40_1;
                        l_v40_1 = l_v40_1 + 1;
                        local l_l_l_v40_1_1_0 = l_l_v40_1_1;
                        local v48 = string.sub(v8, l_l_l_v40_1_1_0, l_l_l_v40_1_1_0);
                        l_l_v40_1_1 = l_v40_1;
                        l_v40_1 = l_v40_1 + 1;
                        l_l_l_v40_1_1_0 = l_l_v40_1_1;
                        v39 = l_v40_0 .. v48 .. string.sub(v8, l_l_l_v40_1_1_0, l_l_l_v40_1_1_0);
                    end;
                    l_l_v40_1_0 = l_v40_1;
                    if string.sub(v8, l_l_v40_1_0, l_l_v40_1_0) == ")" then
                        v38 = v38 - 1;
                        if v38 == 0 then
                            l_v40_1 = l_v40_1 + 1;
                            break;
                        end;
                    else
                        l_l_v40_1_0 = l_v40_1;
                        if string.sub(v8, l_l_v40_1_0, l_l_v40_1_0) == "(" then
                            v38 = v38 + 1;
                            l_l_v40_1_0 = l_v40_1 + 1;
                            if string.sub(v8, l_l_v40_1_0, l_l_v40_1_0) ~= "?" then
                                error((("Capturing groups are not allowed at %d"):format(l_v40_1)));
                            end;
                        end;
                    end;
                    l_v40_0 = v39;
                    local l_l_v40_1_2 = l_v40_1;
                    l_v40_1 = l_v40_1 + 1;
                    local l_l_l_v40_1_2_0 = l_l_v40_1_2;
                    v39 = l_v40_0 .. string.sub(v8, l_l_l_v40_1_2_0, l_l_l_v40_1_2_0);
                end;
                if v38 ~= 0 then
                    error((("Unbalanced pattern at %d"):format(v10)));
                end;
                if v39 == "" then
                    error((("Missing pattern at %d"):format(v10)));
                end;
                table.insert(v9, {
                    type = "PATTERN",
                    index = v10,
                    value = v39
                });
                v10 = l_v40_1;
            end;
        else
            local v51 = {
                type = "CHAR",
                index = v10
            };
            local l_v10_5 = v10;
            v10 = v10 + 1;
            local l_l_v10_5_0 = l_v10_5;
            v51.value = string.sub(v8, l_l_v10_5_0, l_l_v10_5_0);
            table.insert(v9, v51);
        end;
    end;
    table.insert(v9, {
        type = "END",
        index = v10,
        value = ""
    });
    return v9;
end;
v5.parse = function(v55, v56)
    local v57 = v56 or {};
    local v58 = v54(v55);
    local v59 = "./";
    if v57.prefixes ~= nil and v57.prefixes ~= "" then
        v59 = v57.prefixes;
    end;
    local v60 = string.format("[^%s]+?", v6(v57.delimiter or "/#?"));
    local v61 = {};
    local v62 = 0;
    local v63 = 1;
    local v64 = "";
    local function _(v65)
        v63 = v63 + 1;
        return v65;
    end;
    local function _(v67)
        v62 = v62 + 1;
        return v67;
    end;
    local function _(v69)
        if v63 <= #v58 and v58[v63].type == v69 then
            local l_v58_0 = v58;
            local l_v63_0 = v63;
            v63 = v63 + 1;
            return l_v58_0[l_v63_0].value;
        else
            return nil;
        end;
    end;
    local function v78(v73)
        local v74;
        if v63 <= #v58 and v58[v63].type == v73 then
            local l_v58_1 = v58;
            local l_v63_1 = v63;
            v63 = v63 + 1;
            v74 = l_v58_1[l_v63_1].value;
        else
            v74 = nil;
        end;
        if v74 ~= nil then
            return v74;
        else
            local v77 = v58[v63];
            if v77 == nil then
                error((("Expected token %s, got nil"):format(v73)));
            end;
            error((("Unexpected %s at %d, expected %s"):format(v77.type, v77.index, v73)));
            return ;
        end;
    end;
    local function v90()
        local v79 = "";
        local v80;
        if v63 <= #v58 and v58[v63].type == "CHAR" then
            local l_v58_2 = v58;
            local l_v63_2 = v63;
            v63 = v63 + 1;
            v80 = l_v58_2[l_v63_2].value;
        else
            v80 = nil;
        end;
        if not v80 then
            if v63 <= #v58 and v58[v63].type == "ESCAPED_CHAR" then
                local l_v58_3 = v58;
                local l_v63_3 = v63;
                v63 = v63 + 1;
                v80 = l_v58_3[l_v63_3].value;
            else
                v80 = nil;
            end;
        end;
        while v80 and v80 ~= "" do
            v79 = v79 .. v80;
            local v85;
            if v63 <= #v58 and v58[v63].type == "CHAR" then
                local l_v58_4 = v58;
                local l_v63_4 = v63;
                v63 = v63 + 1;
                v85 = l_v58_4[l_v63_4].value;
            else
                v85 = nil;
            end;
            if not v85 then
                if v63 <= #v58 and v58[v63].type == "ESCAPED_CHAR" then
                    local l_v58_5 = v58;
                    local l_v63_5 = v63;
                    v63 = v63 + 1;
                    v85 = l_v58_5[l_v63_5].value;
                else
                    v85 = nil;
                end;
            end;
            v80 = v85;
        end;
        return v79;
    end;
    while v63 <= #v58 do
        local v91;
        if v63 <= #v58 and v58[v63].type == "CHAR" then
            local l_v63_6 = v63;
            v63 = v63 + 1;
            v91 = v58[l_v63_6].value;
        else
            v91 = nil;
        end;
        local v93;
        if v63 <= #v58 and v58[v63].type == "NAME" then
            local l_v63_7 = v63;
            v63 = v63 + 1;
            v93 = v58[l_v63_7].value;
        else
            v93 = nil;
        end;
        local v95;
        if v63 <= #v58 and v58[v63].type == "PATTERN" then
            local l_v63_8 = v63;
            v63 = v63 + 1;
            v95 = v58[l_v63_8].value;
        else
            v95 = nil;
        end;
        if not (not v93 or v93 == "") or v95 and v95 ~= "" then
            local v97 = v91 or "";
            if string.find(v59, v97) == nil then
                v64 = v64 .. v97;
                v97 = "";
            end;
            if v64 ~= nil and v64 ~= "" then
                table.insert(v61, v64);
                v64 = "";
            end;
            local l_v93_0 = v93;
            if not (v93 ~= nil) or v93 == "" then
                local l_v62_0 = v62;
                v62 = v62 + 1;
                l_v93_0 = l_v62_0;
            end;
            local l_v95_0 = v95;
            if not (v95 ~= nil) or v95 == "" then
                l_v95_0 = v60;
            end;
            local v101 = {
                name = l_v93_0,
                prefix = v97,
                suffix = "",
                pattern = l_v95_0
            };
            local v102;
            if v63 <= #v58 and v58[v63].type == "MODIFIER" then
                local l_v63_9 = v63;
                v63 = v63 + 1;
                v102 = v58[l_v63_9].value;
            else
                v102 = nil;
            end;
            v101.modifier = v102 or "";
            table.insert(v61, v101);
        else
            local l_v91_0 = v91;
            if not l_v91_0 then
                if v63 <= #v58 and v58[v63].type == "ESCAPED_CHAR" then
                    local l_v63_10 = v63;
                    v63 = v63 + 1;
                    l_v91_0 = v58[l_v63_10].value;
                else
                    l_v91_0 = nil;
                end;
            end;
            if l_v91_0 and l_v91_0 ~= "" then
                v64 = v64 .. l_v91_0;
            else
                if v64 and v64 ~= "" then
                    table.insert(v61, v64);
                    v64 = "";
                end;
                local v106;
                if v63 <= #v58 and v58[v63].type == "OPEN" then
                    local l_v63_11 = v63;
                    v63 = v63 + 1;
                    v106 = v58[l_v63_11].value;
                else
                    v106 = nil;
                end;
                if v106 and v106 ~= "" then
                    local v108 = v90();
                    local v109;
                    if v63 <= #v58 and v58[v63].type == "NAME" then
                        local l_v63_12 = v63;
                        v63 = v63 + 1;
                        v109 = v58[l_v63_12].value;
                    else
                        v109 = nil;
                    end;
                    local v111 = v109 or "";
                    local v112;
                    if v63 <= #v58 and v58[v63].type == "PATTERN" then
                        local l_v63_13 = v63;
                        v63 = v63 + 1;
                        v112 = v58[l_v63_13].value;
                    else
                        v112 = nil;
                    end;
                    v109 = v112 or "";
                    v112 = v90();
                    v78("CLOSE");
                    if v111 == "" and v109 ~= "" then
                        local l_v62_1 = v62;
                        v62 = v62 + 1;
                        v111 = l_v62_1;
                    end;
                    if (v111 ~= "" and v111 ~= 0) and (not (v109 ~= nil) or v109 == "") then
                        v109 = v60;
                    end;
                    local v115 = {
                        name = v111,
                        pattern = v109,
                        prefix = v108,
                        suffix = v112
                    };
                    local v116;
                    if v63 <= #v58 and v58[v63].type == "MODIFIER" then
                        local l_v63_14 = v63;
                        v63 = v63 + 1;
                        v116 = v58[l_v63_14].value;
                    else
                        v116 = nil;
                    end;
                    v115.modifier = v116 or "";
                    table.insert(v61, v115);
                else
                    v78("END");
                end;
            end;
        end;
    end;
    return v61;
end;
v5.compile = function(v118, v119)
    return v5.tokensToFunction(v5.parse(v118, v119), v119);
end;
v5.tokensToFunction = function(v120, v121)
    if v121 == nil then
        v121 = {};
    end;
    local l_v121_0 = v121;
    local v123 = v7(l_v121_0);
    local v125 = l_v121_0.encode or function(v124)
        return v124;
    end;
    local l_validate_0 = l_v121_0.validate;
    if l_validate_0 == nil then
        l_validate_0 = true;
    end;
    local v128 = l_Array_0.map(v120, function(v127)
        if type(v127) == "table" then
            return v2(("^(?:%s)$"):format(v127.pattern), v123);
        else
            return nil;
        end;
    end);
    return function(v129)
        local v130 = "";
        for v131, v132 in v120, nil, nil do
            if type(v132) == "string" then
                v130 = v130 .. v132;
            else
                local v133 = if not v129 then nil else v129[tostring(v132.name)];
                local v134 = true;
                if v132.modifier ~= "?" then
                    v134 = v132.modifier == "*";
                end;
                local v135 = true;
                if v132.modifier ~= "*" then
                    v135 = v132.modifier == "+";
                end;
                if not l_Array_0.isArray(v133) then
                    local v136 = type(v133);
                    if not (v136 ~= "string") or v136 == "number" then
                        local v137 = v125(tostring(v133), v132);
                        if not (not l_validate_0 or v128[v131]:test(v137)) then
                            error((("Expected \"%s\" to match \"%s\", but got \"%s\""):format(v132.name, v132.pattern, v137)));
                        end;
                        v130 = v130 .. v132.prefix .. v137 .. v132.suffix;
                    elseif not v134 then
                        error((("Expected \"%s\" to be %s"):format(tostring(v132.name), not v135 and "a string" or "an array")));
                    end;
                else
                    if not v135 then
                        error((("Expected \"%s\" to not repeat, but got an array"):format(v132.name)));
                    end;
                    if #v133 == 0 then
                        if not v134 then
                            error((("Expected \"%s\" to not be empty"):format(v132.name)));
                        else
                            continue;
                        end;
                    end;
                    for _, v139 in v133, nil, nil do
                        local v140 = v125(v139, v132);
                        if not (not l_validate_0 or v128[v131]:test(v140)) then
                            error((("Expected all \"%s\" to match \"%s\", but got \"%s\""):format(v132.name, v132.pattern, v140)));
                        end;
                        v130 = v130 .. v132.prefix .. v140 .. v132.suffix;
                    end;
                end;
            end;
        end;
        return v130;
    end;
end;
v5.match = function(v141, v142)
    local v143 = {};
    return v5.regexpToFunction(v5.pathToRegexp(v141, v143, v142), v143, v142);
end;
v5.regexpToFunction = function(v144, v145, v146)
    if v146 == nil then
        v146 = {};
    end;
    local v148 = v146.decode or function(v147)
        return v147;
    end;
    return function(v149)
        local v150 = v144:exec(v149);
        if v150 then
            local v151 = v150[1];
            local v152 = v150.index or 0;
            local v153 = {};
            for v154 = 2, v150.n do
                if v150[v154] ~= nil then
                    local v155 = v145[v154 - 1];
                    if not (v155.modifier ~= "*") or v155.modifier == "+" then
                        v153[v155.name] = l_Array_0.map(string.split(v150[v154], v155.prefix .. v155.suffix), function(v156)
                            return v148(v156, v155);
                        end);
                    else
                        v153[v155.name] = v148(v150[v154], v155);
                    end;
                end;
            end;
            return {
                path = v151,
                index = v152,
                params = v153
            };
        else
            return false;
        end;
    end;
end;
v6 = function(v157)
    return string.gsub(v157, "[%.%+%*%?=%!:${}%(%)%[%]|/\\]", function(v158)
        return "\\" .. v158;
    end);
end;
v7 = function(v159)
    if not v159 or not v159.sensitive then
        return "i";
    else
        return "";
    end;
end;
local function v164(v160, v161, v162)
    return v2(("(?:%s)"):format(table.concat(l_Array_0.map(v160, function(v163)
        return v5.pathToRegexp(v163, v161, v162).source;
    end), "|")), v7(v162));
end;
local function v168(v165, v166, v167)
    return v5.tokensToRegexp(v5.parse(v165, v167), v166, v167);
end;
v5.tokensToRegexp = function(v169, v170, v171)
    local v172 = {};
    if v171 ~= nil then
        v172 = v171;
    end;
    local l_strict_0 = v172.strict;
    if l_strict_0 == nil then
        l_strict_0 = false;
    end;
    local l_start_0 = v172.start;
    if l_start_0 == nil then
        l_start_0 = true;
    end;
    local l_end__0 = v172.end_;
    if l_end__0 == nil then
        l_end__0 = true;
    end;
    local v177 = v172.encode or function(v176)
        return v176;
    end;
    local v178 = not v172.endsWith and "$" or ("[%s]|$"):format(v6(v172.endsWith or ""));
    local v179 = ("[%s]"):format(v6(v172.delimiter or "/#?"));
    local v180 = not l_start_0 and "" or "^";
    for _, v182 in v169, nil, nil do
        if type(v182) == "string" then
            v180 = v180 .. v6(v177(v182));
        else
            local v183 = v6(v177(v182.prefix));
            local v184 = v6(v177(v182.suffix));
            if v182.pattern and v182.pattern ~= "" then
                if v170 then
                    table.insert(v170, v182);
                end;
                if not (not v183 or v183 == "") or v184 and v184 ~= "" then
                    if not (v182.modifier ~= "+") or v182.modifier == "*" then
                        v180 = v180 .. ("(?:%s((?:%s)(?:%s%s(?:%s))*)%s)%s"):format(v183, v182.pattern, v184, v183, v182.pattern, v184, v182.modifier == "*" and "?" or "");
                    else
                        v180 = v180 .. ("(?:%s(%s)%s)%s"):format(v183, v182.pattern, v184, v182.modifier);
                    end;
                else
                    v180 = v180 .. ("(%s)%s"):format(v182.pattern, v182.modifier);
                end;
            else
                v180 = v180 .. ("(?:%s%s)%s"):format(v183, v184, v182.modifier);
            end;
        end;
    end;
    if not l_end__0 then
        local v185 = v169[#v169];
        local v186 = v185 == nil;
        if type(v185) == "string" then
            v186 = string.find(v179, v185:sub(-1)) ~= nil;
        end;
        if not l_strict_0 then
            v180 = v180 .. string.format("(?:%s(?=%s))?", v179, v178);
        end;
        if not v186 then
            v180 = v180 .. string.format("(?=%s|%s)", v179, v178);
        end;
    else
        if not l_strict_0 then
            v180 = v180 .. ("%s?"):format(v179);
        end;
        v180 = if not not v172.endsWith and v172.endsWith ~= "" then v180 .. ("(?=%s)"):format(v178) else v180 .. "$";
    end;
    return v2(v180, v7(v172));
end;
v5.pathToRegexp = function(v187, v188, v189)
    if not l_Array_0.isArray(v187) then
        return v168(v187, v188, v189);
    else
        return v164(v187, v188, v189);
    end;
end;
return v5;


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local v3 = require(l_Parent_2.LuauPolyfill);
local l_Array_0 = v3.Array;
local l_Object_0 = v3.Object;
local l_String_0 = v3.String;
local v7 = require(l_Parent_2.RegExp);
local v8 = require(l_Parent_1.utils.invariant);
local v9 = require(l_Parent_1.NavigationActions);
local v10 = require(l_Parent_0.pathToRegexp);
local l_compile_0 = v10.compile;
local l_pathToRegexp_0 = v10.pathToRegexp;
local v13 = require(l_Parent_0.queryString);
local v14 = require(l_Parent_0:FindFirstChild("ChildIsScreenRouterSymbol.roblox"));
local v15 = require(l_Parent_0:FindFirstChild("NullPathSymbol.roblox"));
local v16 = require(l_Parent_0.decodeURIComponent);
local v28 = {
    getParamsFromPath = function(v17, v18, v19)
        return (l_Array_0.reduce(l_Array_0.slice(v18, 2), function(v20, v21, v22)
            local v23 = v19[v22];
            if not v23 or v23.pattern == ".*" then
                return v20;
            else
                local l_name_0 = v23.name;
                local v25 = nil;
                if v21 then
                    local l_status_0, l_result_0 = pcall(v16, v21);
                    if l_status_0 then
                        v25 = l_result_0;
                    end;
                end;
                v20[l_name_0] = v25 or v21;
                return v20;
            end;
        end, table.clone(v17)));
    end
};
local function _(v29, v30)
    return v29[l_Array_0.findIndex(v30, function(v31)
        return v31.pattern == ".*";
    end) + 1];
end;
local function v37(v33, v34)
    if not l_Array_0.isArray(v34) then
        return v34;
    elseif #v34 == 1 then
        return v34[1];
    else
        for _, v36 in v34, nil, nil do
            if l_String_0.startsWith(v33, v36) then
                return v36;
            end;
        end;
        return nil;
    end;
end;
v28.urlToPathAndParams = function(v38, v39)
    local v40 = v7("^(.*)\\?(.*)$"):exec(v38);
    local v41 = if not v40 then v38 else v40[2];
    local v42 = v13.parse(if not v40 then {} else v40[3]);
    local v43 = v37(v41, v39);
    if not (v43 ~= nil) or v43 == "" then
        v43 = "://";
    end;
    local v44 = string.split(v41, v43)[2];
    if v44 == nil then
        v44 = v41;
    end;
    if v44 == "/" then
        v44 = "";
    end;
    if string.sub(v44, -1, -1) == "/" then
        v44 = string.sub(v44, 1, -2);
    end;
    return {
        path = v44,
        params = v42
    };
end;
v28.createPathParser = function(v45, v46, v47)
    local v48 = v47.paths or {};
    local l_disableRouteNamePaths_0 = v47.disableRouteNamePaths;
    local v50 = {};
    local v51 = {};
    for v52 in v45, nil, nil do
        local v53 = nil;
        if v48[v52] ~= nil then
            v53 = v48[v52];
        elseif type(v46[v52]) == "table" then
            v53 = v46[v52].path;
        end;
        if v53 == nil then
            v53 = if not l_disableRouteNamePaths_0 then v52 else v15;
        end;
        local l_v8_0 = v8;
        local v55 = true;
        if v53 ~= v15 then
            v55 = type(v53) == "string";
        end;
        l_v8_0(v55, "Route path for %s must be specified as a string, or RoactNavigation.NoPath.", v52);
        l_v8_0 = v53 ~= v15;
        v55 = {};
        local v56 = nil;
        if l_v8_0 then
            v56 = l_pathToRegexp_0(v53, v55);
        end;
        local v57 = {};
        local v58 = true;
        if v53 ~= "" then
            v58 = not l_v8_0;
        end;
        v50[v52] = {
            exactRe = v56,
            exactReKeys = v55,
            extendedPathRe = l_pathToRegexp_0(if not v58 then ("%s/(.*)"):format(v53) else "(.*)", v57),
            extendedPathReKeys = v57,
            isWildcard = v58,
            toPath = v53 == v15 and function()
                return "";
            end or l_compile_0(v53)
        };
    end;
    v51 = l_Object_0.entries(v50);
    return {
        getActionForPathAndParams = function(v59, v60)
            if v59 == nil then
                v59 = "";
            end;
            if v60 == nil then
                v60 = {};
            end;
            for _, v62 in v51, nil, nil do
                local v63 = v62[1];
                local v64 = v62[2];
                local l_exactRe_0 = v64.exactRe;
                local l_exactReKeys_0 = v64.exactReKeys;
                local l_extendedPathRe_0 = v64.extendedPathRe;
                local l_extendedPathReKeys_0 = v64.extendedPathReKeys;
                local v69 = v45[v63];
                local v70 = l_exactRe_0 and l_exactRe_0:exec(v59);
                if v70 and v70.n ~= 0 then
                    local v71 = l_extendedPathRe_0 and l_extendedPathRe_0:exec(v59);
                    local v72 = nil;
                    if not (not v71 or not v69) then
                        v72 = v69.getActionForPathAndParams(v71[l_Array_0.findIndex(l_extendedPathReKeys_0, function(v73)
                            return v73.pattern == ".*";
                        end) + 1], v60);
                    end;
                    return v9.navigate({
                        routeName = v63,
                        params = v28.getParamsFromPath(v60, v70, l_exactReKeys_0),
                        action = v72
                    });
                end;
            end;
            for _, v75 in v51, nil, nil do
                local v76 = v75[1];
                local v77 = v75[2];
                local l_extendedPathRe_1 = v77.extendedPathRe;
                local l_extendedPathReKeys_1 = v77.extendedPathReKeys;
                local v80 = v45[v76];
                local v81 = l_extendedPathRe_1 and l_extendedPathRe_1:exec(v59);
                if v81 and v81.n ~= 0 then
                    local v83 = v81[l_Array_0.findIndex(l_extendedPathReKeys_1, function(v82)
                        return v82.pattern == ".*";
                    end) + 1];
                    local v84 = nil;
                    if v80 then
                        v84 = v80.getActionForPathAndParams(v83, v60);
                    end;
                    if v84 then
                        return v9.navigate({
                            routeName = v76,
                            params = v28.getParamsFromPath(v60, v81, l_extendedPathReKeys_1),
                            action = v84
                        });
                    end;
                end;
            end;
            return nil;
        end,
        getPathAndParamsForRoute = function(v85)
            local l_routeName_0 = v85.routeName;
            local l_params_0 = v85.params;
            local v88 = v45[l_routeName_0];
            local v89 = v50[l_routeName_0];
            local l_toPath_0 = v89.toPath;
            local l_exactReKeys_1 = v89.exactReKeys;
            local v92 = l_toPath_0(l_params_0);
            local v93 = {};
            if l_params_0 then
                for _, v97 in (l_Array_0.filter(l_Object_0.keys(l_params_0), function(v94)
                    return not l_Array_0.find(l_exactReKeys_1, function(v95)
                        return v95.name == v94;
                    end);
                end)), nil, nil do
                    v93[v97] = l_params_0[v97];
                end;
            end;
            if v88 and v88 ~= v14 then
                local v98 = v88.getPathAndParamsForState(v85);
                return {
                    path = if not not v92 and v92 ~= "" then ("%s/%s"):format(v92, v98.path) else v98.path,
                    params = if not v98.params then v93 else l_Object_0.assign(v93, v98.params)
                };
            else
                return {
                    path = v92,
                    params = v93
                };
            end;
        end
    };
end;
return v28;


local l_HttpService_0 = game:GetService("HttpService");
local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent.Parent;
local v3 = require(l_Parent_1.LuauPolyfill);
local l_Array_0 = v3.Array;
local l_Boolean_0 = v3.Boolean;
local l_Object_0 = v3.Object;
local l_String_0 = v3.String;
local l_Number_0 = v3.Number;
local v9 = require(l_Parent_1.RegExp);
local function _(v10)
    return v10;
end;
local function v13(v12)
    return l_HttpService_0:UrlEncode(v12);
end;
local function v16(v14)
    return l_HttpService_0:UrlEncode(v14):gsub("['%(%)%*]", function(v15)
        return ("%%%x"):format(v15:byte()):upper();
    end);
end;
local v17 = require(l_Parent_0.decodeURIComponent);
local v18 = require(l_Parent_0.splitOnFirst);
local v19 = nil;
local v20 = nil;
local v21 = {};
local function _(v22)
    return tonumber(v22) or (0/0);
end;
local function v39(v24)
    local l_arrayFormat_0 = v24.arrayFormat;
    if l_arrayFormat_0 == "index" then
        return function(v26)
            return function(v27, v28)
                local v29 = #v27;
                if v24.skipNull and v28 == nil then
                    return v27;
                elseif v28 == nil then
                    return l_Array_0.concat(v27, {
                        table.concat({
                            v19(v26, v24),
                            "[",
                            v29,
                            "]"
                        }, "")
                    });
                else
                    return l_Array_0.concat(v27, {
                        table.concat({
                            v19(v26, v24),
                            "[",
                            v19(v29, v24),
                            "]=",
                            v19(v28, v24)
                        }, "")
                    });
                end;
            end;
        end;
    elseif l_arrayFormat_0 == "bracket" then
        return function(v30)
            return function(v31, v32)
                if v24.skipNull and v32 == nil then
                    return v31;
                elseif v32 == nil then
                    return l_Array_0.concat(v31, {
                        table.concat({
                            v19(v30, v24),
                            "[]"
                        }, "")
                    });
                else
                    return l_Array_0.concat(v31, {
                        table.concat({
                            v19(v30, v24),
                            "[]=",
                            v19(v32, v24)
                        }, "")
                    });
                end;
            end;
        end;
    elseif not (l_arrayFormat_0 ~= "comma") or l_arrayFormat_0 == "separator" then
        return function(v33)
            return function(v34, v35)
                if not (v35 ~= nil) or #v35 == 0 then
                    return v34;
                elseif #v34 == 0 then
                    return {
                        table.concat({
                            v19(v33, v24),
                            "=",
                            v19(v33, v24)
                        }, "")
                    };
                else
                    return {
                        table.concat({
                            v34,
                            v19(v33, v24)
                        }, v24.arrayFormatSeparator)
                    };
                end;
            end;
        end;
    else
        return function(v36)
            return function(v37, v38)
                if v24.skipNull and v38 == nil then
                    return v37;
                elseif v38 == nil then
                    return l_Array_0.concat(v37, {
                        v19(v36, v24)
                    });
                else
                    return l_Array_0.concat(v37, {
                        table.concat({
                            v19(v36, v24),
                            "=",
                            v19(v38, v24)
                        }, "")
                    });
                end;
            end;
        end;
    end;
end;
local function v58(v40)
    local v41 = nil;
    local l_arrayFormat_1 = v40.arrayFormat;
    if l_arrayFormat_1 == "index" then
        return function(v43, v44, v45)
            v41 = v9("\\[(\\d*)\\]$"):exec(v43);
            v43 = v43:gsub("%[%d*%]$", "");
            if v41 then
                if v45[v43] == nil then
                    v45[v43] = {};
                end;
                v45[v43][v41[2]] = v44;
                return ;
            else
                v45[v43] = v44;
                return ;
            end;
        end;
    elseif l_arrayFormat_1 == "bracket" then
        return function(v46, v47, v48)
            v41 = v9("(\\[\\])$"):exec(v46);
            v46 = v46:gsub("%[%]$", "");
            if v41 then
                if v48[v46] == nil then
                    v48[v46] = {
                        v47
                    };
                    return ;
                else
                    v48[v46] = l_Array_0.concat({}, v48[v46], v47);
                    return ;
                end;
            else
                v48[v46] = v47;
                return ;
            end;
        end;
    elseif not (l_arrayFormat_1 ~= "comma") or l_arrayFormat_1 == "separator" then
        return function(v49, v50, v51)
            local v52 = false;
            if type(v50) == "string" then
                v52 = string.find(v50, v40.arrayFormatSeparator, 1, true) ~= nil;
            end;
            local v53 = nil;
            if not v52 then
                if v50 ~= nil then
                    v53 = v20(v50, v40);
                end;
            else
                v53 = l_Array_0.map(v50:split(v40.arrayFormatSeparator), function(v54)
                    return v20(v54, v40);
                end);
            end;
            v51[v49] = v53;
        end;
    else
        return function(v55, v56, v57)
            if v57[v55] == nil then
                v57[v55] = v56;
                return ;
            else
                v57[v55] = l_Array_0.concat({}, v57[v55], v56);
                return ;
            end;
        end;
    end;
end;
local function _(v59)
    if not (type(v59) == "string") or #v59 ~= 1 then
        error("arrayFormatSeparator must be single character string");
    end;
end;
v19 = function(v61, v62)
    if not v62.encode then
        return v61;
    elseif not v62.strict then
        return v13(v61);
    else
        return v16(v61);
    end;
end;
v20 = function(v63, v64)
    if not v64.decode then
        return v63;
    else
        return v17(v63);
    end;
end;
local function v65(v66)
    if not l_Array_0.isArray(v66) then
        if type(v66) == "table" then
            return l_Array_0.map(l_Array_0.sort(v65(l_Object_0.keys(v66)), function(v67, v68)
                return (tonumber(v67) or (0/0)) - (tonumber(v68) or (0/0));
            end), function(v69)
                return v66[v69];
            end);
        else
            return v66;
        end;
    else
        return l_Array_0.sort(v66);
    end;
end;
local function _(v70)
    local v71 = v70:find("#");
    if v71 ~= nil then
        v70 = v70:sub(1, v71 - 1);
    end;
    return v70;
end;
local function _(v73)
    local v74 = "";
    local v75 = v73:find("#");
    if v75 ~= nil then
        v74 = v73:sub(v75);
    end;
    return v74;
end;
local function v80(v77)
    local l_v77_0 = v77;
    local v79 = l_v77_0:find("#");
    if v79 ~= nil then
        l_v77_0 = l_v77_0:sub(1, v79 - 1);
    end;
    v77 = l_v77_0;
    l_v77_0 = v77:find("?", 1, true);
    if l_v77_0 == nil then
        return "";
    else
        return v77:sub(l_v77_0 + 1);
    end;
end;
local function v83(v81, v82)
    if (not (not v82.parseNumbers or l_Number_0.isNaN(tonumber(v81) or (0/0))) and type(v81) == "string") and l_String_0.trim(v81) ~= "" then
        return tonumber(v81) or (0/0);
    else
        if (v82.parseBooleans and v81 ~= nil) and (not (string.lower(v81) ~= "true") or string.lower(v81) == "false") then
            v81 = string.lower(v81) == "true";
        end;
        return v81;
    end;
end;
local function v100(v84, v85)
    v85 = l_Object_0.assign({
        decode = true,
        sort = true,
        arrayFormat = "none",
        arrayFormatSeparator = ",",
        parseNumbers = false,
        parseBooleans = false
    }, v85);
    local l_arrayFormatSeparator_0 = v85.arrayFormatSeparator;
    if not (type(l_arrayFormatSeparator_0) == "string") or #l_arrayFormatSeparator_0 ~= 1 then
        error("arrayFormatSeparator must be single character string");
    end;
    l_arrayFormatSeparator_0 = v58(v85);
    local v87 = {};
    if type(v84) ~= "string" then
        return v87;
    else
        v84 = string.gsub(l_String_0.trim(v84), "^[%?#&]", "");
        if v84 == "" then
            return v87;
        else
            for _, v89 in v84:split("&") do
                local v90 = v18(if not v85.decode then v89 else string.gsub(v89, "%+", " "), "=");
                local v91 = v90[1];
                local v92 = v90[2];
                if v92 ~= nil and v85.arrayFormat ~= "comma" then
                    v92 = v20(v92, v85);
                end;
                l_arrayFormatSeparator_0(v20(v91, v85), v92, v87);
            end;
            for v93 in v87, nil, nil do
                local v94 = v87[v93];
                if type(v94) == "table" then
                    for v95 in v94, nil, nil do
                        v94[v95] = v83(v94[v95], v85);
                    end;
                else
                    v87[v93] = v83(v94, v85);
                end;
            end;
            if v85.sort == false then
                return v87;
            else
                local _ = nil;
                return l_Array_0.reduce(if v85.sort == true then l_Array_0.sort(l_Object_0.keys(v87)) else l_Array_0.sort(l_Object_0.keys(v87), v85.sort), function(v97, v98)
                    local v99 = v87[v98];
                    if not (l_Boolean_0.toJSBoolean(v99) and type(v99) == "table") or l_Array_0.isArray(v99) then
                        v97[v98] = v99;
                        return v97;
                    else
                        v97[v98] = v65(v99);
                        return v97;
                    end;
                end, {});
            end;
        end;
    end;
end;
v21.extract = v80;
v21.parse = v100;
v21.stringify = function(v101, v102)
    if v101 then
        v102 = l_Object_0.assign({
            encode = true,
            strict = true,
            arrayFormat = "none",
            arrayFormatSeparator = ","
        }, v102);
        local l_arrayFormatSeparator_1 = v102.arrayFormatSeparator;
        if not (type(l_arrayFormatSeparator_1) == "string") or #l_arrayFormatSeparator_1 ~= 1 then
            error("arrayFormatSeparator must be single character string");
        end;
        l_arrayFormatSeparator_1 = v39(v102);
        local v104 = l_Object_0.keys((table.clone(v101)));
        if v102.sort ~= false then
            l_Array_0.sort(v104, v102.sort);
        end;
        return table.concat(l_Array_0.filter(l_Array_0.map(v104, function(v105)
            local v106 = v101[v105];
            if v106 == nil then
                return v19(v105, v102);
            elseif not l_Array_0.isArray(v106) then
                return (v19(v105, v102) + "=") + v19(v106, v102);
            else
                return table.concat(l_Array_0.reduce(v106, l_arrayFormatSeparator_1(v105), {}), "&");
            end;
        end), function(v107)
            return v107.length > 0;
        end), "&");
    else
        return "";
    end;
end;
v21.parseUrl = function(v108, v109)
    local v110 = {};
    local l_v108_0 = v108;
    local v112 = l_v108_0:find("#");
    if v112 ~= nil then
        l_v108_0 = l_v108_0:sub(1, v112 - 1);
    end;
    v110.url = l_v108_0:split("?")[1] or "";
    local l_v100_0 = v100;
    l_v108_0 = v108;
    v112 = l_v108_0:find("#");
    if v112 ~= nil then
        l_v108_0 = l_v108_0:sub(1, v112 - 1);
    end;
    local l_l_v108_0_0 = l_v108_0;
    l_v108_0 = l_l_v108_0_0:find("?", 1, true);
    v110.query = l_v100_0(l_v108_0 == nil and "" or l_l_v108_0_0:sub(l_v108_0 + 1), v109);
    return v110;
end;
v21.stringifyUrl = function(v115, v116)
    local l_url_0 = v115.url;
    local v118 = l_url_0:find("#");
    if v118 ~= nil then
        l_url_0 = l_url_0:sub(1, v118 - 1);
    end;
    local v119 = l_url_0:split("?")[1] or "";
    local v120 = v21.parse((v21.extract(v115.url)));
    v118 = v115.url;
    local v121 = "";
    local v122 = v118:find("#");
    if v122 ~= nil then
        v121 = v118:sub(v122);
    end;
    l_url_0 = v121;
    v121 = v21.stringify(l_Object_0.assign(v120, v115.query), v116) and ("?%s"):format(v121);
    return ("%s%s%s"):format(v119, v121, l_url_0);
end;
return v21;


local function _(v0)
    return v0;
end;
return function(v2, v3)
    if not (type(v2) == "string") or type(v3) ~= "string" then
        error("Expected the arguments to be of type `string`");
    end;
    if v3 == "" then
        return {
            v2
        };
    else
        local v4 = v2:find(v3, 1, true);
        if v4 == nil then
            return {
                v2
            };
        else
            return {
                v2:sub(1, v4 - 1),
                v2:sub(v4 + v3:len())
            };
        end;
    end;
end;


local v0 = require(script.Parent.Parent.utils.invariant);
local v1 = require(script.Parent.Parent.utils.isValidScreenComponent);
return function(v2)
    v0(type(v2) == "table", "routeConfigs must be an array table");
    for v3, v4 in v2, nil, nil do
        v0(type(v3) == "number", ("routeConfigs must be an array table (found non-number key %q of type %q)"):format(v3, (type(v3))));
        local v5, v6 = next(v4);
        v0(next(v4, v5) == nil, ("only one route must be defined in each entry (found multiple at index %d)"):format(v3));
        local v7 = true;
        if type(v6) ~= "table" then
            v7 = false;
        end;
        local v8 = if not v7 then {} else v6;
        local v9 = not not v7 and v6.screen or v6;
        local l_v0_0 = v0;
        local v11 = v1(v9);
        if not v11 then
            v11 = false;
            if type(v8.getScreen) == "function" then
                v11 = v1(v8.getScreen());
            end;
        end;
        l_v0_0(v11, "The component for route '%s' must be a Roact Function/Stateful component or table with 'getScreen'." .. "getScreen function must return Roact Function/Stateful component.", v5);
        l_v0_0 = v0;
        v11 = true;
        if v8.screen ~= nil then
            v11 = v8.getScreen == nil;
        end;
        l_v0_0(v11, "Route '%s' should provide 'screen' or 'getScreen', but not both.", v5);
    end;
    v0(#v2 > 0, "Please specify at least one route when configuring a navigator.");
    return v2;
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.utils.invariant);
local v2 = require(l_Parent_0.utils.isValidScreenComponent);
local function _(v3)
    if v3 then
        if not (type(v3) == "table") or not v3.screen then
            return v3;
        else
            return v3.screen;
        end;
    else
        return nil;
    end;
end;
return function(v5)
    v1(next(v5) ~= nil, "Please specify at least one route when configuring a navigator.");
    for v6, v7 in v5, nil, nil do
        local v8 = if v7 then if type(v7) == "table" and v7.screen then v7.screen else v7 else nil;
        local v9 = type(v7) == "table";
        v1(v2(v8) or v9 and type(v7.getScreen) == "function", "The component for route '%s' must be a Roact component or table with 'getScreen'." .. " For example:\n\nlocal MyScreen = require(script.Parent.MyScreen)\n...\n%s = MyScreen,\n}\n\nYou can also use a navigator:\n\nlocal MyNavigator = require(script.Parent.MyNavigator)\n...\n%s = MyNavigator,\n}", v6, v6, v6);
        if v9 then
            local l_v1_0 = v1;
            local v11 = true;
            if v7.screen ~= nil then
                v11 = v7.getScreen == nil;
            end;
            l_v1_0(v11, "Route '%s' should declare a screen or a getScreen, not both.", v6);
        end;
    end;
    return v5;
end;


local v0 = require(script.Parent.Parent.utils.invariant);
return function(v1, v2)
    v0(type(v1.title) ~= "function", "title cannot be defined as a function in navigation options for screen '%s'", v2.routeName);
end;


local v0 = "id-" .. tostring(math.random(100000, 1000000));
local v1 = 0;
return {
    _TESTING_ONLY_normalize_keys = function()
        v0 = "id-";
        v1 = 0;
    end,
    generateKey = function()
        local v2 = v0 .. tostring(v1);
        v1 = v1 + 1;
        return v2;
    end
};


local v0 = require(script.Parent.invariant);
local v1 = {};
v1.__index = v1;
v1.new = function(v2, v3)
    v0(type(v2) == "string", "pageName should be string");
    v0(typeof(v3) == "userdata", "event should be RoactNavigation.Event");
    local v4 = {
        event = v3,
        pageName = v2
    };
    setmetatable(v4, v1);
    return v4;
end;
v1.isPageNavigationEvent = function(v5)
    return getmetatable(v5).__index == v1;
end;
v1.__tostring = function(v6)
    return string.format("%-15s - %s", tostring(v6.event), v6.pageName);
end;
v1.equalTo = function(v7, v8)
    v0(v1.isPageNavigationEvent(v8), "should be PageNavigationEvent");
    local v9 = false;
    if v7.pageName == v8.pageName then
        v9 = v7.event == v8.event;
    end;
    return v9;
end;
return v1;


local v0 = {};
local v1 = {};
local function _(v2)
    if type(v2) == "string" then
        return string.format("%s", v2);
    else
        return string.format("[%s]", (tostring(v2)));
    end;
end;
local function v6(v4)
    local v5 = type(v4);
    if v5 == "string" then
        return string.format("%q", v4);
    elseif not (v5 ~= "function") or v5 == "table" then
        return string.format("<%s>", (tostring(v4)));
    else
        return string.format("%s", (tostring(v4)));
    end;
end;
local function v11(v7, v8, v9, v10)
    print(string.format("%s%s = %s,%s", v9, if type(v7) == "string" then string.format("%s", v7) else string.format("[%s]", (tostring(v7))), v6(v8), not v10 and "" or string.format(" -- %s", v10)));
end;
v0.ShallowEqual = function(v12, v13, v14)
    if v12 and v13 then
        if v12 == v13 then
            return true;
        else
            if not v14 then
                v14 = v1;
            end;
            for v15, v16 in v12, nil, nil do
                if not (not (v13[v15] ~= v16) or v14[v15]) then
                    return false;
                end;
            end;
            for v17, v18 in v13, nil, nil do
                if not (not (v12[v17] ~= v18) or v14[v17]) then
                    return false;
                end;
            end;
            return true;
        end;
    else
        return false;
    end;
end;
local function v21(v19, v20)
    if v20 ~= 0 then
        return v19;
    else
        return v19:gsub("{1}", "first"):gsub("{2}", "second");
    end;
end;
v0.DeepEqual = function(v22, v23, v24)
    v24 = v24 or 0;
    if v22 == v23 then
        return true;
    elseif typeof(v22) ~= typeof(v23) then
        return false, v21(("{1} is of type %s, but {2} is of type %s"):format(typeof(v22), (typeof(v23))), v24);
    elseif typeof(v22) == "table" then
        local v25 = {};
        for v26, v27 in v22, nil, nil do
            v25[v26] = true;
            local v28, v29 = v0.DeepEqual(v27, v23[v26], v24 + 1);
            if not v28 then
                return false, v21(v29:gsub("{1}", ("{1}[%s]"):format((tostring(v26)))):gsub("{2}", ("{2}[%s]"):format((tostring(v26)))), v24);
            end;
        end;
        for v30, v31 in v23, nil, nil do
            if not v25[v30] then
                local v32, v33 = v0.DeepEqual(v22[v30], v31, v24 + 1);
                if not v32 then
                    return false, v21(v33:gsub("{1}", ("{1}[%s]"):format((tostring(v30)))):gsub("{2}", ("{2}[%s]"):format((tostring(v30)))), v24);
                end;
            end;
        end;
        return true;
    else
        return false, v21("{1} ~= {2}", v24);
    end;
end;
v0.EqualKey = function(v34, v35, v36)
    if not ((not (not ((not v34 or not v35) or not v36) and v36 ~= "") or not v34[v36]) or not v35[v36]) and v34[v36] == v35[v36] then
        return true;
    else
        return false;
    end;
end;
v0.TableDifference = function(v37, v38)
    local v39 = {};
    for v40, v41 in v37, nil, nil do
        if v38[v40] ~= v37[v40] then
            v39[v40] = v41;
        end;
    end;
    return v39;
end;
local function _(v42)
    local v43 = {};
    for v44 = 1, #v42 do
        v43[v42[v44]] = true;
    end;
    return v43;
end;
local _ = function(v46)
    local v47 = {};
    for v48, _ in v46, nil, nil do
        table.insert(v47, v48);
    end;
    return v47;
end;
v0.ListDifference = function(v51, v52)
    local l_TableDifference_0 = v0.TableDifference;
    local v54 = {};
    for v55 = 1, #v51 do
        v54[v51[v55]] = true;
    end;
    local l_v54_0 = v54;
    local v57 = {};
    for v58 = 1, #v52 do
        v57[v52[v58]] = true;
    end;
    l_TableDifference_0 = l_TableDifference_0(l_v54_0, v57);
    l_v54_0 = {};
    for v59, _ in l_TableDifference_0, nil, nil do
        table.insert(l_v54_0, v59);
    end;
    return l_v54_0;
end;
v0.CheckListConsistency = function(v61)
    local v62 = false;
    local v63 = false;
    local v64 = true;
    local v65 = 1;
    for v66, _ in v61, nil, nil do
        if type(v66) == "string" then
            v63 = true;
        elseif type(v66) == "number" then
            if v65 ~= v66 then
                v64 = false;
            end;
            v62 = true;
        else
            return false;
        end;
        if not v63 or not v62 then
            v65 = v65 + 1;
        else
            return false;
        end;
    end;
    if not v62 then
        return true;
    else
        return v64;
    end;
end;
v0.RecursiveToString = function(v68, v69)
    v69 = v69 or "";
    if type(v68) == "table" then
        local v70 = "";
        if not v0.CheckListConsistency(v68) then
            v70 = v70 .. "-- WARNING: this table fails the list consistency test\n";
        end;
        v70 = v70 .. "{\n";
        for v71, v72 in v68, nil, nil do
            if type(v71) == "string" then
                v70 = v70 .. "  " .. v69 .. tostring(v71) .. " = " .. v0.RecursiveToString(v72, "  " .. v69) .. ";\n";
            end;
            if type(v71) == "number" then
                v70 = v70 .. "  " .. v69 .. v0.RecursiveToString(v72, "  " .. v69) .. ",\n";
            end;
        end;
        return v70 .. v69 .. "}";
    else
        return (tostring(v68));
    end;
end;
v0.Print = function(v73, v74)
    v74 = v74 or "  ";
    if type(v73) ~= "table" then
        error("TableUtilities.Print must be passed a table", 2);
    end;
    local v75 = {};
    local function v76(v77, v78, v79)
        v75[v77] = true;
        local v80 = string.rep(v74, v79);
        local v81 = string.rep(v74, v79 + 1);
        if not v78 then
            print(string.format("%s%s {", v80, v6(v77)));
        else
            print(string.format("%s%s = %s {", v80, if type(v78) == "string" then string.format("%s", v78) else string.format("[%s]", (tostring(v78))), v6(v77)));
        end;
        for v82, v83 in v77, nil, nil do
            if type(v83) == "table" then
                if not v75[v83] then
                    v76(v83, v82, v79 + 1);
                else
                    v11(v82, v83, v81, "Possible cycle");
                end;
            else
                v11(v82, v83, v81);
            end;
        end;
        print(string.format("%s}%s", v80, v79 > 0 and "," or ""));
    end;
    v76(v73, nil, 0);
end;
v0.FieldCount = function(v84)
    local v85 = 0;
    for _ in v84, nil, nil do
        v85 = v85 + 1;
    end;
    return v85;
end;
return v0;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Array_0 = require(l_Parent_1.LuauPolyfill).Array;
local v3 = require(l_Parent_1.React);
local v4 = require(l_Parent_1.Dev.ReactRoblox);
local v5 = require(l_Parent_0.views.NavigationEvents);
local v6 = require(l_Parent_0.Events);
local v7 = require(script.Parent.invariant);
local v8 = require(script.Parent.PageNavigationEvent);
local v9 = {};
v9.__index = v9;
v9.new = function()
    local v10 = {
        navigationEvents = {}
    };
    setmetatable(v10, v9);
    return v10;
end;
v9.getNavigationEvents = function(v11)
    return v11.navigationEvents;
end;
v9.printNavigationEvents = function(v12)
    print("Total Events: ", #v12.navigationEvents);
    for _, v14 in v12.navigationEvents, nil, nil do
        print(v14);
    end;
end;
v9.waitForNumberEventsMaxWaitTime = function(v15, v16, v17)
    local v18 = 0;
    while #v15.navigationEvents < v16 and v18 <= v17 do
        v4.act(function()
            v18 = v18 + task.wait();
        end);
    end;
end;
v9.resetNavigationEvents = function(v19)
    v19.navigationEvents = {};
end;
local v20 = {
    onWillFocus = v6.WillFocus,
    onDidFocus = v6.DidFocus,
    onWillBlur = v6.WillBlur,
    onDidBlur = v6.DidBlur
};
v9.createNavigationAdapter = function(v21, v22)
    local v23 = {};
    for v24, v25 in v20, nil, nil do
        v23[v24] = function()
            v8.new(v22, v25);
            table.insert(v21.navigationEvents, v8.new(v22, v25));
        end;
    end;
    return v3.createElement(v5, v23);
end;
v9.equalTo = function(v26, v27)
    v7(type(v27) == "table", "should be a list");
    local v28 = #v26.navigationEvents;
    if v28 ~= #v27 then
        return false, "different amount of events";
    else
        for v29 = 1, v28 do
            if not v26.navigationEvents[v29]:equalTo(v27[v29]) then
                return false, ("events at position %d do not match"):format(v29);
            end;
        end;
        return true;
    end;
end;
v9.expect = function(v30, v31)
    local v32, v33 = v30:equalTo(v31);
    if not v32 then
        local v34 = "{}";
        local v35 = "{}";
        if #v30.navigationEvents > 0 then
            v34 = ("{\n  %s,\n}"):format(table.concat(l_Array_0.map(v30.navigationEvents, tostring), ",\n  "));
        end;
        if #v31 > 0 then
            v35 = ("{\n  %s,\n}"):format(table.concat(l_Array_0.map(v31, tostring), ",\n  "));
        end;
        error(("%s\nGot events: %s\n\nExpected events: %s"):format(v33, v34, v35));
    end;
end;
return v9;


return function(v0, v1)
    local l_state_0 = v0.state;
    return v0.router.getScreenOptions(v0.getChildNavigation(l_state_0.routes[l_state_0.index].key), v1);
end;


local l_Array_0 = require(script.Parent.Parent.Parent.LuauPolyfill).Array;
return function(v1)
    local l_scene_0 = v1.scene;
    local l_scenes_0 = v1.scenes;
    local l_index_0 = l_scene_0.index;
    local v5 = #l_scenes_0;
    if not l_scenes_0[v5].isActive then
        local v6 = l_Array_0.indexOf(l_scenes_0, l_scene_0);
        local v7 = nil;
        for v8, v9 in l_scenes_0, nil, nil do
            if v9.isActive then
                v7 = v8;
                break;
            end;
        end;
        local l_index_1 = l_scenes_0[v7].index;
        local l_index_2 = l_scenes_0[v5].index;
        if l_index_0 ~= l_index_1 and v6 == v5 then
            return {
                first = math.min(l_index_1, l_index_0 - 1),
                last = l_index_0 + 1
            };
        elseif l_index_0 == l_index_1 and v6 == v7 then
            return {
                first = l_index_0 - 1,
                last = math.max(l_index_2, l_index_0 + 1)
            };
        elseif not (l_index_0 ~= l_index_1) or v7 < v6 then
            return nil;
        end;
    end;
    return {
        first = l_index_0 - 1,
        last = l_index_0 + 1
    };
end;


local function v1(_)
end;
if _G.__DEV__ then
    v1 = function(v2)
        if v2 == nil then
            error("invariant requires an error message argument");
        end;
    end;
end;
return function(v3, v4, ...)
    v1(v4);
    if not v3 then
        if v4 == nil then
            error("Minified exception occurred; use the non-minified dev environment " .. "for the full error message and additional helpful warnings.", 2);
            return ;
        else
            error(string.format(v4, ...), 2);
        end;
    end;
end;


return function(v0)
    local v1 = type(v0);
    local v2 = true;
    if v1 ~= "function" then
        v2 = false;
        if v1 == "table" then
            v2 = type(v0.render) == "function";
        end;
    end;
    return v2;
end;


local v0 = require(script.Parent.Parent.Parent.Dev.ReactRoblox);
return function(v1, v2)
    v2 = v2 or 1;
    local v3 = 0;
    while not (not (v3 < v2) or v1()) do
        v0.act(function()
            v3 = v3 + task.wait();
        end);
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Parent.React);
local v2 = require(script.Parent.withNavigation);
local v3 = require(l_Parent_0.Events);
local v4 = {
    [v3.WillFocus] = "onWillFocus",
    [v3.DidFocus] = "onDidFocus",
    [v3.WillBlur] = "onWillBlur",
    [v3.DidBlur] = "onDidBlur"
};
local v5 = v1.Component:extend("NavigationEvents");
v5.didMount = function(v6)
    v6:subscribeAll();
end;
v5.didUpdate = function(v7, v8)
    if v7.props.navigation ~= v8.navigation then
        v7:removeAll();
        v7:subscribeAll();
    end;
end;
v5.willUnmount = function(v9)
    v9:removeAll();
end;
v5.getPropListener = function(v10, v11)
    return v10.props[v4[v11]];
end;
v5.subscribeAll = function(v12)
    local l_navigation_0 = v12.props.navigation;
    v12.subscriptions = {};
    for v14 in v4, nil, nil do
        v12.subscriptions[v14] = l_navigation_0.addListener(v14, function(...)
            local v15 = v12:getPropListener(v14);
            if v15 then
                v15(...);
            end;
        end);
    end;
end;
v5.removeAll = function(v16)
    for v17 in v4, nil, nil do
        local v18 = v16.subscriptions[v17];
        if v18 then
            v18.remove();
            v16.subscriptions[v17] = nil;
        end;
    end;
end;
v5.render = function(_)
    return nil;
end;
return v2(v5);


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Array_0 = require(l_Parent_1.LuauPolyfill).Array;
local v3 = require(l_Parent_1.React);
local v4 = require(l_Parent_0.Events);
local v5 = v3.Component:extend("NavigationEventManager");
v5.didMount = function(v6)
    local l_navigation_0 = v6.props.navigation;
    v6._actionSubscription = l_navigation_0.addListener(v4.Action, function(...)
        return v6:_handleAction(...);
    end);
    v6._willFocusSubscription = l_navigation_0.addListener(v4.WillFocus, function(...)
        return v6:_handleWillFocus(...);
    end);
    v6._willBlurSubscription = l_navigation_0.addListener(v4.WillBlur, function(...)
        return v6:_handleWillBlur(...);
    end);
    v6._didFocusSubscription = l_navigation_0.addListener(v4.DidFocus, function(...)
        return v6:_handleDidFocus(...);
    end);
    v6._didBlurSubscription = l_navigation_0.addListener(v4.DidBlur, function(...)
        return v6:_handleDidBlur(...);
    end);
    v6._refocusSubscription = l_navigation_0.addListener(v4.Refocus, function(...)
        return v6:_handleRefocus(...);
    end);
end;
v5.willUnmount = function(v8)
    if v8._actionSubscription then
        v8._actionSubscription.remove();
    end;
    if v8._willFocusSubscription then
        v8._willFocusSubscription.remove();
    end;
    if v8._willBlurSubscription then
        v8._willBlurSubscription.remove();
    end;
    if v8._didFocusSubscription then
        v8._didFocusSubscription.remove();
    end;
    if v8._didBlurSubscription then
        v8._didBlurSubscription.remove();
    end;
    if v8._refocusSubscription then
        v8._refocusSubscription.remove();
    end;
end;
v5._handleAction = function(v9, v10)
    local l_state_0 = v10.state;
    local l_lastState_0 = v10.lastState;
    local l_action_0 = v10.action;
    local l_type_0 = v10.type;
    local l_context_0 = v10.context;
    local l_navigation_1 = v9.props.navigation;
    local l_onEvent_0 = v9.props.onEvent;
    if l_navigation_1.isFocused() then
        local v18 = nil;
        if not (not l_lastState_0 or not l_lastState_0.routes) then
            v18 = l_lastState_0.routes[l_lastState_0.index];
        end;
        local v19 = l_state_0.routes[l_state_0.index];
        local v20 = {
            context = ("%s:%s_%s"):format(v19.key, tostring(l_action_0.type), l_context_0 or "Root"),
            state = v19,
            lastState = v18,
            action = l_action_0,
            type = l_type_0
        };
        if (v18 and v18.key) ~= v19.key then
            v9:_emitWillFocus(v19.key, v20);
            if not (not v18 or not v18.key) then
                v9:_emitWillBlur(v18.key, v20);
            end;
        end;
        if (l_lastState_0 and l_lastState_0.isTransitioning ~= l_state_0.isTransitioning) and l_state_0.isTransitioning == false then
            if v9._lastWillBlurKey then
                v9:_emitDidBlur(v9._lastWillBlurKey, v20);
            end;
            if v9._lastWillFocusKey then
                v9:_emitDidFocus(v9._lastWillFocusKey, v20);
            end;
        end;
        l_onEvent_0(v19.key, v4.Action, v20);
        return ;
    else
        return ;
    end;
end;
v5._handleWillFocus = function(v21, v22)
    local l_lastState_1 = v22.lastState;
    local l_action_1 = v22.action;
    local l_context_1 = v22.context;
    local l_type_1 = v22.type;
    local l_navigation_2 = v21.props.navigation;
    local v28 = l_navigation_2.state.routes[l_navigation_2.state.index];
    local v29 = nil;
    if not (not l_lastState_1 or not l_lastState_1.routes) then
        local v31 = not l_lastState_1 and -1 or l_Array_0.findIndex(l_lastState_1.routes, function(v30)
            return v30.key == v28.key;
        end);
        if v31 > 0 then
            v29 = l_lastState_1.routes[v31];
        end;
    end;
    v21:_emitWillFocus(v28.key, {
        context = ("%s:%s_%s"):format(v28.key, tostring(l_action_1.type), l_context_1 or "Root"),
        state = v28,
        lastState = v29,
        action = l_action_1,
        type = l_type_1
    });
end;
v5._handleWillBlur = function(v32, v33)
    local l_lastState_2 = v33.lastState;
    local l_action_2 = v33.action;
    local l_context_2 = v33.context;
    local l_type_2 = v33.type;
    local l_navigation_3 = v32.props.navigation;
    local v39 = l_navigation_3.state.routes[l_navigation_3.state.index];
    local v40 = nil;
    if not (not l_lastState_2 or not l_lastState_2.routes) then
        local v42 = not l_lastState_2 and -1 or l_Array_0.findIndex(l_lastState_2.routes, function(v41)
            return v41.key == v39.key;
        end);
        if v42 > 0 then
            v40 = l_lastState_2.routes[v42];
        end;
    end;
    v32:_emitWillBlur(v39.key, {
        context = ("%s:%s_%s"):format(v39.key, tostring(l_action_2.type), l_context_2 or "Root"),
        state = v39,
        lastState = v40,
        action = l_action_2,
        type = l_type_2
    });
end;
v5._handleDidFocus = function(v43, v44)
    local l_lastState_3 = v44.lastState;
    local l_action_3 = v44.action;
    local l_context_3 = v44.context;
    local l_type_3 = v44.type;
    local l_navigation_4 = v43.props.navigation;
    if v43._lastWillFocusKey then
        local v51 = l_Array_0.findIndex(l_navigation_4.state.routes, function(v50)
            return v50.key == v43._lastWillFocusKey;
        end);
        if v51 > 0 then
            local v52 = l_navigation_4.state.routes[v51];
            local v53 = nil;
            if not (not l_lastState_3 or not l_lastState_3.routes) then
                local v55 = not l_lastState_3 and -1 or l_Array_0.findIndex(l_lastState_3.routes, function(v54)
                    return v54.key == v52.key;
                end);
                if v55 > 0 then
                    v53 = l_lastState_3.routes[v55];
                end;
            end;
            v43:_emitDidFocus(v52.key, {
                context = ("%s:%s_%s"):format(v52.key, tostring(l_action_3.type), l_context_3 or "Root"),
                state = v52,
                lastState = v53,
                action = l_action_3,
                type = l_type_3
            });
        end;
    end;
end;
v5._handleDidBlur = function(v56, v57)
    local l_lastState_4 = v57.lastState;
    local l_action_4 = v57.action;
    local l_context_4 = v57.context;
    local l_type_4 = v57.type;
    local l_navigation_5 = v56.props.navigation;
    if v56._lastWillBlurKey then
        local v64 = l_Array_0.findIndex(l_navigation_5.state.routes, function(v63)
            return v63.key == v56._lastWillBlurKey;
        end);
        if v64 > 0 then
            local v65 = l_navigation_5.state.routes[v64];
            local v66 = nil;
            if not (not l_lastState_4 or not l_lastState_4.routes) then
                local v68 = not l_lastState_4 and -1 or l_Array_0.findIndex(l_lastState_4.routes, function(v67)
                    return v67.key == v65.key;
                end);
                if v68 > 0 then
                    v66 = l_lastState_4.routes[v68];
                end;
            end;
            v56:_emitDidBlur(v65.key, {
                context = ("%s:%s_%s"):format(v65.key, tostring(l_action_4.type), l_context_4 or "Root"),
                state = v65,
                lastState = v66,
                action = l_action_4,
                type = l_type_4
            });
        end;
    end;
end;
v5._handleRefocus = function(v69)
    local l_onEvent_1 = v69.props.onEvent;
    local l_navigation_6 = v69.props.navigation;
    l_onEvent_1(l_navigation_6.state.routes[l_navigation_6.state.index].key, v4.Refocus);
end;
v5._emitWillFocus = function(v72, v73, v74)
    if v72._lastWillBlurKey == v73 then
        v72._lastWillBlurKey = nil;
    end;
    if v72._lastWillFocusKey == v73 then
        return ;
    else
        v72._lastDidFocusKey = nil;
        v72._lastWillFocusKey = v73;
        local l_navigation_7 = v72.props.navigation;
        v72.props.onEvent(v73, v4.WillFocus, v74);
        if not (type(l_navigation_7.state.isTransitioning) == "boolean" and (not (l_navigation_7.state.isTransitioning ~= true) or l_navigation_7._dangerouslyGetParent())) then
            v72:_emitDidFocus(v73, v74);
        end;
        return ;
    end;
end;
v5._emitWillBlur = function(v76, v77, v78)
    if v76._lastWillFocusKey == v77 then
        v76._lastWillFocusKey = nil;
    end;
    if v76._lastWillBlurKey == v77 then
        return ;
    else
        v76._lastDidBlurKey = nil;
        v76._lastWillBlurKey = v77;
        local l_navigation_8 = v76.props.navigation;
        v76.props.onEvent(v77, v4.WillBlur, v78);
        if not (type(l_navigation_8.state.isTransitioning) == "boolean" and (not (l_navigation_8.state.isTransitioning ~= true) or l_navigation_8._dangerouslyGetParent())) then
            v76:_emitDidBlur(v77, v78);
        end;
        return ;
    end;
end;
v5._emitDidFocus = function(v80, v81, v82)
    if not (v80._lastWillFocusKey == v81) or v80._lastDidFocusKey == v81 then
        return ;
    else
        v80._lastDidFocusKey = v81;
        v80.props.onEvent(v81, v4.DidFocus, v82);
        return ;
    end;
end;
v5._emitDidBlur = function(v83, v84, v85)
    if not (v83._lastWillBlurKey == v84) or v83._lastDidBlurKey == v84 then
        return ;
    else
        v83._lastDidBlurKey = v84;
        v83.props.onEvent(v84, v4.DidBlur, v85);
        return ;
    end;
end;
v5.render = function(_)
    return nil;
end;
return v5;