Current File : //proc/self/root/lib/python3/dist-packages/jinja2/__pycache__/runtime.cpython-312.pyc
�

P}<b���dZddlZddlZddlZddlmZddlmZddl	m
Z
ddl	mZddl	mZdd	l
mZdd
l
mZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZej<d�Zej<dej@dejBf��Z"ejFr#ddl$Z$ddl%Z&ddl'm(Z(Gd�de&jR�Z*gd�Z+gd�Z,ded efd!�Z-d"ej\ejBd e/fd#�Z0d"ej\ejBd e/fd$�Z1				dHd%d&d'ejde/d(ejfe/ej@d)gejhe/ffd*ejdejfe/ejBfd+e5d,ejdejle/ejBfd-ejdejne/ejBfd d)fd.�Z8Gd/�d0�Z9d1e"d e"fd2�Z:ejnjvGd3�d)��Z<Gd4�d5�Z=Gd6�d7�Z>Gd8�d9e>�Z?Gd:�d;�Z@Gd<�d=�ZAdeAfd>ejdd?d@ej�eAd ej�eAfdA�ZCGdB�dCeA�ZDGdD�dEeA�ZEGdF�dGeA�ZFeA`GeD`GeE`GeF`Gy)Iz;The runtime functions and state used by compiled templates.�N)�abc)�chain)�escape)�Markup)�soft_str���
auto_aiter)�
auto_await)�TemplateNotFound)�TemplateRuntimeError)�UndefinedError)�EvalContext)�_PassArg)�concat)�internalcode)�missing)�	Namespace)�object_type_repr)�pass_eval_context�V�F.)�bound)�Environmentc	�B�eZdZ	ddejedddedefd�Zy)�LoopRenderFunc�reciter�loop_render_func�depth�returnc��y�N�)�selfrrrs    �0/usr/lib/python3/dist-packages/jinja2/runtime.py�__call__zLoopRenderFunc.__call__#s��
�N)r)	�__name__�
__module__�__qualname__�t�Iterabler�int�strr&r#r'r%rr"s:��
�		��Z�Z��]�	�/�	��		�
�	r'r)�LoopContext�TemplateReference�Macrorr
rr�markup_join�str_join�identityrr�	Undefinedr)�AsyncLoopContextr
r�xr c��|S)zLReturns its argument. Useful for certain things in the
    environment.
    r#)r7s r%r4r4Ds	��
�Hr'�seqc���g}tt|�}|D]E}|j|�t|d�s�!t	d�jt
||��cSt|�S)z?Concatenation that escapes if necessary and converts to string.�__html__�)�mapr�append�hasattrr�joinrr)r9�buf�iterator�args    r%r2r2Ks]��
�C��8�S�!�H��9���
�
�3���3�
�#��"�:�?�?�5��h�#7�8�8�9��#�;�r'c�4�ttt|��S)z3Simple args to string conversion and concatenation.)rr=r.)r9s r%r3r3Vs���#�c�3�-� � r'�environmentr�
template_name�blocks�Context�vars�shared�globals�localsc���|�i}|r|}nt|xsdfi|��}|r3|rt|�}|j�D]\}}	|	tus�|	||<�|j|||||��S)z%Internal helper for context creation.r#)rK)�dict�itemsr�
context_class)
rErFrGrIrJrKrL�parent�key�values
          r%�new_contextrT[s����|���
����g�m��,�t�,��
���&�\�F� �,�,�.�	$�J�C���G�#�#��s��	$��$�$��V�]�F�G�%��r'c�H�eZdZdZdd�Zdedejfd�Zdefd�Z	y)	r0zThe `self` in templates.r Nc��||_yr")�_TemplateReference__context)r$�contexts  r%�__init__zTemplateReference.__init__{s	�� ��r'�namec�d�|jj|}t||j|d�S�Nr)rWrG�BlockReference)r$rZrGs   r%�__getitem__zTemplateReference.__getitem__~s+�����&�&�t�,���d�D�N�N�F�A�>�>r'c�b�dt|�j�d|jj�d�S)N�<� �>)�typer(rWrZ�r$s r%�__repr__zTemplateReference.__repr__�s-���4��:�&�&�'�q����)<�)<�(?�q�A�Ar')rXrHr N)
r(r)r*�__doc__rYr.r+�Anyr^rer#r'r%r0r0xs/��"�!�?��?����?�B�#�Br'r0�dict_methodc���tj��dddtjf�fd��}tjt
|�S)Nr$rHr c�0���|j��Sr")�get_all)r$rhs �r%�f_allz_dict_method_all.<locals>.f_all�s����4�<�<�>�*�*r')�	functools�wrapsr+rg�castr)rhrls` r%�_dict_method_allrp�sC����_�_�[�!�+�I�+�!�%�%�+�"�+�
�6�6�!�U��r'c�B�eZdZdZ	ddddej
eejfdejedej
eejdgejeffdejejeejff
d	�Zded
ejdgejefdejdfd
�Zddedejdejfd�Zdedejejdffd�Zdedejfd�Zdej
eejffd�Zdej
eejffd�Zedejdejdejdejejdffd��Zddejej
eejfddfd�Zeej2�Zeej4�Zeej6�Zdedefd�Zdedejfd�Zdefd�Zy) rHa�The template context holds the variables of a template.  It stores the
    values passed to the template and also the names the template exports.
    Creating instances is neither supported nor useful as it's created
    automatically at various stages of the template evaluation and should not
    be created by hand.

    The context is immutable.  Modifications on :attr:`parent` **must not**
    happen and modifications on :attr:`vars` are allowed from generated
    template code only.  Template filters and global functions marked as
    :func:`pass_context` get the active context passed as first argument
    and are allowed to access the context read-only.

    The template context supports read only dict operations (`get`,
    `keys`, `values`, `items`, `iterkeys`, `itervalues`, `iteritems`,
    `__getitem__`, `__contains__`).  Additionally there is a :meth:`resolve`
    method that doesn't fail with a `KeyError` but returns an
    :class:`Undefined` object for missing variables.
    NrErrQrZrGrKc�(�||_i|_||_t|j|�|_t�|_||_|�
t�n
t|�|_|j�D��cic]	\}}||g��c}}|_
ycc}}wr")rQrIrEr�eval_ctx�set�
exported_varsrZ�globals_keysrOrG)r$rErQrZrGrK�k�vs        r%rYzContext.__init__�sz�����(*��	�*5���#�D�$4�$4�d�;��
�),������	�%,�_�C�E�#�g�,���
+1�,�,�.�9�$�!�Q�q�1�#�v�9����9s�6B�currentr �r]r5c���	|j|}|j|�dz}||t||||�S#t$r$|jj	d|�d�d��cYSwxYw)zRender a parent block.r� there is no parent block called �.�super�rZ)rG�index�LookupErrorrE�	undefinedr])r$rZryrGr�s     r%r~z
Context.super�s��	��[�[��&�F��L�L��)�A�-�E��5�M�
�d�D�&�%�8�8��	�	��#�#�-�-�2�4�(�!�<�7�.��
�	�s�(8�*A%�$A%rR�defaultc�0�	||S#t$r|cYSwxYw)z�Look up a variable by name, or return a default if the key is
        not found.

        :param key: The variable name to look up.
        :param default: The value to return if the key is not found.
        )�KeyError)r$rRr�s   r%�getzContext.get�s%��	���9����	��N�	�s���r5c�p�|j|�}|tur|jj|��S|S)aNLook up a variable by name, or return an :class:`Undefined`
        object if the key is not found.

        If you need to add custom behavior, override
        :meth:`resolve_or_missing`, not this method. The various lookup
        functions use that method, not this one.

        :param key: The variable name to look up.
        r)�resolve_or_missingrrEr�)r$rR�rvs   r%�resolvezContext.resolve�s:���
$�
$�S�
)��
��=��#�#�-�-�3�-�7�7��	r'c��||jvr|j|S||jvr|j|StS)aNLook up a variable by name, or return a ``missing`` sentinel
        if the key is not found.

        Override this method to add custom lookup behavior.
        :meth:`resolve`, :meth:`get`, and :meth:`__getitem__` use this
        method. Don't call this method directly.

        :param key: The variable name to look up.
        )rIrQr)r$rRs  r%r�zContext.resolve_or_missing�s>���$�)�)���9�9�S�>�!��$�+�+���;�;�s�#�#��r'c�\�|jD�cic]}||j|��c}Scc}w)z+Get a new dict with the exported variables.)rurI)r$rws  r%�get_exportedzContext.get_exported�s(��)-�);�);�<�A��4�9�9�Q�<��<�<��<s�)c��|js|jS|js|jSt|jfi|j��S)z�Return the complete context as dict including the exported
        variables.  For optimizations reasons this might not return an
        actual copy so be careful with using it.
        )rIrQrNrds r%rkzContext.get_all�s>��
�y�y��;�;���{�{��9�9���D�K�K�-�4�9�9�-�-r'�
_Context__obj�args�kwargsc��	d}t|d�r+tj|j��|j}tj|�}|tjurQ|jd�r|j
|d�}|jd�r|j
|d�}|f|z}nE|tjur|jf|z}n"|tjur|jf|z}|jdd�|jdd�	||i|��S#t$r|jjd�cYSwxYw)z�Call the callable with the arguments and keyword arguments
        provided but inject the active context or environment as first
        argument if the callable has :func:`pass_context` or
        :func:`pass_environment`.
        Tr&N�
_loop_vars�_block_varszGvalue was undefined because a callable raised a StopIteration exception)
r?r�from_objr&rXr��derived�eval_contextrsrE�pop�
StopIterationr�)�_Context__selfr�r�r��__traceback_hide__�pass_args      r%�callzContext.calls?���!%��
�E�:�&��!�!�%�.�.�1�=��N�N�E��$�$�U�+���x�'�'�'��z�z�,�'�����|�(<�=���z�z�-�(�����}�(=�>���9�t�#�D�
��.�.�
.��O�O�%��,�D�
��-�-�
-��&�&�(�4�/�D��
�
�=�$�'��
�
�<��&�	��$�)�&�)�)���	��%�%�/�/�+��
�	�s�D%�%$E�ErLc	��t|j|ji|j�dd|�}|j|_|j
j
d�|j
j�D��|S)z�Internal helper function to create a derived context.  This is
        used in situations where the system needs a new context in the same
        template that is independent.
        TNc3�<K�|]\}}|t|�f���y�wr")�list)�.0rwrxs   r%�	<genexpr>z"Context.derived.<locals>.<genexpr>:s����K�t�q�!�q�$�q�'�l�K�s�)rTrErZrkrsrG�updaterO)r$rLrXs   r%r�zContext.derived1se��
����d�i�i��T�\�\�^�T�4��
�� �=�=��������K�t�{�{�7H�7H�7J�K�K��r'c�>�||jvxs||jvSr")rIrQ�r$rZs  r%�__contains__zContext.__contains__As���t�y�y� �7�D�D�K�K�$7�7r'c�N�|j|�}|turt|��|S)zpLook up a variable by name with ``[]`` syntax, or raise a
        ``KeyError`` if the key is not found.
        )r�rr�)r$rR�items   r%r^zContext.__getitem__Ds*���&�&�s�+���7�?��3�-���r'c�p�dt|�j�d|j��d|j�d�S)Nr`raz of rb)rcr(rkrZrds r%rezContext.__repr__Os3���4��:�&�&�'�q�����(:�$�t�y�y�m�1�M�Mr'r") r(r)r*rfr+�Dictr.rg�Optional�Callable�Iterator�MutableMappingrY�Unionr~r�r�r�r�rkrr�r�rprN�keys�valuesrO�boolr�r^rer#r'r%rHrH�sX���2=A�
:�"�:����s�A�E�E�z�"�:��j�j��o�	:�
���s�A�J�J�	�{�A�J�J�s�O�'C�D�D�E�:����A�,�,�S�!�%�%�Z�8�9�
:�*9��9�"#�*�*�i�[�!�*�*�S�/�-I�"J�9�	
���.�	/�9�
�s�
�Q�U�U�
�a�e�e�
��3��1�7�7�1�5�5�+�+=�#>��"�c��a�e�e��$=�a�f�f�S�!�%�%�Z�0�=�	.�����Q�U�U�
�+�	.��*��z�z�*�*+�%�%�*�;<�5�5�*�	
�������#�	$�*��*�X
�a�j�j�����Q�U�U�
�);�<�
�	�
��D�I�I�&�D�
�d�k�k�
*�F��T�Z�Z�(�E�8��8��8�	�s�	�q�u�u�	�N�#�Nr'c
���eZdZdZdedddejejdgejefde	ddf
d	�Z
edejd
fd��Z
edefd��Zedefd
��Zy)r]z"One block on a template reference.rZrXrH�stackrr Nc�<�||_||_||_||_yr")rZ�_context�_stack�_depth)r$rZrXr�rs     r%rYzBlockReference.__init__Vs ����	���
������r'rzc�(�|jdzt|j�k\r5|jjjd|j�d�d��St|j|j|j|jdz�S)zSuper the block.rr|r}r~r)r��lenr�r�rEr�rZr]rds r%r~zBlockReference.superbsy���;�;��?�c�$�+�+�.�.��=�=�,�,�6�6�2�4�9�9�-�q�A��7��
��d�i�i�������T�[�[�ST�_�U�Ur'c��K�t|j|j|j�2�cgc3d{���}|��7�6ncc}wc}�}|jjj
rt
|�S|S�wr")rr�r�r�rs�
autoescaper)r$r7r�s   r%�_async_callzBlockReference._async_callksd����
�6�d�k�k�$�+�+�6�t�}�}�E�F�F��Q�F��F��F�
���=�=�!�!�,�,��"�:���	�s0�1A>�A�A
�A�A
�A�A
�A�:A>c� �|jjjr|j�St	|j
|j|j��}|jjjrt|�S|Sr")
r�rE�is_asyncr�rr�r�rsr�r�r$r�s  r%r&zBlockReference.__call__vsi���=�=�$�$�-�-��#�#�%�%�
�,�D�K�K����,�T�]�]�;�
<���=�=�!�!�,�,��"�:���	r')r(r)r*rfr.r+�Listr�r�r-rY�propertyr�r~rr�r&r#r'r%r]r]Ss���,�
��
��
��v�v�a�j�j�)��a�j�j��o�!=�>�?�	
�
�
�
�
��V�q�w�w�<�=�V��V���3�����	�#�	��	r'r]c��eZdZUdZdZdZejee	d<e
Zeje	d<e
Z
eje	d<e
Zeje	d<e
Zeje	d<		d%d	ej ed
ej$ddejd
deddf
d�Zed	ej edej*efd��Zedefd��Zdefd�Zedefd��Zedefd��Zedefd��Zedefd��Zedefd��Zdejfd�Z edefd��Z!edejDejdffd��Z#edejDejdffd��Z$dedefd�Z%dejdefd �Z&d&d!�Z'dejPejdffd"�Z)e*d	ej ede+fd#��Z,de+fd$�Z-y)'r/zeA wrapper iterable for dynamic ``for`` loops, with information
    about the loop and iteration.
    ���N�_length�_after�_current�_before�_last_changed_value�iterabler�r5�recurser�depth0r c�h�||_|j|�|_||_||_||_y)a@
        :param iterable: Iterable to wrap.
        :param undefined: :class:`Undefined` class to use for next and
            previous items.
        :param recurse: The function to render the loop body when the
            loop is marked recursive.
        :param depth0: Incremented when looping recursively.
        N)�	_iterable�_to_iterator�	_iterator�
_undefined�_recurser�)r$r�r�r�r�s     r%rYzLoopContext.__init__�s2��"����*�*�8�4���#�����
���r'c��t|�Sr")�iter�r�s r%r�zLoopContext._to_iterator�s���H�~�r'c�j�|j�|jS	t|j�|_|jS#t$rit	|j
�}|j
|�|_t|�|jz|jtuz|_Y|jSwxYw)z�Length of the iterable.

        If the iterable is a generator or otherwise does not have a
        size, it is eagerly evaluated to get a size.
        )
r�r�r��	TypeErrorr�r�r�r�r�r�r$r�s  r%�lengthzLoopContext.length�s����<�<�#��<�<��	U��t�~�~�.�D�L��|�|����	U��D�N�N�+�H�!�.�.�x�8�D�N��x�=�4�:�:�5����G�9S�T�D�L��|�|��	U�s�A�A$B2�1B2c��|jSr")r�rds r%�__len__zLoopContext.__len__�s���{�{�r'c� �|jdzS)zBHow many levels deep a recursive loop currently is, starting at 1.r)r�rds r%rzLoopContext.depth�����{�{�Q��r'c� �|jdzS)z-Current iteration of the loop, starting at 1.r��index0rds r%r�zLoopContext.index�r�r'c�4�|j|jz
S)zrNumber of iterations from the end of the loop, ending at 0.

        Requires calculating :attr:`length`.
        �r�r�rds r%�	revindex0zLoopContext.revindex0�s���{�{�T�Z�Z�'�'r'c�4�|j|jz
S)zrNumber of iterations from the end of the loop, ending at 1.

        Requires calculating :attr:`length`.
        �r�r�rds r%�revindexzLoopContext.revindex�s���{�{�T�[�[�(�(r'c� �|jdk(S)z0Whether this is the first iteration of the loop.rr�rds r%�firstzLoopContext.first�s���{�{�a��r'c��|jtur|jSt|jt�|_|jS)aReturn the next element in the iterable, or :data:`missing`
        if the iterable is exhausted. Only peeks one item ahead, caching
        the result in :attr:`_last` for use in subsequent checks. The
        cache is reset when :meth:`__next__` is called.
        )r�r�nextr�rds r%�
_peek_nextzLoopContext._peek_next�s6���;�;�g�%��;�;���4�>�>�7�3����{�{�r'c�.�|j�tuS)z�Whether this is the last iteration of the loop.

        Causes the iterable to advance early. See
        :func:`itertools.groupby` for issues this can cause.
        The :func:`groupby` filter avoids that issue.
        �r�rrds r%�lastzLoopContext.last�s����� �G�+�+r'c�T�|jr|jd�S|jS)zZThe item in the previous iteration. Undefined during the
        first iteration.
        zthere is no previous item)r�r�r�rds r%�previtemzLoopContext.previtem�s%��
�:�:��?�?�#>�?�?��|�|�r'c�X�|j�}|tur|jd�S|S)a	The item in the next iteration. Undefined during the last
        iteration.

        Causes the iterable to advance early. See
        :func:`itertools.groupby` for issues this can cause.
        The :func:`jinja-filters.groupby` filter avoids that issue.
        �there is no next item�r�rr�r�s  r%�nextitemzLoopContext.nextitems,���_�_�
��
��=��?�?�#:�;�;��	r'r�c�R�|std��||jt|�zS)z�Return a value from the given args, cycling through based on
        the current :attr:`index0`.

        :param args: One or more values to cycle through.
        zno items for cycling given)r�r�r�)r$r�s  r%�cyclezLoopContext.cycles+����8�9�9��D�K�K�#�d�)�+�,�,r'rSc�2�|j|k7r||_yy)z�Return ``True`` if previously called with a different value
        (including when called for the first time).

        :param value: One or more values to compare to the last call.
        TF)r�)r$rSs  r%�changedzLoopContext.changeds ���#�#�u�,�',�D�$��r'c��|Sr"r#rds r%�__iter__zLoopContext.__iter__'����r'c���|jtur|j}t|_nt|j�}|xjdz
c_|j
|_||_||fS�Nr)r�rr�r�r�r�r�r�s  r%�__next__zLoopContext.__next__*sU���;�;�g�%����B�!�D�K��d�n�n�%�B����q����}�}�����
��4�x�r'c��|j�td��|j||j|j��S)z�When iterating over nested data, render the body of the loop
        recursively with the given inner iterable data.

        The loop must have the ``recursive`` marker for this to work.
        zCThe loop must have the 'recursive' marker to be called recursively.)r)r�r�rr�s  r%r&zLoopContext.__call__6s=���=�=� ��U��
��}�}�X�t�}�}�D�J�J�}�G�Gr'c�h�dt|�j�d|j�d|j�d�S)Nr`ra�/rb)rcr(r�r�rds r%rezLoopContext.__repr__Ds0���4��:�&�&�'�q�����A�d�k�k�]�!�D�Dr'r\)r r/).r(r)r*rfr�r�r+r�r-�__annotations__rr�rgr�r�r�r,r�TyperY�staticmethodr�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r��Tupler�rr.r&rer#r'r%r/r/�s����
�F�#�G�Q�Z�Z��_�#��F�A�E�E���H�a�e�e���G�Q�U�U��!(�����(�15����*�*�Q�-���6�6�+�&�����,�-�	�
��
�
�,��q�z�z�!�}�����A�����������$�����s������s�����(�3�(��(��)�#�)��)�� �t� �� �
�A�E�E�
��,�d�,��,���!�'�'�!�%�%��"4�5�����
�!�'�'�!�%�%��"4�5�
��
�	-�1�	-��	-�
�a�e�e�
��
��
�!�'�'�!�%�%��"6�7�
��H����A��H�3�H��H�E�#�Er'r/c���eZdZUejej
ed<edejeje
eje
fdeje
fd��Ze
defd��Ze
defd��Ze
defd��Zdej
fd�Ze
defd	��Ze
dejej
d
ffd��Zdd�Zdej.ej
dffd
�Zy)r6r�r�r c��t|�Sr"r	r�s r%r�zAsyncLoopContext._to_iteratorKs���(�#�#r'c��K�|j�|jS	t|j�|_|jS#t$rz|j2�cgc3d{���7}|��
6ncc}w}}|j|�|_t|�|jz|jtuz|_Y|jSwxYw�wr")	r�r�r�r�r�r�r�r�r)r$r7r�s   r%r�zAsyncLoopContext.lengthQs������<�<�#��<�<��	U��t�~�~�.�D�L��|�|����	U�)-���8�8�A��8��8�H�8�!�.�.�x�8�D�N��x�=�4�:�:�5����G�9S�T�D�L��|�|��	U�sL�C�A�C�C�A*�A(�A"� A(�$A*�)AC�7
C�C�Cc��PK�|j�d{���|jz
S7��wr"r�rds r%r�zAsyncLoopContext.revindex0_s�����[�[� �4�:�:�-�-� ���&�$�&c��PK�|j�d{���|jz
S7��wr"r�rds r%r�zAsyncLoopContext.revindexcs�����[�[� �4�;�;�.�.� �r
c��K�|jtur|jS	|jj��d{���|_|jS7�#t$rt|_Y|jSwxYw�wr")r�rr��	__anext__�StopAsyncIterationrds r%r�zAsyncLoopContext._peek_nextgsh�����;�;�g�%��;�;��	"� $��� 8� 8� :�:�D�K��{�{��	;��!�	"�!�D�K��{�{��	"�s9�A<�A�A�	A�	A<�A�A9�+
A<�8A9�9A<c��JK�|j��d{���tuS7�
�wr"r�rds r%r�zAsyncLoopContext.lastrs�����_�_�&�&�'�1�1�&�s�#�!�#r5c��tK�|j��d{���}|tur|jd�S|S7��w)Nr�r�r�s  r%r�zAsyncLoopContext.nextitemvs6�����?�?�$�
$��
��=��?�?�#:�;�;��	�%�s�8�6� 8c��|Sr"r#rds r%�	__aiter__zAsyncLoopContext.__aiter__r�r'c��K�|jtur|j}t|_n"|jj��d{���}|xjdz
c_|j
|_||_||fS7�5�wr�)r�rr�r
r�r�r�r�s  r%r
zAsyncLoopContext.__anext__�se�����;�;�g�%����B�!�D�K��~�~�/�/�1�1�B����q����}�}�����
��4�x��2�s�AB�
B�6BN)r r6)r(r)r*r+�
AsyncIteratorrgrrr�r,r�
AsyncIterabler�r�r-r�r�r�r�r�r�r�rrr
r#r'r%r6r6Hs,�����q�u�u�%�%��$��'�'�!�*�*�Q�-�����);�;�<�$�	
����	�$��$�
��c�����.��.��.��/��/��/�	�!�%�%�	��2�D�2��2���������{�(:� ;�����
�������0B�)B�!C�
r'r6c�n�eZdZdZ	ddddej
defdedejed	ed
ededejefd
�Z
eedejdejdefd���Zdejejdedefd�Zdejejdedefd�Zdefd�Zy)r1zWraps a macro function.NrEr�func.rZ�	arguments�catch_kwargs�
catch_varargs�caller�default_autoescapec	��||_||_t|�|_||_||_||_||_||_d|v|_	|�:t|j�r|jd�}||_y|j}||_y)Nr)
�_environment�_funcr��_argument_countrZrrrr�explicit_caller�callabler��_default_autoescape)	r$rErrZrrrrrs	         r%rYzMacro.__init__�s���(�����
�"�9�~�����	�"���(���*������'�9�4����%���.�.�/�%0�%;�%;�D�%A�"�$6�� �&1�%;�%;�"�#5�� r'r�r�r c
�&�|r(t|dt�r|dj}|dd}n|j}t	|d|j
�}t
|�}d}||j
k7rH|jt
|�dD],}	|j|�}|dk(rd}|j|��.n|j}|jrD|sB|jdd�}	|	�|jjdd��}	|j|	�|j r|j|�nL|rJd|vrt#d|j$�d	���t#d|j$�d
t't)|������|j*r|j||j
d�nGt
|�|j
kDr/t#d|j$�dt
|j��d���|j-||�S#t$r
t}Y��wwxYw)
NrrFrTzNo caller definedrzmacro zX was invoked with two values for the special caller argument. This is most likely a bug.z takes no keyword argument z takes not more than z argument(s))�
isinstancerr�r#r�r r�rr�r�rr>r!rrr�rr�rZr�r�r�_invoke)
r$r�r�r�r�off�found_callerrZrSrs
          r%r&zMacro.__call__�s#��&�J�t�A�w��4��a��+�+�J����8�D��1�1�J���4�� 4� 4�5�6�	��)�n����
�$�&�&�&����s�9�~�'7�8�
(��$�"�J�J�t�,�E��8�#�#'�L�� � ��'�
(� �/�/�L�
�;�;�|��Z�Z��$�/�F��~��*�*�4�4�5H�x�4�X�����V�$�������V�$�
��6�!���T�Y�Y�M�*C�C��������
�%@��d�6�l�AS�@V�W��
�������T�$�"6�"6�"8�9�:�
��Y��-�-�
-������
�&�����'�(��6��
�
�|�|�I�z�2�2��I �$�#�E�$�s�G=�=H�Hr�c��ZK�|j|��d{���}|rt|�S|S7��wr")rr�r$rr�r�s    r%�
_async_invokezMacro._async_invoke�s0�����4�:�:�y�)�
)����"�:���	�*�s�+�)�+c��|jjr|j||�S|j|�}|rt	|�}|Sr")rr�r+rrr*s    r%r&z
Macro._invokesE�����%�%��%�%�i��<�<�
�T�Z�Z��
#������B��	r'c��|j�dnt|j�}dt|�j�d|�d�S)N�	anonymousr`rarb)rZ�reprrcr(r�s  r%rezMacro.__repr__s:��"�i�i�/�{�T�$�)�)�_���4��:�&�&�'�q���a�0�0r'r")r(r)r*rfr+r�r.r�r�r�rYrrrgr&r+r&rer#r'r%r1r1�s��!�04�6�"�6��j�j��c��"�6��	6�
�6�6�#�;�6��
6��6��6��J�J�t�,�6�:��J3�a�e�e�J3�q�u�u�J3��J3���J3�X�Q�V�V�A�E�E�]����QT��	��������	�D�	�S�	�1�#�1r'r1c��eZdZdZdZdedefdeje	dejdeje	dejeddf
d	�Z
ede	fd
��Zedejdejdd
fd��Zede	dejfd��ZexZxZxZZexZxZxZZexZZexZZexZZ exZ!Z"exZ#Z$exZ%xZ&xZ'Z(exZ)xZ*Z+exZ,Z-dejde.fd�Z/dejde.fd�Z0de1fd�Z2de	fd�Z3de1fd�Z4dejjejfd�Z6dejnejfd�Z8de.fd�Z9de	fd�Z:y)r5ahThe default undefined type.  This undefined type can be printed and
    iterated over, but every other access will raise an :exc:`UndefinedError`:

    >>> foo = Undefined(name='foo')
    >>> str(foo)
    ''
    >>> not foo
    True
    >>> foo + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    ��_undefined_hint�_undefined_obj�_undefined_name�_undefined_exceptionN�hint�objrZ�excr c�<�||_||_||_||_yr"r1)r$r6r7rZr8s     r%rYzUndefined.__init__+s$�� $���!���#���$'��!r'c�8�|jr|jS|jtur|j�d�St	|jt
