
    a	hd0                        S SK r S SKrS SKr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JrJrJrJrJrJrJr  SSKJrJr  SSKJr  \\S4   r\R6                  " \5      rS	\\   S
\\   4S jr " S S5      r S(S\S\S\\   S
\\   4S jjr \
S\S\\   S
\\\\   \\   4      4S j5       r!   S)S\S\S\S\S\"S\\   S
\\\"   \\4   4S jjr#  S*S\S\S\S\\   S
\\\"   \4   4
S jjr$S\\\\\   4      S\"S
\\\\   4   4S jr%S\S
\\   4S jr&   S+S\S \"S!\"S
\4S" jjr'      S,S\\   S#\\\      S$\"S\"S%\"S\\   S
\"4S& jjr(     S-S\\   S#\\\      S$\"S%\"S\\   S
\\\\   4   4S' jjr)g).    N)OrderedDict)contextmanager)IODictIterableIteratorMappingOptionalTupleUnion   )Bindingparse_stream)parse_variableszos.PathLike[str]mappingsreturnc              #      #    U  HB  nUR                   (       a*  [        R                  SUR                  R                  5        Uv   MD     g 7f)Nz;python-dotenv could not parse statement starting at line %s)errorloggerwarningoriginalline)r   mappings     =/var/www/html/env/lib/python3.13/site-packages/dotenv/main.pywith_warn_for_invalid_linesr      s;     ==NNM  %%  s   A
Ac                       \ rS rSr     SS\\   S\\\      S\S\\   S\S\S	S4S
 jjr	\
S	\\\      4S j5       rS	\\\\   4   4S jrS	\\\\\   4      4S jrS	\4S jrS\S	\\   4S jrSrg)DotEnv"   Ndotenv_pathstreamverboseencodinginterpolateoverrider   c                 Z    Xl         X l        S U l        X0l        X@l        XPl        X`l        g N)r   r    _dictr!   r"   r#   r$   )selfr   r    r!   r"   r#   r$   s          r   __init__DotEnv.__init__#   s+     /:)/9=
$'/!,&    c              #     #    U R                   (       aZ  [        R                  R                  U R                   5      (       a,  [	        U R                   U R
                  S9 nUv   S S S 5        g U R                  b  U R                  v   g U R                  (       a)  [        R                  SU R                   =(       d    S5        [        R                  " S5      v   g ! , (       d  f       g = f7f)Nr"   z3python-dotenv could not find configuration file %s..env )r   ospathisfileopenr"   r    r!   r   infoioStringIO)r(   r    s     r   _get_streamDotEnv._get_stream4   s     t/?/? @ @d&&?6 @?[[$++||I$$. ++b/! @?s   AC. C%A8C.
C+'C.c                    U R                   (       a  U R                   $ U R                  5       nU R                  (       a-  [        [	        XR
                  S95      U l         U R                   $ [        U5      U l         U R                   $ )zReturn dotenv as dict)r$   )r'   parser#   r   resolve_variablesr$   )r(   
raw_valuess     r   dictDotEnv.dictC   sc    ::::ZZ\
$!*}}EDJ zz %Z0DJzzr+   c              #      #    U R                  5        n[        [        U5      5       H,  nUR                  c  M  UR                  UR                  4v   M.     S S S 5        g ! , (       d  f       g = f7fr&   )r7   r   r   keyvalue)r(   r    r   s      r   r:   DotEnv.parseS   sP     66|F7KL;;*!++w}}44 M  s!   A2#A!A!	A2!
A/+A2c                     U R                  5       (       d  gU R                  5       R                  5        HD  u  pU[        R                  ;   a  U R                  (       d  M,  Uc  M1  U[        R                  U'   MF     g)z9
Load the current dotenv as system environment variable.
FT)r=   itemsr0   environr$   )r(   kvs      r   set_as_environment_variables#DotEnv.set_as_environment_variablesY   sX     yy{{IIK%%'DABJJt}}} !

1	 ( r+   r@   c                     U R                  5       nX;   a  X!   $ U R                  (       a   [        R                  SXR                  5        g)r/   zKey %s not found in %s.N)r=   r!   r   r   r   )r(   r@   datas      r   get
DotEnv.geth   s9    yy{;9<<NN4c;K;KLr+   )r'   r   r"   r#   r$   r    r!   )NFNTT)__name__
__module____qualname____firstlineno__r
   StrPathr   strboolr)   r   r   r7   r   r=   r   r:   rH   rL   __static_attributes__ r+   r   r   r   "   s     %)"& 'g&' C!' 	'
 3-' ' ' 
'" "Xbg. " "d3-.  5xc8C=&8 9: 5d 
s 
x} 
r+   r   r   
key_to_getr"   c                 6    [        U SUS9R                  U5      $ )zs
Get the value of a given key from the given .env.

Returns `None` if the key isn't found or doesn't have a value.
T)r!   r"   )r   rL   )r   rW   r"   s      r   get_keyrY   u   s     +th?CCJOOr+   r1   c              #     #    [         R                  " U 5      R                  5         [        R                  " SUSS9 nS n [        XS9 nXB4v   S S S 5        S S S 5        Wc"  [        R                  " WR                  U 5        g [        R                  " WR                  5        US e! , (       d  f       N^= f! [         a  nUn S nANrS nAff = f! , (       d  f       N= f7f)NwF)moder"   deleter-   )pathlibPathtouchtempfileNamedTemporaryFiler3   BaseExceptionshutilmovenamer0   unlink)r1   r"   destr   sourceerrs         r   rewriterk      s     
 LL		$	$#	OSW	d.&n$ / 
P }DIIt$
		$)) /. 	E	 
