o
    aĎi                     @  s  d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dd	lmZmZmZmZmZ dd
lmZ ddlmZ ddlmZ ddlmZmZmZmZ ddlmZm Z m!Z! ddl"m#Z# ddl$m%Z%m&Z&m'Z'm(Z( ddl)m*Z* erddl+m,Z, ddlm-Z- e* d Z.ee. Z/ee. Z0e#e1e2e# Z3ee. Z4e5e6e!d d e!d d d Z7e5dd e D e7B Z8dZ9e5dZ:eZ;dZ<e=>ddd?dd e6ddD d d?dd e6dd D  Z@d!ZAed"d#d\d]d+d,ZB	-	$	d^d_d1d2ZCedd#d`d5d6ZDed7d#dad9d:ZEdbd=d>ZFdcddd?d@ZGdAd7ddBdedFdGZH	HdfdAddIdgdLdMZI	HdfdAddIdgdNdOZJ	HdfdAddIdgdPdQZKdhdRdSZLdHd7ddTdUdidZd[ZMd-S )ja  
This is a python implementation of wcwidth() and wcswidth().

https://github.com/jquast/wcwidth

from Markus Kuhn's C code, retrieved from:

    http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

This is an implementation of wcwidth() and wcswidth() (defined in
IEEE Std 1002.1-2001) for Unicode.

http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html
http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html

In fixed-width output devices, Latin characters all occupy a single
"cell" position of equal width, whereas ideographic CJK characters
occupy two such cells. Interoperability between terminal-line
applications and (teletype-style) character terminals using the
UTF-8 encoding requires agreement on which character should advance
the cursor by how many cell positions. No established formal
standards exist at present on which Unicode character shall occupy
how many cell positions on character terminals. These routines are
a first attempt of defining such behavior based on simple rules
applied to data provided by the Unicode Consortium.

For some graphical characters, the Unicode standard explicitly
defines a character-cell width via the definition of the East Asian
FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes.
In all these cases, there is no ambiguity about which width a
terminal shall use. For characters in the East Asian Ambiguous (A)
class, the width choice depends purely on a preference of backward
compatibility with either historic CJK or Western practice.
Choosing single-width for these characters is easy to justify as
the appropriate long-term solution, as the CJK practice of
displaying these characters as double-width comes from historic
implementation simplicity (8-bit encoded characters were displayed
single-width and 16-bit ones double-width, even for Greek,
Cyrillic, etc.) and not any typographic considerations.

Much less clear is the choice of width for the Not East Asian
(Neutral) class. Existing practice does not dictate a width for any
of these characters. It would nevertheless make sense
typographically to allocate two character cells to characters such
as for instance EM SPACE or VOLUME INTEGRAL, which cannot be
represented adequately with a single-width glyph. The following
routines at present merely assign a single-cell width to all
neutral characters, in the interest of simplicity. This is not
entirely satisfactory and should be reconsidered before
establishing a formal standard in this area. At the moment, the
decision which Not East Asian (Neutral) characters should be
represented by double-width glyphs cannot yet be answered by
applying a simple rule from the Unicode database content. Setting
up a proper standard for the behavior of UTF-8 character terminals
will require a careful analysis not only of each Unicode character,
but also of each presentation form, something the author of these
routines has avoided to do so far.

http://www.unicode.org/unicode/reports/tr11/

Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
    )annotations)	lru_cache)TYPE_CHECKING   )bisearch)iter_graphemes)CATEGORY_MC)_SGR_PATTERN_SGR_STATE_DEFAULT_sgr_state_update_sgr_state_is_active_sgr_state_to_sequence)VS16_NARROW_TO_WIDE)WIDE_EASTASIAN)