�s$t
|j��d|j��St
|j��d|j��S)zXBuild a message about the undefined value based on how it was
        accessed.
        z
 is undefinedz has no element z has no attribute )r2r3rr4r%r.rrds r%�_undefined_messagezUndefined._undefined_message7s���
����'�'�'����'�)��*�*�-�]�;�;��$�.�.��4�#�D�$7�$7�8�9�:� �0�0�3�5�
� �� 3� 3�4�7�8��.�.�1�
3�	
r'r�r��te.NoReturnc�8�|j|j��)zeRaise an :exc:`UndefinedError` when operations are performed
        on the undefined value.
        )r5r;)r$r�r�s   r%�_fail_with_undefined_errorz$Undefined._fail_with_undefined_errorMs���'�'��(?�(?�@�@r'c�H�|dddk(rt|��|j�S)N��__)�AttributeErrorr>r�s  r%�__getattr__zUndefined.__getattr__Vs*�����8�t�� ��&�&��.�.�0�0r'�otherc�.�t|�t|�uSr")rc�r$rDs  r%�__eq__zUndefined.__eq__hs���D�z�T�%�[�(�(r'c�&�|j|�Sr")rGrFs  r%�__ne__zUndefined.__ne__ks���;�;�u�%�%�%r'c�*�tt|��Sr")�idrcrds r%�__hash__zUndefined.__hash__ns���$�t�*�~�r'c��y)Nr<r#rds r%�__str__zUndefined.__str__qs��r'c��yr\r#rds r%r�zUndefined.__len__ts��r'c#�$K�dEd{���y7��w�Nr#r#rds r%r�zUndefined.__iter__ws
�����
�
�s���c�$K�dD]}d����	y�wrQr#�r$�_s  r%rzUndefined.__aiter__zs�����	�A��	�s�c��y)NFr#rds r%�__bool__zUndefined.__bool__~s��r'c��y)Nr5r#rds r%rezUndefined.__repr__�s��r');r(r)r*rf�	__slots__rrr+r�r.rgrr
rYr�r;rr>rC�__add__�__radd__�__sub__�__rsub__�__mul__�__rmul__�__div__�__rdiv__�__truediv__�__rtruediv__�__floordiv__�
__rfloordiv__�__mod__�__rmod__�__pos__�__neg__r&r^�__lt__�__le__�__gt__�__ge__�__int__�	__float__�__complex__�__pow__�__rpow__r�rGrIr-rLrNr�r�r�rrrVrer#r'r%r5r5s����I�!%�� $�,:�
(��j�j��o�
(��U�U�
(��j�j��o�	
(�
�V�V�(�
)�
(�
�
(��
�C�
��
�*�A��U�U�A�&'�e�e�A�	�A��A��1��1����1��1�/I�H�G�H�h�H��8�.H�H�G�H�h�H��8�!;�;�K�,�#=�=�L�=�3�3�G�h�2�2�G�g�7�7�H�{�(B�B�F�B�V�B�f�v�(B�B�G�B�i�+�3�3�G�h�)�A�E�E�)�d�)�&�A�E�E�&�d�&��#���������!�*�*�Q�U�U�+���������!7���$���#�r'r5�loggerzlogging.Logger�basec�������Iddl}|jt���j|jt
j��dtddf�fd��G��fd�d|�}|S)akGiven a logger object this returns a new undefined class that will
    log certain failures.  It will log iterations and printing.  If no
    logger is given a default logger is created.

    Example::

        logger = logging.getLogger(__name__)
        LoggingUndefined = make_logging_undefined(
            logger=logger,
            base=Undefined
        )

    .. versionadded:: 2.8

    :param logger: the logger to use.  If not provided, a default logger
                   is created.
    :param base: the base class to add logging functionality to.  This
                 defaults to :class:`Undefined`.
    Nr�undefr c�>���jd|j�y)NzTemplate variable warning: %s)�warningr;)rurrs �r%�_log_messagez,make_logging_undefined.<locals>._log_message�s������+�U�-E�-E�	
