CandidatePortalInterviewPrepGuideContext",["CPXCareerSiteCareerProfileApplicationAIVersionCometControllerRouteBuilder","CaaSBodyContentLoggingCallbacks","CaaSLoggingContext","CandidatePortalInterviewPrepGuideContextProvider_article.graphql","CandidatePortalInterviewPrepGuideContextProvider_consideration.graphql","CandidatePortalLoggingUtils","CandidatePortalUpdateInterviewPrepGuideProgressMutation","FocusManager","RelayHooks","filterNulls","nullthrows","react","useCPNavigate","useCandidatePortalSmallScreenBreakpoint","useToggle"],(function(a,b,c,d,e,f,g){"use strict";var h,i,j,k=j||(j=d("react")),l=j,m=l.createContext,n=l.useCallback,o=l.useContext,p=l.useMemo,q=l.useRef,r=l.useState,s=m({contentRef:null,isInFlight:!1,isMobileTableOfContentsView:!1,onPageChange:function(){},onToggleMobileTableOfContentsView:function(){},onNavigateToApplications:function(){},pageNumber:0,pages:[],pagesViewed:[],pageTitleRef:null,prepGuideTitle:""});function a(a){var e,f=a.article,g=a.children,j=a.cmsID;a=a.consideration;f=d("RelayHooks").useFragment(h!==void 0?h:h=b("CandidatePortalInterviewPrepGuideContextProvider_article.graphql"),f);var l=d("RelayHooks").useFragment(i!==void 0?i:i=b("CandidatePortalInterviewPrepGuideContextProvider_consideration.graphql"),a);a=d("RelayHooks").useMutation(c("CandidatePortalUpdateInterviewPrepGuideProgressMutation"));var m=a[0],o=a[1];a=c("useCPNavigate")();var t=a.cpNavigate;a=d("useCandidatePortalSmallScreenBreakpoint").useCandidatePortalSmallScreenBreakpoint();var u=r(0),v=u[0],w=u[1];u=r((u=l==null?void 0:l.pages_viewed_for_interview_prep_guide)!=null?u:[]);var x=u[0],y=u[1],z=q(null),A=q(null);u=c("useToggle")(a);var B=u[0],C=u[1],D=f.title,E=c("filterNulls")([f!=null?{title:D,navTitle:"Overview",description:f==null?void 0:f.description,body_content:f.overview_page.galaxy_content}:null].concat((a=f==null||(e=f.pages)==null?void 0:e.map(function(a){return{title:a.page_title,navTitle:a.page_title,body_content:a.body_content.galaxy_content}}))!=null?a:[])),F=p(function(){return{consideration_id:l.id,payload:{considerationID:l.id,cmsID:j,prepGuideTitle:D,pagesViewed:x,pageNumber:v,isMobileTableOfContentsView:B,numberOfPagesAvailable:E.length}}},[l.id,j,D,x,v,B,E.length]),G=n(function(){d("CandidatePortalLoggingUtils").logAction("INTERVIEW_PREP_GUIDE","PREP_GUIDE_NAVIGATE_TO_APPLICATION_CLICK",F),t(c("CPXCareerSiteCareerProfileApplicationAIVersionCometControllerRouteBuilder").buildURL({consideration_id:l.id}))},[l.id,t,F]),H=n(function(a,b){var c;b===void 0&&(b=!1);d("CandidatePortalLoggingUtils").logAction("INTERVIEW_PREP_GUIDE","PREP_GUIDE_PAGE_CHANGE_CLICK",F);B&&C(!1);b||(z==null||(c=z.current)==null?void 0:c.scrollIntoView({behavior:"smooth",block:"start"}));if(!x.includes(v)){d("CandidatePortalLoggingUtils").logAction("INTERVIEW_PREP_GUIDE","PREP_GUIDE_UPDATE_PROGRESS_START",F);var e=[].concat(x,[v]);m({variables:{input:{consideration_id:l.id,pages_viewed:e,is_completed:e.length===E.length,number_of_pages_available:E.length},cms_id:j},optimisticUpdater:function(a){y(e);a=a.get(l.id);a!=null&&a.setValue(e,"pages_viewed_for_interview_prep_guide")},onCompleted:function(){b&&G(),d("CandidatePortalLoggingUtils").logAction("INTERVIEW_PREP_GUIDE","PREP_GUIDE_UPDATE_PROGRESS_SUCCESS",F)},onError:function(a){d("CandidatePortalLoggingUtils").logError("INTERVIEW_PREP_GUIDE",200,"PREP_GUIDE_UPDATE_PROGRESS_ERROR",a,F)}})}else b&&G();b||w(a);b||d("FocusManager").focusElement(A==null?void 0:A.current)},[m,j,l.id,B,F,G,v,x,E.length,C]),I=n(function(a){d("CandidatePortalLoggingUtils").logAction("INTERVIEW_PREP_GUIDE","PREP_GUIDE_TOGGLE_MOBILE_TABLE_OF_CONTENTS_CLICK",F),a?(C(!0),w(0)):C(!1)},[C,F]),J=n(function(a,b,c){b===void 0&&(b={});b={consideration_id:F.consideration_id,payload:babelHelpers["extends"]({},F.payload,b)};c!=null?d("CandidatePortalLoggingUtils").logError("INTERVIEW_PREP_GUIDE",200,a,c,b):d("CandidatePortalLoggingUtils").logAction("INTERVIEW_PREP_GUIDE",a,b)},[F]);u=n(function(){return{onDrawerClose:function(a){a={consideration_id:F.consideration_id,payload:babelHelpers["extends"]({},F.payload,{headerText:a})};d("CandidatePortalLoggingUtils").logAction("INTERVIEW_PREP_GUIDE","CAAS_BODY_CONTENT_DRAWER_CLOSE",a)},onDrawerOpen:function(a){a={consideration_id:F.consideration_id,payload:babelHelpers["extends"]({},F.payload,{headerText:a})};d("CandidatePortalLoggingUtils").logAction("INTERVIEW_PREP_GUIDE","CAAS_BODY_CONTENT_DRAWER_OPEN",a)},onNegativeReactionClick:function(a){},onPositiveReactionClick:function(a){}}},[F]);f=p(function(){return{contentRef:z,isInFlight:o,isMobileTableOfContentsView:B,onPageChange:H,onToggleMobileTableOfContentsView:I,onNavigateToApplications:G,pageNumber:v,pages:E,pagesViewed:x,pageTitleRef:A,prepGuideTitle:D}},[z,o,B,H,I,G,v,E,x,A,D]);a=p(function(){return{log:J}},[J]);return k.jsx(c("CaaSLoggingContext").Provider,{value:a,children:k.jsx(c("CaaSBodyContentLoggingCallbacks").Provider,{value:u(),children:k.jsx(s.Provider,{value:f,children:g})})})}a.displayName=a.name+" [from "+f.id+"]";function e(){return c("nullthrows")(o(s),"CandidatePortalInterviewPrepGuideContext not initialized")}g.CandidatePortalInterviewPrepGuideContext=s;g.CandidatePortalInterviewPrepGuideContextProvider=a;g.useCandidatePortalInterviewPrepGuideContext=e}),98);
-----
CandidatePortalUpdateInterviewPrepGuideProgressMutation",["CandidatePortalUpdateInterviewPrepGuideProgressMutation.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h;a=h!==void 0?h:h=b("CandidatePortalUpdateInterviewPrepGuideProgressMutation.graphql");g["default"]=a}),98);
-----
CandidatePortalUpdateInterviewPrepGuideProgressMutation.graphql",["CandidatePortalUpdateInterviewPrepGuideProgressMutation_candidate_portalRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a={defaultValue:null,kind:"LocalArgument",name:"cms_id"},c={defaultValue:null,kind:"LocalArgument",name:"input"},d={kind:"Variable",name:"cms_id",variableName:"cms_id"},e=[d,{kind:"Variable",name:"input",variableName:"input"}];d={alias:null,args:[d],kind:"ScalarField",name:"pages_viewed_for_interview_prep_guide",storageKey:null};var f={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:[a,c],kind:"Fragment",metadata:null,name:"CandidatePortalUpdateInterviewPrepGuideProgressMutation",selections:[{alias:null,args:e,concreteType:"XCPInterviewPrepGuideProgressExport",kind:"LinkedField",name:"xcp_update_interview_prep_guide_progress",plural:!1,selections:[{alias:null,args:null,concreteType:"XCPProdHiringConsiderationExport",kind:"LinkedField",name:"consideration",plural:!1,selections:[d],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[c,a],kind:"Operation",name:"CandidatePortalUpdateInterviewPrepGuideProgressMutation",selections:[{alias:null,args:e,concreteType:"XCPInterviewPrepGuideProgressExport",kind:"LinkedField",name:"xcp_update_interview_prep_guide_progress",plural:!1,selections:[{alias:null,args:null,concreteType:"XCPProdHiringConsiderationExport",kind:"LinkedField",name:"consideration",plural:!1,selections:[d,f],storageKey:null},f],storageKey:null}]},params:{id:b("CandidatePortalUpdateInterviewPrepGuideProgressMutation_candidate_portalRelayOperation"),metadata:{},name:"CandidatePortalUpdateInterviewPrepGuideProgressMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
CandidatePortalUpdateInterviewPrepGuideProgressMutation_candidate_portalRelayOperation",[],(function(a,b,c,d,e,f){e.exports="24979665305027956"}),null);
-----
-----
CandidatePortalUpdateInterviewPrepGuideProgressMutation",["CandidatePortalUpdateInterviewPrepGuideProgressMutation.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h;a=h!==void 0?h:h=b("CandidatePortalUpdateInterviewPrepGuideProgressMutation.graphql");g["default"]=a}),98);
-----
CandidatePortalUpdateInterviewPrepGuideProgressMutation.graphql",["CandidatePortalUpdateInterviewPrepGuideProgressMutation_candidate_portalRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a={defaultValue:null,kind:"LocalArgument",name:"cms_id"},c={defaultValue:null,kind:"LocalArgument",name:"input"},d={kind:"Variable",name:"cms_id",variableName:"cms_id"},e=[d,{kind:"Variable",name:"input",variableName:"input"}];d={alias:null,args:[d],kind:"ScalarField",name:"pages_viewed_for_interview_prep_guide",storageKey:null};var f={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:[a,c],kind:"Fragment",metadata:null,name:"CandidatePortalUpdateInterviewPrepGuideProgressMutation",selections:[{alias:null,args:e,concreteType:"XCPInterviewPrepGuideProgressExport",kind:"LinkedField",name:"xcp_update_interview_prep_guide_progress",plural:!1,selections:[{alias:null,args:null,concreteType:"XCPProdHiringConsiderationExport",kind:"LinkedField",name:"consideration",plural:!1,selections:[d],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[c,a],kind:"Operation",name:"CandidatePortalUpdateInterviewPrepGuideProgressMutation",selections:[{alias:null,args:e,concreteType:"XCPInterviewPrepGuideProgressExport",kind:"LinkedField",name:"xcp_update_interview_prep_guide_progress",plural:!1,selections:[{alias:null,args:null,concreteType:"XCPProdHiringConsiderationExport",kind:"LinkedField",name:"consideration",plural:!1,selections:[d,f],storageKey:null},f],storageKey:null}]},params:{id:b("CandidatePortalUpdateInterviewPrepGuideProgressMutation_candidate_portalRelayOperation"),metadata:{},name:"CandidatePortalUpdateInterviewPrepGuideProgressMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
CandidatePortalUpdateInterviewPrepGuideProgressMutation_candidate_portalRelayOperation",[],(function(a,b,c,d,e,f){e.exports="24979665305027956"}),null);
-----