def get_source_location_by_offset(source: str, offset: int) ->int:
    """Retrieve the Solidity source code location based on the source map
    offset.

    :param source: The Solidity source to analyze
    :param offset: The source map's offset
    :return: The offset's source line number equivalent
    """
    return source.encode('utf-8')[0:offset].count('\n'.encode('utf-8')) + 1
