+
    :1j9                    \   R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHtHtHtHtHtHtHtHt ^ RIHt ^ R	IHt ^ R
IHt ^RIHtHt ^RIHt  ^RI!H"t"H#t#H$t$H%t%H&t& ^RI'H(t( ^RI)H*t* ^RI+H,t, ^RI-H.t. ^RI/H0t0H1t1H2t2H3t3H4t4H5t5 ^RI6H7t7 ^RI8H9t9H:t:H;t;H<t<H=t= ^RI>H?t? ^RI@HAtA ^RIBHCtCHDtD ^RIEHFtF ^RIGHHtH ^RIIHJtJ ^RIKHLtL ^RIMHNtN ^RIOHPtP ]4'       d   ^ RIQtQ^ RIRHStSHTtT ^ RIUHVtV ]! ]W4      tXR tYR!tZ ! R" R#4      t[]Re,          t\R$ t]RfR% lt^RgR& lt_R' t`R( taRfR) ltbR* tcRfR+ ltdRfR, lteR- tfR. tgR/ thR0 tiRhR1 ltjR2 tkR3 tlR4 tmR5 tnR6 toR7 tpR8 tqR9 trR: tsR; ttR< tuR= tvR> twR? txR@ tyRA tzRB t{RC t|RD t}RE t~RF tRG tRH tRiRI RJ lltRK tRL tRiRM RN lltRO tRP tRiRQ RR lltRiRS RT lltRU tRV tRfRW ltRfRX ltRY tRZ tR[ tRiR\ R] lltR^ tR_ tR` tRa tRb tRc t]WRd8X  d0   ]4'       d   ]EP0                  ^,          t]i! ]4       R# ]h! 4        R# R# )ja  Backend logic for `conda init`.

Sections in this module are

  1. top-level functions
  2. plan creators
  3. plan runners
  4. individual operations
  5. helper functions

The top-level functions compose and execute full plans.

A plan is created by composing various individual operations.  The plan data structure is a
list of dicts, where each dict represents an individual operation.  The dict contains two
keys--`function` and `kwargs`--where function is the name of the individual operation function
within this module.

Each individual operation must

  a) return a `Result` (i.e. NEEDS_SUDO, MODIFIED, or NO_CHANGE)
  b) have no side effects if context.dry_run is True
  c) be verbose and descriptive about the changes being made or proposed is context.verbose

The plan runner functions take the plan (list of dicts) as an argument, and then coordinate the
execution of each individual operation.  The docstring for `run_plan_elevated()` has details on
how that strategy is implemented.

N)unified_diff)ENOENT)glob)chain)	getLogger)abspathbasenamedirnameexists
expanduserisdirisfilejoin)Path)randint)Literal)CONDA_PACKAGE_ROOT
CondaError)__version__)CshActivatorFishActivatorPosixActivatorPowerShellActivatorXonshActivator)Utf8NamedTemporaryFile)dals)WINDOWS_LAUNCHER_STUB_PATH)context)ensure_binaryensure_text_typeensure_utf8_encodingon_macon_win	open_utf8)dashlist)BIN_DIRECTORYexpandget_python_short_path#get_python_site_packages_short_pathwin_path_ok)json)CondaValueError)copymkdir_p)rm_rf)lexists)make_executable)compute_sum)subprocess_call) generate_shebang_for_entry_point)FOLDERIDget_folder_path)create_shortcutzV^# >>> conda initialize >>>(?:\n|\r\n)([\s\S]*?)# <<< conda initialize <<<(?:\n|\r\n)?zD^#region conda initialize(?:\n|\r\n)([\s\S]*?)#endregion(?:\n|\r\n)?c                   "    ] tR t^jtRtRtRtRtR# )Resultz
needs sudomodifiedz	no change N)__name__
__module____qualname____firstlineno__
NEEDS_SUDOMODIFIED	NO_CHANGE__static_attributes__r:       5lib/python3.14/site-packages/conda/core/initialize.pyr8   r8   j   s    JHIrC   r8   c                     \        V 4      p\        V4       \        P                  '       gF   \        ;QJ d    R  V 4       F  '       g   K   RM	  RM! R  V 4       4      '       d   \        R4      h\        V4       ^ # )c              3   T   "   T F  qR ,          \         P                  8H  x  K   	  R# 5iresultNr8   r?   .0steps   & rD   	<genexpr>install.<locals>.<genexpr>z   s       #8<X&+++   &(TFz(Some steps require elevated permissions.)make_install_planrun_planr   dry_runanyr   print_plan_results)conda_prefixplans   & rD   installrW   w   sc    \*DTN???ss #8<#sss #8<#     CDDtrC   c           	         . p\         P                  ! R 4      R8X  d8   \        V 4      p\        V4       \        P
                  '       g   \        V4       \        WW#WER7      p\        V4       \        P
                  '       g   \        V4       Wg,           p\        V4       \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        R\        P                  R7       ^# R# )	CONDA_PIP_UNINITIALIZEDtruereversec              3   T   "   T F  qR ,          \         P                  8H  x  K   	  R# 5irG   rI   rJ   s   & rD   rM   initialize.<locals>.<genexpr>        
@44>V...4rO   TFOperation failed.fileN)osgetenvrP   rQ   r   rR   run_plan_elevatedmake_initialize_planrT   rS   printsysstderr)	rU   shellsfor_user
for_systemanaconda_promptr\   plan1plan2rV   s	   &&&&&&   rD   
initializerp      s     E	yy*+v5!,/e$ hOE UO???% =Dt
s
@4
@sss
@4
@@@!

3 ArC   c           
         \        T;'       g    \        P                  4      p\        T;'       g    \        P                  ! 4       4      p\        V4      w  rEp\        \        VR R4      4      '       g   \        RV 24      h\        V4      pVP                  R\        P                  RRV//4       VP                  R\        P                  RR\        VR4      RV//4       VP                  R\        P                  RR\        VR4      RV//4       VP                  R\        P                  RR\        VR	4      //4       \!        V4       \"        P$                  '       g   \"        P&                  '       d   \)        V\        P*                  4       \,        ;QJ d    R
 V 4       F  '       g   K   RM	  RM! R
 V 4       4      '       d   \/        R4      hR\1        ^ R4      RV^ ,          R\2        '       d   RMR/pRp	V R8X  d'   \5        RP                  \7        W8V	4      4      4       ^ # V R8X  d   \9        W8V	4      p
\"        P$                  '       g>   \;        RR4      ;_uu_ 4       pVP=                  RP                  V
4      4       RRR4       \"        P&                  '       d   \5        RP                  V
4      4       \5        R4       ^ # \?        4       h  + '       g   i     LW; i)condaz__main__.pyz&Directory is not a conda source root: functionkwargstarget_pathconda.egg-linkconda_source_rootzeasy-install.pthzconda.egg-infoc              3   T   "   T F  qR ,          \         P                  8H  x  K   	  R# 5irG   rI   rJ   s   & rD   rM   !initialize_dev.<locals>.<genexpr>   r_   rO   TFzGOperation failed. Privileged install disallowed for 'conda init --dev'.PYTHONHASHSEEDl        PYTHON_MAJOR_VERSIONTEST_PLATFORMwinunixbash
cmd.exezdev-init.batwNznow run  > .\dev-init.bat)
CONDA_DEFAULT_ENV	CONDA_EXE_CE_M	_CE_CONDACONDA_PREFIXCONDA_PREFIX_1CONDA_PREFIX_2CONDA_PYTHON_EXECONDA_PROMPT_MODIFIERCONDA_SHLVL) r&   rh   prefixrc   getcwd_get_python_infor   r   r+   rP   appendremove_conda_in_sp_dirr;   make_conda_egg_linkmodify_easy_install_pthmake_dev_egg_info_filerQ   r   rR   verboserT   ri   rS   r   r   r"   rg   _initialize_dev_bash_initialize_dev_cmdexer#   writeNotImplementedError)shelldev_env_prefixrw   r   
python_exepython_versionsite_packages_dirrV   env_varsunset_env_varsscriptfhs   &&&         rD   initialize_devr      s    N00cjj1F0??BIIK@4DV4L1J 1$('=ABB45F4GH
 	
 V$DKK.770	
 	KK+44t$57GH#%6	
 	KK/88t$57IJ#%6	
 	KK.77t$57GH	
 TN'///4,
s
@4
@sss
@4
@@@U
 	

 	'!Z0q 1&&fH
N dii,V~NOP  
)	'.I>3//26*+ 0???$))F#$*+  "## 0/s   .!KK.	c              #   .  "   \        \        P                  4      p\        '       d   R V R2pR V 4        Rj  xL
  R \	        VP                  4       4       4        Rj  xL
  RV R2x  \        P                  '       d   RV  R2x  R# R#  LV L05i)	z$(cygpath 'z')c              3   ,   "   T F
  pR V 2x  K  	  R# 5i)zunset Nr:   rK   envvars   & rD   rM   '_initialize_dev_bash.<locals>.<genexpr>   s     ?f&!s   Nc              3   8   "   T F  w  rR V RV R2x  K  	  R# 5i)zexport z=''Nr:   rK   r   values   &  rD   rM   r      s%      :R'&E7!$:R   z	eval "$("z" -m conda shell.bash hook)"zconda activate 'r   )r   rh   
