Build 576754stable
Module 681637
1,778 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>C});var i=n(607399),r=n(820739),a=n(439372),s=n(5180),l=n(71393),o=n(576705),d=n(967198),c=n(488803),u=n(764322),_=n(868652),E=n(645619),A=n(832547),h=n(323472),I=n(103821),f=n(313205),p=n(772788),T=n(383272),m=n(414133),g=n(363487),S=n(342220);class N extends a.A{handleSelectedGuildChange(){let e=d.A.getGuildId();if(null==e||(0,s.ai)(e))return;let t=l.A.getGuild(e);if(null==t)return;c.x1.trackExposure({guildId:t.id,location:"GuildPowerupsManager"}),f.LH.trackExposure({guildId:t.id,location:"GuildPowerupsManager"}),T.g$.trackExposure({guildId:t.id,location:"GuildPowerupsManager"}),p.K.getConfig({guildId:t.id,location:"GuildPowerupsManager"}),(0,c.TS)(t.id,"GuildPowerupsManager")&&u.r.trackExposure({guildId:t.id,location:"GuildPowerupsManager"});let n=A.A.getConfig({location:"GuildPowerupsManager"}).enabled,r=I.A.getConfig({location:"GuildPowerupsManager"}).enabled;if(!(0,g.G)(o.A,t)){let t=(n||r)&&(0,S.X)(),a=i.Fr&&(0,T.Qs)(e,"GuildPowerupsManager")&&(0,S.X)()&&(0,m.ht)("GuildPowerupsManager");if(!(i.Fr?a:t))return}E.A.shouldFetchCatalogForGuild(e)&&(0,_.AK)(e),E.A.shouldFetchPowerupsForGuild(e)&&(0,_.Xd)(e)}handleEntitlementUpdate(e){let{guildId:t}=e;this.refreshGuildPowerups(t)}handleAppliedBoostUpdate(e){let{guildId:t}=e;this.refreshGuildPowerups(t)}refreshGuildPowerups(e){if(!0===(0,g.G)(o.A,l.A.getGuild(e))){(0,_.Xd)(e);let t=h.A.getConfig({location:"GuildPowerupsManager"}).enabled;(0,r.VU)(e,{includeEnded:t})}}stores=new Map().set(d.A,this.handleSelectedGuildChange);actions={GUILD_POWERUP_ENTITLEMENTS_CREATE:this.handleEntitlementUpdate.bind(this),GUILD_POWERUP_ENTITLEMENTS_DELETE:this.handleEntitlementUpdate.bind(this),GUILD_APPLIED_BOOSTS_UPDATE:this.handleAppliedBoostUpdate.bind(this)}}let C=new N}