(window.ansFrontendRelayWebpackJsonpFunction=window.ansFrontendRelayWebpackJsonpFunction||[]).push([["component-Modals-NUX"],{"+22L":function(e,n,t){"use strict";var a=t("rhDr"),i=t.n(a),l=t("q1tI"),o=t("AaDK"),r=t("nW6E"),s=t("Yc5t"),u=t("jufJ"),d=function(e){var n=e.children,t=e.stepType,a=e.isLastStep,d=e.isNextButtonDisabled,c=e.isNextButtonHidden,p=e.triggerTransition,g=e.titleText,m=e.overridenNextButtonText,f=i()(e,["children","stepType","isLastStep","isNextButtonDisabled","isNextButtonHidden","triggerTransition","titleText","overridenNextButtonText"]);return l.createElement(r.f,Object.assign({navButton:"none"},f,{primaryButtonProps:!c&&{text:m||Object(u.plaintextTranslate)(a?"Done":"Next"),onClick:p,disabled:d},titleText:a?Object(u.plaintextTranslate)("One Last Step"):g}),l.createElement(s.b,{onImpression:function(){Object(o.a)("nux_step_impression",{step_name:t})}},n))};d.displayName="NUXModalLayout",n.a=d},SA9J:function(e,n,t){"use strict";t.r(n);var a={};t.r(a),t.d(a,"default",(function(){return k}));var i=t("iJoy"),l=t.n(i),o=t("8ZkK"),r=t.n(o),s=t("tQZz"),u=t.n(s),d=t("7eVb"),c=t.n(d),p=t("n3k3"),g=t.n(p),m=t("10u2"),f=t.n(m),h=function(){var e=[{kind:"LocalArgument",name:"stepType",type:"String!",defaultValue:null}],n=[{kind:"Variable",name:"stepType",variableName:"stepType"}],t={kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},a={kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},i={kind:"ScalarField",alias:null,name:"minTopicsToFollowForNuxStepCompletion",args:null,storageKey:null},l={platforms:["DESKTOP"]},o={kind:"Condition",passingValue:!0,isCustom:!0,customValue:l,condition:"onPlatform",selections:[{kind:"LinkedField",alias:null,name:"viewer",storageKey:null,args:null,concreteType:"Viewer",plural:!1,selections:[t,a,{kind:"LinkedField",alias:null,name:"user",storageKey:null,args:null,concreteType:"User",plural:!1,selections:[t,a,{kind:"ScalarField",alias:null,name:"numFollowedTopics",args:null,storageKey:null}]}]}]},r=[{kind:"Literal",name:"after",value:""},{kind:"Literal",name:"first",value:30},{kind:"Literal",name:"shownTids",value:[]},{kind:"Literal",name:"suggestionSeedTids",value:[]}];return{kind:"Request",fragment:{kind:"Fragment",name:"FollowInterestsStepQuery",type:"QueryRoot",metadata:null,argumentDefinitions:e,selections:[{kind:"LinkedField",alias:null,name:"nuxStep",storageKey:null,args:n,concreteType:null,plural:!1,selections:[t,a,{kind:"InlineFragment",type:"FollowInterestsStep",selections:[i,{kind:"FragmentSpread",name:"FollowInterestsStepList_followInterestsStep",args:null},o]}]}]},operation:{kind:"Operation",name:"FollowInterestsStepQuery",argumentDefinitions:e,selections:[{kind:"LinkedField",alias:null,name:"nuxStep",storageKey:null,args:n,concreteType:null,plural:!1,selections:[t,a,{kind:"InlineFragment",type:"FollowInterestsStep",selections:[i,{kind:"LinkedField",alias:null,name:"topicSuggestionsConnection",storageKey:'topicSuggestionsConnection(after:"",first:30,shownTids:[],suggestionSeedTids:[])',args:r,concreteType:"TopicSuggestionsConnection",plural:!1,selections:[t,a,{kind:"LinkedField",alias:null,name:"pageInfo",storageKey:null,args:null,concreteType:"PageInfo",plural:!1,selections:[{kind:"ScalarField",alias:null,name:"endCursor",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"hasNextPage",args:null,storageKey:null}]},{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"TopicEdge",plural:!0,selections:[t,a,{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:"Topic",plural:!1,selections:[t,a,{kind:"ScalarField",alias:null,name:"tid",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"isFollowing",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null},{kind:"Condition",passingValue:!0,isCustom:!0,customValue:l,condition:"onPlatform",selections:[{kind:"ScalarField",alias:null,name:"photoUrl",args:[{kind:"Literal",name:"size",value:200}],storageKey:"photoUrl(size:200)"}]}]},{kind:"ScalarField",alias:null,name:"cursor",args:null,storageKey:null}]}]},{kind:"LinkedHandle",alias:null,name:"topicSuggestionsConnection",args:r,handle:"connection",key:"FollowInterestsStepList_topicSuggestionsConnection",filters:[]},o]}]}]},params:{operationKind:"query",name:"FollowInterestsStepQuery",id:"29eb57b1c6472b82bacfda421211a69054efd83b69320d8ea9cd07185b117385",text:null,metadata:{}}}}();h.hash="fe5d9b796c89f945084d9ce2cdc8ca68";var v,k=h,y=t("q1tI"),b=t("jufJ"),S=t("RA+f"),w=t("AaDK"),T=t("+22L"),L=t("nwxp"),F=t("Xqoj"),I=t("/bbo"),_=!1,E=function(e){function n(e){var t,a,i,l,o;return r()(this,n),(o=c()(this,g()(n).call(this,e))).state={tidsFollowed:new Set,stepFollowedTopicsCount:Object(L.b)()&&null!==(t=null===(a=o.props.queryResult.nuxStep)||void 0===a||null===(i=a.viewer)||void 0===i||null===(l=i.user)||void 0===l?void 0:l.numFollowedTopics)&&void 0!==t?t:0},o}return f()(n,e),u()(n,[{key:"render",value:function(){var e=this;if(!this.props.queryResult.nuxStep)throw Error("nuxStep of Query Result is expected for FollowInterestsStep.");var n=this.props.queryResult.nuxStep.minTopicsToFollowForNuxStepCompletion;if(!n)throw Error("minTopicsToFollowForNuxStepCompletion of Query Result is expected for FollowInterestsStep.");var t=Math.max(0,n-this.state.stepFollowedTopicsCount);_||0!==t||(Object(w.a)("nux_follow_topics_next_button_enabled",{framework:"react"}),_=!0);var a=t>0?y.createElement(b.Translate,null,"Follow ",y.createElement(b.FormattedNumber,{value:t})," more",y.createElement(b.PluralTranslate,{value:t},{ONE:" topic",OTHER:" topics"}),Object(L.b)()&&" to continue"):Object(b.plaintextTranslate)(this.props.flowData.isLastStep?"Done":"Next");return y.createElement(T.a,{titleText:Object(L.b)()?Object(b.plaintextTranslate)("What are your interests?"):Object(b.plaintextTranslate)("Follow topics"),isLastStep:this.props.flowData.isLastStep,numInteractiveSteps:this.props.flowData.numInteractiveSteps,currentStepIdx:this.props.flowData.stepIdx,triggerTransition:this.props.triggerTransition,stepType:"follow_interests",isNextButtonDisabled:t>0,hasPadding:Object(L.b)(),overridenNextButtonText:Object(L.b)()&&a},y.createElement(S.e,{className:"puppeteer_test_follow_interests_step",mb:Object(L.e)()?"44px":undefined},Object(L.e)()&&y.createElement(S.e,{p:"medium"},y.createElement(b.Translate,null,"You are almost done! Select at least"," ",y.createElement(b.FormattedNumber,{value:n})," ",y.createElement(b.PluralTranslate,{value:n},{ONE:"topic",OTHER:"topics"})," ","so we can show you more stories you'll like.")),y.createElement(F.a,{followInterestsStep:this.props.queryResult.nuxStep,onTopicClicked:function(n,t){e.setState((function(e){return{tidsFollowed:t?new Set([].concat(l()(e.tidsFollowed),[n])):new Set(l()(e.tidsFollowed).filter((function(e){return e!=n}))),stepFollowedTopicsCount:e.stepFollowedTopicsCount+(t?1:-1)}}))}})),Object(L.e)()&&y.createElement(S.i,{bg:"white",fullX:!0,zIndex:"footer",bottom:0,p:"medium",boxShadow:"0 -5px 5px #fff"},y.createElement(I.a,{isFullWidth:!0,text:a,onClick:this.props.triggerTransition,disabled:t>0})))}}]),n}(y.Component);E.displayName="FollowInterestsStep",E.queries={onLoad:void 0!==v?v:v=a};n["default"]=E},VMwC:function(e,n,t){"use strict";t.r(n),t.d(n,"default",(function(){return P}));var a={};t.r(a),t.d(a,"default",(function(){return k}));var i={};t.r(i),t.d(i,"default",(function(){return w}));var l=t("iJoy"),o=t.n(l),r=t("8ZkK"),s=t.n(r),u=t("tQZz"),d=t.n(u),c=t("7eVb"),p=t.n(c),g=t("n3k3"),m=t.n(g),f=t("10u2"),h=t.n(f),v=function(){var e=[{kind:"LocalArgument",name:"languageCodes",type:"[String!]!",defaultValue:null}],n=[{kind:"LinkedField",alias:null,name:"languagesAddAndRelevantTopicsFollow",storageKey:null,args:[{kind:"Variable",name:"languageCodes",variableName:"languageCodes"}],concreteType:"LanguagesAddAndRelevantTopicsFollow",plural:!1,selections:[{kind:"ScalarField",alias:null,name:"success",args:null,storageKey:null}]}];return{kind:"Request",fragment:{kind:"Fragment",name:"LanguageStep_languagesAddAndRelevantTopicsFollow_Mutation",type:"MutationRoot",metadata:null,argumentDefinitions:e,selections:n},operation:{kind:"Operation",name:"LanguageStep_languagesAddAndRelevantTopicsFollow_Mutation",argumentDefinitions:e,selections:n},params:{operationKind:"mutation",name:"LanguageStep_languagesAddAndRelevantTopicsFollow_Mutation",id:"2e7aa926bbb9cab812403c9b859af95dd77f8bc2f515b32d05ecb4f260aa0570",text:null,metadata:{}}}}();v.hash="10f47c3a7fef6a27faf1c7a0087f0b34";var k=v,y=function(){var e=[{kind:"LocalArgument",name:"stepType",type:"String!",defaultValue:null}],n={kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},t={kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},a=[{kind:"LinkedField",alias:null,name:"nuxStep",storageKey:null,args:[{kind:"Variable",name:"stepType",variableName:"stepType"}],concreteType:null,plural:!1,selections:[n,t,{kind:"InlineFragment",type:"LanguageStep",selections:[{kind:"ScalarField",alias:null,name:"orderedWorldTopLanguageCodes",args:null,storageKey:null}]}]},{kind:"LinkedField",alias:null,name:"viewer",storageKey:null,args:null,concreteType:"Viewer",plural:!1,selections:[n,t,{kind:"ScalarField",alias:null,name:"preferredLanguageCodes",args:null,storageKey:null}]},{kind:"LinkedField",alias:null,name:"network",storageKey:null,args:null,concreteType:"Network",plural:!1,selections:[n,t,{kind:"ScalarField",alias:null,name:"contentLanguageCode",args:null,storageKey:null}]}];return{kind:"Request",fragment:{kind:"Fragment",name:"LanguageStepQuery",type:"QueryRoot",metadata:null,argumentDefinitions:e,selections:a},operation:{kind:"Operation",name:"LanguageStepQuery",argumentDefinitions:e,selections:a},params:{operationKind:"query",name:"LanguageStepQuery",id:"42d4a27d7838b064f4eb5722e512e9093ff2bd4ebe54c52d8ab38753289c6091",text:null,metadata:{}}}}();y.hash="81aef9c5d5e8525dad774443a556353e";var b,S,w=y,T=t("q1tI"),L=t("VyO/"),F=t("jufJ"),I=t("MI6j"),_=t("06DM"),E=t("cBSy"),C=t("RA+f"),x=t("rAPm"),O=t("+22L"),P=function(e){function n(e){var t,a,i,l;s()(this,n),(l=p()(this,m()(n).call(this,e))).userLanguageCodes=void 0,l.restOfWorldLanguageCodes=void 0;var o=l.props.queryResult,r=null===(t=o.network)||void 0===t?void 0:t.contentLanguageCode,u=null!==(a=null===(i=o.nuxStep)||void 0===i?void 0:i.orderedWorldTopLanguageCodes)&&void 0!==a?a:[],d=o.viewer.preferredLanguageCodes;return l.userLanguageCodes=d.filter((function(e){return e!==r&&Object(F.isLanguageNameSupported)(e)})),l.restOfWorldLanguageCodes=u.filter((function(e){return e!==r&&!d.includes(e)})),l.state={checkedLanguages:l.userLanguageCodes.map((function(e){return e.toUpperCase()}))},l}return h()(n,e),d()(n,[{key:"handleListItemClick",value:function(e){this.state.checkedLanguages.includes(e)?this.setState((function(n){return{checkedLanguages:n.checkedLanguages.filter((function(n){return n!==e}))}})):this.setState((function(n){return{checkedLanguages:[].concat(o()(n.checkedLanguages),[e])}}))}},{key:"render",value:function(){var e=this,t=function(n){return T.createElement(C.e,{className:"puppeteer_test_language_list_item",key:n},T.createElement(I.c,{key:n,mainText:T.createElement(F.LanguageName,{languageCode:n}),subText:T.createElement(F.LanguageName,{languageCode:n,nativeName:!0}),variant:"check",selected:e.state.checkedLanguages.includes(n.toUpperCase()),size:"dense",onClick:function(){e.handleListItemClick(n.toUpperCase())}}))};return T.createElement(L.a,{mutation:n.mutations.addLanguagesAndFollowRelevantTopicsMutation,variables:{languageCodes:this.state.checkedLanguages}},(function(n){return T.createElement(O.a,{titleText:Object(F.plaintextTranslate)("Add Languages"),isLastStep:e.props.flowData.isLastStep,numInteractiveSteps:e.props.flowData.numInteractiveSteps,currentStepIdx:e.props.flowData.stepIdx,hasPadding:!1,triggerTransition:function(){n(),e.props.triggerTransition()},stepType:"language"},T.createElement(C.e,{className:"puppeteer_test_language_step"},T.createElement(C.e,{p:"medium"},T.createElement(F.Translate,null,"What other languages do you know?")),e.userLanguageCodes.length>0&&T.createElement("div",null,T.createElement(_.a,{borderBottom:!1,titleText:Object(F.plaintextTranslate)("Suggested from browser settings")}),T.createElement(C.e,{className:"puppeteer_test_user_language_list"},T.createElement(E.a,null,e.userLanguageCodes.map(t))),T.createElement(_.a,{borderBottom:!1,titleText:Object(F.plaintextTranslate)("More languages")})),T.createElement(C.e,{className:"puppeteer_test_world_language_list"},T.createElement(E.a,null,e.restOfWorldLanguageCodes.map(t))),T.createElement(x.a,{mt:"tiny",mb:"small",px:"medium"},T.createElement(F.Translate,null,"Don't see your language here? You can add more languages from your profile page later."))))}))}}]),n}(T.Component);P.displayName="LanguageStep",P.queries={onLoad:void 0!==b?b:b=i},P.mutations={addLanguagesAndFollowRelevantTopicsMutation:void 0!==S?S:S=a}},Xqoj:function(e,n,t){"use strict";var a={};t.r(a),t.d(a,"default",(function(){return S}));var i={};t.r(i),t.d(i,"default",(function(){return T}));var l={};t.r(l),t.d(l,"default",(function(){return P}));var o={};t.r(o),t.d(o,"default",(function(){return N}));var r={};t.r(r),t.d(r,"default",(function(){return R}));var s=t("iJoy"),u=t.n(s),d=t("8ZkK"),c=t.n(d),p=t("tQZz"),g=t.n(p),m=t("7eVb"),f=t.n(m),h=t("n3k3"),v=t.n(h),k=t("10u2"),y=t.n(k),b=function(){var e=[{kind:"LocalArgument",name:"first",type:"Int",defaultValue:null},{kind:"LocalArgument",name:"cursor",type:"String",defaultValue:null},{kind:"LocalArgument",name:"shownTids",type:"[BigInt!]!",defaultValue:null},{kind:"LocalArgument",name:"suggestionSeedTids",type:"[BigInt!]!",defaultValue:null}],n=[{kind:"Literal",name:"stepType",value:"follow_interests"}],t={kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},a={kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},i={kind:"ScalarField",alias:null,name:"tid",args:null,storageKey:null},l={kind:"ScalarField",alias:null,name:"cursor",args:null,storageKey:null},o={kind:"LinkedField",alias:null,name:"pageInfo",storageKey:null,args:null,concreteType:"PageInfo",plural:!1,selections:[{kind:"ScalarField",alias:null,name:"endCursor",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"hasNextPage",args:null,storageKey:null}]},r=[{kind:"Variable",name:"after",variableName:"cursor"},{kind:"Variable",name:"first",variableName:"first"},{kind:"Variable",name:"shownTids",variableName:"shownTids"},{kind:"Variable",name:"suggestionSeedTids",variableName:"suggestionSeedTids"}];return{kind:"Request",fragment:{kind:"Fragment",name:"FollowInterestsStepListQuery",type:"QueryRoot",metadata:null,argumentDefinitions:e,selections:[{kind:"LinkedField",alias:null,name:"nuxStep",storageKey:'nuxStep(stepType:"follow_interests")',args:n,concreteType:null,plural:!1,selections:[t,a,{kind:"InlineFragment",type:"FollowInterestsStep",selections:[{kind:"LinkedField",alias:"topicSuggestionsConnection",name:"__FollowInterestsStepList_topicSuggestionsConnection_connection",storageKey:null,args:null,concreteType:"TopicSuggestionsConnection",plural:!1,selections:[t,a,{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"TopicEdge",plural:!0,selections:[t,a,{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:"Topic",plural:!1,selections:[t,a,i,{kind:"FragmentSpread",name:"FollowInterestsListItem_topic",args:null}]},l]},o]}]}]}]},operation:{kind:"Operation",name:"FollowInterestsStepListQuery",argumentDefinitions:e,selections:[{kind:"LinkedField",alias:null,name:"nuxStep",storageKey:'nuxStep(stepType:"follow_interests")',args:n,concreteType:null,plural:!1,selections:[t,a,{kind:"InlineFragment",type:"FollowInterestsStep",selections:[{kind:"LinkedField",alias:null,name:"topicSuggestionsConnection",storageKey:null,args:r,concreteType:"TopicSuggestionsConnection",plural:!1,selections:[t,a,{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"TopicEdge",plural:!0,selections:[t,a,{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:"Topic",plural:!1,selections:[t,a,i,{kind:"ScalarField",alias:null,name:"isFollowing",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null},{kind:"Condition",passingValue:!0,isCustom:!0,customValue:{platforms:["DESKTOP"]},condition:"onPlatform",selections:[{kind:"ScalarField",alias:null,name:"photoUrl",args:[{kind:"Literal",name:"size",value:200}],storageKey:"photoUrl(size:200)"}]}]},l]},o]},{kind:"LinkedHandle",alias:null,name:"topicSuggestionsConnection",args:r,handle:"connection",key:"FollowInterestsStepList_topicSuggestionsConnection",filters:[]}]}]}]},params:{operationKind:"query",name:"FollowInterestsStepListQuery",id:"6b32e96ccc2f362c6a5d081cf00a68646a2c6c34a47e7f9e2f9897e412428ab1",text:null,metadata:{connection:[{count:"first",cursor:"cursor",direction:"forward",path:["nuxStep","topicSuggestionsConnection"]}]}}}}();b.hash="354cced29756adf1af3fba7d4e049e06";var S=b,w=function(){var e={kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},n={kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null};return{kind:"Fragment",name:"FollowInterestsStepList_followInterestsStep",type:"FollowInterestsStep",metadata:{connection:[{count:null,cursor:null,direction:"forward",path:["topicSuggestionsConnection"]}]},argumentDefinitions:[],selections:[e,n,{kind:"LinkedField",alias:"topicSuggestionsConnection",name:"__FollowInterestsStepList_topicSuggestionsConnection_connection",storageKey:null,args:null,concreteType:"TopicSuggestionsConnection",plural:!1,selections:[e,n,{kind:"LinkedField",alias:null,name:"pageInfo",storageKey:null,args:null,concreteType:"PageInfo",plural:!1,selections:[{kind:"ScalarField",alias:null,name:"endCursor",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"hasNextPage",args:null,storageKey:null}]},{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"TopicEdge",plural:!0,selections:[e,n,{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:"Topic",plural:!1,selections:[e,n,{kind:"ScalarField",alias:null,name:"tid",args:null,storageKey:null},{kind:"FragmentSpread",name:"FollowInterestsListItem_topic",args:null}]},{kind:"ScalarField",alias:null,name:"cursor",args:null,storageKey:null}]}]}]}}();w.hash="381661c4d2dfab933481ff97d41f2074";var T=w,L=t("q1tI"),F=t("VyO/"),I=t("cBSy"),_=t("m+xM"),E=t("nwxp"),C=t("RA+f"),x=t("vOnD"),O=function(){var e=[{kind:"LocalArgument",name:"tid",type:"BigInt!",defaultValue:null}],n=[{kind:"LinkedField",alias:null,name:"topicFollowRemove",storageKey:null,args:[{kind:"Variable",name:"tid",variableName:"tid"}],concreteType:"TopicFollowRemove",plural:!1,selections:[{kind:"LinkedField",alias:null,name:"topic",storageKey:null,args:null,concreteType:"Topic",plural:!1,selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"isFollowing",args:null,storageKey:null}]}]}];return{kind:"Request",fragment:{kind:"Fragment",name:"FollowInterestsListItem_topicFollowRemove_Mutation",type:"MutationRoot",metadata:null,argumentDefinitions:e,selections:n},operation:{kind:"Operation",name:"FollowInterestsListItem_topicFollowRemove_Mutation",argumentDefinitions:e,selections:n},params:{operationKind:"mutation",name:"FollowInterestsListItem_topicFollowRemove_Mutation",id:"cc78e3eb864882990fa34ed759c3dce5d3080001cb9f4a162e65431f1194f468",text:null,metadata:{}}}}();O.hash="c4e37b4e1954424c2071dad13d4bd313";var P=O,K=function(){var e=[{kind:"LocalArgument",name:"tid",type:"BigInt!",defaultValue:null}],n=[{kind:"LinkedField",alias:null,name:"topicFollowAdd",storageKey:null,args:[{kind:"Variable",name:"tid",variableName:"tid"},{kind:"Literal",name:"useInNux",value:!0}],concreteType:"TopicFollowAdd",plural:!1,selections:[{kind:"LinkedField",alias:null,name:"topic",storageKey:null,args:null,concreteType:"Topic",plural:!1,selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"isFollowing",args:null,storageKey:null}]}]}];return{kind:"Request",fragment:{kind:"Fragment",name:"FollowInterestsListItem_topicFollowAdd_Mutation",type:"MutationRoot",metadata:null,argumentDefinitions:e,selections:n},operation:{kind:"Operation",name:"FollowInterestsListItem_topicFollowAdd_Mutation",argumentDefinitions:e,selections:n},params:{operationKind:"mutation",name:"FollowInterestsListItem_topicFollowAdd_Mutation",id:"2f6bdedcee2abebe813641303eb27506420afe4210e989f7adbee1cc2489db07",text:null,metadata:{}}}}();K.hash="f4de94c1abac5e73983ed82ad050b401";var j,D,M,N=K,A={kind:"Fragment",name:"FollowInterestsListItem_topic",type:"Topic",metadata:null,argumentDefinitions:[],selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"isFollowing",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"tid",args:null,storageKey:null},{kind:"Condition",passingValue:!0,isCustom:!0,customValue:{platforms:["DESKTOP"]},condition:"onPlatform",selections:[{kind:"ScalarField",alias:null,name:"photoUrl",args:[{kind:"Literal",name:"size",value:200}],storageKey:"photoUrl(size:200)"}]},{kind:"FragmentSpread",name:"TopicName_topic",args:null}],hash:"77518a0bf125489e76de46d9fcba6a60"},R=A,V=t("cecZ"),B=t("MI6j"),q=t("OMLc"),z=Object(x["default"])(C.f).withConfig({displayName:"FollowInterestsListItem___StyledClickWrapper",componentId:"li8d0a-0"})(["background-image:url(",');background-position:center;background-size:cover;&:after{content:" ";display:block;padding-bottom:100%;background-color:rgba(0,0,0,0.3);transition:background-color ease 180ms;border-radius:inherit;}&:hover:after{background-color:rgba(0,0,0,0.45);}'],(function(e){return e._css})),Q=Object(x["default"])(C.g).withConfig({displayName:"FollowInterestsListItem___StyledCssComponent",componentId:"li8d0a-1"})(["transition-delay:",";"],(function(e){return e._css2})),W=function(e){function n(e){var t;return c()(this,n),(t=f()(this,v()(n).call(this,e))).onClick=function(e){var n=t.props.topic.tid,a=t.state.isFollowing;e(),t.props.onClick(n,!a),t.setState({isFollowing:!a})},t.state={isFollowing:t.props.topic.isFollowing},t}return y()(n,e),g()(n,[{key:"getMutationOptions",value:function(){var e=this.props.topic,t=e.tid,a=this.state.isFollowing,i=a?n.mutations.topicFollowRemoveMutation:n.mutations.topicFollowAddMutation,l={tid:t},o={id:e.id,__typename:e.__typename,isFollowing:!a};return{mutation:i,variables:l,optimisticResponse:a?{topicFollowRemove:{topic:o}}:{topicFollowAdd:{topic:o}}}}},{key:"shouldComponentUpdate",value:function(e,n){return this.state.isFollowing!==n.isFollowing}},{key:"render",value:function(){var e=this,n=this.props,t=n.topic,a=n.itemSize,i=t.photoUrl,l=this.state.isFollowing;return L.createElement(F.a,this.getMutationOptions(),(function(n){return Object(E.b)()?L.createElement(z,{className:"puppeteer_test_follow_interests_list_item",onClick:function(){e.onClick(n)},position:"relative",flexBasis:"calc(".concat(16.6,"% - 8px)"),m:"tiny",bg:"black",boxShadow:"inset 0 -40px 20px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0,0,0,.1)",borderRadius:"small",userSelect:"none",_css:i},L.createElement(C.a,{bottom:"0",p:"tiny"},L.createElement(C.s,{bold:!0,color:"white",lineHeight:1.3,fontSize:"small",truncateLines:4},L.createElement(V.a,{topic:t}))),L.createElement(C.a,{borderRadius:"circle",top:"tiny",right:"tiny",p:"tiny",bg:l?"blue":"rgba(255, 255, 255, 0.75)",boxShadow:l?undefined:"inset 0 2px 4px rgba(0,0,0,.1), 0 0 0 1px rgba(0,0,0,.1)",size:32,transitionProperty:"background-color",transitionDuration:"50ms",transitionTimingFunction:"ease-out"},L.createElement(C.c,{"in":l},(function(e){return L.createElement(Q,{animation:e,fadeIn:!0,fadeOut:!0,scaleIn:!0,scaleOut:!0,_css2:"entered"===e.state?"100ms":0},L.createElement(q.b,{color:"white",name:"Checkmark"}))})))):L.createElement(C.e,{className:"puppeteer_test_follow_interests_list_item",width:"100%"},L.createElement(B.c,{onClick:function(){e.onClick(n)},mainText:L.createElement(V.a,{topic:t}),variant:"check",selected:l,size:a||"regular"}))}))}}]),n}(L.Component);W.displayName="FollowInterestsListItem",W.fragments={topic:void 0!==j?j:j=r},W.mutations={topicFollowAddMutation:void 0!==D?D:D=o,topicFollowRemoveMutation:void 0!==M?M:M=l};var U,H,J=Object(F.b)(W),Z=function(e){function n(e){var t;return c()(this,n),(t=f()(this,v()(n).call(this,e))).alreadyFetchedTids=new Set,t.checkedTids=new Set,t.itemSize=void 0,t.itemSize="regular",t}return y()(n,e),g()(n,[{key:"onTopicClicked",value:function(e,n,t,a){var i,l;n?this.alreadyFetchedTids.has(e)||(this.checkedTids.add(e),t&&a()):this.checkedTids["delete"](e),null===(i=(l=this.props).onTopicClicked)||void 0===i||i.call(l,e,n)}},{key:"getSeedTids",value:function(){var e=this;return u()(this.checkedTids).filter((function(n){return!e.alreadyFetchedTids.has(n)}))}},{key:"getVariables",value:function(){var e=this.getSeedTids();return this.alreadyFetchedTids=new Set([].concat(u()(this.alreadyFetchedTids),u()(e))),{shownTids:this.props.followInterestsStep.topicSuggestionsConnection.edges.map((function(e){return e.node.tid})),suggestionSeedTids:e}}},{key:"mergeResult",value:function(e,n){return Object.assign({},e,{nuxStep:Object.assign({},e.nuxStep,{topicSuggestionsConnection:Object.assign({},e.nuxStep.topicSuggestionsConnection,{edges:[].concat(u()(e.nuxStep.topicSuggestionsConnection.edges),u()(n.nuxStep.topicSuggestionsConnection.edges))})})})}},{key:"render",value:function(){var e,n,t=this,a=this.props,i=a.followInterestsStep,l=a.relay;if(0===(null!==(e=null===(n=i.topicSuggestionsConnection.edges)||void 0===n?void 0:n.length)&&void 0!==e?e:0))return null;var o=function(e){l?l.refetchConnection(30,null,{seedTids:t.getSeedTids()}):e()};return L.createElement(_.c,{relayObject:l,autoPaged:{enabled:!1},pagingIndicator:undefined,prefetchingEnabled:!1,connection:i.topicSuggestionsConnection,animated:!Object(E.b)(),listWrapper:function(e){return Object(E.b)()?L.createElement(C.j,{flexWrap:"wrap",m:"n_tiny"},e):L.createElement(I.a,null,e)}},(function(e){var n=e.index,a=e.readyToLoadMore,i=e.loadMore,l=e.node;return 0===n&&a&&t.getSeedTids().length>0&&o(i),L.createElement(J,{key:l.tid,topic:l,itemSize:Object(E.b)()?undefined:t.itemSize,onClick:function(e,n){t.onTopicClicked(e,n,a,(function(){return o(i)}))}})}))}}]),n}(L.Component);Z.displayName="FollowInterestsStepList",Z.fragments={followInterestsStep:void 0!==U?U:U=i},Z.queries={loadMore:void 0!==H?H:H=a},Z.connectionConfig={direction:"forward",getConnectionFromProps:function(e){return e.followInterestsStep&&e.followInterestsStep.topicSuggestionsConnection},getVariables:function(e,n,t){return{count:n.count,cursor:String(e.followInterestsStep.topicSuggestionsConnection.edges.length-1),shownTids:e.followInterestsStep.topicSuggestionsConnection.edges.map((function(e){return e.node.tid})),suggestionSeedTids:t.seedTids}},query:Z.queries.loadMore};n.a=Object(F.d)(Z)},aMaN:function(e,n,t){"use strict";t.r(n),t.d(n,"default",(function(){return C}));var a={};t.r(a),t.d(a,"default",(function(){return h}));var i=t("8ZkK"),l=t.n(i),o=t("tQZz"),r=t.n(o),s=t("7eVb"),u=t.n(s),d=t("n3k3"),c=t.n(d),p=t("10u2"),g=t.n(p),m=function(){var e={kind:"ScalarField",alias:null,name:"trackId",args:null,storageKey:null},n={kind:"ScalarField",alias:null,name:"linkData",args:null,storageKey:null};return{kind:"Request",fragment:{kind:"Fragment",name:"DownloadAppStepQuery",type:"QueryRoot",metadata:null,argumentDefinitions:[],selections:[{kind:"LinkedField",alias:null,name:"viewInAppLink",storageKey:null,args:null,concreteType:"ViewInAppLink",plural:!1,selections:[e,n]}]},operation:{kind:"Operation",name:"DownloadAppStepQuery",argumentDefinitions:[],selections:[{kind:"LinkedField",alias:null,name:"viewInAppLink",storageKey:null,args:null,concreteType:"ViewInAppLink",plural:!1,selections:[e,n,{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null}]}]},params:{operationKind:"query",name:"DownloadAppStepQuery",id:"0755e5d378bd193b921cb0c0d96e26e793da0d28fd5ce52391226f8785f71ad9",text:null,metadata:{}}}}();m.hash="442464490f138d86b4492a667d0c83f8";var f,h=m,v=t("q1tI"),k=t("jufJ"),y=t("zLpq"),b=t("/bbo"),S=t("RA+f"),w=t("UyMh"),T=t("nwxp"),L=t("T5JH"),F=t("SKAY"),I=t("AaDK"),_=t("zXuH"),E=t("+22L"),C=function(e){function n(e){var t;return l()(this,n),(t=u()(this,c()(n).call(this,e))).deepLinkInfo=void 0,t.deepLinkGenerator=void 0,t.logEvent=function(e){var n=t.getDownloadAppLinkNuxStepInfo();n&&Object(I.a)("mweb_view_in_app_link_logger",{step:e,component:n.viewInAppLinkType,url:n.referrerLink,controller:Object(F.getSetting)("controller"),action:Object(F.getSetting)("action"),deepLinkId:n.deepLinkId,deepLink:n.deepLink,provider:n.provider})},t.getLinkToStore=function(){return t.getDownloadAppLinkNuxStepInfo().deepLink},t.onDownloadAppLinkClicked=function(){t.logEvent("click"),Object(w.b)(t.getLinkToStore())},t.deepLinkGenerator=new _.a(e.queryResult.viewInAppLink.trackId),t}return g()(n,e),r()(n,[{key:"getDownloadAppLinkNuxStepInfo",value:function(){if(this.deepLinkInfo)return this.deepLinkInfo;var e=JSON.parse(this.props.queryResult.viewInAppLink.linkData),n=this.deepLinkGenerator.getDeepLinkInfo({linkType:_.b.DOWNLOAD_APP_LINK_NUX_STEP,extraData:e});return this.deepLinkInfo=n,n}},{key:"componentDidMount",value:function(){this.logEvent("show")}},{key:"render",value:function(){var e=this;return v.createElement(E.a,{titleText:Object(k.plaintextTranslate)("Download App"),isLastStep:this.props.flowData.isLastStep,numInteractiveSteps:this.props.flowData.numInteractiveSteps,currentStepIdx:this.props.flowData.stepIdx,triggerTransition:this.props.triggerTransition,isNextButtonHidden:!0,stepType:"download_app"},v.createElement(S.e,{className:"puppeteer_test_download_app_step"},v.createElement(S.f,{width:"100%",onClick:this.onDownloadAppLinkClicked},v.createElement(L.a,{height:"250px",bgSize:"contain",bgColor:"white",src:T.m?"//qsf.fs.quoracdn.net/-4-ans_frontend_assets.images.app_download.app_download_ios.png-26-c0bc38376fde4e13.png":"//qsf.fs.quoracdn.net/-4-ans_frontend_assets.images.app_download.app_download_android.png-26-fb6779583c415b11.png",mb:"medium"})),v.createElement(S.e,{textAlign:"center"},v.createElement(S.s,{bold:!0,fontSize:"large"},v.createElement(k.Translate,null,"There's more to see"))),v.createElement(S.e,{textAlign:"center",mb:"medium"},v.createElement(k.Translate,null,"We are always updating the Quora app to be better than ever before. Take a look!")),v.createElement(b.a,{text:T.m?Object(k.plaintextTranslate)("Download the iOS app"):Object(k.plaintextTranslate)("Download the Android app"),isFullWidth:!0,mb:"small",onClick:this.onDownloadAppLinkClicked,className:"puppeteer_test_download_app_button"}),v.createElement(y.a,{text:Object(k.plaintextTranslate)("Not now"),onClick:function(){return e.props.triggerTransition()},className:"puppeteer_test_skip_download_button",isFullWidth:!0})))}}]),n}(v.Component);C.displayName="DownloadAppStep",C.queries={onLoad:void 0!==f?f:f=a}},"cPp+":function(e,n,t){"use strict";t.r(n);var a=t("q1tI"),i=t("jufJ"),l=t("EFAP"),o=t("RqIh"),r=t("nwxp"),s=t("RA+f"),u=t("td6z"),d=t("yju1"),c=t("VyO/"),p=t("+22L"),g=t("SpgY"),m=function(e){var n=e.triggerTransition,t=e.flowData;return Object(a.useEffect)((function(){t.pageType===o.a.home_feed_main&&(Object(c.c)({mutation:g["default"].mutations.nuxMarkComplete}),Object(r.g)()&&Object(d.a)("broadcastAllWebViews",{messageName:"refreshFeedAfterNux",data:{"null":null}})),setTimeout((function(){Object(r.g)()||t.pageType!==o.a.home_feed_main?n():window.location.reload()}),3e3)}),[t.pageType,n]),a.createElement(p.a,{titleText:Object(i.plaintextTranslate)("Loading your feed"),isLastStep:!1,triggerTransition:n,stepType:"spinner",isNextButtonDisabled:!0},a.createElement(s.e,{textAlign:"center",mb:"small",className:"puppeteer_test_spinner_step"},a.createElement(l.e.Consumer,null,(function(e){return e==o.a.answer?a.createElement(i.Translate,null,"Hold on while we find more great answers for you..."):Object(r.e)()?a.createElement(i.Translate,null,"You're all done! Creating your personalized feed..."):a.createElement(i.Translate,null,"Creating your personalized feed...")}))),a.createElement(u.c,null))};m.displayName="SpinnerStep",n["default"]=m},"m+xM":function(e,n,t){"use strict";t.d(n,"d",(function(){return H})),t.d(n,"a",(function(){return J})),t.d(n,"b",(function(){return Z})),t.d(n,"c",(function(){return X}));var a=t("8ZkK"),i=t.n(a),l=t("7eVb"),o=t.n(l),r=t("n3k3"),s=t.n(r),u=t("tQZz"),d=t.n(u),c=t("10u2"),p=t.n(c),g=t("g8yt"),m=t.n(g),f=t("q1tI"),h=t("QLaP"),v=t.n(h),k=t("I/VO"),y=t.n(k),b=t("td6z"),S=t("VSaK"),w=t("IljH"),T=t("AaDK"),L=t("s/A7"),F=t("SW3P"),I=t("nwxp"),_=t("+pxc"),E=t("hXLn"),C=t("jufJ"),x=t("VwdU"),O=t("ZizP"),P=t("8lmh"),K=t("cbxS"),j=t("OMLc"),D=t("RA+f");function M(){return f.createElement(D.e,{p:"small",borderBottom:!0},f.createElement(K.a,{variant:"warning_inverted",icon:f.createElement(j.b,{name:"Error"}),title:f.createElement(C.Translate,null,"There was an error loading this item.")}))}var N=t("PGlZ"),A=t("3W2L"),R=t("wxi4"),V=t("P6tR"),B=t("edYY"),q=t("/bbo"),z=t("vOnD"),Q=Object(z.withTheme)((function(e){var n=e.text,t=e.refetch,a=e.loading,i=e.theme;return f.createElement(V.a.Consumer,null,(function(e){return f.createElement(R.d,{justifyContent:"center",zIndex:i.zIndices.tooltip+1,top:Object(B.a)({isPrefetched:e}),display:"flex",alignItems:"flex-start",height:0},f.createElement(R.c,{top:"small"},f.createElement(D.c,{"in":!0,appear:!0},(function(e){return f.createElement(D.g,{fadeIn:!0,fadeOut:!0,animation:e,slideIn:"top",slideOut:"top",slideDistance:"small"},f.createElement(q.a,{icon:f.createElement(j.b,{name:"Sync"}),text:n,hasBoxShadow:!0,onClick:t,size:"small",loading:a}))}))))}))})),W=t("5Fmr"),U=t("nG0s"),H=function(){return Object(F.a)("show_react_live_update_banner")},J=function(e){var n=e.onClick;return f.createElement(D.e,{p:"small"},f.createElement(K.a,{buttonOnClick:n,buttonTitle:f.createElement(C.Translate,null,"Try again"),buttonVariant:"error",variant:"warning_inverted",icon:f.createElement(j.b,{name:"NoConnection"}),title:f.createElement(C.Translate,null,"Unable to load more. Check your internet connection."),iconPosition:Object(I.b)()?"centered":undefined}))},Z=function(e){var n=e.onClick;return f.createElement(D.e,{p:"small"},f.createElement(K.a,{buttonOnClick:n,buttonTitle:f.createElement(C.Translate,null,"Try again"),buttonVariant:"error",variant:"warning_inverted",icon:f.createElement(j.b,{name:"Error"}),title:f.createElement(C.Translate,null,"There was an error loading more items."),iconPosition:Object(I.b)()?"centered":undefined}))},X=function(e){function n(e){var t,a,l;return i()(this,n),(l=o()(this,s()(n).call(this,e))).itemRefs=void 0,l.markBounceLoggerDoneLoading=void 0,l.markBounceLoggerStartLoading=void 0,e=l.setDefaultProps(e),l.loadMore=l.loadMore.bind(m()(m()(l))),l.refetchList=l.refetchList.bind(m()(m()(l))),l.onScroll=l.onScroll.bind(m()(m()(l))),l.renderChildren=l.renderChildren.bind(m()(m()(l))),l.getIdFromEdge=l.getIdFromEdge.bind(m()(m()(l))),l.scrollToNewestItem=l.scrollToNewestItem.bind(m()(m()(l))),l.onViewChange=l.onViewChange.bind(m()(m()(l))),l.itemRefs={},l.state={hasMore:e.relayObject&&e.relayObject.hasMore(),isPaging:!1,isPrefetching:!1,error:null,initialLiveBannerHash:null===(t=e.liveBannerConfig)||void 0===t?void 0:t.hashValue,existingItems:l.getExistingIDs(),isBannerLoading:!1,itemsToShow:null!==(a=e.connection)&&void 0!==a&&a.edges?e.connection.edges.length:0,pageStartTime:undefined,isVisible:!1},l}return p()(n,e),d()(n,[{key:"setDefaultProps",value:function(e){var n;e.autoPaged&&("enabled"in e.autoPaged||(e.autoPaged.enabled=!1),"infiniteScrollOptions"in e.autoPaged||(e.autoPaged.infiniteScrollOptions={}),e.autoPaged.infiniteScrollOptions&&!("threshold"in e.autoPaged.infiniteScrollOptions)&&(e.autoPaged.infiniteScrollOptions.threshold=1e3),e.autoPaged.infiniteScrollOptions&&(e.autoPaged.infiniteScrollOptions.isSafari=Object(I.e)()&&((null===(n=Object(_.a)())||void 0===n?void 0:n.isSafari)||Object(I.c)())));return e}}]),d()(n,[{key:"getIdFromEdge",value:function(e){var n;return((null===(n=this.props.liveBannerConfig)||void 0===n?void 0:n.overrideItemId)||function(e){var n;return null===e||void 0===e||null===(n=e.node)||void 0===n?void 0:n.id})(e)}},{key:"getExistingIDs",value:function(){var e,n;return(null!==(e=this.props.connection)&&void 0!==e&&e.edges?null===(n=this.props.connection)||void 0===n?void 0:n.edges.map(this.getIdFromEdge):[]).filter((function(e){return!!e}))}},{key:"isInViewport",value:function(e){var n,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;if(null===e||void 0===e||null===(n=e.current)||void 0===n||!n.getBoundingClientRect)return!1;var a=e.current.getBoundingClientRect().top;return a+t>=0&&a-t<=window.innerHeight}},{key:"componentDidMount",value:function(){this.props.autoPaged&&this.props.autoPaged.pagingElement&&Object(S.b)(this.onScroll)}},{key:"componentWillUnmount",value:function(){this.props.autoPaged&&this.props.autoPaged.pagingElement&&Object(S.a)(this.onScroll)}},{key:"componentDidUpdate",value:function(e,n){if(Object(F.a)("paged_list_perf")){if(this.props.pagingIndicator&&!n.isPaging&&this.state.isPaging&&this.state.pageStartTime){var t,a=null===(t=this.props.connection)||void 0===t?void 0:t.__typename;Object(T.a)("paged_list_perf",{connectionName:a,fcp:Object(w.P)()-this.state.pageStartTime})}if(n.isPaging&&!this.state.isPaging&&n.pageStartTime){var i,l=null===(i=this.props.connection)||void 0===i?void 0:i.__typename,o=Object(w.P)()-n.pageStartTime;Object(T.a)("paged_list_perf",{connectionName:l,tti:o,fcp:this.props.pagingIndicator?undefined:o})}}this.props.prefetchingEnabled&&!n.isPrefetching&&!n.isPaging&&e.connection&&this.props.connection&&e.connection.edges.length<this.props.connection.edges.length&&this.updateItemsToShow(),this.state.isVisible&&!this.state.error&&this.prefetchMore()}},{key:"updateItemsToShow",value:function(){this.props.connection&&this.setState({itemsToShow:this.props.connection.edges.length})}},{key:"onViewChange",value:function(e){!this.state.isPaging&&this.props.autoPaged&&!this.props.autoPaged.enabled&&this.props.prefetchingEnabled&&this.setState({isVisible:e})}},{key:"onScroll",value:function(){!this.state.isPaging&&this.props.autoPaged&&this.props.autoPaged.pagingElement&&this.isInViewport(this.props.autoPaged.pagingElement)&&this.loadMore()}},{key:"prefetchMore",value:function(){var e=this,n=this.setDefaultProps(this.props),t=n.relayObject,a=n.connection;(null===a||void 0===a?void 0:a.edges)&&this.state.itemsToShow<a.edges.length||!t.hasMore()||t.isLoading()||(t.loadMore(0,(function(n){var i=!n&&t.hasMore();n&&console.error(n),e.state.isPaging&&e.onPagingEnd(null!==n&&void 0!==n?n:null,i),(e.state.isPaging||n)&&e.setState((function(t){var l=null!==a&&void 0!==a&&a.edges?null===a||void 0===a?void 0:a.edges.length:t.itemsToShow;return{isPaging:!1,isPrefetching:!1,pageStartTime:undefined,hasMore:i,error:null!==n&&void 0!==n?n:null,existingItems:e.getExistingIDs(),itemsToShow:l}}))})),this.setState({isPrefetching:!0}))}},{key:"loadMore",value:function(){var e=this.setDefaultProps(this.props),n=e.autoPaged,t=e.connection;n&&!n.enabled&&this.props.prefetchingEnabled&&t?this.loadMorePrefetched():this.loadMoreDefault()}},{key:"havePrefetchedItems",value:function(){var e=this.setDefaultProps(this.props).connection;return(null===e||void 0===e?void 0:e.edges)&&this.state.itemsToShow<e.edges.length}},{key:"loadMorePrefetched",value:function(){var e=this.setDefaultProps(this.props),n=e.relayObject,t=e.connection,a=this.state.isPaging;if(t&&this.havePrefetchedItems())return this.onPagingStart(),this.onPagingEnd(null,n.hasMore()),void this.setState({isPaging:!1,hasMore:n.hasMore(),itemsToShow:null===t||void 0===t?void 0:t.edges.length,existingItems:this.getExistingIDs()});if(n.hasMore()&&!a){var i=Object(w.P)();this.onPagingStart(),this.setState({isPaging:!0,pageStartTime:i,error:null})}}},{key:"loadMoreDefault",value:function(){var e=this,n=this.setDefaultProps(this.props).relayObject,t=this.state.isPaging;if(n.hasMore()&&!t&&!n.isLoading()){var a=Object(w.P)();this.onPagingStart(),n.loadMore(0,(function(t){var a=e.setDefaultProps(e.props).connection,i=!t&&n.hasMore();t&&console.error(t),e.onPagingEnd(null!==t&&void 0!==t?t:null,i),e.setState((function(n){var l=null!==a&&void 0!==a&&a.edges?null===a||void 0===a?void 0:a.edges.length:n.itemsToShow;return{isPaging:!1,pageStartTime:undefined,hasMore:i,error:null!==t&&void 0!==t?t:null,itemsToShow:l,existingItems:e.getExistingIDs()}}))})),this.setState({isPaging:!0,pageStartTime:a,hasMore:!0,error:null})}}},{key:"refetchList",value:function(){var e,n=this,t=this.setDefaultProps(this.props),a=t.relayObject,i=t.connection;this.onPagingStart();var l=null===i||void 0===i||null===(e=i.edges)||void 0===e?void 0:e.length;return this.setState({existingItems:this.getExistingIDs(),isBannerLoading:!0}),new Promise((function(e){a.refetchConnection(0,(function(t){var i,l=!t&&a.hasMore();t&&console.error(t),n.onPagingEnd(null!==t&&void 0!==t?t:null,l),n.setState({isPaging:!1,hasMore:l,error:null!==t&&void 0!==t?t:null,initialLiveBannerHash:null===(i=n.props.liveBannerConfig)||void 0===i?void 0:i.hashValue,isBannerLoading:!1},n.scrollToNewestItem),e()}),{first:l&&l+1,refetch:!0})}))}},{key:"shouldShowLiveBanner",value:function(){var e=this.props,n=e.liveBannerConfig,t=e.connection,a=this.state.initialLiveBannerHash;if(!n||!H()||!a)return!1;var i=n.hashValue,l=n.ignoreList;if(i===a)return!1;if(!l)return Object(T.a)("scribe_only",{scribe_category:"live_banner_triggered",log_viewer:!0,connectionName:null===t||void 0===t?void 0:t.__typename,old_hash:a,new_hash:i,ignoreList:!1},{sampleRate:.1}),!0;var o=String(a).split(":"),r=String(i).split(":").some((function(e){return!o.includes(e)&&!l.includes(e)}));return r&&Object(T.a)("scribe_only",{scribe_category:"live_banner_triggered",log_viewer:!0,connectionName:null===t||void 0===t?void 0:t.__typename,old_hash:a,new_hash:i,ignoreList:!0},{sampleRate:.1}),r}},{key:"scrollToNewestItem",value:function(){var e=this;window.requestAnimationFrame((function(){var n=e.props.connection,t=e.state.existingItems,a=null===n||void 0===n?void 0:n.edges.find((function(n){return e.getIdFromEdge(n)&&!t.includes(e.getIdFromEdge(n))}));if(a){var i=e.itemRefs[e.getIdFromEdge(a)];Object(L.a)(i,"center")}}))}},{key:"onPagingStart",value:function(){var e,n,t;null===(e=(n=this.props).onPagingStart)||void 0===e||e.call(n),null===(t=this.markBounceLoggerStartLoading)||void 0===t||t.call(this)}},{key:"onPagingEnd",value:function(e,n){var t,a,i;null===(t=(a=this.props).onPagingEnd)||void 0===t||t.call(a,e,n),null===(i=this.markBounceLoggerDoneLoading)||void 0===i||i.call(this)}},{key:"renderWrappedPagingIndicator",value:function(){var e,n,t=this,a=this.setDefaultProps(this.props).pagingIndicator,i=null!==(e=null===(n=this.props.connection)||void 0===n?void 0:n.__typename)&&void 0!==e?e:"";return this.props.debugName&&(i+="_".concat(this.props.debugName)),f.createElement(A.a,{type:"paging",logKey:i,key:"loading"},(function(e,n){return t.markBounceLoggerStartLoading=n,t.markBounceLoggerDoneLoading=e,a}))}},{key:"renderChildren",value:function(){var e=this,n=this.setDefaultProps(this.props),t=n.relayObject,a=n.children,i=n.singleItemErrorComponent,l=n.connection,o=n.liveBannerConfig,r=n.onNullNode,s=n.animated,u=n.temporaryHighlightBox,d=n.prefetchingEnabled,c=n.reverseOrder,p=this.state,g=p.isPaging,m=p.error,h=p.hasMore,v=p.existingItems,k=p.itemsToShow;if(null===l)return null;if(!a)return null;var y=d?null===l||void 0===l?void 0:l.edges.slice(0,k):null===l||void 0===l?void 0:l.edges;return c&&(y=y.slice().reverse()),y.map((function(n,l){var d;if(!n||!n.node)return null===r||void 0===r||r(),null;var c,p=e.getIdFromEdge(n),y=o&&p&&!g&&!v.includes(p);return s?f.createElement(D.c,{key:p||(null===n||void 0===n||null===(d=n.node)||void 0===d?void 0:d.id),"in":!0,appear:y},(function(o){return f.createElement(D.g,{fadeIn:!0,animation:o,slideDistance:"small"},f.createElement(W.c,{delay:400,disabled:!(y&&u)},f.createElement(D.e,{innerRef:function(n){return e.itemRefs[p]=n}},f.createElement(O.a,{errorChildren:function(){return i}},a({index:l,node:null===n||void 0===n?void 0:n.node,isLastItem:l===k-1,loading:t.isLoading()||g,error:m,readyToLoadMore:!t.isLoading()&&!g&&h,loadMore:e.loadMore})))))})):f.createElement(O.a,{errorChildren:function(){return i},key:p||(null===n||void 0===n||null===(c=n.node)||void 0===c?void 0:c.id)},a({index:l,node:null===n||void 0===n?void 0:n.node,isLastItem:l===k-1,loading:t.isLoading()||g,error:m,readyToLoadMore:!t.isLoading()&&!g&&h,loadMore:e.loadMore}))}))}},{key:"render",value:function(){var e,n,t=this,a=this.setDefaultProps(this.props),i=a.relayObject,l=a.autoPaged,o=a.loadingIndicator,r=a.endOfPageComponent,s=a.endOfContentComponent,u=a.connectionIssueComponent,d=a.errorComponent,c=a.liveBannerConfig,p=a.listWrapper,g=a.as,m=void 0===g?"div":g,h=this.state,k=h.error,b=h.isPaging,S=h.hasMore,w=h.isBannerLoading,T=h.itemsToShow,L=k&&Object(P.isConnectionError)(k),F=k&&!L,I=!k&&!i.isLoading()&&!b&&!S,_=!k&&!b&&!(null!==l&&void 0!==l&&l.enabled)&&(this.havePrefetchedItems()||S&&!i.isLoading());return v()(i,"PagedList expects relayObject props"),!i||i.isLoading()&&!b&&!w&&0===T&&o?o||null:f.createElement(x.a,{condition:!!c&&H(),wrapper:function(e){return c?f.createElement(E.a,{fragmentOrQuery:c.query,initialData:c.initialData,variables:c.variables(i.getFragmentVariables())},e):e}},f.createElement(x.a,{condition:null!==(e=null===l||void 0===l?void 0:l.enabled)&&void 0!==e&&e,wrapper:function(e){return f.createElement(y.a,Object.assign({loadMore:t.loadMore,hasMore:S,loader:t.renderWrappedPagingIndicator()},null===l||void 0===l?void 0:l.infiniteScrollOptions,{element:m}),e)},elseWrapper:function(e){return f.createElement(N.b,{onChange:t.onViewChange,as:m},e)}},c&&this.shouldShowLiveBanner()&&f.createElement(U.a,null,f.createElement(Q,{refetch:this.refetchList,text:c.bannerText,loading:w})),null!==(n=null===p||void 0===p?void 0:p(this.renderChildren()))&&void 0!==n?n:this.renderChildren(),!(null!==l&&void 0!==l&&l.enabled)&&i.isLoading()&&b&&this.renderWrappedPagingIndicator(),_&&(null===r||void 0===r?void 0:r(this.loadMore)),I&&(null===s||void 0===s?void 0:s()),L&&(null===u||void 0===u?void 0:u(this.loadMore)),F&&(null===d||void 0===d?void 0:d(this.loadMore))))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var t,a,i;return!n.hasMore&&null!==(t=e.relayObject)&&void 0!==t&&t.hasMore()?Object.assign({},n,{hasMore:e.relayObject.hasMore()}):null!==(a=e.connection)&&void 0!==a&&a.edges.length&&(null===(i=e.connection)||void 0===i?void 0:i.edges.length)<n.itemsToShow?Object.assign({},n,{itemsToShow:e.connection.edges.length}):n}}]),n}(f.Component);X.displayName="PagedList",X.defaultProps={autoPaged:{},pagingIndicator:f.createElement(b.c,{key:"loading"}),connectionIssueComponent:function(e){return f.createElement(J,{onClick:e})},errorComponent:function(e){return f.createElement(Z,{onClick:e})},singleItemErrorComponent:f.createElement(M,null),animated:!0,temporaryHighlightBox:!0,as:"div",prefetchingEnabled:!0,reverseOrder:!1}},nG0s:function(e,n,t){"use strict";t.d(n,"a",(function(){return s}));var a=t("yMAQ"),i=t.n(a),l=t("q1tI"),o=l.createContext(undefined);o.displayName="LiveBannerAnchorContext";var r=function(e){var n=e.children,t=l.useState(),a=i()(t,2),r=a[0],s=a[1];return l.createElement(o.Provider,{value:s},r||null,n)};r.displayName="LiveBannerAnchor";var s=function(e){var n=e.children,t=l.useContext(o);return l.useEffect((function(){return null===t||void 0===t||t(n),function(){null===t||void 0===t||t(null)}})),n===undefined?null:l.createElement(l.Fragment,null,t?null:n)};n.b=r},"s/A7":function(e,n,t){"use strict";t.d(n,"a",(function(){return l}));var a=t("8ezB"),i=t("Jz1U");Object(a.a)(),Object(i.b)();var l=function(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"start";e&&setTimeout((function(){e.scrollIntoView({behavior:"smooth",block:n})}))}}}]);