executabler"   sorteditemsr   auto_activate)r   r   r   sys_executables   &&& rD   r   r      s     S^^,Nv&~&6b9 @???:@AQ:R  
 n%%A
BB  **  @s'   8BB'B"B#!BBBc              #   h  "   R p\         P                  '       d   Rp\        V R4      pRx  R V 4        Rj  xL
  R \        VP	                  4       4       4        Rj  xL
  RVR,           R	V 2x  R
x  \         P
                  '       d   RVR,           RV RV  R2x  R
x  R# R#  Lt LN5i) z--devcondabinzo@IF NOT "%CONDA_PROMPT_MODIFIER%" == "" @CALL SET "PROMPT=%%PROMPT:%CONDA_PROMPT_MODIFIER%=%_empty_not_set_%%%"c              3   .   "   T F  pR V R2x  K  	  R# 5i)z@SET =Nr:   r   s   & rD   rM   )_initialize_dev_cmdexe.<locals>.<genexpr>  s     ?f%xq!s   Nc              3   8   "   T F  w  rR V RV R2x  K  	  R# 5i)z@SET "r   "Nr:   r   s   &  rD   rM   r     s%      8P}v&%"8Pr   z@CALL "conda_hook.batz" z,@IF %ERRORLEVEL% NEQ 0 @EXIT /B %ERRORLEVEL%	conda.batz" activate z "r   )r   devr   r   r   r   )r   r   r   dev_argr   s   &&&  rD   r   r     s     G{{{FJ'H	R @???8>x~~?O8P  
 H//07)
<<
88 ;./{7)2fXQOO<<  @s'   7B2B.'B2!B0".B2B20B2c                 >   \        WW#VR 7      p\        V4       \        P                  '       g   \	        V4       \        V4       \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        R\        P                  R7       ^# R# )r[   c              3   T   "   T F  qR ,          \         P                  8H  x  K   	  R# 5irG   rI   rJ   s   & rD   rM   'add_condabin_to_path.<locals>.<genexpr>0  r_   rO   TFr`   ra   N)
make_condabin_planrQ   r   rR   re   rT   rS   rg   rh   ri   )rU   rj   rk   rl   r\   rV   s   &&&&& rD   add_condabin_to_pathr   &  sn    hGD TN???$t
s
@4
@sss
@4
@@@!

3 ArC   c                     \        V 4      w  rp. p\        '       dA   \        V RR4      pVP	                  R\
        P                  RR\        V RR4      RV //4       MCVP	                  R\        P                  RR\        V RR	4      RV R
RRR//4       \        V RR	4      pVP	                  R\        P                  RRVRV R
RRR//4       \        '       Ed   VP	                  R\        P                  RR\        V RR4      RV //4       VP	                  R\        P                  RR\        V RRR4      RV //4       VP	                  R\        P                  RR\        V RR4      RV //4       VP	                  R\        P                  RR\        V RR4      RV //4       VP	                  R\        P                  RR\        V RR4      RV //4       VP	                  R\        P                  RR\        V RR4      RV //4       VP	                  R\        P                  RR\        V RR4      RV //4       VP	                  R\        P                  RR\        V RR4      RV //4       VP	                  R\         P                  RR\        V RR4      RV //4       VP	                  R\"        P                  RR\        V \$        R4      RV //4       VP	                  R\&        P                  RR\        V \$        R4      RV //4       VP	                  R\(        P                  RR\        V RRR4      RV //4       VP	                  R\*        P                  RR\        V RRRR4      RV //4       VP	                  R\,        P                  RR\        V RRR 4      RV //4       VP	                  R\.        P                  RR\        V RRR!4      RV //4       V'       d4   VP	                  R\0        P                  RR\        VR"R#4      RV //4       M\3        R$V  2\4        P6                  R%7       VP	                  R\8        P                  RR\        V RRR&4      RV //4       V#   \         d
    R R R r2p ELfi ; i)'NScriptszconda-script.pyrs   rt   ru   	conda.exerU   r   rr   module	conda.clifuncmainbinr   Library_conda_activate.batrename_tmp.batconda_auto_activate.batr   activate.batdeactivate.batactivate
deactivateetcz	profile.dzconda.shfishzconf.dz
conda.fishr   
Conda.psm1zconda-hook.ps1xontribz	conda.xshzNWARNING: Cannot install xonsh wrapper without a python interpreter in prefix: ra   z	conda.csh)r   OSErrorr"   r   r   make_entry_point_exer;   make_entry_pointinstall_condabin_conda_batinstall_library_bin_conda_bat#install_condabin_conda_activate_batinstall_condabin_rename_tmp_bat(install_condabin_conda_auto_activate_batinstall_condabin_hook_batinstall_Scripts_activate_batinstall_activate_batinstall_deactivate_batinstall_activater%   install_deactivateinstall_conda_shinstall_conda_fishinstall_conda_psm1install_conda_hook_ps1install_conda_xshrg   rh   ri   install_conda_csh)rU   r   r   r   rV   conda_exe_paths   &     rD   rP   rP   :  sM   I8H8V5
$5 D
 vlI7HI099!4i#M"L	
 	,55!4j'#J"LkF	
	
 lE7;KK(11~+		

 v6??!4j+#N"L	
 	9BB!4i#T"L	
 	?HH!4$j2G$ #L	
	
 	;DD!4jBR#S"L	
 	DMM!4$j2K$ #L	
	
 	5>>!4jBR#S"L	
 	8AA!4i#P"L	
 	099!4j.#Q"L	
 	2;;!4jBR#S"L	
 	KK(11tL-L	
 	KK*33tL-N	
 	KK(11tL%jQ	
 	KK*33t %<  		

 	KK*33tL':|T	
 	KK.77t ':7G  		

 -66!4(99k#R"L	
 	\n	

 	KK)22tL%kR	
 Ky  I8<dD$5
$5Is   Q# #Q76Q7c                	  a \        V 4      p\        V4      pVRR0,          '       Ed   RV9   dc   V'       d[   \        \        R\        '       g   \
        '       d   RMR4      4      pVP                  R\        P                  RRVR	V R
RRV//4       RV9   dt   V'       dl   R\        P                  9   d   \        \        RR4      4      pM\        \        RR4      4      pVP                  R\        P                  RRVR	V R
RRV//4       V'       d*   VP                  R\        P                  RRRR	V RV//4       RV9   d   V'       dA   \        \        RRRR4      4      p	VP                  R\        P                  RRV	R	V RV//4       V'       dA   \        \        RRRR4      4      p	VP                  R\        P                  RRV	R	V RV//4       RV9   d   V'       d?   \        \        RR4      4      p
VP                  R\        P                  RRV
R	V RV//4       V'       dO   \
        '       d   \        \        RRR4      4      p
MRp
VP                  R\        P                  RRV
R	V RV//4       RV9   dI   V'       dA   \        \        RR4      4      pVP                  R\        P                  RRVR	V R
RRV//4       RV9   df   V'       d   RoV'       d   RoV3R lp\        V! RRR4      4      pV F2  pVf   K	  VP                  R\        P                  RRVR	V RV//4       K4  	  R V9   EdK   V'       d*   VP                  R\        P                  RRR!R	V RV//4       V'       dO   VP                  R\        P                  RRR"R	V RV//4       VP                  R\         P                  RRR#//4       V'       d   VP                  R\"        P                  RR\        V R$R%4      R	V RV//4       \
        '       d4   \%        \&        P(                  4      w  ppV'       d   \+        R&V 24      hM\        \-        R4      R'4      pVP                  R\"        P                  RR\        VR%4      R	V RV//4       V# )(a  
Creates a plan for initializing conda in shells.

Bash:
On Linux, when opening the terminal, .bashrc is sourced (because it is an interactive shell).
On macOS on the other hand, the .bash_profile gets sourced by default when executing it in
Terminal.app. Some other programs do the same on macOS so that's why we're initializing conda
in .bash_profile.
On Windows, there are multiple ways to open bash depending on how it was installed. Git Bash,
Cygwin, and MSYS2 all use .bash_profile by default.

PowerShell:
There's several places PowerShell can store its path, depending on if it's Windows PowerShell,
PowerShell Core on Windows, or PowerShell Core on macOS/Linux. The easiest way to resolve it
is to just ask different possible installations of PowerShell where their profiles are.
r   zsh~.bash_profile.bashrcrs   rt   ru   rU   r   r\   ZDOTDIR$ZDOTDIR.zshrc/etc/profile.d/conda.shr   .configconfig.fishxonsh.xonshrc%ALLUSERSPROFILE%xonshrc/etc/xonshrctcsh.tcshrc
powershell$PROFILE.CurrentUserAllHosts$PROFILE.AllUsersAllHostsc               7      <"   V  F-  p \        VR RS34      P                  P                  4       x  K/  	  R#   \         d     KA  i ; i5iz
-NoProfilez-CommandNr2   stdoutstrip	Exception	exe_namesexe_nameprofiles   * rD   find_powershell_paths3make_initialize_plan.<locals>.find_powershell_paths  L     %)!<WEfUUW% &
 ! %   A)9AAAAApwshpwsh-previewr   z>HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRunz?HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRunOHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabledr   Anaconda Prompt.lnkzCould not get Desktop folder: Desktop)rP   setr&   r   r!   r"   r   init_sh_userr;   rc   environinit_sh_systeminit_fish_userinit_xonsh_userinit_powershell_userinit_cmd_exe_registryinit_long_pathinstall_anaconda_promptr5   r4   r  RuntimeErrorr   )rU   rj   rk   rl   rm   r\   rV   bashrc_path