ZERO_WIDTH)ILLEGAL_CTRLVERTICAL_CTRLHORIZONTAL_CTRLZERO_WIDTH_CTRL)ISC_CONSONANTEXTENDED_PICTOGRAPHICGRAPHEME_REGIONAL_INDICATOR)AMBIGUOUS_EASTASIAN)ZERO_WIDTH_PATTERNCURSOR_LEFT_SEQUENCECURSOR_RIGHT_SEQUENCEINDETERMINATE_EFFECT_SEQUENCE)list_versions)Iterator)Literalc                 c  s,    | ]\}}t ||d  D ]}|V  qqdS )r   N)range).0lohicp r&   K/home/jeff/fluffinator/venv/lib/python3.10/site-packages/wcwidth/wcwidth.py	<genexpr>k   s    r(   )i i )iM	  i	  iM
  i
  iM  i  iM  i  iM  i  iD  i  iĨ  i  iF i i i5 iM iB i i i? i i9 i i?     c                 c      | ]}t |V  qd S Nchrr"   cr&   r&   r'   r(              c                 c  r+   r,   r-   r/   r&   r&   r'   r(      r1         )r   r   r   r   r   wcwidthwcswidthwidthiter_sequencesljustrjustcenterclipstrip_sequences_wcmatch_version_wcversion_valuei   )maxsizeautowcstrunicode_versionambiguous_widthintreturnc                 C  s   | rt | nd}d|  krdk rdS  |r|dk s'd|  kr%dk r)dS  ndS t|tr0dS t|tr7dS |dkrBt|trBdS dS )a*  
    Given one Unicode codepoint, return its printable length on a terminal.

    :param wc: A single Unicode character.
    :param unicode_version: Ignored. Retained for backwards compatibility.

        .. deprecated:: 0.3.0
           Only the latest Unicode version is now shipped.

    :param ambiguous_width: Width to use for East Asian Ambiguous (A)
        characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts
        where ambiguous characters display as double-width. See
        :ref:`ambiguous_width` for details.
    :returns: The width, in cells, necessary to display the character of
        Unicode string character, ``wc``.  Returns 0 if the ``wc`` argument has
        no printable effect on a terminal (such as NUL '\0'), -1 if ``wc`` is
        not printable, or has an indeterminate effect on the terminal, such as
        a control character.  Otherwise, the number of column positions the
        character occupies on a graphic terminal (1 or 2) is returned.

    See :ref:`Specification` for details of cell measurement.
    r   r2      r   r5   r       )ord	_bisearch_ZERO_WIDTH_TABLE_WIDE_EASTASIAN_TABLE_AMBIGUOUS_TABLE)rC   rE   rF   ucsr&   r&   r'   r6      s   

r6   Npwcsn
int | Nonec                   s\  |du r|   r|  rt| S  dkrtn fdd}|du r$t| n|}d}d}d}d}	d}
d}||k r%| | }t|}|d	kr^|
rJ|d7 }n|d |k rW|d
7 }d}
n|d7 }d}
q2|dkrz|dkrz|tt| | td 7 }d}|d7 }q2|dkr|tv rd}|d }|dkrt| | tv r|d7 }|d8 }|dkrt| | tv s|d
 dkr|d7 }|}	q2ntd |  krtd krn n	|	t	v r|d7 }q2|
rt|t
r|}|}	d}
d}|d7 }q2||}|dk r|S |dkr|r|d7 }d}|}|}	d}
n|dkrt|trd}d}d}
d}n|tv }
||7 }|d7 }||k s7|r,|d7 }|S )a8  
    Given a unicode string, return its printable length on a terminal.

    :param pwcs: Measure width of given unicode string.
    :param n: When ``n`` is None (default), return the length of the entire
        string, otherwise only the first ``n`` characters are measured.

        Better to use string slicing capability, ``wcswidth(pwcs[:n])``, instead,
        for performance.  This argument is a holdover from the POSIX function for
        matching signatures. Be careful that ``n`` is at grapheme boundaries.

    :param unicode_version: Ignored. Retained for backwards compatibility.

        .. deprecated:: 0.3.0
           Only the latest Unicode version is now shipped.

    :param ambiguous_width: Width to use for East Asian Ambiguous (A)
        characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts.
    :returns: The width, in cells, needed to display the first ``n`` characters
        of the unicode string ``pwcs``.  Returns ``-1`` for C0 and C1 control
        characters!

    See :ref:`Specification` for details of cell measurement.
    Nr   c                      t | d S NrB   r6   r0   rF   r&   r'   <lambda>      zwcswidth.<locals>.<lambda>r   r    Fi   rJ     9.0.0  T)isasciiisprintablelenr6   rK   rL   r   _REGIONAL_INDICATOR_SET_FITZPATRICK_RANGE_EMOJI_ZWJ_SET_ISC_CONSONANT_TABLE_CATEGORY_MC_TABLE_ISC_VIRAMA_SET)rQ   rR   rE   rF   _wcwidthendtotal_widthidxlast_measured_idxlast_measured_ucslast_was_viramaconjunct_pendingcharrP   	ri_beforejwcwr&   rX   r'   r7      s   $

 	
