sort-toggle-dsa","international/utils/country-utils","ember-async-data/tracked-async-data","graphql-queries/queries/messaging/messaging-affiliated-mailboxes.graphql","@linkedin/ember-pem/utils/degradation-tracking-metadata","ember-cli-pemberly-tracking/utils/user-timing","video/utils/prefetching","global-nav-shared/utils/badges"],(function(e,t,i,n,r,l,o,a,s,d,u,c,p,m,f,h,g,b,y,_,v,E,w,T,S,P,k,O,C,D,I,A,M,U,N,x,R,F,j,L,z,H,G,q,B,W,V,K,Y,Q,$,J,X,Z,ee,te,ie){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=e.SCROLLS_FOR_AD_REFRESH=e.FIRST_LINE_GROUPID=void 0
var ne,re,le,oe,ae,se,de,ue,ce,pe,me,fe,he,ge,be,ye,_e,ve,Ee,we,Te,Se,Pe,ke,Oe,Ce,De,Ie,Ae,Me,Ue,Ne,xe,Re,Fe,je,Le,ze,He,Ge,qe,Be,We,Ve,Ke,Ye,Qe,$e,Je,Xe,Ze,et,tt,it,nt,rt,lt,ot,at,st,dt,ut,ct,pt,mt,ft,ht
const gt="REVERSE_CHRONOLOGICAL",bt="feedInitialRequestUpdates",yt="feedInitialHighlightedUpdate",_t={saved:{messageKey:"i18n_connected_services_saved",pageKey:"flagship3_consent_experience_choices_saved"},pas:{messageKey:"i18n_non_premium_personalized_ads_setting",ctaControlName:"consent_experience_personalized_ads",pageKey:"flagship3_consent_experience_personalized_ads",ctaTextKey:"i18n_manage_settings"},"premium-pas":{messageKey:"i18n_personalized_ads_setting",ctaControlName:"consent_experience_personalized_ads_premium",pageKey:"flagship3_consent_experience_personalized_ads_premium",ctaTextKey:"i18n_manage_settings"},"enterprise-pas":{messageKey:"i18n_personalized_ads_setting",ctaControlName:"consent_experience_personalized_ads_enterprise",pageKey:"flagship3_consent_experience_personalized_ads_enterprise",ctaTextKey:"i18n_manage_settings"},sub:{messageKey:"i18n_subscribe_linkedin_direct",ctaControlName:"consent_experience_ads_free_subscription",pagekey:"flagship3_consent_experience_ads_free_subscription",ctaTextKey:"i18n_manage_plan"},"enterprise-sub":{messageKey:"i18n_enterprise_subscribe_linkedin_direct",ctaControlName:"consent_experience_ads_free_subscription_enterprise",pageKey:"flagship3_consent_experience_ads_free_subscription_enterprise",ctaTextKey:"i18n_manage_plan"},"switch-pas":{messageKey:"i18n_switch_plan_linkedin_direct",ctaControlName:"consent_experience_switched_to_personalized_ads",pageKey:"flagship3_consent_experience_switched_to_personalized_ads"},expired:{messageKey:"i18n_expired_linkedin_direct",ctaControlName:"consent_experience_subscription_expired",pageKey:"flagship3_consent_experience_subscription_expired",ctaTextKey:"i18n_manage_settings"}},vt="Main feed fetch resulted in partial error.",Et=e.SCROLLS_FOR_AD_REFRESH=1
e.FIRST_LINE_GROUPID="8797287"
const wt=Object.freeze({refreshModel:!1})
e.default=(ne=(0,d.inject)("ads@ad-banner-manager"),re=(0,d.inject)("authentication@authenticated-user"),le=(0,d.inject)("global-nav-shared@badge"),oe=(0,d.inject)("client-sensor-web@client-sensor"),ae=(0,d.inject)("date"),se=(0,d.inject)("fastboot-bpr"),de=(0,d.inject)("i18n"),ue=(0,d.inject)("community-panel@interest-package-data-manager"),ce=(0,d.inject)("profile-services@identity-store"),pe=(0,d.inject)("jet"),me=(0,d.inject)("launchpad-services@launchpad-v2"),fe=(0,d.inject)("lix"),he=(0,d.inject)("locale"),ge=(0,d.inject)("global-services@local-storage"),be=(0,d.inject)("new-update-indicator@new-update-indicator"),ye=(0,d.inject)("persistent-toast-manager@persistent-toast-manager"),_e=(0,d.inject)("feed-utils@content-admin-identities"),ve=(0,d.inject)("feed-utils@pagination-token"),Ee=(0,d.inject)("router"),we=(0,d.inject)("global-services@store-shim"),Te=(0,d.inject)("tracking"),Se=(0,d.inject)("feed-utils@view-state"),Pe=(0,d.inject)("global-services@window"),ke=(0,d.inject)("pem-tracking"),Oe=(0,d.inject)("prefetch"),Ce=(0,d.inject)("social-counts-service@social-counts"),De=(0,d.inject)("@linkedin/ember-restli-graphql@graphql"),Ie=(0,d.inject)("cache-prefetch@cache-prefetch"),Ae=(0,d.inject)("feed-tracking@feed-action-event"),Me=(0,d.inject)("interop"),Ue=(pt=new WeakMap,mt=new WeakSet,ft=new WeakSet,ht=new WeakSet,class extends p.default{get isEuropeanLocale(){return $.default.isEuropeanLocale(this.locale)}get isBadgeHomeOnNoScrollEnabled(){return this.lix.getTreatmentIsEnabled("voyager.web.feed-integrations-badge-home-on-no-scroll")}get shouldDelayNonCriticalDataToAfterRender(){return this.lix.getTreatmentIsEnabled("voyager.web.feed-non-critical-data-delayed-render-main-feed")}get isBadgeHomeOnNoInteractionEnabled(){return this.lix.getTreatmentIsEnabled("voyager.web.feed-integrations-badge-home-on-no-interaction")}get isDashMainFeedEnhancedLoggingEnabled(){return this.lix.getTreatmentIsEnabled("voyager.web.feed-cy-dash-main-feed-enhanced-logging")}get isFeedTabsEnabled(){return this.lix.getTreatmentIsEnabled("voyager.web.feed-accelerators-top-of-feed-tabs")}get isMultiPageUpsellEnabled(){return this.lix.getTreatmentIsEnabled("voyager.web.organization-multipage-premium-page-upsell-feed-left-rail")}get isMultiPageUpsellFetchMoreOrganizationsEnabled(){return this.lix.getTreatmentIsEnabled("voyager.web.organization-multipage-premium-page-upsell-feed-left-rail-fetch-more-organizations")}constructor(){super(...arguments)
ht.add(this)
ft.add(this)
mt.add(this);(0,t.default)(this,"adBannerManager",Ne,this);(0,t.default)(this,"authenticatedUser",xe,this);(0,t.default)(this,"badgeService",Re,this);(0,t.default)(this,"clientSensor",Fe,this);(0,t.default)(this,"date",je,this);(0,t.default)(this,"fastbootBpr",Le,this);(0,t.default)(this,"i18n",ze,this);(0,t.default)(this,"interestPackageDataManager",He,this);(0,t.default)(this,"identityStore",Ge,this);(0,t.default)(this,"jet",qe,this);(0,t.default)(this,"launchpadV2",Be,this);(0,t.default)(this,"lix",We,this);(0,t.default)(this,"locale",Ve,this);(0,t.default)(this,"localStorage",Ke,this);(0,t.default)(this,"newUpdateIndicator",Ye,this);(0,t.default)(this,"persistentToastManager",Qe,this);(0,t.default)(this,"contentAdminIdentities",$e,this);(0,t.default)(this,"paginationTokenService",Je,this);(0,t.default)(this,"router",Xe,this);(0,t.default)(this,"storeShim",Ze,this);(0,t.default)(this,"tracking",et,this);(0,t.default)(this,"viewState",tt,this);(0,t.default)(this,"windowService",it,this);(0,t.default)(this,"pemTracking",nt,this);(0,t.default)(this,"prefetch",rt,this);(0,t.default)(this,"socialCountsService",lt,this);(0,t.default)(this,"graphql",ot,this);(0,t.default)(this,"cachePrefetch",at,this);(0,t.default)(this,"feedActionEvent",st,this);(0,t.default)(this,"interop",dt,this);(0,i.default)(this,"_currentRenderedLayer",0);(0,i.default)(this,"currentScrolledPage",0);(0,i.default)(this,"feedUpdatesUrl",I.FeedConstants.FEED_UPDATES_ENDPOINT);(0,i.default)(this,"hasFetchedInitialUpdates",!1);(0,i.default)(this,"layeredRenderingEnabled",void 0);(0,i.default)(this,"moduleKey",I.FeedConstants.INDEX_EXTENDED_ROUTE_MODULE_KEY);(0,i.default)(this,"numRenderLayers",4);(0,i.default)(this,"pageKey","flagship3_feed");(0,i.default)(this,"showAnonymousLoginFailureToast",!1);(0,i.default)(this,"queryParams",{member:wt,trk:wt,lidirect:wt,acceptedFrom:wt,createEvent:wt,an_l:wt,shouldShowGroupFeed:wt,highlightedUpdateUrn:Object.freeze({refreshModel:!0})});(0,i.default)(this,"saveScrollPosition",!0);(0,i.default)(this,"updateFeedQueryFinder",I.FeedFinder.FEED_FINDER);(0,i.default)(this,"feedSortOrder",I.SortOrder.MEMBER_SETTING);(0,i.default)(this,"feedType",A.MAIN_FEED);(0,i.default)(this,"queuedControllerProperties",{});(0,i.default)(this,"updatePosition",1);(0,i.default)(this,"_updateRequests",[]);(0,i.default)(this,"userHasScrolled",!1);(0,i.default)(this,"userHasClickedOnMainFeed",!1)
pt.set(this,{writable:!0,value:new U.default(this.fireFeedUpdatesClientSensorAndPageViewEvents.bind(this))});(0,t.default)(this,"updateCollections",ut,this);(0,t.default)(this,"paginationState",ct,this);(0,i.default)(this,"isStaff",this.lix.getTreatmentIsEnabled("voyager.client.staff"));(0,i.default)(this,"_userScrollListener",(()=>{this.userHasScrolled=!0
this._userScrollListenerCleanup()}));(0,i.default)(this,"_userClickListener",(e=>{if(x.default){const t=document.querySelector("main")
if(t&&t.contains(e.target)){this.userHasClickedOnMainFeed=!0
this._userClickListenerCleanup()}}}))
const e=!this.fastbootBpr.isSSRPath
this.pagingCountOverride={1:I.FeedConstants.INITIAL_FETCH_UPDATE_COUNT,2:I.FeedConstants.INITIAL_UPDATE_COUNT_EXTENDED-I.FeedConstants.INITIAL_FETCH_UPDATE_COUNT}
this.cachedData={}
this.updateCollections=new K.TrackedArray
this.badgeService.setCustomQueryBuilder("feed",(e=>{e.queryAfterTime=this.queryAfterTime
return e}));(0,c.setProperties)(this,{layeredRenderingEnabled:e,feedUpdatesUrl:I.FeedConstants.FEED_UPDATES_V2_ENDPOINT,isCreateEventEnabled:(0,w.canViewerCreateAnEvent)(this.locale),moduleKey:I.FeedConstants.INDEX_EXTENDED_ROUTE_MODULE_KEY})
x.default&&this.interop.isActive&&(0,E.addEventListener)(this,window,"scroll",(()=>{(0,E.debounceTask)(this,"shouldUpdateScrollPosition",250)}))}afterModel(e){if((0,a.isDestroying)(this))return
this.shouldDelayNonCriticalDataToAfterRender?(0,S.afterRender)().then((()=>{this.isDestroying||this._resolveNonCriticalData(e,this.nonCriticalData,!0)})):this._resolveNonCriticalData(e,this.nonCriticalData,!0)
const t=(0,u.getOwner)(this)
e.authenticatedFeedActor=(0,b.fetchMemberActor)(t)
e.share={actor:e.authenticatedFeedActor,mentions:[],shareText:""}
this.showAnonymousLoginFailureToast&&this.showFailedAnonymousLoginToast()
this._getControllerProperty("caughtErrorLoadingHighlightedUpdate")&&!this._getControllerProperty("caughtErrorLoadingUpdates")&&this._showErrorLoadingHighlightedUpdateToast()}beforeModel(e){var t
const i=null===(t=this.authenticatedUser)||void 0===t?void 0:t.miniProfile
this.prefetch.prefetchData((0,h.jobsPrefetchConfig)(this.localStorage,e,this.lix),"feed-jobs")
i.then((e=>{if((0,a.isDestroying)(this))return
const t=e.publicIdentifier,i=(0,g.default)(t)
this.prefetch.prefetchData(i,"feed-profile")}))}willDestroy(){super.willDestroy(...arguments)
this._cleanupRefreshOnFocusChange()}_userScrollListenerSetup(){x.default&&!this.userHasScrolled&&(0,E.addEventListener)(this,this.windowService,"scroll",this._userScrollListener,{once:!0})}_userScrollListenerCleanup(){x.default&&(0,E.removeEventListener)(this,this.windowService,"scroll",this._userScrollListener)}_userClickListenerSetup(){x.default&&!this.userHasClickedOnMainFeed&&(0,E.addEventListener)(this,this.windowService,"click",this._userClickListener)}_userClickListenerCleanup(){x.default&&(0,E.removeEventListener)(this,this.windowService,"click",this._userClickListener)}activate(){super.activate(...arguments)
if(x.default){this._handleScrollHistorySetup()
this.isBadgeHomeOnNoScrollEnabled&&this._userScrollListenerSetup()
if(this.isBadgeHomeOnNoInteractionEnabled){this._userScrollListenerSetup()
this._userClickListenerSetup()}}this.badgeService.resetPollingIntervalForFeed()}deactivate(){super.deactivate(...arguments)
if(x.default){this._handleScrollHistoryReset()
if(this.isBadgeHomeOnNoScrollEnabled){this._userScrollListenerCleanup()
if(!this.userHasScrolled){var e
this.badgeService.setBadgeCount("feed",null===ie.BADGES||void 0===ie.BADGES||null===(e=ie.BADGES.feed)||void 0===e?void 0:e.indicatorThreshold)}}if(this.isBadgeHomeOnNoInteractionEnabled){this._userScrollListenerCleanup()
this._userClickListenerCleanup()
if(!this.userHasClickedOnMainFeed&&!this.userHasScrolled){var t
this.badgeService.setBadgeCount("feed",null===ie.BADGES||void 0===ie.BADGES||null===(t=ie.BADGES.feed)||void 0===t?void 0:t.indicatorThreshold)}}}this.badgeService.reducePollingIntervalForFeed()}fireFeedUpdatesClientSensorAndPageViewEvents(){this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.MAIN_FEED_UPDATE_IMPRESSION)
this.tracking.firePageViewEvent("flagship3_feed_updates")}getCountOverrideForNextPage(){var e,t,i
if(((null===(e=this.updateCollections)||void 0===e||null===(t=e[0])||void 0===t||null===(i=t.elements)||void 0===i?void 0:i.length)??0)<I.FeedConstants.INITIAL_UPDATE_COUNT_EXTENDED){var n
const e=null!==(n=this.updateCollections)&&void 0!==n&&n.length?this.updateCollections.length+1:1
return this.pagingCountOverride[e]}return null}getInitialFeed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0
this.hasFetchedInitialUpdates=!0
const{updateCollections:n}=this,{highlightedUpdateUrn:l,highlightedUpdateType:o,associatedUrns:s}=e,d={commentsCount:0,likesCount:0,start:0,count:this.getCountOverrideForNextPage()||I.FeedConstants.INITIAL_UPDATE_COUNT_EXTENDED,q:this._getInitialFeedFinder(e),moduleKey:this.moduleKey,highlightedUpdateUrn:l,highlightedUpdateType:o,associatedUrns:s,sortOrder:this.feedSortOrder}
if(this.isFeedTabsEnabled){d.feedTabOptionType=this.feedType
this.highlightedUpdateUrn&&(this.feedType=A.MAIN_FEED)}(this.isEuropeanLocale||this.isDashEnabled)&&(d.sortOrder=this.feedSortOrder)
const u={adapterOptions:{degradations:d.sortOrder===I.SortOrder.REV_CHRON?[I.DEGRADATION_TRACKING_METADATA.RECENT_UPDATES]:[I.DEGRADATION_TRACKING_METADATA.UPDATES],degradedEntityIDsToRemove:[]}}
this.isFeedTabsEnabled&&this.feedType===A.IN_NETWORK&&(u.adapterOptions.degradations=[I.DEGRADATION_TRACKING_METADATA.IN_NETWORK_UPDATES])
const p=I.PLT_MEASUREMENTS.INITIAL_UPDATE_FETCH_DASH
ee.default.addMarker(`mark_${p}_start`)
this.isInitialFetchInProgress=!0
return this.loadUpdateCollection(d,u,p).then((e=>{var t
if((0,a.isDestroying)(this))return
this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.INITIAL_UPDATE_REQUEST)
l&&this.localStorage.setItem(yt,l)
e&&this._checkForStaleFeed(e)
const s=(null==e?void 0:e.metadata)||{},d=(null==e?void 0:e.paging)||{}
this.paginationState=new P.default({start:d.start,count:d.count,pagingSize:I.FeedConstants.INITIAL_UPDATE_COUNT_EXTENDED,total:d.total,direction:"next"})
this.processNewUpdateCollection({updateCollection:e});(0,r.default)(this,pt).hybridPVEOnInitialRequestSucceed()
const{paginationTokenExpiryTime:u}=s
this._resetSessionExpirationTimer(u);(0,c.setProperties)(this,{paginationToken:s.paginationToken,queryAfterTime:s.queryAfterTime})
if(l&&"MITN"===o){var p,m;(null===(m=(null===(p=e.elements)||void 0===p?void 0:p[0]).metadata)||void 0===m?void 0:m.urn)!==l&&this._showMentionRetractedToast()}this.badgeService.resumePolling("feed")
const f=null==e||null===(t=e.elements)||void 0===t?void 0:t.length
1===i&&f>=1&&this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.MAIN_FEED_INITIAL_FETCH_RETRY_SUCCESS)
s.preferredSortSetting&&(this.preferredSortSetting=s.preferredSortSetting)
this.preferredSortSetting===I.SortOrder.REV_CHRON&&(this.updateFeedQueryFinder=I.FeedFinder.CHRON_FEED_FINDER)
let h=!1
if(this.isEuropeanLocale){this.updateFeedQueryFinder=I.FeedFinder.FEED_FINDER
this._setControllerProperty("feedSortOrder",s.sort)
if(this.preferredSortSetting===I.SortOrder.REV_CHRON){const e=gt
this._setControllerProperty("commentSortOrder",e)
h=!0}}if(this.isFeedTabsEnabled){this._setControllerProperty("feedType",this.feedType)
const e=this.feedType===A.IN_NETWORK
this.moduleKey=e?I.FeedConstants.INDEX_EXTENDED_ROUTE_IN_NETWORK_MODULE_KEY:I.FeedConstants.INDEX_EXTENDED_ROUTE_MODULE_KEY
this._setControllerProperty("moduleKey",this.moduleKey)
this.feedActionEvent.setCustomModuleKey(e?this.moduleKey:void 0)}l&&(h=!0)
h&&this.launchpadV2.dismiss()
return n})).catch((n=>{if((0,a.isDestroying)(this))throw n
this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.INITIAL_UPDATE_REQUEST_FAILED)
const r=n.message.indexOf("Network request failed")
if(((0,M.is5xxHttpError)(n)||r>=0)&&i<1){this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.MAIN_FEED_INITIAL_FETCH_RETRY)
return this.getInitialFeed(e,t,i+1)}if((0,M.isHttpErrorStatus)(n)){this.tracking.fireTrackingPayload({topicName:"OopsPageViewEvent",eventName:"PageViewEvent"},{pageType:"ajax",totalTime:0,trackingInfo:{}})
this.pemTracking.trackOopsPage(n,t)
this._setControllerProperty("caughtErrorLoadingUpdates",!0)
this.highlightedUpdateUrn&&this._setControllerProperty("caughtErrorLoadingHighlightedFeedUpdates",!0)
return[]}throw n})).finally((()=>{if(!(0,a.isDestroying)(this)){this.isInitialFetchInProgress=!1
this._resetNewUpdatesIndicators()}}))}getHighlightedUpdate(){const e={start:0,count:1,...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}},t={adapterOptions:{degradations:[I.DEGRADATION_TRACKING_METADATA.HIGHLIGHTED_UPDATE],degradedEntityIDsToRemove:[]}}
this.isStaff&&this._updateRequests.push({feedUpdatesUrl:"RelevanceFeed",params:e,clientTime:(new Date).toUTCString(),getHighlightedUpdate:!0})
this._setControllerProperty("isLoadingHighlightedUpdate",!0)
return this.graphql.executeQuery(B.default,e,{reload:!0,...t}).then((e=>{var t,i,r
if((0,a.isDestroying)(this))return
const l=null===(t=e.data)||void 0===t||null===(i=t.feedDashMainFeedByMainFeed)||void 0===i?void 0:i.elements
this.socialCountsService.registerElementsList(l??[])
if(null!==(r=e.errors)&&void 0!==r&&r.length){var o,s
this.incrementClientSensorMetric(D.LycheeClientSensorMetrics.HIGHLIGHTED_UPDATE_REQUEST_FAILED);(0,n.default)(this,ft,St).call(this,{message:`Highlighted update fetch resulted in partial error. ${null===(o=e.errors)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.message}`,errors:e.errors},I.JET_TAGS.GET_HIGHLIGHTED_UPDATE)}return null==l?void 0:l[0]})).catch((e=>{if((0,a.isDestroying)(this))throw e
if(!e.errors)throw e
this.incrementClientSensorMetric(D.LycheeClientSensorMetrics.HIGHLIGHTED_UPDATE_REQUEST_FAILED);(0,n.default)(this,ft,St).call(this,e,I.JET_TAGS.GET_HIGHLIGHTED_UPDATE)
if((0,M.isHttpErrorStatus)(e)){this._setControllerProperty("caughtErrorLoadingHighlightedUpdate",!0)
return null}throw e})).finally((()=>{(0,a.isDestroying)(this)||this._setControllerProperty("isLoadingHighlightedUpdate",!1)}))}_resetSessionExpirationTimer(e){this.paginationTokenService.unexpire(this.updateFeedQueryFinder)
let t=e-this.date.now()
const i=18e5
i<t&&(t=i)
const{_sessionExpirationTimer:n}=this
n&&(0,E.cancelTask)(this,n)
t>0&&(this._sessionExpirationTimer=(0,E.runTask)(this,this.onSessionExpiration,t))}onSessionExpiration(){this.badgeService.setBadgeCount("feed",R.NEW_UPDATES_INDICATOR_THRESHOLD)
this._handleRefreshOnPaginationTokenExpiration()}incrementClientSensorMetric(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.CLIENT_SENSOR_GROUP_NAME;(0,m.isEmpty)(e)||this.clientSensor.incrementMetricCounter({groupName:t,metricName:e})}loadUpdateCollection(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=`feed/updates|${e.q}|${e.start}|${e.count}|${e.moduleKey}`
e.paginationToken&&0!==e.start&&(r=r.concat(`|${e.paginationToken}`))
e.highlightedUpdateUrn&&(r=r.concat(`|${e.highlightedUpdateUrn}`))
const l={start:e.start,count:e.count,paginationToken:e.paginationToken,sortOrder:e.sortOrder}
e.highlightedUpdateUrn&&(l.highlightedUpdateUrn=e.highlightedUpdateUrn)
e.highlightedUpdateType&&(l.highlightedUpdateType=e.highlightedUpdateType)
this.isFeedTabsEnabled&&(l.feedTabOptionType=this.feedType)
const o=["/voyager/api/graphql",{...B.default,[W.ACCEPT_PROPERTY_NAME.toLowerCase()]:W.ACCEPT}],s=this.cachePrefetch.hasCache(...o)
this.isStaff&&this._updateRequests.push({feedUpdatesUrl:this.feedUpdatesUrl,params:l,clientTime:(new Date).toUTCString(),loadUpdateCollection:!0})
return this.graphql.executeQuery(B.default,l,{cacheKey:r,reload:0!==e.start||0===e.start&&!s,...t}).then((e=>{var t,r
if((0,a.isDestroying)(this))return
s?ee.default.clearMarker(`mark_${i}_start`):i&&function(e){const t=`mark_${e}_start`,i=`mark_${e}_end`
if(ee.default.hasMarkerName(t)){ee.default.addMarker(i)
ee.default.measureTime(`mark_${e}_phase`,t,i)}}(i)
const l=null===(t=e.data)||void 0===t?void 0:t.feedDashMainFeedByMainFeed
if(this.isIsrPostsSlottingEnabled&&l.elements.length>I.FeedConstants.INITIAL_UPDATE_COUNT_EXTENDED&&this.updateCollections.length>=2){var o
const e=l.elements[0],t=null==e||null===(o=e.metadata)||void 0===o?void 0:o.excludedFromSeen
if(null!=e&&e.entityUrn&&t){if(this.updateCollections.some((t=>t.elements.some((t=>{var i,n
return(null===(i=t.metadata)||void 0===i?void 0:i.backendUrn)===(null===(n=e.metadata)||void 0===n?void 0:n.backendUrn)}))))){l.elements.shift()
this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.ISR_POST_SLOTTING_DUPE_DROPPED})}}}if(this.isIsrForceFetchFeedEnabled){var d
const e=null===(d=l.metadata)||void 0===d?void 0:d.paginationToken
this.updateCollections.length>0&&e&&this.paginationToken!==e&&(0,c.setProperties)(this,{isNewPaginationToken:!0,newFeedPageIndex:this.updateCollections.length})
if(this.newFeedPageIndex>0)for(let e=0;e<this.newFeedPageIndex;e++)this.updateCollections[e].elements.forEach((e=>{const t=l.elements.findIndex((t=>{var i,n
return(null===(i=t.metadata)||void 0===i?void 0:i.backendUrn)===(null===(n=e.metadata)||void 0===n?void 0:n.backendUrn)}))
if(t>-1){l.elements.splice(t,1)
this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.ISR_FORCE_FETCH_FEED_DUPE_DROPPED})}}))}this.updateCollections.push(l)
this.socialCountsService.registerElementsList((null==l?void 0:l.elements)??[])
if(x.default&&(this.lix.getTreatmentIsEnabled("voyager.client.staff")||this.lix.getTreatmentIsEnabled("voyager.client.alumni"))){var u
window.sessionStorage.setItem("relevance_lix",null==l||null===(u=l.metadata)||void 0===u?void 0:u.feedMobileRelevanceModel)}null!==(r=e.errors)&&void 0!==r&&r.length&&(0,n.default)(this,ft,St).call(this,{message:vt,errors:e.errors},I.JET_TAGS.GET_UPDATES_PARTIAL_ERROR)
return l})).catch((e=>{if((0,a.isDestroying)(this))throw e
if(!e.errors)throw e;(0,n.default)(this,ft,St).call(this,e,I.JET_TAGS.GET_UPDATES)
throw e}))}model(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
if(!(0,a.isDestroying)(this)){this.nonCriticalData={}
try{var i;(0,r.default)(this,pt).reset()
const d=(null===(i=t.to)||void 0===i?void 0:i.queryParams)||{},{associatedUrns:u,highlightedUpdateType:c,[I.FeedConstants.FEED_REFRESH_QUERY_PARAM]:p}=d,f=d.highlightedUpdateUrn||this.highlightedUpdateUrn;(0,m.isPresent)(p)&&this.resetData()
let{updateCollections:h}=this
const g=!(0,m.isEmpty)(h);(0,n.default)(this,ht,Pt).call(this)
if(f&&!g){this.viewState.setExposedUpdate(f,"feed.index.index")
this.highlightedUpdateUrn=f
this.isInitialFetchInProgress=!0
this.singleHighlightedUpdate=this.getHighlightedUpdate({highlightedUpdateUrn:f,highlightedUpdateType:c})
this.nonCriticalData.updateCollections=this.getInitialFeed({associatedUrns:u,highlightedUpdateType:c,highlightedUpdateUrn:f},t)}else this._canRefreshFeedDueToPaginationTokenExpiry()?this.refreshAndProcessNewUpdateCollection():this.hasFetchedInitialUpdates||this.isRefreshInProgress?this.isBadgeHomeOnNoScrollEnabled&&!this.userHasScrolled?this._resetNewUpdatesIndicators():!this.isBadgeHomeOnNoInteractionEnabled||this.userHasScrolled||this.userHasClickedOnMainFeed||this._resetNewUpdatesIndicators():h=this.getInitialFeed({highlightedUpdateUrn:f,associatedUrns:u,highlightedUpdateType:c},t)
const b={updateCollections:h,inviteActionFailed:d.inviteActionFailed,isAcceptInvite:d.isAcceptInvite,isSendInvite:d.isSendInvite}
this.singleHighlightedUpdate&&(b.singleHighlightedUpdate=this.singleHighlightedUpdate)
try{this.nonCriticalData={...this.nonCriticalData,identityModule:this.fetchIdentityModule(),identityModulePremiumUpsellCard:this._fetchIdentityModulePremiumUpsellCard(),storylines:this.fetchStorylineCollection(),pagesAdminOrganization:this.fetchPagesAdminOrganization(),pageMailbox:this.fetchPageMailbox(),entitiesFollowed:this.fetchEntitiesFollowed(),followRecommendations:this._maybeFetchEntitiesFollowed(),launchpadV2DataConfig:this.launchpadV2.getLaunchpadData("FEED",e.launchpadCardType),organizationModulePremiumPageUpsellData:this._maybeFetchOrganizationModulePremiumPageUpsellData()}}catch(e){var l,o,s
this.jet.logError(e,I.JET_TAGS.FETCH_NON_CRITICAL_PAGE_DATA,{callTreeId:null==e||null===(l=e.errors)||void 0===l||null===(o=l[0])||void 0===o||null===(s=o.meta)||void 0===s?void 0:s.callTreeId,shouldRethrow:!1})
this.nonCriticalData=Promise.resolve({})}"false"===e.an_l&&(this.showAnonymousLoginFailureToast=!0)
return(0,F.hash)({...b,...this._fetchPageData(e)}).then((e=>{if(!(0,a.isDestroying)(this)){this._decorateModel(e,t)
return e}})).catch((e=>{if((0,a.isDestroying)(this))throw e
return(0,F.hash)(b).then((e=>{if(!(0,a.isDestroying)(this)){this._decorateModel(e,t)
return e}}))}))}catch(e){var d,u,c
this.jet.logError(e,I.JET_TAGS.FULL_PAGE_ERROR,{callTreeId:null==e||null===(d=e.errors)||void 0===d||null===(u=d[0])||void 0===u||null===(c=u.meta)||void 0===c?void 0:c.callTreeId,shouldRethrow:!1})
throw e}}}processNewUpdateCollection(){var e,t
let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
const{updateCollection:n,hasEndError:r}=i,l=null==n||null===(e=n.elements)||void 0===e?void 0:e.length,o=null===(t=this.paginationState)||void 0===t?void 0:t.hasNextPage
if(!o||!l){this.incrementClientSensorMetric(r?D.MainFeedClientSensorMetrics.END_OF_FEED_ERROR:D.MainFeedClientSensorMetrics.END_OF_FEED)
const e=r?"flagship3_feed_end_error":"flagship3_feed_end"
this.tracking.firePageViewEvent(e)
this._setControllerProperty("endOfFeed",!0)}if(te.default.isVideoPrefetchingEnabled(this.lix)){var a
const e=null==n||null===(a=n.elements)||void 0===a?void 0:a.map((e=>{var t,i
return null==e||null===(t=e.content)||void 0===t||null===(i=t.linkedInVideoComponent)||void 0===i?void 0:i.videoPlayMetadata})).filter((e=>!!e))
null!=e&&e.length&&e.forEach((e=>{const t=te.default.assetFromVideoPlayMetadata(e),{shouldFetchVariantPlaylist:i,shouldFetchFirstSegment:n,prefetchConfig:r}=te.default.registerAssetParams(this.lix)
te.default.registerAsset(t,i,n,r)}))}return o}resetData(){delete this.cachedData.identityModule
delete this.cachedData.followRecommendations
delete this.cachedData.storylines
delete this.cachedData.entitiesFollowed
delete this.cachedData.pagesAdminOrganization
delete this.cachedData.pageMailbox
this.updateCollections.splice(0,this.updateCollections.length)
delete this.singleHighlightedUpdate
delete this.highlightedUpdateUrn
delete this.updateCollectionsCache;(0,c.set)(this,"updatePosition",1)}resetController(e,t){super.resetController(...arguments)
t&&e.closeReportWrongMentionModal()}setupController(e,t,i){if((0,a.isDestroying)(this))return
super.setupController(...arguments)
const{saveScrollPosition:n}=this
n&&(0,S.afterRender)().then((()=>{(0,a.isDestroying)(this)||this._scrollToLastExposedUpdate()}))
const r=null==i?void 0:i.to.queryParams
"join-al"===r.trk&&(0,S.afterRender)().then((()=>{this.isDestroying||this.showAutoLoginToast()}))
Object.keys(_t).includes(r.lidirect)&&(0,S.afterRender)().then((()=>{this.isDestroying||this.showConsentExperienceConfirmationToast(r.lidirect)}))
r.highlightedUpdateUrn&&(0,S.afterRender)().then((()=>{this.isDestroying||this._scrollToTop()}));(0,c.setProperties)(e,this.queuedControllerProperties)
this.queuedControllerProperties={}
r.createEvent&&(0,S.afterRender)().then((()=>{this.isDestroying||this._showCreateEventModal()}));(0,c.setProperties)(e,{isSortByRecent:this.updateFeedQueryFinder===I.FeedFinder.CHRON_FEED_FINDER,isSortDropdownOpen:!1,numFollowRecommendationsToShow:I.FeedConstants.NUM_FOLLOW_RECOMMENDATIONS_TO_SHOW,saveScrollPosition:n,shareOrigin:"FEED",updateFeedQueryFinder:this.updateFeedQueryFinder})}showAutoLoginToast(){var e
if(!x.default)return
const t=(0,N.getName)(null===(e=this.authenticatedUser)||void 0===e?void 0:e.miniProfile)
if(t){const{persistentToastManager:e}=this
this.storeShim.queryURL(...(0,v.getMemberHandlesRequest)(!0,"EMAIL")).then((e=>{var t
if(!(0,a.isDestroying)(this))return null===(t=e.elements)||void 0===t?void 0:t[0]})).then((i=>{var n,r
if((0,a.isDestroying)(this))return
const l=i&&(null===(n=i.handleDetailUnion)||void 0===n||null===(r=n.emailAddress)||void 0===r?void 0:r.emailAddress)
if(l){const i=this._getI18nString("i18n_auto_login_toast_msg_v2",{memberName:t,memberEmail:l})
e.notice({message:i})}}))}}showFailedAnonymousLoginToast(){if(x.default){const{i18n:e,localStorage:t}=this
Date.now()-t.getItem("anonymous-login")<=12e4&&this.persistentToastManager.error({message:e.lookupTranslation(Y.default,"anonymous_login_failure_message")(),ctaText:e.lookupTranslation(Y.default,"anonymous_login_failure_cta")(),ctaUrl:"/psettings/profile-visibility"})
t.removeItem("anonymous-login")}}showConsentExperienceConfirmationToast(e){const{messageKey:t,ctaTextKey:i,ctaControlName:n,pageKey:r}=_t[e],l=this._getI18nString(t),o=i?this._getI18nString(i):""
this.tracking.firePageViewEvent(r)
this.persistentToastManager.success({message:l,...o&&{ctaUrl:"/psettings/advertising"},...o&&{ctaText:o},...n&&{ctaControlName:n}})
this._setControllerProperty("lidirect",void 0)}updatesPaginationPVETrackerOnUpdate(e){return{onDisplayUpdate:()=>(0,r.default)(this,pt).onDisplayUpdate(e)}}loadFilteredFeed(){this.newUpdateIndicator.resetFeedBadge()}didTransition(){var e,t
const i=null===(e=this.controller)||void 0===e?void 0:e.articleUrnStr,n=null===(t=this.controller)||void 0===t?void 0:t.mentionedEntityStr
this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.MAIN_FEED_IMPRESSION)
if(x.default){this.prefetch.prefetchAssets(I.FeedConstants.JOBS_ENGINE_EXT)
this.prefetch.prefetchAssets("sharing-v2")
this.prefetch.prefetchAssets("participate-text-editor")
this.prefetch.prefetchAssets("feed-modals");(0,y.whenRouteIdle)().then((()=>{(0,a.isDestroying)(this)||i&&n&&this.controller.openReportWrongMentionModal()}))}this.layeredRenderingEnabled&&this._unRenderAllLayers()
x.default&&this.layeredRenderingEnabled?this._renderNextLayer():this._renderAllLayers()
return!0}changeUpdateOrder(e){(0,c.set)(this,"controller.isSortDropdownOpen",!1)
if(e!==this.updateFeedQueryFinder){this.newUpdateIndicator.resetFeedBadge()
const t={}
this.isFeedTabsEnabled&&(t.feedTabOptionType=this.feedType)
if(e===I.FeedFinder.FEED_FINDER){t.sortOrder=I.SortOrder.RELEVANCE
this.feedSortOrder=I.SortOrder.RELEVANCE}if(e===I.FeedFinder.CHRON_FEED_FINDER){t.sortOrder=I.SortOrder.REV_CHRON
this.feedSortOrder=I.SortOrder.REV_CHRON}this._setControllerProperty("showFeedLoader",!0)
this._refreshUpdatesCollection(e,t);(0,c.set)(this,"controller.isSortByRecent",e===I.FeedFinder.CHRON_FEED_FINDER)
this.updateFeedQueryFinder=e}}changeSortOrder(e){this._setControllerProperty("isSortDropdownOpen",!1)
if(e!==this.feedSortOrder){this.updateFeedQueryFinder=I.FeedFinder.FEED_FINDER
this.feedSortOrder=e
this._setControllerProperty("feedSortOrder",e)
this.newUpdateIndicator.resetFeedBadge()
this._setControllerProperty("showFeedLoader",!0)
const t={sortOrder:e}
this.isFeedTabsEnabled&&(t.feedTabOptionType=this.feedType)
this._refreshUpdatesCollection(this.updateFeedQueryFinder,t)
if(this.preferredSortSetting===I.SortOrder.REV_CHRON&&e===I.SortOrder.RELEVANCE){const e=this.i18n.lookupTranslation(Q.default,"i18n_toast_directions")(),t=this.i18n.lookupTranslation(Q.default,"i18n_toast_link_text")()
this.persistentToastManager.notice({message:e,ctaText:t,ctaUrl:"/mypreferences/d/settings/feed-preferences",ctaControlName:"feed_sort_toast_settings"})}let i
i=e===I.SortOrder.RELEVANCE?e:gt
this._setControllerProperty("commentSortOrder",i)}}switchFilterFeedType(e){if(e!==this.feedType){this._setControllerProperty("isSortOrderVisible",e===A.MAIN_FEED)
if(this.feedType===A.MAIN_FEED){this.updateCollectionsCache=[]
this.updateCollectionsCache.push(...this.updateCollections)}this.feedType=e
this._setControllerProperty("feedType",e)
this.newUpdateIndicator.resetFeedBadge()
this._setControllerProperty("showFeedLoader",!0)
this._setControllerProperty("changedFeedType",!0)
e===A.IN_NETWORK?this.updateFeedQueryFinder=I.FeedFinder.IN_NETWORK_FINDER:this.updateFeedQueryFinder=this.feedSortOrder!==I.SortOrder.REV_CHRON?I.FeedFinder.FEED_FINDER:I.FeedFinder.CHRON_FEED_FINDER
this._refreshUpdatesCollection(this.updateFeedQueryFinder,{sortOrder:this.feedSortOrder,feedTabOptionType:e})}}onEventCreateModalDismiss(){this._closeCreateEventModal()}onNextPage(e){var t
if(this.isInitialFetchInProgress)e.resolve(!0)
else if(null!==(t=this.paginationState)&&void 0!==t&&t.hasNextPage){const t=this.getCountOverrideForNextPage(),i=this.paginationState.getNextPagingValues(t),r=(0,n.default)(this,mt,Tt).call(this,i),l=this.feedSortOrder===I.SortOrder.REV_CHRON||this.updateFeedQueryFinder===I.FeedFinder.CHRON_FEED_FINDER?[I.DEGRADATION_TRACKING_METADATA.RECENT_SUBSEQUENT_UPDATES]:[I.DEGRADATION_TRACKING_METADATA.SUBSEQUENT_UPDATES],o={adapterOptions:{degradations:this.isFeedTabsEnabled&&this.feedType===A.IN_NETWORK?[I.DEGRADATION_TRACKING_METADATA.IN_NETWORK_UPDATES]:l,degradedEntityIDsToRemove:[]}},s=`${I.PLT_MEASUREMENTS.SUBSEQUENT_UPDATE_FETCH_DASH}-${r.start}-${r.count}`
ee.default.addMarker(`mark_${s}_start`)
e.resolve(this.loadUpdateCollection(r,o,s).then((e=>{if(!(0,a.isDestroying)(this)){this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.SUBSEQUENT_REQUEST)
return this.processNewUpdateCollection({updateCollection:e})}})).catch((t=>{if((0,a.isDestroying)(this))throw t
this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.SUBSEQUENT_REQUEST_FAILED)
console.error("Failed to fetch paging update collection",t)
if((0,M.isHttpErrorStatus)(t)){const i=(0,M.getStatusCode)(t),n=i&&parseInt(i,10)
403===n?this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.SUBSEQUENT_REQUEST_403):404===n&&this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.SUBSEQUENT_REQUEST_404)
this.processNewUpdateCollection({updateCollection:[],hasEndError:!0})
e.resolve(!1)}throw t})).finally((()=>{(0,a.isDestroying)(this)||(0,c.set)(this,"currentScrolledPage",this.currentScrolledPage+1)})))}else e.resolve(!1)}queryParamsDidChange(e){super.actions.queryParamsDidChange.call(this,...arguments)
this._setControllerProperty("endOfFeed",!1);(0,n.default)(this,ht,Pt).call(this)
const{isRefreshInProgress:t}=this,i=null==e?void 0:e[I.FeedConstants.FEED_REFRESH_QUERY_PARAM],{highlightedUpdateUrn:r}=e||{};(0,n.default)(this,ht,Pt).call(this)
const l=null==e?void 0:e[I.FeedConstants.FEED_REFRESH_BYPASS_RESTRAINT]
this.bypassRefreshTimingRestraint=l
if(i&&!t){this.resetData()
this._refreshIdentityModule()
this._refreshPageData()
this.refreshAndProcessNewUpdateCollection()
this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.MANUAL_REFRESHED_UPDATE_REQUEST)
delete this.highlightedUpdateUrn
delete this.singleHighlightedUpdate}else if(r){this.highlightedUpdateUrn!==r&&this.resetData()
this.highlightedUpdateUrn=r}else if(e.shouldShowGroupFeed){this._refreshIdentityModule()
this._refreshPageData()}e.createEvent&&this._showCreateEventModal()}refreshAndProcessNewUpdateCollection(){this.isRefreshInProgress=!0
this._setControllerProperty("endOfFeed",!1)
delete this.highlightedUpdateUrn
delete this.singleHighlightedUpdate
const e={sortOrder:this.feedSortOrder}
this.isFeedTabsEnabled&&(e.feedTabOptionType=this.feedType)
this._refreshUpdatesCollection(this.updateFeedQueryFinder,e).then((e=>{if(!(0,a.isDestroying)(this))return this.processNewUpdateCollection({updateCollection:e})})).catch((e=>{var t,i,n
if((0,a.isDestroying)(this))throw e
this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.REFRESHED_UPDATE_REQUEST_FAILED)
this.jet.error(`Failed to fetch refresh update collection: ${e.message}`,I.JET_TAGS.REFRESH_GET_UPDATES,{callTreeId:null==e||null===(t=e.errors)||void 0===t||null===(i=t[0])||void 0===i||null===(n=i.meta)||void 0===n?void 0:n.callTreeId,shouldRethrow:!1})
if((0,M.isHttpErrorStatus)(e)){const t=(0,M.getStatusCode)(e)
403===(t&&parseInt(t,10))&&this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.REFRESHED_UPDATE_REQUEST_403)
this._setControllerProperty("caughtErrorLoadingUpdates",!0)
this.highlightedUpdateUrn&&this._setControllerProperty("caughtErrorLoadingHighlightedFeedUpdates",!0)}else{var r,l,o
const t=e.message
this.jet.error(`Refresh update collection network request failed: ${t}`,I.JET_TAGS.REFRESH_GET_UPDATES_NETWORK,{callTreeId:null==e||null===(r=e.errors)||void 0===r||null===(l=r[0])||void 0===l||null===(o=l.meta)||void 0===o?void 0:o.callTreeId,shouldRethrow:!1})
t.indexOf("Network request failed")>=0&&this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.REFRESHED_UPDATE_REQUEST_NETWORK_FAILURE)}throw e})).finally((()=>{if(!(0,a.isDestroying)(this)){this._resetNewUpdatesIndicators()
this._triggerFeedRefreshedEvent()
this.isRefreshInProgress=!1}}))}willTransition(){this.interop.isActive||this.shouldUpdateScrollPosition()
return!0}shouldUpdateScrollPosition(){this.saveScrollPosition&&this._setOffsetLastExposedUpdate()}buildRouteInfoMetadata(){const e={debug:{suggestedTeams:["feed","ceConversations","ceIgnite","sharing","media","feedRelevance"]}}
this.isStaff&&(e.debug.attachments=[{fileName:"feed-endpoint-requests-json.txt",blobGenerator:()=>(0,T.feedEndpointRequestJSONBlob)(this._updateRequests,this.windowService)}])
return e}fetchFollowRecommendations(){const e={adapterOptions:{degradations:[I.DEGRADATION_TRACKING_METADATA.FOLLOW_RECOMMENDATIONS],degradedEntityIDsToRemove:[]}}
return(0,k.getFollowRecommendations)(this.graphql,e).then((e=>{var t,i
if(!(0,a.isDestroying)(this)){this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.FOLLOW_RECOMMENDATIONS_REQUEST_SUCCESS})
return null==e||null===(t=e.data)||void 0===t||null===(i=t.feedDashRecommendedGenericEntitiesByDynamicFollowRecommendations)||void 0===i?void 0:i.elements}})).catch((e=>{if((0,a.isDestroying)(this))throw e
this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.FOLLOW_RECOMMENDATIONS_REQUEST_FAILED})
if((0,M.isHttpErrorStatus)(e))return[]
throw e}))}fetchStorylineCollection(){const{graphql:e}=this,t={count:I.FeedConstants.NUM_STORYLINES_TO_FETCH},i={adapterOptions:{degradations:[I.DEGRADATION_TRACKING_METADATA.STORYLINES],degradedEntityIDsToRemove:[]}}
return(0,k.getTopics)({params:t,graphql:e,optionsOverride:i}).then((e=>{if(!(0,a.isDestroying)(this)){this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.STORYLINE_TOPICS_REQUEST_SUCCESS})
return e}})).catch((e=>{if((0,a.isDestroying)(this))throw e
this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.STORYLINE_TOPICS_REQUEST_FAILED})
console.error("Failed to fetch storyline collection",e)
if((0,M.isHttpErrorStatus)(e))return[]
throw e}))}fetchEntitiesFollowed(){return(0,f.default)({interestPackageDataManager:this.interestPackageDataManager,clientSensor:this.clientSensor,graphql:this.graphql,jet:this.jet,reload:!1})}fetchIdentityModule(){const e=["/voyager/api/graphql",{...V.default,[W.ACCEPT_PROPERTY_NAME.toLowerCase()]:W.ACCEPT}],t={adapterOptions:{degradations:[I.DEGRADATION_TRACKING_METADATA.IDENTITY_MODULE],degradedEntityIDsToRemove:[]},reload:!this.cachePrefetch.hasCache(...e)}
return(0,O.getIdentityModule)(this.graphql,t).then((e=>{if(!(0,a.isDestroying)(this)){this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.IDENTITY_MODULE_REQUEST_SUCCESS})
return e}})).catch((e=>{if((0,a.isDestroying)(this))throw e
this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.IDENTITY_MODULE_REQUEST_FAILED})
if((0,M.isHttpErrorStatus)(e))return{widgets:[],actions:[]}
throw e})).finally((()=>{(0,a.isDestroying)(this)||this.cachePrefetch.removeCachedItem(this.cachePrefetch.generateKey(...e))}))}fetchPagesAdminOrganization(){const e={adapterOptions:{degradations:[I.DEGRADATION_TRACKING_METADATA.PAGES_MODULE],degradedEntityIDsToRemove:[]},cacheKey:"feed/adminWidgetQuery"}
return this.graphql.executeQuery(G.default,{count:this.isMultiPageUpsellFetchMoreOrganizationsEnabled?I.FeedConstants.PAGES_ADMIN_ENTRYPOINT_ORGANIZATION_COUNT_V2:I.FeedConstants.PAGES_ADMIN_ENTRYPOINT_ORGANIZATION_COUNT,viewerPermissions:{canReadOrganizationUpdateAnalytics:!0}},{...e}).then((e=>{var t
if((0,a.isDestroying)(this))return
this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.PAGES_ADMIN_REQUEST_SUCCESS})
const{elements:i,paging:n}=(null===(t=e.data)||void 0===t?void 0:t.organizationDashCompaniesByViewerPermissions)||{}
if(null!=i&&i.length){this.contentAdminIdentities.identities.length||this.contentAdminIdentities.createContentAdminIdentities(i,this.isMultiPageUpsellFetchMoreOrganizationsEnabled)
return{elements:i,paging:n}}return null})).catch((e=>{if((0,a.isDestroying)(this))throw e
this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.PAGES_ADMIN_REQUEST_FAILED})
if((0,M.isHttpErrorStatus)(e)){var t,i,n
this.jet.logError(new Error("Network request failed while attempting to fetch pages admin widget"),I.JET_TAGS.GET_PAGES_ADMIN_WIDGET,{callTreeId:null==e||null===(t=e.errors)||void 0===t||null===(i=t[0])||void 0===i||null===(n=i.meta)||void 0===n?void 0:n.callTreeId,shouldRethrow:!1})
return null}throw e}))}fetchPageMailbox(){const e={adapterOptions:{degradations:[new Z.default("organization-feed-affiliated-mailboxes","failed-fetch-affiliated-mailboxes",{productName:"Voyager - Organization - Messaging_Tier_2"})],degradedEntityIDsToRemove:[]},reload:!0}
return this.graphql.executeQuery(X.default,void 0,{...e}).then((e=>{var t,i,n,r
if(!(0,a.isDestroying)(this))return null===(t=e.data.messagingDashAffiliatedMailboxesAll)||void 0===t||null===(i=t.elements)||void 0===i||null===(n=i[0])||void 0===n||null===(r=n.mailbox)||void 0===r?void 0:r.pageMailbox}))}refreshStorylineData(e){this.numberOfStorylineModuleRefreshes+=1
return this.fetchStorylineCollection(!0).then((()=>{(0,a.isDestroying)(this)||this.scheduleRefreshNewsModule(e)}))}scheduleRefreshNewsModule(e){(0,E.runTask)(this,(()=>{this.refreshStorylineData(e)}),e)}_canRefreshFeedDueToPaginationTokenExpiry(){return!(!this._isOnTopFeed()||!this.paginationTokenService.isExpired(I.FeedFinder.FEED_FINDER))}_cleanupRefreshOnFocusChange(){x.default&&(0,E.removeEventListener)(this,window,"focus",this._handleFocusChangeAfterPaginationTokenExpires)}_closeCreateEventModal(){(0,c.setProperties)(this,{"controller.shouldOpenCreateEventModal":!1,"controller.createEvent":void 0})}_decorateModel(e,t){const i=Object.assign(e,{mediaData:null}),n=t.to?t.to.queryParams:{}
if(n.isAcceptInvite||n.isSendInvite||n.inviteActionFailed)return this._decorateModelForHeathrow(i,n)
i.highlightedUpdateUrn=n.highlightedUpdateUrn
if(n.highlightedUpdateUrn){n.showCommentBox&&(i.showCommentBox=n.showCommentBox)
return i}!function(e){const t={conversionPixelUrl:I.FeedConstants.TRACKING_URLS.CONVERSION,retargetingPixelUrl:I.FeedConstants.TRACKING_URLS.RETARGETING,facebookPixelUrl:I.FeedConstants.TRACKING_URLS.FACEBOOK}
Object.assign(e,t)}(i)
return i}_decorateModelForHeathrow(e,t){let{inviteActionFailed:i,isAcceptInvite:n,isSendInvite:r,member:l}=t
const o=Object.assign(e,{inviteActionFailed:i,isAcceptInvite:n,isSendInvite:r,member:l,showInviteAlert:!0})
if(!l||i)return F.Promise.resolve(o)
return(0,q.getProfileById)(this.storeShim,l,"com.linkedin.voyager.dash.deco.identity.profile.MiniProfile").then((e=>{if(!(0,a.isDestroying)(this)){o.profile=e
return o}})).catch((e=>{if((0,a.isDestroying)(this))throw e
if((0,M.isHttpErrorStatus)(e)){var t,i,n
o.showInviteAlert=!1
this.jet.logError(new Error("Network request failed while attempting to fetch profile for heathrow"),I.JET_TAGS.GET_PROFILE,{callTreeId:null==e||null===(t=e.errors)||void 0===t||null===(i=t[0])||void 0===i||null===(n=i.meta)||void 0===n?void 0:n.callTreeId,shouldRethrow:!1})
return o}throw e}))}_getClosedSharebox(){const e={q:"feedType",feedType:"MAIN_FEED",recipe:"com.linkedin.voyager.dash.deco.contentcreation.closedSharebox"},t={degradations:[s.CLOSED_SHAREBOX_DEGRADATION_TRACKING_METADATA],degradedEntityIDsToRemove:[]}
return this.storeShim.queryURL("/voyager/api/voyagerContentcreationDashClosedSharebox",{params:e,cacheKey:(0,C.default)("feed/",e),adapterOptions:t}).then((e=>{var t
if((0,a.isDestroying)(this))return
this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.CLOSED_SHAREBOX_DATA_REQUEST_SUCCESS})
const{trendingTopicPrompt:i,trendingTopics:n,shareboxMediaButtons:r,primaryShareboxEntrypointCtaText:l}=(null===(t=e.elements)||void 0===t?void 0:t[0])||{},o={shareboxMediaButtons:r,trendingTopicPrompt:i,trendingTopics:n}
l&&(o.primaryShareBoxEntryPointText=l)
return o})).catch((e=>{if((0,a.isDestroying)(this))throw e
this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:D.HomePageClientSensorMetrics.CLOSED_SHAREBOX_DATA_REQUEST_FAILED})
if((0,M.isHttpErrorStatus)(e))return null
throw e}))}_fetchIdentityModulePremiumUpsellCard(){return(0,L.queryUpsellCardDataV2)({clientSensor:this.clientSensor,graphql:this.graphql},{upsellSlot:H.UPSELL_SLOT.IDENTITY_MODULE}).then((e=>{var t,i,n,r
if(!(0,a.isDestroying)(this))return null==e||null===(t=e.data)||void 0===t||null===(i=t.premiumDashUpsellSlotContentBySlotType)||void 0===i||null===(n=i.elements)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.upsellCard}))}_fetchOrganizationModulePremiumPageUpsellCard(e){return new J.default((0,L.queryUpsellCardDataV2)({clientSensor:this.clientSensor,graphql:this.graphql,jet:this.jet},{upsellSlot:H.UPSELL_SLOT.PREMIUM_PAGE_FEED_PAGE_CARD},{vieweeCompanyUrn:e}).then((e=>{var t,i,n,r
if(!(0,a.isDestroying)(this))return null==e||null===(t=e.data)||void 0===t||null===(i=t.premiumDashUpsellSlotContentByPage)||void 0===i||null===(n=i.elements)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.upsellCard})))}_maybeFetchEntitiesFollowed(){return this.fetchStorylineCollection().then((e=>{var t
if(!(0,a.isDestroying)(this))return null!==(t=e.elements)&&void 0!==t&&t.length?Promise.resolve([]):this.fetchFollowRecommendations()})).catch((e=>{if((0,a.isDestroying)(this))throw e
return this.fetchFollowRecommendations()}))}_maybeFetchOrganizationModulePremiumPageUpsellData(){return this.fetchPagesAdminOrganization().then((e=>{var t
if(this.isDestroying)return
const i=null==e||null===(t=e.elements)||void 0===t?void 0:t.length
if(1===i){const t=e.elements[0].entityUrn
return(0,L.queryUpsellCardDataV2)({clientSensor:this.clientSensor,graphql:this.graphql,jet:this.jet},{upsellSlot:H.UPSELL_SLOT.PREMIUM_PAGE_FEED_PAGE_CARD},{vieweeCompanyUrn:t}).then((e=>{var t,i,n,r
if(!(0,a.isDestroying)(this))return null==e||null===(t=e.data)||void 0===t||null===(i=t.premiumDashUpsellSlotContentByPage)||void 0===i||null===(n=i.elements)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.upsellCard}))}if(i>1&&this.isMultiPageUpsellEnabled){const t=e.elements.map((e=>e.entityUrn)),i={adapterOptions:{targetViewNames:["premium-page-multi-page-modal-upsell"]}}
return(0,z.queryPagesPremiumUpsellModal)(this.graphql,this.jet,t,i).then((e=>{var t,i
if((0,a.isDestroying)(this))return
const n=null==e||null===(t=e.data)||void 0===t||null===(i=t.premiumDashPagePremiumUpsellModalByCompanyUrns)||void 0===i?void 0:i.elements
return(null==n?void 0:n.length)>0?n[0]:void 0}))}}))}_fetchPageData(){try{return{closedSharebox:this._getClosedSharebox()}}catch(n){var e,t,i
this.jet.logError(n,I.JET_TAGS.FETCH_PAGE_DATA,{callTreeId:null==n||null===(e=n.errors)||void 0===e||null===(t=e[0])||void 0===t||null===(i=t.meta)||void 0===i?void 0:i.callTreeId,shouldRethrow:!1})
return{}}}_getControllerProperty(e){var t
return(null===(t=this.controller)||void 0===t?void 0:t[e])||this.queuedControllerProperties[e]}_getI18nString(e,t){return this.i18n.lookupTranslation(Y.default,e)([t])}_getInitialFeedFinder(){let{highlightedUpdateUrn:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
return e?I.FeedFinder.FEED_FINDER:this.updateFeedQueryFinder}_getUpdateElemByDataId(e){return x.default&&!this.isDestroying?document.getElementById("voyager-feed").querySelector(`[data-id='${e}']`):null}_handleRefreshOnPaginationTokenExpiration(){this.paginationTokenService.expire(this.updateFeedQueryFinder)
this.lix.getTreatmentIsEnabled("voyager.client.staff")&&this._updateRequests.push({paginationTokenExpired:!0,clientTime:(new Date).toUTCString(),handleRefreshOnPaginationTokenExpiration:!0})
"feed.index.index"===this.router.currentRouteName&&this._isOnTopFeed()&&x.default&&!document.hasFocus()&&(0,E.addEventListener)(this,window,"focus",this._handleFocusChangeAfterPaginationTokenExpires)}_handleFocusChangeAfterPaginationTokenExpires(){x.default&&document.hasFocus()&&(document.querySelector(".artdeco-modal")||this.refreshAndProcessNewUpdateCollection())
this._cleanupRefreshOnFocusChange()}_isOnTopFeed(){return this.updateFeedQueryFinder===I.FeedFinder.FEED_FINDER}_loadRecentlyAddedProfilePositions(){var e
const t=null===(e=this.authenticatedUser)||void 0===e?void 0:e.memberId
return this.identityStore.queryURL("com.linkedin.voyager.dash.deco.identity.profile.FullProfilePositionGroupsInjection",t,{params:{recipe:"com.linkedin.voyager.dash.deco.identity.profile.FullProfilePositionGroup"}})}_refreshIdentityModule(){this.fetchIdentityModule().then((e=>{if((0,a.isDestroying)(this))return
const t=this.modelFor(this.routeName)
return t&&(0,c.set)(t,"identityModule",e)}))}_refreshAdIfFullPage(){this.currentScrolledPage%Et==0&&this.adBannerManager.triggerRefreshAdEvent()}_refreshUpdatesCollection(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.default)(this,pt).reset()
delete this.highlightedUpdateUrn
delete this.singleHighlightedUpdate;(0,n.default)(this,ht,Pt).call(this)
const{updateCollections:i}=this,l={q:e,count:I.FeedConstants.INITIAL_UPDATE_COUNT_EXTENDED,moduleKey:this.moduleKey,commentsCount:0,likesCount:0,...t}
this._scrollToTop()
delete this.paginationState
this.lix.getTreatmentIsEnabled("voyager.client.staff")&&this._updateRequests.push({feedUpdatesUrl:this.feedUpdatesUrl,params:l,clientTime:(new Date).toUTCString(),refreshUpdatesCollection:!0})
const o={adapterOptions:{degradations:l.sortOrder===I.SortOrder.REV_CHRON?[I.DEGRADATION_TRACKING_METADATA.UPDATES]:[I.DEGRADATION_TRACKING_METADATA.RECENT_UPDATES],degradedEntityIDsToRemove:[]}}
this.isFeedTabsEnabled&&this.feedType===A.IN_NETWORK&&(o.adapterOptions.degradations=[I.DEGRADATION_TRACKING_METADATA.IN_NETWORK_UPDATES])
const s={count:l.count,sortOrder:l.sortOrder}
this.isFeedTabsEnabled&&(s.feedTabOptionType=l.feedTabOptionType)
return this.graphql.executeQuery(B.default,s,{reload:!0,...o}).then((e=>{var t,r,l,o,s,d,u,p,m
if((0,a.isDestroying)(this))return
if(this.isFeedTabsEnabled){const e=this.feedType===A.IN_NETWORK
this.moduleKey=e?I.FeedConstants.INDEX_EXTENDED_ROUTE_IN_NETWORK_MODULE_KEY:I.FeedConstants.INDEX_EXTENDED_ROUTE_MODULE_KEY
this._setControllerProperty("moduleKey",this.moduleKey)
this.feedActionEvent.setCustomModuleKey(e?this.moduleKey:void 0)}this._setControllerProperty("showFeedLoader",!1)
this.incrementClientSensorMetric(D.MainFeedClientSensorMetrics.REFRESHED_UPDATE_REQUEST)
i.splice(0,i.length)
const f=null===(t=e.data)||void 0===t?void 0:t.feedDashMainFeedByMainFeed
i.unshift(f)
const h=(null==f?void 0:f.elements)??[]
this.socialCountsService.registerElementsList(h)
const g=null==f||null===(r=f.metadata)||void 0===r?void 0:r.paginationTokenExpiryTime
this._resetSessionExpirationTimer(g);(0,c.setProperties)(this,{queryAfterTime:null===(l=f.metadata)||void 0===l?void 0:l.queryAfterTime,paginationToken:null===(o=f.metadata)||void 0===o?void 0:o.paginationToken,updatePosition:1})
this.paginationState=new P.default({start:null===(s=f.paging)||void 0===s?void 0:s.start,count:null===(d=f.paging)||void 0===d?void 0:d.count,pagingSize:I.FeedConstants.INITIAL_UPDATE_COUNT_EXTENDED,total:null===(u=f.paging)||void 0===u?void 0:u.total,direction:"next"})
null!==(p=e.errors)&&void 0!==p&&p.length&&(0,n.default)(this,ft,St).call(this,{message:vt,errors:e.errors},I.JET_TAGS.GET_UPDATES_PARTIAL_ERROR)
null!=f&&null!==(m=f.elements)&&void 0!==m&&m.length&&this._getControllerProperty("interestPickerFeedUpdateUrn")&&this._setControllerProperty("interestPickerFeedUpdateUrn",void 0)
return f})).catch((e=>{if((0,a.isDestroying)(this))throw e
this._setControllerProperty("showFeedLoader",!1)
if(!e.errors)throw e;(0,n.default)(this,ft,St).call(this,e,I.JET_TAGS.GET_UPDATES)
throw e}))}_renderNextLayer(){const e=(this._currentRenderedLayer??0)+1
if(e<=this.numRenderLayers){this._setRenderLayer(e,!0);(0,c.set)(this,"_currentRenderedLayer",e);(0,_.mutateDOM)((()=>{this.isDestroying||(0,E.runTask)(this,(()=>{this._renderNextLayer()}),0)}))}}_renderAllLayers(){const e=this.numRenderLayers
for(let t=1;t<=e;t++)this._setRenderLayer(t,!0);(0,c.set)(this,"_currentRenderedLayer",e)}_setRenderLayer(e,t){(0,c.set)(this,`controller.renderLayer${e}`,t)}_resetNewUpdatesIndicators(){const{badgeService:e}=this
e.clearBadge("feed")
this.queryAfterTime&&e.resumePolling("feed")
this.newUpdateIndicator.resetNewUpdateCount()}_refreshPageData(){this.modelFor(this.routeName)&&(0,F.hash)(this._fetchPageData()).then((e=>{(0,a.isDestroying)(this)||(0,c.setProperties)(this.modelFor(this.routeName),e)}))}_scrollToLastExposedUpdate(){var e
if(this.isDestroying)return
const t=null===(e=this.router)||void 0===e?void 0:e.currentRouteName,i=this.viewState.getExposedUpdate(t)
if(i&&x.default){const e=this._getUpdateElemByDataId(i),t=e&&e.getBoundingClientRect().top+window.pageYOffset,{lastExposedUpdateOffset:n}=this
if(t){const e=document.scrollingElement||document.body;(0,_.mutateDOM)((()=>{this.isDestroying||(e.scrollTop=t-n)}))}}}_scrollToTop(){if(x.default){const e=document.scrollingElement||document.body;(0,_.mutateDOM)((()=>{this.isDestroying||(e.scrollTop=0)}))}}_setControllerProperty(e,t){if(this.controller&&!this.isDestroying)(0,c.set)(this,`controller.${e}`,t)
else{const{queuedControllerProperties:i}=this
i[e]=t}}_setOffsetLastExposedUpdate(){var e
const t=null===(e=this.router)||void 0===e?void 0:e.currentRouteName,i=this.viewState.getExposedUpdate(t)
if(i&&x.default){const e=this._getUpdateElemByDataId(i)
if(e){const t=e.getBoundingClientRect().top;(0,c.set)(this,"lastExposedUpdateOffset",t)}}}_checkForStaleFeed(e){const t=e.elements
if(t){var i
const e=this.localStorage.getItem(bt)??"",n=t.map((e=>{var t
return null===(t=e.metadata)||void 0===t?void 0:t.backendUrn})),r=n.join("|"),l=e.split("|")[0],o=this.lix.getTreatmentIsEnabled("voyager.client.staff")
if(l===n[0]){const e=o?D.MainFeedClientSensorMetrics.STALE_FEED_FIRST_UPDATE_COMPANY:D.MainFeedClientSensorMetrics.STALE_FEED_FIRST_UPDATE
this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:e})}const a=null===(i=this.localStorage.getItem(yt))||void 0===i?void 0:i[0]
n[0]===a&&this.incrementClientSensorMetric(D.LycheeClientSensorMetrics.STALE_HIGHLIGHTED_UPDATE,D.LYCHEE_CLIENT_SENSOR_GROUP_NAME)
if(e===r){const e=o?D.MainFeedClientSensorMetrics.STALE_FEED_COMPANY:D.MainFeedClientSensorMetrics.STALE_FEED
this.clientSensor.incrementMetricCounter({groupName:D.CLIENT_SENSOR_GROUP_NAME,metricName:e})}else this.localStorage.setItem(bt,r)}}_showCreateEventModal(){this.isCreateEventEnabled?(0,c.set)(this,"controller.shouldOpenCreateEventModal",!0):this._closeCreateEventModal()}_showErrorLoadingHighlightedUpdateToast(){const e=this._getI18nString("i18n_highlighted_update_error")
this.persistentToastManager.error({message:e})}_showMentionRetractedToast(){const e=this._getI18nString("i18n_mentioned_retracted")
this.persistentToastManager.error({message:e})}_triggerFeedRefreshedEvent(){this.newUpdateIndicator.triggerFeedRefreshedEvent()}_unRenderAllLayers(){const e=this.numRenderLayers
for(let t=1;t<=e;t++)this._setRenderLayer(t,!1);(0,c.set)(this,"_currentRenderedLayer",0)}_resolveNonCriticalData(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]){if(this.isDestroying)return
Object.entries(t).forEach((t=>{let[i,n]=t;(0,F.hashSettled)({[i]:n}).then((t=>{Object.entries(t).forEach((t=>{let[i,n]=t;(0,c.set)(e,i,n.value);(0,c.set)(e,`${i}State`,n.state)}))}))}))}else Object.entries(t).forEach((t=>{let[i,n]=t
n.then((t=>{this.isDestroying||(0,c.set)(e,i,t)}))}))}_handleScrollHistorySetup(){var e;(null===(e=this.windowService)||void 0===e?void 0:e.getHistory()).scrollRestoration="manual"}_handleScrollHistoryReset(){var e;(null===(e=this.windowService)||void 0===e?void 0:e.getHistory()).scrollRestoration="auto"}loading(){let e=!1
this.highlightedUpdateUrn&&(e=!0)
return e}}),Ne=(0,l.default)(Ue.prototype,"adBannerManager",[ne],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),xe=(0,l.default)(Ue.prototype,"authenticatedUser",[re],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Re=(0,l.default)(Ue.prototype,"badgeService",[le],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Fe=(0,l.default)(Ue.prototype,"clientSensor",[oe],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),je=(0,l.default)(Ue.prototype,"date",[ae],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Le=(0,l.default)(Ue.prototype,"fastbootBpr",[se],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ze=(0,l.default)(Ue.prototype,"i18n",[de],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),He=(0,l.default)(Ue.prototype,"interestPackageDataManager",[ue],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ge=(0,l.default)(Ue.prototype,"identityStore",[ce],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qe=(0,l.default)(Ue.prototype,"jet",[pe],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Be=(0,l.default)(Ue.prototype,"launchpadV2",[me],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),We=(0,l.default)(Ue.prototype,"lix",[fe],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ve=(0,l.default)(Ue.prototype,"locale",[he],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ke=(0,l.default)(Ue.prototype,"localStorage",[ge],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ye=(0,l.default)(Ue.prototype,"newUpdateIndicator",[be],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qe=(0,l.default)(Ue.prototype,"persistentToastManager",[ye],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$e=(0,l.default)(Ue.prototype,"contentAdminIdentities",[_e],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Je=(0,l.default)(Ue.prototype,"paginationTokenService",[ve],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Xe=(0,l.default)(Ue.prototype,"router",[Ee],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ze=(0,l.default)(Ue.prototype,"storeShim",[we],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),et=(0,l.default)(Ue.prototype,"tracking",[Te],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),tt=(0,l.default)(Ue.prototype,"viewState",[Se],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),it=(0,l.default)(Ue.prototype,"windowService",[Pe],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),nt=(0,l.default)(Ue.prototype,"pemTracking",[ke],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),rt=(0,l.default)(Ue.prototype,"prefetch",[Oe],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),lt=(0,l.default)(Ue.prototype,"socialCountsService",[Ce],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ot=(0,l.default)(Ue.prototype,"graphql",[De],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),at=(0,l.default)(Ue.prototype,"cachePrefetch",[Ie],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),st=(0,l.default)(Ue.prototype,"feedActionEvent",[Ae],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),dt=(0,l.default)(Ue.prototype,"interop",[Me],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ut=(0,l.default)(Ue.prototype,"updateCollections",[j.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ct=(0,l.default)(Ue.prototype,"paginationState",[j.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,l.default)(Ue.prototype,"updatesPaginationPVETrackerOnUpdate",[c.action],Object.getOwnPropertyDescriptor(Ue.prototype,"updatesPaginationPVETrackerOnUpdate"),Ue.prototype),(0,l.default)(Ue.prototype,"loadFilteredFeed",[c.action],Object.getOwnPropertyDescriptor(Ue.prototype,"loadFilteredFeed"),Ue.prototype),(0,l.default)(Ue.prototype,"didTransition",[c.action],Object.getOwnPropertyDescriptor(Ue.prototype,"didTransition"),Ue.prototype),(0,l.default)(Ue.prototype,"changeUpdateOrder",[c.action],Object.getOwnPropertyDescriptor(Ue.prototype,"changeUpdateOrder"),Ue.prototype),(0,l.default)(Ue.prototype,"changeSortOrder",[c.action],Object.getOwnPropertyDescriptor(Ue.prototype,"changeSortOrder"),Ue.prototype),(0,l.default)(Ue.prototype,"switchFilterFeedType",[c.action],Object.getOwnPropertyDescriptor(Ue.prototype,"switchFilterFeedType"),Ue.prototype),(0,l.default)(Ue.prototype,"onEventCreateModalDismiss",[c.action],Object.getOwnPropertyDescriptor(Ue.prototype,"onEventCreateModalDismiss"),Ue.prototype),(0,l.default)(Ue.prototype,"onNextPage",[c.action],Object.getOwnPropertyDescriptor(Ue.prototype,"onNextPage"),Ue.prototype),(0,l.default)(Ue.prototype,"queryParamsDidChange",[c.action],Object.getOwnPropertyDescriptor(Ue.prototype,"queryParamsDidChange"),Ue.prototype),(0,l.default)(Ue.prototype,"willTransition",[c.action],Object.getOwnPropertyDescriptor(Ue.prototype,"willTransition"),Ue.prototype),(0,l.default)(Ue.prototype,"loading",[c.action],Object.getOwnPropertyDescriptor(Ue.prototype,"loading"),Ue.prototype),Ue)
function Tt(e){const t={commentsCount:0,count:e.count,highlightedUpdateUrn:this.highlightedUpdateUrn,likesCount:0,moduleKey:this.moduleKey,paginationToken:this.paginationToken,q:this.updateFeedQueryFinder,start:e.start}
if(this.isIsrPostsSlottingEnabled){const i=this.viewState.getISRPostsQueue()||[]
if(e.start>=I.FeedConstants.INITIAL_UPDATE_COUNT_EXTENDED&&i.length){t.highlightedUpdateUrn=i.shift()
t.highlightedUpdateType=I.FeedConstants.ISR_HIGHLIGHT_TYPE}}this.updateFeedQueryFinder===I.FeedFinder.FEED_FINDER?t.sortOrder=I.SortOrder.RELEVANCE:this.updateFeedQueryFinder===I.FeedFinder.CHRON_FEED_FINDER&&(t.sortOrder=I.SortOrder.REV_CHRON)
this.feedSortOrder&&this.isEuropeanLocale&&(t.sortOrder=this.feedSortOrder)
return t}function St(e,t){var i,n,r
let l=e.message
const o=e.errors.map(((e,t)=>{let{message:i,extensions:n}=e
return`${t+1} - Message: ${i}, Extensions: ${JSON.stringify(n)}`})).join("; ")
o&&(l=`${l} | Errors: ${o}`)
this.jet.error(l,t,{callTreeId:null==e||null===(i=e.errors)||void 0===i||null===(n=i[0])||void 0===n||null===(r=n.meta)||void 0===r?void 0:r.callTreeId,shouldRethrow:!1})}function Pt(){this._setControllerProperty("caughtErrorLoadingUpdates",!1)
this._setControllerProperty("caughtErrorLoadingHighlightedUpdate",!1)
this._setControllerProperty("caughtErrorLoadingHighlightedFeedUpdates",!1)}}))
define.alias("video/routes/immersive-video-player","feed/routes/index/immersive-video-player")
define("feed/routes/index/index",["exports","@babel/runtime/helpers/esm/defineProperty","@ember/routing/route"],(function(e,t,i){"use strict"
Object.defineProperty(e,"__es