
    5hjO                        S SK r S SKrS SKrS SKrS SKJr  S SKJr  S SKJ	r	  SSK
Jr  SSK
Jr  SSK
Jr  SS	K
Jr  SS
K
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSKJr  \R.                  (       a  S SKr\R4                  " S5      r\R8                  " S5      rS\S\4S jrSDS jr S\RB                  S\4S jr"SES\S\#S\4S jjr$ " S S5      r% " S S5      r&     SFS!\RN                  \RB                     S"\RN                  \RP                  \RB                        S#\)S$\)S%\RN                  \)   SS4S& jjr*SS'S\RV                  4S( jr,  SGSS'S)\RN                  \   S*\RN                  \   S\RZ                  4S+ jjr.     SHS,\R^                  \S-4   S.\S)\RN                  \   S*\RN                  \   S/\)S0\)S\RP                  \RB                     4S1 jjr0 SIS,S2S3\)S\4S4 jjr1SJS5\S6\)S7\)S\4S8 jjr2 " S9 S:5      r3 SKS;\RN                  \   S<\RN                  \   S\4S= jjr4S S S S>.S?\Rj                  \   S@\)SA\)SB\)S\Rl                  \   4
SC jjr7g)L    N)update_wrapper)
ModuleType)TracebackType   )_default_text_stderr)_default_text_stdout)_find_binary_writer)auto_wrap_for_ansi)binary_streams)open_stream)should_strip_ansi)
strip_ansi)text_streams)WIN)resolve_color_defaultPRnamereturnc                 \    SR                  U R                  5       5      R                  5       $ )N-)joinsplitlower)r   s    V/var/www/html/cementerio_25MayoBackend/env/lib/python3.13/site-packages/click/utils.py	_posixifyr      s     88DJJL!''))    c                 b   ^  SSSSS[         R                  [           4U 4S jjn[        UT 5      $ )z0Wraps a function so that it swallows exceptions.argszP.argskwargszP.kwargsr   c                  6   >  T" U 0 UD6$ ! [          a     g f = fN)	Exception)r   r    funcs     r   wrappersafecall.<locals>.wrapper$   s-    	((( 		s    
)tOptionalr   r   )r$   r%   s   ` r   safecallr)   !   s4    x : !**Q-  '4((r   valuec                     [        U [        5      (       a%   U R                  [        R                  " 5       5      $ [        U 5      $ ! [
         a    U R                  SS5      s $ f = f)z%Converts a value into a valid string.utf-8replace)
isinstancebytesdecodesysgetfilesystemencodingUnicodeErrorstr)r*   s    r   make_strr5   .   sZ    %	4<< 9 9 ;<< u:  	4<<33	4s   #A A%$A%help
max_lengthc                 .   U R                  S5      nUS:w  a  U SU n U R                  5       nU(       d  gUS   S:X  a  USS nSn[        U5      S-
  n[        U5       HP  u  pgU[        U5      US:  -   -  nXA:  a    OEUS   S:X  a  S	R	                  USUS-    5      s  $ XA:X  d  MI  Xe:w  d  MP    O   S	R	                  U5      $ U[        S
5      -  nUS:  a)  U[        X6   5      US:  -   -  nXA::  a  OUS-  nUS:  a  M)  S	R	                  USU 5      S
-   $ )z+Returns a condensed version of help string.z

N r   r   . z...)findr   len	enumerater   )r6   r7   paragraph_endwordstotal_length
last_indexiwords           r   make_default_short_helprG   8   s?    IIf%MN]# JJLE Qx4ab	LUaJU#D	QU++$8s?88E'AEN++%!/ $ xx CJL a%EHQ//%	Q a% 88E"1I&&r   c                      \ rS rSrSr    SS\R                  \S4   S\S\R                  \   S\R                  \   S	\	4
S
 jjr
S\S\R                  4S jrS\4S jrS\R                  \R                     4S jrSS jrSS jrSS jrS\R                  \R&                  \      S\R                  \   S\R                  \   SS4S jrS\R.                  \R0                     4S jrSrg)LazyFilej   zA lazy file works like a regular file but it does not fully open
the file but it does perform some basic checks early to see if the
filename parameter does make sense.  This is useful for safely opening
files for writing.
Nfilenameos.PathLike[str]modeencodingerrorsatomicc                     [         R                  " U5      U l        X l        X0l        X@l        XPl        U   U   U R                  S:X  a  [        XX45      u  U l        U l	        g SU;   a  [        X5      R                  5         S U l        SU l	        g )Nr   rT)osfspathr   rM   rN   rO   rP   r   _fshould_closeopenclose)selfrK   rM   rN   rO   rP   s         r   __init__LazyFile.__init__q   sy     8,		 99)4XX)V&DGT&d{ X$**,DG $Dr   r   r   c                 6    [        U R                  5       U5      $ r"   )getattrrW   rY   r   s     r   __getattr__LazyFile.__getattr__   s    tyy{D))r   c                     U R                   b  [        U R                   5      $ S[        U R                  5       SU R                   S3$ )Nz<unopened file 'z' >)rU   reprformat_filenamer   rM   rY   s    r   __repr__LazyFile.__repr__   s=    77= !/$))"<!=R		{!LLr   c                 :   U R                   b  U R                   $  [        U R                  U R                  U R                  U R
                  U R                  S9u  ol        Xl         U$ ! [         a'  nSSK	J
n  U" U R                  UR                  S9UeSnAff = f)zOpens the file if it's not yet open.  This call might fail with
a :exc:`FileError`.  Not handling this error will produce an error
that Click shows.
NrP   r   )	FileError)hint)rU   r   r   rM   rN   rO   rP   rV   OSError
exceptionsrj   strerror)rY   rverj   s       r   rW   LazyFile.open   s    
 7777N	?$/		499dmmT[[%!B! 	  	?-DIIAJJ7Q>	?s   AA) )
B3"BBc                 T    U R                   b  U R                   R                  5         gg)z+Closes the underlying file, no matter what.N)rU   rX   re   s    r   rX   LazyFile.close   s    77GGMMO r   c                 H    U R                   (       a  U R                  5         gg)zyThis function only closes the file if it was opened by the lazy
file wrapper.  For instance this will never close stdin.
N)rV   rX   re   s    r   close_intelligentlyLazyFile.close_intelligently   s     JJL r   c                     U $ r"    re   s    r   	__enter__LazyFile.__enter__       r   exc_type	exc_valuetbc                 $    U R                  5         g r"   )ru   rY   r|   r}   r~   s       r   __exit__LazyFile.__exit__   s     	  "r   c                 L    U R                  5         [        U R                  5      $ r"   )rW   iterrU   re   s    r   __iter__LazyFile.__iter__   s    		DGG}r   )rU   rP   rN   rO   rM   r   rV   )rR   NstrictFr   N)r   rI   )__name__
__module____qualname____firstlineno____doc__r'   Unionr4   r(   boolrZ   Anyr_   rf   IOrW   rX   ru   ry   TypeBaseExceptionr   r   IteratorAnyStrr   __static_attributes__rx   r   r   rI   rI   j   s    $("*%''#112% % **S/	%
 

3% %6* * *M# M
add155k $
#**QVVM23# ::m,# JJ}%	#
 
#!**QXX. r   rI   c                   P   \ rS rSrS\R
                  \R                     SS4S jrS\S\R                  4S jr	SS jr
S	\R                  \R                  \      S
\R                  \   S\R                  \   SS4S jrS\4S jrS\R"                  \R$                     4S jrSrg)KeepOpenFile   filer   Nc                     Xl         g r"   _file)rY   r   s     r   rZ   KeepOpenFile.__init__   s    "&
r   r   c                 .    [        U R                  U5      $ r"   )r]   r   r^   s     r   r_   KeepOpenFile.__getattr__   s    tzz4((r   c                     U $ r"   rx   re   s    r   ry   KeepOpenFile.__enter__   r{   r   r|   r}   r~   c                     g r"   rx   r   s       r   r   KeepOpenFile.__exit__   s     	r   c                 ,    [        U R                  5      $ r"   )rc   r   re   s    r   rf   KeepOpenFile.__repr__       DJJr   c                 ,    [        U R                  5      $ r"   )r   r   re   s    r   r   KeepOpenFile.__iter__   r   r   r   )r   r   )r   r   r   r   r'   r   r   rZ   r4   r_   ry   r(   r   r   r   r   rf   r   r   r   r   rx   r   r   r   r      s    'QTT!%%[ 'T ') ) )**QVVM23 ::m, JJ}%	
 
 #   !**QXX.  r   r   Tmessager   nlerrcolorc                    Uc   U(       a  [        5       nO
[        5       nUc  gU b,  [        U [        [        [
        45      (       d  [        U 5      nOU nU(       a+  U=(       d    Sn[        U[        5      (       a  US-  nOUS-  nU(       d  UR                  5         g[        U[        [
        45      (       aA  [        U5      nUb2  UR                  5         UR                  U5        UR                  5         gOW[        U5      n[        X5      (       a  [        U5      nO0[        (       a%  [        b  [        X5      nOU(       d  [        U5      nUR                  U5        UR                  5         g)a  Print a message and newline to stdout or a file. This should be
used instead of :func:`print` because it provides better support
for different data, files, and environments.

Compared to :func:`print`, this does the following:

-   Ensures that the output encoding is not misconfigured on Linux.
-   Supports Unicode in the Windows console.
-   Supports writing to binary outputs, and supports writing bytes
    to text outputs.
-   Supports colors and styles on Windows.
-   Removes ANSI color and style codes if the output does not look
    like an interactive terminal.
-   Always flushes the output.

:param message: The string or bytes to output. Other objects are
    converted to strings.
:param file: The file to write to. Defaults to ``stdout``.
:param err: Write to ``stderr`` instead of ``stdout``.
:param nl: Print a newline after the message. Enabled by default.
:param color: Force showing or hiding colors and other styles. By
    default Click will remove color if the output does not look like
    an interactive terminal.

.. versionchanged:: 6.0
    Support Unicode output on the Windows console. Click does not
    modify ``sys.stdout``, so ``sys.stdout.write()`` and ``print()``
    will still not support Unicode.

.. versionchanged:: 4.0
    Added the ``color`` parameter.

.. versionadded:: 3.0
    Added the ``err`` parameter.

.. versionchanged:: 2.0
    Support colors on Windows if colorama is installed.
Nr:   
   
)r   r   r.   r4   r/   	bytearrayflushr	   writer   r   r   r   r
   )r   r   r   r   r   outbinary_files          r   echor      s.   Z |')D')D < :gUI7N#O#O/27|	iRc34KC5LC

 #y)**)$/"JJLc"	 # &e,T))S/CS!-)$6 oJJsOJJLr   z'te.Literal['stdin', 'stdout', 'stderr']c                 `    [         R                  " U 5      nUc  [        SU  S35      eU" 5       $ )zReturns a system stream for byte processing.

