+
    "i                    @   R t ^ RIHt ^ RIt^ RIHtHt ^ RIHtH	t	H
t
 ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RIHtHtHtHtHtHtHt ^ RIHt ^ R	I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-H.t. ^ RI/H0t0 ^ RI1H2t2 ^ RI3H4t4H5t5 ^ RI6H7t7 ^ RI8H9t9 ^RI:H;t;H<t<H=t= ^RI>H?t? ^RI@HAtA ^RIBHCtCHDtDHEtEHFtFHGtGHHtH ^RIIHJtJHKtKHLtLHMtMHNtNHOtOHPtPHQtQ ^RIRHStS ^RITHUtUHVtV ^RIWHXtX ^RIYHZtZ ^RI[H\t\ ^RI]H^t^ ^RI_H`t`Hata ^R IbHctc ]'       d   ^R!ITHdtd ^R"IeHftf ^R#IgHhth ]	 ! R$ R%4      4       ti]	 ! R& R'4      4       tj]	 ! R( R)4      4       tk]	 ! R* R+4      4       tl]	 ! R, R-4      4       tm]	 ! R. R/4      4       tn]	 ! R0 R14      4       to ! R2 R34      tpR# )4Base HACS class.)annotationsN)	AwaitableCallable)asdict	dataclassfield)	timedelta)TYPE_CHECKINGAny)AIOGitHubAPIExceptionGitHub	GitHubAPIGitHubAuthenticationExceptionGitHubExceptionGitHubNotModifiedExceptionGitHubRatelimitException)AIOGitHubAPIRepository)ClientSessionClientTimeout)AwesomeVersion)async_create)ConfigEntry)EVENT_HOMEASSISTANT_FINAL_WRITEPlatform)HomeAssistantcallback)async_dispatcher_send)async_track_time_interval)IssueSeverityasync_create_issue)Integration)dt)DOMAINTVURL_BASE)HacsUpdateCoordinator)HacsDataClient)HacsCategoryHacsDisabledReasonHacsDispatchEventHacsGitHubRepo	HacsStageLovelaceMode)AddonRepositoryExceptionHacsExceptionHacsExecutionStillInProgressHacsExpectedExceptionHacsNotModifiedExceptionHacsRepositoryArchivedExceptionHacsRepositoryExistException$HomeAssistantCoreRepositoryException)REPOSITORY_CLASSES)HACS_MANIFEST_KEYS_TO_EXPORTREPOSITORY_KEYS_TO_EXPORT)async_exists)
json_loads)LOGGER)QueueManager)async_load_from_storeasync_save_to_store)async_register_static_path)HacsRepository)HacsData)ValidationManagerc                  t    ] tR t^Lt$ RtRtR]R&   RtR]R&   RtR]R&   Rt	R]R&   R	t
R
]R&   R R ltR tRtR# )RemovedRepositoryzRemoved repository.N
str | None
repositoryreasonlinkstrremoval_typeFboolacknowledgedc                   V ^8  d   QhRR/# )   datadict )formats   "&/config/custom_components/hacs/base.py__annotate__RemovedRepository.__annotate__V   s     1 1 1    c                r    V F0  pW,          f   K  VR9   g   K  V P                  W!V,          4       K2  	  R# )zUpdate data of the repository.N)rG   rH   rJ   rL   )__setattr__selfrO   keys   && rS   update_dataRemovedRepository.update_dataV   s8    Cy      3i0 rV   c           
     ~    RV P                   RV P                  RV P                  RV P                  RV P                  /# )z)Return a JSON representation of the data.rF   rG   rH   rJ   rL   )rF   rG   rH   rJ   rL   rZ   s   &rS   to_jsonRemovedRepository.to_jsonc   s?     $//dkkDIID--D--
 	
rV   rQ   )__name__
__module____qualname____firstlineno____doc__rF   __annotations__rG   rH   rJ   rL   r\   r`   __static_attributes__rQ   rV   rS   rD   rD   L   sA    !J
!FJD*L#L$1
rV   rD   c                  >   ] tR t^nt$ RtRtR]R&   RtR]R&   ]! ]	R7      t
R	]R
&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   ^tR]R&   RtR]R&   RtR]R&   R tR]R!&   RtR]R"&   RtR]R#&   R$ R% ltR& R' ltR(tR# ))HacsConfigurationzHacsConfiguration class.zappdaemon/apps/rI   appdaemon_pathFrK   	appdaemondefault_factoryzdict[str, Any]configNzConfigEntry | Noneconfig_entryALLcountrydebugdev frontend_repo_urlfrontend_repozwww/community/plugin_pathzpython_scripts/python_script_pathpython_scriptintrelease_limitz	hacs:hacssidepanel_iconHACSsidepanel_titlezthemes/
theme_paththemetokenc                   V ^8  d   QhRR/# )rN   returnrI   rQ   )rR   s   "rS   rT   HacsConfiguration.__annotate__   s       rV   c                    \        V 4      # )zReturn a json string.)r   r_   s   &rS   r`   HacsConfiguration.to_json   s    d|rV   c                    V ^8  d   QhRRRR/# )rN   rO   rP   r   NonerQ   )rR   s   "rS   rT   r      s     - -T -d -rV   c                    \        V\        4      '       g   \        R4      hV F$  pVR9   d   K  V P                  W!V,          4       K&  	  R# )zSet attributes from dicts.zConfiguration is not valid.N>   rs   	netdaemonexperimentalr|   )
isinstancerP   r/   rX   rY   s   && rS   update_from_dict"HacsConfiguration.update_from_dict   sC    $%% =>>CMMSs), rV   rQ   )rb   rc   rd   re   rf   rk   rg   rl   r   rP   ro   rp   rr   rs   rt   rv   rw   rx   ry   rz   r|   r}   r   r   r   r   r`   r   rh   rQ   rV   rS   rj   rj   n   s    "+NC+It"48FN8'+L$+GSE4CsM3'K'//M4M3%NC%!OS!JE4E3- -rV   rj   c                  H    ] tR t^t$ RtRtR]R&   RtR]R&   ]! R4      t	Rt
R# )	HacsCorezHACS Core info.Nzpathlib.Path | Noneconfig_pathAwesomeVersion | None
ha_versionyamlrQ   )rb   rc   rd   re   rf   r   rg   r   r-   lovelace_moderh   rQ   rV   rS   r   r      s%    '+K$+(,J%, (MrV   r   c                      ] tR t^t$ Rt]! ]R7      tR]R&   ]! ]	R7      t
R]R&   ]! ]R7      tR]R&   ]! ]R7      tR]R&   ]! ]R7      tR]R	&   R
tR# )
HacsCommonzCommon for HACS.rm   set[str]
categorieszdict[str, str]renamed_repositoriesarchived_repositoriesignored_repositoriesskiprQ   N)rb   rc   rd   re   rf   r   setr   rg   rP   r   r   r   r   rh   rQ   rV   rS   r   r      sS     5J5+0+F.F&+C&@8@%*3%?(?3/D(/rV   r   c                  b    ] tR t^t$ RtRtR]R&   RtR]R&   RtR]R&   Rt	R]R&   Rt
R]R	&   R
tR# )
HacsStatuszHacsStatus.TrK   startupFnewactive_frontend_endpoint_pluginactive_frontend_endpoint_themeinital_fetch_donerQ   N)rb   rc   rd   re   rf   r   rg   r   r   r   r   rh   rQ   rV   rS   r   r      s:    GTC,1#T1+0"D0#t#rV   r   c                      ] tR t^t$ RtRtR]R&   RtR]R&   ]P                  t
RtR]R&   RtR]R	&   ]R
 R l4       tRtR# )