Pr7   
ver_stringtuple[int, ...]c                 C  s   t tt| d}|S )aZ  
    Integer-mapped value of given dotted version string.

    .. deprecated:: 0.3.0

        This function is no longer used internally by wcwidth but is retained
        for API compatibility with external tools.

    :param ver_string: Unicode version string, of form ``n.n.n``.
    :returns: tuple of digit tuples, ``tuple(int, [...])``.
    .)tuplemaprG   split)rt   retvalr&   r&   r'   r@   {  s   r@      given_versionc                 C  s   t S )a  
    Return the supported Unicode version level.

    .. deprecated:: 0.3.0
        This function now always returns the latest version.

        This function is no longer used internally by wcwidth but is retained
        for API compatibility with external tools.

    :param given_version: Ignored. Any value is accepted for compatibility.
    :returns: The latest unicode version string.
    )_LATEST_VERSION)r|   r&   r&   r'   r?     s   r?   textIterator[tuple[str, bool]]c                 c  s    d}t | }d}||k rJ| | }|dkrB||kr"| || dfV  t| |}|r6| dfV  | }n	|dfV  |d7 }|}n|d7 }||k s||k rY| |d dfV  dS dS )a  
    Iterate through text, yielding segments with sequence identification.

    This generator yields tuples of ``(segment, is_sequence)`` for each part
    of the input text, where ``is_sequence`` is ``True`` if the segment is
    a recognized terminal escape sequence.

    :param text: String to iterate through.
    :returns: Iterator of (segment, is_sequence) tuples.

    .. versionadded:: 0.3.0

    Example::

        >>> list(iter_sequences('hello'))
        [('hello', False)]
        >>> list(iter_sequences('\x1b[31mred'))
        [('\x1b[31m', True), ('red', False)]
        >>> list(iter_sequences('\x1b[1m\x1b[31m'))
        [('\x1b[1m', True), ('\x1b[31m', True)]
    r   FTr   N)ra   r   matchgroupri   )r~   rk   text_lensegment_startrp   r   r&   r&   r'   r9     s*   

