# Path: srsly/ruamel_yaml/error.py
# class YAMLError(Exception):
#     pass
# 
# class YAMLStreamError(Exception):
#     pass
# 
# Path: srsly/ruamel_yaml/compat.py
# _DEFAULT_YAML_VERSION = (1, 2)
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
#     MAXSIZE = sys.maxsize
# UNICODE_SIZE = 4 if sys.maxunicode > 65535 else 2
# DBG_TOKEN = 1
# DBG_EVENT = 2
# DBG_NODE = 4
# class ordereddict(OrderedDict):  # type: ignore
#     class ObjectCounter(object):
# class Nprint(object):
# class MutableSliceableSequence(MutableSequence):  # type: ignore
#         def insert(self, pos, key, value):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
# def with_metaclass(meta, *bases):
#         def __init__(self):
#         def __call__(self, k):
#         def dump(self):
# def dbg(val=None):
#     def __init__(self, file_name=None):
#     def __call__(self, *args, **kw):
#     def set_max_print(self, i):
# def check_namespace_char(ch):
# def check_anchorname_char(ch):
# def version_tnf(t1, t2=None):
#     def __getitem__(self, index):
#     def __setitem__(self, index, value):
#     def __delitem__(self, index):
#     def __getsingleitem__(self, index):
#     def __setsingleitem__(self, index, value):
#     def __delsingleitem__(self, index):


import sys
from .error import YAMLError, YAMLStreamError
from .events import *  # NOQA
from .compat import utf8, text_type, PY2, nprint, dbg, DBG_EVENT, \
    check_anchorname_char
    from typing import Any, Dict, List, Union, Text, Tuple, Optional  # NOQA
    from .compat import StreamType  # NOQA
                            break
                        try:
                            if text[pos + 4] in " \r\n":
                                break
                        except IndexError:
                            pass
                        pos += 1
                    if pos > -1:
                        break
                if pos > 0:
                    indent = self.best_sequence_indent
            if text[-1] not in u"\n\x85\u2028\u2029":
                indicator = u"-"
            elif len(text) == 1 or text[-2] in u"\n\x85\u2028\u2029":
                indicator = u"+"
        hints += indicator
        return hints, indent, indicator

    def write_folded(self, text):
        # type: (Any) -> None
        hints, _indent, _indicator = self.determine_block_hints(text)
        self.write_indicator(u">" + hints, True)
        if _indicator == u"+":
            self.open_ended = True
        self.write_line_break()
        leading_space = True
        spaces = False
        breaks = True
        start = end = 0
        while end <= len(text):

# Path: srsly/ruamel_yaml/error.py
# class YAMLError(Exception):
#     pass
# 
# class YAMLStreamError(Exception):
#     pass
# 
# Path: srsly/ruamel_yaml/compat.py
# _DEFAULT_YAML_VERSION = (1, 2)
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
#     MAXSIZE = sys.maxsize
# UNICODE_SIZE = 4 if sys.maxunicode > 65535 else 2
# DBG_TOKEN = 1
# DBG_EVENT = 2
# DBG_NODE = 4
# class ordereddict(OrderedDict):  # type: ignore
#     class ObjectCounter(object):
# class Nprint(object):
# class MutableSliceableSequence(MutableSequence):  # type: ignore
#         def insert(self, pos, key, value):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
# def with_metaclass(meta, *bases):
#         def __init__(self):
#         def __call__(self, k):
#         def dump(self):
# def dbg(val=None):
#     def __init__(self, file_name=None):
#     def __call__(self, *args, **kw):
#     def set_max_print(self, i):
# def check_namespace_char(ch):
# def check_anchorname_char(ch):
# def version_tnf(t1, t2=None):
#     def __getitem__(self, index):
#     def __setitem__(self, index, value):
#     def __delitem__(self, index):
#     def __getsingleitem__(self, index):
#     def __setsingleitem__(self, index, value):
#     def __delsingleitem__(self, index):


# Path: srsly/ruamel_yaml/emitter.py
import sys
from .error import YAMLError, YAMLStreamError
from .events import *  # NOQA
from .compat import utf8, text_type, PY2, nprint, dbg, DBG_EVENT, \
    check_anchorname_char
    from typing import Any, Dict, List, Union, Text, Tuple, Optional  # NOQA
    from .compat import StreamType  # NOQA

                            break
                        try:
                            if text[pos + 4] in " \r\n":
                                break
                        except IndexError:
                            pass
                        pos += 1
                    if pos > -1:
                        break
                if pos > 0:
                    indent = self.best_sequence_indent
            if text[-1] not in u"\n\x85\u2028\u2029":
                indicator = u"-"
            elif len(text) == 1 or text[-2] in u"\n\x85\u2028\u2029":
                indicator = u"+"
        hints += indicator
        return hints, indent, indicator

    def write_folded(self, text):
        # type: (Any) -> None
        hints, _indent, _indicator = self.determine_block_hints(text)
        self.write_indicator(u">" + hints, True)
        if _indicator == u"+":
            self.open_ended = True
        self.write_line_break()
        leading_space = True
        spaces = False
        breaks = True
        start = end = 0
        while end <= len(text):

            ch = None