r'c����eZdZdZdej
dej
ddf��fd�Zdef��fd�Zdejej
f��fd�Z
def��fd	�Z�xZ
S)
�0make_logging_undefined.<locals>.LoggingUndefinedr#r�r�r r<c�|��	t�|�|i|��y#|j$r}�jd|�|�d}~wwxYw)NzTemplate variable error: %s)r~r>r5�error)r$r�r��e�	__class__rrs    ��r%r>zKmake_logging_undefined.<locals>.LoggingUndefined._fail_with_undefined_error�sD���
���2�D�C�F�C���,�,�
����:�A�>����
�s��;�6�;c�0���|�t�|��Sr")r~rN�r$r~rxs ��r%rNz8make_logging_undefined.<locals>.LoggingUndefined.__str__�s�������7�?�$�$r'c�0���|�t�|��Sr")r~r�r�s ��r%r�z9make_logging_undefined.<locals>.LoggingUndefined.__iter__���������7�#�%�%r'c�0���|�t�|��Sr")r~rVr�s ��r%rVz9make_logging_undefined.<locals>.LoggingUndefined.__bool__�r�r')r(r)r*rXr+rgr>r.rNr�r�r�rV�
__classcell__)r~rxrrs@��r%�LoggingUndefinedrz�sc����	�	����	�*+�%�%�	�
�	�	%�S�	%�	&�a�j�j����/�	&�	&�d�	&�	&r'r�)�logging�	getLoggerr(�
addHandler�
StreamHandler�sys�stderrr5)rrrsr�r�rxs`   @r%�make_logging_undefinedr��sf���,�~��"��"�"�8�,�����/�'�/�/��
�
�;�<�
�I�
�$�
�
&�4�&�0�r'c�4�eZdZdZdZdefd�Zdeddfd�ZeZy)�ChainableUndefineda�An undefined that is chainable, where both ``__getattr__`` and
    ``__getitem__`` return itself rather than raising an
    :exc:`UndefinedError`.

    >>> foo = ChainableUndefined(name='foo')
    >>> str(foo.bar['baz'])
    ''
    >>> foo.bar['baz'] + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined

    .. versionadded:: 2.11.0
    r#r c��t|�Sr")r.rds r%r;zChainableUndefined.__html__�s���4�y�r'rTc��|Sr"r#rSs  r%rCzChainableUndefined.__getattr__�r�r'N)	r(r)r*rfrXr.r;rCr^r#r'r%r�r��s5��
��I��#���S��%9���Kr'r�c� �eZdZdZdZdefd�Zy)�DebugUndefinedaAn undefined that returns the debug info when printed.

    >>> foo = DebugUndefined(name='foo')
    >>> str(foo)
    '{{ foo }}'
    >>> not foo
    True
    >>> foo + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    r#r c���|jrd|j��}nE|jtur
|j}n&dt	|j��d|j�d�}d|�d�S)Nzundefined value printed: zno such element: �[�]z{{ z }})r2r3rr4r)r$�messages  r%rNzDebugUndefined.__str__�sx�����1�$�2F�2F�1G�H�G�
�
 �
 �G�
+��*�*�G�$�$4�T�5H�5H�$I�#J��D�(�(�+�1�.�
�
�w�i�u�%�%r'N)r(r)r*rfrXr.rNr#r'r%r�r��s����I�
&��
&r'r�c�p�eZdZdZdZejxZxZZ	ejxZ
xZxZZ
ejZy)�StrictUndefinedasAn undefined that barks on print and iteration as well as boolean
    tests and all kinds of comparisons.  In other words: you can do nothing
    with it except checking if it's defined using the `defined` test.

    >>> foo = StrictUndefined(name='foo')
    >>> str(foo)
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    >>> not foo
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    >>> foo + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    r#N)r(r)r*rfrXr5r>r�rNr�rGrIrVrLr�r#r'r%r�r��sH���&�I�#,�#G�#G�G�H�G�w��,5�,P�,P�P�F�P�V�P�h���7�7�Lr'r�)NFNN)Hrfrmr��typingr+�collectionsr�	itertoolsr�
markupsaferrr�async_utilsr
r�
exceptionsrr
r�nodesr�utilsrrrrrrr�TypeVarrr�rgr�
TYPE_CHECKINGr��typing_extensions�terEr�Protocolr�exported�async_exportedr4r,r.r2r3r�r�r�r�r��MappingrTr0rp�registerrHr]r/r6r1r5rr�r�r�r�rXr#r'r%�<module>r�s���A��
�������#�#�(�,�&�������#�$�
�A�I�I�c�N��
�A�I�I�c����C����J�/�0���?�?��"�(�������� ��
��
�a�
��Q�Z�Z����&��3��!�!�*�*�Q�U�U�#�!��!�,0��8<�04�����:�:�c�?��
�F�F�3��
�
�I�;��
�
�3��#?�@�@�A���*�*�Q�V�V�C����J�'�
(�	�

���Z�Z��(�(��a�e�e��4�
5�
�
�J�J�q�y�y��a�e�e��,�-����:B�B��!���������AN�AN��AN�H-�-�`BE�BE�JD�{�D�NC1�C1�Lm�m�b,0�9�9�
�J�J�'�(�9�78�v�v�i�7H�9��V�V�I��9�x���6&�Y�&�@8�i�8�:��� ����r'
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!