HacsSystemzHACS System info.NzHacsDisabledReason | Nonedisabled_reasonFrK   runningaction	generatorc                   V ^8  d   QhRR/# )rN   r   rK   rQ   )rR   s   "rS   rT   HacsSystem.__annotate__   s     0 0$ 0rV   c                    V P                   RJ# )zReturn if HACS is disabled.N)r   r_   s   &rS   disabledHacsSystem.disabled   s     ##4//rV   rQ   )rb   rc   rd   re   rf   r   rg   r   r,   SETUPstager   r   propertyr   rh   rQ   rV   rS   r   r      sI    15O.5GTOOEFDIt0 0rV   r   c                     ] tR t^t$ Rt]! ]R7      tR]R&   ]! ]R7      t	R]R&   ]! ]
R7      tR]R&   ]! ]
R7      tR]R	&   ]! ]
R7      tR
]R&   ]R R l4       t]R R l4       t]R R l4       tR R ltR,R R lltR R ltR R ltR R ltR-R R lltR.R R  lltR.R! R" lltR# R$ ltR% R& ltR' R( ltR) R* ltR+tR# )/HacsRepositorieszHACS Repositories.rm   r   _default_repositorieszset[HacsRepository]_repositorieszdict[str, HacsRepository]_repositories_by_full_name_repositories_by_idzdict[str, RemovedRepository]"_removed_repositories_by_full_namec                   V ^8  d   QhRR/# rN   r   zlist[HacsRepository]rQ   )rR   s   "rS   rT   HacsRepositories.__annotate__   s     ( (. (rV   c                ,    \        V P                  4      # )zReturn a list of repositories.)listr   r_   s   &rS   list_allHacsRepositories.list_all   s     D&&''rV   c                   V ^8  d   QhRR/# )rN   r   zlist[RemovedRepository]rQ   )rR   s   "rS   rT   r      s     F F5 FrV   c                H    \        V P                  P                  4       4      # )z&Return a list of removed repositories.)r   r   valuesr_   s   &rS   list_removedHacsRepositories.list_removed   s     D;;BBDEErV   c                   V ^8  d   QhRR/# r   rQ   )rR   s   "rS   rT   r      s     L L!5 LrV   c                ~    V P                    Uu. uF"  qP                  P                  '       g   K   VNK$  	  up# u upi )z)Return a list of downloaded repositories.)r   rO   	installed)rZ   repos   & rS   list_downloaded HacsRepositories.list_downloaded   s0     "&!3!3K!3yy7J7J!3KKKs   ::c                    V ^8  d   QhRRRR/# )rN   categoryr(   r   rK   rQ   )rR   s   "rS   rT   r      s      L T rV   c                h    V P                    F!  pVP                  P                  V8X  g   K    R# 	  R# )z.Check if a given category has been downloaded.TF)r   rO   r   )rZ   r   rF   s   && rS   category_downloaded$HacsRepositories.category_downloaded   s,    ..J''83 / rV   c               $    V ^8  d   QhRRRRRR/# )rN   rF   r@   defaultrK   r   r   rQ   )rR   s   "rS   rT   r      s!     * *> *D *T *rV   c                |   \        VP                  P                  4      pVR8X  d   R# V P                  P	                  V4      ;p'       d{   VP                  P
                  VP                  P
                  8X  d   R# V P                  V4       VP                  P
                  VP                  n        RVP                  n        TpWP                  9  d   V P                  P                  V4       WP                  V&   WP                  VP                  P                  &   V'       d   V P                  V4       R# R# )Register a repository.0NF)rI   rO   idr   get	full_name
