§
    ¡”jz\  ã                   ót  — d Z ddlmZ ddlmZmZmZ  G d„ d¦  «        Z G d„ de¦  «        Z G d	„ d
e¦  «        Z	 G d„ de¦  «        Z
 G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ d e¦  «        Z G d!„ d"e¦  «        Z G d#„ d$e¦  «        Z G d%„ d&e¦  «        Z G d'„ d(e¦  «        Z G d)„ d*e¦  «        Z G d+„ d,e¦  «        Z G d-„ d.e¦  «        Zd/S )0z5

Data structures for the CSS abstract syntax tree.

é    )Úascii_loweré   )Ú_serialize_toÚserialize_identifierÚserialize_namec                   ó2   — e Zd ZdZddgZd„ Zd„ Zd„ Zd„ ZdS )	ÚNodea¤  Every node type inherits from this class,
    which is never instantiated directly.

    .. attribute:: type

        Each child class has a :attr:`type` class attribute
        with a unique string value.
        This allows checking for the node type with code like:

        .. code-block:: python

            if node.type == 'whitespace':

        instead of the more verbose:

        .. code-block:: python

            from tinycss2.ast import WhitespaceToken
            if isinstance(node, WhitespaceToken):

    Every node also has these attributes and methods,
    which are not repeated for brevity:

    .. attribute:: source_line

        The line number of the start of the node in the CSS source.
        Starts at 1.

    .. attribute:: source_column

        The column number within :attr:`source_line` of the start of the node
        in the CSS source.
        Starts at 1.

    .. automethod:: serialize

    Úsource_columnÚsource_linec                 ó"   — || _         || _        d S ©N)r   r
   )Úselfr   r
   s      ú[/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/tinycss2/ast.pyÚ__init__zNode.__init__5   s   € Ø&ˆÔØ*ˆÔÐÐó    c                 ó8   — | j                              | ¬¦  «        S )N©r   )Úrepr_formatÚformatr   s    r   Ú__repr__zNode.__repr__9   s   € ØÔ×&Ò&¨DÐ&Ñ1Ô1Ð1r   c                 ód   — g }|                       |j        ¦  «         d                     |¦  «        S )z>Serialize this node to CSS syntax and return a Unicode string.Ú )r   ÚappendÚjoin)r   Úchunkss     r   Ú	serializezNode.serialize<   s-   € àˆØ×Ò˜6œ=Ñ)Ô)Ð)Ø�wŠw�v‰ŒÐr   c                 ó   — t           ‚)z„Serialize this node to CSS syntax, writing chunks as Unicode string
        by calling the provided :obj:`write` callback.

        )ÚNotImplementedError©r   Úwrites     r   r   zNode._serialize_toB   s
   € õ
 "Ð!r   N)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r   r   © r   r   r	   r	      sg   € € € € € ð$ð $ðJ ! -Ð0€Ið+ð +ð +ð2ð 2ð 2ðð ð ð"ð "ð "ð "ð "r   r	   c                   ó.   — e Zd ZdZddgZdZdZd„ Zd„ ZdS )	Ú
ParseErrora…  A syntax error of some sort. May occur anywhere in the tree.

    Syntax errors are not fatal in the parser
    to allow for different error handling behaviors.
    For example, an error in a Selector list makes the whole rule invalid,
    but an error in a Media Query list only replaces one comma-separated query
    with ``not all``.

    .. autoattribute:: type

    .. attribute:: kind

        Machine-readable string indicating the type of error.
        Example: ``'bad-url'``.

    .. attribute:: message

        Human-readable explanation of the error, as a string.
        Could be translated, expanded to include details, etc.

    ÚkindÚmessageÚerrorz'<{self.__class__.__name__} {self.kind}>c                 óZ   — t                                | ||¦  «         || _        || _        d S r   )r	   r   r)   r*   )r   ÚlineÚcolumnr)   r*   s        r   r   zParseError.__init__d   s*   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒ	ØˆŒˆˆr   c                 óÒ   — | j         dk    r |d¦  «         d S | j         dk    r |d¦  «         d S | j         dv r || j         ¦  «         d S | j         dv rd S t          d| z  ¦  «        ‚)Nz
bad-stringz"[bad string]
zbad-urlzurl([bad url])z)]})úeof-in-stringz
eof-in-urlzCan not serialize %r)r)   Ú	TypeErrorr   s     r   r   zParseError._serialize_toi   s–   € ØŒ9˜Ò$Ð$ØˆEÐ#Ñ$Ô$Ð$Ð$Ð$ØŒY˜)Ò#Ð#ØˆEÐ"Ñ#Ô#Ð#Ð#Ð#ØŒY˜%ÐÐØˆE�$”)ÑÔÐÐÐØŒYÐ9Ð9Ð9ØˆDåÐ2°TÑ9Ñ:Ô:Ð:r   N©	r!   r"   r#   r$   r%   Útyper   r   r   r&   r   r   r(   r(   J   sR   € € € € € ðð ð* ˜Ð#€IØ€DØ;€Kðð ð ð

