Module 416380

3,039 characters · in no known chunk
Dependencies
Required by (1)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>R}),n(321073);var r=n(735438),i=n.n(r),s=n(803805),a=n(439372),o=n(26909),l=n(630248),u=n(508675),c=n(931959),d=n(205761),_=n(927813),f=n(594061),p=n(617617),h=n(761821),m=n(355097);n(705751);let E=10+Math.random()*(10*_.A.Millis.SECOND),g=2*_.A.Millis.HOUR+Math.floor(Math.random()*(10*_.A.Millis.MINUTE)),A=null,I=!1;class T extends a.A{actions={POST_CONNECTION_OPEN:S,CONNECTION_RESUMED:S,CONNECTION_CLOSED:v,APP_STATE_UPDATE:y};_initialize(){f.bW.beforeSendCallbacks.push({hasChanges:()=>!1,processProto:()=>{C(g,!1)}}),f.bW.beforeSendCallbacks.push({hasChanges:()=>c.A.hasPendingUsage()&&p.A.hasLoaded(m.oD.FRECENCY_AND_FAVORITES_SETTINGS),processProto:e=>{!c.A.hasPendingUsage()||p.A.hasLoaded(m.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(e.stickerFrecency=s.Do.create(),e.stickerFrecency.stickers=(0,h.Mr)(c.A.stickerFrecencyWithoutFetchingLatest.usageHistory,100))}}),f.bW.beforeSendCallbacks.push({hasChanges:()=>u.Ay.hasPendingUsage()&&p.A.hasLoaded(m.oD.FRECENCY_AND_FAVORITES_SETTINGS),processProto:e=>{!u.Ay.hasPendingUsage()||p.A.hasLoaded(m.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(e.emojiFrecency=s.Q8.create(),e.emojiReactionFrecency=s.Q8.create(),e.emojiFrecency.emojis=(0,h.Mr)(u.Ay.emojiFrecencyWithoutFetchingLatest.usageHistory,100),e.emojiReactionFrecency.emojis=(0,h.Mr)(u.Ay.emojiReactionFrecencyWithoutFetchingLatest.usageHistory,100))}}),f.bW.beforeSendCallbacks.push({hasChanges:()=>o.Ay.hasPendingUsage()&&p.A.hasLoaded(m.oD.FRECENCY_AND_FAVORITES_SETTINGS),processProto:e=>{!o.Ay.hasPendingUsage()||p.A.hasLoaded(m.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(e.applicationCommandFrecency=s.Zc.create(),e.applicationCommandFrecency.applicationCommands=(0,h.Mr)(o.Ay.getCommandFrecencyWithoutLoadingLatest().usageHistory,500))}}),f.bW.beforeSendCallbacks.push({hasChanges:()=>l.A.hasPendingUsage()&&p.A.hasLoaded(m.oD.FRECENCY_AND_FAVORITES_SETTINGS),processProto:e=>{!l.A.hasPendingUsage()||p.A.hasLoaded(m.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(e.applicationFrecency=s.cC.create(),e.applicationFrecency.applications=(0,h.Mr)(l.A.getApplicationFrecencyWithoutLoadingLatest().usageHistory,100))}}),f.bW.beforeSendCallbacks.push({hasChanges:()=>d.A.hasPendingUsage()&&p.A.hasLoaded(m.oD.FRECENCY_AND_FAVORITES_SETTINGS),processProto:e=>{!d.A.hasPendingUsage()||p.A.hasLoaded(m.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(e.guildAndChannelFrecency=s.F1.create(),e.guildAndChannelFrecency.guildAndChannels=(0,h.Mr)(d.A.frecencyWithoutFetchingLatest.usageHistory,d.D))}})}}function S(){I=!0,C(E,!0)}function y(e){I&&"active"!==e.state&&(clearTimeout(A),A=null,N(!1))}function v(){I&&(clearTimeout(A),A=null,N(!1))}async function N(e){C(g,!1),!p.A.hasLoaded(m.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(c.A.hasPendingUsage()||u.Ay.hasPendingUsage()||o.Ay.hasPendingUsage()||l.A.hasPendingUsage()||d.A.hasPendingUsage()&&!e)&&((0,f.cE)(),await f.bW.loadIfNecessary()),i().forEach(f.Df,e=>{e.markDirtyIfHasPendingChange()})}function C(e,t){null!=A&&clearTimeout(A),A=setTimeout(()=>N(t),e)}let R=new T}