(window.ansFrontendRelayWebpackJsonpFunction=window.ansFrontendRelayWebpackJsonpFunction||[]).push([["common-Mweb"],{"+l+O":function(e,t,n){"use strict";n.r(t);var i={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useOpenInAppBanner_viewInAppLink",selections:[{args:null,kind:"FragmentSpread",name:"useDeepLinkInfo_viewInAppLink"}],type:"ViewInAppLink",abstractKey:null,hash:"651b772e2e56095c12b113116fd9ccf6"};t["default"]=i},"2pj9":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i,a=n("VyO/"),r=n("q1tI"),o=n.n(r),l=n("0UDP"),s=void 0!==i?i:i=n("suGm"),c=function(e){var t=e.onDismiss,n=e.viewerId,i=Object(l.useRelayEnvironment)();return o.a.useCallback((function(){Object(a.c)({mutation:s,optimisticResponse:{openInAppBannerDismiss:{viewer:{id:n,mwebBannerToShow:null}}}},i),null===t||void 0===t||t()}),[t,i,n])}},"4PBo":function(e,t,n){"use strict";n.r(t);var i,a=n("lwsE"),r=n.n(a),o=n("W8MJ"),l=n.n(o),s=n("7W2i"),c=n.n(s),u=n("a1gu"),d=n.n(u),p=n("Nsbk"),f=n.n(p),h=n("xW9C"),m=n("jufJ"),g=n("zLpq"),b=n("/bbo"),v=n("KHUD"),w=n("F6zL"),k=n("OMLc"),y=n("zaBG"),I=n("VwdU"),O=n("llss"),L=n("RA+f"),T=n("krJQ"),E=n("HKeO"),D=n("VyO/"),A=n("d1zJ"),_=n("yju1"),S=n("thGD"),j=n("nwxp"),F=n("UyMh"),x=n("YVdv"),P=n.n(x),B=n("q1tI"),C=n.n(B),W=n("vgMo");function R(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=f()(e);if(t){var a=f()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return d()(this,n)}}var V=Object(h["default"])(w.c).withConfig({displayName:"MobileLookupOverlay___StyledTextInput",componentId:"ypvaz0-0"})(["&::placeholder,&::-webkit-input-placeholder{color:",";}"],(function(e){return e._css})),z=function(e){c()(n,e);var t=R(n);function n(e){var i;return r()(this,n),(i=t.call(this,e)).inputRef=void 0,i.bottomRef=void 0,i.show=function(){i.setState({show:!0}),Object(y.f)(!1)},i.hide=function(){i.setState({show:!1}),Object(y.f)(!0)},i.onChange=function(e){var t,n,a=(null===(t=e.target)||void 0===t||null===(n=t.value)||void 0===n?void 0:n.trim())||"";i.setState({text:a}),Object(S.a)("addQuestionBarTextDidChange",{text:a})},i.onKeyDown=function(e){e.keyCode===O.a.ENTER&&Object(F.c)("/search?q="+i.state.text)},i.showFooter=function(){i.setState({showFooter:!0})},i.hideFooter=function(){i.setState({showFooter:!1})},i.inputRef=C.a.createRef(),i.bottomRef=C.a.createRef(),i.state={show:!1,showFooter:!1,text:""},i}return l()(n,[{key:"componentDidMount",value:function(){Object(S.d)("showMobileSearchBar",this.show),Object(S.d)("hideMobileSearchBar",this.hide),Object(S.d)("showWebviewAskToolbar",this.showFooter),Object(S.d)("hideWebviewAskToolbar",this.hideFooter),this.focus(),Object(j.h)()&&(Object(_.a)("setPageProperties",{pullToRefresh:!1}),Object(_.a)("setPageAction",{visible:!1}))}},{key:"focus",value:function(){var e=this;Object(j.a)()&&Object(_.a)("showKeyboard"),setTimeout((function(){var t;null===(t=e.inputRef.current)||void 0===t||t.focus()}),400)}},{key:"componentWillUnmount",value:function(){Object(S.f)("showMobileSearchBar",this.show),Object(S.f)("hideMobileSearchBar",this.hide),Object(S.f)("showWebviewAskToolbar",this.showFooter),Object(S.f)("hideWebviewAskToolbar",this.hideFooter)}},{key:"onBack",value:function(){Object(j.h)()?Object(_.a)("dismiss",{}):(Object(S.a)("hideMobileSearchBar",{}),Object(S.a)("hideWebviewAskToolbar",{}))}},{key:"textInputProps",value:function(){var e,t={};e={px:"small",mr:"small",onChange:this.onChange,onKeyDown:this.onKeyDown,iconName:"Search",width:"100%",variant:"small",inputRef:this.inputRef};var n=Object(m.plaintextTranslate)("Search Quora");return Object(j.g)()?t={bg:"darkRed",color:"white",placeholder:n,noBorder:!0,iconColor:this.placeholderColor()}:Object(j.h)()&&(t={bg:"white",color:"gray_ultradark",placeholder:n}),Object.assign({},e,t)}},{key:"placeholderColor",value:function(){return P()(.4,this.props.theme.colors.text.white)}},{key:"renderTextInput",value:function(){return Object(j.g)()?C.a.createElement(V,Object.assign({},this.textInputProps(),{_css:this.placeholderColor()})):C.a.createElement(w.c,this.textInputProps())}},{key:"renderHeader",value:function(){var e=Object(j.g)()?{bg:"red",color:"white"}:{bg:"gray_ultralight",color:"gray_ultradark"};return C.a.createElement(C.a.Fragment,null,Object(j.a)()&&C.a.createElement(T.a,null),Object(j.a)()&&C.a.createElement(L.i,Object.assign({top:0,height:Object(A.e)(),zIndex:"overlay",fullX:!0},e)),C.a.createElement(L.i,Object.assign({display:"flex",top:Object(A.e)(),fullX:!0,height:A.c,alignItems:"center",zIndex:"overlay"},e),C.a.createElement(L.j,{width:"100%",py:"small"},C.a.createElement(g.a,{onClick:this.onBack,variant:Object(j.g)()?"white":"gray",icon:C.a.createElement(k.c,{name:"ChevronLeft"}),size:"small"}),this.renderTextInput())))}},{key:"renderFooter",value:function(){var e,t=this;if(!this.state.showFooter)return null;var n=Object(j.g)()&&j.r&&(null===(e=window)||void 0===e?void 0:e.visualViewport);return n&&Object(E.d)((function(e){setTimeout((function(){var n,i;null===(n=t.bottomRef)||void 0===n||null===(i=n.current)||void 0===i||i.handleViewportChange({target:e.visualViewport})}),100)})),C.a.createElement(I.a,{condition:!!n,wrapper:function(e){return C.a.createElement(v.a,{innerRef:t.bottomRef,fullX:!0,bottom:0,zIndex:"overlay",borderTop:!0,bg:"white"},e)},elseWrapper:function(e){return C.a.createElement(L.r,{bg:"white",bottom:0,borderTop:!0,zIndex:"overlay"},e)}},C.a.createElement(L.j,{justifyContent:"flex-end"},C.a.createElement(L.e,{p:"small"},C.a.createElement(b.a,{text:Object(m.plaintextTranslate)("Ask question"),variant:"red",onClick:function(){Object(j.g)()&&Object(S.a)("hideMobileSearchBar",{}),Object(S.a)("askToolbarSubmit",{})}}))))}},{key:"render",value:function(){return Object(j.g)()&&!this.state.show?null:C.a.createElement(I.a,{condition:Object(j.g)(),wrapper:function(e){return C.a.createElement(L.i,{top:0,left:0,zIndex:"overlay",full:!0,bg:"gray",height:"100%"},e)}},this.renderHeader(),C.a.createElement(L.j,{flexDirection:"column",flex:1,overflowY:"auto",height:"100%"},C.a.createElement(L.e,{height:A.c,flexShrink:0}),C.a.createElement(L.e,{flex:1},C.a.createElement(W.a,{viewer:this.props.viewer}))),this.renderFooter())}}]),n}(C.a.Component);z.fragments={viewer:void 0!==i?i:i=n("e5I7")},z.displayName="MobileLookupOverlay",t["default"]=Object(h.withTheme)(Object(D.b)(z))},"5IrV":function(e,t,n){"use strict";n.r(t);var i={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"DownloadAppWall_viewInAppLink",selections:[{alias:null,args:null,kind:"ScalarField",name:"trackId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"linkData",storageKey:null}],type:"ViewInAppLink",abstractKey:null,hash:"39c151db9c49e43e5eddf2c724800462"};t["default"]=i},"9a3X":function(e,t,n){"use strict";n.r(t);var i=n("jufJ"),a=n("5Nmz"),r=n("zLpq"),o=n("OMLc"),l=n("7/5D"),s=n("RA+f"),c=n("d1zJ"),u=n("q1tI"),d=n.n(u),p=function(e){var t=e.isVisible,n=e.toggleSidebar;return d.a.createElement(s.c,{"in":t},(function(e){return d.a.createElement(s.i,{full:!0,zIndex:"overlay"},d.a.createElement(s.g,{as:s.a,bg:"black_transparent_dark",full:!0,onClick:n,animation:e,fadeIn:!0,fadeOut:!0}),d.a.createElement(s.g,{as:s.a,display:"flex",flexDirection:"column",bg:"white",fullY:!0,maxWidth:360,width:"calc(100vw - 50px)",animation:e,slideIn:"left",slideOut:"left",fadeOut:!0},d.a.createElement(s.j,{height:c.c,pl:"medium",pr:"tiny",alignItems:"center",bg:"gray_ultralight",borderBottom:!0},d.a.createElement(l.a,null,d.a.createElement(i.Translate,null,"Your Account")),d.a.createElement(r.a,{icon:d.a.createElement(o.c,{name:"SmallClose"}),ml:"auto",onClick:n})),d.a.createElement(s.q,{overflowY:"auto",flex:1},d.a.createElement(a.a,null))))}))};p.displayName="MWebSidebar",t["default"]=p},"E/G4":function(e,t,n){"use strict";n.r(t);var i={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useDeepLinkInfo_viewInAppLink",selections:[{alias:null,args:null,kind:"ScalarField",name:"trackId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"linkData",storageKey:null}],type:"ViewInAppLink",abstractKey:null,hash:"161d41bbfbde35e96c2130d79baafdde"};t["default"]=i},KHUD:function(e,t,n){"use strict";var i=n("J4zp"),a=n.n(i),r=n("QILm"),o=n.n(r),l=n("xW9C"),s=n("RA+f"),c=n("nwxp"),u=n("q1tI"),d=n.n(u),p=Object(l["default"])(s.i).withConfig({displayName:"FixedBottomBox___StyledFixed",componentId:"stb0yv-0"})([""," transform:translateY(-","px);"],(function(e){return e._css}),(function(e){return e._css2})),f=function(e){var t=e.children,n=e.css,i=e.animateTransition,r=void 0!==i&&i,l=o()(e,["children","css","animateTransition"]),s=d.a.useState(0),u=a()(s,2),f=u[0],h=u[1],m=d.a.useState(!1),g=a()(m,2),b=g[0],v=g[1],w=d.a.createRef(),k=d.a.useCallback((function(e){b||(v(!0),requestAnimationFrame((function(){v(!1);var t=e.target;t&&h(window.innerHeight-t.height)})))}),[b,h,v]);return d.a.useEffect((function(){var t;(window.visualViewport&&Object(c.g)()&&c.r&&(window.visualViewport.addEventListener("scroll",k),window.visualViewport.addEventListener("resize",k),window.visualViewport.dispatchEvent(new Event("resize"))),w.current)&&(null===(t=e.onHeightMeasure)||void 0===t||t.call(e,w.current.clientHeight));return function(){window.visualViewport&&(window.visualViewport.removeEventListener("scroll",k),window.visualViewport.removeEventListener("resize",k))}})),d.a.createElement(p,Object.assign({},l,{transition:r?"transform":undefined,transitionTimingFunction:c.r&&r?"cubic-bezier(.17,.59,.4,.77)":undefined,transitionDuration:c.r&&r?"260ms":undefined,innerRef:w,_css:n||"",_css2:f}),t)};f.displayName="FixedBottomBox",t.a=f},TyKp:function(e,t,n){"use strict";n.r(t);var i={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OpenInAppBanner_queryRoot",selections:[{alias:null,args:null,concreteType:"Viewer",kind:"LinkedField",name:"viewer",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"mwebBannerToShow",storageKey:null},{args:null,kind:"FragmentSpread",name:"useOpenInAppBanner_viewer"}],storageKey:null},{alias:null,args:null,concreteType:"ViewInAppLink",kind:"LinkedField",name:"viewInAppLink",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"useOpenInAppBanner_viewInAppLink"}],storageKey:null}],type:"QueryRoot",abstractKey:null,hash:"c3480a3cef846f1cb69f834028399b15"};t["default"]=i},VSaK:function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var i,a=n("HKeO"),r=n("wOJ8"),o=new(n.n(r).a),l="window:scroll",s=!1,c=function(e){s||(s=!0,Object(a.d)((function(e){e.addEventListener("scroll",(function(e){i&&cancelAnimationFrame(i),i=requestAnimationFrame((function(){o.emit(l,e)}))}),!0)}))),o.on(l,e)},u=function(e){o.off(l,e)}},bilo:function(e,t,n){"use strict";n.r(t);var i=function(){var e={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"viewerIsNewUser",storageKey:null},n=[t,{alias:null,args:null,kind:"ScalarField",name:"isViewerRecentlyLoggedIn",storageKey:null}];return{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"DownloadAppWall_zapdosDeck",selections:[e,{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"deckType",storageKey:null},{alias:null,args:null,concreteType:"Viewer",kind:"LinkedField",name:"viewer",plural:!1,selections:[e],storageKey:null},{kind:"InlineFragment",selections:n,type:"ActivationWall",abstractKey:null},{kind:"InlineFragment",selections:n,type:"ActivationWallQuestionPage",abstractKey:null},{kind:"InlineFragment",selections:[t],type:"ActivationWallActionBased",abstractKey:null}],type:"Deck",abstractKey:"__isDeck"}}();i.hash="0d14bdd26224b13e8fede8160ebf66c4",t["default"]=i},e5I7:function(e,t,n){"use strict";n.r(t);var i={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"MobileLookupOverlay_viewer",selections:[{args:null,kind:"FragmentSpread",name:"MobileLookupMain_viewer"}],type:"Viewer",abstractKey:null,hash:"1432bb25dd4a2346b9f287c174d67d12"};t["default"]=i},eo6E:function(e,t,n){"use strict";n.r(t);var i=n("jufJ"),a=n("q1tI"),r=n.n(a),o=n("0UDP"),l=n("kgze"),s=n("zLpq"),c=n("OMLc"),u=n("RA+f"),d=n("xW9C"),p=function(e){var t=e.bannerHeight,n=e.theme,a=e.onClick,o=e.onDismiss,l=e.label,d=e.animateDirection,p=void 0===d?"bottom":d,f=e.style,h=e.needSpacer,m=e.opacity,g=void 0===m?.95:m,b=e.isVisible;return r.a.createElement(u.c,{"in":b,appear:!0},(function(e){return r.a.createElement(r.a.Fragment,null,h&&r.a.createElement(u.e,{height:t,className:"spacing_log_open_in_app_banner"}),r.a.createElement(u.g,{animation:e,fadeIn:!0,fadeOut:!0,slideIn:p,slideOut:p,style:Object.assign({position:"sticky",zIndex:n.zIndices.footer,height:t},f)},r.a.createElement(u.a,{full:!0,bg:"blue",opacity:g},r.a.createElement(u.f,{color:"white",height:"100%",width:"100%",onClick:a},r.a.createElement(u.s,{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",medium:!0},l)),r.a.createElement(u.a,{centerY:!0,right:"small"},r.a.createElement(s.a,{icon:r.a.createElement(c.c,{name:"SmallClose"}),variant:"white",onClick:o,"aria-label":Object(i.plaintextTranslate)("Dismiss")})))))}))};p.displayName="MobileBanner";var f,h=Object(d.withTheme)(p),m=n("SKAY"),g=n("8lmh"),b=n("mF64"),v=n("UyMh"),w=n("wQB2"),k=n("zXuH");var y,I,O=n("2pj9");function L(e){var t=e.viewInAppLink,i=e.viewer,a=Object(o.useFragment)(void 0!==y?y:y=n("+l+O"),t),l=Object(o.useFragment)(void 0!==I?I:I=n("kU9P"),i).id,s=function(e){var t=e.viewInAppLink,i=Object(o.useFragment)(void 0!==f?f:f=n("E/G4"),t),a=i.trackId,l=i.linkData,s=r.a.useRef(new k.a(a)),c=r.a.useRef(null);return r.a.useEffect((function(){var e=JSON.parse(l),t=s.current.getDeepLinkInfo({linkType:k.b.OPEN_IN_APP_BANNER,extraData:e});c.current=t}),[l,s]),c}({viewInAppLink:a}),c=r.a.useCallback((function(e){Object(g.tempFailureInvariant)(s.current,"Deep Link Info ".concat(s.current," is invalid."));var t=s.current,n=t.deepLinkId,i=t.deepLink,a=t.provider,r=t.viewInAppLinkType;Object(w.log)("mweb_view_in_app_link_logger",{step:e,component:r,url:Object(b.b)().href,controller:Object(m.getSetting)("controller"),action:Object(m.getSetting)("action"),deepLinkId:n,deepLink:i,provider:a})}),[s]);r.a.useEffect((function(){c("show")}),[c]);var u=r.a.useCallback((function(){c("dismiss")}),[c]),d=Object(O.a)({onDismiss:u,viewerId:l});return{handleClick:r.a.useCallback((function(){c("click"),Object(g.tempFailureInvariant)(s.current,"Deep Link Info ".concat(s.current," is invalid.")),Object(v.c)(s.current.deepLink)}),[s,c]),handleDismiss:d}}var T,E=n("nw8N");t["default"]=function(e){var t=e.queryRoot,a=e.setStickyFooterHeight,s=Object(o.useFragment)(void 0!==T?T:T=n("TyKp"),t),c=s.viewer,u=s.viewInAppLink,d=c.mwebBannerToShow===l.a.open_in_app,p=L({viewInAppLink:u,viewer:c}),f=p.handleDismiss,m=p.handleClick;return Object(E.a)({setStickyFooterHeight:a,bannerHeight:50,isVisible:d}),r.a.createElement(h,{label:r.a.createElement(i.Translate,null,"Open in App"),onClick:m,onDismiss:f,bannerHeight:50,animateDirection:"bottom",isVisible:d,style:{left:0,right:0,bottom:0,position:"fixed"}})}},hg0o:function(e,t,n){"use strict";n.r(t);var i=function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"cardType"}],t=[{alias:null,args:[{kind:"Variable",name:"cardType",variableName:"cardType"}],concreteType:"ZapdosCardImpression",kind:"LinkedField",name:"zapdosCardImpression",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"DownloadAppWallInner_zapdosCardImpression_Mutation",selections:t,type:"MutationRoot",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"DownloadAppWallInner_zapdosCardImpression_Mutation",selections:t},params:{id:"49928935a07c300742f01014048cd81648b1a0b9d642fbc352e8c240171813de",metadata:{},name:"DownloadAppWallInner_zapdosCardImpression_Mutation",operationKind:"mutation",text:null}}}();i.hash="dd119b39d889c55cb57b2a156db9a20d",t["default"]=i},kU9P:function(e,t,n){"use strict";n.r(t);var i={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useOpenInAppBanner_viewer",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Viewer",abstractKey:null,hash:"4b09d2d77d5a92e7b1f8789a7ce8d1b5"};t["default"]=i},nw8N:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("KdZM"),a=n("q1tI"),r=n.n(a),o=function(e){var t=e.setStickyFooterHeight,n=e.isVisible,a=e.bannerHeight,o=r.a.useContext(i.a);r.a.useEffect((function(){return n?o?(t(o+a),function(){return t(o-a)}):(t((function(e){return e+a})),function(){return t((function(e){return e-a}))}):function(){}}),[t,a,n])}},pcde:function(e,t,n){"use strict";n.r(t);var i,a=n("lwsE"),r=n.n(a),o=n("W8MJ"),l=n.n(o),s=n("7W2i"),c=n.n(s),u=n("a1gu"),d=n.n(u),p=n("Nsbk"),f=n.n(p),h=n("jufJ"),m=n("zXuH"),g=n("SKAY"),b=function(){return"index"===Object(g.getSetting)("controller")&&"index"===Object(g.getSetting)("action")},v=n("Pp7N"),w=n("KP5v"),k=n("SW3P"),y=n("VyO/"),I=n("AaDK"),O=n("nwxp"),L=n("FuLD"),T=n("E+oP"),E=n.n(T),D=n("q1tI"),A=n.n(D),_=n("LW3J"),S=n("Yc5t"),j=n("k9CX"),F=n("T5JH"),x=n("zLpq"),P=n("/bbo"),B=n("OMLc"),C=n("7/5D"),W=n("VwdU"),R=n("RA+f"),V=n("HKeO"),z=n("VSaK");function K(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=f()(e);if(t){var a=f()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return d()(this,n)}}var M=void 0!==i?i:i=n("hg0o"),N=function(e){c()(n,e);var t=K(n);function n(e){var i;return r()(this,n),(i=t.call(this,e)).handleScroll=function(){Object(V.d)((function(e){i.state.shown||i.state.alreadyShownOnPage||e.scrollY>2e3&&i.setState({shown:!0,alreadyShownOnPage:!0})}))},i.handleWallClick=function(){"function"===typeof i.props.handleLogEvent&&i.props.handleLogEvent({step:"click",viewInAppLinkType:i.props.viewInAppLinkType,referrerLink:i.props.referrerLink,deepLinkId:i.props.deepLinkId,deepLink:i.props.deepLink,provider:i.props.provider})},i.handleWallShown=function(){var e=i.props,t=e.zapdosCardType,a=e.wallPageType;Object(y.c)({mutation:n.mutations.zapdosActivationWallLogImpressionMutation,variables:{cardType:t}}),Object(I.a)("download_app_wall_impression",{wall_type:a}),"function"===typeof i.props.handleLogEvent&&i.props.handleLogEvent({step:"show",viewInAppLinkType:i.props.viewInAppLinkType,referrerLink:i.props.referrerLink,deepLinkId:i.props.deepLinkId,deepLink:i.props.deepLink,provider:i.props.provider})},i.getDownloadAppButtonText=function(){return"QuestionPage"===i.props.wallPageType?Object(h.plaintextTranslate)("Open in app"):Object(h.plaintextTranslate)("Download the free app")},i.getAppButtonText=function(){return Object(h.plaintextTranslate)("I already have the app")},i.getCloseText=function(){return Object(h.plaintextTranslate)("Stay in browser")},i.renderCloseTextButton=function(){return i.shouldShowCloseText()?A.a.createElement(x.a,{onClick:function(){i.setState({shown:!1})},text:i.getCloseText()}):null},i.inViewHasTriggered=!1,i.state={shown:!1,alreadyShownOnPage:!1},i}return l()(n,[{key:"componentDidMount",value:function(){this.props.showImmediately?this.updateShownState(!0):this.props.showOnScroll&&Object(z.b)(this.handleScroll)}},{key:"updateShownState",value:function(e){this.setState({shown:e})}},{key:"shouldShowCloseText",value:function(){return this.props.useCloseText}},{key:"componentDidUpdate",value:function(e,t){if(this.props.showImmediately&&!e.showImmediately&&this.updateShownState(!0),t.shown||!this.state.shown||this.props.inline||this.handleWallShown(),!this.props.inline){if(this.props.scrollToTop)if(this.state.shown)document.body.style.overflow="hidden",document.body.style.width="100%",document.body.style.position="fixed",document.body.style.top="-".concat(window.scrollY,"px");else{document.body.style.overflow="scroll",document.body.style.width="initial",document.body.style.position="initial";var n=document.body.style.top;window.scrollTo(0,-1*parseInt(n||"0"))}this.props.scrollToTop||(this.state.shown?document.body.style.overflow="hidden":document.body.style.overflow="scroll")}}},{key:"componentWillUnmount",value:function(){Object(z.a)(this.handleScroll)}},{key:"shouldShowAppFallbackButton",value:function(){return"QuestionPage"!==this.props.wallPageType}},{key:"renderContent",value:function(){var e=this,t=this.props,n=t.inline,i=t.deepLink,a=t.title,r=t.subtitle,o=t.bgImage,l=n?undefined:"medium";return A.a.createElement(R.e,{bg:"white",width:"100%",position:"relative",borderTopLeftRadius:l,borderTopRightRadius:l,overflow:"hidden"},this.props.dismissible&&!this.shouldShowCloseText()&&A.a.createElement(R.a,{top:"small",right:"small",zIndex:1},A.a.createElement(x.a,{icon:A.a.createElement(B.c,{name:"Close"}),variant:"blue_all",onClick:function(){e.setState({shown:!1})}})),A.a.createElement(F.a,{src:o,aspectRatio:16/9,mt:"medium",bgColor:"white",bgSize:"contain",imageBorder:!1}),A.a.createElement(R.e,{textAlign:"center",pb:"large",pl:"large",pr:"large"},A.a.createElement(R.e,{mb:r?"large":"medium"},A.a.createElement(C.a,{fontSize:r?"large":"xlarge",mb:r?"tiny":undefined},a),r&&A.a.createElement(R.s,{regular:!0,color:"grey"},r)),A.a.createElement(R.e,{mb:"medium"},A.a.createElement(P.a,{variant:"blue",href:i,text:this.getDownloadAppButtonText(),onClick:this.handleWallClick})),A.a.createElement(R.j,{mt:"tiny",alignItems:"center",justifyContent:"center"},A.a.createElement(_.a,null,this.shouldShowAppFallbackButton()&&A.a.createElement(x.a,{href:i,onClick:this.handleWallClick,text:this.getAppButtonText()}),this.renderCloseTextButton()))))}},{key:"renderOverlayWrapper",value:function(e){return A.a.createElement(j.b,null,(function(t){return A.a.createElement(R.i,{top:0,left:0,width:"100%",height:"100%",zIndex:"blocking_wall",display:"flex",alignItems:"flex-end",justifyContent:"center",bg:"black_transparent_dark",style:t},e)}))}},{key:"renderImpressionTrackingBox",value:function(e){var t=this;return A.a.createElement(S.a,{onImpression:function(e){e&&!t.inViewHasTriggered&&(t.inViewHasTriggered=!0,t.handleWallShown())}},e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.inline,i=t.bgImage;return A.a.createElement(A.a.Fragment,null,A.a.createElement(R.k,{src:i,display:"none"}),this.state.shown&&A.a.createElement(W.a,{condition:n,wrapper:function(t){return e.renderImpressionTrackingBox(t)},elseWrapper:function(t){return e.renderOverlayWrapper(t)}},this.renderContent()))}}]),n}(A.a.Component);N.mutations={zapdosActivationWallLogImpressionMutation:M},N.defaultProps={showOnScroll:!0,dismissible:!0,inline:!1,useCloseText:!1,showImmediately:!1,scrollToTop:!0},N.displayName="DownloadAppWallInner";var Q,U,q=N;function H(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=f()(e);if(t){var a=f()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return d()(this,n)}}var J=function(e,t){return!(!Object(O.g)()||!Object(L.a)())&&!(!e||e.deckType!==t||!("viewerIsNewUser"in e)||null===e.viewerIsNewUser||e.viewerIsNewUser)},G=function(e){c()(n,e);var t=H(n);function n(e){var i;return r()(this,n),(i=t.call(this,e)).zapdosDeckInfo=void 0,i.deepLinkGenerator=void 0,i.deepLinkInfo=void 0,i.isIneligibleCommon=function(){return!Object(O.g)()||!Object(L.a)()||Object(k.a)("disable_blocking_app_modal_mweb")},i.isUserEligibleToSeeWall=function(){if(i.isIneligibleCommon()||!i.zapdosDeckInfo)return!1;if(i.isQuestionPageFromRelatedQuestion()){if(!J(i.zapdosDeckInfo,245))return!1;if("isViewerRecentlyLoggedIn"in i.zapdosDeckInfo&&!1===i.zapdosDeckInfo.isViewerRecentlyLoggedIn)return i.getI18nVariant()}return!!b()&&(J(i.zapdosDeckInfo,193)&&i.getI18nVariant())},i.isUserEligibleToSeeActionBasedWall=function(){return!i.isIneligibleCommon()&&!(!i.zapdosDeckInfo||298!==i.zapdosDeckInfo.deckType||!("viewerIsNewUser"in i.zapdosDeckInfo)||null===i.zapdosDeckInfo.viewerIsNewUser||i.zapdosDeckInfo.viewerIsNewUser)},i.isFeedPageFromDigest=function(){var e=Object(g.getSetting)("getParams",{});return"digest_story"in e&&!!e.digest_story},i.isQuestionPageFromRelatedQuestion=function(){return"question"===Object(g.getSetting)("controller")&&"q"===Object(g.getSetting)("action")&&"question"===Object(g.getSetting)("getPageTypeOfRefererUrl")},i.getDigestTitle=function(){return Object(h.plaintextTranslate)("Get your digest wherever you go")},i.getFeedOrQuestionTitle=function(){return Object(h.plaintextTranslate)("There is more in the app")},i.handleLogEvent=function(e){var t=e.step,n=e.viewInAppLinkType,i=e.referrerLink,a=e.deepLink,r=e.deepLinkId,o=e.provider;Object(I.a)("mweb_view_in_app_link_logger",{step:t,component:n,url:i,controller:Object(g.getSetting)("controller"),action:Object(g.getSetting)("action"),deepLinkId:r,deepLink:a,provider:o})},i.zapdosDeckInfo=e.zapdosDeck||null,i.deepLinkInfo={},i.deepLinkGenerator=new m.a(e.viewInAppLink.trackId),i.state={showOnQuestionPage:!1,showOnFeed:!1,showActionBased:null},i}return l()(n,[{key:"getQuestionPageVariantAndLog",value:function(){return""}},{key:"getQuestionPageVariant",value:function(){return!(!Object(O.g)()||!Object(L.a)())&&(this.isQuestionPageFromRelatedQuestion()&&this.getQuestionPageVariantAndLog())}},{key:"getI18nVariant",value:function(){return!!this.zapdosDeckInfo&&(!!this.zapdosDeckInfo.viewer&&!Object(w.a)("app_download_wall_holdout"))}},{key:"inQuestionPageVariant",value:function(){var e=this.getQuestionPageVariant();return!E()(e)}},{key:"onQuestionAnswerItemInView",value:function(e){var t=e.answerIndex;String(t)===this.getQuestionPageVariant()&&(this.state.showOnQuestionPage||this.setState({showOnQuestionPage:!0}))}},{key:"onMultifeedBundleInView",value:function(e){5!==e.index||this.state.showOnFeed||this.setState({showOnFeed:!0})}},{key:"componentDidMount",value:function(){var e=this;v.c.subscribe(v.a.QUESTION_ITEM_ANSWER_ITEM_IN_VIEW,(function(t){null!==t&&void 0!==t&&t.payload&&e.onQuestionAnswerItemInView(t.payload)})),v.c.subscribe(v.a.MULTIFEED_BUNDLE_IN_VIEW,(function(t){null!==t&&void 0!==t&&t.payload&&e.onMultifeedBundleInView(t.payload)})),this.isUserEligibleToSeeActionBasedWall()&&(v.c.subscribe(v.a.COMMENT_ADDED,(function(){e.showActionBasedWall("comment")})),v.c.subscribe(v.a.ANSWER_ADDED_DOWNLOAD_APP_PROMPT,(function(){e.showActionBasedWall("answer")})),v.c.subscribe(v.a.TRIBE_FOLLOWED,(function(){e.showActionBasedWall("tribe")})))}},{key:"showActionBasedWall",value:function(e){this.isUserEligibleToSeeActionBasedWall()&&this.setState({showActionBased:e})}},{key:"renderCloseTextVariant",value:function(){return A.a.createElement(q,Object.assign({},this.getFeedProps(),{useCloseText:!0,scrollToTop:!1,showOnScroll:!1,showImmediately:this.state.showOnFeed}))}},{key:"getFeedProps",value:function(){return this.isFeedPageFromDigest()?this.getDigestFeedProps():this.getNonDigestFeedProps()}},{key:"getDeepLinkInfo",value:function(e){if(this.deepLinkInfo[e])return this.deepLinkInfo[e];var t=JSON.parse(this.props.viewInAppLink.linkData),n=this.deepLinkGenerator.getDeepLinkInfo({linkType:e,extraData:t});return this.deepLinkInfo[e]=n,n}},{key:"getDigestFeedProps",value:function(){var e=this.getDeepLinkInfo(m.b.DOWNLOAD_APP_LINK_DIGEST_VISIT_FEED_MODAL);return{viewInAppLinkType:e.viewInAppLinkType,referrerLink:e.referrerLink,deepLink:e.deepLink,deepLinkId:e.deepLinkId,provider:e.provider,title:this.getDigestTitle(),subtitle:"",bgImage:"//qsf.fs.quoracdn.net/-4-ans_frontend_assets.images.use_app.png-26-daeb510d59b68d4f.png",isUserEligibleToSeeWall:this.isUserEligibleToSeeWall(),wallPageType:"FeedPageFromDigest",zapdosCardType:194,handleLogEvent:this.handleLogEvent}}},{key:"getNonDigestFeedProps",value:function(){var e=this.getDeepLinkInfo(m.b.DOWNLOAD_APP_LINK_FEED_MODAL);return{viewInAppLinkType:e.viewInAppLinkType,referrerLink:e.referrerLink,deepLink:e.deepLink,deepLinkId:e.deepLinkId,provider:e.provider,title:this.getFeedOrQuestionTitle(),subtitle:null,bgImage:"//qsf.fs.quoracdn.net/-4-ans_frontend_assets.images.use_app.png-26-daeb510d59b68d4f.png",isUserEligibleToSeeWall:this.isUserEligibleToSeeWall(),wallPageType:"FeedPage",zapdosCardType:194,handleLogEvent:this.handleLogEvent}}},{key:"getQuestionPageProps",value:function(){var e=this.getDeepLinkInfo(m.b.DOWNLOAD_APP_LINK_FROM_QUESTION_PAGE);return{viewInAppLinkType:e.viewInAppLinkType,referrerLink:e.referrerLink,deepLink:e.deepLink,deepLinkId:e.deepLinkId,provider:e.provider,title:this.getFeedOrQuestionTitle(),subtitle:null,bgImage:"//qsf.fs.quoracdn.net/-4-ans_frontend_assets.images.use_app.png-26-daeb510d59b68d4f.png",isUserEligibleToSeeWall:this.isUserEligibleToSeeWall(),wallPageType:"QuestionPage",zapdosCardType:246,handleLogEvent:this.handleLogEvent}}},{key:"getActionBasedTitle",value:function(){var e=Object(h.plaintextTranslate)("Don't miss upvotes and comments");switch(this.state.showActionBased){case"answer":case"comment":return e;case"tribe":return Object(h.plaintextTranslate)("Don't miss out on new stories")}return this.getFeedOrQuestionTitle()}},{key:"getActionBasedSubTitle",value:function(){switch(this.state.showActionBased){case"answer":return Object(h.plaintextTranslate)("Download the app to get notified when your new answer gets upvotes and comments");case"comment":return Object(h.plaintextTranslate)("Download the app to get notified when your new comment gets upvotes and replies");case"tribe":return Object(h.plaintextTranslate)("Download the app to get notified when new stories are added to this Space")}return null}},{key:"getActionBasedProps",value:function(){var e=this.getDeepLinkInfo(m.b.DOWNLOAD_APP_LINK_ACTION_BASED);return{viewInAppLinkType:e.viewInAppLinkType,referrerLink:e.referrerLink,deepLink:e.deepLink,deepLinkId:e.deepLinkId,provider:e.provider,title:this.getActionBasedTitle(),subtitle:this.getActionBasedSubTitle(),bgImage:"//qsf.fs.quoracdn.net/-4-ans_frontend_assets.images.use_app.png-26-daeb510d59b68d4f.png",isUserEligibleToSeeWall:this.isUserEligibleToSeeActionBasedWall(),wallPageType:"ActionBased",zapdosCardType:299,handleLogEvent:this.handleLogEvent,showImmediately:!0,showOnScroll:!1,scrollToTop:!1}}},{key:"renderActionBasedWall",value:function(){return this.isUserEligibleToSeeActionBasedWall()&&this.state.showActionBased&&this.getI18nVariant()?A.a.createElement(q,this.getActionBasedProps()):null}},{key:"render",value:function(){if(this.isUserEligibleToSeeWall()){var e=this.isFeedPageFromDigest(),t=this.isQuestionPageFromRelatedQuestion();if(b()&&(Object(O.g)()&&Object(L.a)()))return this.renderCloseTextVariant();var n=!0,i=!1;return this.inQuestionPageVariant()&&(n=this.state.showOnQuestionPage,i=!0),A.a.createElement(A.a.Fragment,null,!t&&!e&&A.a.createElement(q,this.getNonDigestFeedProps()),e&&A.a.createElement(q,this.getDigestFeedProps()),t&&A.a.createElement(q,Object.assign({},this.getQuestionPageProps(),{showImmediately:n,showOnScroll:!1,dismissible:!0,useCloseText:i})))}return this.renderActionBasedWall()}}]),n}(A.a.Component);G.fragments={zapdosDeck:void 0!==Q?Q:Q=n("bilo"),viewInAppLink:void 0!==U?U:U=n("5IrV")},G.displayName="DownloadAppWall";t["default"]=Object(y.b)(G)},suGm:function(e,t,n){"use strict";n.r(t);var i=function(){var e=[{alias:null,args:null,concreteType:"OpenInAppBannerDismiss",kind:"LinkedField",name:"openInAppBannerDismiss",plural:!1,selections:[{alias:null,args:null,concreteType:"Viewer",kind:"LinkedField",name:"viewer",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"mwebBannerToShow",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useDismissMobileFooterBanner_openInAppBannerDismiss_Mutation",selections:e,type:"MutationRoot",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"useDismissMobileFooterBanner_openInAppBannerDismiss_Mutation",selections:e},params:{id:"7066f96f2d006a58e4cb5c12d8bcd9765db086261fbab2025537e587da77a87f",metadata:{},name:"useDismissMobileFooterBanner_openInAppBannerDismiss_Mutation",operationKind:"mutation",text:null}}}();i.hash="1b8ca2c50a21d92abe889cf20044291d",t["default"]=i},vgMo:function(e,t,n){"use strict";var i=n("/G9y"),a=Object(i.a)((function(){return n.e("component-MobileLookup").then(n.bind(null,"MwvS"))}));t.a=a}}]);