zshrc_pathconfig_fish_pathconfig_xonsh_pathtcshrc_pathr  config_powershell_pathsconfig_pathdesktop_dir	exceptionr  s   &&&&&&           @rD   rf   rf     s   & \*D[FV Sff/YOK KK 5 5%{&!7	
 F?xBJJ&#DX$>?
#Dh$78
KK 5 5%z&!7	
 KK 7 7%'@&!7	 %d3	6=&QRKK 7 7%'7&!7	 %d3	6=&QRKK 7 7%'7&!7	 & &tC'< =KK 8 8%'8&!7	 v$*,gyA%! %3!KK 8 8%'8&!7	 HT#y12L11!;"LVw	
	
 v4G1G	 #&!,G#
 3K&"$8$A$A );*L%w#	 3 FKK 5 > >% (5&!7	
 KK 5 > >% (5&!7	
 KK 7 7% (7 KK 7 @ @%t(*6K( '!7	 v)89I9I)J&Y&)G	{'STT  #:c?I>KK 7 @ @%tK9N'O&!7	 KrC   c                  a . p\        V4      pVRR0,          '       Ed   RV9   de   V'       d]   \        \        R\        '       g   \        '       d   RMR4      4      pVP                  R\        P                  RRVR	V R
RRVRR//4       RV9   dv   V'       dn   R\        P                  9   d   \        \        RR4      4      pM\        \        RR4      4      pVP                  R\        P                  RRVR	V R
RRVRR//4       V'       d,   VP                  R\        P                  RRRR	V RVRR//4       RV9   d   V'       dC   \        \        RRRR4      4      pVP                  R\        P                  RRVR	V RVRR//4       V'       dC   \        \        RRRR4      4      pVP                  R\        P                  RRVR	V RVRR//4       RV9   d   V'       dA   \        \        RR4      4      p	VP                  R\        P                  RRV	R	V RVRR//4       V'       dQ   \        '       d   \        \        RRR4      4      p	MRp	VP                  R\        P                  RRV	R	V RVRR//4       RV9   dK   V'       dC   \        \        RR4      4      p
VP                  R\        P                  RRV
R	V R
RRVRR//4       RV9   dh   V'       d   RoV'       d   RoV3R lp\        V! RR R!4      4      pV F4  pVf   K	  VP                  R\        P                  RRVR	V RVRR//4       K6  	  R"V9   d   V'       d*   VP                  R\        P                  RRR#R	V RV//4       V'       dO   VP                  R\        P                  RRR$R	V RV//4       VP                  R\        P                  RRR%//4       V# )&z2
Creates a plan to add $PREFIX/condabin to $PATH.
r   r   r   r   r   rs   rt   ru   rU   r   r\   content_typer   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  c               7      <"   V  F-  p \        VR RS34      P                  P                  4       x  K/  	  R#   \         d     KA  i ; i5ir  r  r  s   * rD   r  1make_condabin_plan.<locals>.find_powershell_paths  r  r  r  r  r   z"HKEY_CURRENT_USER\Environment\PATHzTHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PATHr  )r  r&   r   r!   r"   r   r  r;   rc   r  r  r  r  r  add_condabin_to_path_registryr  )rU   rj   rk   rl   r\   rV   r   r!  r"  r#  r$  r  r%  r&  r  s   &&&&&         @rD   r   r     sA    D[FV Sff/YOK KK 5 5%{&!7&(>	 F?xBJJ&#DX$>?
#Dh$78
KK 5 5%z&!7&(>	 KK 7 7%'@&!7&(>	
 %d3	6=&QRKK 7 7%'7&!7&(>	
 %d3	6=&QRKK 7 7%'7&!7&(>	
 & &tC'< =KK 8 8%'8&!7&(>	
 v$*,gyA%! %3!KK 8 8%'8&!7&(>	
 HT#y12L11!;"LVw"$:		
 v4G1G	 #&!,G#
 3K&"$8$A$A );*L%w*,B	#
 3 FKK = F F%'M&!7	 KK = F F% (=&!7	
 KK 7 7% (7 KrC   c           	         V  F  pVP                  R R4      pV\        P                  \        P                  39   d   K<   \	        4       VR,          ,          ! VP                  RR4      / VP                  R/ 4      B pW1R &   K  	  R#   \
         d;   p\        P                  RTR,          TRR7       \        P                  p Rp?LJRp?ii ; i)	rH   Nrs   argsrt   z%s: %rT)exc_infor:   )	getr8   r@   rA   globalsr   loginfor?   )rV   rL   previous_resultrH   es   &    rD   rQ   rQ     s    ((8T2v0@0@AA	'YtJ/0&"%)-(B)?F  X   	'HHXtJ/THB&&F	's    >BC0CCc                   \         ;QJ d    R V  4       F  '       g   K   RM	  RM! R V  4       4      '       Ed   \        P                  ! V RR R7      p\        '       d   ^RIHp Rp \        RR	RR
7      ;_uu_ 4       pVP                  V4       VP                  pRRR4       R\        \        P                  4       R2pV! VRRRV R234      w  rgVe   \        RV 2\        P                  R7       \        V4      ;_uu_ 4       p\        VP!                  4       4      p	RRR4       V'       d   \#        V4      '       d   \%        V4       M\'        R\        P                   R2/ \(        P*                  ! 4       VR7      p
V
P                  P-                  4       pV'       d   \        V\        P                  R7       V
P.                  P-                  4       p	\        P0                  ! X	4      V R&   R# R#   + '       g   i     ELd; i  + '       g   i     L; i  T'       d   \#        T4      '       d   \%        T4       i i i ; i)a  
The strategy of this function differs between unix and Windows.  Both strategies use a
subprocess call, where the subprocess is run with elevated privileges.  The executable
invoked with the subprocess is `python -m conda.core.initialize`, so see the
`if __name__ == "__main__"` at the bottom of this module.

For unix platforms, we convert the plan list to json, and then call this module with
`sudo python -m conda.core.initialize` while piping the plan json to stdin.  We collect json
from stdout for the results of the plan execution with elevated privileges.

For Windows, we create a temporary file that holds the json content of the plan.  The
subprocess reads the content of the file, modifies the content of the file with updated
execution status, and then closes the file.  This process then reads the content of that file
for the individual operation execution results, and then deletes the file.
c              3   T   "   T F  qR ,          \         P                  8H  x  K   	  R# 5irG   rI   rJ   s   & rD   rM   $run_plan_elevated.<locals>.<genexpr>  r_   rO   TFc                     V P                   # N)__dict__)xs   &rD   <lambda>#run_plan_elevated.<locals>.<lambda>  s    ajjrC   )ensure_asciidefault)run_as_adminNzw+z.json)suffixdeleter   z-mzconda.core.initializez'ERROR during elevated execution.
  rc: ra   zsudo z -m conda.core.initialize)envpathstdin:NNN)rS   r*   dumpsr"   common._os.windowsrB  r   r   namer   rh   r   rg   ri   r#   r   readr/   r.   r2   rc   r   r  r  loads)rV   
plan_inputrB  	temp_pathtfr   	hinstance
error_coder   plan_outputrH   ri   s   &           rD   re   re     s     s
@4
@sss
@4
@@@ZZ(

 69I%+DOOSUHHZ( "I P  !!8 9;
(4'>!I;a@PQ)%	 )B:,O ZZ
 y))R"22779"=K * !3!3)$ %''@AYY[ 	F ]]((*Ff3::. ----/K**[)Q[ A POO *) !3!3)$ "49s=   +H! G:A,H! H%H! :H		H! H	H! !(I	c                     \         P                  P                  4       P                  4       p \        P
                  ! V 4      p\        V4       \         P                  P                  \        P                  ! V4      4       R # r;  )
rh   rG  rK  r  r*   rL  rQ   r  r   rH  )rG  rV   s     rD   run_plan_from_stdinrT  3  sK    IINN""$E::eDTNJJTZZ%&rC   c                    \        V 4      ;_uu_ 4       p\        P                  ! \        VP	                  4       4      4      pR R R 4       \        X4       \        V R4      ;_uu_ 4       pVP                  \        \        P                  ! VRR7      4      4       R R R 4       R #   + '       g   i     Lj; i  + '       g   i     R # ; i)Nzw+bF)r@  )	r#   r*   rL  r   rK  rQ   r   r   rH  )rN  r   rV   s   &  rD   run_plan_from_temp_filerV  :  s}    	9		zz*277956 
TN	9e	$	$
tzz$UCDE 
%	$ 
	 
%	$	$s   .B$)1B7$B4	7C	c                    V'       g   \         P                  pV  F4  p\        VP                  R 4      :R VR,          R,          : 2VR7       K6  	  \        ;QJ d    R V  4       F  '       g   K   RM	  RM! R V  4       4      pV'       d5   \
        P                  '       d   \        RVR7       R# \        R	VR7       R# \
        P                  '       d   \        R
VR7       R# \        RVR7       R# )rH   14rt   ru   ra   c              3   d   "   T F&  qP                  R 4      \        P                  8H  x  K(  	  R# 5irG   )r1  r8   r@   rJ   s   & rD   rM   %print_plan_results.<locals>.<genexpr>J  s      IDD((8$7Ds   .0TFzW
==> DRY RUN: The above changes would have been made. NO ACTUAL CHANGES WERE MADE. <==
zK
==> For changes to take effect, close and re-open your current shell. <==
z)DRY RUN: No action would have been taken.zNo action taken.N)rh   r  rg   r1  rS   r   rR   )rV   streamrL   changeds   &&  rD   rT   rT   B  s    (+T(^M-JKRX	
 
 cIDIcccIDIIG???k
 _
 ???=FK$62rC   c                 F   T p\        V4      '       d.   \        V4      ;_uu_ 4       pVP                  4       pR R R 4       MRp\        '       d   RpM!\	        V\        4       4      p\        VRR7      p\        R4      p	T\        R4      RVR8X  d   T	MRRVR	V/,          ,          pVX8w  d   \        P                  '       d+   \        R
4       \        V 4       \        \        Wg4      4       \        P                  '       gZ   \        \        V4      4       \        VR4      ;_uu_ 4       p
V
P                  V4       R R R 4       \        '       g   \!        V4       \"        P$                  # \"        P&                  #   + '       g   i     ELJ; i  + '       g   i     L[; i)Nr   T)with_usr_bin_enva  
    # Before any more imports, leave cwd out of sys.path for internal 'conda shell.*' commands.
    # see https://github.com/conda/conda/issues/6549
    if len(sys.argv) > 1 and sys.argv[1].startswith('shell.') and sys.path and sys.path[0] == '':
        # The standard first entry in sys.path is an empty string,
        # and os.path.abspath('') expands to os.getcwd().
        del sys.path[0]
    z
    # -*- coding: utf-8 -*-
    import sys
    %(extra)s
    if __name__ == '__main__':
        from %(module)s import %(func)s
        sys.exit(%(func)s())
    extrar   r   r   r   r   )r   r#   rK  r"   r   r'   r3   r   r   r   rg   	make_diffrR   r-   r	   r   r0   r8   r@   rA   )ru   rU   r   r   conda_ep_pathr   original_ep_contentnew_ep_contentpython_pathconda_extrafdsts   &&&&       rD   r   r   b  sT     Mm}%%"$'') &% !v<)>)@A9$
 		K d		 	+ 52&	 N ,,???$K+)/@AGM*+=#..$