;ð 
;ð 
;ð 
;ð 
;r   r(   c                   ó,   — e Zd ZdZdgZdZdZd„ Zd„ ZdS )ÚCommenta  A CSS comment.

    Comments can be ignored by passing ``skip_comments=True``
    to functions such as :func:`~tinycss2.parse_component_value_list`.

    .. autoattribute:: type

    .. attribute:: value

        The content of the comment, between ``/*`` and ``*/``, as a string.

    ÚvalueÚcommentú(<{self.__class__.__name__} {self.value}>c                 óL   — t                                | ||¦  «         || _        d S r   ©r	   r   r6   ©r   r-   r.   r6   s       r   r   zComment.__init__‡   ó#   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒ
ˆ
ˆ
r   c                 óR   —  |d¦  «          || j         ¦  «          |d¦  «         d S )Nz/*z*/©r6   r   s     r   r   zComment._serialize_to‹   s2   € Øˆˆd‰ŒˆØˆˆdŒjÑÔÐØˆˆd‰Œˆˆˆr   Nr2   r&   r   r   r5   r5   v   sO   € € € € € ðð ð �	€IØ€DØ<€Kðð ð ðð ð ð ð r   r5   c                   ó,   — e Zd ZdZdgZdZdZd„ Zd„ ZdS )ÚWhitespaceTokenzªA :diagram:`whitespace-token`.

    .. autoattribute:: type

    .. attribute:: value

        The whitespace sequence, as a string, as in the original CSS source.


    r6   Ú
whitespacez<{self.__class__.__name__}>c                 óL   — t                                | ||¦  «         || _        d S r   r:   r;   s       r   r   zWhitespaceToken.__init__    r<   r   c                 ó&   —  || j         ¦  «         d S r   r>   r   s     r   r   zWhitespaceToken._serialize_to¤   ó   € ØˆˆdŒjÑÔÐÐÐr   Nr2   r&   r   r   r@   r@   ‘   sO   € € € € € ð	ð 	ð �	€IØ€DØ/€Kðð ð ðð ð ð ð r   r@   c                   ó8   — e Zd ZdZdgZdZdZd„ Zd„ Zd„ Z	d„ Z
d	S )
ÚLiteralTokena·  Token that represents one or more characters as in the CSS source.

    .. autoattribute:: type

    .. attribute:: value

        A string of one to four characters.

    Instances compare equal to their :attr:`value`,
    so that these are equivalent:

    .. code-block:: python

        if node == ';':
        if node.type == 'literal' and node.value == ';':

    This regroups what `the specification`_ defines as separate token types:

    .. _the specification: https://drafts.csswg.org/css-syntax-3/

    * *<colon-token>* ``:``
    * *<semicolon-token>* ``;``
    * *<comma-token>* ``,``
    * *<cdc-token>* ``-->``
    * *<cdo-token>* ``<!--``
    * *<include-match-token>* ``~=``
    * *<dash-match-token>* ``|=``
    * *<prefix-match-token>* ``^=``
    * *<suffix-match-token>* ``$=``
    * *<substring-match-token>* ``*=``
    * *<column-token>* ``||``
    * *<delim-token>* (a single ASCII character not part of any another token)

    r6   Úliteralr8   c                 óL   — t                                | ||¦  «         || _        d S r   r:   r;   s       r   r   zLiteralToken.__init__Ï   r<   r   c                 ó    — | j         |k    p| |u S r   r>   ©r   Úothers     r   Ú__eq__zLiteralToken.__eq__Ó   s   € ØŒz˜UÒ"Ð3 d¨e mÐ3r   c                 ó   — | |k     S r   r&   rJ   s     r   Ú__ne__zLiteralToken.__ne__Ö   s   € Ø˜5’=Ð Ð r   c                 ó&   —  || j         ¦  «         d S r   r>   r   s     r   r   zLiteralToken._serialize_toÙ   rD   r   N)r!   r"   r#   r$   r%   r3   r   r   rL   rN   r   r&   r   r   rF   rF   ¨   sn   € € € € € ð!ð !ðD �	€IØ€DØ<€Kðð ð ð4ð 4ð 4ð!ð !ð !ðð ð ð ð r   rF   c                   ó.   — e Zd ZdZddgZdZdZd„ Zd„ ZdS )	Ú
