# Path: hypebot/core/params_lib.py
# def _ParseChannel(channel):
# def _ParseChannels(channels):
#   def __init__(self, defaults=None):
#   def __str__(self):
#   def Override(self, params):
#   def _AssignValueConvertDict(self, key, value):
#   def _ParseDict(self, params):
#   def __setattr__(self, key, value):
#   def get(self, key, default_value=None):  # pylint: disable=invalid-name
#   def AsDict(self):
#   def Lock(self):
#   def _RaiseIfLocked(self):
# def MergeParams(defaults, *overrides):
# class HypeParams(object):
#   SPECIAL_ATTRS = ['_locked']
#   HAS_DYNAMIC_ATTRIBUTES = True
# 
# Path: hypebot/interfaces/interface_lib.py
# class BaseChatInterface(with_metaclass(abc.ABCMeta)):
#   DEFAULT_PARAMS = params_lib.HypeParams({
#       # Display name used when chatting.
#       'name': 'chatbot',
#   })
#   def __init__(self, params):
#   def RegisterHandlers(self, on_message_fn, user_tracker, user_prefs):
#   def Join(self, channel: hype_types.Channel):
#   def Leave(self, channel: hype_types.Channel):
#   def Loop(self):
#   def FindUser(self, query: Text) -> Optional[user_pb2.User]:
#   def WhoAll(self):
#   def SendMessage(self, channel: hype_types.Channel,
#                   message: Optional[hype_types.Message]):
#   def SendDirectMessage(self, user: user_pb2.User, message: hype_types.Message):
#   def Notice(self, channel: hype_types.Channel, message: hype_types.Message):
#   def Topic(self, channel: hype_types.Channel, new_topic: Text):


import re
from hypebot.core import params_lib
from hypebot.interfaces import interface_lib
from hypebot.protos import channel_pb2
from hypebot.protos import user_pb2
from __future__ import unicode_literals



_COLOR_PATTERN = re.compile(
    r'\x03(?P<fg>\d\d)(?:|,(?P<bg>\d\d))(?P<txt>.*?)\x0f')
_IRC_TO_TERM_COLORS = {
    '00': '37;1',
    '01': '30',
    '02': '34',
    '03': '32',
    '04': '31;1',
    '05': '31',
    '06': '35',
    '07': '33',
    '08': '33;1',
    '09': '32;1',
    '10': '36',
    '11': '36;1',
    '12': '34;1',
    '13': '35;1',
    '14': '30;1',
    '15': '37',
}


class TerminalInterface(interface_lib.BaseChatInterface):
  """See file comments."""

  DEFAULT_PARAMS = params_lib.MergeParams(

# Path: hypebot/core/params_lib.py
# def _ParseChannel(channel):
# def _ParseChannels(channels):
#   def __init__(self, defaults=None):
#   def __str__(self):
#   def Override(self, params):
#   def _AssignValueConvertDict(self, key, value):
#   def _ParseDict(self, params):
#   def __setattr__(self, key, value):
#   def get(self, key, default_value=None):  # pylint: disable=invalid-name
#   def AsDict(self):
#   def Lock(self):
#   def _RaiseIfLocked(self):
# def MergeParams(defaults, *overrides):
# class HypeParams(object):
#   SPECIAL_ATTRS = ['_locked']
#   HAS_DYNAMIC_ATTRIBUTES = True
# 
# Path: hypebot/interfaces/interface_lib.py
# class BaseChatInterface(with_metaclass(abc.ABCMeta)):
#   DEFAULT_PARAMS = params_lib.HypeParams({
#       # Display name used when chatting.
#       'name': 'chatbot',
#   })
#   def __init__(self, params):
#   def RegisterHandlers(self, on_message_fn, user_tracker, user_prefs):
#   def Join(self, channel: hype_types.Channel):
#   def Leave(self, channel: hype_types.Channel):
#   def Loop(self):
#   def FindUser(self, query: Text) -> Optional[user_pb2.User]:
#   def WhoAll(self):
#   def SendMessage(self, channel: hype_types.Channel,
#                   message: Optional[hype_types.Message]):
#   def SendDirectMessage(self, user: user_pb2.User, message: hype_types.Message):
#   def Notice(self, channel: hype_types.Channel, message: hype_types.Message):
#   def Topic(self, channel: hype_types.Channel, new_topic: Text):


# Path: hypebot/interfaces/terminal_interface.py
import re
from hypebot.core import params_lib
from hypebot.interfaces import interface_lib
from hypebot.protos import channel_pb2
from hypebot.protos import user_pb2

from __future__ import unicode_literals



_COLOR_PATTERN = re.compile(
    r'\x03(?P<fg>\d\d)(?:|,(?P<bg>\d\d))(?P<txt>.*?)\x0f')
_IRC_TO_TERM_COLORS = {
    '00': '37;1',
    '01': '30',
    '02': '34',
    '03': '32',
    '04': '31;1',
    '05': '31',
    '06': '35',
    '07': '33',
    '08': '33;1',
    '09': '32;1',
    '10': '36',
    '11': '36;1',
    '12': '34;1',
    '13': '35;1',
    '14': '30;1',
    '15': '37',
}


class TerminalInterface(interface_lib.BaseChatInterface):
  """See file comments."""

  DEFAULT_PARAMS = params_lib.MergeParams(

      interface_lib.BaseChatInterface.DEFAULT_PARAMS, {