Your IP : 3.138.101.51


Current Path : /opt/imunify360/venv/lib64/python3.11/site-packages/jinja2/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/jinja2/__pycache__/nodes.cpython-311.pyc

�

S�Dgwy��	�dZddlZddlmZddlmZddlmZddlmZddlm	Z	dd	lm
Z
ejejej
ejejejejd
�Zejejejd�Zejejejejejejd�d
�d�ZGd�de��ZGd�de ��Z!Gd�de"��Z#d�Z$Gd�de
e!e"����Z%Gd�de%��Z&Gd�de%��Z'Gd�de%��Z(Gd�de&��Z)Gd �d!e&��Z*Gd"�d#e&��Z+Gd$�d%e&��Z,Gd&�d'e&��Z-Gd(�d)e&��Z.Gd*�d+e&��Z/Gd,�d-e&��Z0Gd.�d/e&��Z1Gd0�d1e&��Z2Gd2�d3e&��Z3Gd4�d5e&��Z4Gd6�d7e&��Z5Gd8�d9e&��Z6Gd:�d;e&��Z7Gd<�d=e%��Z8Gd>�d?e8��Z9Gd@�dAe8��Z:GdB�dCe8��Z;GdD�dEe8��Z<GdF�dGe8��Z=GdH�dIe=��Z>GdJ�dKe=��Z?GdL�dMe=��Z@GdN�dOe=��ZAGdP�dQe=��ZBGdR�dSe'��ZCGdT�dUe'��ZDGdV�dWe8��ZEdX�ZFGdY�dZe8��ZGGd[�d\e8��ZHGd]�d^e8��ZIGd_�d`e8��ZJGda�dbe8��ZKGdc�dde8��ZLGde�dfe8��ZMGdg�dhe8��ZNGdi�dje'��ZO	eOxjdldm�PeQdn�eRe��eRe��zeRe��zD������zz
c_Gdo�dpe9��ZSGdq�dre9��ZTGds�dte9��ZUGdu�dve9��ZVGdw�dxe9��ZWGdy�dze9��ZXGd{�d|e9��ZYGd}�d~e9��ZZGd�d�e9��Z[Gd��d�e:��Z\Gd��d�e:��Z]Gd��d�e:��Z^Gd��d�e8��Z_Gd��d�e8��Z`Gd��d�e8��ZaGd��d�e8��ZbGd��d�e8��ZcGd��d�e8��ZdGd��d�e8��ZeGd��d�e8��ZfGd��d�e&��ZgGd��d�e&��ZhGd��d�e&��ZiGd��d�e&��ZjGd��d�e&��ZkGd��d�ek��Zld��Zmenem��e!_o[mdS)�z�AST nodes generated by the parser for the compiler. Also provides
some node tree helper functions used by the parser and compiler in order
to normalize nodes.
�N)�deque)�Markup�)�izip)�PY2)�	text_type)�with_metaclass)�*�/�//�**�%�+�-)�notrrc�
�||vS�N���a�bs  �l/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/jinja2/nodes.py�<lambda>r#s
��q�A�v��c�
�||vSrrrs  rrr$s
��!�1�*�r)�eq�ne�gt�gteq�lt�lteq�in�notinc��eZdZdZdS)�
Impossiblez8Raised if the node could not perform a requested action.N��__name__�
__module__�__qualname__�__doc__rrrr%r%(s������B�B�B�Brr%c��eZdZdZd�ZdS)�NodeTypez�A metaclass for nodes that handles the field and attribute
    inheritance.  fields and attributes from the parent class are
    automatically forwarded to the child.c���dD]�}g}|�t|d|d����|�|�|d����t|��dks
Jd���t|��tt	|����ks
Jd���t|��||<��|�dd��t�||||��S)	N)�fields�
attributesrrrz multiple inheritance not allowedzlayout conflict�abstractF)	�extend�getattr�get�len�set�tuple�
setdefault�type�__new__)�mcs�name�bases�d�attr�storages      rr9zNodeType.__new__1s���*�	%�	%�D��G��N�N�7�5��8�T�2�6�6�7�7�7��N�N�1�5�5��r�?�?�+�+�+��u�:�:��?�?�?�$F�?�?�?��w�<�<�3�s�7�|�|�#4�#4�4�4�4�6G�4�4�4��G�n�n�A�d�G�G�	���Z��'�'�'��|�|�C��u�a�0�0�0rN)r'r(r)r*r9rrrr,r,,s-������-�-�	1�	1�	1�	1�	1rr,c�&�eZdZdZdd�Zd�Zd�ZdS)�EvalContextzcHolds evaluation time information.  Custom attributes can be attached
    to it in extensions.
    Nc��||_t|j��r|�|��|_n|j|_d|_dS�NF)�environment�callable�
autoescape�volatile)�selfrD�
template_names   r�__init__zEvalContext.__init__BsI��&����K�*�+�+�	5�)�4�4�]�C�C�D�O�O�)�4�D�O���
�
�
rc�4�|j���Sr)�__dict__�copy�rHs r�savezEvalContext.saveJs���}�!�!�#�#�#rc�l�|j���|j�|��dSr)rL�clear�update)rH�olds  r�revertzEvalContext.revertMs2���
�������
���S�!�!�!�!�!rr)r'r(r)r*rJrOrTrrrrArA=sP������������$�$�$�"�"�"�"�"rrAc�^�|�*|j�td���t|j��S|S)NzIif no eval context is passed, the node must have an attached environment.)rD�RuntimeErrorrA)�node�ctxs  r�get_eval_contextrYRs?��
�{���#�����
�
�4�+�,�,�,��Jrc�z�eZdZdZdZdZdZd�Zdd�Zdd�Z	d	�Z
d
�Zd�Zdd
�Z
d�Zd�Zd�ZejZd�Zd�ZdS)�Nodea�Baseclass for all Jinja nodes.  There are a number of nodes available
    of different types.  There are four major types:

    -   :class:`Stmt`: statements
    -   :class:`Expr`: expressions
    -   :class:`Helper`: helper nodes
    -   :class:`Template`: the outermost wrapper node

    All nodes have fields and attributes.  Fields may be other nodes, lists,
    or arbitrary values.  Fields are passed to the constructor as regular
    positional arguments, attributes as keyword arguments.  Each node has
    two attributes: `lineno` (the line number of the node) and `environment`.
    The `environment` attribute is set at the end of the parsing process for
    all nodes automatically.
    r��linenorDTc	�n�|jrtd���|r�t|��t|j��krn|jstd|jjz���td|jjt|j��t|j��dkrdpdfz���t
|j|��D]\}}t|||���|jD]'}t|||�	|d�����(|r,tdtt|����z���dS)Nz#abstract nodes are not instantiablez%r takes 0 argumentsz%r takes 0 or %d argument%sr�s�zunknown attribute %r)r0�	TypeErrorr4r.�	__class__r'r�setattrr/�pop�next�iter)rHr.r/r;�argr>s      rrJz
Node.__init__ssV���=�	C��A�B�B�B��
	)��6�{�{�c�$�+�.�.�.�.��{�V�#�$:�T�^�=T�$T�U�U�U��1���/��D�K�(�(��D�K�(�(�A�-�5�#�;�������"�$�+�v�6�6�
)�
)�	��c���d�C�(�(�(�(��O�	<�	<�D��D�$�
���t�T� :� :�;�;�;�;��	M��2�T�$�z�:J�:J�5K�5K�K�L�L�L�	M�	MrNc#�K�|jD]=}||cxur�n|�||vs|�*||vr&	|t||��fV��-#t$rY�9wxYw�>dS)aZThis method iterates over all fields that are defined and yields
        ``(key, value)`` tuples.  Per default all fields are returned, but
        it's possible to limit that to some fields by providing the `only`
        parameter or to exclude some using the `exclude` parameter.  Both
        should be sets or tuples of field names.
        N)r.r2�AttributeError)rH�exclude�onlyr;s    r�iter_fieldszNode.iter_fields�s������K�		�		�D��D�(�(�(�(�(�(�(��'�D��,?�,?��$���������d� 3� 3�3�3�3�3�3��%�����D������		�		s�7�
A�Ac#��K�|�||��D]R\}}t|t��r|D]}t|t��r|V���9t|t��r|V��SdS)z�Iterates over all direct child nodes of the node.  This iterates
        over all fields and yields the values of they are nodes.  If the value
        of a field is a list all the nodes in that list are returned.
        N)rl�
isinstance�listr[)rHrjrk�_�item�ns      r�iter_child_nodeszNode.iter_child_nodes�s�����
�'�'���6�6�	�	�G�A�t��$��%�%�
�� � �A�!�!�T�*�*� ������ ��D�$�'�'�
��
�
�
��
	�	rc�<�|�|��D]}|cSdS)ziFind the first node of a given type.  If no such node exists the
        return value is `None`.
        N)�find_all)rH�	node_type�results   r�findz	Node.find�s2���m�m�I�.�.�	�	�F��M�M�M�	�	rc#�K�|���D]2}t||��r|V�|�|��D]}|V���3dS)z�Find all the nodes of a given type.  If the type is a tuple,
        the check is performed for any of the tuple items.
        N)rsrnru)rHrv�childrws    rruz
Node.find_all�ss�����*�*�,�,�	�	�E��%��+�+�
������.�.��3�3�
�
�������
�	�	rc���t|g��}|rM|���}d|jvr||_|�|�����|�M|S)aReset the context of a node and all child nodes.  Per default the
        parser will all generate nodes that have a 'load' context as it's the
        most common one.  This method is used in the parser to set assignment
        targets and other nodes to a store context.
        rX)r�popleftr.rXr1rs)rHrX�todorWs    r�set_ctxzNode.set_ctx�si���d�V�}�}���	1��<�<�>�>�D����#�#�����K�K��-�-�/�/�0�0�0�	�	1�
�rFc���t|g��}|rV|���}d|jvr|j�|r||_|�|�����|�V|S)z.Set the line numbers of the node and children.r])rr|r/r]r1rs)rHr]�overrider}rWs     r�
set_linenozNode.set_lineno�st���d�V�}�}���	1��<�<�>�>�D��4�?�*�*��;�&�(�&�"(�D�K��K�K��-�-�/�/�0�0�0��	1��rc��t|g��}|rD|���}||_|�|�����|�D|S)z"Set the environment for all nodes.)rr|rDr1rs)rHrDr}rWs    r�set_environmentzNode.set_environment�s[���d�V�}�}���	1��<�<�>�>�D�*�D���K�K��-�-�/�/�0�0�0��	1��rc���t|��t|��uoCt|�����t|�����kSr)r8r6rl�rH�others  r�__eq__zNode.__eq__�sX���D�z�z�T�%�[�[�(�
�U�4�3C�3C�3E�3E�-F�-F�%������K
�K
�.
�	
rc�.�|�|��Sr)r�r�s  r�__ne__zNode.__ne__�s���;�;�u�%�%�%�%rc�p���jj�dd��fd��jD�����d�S)N�(�, c3�D�K�|]}|�dt�|d����V��dS)�=N)r2)�.0rgrHs  �r�	<genexpr>z Node.__repr__.<locals>.<genexpr>�s;�����W�W�C����g�d�C��&>�&>�&>�?�W�W�W�W�W�Wr�))rbr'�joinr.rNs`r�__repr__z
Node.__repr__�sG����N�#�#�#��I�I�W�W�W�W�4�;�W�W�W�W�W�W�W�
�	
rc�V�����fd��g��|��d����S)Nc���t|t��s$��t|����dS��d|jjz��|js��d��dSt|j��D]�\}}|r��d��t||��}t|t��rb��d��t|��D]'\}}|r��d���|���(��d�����|������d��dS)Nz	nodes.%s(r�r��[�])
rnr[�append�reprrbr'r.�	enumerater2ro)rW�idx�field�valuerq�_dump�bufs     ��rr�zNode.dump.<locals>._dump�sJ����d�D�)�)�
��
�
�4��:�:�&�&�&����J�J�{�T�^�%<�<�=�=�=��;�
��
�
�3������'���4�4�
!�
!�
��U��%��J�J�t�$�$�$���e�,�,���e�T�*�*�!��J�J�s�O�O�O�%.�u�%5�%5�$�$�	��T��-��J�J�t�,�,�,���d������J�J�s�O�O�O�O��E�%�L�L�L�L��J�J�s�O�O�O�O�Orr`)r�)rHr�r�s @@r�dumpz	Node.dump�sF����	�	�	�	�	�	�0��
��d�����w�w�s�|�|�r�NN)F)r'r(r)r*r.r/r0rJrlrsrxrur~r�r�r�r��object�__hash__r�r�rrrr[r[^s��������� �F�*�J��H�M�M�M�,����$�������������	�	�	�	����
�
�
�
&�&�&���H�
�
�
�����rr[c��eZdZdZdZdS)�StmtzBase node for all statements.TN�r'r(r)r*r0rrrr�r�
s������'�'��H�H�Hrr�c��eZdZdZdZdS)�Helperz,Nodes that exist in a specific context only.TNr�rrrr�r�s������6�6��H�H�Hrr�c��eZdZdZdZdS)�TemplatezjNode that represents a template.  This must be the outermost node that
    is passed to the compiler.
    ��bodyN�r'r(r)r*r.rrrr�r�����������F�F�Frr�c��eZdZdZdZdS)�Outputz�A node that holds multiple expressions which are then printed out.
    This is used both for the `print` statement and the regular template data.
    ��nodesNr�rrrr�r�s���������F�F�Frr�c��eZdZdZdZdS)�Extendsz Represents an extends statement.)�templateNr�rrrr�r�&s������*�*�
�F�F�Frr�c��eZdZdZdZdS)�ForaxThe for loop.  `target` is the target for the iteration (usually a
    :class:`Name` or :class:`Tuple`), `iter` the iterable.  `body` is a list
    of nodes that are used as loop-body, and `else_` a list of nodes for the
    `else` block.  If no else node exists it has to be an empty list.

    For filtered nodes an expression can be stored as `test`, otherwise `None`.
    )�targetrfr��else_�test�	recursiveNr�rrrr�r�,s ��������F�F�F�Frr�c��eZdZdZdZdS)�Ifz4If `test` is true, `body` is rendered, else `else_`.)r�r��elif_r�Nr�rrrr�r�8s������>�>�
/�F�F�Frr�c��eZdZdZdZdS)�Macroz�A macro definition.  `name` is the name of the macro, `args` a list of
    arguments and `defaults` a list of defaults if there are any.  `body` is
    a list of nodes for the macro body.
    )r;�args�defaultsr�Nr�rrrr�r�>s��������
2�F�F�Frr�c��eZdZdZdZdS)�	CallBlockz�Like a macro without a name but a call instead.  `call` is called with
    the unnamed macro as `caller` argument this node holds.
    )�callr�r�r�Nr�rrrr�r�Gs��������2�F�F�Frr�c��eZdZdZdZdS)�FilterBlockzNode for filter sections.)r��filterNr�rrrr�r�Os������#�#�
�F�F�Frr�c��eZdZdZdZdS)�Withz�Specific node for with statements.  In older versions of Jinja the
    with statement was implemented on the base of the `Scope` node instead.

    .. versionadded:: 2.9.3
    )�targets�valuesr�Nr�rrrr�r�Us��������+�F�F�Frr�c��eZdZdZdZdS)�BlockzA node that represents a block.)r;r��scopedNr�rrrr�r�_s������)�)�
'�F�F�Frr�c��eZdZdZdZdS)�Includez'A node that represents the include tag.)r��with_context�ignore_missingNr�rrrr�r�es������1�1�
;�F�F�Frr�c��eZdZdZdZdS)�Importz&A node that represents the import tag.)r�r�r�Nr�rrrr�r�ks������0�0�
3�F�F�Frr�c��eZdZdZdZdS)�
FromImportaA node that represents the from import tag.  It's important to not
    pass unsafe names to the name attribute.  The compiler translates the
    attribute lookups directly into getattr calls and does *not* use the
    subscript callback of the interface.  As exported variables may not
    start with double underscores (which the parser asserts) this is not a
    problem for regular Jinja code, but if this node is used in an extension
    extra care must be taken.

    The list of names may contain tuples if aliases are wanted.
    )r��namesr�Nr�rrrr�r�qs������	�	�3�F�F�Frr�c��eZdZdZdZdS)�ExprStmtzAA statement that evaluates an expression and discards the result.�rWNr�rrrr�r��s������K�K�
�F�F�Frr�c��eZdZdZdZdS)�Assignz"Assigns an expression to a target.)r�rWNr�rrrr�r��s������,�,�
�F�F�Frr�c��eZdZdZdZdS)�AssignBlockzAssigns a block to a target.)r�r�r�Nr�rrrr�r��s������&�&�
)�F�F�Frr�c�$�eZdZdZdZdd�Zd�ZdS)�ExprzBaseclass for all expressions.TNc��t���)anReturn the value of the expression as constant or raise
        :exc:`Impossible` if this was not possible.

        An :class:`EvalContext` can be provided, if none is given
        a default context is created which requires the nodes to have
        an attached environment.

        .. versionchanged:: 2.4
           the `eval_ctx` parameter was added.
        )r%�rH�eval_ctxs  r�as_constz
Expr.as_const�s���l�l�rc��dS)z8Check if it's possible to assign something to this node.FrrNs r�
can_assignzExpr.can_assign�s���urr)r'r(r)r*r0r�r�rrrr�r��sB������(�(��H���������rr�c�&�eZdZdZdZdZdZdd�ZdS)�BinExprz%Baseclass for all binary expressions.)�left�rightNTc�R�t||��}|jjr!|j|jjvrt���t|j}	||j�|��|j	�|����S#t$rt���wxYwr)rYrD�	sandboxed�operator�intercepted_binopsr%�_binop_to_funcr�r�r��	Exception�rHr��fs   rr�zBinExpr.as_const�s���#�D�(�3�3��
��&�	��
��!1�!D�D�D��,�,���4�=�)��	��1�T�Y�'�'��1�1�4�:�3F�3F�x�3P�3P�Q�Q�Q���	�	�	��,�,��	���s�;B
�
B&r�r'r(r)r*r.r�r0r�rrrr�r��s=������/�/�
�F��H��H������rr�c�&�eZdZdZdZdZdZdd�ZdS)�	UnaryExprz$Baseclass for all unary expressions.r�NTc� �t||��}|jjr!|j|jjvrt���t|j}	||j�|����S#t$rt���wxYwr)
rYrDr�r��intercepted_unopsr%�
_uaop_to_funcrWr�r�r�s   rr�zUnaryExpr.as_const�s���#�D�(�3�3��
��&�	��
��!1�!C�C�C��,�,���$�-�(��	��1�T�Y�'�'��1�1�2�2�2���	�	�	��,�,��	���s�"A4�4B
rr�rrrr�r��s=������.�.�
�F��H��H������rr�c��eZdZdZdZd�ZdS)�NameaLooks up a name or stores a value in a name.
    The `ctx` of the node can be one of the following values:

    -   `store`: store a value in the name
    -   `load`: load that name
    -   `param`: like `store` but if the name was defined as function parameter.
    )r;rXc��|jdvS)N)�true�false�none�True�False�None�r;rNs rr�zName.can_assign�s���y� R�R�RrN�r'r(r)r*r.r�rrrr�r��s9���������F�S�S�S�S�Srr�c��eZdZdZdZd�ZdS)�NSRefz)Reference to a namespace value assignment)r;r>c��dS)NTrrNs rr�zNSRef.can_assign�s	��
�trNrrrrrr�s.������3�3�
�F�����rrc��eZdZdZdZdS)�LiteralzBaseclass for literals.TNr�rrrr	r	�s������!�!��H�H�Hrr	c�6�eZdZdZdZdd�Zedd���ZdS)�ConstaAll constant values.  The parser will return this node for simple
    constants such as ``42`` or ``"foo"`` but it can be used to store more
    complex values such as lists too.  Only constants with a safe
    representation (objects where ``eval(repr(x)) == x`` is true).
    )r�Nc��|j}trOt|��tur9|jjdr'	|�d��}n#t$rYnwxYw|S)Nzcompiler.ascii_str�ascii)r�rr8rrD�policies�encode�UnicodeError)rHr��rvs   rr�zConst.as_constss��
�Z���	��R���I�%�%�� �)�*>�?�&�
��Y�Y�w�'�'�����
�
�
���
�����	s�A�
A�Ac�\�ddlm}||��st���||||���S)z�Return a const object if the value is representable as
        constant value in the generated code, otherwise it will raise
        an `Impossible` exception.
        r)�
has_safe_reprr\)�compilerrr%)�clsr�r]rDrs     r�from_untrustedzConst.from_untrusted
sI��	,�+�+�+�+�+��}�U�#�#�	��,�,���s�5��[�A�A�A�Arrr�)r'r(r)r*r.r��classmethodrrrrrr�s_���������F������	B�	B�	B��[�	B�	B�	Brrc��eZdZdZdZdd�ZdS)�TemplateDatazA constant template string.)�dataNc��t||��}|jrt���|jrt	|j��S|jSr)rYrGr%rFrrr�s  rr�zTemplateData.as_constsI��#�D�(�3�3����	��,�,����	%��$�)�$�$�$��y�rr�r'r(r)r*r.r�rrrrrs3������%�%�
�F������rrc�$�eZdZdZdZdd�Zd�ZdS)�Tuplez�For loop unpacking and some other things like multiple arguments
    for subscripts.  Like for :class:`Name` `ctx` specifies if the tuple
    is used for loading the names or storing.
    )�itemsrXNc�d��t|����t�fd�|jD����S)Nc3�B�K�|]}|����V��dSr�r��r��xr�s  �rr�z!Tuple.as_const.<locals>.<genexpr>2s/�����>�>�a�Q�Z�Z��)�)�>�>�>�>�>�>r)rYr6rr�s `rr�zTuple.as_const0s7���#�D�(�3�3���>�>�>�>�4�:�>�>�>�>�>�>rc�H�|jD]}|���sdS�dS)NFT)rr�)rHrqs  rr�zTuple.can_assign4s6���J�	�	�D��?�?�$�$�
��u�u�
��trr�r'r(r)r*r.r�r�rrrrr(sH��������
�F�?�?�?�?�����rrc��eZdZdZdZdd�ZdS)�Listz&Any list literal such as ``[1, 2, 3]``�rNc�J��t|�����fd�|jD��S)Nc�:��g|]}|������Srr"r#s  �r�
<listcomp>z!List.as_const.<locals>.<listcomp>Bs%���9�9�9���
�
�8�$�$�9�9�9r)rYrr�s `rr�z
List.as_const@s.���#�D�(�3�3��9�9�9�9�d�j�9�9�9�9rrrrrrr(r(;s3������0�0�
�F�:�:�:�:�:�:rr(c��eZdZdZdZdd�ZdS)�DictzeAny dict literal such as ``{1: 2, 3: 4}``.  The items must be a list of
    :class:`Pair` nodes.
    r)Nc�d��t|����t�fd�|jD����S)Nc3�B�K�|]}|����V��dSrr"r#s  �rr�z Dict.as_const.<locals>.<genexpr>Ns/�����=�=�Q�A�J�J�x�(�(�=�=�=�=�=�=r)rY�dictrr�s `rr�z
