0
  5   ˆl–Ðz¾”*i?u8 p/ÜŠbÑ¿�þB g]p%e·Ü“ùÂƒh¹ÁÀ¿      00000045
  /   ˆ{‹„„-i[D<†ªoZƒ›Ù«Ã576_‘I|¥‰ÓMdœv ©ƒ†ü+=ÃÂ @    ‹      Õ–QoÚ0Çßû)<?ìB·JmÈÔ¤¡µ€(Ó4M2±!‰ÙRöéç�LÐ´MZ'åÉçËßw÷³�äüWád0ÿ2’óû;2ýôþn4 ´ð¹7 çaõà²ÝéÇ”Ð1»(Š¢]ôÚÚ¬a>ƒÓä,a›#§Á…_ú‚âÇ‚q7%&").‰^Ð9ZÉ…[·³ÀÅVFÂ–6ŠR‘j³«‡n÷
”æ¢Q–{°’&-˜‹Ò™.„ñ¡
îÒA�Ï_j¾+Ëè¾TJy�Å–ûÌ¥ic²e‰\«>E�ÑÀ—éšXõ)ÈH+Ë„©M{-W”°ûôëh0ùæt€q¹:ð‰�Xõé»A|3é‡4³TøÀNkî�æ–wÌ"I5—+)øYñC%~�ßÏ+M(ldd†R«ƒâ1j¤›1ÇúÆÄæXUIøïvƒEO6cz;ŽçáhVm	/CªûGHƒ©³’P¡“×„Uº×ji³›ŸSR×oä:FÒ"'•�«�Ò…:æv{z’˜Ù�Šh°Ž‹|V•×ñÞ¶ºÝ–×#ïÚ»"äŒÐ½Éÿgù9j›ÛL(¾à"a»EjÍ	oáœ�NhPD0¹B™Š‹PnÅb#¹;žÎæ£•ö/h¥Ý`4¡Ê?`ÕŽ#Yd˜ÝÁjÞd ê;'ø³øÔß`ÀÜ²õ×~úò8Øƒ@Ý�ù°o}¨ºÒÐ®À_ø
        ˆÆ‘äÇò 8à
ë²ˆN .?Åƒh¹ÄÃÂ      10
  N   	ˆl–Ðz¾”*i?u8 pNÜªbÑ¿‘äÇò 8à
ë²‰’:ëÿÏÆƒh¹Åa–Ðz¾”*i?u8 pNÜªbÑ¿Ä      	0
  B   ˆl–Ãa¾”JeJ�~ã`¸ )‹Fÿ�þDXãY¹|Œe ÀçÈ„_qŸÇ_ŠI|¥�+Wé3ž¯ÀÆ .»    from pyrsistent._checked_types import (
    CheckedPMap,
    CheckedPSet,
    CheckedPVector,
    CheckedType,
    InvariantException,
    _restore_pickle,
    get_type,
    maybe_parse_user_type,
    maybe_parse_many_user_types,
)
from pyrsistent._checked_types import optional as optional_type
from pyrsistent._checked_types import wrap_invariant
import inspect


def set_fields(dct, bases, name):
    dct[name] = dict(sum([list(b.__dict__.get(name, {}).items()) for b in bases], []))

    for k, v in list(dct.items()):
        if isinstance(v, _PField):
            dct[name][k] = v
            del dct[k]


def check_global_invariants(subject, invariants):
    error_codes = tuple(error_code for is_ok, error_code in
                        (invariant(subject) for invariant in invariants) if not is_ok)
    if error_codes:
        raise InvariantException(error_codes, (), 'Global invariant failed')


def serialize(serializer, format, value):
    if isinstance(value, CheckedType) and serializer is PFIELD_NO_SERIALIZER:
        return value.serialize(format)

    return serializer(format, value)


def check_type(destination_cls, field, name, value):
    if field.type and not any(isinstance(value, get_type(t)) for t in field.type):
        actual_type = type(value)
        message = "Invalid type for field {0}.{1}, was {2}".format(destination_cls.__name__, name, actual_type.__name__)
        raise PTypeError(destination_cls, name, field.type, actual_type, message)


def is_type_cls(type_cls, field_type):
    if type(field_type) is set:
        return True
    types = tuple(field_type)
    if len(types) == 0:
        return False
    return issubclass(get_type(types[0]), type_cls)


def is_field_ignore_extra_complaint(type_cls, field, ignore_extra):
    # ignore_extra param has default False value, for speed purpose no need to propagate False
    if not ignore_extra:
        return False

    if not is_type_cls(type_cls, field.type):
        return False

    return 'ignore_extra' in inspect.signature(field.factory).parameters



class _PField(object):
    __slots__ = ('type', 'invariant', 'initial', 'mandatory', '_factory', 'serializer')

    def __init__(self, type, invariant, initial, mandatory, factory, serializer):
        self.type = type
        self.invariant = invariant
        self.initial = initial
        self.mandatory = mandatory
        self._factory = factory
        self.serializer = serializer

    @property
    def factory(self):
        # If no factory is specified and the type is another CheckedType use the factory method of that CheckedType
        if self._factory is PFIELD_NO_FACTORY and len(self.type) == 1:
            typ = get_type(tuple(self.type)[0])
            if issubclass(typ, CheckedType):
                return typ.create

        return self._factory

PFIELD_NO_TYPE = ()
PFIELD_NO_INVARIANT = lambda _: (True, None)
PFIELD_NO_FACTORY = lambda x: x
PFIELD_NO_INITIAL = object()
PFIELD_NO_SERIALIZER = lambda _, value: value


def field(type=PFIELD_NO_TYPE, invariant=PFIELD_NO_INVARIANT, initial=PFIELD_NO_INITIAL,
          mandatory=False, factory=PFIELD_NO_FA