unregisterr   r   addr   full_name_lowermark_default)rZ   rF   r   repo_idregistered_repos   &&&  rS   registerHacsRepositories.register   s    joo(()c>"66::7CC?C##--1J1JJOOO,-7__-F-FO  *',O  $(J///"":.,6  )KU''
(G(GHj) rV   c                    V ^8  d   QhRRRR/# rN   rF   r@   r   r   rQ   )rR   s   "rS   rT   r      s     S S^ S SrV   c                   \        VP                  P                  4      pVR8X  d   R# V P                  VR7      '       g   R# V P	                  V4      '       d   V P
                  P                  V4       WP                  9   d   V P                  P                  V4       V P                  P                  VR4       V P                  P                  VP                  P                  R4       R# )zUnregister a repository.r   Nrepository_id)rI   rO   r   is_registered
is_defaultr   remover   r   popr   r   rZ   rF   r   s   && rS   r   HacsRepositories.unregister   s    joo(()c>!!!88??7##&&--g6+++%%j1  $$Wd3''++JOO,K,KTRrV   c                    V ^8  d   QhRRRR/# r   rQ   )rR   s   "rS   rT   r     s     
0 
0~ 
0$ 
0rV   c                    \        VP                  P                  4      pVR8X  d   R# V P                  VR7      '       g   R# V P                  P                  V4       R# )zMark a repository as default.r   Nr   )rI   rO   r   r   r   r   r   s   && rS   r   HacsRepositories.mark_default  sK    joo(()c>!!!88""&&w/rV   c                    V ^8  d   QhRRRR/# )rN   rF   r@   r   rI   rQ   )rR   s   "rS   rT   r     s     " "N "S "rV   c                    \        VP                  P                  4      pW28X  d   R# VR8w  d&   \        RVP                  P                   RV 24      hW!P                  n        V P                  V4       R# )zUpdate a repository id.Nr   zThe repo id for z is already set to )rI   rO   r   
ValueErrorr   r   )rZ   rF   r   existing_repo_ids   &&& rS   set_repository_id"HacsRepositories.set_repository_id  sp    z112&s"":??#B#B"C D%%5$68  %j!rV   Nc                    V ^8  d   QhRRRR/# )rN   r   rE   r   rK   rQ   )rR   s   "rS   rT   r   )  s     ; ;
 ;d ;rV   c                2    V'       g   R# WP                   9   # )z!Check if a repository is default.F)r   rZ   r   s   &&rS   r   HacsRepositories.is_default)  s     : :::rV   c               $    V ^8  d   QhRRRRRR/# rN   r   rE   repository_full_namer   rK   rQ   )rR   s   "rS   rT   r   /  s(     
 
!
 )
 
	
rV   c                N    Ve   WP                   9   # Ve   W P                  9   # R# z$Check if a repository is registered.F)r   r   )rZ   r   r   s   &&&rS   r   HacsRepositories.is_registered/  s1     $ $<$<<<+'+J+JJJrV   c               $    V ^8  d   QhRRRRRR/# r   rQ   )rR   s   "rS   rT   r   ;  s(     # #!# )# 
	#rV   c                    Ve   V P                  V4      pVe   V P                  V4      pXf   R# VP                  P                  # r   )	get_by_idget_by_full_namerO   r   )rZ   r   r   r   s   &&& rS   is_downloadedHacsRepositories.is_downloaded;  sG     $>>-0D+(()=>D<yy"""rV   c                    V ^8  d   QhRRRR/# )rN   r   rE   r   HacsRepository | NonerQ   )rR   s   "rS   rT   r   I  s     @ @z @6K @rV   c                ^    V'       g   R# V P                   P                  \        V4      4      # )zGet repository by id.N)r   r   rI   r   s   &&rS   r  HacsRepositories.get_by_idI  s$    ''++C,>??rV   c                    V ^8  d   QhRRRR/# )rN   r   rE   r   r  rQ   )rR   s   "rS   rT   r   O  s     Q QZ QDY QrV   c                h    V'       g   R# V P                   P                  VP                  4       4      # )Get repository by full name.N)r   r   lowerrZ   r   s   &&rS   r  !HacsRepositories.get_by_full_nameO  s)    #..223G3M3M3OPPrV   c                    V ^8  d   QhRRRR/# )rN   r   rI   r   rK   rQ   )rR   s   "rS   rT   r   U  s     O Os Ot OrV   c                    WP                   9   # )z!Check if a repository is removed.)r   r  s   &&rS   
is_removedHacsRepositories.is_removedU  s    #'N'NNNrV   c                    V ^8  d   QhRRRR/# )rN   r   rI   r   rD   rQ   )rR   s   "rS   rT   r   Y  s      s ?P rV   c                    V P                   P                  V4      ;p'       d   V# \        VR7      pW P                   V&   V# )r  )rF   )r   r   rD   )rZ   r   removeds   && rS   removed_repository#HacsRepositories.removed_repositoryY  sC    ==AABVWW7WN#/CDHO//0DErV   rQ   )FN)NN)rb   rc   rd   re   rf   r   r   r   rg   r   rP   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  rh   rQ   rV   rS   r   r      s    &+C&@8@).s)CM&C<ARV<W 9W5:45P2PGL]aGb&(Db( ( F F L L*4S&
0";
#@QO rV   r   c                  b   ] tR tRt$ RtRtR]R&   RtR]R&   RtR]R	&   Rt	R
]R&   Rt
R]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   R R lt]R  R! l4       tR" R# ltR$ R% ltR& R' ltR( R) ltR* R+ ltR, R- ltR. R/ ltR0R1/R2 R3 lltR4R1R5RR6RR7R8/R9 R: lltR[R; R< lltR=RR>R8R?R8/R@ RA llt RB RC lt!]"R[RD RE ll4       t#RF RG lt$R[RH RI llt%R[RJ RK llt&RL RM lt'R[RN RO llt(R[RP RQ llt)R[RR RS llt*R[RT RU llt+R[RV RW llt,RX RY lt-RZt.R# )\HacsBaseic  r   NzHacsData | NonerO   zHacsDataClient | Nonedata_clientrE   frontend_versionzGitHub | NonegithubzGitHubAPI | None	githubapizHomeAssistant | NonehasszIntegration | NoneintegrationzQueueManager | NonequeuezAIOGitHubAPIRepository | NonerF   zClientSession | NonesessionHacsStage | Noner   zValidationManager | None
validationr   versionc                   V ^8  d   QhRR/# rN   r   r   rQ   )rR   s   "rS   rT   HacsBase.__annotate__t  s     
# 
#$ 
#rV   c                    \        4       V n        \        4       V n        / V n        \        4       V n        \        V n        . V n	        \        4       V n        \        4       V n        \        4       V n        R# )zInitialize.N)r   commonrj   configurationcoordinatorsr   corer;   logrecurring_tasksr   repositoriesr   statusr   systemr_   s   &rS   __init__HacsBase.__init__t  sS     l.0GIJ	9;,. l lrV   c                   V ^8  d   QhRR/# )rN   r   zpathlib.PathrQ   )rR   s   "rS   rT   r*    s     * * *rV   c                .    V P                   P                  # )z Return the HACS integration dir.)r"  	file_pathr_   s   &rS   integration_dirHacsBase.integration_dir  s     )))rV   c                    V ^8  d   QhRRRR/# )rN   r   r%  r   r   rQ   )rR   s   "rS   rT   r*    s     P P/ PD PrV   c                    V'       d   V P                   V8X  d   R# Wn         VeU   V P                  P                  RV P                   4       V P                  \        P
                  RV P                   /4       R# R# )zSet HACS stage.NzStage changed: %sr   )r   r0  infoasync_dispatchr*   STAGE)rZ   r   s   &&rS   	set_stageHacsBase.set_stage  sZ    TZZ5(
HHMM-tzz: 1 7 7'4::9NO rV   c                    V ^8  d   QhRRRR/# )rN   rG   r)   r   r   rQ   )rR   s   "rS   rT   r*    s     
] 
]#5 
]$ 
]rV   c                x   V P                   P                  V8X  d   R# WP                   n        V\        P                  8w  d   V P                  P                  RV4       V\        P                  8X  dG   V P                  P                  V P                  P                  P                  V P                  4       R# R# )zDisable HACS.NzHACS is disabled - %s)r4  r   r)   REMOVEDr0  errorINVALID_TOKENr!  add_jobr-  rp   async_start_reauth)rZ   rG   s   &&rS   disable_hacsHacsBase.disable_hacs  s    ;;&&&0&,#'///HHNN2F;'555IId00==PPRVR[R[\ 6rV   c                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*    s     - -T -rV   c                    V P                   P                  e/   RV P                   n        V P                  P                  R4       R# R# )zEnable HACS.NzHACS is enabled)r4  r   r0  r>  r_   s   &rS   enable_hacsHacsBase.enable_hacs  s4    ;;&&2*.DKK'HHMM+, 3rV   c                    V ^8  d   QhRRRR/# rN   r   r(   r   r   rQ   )rR   s   "rS   rT   r*    s     B B\ Bd BrV   c                    WP                   P                  9  d[   V P                  P                  RV4       V P                   P                  P	                  V4       \        4       V P                  V&   R# R# )zEnable HACS category.zEnable category: %sN)r,  r   r0  r>  r   r&   r.  rZ   r   s   &&rS   enable_hacs_categoryHacsBase.enable_hacs_category  sU    ;;111HHMM/:KK""&&x0*?*ADh' 2rV   c                    V ^8  d   QhRRRR/# rQ  rQ   )rR   s   "rS   rT   r*    s     , ,l ,t ,rV   c                    WP                   P                  9   d_   V P                  P                  RV4       V P                   P                  P	                  V4       V P
                  P	                  V4       R# R# )zDisable HACS category.zDisabling category: %sN)r,  r   r0  r>  r   r.  rS  s   &&rS   disable_hacs_categoryHacsBase.disable_hacs_category  sV    {{---HHMM2H=KK""&&x0!!(+ .rV   c               $    V ^8  d   QhRRRRRR/# )rN   r9  rI   contentr   r   rK   rQ   )rR   s   "rS   rT   r*    s!     %8 %8s %8S %8T %8rV   c                  a aa"   VVV 3R lp S P                   P                  V4      G Rj  xL
  \        S P                   S4      G Rj  xL
 #  L"  \         d)   pS P                  P	                  RST4        Rp?R# Rp?ii ; i L<5i)zSave a file.c            	       < \        S\        S\        4      '       d   R MR\        S\        4      '       d   RMR\        S\        4      '       d   RMRR7      ;_uu_ 4       p V P                  S4       RRR4       \        P
                  P                  S4      '       dz   SP                  R4      '       dc   \        SR4      ;_uu_ 4       p\        P                   ! SR,           R4      ;_uu_ 4       p\        P                  ! W4       RRR4       RRR4       R	S9   d   SP                  R