Dict.as_constLs7���#�D�(�3�3���=�=�=�=�$�*�=�=�=�=�=�=rrrrrrr.r.Es9���������F�>�>�>�>�>�>rr.c��eZdZdZdZdd�ZdS)�PairzA key, value pair for dicts.��keyr�Nc��t||��}|j�|��|j�|��fSr)rYr5r�r�r�s  rr�z
Pair.as_constVs<��#�D�(�3�3���x� � ��*�*�D�J�,?�,?��,I�,I�I�Irrrrrrr3r3Qs9������&�&�
�F�J�J�J�J�J�Jrr3c��eZdZdZdZdd�ZdS)�Keywordz>A key, value pair for keyword arguments where key is a string.r4Nc�d�t||��}|j|j�|��fSr)rYr5r�r�r�s  rr�zKeyword.as_const`s.��#�D�(�3�3���x���,�,�X�6�6�6�6rrrrrrr8r8[s3������H�H�
�F�7�7�7�7�7�7rr8c��eZdZdZdZdd�ZdS)�CondExprzZA conditional expression (inline if expression).  (``{{
    foo if bar else baz }}``)
    )r��expr1�expr2Nc���t||��}|j�|��r|j�|��S|j�t���|j�|��Sr)rYr�r�r<r=r%r�s  rr�zCondExpr.as_constlsi��#�D�(�3�3���9���h�'�'�	1��:�&�&�x�0�0�0��:���,�,���z�"�"�8�,�,�,rrrrrrr;r;es9��������(�F�	-�	-�	-�	-�	-�	-rr;c����fd�|jD��}t�fd�|jD����}|j�K	|�|j������n#t$rt���wxYw|j�K	|�	|j������n#t$rt���wxYw||fS)Nc�:��g|]}|������Srr"r#s  �rr,z!args_as_const.<locals>.<listcomp>ys%���4�4�4�Q�A�J�J�x� � �4�4�4rc3�B�K�|]}|����V��dSrr"r#s  �rr�z args_as_const.<locals>.<genexpr>zs/�����<�<�1�!�*�*�X�&�&�<�<�<�<�<�<r)
r�r1�kwargs�dyn_argsr1r�r�r%�
dyn_kwargsrR)rWr�r�rBs `  r�
args_as_constrExs����4�4�4�4�$�)�4�4�4�D�
�<�<�<�<���<�<�<�
<�
<�F��}� �	��K�K��
�.�.�x�8�8�9�9�9�9���	�	�	��,�,��	������"�	��M�M�$�/�2�2�8�<�<�=�=�=�=���	�	�	��,�,��	������<�s�-A+�+B�-B=�=Cc��eZdZdZdZdd�ZdS)�FilteraThis node applies a filter on an expression.  `name` is the name of
    the filter, the rest of the fields are the same as for :class:`Call`.

    If the `node` of a filter is `None` the contents of the last buffer are
    filtered.  Buffers are created by macros and filter blocks.
    �rWr;r�rBrCrDNc��t||��}|js|j�t���|jj�|j��}|�t|dd��durt���|jj	rt|dd��rt���t||��\}}|�d|j�|����t|dd��dur|�d|��n.t|dd��dur|�d|j��	||i|��S#t$rt���wxYw)N�
contextfilterFT�asyncfiltervariantr�evalcontextfilter�environmentfilter)rYrGrWr%rD�filtersr3r;r2�is_asyncrE�insertr�r�)rHr��filter_r�rBs     rr�zFilter.as_const�sx��#�D�(�3�3����	��	� 1��,�,���"�*�.�.�t�y�9�9���?�g�g���F�F�$�N�N��,�,����(�	�W��)�5�.
�.
�	��,�,��$�T�8�4�4���f����A�t�y�)�)�(�3�3�4�4�4��7�/��7�7�4�?�?��K�K��8�$�$�$�$�
�W�1�5�
9�
9�T�
A�
A��K�K��4�+�,�,�,�	��7�D�+�F�+�+�+���	�	�	��,�,��	���s�9E�ErrrrrrGrG�s:��������J�F�"�"�"�"�"�"rrGc��eZdZdZdZdd�ZdS)�Testz�Applies a test on an expression.  `name` is the name of the test, the
    rest of the fields are the same as for :class:`Call`.
    rHNc�V�|jj�|j��}|�t	���t||��}t
||��\}}|�d|j�	|����	||i|��S#t$rt	���wxYw)Nr)rD�testsr3r;r%rYrErPrWr�r�)rHr�r�r�rBs     rr�z
Test.as_const�s�����%�)�)�$�)�4�4���<��,�,��#�D�(�3�3��$�T�8�4�4���f����A�t�y�)�)�(�3�3�4�4�4�	��4��(��(�(�(���	�	�	��,�,��	���s�B�B(rrrrrrSrS�s:��������J�F�
�
�
�
�
�
rrSc��eZdZdZdZdS)�Calla/Calls an expression.  `args` is a list of arguments, `kwargs` a list
    of keyword arguments (list of :class:`Keyword` nodes), and `dyn_args`
    and `dyn_kwargs` has to be either `None` or a node that is used as
    node for dynamic positional (``*args``) or keyword (``**kwargs``)
    arguments.
    )rWr�rBrCrDNr�rrrrWrW�s ��������B�F�F�FrrWc�$�eZdZdZdZdd�Zd�ZdS)�Getitemz@Get an attribute or item from an expression and prefer the item.)rWrgrXNc�$�t||��}|jdkrt���	|j�|j�|��|j�|����S#t$rt���wxYw�N�load)	rYrXr%rD�getitemrWr�rgr�r�s  rr�zGetitem.as_const�s���#�D�(�3�3���8�v����,�,��	��#�+�+��	�"�"�8�,�,�d�h�.?�.?��.I�.I���
���	�	�	��,�,��	���s�A
A6�6Bc��dSrCrrNs rr�zGetitem.can_assign�����urrr&rrrrYrY�sB������J�J�
#�F�	�	�	�	�����rrYc�$�eZdZdZdZdd�Zd�ZdS)�GetattrznGet an attribute or item from an expression that is a ascii-only
    bytestring and prefer the attribute.
    )rWr>rXNc��|jdkrt���	t||��}|j�|j�|��|j��S#t$rt���wxYwr[)	rXr%rYrDr2rWr�r>r�r�s  rr�zGetattr.as_const�s}���8�v����,�,��	�'��h�7�7�H��#�+�+�D�I�,>�,>�x�,H�,H�$�)�T�T�T���	�	�	��,�,��	���s�AA#�#A<c��dSrCrrNs rr�zGetattr.can_assignr_rrr&rrrrara�sH��������%�F���������rrac��eZdZdZdZdd�ZdS)�Slicez_Represents a slice object.  This must only be used as argument for
    :class:`Subscript`.
    )�start�stop�stepNc���t|�����fd�}t||j��||j��||j����S)Nc�6��|�dS|����Srr")�objr�s �r�constzSlice.as_const.<locals>.consts����{��t��<�<��)�)�)r)rY�slicerfrgrh)rHr�rls ` rr�zSlice.as_constsc���#�D�(�3�3��	*�	*�	*�	*�	*�
�U�U�4�:�&�&���d�i�(8�(8�%�%��	�:J�:J�K�K�Krrrrrrreres?��������'�F�L�L�L�L�L�Lrrec��eZdZdZdZdd�ZdS)�ConcatzXConcatenates the list of expressions provided after converting them to
    unicode.
    r�Nc�p��t|����d��fd�|jD����S)Nr`c3�\�K�|]&}t|������V��'dSr)rr�r#s  �rr�z"Concat.as_const.<locals>.<genexpr>s7�����K�K�1�y����H�!5�!5�6�6�K�K�K�K�K�Kr)rYr�r�r�s `rr�zConcat.as_consts;���#�D�(�3�3���w�w�K�K�K�K��
�K�K�K�K�K�Krrrrrrroros?���������F�L�L�L�L�L�Lrroc��eZdZdZdZdd�ZdS)�CompareziCompares an expression with some other expressions.  `ops` must be a
    list of :class:`Operand`\s.
    )�expr�opsNc�&�t||��}|j�|��x}}	|jD]>}|j�|��}t	|j||��}|sdS|}�?n#t$rt���wxYw|SrC)rYrtr�ru�_cmpop_to_func�opr�r%)rHr�rwr�rx�	new_values      rr�zCompare.as_const)s���#�D�(�3�3����+�+�H�5�5�5���
	��h�
"�
"���G�,�,�X�6�6�	�'���.�u�i�@�@���!� �5�5�!���
"���	�	�	��,�,��	�����
s�AA5�1A5�5Brrrrrrsrs"s9���������F������rrsc��eZdZdZdZdS)�Operandz$Holds an operator and an expression.)rxrtNr�rrrr{r{<s������.�.�
�F�F�Frr{Tz(
The following operators are available: r�c#� K�|]	}d|zV��
dS)z``%s``Nr)r�r$s  rr�r�Ds:����
�
��
�q�L�
�
�
�
�
�
rc��eZdZdZdZdS)�Mulz(Multiplies the left with the right node.r
N�r'r(r)r*r�rrrr~r~Ks������2�2��H�H�Hrr~c��eZdZdZdZdS)�Divz#Divides the left by the right node.rNrrrrr�r�Qs������-�-��H�H�Hrr�c��eZdZdZdZdS)�FloorDivzjDivides the left by the right node and truncates conver the
    result into an integer by truncating.
    rNrrrrr�r�Ws���������H�H�Hrr�c��eZdZdZdZdS)�AddzAdd the left to the right node.rNrrrrr�r�_s������)�)��H�H�Hrr�c��eZdZdZdZdS)�Subz&Subtract the right from the left node.rNrrrrr�r�es������0�0��H�H�Hrr�c��eZdZdZdZdS)�ModzLeft modulo right.rNrrrrr�r�ks���������H�H�Hrr�c��eZdZdZdZdS)�PowzLeft to the power of right.r