IdentTokena`  An :diagram:`ident-token`.

    .. autoattribute:: type

    .. attribute:: value

        The unescaped value, as a Unicode string.

    .. attribute:: lower_value

        Same as :attr:`value` but normalized to *ASCII lower case*,
        see :func:`~webencodings.ascii_lower`.
        This is the value to use when comparing to a CSS keyword.

    Úlower_valuer6   Úidentr8   c                 ó¦   — t                                | ||¦  «         || _        	 t          |¦  «        | _        d S # t
          $ r || _        Y d S w xY wr   ©r	   r   r6   r   rR   ÚUnicodeEncodeErrorr;   s       r   r   zIdentToken.__init__ñ   óf   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒ
ð	%Ý*¨5Ñ1Ô1ˆDÔÐÐøÝ!ð 	%ð 	%ð 	%Ø$ˆDÔÐÐÐð	%øøøó   ¥; »AÁAc                 ó@   —  |t          | j        ¦  «        ¦  «         d S r   ©r   r6   r   s     r   r   zIdentToken._serialize_toù   s#   € ØˆÕ" 4¤:Ñ.Ô.Ñ/Ô/Ð/Ð/Ð/r   Nr2   r&   r   r   rQ   rQ   Ý   sR   € € € € € ðð ð  Ð(€IØ€DØ<€Kð%ð %ð %ð0ð 0ð 0ð 0ð 0r   rQ   c                   ó.   — e Zd ZdZddgZdZdZd„ Zd„ ZdS )	ÚAtKeywordTokena   An :diagram:`at-keyword-token`.

    .. code-block:: text

        '@' <value>

    .. autoattribute:: type

    .. attribute:: value

        The unescaped value, as a Unicode string, without the preceding ``@``.

    .. attribute:: lower_value

        Same as :attr:`value` but normalized to *ASCII lower case*,
        see :func:`~webencodings.ascii_lower`.
        This is the value to use when comparing to a CSS at-keyword.

        .. code-block:: python

            if node.type == 'at-keyword' and node.lower_value == 'import':

    rR   r6   z
at-keywordz)<{self.__class__.__name__} @{self.value}>c                 ó¦   — t                                | ||¦  «         || _        	 t          |¦  «        | _        d S # t
          $ r || _        Y d S w xY wr   rU   r;   s       r   r   zAtKeywordToken.__init__  rW   rX   c                 óV   —  |d¦  «          |t          | j        ¦  «        ¦  «         d S )Nú@rZ   r   s     r   r   zAtKeywordToken._serialize_to!  s0   € Øˆˆc‰
Œ
ˆ
ØˆÕ" 4¤:Ñ.Ô.Ñ/Ô/Ð/Ð/Ð/r   Nr2   r&   r   r   r\   r\   ý   sR   € € € € € ðð ð.  Ð(€IØ€DØ=€Kð%ð %ð %ð0ð 0ð 0ð 0ð 0r   r\   c                   ó.   — e Zd ZdZddgZdZdZd„ Zd„ ZdS )	Ú	HashTokenaš  A :diagram:`hash-token`.

    .. code-block:: text

        '#' <value>

    .. autoattribute:: type

    .. attribute:: value

        The unescaped value, as a Unicode string, without the preceding ``#``.

    .. attribute:: is_identifier

        A boolean, true if the CSS source for this token
        was ``#`` followed by a valid identifier.
        (Only such hash tokens are valid ID selectors.)

    Úis_identifierr6   Úhashz)<{self.__class__.__name__} #{self.value}>c                 óZ   — t                                | ||¦  «         || _        || _        d S r   )r	   r   r6   rb   )r   r-   r.   r6   rb   s        r   r   zHashToken.__init__>  s-   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒ
Ø*ˆÔÐÐr   c                 ó¢   —  |d¦  «         | j         r |t          | j        ¦  «        ¦  «         d S  |t          | j        ¦  «        ¦  «         d S )Nú#)rb   r   r6   r   r   s     r   r   zHashToken._serialize_toC  s[   € Øˆˆc‰
Œ
ˆ
ØÔð 	.ØˆEÕ& t¤zÑ2Ô2Ñ3Ô3Ð3Ð3Ð3àˆE•. ¤Ñ,Ô,Ñ-Ô-Ð-Ð-Ð-r   Nr2   r&   r   r   ra   ra   &  sR   € € € € € ðð ð& ! 'Ð*€IØ€DØ=€Kð+ð +ð +ð
.ð .ð .ð .ð .r   ra   c                   ó.   — e Zd ZdZddgZdZdZd„ Zd„ ZdS )	ÚStringTokenzÑA :diagram:`string-token`.

    .. code-block:: text

        '"' <value> '"'

    .. autoattribute:: type

    .. attribute:: value

        The unescaped value, as a Unicode string, without the quotes.

    Úrepresentationr6   Ústringú1<{self.__class__.__name__} {self.representation}>c                 óZ   — t                                | ||¦  «         || _        || _        d S r   ©r	   r   r6   ri   ©r   r-   r.   r6   ri   s        r   r   zStringToken.__init__]  ó-   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒ
Ø,ˆÔÐÐr   c                 ó&   —  || j         ¦  «         d S r   ©ri   r   s     r   r   zStringToken._serialize_tob  ó   € ØˆˆdÔ!Ñ"Ô"Ð"Ð"Ð"r   Nr2   r&   r   r   rh   rh   K  sR   € € € € € ðð ð " 7Ð+€IØ€DØE€Kð-ð -ð -ð
#ð #ð #ð #ð #r   rh   c                   ó.   — e Zd ZdZddgZdZdZd„ Zd„ ZdS )	ÚURLTokenzìAn :diagram:`url-token`.

    .. code-block:: text

        'url(' <value> ')'

    .. autoattribute:: type

    .. attribute:: value

        The unescaped URL, as a Unicode string, without the ``url(`` and ``)``
        markers.

    ri   r6   Úurlrk   c                 óZ   — t                                | ||¦  «         || _        || _        d S r   rm   rn   s        r   r   zURLToken.__init__y  ro   r   c                 ó&   —  || j         ¦  «         d S r   rq   r   s     r   r   zURLToken._serialize_to~  rr   r   Nr2   r&   r   r   rt   rt   f  sR   € € € € € ðð ð " 7Ð+€IØ€DØE€Kð-ð -ð -ð
#ð #ð #ð #ð #r   rt   c                   ó.   — e Zd ZdZddgZdZdZd„ Zd„ ZdS )	ÚUnicodeRangeTokenaF  A :diagram:`unicode-range-token`.

    .. autoattribute:: type

    .. attribute:: start

        The start of the range, as an integer between 0 and 1114111.

    .. attribute:: end

        The end of the range, as an integer between 0 and 1114111.
        Same as :attr:`start` if the source only specified one value.

    ÚendÚstartzunicode-rangez3<{self.__class__.__name__} {self.start} {self.end}>c                 óZ   — t                                | ||¦  «         || _        || _        d S r   )r	   r   r{   rz   )r   r-   r.   r{   rz   s        r   r   zUnicodeRangeToken.__init__•  s*   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒ
ØˆŒˆˆr   c                 ó„   — | j         | j        k    r |d| j        z  ¦  «         d S  |d| j        | j         fz  ¦  «         d S )NzU+%XzU+%X-%X)rz   r{   r   s     r   r   zUnicodeRangeToken._serialize_toš  sR   € ØŒ8�t”zÒ!Ð!ØˆE�&˜4œ:Ñ%Ñ&Ô&Ð&Ð&Ð&àˆE�)˜tœz¨4¬8Ð4Ñ4Ñ5Ô5Ð5Ð5Ð5r   Nr2   r&   r   r   ry   ry   ‚  sR   € € € € € ðð ð ˜Ð €IØ€DØG€Kðð ð ð
6ð 6ð 6ð 6ð 6r   ry   c                   ó.   — e Zd ZdZg d¢ZdZdZd„ Zd„ ZdS )ÚNumberTokenaÝ  A :diagram:`number-token`.

    .. autoattribute:: type

    .. attribute:: value

        The numeric value as a :class:`float`.

    .. attribute:: int_value

        The numeric value as an :class:`int`
        if :attr:`is_integer` is true, :obj:`None` otherwise.

    .. attribute:: is_integer

        Whether the token was syntactically an integer, as a boolean.

    .. attribute:: representation

        The CSS representation of the value, as a Unicode string.

    ©Ú	int_valueÚ
is_integerri   r6   Únumberrk   c                 óz   — t                                | ||¦  «         || _        || _        |d u| _        || _        d S r   ©r	   r   r6   r�   r‚   ri   ©r   r-   r.   r6   r�   ri   s         r   r   zNumberToken.__init__¼  ó@   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒ
Ø"ˆŒØ#¨4Ð/ˆŒØ,ˆÔÐÐr   c                 ó&   —  || j         ¦  «         d S r   rq   r   s     r   r   zNumberToken._serialize_toÃ  rr   r   Nr2   r&   r   r   r   r   ¡  sT   € € € € € ðð ð, GÐFÐF€IØ€DØE€Kð-ð -ð -ð#ð #ð #ð #ð #r   r   c                   ó.   — e Zd ZdZg d¢ZdZdZd„ Zd„ ZdS )ÚPercentageTokenuI  A :diagram:`percentage-token`.

    .. code-block:: text

        <representation> '%'

    .. autoattribute:: type

    .. attribute:: value

        The value numeric as a :class:`float`.

    .. attribute:: int_value

        The numeric value as an :class:`int`
        if the token was syntactically an integer,
        or :obj:`None`.

    .. attribute:: is_integer

        Whether the tokenâ€™s value was syntactically an integer, as a boolean.

    .. attribute:: representation

        The CSS representation of the value without the unit,
        as a Unicode string.

    r€   Ú
percentagez2<{self.__class__.__name__} {self.representation}%>c                 óz   — t                                | ||¦  «         || _        || _        |d u| _        || _        d S r   r…   r†   s         r   r   zPercentageToken.__init__è  r‡   r   c                 ó<   —  || j         ¦  «          |d¦  «         d S )Nú%rq   r   s     r   r   zPercentageToken._serialize_toï  s&   € ØˆˆdÔ!Ñ"Ô"Ð"Øˆˆc‰
Œ
ˆ
ˆ
ˆ
r   Nr2   r&   r   r   rŠ   rŠ   Ç  sT   € € € € € ðð ð8 GÐFÐF€IØ€DØF€Kð-ð -ð -ðð ð ð ð r   rŠ   c                   ó.   — e Zd ZdZg d¢ZdZdZd„ Zd„ ZdS )ÚDimensionTokenuÍ  A :diagram:`dimension-token`.

    .. code-block:: text

        <representation> <unit>

    .. autoattribute:: type

    .. attribute:: value

        The value numeric as a :class:`float`.

    .. attribute:: int_value

        The numeric value as an :class:`int`
        if the token was syntactically an integer,
        or :obj:`None`.

    .. attribute:: is_integer

        Whether the tokenâ€™s value was syntactically an integer, as a boolean.

    .. attribute:: representation

        The CSS representation of the value without the unit,
        as a Unicode string.

    .. attribute:: unit

        The unescaped unit, as a Unicode string.

    .. attribute:: lower_unit

        Same as :attr:`unit` but normalized to *ASCII lower case*,
        see :func:`~webencodings.ascii_lower`.
        This is the value to use when comparing to a CSS unit.

        .. code-block:: python

            if node.type == 'dimension' and node.lower_unit == 'px':

    )r�   r‚   Ú
lower_unitri   Úunitr6   Ú	dimensionz<<{self.__class__.__name__} {self.representation}{self.unit}>c                 óâ   — t                                | ||¦  «         || _        || _        |d u| _        || _        || _        	 t          |¦  «        | _        d S # t          $ r || _        Y d S w xY wr   )
r	   r   r6   r�   r‚   ri   r’   r   r‘   rV   )r   r-   r.   r6   r�   ri   r’   s          r   r   zDimensionToken.__init__+  s�   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒ
Ø"ˆŒØ#¨4Ð/ˆŒØ,ˆÔØˆŒ	ð	#Ý)¨$Ñ/Ô/ˆDŒOˆOˆOøÝ!ð 	#ð 	#ð 	#Ø"ˆDŒOˆOˆOˆOð	#øøøs   ÁA ÁA.Á-A.c                 óð   —  || j         ¦  «         | j        }|dv s|                     d¦  «        r- |d¦  «          |t          |dd …         ¦  «        ¦  «         d S  |t	          |¦  «        ¦  «         d S )N)ÚeÚE)ze-zE-z\65 r   )ri   r’   Ú
startswithr   r   )r   r    r’   s      r   r   zDimensionToken._serialize_to7  sŠ   € ØˆˆdÔ!Ñ"Ô"Ð"àŒyˆØ�:ÐÐ §¢°Ñ!>Ô!>ÐØˆE�'‰NŒNˆNØˆE•.  a b b¤Ñ*Ô*Ñ+Ô+Ð+Ð+Ð+àˆEÕ& tÑ,Ô,Ñ-Ô-Ð-Ð-Ð-r   Nr2   r&   r   r   r�   r�   ô  s\   € € € € € ð)ð )ðTð ð €Ið €Dð7€Kð
#ð 
#ð 
#ð.ð .ð .ð .ð .r   r�   c                   ó,   — e Zd ZdZdgZdZdZd„ Zd„ ZdS )ÚParenthesesBlocka"  A :diagram:`()-block`.

    .. code-block:: text

        '(' <content> ')'

    .. autoattribute:: type

    .. attribute:: content

        The content of the block, as list of :term:`component values`.
        The ``(`` and ``)`` markers themselves are not represented in the list.

    Úcontentz() blocku#   <{self.__class__.__name__} ( â€¦ )>c                 óL   — t                                | ||¦  «         || _        d S r   ©r	   r   r›   ©r   r-   r.   r›   s       r   r   zParenthesesBlock.__init__U  ó#   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒˆˆr   c                 ó\   —  |d¦  «         t          | j        |¦  «          |d¦  «         d S )Nú(ú)©r   r›   r   s     r   r   zParenthesesBlock._serialize_toY  ó2   € Øˆˆc‰
Œ
ˆ
Ý�d”l EÑ*Ô*Ð*Øˆˆc‰
Œ
ˆ
ˆ
ˆ
r   Nr2   r&   r   r   rš   rš   B  óO   € € € € € ðð ð �€IØ€DØ7€Kðð ð ðð ð ð ð r   rš   c                   ó,   — e Zd ZdZdgZdZdZd„ Zd„ ZdS )ÚSquareBracketsBlocka"  A :diagram:`[]-block`.

    .. code-block:: text

        '[' <content> ']'

    .. autoattribute:: type

    .. attribute:: content

        The content of the block, as list of :term:`component values`.
        The ``[`` and ``]`` markers themselves are not represented in the list.

    r›   z[] blocku#   <{self.__class__.__name__} [ â€¦ ]>c                 óL   — t                                | ||¦  «         || _        d S r   r�   rž   s       r   r   zSquareBracketsBlock.__init__r  rŸ   r   c                 ó\   —  |d¦  «         t          | j        |¦  «          |d¦  «         d S )Nú[ú]r£   r   s     r   r   z!SquareBracketsBlock._serialize_tov  r¤   r   Nr2   r&   r   r   r§   r§   _  r¥   r   r§   c                   ó,   — e Zd ZdZdgZdZdZd„ Zd„ ZdS )ÚCurlyBracketsBlocka"  A :diagram:`{}-block`.

    .. code-block:: text

        '{' <content> '}'

    .. autoattribute:: type

    .. attribute:: content

        The content of the block, as list of :term:`component values`.
        The ``[`` and ``]`` markers themselves are not represented in the list.

    r›   z{} blocku%   <{self.__class__.__name__} {{ â€¦ }}>c                 óL   — t                                | ||¦  «         || _        d S r   r�   rž   s       r   r   zCurlyBracketsBlock.__init__�  rŸ   r   c                 ó\   —  |d¦  «         t          | j        |¦  «          |d¦  «         d S ©NÚ{Ú}r£   r   s     r   r   z CurlyBracketsBlock._serialize_to“  r¤   r   Nr2   r&   r   r   r­   r­   |  sO   € € € € € ðð ð �€IØ€DØ9€Kðð ð ðð ð ð ð r   r­   c                   ó.   — e Zd ZdZg d¢ZdZdZd„ Zd„ ZdS )ÚFunctionBlockaÑ  A :diagram:`function-block`.

    .. code-block:: text

        <name> '(' <arguments> ')'

    .. autoattribute:: type

    .. attribute:: name

        The unescaped name of the function, as a Unicode string.

    .. attribute:: lower_name

        Same as :attr:`name` but normalized to *ASCII lower case*,
        see :func:`~webencodings.ascii_lower`.
        This is the value to use when comparing to a CSS function name.

    .. attribute:: arguments

        The arguments of the function, as list of :term:`component values`.
        The ``(`` and ``)`` markers themselves are not represented in the list.
        Commas are not special, but represented as :obj:`LiteralToken` objects
        in the list.

    )Ú	argumentsÚ
lower_nameÚnameÚfunctionu.   <{self.__class__.__name__} {self.name}( â€¦ )>c                 ó´   — t                                | ||¦  «         || _        	 t          |¦  «        | _        n# t
          $ r
 || _        Y nw xY w|| _        d S r   )r	   r   r·   r   r¶   rV   rµ   )r   r-   r.   r·   rµ   s        r   r   zFunctionBlock.__init__¸  sf   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒ	ð	#Ý)¨$Ñ/Ô/ˆDŒOˆOøÝ!ð 	#ð 	#ð 	#Ø"ˆDŒOˆOˆOð	#øøøà"ˆŒˆˆs   ¥: ºAÁAc                 ó˜  —  |t          | j        ¦  «        ¦  «          |d¦  «         t          | j        |¦  «         | }t	          |t
          ¦  «        rj|j        rct	          |j        d         t          ¦  «        o|j        d         j        dk    }|rd S |j        d         }t	          |t
          ¦  «        r|j        °c |d¦  «         d S )Nr¡   éÿÿÿÿr0   r¢   )r   r·   r   rµ   Ú
isinstancer´   r(   r)   )r   r    r¸   Úeof_in_strings       r   r   zFunctionBlock._serialize_toÁ  sÜ   € ØˆÕ" 4¤9Ñ-Ô-Ñ.Ô.Ð.Øˆˆc‰
Œ
ˆ
Ý�d”n eÑ,Ô,Ð,ØˆÝ˜¥=Ñ1Ô1ð 	.°hÔ6Hð 	.å˜8Ô-¨bÔ1µ:Ñ>Ô>ð ?ØÔ" 2Ô&Ô+¨Ò>ð ð ð Ø�ØÔ)¨"Ô-ˆHõ ˜¥=Ñ1Ô1ð 	.°hÔ6Hð 	.ð 	ˆˆc‰
Œ
ˆ
ˆ
ˆ
r   Nr2   r&   r   r   r´   r´   ™  sS   € € € € € ðð ð4 4Ð3Ð3€IØ€DØB€Kð#ð #ð #ðð ð ð ð r   r´   c                   ó.   — e Zd ZdZg d¢ZdZdZd„ Zd„ ZdS )ÚDeclarationa  A (property or descriptor) :diagram:`declaration`.

    .. code-block:: text

        <name> ':' <value>
        <name> ':' <value> '!important'

    .. autoattribute:: type

    .. attribute:: name

        The unescaped name, as a Unicode string.

    .. attribute:: lower_name

        Same as :attr:`name` but normalized to *ASCII lower case*,
        see :func:`~webencodings.ascii_lower`.
        This is the value to use when comparing to
        a CSS property or descriptor name.

        .. code-block:: python

            if node.type == 'declaration' and node.lower_name == 'color':

    .. attribute:: value

        The declaration value as a list of :term:`component values`:
        anything between ``:`` and
        the end of the declaration, or ``!important``.

    .. attribute:: important

        A boolean, true if the declaration had an ``!important`` marker.
        It is up to the consumer to reject declarations that do not accept
        this flag, such as non-property descriptor declarations.

    )Ú	importantr¶   r·   r6   Údeclarationu,   <{self.__class__.__name__} {self.name}: â€¦>c                 óv   — t                                | ||¦  «         || _        || _        || _        || _        d S r   )r	   r   r·   r¶   r6   rÀ   )r   r-   r.   r·   r¶   r6   rÀ   s          r   r   zDeclaration.__init__ú  s8   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒ	Ø$ˆŒØˆŒ
Ø"ˆŒˆˆr   c                 ó¨   —  |t          | j        ¦  «        ¦  «          |d¦  «         t          | j        |¦  «         | j        r |d¦  «         d S d S )Nú:z
!important)r   r·   r   r6   rÀ   r   s     r   r   zDeclaration._serialize_to  sf   € ØˆÕ" 4¤9Ñ-Ô-Ñ.Ô.Ð.Øˆˆc‰
Œ
ˆ
Ý�d”j %Ñ(Ô(Ð(ØŒ>ð 	 ØˆE�,ÑÔÐÐÐð	 ð 	 r   Nr2   r&   r   r   r¿   r¿   Ð  sT   € € € € € ð$ð $ðJ =Ð<Ð<€IØ€DØ@€Kð#ð #ð #ð ð  ð  ð  ð  r   r¿   c                   ó.   — e Zd ZdZddgZdZdZd„ Zd„ ZdS )	ÚQualifiedRuleu±  A :diagram:`qualified rule`.

    .. code-block:: text

        <prelude> '{' <content> '}'

    The interpretation of qualified rules depend on their context.
    At the top-level of a stylesheet
    or in a conditional rule such as ``@media``,
    they are **style rules** where the :attr:`prelude` is Selectors list
    and the :attr:`content` is a list of property declarations.

    .. autoattribute:: type

    .. attribute:: prelude

        The ruleâ€™s prelude, the part before the {} block,
        as a list of :term:`component values`.

    .. attribute:: content

        The ruleâ€™s content, the part inside the {} block,
        as a list of :term:`component values`.

    r›   Úpreludezqualified-ruleu)   <{self.__class__.__name__} â€¦ {{ â€¦ }}>c                 óZ   — t                                | ||¦  «         || _        || _        d S r   )r	   r   rÇ   r›   )r   r-   r.   rÇ   r›   s        r   r   zQualifiedRule.__init__(  s*   € Ý�Š�d˜D &Ñ)Ô)Ð)ØˆŒØˆŒˆˆr   c                 ó†   — t          | j        |¦  «          |d¦  «         t          | j        |¦  «          |d¦  «         d S r°   )r   rÇ   r›   r   s     r   r   zQualifiedRule._serialize_to-  sD   € Ý�d”l EÑ*Ô*Ð*Øˆˆc‰
Œ
ˆ
Ý�d”l EÑ*Ô*Ð*Øˆˆc‰
Œ
ˆ
ˆ
ˆ
r   Nr2   r&   r   r   rÆ   rÆ   	  sT   € € € € € ðð ð2 ˜IÐ&€IØ€Dð$€Kðð ð ð
ð ð ð ð r   rÆ   c                   ó.   — e Zd ZdZg d¢ZdZdZd„ Zd„ ZdS )ÚAtRuleu÷  An :diagram:`at-rule`.

    .. code-block:: text

        @<at_keyword> <prelude> '{' <content> '}'
        @<at_keyword> <prelude> ';'

    The interpretation of at-rules depend on their at-keyword
    as well as their context.
    Most types of at-rules (ie. at-keyword values)
    are only allowed in some context,
    and must either end with a {} block or a semicolon.

    .. autoattribute:: type

    .. attribute:: at_keyword

        The unescaped value of the ruleâ€™s at-keyword,
        without the ``@`` symbol, as a Unicode string.

    .. attribute:: lower_at_keyword

        Same as :attr:`at_keyword` but normalized to *ASCII lower case*,
        see :func:`~webencodings.ascii_lower`.
        This is the value to use when comparing to a CSS at-keyword.

        .. code-block:: python

            if node.type == 'at-rule' and node.lower_at_keyword == 'import':

    .. attribute:: prelude

        The ruleâ€™s prelude, the part before the {} block or semicolon,
        as a list of :term:`component values`.

    .. attribute:: content

        The ruleâ€™s content, if any.
        The blockâ€™s content as a list of :term:`component values`
        for at-rules with a {} block,
        or :obj:`None` for at-rules ending with a semicolon.

    )Ú
at_keywordr›   Úlower_at_keywordrÇ   zat-ruleu<   <{self.__class__.__name__} @{self.at_keyword} â€¦ {{ â€¦ }}>c                 óv   — t                                | ||¦  «         || _        || _        || _        || _        d S r   )r	   r   rÌ   rÍ   rÇ   r›   )r   r-   r.   rÌ   rÍ   rÇ   r›   s          r   r   zAtRule.__init__e  s9   € å�Š�d˜D &Ñ)Ô)Ð)Ø$ˆŒØ 0ˆÔØˆŒØˆŒˆˆr   c                 óþ   —  |d¦  «          |t          | j        ¦  «        ¦  «         t          | j        |¦  «         | j        € |d¦  «         d S  |d¦  «         t          | j        |¦  «          |d¦  «         d S )Nr_   ú;r±   r²   )r   rÌ   r   rÇ   r›   r   s     r   r   zAtRule._serialize_tom  s…   € Øˆˆc‰
Œ
ˆ
ØˆÕ" 4¤?Ñ3Ô3Ñ4Ô4Ð4Ý�d”l EÑ*Ô*Ð*ØŒ<ÐØˆE�#‰JŒJˆJˆJˆJàˆE�#‰JŒJˆJÝ˜$œ,¨Ñ.Ô.Ð.ØˆE�#‰JŒJˆJˆJˆJr   Nr2   r&   r   r   rË   rË   4  sW   € € € € € ð*ð *ðV IÐHÐH€IØ€Dð7€Kðð ð ð	ð 	ð 	ð 	ð 	r   rË   N)r$   Úwebencodingsr   Ú
serializerr   r   r   r	   r(   r5   r@   rF   rQ   r\   ra   rh   rt   ry   r   rŠ   r�   rš   r§   r­   r´   r¿   rÆ   rË   r&   r   r   ú<module>rÓ      sÙ  ððð ð %Ð $Ð $Ð $Ð $Ð $à KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ Kð:"ð :"ð :"ð :"ð :"ñ :"ô :"ð :"ðz);ð );ð );ð );ð );�ñ );ô );ð );ðXð ð ð ð ˆdñ ô ð ð6ð ð ð ð �dñ ô ð ð.2ð 2ð 2ð 2ð 2�4ñ 2ô 2ð 2ðj0ð 0ð 0ð 0ð 0�ñ 0ô 0ð 0ð@&0ð &0ð &0ð &0ð &0�Tñ &0ô &0ð &0ðR".ð ".ð ".ð ".ð ".�ñ ".ô ".ð ".ðJ#ð #ð #ð #ð #�$ñ #ô #ð #ð6#ð #ð #ð #ð #ˆtñ #ô #ð #ð86ð 6ð 6ð 6ð 6˜ñ 6ô 6ð 6ð>##ð ##ð ##ð ##ð ##�$ñ ##ô ##ð ##ðL*ð *ð *ð *ð *�dñ *ô *ð *ðZK.ð K.ð K.ð K.ð K.�Tñ K.ô K.ð K.ð\ð ð ð ð �tñ ô ð ð:ð ð ð ð ˜$ñ ô ð ð:ð ð ð ð ˜ñ ô ð ð:4ð 4ð 4ð 4ð 4�Dñ 4ô 4ð 4ðn6 ð 6 ð 6 ð 6 ð 6 �$ñ 6 ô 6 ð 6 ðr(ð (ð (ð (ð (�Dñ (ô (ð (ðVBð Bð Bð Bð BˆTñ Bô Bð Bð Bð Br   