P	Ose   ;C#C	B9
B(B9AC#(
B6	2B95C6B99
CC
C
CC
C C#
key_to_setvalue_to_set
quote_modeexportc                    US;  a  [        SU 35      eUS:H  =(       d!    US:H  =(       a    UR                  5       (       + nU(       a"  SR                  UR                  SS5      5      nOUnU(       a
  SU S	U S
3nOU S	U S
3n[	        XS9 u  pSnSn[        [        U	5      5       Hw  nUR                  U:X  a  U
R                  U5        SnM(  U
R                  UR                  R                  5        UR                  R                  R                  S
5      (       + nMy     U(       d)  U(       a  U
R                  S
5        U
R                  U5        SSS5        SX4$ ! , (       d  f       N= f)z
Adds or Updates a key/value to the given .env

If the .env path given doesn't exist, fails instead of risking creating
an orphan .env somewhere in the filesystem
)alwaysautoneverzUnknown quote_mode: rq   rr   z'{}''z\'zexport =
r-   FTN)
ValueErrorisalnumformatreplacerk   r   r   r@   writer   stringendswith)r   rl   rm   rn   ro   r"   quote	value_outline_outri   rh   replacedmissing_newliner   s                 r   set_keyr      sS    44/
|<==(" f;\%9%9%;!; 
 MM,"6"6sE"BC	 	ZL)B7 \9+R0		0NV2<3GHG{{j(

8$

7++223&-&6&6&=&=&F&Ft&L"L I 

4 JJx  
1 )) 
1	0s   CE!!
E/key_to_unsetc                    [         R                  R                  U 5      (       d  [        R	                  SU 5        SU4$ Sn[        XS9 u  pV[        [        U5      5       H<  nUR                  U:X  a  SnM  UR                  UR                  R                  5        M>     SSS5        U(       d  [        R	                  SX5        SU4$ XA4$ ! , (       d  f       N2= f)z
Removes a given key from the given `.env` file.

If the .env path given doesn't exist, fails.
If the given key doesn't exist in the .env, fails.
z(Can't delete from %s - it doesn't exist.NFr-   Tz/Key %s not removed from %s - key doesn't exist.)r0   r1   existsr   r   rk   r   r   r@   r{   r   r|   )r   r   rn   r"   removedri   rh   r   s           r   	unset_keyr      s     77>>+&&A;O\!!G		0NV2<3GHG{{l*

7++223	 I 
1 =|	
 \!!   
1	0s   
AC
Cvaluesr$   c                 V  ^ 0 nU  H  u  p4Uc  S nO[        U5      n0 mU(       a1  TR                  [        R                  5        TR                  U5        O0TR                  U5        TR                  [        R                  5        SR	                  U4S jU 5       5      nXRU'   M     U$ )Nr/   c              3   D   >#    U  H  oR                  T5      v   M     g 7fr&   )resolve).0atomenvs     r   	<genexpr>$resolve_variables.<locals>.<genexpr>   s     A54\\#..5s    )r   updater0   rE   join)r   r$   
new_valuesrf   rA   resultatomsr   s          @r   r;   r;      s     ,.J=F#E*E,.C

2::&

:&

:&

2::&WWA5AAF!4   r+   c              #     #    [         R                  R                  U 5      (       d  [        S5      e[         R                  R	                  U 5      (       a  [         R                  R                  U 5      n Sn[         R                  R                  U 5      nX:w  ac  Uv   [         R                  R                  [         R                  R                  U[         R                  R                  5      5      nX#p!X:w  a  Mb  gg7f)zD
Yield directories starting from the given directory up to the root
zStarting path not foundN)	r0   r1   r   IOErrorr2   dirnameabspathr   pardir)r1   last_dircurrent_dir
parent_dirs       r   _walk_to_rootr     s      77>>$/00	ww~~dwwt$H''//$'K

!WW__RWW\\+rww~~%NO
 ++ 
!s   C9C?=C?filenameraise_error_if_not_foundusecwdc                    S nS nU(       d.  U" 5       (       d"  U" 5       (       d  [        [        SS5      (       a  [        R                  " 5       nGO0[        R                  " 5       n[
        nUR                  R                  U:X  d8  [        R                  R                  UR                  R                  5      (       dq  UR                  c   eUR                  nUR                  R                  U:X  a  M7  [        R                  R                  UR                  R                  5      (       d  Mq  UR                  R                  n[        R                  R                  [        R                  R                  U5      5      n[        U5       HJ  n	[        R                  R                  X5      n
[        R                  R                  U
5      (       d  MH  U
s  $    U(       a  [!        S5      eg)z{
Search in increasingly higher folders for the given file

Returns path to the file if found, or an empty string otherwise
c                  `     [        SSSS/S9n [        U S5      (       + $ ! [         a     gf = f)z<Decide whether this is running in a REPL or IPython notebook__main__N__file__)fromlistF)
__import__ModuleNotFoundErrorhasattr)mains    r   _is_interactive$find_dotenv.<locals>._is_interactive  s?    	j$
|LD 4,,, # 		s     
--c                  0    [         R                  " 5       S L$ r&   )sysgettracerV   r+   r   _is_debugger!find_dotenv.<locals>._is_debugger'  s    ||~T))r+   frozenFzFile not foundr/   )getattrr   r0   getcwd	_getframer   f_codeco_filenamer1   r   f_backr   r   r   r   r2   r   )r   r   r   r   r   r1   framecurrent_fileframe_filenamer   
check_paths              r   find_dotenvr     sK   -* ""lnnXu8U8Uyy{ ll&&,6bggnnLL$$?
 ?
 <<+++LLE	 ll&&,6bggnnLL$$?
 ?

 11wwrww~>? &WW\\'4
77>>*%% '
  &''r+   r    r!   r#   c           	      ^    U c  Uc
  [        5       n [        U UUUUUS9nUR                  5       $ )aZ  Parse a .env file and then load all the variables found as environment variables.

Parameters:
    dotenv_path: Absolute or relative path to .env file.
    stream: Text stream (such as `io.StringIO`) with .env content, used if
        `dotenv_path` is `None`.
    verbose: Whether to output a warning the .env file is missing.
    override: Whether to override the system environment variables with the variables
        from the `.env` file.
    encoding: Encoding to be used to read the file.
Returns:
    Bool: True if at least one environment variable is set else False

If both `dotenv_path` and `stream` are `None`, `find_dotenv()` is used to find the
.env file with it's default parameters. If you need to change the default parameters
of `find_dotenv()`, you can explicitly call `find_dotenv()` and pass the result
to this function as `dotenv_path`.
r   r    r!   r#   r$   r"   )r   r   rH   )r   r    r!   r$   r#   r"   dotenvs          r   load_dotenvr   E  sB    4 v~!mF ..00r+   c           	      Z    U c  Uc
  [        5       n [        U UUUSUS9R                  5       $ )aa  
Parse a .env file and return its content as a dict.

The returned dict will have `None` values for keys without values in the .env file.
For example, `foo=bar` results in `{"foo": "bar"}` whereas `foo` alone results in
`{"foo": None}`

Parameters:
    dotenv_path: Absolute or relative path to the .env file.
    stream: `StringIO` object with .env content, used if `dotenv_path` is `None`.
    verbose: Whether to output a warning if the .env file is missing.
    encoding: Encoding to be used to read the file.

If both `dotenv_path` and `stream` are `None`, `find_dotenv()` is used to find the
.env file.
Tr   )r   r   r=   )r   r    r!   r#   r"   s        r   dotenv_valuesr   m  s=    . v~!m dfr+   )utf-8)rq   Fr   )rq   r   )r.   FF)NNFFTr   )NNFTr   )*r5   loggingr0   r^   rd   r   ra   collectionsr   
contextlibr   typingr   r   r   r   r	   r
   r   r   parserr   r   	variablesr   rS   rR   	getLoggerrN   r   r   r   rY   rk   rT   r   r   r;   r   r   r   r   rV   r+   r   <module>r      s   	  	   
  # % P P P ) & ''
(			8	$(7*; @Q P Pl &
P
P
P sm
P c]	
P 
sm eBsGRW$%& 2 %-*-*-* -* 	-*
 -* sm-* 8D>3#$-*f %	!!! ! sm	!
 8D>3!BU3-./ S(3- 28 8 8& %*..". . 		.d &* $%%1'"%1RW%1 %1 	%1
 %1 sm%1 
%1R &* $%!'"!RW! ! 	!
 sm! 
#x}
!r+   