>* /6.k &%%^ /.s   E<+F<F	F 	c                    \         P                  \        9  d/   \        R \         P                  : R\	        \        4       R24      hT p\        \        \        \         P                  ,          4      p\        V4      '       d,   \        VR4      \        VR4      8X  d   \        P                  # \         P                  '       g:   \        \        V4      4      '       g   \        \        V4      4       \        W24       \        P                   # )z2Windows entry point stub not available for subdir z. Supported: .md5)r   subdirr   r   r$   r   r   r   r1   r8   rA   rR   r   r	   r-   r,   r@   )ru   rU   exe_pathsource_exe_paths   &&  rD   r   r     s    ~~77!@@R S"#=>?qB
 	
 H6w~~FO hx';+NN###???WX&''GH%& 	_'??rC   c           
      L   \        \        R R4      p\        \        P                  R,          RR4      pRRP	                  \        VRR4      \        VRR	4      4      3p\
        P                  p\        P                  '       gN   \        R
RRV ,           RP                  V4      R\        R4      ,           RV,           4       \
        P                  pV'       dL   \        P                  P                  V4      '       d'   \        P                  ! V4       \
        P                  pV# )r   zconda_icon.icoHOMEPATHr  r  z/Kz""{}" && "{}""r   r   r   z%windir%\System32\cmd.exezAnconda Promptr    r   )r   r   rc   r  formatr8   rA   r   rR   r6   r   r@   rF  r   remove)ru   rU   r\   	icon_pathtargetr/  rH   s   &&&    rD   r  r    s     '2BCI"**Z()5JKF 	z+;<z+DE	
D F???)HHTNC N	
 77>>&!!IIf__FMrC   c                    \        V 4      '       d.   \        V 4      ;_uu_ 4       pVP                  4       pR R R 4       MRpTpVX8w  d   \        P                  '       d+   \        R4       \        V 4       \        \        W44      4       \        P                  '       gS   \        \        V 4      4       \        V R4      ;_uu_ 4       pVP                  V4       R R R 4       \        P                  # \        P                  # \        P                  #   + '       g   i     L; i  + '       g   i     \        P                  # ; i)Nr   r   r   )r   r#   rK  r   r   rg   r`  rR   r-   r	   r   r8   r@   rA   )ru   file_contentr   original_contentnew_contentrf  s   &&    rD   _install_filerx    s    k{##r!wwy $# K&&???$K+),:;GK();,,

;' -v% $# -,s   DD%D"	%E	c                 L    \        4       P                  R R7      p\        W4      # F)r   )r   hookrx  ru   rU   ru  s   && rD   r   r     #    !#((u(=L33rC   c                     \        \        R RR4      p\        V4      ;_uu_ 4       pVP                  4       pRRR4       \	        V X4      #   + '       g   i     L; i)r   r   r   Nr   r   r#   rK  rx  ru   rU   src_pathfsrcru  s   &&   rD   r   r     sF    &NKH	8		yy{ 
l33 
	   AA	c                     \        \        R RR4      p\        V4      ;_uu_ 4       pVP                  4       pRRR4       \	        V X4      #   + '       g   i     L; i)r   r   r   Nr  r  s   &&   rD   r   r     sF    &^LH	8		yy{ 