Nrrrrr�r�qs������%�%��H�H�Hrr�c��eZdZdZdZdd�ZdS)�AndzShort circuited AND.�andNc��t||��}|j�|��o|j�|��Sr�rYr�r�r�r�s  rr�zAnd.as_const|s<��#�D�(�3�3���y�!�!�(�+�+�M��
�0C�0C�H�0M�0M�Mrr�r'r(r)r*r�r�rrrr�r�ws9���������H�N�N�N�N�N�Nrr�c��eZdZdZdZdd�ZdS)�OrzShort circuited OR.�orNc��t||��}|j�|��p|j�|��Srr�r�s  rr�zOr.as_const�s<��#�D�(�3�3���y�!�!�(�+�+�L�t�z�/B�/B�8�/L�/L�Lrrr�rrrr�r��s9���������H�M�M�M�M�M�Mrr�c��eZdZdZdZdS)�NotzNegate the expression.rNrrrrr�r��s������ � ��H�H�Hrr�c��eZdZdZdZdS)�NegzMake the expression negative.rNrrrrr�r��s������'�'��H�H�Hrr�c��eZdZdZdZdS)�Posz8Make the expression positive (noop for most expressions)rNrrrrr�r��s������B�B��H�H�Hrr�c��eZdZdZdZdS)�EnvironmentAttributez�Loads an attribute from the environment object.  This is useful for
    extensions that want to call a callback stored on the environment.
    rNr�rrrr�r��r�rr�c��eZdZdZdZdS)�ExtensionAttributez�Returns the attribute of an extension bound to the environment.
    The identifier is the identifier of the :class:`Extension`.

    This node is usually constructed by calling the
    :meth:`~jinja2.ext.Extension.attr` method on an extension.
    )�
identifierr;Nr�rrrr�r��s��������$�F�F�Frr�c��eZdZdZdZdS)�ImportedNamea&If created with an import name the import name is returned on node
    access.  For example ``ImportedName('cgi.escape')`` returns the `escape`
    function from the cgi module on evaluation.  Imports are optimized by the
    compiler so there is no need to assign them to local variables.
    )�
importnameNr�rrrr�r��s���������F�F�Frr�c��eZdZdZdZd�ZdS)�InternalNamea7An internal name in the compiler.  You cannot create these nodes
    yourself but the parser provides a
    :meth:`~jinja2.parser.Parser.free_identifier` method that creates
    a new identifier for you.  This identifier is not available from the
    template and is not threated specially by the compiler.
    rc� �td���)NzKCan't create internal names.  Use the `free_identifier` method on a parser.�rarNs rrJzInternalName.__init__�s���
4�
�
�	
rN)r'r(r)r*r.rJrrrr�r��s4���������F�
�
�
�
�
rr�c��eZdZdZdZdd�ZdS)�MarkSafez:Mark the wrapped expression as safe (wrap it as `Markup`).�rtNc�p�t||��}t|j�|����Sr)rYrrtr�r�s  rr�zMarkSafe.as_const�s/��#�D�(�3�3���d�i�(�(��2�2�3�3�3rrrrrrr�r��s3������D�D�
�F�4�4�4�4�4�4rr�c��eZdZdZdZdd�ZdS)�MarkSafeIfAutoescapez�Mark the wrapped expression as safe (wrap it as `Markup`) but
    only if autoescaping is active.

    .. versionadded:: 2.5
    r�Nc��t||��}|jrt���|j�|��}|jrt
