Build 618874stable
Module 174459
9,044 characters · in no known chunkDependencies
Required by (566)
4921310146410392184372175422212245942481425682267413008432672377564005640344432034578045787459384682347675512715367766442668346697667319725147387075076774688496085935893819207792650939389541495561956559581796782970609916199696100057103407105613105971111185112107113673115184115225116058116956119031121025121127121623123071123917128783129802133385136523137728137903139286142630143547144835145331145662146779147472148494152567155965156248157259160185165685168457173971174705174998175671180170184264187522190457190930191110191852196099196231198229199773199940201805201991205463206845207803209932210714211528212245212637212737216599218738219317219801220995225142227780228662230797235393238234241387243460244083246605247254247933250527258360258942259065260364262763262797264322264686264779267889274670276130277984280450280889282475284778285933289498289919292572293061301139302810304232306537307750308229308244308528311849311964316725318104318346319664320426320742330001342218343963345254345332347171350701351906352043354287361845365225365607367513367516367727368309376374376463376728377368377980381969382003382573383199384015384059385430386936387101387755390248390595391040392516395422396495396813401124406860408213408510409352409626411986415951417098419534421617421838423341424185425663429527429707434797438692439325441014441241442152445002448967449054450740451897452015453302455207462116464035465558467884469177469802472734477427479975480890480900482644482857486409487245488358489277492385493527494921497685498480499785501957502229503852504049504394509614510022511558512599514581518960519222521376521376522250525828526162529942530912530951532205532624533129534148540462541335542308544036544576549363549384550560552258554601557637558001561769561844563478564322566119566908567035569717570314575429577700578434578839579908583955588158590114591840592329594061595244595529597643597783599812601007602880609178612200612394612479614584617986619517622868624826625928626148627318631305631963635233636254639245639784640132642213642489644508645320649963650338651247651930655116657977659280660387665267665909669874669953670404670735671576671897672547673809675219684339685374686502687829688438689219692184692848697138700331700525701273705285707539707606707688709779710195710637714892717523718446719102719129720882724624725034727011727170729398729854731383732071735305736056738419744064745299745317746793747007747119747340748579750338751901752118753189754804760751762555763375772800772958773371775121776971777023777307777829777933778572780907785606786948790297791519793322795816796774798286803281806150806677806911807067807780808247808261809871810412810845810877811656812633813564814124815706815807815846816662817232817818818743820284822123823591826181826271826308826789827343827827831688835806836753837057837528845187852105853742855267855302856488856644856768859587860410860603862611866157869362870729871194872233872363873297876717877833878112878678885293888363888781891090894591894778899847901472902550907878920639921138924283925435925895926262927899930101930839930932932140932883933924935671937563939341942262945830946228946255947346947593950344951305951780952818953759954784955437955572957292959070962052963169963897965162965660965957965971967347970048970163970309970573970931971690972387974800975412976627978171983555985110986712987482988903994064997997999235
Requires (16)
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.r(t),n.d(t,{clearAnalyticsEventsRecording:()=>F,trackNetworkAction:()=>H,addExtraAnalyticsDecorator:()=>O,stopRecordingAnalyticsEvents:()=>x,isGameApplicationType:()=>V,AnalyticsContext:()=>g,getNewAnalyticsLoadId:()=>j,launchSignature:()=>N,default:()=>W,startRecordingAnalyticsEvents:()=>G,setUTMContext:()=>b,getAnalyticsEventsRecording:()=>k,expandLocation:()=>L,AnalyticEventConfigs:()=>R,AnalyticsSchema:()=>i,debugLogEvent:()=>P,expandEventProperties:()=>M});var i={};n.r(i),n(321073);var r=n(582128),a=n(132500),s=n(562708),l=n(613345),o=n(306173),d=n(228366),c=n(686757),u=n(53943);let _=["notification_clicked","experiment_user_triggered","experiment_dm_triggered","experiment_guild_triggered","device_event","react_soft_exception","network_capabilities_changed","foreground_service","app_lifecycle","ui_lifecycle","touch_event","http_request","websocket_message_received"];var E=n(111162),A=n(321034),h=n(38405),I=n(652215),f=n(53298),p=n(705751),T=n(375708);let g=r.createContext({location:{}}),m={},S=performance.now(),N=(0,o.xd)()?(0,o.xy)((0,l.V)()):null;s.extendSuperProperties({launch_signature:N});let C=[];function O(e){C.push(e)}let R={[I.HAw.APP_OPENED]:{throttlePeriod:3e5,throttleKeys:()=>[]},[I.HAw.APP_BACKGROUND]:{throttlePeriod:12e4,throttleKeys:()=>[]},[I.HAw.ACK_MESSAGES]:e=>e.location_object_type===I.AnalyticsObjectTypes.ACK_MANUAL?void 0:{throttlePeriod:9e5,throttleKeys:e=>[e.guild_id,e.channel_id,e.location_section]},[I.HAw.GUILD_VIEWED]:{throttlePeriod:9e5,throttleKeys:e=>[e.guild_id,e.is_pending]},[I.HAw.FRIENDS_LIST_VIEWED]:{throttlePeriod:9e5,throttleKeys:e=>[e.tab_opened]},[I.HAw.NOW_PLAYING_CARD_HOVERED]:{throttlePeriod:9e5,throttleKeys:e=>[e.tab_opened]},[I.HAw.START_SPEAKING]:{throttlePeriod:9e5,throttleKeys:e=>[e.server]},[I.HAw.START_LISTENING]:{throttlePeriod:9e5,throttleKeys:e=>[e.server]},[I.HAw.ACTIVITY_UPDATED]:{throttlePeriod:6e4,throttleKeys:e=>[e.application_id],deduplicate:!0},[I.HAw.CHANNEL_OPENED]:{throttlePeriod:9e5,throttleKeys:e=>null!=e.channel_static_route?[e.guild_id,e.channel_static_route,e.channel_view]:[e.channel_id,e.channel_view]},[I.HAw.TEXT_IN_VOICE_OPENED]:{throttlePeriod:864e5,throttleKeys:e=>[e.channel_id]},[I.HAw.NOTIFICATION_VIEWED]:{throttlePeriod:9e5,throttleKeys:e=>[e.notif_type]},[I.HAw.MEMBER_LIST_VIEWED]:{throttlePeriod:9e5,throttleKeys:e=>[e.channel_id]},[I.HAw.DM_LIST_VIEWED]:{throttlePeriod:9e5,throttleKeys:e=>[e.channel_id]},[I.HAw.NAV_DRAWER_OPENED]:{throttlePeriod:9e5,throttleKeys:()=>[]},[I.HAw.KEYBOARD_SHORTCUT_USED]:{throttlePeriod:12e4,throttleKeys:e=>[e.shortcut_name,e.location_object,...e.source_class_list??[]]},[I.HAw.QUICKSWITCHER_OPENED]:{throttlePeriod:1e4,throttleKeys:()=>[]},[I.HAw.CHAT_INPUT_COMPONENT_VIEWED]:{throttlePeriod:9e5,throttleKeys:e=>[e.type]},[I.HAw.ROLE_PAGE_VIEWED]:{throttlePeriod:12e4,throttleKeys:e=>[e.role_id,e.tab_opened]},[I.HAw.VIDEO_INPUT_INITIALIZED]:{throttlePeriod:3e5,throttleKeys:()=>[]},[I.HAw.AUDIO_INPUT_INITIALIZED]:{throttlePeriod:3e5,throttleKeys:()=>[]},[I.HAw.HUB_ONBOARDING_CAROUSEL_SCROLLED]:{throttlePeriod:9e5,throttleKeys:()=>[]},[I.HAw.HUB_STUDENT_PROMPT_CLICKED]:{throttlePeriod:9e5,throttleKeys:()=>[]},[I.HAw.RPC_SERVER_ERROR_CAUGHT]:{throttlePeriod:864e5,throttleKeys:()=>[]},[I.HAw.RPC_COMMAND_SENT]:{throttlePeriod:864e5,throttleKeys:e=>[e.application_id,e.command],throttlePercent:.001},[I.HAw.RPC_SUBSCRIPTION_REQUESTED]:{throttlePeriod:864e5,throttleKeys:e=>[e.application_id,e.event],throttlePercent:.001},[I.HAw.ACTIVITY_HANDSHAKE]:{throttlePeriod:864e5,throttleKeys:e=>[e.application_id]},[I.HAw.CHANNEL_BANNER_VIEWED]:{throttlePeriod:864e5,throttleKeys:e=>[e.banner_type,e.channel_id]},[s.ImpressionNames.GUILD_HANGOUT_WINDOW]:{throttlePeriod:864e5,throttleKeys:e=>[e.channel_id,e.banner_hash]},[s.ImpressionNames.GUILD_HANGOUT_WINDOW_ENTRY_POINT]:{throttlePeriod:864e5,throttleKeys:e=>[e.channel_id,e.media_session_id]},[I.HAw.PREMIUM_UPSELL_VIEWED]:{throttlePeriod:6e4,throttleKeys:e=>[e.type]},[I.HAw.FORUM_CHANNEL_SEARCHED]:{throttlePeriod:6e4,throttleKeys:e=>[e.guild_id,e.channel_id]},[I.HAw.FORUM_CHANNEL_SCROLLED]:{throttlePeriod:9e5,throttleKeys:e=>[e.guild_id,e.channel_id]},[I.HAw.VOICE_CHANNEL_GAME_ACTIVITY_INDICATOR_VIEWED]:{throttlePeriod:6e4,throttleKeys:e=>[e.user_id]},[I.HAw.MEDIA_VIEWER_SESSION_COMPLETED]:{throttlePeriod:6e4,throttleKeys:()=>[]},[I.HAw.SUMMARIES_UNREAD_BAR_VIEWED]:{throttlePeriod:3e5,throttleKeys:e=>[e.channel_id]},[I.HAw.ACTIVITY_CARDS_VIEWED]:{throttlePeriod:9e5,throttleKeys:e=>[e.context,e.guild_id]},[I.HAw.GUILD_TOOLTIP_SHOWN]:{throttlePeriod:9e5,throttleKeys:e=>[e.guild_id]},[I.HAw.ACK_COMMUNITY_MESSAGES]:{throttlePeriod:9e5,throttleKeys:e=>[e.channel_id]},[I.HAw.REDESIGN_NAV_BAR_CLICKED]:{throttlePeriod:9e5,throttleKeys:e=>[e.tab]},[I.HAw.CHANNEL_LIST_END_REACHED]:{throttlePeriod:9e5,throttleKeys:e=>[e.guild_id]},[I.HAw.EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED]:{throttlePeriod:6e4,throttleKeys:e=>[e.guild_id,e.channel_id]},[I.HAw.LIVE_ACTIVITY_SETTINGS_UPDATED]:{throttlePeriod:36e5,throttleKeys:()=>[]},[I.HAw.MEDIA_INPUT_VOLUME_CHANGED]:{throttlePeriod:3e5,throttleKeys:e=>[e.location_stack]},[I.HAw.MEDIA_OUTPUT_VOLUME_CHANGED]:{throttlePeriod:3e5,throttleKeys:e=>[e.location_stack]},[I.HAw.APP_DMS_QUICK_LAUNCHER_IMPRESSION]:{throttlePeriod:9e5,throttleKeys:e=>[e.channel_id]},[I.HAw.USER_VOICE_ACTIVITY_VIEWED]:{throttlePeriod:3e5,throttleKeys:e=>[e.activity_user_id,e.surface],deduplicate:!0},[I.HAw.PARTY_VOICE_ACTIVITY_VIEWED]:{throttlePeriod:3e5,throttleKeys:e=>[e.voice_channel_id],deduplicate:!0},[I.HAw.MEMBER_LIST_SWIPE_PEEK]:{throttlePeriod:1e3,throttleKeys:e=>[e.channel_id]},[I.HAw.REDACTABLE_MESSAGE_LOADED]:{throttlePeriod:9e5,throttleKeys:e=>[e.channel_id,e.message_id]},[I.HAw.OPEN_MODAL]:e=>e.type===I.JJy.MEDIA_VIEWER?{throttlePeriod:6e4,throttleKeys:e=>[e.type]}:void 0,[I.HAw.MODERATOR_QUEUE_ACTION]:{throttlePeriod:1e4,throttleKeys:e=>[e.guild_id]},[I.HAw.NOTIFICATION_PERMISSION_STATUS]:{throttlePeriod:432e5,throttleKeys:e=>[e.os_enabled,e.notification_authorization_status,e.foreground_app_enabled,e.background_app_enabled]},[I.HAw.SEARCH_BAR_VIEWED]:{throttlePeriod:36e5,throttleKeys:e=>[e.search_type]},[I.HAw.AD_IDENTIFIER_FETCHED]:{throttlePeriod:864e5,throttleKeys:()=>[]},[I.HAw.ACTIVITY_PANEL_SDK_LINK_VIEWED]:{throttlePeriod:864e5,throttleKeys:e=>[e.application_id]},[I.HAw.LIBDISCORE_SLOW_TIMERS]:{throttlePeriod:36e5,throttleKeys:()=>[]},[I.HAw.VIDEO_STREAM_ZOOM_CHANGED]:{throttlePeriod:1e3,throttleKeys:()=>[]},[I.HAw.CACHE_STATS_RECORDED]:{throttlePeriod:9e5,throttleKeys:()=>[]},[I.HAw.TYPING_INDICATOR_STYLE_SEEN]:{throttlePeriod:864e5,throttleKeys:()=>[]}};function L(e){return"string"==typeof e?{location:e}:{location:e.page,location_page:e.page,location_section:e.section,location_object:e.object,location_object_type:e.objectType}}let y=()=>f.O.NONE;function D(e){_.includes(e)||h.A.addBreadcrumb({category:"analytics",message:e})}let v=(0,s.trackMaker)({addBreadcrumb:D,analyticEventConfigs:R,dispatcher:d.h,TRACK_ACTION_NAME:"TRACK"});function b(e){return m=e}function M(e){let t=e??{};if(null!=t.location){let{location:e,...n}=t;t={...n,...L(e)}}if(null!=t.source){let{source:e,...n}=t;t={...n,..."string"==typeof e?{source:e}:{source_page:e.page,source_section:e.section,source_object:e.object,source_object_type:e.objectType,source_promotion_id:e.promotionId}}}t.client_performance_cpu=A.A.getCurrentCPUUsagePercent(),t.client_performance_memory=A.A.getCurrentMemoryUsageKB(),t.cpu_core_count=A.A.getCPUCoreCount(),t.accessibility_features=y(),t.rendered_locale=T.intl.currentLocale,t.uptime_app=Math.floor((performance.now()-S)/1e3);let n=A.A.getProcessUptime();null!=n&&(t.uptime_process_renderer=Math.floor(n));let{utmSource:i,utmMedium:r,utmCampaign:a,utmContent:s}=m;return t.utm_source=t.utm_source??i,t.utm_medium=t.utm_medium??r,t.utm_campaign=t.utm_campaign??a,t.utm_content=t.utm_content??s,t.launch_signature=N,C.forEach(e=>e(t)),t}function P(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];E.default.isLoggingAnalyticsEvents&&console.info("AnalyticsUtils.track(...):",e,t),n?u.z8("Analytics",e,t):u.z8("Analytics",e)}let U=!1,w={};function G(){U=!0}function x(){U=!1}function k(){return w}function F(){Object.keys(w).forEach(e=>{delete w[e]})}let B=(0,s.trackMaker)({addBreadcrumb:D,analyticEventConfigs:R,dispatcher:d.h,TRACK_ACTION_NAME:"TRACK"});function V(e){return e===p.S7.GAME||e===p.S7.DEPRECATED_GAME}function H(e,t){let n=M({location:(0,c.g$)(),...t});(0,c.eE)(e,{type:"action",...t}),P(e,n),B(e,n)}function j(){return(0,a.A)()}let W={...s,getCampaignParams:s.getCampaignParams,setSystemAccessibilityFeatures:function(e){y=e},expandEventProperties:M,track:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=String(e);if(U&&null!=t&&(Array.isArray(w[e])?w[e].push(t):w[e]=[t]),null!=n.throttlePercent&&Math.random()>n.throttlePercent)return Promise.resolve();let r=M(t);return P(i,r,n.logEventProperties),v(e,r,{flush:n.flush,fingerprint:n.fingerprint})}}}