Current File : //proc/self/root/usr/lib/python3.12/__pycache__/shutil.cpython-312.pyc
�

�(�g���V�dZddlZddlZddlZddlZddlZddlZddlZ	ddlZ[dZ		ddlZ[dZ	ddl
Z
[
dZejdk(ZdxZZejdk(rddlZnerddlZej&dk(rddlZndZerdnd	Zeed
�xrej&j/d�aexr	eed�Zd
Zgd�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Z Gd�de�Z!Gd�de"�Z#Gd�de"�Z$d�Z%d�Z&efd�Z'drd �Z(d!�Z)d"�Z*d#�Z+dd$�d%�Z,dd$�d&�Z-eed'�rdd$�d(�Z.nd)�Z.dd$�d*�Z/dd$�d+�Z0dd$�d,�Z1d-�Z2	dsd.�Z3dde1ddfd/�Z4eejjd0�rd1�Z6nd2�Z6d3�Z7d4�Z8ejrejejtejvhejxkxr2ejzej|vxrejej~vZ@dtddd5�d6�ZAe@eA_Bd7�ZCe1fd8�ZDd9�ZEd:�ZFd;�ZGd<�ZH		dud=�ZI		dvd>�ZJdeI_KdeJ_Kd?eId@gdAfiZLe	reIdBgdCfeLdD<eJgdEfeLdF<er	eIdGgdHfeLdI<er	eIdJgdKfeLdL<dM�ZMdwdN�ZNdO�ZO		dxdP�ZPdQ�ZQdR�ZR		dwdS�ZSdT�ZTdU�ZUdV�ZVddW�dX�ZWdYgeWgdAfdZgeVgdEfd[�ZXe	rd\d]geWgdCfeXdD<erd^d_geWgdHfeXdI<erd`dageWgdKfeXdL<db�ZYdyddW�dc�ZZeedd�r[ej�de�ej�dfdg�Z]dhe]j�_die]j�_dje]j�_dk�Zan)er'ej�de�ej�dfdg�Z]dl�Zadydm�Zbdzdn�Zcdo�Zddp�Zeej�ej�zdfdq�Zhy#e
$rdZ	Y��dwxYw#e
$rdZY��jwxYw#e
$rdZY��pwxYw){z�Utility functions for copying and archiving files and directory trees.

XXX The functions here don't copy the resource fork or other metadata on Mac.

�NTF�nt�posix�win32ii�sendfile�linux�
_fcopyfilez%.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC)�copyfileobj�copyfile�copymode�copystat�copy�copy2�copytree�move�rmtree�Error�SpecialFileError�	ExecError�make_archive�get_archive_formats�register_archive_format�unregister_archive_format�get_unpack_formats�register_unpack_format�unregister_unpack_format�unpack_archive�ignore_patterns�chown�which�get_terminal_size�
SameFileErrorc��eZdZy)rN)�__name__�
__module__�__qualname__���/usr/lib/python3.12/shutil.pyrrCs��r'rc��eZdZdZy)r!z5Raised when source and destination are the same file.N�r#r$r%�__doc__r&r'r(r!r!Fs��?r'r!c��eZdZdZy)rz|Raised when trying to do a kind of operation (e.g. copying) which is
    not supported on a special file (e.g. a named pipe)Nr*r&r'r(rrIs��;r'rc��eZdZdZy)rz+Raised when a command could not be executedNr*r&r'r(rrMs��5r'rc��eZdZdZy)�	ReadErrorz%Raised when an archive cannot be readNr*r&r'r(r/r/Ps��/r'r/c��eZdZdZy)�
RegistryErrorzVRaised when a registry operation with the archiving
    and unpacking registries failsNr*r&r'r(r1r1Ss��&r'r1c��eZdZdZy)�_GiveupOnFastCopyzuRaised as a signal to fallback on using raw read()/write()
    file copy when fast-copy functions fail to do so.
    Nr*r&r'r(r3r3Ws��r'r3c��	|j�}|j�}	tj|||�y#t$r}t|��d}~wwxYw#t
$ra}|j|_|j|_|jtjtjhvrt|��|d�d}~wwxYw)zhCopy a regular file content or metadata by using high-performance
    fcopyfile(3) syscall (macOS).
    N)�fileno�	Exceptionr3rr�OSError�name�filename�	filename2�errno�EINVAL�ENOTSUP)�fsrc�fdst�flags�infd�outfd�errs      r(�_fastcopy_fcopyfilerD\s���%��{�{�}�����
�� �
����u�e�,��	�%���$�$��%��
� ��y�y����	�	��
��9�9����u�}�}�5�5�#�C�(�(��4���
 �s-� ;�A�	A�A�A�	C� AB<�<Cc���	|j�}|j�}	tt	j
|�jd�}tjdkrt|d�}d}		t	j||||�}|dk(ry||z
}�%#t$r}t|��d}~wwxYw#t$rd}Y�pwxYw#t$r�}|j|_
|j|_|jtj k(r
dat|��|jtj$k(r|d�|dk(r3t	j&|dtj(�dk(rt|��|�d}~wwxYw)z�Copy data from one regular mmap-like fd to another by using
    high-performance sendfile(2) syscall.
    This should work on Linux >= 2.6.33 only.
    Ni�ili@rF)r5r6r3�max�os�fstat�st_sizer7�sys�maxsize�minrr8r9r:r;�ENOTSOCK�_USE_CP_SENDFILE�ENOSPC�lseek�SEEK_CUR)r>r?rArBrC�	blocksize�offset�sents        r(�_fastcopy_sendfilerUpsV��%��{�{�}�����
���������.�.��8�	�
�{�{�W���	�7�+�	�
�F�
�	��;�;�u�d�F�I�>�D�,�q�y���d�N�F�5��%�%���$�$��%�����	����	��9�9�C�L� �I�I�C�M��y�y�E�N�N�*�$)� �'��,�,��y�y�E�L�L�(��t�#���{�r�x�x��q�"�+�+�>�!�C�'��,�,��I��'	�sA� B�)B/�/C�	B,�B'�'B,�/B=�<B=�	E4�	B&E/�/E4c��|j}|j}tt|��5}	||�}|sn%||kr|d|5}||�ddd�n	||��0ddd�y#1swY�xYw#1swYyxYw)z�readinto()/memoryview() based variant of copyfileobj().
    *fsrc* must support readinto() method and both files must be
    open in binary mode.
    N)�readinto�write�
memoryview�	bytearray)r>r?�length�
fsrc_readinto�
fdst_write�mv�n�smvs        r(�_copyfileobj_readintora�s����M�M�M����J�	�I�f�%�	&�
�"���b�!�A����V�����V�$�s��s�O�$���2���
�
�$�$��
�
�s#�A4�	A(�
A4�(A1	�-A4�4A=c��|st}|j}|j}||�x}r||�||�x}r�yy)z=copy data from file-like object fsrc to file-like object fdstN)�COPY_BUFSIZE�readrX)r>r?r[�	fsrc_readr]�bufs      r(r	r	�sE������	�	�I����J��6�"�
"�#�
"��3���6�"�
"�#�
"r'c��t|tj�r\ttjd�rB	tjj|j
�tj|��Sttjd�r!	tjj||�Stjjtjj|��tjjtjj|��k(S#t$rYywxYw#t$rYywxYw)N�samestatF�samefile)�
isinstancerG�DirEntry�hasattr�pathrh�statr7ri�normcase�abspath��src�dsts  r(�	_samefilert�s����#�r�{�{�#������(D�	��7�7�#�#�C�H�H�J������=�=��r�w�w�
�#�	��7�7�#�#�C��-�-�

�G�G���R�W�W�_�_�S�1�2��G�G���R�W�W�_�_�S�1�2�
3�4���	��	���	��	�s$�AD+�D:�+	D7�6D7�:	E�Ec��t|tj�r|j�Stj|�S�N)rjrGrkrn��fns r(�_statry�s(��"�2�r�{�{�3�2�7�7�9�D������Dr'c��t|tj�r|j�Stjj|�Srv)rjrGrk�
is_symlinkrm�islinkrws r(�_islinkr}�s-��(��R�[�[�9�2�=�=�?�Q�r�w�w�~�~�b�?Q�Qr'��follow_symlinksc
��tjd||�t||�rtdj	||���d}t||g�D]\}}	t
|�}tj|j�r6t|tj�r|jn|}td|z��ts�n|dk(s�t|j }��|s6t%|�r+tj&tj(|�|�|St+|d�5}	t+|d�5}t,r0	t/||t0j2�|cddd�cddd�St6r!	t9||�|cddd�cddd�Str4|dkDr/t;||t=|t>��|cddd�cddd�StA||�ddd�ddd�|S#t"$rY���wxYw#t4$rY�9wxYw#t4$rY�HwxYw#1swY�AxYw#tB$r4}	tjjE|�stGd|���|	��d}	~	wwxYw#1swY|SxYw)	z�Copy data from src to dst in the most efficient way possible.

    If follow_symlinks is not set and src is a symbolic link, a new
    symlink will be created instead of copying the file it points to.

    zshutil.copyfilez{!r} and {!r} are the same filerz`%s` is a named pipe�rb�wbNzDirectory does not exist: )$rJ�auditrtr!�format�	enumerateryrn�S_ISFIFO�st_moderjrGrkrmr�_WINDOWSrIr7r}�symlink�readlink�open�_HAS_FCOPYFILErDr�_COPYFILE_DATAr3rNrUrarLrcr	�IsADirectoryError�exists�FileNotFoundError)
rrrsr�	file_size�irx�str>r?�es
          r(r
r
�sC���I�I���c�*���c���=�D�D�S�#�N�O�O��I��C��:�&�'���2�	'��r��B��}�}�R�Z�Z�(� *�2�r�{�{� ;�R�W�W���&�'=��'B�C�C��A��F��J�J�	�'��w�s�|�
�
�
�2�;�;�s�#�S�)�D�J�A�#�t�_�	��
��#�t�_�,��%�!�/��d�E�<P�<P�Q�#&�,�,�	�	�*�!�.�t�T�:�#&�,�,�	�	�&"�i�!�m�-�d�D�#�i��:V�W�"�',�,�	�	�. ��d�+�+,�	�@�J��]�	��	��, 1�!� �!�� 1�!� �!��,�,��0%�
��w�w�~�~�c�*�+�.H���,N�O�UV�V���	
��5	�@�J�s��G�I�H�"H�*G(�	H�H� 
G7�-	H�'H�'	H�:H�H�	G%�$G%�(	G4�1H�3G4�4H�7	H�H�H�H�H	�H�	I�/I
�
I�I�Ic��tjd||�|s�t|�r�tjj|�rftjdk(r!tjtj}}n�ttd�r!tjtj}}njytjdk(r@tjj|�r!tjj|d��}ttj}}||�}||tj|j��y)z�Copy mode bits from src to dst.

    If follow_symlinks is not set, symlinks aren't followed if and only
    if both `src` and `dst` are symlinks.  If `lchmod` isn't available
    (e.g. Linux) this method does nothing.

    zshutil.copymoder�lchmodNT��strict)rJr�r}rGrmr|r8�lstat�chmodrlr��realpathryrn�S_IMODEr�)rrrsr�	stat_func�
chmod_funcr�s      r(rr&s����I�I���c�*��w�s�|������s�0C�
�7�7�d�?�$&�H�H�b�h�h�z�I�
�R��
"�$&�H�H�b�i�i�z�I��
�7�7�d�?�r�w�w�~�~�c�2��'�'�"�"�3�t�"�4�C� %�r�x�x�:�	�	�3��B��s�D�L�L����,�-r'�	listxattrc�*�	tj||��}|D]4}	tj|||��}tj||||���6y#t$rF}|jtjtj
tjfvr�Yd}~yd}~wwxYw#t$rd}|jtjtjtj
tjtjfvr�Yd}~��d}~wwxYw)z�Copy extended filesystem attributes from `src` to `dst`.

        Overwrite existing attributes.

        If `follow_symlinks` is false, symlinks won't be followed.

        r~N)rGr�r7r;r=�ENODATAr<�getxattr�setxattr�EPERM�EACCES)rrrsr�namesr�r8�values       r(�
_copyxattrr�@s���	��L�L��o�F�E�
�	�D�
����C���O�����C��u�o�N�	��	�	��w�w�u�}�}�e�m�m�U�\�\�J�J����	���
��7�7�5�;�;��
�
�u�}�}�#(�<�<����#?�?��?��
�s/�A�1B%�	B"�<B�B"�%	D�.AD
�
Dc��yrvr&��args�kwargss  r(r�r�X���r'c���
�tjd||�ddd�d��
|xs-t|�xrtjj|�}|r�
fd�}n�
fd�}t
|tj�r|j|��}n|d�||��}tj|j�}|d	�||j|jf|��t|||��|d
�}tjdk(rF|rAtjj|�r%tjj|d�
�}nd�}	||||��t#|d�r	|d�||j$|��yy#t $rY�5wxYw#t&$rB}dD]2}	t#t(|	�s�|j(t+t(|	�k(s�2n�Yd}~yd}~wwxYw)a�Copy file metadata

    Copy the permission bits, last access time, last modification time, and
    flags from `src` to `dst`. On Linux, copystat() also copies the "extended
    attributes" where possible. The file contents, owner, and group are
    unaffected. `src` and `dst` are path-like objects or path names given as
    strings.

    If the optional flag `follow_symlinks` is not set, symlinks aren't
    followed if and only if both `src` and `dst` are symlinks.
    zshutil.copystatN)�nsrc��yrvr&)r�rr�s   r(�_nopzcopystat.<locals>._nopir�r'c�&��tt|��Srv)�getattrrG)r8r�s �r(�lookupzcopystat.<locals>.lookupps����2�t�T�*�*r'c�R��tt|��}|tjvr|S�Srv)r�rG�supports_follow_symlinks)r8rxr�s  �r(r�zcopystat.<locals>.lookupus)�����T�4�(�B��R�0�0�0��	��Kr'r~rn�utimer�rTr�c�(�tj|�yrv)rGr�r�s  r(�_chmodzcopystat.<locals>._chmod�s
�����$�r'�st_flags�chflags)�
EOPNOTSUPPr=)rJr�r}rGrmr|rjrkrnr�r��st_atime_ns�st_mtime_nsr�r8r��NotImplementedErrorrlr�r7r;r�)rrrsr�followr�r��moder��whyrCr�s          @r(rr[s�����I�I���c�*��T�
��
J�W�S�\�%I�b�g�g�n�n�S�6I� J�F�
�	+�
	��#�r�{�{�#�
�X�X�f�X�
-��
�V�F�^�C��
8���<�<��
�
�#�D��F�7�O�C�R�^�^�R�^�^�<�� ��s�C��0�
�G�_�F�	�w�w�$����w�w�~�~�c�"��g�g�&�&�s�4�&�8��
 �

��s�D�&�1��r�:��	��F�9��c�2�;�;��G����
�	
�
���	�.�
���5�#�&�3�9�9���s�8K�+K��
����	�s6�F�)F�	F�F�	G �G�4G�G�G c��tjj|�r=tjj|tjj	|��}t|||��t
|||��|S)a3Copy data and mode bits ("cp src dst"). Return the file's destination.

    The destination may be a directory.

    If follow_symlinks is false, symlinks won't be followed. This
    resembles GNU's "cp -P src dst".

    If source and destination are the same file, a SameFileError will be
    raised.

    r~)rGrm�isdir�join�basenamer
r)rrrsrs   r(r
r
�sT��
�w�w�}�}�S���g�g�l�l�3���� 0� 0�� 5�6���S�#��7��S�#��7��Jr'c��tjj|�r=tjj|tjj	|��}ttd�ritj|�}tj|�}tj}|s|tjz}	t
j|||�|St|||��t!|||��|S#t$rI}|jtjk(r|sn|jtjk(rn�Yd}~�kd}~wwxYw)a0Copy data and metadata. Return the file's destination.

    Metadata is copied with copystat(). Please see the copystat function
    for more information.

    The destination may be a directory.

    If follow_symlinks is false, symlinks won't be followed. This
    resembles GNU's "cp -P src dst".
    �	CopyFile2Nr~)rGrmr�r�r�rl�_winapi�fsdecode�%COPY_FILE_ALLOW_DECRYPTED_DESTINATION�COPY_FILE_COPY_SYMLINKr�r7�winerror�ERROR_PRIVILEGE_NOT_HELD�ERROR_ACCESS_DENIEDr
r)rrrsr�src_�dst_r@�excs       r(rr�s���
�w�w�}�}�S���g�g�l�l�3���� 0� 0�� 5�6���w��$��{�{�3����{�{�3����=�=����W�3�3�3�E�	����d�D�%�0��J�
�S�#��7��S�#��7��J���	����� @� @�@�'������!<�!<�<�����	�s�=C4�4	E�=?E�Ec����fd�}|S)z�Function that can be used as copytree() ignore parameter.

    Patterns is a sequence of glob-style patterns
    that are used to exclude filesc�v��g}�D]'}|jtj||���)t|�Srv)�extend�fnmatch�filter�set)rmr��
ignored_names�pattern�patternss    �r(�_ignore_patternsz)ignore_patterns.<locals>._ignore_patterns�s=����
��	A�G�� � �����w�!?�@�	A��=�!�!r'r&)r�r�s` r(rr�s���
"�
�r'c
�X�|�5|tj|�|D�cgc]}|j��c}�}	nd}	tj||��g}
|tuxs|t
u}|D�]|}|j|	vr�tjj||j�}
tjj||j�}|r|n|
}	|j�}|rDtjdk(r1|jd��}|jtjk(rd}|r�tj|
�}|r&tj||�t|||��nztjj|�s|r��&|j!�rt#|||||||�n5|||�n+|j!�rt#|||||||�n	|||���	t||�|
rt%|
��|Scc}w#t$$r)}|
j'|j(d�Yd}~���d}~wt*$r(}|
j-|
|t/|�f�Yd}~���d}~wwxYw#t*$r4}t1|dd��|
j-||t/|�f�Yd}~��d}~wwxYw)Nr&)�exist_okrFr~rr�)rG�fspathr8�makedirsrr
rmr�r{rn�st_reparse_tag�IO_REPARSE_TAG_MOUNT_POINTr�r�rr��is_dirrrr�r�r7�append�strr�)�entriesrrrs�symlinks�ignore�
copy_function�ignore_dangling_symlinks�
dirs_exist_ok�xr��errors�use_srcentry�srcentry�srcname�dstname�srcobjr{r��linktorCr�s                     r(�	_copytreer��sR��
���r�y�y��~��/H�1����/H�I�
��
��K�K��m�,�
�F� �E�)�B�]�d�-B�L��,8���=�=�M�)���'�'�,�,�s�H�M�M�2���'�'�,�,�s�H�M�M�2��)��w��&	8�!�,�,�.�J��b�g�g��o�!�
�
�e�
�<���'�'�4�+J�+J�J�!&�J�����W�-����J�J�v�w�/��V�W�(�l�K��7�7�>�>�&�1�6N� ����(� ���(�F�!.�0H�!.�0�&�f�g�6����"����(�F�M�1�=�B��f�g�.��M,8�Z0���c��
��F�m���J��{0I��b�	'��M�M�#�(�(�1�+�&�&���	8��M�M�7�G�S��X�6�7�7��	8���0��3�
�D�)�1��M�M�3��S��X�.�/���0�sI�H
�B6H�
AH�(I,�	I)�H5�5I)�I$�$I)�,	J)�5*J$�$J)c
��tjd||�tj|�5}t	|�}ddd�t|||||||��S#1swY�xYw)a'Recursively copy a directory tree and return the destination directory.

    If exception(s) occur, an Error is raised with a list of reasons.

    If the optional symlinks flag is true, symbolic links in the
    source tree result in symbolic links in the destination tree; if
    it is false, the contents of the files pointed to by symbolic
    links are copied. If the file pointed by the symlink doesn't
    exist, an exception will be added in the list of errors raised in
    an Error exception at the end of the copy process.

    You can set the optional ignore_dangling_symlinks flag to true if you
    want to silence this exception. Notice that this has no effect on
    platforms that don't support os.symlink.

    The optional ignore argument is a callable. If given, it
    is called with the `src` parameter, which is the directory
    being visited by copytree(), and `names` which is the list of
    `src` contents, as returned by os.listdir():

        callable(src, names) -> ignored_names

    Since copytree() is called recursively, the callable will be
    called once for each directory that is copied. It returns a
    list of names relative to the `src` directory that should
    not be copied.

    The optional copy_function argument is a callable that will be used
    to copy each file. It will be called with the source path and the
    destination path as arguments. By default, copy2() is used, but any
    function that supports the same signature (like copy()) can be used.

    If dirs_exist_ok is false (the default) and `dst` already exists, a
    `FileExistsError` is raised. If `dirs_exist_ok` is true, the copying
    operation will continue if it encounters existing directories, and files
    within the `dst` tree will be overwritten by corresponding files from the
    `src` tree.
    zshutil.copytreeN)r�rrrsr�r�r�r�r�)rJr�rG�scandir�listr�)	rrrsr�r�r�r�r��itrr�s	         r(rr-sa��P�I�I���c�*�	���C���C��s�)����W�#�3��"�-�.F�#0�2�2���s�A�A�st_file_attributesc��	tj|�}tj|j�xs<|j
