<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
ReS)                 @   s   d Z ddlmZ ddlZddlmZ dZddd	d
dZi Zdd Z	dd Z
dd ZG dd deZe
dZe
dZe
dZd+ddZdd ZedfddZd,dd Zd!d" Zedfd#d$Zd%d& ZG d'd( d(eZG d)d* d*eZdS )-a  

    webencodings
    ~~~~~~~~~~~~

    This is a Python implementation of the `WHATWG Encoding standard
    <http://encoding.spec.whatwg.org/>`. See README for details.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

    )unicode_literalsN   )LABELSz0.5.1z
iso-8859-8zmac-cyrillicz	mac-romancp874)ziso-8859-8-izx-mac-cyrillic	macintoshzwindows-874c             C   s   | j dj jdS )a9  Transform (only) ASCII letters to lower case: A-Z is mapped to a-z.

    :param string: An Unicode string.
    :returns: A new Unicode string.

    This is used for `ASCII case-insensitive
    <http://encoding.spec.whatwg.org/#ascii-case-insensitive>`_
    matching of encoding labels.
    The same matching is also used, among other things,
    for `CSS keywords <http://dev.w3.org/csswg/css-values/#keywords>`_.

    This is different from the :meth:`~py:str.lower` method of Unicode strings
    which also affect non-ASCII characters,
    sometimes mapping them into the ASCII range:

        >>> keyword = u'Bac\N{KELVIN SIGN}ground'
        >>> assert keyword.lower() == u'background'
        >>> assert ascii_lower(keyword) != keyword.lower()
        >>> assert ascii_lower(keyword) == u'bac\N{KELVIN SIGN}ground'

    utf8)encodelowerdecode)string r   /builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/webencodings/__init__.pyascii_lower#   s    r   c             C   sx   t | jd} tj| }|dkr$dS tj|}|dkrt|dkrLddlm} ntj||}tj	|}t
||}|t|< |S )u<  
    Look for an encoding by its label.
    This is the spec’s `get an encoding
    <http://encoding.spec.whatwg.org/#concept-encoding-get>`_ algorithm.
    Supported labels are listed there.

    :param label: A string.
    :returns:
        An :class:`Encoding` object, or :obj:`None` for an unknown label.

    z	
 Nzx-user-definedr   )
codec_info)r   stripr   getCACHEx_user_definedr   PYTHON_NAMEScodecslookupEncoding)labelnameencodingr   python_namer   r   r   r   =   s    



r   c             C   s.   t | dr| S t| }|dkr*td|  |S )z
    Accept either an encoding object or label.

    :param encoding: An :class:`Encoding` object or a label string.
    :returns: An :class:`Encoding` object.
    :raises: :exc:`~exceptions.LookupError` for an unknown label.

    r   NzUnknown encoding label: %r)hasattrr   LookupError)encoding_or_labelr   r   r   r   _get_encoding[   s    	
r   c               @   s    e Zd ZdZdd Zdd ZdS )r   aO  Reresents a character encoding such as UTF-8,
    that can be used for decoding or encoding.

    .. attribute:: name

        Canonical name of the encoding

    .. attribute:: codec_info

        The actual implementation of the encoding,
        a stdlib :class:`~codecs.CodecInfo` object.
        See :func:`codecs.register`.

    c             C   s   || _ || _d S )N)r   r   )selfr   r   r   r   r   __init__|   s    zEncoding.__init__c             C   s
   d| j  S )Nz<Encoding %s>)r   )r    r   r   r   __repr__   s    zEncoding.__repr__N)__name__
__module____qualname____doc__r!   r"   r   r   r   r   r   m   s   r   zutf-8zutf-16lezutf-16bereplacec             C   s2   t |}t| \}} |p|}|jj| |d |fS )a  
    Decode a single string.

    :param input: A byte string
    :param fallback_encoding:
        An :class:`Encoding` object or a label string.
        The encoding to use if :obj:`input` does note have a BOM.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :return:
        A ``(output, encoding)`` tuple of an Unicode string
        and an :obj:`Encoding`.

    r   )r   _detect_bomr   r
   )inputfallback_encodingerrorsbom_encodingr   r   r   r   r
      s    r
   c             C   sV   | j drt| dd fS | j dr4t| dd fS | j drNt| dd fS d| fS )zBReturn (bom_encoding, input), with any BOM removed from the input.s      Ns   s   ﻿   )
