§
    ¸)ýf®  ã                   óª   — d Z g d¢ZddlmZmZ ddlmZmZ ddlm	Z	  G d„ d¦  «        Z
 G d„ d	e
¦  «        Z G d
„ d¦  «        Z G d„ de¦  «        ZdS )z-A parser of RFC 2822 and MIME email messages.)ÚParserÚHeaderParserÚBytesParserÚBytesHeaderParserÚ
FeedParserÚBytesFeedParseré    )ÚStringIOÚTextIOWrapper)r   r   )Úcompat32c                   ó,   — e Zd Zdedœd„Zdd„Zdd„ZdS )	r   N©Úpolicyc                ó"   — || _         || _        dS )a…  Parser of RFC 2822 and MIME email messages.

        Creates an in-memory object tree representing the email message, which
        can then be manipulated and turned over to a Generator to return the
        textual representation of the message.

        The string must be formatted as a block of RFC 2822 headers and header
        continuation lines, optionally preceded by a `Unix-from' header.  The
        header block is terminated either by the end of the string or by a
        blank line.

        _class is the class to instantiate for new message objects when they
        must be created.  This class must have a constructor that can take
        zero arguments.  Default is Message.Message.

        The policy keyword specifies a policy object that controls a number of
        aspects of the parser's operation.  The default policy maintains
        backward compatibility.

        N)Ú_classr   )Úselfr   r   s      úX/home/blender/git/blender-v430/install_release/4.3/python/lib/python3.11/email/parser.pyÚ__init__zParser.__init__   s   € ð* ˆŒØˆŒˆˆó    Fc                 óê   — t          | j        | j        ¬¦  «        }|r|                     ¦   «          	 |                     d¦  «        }|sn|                     |¦  «         Œ.|                     ¦   «         S )a\  Create a message structure from the data in a file.

        Reads all the data from the file and returns the root of the message
        structure.  Optional headersonly is a flag specifying whether to stop
        parsing after reading the headers or not.  The default is False,
        meaning it parses the entire contents of the file.
        r   Ti    )r   r   r   Ú_set_headersonlyÚreadÚfeedÚclose)r   ÚfpÚheadersonlyÚ
feedparserÚdatas        r   ÚparsezParser.parse)   s~   € õ   ¤°D´KÐ@Ñ@Ô@ˆ
Øð 	*Ø×'Ò'Ñ)Ô)Ð)ð	"Ø—7’7˜4‘=”=ˆDØð ØØ�OŠO˜DÑ!Ô!Ð!ð		"ð
 ×ÒÑ!Ô!Ð!r   c                 óJ   — |                       t          |¦  «        |¬¦  «        S )a-  Create a message structure from a string.

        Returns the root of the message structure.  Optional headersonly is a
        flag specifying whether to stop parsing after reading the headers or
        not.  The default is False, meaning it parses the entire contents of
        the file.
        ©r   )r   r	   ©r   Útextr   s      r   ÚparsestrzParser.parsestr;   s    € ð �zŠz�( 4™.œ.°kˆzÑBÔBÐBr   )N©F)Ú__name__Ú
__module__Ú__qualname__r   r   r   r#   © r   r   r   r      sb   € € € € € ð¨hð ð ð ð ð ð0"ð "ð "ð "ð$Cð Cð Cð Cð Cð Cr   r   c                   ó   — e Zd Zdd„Zdd„ZdS )r   Tc                 ó:   — t                                | |d¦  «        S ©NT)r   r   ©r   r   r   s      r   r   zHeaderParser.parseG   s   € Ý�|Š|˜D " dÑ+Ô+Ð+r   c                 ó:   — t                                | |d¦  «        S r+   )r   r#   r!   s      r   r#   zHeaderParser.parsestrJ   s   € Ý�Š˜t T¨4Ñ0Ô0Ð0r   N©T)r%   r&   r'   r   r#   r(   r   r   r   r   F   s<   € € € € € ð,ð ,ð ,ð ,ð1ð 1ð 1ð 1ð 1ð 1r   r   c                   ó$   — e Zd Zd„ Zdd„Zdd„ZdS )r   c                 ó(   — t          |i |¤Ž| _        dS )aÐ  Parser of binary RFC 2822 and MIME email messages.

        Creates an in-memory object tree representing the email message, which
        can then be manipulated and turned over to a Generator to return the
        textual representation of the message.

        The input must be formatted as a block of RFC 2822 headers and header
        continuation lines, optionally preceded by a `Unix-from' header.  The
        header block is terminated either by the end of the input or by a
        blank line.

        _class is the class to instantiate for new message objects when they
        must be created.  This class must have a constructor that can take
        zero arguments.  Default is Message.Message.
        N)r   Úparser)r   ÚargsÚkws      r   r   zBytesParser.__init__P   s   € õ  ˜dÐ) bÐ)Ð)ˆŒˆˆr   Fc                 ó¸   — t          |dd¬¦  «        }	 | j                             ||¦  «        |                     ¦   «          S # |                     ¦   «          w xY w)ac  Create a message structure from the data in a binary file.

        Reads all the data from the file and returns the root of the message
        structure.  Optional headersonly is a flag specifying whether to stop
        parsing after reading the headers or not.  The default is False,
        meaning it parses the entire contents of the file.
        ÚasciiÚsurrogateescape)ÚencodingÚerrors)r
   r1   r   Údetachr,   s      r   r   zBytesParser.parseb   sT   € õ ˜2¨Ð8IÐJÑJÔJˆð	Ø”;×$Ò$ R¨Ñ5Ô5à�IŠI‰KŒKˆKˆKøˆB�IŠI‰KŒKˆKˆKøøøs   ”A ÁAc                 óf   — |                      dd¬¦  «        }| j                             ||¦  «        S )a2  Create a message structure from a byte string.

        Returns the root of the message structure.  Optional headersonly is a
        flag specifying whether to stop parsing after reading the headers or
        not.  The default is False, meaning it parses the entire contents of
        the file.
        ÚASCIIr6   )r8   )Údecoder1   r#   r!   s      r   Ú