tjzxr|jtjk(S#t$rYywxYw)NF)
rGr�rn�S_ISLNKr�r��FILE_ATTRIBUTE_REPARSE_POINTr�r�r7)rmr�s  r(�_rmtree_islinkr�^sr��	����$��B��L�L����,�K��&�&��)J�)J�J�J��&�&�$�*I�*I�I�
L���	��	�s�A1A4�4	B�?Bc�@�tjj|�Srv)rGrmr|)rms r(r�r�gs���w�w�~�~�d�#�#r'c�:�	tj|�5}t|�}ddd�D]s}|j}	|jd��}|r:|j
�s*	|j�rtd��	t||��^	tj|��u	tj|�y#1swY��xYw#t$r$}|tj||�g}Yd}~��d}~wwxYw#t$rd}Y��wxYw#t$r-}|tjj||�Yd}~��d}~wwxYw#t$r#}|tj||�Yd}~��:d}~wwxYw#t$r"}|tj||�Yd}~yd}~wwxYw)NFr~�%Cannot call rmtree on a symbolic link)rGr�r�r7rmr��is_junctionr{r|�_rmtree_unsafe�unlink�rmdir)rm�onexc�
scandir_itr�rC�entry�fullnamer�s        r(rrksm���
�Z�Z��
�	'���:�&�G�	'�
�0���:�:��	��\�\�%�\�8�F��%�+�+�-�
��#�#�%�"�"I�J�J�	&�
�8�U�+�
0��	�	�(�#�)0�.#�
�����;	'�	'����
�b�j�j�$��$�������	��F�	���
��b�g�g�n�n�h��4���
���
0��b�i�i��3�/�/��
0���#�
�b�h�h��c�"�"��#�s��C�B:�C�C6�"D�E�$E/�:C�?C�	C3�C.�.C3�6D�D�	D=�"D8�8D=�	E,�	E'�'E,�/	F�8F�Fc	�N�	tj|�5}t|�}ddd�D�]�}tj
j
||j�}	|jd��}|r2	|jd��}	tj|	j�}|r�	tj|jtjtjz|��}
d}	tj
j!	tj"|
��rHt%|
||�	tj&|
�d}	tj(|j|��n	td��|r��G	tj&|
���_	tj,|j|�����y#1swY���xYw#t$r)}||_|tj||�Yd}~yd}~wwxYw#t$r#}|tj||�Yd}~���d}~wwxYw#t$rd}Y���wxYw#t$r%}d}|tj&||�Yd}~��d}~wwxYw#t$r#}|tj(||�Yd}~��d}~wwxYw#t$r-}|tj
j*||�Yd}~��Vd}~wwxYw#t$r#}|tj&||�Yd}~���d}~wwxYw#|sE	tj&|
�w#t$r"}|tj&||�Yd}~wd}~wwxYwwxYw#t$r#}|tj||�Yd}~��Cd}~wwxYw#t$r#}|tj,||�Yd}~��rd}~wwxYw)NFr~��dir_fdTr)rGr�r�r7r9rmr�r8r�rn�S_ISDIRr�r�r��O_RDONLY�
O_NONBLOCKrhrH�_rmtree_safe_fd�closerr|r)�topfdrmrrr�rCrrr��orig_st�dirfd�dirfd_closeds            r(rr�s����
�Z�Z��
�	'�*��:�&�G�	'��60���7�7�<�<��e�j�j�1��	��\�\�%�\�8�F���#�j�j��j�?�G�!�\�\�'�/�/�:�F��"
;�����
�
�B�K�K�"�-�-�,G�PU�V��$��;��w�w�'�'�����%��A�'��x��?�;��H�H�U�O�
(,��;��H�H�U�Z�Z��>�A�#*�+1�#2�2�
(�;��H�H�U�O�
0��	�	�%�*�*�U�3�i60�
	'�	'�������
�b�j�j�$��$��������"�(�(�H�c�2������	��F�	��, '�;�+/�L�!�"�(�(�H�c�:�:��;�� '�;�!�"�(�(�H�c�:�:��;�� '�A�!�"�'�'�.�.�(�C�@�@��A�� '�;�!�"�(�(�H�c�:�:��;��(�;��H�H�U�O��&�;�!�"�(�(�H�c�:�:��;��(��7�
.��b�g�g�x��-�-��
.��F�
0��b�i�i��3�/�/��
0�sO�F?�F2�F?�H#�11G4�%AM	�)AK=�*H5�?K=�!I&�#K=�%J�5K�
!M8�2F<�7F?�?	G1�G,�,G1�4	H �=H�H �#H2�1H2�5	I#�>I�K=�I#�#K=�&	J�/J
�K=�
J�K=�	K�"K�K=�K�K=�	K:�K5�5K:�=M�L�M�	M	� L=	�8M�=M	�M�		M5�M0�0M5�8	N$�N�N$)rrc�@��tjd||�|rd�}n��|�d�}n
|���d�}n�fd�}t�rt|t�rtj|�}	tj||��}	tj|t
jt
jz|��}d}	t
jj|tj|��r>t|||�	tj |�d	}	tj$||��n	t#d
��|s	tj |�yy|�t)d��	t+|�rt#d
��	t-||�S#t$r"}|t
j||�Yd}~yd}~wwxYw#t$r"}|t
j||�Yd}~yd}~wwxYw#t"$r$}d	}|t
j ||�Yd}~��d}~wwxYw#t"$r"}|t
j$||�Yd}~��d}~wwxYw#t"$r-}|t
jj&||�Yd}~��6d}~wwxYw#t"$r"}|t
j ||�Yd}~yd}~wwxYw#|sE	tj |�w#t"$r"}|t
j ||�Yd}~wd}~wwxYwwxYw#t"$r,}|t
jj&||�Yd}~yd}~wwxYw)a�Recursively delete a directory tree.

    If dir_fd is not None, it should be a file descriptor open to a directory;
    path will then be relative to that directory.
    dir_fd may not be implemented on your platform.
    If it is unavailable, using it will raise a NotImplementedError.

    If ignore_errors is set, errors are ignored; otherwise, if onexc or
    onerror is set, it is called to handle the error with arguments (func,
    path, exc_info) where func is platform and implementation dependent;
    path is the argument to that function that caused it to fail; and
    the value of exc_info describes the exception. For onexc it is the
    exception instance, and for onerror it is a tuple as returned by
    sys.exc_info().  If ignore_errors is false and both onexc and
    onerror are None, the exception is reraised.

    onerror is deprecated and only remains for backwards compatibility.
    If both onerror and onexc are set, onerror is ignored and onexc is used.
    z