l33 
	r  c                     \        \        R RR4      p\        V4      ;_uu_ 4       pVP                  4       pRRR4       \	        V X4      #   + '       g   i     L; i)r   r   r   Nr  r  s   &&   rD   r   r     sG    &=MNH	8		yy{ 
l33 
	r  c                     \        \        R RR4      pRV R2p\        V4      ;_uu_ 4       pW4P                  4       ,          pRRR4       \	        W4      #   + '       g   i     L; i)r   r   r   #!/bin/sh
_CONDA_ROOT=""
Nr  ru   rU   r  ru  r  s   &&   rD   r   r     sU    &
CH-l^3?L	8				# 
33 
	   AA&	c                     \        \        R RR4      pRV R2p\        V4      ;_uu_ 4       pW4P                  4       ,          pRRR4       \	        W4      #   + '       g   i     L; i)r   r   r   r  r  Nr  r  s   &&   rD   r   r     sU    &EH-l^3?L	8				# 
33 
	r  c                     \        \        R RR4      p\        V4      ;_uu_ 4       pVP                  4       pRRR4       \	        V X4      #   + '       g   i     L; i)r   r   r   Nr  ru   rU   conda_bat_src_pathr  ru  s   &&   rD   r   r   !  sH    0':{S	%	&	&$yy{ 
'l33 
'	&r  c                     \        \        R RRR4      p\        V4      ;_uu_ 4       pVP                  4       pRRR4       \	        V X4      #   + '       g   i     L; i)r   r   r   r   Nr  r  s   &&   rD   r   r   )  sN    GY{ 
%	&	&$yy{ 
'l33 
'	&s   AA	c                     \        \        R RR4      p\        V4      ;_uu_ 4       pVP                  4       pRRR4       \	        V X4      #   + '       g   i     L; i)r   r   r   Nr  r  s   &&   rD   r   r   3  sM    GZ1F 
%	&	&$yy{ 
'l33 
'	&r  c                     \        \        R RR4      p\        V4      ;_uu_ 4       pVP                  4       pRRR4       \	        V X4      #   + '       g   i     L; i)r   r   r   Nr  r  s   &&   rD   r   r   =  I    0':GWX	%	&	&$yy{ 
'l33 
'	&r  c                     \        \        R RR4      p\        V4      ;_uu_ 4       pVP                  4       pRRR4       \	        V X4      #   + '       g   i     L; i)r   r   r   Nr  r  s   &&   rD   r   r   E  sM    GZ1J 
%	&	&$yy{ 
'l33 
'	&r  c                     \        \        R RR4      p\        V4      ;_uu_ 4       pVP                  4       pRRR4       \	        V X4      #   + '       g   i     L; i)r   r   r   Nr  r  s   &&   rD   r   r   O  r  r  c                 L    \        4       P                  R R7      p\        W4      # rz  )r   r{  rx  r|  s   && rD   r   r   W  s"     ?''e'<L33rC   c                     \        \        R RR4      p\        V4      ;_uu_ 4       pVP                  4       pRRR4       \	        V X4      #   + '       g   i     L; i)r   r   r   Nr  )ru   rU   conda_psm1_pathr  ru  s   &&   rD   r   r   ]  sF    -w
LQO	?	#	#tyy{ 
$l33 
$	#r  c                 L    \        4       P                  R R7      p\        W4      # rz  )r   r{  rx  r|  s   && rD   r   r   e  s#    &(--E-BL33rC   c                 L    \        4       P                  R R7      p\        W4      # rz  )r   r{  rx  r|  s   && rD   r   r   k  r}  rC   c                 L    \        4       P                  R R7      p\        W4      # rz  )r   r{  rx  r|  s   && rD   r   r   q  s"    >&&U&;L33rC   c                     \        T \        \        '       d   R MR4      p\        '       d   ^RIHp V! V4      p\        R4      RVRV /,          pV# )r   rr   win_path_to_unixa  
        # >>> conda initialize >>>
        # !! Contents within this block are managed by 'conda init' !!
        if test -f %(conda_exe)s
            eval %(conda_exe)s "shell.fish" "hook" $argv | source
        else
            if test -f "%(conda_prefix)s/etc/fish/conf.d/conda.fish"
                . "%(conda_prefix)s/etc/fish/conf.d/conda.fish"
            else
                set -x PATH "%(conda_prefix)s/bin" $PATH
            end
        end
        # <<< conda initialize <<<
        	conda_exerU   )r   r%   r"   common.pathr  r   rU   r  r  conda_initialize_contents   &   rD   _config_fish_contentr  w  sV    \=+WUIv2$Y/	#	   	Y	 & $#rC   c                 p    \        V R 4      p\        '       d   ^RIHp V! V4      p\	        RV R24      pV# )r   r  z
        # >>> conda initialize >>>
        # !! Contents within this block are managed by 'conda init' !!
        set -x PATH "z3" $PATH
        # <<< conda initialize <<<
        r   r"   r  r  r   )rU   condabin_dirr  r  s   &   rD   ,_config_fish_content_to_add_condabin_to_pathr    sI    j1Lv2'5# #^ $		  $#rC   c                $    V ^8  d   QhR\         /#    r*  ContentTypeOptions)rp  s   "rD   __annotate__r    s     `  `  %	` rC   c                    T p \        V4      ;_uu_ 4       pVP                  4       pR R R 4       XpRpTR8X  d   \        T4      p	M"TR8X  d   \	        T4      p	M\        RT R24      hT'       du   \        P                  ! RT 2RT\        P                  R	7      p\        P                  ! R
\        ,           RT\        P                  \        P                  ,          R	7      pM\        '       g9   \        P                  ! R\        T4       R2RT 2T\        P                  R	7      p\        P                  ! RRT RT 2T\        P                  R	7      p\        P                  ! RRT 2T\        P                  R	7      pRp
\        P                  ! \        T
T\        P                  R	7      pTP                  Y4      pRT9  d   TRT	 R2,          pYg8w  d   \        P                  '       d+   \!        R4       \!        T 4       \!        \#        Yv4      4       \        P$                  '       gm   \'        \)        T4      4      '       g   \+        \)        T4      4       \        TR4      ;_uu_ 4       pTP-                  T4       R R R 4       \.        P0                  # \.        P0                  # \.        P2                  #   + '       g   i     EL; i  \         d    Rp EL h ; i  + '       g   i     \.        P0                  # ; i)Nr   ## commented out by conda initializerp   r   Unknown content_type='.'. Use 'initialize' or 'add_condabin_to_path'.#\s(.*?)\s*\1flags^\s*z"^[ \t]*?(set -gx PATH ([\'\"]?).*?z\/bin\2 [^\n]*?\$PATH)# \1  z^^[ \t]*[^#\n]?[ \t]*((?:source|\.) .*etc\/fish\/conf\.d\/conda\.fish.*?)\n(conda activate.*?)$\n# \2  zJ^[ \t]*[^#\n]?[ \t]*((?:source|\.) .*etc\/fish\/conda\.d\/conda\.fish.*?)$__CONDA_REPLACE_ME_123__# >>> conda initialize >>>r   r   )r#   rK  FileNotFoundErrorr  r  
ValueErrorresub	MULTILINECONDA_INITIALIZE_RE_BLOCKDOTALLr"   r   replacer   r   rg   r`  rR   r
   r	   r-   r   r8   r@   rA   ru   rU   r\   r*  user_rc_pathr   