startswith_UTF16LE_UTF16BEUTF8)r)   r   r   r   r(      s    


r(   strictc             C   s   t |jj| |d S )a;  
    Encode a single string.

    :param input: An Unicode string.
    :param encoding: An :class:`Encoding` object or a label string.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :return: A byte string.

    r   )r   r   r   )r)   r   r+   r   r   r   r      s    r   c             C   s$   t ||}t| |}t|}||fS )a  
    "Pull"-based decoder.

    :param input:
        An iterable of byte strings.

        The input is first consumed just enough to determine the encoding
        based on the precense of a BOM,
        then consumed on demand when the return value is.
    :param fallback_encoding:
        An :class:`Encoding` object or a label string.
        The encoding to use if :obj:`input` does note have a BOM.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :returns:
        An ``(output, encoding)`` tuple.
        :obj:`output` is an iterable of Unicode strings,
        :obj:`encoding` is the :obj:`Encoding` that is being used.

    )IncrementalDecoder_iter_decode_generatornext)r)   r*   r+   decoder	generatorr   r   r   r   iter_decode   s    

r9   c             c   s   |j }t| } xf| D ].}||}|r|jdk	s2t|jV  |V  P qW |ddd}|jdk	s`t|jV  |rr|V  dS x| D ]}||}|r||V  q|W |ddd}|r|V  dS )zqReturn a generator that first yields the :obj:`Encoding`,
    then yields output chukns as Unicode strings.

    N    T)final)r
   iterr   AssertionError)r)   r7   r
   chunckoutputr   r   r   r5      s,    


r5   c             C   s   t ||j}t| |S )uY  
    “Pull”-based encoder.

    :param input: An iterable of Unicode strings.
    :param encoding: An :class:`Encoding` object or a label string.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :returns: An iterable of byte strings.

    )IncrementalEncoderr   _iter_encode_generator)r)   r   r+   r   r   r   r   iter_encode   s    rB   c             c   s:   x| D ]}||}|r|V  qW |ddd}|r6|V  d S )N T)r;   r   )r)   r   r>   r?   r   r   r   rA     s    

rA   c               @   s$   e Zd ZdZd	ddZd
ddZdS )r4   uO  
    “Push”-based decoder.

    :param fallback_encoding:
        An :class:`Encoding` object or a label string.
        The encoding to use if :obj:`input` does note have a BOM.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.

    r'   c             C   s&   t || _|| _d| _d | _d | _d S )Nr:   )r   _fallback_encoding_errors_buffer_decoderr   )r    r*   r+   r   r   r   r!     s
    
zIncrementalDecoder.__init__Fc             C   s~   | j }|dk	r|||S | j| }t|\}}|dkrXt|dk rR| rR|| _dS | j}|jj| jj}|| _ || _	|||S )zDecode one chunk of the input.

        :param input: A byte string.
        :param final:
            Indicate that no more input is available.
            Must be :obj:`True` if this is the last call.
        :returns: An Unicode string.

        Nr.   rC   )
rG   rF   r(   lenrD   r   incrementaldecoderrE   r
   r   )r    r)   r;   r7   r   r   r   r   r
   '  s    


zIncrementalDecoder.decodeN)r'   )F)r#   r$   r%   r&   r!   r
   r   r   r   r   r4     s   

r4   c               @   s   e Zd ZdZedfddZdS )r@   u  
    “Push”-based encoder.

    :param encoding: An :class:`Encoding` object or a label string.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.

    .. method:: encode(input, final=False)

        :param input: An Unicode string.
        :param final:
            Indicate that no more input is available.
            Must be :obj:`True` if this is the last call.
        :returns: A byte string.

    r3   c             C   s   t |}|jj|j| _d S )N)r   r   incrementalencoderr   )r    r   r+   r   r   r   r!   T  s    zIncrementalEncoder.__init__N)r#   r$   r%   r&   r2   r!   r   r   r   r   r@   C  s   r@   )r'   )r'   )r&   
__future__r   r   labelsr   VERSIONr   r   r   r   r   objectr   r2   r0   r1   r
   r(   r   r9   r5   rB   rA   r4   r@   r   r   r   r   <module>   s2   

 
3