local ____lualib = require("lualib_bundle")
local __TS__ObjectAssign = ____lualib.__TS__ObjectAssign
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
local ____exports = {}
local isObject
____exports.range = function(start, ____end)
    if not ____end then
        ____end = start
        start = 0
    end
    local result = {}
    do
        local i = start
        while i < ____end do
            result[#result + 1] = i
            i = i + 1
        end
    end
    return result
end
____exports.rangeInclusive = function(start, ____end)
    if not ____end then
        ____end = start
        start = 0
    end
    return ____exports.range(start, ____end + 1)
end
____exports.shuffle = function(array)
    do
        local i = #array - 1
        while i > 0 do
            local j = math.floor(math.random() * (i + 1))
            local temp = array[i + 1]
            array[i + 1] = array[j + 1]
            array[j + 1] = temp
            i = i - 1
        end
    end
end
____exports.applyDefaults = function(source, defaults)
    local target = __TS__ObjectAssign({}, source)
    for ____, ____value in ipairs(__TS__ObjectEntries(defaults)) do
        local k = ____value[1]
        local v = ____value[2]
        if source[k] then
            if isObject(source[k]) and isObject(v) then
                target[k] = ____exports.applyDefaults(source[k], v)
            end
        else
            target[k] = v
        end
    end
    return target
end
isObject = function(a) return type(a) == "table" end
return ____exports