rc_contentrc_original_contentconda_init_commentr  replace_strs   &&&&       rD   r  r    s    L|$$J % %>|##7#E 	/	/#O$
  $\N2`a
 	
 VV-./,,	

 VV//))bll*	

 v5h|6L5M N ,-.llJ VV$()2D1EF,,

 VVY()*,,	

 1VV%,,	

  ''N
'z9B78;;J(???$K+)/<=',/00-.<--$ .vm %$$ 
Z .-s9   K J=K 3K&=K	K K K#!K#&L	c                     \        T \        \        '       d   R MR4      p\        '       d   ^RIHp V! V4      p\        R4      P                  VR7      pV# )r   rr   r  a~  
    # >>> conda initialize >>>
    # !! Contents within this block are managed by 'conda init' !!
    if !(test -f "{conda_exe}"):
        import sys as _sys
        from types import ModuleType as _ModuleType
        _mod = _ModuleType("xontrib.conda",
                        "Autogenerated from $({conda_exe} shell.xonsh hook)")
        __xonsh__.execer.exec($("{conda_exe}" "shell.xonsh" "hook"),
                            glbs=_mod.__dict__,
                            filename="$({conda_exe} shell.xonsh hook)")
        _sys.modules["xontrib.conda"] = _mod
        del _sys, _mod, _ModuleType
    # <<< conda initialize <<<
    )r  )r   r%   r"   r  r  r   rp  r  s   &   rD   _config_xonsh_contentr    sP    \=+WUIv2$Y/	#	   fyf!! " $#rC   c                 l    \        V R 4      p\        '       d   ^RIHp V! V4      p\	        RV R24      # )r   r  z
        # >>> conda initialize >>>
        # !! Contents within this block are managed by 'conda init' !!
        $PATH.insert(0, "z.")
        # <<< conda initialize <<<
        r  )rU   condabin_pathr  s   &  rD   -_config_xonsh_content_to_add_condabin_to_pathr  !  sC    z2Mv2(7 ( )		 rC   c                $    V ^8  d   QhR\         /# r  r  )rp  s   "rD   r  r  1  s     I  I  %	I rC   c                    T p \        V4      ;_uu_ 4       pVP                  4       pR R R 4       XpRpTR8X  d   \        T4      p	M"TR8X  d   \	        T4      p	M\        RT R24      hT'       du   \        P                  ! RT 2RT\        P                  R	7      p\        P                  ! R
\        ,           RT\        P                  \        P                  ,          R	7      pMSRp
\        P                  ! \        T
T\        P                  R	7      pTP                  Y4      pRT9  d   TRT	 R2,          pYg8w  d   \        P                  '       d+   \        R4       \        T 4       \        \        Yv4      4       \        P                   '       gm   \#        \%        T4      4      '       g   \'        \%        T4      4       \        TR4      ;_uu_ 4       pTP)                  T4       R R R 4       \*        P,                  # \*        P,                  # \*        P.                  #   + '       g   i     EL; i  \         d    Rp EL h ; i  + '       g   i     \*        P,                  # ; i)Nr   r  rp   r   r  r  r  r  r  r  r  r  r   r   )r#   rK  r  r  r  r  r  r  r  r  r  r  r   r   rg   r`  rR   r
   r	   r-   r   r8   r@   rA   r  s   &&&&       rD   r  r  1  s    L|$$J % %>|##8#F 	/	/#P$
  $\N2`a
 	
 VV-./,,	

 VV//))bll*	

 1VV%,,	

  ''N
'z9B78;;J(???$K+)/<=',/00-.<--$ .v %$$ 
l .-s9   H4 H H4 I	 H1	+H4 1H4 4II	I(	c           	      F   \        T \        \        '       d   R MR4      p\        '       d'   ^RIHp V! V4      p\        R4      RVRV/,          pV# VR
9   d&   \        R4      RVRVR\        V4      RV /,          pV# \        R	4      RVRVR\        V4      RV /,          pV# )r   rr   r  a  
        # >>> conda initialize >>>
        # !! Contents within this block are managed by 'conda init' !!
        if [ -f '%(conda_exe)s' ]; then
            eval "$('%(conda_exe)s' 'shell.%(shell)s' 'hook')"
        fi
        # <<< conda initialize <<<
        r  r   a  
            # >>> conda initialize >>>
            # !! Contents within this block are managed by 'conda init' !!
            if ( -f "%(conda_prefix)s/etc/profile.d/conda.csh" ) then
                source "%(conda_prefix)s/etc/profile.d/conda.csh"
            else
                setenv PATH "%(conda_bin)s:$PATH"
            endif
            # <<< conda initialize <<<
            	conda_binrU   ak  
            # >>> conda initialize >>>
            # !! Contents within this block are managed by 'conda init' !!
            __conda_setup="$('%(conda_exe)s' 'shell.%(shell)s' 'hook' 2> /dev/null)"
            if [ $? -eq 0 ]; then
                eval "$__conda_setup"
            else
                if [ -f "%(conda_prefix)s/etc/profile.d/conda.sh" ]; then
                    . "%(conda_prefix)s/etc/profile.d/conda.sh"
                else
                    export PATH="%(conda_bin)s:$PATH"
                fi
            fi
            unset __conda_setup
            # <<< conda initialize <<<
            cshr   )r   r%   r"   r  r  r   r	   )rU   r   r  r  r  s   &&   rD   _bashrc_contentr  }  s    \=+WUIv2$Y/	#'	$
 U
$
 p $#U O#'+	( YWY/	($R $#/ (,($ YWY/	#($. $#rC   c                     \        V R 4      p\        '       d!   ^RIHp V! V4      p\	        RV RV R24      # VR
9   d   \	        RV RV R24      # \	        RV R	24      # )r   r  z
            # >>> conda initialize >>>
            # !! Contents within this block are managed by 'conda init' !!
            if [ -d 'z'' ]; then
                export PATH="zJ:$PATH"
            fi
            # <<< conda initialize <<<
            z
            # >>> conda initialize >>>
            # !! Contents within this block are managed by 'conda init' !!
            if ( -d "z&" ) then
                setenv PATH "zM:$PATH"
            endif
            # <<< conda initialize <<<
            z
        # >>> conda initialize >>>
        # !! Contents within this block are managed by 'conda init' !!
        export PATH="z3:$PATH"
        # <<< conda initialize <<<
        r  r  )rU   r   r  r  s   &&  rD   '_bashrc_content_to_add_condabin_to_pathr    s    z2Mv2(7 $_ %+_ -		
 		
  $_ %+_ -		
 		
  $_ %		 rC   c                $    V ^8  d   QhR\         /# r  r  )rp  s   "rD   r  r    s     o  o 
 %o rC   c                 p   T p \        V4      ;_uu_ 4       pVP                  4       pR R R 4       XpTR8X  d   \        Y4      p	M"TR8X  d   \	        Y4      p	M\        RT R24      hRp
T'       dv   \        P                  ! RT
 2RT\        P                  R	7      p\        P                  ! R
\        ,           RT\        P                  \        P                  ,          R	7      pEMM\        '       g9   \        P                  ! R\        T4       R2RT
 2T\        P                  R	7      p\        P                  ! RRT
 RT
 2T\        P                  R	7      p\        P                  ! RRT
 2T\        P                  R	7      p\        '       d*   \        P                  ! RRT\        P                  R	7      pM(\        P                  ! RRT\        P                  R	7      pRp\        P                  ! \        TT\        P                  R	7      pTP                  Y4      pRT9  d   TRT	 R2,          pYx8w  d   \        P                  '       d+   \!        R4       \!        T 4       \!        \#        Y4      4       \        P$                  '       g?   \        TR4      ;_uu_ 4       pTP'                  T4       R R R 4       \(        P*                  # \(        P*                  # \(        P,                  #   + '       g   i     EL; i  \         d    Rp EL h ; i  + '       g   i     \(        P*                  # ; i)Nr   rp   r   r  r  r  r  r  r  r  z^[ \t]*?(export PATH=[\'\"].*?z\/bin:\$PATH[\'\"])r  zY^[ \t]*[^#\n]?[ \t]*((?:source|\.) .*etc\/profile\.d\/conda\.sh.*?)\n(conda activate.*?)$r  zD^[ \t]*[^#\n]?[ \t]*((?:source|\.) .*etc\/profile\.d\/conda\.sh.*?)$zE^[ \t]*^[ \t]*[^#\n]?[ \t]*((?:source|\.) .*Scripts[/\\]activate.*?)$z)# \1  # commented out by conda initializez=^[ \t]*^[ \t]*[^#\n]?[ \t]*((?:source|\.) .*bin/activate.*?)$r  r  r   r   )r#   rK  r  r  r  r  r  r  r  r  r  r"   r   r  r   r   rg   r`  rR   r   r8   r@   rA   )ru   rU   r   r\   r*  r  r   r  r  r  r  r  s   &&&&&       rD   r  r    s    L|$$J % %|##2<#G 	/	/#J$
  $\N2`a
 	
 ?VV-./,,	

 VV//))bll*	

 v1(<2H1I J ,-.llJ VV$()2D1EF,,

 VVS()*,,	

 6X<ll	J P<ll	J 1VV%,,	

  ''N
'z9B78;;J(???$K+)/<=<--$ .vI %$$ 
v .-s9   L K-L #L-K>	8L >L LLL5	c                $    V ^8  d   QhR\         /# r  r  )rp  s   "rD   r  r  U  s     * * %	*rC   c                    T p\        V4      '       d.   \        V4      ;_uu_ 4       pVP                  4       pR R R 4       MRpV'       dI   \        V4      '       d'   \        P                  ! V4       \
        P                  #  \
        P(                  # VR8X  d   \        VR4      pM#VR8X  d   \        VR4      pM\        RV R24      hXV8w  d   \        P                  '       d+   \        R4       \        V 4       \        \        Wv4      4       \        P                  '       go   \        V4      '       d   \!        V4       \#        \%        V4      4       \        VR4      ;_uu_ 4       pVP'                  V4       R R R 4       \
        P                  # \
        P                  # \
        P(                  #   + '       g   i     EL; i  + '       g   i     \
        P                  # ; i)	Nr   rp   posixr   r  r  r   r   )r
   r#   rK  rc   rq  r8   r@   r  r  r  r   r   rg   r`  rR   r/   r.   r-   r	   r   rA   )ru   rU   r\   r*  conda_sh_system_pathr   conda_sh_system_contentsconda_sh_contentss   &&&&    rD   r  r  U  s    '"##+,,')wwy$ -, $& &''II*+??" (6 / <' /g F33 Gg! ( 7> >  $'88dk"i 1LM???/00./ 4563S99RHH./ :??"6??"A -,,: :9??"s   F5+G	5G		G(	c                    V P                  R ^4      w  rVP                  R ^4      w  r4\        \        V4      p \        P                  ! W^ \        P
                  4      p \        P                  ! YT4      pT^ ,          p\        T\        4      '       d   TP                  4       pT^,          p	Y3\        P                  ! T4       #   \         d#   pTP                  \        8w  d   h Ru Rp?# Rp?ii ; i  \         d2    \        P                  ! T4       Ru \        P                  ! T4       # i ; i  \        P                  ! T4       i ; i)\NNN)splitrsplitgetattrwinregOpenKeyKEY_READr   errnor   QueryValueEx