parsebyteszBytesParser.parsebytesq   s2   € ð �{Š{˜7Ð+<ˆ{Ñ=Ô=ˆØŒ{×#Ò# D¨+Ñ6Ô6Ð6r   Nr$   )r%   r&   r'   r   r   r=   r(   r   r   r   r   N   sK   € € € € € ð*ð *ð *ð$ð ð ð ð	7ð 	7ð 	7ð 	7ð 	7ð 	7r   r   c                   ó   — e Zd Zdd„Zdd„ZdS )r   Tc                 ó<   — t                                | |d¬¦  «        S ©NTr    )r   r   r,   s      r   r   zBytesHeaderParser.parse~   s   € Ý× Ò   r°tÐ Ñ<Ô<Ð<r   c                 ó<   — t                                | |d¬¦  «        S r@   )r   r=   r!   s      r   r=   zBytesHeaderParser.parsebytes�   s   € Ý×%Ò% d¨D¸dÐ%ÑCÔCÐCr   Nr.   )r%   r&   r'   r   r=   r(   r   r   r   r   }   sB   € € € € € ð=ð =ð =ð =ðDð Dð Dð Dð Dð Dr   r   N)Ú__doc__Ú__all__Úior	   r
   Úemail.feedparserr   r   Úemail._policybaser   r   r   r   r   r(   r   r   ú<module>rG      s$  ðð
 4Ð 3ð,ð ,ð ,€ð 'Ð &Ð &Ð &Ð &Ð &Ð &Ð &à 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ø &Ð &Ð &Ð &Ð &Ð &ð3Cð 3Cð 3Cð 3Cð 3Cñ 3Cô 3Cð 3Cðl1ð 1ð 1ð 1ð 1�6ñ 1ô 1ð 1ð,7ð ,7ð ,7ð ,7ð ,7ñ ,7ô ,7ð ,7ð^Dð Dð Dð Dð D˜ñ Dô Dð Dð Dð Dr   