r9   c                 C  s   t t| t|dS )z
    Fast path for width() with control_codes='ignore'.

    Strips escape sequences and control characters, then measures remaining text.
    rX   )r7   r>   	translate_CONTROL_CHAR_TABLE)r~   rF   r&   r&   r'   _width_ignored_codes  s   r   parse)control_codestabsizerF   r   $Literal['parse', 'strict', 'ignore']r   c                  s  |   r|  rt| S |dkr2t| tkr2d| vr2d| vr2d| vr2d| vs0t| s2t| s2d}|dkr;t|  S |dk}d}d}d}d	}d
}	d}
d}t| } dkrWtn fdd}||k r7| | }|dkrt	
| |}|r| }|rt
|rtd| t
|}|r|t|dpd7 }nt
|}|rtd|t|dpd }| }n|d7 }t||}q]|tv r|rtdt|dd| |d7 }q]|tv r|rtdt|dd| |d7 }q]|tv r#|dkr|dkr||||  7 }n|dkr|dkr|d8 }n|dkrd}t||}|d7 }q]|dkrE|
r0|d7 }n|d |k r>|d7 }d}
n|d7 }d}
q]|tv rO|d7 }q]t|}|dkry||d krttt| | td rt|d7 }t||}|d7 }q]|dkr|tv rd}|d }|dkrt| | tv r|d7 }|d8 }|dkrt| | tv s|d dkr|}	|d7 }q]ntd |  krtd krn n
|	tv r|d7 }q]|
rt|tr|}|}	d}
d}|d7 }q]||}|dkr|r |d7 }d}||7 }t||}|}|}	d}
n|dkr+t|tr+|d7 }t||}d	}d}
d}n|tv }
|d7 }||k sb|rC|d7 }t||}|S )u
  
    Return printable width of text containing many kinds of control codes and sequences.

    Unlike :func:`wcswidth`, this function handles most control characters and many popular terminal
    output sequences.  Never returns -1.

    :param text: String to measure.
    :param control_codes: How to handle control characters and sequences:

        - ``'parse'`` (default): Track horizontal cursor movement from BS ``\b``, CR ``\r``, TAB
          ``\t``, and cursor left and right movement sequences.  Vertical movement (LF, VT, FF) and
          indeterminate sequences are zero-width. Never raises.
        - ``'strict'``: Like parse, but raises :exc:`ValueError` on control characters with
          indeterminate results of the screen or cursor, like clear or vertical movement. Generally,
          these should be handled with a virtual terminal emulator (like 'pyte').
        - ``'ignore'``: All C0 and C1 control characters and escape sequences are measured as
          width 0. This is the fastest measurement for text already filtered or known not to contain
          any kinds of control codes or sequences. TAB ``\t`` is zero-width; for tab expansion,
          pre-process: ``text.replace('\t', ' ' * 8)``.

    :param tabsize: Tab stop width for ``'parse'`` and ``'strict'`` modes. Default is 8.
        Must be positive. Has no effect when ``control_codes='ignore'``.
    :param ambiguous_width: Width to use for East Asian Ambiguous (A)
        characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts.
    :returns: Maximum cursor position reached, "extent", accounting for cursor movement sequences
        present in ``text`` according to given parameters.  This represents the rightmost column the
        cursor reaches.  Always a non-negative integer.

    :raises ValueError: If ``control_codes='strict'`` and control characters with indeterminate
        effects, such as vertical movement or clear sequences are encountered, or on unexpected
        C0 or C1 control code. Also raised when ``control_codes`` is not one of the valid values.

    .. versionadded:: 0.3.0

    Examples::

        >>> width('hello')
        5
        >>> width('コンニチハ')
        10
        >>> width('\x1b[31mred\x1b[0m')
        3
        >>> width('\x1b[31mred\x1b[0m', control_codes='ignore')  # same result (ignored)
        3
        >>> width('123\b4')     # backspace overwrites previous cell (outputs '124')
        3
        >>> width('abc\t')      # tab caused cursor to move to column 8
        8
        >>> width('1\x1b[10C')  # '1' + cursor right 10, cursor ends on column 11
        11
        >>> width('1\x1b[10C', control_codes='ignore')   # faster but wrong in this case
        1
    r   	r   ignorestrictr   r[   r    Fr   c                   rT   rU   rV   rW   rX   r&   r'   rY   A  rZ   zwidth.<locals>.<lambda>z*Indeterminate cursor sequence at position zIllegal control character z#xz at position zVertical movement character u   ‍rJ   r\   r]   r^   T)r_   r`   ra   _WIDTH_FAST_PATH_MIN_LENr   searchr   r   r6   r   r   r   r   
ValueErrorrG   maxri   r   rK   r   r   r   rL   r   rb   rc   rd   re   rf   rg   )r~   r   r   rF   r   current_col
max_extentrk   rl   rm   rn   ro   r   rh   rp   r   seqrightleftrP   rq   rr   wr&   rX   r'   r8     s  B

