4      '       d   SP                  R4      R,          pSP                  R4      ^ ,          pV RV 2p\        P
                  P                  V4      '       d5   SP                  P                  RV4       \        P                  ! V4       R# R# R# R#   + '       g   i     ELc; i  + '       g   i     L; i  + '       g   i     L; i)wwbzutf-8Nignore)modeencodingerrorsz.jsrbz.gzthemesz.yaml/z/themes/zRemoving old theme file %s)openr   rI   writeospathisfileendswithgzipshutilcopyfileobjsplitexistsr0  r>  r   )	file_handlerf_inf_outfilenamebasecombinedr[  r9  rZ   s	         rS   _write_file-HacsBase.async_save_file.<locals>._write_file  sw   &w44S$$.w$<$<$#-gs#;#;x	 
 ""7+ ww~~i((%%e,,i..$!YYy5'8$??5"..t; @ /
 9$););G)D)D$??3/3 z215"V8H:677>>(++HHMM">IIIh' ,	 *E$!   @? /.s0   !G'G42G!		G4G	!G1,G44H	NzCould not write data to %s - %sF)r!  async_add_executor_jobBaseExceptionr0  rF  r9   )rZ   r9  r[  ry  rF  s   fff  rS   async_save_fileHacsBase.async_save_file  su     	(2	))22;??? "$))Y777 @ 	 HHNN<iO	 8sI   	B
A AA B
BB
A BB :B
 BB
c                   V ^8  d   QhRR/# )rN   r   r{   rQ   )rR   s   "rS   rT   r*    s       rV   c           	     \  "    V P                  V P                  P                  4      G Rj  xL
 pVP                  P                  P
                  P                  ;'       g    ^ ;pR,
          ^
8  d%   \        P                  ! VR,
          ^
,          4      # \        P                  ! \        P                  ! VP                  P                  P
                  P                  4      4      pV P                  P                  RVP                  P                  P
                  P                  VP                   RVP                    RVP"                   24       V P%                  \&        P(                  4       ^ #  ELI  \*         d'   pT P                  P-                  T4        Rp?^ # Rp?ii ; i5i)zEHelper to calculate the number of repositories we can fetch data for.Ni  z*GitHub API ratelimited - %s remaining (%s):)async_github_api_methodr   
