Your IP : 3.142.255.103


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__/idtracking.cpython-311.pyc

�

S�Dg�#���ddlmZddlmZdZdZdZdZdd�Zdd	�Z	Gd
�de
��ZGd�d
e��ZGd�de��Z
dS)�)�	iteritems)�NodeVisitor�param�resolve�alias�	undefinedNc�x�t|���}t|��}|D]}|�|���|S�N)�parent)�Symbols�FrameSymbolVisitor�visit)�nodes�parent_symbols�sym�visitor�nodes     �q/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/jinja2/idtracking.py�find_symbolsr
sH��
��
(�
(�
(�C� ��%�%�G������
�
�d������J�c�P�t|���}|�|��|Sr
)r�analyze_node)rrrs   r�symbols_for_noders+��
��
(�
(�
(�C����T�����Jrc�`�eZdZdd�Zd�Zdd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�ZdS)rNc��|�|�d}n
|jdz}||_||_i|_i|_t	��|_dS)N�r)�levelr�refs�loads�set�stores)�selfrrs   r�__init__zSymbols.__init__sJ���=��~������q�(����
������	���
��e�e����rc�@�t|��}|j|fi|��dS�N)�RootVisitorr)r"r�kwargsrs    rrzSymbols.analyze_node%s/���d�#�#����
�d�%�%�f�%�%�%�%�%rc�J�d|j|fz}||j|<|�
||j|<|S)Nzl_%d_%s)rrr)r"�name�load�idents    r�_define_refzSymbols._define_ref)s5���T�Z��.�.����	�$���� $�D�J�u���rc�t�||jvr
|j|S|j�|j�|��SdSr%)rr�	find_load)r"�targets  rr.zSymbols.find_load0sB���T�Z����:�f�%�%��;�"��;�(�(��0�0�0�#�"rc�t�||jvr
|j|S|j�|j�|��SdSr%)rr�find_ref�r"r)s  rr1zSymbols.find_ref6sA���4�9����9�T�?�"��;�"��;�'�'��-�-�-�#�"rc�X�|�|��}|�td|z���|S)NzITried to resolve a name to a reference that was unknown to the frame (%r))r1�AssertionError)r"r)�rvs   r�refzSymbols.ref<s>��
�]�]�4�
 �
 ��
�:� �0�26�7���
��	rc�6�t�|j��}|j�|j��|j���|_|j���|_|j���|_|Sr%)	�object�__new__�	__class__�__dict__�updater�copyrr!)r"r5s  rr=zSymbols.copyEsm��
�^�^�D�N�
+�
+��
����4�=�)�)�)��)�.�.�"�"����:�?�?�$�$����K�$�$�&�&��	��	rc��|j�|��||jvrc|j�<|j�|��}|� |�|t|f���dS|�|tdf���dSdS�N)r*)r!�addrrr1r,�VAR_LOAD_ALIAS�VAR_LOAD_UNDEFINED)r"r)�	outer_refs   r�storez
Symbols.storeMs������������t�y� � ��{�&� �K�0�0��6�6�	��(��$�$�T���0K�$�L�L�L��F�
���T�);�T�(B��C�C�C�C�C�!� rc�r�|j�|��|�|tdf���Sr?)r!r@r,�VAR_LOAD_PARAMETERr2s  r�declare_parameterzSymbols.declare_parameter_s5��������������,>��+E��F�F�Frc�t�|�|��}|� |�|t|f���dSdSr?)r1r,�VAR_LOAD_RESOLVE)r"r)r/s   rr*zSymbols.loadcsD�����t�$�$���>����T�)9�4�(@��A�A�A�A�A��>rc�X�i}|D]2}|jD](}||jvr�|�|d��dz||<�)�3|D]_}|j�|j��|j�|j��|j�|j���`t|��D]�\}}|t
|��kr�|�|��}|�
Jd���|j�.|j�|��}|�t|f|j|<�ot|f|j|<��dS)Nrrzshould not happen)r!�getrr<rr�lenr1rrArI)	r"�branch_symbolsr!�branchr/rr)�branch_count�outer_targets	         r�
branch_updatezSymbols.branch_updatehsc����$�	;�	;�F� �-�
;�
;���T�[�(�(��!'���F�A�!6�!6��!:��v���
;�
"�	+�	+�C��I���S�X�&�&�&��J���c�i�(�(�(��K���s�z�*�*�*�*�"+�F�"3�"3�	:�	:��D�,��s�>�2�2�2�2���]�]�4�(�(�F��%�%�':�%�%�%��{�&�#�{�3�3�D�9�9���+�*8�,�)G�D�J�v�&��"2�D�!9�D�J�v���	:�	:rc�p�i}|}|�/|jD]}||vr|�|��||<�|j}|�/|Sr%)r!r1r)r"r5rr)s    r�dump_storeszSymbols.dump_stores�sX��
��������
3�
3���r�>�>�#�}�}�T�2�2�B�t�H���;�D�	��
�	rc��t��}|}|�Ft|j��D](\}\}}|tkr|�|���)|j}|�F|Sr%)r rrrFr@r)r"r5rr/�instr�_s      r�dump_param_targetszSymbols.dump_param_targets�sj��
�U�U������&/��
�&;�&;�
#�
#�"��
����.�.�.��F�F�6�N�N�N���;�D�	��
�	r)NNr%)�__name__�
__module__�__qualname__r#rr,r.r1r6r=rDrGr*rQrSrW�rrrrs�������
�
�
�
�&�&�&�����1�1�1�.�.�.�������D�D�D�$G�G�G�B�B�B�
:�:�:�4�������rrc�\�eZdZd�Zd�ZexZxZxZxZxZ	xZ
Zd�Zd�Z
d�Zdd�Zd�Zd	�Zd
S)r&c�.�t|��|_dSr%)r
�sym_visitor�r"�symbolss  rr#zRootVisitor.__init__�s��-�g�6�6����rc�h�|���D]}|j�|���dSr%��iter_child_nodesr^r�r"rr'�childs    r�
_simple_visitzRootVisitor._simple_visit�sA���*�*�,�,�	*�	*�E���"�"�5�)�)�)�)�	*�	*rc�N�|jD]}|j�|���dSr%��bodyr^rrds    r�visit_AssignBlockzRootVisitor.visit_AssignBlock��7���Y�	*�	*�E���"�"�5�)�)�)�)�	*�	*rc�l�|�d���D]}|j�|���dS)N)�call)�excluderbrds    r�visit_CallBlockzRootVisitor.visit_CallBlock�sF���*�*�9�*�=�=�	*�	*�E���"�"�5�)�)�)�)�	*�	*rc�N�|jD]}|j�|���dSr%rhrds    r�visit_OverlayScopezRootVisitor.visit_OverlayScope�rkrric�~�|dkr)|j�|jd���|j}nl|dkr|j}n^|dkrI|j�|jd���|j�|j�|j��dSt
d���|pdD]}|j�|���dS)NriT)�store_as_param�else�testzUnknown for branchr[)r^rr/ri�else_ru�RuntimeError)r"r�
for_branchr'rN�items      r�	visit_ForzRootVisitor.visit_For�s���������"�"�4�;�t�"�D�D�D��Y�F�F�
�6�
!�
!��Z�F�F�
�6�
!�
!���"�"�4�;�t�"�D�D�D��y�$�� �&�&�t�y�1�1�1��F��3�4�4�4��L�b�	)�	)�D���"�"�4�(�(�(�(�	)�	)rc��|jD]}|j�|���|jD]}|j�|���dSr%)�targetsr^rri)r"rr'r/res     r�
visit_WithzRootVisitor.visit_With�sb���l�	+�	+�F���"�"�6�*�*�*�*��Y�	*�	*�E���"�"�5�)�)�)�)�	*�	*rc�:�td|jjz���)NzCannot find symbols for %r)�NotImplementedErrorr:rX)r"r�argsr's    r�
generic_visitzRootVisitor.generic_visit�s!��!�(�4�>�+B�B�
�
�	
rN)ri)rXrYrZr#rf�visit_Template�visit_Block�visit_Macro�visit_FilterBlock�visit_Scope�visit_If�visit_ScopedEvalContextModifierrjrorqrzr}r�r[rrr&r&�s�������7�7�7�*�*�*�DQ�
Q�N�Q��Q�	�Q�
	�Q�	�
Q��!@�*�*�*�*�*�*�*�*�*�)�)�)�)� *�*�*�
�
�
�
�
rr&c�t�eZdZdZd�Zdd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�ZdS)r
zA visitor for `Frame.inspect`.c��||_dSr%)r`r_s  rr#zFrameSymbolVisitor.__init__�s
������rFc��|s|jdkr!|j�|j��dS|jdkr!|j�|j��dS|jdkr!|j�|j��dSdS)z2All assignments to names go through this function.rrDr*N)�ctxr`rGr)rDr*)r"rrsr's    r�
visit_NamezFrameSymbolVisitor.visit_Name�s����	)�T�X��0�0��L�*�*�4�9�5�5�5�5�5�
�X��
 �
 ��L���t�y�)�)�)�)�)�
�X��
�
��L���d�i�(�(�(�(�(� �
rc�D�|j�|j��dSr%)r`r*r)�r"rr's   r�visit_NSRefzFrameSymbolVisitor.visit_NSRef�s ������$�)�$�$�$�$�$rc�������j|jfi����j����fd�}||j��}||j��}||jpd��}�j�|||g��dS)Nc�r������x�_}|D]}�j|fi������_|Sr%)r=r`r)rr5�subnoder'�original_symbolsr"s   ���r�inner_visitz0FrameSymbolVisitor.visit_If.<locals>.inner_visit�sS��� 0� 5� 5� 7� 7�7�D�L�2� �
.�
.����
�7�-�-�f�-�-�-�-�+�D�L��Irr[)rrur`ri�elif_rvrQ)r"rr'r��body_symbols�elif_symbols�else_symbolsr�s` `    @rr�zFrameSymbolVisitor.visit_If�s��������
�4�9�'�'��'�'�'��<��	�	�	�	�	�	�	�#�{�4�9�-�-��"�{�4�:�.�.��"�{�4�:�#3��4�4����"�"�L�,��#M�N�N�N�N�Nrc�D�|j�|j��dSr%)r`rDr)r�s   rr�zFrameSymbolVisitor.visit_Macro�s ������4�9�%�%�%�%�%rc�`�|j|fi|��|j�|j��dSr%)r�r`rDr/r�s   r�visit_ImportzFrameSymbolVisitor.visit_Import�s;�����4�*�*�6�*�*�*�����4�;�'�'�'�'�'rc���|j|fi|��|jD]R}t|t��r!|j�|d���8|j�|���SdS)Nr)r��names�
isinstance�tupler`rD)r"rr'r)s    r�visit_FromImportz#FrameSymbolVisitor.visit_FromImport�s������4�*�*�6�*�*�*��J�	)�	)�D��$��&�&�
)���"�"�4��7�+�+�+�+���"�"�4�(�(�(�(�		)�	)rc�R�|j|jfi|��|j|jfi|��dS)z'Visit assignments in the correct order.N)rrr/r�s   r�visit_AssignzFrameSymbolVisitor.visit_Assigns@����
�4�9�'�'��'�'�'���
�4�;�)�)�&�)�)�)�)�)rc�,�|j|jfi|��dS)zqVisiting stops at for blocks.  However the block sequence
        is visited as part of the outer scope.
        N)r�iterr�s   rrzzFrameSymbolVisitor.visit_Fors&��	��
�4�9�'�'��'�'�'�'�'rc�,�|j|jfi|��dSr%)rrmr�s   rroz"FrameSymbolVisitor.visit_CallBlock
s$����
�4�9�'�'��'�'�'�'�'rc�,�|j|jfi|��dSr%)r�filterr�s   rr�z$FrameSymbolVisitor.visit_FilterBlocks$����
�4�;�)�)�&�)�)�)�)�)rc�D�|jD]}|�|���dSr%)�valuesr)r"rr'r/s    rr}zFrameSymbolVisitor.visit_Withs2���k�	�	�F��J�J�v�����	�	rc�,�|j|jfi|��dS)zStop visiting at block assigns.N)rr/r�s   rrjz$FrameSymbolVisitor.visit_AssignBlocks$����
�4�;�)�)�&�)�)�)�)�)rc��dS)zStop visiting at scopes.Nr[r�s   rr�zFrameSymbolVisitor.visit_Scope����rc��dS)zStop visiting at blocks.Nr[r�s   rr�zFrameSymbolVisitor.visit_Blockr�rc��dS)z!Do not visit into overlay scopes.Nr[r�s   rrqz%FrameSymbolVisitor.visit_OverlayScope!r�rN)F)rXrYrZ�__doc__r#r�r�r�r�r�r�r�rzror�r}rjr�r�rqr[rrr
r
�s������(�(����)�)�)�)�%�%�%�O�O�O�$&�&�&�(�(�(�)�)�)�*�*�*�
(�(�(�(�(�(�*�*�*����*�*�*�'�'�'�'�'�'�0�0�0�0�0rr
r%)�_compatrrrrFrIrArBrrr8rr&r
r[rr�<module>r�s�������� � � � � � ������� ����������|�|�|�|�|�f�|�|�|�~5
�5
�5
�5
�5
�+�5
�5
�5
�pS0�S0�S0�S0�S0��S0�S0�S0�S0�S0r

?>