shutil.rmtreec��yrvr&�r�s r(rzrmtree.<locals>.onexc�s��r'Nc���rvr&rs r(rzrmtree.<locals>.onexc�s��r'c���rvr&rs r(rzrmtree.<locals>.onexc�s��r'c�^��|\}}}|�d}nt|�||jf}�|||�S)N)NNN)�type�
__traceback__)r��funcrmr��exc_info�onerrors     �r(rzrmtree.<locals>.onexc�s=���"&���d�C��;�/�H�#�C�y�#�s�/@�/@�@�H��t�T�8�4�4r'r
FTrz#dir_fd unavailable on this platform)rJr��_use_fd_functionsrj�bytesrGr�r�r6r�r
rrmrhrHrrr7rr|r�r�r)	rm�
ignore_errorsrrrrrC�fd�	fd_closeds	  `      r(rr�s����*�I�I�o�t�V�,��	�	��U�]�	�	���?�
�
5���d�E�"��;�;�t�$�D�	��h�h�t�F�3�G�	�����r�{�{�R�]�]�:�6�J�B��I�	/��w�w�������"��6���D�%�0�/��H�H�R�L�
!�	�/��H�H�T�&�1�5�!�"I�J�J��/��H�H�R�L����%�&K�L�L�	��d�#��E�F�F�$��d�E�*�*��]�	��"�(�(�D�#�&���	���	��"�'�'�4��%���	���/� $�I��"�(�(�D�#�.�.��/���/��"�(�(�D�#�.�.��/���5��"�'�'�.�.�$��4�4��5���/��"�(�(�D�#�.�.��/���/��H�H�R�L���/��"�(�(�D�#�.�.��/�����	��"�'�'�.�.�$��,���	�s�!E;�99F)�3AJ�4G�	J�H�#J�%H5�3I.�K(�;	F&�F!�!F&�)	G�2G�G�	H� G?�:J�?H�J�	H2�H-�(J�-H2�2J�5	I+�>"I&� J�&I+�+J�.	J�7J�J�K%� J6�5K%�6	K!�?K�K%�K!�!K%�(	L�1"L�Lc��tj|�}tjjtjjxsdz}tjj|j
|��S)aHA basename() variant which first strips the trailing slash, if present.
    Thus we always get the last component of the path, even for directories.

    path: Union[PathLike, str]

    e.g.
    >>> os.path.basename('/bar/foo')
    'foo'
    >>> os.path.basename('/bar/foo/')
    ''
    >>> _basename('/bar/foo/')
    'foo'
    �)rGr�rm�sep�altsepr��rstrip)rmr's  r(�	_basenamer*:sN���9�9�T�?�D�
�'�'�+�+������-�2�
.�C�
�7�7���D�K�K��,�-�-r'c�|�tjd||�|}tjj	|�r�t||�r6tjj
|�stj||�ytjj|t|��}tjj|�rtd|z��	tj||�|S#t$�rGtjj
|�rCtj|�}tj||�tj|�Y|Stjj	|�r�t!||�rtd|�d|�d���t#|�sLtj$|tj&�s:tj(|�r%tj*dk(rt-d|�d	|�d���t/|||d
��t1|�Y|S|||�tj|�Y|SwxYw)a.Recursively move a file or directory to another location. This is
    similar to the Unix "mv" command. Return the file or directory's
    destination.

    If dst is an existing directory or a symlink to a directory, then src is
    moved inside that directory. The destination path in that directory must
    not already exist.

    If dst already exists but is not a directory, it may be overwritten
    depending on os.rename() semantics.

    If the destination is on our current filesystem, then rename() is used.
    Otherwise, src is copied to the destination and then removed. Symlinks are
    recreated under the new name if os.rename() fails because of cross
    filesystem renames.

    The optional `copy_function` argument is a callable that will be used
    to copy the source or it will be delegated to `copytree`.
    By default, copy2() is used, but any function that supports the same
    signature (like copy()) can be used.

    A lot more could be done here...  A look at a mv.c shows a lot of
    the issues this implementation glosses over.

    zshutil.moveNz$Destination path '%s' already existszCannot move a directory 'z' into itself 'z'.�darwinz%Cannot move the non-empty directory 'z ': Lacking write permission to 'T)r�r�)rJr�rGrmr�rtr|�renamer�r*r�rr7r�r�r�
_destinsrc�
_is_immutable�access�W_OK�listdir�platform�PermissionErrorrr)rrrsr��real_dstr�s     r(rrLs���4�I�I�m�S�#�&��H�	�w�w�}�}�S���S�#��r�w�w�~�~�c�':�
�I�I�c�3����7�7�<�<��Y�s�^�4��
�7�7�>�>�(�#��>��I�J�J��
�	�	�#�x� �,�O��+��
�7�7�>�>�#���[�[��%�F��J�J�v�x�(��I�I�c�N�"�O�!�W�W�]�]�3�
��#�s�#��(+�S�2�3�3��c�"��I�I�c�2�7�7�3��
�
�3���L�L�H�4�%�),�c�'3�4�4�
�S�(�-�"�
$��3�K��O�
�#�x�(��I�I�c�N��O�+�s �C*�*A)H;�CH;�H;�:H;c��tjj|�}tjj|�}|jtjj�s|tjjz
}|jtjj�s|tjjz
}|j|�Srv)rGrmrp�endswithr'�
startswithrqs  r(r.r.�s���
�'�'�/�/�#�
�C�
�'�'�/�/�#�
�C��<�<������$��r�w�w�{�{����<�<������$��r�w�w�{�{����>�>�#��r'c��t|�}tjtjg}t	|d�xr|j
|vS)Nr�)ryrn�UF_IMMUTABLE�SF_IMMUTABLErlr�)rrr��immutable_statess   r(r/r/�s>��	�s��B��)�)�4�+<�+<�=���2�z�"�F�r�{�{�6F�'F�Fr'c�x�|�y	ddlm}	||�}|�|dSy#t$rYywxYw#t$rd}Y�$wxYw)z"Returns a gid, given a group name.Nr)�getgrnam�)�grpr>�ImportError�KeyError)r8r>�results   r(�_get_gidrD��^���|��� ���$������a�y���������
��������+�	(�(�9�9c�x�|�y	ddlm}	||�}|�|dSy#t$rYywxYw#t$rd}Y�$wxYw)z"Returns an uid, given a user name.Nr)�getpwnamr?)�pwdrHrArB)r8rHrCs   r(�_get_uidrJ�rErFc	�.�����|�d}	nDtr|dk(rd}	n6tr|dk(rd}	n(tr|dk(rd}	ntdj	|���d	dl}
|rd
|	znd}|dz|z}tjj|�}
|
rJtjj|
�s+|�|jd|
�|st
j|
�|�|jd
�t���t�������fd�}|s^|
j|d|	z�}|}|� tjj||�}	|j!|||��|j#�|�tjj%|�}|S#|j#�wxYw)a�Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", or None.

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_name' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", or ".xz").

    Returns the output filename.
    Nr&�gzip�gz�bzip2�bz2�xzzCbad value for 'compress', or compression format not supported : {0}r�.�.tar�creating %szCreating tar archivec�H�����|_�|_���|_�|_|Srv)�gid�gname�uid�uname)�tarinforU�group�ownerrWs ����r(�_set_uid_gidz#_make_tarball.<locals>._set_uid_gid�s.����?��G�K�!�G�M��?��G�K�!�G�M��r'zw|%s�r�)�_ZLIB_SUPPORTED�_BZ2_SUPPORTED�_LZMA_SUPPORTED�
ValueErrorr��tarfilerGrm�dirnamer��infor�rJrDr�r��addrrp)�	base_name�base_dir�compress�verbose�dry_runr[rZ�logger�root_dir�tar_compressionrb�compress_ext�archive_name�archive_dirr\�tar�arcnamerUrWs     ``          @@r(�
_make_tarballrs�sr��� ����	�X��/���	�H��/���	�X��-����+�+1�6�(�+;�=�	=��,4�3��(�"�L��v�%��4�L��'�'�/�/�,�/�K��2�7�7�>�>�+�6����K�K�
�{�3���K�K��$������*�+�
�5�/�C�
�5�/�C����l�l�<��/�)A�B�������w�w�|�|�H�h�7�H�	��G�G�H�g�l�G�;��I�I�K����w�w���|�4�����	
�I�I�K�s�;F�Fc��ddl}|dz}	tjj|�}
|
rJtjj	|
�s+|�|jd|
�|stj|
�|�|jd|	|�|�sH|j|	d|j��5}tjj|�}|� tjj||�}tjj|�}|tjk7r&|j||�|�|jd|�tj|�D�]n\}
}}|
}|� tjj||�}tjj|�}t|�D]i}tjj|
|�}tjj||�}|j||�|��X|jd|��k|D]�}tjj|
|�}tjj|�}tjj!|�s�btjj||�}|j||�|���|jd|�����q	ddd�|�tjj#|	�}	|	S#1swY�,xYw)	z�Create a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Returns the
    name of the output zip file.
    rN�.ziprSz#creating '%s' and adding '%s' to it�w)�compressionzadding '%s')�zipfilerGrmrcr�rdr��ZipFile�ZIP_DEFLATED�normpathr��curdirrX�walk�relpath�sorted�isfilerp)rfrgrirjrkr[rZrlrx�zip_filenamerp�zfrr�dirpath�dirnames�	filenames�
arcdirpathr8rms                   r(�
_make_zipfiler�sm����v�%�L��'�'�/�/�)�,�K��2�7�7�>�>�+�6����K�K�
�{�3���K�K��$�
�����9� �(�	,��
�_�_�\�3�)0�)=�)=��?�	=�BD��g�g�&�&�x�0�G��#��7�7�<�<��(�;���w�w�'�'��1�H��"�)�)�#�����7�+��%��K�K�
�x�8�02����0A�
=�,���9�$�
��'�!#������X�!F�J��W�W�-�-�j�9�
�"�8�,�9�D��7�7�<�<���6�D� �g�g�l�l�:�t�<�G��H�H�T�7�+��)����M�4�8�9�&�=�D��7�7�<�<���6�D��7�7�+�+�D�1�D��w�w�~�~�d�+�"$�'�'�,�,�z�4�"@������w�/�!�-�"�K�K�
�t�<�=�
=�	=�<���w�w���|�4����A	=�	=�s �+EK8�A7K8�4K8�5K8�8Lrq)rhNzuncompressed tar file)rhrLzgzip'ed tar-file�gztarzZIP file�zip)rhrNzbzip2'ed tar-file�bztar)rhrPzxz'ed tar-file�xztarc��tj�D��cgc]\}}||df��}}}|j�|Scc}}w)z�Returns a list of supported formats for archiving and unarchiving.

    Each element of the returned sequence is a tuple (name, description)
    r?)�_ARCHIVE_FORMATS�items�sort)r8�registry�formatss   r(rrXsF�� �%�%�'�)�~�t�X��h�q�k�"�)�G�)��L�L�N��N��)s�>c��|�g}t|�std|z��t|ttf�std��|D]1}t|ttf�rt|�dk7s�(td��|||ft|<y)auRegisters an archive format.

    name is the name of the format. function is the callable that will be
    used to create archives. If provided, extra_args is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_archive_formats() function.
    NzThe %s object is not callablez!extra_args needs to be a sequencer?z+extra_args elements are : (arg_name, value))�callable�	TypeErrorrj�tupler��lenr�)r8�function�
extra_args�description�elements     r(rrbs������
��H���7�(�B�C�C��j�5�$�-�0��;�<�<��K���'�E�4�=�1�S��\�A�5E��I�J�J�K�'�
�K�@��T�r'c��t|=yrv)r��r8s r(rrws
����r'c	�h�tjd||||�	t|}	||||d�}
|	d}|	dD]
\}}
|
|
|<�|�t
j}t|dd�}d}|��tj|�j}tj|�sttjd	|��|rtj|�}||
d
<n^tj�}|�|j!d|�t
j"j%|�}|stj&|�	|||fi|
��}|�)|�|j!d|�tj&|�|S#t$rt	d|z�d�wxYw#|�*|�|j!d|�tj&|�wwxYw)
aCreate an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", or "xztar".  Or any other registered format.

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    zshutil.make_archivezunknown archive format '%s'N)rjrkr[rZr��supports_root_dirFzNot a directoryrlzchanging into '%s'zchanging back to '%s')rJr�r�rBrarGr|r�rnr�r�NotADirectoryErrorr;�ENOTDIRr��getcwd�debugrmrp�chdir)rfr�rlrgrirjr[rZrk�format_infor�r�arg�valr��save_cwd�stmdr9s                  r(rrzs���$�I�I�#�Y���(�K�K�&�v�.��!�F��u�.�F��q�>�D���N����S���s������9�9����&9�5�A���H����w�w�x� �(�(���|�|�D�!�$�U�]�]�4E�x�P�P���	�	�)�,�I�!)�F�:���y�y�{�H��!����1�8�<������	�2�I������"���	�8�6�v�6�����!����4�h�?��H�H�X���O��Q�K��6��?�@�d�J�K��F���!����4�h�?��H�H�X�� �s�	E'�0
F�'F�.F1c��tj�D��cgc]\}}||d|df��}}}|j�|Scc}}w)z�Returns a list of supported formats for unpacking.

    Each element of the returned sequence is a tuple
    (name, extensions, description)
    r�)�_UNPACK_FORMATSr�r�)r8rdr�s   r(rr�sL���$�$�&�(�J�D�$��d�1�g�t�A�w�'�(�G�(��L�L�N��N��(s�Ac���i}tj�D]\}}|dD]}|||<�	�|D]}||vs�d}t||||fz��t|�st	d��y)z+Checks what gets registered as an unpacker.rz!%s is already registered for "%s"z*The registered function must be a callableN)r�r�r1r�r�)	�
extensionsr�r��existing_extensionsr8rd�ext�	extension�msgs	         r(�_check_unpack_optionsr��s�����%�+�+�-�,�
��d���7�	,�C�'+���$�	,�,� �H�	��+�+�5�C���y�':�9�'E�'G�!G�H�
H�H��H���D�E�E�r'c�@�|�g}t|||�||||ft|<y)aMRegisters an unpack format.

    `name` is the name of the format. `extensions` is a list of extensions
    corresponding to the format.

    `function` is the callable that will be
    used to unpack archives. The callable will receive archives to unpack.
    If it's unable to handle an archive, it needs to raise a ReadError
    exception.

    If provided, `extra_args` is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_unpack_formats() function.
    N)r�r�)r8r�r�r�r�s     r(rr�s.��"���
��*�h�
�;�&��*�k�I�O�D�r'c��t|=y)z*Removes the pack format from the registry.N)r�r�s r(rr�s
����r'c��tjj|�}tjj|�stj|�yy)z1Ensure that the parent directory of `path` existsN)rGrmrcr�r�)rmrcs  r(�_ensure_directoryr��s5���g�g�o�o�d�#�G�
�7�7�=�=��!�
���G��"r'c�n�ddl}|j|�std|z��|j|�}	|j	�D]�}|j
}|j
d�sd|vr�%tjj|g|jd����}|s�Wt|�|jd�r�t|j|d�5}t|d�5}t||�ddd�ddd���	|j�y#1swY�%xYw#1swY��xYw#|j�wxYw)z+Unpack zip `filename` to `extract_dir`
    rNz%s is not a zip file�/z..�rr�)rx�
is_zipfiler/ry�infolistr9r8rGrmr��splitr�r7r�r	r)	r9�extract_dirrxr�rdr8�
targetpath�source�targets	         r(�_unpack_zipfiler��s������h�'��.��9�:�:�
�/�/�(�
#�C���L�L�N�	0�D��=�=�D����s�#�t�t�|�������k�D�D�J�J�s�O�D�J����j�)��=�=��%��X�X�d�C�(�0�F��Z��.�0�28����/�0�0�0�	0�$	�	�	��	0�0��0�0��	�	�	��sB�BD"�:D"�
D�
D
�&D�.
D"�
D�D�D	�D"�"D4r]c���ddl}	|j|�}	|j	||��|j�y#|j$rtd|z��wxYw#|j�wxYw)zAUnpack tar/tar.gz/tar.bz2/tar.xz `filename` to `extract_dir`
    rNz/%s is not a compressed or uncompressed tar filer])rbr��TarErrorr/�
extractallr)r9r�r�rb�tarobjs     r(�_unpack_tarfiler�sx���J����h�'������+�f��5������
���J��=��H�J�	J�J��	����s�<�A�A�A/rRru)rqr�z.tar.gzz.tgzz.tar.bz2z.tbz2z.tar.xzz.txzc�~�tj�D]&\}}|dD]}|j|�s�|ccS�(y)Nr)r�r�r7)r9r8rdr�s    r(�_find_unpack_formatr�9sI��%�+�+�-��
��d��a��	�I�� � ��+���	��r'c��tjd|||�|�tj�}tj|�}tj|�}|�i}nd|i}|�(	t
|}|d}|||fit|d��|��yt|�}|�tdj|���t
|d}tt
|d�|z}|||fi|��y#t$rtdj|��d�wxYw)a]Unpack an archive.

    `filename` is the name of the archive.

    `extract_dir` is the name of the target directory, where the archive
    is unpacked. If not provided, the current working directory is used.

    `format` is the archive format: one of "zip", "tar", "gztar", "bztar",
    or "xztar".  Or any other registered format.  If not provided,
    unpack_archive will use the filename extension and see if an unpacker
    was registered for that extension.

    In case none is found, a ValueError is raised.

    If `filter` is given, it is passed to the underlying
    extraction function.
    zshutil.unpack_archiveNr�zUnknown unpack format '{0}'r�r?zUnknown archive format '{0}')rJr�rGr�r�r�rBrar��dictr�r/)r9r�r�r��
filter_kwargsr�rr�s        r(rr@s"��$�I�I�%�x��f�E����i�i�k���)�)�K�(�K��y�y��"�H�
�~��
�!�6�*�
�
��	U�)�&�1�K��1�~���X�{�L�d�;�q�>�&:�L�m�L�%�X�.���>��:�A�A�(�K�L�L��v�&�q�)���o�f�-�a�0�1�M�A���X�{�-�f�-���	U��:�A�A�&�I�J�PT�T�	U�s�%	C"�"%D�statvfs�
disk_usage�usageztotal used freezTotal space in byteszUsed space in byteszFree space in bytesc��tj|�}|j|jz}|j|jz}|j|j
z
|jz}t
|||�S)z�Return disk usage statistics about the given path.

        Returned value is a named tuple with attributes 'total', 'used' and
        'free', which are the amount of total, used and free space, in bytes.
        )rGr��f_bavail�f_frsize�f_blocks�f_bfree�_ntuple_diskusage)rmr��free�total�useds     r(r�r�ys`���Z�Z��
���{�{�R�[�[�(�����b�k�k�)�����b�j�j�(�B�K�K�7�� ���d�3�3r'c�V�tj|�\}}||z
}t|||�S)z�Return disk usage statistics about the given path.

        Returned values is a named tuple with attributes 'total', 'used' and
        'free', which are the amount of total, used and free space, in bytes.
        )r�
_getdiskusager�)rmr�r�r�s    r(r�r��s0���&�&�t�,���t��t�|�� ���d�3�3r'c�x�tjd|||�|�
|�td��|}|}|�d}n7t|t�r't|�}|�t
dj|���|�d}n7t|t�s't|�}|�t
dj|���tj|||�y)z�Change owner user and group of the given path.

    user and group can be the uid/gid or the user/group names, and in that case,
    they are converted to their respective uid/gid.
    zshutil.chownNzuser and/or group must be set���zno such user: {!r}zno such group: {!r})rJr�rarjr�rJ�LookupErrorr��intrDrGr)rm�userrZ�_user�_groups     r(rr�s����I�I�n�d�D�%�0��|��
��8�9�9��E�
�F��|���	�D�#�	������=��2�9�9�$�?�@�@��}���
��s�
#��%����>��3�:�:�5�A�B�B��H�H�T�5�&�!r'c�6�	ttjd�}	ttjd�}|dks|dkrb	tj
tjj��}|dkr|jxs|d}|dkr|jxs|d}tj||f�S#ttf$rd}Y��wxYw#ttf$rd}Y��wxYw#tttf$rtj|�}Y��wxYw)aGet the size of the terminal window.

    For each of the two dimensions, the environment variable, COLUMNS
    and LINES respectively, is checked. If the variable is defined and
    the value is a positive integer, it is used.

    When COLUMNS or LINES is not defined, which is the common case,
    the terminal connected to sys.__stdout__ is queried
    by invoking os.get_terminal_size.

    If the terminal size cannot be successfully queried, either because
    the system doesn't support querying, or because we are not
    connected to a terminal, the value given in fallback parameter
    is used. Fallback defaults to (80, 24) which is the default
    size used by many terminal emulators.

    The value returned is a named tuple of type os.terminal_size.
    �COLUMNSr�LINESr�)r�rG�environrBrar rJ�
__stdout__r5�AttributeErrorr7�
terminal_size�columns�lines)�fallbackr�r��sizes    r(r r �s��(��b�j�j��+�,����B�J�J�w�'�(��
�!�|�u��z�	.��'�'����(=�(=�(?�@�D�
�a�<��l�l�1�h�q�k�G��A�:��J�J�-�(�1�+�E�
���W�e�,�-�-��+
�j�!������

�j�!�������
�G�4�	.��#�#�H�-�D�	.�s4�B>�C�1C,�>C�C�C)�(C)�,)D�Dc��tjj|�xr8tj||�xr tjj	|�Srv)rGrmr�r0r�)rxr�s  r(�
_access_checkr��sA���G�G�N�N�2��
&�2�9�9�R��#6�
&��G�G�M�M�"�%�%�'r'c�~�|tjzxs(tjtj|��S)z�
    On Windows, we can use NeedCurrentDirectoryForExePath to figure out
    if we should add the cwd to PATH when searching for executables if
    the mode is executable.
    )rG�X_OKr��NeedCurrentDirectoryForExePathr�)�cmdr�s  r(�_win_path_needs_curdirr��s5������� �"�W�%K�%K����C� �&"�"r'c�8��t|t�}tjj	|�\}}|r|g}�n|�8tj
j
dd�}|�	tjd�}|sy|rHtj|�}|j	tjtj��}n4tj|�}|j	tj�}tjdk(rEt!||�r9tj"}|rtj|�}|j%d|�tjdk(�rtj&d�xst(}|j	tj�D�cgc]}|s�|��	}}|r"|D�cgc]}tj|���}}|g|D�cgc]}||z��	c}z}	tjj+|	d�dj-��|tj.zr8t1�fd�|D��s$|	j3|	j5d��n|g}	t7�}
|D]p}tjj9|�}||
vs�'|
j;|�|	D]4}
tjj=||
�}t?||�s�0|ccS�ry#ttf$rtj}Y���wxYwcc}wcc}wcc}w)	a3Given a command, mode, and a PATH string, return the path which
    conforms to the given mode on the PATH, or None if there is no such
    file.

    `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
    of os.environ.get("PATH"), or can be overridden with a custom search
    path.

    N�PATH�CS_PATHrr�PATHEXTr�c3�D�K�|]}�|j�k(���y�wrv)�upper)�.0r��suffixs  �r(�	<genexpr>zwhich.<locals>.<genexpr>5s�����%O��f��	�	��&;�%O�s� ) rjr!rGrmr�r��get�confstrr�ra�defpath�fsencode�pathsepr�rJr3r�r|�insert�getenv�_WIN_DEFAULT_PATHEXT�splitextr�r��anyr��popr�rorer�r�)r�r�rm�	use_bytesrcr|�pathext_sourcer��pathext�files�seen�dir�normdir�thefiler8r�s               @r(rr�sr����3��&�I�
�7�7�=�=��%�L�G�S���y���<��:�:�>�>�&�$�/�D��|�&��:�:�i�0�D�����;�;�t�$�D��:�:�b�k�k�"�*�*�5�6�D��;�;�t�$�D��:�:�b�j�j�)�D��<�<�7�"�'=�c�4�'H��Y�Y�F�����V�,���K�K��6�"�
�|�|�w�����9�-�E�1E��"0�"6�"6�r�z�z�"B�J�3�c�3�J��J��3:�;�C�r�{�{�3�'�;�G�;���w�7��#��)�7�7�����!�!�%��(�+�A�.�4�4�6���"�'�'�>�#�%O�w�%O�"O��L�L����1��&�����5�D�� ���'�'�"�"�3�'���$���H�H�W�� �
 ���w�w�|�|�C��1�� ��t�,��K�
 �	 ���q'�
�3�&��:�:�D�&��6K��<��7s*� K'� L
�(L
�4L�L�'L
�	L
)r)F)FN)rLrrNNNN)rrNNNN)Nr&)NNrrNNN)NN))�P�)ir+rGrJrnr��collectionsr;�warnings�zlibr^rArOr_�lzmar`r8r�rrr3r�rcrlr8rNr�r�__all__r7rr!rrr/r6r1r3rDrUrar	rtryr}r
rr�rr
rrr�r�stat_resultr�rrr�rr�supports_dir_fdr��supports_fdr�r r�avoids_symlink_attacksr*rr.r/rDrJrsr�r�r�rrrrrr�rrr�r�r�r�r�rr��
namedtupler�r�r�r�r�rr r�r��F_OKr�rr&r'r(�<module>rs<���
�
����������O�����N�����O��7�7�d�?��
�����7�7�g���
�
��<�<�7����G�&�{�I���2�z�*�O�s�|�|�/F�/F�w�/O���7�7�5�,�7��?����	�G�	�@�E�@�;�w�;�6��6�0��0�&�I�&��	��
 �(>�@.:��(�4�$E�R�+/�>�@+/�.�2�2�{��04��0
�+/�H�T'+��$(,�&�P
�7<�@�D!&�d�%�&+�5�.2�`�2�>�>�/�0��$�!#�H>0�@�g�g�r�w�w��	�	�2�8�8�<��'�'�(�<��Z�Z�2�>�>�1�<��W�W�� ;� ;�;��
`+�T�$�`+�H!2���.�$"'�@�D�G�
�$�$LM�@D�D�L;<�@D�7�r#'�
��"&�
��
�m�0�1�%�'���
�!.�1E�0F� 2�!4��W��,�b�*�=��U���!.�1F�0G� 3�!5��W���!.�1C�0D� 0�!2��W���A�*�KL�;?�=�@	�F�$CG�')�J�,���<6:��(�h���-D�
E��h���Z�
8���
�!*�F� 3�_�b� 2� 4�O�G���!+�W� 5��� 3� 5�O�G���!*�F� 3�_�b� 0� 2�O�G���..�d�..�b�2�y���N�N�<� �.��.�.�w�8I�J��&<����#�%:����"�%:����"�
4���N�N�<� �.��.�.�w�8I�J��4�"�@+.�b'�
"��G�G�b�g�g�%�D�P��E/���O������N������O��s3�N�N�N�N�N�N�N�N(�'N(
¿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!