isinstancestrr  CloseKeyr  )
ru   main_keythe_rest
subkey_str
value_namekeyr6  value_tuplevalue_value
value_types
   &         rD   _read_windows_registryr    s    %**43H%__T15Jvx(HnnX1fooF))#:!!nk3''%++-K ^
& 	#  77f  
 	sB   &C !AC8 C5C0*C50C58#D4D7 3D44D7 7Ec                    V P                  R ^4      w  r4VP                  R ^4      w  rV\        \        V4      p \        P                  ! W5^ \        P
                  4      p \        P                  ! Wv^ W!4       \        P                  ! V4       R#   \         d7   pTP                  \        8w  d   h \        P                  ! Y54      p Rp?LmRp?ii ; i  \        P                  ! T4       i ; i)r  N)r  r  r  r  r  	KEY_WRITEr   r  r   	CreateKey
SetValueExr  )	ru   r  r  r  r  r  r  r  r6  s	   &&&      rD   _write_windows_registryr    s    $**43H%__T15Jvx(H5nnX1f6F6FG
#1jF  577fx45 	s#   &B !C C,CCC-c                    \        V 4      w  r4Vf   Rp\        P                  pRP                  \	        VRR4      4      pRV RV 2pV'       dr   VP                  R4      pV Uu. uF  qV9  g   K  VP                  4       NK  	  ppV Uu. uF  qV9  g   K  VP                  4       NK  	  ppRP	                  V4      p	MR	p
\        P                  ! R
V
V^\        P                  \        P                  ,          R7      p	\        P                  ! RV
V	\        P                  \        P                  ,          R7      p	V	P                  V
R,           V
,           V
4      pW8w  d%   Tp	V	P                  V
R,           V
,           V
4      pK*  VP                  W4      p	Wi9  d   V	'       d   V	RV,           ,          p	MTp	W98w  ds   \        P                  '       d+   \        R4       \        V 4       \        \        W94      4       \        P                   '       g   \#        W	V4       \$        P&                  # \$        P(                  # u upi u upi )Nr   z"{}"r   r   z	if exist ro  &z & r  zF(if exist \"[^\"]*?conda[-_]hook\.bat\" \"[^\"]*?conda[-_]hook\.bat\")countr  z(\"[^\"]*?conda[-_]hook\.bat\")r  r   )r  r  REG_EXPAND_SZrp  r   r  r  r  r  
IGNORECASEUNICODEr  r   r   rg   r`  rR   r  r8   r@   rA   )ru   rU   r\   
prev_valuer  old_hook_pathnew_hookautorun_partspart	new_valuer  new_value_2s   &&&         rD   r  r    s    4K@J
))
MM$|ZAQ"RSM=/=/:H #((-2?X-$SWCW-X &3
%2T46OLDJJL] 	 
 JJ}-	0FFU--"**,
	 FF.--"**,	
	  ''e(;k(I;W&#I#++e#k1;K  ''>	$UX--	$	???$K+)J23#KJG_ Y
s   %I2IIIc                 0   \        V 4      w  r4Vf   Rp^p\        VR4      P                  RR4      pVP                  4       pVP	                  R4       Uu. uF  qwP                  4       '       g   K  VNK  	  ppV Uu. uF  qwP                  4       NK  	  p	pV'       d9   \        W4       UU
u. uF  w  rzW8w  g   K  VNK  	  ppp
RP                  V4      pM)Wi9  d   VP                  ^ V4       RP                  V4      pW<8w  ds   \        P                  '       d+   \        R4       \        V 4       \        \        W<4      4       \        P                  '       g   \        WV4       \        P                  # \        P                   # u upi u upi u up
pi )Nr   r   /r  ;r   )r  r   r  lowerr  r  zipinsertr   r   rg   r`  rR   r  r8   r@   rA   )ru   rU   r\   r  r  r  normalized_condabin_pathr  
path_partsnormalized_path_partsnormalized_partnew_path_partsr  s   &&&          rD   r-  r-    s^    4K@J

 z2::3EM,224 $.#3#3C#8I#84JJL$$#8JI6@AjdZZ\jA *-Z)O
)O%: D)O 	 

 HH^,	 $@a/HHZ(	???$K+)J23#KJG = JA
s   F1F=F-
F<Fc                    \         P                  ^,          P                  R4      w  rp\        V4      ^
8  d   \        V4      R8  d   \	        V 4      w  rE\        V4      R8w  d   \         P                  '       d5   \        R4       \        V 4       \        \        \        V4      R4      4       \         P                  '       g   \        V ^\        P                  4       \        P                  # \        P                  # \         P                  '       d'   \        R4       \        R4       \        P                  # R# )   rh  i8  1r   zyNot setting long path registry key; Windows version must be at least 10 with the fall 2016 "Anniversary update" or newer.N)r   os_distribution_name_versionr  intr  r  r   rg   r`  rR   r  r  	REG_DWORDr8   r@   rA   )ru   win_ver_win_revr  r  s   &     rD   r  r  %  s    !>>qAGGLG
7|rc'le3!7!D
z?c!dk"iJ56???'Q8H8HI??"###???$K? ### rC   c                 h    \        T \        \        '       d   R MR4      p\        RV RV R24      pV# )r   rr   zt
    #region conda initialize
    # !! Contents within this block are managed by 'conda init' !!
    If (Test-Path "z") {
        (& "z_" "shell.powershell" "hook") | Out-String | ?{$_} | Invoke-Expression
    }
    #endregion
    )r   r%   r"   r   )rU   r  conda_powershell_modules   &  rD   _powershell_profile_contentr  >  sI    \=+WUI" ; K 			 #"rC   c                 8    \        V R 4      p\        RV R24      # )r   z~
        #region conda initialize
        # !! Contents within this block are managed by 'conda init' !!
        $Env:Path = "zD" + [IO.Path]::PathSeparator + $Env:Path
        #endregion
        )r   r   )rU   r  s   & rD   3_powershell_profile_content_to_add_condabin_to_pathr   O  s1    j1L #^ $		 rC   c                $    V ^8  d   QhR\         /# r  r  )rp  s   "rD   r  r  \  s     B  B  %	B rC   c                    T p\         P                  P                  V4      '       d.   \        V4      ;_uu_ 4       pVP	                  4       pR R R 4       MRpXpV'       dD   \
        P                  ! \        RV^\
        P                  \
        P                  ,          R7      pMVR8X  d   \        V4      pM"VR8X  d   \        V4      pM\        RV R24      hRV9  d   VRV R2,          pMR\
        P                  ! \        R	V^\
        P                  \
        P                  ,          R7      P                  R	V4      pWg8w  d   \        P                  '       d+   \!        R4       \!        V 4       \!        \#        Wv4      4       \        P$                  '       gm   \        \'        V4      4      '       g   \)        \'        V4      4       \        VR
