# Path: applitools/core/logger.py
# _DEFAULT_EYES_LOGGER_NAME = 'eyes'
# _DEFAULT_EYES_FORMATTER = logging.Formatter('%(asctime)s [%(levelname)s] %(name)s: %(message)s')
# _DEFAULT_LOGGER_LEVEL = int(os.environ.get('LOGGER_LEVEL', logging.INFO))
# _DEBUG_SCREENSHOT_PREFIX = os.environ.get('DEBUG_SCREENSHOT_PREFIX', 'screenshot_')
# _DEBUG_SCREENSHOT_PATH = os.environ.get('DEBUG_SCREENSHOT_PATH', '.')
# class _Logger(ABC):
# class StdoutLogger(_Logger):
# class FileLogger(_Logger):
# class NullLogger(_Logger):
#     def __init__(self, name=__name__, level=_DEFAULT_LOGGER_LEVEL, handler_factory=lambda: None,
#                  formatter=None):
#     def open(self):
#     def close(self):
#     def info(self, msg):
#     def debug(self, msg):
#     def __init__(self, name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
#     def __init__(self, filename="eyes.log", mode='a', encoding=None, delay=0,
#                  name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
#     def __init__(self, name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
# def set_logger(logger=None):
# def open_():
# def close():
# def info(msg):
# def debug(msg):
# def warning(msg):
# def deprecation(msg):
# def save_screenshot(image, suffix, region=None):
# 
# Path: applitools/utils/compat.py
# PY3 = sys.version_info >= (3,)
#     ABC = abc.ABC
#     ABC = abc.ABCMeta(str("ABC"), (), {})
#     def gzip_compress(data, compresslevel=9):
# def iteritems(dct):


import json
import time
import types
import itertools
import typing as tp
from datetime import timedelta, tzinfo
from applitools.core import logger
from .compat import urlparse, Queue
    from selenium.webdriver.remote.webdriver import WebDriver
    from selenium.webdriver.remote.webelement import WebElement
    from selenium.webdriver.remote.switch_to import SwitchTo
    from ..selenium.webdriver import EyesWebDriver, _EyesSwitchTo
    from ..selenium.webelement import EyesWebElement
            if callable(getattr(to, attr_name)):
                if override_existing or not hasattr(from_, attr_name):
                    setattr(from_, attr_name, create_forwarded_method(from_, to, attr_name))


def cached_property(f):
    # type: (tp.Callable) -> tp.Any
    """
    Returns a cached property that is calculated by function f
    """

    def get(self):
        try:
            return self._property_cache[f]
        except AttributeError:
            self._property_cache = {}
            x = self._property_cache[f] = f(self)
            return x
        except KeyError:
            x = self._property_cache[f] = f(self)
            return x

    return property(get)


def is_absolute_url(url):
    return bool(urlparse(url).netloc)


def is_url_with_scheme(url):

# Path: applitools/core/logger.py
# _DEFAULT_EYES_LOGGER_NAME = 'eyes'
# _DEFAULT_EYES_FORMATTER = logging.Formatter('%(asctime)s [%(levelname)s] %(name)s: %(message)s')
# _DEFAULT_LOGGER_LEVEL = int(os.environ.get('LOGGER_LEVEL', logging.INFO))
# _DEBUG_SCREENSHOT_PREFIX = os.environ.get('DEBUG_SCREENSHOT_PREFIX', 'screenshot_')
# _DEBUG_SCREENSHOT_PATH = os.environ.get('DEBUG_SCREENSHOT_PATH', '.')
# class _Logger(ABC):
# class StdoutLogger(_Logger):
# class FileLogger(_Logger):
# class NullLogger(_Logger):
#     def __init__(self, name=__name__, level=_DEFAULT_LOGGER_LEVEL, handler_factory=lambda: None,
#                  formatter=None):
#     def open(self):
#     def close(self):
#     def info(self, msg):
#     def debug(self, msg):
#     def __init__(self, name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
#     def __init__(self, filename="eyes.log", mode='a', encoding=None, delay=0,
#                  name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
#     def __init__(self, name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
# def set_logger(logger=None):
# def open_():
# def close():
# def info(msg):
# def debug(msg):
# def warning(msg):
# def deprecation(msg):
# def save_screenshot(image, suffix, region=None):
# 
# Path: applitools/utils/compat.py
# PY3 = sys.version_info >= (3,)
#     ABC = abc.ABC
#     ABC = abc.ABCMeta(str("ABC"), (), {})
#     def gzip_compress(data, compresslevel=9):
# def iteritems(dct):


# Path: applitools/utils/general_utils.py
import json
import time
import types
import itertools
import typing as tp
from datetime import timedelta, tzinfo
from applitools.core import logger
from .compat import urlparse, Queue
    from selenium.webdriver.remote.webdriver import WebDriver
    from selenium.webdriver.remote.webelement import WebElement
    from selenium.webdriver.remote.switch_to import SwitchTo
    from ..selenium.webdriver import EyesWebDriver, _EyesSwitchTo
    from ..selenium.webelement import EyesWebElement

            if callable(getattr(to, attr_name)):
                if override_existing or not hasattr(from_, attr_name):
                    setattr(from_, attr_name, create_forwarded_method(from_, to, attr_name))


def cached_property(f):
    # type: (tp.Callable) -> tp.Any
    """
    Returns a cached property that is calculated by function f
    """

    def get(self):
        try:
            return self._property_cache[f]
        except AttributeError:
            self._property_cache = {}
            x = self._property_cache[f] = f(self)
            return x
        except KeyError:
            x = self._property_cache[f] = f(self)
            return x

    return property(get)


def is_absolute_url(url):
    return bool(urlparse(url).netloc)


def is_url_with_scheme(url):

    return bool(urlparse(url).scheme)