rate_limitrO   	resourcesr/  	remainingmathfloorr"   as_localutc_from_timestampresetr0  r>  hourminutesecondrJ  r)   
RATE_LIMITr|  	exception)rZ   responselimitr  r  s   &    rS   async_can_updateHacsBase.async_can_update  s8    	*!99$..:S:STTH"--1166@@EEAEMRTTzz54<2"566KK 5 5hmm6M6M6R6R6X6X YZEHHMM<'',,66::,a~Qu||n=
 0;;< ! U 	* HHy))	*sQ   F,(E8 E54E8 "4E8 F,CE8 3F,5E8 8F)F$F,$F))F,raise_exceptionTc               $    V ^8  d   QhRRRRRR/# )rN   methodzCallable[[], Awaitable[TV]]r  rK   r   z	TV | NonerQ   )rR   s   "rS   rT   r*    s(      + 	 
rV   c                 "   Rp V! V/ VB G Rj  xL
 #  L  \          d,   pT P                  \        P                  4       Tp Rp?MRp?i\         d,   pT P                  \        P
                  4       Tp Rp?M]Rp?i\         d   pThRp?i\         d   pTp Rp?M8Rp?i\         d(   pT P                  P                  T4       Tp Rp?MRp?ii ; iT'       d   Te   \        T4      hR# 5i)zCall a GitHub API methodN)r   rJ  r)   rG  r   r  r   r   r|  r0  r  r/   )rZ   r  r  argskwargs
_exceptionr  s   &&$*,  rS   r   HacsBase.async_github_api_method  s      
	#00000, 	#0>>?"J' 	#0;;<"J) 	O 	#"J 	# HHy)"J	# z5
++s   C3  C3 C!A	C3	CC!A=8C3=C
CBCCB"C3"C/C0CC3C
C3"C3checkrefr   r   Fc               4    V ^8  d   QhRRRRRRRRR	RR
RRR/# )rN   r   rI   r   r(   r  rK   r  rE   r   r   r   r   rQ   )rR   s   "rS   rT   r*    sY     R8 R8!R8 R8
 R8 R8 "R8 R8 
R8rV   c          	       "   WP                   P                  9   d$   V\        P                  8w  d   \	        RV 24      hVR8X  d   \        4       hVR8X  g   VP                  R4      '       d   \        4       hV\        9  d    V P                  P                  RVV4       R# V P                   P                  P                  V4      ;pe   Tp\        V,          ! W4      pV'       EdS    VP                  V4      G Rj  xL
  VP                  P                  '       d   V P                   P                  P!                  VP"                  P$                  4       V P&                  P(                  '       g   V P                  P+                  RV4       V P,                  P.                  '       d   \1        RV R	24      hVP                  P                  # V P,                  P.                  '       d(   VP2                  P5                  R
VP6                  4       M'VP2                  P5                  RVP6                  4        V P&                  P@                  '       d   RVP"                  n         Ve   WXP"                  n!        MV PD                  es   V'       dk   VP"                  P@                  '       dO   V PG                  \H        PJ                  RRRVP"                  P$                  RVP"                  PB                  /4       V PL                  PO                  W4       R#  EL  \8        \:        3 dO   p	T P,                  P<                  '       d(   TP2                  P+                  RTP6                  T	4        Rp	?	R# Rp	?	i\>         dR   p	T P                   P                  P!                  TP"                  P$                  4       \1        RT RT	 R24      T	hRp	?	ii ; i5i)r   z	Skipping zhome-assistant/corezhome-assistant/addonszhassio-addons/zA%s is not a valid repository category, %s will not be registered.NzValidation for %s failed.z::error:: Validation for z failed.z%s Validation completedz%s Registration completedz%s Registration Failed - %szValidation for z failed with .Fr   registrationrF   r   )(r,  r   r+   INTEGRATIONr1   r5   
startswithr.   r6   r0  warningr   r   async_registrationvalidaterc  r   rO   r   r3  r   rF  r4  r   r/   loggerr>  stringr4   r3   r   r   r   r   r!  r?  r*   
REPOSITORYr2  r   )
rZ   r   r   r  r  r   r   renamedrF   r  s
   &&&$$$$   rS   async_register_repository"HacsBase.async_register_repository  s      ;;#3#33#~'A'AA+i8L7M,NOO#88688#::>R>]>]?
 ?
 +,,--HHS$
 {{77;;<PQQG^#* %7%A$%]
5! 33C888&&---KK$$(()B)BC;;...'BDXY{{)))+7 4865=?  &..555;;%%%%%**+DjFWFWX%%**+F
HYHYZ ;;???"'JOO$!.OO yy$:??3F3F3F##%00 .$joo&?&?');); 	"":7[ 9 12QR ;;(((%%++5z7H7H) ( !  $$Z__%>%>?#%,&.-:9+QH !!!s   A,O/A;O+L ?L L  AL 57L -$L OL .&L O&L ;O;OO0A+OL O/AM82O8OOAOOOc                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*  `  s     D: D:T D:rV   c           
       "   V P                  \        P                  4       V P                  4       G Rj  xL
  \	        V P
                  R4      G Rj  xL
 ;p'       dN   V FG  pVR,          '       d   K  V P                  P                  R4       \        V P
                  RRR7        M	  V P                  P                  \        V P
                  V P                  \        ^0R7      4      4       V P                  P                  \        V P
                  V P                  \        ^0R7      4      4       V P                  P                  \        V P
                  V P                  \        ^R7      4      4       V P                  P                  \        V P
                  V P                  \        ^R	7      4      4       V P                  P                  \        V P
                  V P                   \        ^
R	7      4      4       V P                  P                  \        V P
                  V P"                  \        ^R7      4      4       V P
                  P$                  P'                  \(        V P*                  P,                  4      pV P.                  P0                  ;p'       d   VP3                  V4       V P                  P5                  R
\7        V P                  4      4       RV P8                  n        V P=                  \>        P@                  / 4       V PC                  4       G Rj  xL
  V P                  4       G Rj  xL
  V P                  \        PD                  4       V P=                  \>        PF                  RR/4       V P#                  4       G Rj  xL
  V P!                  4       G Rj  xL
  V P=                  \>        P@                  / 4       R#  EL EL L L LH L25i)z#Tasks that are started after setup.NcriticalrL   zURGENT!: Check the HACS panel!zURGENT!z**Check the HACS panel!**)titlemessage)hours)minutesz&There are %s scheduled recurring tasksFforceT)$rA  r,   STARTUPasync_load_hacs_from_githubr=   r!  r0  r  $async_create_persistent_notificationr1  appendr   r	   +async_update_downloaded_custom_repositories#async_get_all_category_repositoriesasync_check_rate_limitasync_process_queue"async_handle_critical_repositoriesbusasync_listen_oncer   rO   async_force_writer-  rp   async_on_unloadrs   lenr3  r   r?  r*   STATUS!async_handle_removed_repositoriesRUNNINGRELOAD)rZ   _r  r   unsubrp   s   &&    rS   startup_tasksHacsBase.startup_tasks`  s    y(()..0002499jIII8I N++HH%%&FG8		<W  ! 	##%		00#	
 	##%		4KKY]_M`	
 	##%		4CCYUVEW	
 	##%dii1L1Li`aNbc	
 	##%dii1I1I9]_K`a	
 	##%		4BBITUDV	
 		//+TYY-H-H
  --:::<:((/?TEYEYAZ[#-44b94466666888y(()-44woF55777&&(((-44b9C 	1Ij 	78 	8(sw   3O#OO#OO# O#6J/O#%O&O#=O>AO#OO#.O!/'O#O#O#O#O#!O#headerskeep_urlnologc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
rN   urlrI   r  dict | Noner  rK   r  r   zbytes | NonerQ   )rR   s   "rS   rT   r*    s<     9 99 	9
 9 9 
9rV   c                 "   Vf   R# V'       g   RV9   d   VP                  RR4      pV P                  P                  RV4       ^ pV^8  dv    V P                  P	                  V\        ^<R7      VR7      G Rj  xL
 pVP                  ^8X  d   VP                  4       G Rj  xL
 # \        RVP                   RV 24      hR#  LJ L#  \         dQ    T P                  P                  R	T^T,
          4       T^,          p\        P                  ! ^4      G Rj  xL 
   K  \         d0   pT'       g   T P                  P                  R
T4        Rp?R# Rp?ii ; i5i)z'Download files, and return the content.Nztags/ru   zTrying to download %s)total)r  timeoutr  zGot status code z when trying to download aB  A timeout of 60! seconds was encountered while downloading %s, using over 60 seconds to download a single file is not normal. This is not a problem with HACS but how your host communicates with GitHub. Retrying up to 5 times to mask/hide your host/network problems to stop the flow of issues opened about it. Tries left %szDownload failed - %s)replacer0  rs   r$  r   r   r3  readr/   TimeoutErrorr  asynciosleepr|  r  )	rZ   r  r  r  r  r  timeoutsrequestr  s	   &&$$$,   rS   async_download_fileHacsBase.async_download_file  sL     ;GsN++gr*C.4l#J $ 0 0)3# !1 !  >>S(!(//#&'('@G   0     $ \	 AmmA&&& J HH&&'=yIJs   E >E +C
 ;C<(C
 $C%C
 (E )C
 E C
 C
 
AEDE!E $E-E.$EE EE c                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*    s     
 
t 
rV   c                r  "   \         P                  .pV P                  P                  \	        R4      8  d   \
        P                  ! 4       pT;_uu_4       GRj  xL
  V P                  P                  P                  p. V P                  P                  n	        V P                  P                  P                  V P                  P                  VR7      G Rj  xL
  W0P                  P                  n	        RRR4      GRj  xL
  MCV P                  P                  P                  V P                  P                  VR7      G Rj  xL
  V P                  P                  P                  V P                  P                  V4      G Rj  xL
  R#  EL5 L L  + GRj  xL 
 '       g   i     Ld; i Lk L+5i)zRecreate entities.z2024.6.0N)entry	platforms)r   UPDATEr/  r   r   r  Lockr-  rp   
_on_unloadr!  config_entriesasync_unload_platformsasync_forward_entry_setups)rZ   r  unload_platforms_lock	on_unloads   &   rS   async_recreate_entities HacsBase.async_recreate_entities  sX    __%	 99."<<$+LLN!,,, ..;;FF	=?""//:ii..EE,,99' F    >G""//: -,, ))**AA((55# B    ii&&AA++Y
 	
 	
 - -,,,	
s   AF7FF7A:FFF8F7FAF7F3AF7	F5
F7FF7F0	F 
F0	)F0	+	F75F7c               $    V ^8  d   QhRRRRRR/# )rN   signalr*   rO   r  r   r   rQ   )rR   s   "rS   rT   r*    s#     7 7%6 7k 7UY 7rV   c                2    \        V P                  W4       R# )zDispatch a signal with data.N)r   r!  )rZ   r  rO   s   &&&rS   r?  HacsBase.async_dispatch  s     	dii6rV   c                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*    s     > >t >rV   c                H   \        4       V P                  n        \        P                  \        P
                  \        P                  3 F  pV P                  \        V4      4       K  	  \        P                  V P                  P                  P                  9   g0   V P                  P                  \        P                  4      '       d    V P                  \        P                  4       V P                  P                  P                  RR4      '       g0   V P                  P                  \        P                   4      '       d    V P                  \        P                   4       V P"                  P$                  '       d"   V P                  \        P&                  4       R# R# )zSet the active categories.frontendreload_themesN)r   r,  r   r(   r  PLUGINTEMPLATErT  PYTHON_SCRIPTr!  ro   
componentsr2  r   serviceshas_serviceTHEMEr-  rl   	APPDAEMONrS  s   & rS   set_active_categoriesHacsBase.set_active_categories  s   !$%11<3F3FH]H]^H%%l8&<= _ &&$))*:*:*E*EE  44\5O5OPP%%l&@&@A99))
 