|��S|Sr)rYrGr%rtr�rFr)rHr�rts   rr�zMarkSafeIfAutoescape.as_const�sW��#�D�(�3�3����	��,�,���y�!�!�(�+�+����	 ��$�<�<���rrrrrrr�r��s9���������F������rr�c��eZdZdZdS)�ContextReferenceaPReturns the current template context.  It can be used like a
    :class:`Name` node, with a ``'load'`` ctx and will return the
    current :class:`~jinja2.runtime.Context` object.

    Here an example that assigns the current template name to a
    variable named `foo`::

        Assign(Name('foo', ctx='store'),
               Getattr(ContextReference(), 'name'))

    This is basically equivalent to using the
    :func:`~jinja2.contextfunction` decorator when using the
    high-level API, which causes a reference to the context to be passed
    as the first argument to a function.
    Nr&rrrr�r��s���������rr�c��eZdZdZdS)�DerivedContextReferencez�Return the current template context including locals. Behaves
    exactly like :class:`ContextReference`, but includes local
    variables, such as from a ``for`` loop.

    .. versionadded:: 2.11
    Nr&rrrr�r��s���������rr�c��eZdZdZdS)�ContinuezContinue a loop.Nr&rrrr�r�s���������rr�c��eZdZdZdS)�Breakz
Break a loop.Nr&rrrr�r�
s���������rr�c��eZdZdZdZdS)�ScopezAn artificial scope.r�Nr�rrrr�r�s��������
�F�F�Frr�c��eZdZdZdZdS)�OverlayScopea�An overlay scope for extensions.  This is a largely unoptimized scope
    that however can be used to introduce completely arbitrary variables into
    a sub scope from a dictionary or dictionary like object.  The `context`
    field has to evaluate to a dictionary object.

    Example usage::

        OverlayScope(context=self.call_method('get_context'),
                     body=[...])

    .. versionadded:: 2.10
    )�contextr�Nr�rrrr�r�s��������!�F�F�Frr�c��eZdZdZdZdS)�EvalContextModifiera
Modifies the eval context.  For each option that should be modified,
    a :class:`Keyword` has to be added to the :attr:`options` list.

    Example to change the `autoescape` setting::

        EvalContextModifier(options=[Keyword('autoescape', Const(True))])
    )�optionsNr�rrrr�r�%s���������F�F�Frr�c��eZdZdZdZdS)�ScopedEvalContextModifierz�Modifies the eval context and reverts it later.  Works exactly like
    :class:`EvalContextModifier` but will only modify the
    :class:`~jinja2.nodes.EvalContext` for nodes in the :attr:`body`.
    r�Nr�rrrr�r�1s��������
�F�F�Frr�c� �td���)Nzcan't create custom node typesr�)r�rBs  r�_failing_newr�;s��
�4�
5�
5�5r)pr*r��collectionsr�
markupsafer�_compatrrrr	�mul�truediv�floordiv�pow�mod�add�subr��not_�pos�negr�rrr�ger �lerwr�r%r8r,r�rArYr[r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr	rrrr(r.r3r8r;rErGrSrWrYrarerorsr{r��sortedr5r~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��staticmethodr9rrr�<module>r�s�
��������������������������������������#�#�#�#�#�#�
��	�	�
�
�
�,�	��	��	�����!�
�H�L�x�|�L�L�
��+�
�+�
�+��K�
�+��K�
�
�
$�
$�	�	��C�C�C�C�C��C�C�C�1�1�1�1�1�t�1�1�1�""�"�"�"�"�&�"�"�"�*	�	�	�i�i�i�i�i�>�>�(�F�+�+�i�i�i�X�����4���������T���������t���������T���������d����	F�	F�	F�	F�	F�$�	F�	F�	F�0�0�0�0�0��0�0�0�2�2�2�2�2�D�2�2�2�2�2�2�2�2��2�2�2� � � � � �$� � � �+�+�+�+�+�4�+�+�+�(�(�(�(�(�D�(�(�(�<�<�<�<�<�d�<�<�<�4�4�4�4�4�T�4�4�4�3�3�3�3�3��3�3�3������t���� � � � � �T� � � �*�*�*�*�*�$�*�*�*������4����.�����d����,���������,S�S�S�S�S�4�S�S�S�
�
�
�
�
�D�
�
�
������d���� B� B� B� B� B�G� B� B� B�F�����7���������G����&:�:�:�:�:�7�:�:�:�	>�	>�	>�	>�	>�7�	>�	>�	>�J�J�J�J�J�6�J�J�J�7�7�7�7�7�f�7�7�7�-�-�-�-�-�t�-�-�-�&���&,�,�,�,�,�T�,�,�,�^�����4����.B�B�B�B�B�4�B�B�B������d����(�����d����(L�L�L�L�L�D�L�L�L�$	L�	L�	L�	L�	L�T�	L�	L�	L������d����4�����f������O�O�B�T�Y�Y���
�
��S��(�(�3�3�}�+=�+=�=���N�@S�@S�S�
�
�
�	
�	
�F�F���O�O������'���������'���������w���������'���������'���������'���������'����N�N�N�N�N�'�N�N�N�M�M�M�M�M��M�M�M������)���������)���������)���������4����$�$�$�$�$��$�$�$������4����
�
�
�
�
�4�
�
�
�"4�4�4�4�4�t�4�4�4������4����&�����t����$�����d���������t���������D���������D����!�!�!�!�!�4�!�!�!�"	�	�	�	�	�$�	�	�	������ 3����6�6�6� �<��-�-����L�Lr

?>