$



  
r8    r   rF   
dest_widthfillcharc                C  sB   |   r|  rt| }nt| ||d}td|| }| ||  S )u)  
    Return text left-justified in a string of given display width.

    :param text: String to justify, may contain terminal sequences.
    :param dest_width: Total display width of result in terminal cells.
    :param fillchar: Single character for padding (default space). Must have
        display width of 1 (not wide, not zero-width, not combining). Unicode
        characters like ``'·'`` are acceptable. The width is not validated.
    :param control_codes: How to handle control sequences when measuring.
        Passed to :func:`width` for measurement.
    :param ambiguous_width: Width to use for East Asian Ambiguous (A)
        characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts.
    :returns: Text padded on the right to reach ``dest_width``.

    .. versionadded:: 0.3.0

    Example::

        >>> wcwidth.ljust('hi', 5)
        'hi   '
        >>> wcwidth.ljust('\x1b[31mhi\x1b[0m', 5)
        '\x1b[31mhi\x1b[0m   '
        >>> wcwidth.ljust('\U0001F468\u200D\U0001F469\u200D\U0001F467', 6)
        '👨‍👩‍👧    '
    r   r   r_   r`   ra   r8   r   r~   r   r   r   rF   
text_widthpadding_cellsr&   r&   r'   r:     
   !
r:   c                C  sB   |   r|  rt| }nt| ||d}td|| }|| |  S )u)  
    Return text right-justified in a string of given display width.

    :param text: String to justify, may contain terminal sequences.
    :param dest_width: Total display width of result in terminal cells.
    :param fillchar: Single character for padding (default space). Must have
        display width of 1 (not wide, not zero-width, not combining). Unicode
        characters like ``'·'`` are acceptable. The width is not validated.
    :param control_codes: How to handle control sequences when measuring.
        Passed to :func:`width` for measurement.
    :param ambiguous_width: Width to use for East Asian Ambiguous (A)
        characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts.
    :returns: Text padded on the left to reach ``dest_width``.

    .. versionadded:: 0.3.0

    Example::

        >>> wcwidth.rjust('hi', 5)
        '   hi'
        >>> wcwidth.rjust('\x1b[31mhi\x1b[0m', 5)
        '   \x1b[31mhi\x1b[0m'
        >>> wcwidth.rjust('\U0001F468\u200D\U0001F469\u200D\U0001F467', 6)
        '    👨‍👩‍👧'
    r   r   r   r   r&   r&   r'   r;     r   r;   c          	      C  sf   |   r|  rt| }nt| ||d}td|| }|d ||@ d@  }|| }|| |  ||  S )u  
    Return text centered in a string of given display width.

    :param text: String to center, may contain terminal sequences.
    :param dest_width: Total display width of result in terminal cells.
    :param fillchar: Single character for padding (default space). Must have
        display width of 1 (not wide, not zero-width, not combining). Unicode
        characters like ``'·'`` are acceptable. The width is not validated.
    :param control_codes: How to handle control sequences when measuring.
        Passed to :func:`width` for measurement.
    :param ambiguous_width: Width to use for East Asian Ambiguous (A)
        characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts.
    :returns: Text padded on both sides to reach ``dest_width``.

    For odd-width padding, the extra cell goes on the right (matching
    Python's :meth:`str.center` behavior).

    .. versionadded:: 0.3.0

    Example::

        >>> wcwidth.center('hi', 6)
        '  hi  '
        >>> wcwidth.center('\x1b[31mhi\x1b[0m', 6)
        '  \x1b[31mhi\x1b[0m  '
        >>> wcwidth.center('\U0001F468\u200D\U0001F469\u200D\U0001F467', 6)
        '  👨‍👩‍👧  '
    r   r   rJ   r   r   )	r~   r   r   r   rF   r   total_paddingleft_pad	right_padr&   r&   r'   r<   !  s   $
r<   c                 C  s   t d| S )a  
    Return text with all terminal escape sequences removed.

    Unknown or incomplete ESC sequences are preserved.

    :param text: String that may contain terminal escape sequences.
    :returns: The input text with all escape sequences stripped.

    .. versionadded:: 0.3.0

    Example::

        >>> strip_sequences('\x1b[31mred\x1b[0m')
        'red'
        >>> strip_sequences('hello')
        'hello'
        >>> strip_sequences('\x1b[1m\x1b[31mbold red\x1b[0m text')
        'bold red text'
    r*   )r   sub)r~   r&   r&   r'   r>   P  s   r>   T)r   r   rF   propagate_sgrstartri   r   boolc                C  s  t |d}||krdS |  r|  r| || S |r!d| vr!d}d}|r't}g }	d}
d}|t| k r6| | }|
|krE|durE|dkrEn|dkrlt| | }rl| }|rbt|rbt	||}n|	
| | }q-|dkrz|	
| |d7 }q-|dkr|dkr|
||
|   }|
|k r||
  kr|k rn n|	
d |r|du r|}|
d7 }
|
|k sn|	
| |d7 }q-tt| |d	}t||d
}|dkr||
  kr|k rn nR|	
| nL|
|kr|
| |kr|	
| |r|du r|}|
|7 }
n0|
|k r&|
| |kr&|	
|t||
| t ||
   |r!|du r!|}|
|7 }
n|
|7 }
|t|7 }|t| k s4d|	}|durTt| }rK|| }t|rT|d7 }|S )u6	  
    Clip text to display columns ``(start, end)`` while preserving all terminal sequences.

    This function extracts a substring based on visible column positions rather than
    character indices. Terminal escape sequences are preserved in the output since
    they have zero display width. If a wide character (width 2) would be split at
    either boundary, it is replaced with ``fillchar``.

    TAB characters (``\t``) are expanded to spaces up to the next tab stop,
    controlled by the ``tabsize`` parameter.

    Other cursor movement characters (backspace, carriage return) and cursor
    movement sequences are passed through unchanged as zero-width.

    :param text: String to clip, may contain terminal escape sequences.
    :param start: Absolute starting column (inclusive, 0-indexed).
    :param end: Absolute ending column (exclusive).
    :param fillchar: Character to use when a wide character must be split at
        a boundary (default space). Must have display width of 1.
    :param tabsize: Tab stop width (default 8). Set to 0 to pass tabs through
        as zero-width (preserved in output but don't advance column position).
    :param ambiguous_width: Width to use for East Asian Ambiguous (A)
        characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts.
    :param propagate_sgr: If True (default), SGR (terminal styling) sequences
        are propagated. The result begins with any active style at the start
        position and ends with a reset sequence if styles are active.
    :returns: Substring of ``text`` spanning display columns ``(start, end)``,
        with all terminal sequences preserved and wide characters at boundaries
        replaced with ``fillchar``.

    SGR (terminal styling) sequences are propagated by default. The result
    begins with any active style and ends with a reset::

        >>> clip('\x1b[1;34mHello world\x1b[0m', 6, 11)
        '\x1b[1;34mworld\x1b[0m'

    Set ``propagate_sgr=False`` to disable this behavior.

    .. versionadded:: 0.3.0

    .. versionchanged:: 0.5.0
       Added ``propagate_sgr`` parameter (default True).

    Example::

        >>> clip('hello world', 0, 5)
        'hello'
        >>> clip('中文字', 0, 3)  # Wide char split at column 3
        '中 '
        >>> clip('a\tb', 0, 10)  # Tab expanded to spaces
        'a       b'
    r   r*   r   FNr   r   r   )r   rX   z[0m)r   r_   r`   r
   ra   r   r   r   r	   r   appendri   nextr   r8   minjoinr   r   )r~   r   ri   r   r   rF   r   sgr_at_clip_startsgroutputcolrk   rp   r   r   next_tabgraphemer   resultprefixr&   r&   r'   r=   g  s   