22<3E3EFF%%l&8&89'''%%l&<&<= (rV   c                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*    s     '< '<4 '<rV   c                  "   V P                   P                  '       d   R#  V P                  P                  \        P
                  4      pRpVfe   RpV P                  \        P
                  \        P
                  RR7      G Rj  xL
  V P                  P                  \        P
                  4      pM`V P                   P                  '       gE   V P                  P                  R4       V P                  P                  VP                  4       4       Vf   \        R4      hRVP                  n        V P"                  P$                  P&                  VP                  n        RVP                  n        RVP                  n        V'       d   V P/                  4       G Rj  xL
  VP0                  V n        V P                  P5                  V4       R#  ELN L5  \         ds   pR\7        T4      9   d   T P                  P9                  R4       MT P                  P9                  R	T4       T P;                  \<        P>                  4        Rp?R# Rp?ii ; i5i)
zLoad HACS from GitHub.NFT)r   r   r   z%Scheduling update of hacs/integrationzUnknown error403z1GitHub API is ratelimited, or the token is wrong.zCould not load HACS! - %s) r3  r   r2  r  r+   r  r  r(   r   r0  rF  r#  r   common_updater/   rO   r   r"  r'  r  installed_versionr   releasesr  repository_objectrF   r   rI   r  rJ  r)   	LOAD_HACS)rZ   r  rF   should_recreate_entitiesr  s   &&   rS   r  $HacsBase.async_load_hacs_from_github  s    ;;((("	<**;;N<V<VWJ',$!+/(44)7)C)C)55  5   
 "..??@Z@Z[
[[(((FG

z779:!#O44(,JOO%040@0@0H0H0O0OJOO-"'JOO'+JOO$'22444(::DO**:6+$ 5  	<I&!!G !!"=yI0::;;	<sb   IA$G GA	G B<G G !G"0G IG G I$A'IIIIc                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*  ;  s     

 

4 

rV   c                @  "   V P                   P                  '       d   R# V P                  P                  R4       \        P
                  ! V P                  P                  ;'       g    .  Uu. uF  pV P                  V4      NK  	  up!  G Rj  xL
  R# u upi  L5i)zGet all category repositories.NzLoading known repositories)	r4  r   r0  r>  r  gatherr,  r   ,async_get_category_repositories_experimental)rZ   r  r   s   && rS   r  ,HacsBase.async_get_all_category_repositories;  s     ;;23nn !% 6 6 < <" < <H AA(K <
 	
 	
	
s$   A&B)B.BBBBc                    V ^8  d   QhRRRR/# )rN   r   rI   r   r   rQ   )rR   s   "rS   rT   r*  G  s     2= 2=3 2=SW 2=rV   c                  "   V P                   P                  RV4        V P                  P                  VRR7      G Rj  xL
 pT P                  P                  Y!4      G Rj  xL
  TP                  4        EF  w  rETR,          pT P                  P                  P                  T4      '       d   T P                  P                  T,          pT P                  P                  T4      '       d   Kz  Y`P                  P                  9   d   K  T P                  P!                  T4      ;p'       g   K  T P                  P#                  Yt4       T P                  P%                  T4       TP                  P&                  e4   TP                  P&                  P)                  4       TR,          8  g   EK<  TP                  P+                  / \-        \.        4      CTC4       TP                  R	4      ;pf   EK  TP0                  P+                  / \-        \2        4      CTC4       EK  	  TR
8X  d   RT P4                  n        T P8                  \:        P<                  8X  d   T P                  P>                   F  pTP                  P@                  T8X  g   K   TP                  PB                  '       d   K>  T P                  PE                  TP                  PF                  4      '       d   Ku  TPH                  P                  RTPJ                  4       T P                  PM                  T4       K  	  T PO                  \P        PR                  / 4       T PT                  T,          PW                  4        R#  EL3  \         d!    T P                   P                  RT4        R# \
         d(   pT P                   P                  RY4        Rp?R# Rp?ii ; i ELq5i)z!Update all category repositories.zFetching updated content for %sTr  NzNo updates for %szCould not update %s - %sr   last_fetchedmanifestr"  z%%s Unregister stale custom repository),r0  rs   r  get_datar2   r/   rF  rO   register_unknown_repositoriesitemsr,  r   r   r2  r  r   r  r   r   r  	timestampr\   rP   r8   repository_manifestr7   r3  r   r   r,   r  r   r   r   r   r   r  r  r   r?  r*   r  r.  async_update_listeners)	rZ   r   category_datar  r   	repo_data	repo_namerF   r  s	   &&       rS   r
  5HacsBase.async_get_category_repositories_experimentalG  s    8(C	"&"2"2";";Ht";"TTM ii55mNNN"/"5"5"7G!+.I{{//33I>> KK<<YG	  ++I66KK===!..??	JJzJJ!!33JH!!..z:??//7OO00::<y?XXOO//0`48Q3R0`V_0`a$-MM*$==J"66BBNt$@ANXN! #8( }$,0DKK)::***"//88
OO,,8&OO555 --889K9KLL%%++?ARAR %%00< 9 	-88"=(#::<] U' 	HHNN.9 	HHNN5xK	 	Os   O M6  M3M6 O#O$BO0>O3A;O4>O8BOO42O+BO3M6 6'OO O)O*OOOOc                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*  {  s     
- 
-d 
-rV   c                  "   V P                   P                  '       d*   V P                   P                  \        P                  8w  d   R# V P
                  P                  R4       V P                  4       G Rj  xL
 pV P
                  P                  RV4       V^ 8  d+   V P                  4        V P                  4       G Rj  xL
  R# R#  LS L
5i)zCheck rate limit.Nz Checking if ratelimit has liftedz#Ratelimit indicate we can update %s)
r4  r   r   r)   r  r0  rs   r  rN  r  )rZ   r  
can_updates   && rS   r  HacsBase.async_check_rate_limit{  s     {{###t{{'B'BFXFcFc'c9:0022
<jI>**,,,  3 -s%   A6C8C9A
CC	CCc                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*    s      4 rV   c                  a a"   S P                   P                  '       d   S P                  P                  R4       R# S P                  P
                  '       g   S P                  P                  R4       R# S P                  P                  '       d   S P                  P                  R4       R# VV 3R loS! 4       G Rj  xL
  R#  L5i)zProcess the queue.zHACS is disabledNzNothing in the queuezQueue is already runningc                   <"   SP                   P                  '       g%   SP                  P                  4       G R j  xL
  R # SP	                  4       G R j  xL
 p SP
                  P                  RV SP                   P                  4       V ^ 8w  d6    SP                   P                  V 4      G R j  xL
  S! 4       G R j  xL
  R # R #  L Lu L  \         d     R # i ; i L 5i)Nz-Can update %s repositories, items in queue %s)
r#  has_pending_tasksrO   async_writer  r0  rs   pending_tasksexecuter0   )r  _handle_queuerZ   s    rS   r&  3HacsBase.async_process_queue.<locals>._handle_queue  s     ::///ii++---#4466JHHNN?

((
 Q**,,Z888 $o%%  .6 93  &sc   :C%CC%C<C%C 3C4C 8
C%C#	C%C%C C C%C  C%)r4  r   r0  rs   r#  r"  r   )rZ   r  r&  s   f&@rS   r  HacsBase.async_process_queue  s     ;;HHNN-.zz+++HHNN12::HHNN56	&$ os   AC
8C
.C
CC
c                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*    s     1* 1* 1*rV   c                  "   V P                   P                  '       d   R# RpV P                  P                  R4        V P                  P                  RRR7      G Rj  xL
 pT F6  pT P                  P                  TR,          4      pTP                  T4       K8  	  T P                  P                   EFb  pT P                  P                  TP                  4      ;pf   K/  TP                  P                  T P                  P                   9   d   K`  TP                  P"                  '       d   TP$                  R8w  d   \'        T P(                  \*        R	TP                  P,                   2R\*        \.        P0                  RR
TP                  P                  RTP2                  RTP                  P,                  /R7       T P                  P5                  RTP                  P                  TP2                  4       EKM  EKP  RpTP7                  4        EKe  	  T'       d%   T P                  P9                  4       G Rj  xL
  R# R#  EL  \         d     R# i ; i L5i)zHandle removed repositories.NFzLoading removed repositoriesr  Tr  rF   r  removed_namerG   repositry_id)r!  domainissue_id
is_fixableissue_domainseveritytranslation_keytranslation_placeholdersz~You have '%s' installed with HACS this repository has been removed from HACS, please consider removing it. Removal reason (%s))r4  r   r0  r>  r  r  r/   r2  r  r\   r   r  rF   rO   r   r,  r   r   rJ   r    r!  r#   r   r   WARNINGrG   r  r   r#  )rZ   r  need_to_saveremoved_repositoriesitemr  rF   s   &&     rS   r  *HacsBase.async_handle_removed_repositories  s    ;;45	)-)9)9)B)B9W[)B)\#\  )D''::4;MNG% ) ((55G"//@@ASASTT
]((DKK,L,LL((('':5&!YY%#+JOO,>,>+?!@#(%+!.!6!6(1"JOO$=$=$gnn*JOO,>,>2 HH$$. #11 6.  $!!#= 6@ ))''))) Q $] 		P *sT   <I" I I I $CI"2C2I"%I"I I"I II"II"c                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*    s     &\ &\4 &\rV   c                4  a aa"   S P                   P                  '       d   R# S P                  P                  R4       ^ o\        P
                  ! 4       oR VV3R llpS P                  P                   F  pVP                  P                  S P                  P                  9   g   K4  S P                  P                  VP                  P                  4      '       d   Kk  S^,          oS P                  P                  V! V4      4       K  	  R VV 3R llpS P                   P"                  ;p'       d$   VP%                  S P&                  V! 4       R4       M!S P&                  P%                  V! 4       R4       S P                  P)                  R4       R# 5i)	zExecute the task.NzEStarting recurring background task for downloaded custom repositoriesc                    V ^8  d   QhRRRR/# r   rQ   )rR   s   "rS   rT   JHacsBase.async_update_downloaded_custom_repositories.<locals>.__annotate__  s     	+ 	+ 	+4 	+rV   c                   <"   V P                  RR7      G Rj  xL
  S^,          oS'       g   SP                  4        R# R#  L)5i)zUpdate a repositoryT)ignore_issuesN)update_repositoryr   )rF   repositories_to_updaterepositories_updateds   &rS   r@  OHacsBase.async_update_downloaded_custom_repositories.<locals>.update_repository  sD      ..T.BBB"a'")$((* * Cs   AAAAc                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r=    s     	5 	54 	5rV   c                    <"   SP                  4       G Rj  xL
  SP                  P                  4        F  p V P                  4        K  	  R#  L75i)zUpdate all coordinators.N)waitr.  r   r  )coordinatorrB  rZ   s    rS   update_coordinatorsQHacsBase.async_update_downloaded_custom_repositories.<locals>.update_coordinators  sB     &++---#00779224  : .s   AA8ArH  zARecurring background task for downloaded custom repositories done)r4  r   r0  r>  r  Eventr2  r   rO   r   r,  r   r   r   r#  r   r-  rp   async_create_background_taskr!  rs   )rZ   r  r@  rF   rH  rp   rA  rB  s   f&    @@rS   r  4HacsBase.async_update_downloaded_custom_repositories  s)    ;;]^!"&}}	+ 	+ ++;;J((DKK,B,BB))44Z__5G5GHH&!+&

0<= <	5 	5  --:::<:55		.02G II223F3HJ_`Z[s   B F*2F!AF7A!Fc                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*    s     <C <C$ <CrV   c           	     ,  "   \        V P                  R7      p. p. pRp V P                  P                  RRR7      G Rj  xL
 pT'       g   T P                  P                  R4       R# \        T P                  R4      G Rj  xL
 pT;'       g    .  F  pTP                  TR,          4       K  	  . pT EF  pT P                  P                  TR,          4      p	RT	n        T P                  P                  TR,          4      p
RTR,          R	TR	,          R
TR
,          RR/pTR,          T9  dz   T
ev   T
P                  P                   '       dZ   T P                  P#                  RTR,          4       RpRTR&   TP%                  T
P'                  4       4       T
P)                  4        TP                  T4       T	P+                  T4       EK  	  TP-                  4       G Rj  xL
  \/        T P                  RT4      G Rj  xL
  T'       dR   T P                  P#                  R4       T P                  P1                  T P                  P3                  ^d4      4       R# R#  EL%  \        \
        3 d     R# \         d     ELDi ; i EL
 L L5i)zHandle critical repositories.)r!  Fr  Tr  NzNo critical repositoriesrF   rG   rH   rL   z0Removing repository %s, it is marked as criticalzRestarting Home Assistant)r<   r!  r  r  r   r2   r/   r0  rs   r=   r  r2  r  rJ   r  rO   r   r  r   	uninstallr   r\   r%  r>   async_create_task
async_stop)rZ   r  critical_queueinstoredr  was_installedstored_criticalstoredrF   removed_repor   s   &&         rS   r  +HacsBase.async_handle_critical_repositories  sD    %4995	!--66zD6QQH HHNN56 5dii LL%+++FOOF<01 , "J,,??
<@XYL(2L%$$55j6NOD j6*X.
6*	F ,'x7#		(;(;(;HH%%J"<0 %)M-2F>*"&&t~~'78KKM""6*$$V,1 #6 $$&&& "$))ZIII HH9:II''		(<(<S(AB e R*,DE 	 		 MD 	' 	Js   J I(  I%I( J6JJJCJBJ&J'JJJAJ%I( (J
9J<J
J
J	J

JJJc                   V ^8  d   QhRR/# r)  rQ   )rR   s   "rS   rT   r*  @  s     ; ;D ;rV   c                \  "   V P                   P                  '       gH   \        V P                  V P                  P                  P                  R4      4      G Rj  xL
 '       g   R# V P                  P                  R4       V P                  P                  R8H  pV P                  P                  RV P                  P                  V4       \        V P                  \        V P                  P                  P                  R4      VR7      G Rj  xL
  RV P                   n        R#  L L5i)z@Setup the http endpoints for plugins if its not already handled.zwww/communityNzSetting up plugin endpointstoragez1<HacsFrontend> %s mode, cache for /hacsfiles/: %s)cache_headersT)r3  r   r9   r!  ro   rk  r0  r>  r/  r   r?   r%   )rZ   	use_caches   & rS   $async_setup_frontend_endpoint_plugin-HacsBase.async_setup_frontend_endpoint_plugin@  s     ;;666LIItyy'',,_=E
 ?
 ?
 23II++y8	?II##	
 )IIII!!/2#	
 	
 	
 7;3)?
	
s+   AD,D(	D,&B*D,D*D,*D,)r,  r-  r.  r/  r0  r1  r2  rF   r   r3  r4  r  )/rb   rc   rd   re   rf   rO   rg   r  r  r  r   r!  r"  r#  rF   r$  r   r&  r'  r5  r   r:  rA  rJ  rN  rT  rX  r}  r  r  r  r  r  r  r   r?  r  r  r  r
  r  r  r  r  r  r^  rh   rQ   rV   rS   r  r  c  s    D/ )-K&-#'j' FM "&I&!%D
%&*K#*!%E%04J-4$(G!("E"+/J(/%)G")
# * *P
]-B,%8N* !%	BR8
 R8 R8 %)R8 R8hD:L9  $	9
 9 9v
0 7 7>('<R

2=h
-@1*f&\P<C|; ;rV   r  )qrf   
__future__r   r  collections.abcr   r   dataclassesr   r   r   datetimer	   rn  r  rj  pathlibro  typingr
   r   aiogithubapir   r   r   r   r   r   r   aiogithubapi.objects.repositoryr   aiohttp.clientr   r   awesomeversionr   0homeassistant.components.persistent_notificationr   r  homeassistant.config_entriesr   homeassistant.constr   r   homeassistant.corer   r    homeassistant.helpers.dispatcherr   homeassistant.helpers.eventr   $homeassistant.helpers.issue_registryr   r    homeassistant.loaderr!   homeassistant.utilr"   constr#   r$   r%   rG  r&   r  r'   enumsr(   r)   r*   r+   r,   r-   
exceptionsr.   r/   r0   r1   r2   r3   r4   r5   r2  r6   repositories.baser7   r8   utils.file_systemr9   
utils.jsonr:   utils.loggerr;   utils.queue_managerr<   utils.storer=   r>   utils.workaroundsr?   r@   
utils.datarA   validate.managerrB   rD   rj   r   r   r   r   r   r  rQ   rV   rS   <module>r     sr    "  / 0 0    	   %   C 7 ) 5 I 6 B A R , ! ' ' . ' 	 	 	 - V + "   - C 91$3 
 
 
B "- "- "-J ) ) ) 0 0 0 $ $ $ 0 0 0 \ \ \~s; s;rV   