OwlCyberSecurity - MANAGER
Edit File: functools.cpython-312.pyc
� ������h4����������������������������d�Z�g�d�ZddlmZ�ddlmZ�ddlmZ�ddlm Z �ddl mZ�dZd Z ee fd �Zee fd�Zd��Zd ��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zdefdefdefgdefdefdefgdefdefdefgdefdefdefgd�Zd��Zd��Z �ddlmZ��e!��������Z"e"fd �Z# �dd!lm#Z#��G�d"��d#�������Z$ �dd$lm$Z$��G�d%��d&e!�������Z%d'��Z&�ed(g�d)��������Z'�G�d*��d+e(�������Z)�e!��������fe*e+he,e-e.fd,�Z/d;d-�Z0d.��Z1 �dd/lm1Z1�d0��Z2d1��Z3d<d3�Z4d4��Z5d5��Z6d6��Z7�G�d7��d8�������Z8�e!��������Z9�G�d9��d:�������Z:y2#�e $�r�Y���w�xY�w#�e $�r�Y���w�xY�w#�e $�r�Y���w�xY�w#�e $�r�Y��Ww�xY�w)=zEfunctools.py - Tools for working with functions and callable objects )�update_wrapper�wraps�WRAPPER_ASSIGNMENTS�WRAPPER_UPDATES�total_ordering�cache� cmp_to_key� lru_cache�reduce�partial� partialmethod�singledispatch�singledispatchmethod�cached_property�����)�get_cache_token)� namedtuple)�recursive_repr)�RLock)�GenericAlias)� __module__�__name__�__qualname__�__doc__�__annotations__�__type_params__)�__dict__c������������������������|D�]��} �t��������||�������}t��������|�||����������|D�](��}t��������|�|�������j������������������t��������||i�����������������*�||�_��������|�S�#�t��������$�r�Y��`w�xY�w)a��Update a wrapper function to look like the wrapped function wrapper is the function to be updated wrapped is the original function assigned is a tuple naming the attributes assigned directly from the wrapped function to the wrapper function (defaults to functools.WRAPPER_ASSIGNMENTS) updated is a tuple naming the attributes of the wrapper that are updated with the corresponding attribute from the wrapped function (defaults to functools.WRAPPER_UPDATES) )�getattr�setattr�AttributeError�update�__wrapped__)�wrapper�wrapped�assigned�updated�attr�values��� �0/opt/alt/python312/lib64/python3.12/functools.pyr���r���#���sz��������� *��G�T�*�E�� �G�T�5�)� ���������%�%�g�g�t�R�&@�A����"�G���N����� �� �s����A� A$�#A$c������������������(�����t��������t��������|�||��������S�)a���Decorator factory to apply update_wrapper() to a wrapper function Returns a decorator that invokes update_wrapper() with the decorated function as the wrapper argument and the arguments to wraps() as the remaining arguments. Default arguments are as for update_wrapper(). This is a convenience function to simplify applying partial() to update_wrapper(). �r$���r%���r&���)r���r���r+���s��� r)���r���r���A���s��������>�7�$�g�7��7�����c������������������`�����t��������|��������j������������������|�|�������}|t��������u�r|S�|�xr�|�|k7��S�)zIReturn a > b. Computed by @total_ordering from (not a < b) and (a != b).��type�__lt__�NotImplemented��self�other� op_results��� r)����_gt_from_ltr6���Y����7�������T� �!�!�$��.�I��N�"����=�*�T�U�]�*r,���c������������������^�����t��������|��������j������������������|�|�������}|t��������u�r|S�|xs�|�|k(��S�)zEReturn a <= b. Computed by @total_ordering from (a < b) or (a == b).r.���r2���s��� r)����_le_from_ltr9���`����5�������T� �!�!�$��.�I��N�"����%��� �%r,���c������������������R�����t��������|��������j������������������|�|�������}|t��������u�r|S�|�S�)z=Return a >= b. Computed by @total_ordering from (not a < b).r.���r2���s��� r)����_ge_from_ltr<���g����.�������T� �!�!�$��.�I��N�"����=�r,���c������������������`�����t��������|��������j������������������|�|�������}|t��������u�r|S�|�xs�|�|k(��S�)zJReturn a >= b. Computed by @total_ordering from (not a <= b) or (a == b).�r/����__le__r1���r2���s��� r)����_ge_from_lerA���n����7�������T� �!�!�$��.�I��N�"����=�)�D�E�M�)r,���c������������������^�����t��������|��������j������������������|�|�������}|t��������u�r|S�|xr�|�|k7��S�)zFReturn a < b. Computed by @total_ordering from (a <= b) and (a != b).r?���r2���s��� r)����_lt_from_lerD���u����5�������T� �!�!�$��.�I��N�"����&����&r,���c������������������R�����t��������|��������j������������������|�|�������}|t��������u�r|S�|�S�)z=Return a > b. Computed by @total_ordering from (not a <= b).r?���r2���s��� r)����_gt_from_lerG���|���r=���r,���c������������������`�����t��������|��������j������������������|�|�������}|t��������u�r|S�|�xr�|�|k7��S�)zIReturn a < b. Computed by @total_ordering from (not a > b) and (a != b).�r/����__gt__r1���r2���s��� r)����_lt_from_gtrK�������r7���r,���c������������������^�����t��������|��������j������������������|�|�������}|t��������u�r|S�|xs�|�|k(��S�)zEReturn a >= b. Computed by @total_ordering from (a > b) or (a == b).rI���r2���s��� r)����_ge_from_gtrM�������r:���r,���c������������������R�����t��������|��������j������������������|�|�������}|t��������u�r|S�|�S�)z=Return a <= b. Computed by @total_ordering from (not a > b).rI���r2���s��� r)����_le_from_gtrO�������r=���r,���c������������������`�����t��������|��������j������������������|�|�������}|t��������u�r|S�|�xs�|�|k(��S�)zJReturn a <= b. Computed by @total_ordering from (not a >= b) or (a == b).�r/����__ge__r1���r2���s��� r)����_le_from_gerS�������rB���r,���c������������������^�����t��������|��������j������������������|�|�������}|t��������u�r|S�|xr�|�|k7��S�)zFReturn a > b. Computed by @total_ordering from (a >= b) and (a != b).rQ���r2���s��� r)����_gt_from_gerU�������rE���r,���c������������������R�����t��������|��������j������������������|�|�������}|t��������u�r|S�|�S�)z=Return a < b. Computed by @total_ordering from (not a >= b).rQ���r2���s��� r)����_lt_from_gerW�������r=���r,���rJ���r@���rR���r0���)r0���r@���rJ���rR���c����������� ������������t���������D��ch�c]#��}t��������|�|d�������t��������t��������|d�������us�"|��%�}}|st��������d��������t ��������|�������}t���������|���D�]��\��}}||vs�||_��������t ��������|�||��������� �|�S�c�c}w�)z6Class decorator that fills in missing ordering methodsNz6must define at least one ordering operation: < > <= >=)�_convertr����object� ValueError�maxr���r���)�cls�op�roots�root�opname�opfuncs��� r)���r���r�������s��������#�^�(�B�g�c�2�t�&<�G�F�TV�X\�D]�&]�R�(�E�^���Q�R�R��u�:�D�"�4�.�������$�F�O��C���(��)���J��� _s ����#A7�A7c������������������*��������G���fd�dt����������������}|S�)z,Convert a cmp= function into a key= functionc��������������������P������e�Zd�ZdgZd��Z��fd�Z��fd�Z��fd�Z��fd�Z��fd�Z dZ y) �cmp_to_key.<locals>.K�objc�����������������������||�_���������y��N�rf���)r3���rf���s��� r)����__init__zcmp_to_key.<locals>.K.__init__����s �������D�Hr,���c������������������D��������|�j�������������������|j��������������������������dk��S��Nr���ri����r3���r4����mycmps��� �r)���r0���zcmp_to_key.<locals>.K.__lt__����������������5�9�9�-��1�1r,���c������������������D��������|�j�������������������|j��������������������������dkD��S�rl���ri���rm���s��� �r)���rJ���zcmp_to_key.<locals>.K.__gt__����ro���r,���c������������������D��������|�j�������������������|j��������������������������dk(��S�rl���ri���rm���s��� �r)����__eq__zcmp_to_key.<locals>.K.__eq__����������������5�9�9�-��2�2r,���c������������������D��������|�j�������������������|j��������������������������dk��S�rl���ri���rm���s��� �r)���r@���zcmp_to_key.<locals>.K.__le__����rs���r,���c������������������D��������|�j�������������������|j��������������������������dk\��S�rl���ri���rm���s��� �r)���rR���zcmp_to_key.<locals>.K.__ge__����rs���r,���N)r���r���r���� __slots__rj���r0���rJ���rr���r@���rR����__hash__)rn���s����r)����Kre�������s-��������G� � � 2� 2� 3� 3� 3��r,���rx���)rZ���)rn���rx���s���` r)���r���r�������s��������F���� �Hr,���)r���c�����������������������t��������|�������}|t��������u�r �t��������|�������}n|}|D�]��}�|�||�������}� �|S�#�t��������$�r �t ��������d�������d�w�xY�w)a��� reduce(function, iterable[, initial]) -> value Apply a function of two arguments cumulatively to the items of an iterable, from left to right. This effectively reduces the iterable to a single value. If initial is present, it is placed before the items of the iterable in the calculation, and serves as a default when the iterable is empty. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1 + 2) + 3) + 4) + 5). z0reduce() of empty iterable with no initial valueN)�iter�_initial_missing�next� StopIteration� TypeError)�function�sequence�initial�itr(����elements��� r)���r ���r �������sq������� �h��B��"�"� N���H�E� ��������(������L����� N��B�D�IM� N� N�s ����5��A)r ���c��������������������b�������e�Zd�ZdZdZ��fd�Zd��Z�e��������d����������Zd��Z d��Z �ee�������Z ��xZS�)r���zSNew function with partial application of the given arguments and keywords. )�func�args�keywordsr����__weakref__c������������������������t��������|�������st��������d��������t��������|d�������r+|j������������������|z���}i�|j�������������������|�}|j ������������������}t��������t��������|��#��|��������}||_��������||_��������||_��������|S�)Nz#the first argument must be callabler����) �callabler~����hasattrr����r����r�����superr����__new__)r]���r����r����r����r3���� __class__s��� �r)���r����zpartial.__new__��su���������~��A�B�B��4�� ��9�9�t�#�D�4�$�-�-�4�8�4�H��9�9�D��W�c�*�3�/���� ��� � �� ��r,���c�����������������d�����i�|�j��������������������|�}�|�j������������������g�|�j�������������������|��i�|��S�rh����r����r����r����)r3���r����r����s��� r)����__call__zpartial.__call__-��s7������0�d�m�m�0�x�0���t�y�y�7�$�)�)�7�d�7�h�7�7r,���c����������������������t��������|��������j������������������}t��������|�j�������������������������g}|j ������������������d��|�j ������������������D�����������������|j ������������������d��|�j������������������j��������������������������D�����������������t��������|��������j������������������dk(��rd|��ddj������������������|���������d�S�|��ddj������������������|���������d�S�)Nc��������������3����2���K����|�]��}t��������|������������y��wrh���)�repr)�.0�xs��� r)���� <genexpr>z#partial.__repr__.<locals>.<genexpr>5��s���������/�Y��D��G�Y�s����c��������������3����0���K����|�]��\��}}|��d�|�������y�w��=N���r�����k�vs��� r)���r����z#partial.__repr__.<locals>.<genexpr>6��s!���������E�/D�V�a��q�c��1�%�L�/D������� functoolsz functools.�(�, �)) r/���r���r����r�����extendr����r�����itemsr����join)r3����qualnamer����s��� r)����__repr__zpartial.__repr__1��s���������:�*�*���T�Y�Y�� �����/�T�Y�Y�/�/����E�t�}�}�/B�/B�/D�E�E���:� � �K�/���z��4�9�9�T�?�*;�1�=�=���1�T�Y�Y�t�_�-�Q�/�/r,���c�����������������������t��������|��������|�j������������������f|�j������������������|�j������������������|�j������������������xs�d�|�j������������������xs�d�ffS�rh���)r/���r����r����r����r����r3���s��� r)���� __reduce__zpartial.__reduce__;��sC�������D�z�D�I�I�<�$�)�)�T�Y�Y��}�}�$��d�m�m�&;�t�*=��=�� =r,���c����������������������t��������|t���������������st��������d��������t��������|�������dk7��rt��������dt��������|������������������|\��}}}}t ��������|�������r4t��������|t���������������r$|�t��������|t ���������������r|�t��������|t ���������������st��������d��������t��������|�������}|�i�}nt ��������|�������t ��������urt��������|�������}|�i�}||�_��������||�_��������||�_ ��������||�_ ��������y�)Nz(argument to __setstate__ must be a tuple����zexpected 4 items in state, got zinvalid partial state)� isinstance�tupler~����lenr�����dictr/���r���r����r����r����)r3����stater����r�����kwds� namespaces��� r)����__setstate__zpartial.__setstate__?��s��������%��'��F�G�G��u�:��?��=�c�%�j�\�J�K�K�&+�#��d�D�)����j��u�&=���Z��d�%;��!�*�Y��*E��3�4�4��T�{���<��D� �$�Z�t� #���:�D����I�!�� ��� ��� ��� r,���)r���r���r���r���rv���r����r����r���r����r����r�����classmethodr����__class_getitem__� __classcell__)r����s���@r)���r���r�����sH���������F�I�� 8����0���0�=��0�$�L�1�r,���r���)r���c��������������������J�����e�Zd�ZdZd��Zd��Zd��Zdd�Zed����������Z �e e�������Zy) r���z�Method descriptor with partial application of the given arguments and keywords. Supports wrapping existing descriptors and handles non-descriptor callables as instance methods. c�����������������&����t��������|�������s&t��������|d�������st��������dj������������������|���������������t ��������|t ���������������r;|j������������������|�_��������|j������������������|z���|�_��������i�|j�������������������|�|�_��������y�||�_��������||�_��������||�_��������y�)N�__get__z${!r} is not callable or a descriptor) r����r����r~����formatr����r���r����r����r����)r3���r����r����r����s��� r)���rj���zpartialmethod.__init__h��s~��������~�g�d�I�&>��B�"(�&��,�0�� 0� ��d�M�*��� � �D�I�� � �D�(�D�I�9�t�}�}�9��9�D�M��D�I��D�I�$�D�Mr,���c������������������Z����t��������|��������}|j������������������}|j������������������}t��������|�j�������������������������g}|j������������������t ��������t��������|�j���������������������������������|j������������������d��|�j������������������j��������������������������D�����������������|��d|��ddj������������������|���������d�S�)Nc��������������3����0���K����|�]��\��}}|��d�|�������y�wr����r����r����s��� r)���r����z)partialmethod.__repr__.<locals>.<genexpr>���s!���������C�-B�T�Q��q�c��1�%�L�-B�r�����.r����r����r����)r/���r���r���r����r����r�����mapr����r����r����r����)r3���r]����moduler����r����s��� r)���r����zpartialmethod.__repr__{��s��������4�j�������#�#���T�Y�Y�� �����C��d�i�i�(�)����C�T�]�]�-@�-@�-B�C�C����8�*�A�d�i�i��o�%6�a�8�8r,���c������������������B���������fd�}��j�������������������|_�����������|_��������|S�)Nc�����������������h������i��j��������������������|�}��j������������������|�g�j�������������������|��i�|��S�rh���r����)�cls_or_selfr����r����r3���s��� �r)����_methodz3partialmethod._make_unbound_method.<locals>._method���s:�������4�$�-�-�4�8�4�H��4�9�9�[�H�4�9�9�H�t�H�x�H�Hr,���)�__isabstractmethod__�_partialmethod)r3���r����s���` r)����_make_unbound_methodz"partialmethod._make_unbound_method���s&������� I��(,�'@�'@��$�!%����r,���Nc������������������6����t��������|�j������������������dd��������}d�}|�L�|||�������}||�j������������������ur5t��������|g|�j��������������������i�|�j��������������������} �|j ������������������|_��������|� |�j��������������������������j������������������||�������}|S�#�t��������$�r�Y��/w�xY�w)Nr����) r���r����r���r����r�����__self__r ���r����r����)r3���rf���r]����get�result�new_funcs��� r)���r����zpartialmethod.__get__���s��������d�i�i��D�1�����?��3��}�H��t�y�y�(��!��G�D�I�I�G����G���&.�&7�&7�F�O���>���.�.�0�8�8��c�B�F�� �� �&�����s����B�� B�Bc������������������0�����t��������|�j������������������dd�������S��Nr����F�r���r����r����s��� r)���r����z"partialmethod.__isabstractmethod__�����������t�y�y�"8�%�@�@r,���rh���) r���r���r���r���rj���r����r����r�����propertyr����r����r���r����r����r,���r)���r���r���`��s>�������%�&9���&��A���A��$�L�1�r,���r���c������������������`�����t��������|�t���������������r|�j������������������}�t��������|�t���������������r�|�S�rh���)r����r���r�����r����s��� r)����_unwrap_partialr�������s&������ �T�7� #��y�y����T�7� #��Kr,���� CacheInfo)�hits�misses�maxsize�currsizec��������������������$�����e�Zd�ZdZdZefd�Zd��Zy)� _HashedSeqz� This class guarantees that hash() will be called no more than once per element. This is important because the lru_cache() will hash the key multiple times on a cache miss. � hashvaluec������������������(�����||�d�d���||�������|�_���������y�rh����r����)r3����tup�hashs��� r)���rj���z_HashedSeq.__init__���s��������Q���c���r,���c�����������������������|�j�������������������S�rh���r����r����s��� r)���rw���z_HashedSeq.__hash__���s�������~�~�r,���N)r���r���r���r���rv���r����rj���rw���r����r,���r)���r����r�������s���������I�!%��#�r,���r����c������������������$�����|�}|r||z ��}|j��������������������������D�]��} || z ��}� �|rC|�|�fd�|�D����������������z ��}|rJ|�|�fd�|j��������������������������D����������������z ��}t��������|�������S��||�������dk(��r��|d����������|v�r|d���S�t��������|�������S�)a���Make a cache key from optionally typed positional and keyword arguments The key is constructed in a way that is flat as possible rather than as a nested structure that would take more memory. If there is only a single argument and its data type is known to cache its hash value, then that argument is returned without a wrapper. This saves space and improves lookup speed. c��������������3����.����K����|�]��}��|������������y��wrh���r�����r����r����r/���s��� �r)���r����z_make_key.<locals>.<genexpr>���s����������+�d��T�!�W�d������c��������������3����.����K����|�]��}��|������������y��wrh���r����r����s��� �r)���r����z_make_key.<locals>.<genexpr>���s����������8�-�Q��a��-�r��������r���)r�����valuesr����) r����r�����typed�kwd_mark� fasttypesr����r/���r�����key�items ��� ` r)���� _make_keyr�������s��������$��C���x����J�J�L�D��4�K�C��!���u�+�d�+�+�+����5�8�$�+�+�-�8�8�8�C���c�?��� �S��Q��4��A��<�9�4��1�v� ��c�?�r,���c���������������������������t����������t���������������r��dk��rYd��nVt�����������������r>t���������t���������������r.��dc}��t ��������|���t ���������������}���fd�|_��������t��������||�������S����t��������d�����������fd�}|S�)a���Least-recently-used cache decorator. If *maxsize* is set to None, the LRU features are disabled and the cache can grow without bound. If *typed* is True, arguments of different types will be cached separately. For example, f(3.0) and f(3) will be treated as distinct calls with distinct results. Arguments to the cached function must be hashable. View the cache statistics named tuple (hits, misses, maxsize, currsize) with f.cache_info(). Clear the cache and statistics with f.cache_clear(). Access the underlying function with f.__wrapped__. See: https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU) r�������c����������������������������d�S��N�r����r����r����r����s�����r)����<lambda>zlru_cache.<locals>.<lambda>��� ��������%�,Pr,���z=Expected first argument to be an integer, a callable, or Nonec������������������V������t��������|���t���������������}��fd�|_��������t��������||��������S�)Nc����������������������������d�S�r����r����r����s�����r)���r����z8lru_cache.<locals>.decorating_function.<locals>.<lambda>��r����r,���)�_lru_cache_wrapper� _CacheInfo�cache_parametersr���)� user_functionr#���r����r����s��� ��r)����decorating_functionz&lru_cache.<locals>.decorating_function ��s(�������$�]�G�U�J�O��#P�� ��g�}�5�5r,���) r�����intr�����boolr����r����r����r���r~���)r����r����r����r#���r����s���`` r)���r ���r ������s��������2��'�3���Q�;��G� �'� �z�%��6�!(�#�� �w�$�]�G�U�J�O��#P�� ��g�}�5�5� � ��K�M�� M�6� ��r,���c������������������d���������� � ��� ���������t�����������������t���������d\��� ��� i��dx��d��j��������������������j������������������� t �����������������g����d�d�g�d�d���dk(��r���fd�}n#�� ���������fd�}n��� � ��� ����������fd�}�� ����fd�}������fd�}||_��������||_��������|S�) N)r���r������������r���Fc�������������������"�������dz �����|�i�|��}|S��Nr����r����)r����r����r����r����r����s��� ��r)���r#���z#_lru_cache_wrapper.<locals>.wrapper!��s"�������� �a�K�F�"�D�1�D�1�F��Mr,���c�������������������h��������|�|� �������}��|� �������}|� ur�dz ���|S��dz �����|�i�|��}|�|<���|S�r��r����)r����r����r����r����r���� cache_getr�����make_keyr�����sentinelr����r����s��� ��������r)���r#���z#_lru_cache_wrapper.<locals>.wrapper*��s[���������4��u�-�C��s�H�-�F��X�%��� ��� ��a�K�F�"�D�1�D�1�F��E�#�J��Mr,���c���������������������������|�|��������}�5����|�������}|�:|\��}}}}||� <���||�<��������}|x|� <�����<���||�<����|� <����dz ���|cd�d�d���������S��dz ���d�d�d�����������|�i�|��}�5��|�v�rnT�r.�} || �<���|| �<���| � ���������} �����}d�x��<�����<����| =�| �|<���n$�����}|�||g}|x|� <���x��<����|<��������������k\���d�d�d���������|S�#�1�sw�Y����wxY�w#�1�sw�Y���|S�xY�wr��r����)r����r����r�����link� link_prev� link_next�_keyr�����last�oldroot�oldkey� oldresult�KEY�NEXT�PREV�RESULTr���r��� cache_len�fullr�����lockr��r����r����r`���r����r����s��� ����������������r)���r#���z#_lru_cache_wrapper.<locals>.wrapper9��sw��������4��u�-�C�� ��~���#�9=�6�I�y�$��&/�I�d�O�&/�I�d�O���:�D�.2�2�D��J��d��!%�D��J�!%�D��J��A�I�D�!������!������#�D�1�D�1�F���%�<� ���"�G�#&�G�C�L�&,�G�F�O��#�4�=�D�!�#�Y�F� $�V��I�/3�3�D��I��V���f� ��")�E�#�J�� ��:�D� �$��V�4�D�;?�?�D��J�?��d��e�C�j��&�K�7�2�D�G��H��M�g������H��M�s����;C�C�*AC�C�C$c�������������������T�������5�������������������������cddd��������S�#�1�sw�Y���yxY�w)zReport cache statisticsNr����)r����r��r����r��r����r����s���������r)���� cache_infoz&_lru_cache_wrapper.<locals>.cache_infor��s ������� ��d�F�G�Y�[�A���T�T�s�����'c�������������������r�������5����j�����������������������������ddg�dd�dx��d�ddd��������y#�1�sw�Y���yxY�w)z$Clear the cache and cache statisticsNr���F)�clear)r���r��r����r��r����r`���s���������r)����cache_clearz'_lru_cache_wrapper.<locals>.cache_clearw��s<����������K�K�M��T�4��.�D��G���D�6��D� ��T�T�s���� -�6)rZ���r����r�����__len__r���r��r��)r����r����r����r����r#���r��r��r��r��r��r��r���r��r��r��r����r��r��r����r`���r��s���```` @@@@@@@@@@@@@@r)���r����r������s�����������x�H��H�(��D�$��V��E���D�6��D�� � �I�� � �I��7�D� �D��T�4��&�D��G��!�|� �� �� �� �7 ��7 ��7 �rB��B� ����$�G��%�G���Nr,���)r����c�����������������&������t��������d��������|��������S�)z@Simple lightweight unbounded cache. Sometimes called "memoize".N)r����)r ���)r����s��� r)���r���r������s������"�9�T�"�=�1�1r,���c������������������������g�} �|�D��cg�c]��}|s�|�� �}�}|�s|S�|�D�]��}|d���}|�D�] ��}||dd�v�s�d}����n��t��������d��������|j������������������|��������|�D�]��}|d���|k(��s�|d=����gc�c}w�)z�Merges MROs in *sequences* to a single MRO using the C3 algorithm. Adapted from https://docs.python.org/3/howto/mro.html. r���r����NzInconsistent hierarchy)�RuntimeError�append)� sequencesr�����s�s1� candidate�s2�seqs��� r)���� _c3_merger)�����s���������F� � )�/� �1�Q�Q� � �/���M��B��1��I�����1�2��&� $�I��� � ��������7�8�8�� � �i� ��C��1�v��"���F���!���/s ����A+�A+Nc������������������������t��������t��������|�j��������������������������������D�]+��\��}�t���������d�������s�t ��������|�j�������������������������|z ��}�n�d}|rt��������|�������ng�}t��������|�j������������������d|��������}g�}t��������|�j������������������|d��������}|D�]?���t ��������|���������s�t���������fd�|�j������������������D����������������r�/|j����������������������������A�|D�]���|j�����������������������������|D��cg�c]��}t��������||�����������}}|D��cg�c]��}t��������||�����������} }|D��cg�c]��}t��������||�����������} }t��������|�gg|z���| z���| z���|gz���|gz���|gz����������S�c�c}w�c�c}w�c�c}w�)a���Computes the method resolution order using extended C3 linearization. If no *abcs* are given, the algorithm works exactly like the built-in C3 linearization used for method resolution. If given, *abcs* is a list of abstract base classes that should be inserted into the resulting MRO. Unrelated ABCs are ignored and don't end up in the result. The algorithm inserts ABCs where their functionality is introduced, i.e. issubclass(cls, abc) returns True for the class itself but returns False for all its direct base classes. Implicit ABCs for a given class (either registered or inferred from the presence of a special method like __len__) are inserted directly after the last ABC explicitly listed in the MRO of said class. If two implicit ABCs end up next to each other in the resulting MRO, their ordering depends on the order of types in *abcs*. �__abstractmethods__r���Nc��������������3����6����K����|�]��}t��������|�������������y��wrh���)� issubclass)r�����b�bases��� �r)���r����z_c3_mro.<locals>.<genexpr>���s�����������-�-:�� �1�d�#�]�s������abcs)� enumerate�reversed� __bases__r����r�����listr-���anyr"���remove�_c3_mror)��)r]���r1���i�boundary�explicit_bases�abstract_bases�other_basesr/���explicit_c3_mros�abstract_c3_mros� other_c3_mross��� ` r)���r8��r8�����s�������"��X�c�m�m�4�5���4��4�.�/��3�=�=�)�A�-�H���6� ����4��:�2�D��#�-�-� ��2�3�N��N��s�}�}�X�Y�/�0�K����c�4� ���-�-0�]�]�-��*� � �!�!�$�'� ��������D����=K�L�^�T���4�0�^��L�=K�L�^�T���4�0�^��L�:E�F�+�$�W�T��-�+�M�F�� ���� �+� ,�.;� <� �� �*�+� ,�/:�m� <������M��L��Fs����1E�E"�%E'c����������� �������X��������t����������j�����������������������������fd�}�D��cg�c] ��}�||�������s�|���c}��fd�}�D��cg�c] ��}�||�������r�|���c}�t����������������}g�}�D�]���}g�}|j��������������������������D�]B��} | �vs�t����������| �������s�|j ������������������| j������������������D�� cg�c] ��} | |v�s�| ���c} ���������D�|s|j ������������������|���������n|j������������������t��������d���������|D�]��} | D�]��}||vs�|j ������������������|�����������!����t����������|��������S�c�c}w�c�c}w�c�c} w�)z�Calculates the method resolution order for a given class *cls*. Includes relevant abstract base classes (with their respective bases) from the *types* iterable. Uses a modified C3 linearization algorithm. c������������������j������|��vxr-�t��������|�d�������xr�t��������|�t����������������xr�t���������|��������S�)N�__mro__)r����r����r���r-��)�typ�basesr]���s��� ��r)���� is_relatedz _compose_mro.<locals>.is_related���s?��������5� ��:�W�S�)�%<��:�)3�C��)F�%F�:�%/��S�%9� ;r,���c������������������@�������D�]��}|�|k7��s� |�|j�������������������v�s��y�y)NTF)rC��)rD��r4����typess��� �r)����is_strict_basez$_compose_mro.<locals>.is_strict_base���s'��������E��e�|��u�}�}� 4�����r,���T)r�����reverser0��)�setrC���__subclasses__r-��r"���sortr����r8��) r]���rH��rF���nrI���type_set�mrorD���found�subr$���subclsrE��s ���`` @r)����_compose_mrorT�����s(������� �����E�;���/��1��A��Q��/�E�� ��7��1�^�A�%6�Q��7�E���5�z�H� �C������%�%�'�C��%��J�s�C�$8�������F��A��X� �a��F�G��(����J�J�s�O�� � � �s�D� �)��C�����$��J�J�v�&���������3�S�!�!��7� 0��� 8���Gs"���� D�D� D"�D"�( D'�2D'c����������������������t��������|�|j���������������������������������}d}|D�]T��}|�I||v�rC||�j������������������vr5||�j������������������vr't��������||�������st ��������dj������������������||����������������n ||v�s�S|}�V�|j ������������������|�������S�)a^��Returns the best matching implementation from *registry* for type *cls*. Where there is no registered implementation for a specific type, its method resolution order is used to find a more generic implementation. Note: if *registry* does not contain an implementation for the base *object* type, this function may return None. NzAmbiguous dispatch: {} or {})rT���keysrC��r-��r!��r����r����)r]����registryrP���match�ts��� r)���� _find_implrZ�� ��s���������s�H�M�M�O� ,�C��E� ������X� �!�3�;�;�"6�"'�s�{�{�":�&0���&:�"�#A�#H�#H��1�$��������=��E�����<�<���r,���c������������������B��������� � ���ddl��ddl}i�� |j���������������������������d���� fd���fd���fd��d ����� � fd� � ��fd�}t��������|�dd ��������|�� t��������<���� |_���������|_���������j������������������� �������|_���������j������������������|_ ��������t��������||���������|S�)ak��Single-dispatch generic function decorator. Transforms a function into a generic function, which can have different behaviours depending upon the type of its first argument. The decorated function acts as the default implementation, and additional implementations can be registered using the register() attribute of the generic function. r���Nc���������������������������!t����������������}�|k7��r�j���������������������������|� ��|����}|S�#�t��������$�r+� ��|����}n#�t��������$�r�t��������|���������}Y�nw�xY�w|�|�<���Y�|S�w�xY�w)z�generic_func.dispatch(cls) -> <function implementation> Runs the dispatch algorithm to return the best available implementation for the given *cls* registered on *generic_func*. )r���r���KeyErrorrZ��)r]���� current_token�impl�cache_token�dispatch_cacherW��s��� ���r)����dispatchz singledispatch.<locals>.dispatch5��s����������"�+�-�M��m�+��$�$�&�+�� '�!�#�&�D����� ��� '� 1���}����� 1�!�#�x�0�� 1��"&�N�3���� '�s/����-�� A!�=�A!�A�A!�A�A!� A!c������������������@������ddl�m}m}��||��������|�j������������������hv�S�)Nr���)� get_origin�Union)�typingrd��re��� UnionType)r]���rd��re��rH��s��� �r)����_is_union_typez&singledispatch.<locals>._is_union_typeL��s�������,��#��5�%�/�/�":�:�:r,���c������������������v������t��������|�t���������������ryddlm}���|��������xr�t ��������d���||��������D����������������S�)NTr�����get_argsc��������������3����<���K����|�]��}t��������|t��������������������y��wrh���)r����r/���)r�����args��� r)���r����zBsingledispatch.<locals>._is_valid_dispatch_type.<locals>.<genexpr>U��s���������C�]�c�J�s�D�)�]�s����)r����r/���rf��rk���all)r]���rk��rh��s��� �r)����_is_valid_dispatch_typez/singledispatch.<locals>._is_valid_dispatch_typeP��s9��������c�4� ��#��s�#��D��C�X�c�]�C�C� Er,���c�������������������������������������r|�����fd�S�|�t��������d���d���������t����������di��������}|st��������d���d�����������}ddlm}�t ��������t���������||�������j ����������������������������������������\��}�������������s,�����������rt��������d |�d ���d���������t��������d |�d ���d��������������������rdd lm}��|���������D�]��}|�|<���� �n|���<���� �t����������d�������r t����������������� � j���������������������������|S�)z�generic_func.register(cls, func) -> func Registers a new implementation for the given *cls* on a *generic_func*. c���������������������������|��������S�rh���r����)�fr]����registers��� ��r)���r����z2singledispatch.<locals>.register.<locals>.<lambda>`��s��������#�q�!1r,���z(Invalid first argument to `register()`. z is not a class or union type.r���z(Invalid first argument to `register()`: zS. Use either `@register(some_class)` or plain `@register` on an annotated function.r���)�get_type_hintszInvalid annotation for z. z not all arguments are classes.z is not a class.rj��r+��)r~���r���rf��rt��r|���rz���r����rk��r����r���r��) r]���r�����annrt���argnamerk��rm��rh��ro��r`��ra��rs��rW��s ���` ������r)���rs��z singledispatch.<locals>.registerW��sL�������#�3�'��|�1�1����>��g�;�=������#�0�"�5�C���>�s�g��F0��1���� ��D�� .���^�D�%9�%?�%?�%A� B�C�L�G�S�*�3�/�!�#�&�#�1�'��B��'�!@�B���� �$�1�'��B��'�!1�3���� ��#��'���}�� $��� ��%��!�H�S�M���7�3�0E�#F�)�+�K������r,���c�������������������Z������|�st�����������d������������|�d���j�������������������������|�i�|��S�)Nz( requires at least 1 positional argumentr���)r~���r����)r�����kwrb���funcnames��� ��r)���r#���zsingledispatch.<locals>.wrapper���sD���������x�j��)4��4��5�� 5��+�x��Q��)�)�*�D�7�B�7�7r,���r���zsingledispatch functionrh���)rH���weakref�WeakKeyDictionaryr���rZ���rs��rb���MappingProxyTyperW��r���_clear_cacher���)r����rz��r#���rh��ro��r`��rb��ra��ry��rs��rW��rH��s��� @@@@@@@@@r)���r ���r ���#��s������������H��.�.�0�N��K��.;�E�2��2�h8���t�Z�)B�C�H��H�V���G���G���-�-�h�7�G��)�/�/�G���7�D�!��Nr,���c��������������������6�����e�Zd�ZdZd��Zdd�Zdd�Zed����������Zy)r���z�Single-dispatch generic method descriptor. Supports wrapping existing descriptors and handles non-descriptor callables as instance methods. c������������������|�����t��������|�������st��������|d�������st��������|�d���������t��������|�������|�_��������||�_��������y�)Nr����z is not callable or a descriptor)r����r����r~���r ���� dispatcherr�����r3���r����s��� r)���rj���zsingledispatchmethod.__init__���s8��������~�g�d�I�&>��t�h�&F�G�H�H�(��.����� r,���Nc������������������<�����|�j�������������������j������������������||��������S�)z�generic_method.register(cls, func) -> func Registers a new implementation for the given *cls* on a *generic_method*. r����)r���rs��)r3���r]����methods��� r)���rs��zsingledispatchmethod.register���s������ ����'�'��&�'�9�9r,���c�������������������������������fd�}��j�������������������|_�����������j������������������|_��������t��������|��j��������������������������|S�)Nc��������������������������j�������������������j������������������|�d���j�������������������������}�|j���������������������������|�i�|��S�rl���)r���rb��r����r����)r�����kwargsr���r]���rf���r3���s��� ���r)���r����z-singledispatchmethod.__get__.<locals>._method���s>��������_�_�-�-�d�1�g�.?�.?�@�F�+�6�>�>�#�s�+�T�<�V�<�<r,���)r����rs��r���r����)r3���rf���r]���r����s���``` r)���r����zsingledispatchmethod.__get__���s7������� =��(,�'@�'@��$��=�=����w�� � �*��r,���c������������������0�����t��������|�j������������������dd�������S�r����r����r����s��� r)���r����z)singledispatchmethod.__isabstractmethod__���r����r,���rh���) r���r���r���r���rj���rs��r����r����r����r����r,���r)���r���r������s,��������:����A���Ar,���r���c��������������������0�����e�Zd�Zd��Zd��Zdd�Z�ee�������Zy)r���c������������������B�����||�_���������d�|�_��������|j������������������|�_��������y�rh���)r�����attrnamer���r���s��� r)���rj���zcached_property.__init__���s�������� ��� ��|�|��r,���c�����������������������|�j��������������������||�_���������y�||�j�������������������k7��rt��������d|�j��������������������d|�d���������y�)Nz?Cannot assign the same cached_property to two different names (z and z).)r���r~���)r3����owner�names��� r)����__set_name__zcached_property.__set_name__���sM�������=�=� � �D�M� �T�]�]� "����M�M�$�E�$���5��� ��#r,���Nc�����������������������|�|�S�|�j��������������������t��������d�������� �|j������������������}|j ������������������|�j�������������������t���������������}|t��������u�r#|�j������������������|�������} �|||�j�������������������<���|S�|S�#�t��������$�r3�dt ��������|�������j �������������������d|�j��������������������d�}t��������|�������d��w�xY�w#�t��������$�r3�dt ��������|�������j �������������������d|�j��������������������d�}t��������|�������d��w�xY�w)NzGCannot use cached_property instance without calling __set_name__ on it.zNo '__dict__' attribute on z instance to cache z property.zThe '__dict__' attribute on z7 instance does not support item assignment for caching ) r���r~���r���r ���r/���r���r����� _NOT_FOUNDr����)r3����instancer���r����msg�vals��� r)���r����zcached_property.__get__���s ��������K��=�=� ��Y�[�� [� +��%�%�E���i�i�� � �z�2���*���)�)�H�%�C� /�'*��d�m�m�$��� �s� ��#��� +�-�d�8�n�.E�.E�-H��I%�%)�]�]�$5�Z�A�� ���C�.�d�*� +����� /�2�4��>�3J�3J�2M��ND�DH�M�M�CT�T^�`���� ��n�$�.� /�s����A6��#B5��6<B2�5<C1rh���) r���r���r���rj���r���r����r����r���r����r����r,���r)���r���r������s������$� ��6�$�L�1�r,���r���)r����Frh���);r����__all__�abcr����collectionsr����reprlibr����_threadr���rH��r���r���r���r���r���r6���r9���r<���rA���rD���rG���rK���rM���rO���rS���rU���rW���rY���r���r���� _functools�ImportErrorrZ���r{���r ���r���r���r����r����r5��r����r�����strr����r/���r����r����r ���r����r���r)��r8��rT��rZ��r ���r���r���r���r����r,���r)����<module>r������s<������� � ��"��"�����=������2�,��>�)�#�7�0+�&��*�'��+�&��*�'����+�&��+�&��+�&�(���+�&��+�&��+�&�(���+�&��+�&��+�&�(���+�&��+�&��+�&�(� ���$ �& �%���8���'7���< �!�A2��A2�H �"� C2�F��C2�P����%N� O� �����"� ����s���t���>,�\r�h �-�2��6+�Z("�T�4v�t!A��!A�P��X� �*2��*2��I��� �� ��T��� �� ��^��� �� ��T ��� �� �sH����D'��D2��/D=��2E��'D/�.D/�2D:�9D:�=E�E�E�E