:param name: the name of the stream to open.  Valid names are ``'stdin'``,
             ``'stdout'`` and ``'stderr'``
Unknown standard stream '')r   get	TypeError)r   openers     r   get_binary_streamr   B  s5     %F~3D6;<<8Or   rN   rO   c                 b    [         R                  " U 5      nUc  [        SU  S35      eU" X5      $ )a  Returns a system stream for text processing.  This usually returns
a wrapped stream around a binary stream returned from
:func:`get_binary_stream` but it also can take shortcuts for already
correctly configured streams.

:param name: the name of the stream to open.  Valid names are ``'stdin'``,
             ``'stdout'`` and ``'stderr'``
:param encoding: overrides the detected default encoding.
:param errors: overrides the default error mode.
r   r   )r   r   r   )r   rN   rO   r   s       r   get_text_streamr   N  s9     d#F~3D6;<<(##r   rK   rL   rM   lazyrP   c                 8   U(       a?  [         R                  " [         R                  [         R                     [	        XX#US95      $ [        XX#US9u  pgU(       d?  [         R                  " [         R                  [         R                     [        U5      5      nU$ )a  Open a file, with extra behavior to handle ``'-'`` to indicate
a standard stream, lazy open on write, and atomic write. Similar to
the behavior of the :class:`~click.File` param type.

