+
    "i                        R 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 ^RIHt ]'       d   ^RIHt  ! R	 R
]4      tR# )zClass for themes in HACS.)annotations)TYPE_CHECKING)HomeAssistantError)HacsCategoryHacsDispatchEvent)HacsException)
concurrent)HacsRepository)HacsBasec                     a  ] tR t^tRtR V 3R llt]R 4       tR tR t	R t
R R	 ltR
 R lt]! ^
^R7      RR l4       tR R ltRtV ;t# )HacsThemeRepositoryzThemes in HACS.c                    V ^8  d   QhRRRR/# )   hacsr
   	full_namestr )formats   "4/config/custom_components/hacs/repositories/theme.py__annotate__ HacsThemeRepository.__annotate__   s     $ $X $# $    c                f  < \         SV `  VR7       W P                  n        VP	                  4       V P                  n        \        P                  V P                  n        RV P                  P                  n        V P                  V P                  P                  n        RV P                  n        R# )zInitialize.)r   themesFN)super__init__datar   lowerfull_name_lowerr   THEMEcategorycontentpathremote	localpathlocalsingle)selfr   r   	__class__s   &&&r   r   HacsThemeRepository.__init__   sv    d#'		$-OO$5		!)//		#+ "&..#r   c                    V P                   P                  P                   RV P                  P                  P                  RR4       2# )zReturn localpath.z/themes/.yaml )r   coreconfig_pathr   	file_namereplacer'   s   &r   r$   HacsThemeRepository.localpath   s>     ))..,,-Xdii6I6I6Q6QRY[]6^5_``r   c                B   "   V P                  4       G Rj  xL
  R#  L5i)zRun post installation steps.N_reload_frontend_themesr1   s   &r   async_post_installation+HacsThemeRepository.async_post_installation$        **,,,   c                  "   V P                  4       G Rj  xL
  RpV P                   F7  pVP                  R4      '       g   K  VP                  R4      '       g   K5  Rp M	  V'       g6   \	        V P
                   RV P                  P                  RR4       R	24      hV P                  P                  '       d   RV P                  P                  n        V P                  P                  '       dm   V P                  P                   FR  pV P                  P                   P"                  '       d   K+  V P$                  P'                  R
V P
                  V4       KT  	  V P                  P(                  #  EL`5i)z	Validate.NFzthemes/r+   Tz Repository structure for ztags/r,   z is not compliant%s %s)common_validate	treefiles
startswithendswithr   stringrefr0   repository_manifestcontent_in_rootr!   r"   r#   validateerrorsr   statusstartuploggererrorsuccess)r'   	complianttreefilerI   s   &   r   validate_repository'HacsThemeRepository.validate_repository(   s%     ""$$$ 	H""9--(2C2CG2L2L 	 ' ;;-9$((:J:J7SU:V9WWhi  ##333')DLL$ ==--yy''///KK%%gt{{EB . }}$$$+ 	%s5   E9E6)E9E9E9,AE9=6E94<E95AE9c                &  "   V P                  4        V P                  V P                  P                  n        V P
                  P                  P                  '       d0   V P
                  P                  P                  V 4      G Rj  xL
  R# R#  L5i)zRegistration.N)
update_filenamesr$   r!   r"   r%   r   systemaction
validationasync_run_repository_checksr1   s   &r   async_post_registration+HacsThemeRepository.async_post_registrationB   se      	"&..99"""))&&BB4HHH #Hs   BBB	Bc                   V ^8  d   QhRR/# r   returnNoner   )r   s   "r   r   r   K   s     C Ct Cr   c                R  "   V P                   P                  RV P                  4        V P                  P                  P
                  P                  RR/ 4      G Rj  xL
  R#  L  \         d3   pT P                   P                  RT P                  T4        Rp?R# Rp?ii ; i5i)zReload frontend themes.z%s Reloading frontend themesfrontendreload_themesNr;   )	rH   debugr@   r   hassservices
async_callr   	exception)r'   rb   s   & r   r5   +HacsThemeRepository._reload_frontend_themesK   sy     8$++F	C))..))44ZRTUUU! 	CKK!!'4;;	BB	Cs@   'B'4A' A%A' #B'%A' 'B$2'BB'B$$B'c                   V ^8  d   QhRR/# rX   r   )r   s   "r   r   r   S   s     - -D -r   c                B   "   V P                  4       G Rj  xL
  R#  L5i)zRun post uninstall steps.Nr4   r1   s   &r   async_post_uninstall(HacsThemeRepository.async_post_uninstallS   r8   r9   )concurrenttasksbackoff_timec                ,  "   V P                  W4      G Rj  xL
 '       g   V'       g   R# V P                  P                  '       d   RV P                  P                  n        V P                  4        V P                  V P                  P                  n        V P                  P                  '       d]   V P                  P                  \        P                  RRRRRV P                  P                  RV P                  P                   /4       R# R#  L5i)	zUpdate.Nr,   idi9  rR   update
repositoryrepository_id)common_updaterB   rC   r!   r"   r#   rP   r$   r%   r   	installedr   async_dispatchr   
REPOSITORYr   rk   )r'   ignore_issuesforces   &&&r   update_repository%HacsThemeRepository.update_repositoryW   s      ''===e ##333')DLL$ 	"&.. 99II$$!,,$h $))"5"5#TYY\\	  >s'   DD	DDDA+D4ADc                   V ^8  d   QhRR/# rX   r   )r   s   "r   r   r   q   s     8 8$ 8r   c                *   V P                    F  pVP                  P                  V P                  P                  P
                  4      '       g   KD  VP                  P                  R4      '       g   Kg  VP                  V P                  n	        K  	  R# )zGet the filename to target.r+   N)
tree	full_pathr>   r!   r"   r#   r?   filenamer   r/   )r'   rL   s   & r   rP   $HacsThemeRepository.update_filenamesq   se    		H!!,,!!(( $$--g66&.&7&7		#	 "r   r   )FF)__name__
__module____qualname____firstlineno____doc__r   propertyr$   r6   rM   rU   r5   rf   r   ru   rP   __static_attributes____classcell__)r(   s   @r   r   r      sf    $ $ a a-%4IC- 3 428 8r   r   N)r   
__future__r   typingr   homeassistant.exceptionsr   enumsr   r   
exceptionsr   utils.decoratorr   baser	   r
   r   r   r   r   <module>r      s1     "   7 3 & (  e8. e8r   