4      ;_uu_ 4       pVP+                  V4       R R R 4       \,        P.                  # \,        P.                  # \,        P0                  #   + '       g   i     EL; i  + '       g   i     \,        P.                  # ; i)Nr   r  rp   r   r  r  z#region conda initializer   r  r   )rc   rF  r
   r#   rK  r  r  CONDA_INITIALIZE_PS_RE_BLOCKr  r  r  r   r  r  r   r   rg   r`  rR   r	   r-   r   r8   r@   rA   )	ru   rU   r\   r*  profile_pathfpprofile_contentprofile_original_contentr  s	   &&&&     rD   r  r  \  s    L 
ww~~l##|$$ ggiO %$ . &&())bll*
 <''B<'P$33CLQ % (6de  &_<$<#=R@@O ff,*ii",,. g02JK  2???$K+)4FG',/00-.<--) .vm %$$d .-s   H(H<(H9	<I	c           
         R pT p\         P                  ! \        \        VR4      4      \        \        VR4      4      \        \        VR4      4      34      pR V 4       pV FV  p\	        R\        W$4       2\
        P                  R7       \        P                  '       g   \        \        W$4      4       RpKX  	  RpV Fb  p\        W&4      p\        V4      '       g   K!  \	        RV 2\
        P                  R7       \        P                  '       g   \        V4       RpKd  	  V'       d   \        P                  # \        P                  # )	Fzconda-*infozconda.*zconda-*.eggc              3   V   "   T F  qP                  R 4      '       d   K  Vx  K!  	  R# 5i)rv   Nendswith)rK   ps   & rD   rM   )remove_conda_in_sp_dir.<locals>.<genexpr>  s     Nk<L1M11ks   )
)zrm -rf ra   T)rr   	conda_env)r   from_iterabler   r   rg   rh   ri   r   rR   r.   r/   r8   r@   rA   )ru   r9   r   rm_rf_thesefnothersotherrF  s   &       rD   r   r     s   H#%%'78'34'78	
K OkNK.345CJJG$(-.	 
F
 %-4==GD6"4???dH  rC   c                    V\         P                  ,           p\        V 4      '       d/   \        V R 4      ;_uu_ 4       pVP	                  4       pRRR4       MRpXV8w  d   \
        P                  '       d[   \        R\        P                  R7       \        V \        P                  R7       \        \        WB4      \        P                  R7       \
        P                  '       gH   \        V R4      ;_uu_ 4       pVP                  \        V4      4       RRR4       \        P                  # \        P                  # \        P                   #   + '       g   i     EL; i  + '       g   i     \        P                  # ; i)rbNr   r   ra   wb)rc   linesepr   r#   rK  r   r   rg   rh   ri   r`  rR   r   r    r8   r@   rA   )ru   rw   conda_egg_link_contentsr   conda_egg_link_contents_olds   &&   rD   r   r     s    /"**<k{D))R*,'')' *) ')#"&==???$SZZ(+CJJ/5OZZ ;---.EFG .v% *)) .-s   E:E!E	!F 	c                 ,  a Tp\        V 4      '       d.   \        V 4      ;_uu_ 4       pVP                  4       pR R R 4       MRpXP                  4       pW%9   d   \        P
                  # \        P                  R,           o\        ;QJ d    . V3R lV 4       F  NK  	  5M! V3R lV 4       4      pV\        P                  ,           \        P                  P                  V4      ,           \        P                  ,           p\        P                  '       d[   \        R\        P                  R7       \        V \        P                  R7       \        \!        WF4      \        P                  R7       \        P"                  '       gH   \        V R4      ;_uu_ 4       pVP%                  \'        V4      4       R R R 4       \        P(                  # \        P(                  #   + '       g   i     EL; i  + '       g   i     \        P(                  # ; i)Nr   rr   c              3   X   <"   T F  qP                  S4      '       d   K  Vx  K!  	  R # 5ir;  r*  )rK   lnln_ends   & rD   rM   *modify_easy_install_pth.<locals>.<genexpr>  s       'r{{6/B's   *
*r   ra   r6  )r   r#   rK  
splitlinesr8   rA   rc   septupler7  r   r   r   rg   rh   ri   r`  rR   r   r    r@   )ru   rw   easy_install_new_liner   old_contentsold_contents_linesnew_contentsr=  s   &&     @rD   r   r     sj   -k{##r779L $# %0022VVgF ' '  	
**	
**//,
-	. **	  d$k

+i3#**E???{D))RHH),78 *??6??7 $##2 *)??s   G G4 G1	4H	c                 (   \        V 4      '       d.   \        V 4      ;_uu_ 4       pVP                  4       pR R R 4       MRp\        R4      \        ,          pXV8X  d   \
        P                  # \        P                  '       d[   \        R\        P                  R7       \        V \        P                  R7       \        \        W#4      \        P                  R7       \        P                  '       g[   \        V 4      '       d   \        V 4       \        V R4      ;_uu_ 4       pVP!                  V4       R R R 4       \
        P"                  # \
        P"                  #   + '       g   i     EL.; i  + '       g   i     \
        P"                  # ; i)Nr   z
    Metadata-Version: 1.1
    Name: conda
    Version: %s
    Platform: UNKNOWN
    Summary: OS-agnostic, system-level binary package manager.
    r   ra   r   )r   r#   rK  r   CONDA_VERSIONr8   rA   r   r   rg   rh   ri   r`  rR   r/   r.   r   r@   )ru   r   rC  rE  s   &   rD   r   r   	  s    k{##r779L $#  		
 		  |#d$k

+i3#**E???;+{C((BHH\" )??6??= $##8 )(??s   E$E2E/	2F	c                 p    R P                  \        V P                  4       VP                  4       4      4      # )r   )r   r   r?  )oldnews   &&rD   r`  r`  +	  s&    99\#.."2CNN4DEFFrC   c                    \        V \        4       4      p\        V R 24      pVP                  P	                  4       VP
                  P	                  4       rCV'       d   VP                  4       ^,          pM+V'       d   VP                  4       ^,          pM\        R4      h\        V \        \        V4      4      4      pWV3# )z
 --versionz(No python version information available.)
r   r'   r2   r  r  ri   r  r  r)   r(   )r   r   rH   r  ri   r   r   s   &      rD   r   r   /	  s    f356J
|:67F]]((*FMM,?,?,AF*	*CDD?OP '888rC   __main__)rp   r   )Fr  r;  )Frp   )__doc__rc   r  rh   difflibr   r  r   r   	itertoolsr   loggingr   os.pathr   r   r	   r
   r   r   r   r   pathlibr   randomr   typingr   r   r   r   r   rG  r   r   r   r   r   r   auxlib.compatr   
auxlib.ishr   base.constantsr   base.contextr   common.compatr   r   r    r!   r"   r#   	common.ior$   r  r%   r&   r'   r(   r)   common.serializer*   
exceptionsr+   gateways.disk.creater,   r-   gateways.disk.deleter.   gateways.disk.linkr/   gateways.disk.permissionsr0   gateways.disk.readr1   gateways.subprocessr2   portabilityr3   r  menuinst.knownfoldersr4   r5   menuinst.winshortcutr6   r;   r3  r  r#  r8   r  rW   rp   r   r   r   r   rP   rf   r   rQ   re   rT  rV  rT   r   r   r  rx  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r  r  r  r  r  r  r-  r  r  r   r  r   r   r   r   r`  r   argvrN  r:   rC   rD   <module>rg     sD  : 
 	 
       W W W    - +  3  7 "  !  $ ( 0 ( ( 7 , 1 9	 @4 .  L 
  AB 2Zz+&=6(_DodNl =*@'F3@; |0D .44444444444444444$8$"` F$4 I X>$B"Jo d*Z< ? D0 f$2#"
B J  F 4 F"TG9" zHHQK		* rC   