A






"

@

r=   )rB   r   )rC   rD   rE   rD   rF   rG   rH   rG   )NrB   r   )
rQ   rD   rR   rS   rE   rD   rF   rG   rH   rG   )rt   rD   rH   ru   )r|   rD   rH   rD   )r~   rD   rH   r   )r   )r~   rD   rF   rG   rH   rG   )
r~   rD   r   r   r   rG   rF   rG   rH   rG   )r   )r~   rD   r   rG   r   rD   r   r   rF   rG   rH   rD   )r~   rD   rH   rD   )r~   rD   r   rG   ri   rG   r   rD   r   rG   rF   rG   r   r   rH   rD   )N__doc__
__future__r   	functoolsr   typingr   r   rL   r   r   table_mcr   	sgr_stater	   r
   r   r   r   
table_vs16r   
table_wider   
table_zeror   r   r   r   r   r   table_graphemer   r   r   table_ambiguousr   escape_sequencesr   r   r   r   unicode_versionsr   collections.abcr   r   r}   rM   rN   r   iterrO   rf   	frozensetr!   rb   rd   rc   rg   re   r   rD   	maketransr   r   __all__r6   r7   r@   r?   r9   r   r8   r:   r;   r<   r>   r=   r&   r&   r&   r'   <module>   s    ?
	4 
4 v,,
/