If ``'-'`` is given to open ``stdout`` or ``stdin``, the stream is
wrapped so that using it in a context manager will not close it.
This makes it possible to use the function without accidentally
closing a standard stream:

.. code-block:: python

    with open_file(filename) as f:
        ...

:param filename: The name or Path of the file to open, or ``'-'`` for
    ``stdin``/``stdout``.
:param mode: The mode in which to open the file.
:param encoding: The encoding to decode or encode a file opened in
    text mode.
:param errors: The error handling mode.
:param lazy: Wait to open the file until it is accessed. For read
    mode, the file is temporarily opened to raise access errors
    early, then closed until it is read again.
:param atomic: Write to a temporary file and replace the given file
    on close.

.. versionadded:: 3.0
ri   )r'   castr   r   rI   r   r   )rK   rM   rN   rO   r   rP   frV   s           r   	open_filer   c  sm    H vvDDK((6R
 	
 "((6ROAFF144;Q0Hr   z9t.Union[str, bytes, os.PathLike[str], os.PathLike[bytes]]shortenc                 <   U(       a   [         R                  R                  U 5      n O[         R                  " U 5      n [	        U [
        5      (       a'  U R                  [        R                  " 5       S5      n U $ U R                  SS5      R                  SS5      n U $ )uu  Format a filename as a string for display. Ensures the filename can be
displayed by replacing any invalid bytes or surrogate escapes in the name
with the replacement character ``�``.

Invalid bytes or surrogate escapes will raise an error when written to a
stream with ``errors="strict"``. This will typically happen with ``stdout``
when the locale is something like ``en_GB.UTF-8``.

Many scenarios *are* safe to write surrogates though, due to PEP 538 and
PEP 540, including:

-   Writing to ``stderr``, which uses ``errors="backslashreplace"``.
-   The system has ``LANG=C.UTF-8``, ``C``, or ``POSIX``. Python opens
    stdout and stderr with ``errors="surrogateescape"``.
-   None of ``LANG/LC_*`` are set. Python assumes ``LANG=C.UTF-8``.
-   Python is started in UTF-8 mode  with  ``PYTHONUTF8=1`` or ``-X utf8``.
    Python opens stdout and stderr with ``errors="surrogateescape"``.

:param filename: formats a filename for UI display.  This will also convert
                 the filename into unicode without failing.
:param shorten: this optionally shortens the filename to strip of the
                path that leads up to it.
r-   r,   surrogateescape)
rS   pathbasenamerT   r.   r/   r0   r1   r2   encode)rK   r   s     r   rd   rd     s    6 77##H-99X&(E""??3#<#<#>	J O	 ??7,=>EEY
 Or   app_nameroamingforce_posixc                    [         (       ak  U(       a  SOSn[        R                  R                  U5      nUc  [        R                  R                  S5      n[        R                  R                  X@5      $ U(       aH  [        R                  R                  [        R                  R                  S[        U 5       35      5      $ [        R                  S:X  a=  [        R                  R                  [        R                  R                  S5      U 5      $ [        R                  R                  [        R                  R                  S[        R                  R                  S5      5      [        U 5      5      $ )	a"  Returns the config folder for the application.  The default behavior
is to return whatever is most appropriate for the operating system.

To give you an idea, for an app called ``"Foo Bar"``, something like
the following folders could be returned:

Mac OS X:
  ``~/Library/Application Support/Foo Bar``
Mac OS X (POSIX):
  ``~/.foo-bar``
Unix:
  ``~/.config/foo-bar``
Unix (POSIX):
  ``~/.foo-bar``
Windows (roaming):
  ``C:\Users\<user>\AppData\Roaming\Foo Bar``
Windows (not roaming):
  ``C:\Users\<user>\AppData\Local\Foo Bar``

.. versionadded:: 2.0

:param app_name: the application name.  This should be properly capitalized
                 and can contain whitespace.
:param roaming: controls if the folder should be roaming or not on Windows.
                Has no effect otherwise.
:param force_posix: if this is set to `True` then on any POSIX system the
                    folder will be stored in the home folder with a leading
                    dot instead of the XDG config home or darwin's
                    application support folder.
APPDATALOCALAPPDATA~z~/.darwinz~/Library/Application SupportXDG_CONFIG_HOMEz	~/.config)
r   rS   environr   r   
expanduserr   r   r1   platform)r   r   r   keyfolders        r   get_app_dirr     s    > s"i$>WW'',Fww||F--ww||BGG..Yx5H4I/JKLL
||xww||GG>?
 	
 77<<


("''*<*<[*IJ( r   c                       \ rS rSrSrS\R                  \R                     SS4S jrSS jr	S\
S\R                  4S	 jrS
rg)PacifyFlushWrapperi  a  This wrapper is used to catch and suppress BrokenPipeErrors resulting
from ``.flush()`` being called on broken pipe during the shutdown/final-GC
of the Python interpreter. Notably ``.flush()`` is always called on
``sys.stdout`` and ``sys.stderr``. So as to have minimal impact on any
other cleanup code, and the case where the underlying file is not a broken
pipe, all calls and attributes are proxied.
wrappedr   Nc                     Xl         g r"   r   )rY   r   s     r   rZ   PacifyFlushWrapper.__init__  s    r   c                      U R                   R                  5         g ! [         a)  nSS KnUR                  UR                  :w  a  e  S nAg S nAff = f)Nr   )r   r   rl   errnoEPIPE)rY   rp   r   s      r   r   PacifyFlushWrapper.flush  sB    	LL  	ww%++% &	s    
AAAattrc                 .    [        U R                  U5      $ r"   )r]   r   )rY   r   s     r   r_   PacifyFlushWrapper.__getattr__  s    t||T**r   r   r   )r   r   r   r   r   r'   r   r   rZ   r   r4   r_   r   rx   r   r   r   r     sB    QUU  + + +r   r   r   _mainc                    Uc  [         R                  S   nU (       d  [         R                  S   n [        USS5      S;   do  [        R
                  S:X  az  UR                  S:X  aj  [        R                  R                  U 5      (       dF  [        R                  R                  U  S35      (       a  [        R                  R                  U 5      $ [        R                  " [        UR                  5      n[        R                  R                  [        R                  R                  U 5      5      S   nUS:w  a  U S	U 3nS
UR                  S	5       3$ )a  Determine the command used to run the program, for use in help
text. If a file or entry point was executed, the file name is
returned. If ``python -m`` was used to execute a module or package,
``python -m name`` is returned.

This doesn't try to be too precise, the goal is to give a concise
name for help text. Files are only shown as their name without the
path. ``python`` is only shown for modules, and the full path to
``sys.executable`` is not shown.

:param path: The Python file being executed. Python puts this in
    ``sys.argv[0]``, which is used by default.
:param _main: The ``__main__`` module. This should only be passed
    during internal testing.

.. versionadded:: 8.0
    Based on command args detection in the Werkzeug reloader.

:meta private:
N__main__r   __package__>   Nr:   ntr:   z.exer<   z
python -m )r1   modulesargvr]   rS   r   r   r   existsr   r'   r   r4   splitextlstrip)r   r   	py_moduler   s       r   _detect_program_namer     s	   . }J'xx{ umT*j8
4#t$$GGNNdV4=)) ww%%
 sE--.I77BGG,,T23A6D z k4&)		((-.//r   )userenvglob_recursiver   r   r   r   c                \   SSK J n  / nU  H  nU(       a  [        R                  R                  U5      nU(       a  [        R                  R	                  U5      n U" XcS9nU(       d  UR                  U5        Mp  UR                  U5        M     U$ ! [
        R                   a    / n NIf = f)au  Simulate Unix shell expansion with Python functions.

See :func:`glob.glob`, :func:`os.path.expanduser`, and
:func:`os.path.expandvars`.

This is intended for use on Windows, where the shell does not do any
expansion. It may not exactly match what a Unix shell would do.

:param args: List of command line arguments to expand.
:param user: Expand user home directory.
:param env: Expand environment variables.
:param glob_recursive: ``**`` matches directories recursively.

.. versionchanged:: 8.1
    Invalid glob patterns are treated as empty expansions rather
    than raising an error.

.. versionadded:: 8.0

:meta private:
r   )glob)	recursive)	r   rS   r   r   
expandvarsreerrorappendextend)r   r   r   r   r   r   argmatchess           r   _expand_argsr   ?  s    8 
C''$$S)C''$$S)C	39G JJsOJJw " J xx 	G	s   BB+*B+)r$   zt.Callable[P, R]r   zt.Callable[P, t.Optional[R]])-   )NNTFN)Nr   )rR   Nr   FF)F)TF)NN)8rS   r   r1   typingr'   	functoolsr   typesr   r   _compatr   r   r	   r
   r   r   r   r   r   r   globalsr   TYPE_CHECKINGtyping_extensionste	ParamSpecr   TypeVarr   r4   r   r)   r   r5   intrG   rI   r   r(   r   r   r   BinaryIOr   TextIOr   r   r   rd   r   r   r   IterableListr   rx   r   r   <module>r     s   	 	 
  $   ) ) ( ' #   &  !  *??"
SAIIcN*C *C *
)AEE c /'# /'3 /' /'dU Up   4 "&$("dZZd
**QTT!%%[
!d 	d 
	d
 ::dd 
dN	E 	!** 	 !%&$
3$jjo$ JJsO$ XX	$.  $&.ggc--..
. jjo. JJsO	.
 . . TT!%%[.f 'I'' 	'T.# . .$ .SV .b+ +4 CG40
**S/40)*J)?4040t 1
**S/1 1 
	1
 1 VVC[1r   